@redneckz/wildless-cms-uni-blocks 0.14.688 → 0.14.690

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 (829) hide show
  1. package/bundle/bundle.umd.js +277 -346
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/{dist/components/CreditCardForm/getFirstStepData.d.ts → bundle/components/CreditCardForm/getCardData.d.ts} +1 -1
  4. package/bundle/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
  5. package/bundle/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +2 -7
  6. package/bundle/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +2 -5
  7. package/bundle/hooks/useLocalStorage.d.ts +1 -1
  8. package/bundle/hooks/useOnEscape.d.ts +1 -0
  9. package/bundle/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +0 -1
  10. package/bundle/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -1
  11. package/bundle/ui-kit/DialogManager/DialogAction.d.ts +8 -9
  12. package/bundle/ui-kit/DialogManager/isDialogOpen.d.ts +2 -2
  13. package/bundle/ui-kit/DialogManager/useDialog.d.ts +9 -0
  14. package/bundle/ui-kit/DialogManager/useDialogManager.d.ts +3 -6
  15. package/bundle/ui-kit/DialogManager/useDialogsList.d.ts +8 -7
  16. package/bundle/ui-kit/DocumentDialog/DocumentDialog.d.ts +6 -0
  17. package/bundle/ui-kit/DocumentDialog/uaeDocumentDialog.d.ts +2 -0
  18. package/bundle/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +1 -1
  19. package/bundle/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -9
  20. package/bundle/ui-kit/FormField/SelectField.d.ts +1 -0
  21. package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  22. package/bundle/ui-kit/PopupManager/PopupAction.d.ts +7 -10
  23. package/bundle/ui-kit/PopupManager/usePopupManager.d.ts +3 -4
  24. package/bundle/ui-kit/ReportDialog/ReportDialog.d.ts +1 -0
  25. package/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
  26. package/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +1 -0
  27. package/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -2
  28. package/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +3 -3
  29. package/dist/components/ApplicationForm/ApplicationForm.js +5 -4
  30. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  31. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +7 -11
  32. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  33. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -6
  34. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  35. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +23 -18
  36. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  37. package/dist/components/CreditCardForm/StepsNavigationButtons.js +1 -1
  38. package/dist/components/CreditCardForm/calculateInputs.js +2 -1
  39. package/dist/components/CreditCardForm/calculateInputs.js.map +1 -1
  40. package/dist/components/CreditCardForm/creditCardFormStepsData.js +18 -9
  41. package/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
  42. package/{bundle/components/CreditCardForm/getFirstStepData.d.ts → dist/components/CreditCardForm/getCardData.d.ts} +1 -1
  43. package/dist/components/CreditCardForm/{getFirstStepData.js → getCardData.js} +4 -4
  44. package/dist/components/CreditCardForm/getCardData.js.map +1 -0
  45. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js +3 -2
  46. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  47. package/dist/components/CreditForm/calculateInputs.js +1 -1
  48. package/dist/components/CreditForm/calculateInputs.js.map +1 -1
  49. package/dist/components/CreditForm/creditFormStepsData.js +6 -6
  50. package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  51. package/dist/components/Header/HeaderSecondaryMenu.js +7 -6
  52. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  53. package/dist/components/LinkDocs/LinkDocs.js +2 -2
  54. package/dist/components/LinkDocs/ReportDialogButton.js +15 -0
  55. package/dist/components/LinkDocs/ReportDialogButton.js.map +1 -0
  56. package/dist/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
  57. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +8 -7
  58. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  59. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +8 -10
  60. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
  61. package/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -10
  62. package/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
  63. package/dist/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +2 -7
  64. package/dist/components/StickyBottomMenu/useBottomMenuItemDialog.js +17 -9
  65. package/dist/components/StickyBottomMenu/useBottomMenuItemDialog.js.map +1 -1
  66. package/dist/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +2 -5
  67. package/dist/components/StickyBottomMenu/useBurgerMenuDialog.js +8 -15
  68. package/dist/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -1
  69. package/dist/hooks/useLocalStorage.d.ts +1 -1
  70. package/dist/hooks/useLocalStorage.js +8 -4
  71. package/dist/hooks/useLocalStorage.js.map +1 -1
  72. package/dist/hooks/useMobileMode.js +6 -5
  73. package/dist/hooks/useMobileMode.js.map +1 -1
  74. package/dist/hooks/useOnEscape.d.ts +1 -0
  75. package/dist/hooks/useOnEscape.js +14 -0
  76. package/dist/hooks/useOnEscape.js.map +1 -0
  77. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +0 -1
  78. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
  79. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  80. package/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -6
  81. package/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  82. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -1
  83. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +15 -19
  84. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  85. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +9 -8
  86. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  87. package/dist/ui-kit/DialogManager/Dialog.js +1 -10
  88. package/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
  89. package/dist/ui-kit/DialogManager/DialogAction.d.ts +8 -9
  90. package/dist/ui-kit/DialogManager/DialogManager.js +10 -26
  91. package/dist/ui-kit/DialogManager/DialogManager.js.map +1 -1
  92. package/dist/ui-kit/DialogManager/isDialogOpen.d.ts +2 -2
  93. package/dist/ui-kit/DialogManager/isDialogOpen.js.map +1 -1
  94. package/dist/ui-kit/DialogManager/useDialog.d.ts +9 -0
  95. package/dist/ui-kit/DialogManager/useDialog.js +18 -0
  96. package/dist/ui-kit/DialogManager/useDialog.js.map +1 -0
  97. package/dist/ui-kit/DialogManager/useDialogManager.d.ts +3 -6
  98. package/dist/ui-kit/DialogManager/useDialogManager.js +2 -5
  99. package/dist/ui-kit/DialogManager/useDialogManager.js.map +1 -1
  100. package/dist/ui-kit/DialogManager/useDialogsList.d.ts +8 -7
  101. package/dist/ui-kit/DialogManager/useDialogsList.js +8 -32
  102. package/dist/ui-kit/DialogManager/useDialogsList.js.map +1 -1
  103. package/dist/ui-kit/DocumentDialog/DocumentDialog.d.ts +6 -0
  104. package/dist/ui-kit/DocumentDialog/DocumentDialog.js +9 -0
  105. package/dist/ui-kit/DocumentDialog/DocumentDialog.js.map +1 -0
  106. package/dist/ui-kit/DocumentDialog/uaeDocumentDialog.d.ts +2 -0
  107. package/dist/ui-kit/DocumentDialog/uaeDocumentDialog.js +19 -0
  108. package/dist/ui-kit/DocumentDialog/uaeDocumentDialog.js.map +1 -0
  109. package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +1 -1
  110. package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +3 -3
  111. package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  112. package/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -9
  113. package/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +5 -11
  114. package/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -1
  115. package/dist/ui-kit/FormField/Fields/AddressField.js +14 -1
  116. package/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  117. package/dist/ui-kit/FormField/Fields/CreditInRshbCdField.js +3 -3
  118. package/dist/ui-kit/FormField/Fields/CreditInRshbCdField.js.map +1 -1
  119. package/dist/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -1
  120. package/dist/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
  121. package/dist/ui-kit/FormField/SelectField.d.ts +1 -0
  122. package/dist/ui-kit/FormField/SelectField.js +4 -2
  123. package/dist/ui-kit/FormField/SelectField.js.map +1 -1
  124. package/dist/ui-kit/Input/useInputPopup.js +2 -1
  125. package/dist/ui-kit/Input/useInputPopup.js.map +1 -1
  126. package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  127. package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -6
  128. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  129. package/dist/ui-kit/PopupManager/PopupAction.d.ts +7 -10
  130. package/dist/ui-kit/PopupManager/PopupManager.js +7 -24
  131. package/dist/ui-kit/PopupManager/PopupManager.js.map +1 -1
  132. package/dist/ui-kit/PopupManager/usePopupManager.d.ts +3 -4
  133. package/dist/ui-kit/PopupManager/usePopupManager.js +2 -5
  134. package/dist/ui-kit/PopupManager/usePopupManager.js.map +1 -1
  135. package/dist/ui-kit/ReportDialog/ReportDialog.d.ts +1 -0
  136. package/dist/ui-kit/ReportDialog/ReportDialog.js +2 -8
  137. package/dist/ui-kit/ReportDialog/ReportDialog.js.map +1 -1
  138. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
  139. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +2 -8
  140. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  141. package/dist/ui-kit/SearchBar/SearchBar.js +4 -3
  142. package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  143. package/dist/ui-kit/SearchDialog/SearchDialog.d.ts +1 -0
  144. package/dist/ui-kit/SearchDialog/SearchDialog.js +2 -2
  145. package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  146. package/dist/ui-kit/Select/useSelectPopup.js +2 -1
  147. package/dist/ui-kit/Select/useSelectPopup.js.map +1 -1
  148. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -2
  149. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +10 -9
  150. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  151. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +3 -3
  152. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +14 -23
  153. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  154. package/lib/components/ApplicationForm/ApplicationForm.js +5 -4
  155. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  156. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.fixture.d.ts +1 -0
  157. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +8 -12
  158. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  159. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -6
  160. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  161. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +24 -19
  162. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  163. package/lib/components/CreditCardForm/StepsNavigationButtons.js +1 -1
  164. package/lib/components/CreditCardForm/calculateInputs.js +2 -1
  165. package/lib/components/CreditCardForm/calculateInputs.js.map +1 -1
  166. package/lib/components/CreditCardForm/creditCardFormStepsData.js +18 -9
  167. package/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
  168. package/lib/components/CreditCardForm/{getFirstStepData.d.ts → getCardData.d.ts} +1 -1
  169. package/lib/components/CreditCardForm/{getFirstStepData.js → getCardData.js} +2 -2
  170. package/lib/components/CreditCardForm/getCardData.js.map +1 -0
  171. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js +3 -2
  172. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  173. package/lib/components/CreditForm/calculateInputs.js +1 -1
  174. package/lib/components/CreditForm/calculateInputs.js.map +1 -1
  175. package/lib/components/CreditForm/creditFormStepsData.js +6 -6
  176. package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  177. package/lib/components/Header/HeaderSecondaryMenu.js +7 -6
  178. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  179. package/lib/components/LinkDocs/LinkDocs.js +1 -1
  180. package/lib/components/LinkDocs/ReportDialogButton.js +13 -0
  181. package/lib/components/LinkDocs/ReportDialogButton.js.map +1 -0
  182. package/lib/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
  183. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +8 -7
  184. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  185. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +8 -10
  186. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
  187. package/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -10
  188. package/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
  189. package/lib/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +2 -7
  190. package/lib/components/StickyBottomMenu/useBottomMenuItemDialog.js +17 -9
  191. package/lib/components/StickyBottomMenu/useBottomMenuItemDialog.js.map +1 -1
  192. package/lib/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +2 -5
  193. package/lib/components/StickyBottomMenu/useBurgerMenuDialog.js +8 -15
  194. package/lib/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -1
  195. package/lib/hooks/useLocalStorage.d.ts +1 -1
  196. package/lib/hooks/useLocalStorage.js +8 -4
  197. package/lib/hooks/useLocalStorage.js.map +1 -1
  198. package/lib/hooks/useMobileMode.js +6 -5
  199. package/lib/hooks/useMobileMode.js.map +1 -1
  200. package/lib/hooks/useOnEscape.d.ts +1 -0
  201. package/lib/hooks/useOnEscape.js +11 -0
  202. package/lib/hooks/useOnEscape.js.map +1 -0
  203. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +0 -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/Checkbox/CheckboxWithDoc.js +3 -6
  207. package/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  208. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -1
  209. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +15 -19
  210. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  211. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +9 -8
  212. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  213. package/lib/ui-kit/DialogManager/Dialog.js +1 -10
  214. package/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
  215. package/lib/ui-kit/DialogManager/DialogAction.d.ts +8 -9
  216. package/lib/ui-kit/DialogManager/DialogManager.js +11 -27
  217. package/lib/ui-kit/DialogManager/DialogManager.js.map +1 -1
  218. package/lib/ui-kit/DialogManager/isDialogOpen.d.ts +2 -2
  219. package/lib/ui-kit/DialogManager/isDialogOpen.js.map +1 -1
  220. package/lib/ui-kit/DialogManager/useDialog.d.ts +9 -0
  221. package/lib/ui-kit/DialogManager/useDialog.js +15 -0
  222. package/lib/ui-kit/DialogManager/useDialog.js.map +1 -0
  223. package/lib/ui-kit/DialogManager/useDialogManager.d.ts +3 -6
  224. package/lib/ui-kit/DialogManager/useDialogManager.js +2 -5
  225. package/lib/ui-kit/DialogManager/useDialogManager.js.map +1 -1
  226. package/lib/ui-kit/DialogManager/useDialogsList.d.ts +8 -7
  227. package/lib/ui-kit/DialogManager/useDialogsList.js +8 -32
  228. package/lib/ui-kit/DialogManager/useDialogsList.js.map +1 -1
  229. package/lib/ui-kit/DocumentDialog/DocumentDialog.d.ts +6 -0
  230. package/lib/ui-kit/DocumentDialog/DocumentDialog.js +7 -0
  231. package/lib/ui-kit/DocumentDialog/DocumentDialog.js.map +1 -0
  232. package/lib/ui-kit/DocumentDialog/uaeDocumentDialog.d.ts +2 -0
  233. package/lib/ui-kit/DocumentDialog/uaeDocumentDialog.js +16 -0
  234. package/lib/ui-kit/DocumentDialog/uaeDocumentDialog.js.map +1 -0
  235. package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +1 -1
  236. package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +3 -3
  237. package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  238. package/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -9
  239. package/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +5 -11
  240. package/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -1
  241. package/lib/ui-kit/FormField/Fields/AddressField.js +14 -1
  242. package/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  243. package/lib/ui-kit/FormField/Fields/CreditInRshbCdField.js +3 -3
  244. package/lib/ui-kit/FormField/Fields/CreditInRshbCdField.js.map +1 -1
  245. package/lib/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -1
  246. package/lib/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
  247. package/lib/ui-kit/FormField/SelectField.d.ts +1 -0
  248. package/lib/ui-kit/FormField/SelectField.js +4 -2
  249. package/lib/ui-kit/FormField/SelectField.js.map +1 -1
  250. package/lib/ui-kit/Input/useInputPopup.js +2 -1
  251. package/lib/ui-kit/Input/useInputPopup.js.map +1 -1
  252. package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  253. package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -6
  254. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  255. package/lib/ui-kit/PopupManager/PopupAction.d.ts +7 -10
  256. package/lib/ui-kit/PopupManager/PopupManager.js +8 -25
  257. package/lib/ui-kit/PopupManager/PopupManager.js.map +1 -1
  258. package/lib/ui-kit/PopupManager/usePopupManager.d.ts +3 -4
  259. package/lib/ui-kit/PopupManager/usePopupManager.js +2 -5
  260. package/lib/ui-kit/PopupManager/usePopupManager.js.map +1 -1
  261. package/lib/ui-kit/ReportDialog/ReportDialog.d.ts +1 -0
  262. package/lib/ui-kit/ReportDialog/ReportDialog.js +2 -8
  263. package/lib/ui-kit/ReportDialog/ReportDialog.js.map +1 -1
  264. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
  265. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +2 -8
  266. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  267. package/lib/ui-kit/SearchBar/SearchBar.js +4 -3
  268. package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  269. package/lib/ui-kit/SearchDialog/SearchDialog.d.ts +1 -0
  270. package/lib/ui-kit/SearchDialog/SearchDialog.js +2 -2
  271. package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  272. package/lib/ui-kit/Select/useSelectPopup.js +2 -1
  273. package/lib/ui-kit/Select/useSelectPopup.js.map +1 -1
  274. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -2
  275. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +10 -9
  276. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  277. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +3 -3
  278. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +15 -24
  279. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  280. package/mobile/bundle/bundle.umd.js +301 -374
  281. package/mobile/bundle/bundle.umd.min.js +1 -1
  282. package/mobile/bundle/components/CreditCardForm/{getFirstStepData.d.ts → getCardData.d.ts} +1 -1
  283. package/mobile/bundle/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
  284. package/mobile/bundle/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +2 -7
  285. package/mobile/bundle/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +2 -5
  286. package/mobile/bundle/hooks/useLocalStorage.d.ts +1 -1
  287. package/mobile/bundle/hooks/useOnEscape.d.ts +1 -0
  288. package/mobile/bundle/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +0 -1
  289. package/mobile/bundle/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -1
  290. package/mobile/bundle/ui-kit/DialogManager/DialogAction.d.ts +8 -9
  291. package/mobile/bundle/ui-kit/DialogManager/isDialogOpen.d.ts +2 -2
  292. package/mobile/bundle/ui-kit/DialogManager/useDialog.d.ts +9 -0
  293. package/mobile/bundle/ui-kit/DialogManager/useDialogManager.d.ts +3 -6
  294. package/mobile/bundle/ui-kit/DialogManager/useDialogsList.d.ts +8 -7
  295. package/mobile/bundle/ui-kit/DocumentDialog/DocumentDialog.d.ts +6 -0
  296. package/mobile/bundle/ui-kit/DocumentDialog/uaeDocumentDialog.d.ts +2 -0
  297. package/mobile/bundle/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +1 -1
  298. package/mobile/bundle/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -9
  299. package/mobile/bundle/ui-kit/FormField/SelectField.d.ts +1 -0
  300. package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  301. package/mobile/bundle/ui-kit/PopupManager/PopupAction.d.ts +7 -10
  302. package/mobile/bundle/ui-kit/PopupManager/usePopupManager.d.ts +3 -4
  303. package/mobile/bundle/ui-kit/ReportDialog/ReportDialog.d.ts +1 -0
  304. package/mobile/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
  305. package/mobile/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +1 -0
  306. package/mobile/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -2
  307. package/mobile/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +3 -3
  308. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +5 -4
  309. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  310. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +7 -11
  311. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  312. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -6
  313. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  314. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +23 -18
  315. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  316. package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js +1 -1
  317. package/mobile/dist/components/CreditCardForm/calculateInputs.js +2 -1
  318. package/mobile/dist/components/CreditCardForm/calculateInputs.js.map +1 -1
  319. package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js +18 -9
  320. package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
  321. package/mobile/dist/components/CreditCardForm/getCardData.d.ts +3 -0
  322. package/mobile/dist/components/CreditCardForm/{getFirstStepData.js → getCardData.js} +4 -4
  323. package/mobile/dist/components/CreditCardForm/getCardData.js.map +1 -0
  324. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js +3 -2
  325. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  326. package/mobile/dist/components/CreditForm/calculateInputs.js +1 -1
  327. package/mobile/dist/components/CreditForm/calculateInputs.js.map +1 -1
  328. package/mobile/dist/components/CreditForm/creditFormStepsData.js +6 -6
  329. package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  330. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +7 -6
  331. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  332. package/mobile/dist/components/LinkDocs/LinkDocs.js +2 -2
  333. package/mobile/dist/components/LinkDocs/ReportDialogButton.js +15 -0
  334. package/mobile/dist/components/LinkDocs/ReportDialogButton.js.map +1 -0
  335. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
  336. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +8 -7
  337. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  338. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +8 -10
  339. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
  340. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -10
  341. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
  342. package/mobile/dist/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +2 -7
  343. package/mobile/dist/components/StickyBottomMenu/useBottomMenuItemDialog.js +17 -9
  344. package/mobile/dist/components/StickyBottomMenu/useBottomMenuItemDialog.js.map +1 -1
  345. package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +2 -5
  346. package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.js +8 -15
  347. package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -1
  348. package/mobile/dist/hooks/useLocalStorage.d.ts +1 -1
  349. package/mobile/dist/hooks/useLocalStorage.js +8 -4
  350. package/mobile/dist/hooks/useLocalStorage.js.map +1 -1
  351. package/mobile/dist/hooks/useMobileMode.js +6 -5
  352. package/mobile/dist/hooks/useMobileMode.js.map +1 -1
  353. package/mobile/dist/hooks/useOnEscape.d.ts +1 -0
  354. package/mobile/dist/hooks/useOnEscape.js +14 -0
  355. package/mobile/dist/hooks/useOnEscape.js.map +1 -0
  356. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +0 -1
  357. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
  358. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  359. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -6
  360. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  361. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -1
  362. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +15 -19
  363. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  364. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +9 -8
  365. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  366. package/mobile/dist/ui-kit/DialogManager/Dialog.js +1 -10
  367. package/mobile/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
  368. package/mobile/dist/ui-kit/DialogManager/DialogAction.d.ts +8 -9
  369. package/mobile/dist/ui-kit/DialogManager/DialogManager.js +10 -26
  370. package/mobile/dist/ui-kit/DialogManager/DialogManager.js.map +1 -1
  371. package/mobile/dist/ui-kit/DialogManager/isDialogOpen.d.ts +2 -2
  372. package/mobile/dist/ui-kit/DialogManager/isDialogOpen.js.map +1 -1
  373. package/mobile/dist/ui-kit/DialogManager/useDialog.d.ts +9 -0
  374. package/mobile/dist/ui-kit/DialogManager/useDialog.js +18 -0
  375. package/mobile/dist/ui-kit/DialogManager/useDialog.js.map +1 -0
  376. package/mobile/dist/ui-kit/DialogManager/useDialogManager.d.ts +3 -6
  377. package/mobile/dist/ui-kit/DialogManager/useDialogManager.js +2 -5
  378. package/mobile/dist/ui-kit/DialogManager/useDialogManager.js.map +1 -1
  379. package/mobile/dist/ui-kit/DialogManager/useDialogsList.d.ts +8 -7
  380. package/mobile/dist/ui-kit/DialogManager/useDialogsList.js +8 -32
  381. package/mobile/dist/ui-kit/DialogManager/useDialogsList.js.map +1 -1
  382. package/mobile/dist/ui-kit/DocumentDialog/DocumentDialog.d.ts +6 -0
  383. package/mobile/dist/ui-kit/DocumentDialog/DocumentDialog.js +9 -0
  384. package/mobile/dist/ui-kit/DocumentDialog/DocumentDialog.js.map +1 -0
  385. package/mobile/dist/ui-kit/DocumentDialog/uaeDocumentDialog.d.ts +2 -0
  386. package/mobile/dist/ui-kit/DocumentDialog/uaeDocumentDialog.js +19 -0
  387. package/mobile/dist/ui-kit/DocumentDialog/uaeDocumentDialog.js.map +1 -0
  388. package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +1 -1
  389. package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +3 -3
  390. package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  391. package/mobile/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -9
  392. package/mobile/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +5 -11
  393. package/mobile/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -1
  394. package/mobile/dist/ui-kit/FormField/Fields/AddressField.js +14 -1
  395. package/mobile/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  396. package/mobile/dist/ui-kit/FormField/Fields/CreditInRshbCdField.js +3 -3
  397. package/mobile/dist/ui-kit/FormField/Fields/CreditInRshbCdField.js.map +1 -1
  398. package/mobile/dist/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -1
  399. package/mobile/dist/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
  400. package/mobile/dist/ui-kit/FormField/SelectField.d.ts +1 -0
  401. package/mobile/dist/ui-kit/FormField/SelectField.js +4 -2
  402. package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -1
  403. package/mobile/dist/ui-kit/Input/useInputPopup.js +2 -1
  404. package/mobile/dist/ui-kit/Input/useInputPopup.js.map +1 -1
  405. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  406. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -6
  407. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  408. package/mobile/dist/ui-kit/PopupManager/PopupAction.d.ts +7 -10
  409. package/mobile/dist/ui-kit/PopupManager/PopupManager.js +7 -24
  410. package/mobile/dist/ui-kit/PopupManager/PopupManager.js.map +1 -1
  411. package/mobile/dist/ui-kit/PopupManager/usePopupManager.d.ts +3 -4
  412. package/mobile/dist/ui-kit/PopupManager/usePopupManager.js +2 -5
  413. package/mobile/dist/ui-kit/PopupManager/usePopupManager.js.map +1 -1
  414. package/mobile/dist/ui-kit/ReportDialog/ReportDialog.d.ts +1 -0
  415. package/mobile/dist/ui-kit/ReportDialog/ReportDialog.js +2 -8
  416. package/mobile/dist/ui-kit/ReportDialog/ReportDialog.js.map +1 -1
  417. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
  418. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +2 -8
  419. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  420. package/mobile/dist/ui-kit/SearchBar/SearchBar.js +4 -3
  421. package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  422. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.d.ts +1 -0
  423. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +2 -2
  424. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  425. package/mobile/dist/ui-kit/Select/useSelectPopup.js +2 -1
  426. package/mobile/dist/ui-kit/Select/useSelectPopup.js.map +1 -1
  427. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -2
  428. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +10 -9
  429. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  430. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +3 -3
  431. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +14 -23
  432. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  433. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +5 -4
  434. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  435. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +8 -12
  436. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  437. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -6
  438. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  439. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +24 -19
  440. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  441. package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js +1 -1
  442. package/mobile/lib/components/CreditCardForm/calculateInputs.js +2 -1
  443. package/mobile/lib/components/CreditCardForm/calculateInputs.js.map +1 -1
  444. package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js +18 -9
  445. package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
  446. package/mobile/lib/components/CreditCardForm/getCardData.d.ts +3 -0
  447. package/mobile/lib/components/CreditCardForm/{getFirstStepData.js → getCardData.js} +2 -2
  448. package/mobile/lib/components/CreditCardForm/getCardData.js.map +1 -0
  449. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js +3 -2
  450. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  451. package/mobile/lib/components/CreditForm/calculateInputs.js +1 -1
  452. package/mobile/lib/components/CreditForm/calculateInputs.js.map +1 -1
  453. package/mobile/lib/components/CreditForm/creditFormStepsData.js +6 -6
  454. package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  455. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +7 -6
  456. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  457. package/mobile/lib/components/LinkDocs/LinkDocs.js +1 -1
  458. package/mobile/lib/components/LinkDocs/ReportDialogButton.js +13 -0
  459. package/mobile/lib/components/LinkDocs/ReportDialogButton.js.map +1 -0
  460. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.d.ts +1 -1
  461. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +8 -7
  462. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  463. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +8 -10
  464. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
  465. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -10
  466. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
  467. package/mobile/lib/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +2 -7
  468. package/mobile/lib/components/StickyBottomMenu/useBottomMenuItemDialog.js +17 -9
  469. package/mobile/lib/components/StickyBottomMenu/useBottomMenuItemDialog.js.map +1 -1
  470. package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +2 -5
  471. package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.js +8 -15
  472. package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -1
  473. package/mobile/lib/hooks/useLocalStorage.d.ts +1 -1
  474. package/mobile/lib/hooks/useLocalStorage.js +8 -4
  475. package/mobile/lib/hooks/useLocalStorage.js.map +1 -1
  476. package/mobile/lib/hooks/useMobileMode.js +6 -5
  477. package/mobile/lib/hooks/useMobileMode.js.map +1 -1
  478. package/mobile/lib/hooks/useOnEscape.d.ts +1 -0
  479. package/mobile/lib/hooks/useOnEscape.js +11 -0
  480. package/mobile/lib/hooks/useOnEscape.js.map +1 -0
  481. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +0 -1
  482. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
  483. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  484. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -6
  485. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  486. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -1
  487. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +15 -19
  488. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  489. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +9 -8
  490. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  491. package/mobile/lib/ui-kit/DialogManager/Dialog.js +1 -10
  492. package/mobile/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
  493. package/mobile/lib/ui-kit/DialogManager/DialogAction.d.ts +8 -9
  494. package/mobile/lib/ui-kit/DialogManager/DialogManager.js +11 -27
  495. package/mobile/lib/ui-kit/DialogManager/DialogManager.js.map +1 -1
  496. package/mobile/lib/ui-kit/DialogManager/isDialogOpen.d.ts +2 -2
  497. package/mobile/lib/ui-kit/DialogManager/isDialogOpen.js.map +1 -1
  498. package/mobile/lib/ui-kit/DialogManager/useDialog.d.ts +9 -0
  499. package/mobile/lib/ui-kit/DialogManager/useDialog.js +15 -0
  500. package/mobile/lib/ui-kit/DialogManager/useDialog.js.map +1 -0
  501. package/mobile/lib/ui-kit/DialogManager/useDialogManager.d.ts +3 -6
  502. package/mobile/lib/ui-kit/DialogManager/useDialogManager.js +2 -5
  503. package/mobile/lib/ui-kit/DialogManager/useDialogManager.js.map +1 -1
  504. package/mobile/lib/ui-kit/DialogManager/useDialogsList.d.ts +8 -7
  505. package/mobile/lib/ui-kit/DialogManager/useDialogsList.js +8 -32
  506. package/mobile/lib/ui-kit/DialogManager/useDialogsList.js.map +1 -1
  507. package/mobile/lib/ui-kit/DocumentDialog/DocumentDialog.d.ts +6 -0
  508. package/mobile/lib/ui-kit/DocumentDialog/DocumentDialog.js +7 -0
  509. package/mobile/lib/ui-kit/DocumentDialog/DocumentDialog.js.map +1 -0
  510. package/mobile/lib/ui-kit/DocumentDialog/uaeDocumentDialog.d.ts +2 -0
  511. package/mobile/lib/ui-kit/DocumentDialog/uaeDocumentDialog.js +16 -0
  512. package/mobile/lib/ui-kit/DocumentDialog/uaeDocumentDialog.js.map +1 -0
  513. package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +1 -1
  514. package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +3 -3
  515. package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  516. package/mobile/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +1 -9
  517. package/mobile/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +5 -11
  518. package/mobile/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -1
  519. package/mobile/lib/ui-kit/FormField/Fields/AddressField.js +14 -1
  520. package/mobile/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  521. package/mobile/lib/ui-kit/FormField/Fields/CreditInRshbCdField.js +3 -3
  522. package/mobile/lib/ui-kit/FormField/Fields/CreditInRshbCdField.js.map +1 -1
  523. package/mobile/lib/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -1
  524. package/mobile/lib/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
  525. package/mobile/lib/ui-kit/FormField/SelectField.d.ts +1 -0
  526. package/mobile/lib/ui-kit/FormField/SelectField.js +4 -2
  527. package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -1
  528. package/mobile/lib/ui-kit/Input/useInputPopup.js +2 -1
  529. package/mobile/lib/ui-kit/Input/useInputPopup.js.map +1 -1
  530. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  531. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -6
  532. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  533. package/mobile/lib/ui-kit/PopupManager/PopupAction.d.ts +7 -10
  534. package/mobile/lib/ui-kit/PopupManager/PopupManager.js +8 -25
  535. package/mobile/lib/ui-kit/PopupManager/PopupManager.js.map +1 -1
  536. package/mobile/lib/ui-kit/PopupManager/usePopupManager.d.ts +3 -4
  537. package/mobile/lib/ui-kit/PopupManager/usePopupManager.js +2 -5
  538. package/mobile/lib/ui-kit/PopupManager/usePopupManager.js.map +1 -1
  539. package/mobile/lib/ui-kit/ReportDialog/ReportDialog.d.ts +1 -0
  540. package/mobile/lib/ui-kit/ReportDialog/ReportDialog.js +2 -8
  541. package/mobile/lib/ui-kit/ReportDialog/ReportDialog.js.map +1 -1
  542. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
  543. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +2 -8
  544. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  545. package/mobile/lib/ui-kit/SearchBar/SearchBar.js +4 -3
  546. package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  547. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.d.ts +1 -0
  548. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +2 -2
  549. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  550. package/mobile/lib/ui-kit/Select/useSelectPopup.js +2 -1
  551. package/mobile/lib/ui-kit/Select/useSelectPopup.js.map +1 -1
  552. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +2 -2
  553. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +10 -9
  554. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  555. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +3 -3
  556. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +15 -24
  557. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  558. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +7 -4
  559. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +8 -13
  560. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +11 -9
  561. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +34 -27
  562. package/mobile/src/components/CreditCardForm/StepsNavigationButtons.tsx +1 -1
  563. package/mobile/src/components/CreditCardForm/calculateInputs.ts +6 -3
  564. package/mobile/src/components/CreditCardForm/creditCardFormStepsData.tsx +18 -9
  565. package/mobile/src/components/CreditCardForm/{getFirstStepData.tsx → getCardData.tsx} +1 -1
  566. package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +3 -2
  567. package/mobile/src/components/CreditForm/calculateInputs.ts +3 -3
  568. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +6 -6
  569. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +7 -6
  570. package/mobile/src/components/LinkDocs/LinkDocs.tsx +1 -1
  571. package/mobile/src/components/LinkDocs/{RepordDialogButton.tsx → ReportDialogButton.tsx} +9 -9
  572. package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +11 -11
  573. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +8 -10
  574. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuDialog.tsx +12 -23
  575. package/mobile/src/components/StickyBottomMenu/useBottomMenuItemDialog.tsx +48 -46
  576. package/mobile/src/components/StickyBottomMenu/useBurgerMenuDialog.tsx +18 -36
  577. package/mobile/src/hooks/useLocalStorage.ts +13 -6
  578. package/mobile/src/hooks/useMobileMode.ts +7 -7
  579. package/mobile/src/hooks/useOnEscape.ts +14 -0
  580. package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +50 -53
  581. package/mobile/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +3 -9
  582. package/mobile/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +51 -57
  583. package/mobile/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +9 -13
  584. package/mobile/src/ui-kit/DialogManager/Dialog.tsx +12 -23
  585. package/mobile/src/ui-kit/DialogManager/DialogAction.ts +8 -10
  586. package/mobile/src/ui-kit/DialogManager/DialogManager.tsx +11 -32
  587. package/mobile/src/ui-kit/DialogManager/isDialogOpen.ts +2 -2
  588. package/mobile/src/ui-kit/DialogManager/useDialog.tsx +31 -0
  589. package/mobile/src/ui-kit/DialogManager/useDialogManager.ts +2 -12
  590. package/mobile/src/ui-kit/DialogManager/useDialogsList.ts +13 -47
  591. package/mobile/src/ui-kit/DocumentDialog/DocumentDialog.tsx +23 -0
  592. package/mobile/src/ui-kit/DocumentDialog/uaeDocumentDialog.ts +18 -0
  593. package/mobile/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +5 -6
  594. package/mobile/src/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.tsx +5 -17
  595. package/mobile/src/ui-kit/FormField/Fields/AddressField.tsx +14 -1
  596. package/mobile/src/ui-kit/FormField/Fields/CreditInRshbCdField.tsx +3 -2
  597. package/mobile/src/ui-kit/FormField/Fields/LegalEntityNameField.tsx +1 -0
  598. package/mobile/src/ui-kit/FormField/SelectField.tsx +5 -4
  599. package/mobile/src/ui-kit/Input/useInputPopup.tsx +2 -1
  600. package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +5 -6
  601. package/mobile/src/ui-kit/PopupManager/PopupAction.ts +7 -12
  602. package/mobile/src/ui-kit/PopupManager/PopupManager.tsx +10 -35
  603. package/mobile/src/ui-kit/PopupManager/usePopupManager.tsx +2 -9
  604. package/mobile/src/ui-kit/ReportDialog/ReportDialog.tsx +5 -10
  605. package/mobile/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +30 -34
  606. package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +4 -3
  607. package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +3 -2
  608. package/mobile/src/ui-kit/Select/useSelectPopup.tsx +15 -15
  609. package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +18 -13
  610. package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +19 -32
  611. package/package.json +2 -2
  612. package/src/components/ApplicationForm/ApplicationForm.tsx +7 -4
  613. package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +13 -0
  614. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +8 -13
  615. package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +11 -9
  616. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +34 -27
  617. package/src/components/CreditCardForm/StepsNavigationButtons.tsx +1 -1
  618. package/src/components/CreditCardForm/calculateInputs.ts +6 -3
  619. package/src/components/CreditCardForm/creditCardFormStepsData.tsx +18 -9
  620. package/src/components/CreditCardForm/{getFirstStepData.tsx → getCardData.tsx} +1 -1
  621. package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +3 -2
  622. package/src/components/CreditForm/calculateInputs.ts +3 -3
  623. package/src/components/CreditForm/creditFormStepsData.tsx +6 -6
  624. package/src/components/Header/HeaderSecondaryMenu.tsx +7 -6
  625. package/src/components/LinkDocs/LinkDocs.tsx +1 -1
  626. package/src/components/LinkDocs/{RepordDialogButton.tsx → ReportDialogButton.tsx} +9 -9
  627. package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +11 -11
  628. package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +8 -10
  629. package/src/components/StickyBottomMenu/StickyBottomMenuDialog.tsx +12 -23
  630. package/src/components/StickyBottomMenu/useBottomMenuItemDialog.tsx +48 -46
  631. package/src/components/StickyBottomMenu/useBurgerMenuDialog.tsx +18 -36
  632. package/src/hooks/useLocalStorage.ts +13 -6
  633. package/src/hooks/useMobileMode.ts +7 -7
  634. package/src/hooks/useOnEscape.ts +14 -0
  635. package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +50 -53
  636. package/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +3 -9
  637. package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +51 -57
  638. package/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +9 -13
  639. package/src/ui-kit/DialogManager/Dialog.tsx +12 -23
  640. package/src/ui-kit/DialogManager/DialogAction.ts +8 -10
  641. package/src/ui-kit/DialogManager/DialogManager.tsx +11 -32
  642. package/src/ui-kit/DialogManager/isDialogOpen.ts +2 -2
  643. package/src/ui-kit/DialogManager/useDialog.tsx +31 -0
  644. package/src/ui-kit/DialogManager/useDialogManager.ts +2 -12
  645. package/src/ui-kit/DialogManager/useDialogsList.ts +13 -47
  646. package/src/ui-kit/DocumentDialog/DocumentDialog.tsx +23 -0
  647. package/src/ui-kit/DocumentDialog/uaeDocumentDialog.ts +18 -0
  648. package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +5 -6
  649. package/src/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.tsx +5 -17
  650. package/src/ui-kit/FormField/Fields/AddressField.tsx +14 -1
  651. package/src/ui-kit/FormField/Fields/CreditInRshbCdField.tsx +3 -2
  652. package/src/ui-kit/FormField/Fields/LegalEntityNameField.tsx +1 -0
  653. package/src/ui-kit/FormField/SelectField.tsx +5 -4
  654. package/src/ui-kit/Input/useInputPopup.tsx +2 -1
  655. package/src/ui-kit/LocationDialog/LocationDialog.tsx +5 -6
  656. package/src/ui-kit/PopupManager/PopupAction.ts +7 -12
  657. package/src/ui-kit/PopupManager/PopupManager.tsx +10 -35
  658. package/src/ui-kit/PopupManager/usePopupManager.tsx +2 -9
  659. package/src/ui-kit/ReportDialog/ReportDialog.tsx +5 -10
  660. package/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +30 -34
  661. package/src/ui-kit/SearchBar/SearchBar.tsx +4 -3
  662. package/src/ui-kit/SearchDialog/SearchDialog.tsx +3 -2
  663. package/src/ui-kit/Select/useSelectPopup.tsx +15 -15
  664. package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +18 -13
  665. package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +19 -32
  666. package/bundle/EventBus/useLatestEvent.d.ts +0 -2
  667. package/bundle/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +0 -6
  668. package/bundle/ui-kit/Checkbox/getDocument.d.ts +0 -1
  669. package/bundle/ui-kit/DialogManager/openDocument.d.ts +0 -9
  670. package/bundle/ui-kit/LocationDialog/useLocationDialog.d.ts +0 -6
  671. package/bundle/ui-kit/ReportDialog/useReportDialog.d.ts +0 -6
  672. package/bundle/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +0 -9
  673. package/bundle/ui-kit/SearchDialog/useSearchDialog.d.ts +0 -6
  674. package/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +0 -5
  675. package/dist/EventBus/useLatestEvent.d.ts +0 -2
  676. package/dist/EventBus/useLatestEvent.js +0 -11
  677. package/dist/EventBus/useLatestEvent.js.map +0 -1
  678. package/dist/components/CreditCardForm/getFirstStepData.js.map +0 -1
  679. package/dist/components/LinkDocs/RepordDialogButton.js +0 -17
  680. package/dist/components/LinkDocs/RepordDialogButton.js.map +0 -1
  681. package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +0 -6
  682. package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js +0 -15
  683. package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +0 -1
  684. package/dist/ui-kit/Checkbox/getDocument.d.ts +0 -1
  685. package/dist/ui-kit/Checkbox/getDocument.js +0 -9
  686. package/dist/ui-kit/Checkbox/getDocument.js.map +0 -1
  687. package/dist/ui-kit/DialogManager/openDocument.d.ts +0 -9
  688. package/dist/ui-kit/DialogManager/openDocument.js +0 -12
  689. package/dist/ui-kit/DialogManager/openDocument.js.map +0 -1
  690. package/dist/ui-kit/LocationDialog/useLocationDialog.d.ts +0 -6
  691. package/dist/ui-kit/LocationDialog/useLocationDialog.js +0 -14
  692. package/dist/ui-kit/LocationDialog/useLocationDialog.js.map +0 -1
  693. package/dist/ui-kit/ReportDialog/useReportDialog.d.ts +0 -6
  694. package/dist/ui-kit/ReportDialog/useReportDialog.js +0 -14
  695. package/dist/ui-kit/ReportDialog/useReportDialog.js.map +0 -1
  696. package/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +0 -9
  697. package/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js +0 -14
  698. package/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js.map +0 -1
  699. package/dist/ui-kit/SearchDialog/useSearchDialog.d.ts +0 -6
  700. package/dist/ui-kit/SearchDialog/useSearchDialog.js +0 -14
  701. package/dist/ui-kit/SearchDialog/useSearchDialog.js.map +0 -1
  702. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +0 -5
  703. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +0 -14
  704. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +0 -1
  705. package/lib/EventBus/useLatestEvent.d.ts +0 -2
  706. package/lib/EventBus/useLatestEvent.js +0 -8
  707. package/lib/EventBus/useLatestEvent.js.map +0 -1
  708. package/lib/components/CreditCardForm/getFirstStepData.js.map +0 -1
  709. package/lib/components/LinkDocs/RepordDialogButton.js +0 -15
  710. package/lib/components/LinkDocs/RepordDialogButton.js.map +0 -1
  711. package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +0 -6
  712. package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js +0 -12
  713. package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +0 -1
  714. package/lib/ui-kit/Checkbox/getDocument.d.ts +0 -1
  715. package/lib/ui-kit/Checkbox/getDocument.js +0 -6
  716. package/lib/ui-kit/Checkbox/getDocument.js.map +0 -1
  717. package/lib/ui-kit/DialogManager/openDocument.d.ts +0 -9
  718. package/lib/ui-kit/DialogManager/openDocument.js +0 -9
  719. package/lib/ui-kit/DialogManager/openDocument.js.map +0 -1
  720. package/lib/ui-kit/LocationDialog/useLocationDialog.d.ts +0 -6
  721. package/lib/ui-kit/LocationDialog/useLocationDialog.js +0 -11
  722. package/lib/ui-kit/LocationDialog/useLocationDialog.js.map +0 -1
  723. package/lib/ui-kit/ReportDialog/useReportDialog.d.ts +0 -6
  724. package/lib/ui-kit/ReportDialog/useReportDialog.js +0 -11
  725. package/lib/ui-kit/ReportDialog/useReportDialog.js.map +0 -1
  726. package/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +0 -9
  727. package/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js +0 -11
  728. package/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js.map +0 -1
  729. package/lib/ui-kit/SearchDialog/useSearchDialog.d.ts +0 -6
  730. package/lib/ui-kit/SearchDialog/useSearchDialog.js +0 -11
  731. package/lib/ui-kit/SearchDialog/useSearchDialog.js.map +0 -1
  732. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +0 -5
  733. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +0 -11
  734. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +0 -1
  735. package/mobile/bundle/EventBus/useLatestEvent.d.ts +0 -2
  736. package/mobile/bundle/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +0 -6
  737. package/mobile/bundle/ui-kit/Checkbox/getDocument.d.ts +0 -1
  738. package/mobile/bundle/ui-kit/DialogManager/openDocument.d.ts +0 -9
  739. package/mobile/bundle/ui-kit/LocationDialog/useLocationDialog.d.ts +0 -6
  740. package/mobile/bundle/ui-kit/ReportDialog/useReportDialog.d.ts +0 -6
  741. package/mobile/bundle/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +0 -9
  742. package/mobile/bundle/ui-kit/SearchDialog/useSearchDialog.d.ts +0 -6
  743. package/mobile/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +0 -5
  744. package/mobile/dist/EventBus/useLatestEvent.d.ts +0 -2
  745. package/mobile/dist/EventBus/useLatestEvent.js +0 -11
  746. package/mobile/dist/EventBus/useLatestEvent.js.map +0 -1
  747. package/mobile/dist/components/CreditCardForm/getFirstStepData.d.ts +0 -3
  748. package/mobile/dist/components/CreditCardForm/getFirstStepData.js.map +0 -1
  749. package/mobile/dist/components/LinkDocs/RepordDialogButton.js +0 -17
  750. package/mobile/dist/components/LinkDocs/RepordDialogButton.js.map +0 -1
  751. package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +0 -6
  752. package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js +0 -15
  753. package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +0 -1
  754. package/mobile/dist/ui-kit/Checkbox/getDocument.d.ts +0 -1
  755. package/mobile/dist/ui-kit/Checkbox/getDocument.js +0 -9
  756. package/mobile/dist/ui-kit/Checkbox/getDocument.js.map +0 -1
  757. package/mobile/dist/ui-kit/DialogManager/openDocument.d.ts +0 -9
  758. package/mobile/dist/ui-kit/DialogManager/openDocument.js +0 -12
  759. package/mobile/dist/ui-kit/DialogManager/openDocument.js.map +0 -1
  760. package/mobile/dist/ui-kit/LocationDialog/useLocationDialog.d.ts +0 -6
  761. package/mobile/dist/ui-kit/LocationDialog/useLocationDialog.js +0 -14
  762. package/mobile/dist/ui-kit/LocationDialog/useLocationDialog.js.map +0 -1
  763. package/mobile/dist/ui-kit/ReportDialog/useReportDialog.d.ts +0 -6
  764. package/mobile/dist/ui-kit/ReportDialog/useReportDialog.js +0 -14
  765. package/mobile/dist/ui-kit/ReportDialog/useReportDialog.js.map +0 -1
  766. package/mobile/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +0 -9
  767. package/mobile/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js +0 -14
  768. package/mobile/dist/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js.map +0 -1
  769. package/mobile/dist/ui-kit/SearchDialog/useSearchDialog.d.ts +0 -6
  770. package/mobile/dist/ui-kit/SearchDialog/useSearchDialog.js +0 -14
  771. package/mobile/dist/ui-kit/SearchDialog/useSearchDialog.js.map +0 -1
  772. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +0 -5
  773. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +0 -14
  774. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +0 -1
  775. package/mobile/lib/EventBus/useLatestEvent.d.ts +0 -2
  776. package/mobile/lib/EventBus/useLatestEvent.js +0 -8
  777. package/mobile/lib/EventBus/useLatestEvent.js.map +0 -1
  778. package/mobile/lib/components/CreditCardForm/getFirstStepData.d.ts +0 -3
  779. package/mobile/lib/components/CreditCardForm/getFirstStepData.js.map +0 -1
  780. package/mobile/lib/components/LinkDocs/RepordDialogButton.js +0 -15
  781. package/mobile/lib/components/LinkDocs/RepordDialogButton.js.map +0 -1
  782. package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +0 -6
  783. package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js +0 -12
  784. package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +0 -1
  785. package/mobile/lib/ui-kit/Checkbox/getDocument.d.ts +0 -1
  786. package/mobile/lib/ui-kit/Checkbox/getDocument.js +0 -6
  787. package/mobile/lib/ui-kit/Checkbox/getDocument.js.map +0 -1
  788. package/mobile/lib/ui-kit/DialogManager/openDocument.d.ts +0 -9
  789. package/mobile/lib/ui-kit/DialogManager/openDocument.js +0 -9
  790. package/mobile/lib/ui-kit/DialogManager/openDocument.js.map +0 -1
  791. package/mobile/lib/ui-kit/LocationDialog/useLocationDialog.d.ts +0 -6
  792. package/mobile/lib/ui-kit/LocationDialog/useLocationDialog.js +0 -11
  793. package/mobile/lib/ui-kit/LocationDialog/useLocationDialog.js.map +0 -1
  794. package/mobile/lib/ui-kit/ReportDialog/useReportDialog.d.ts +0 -6
  795. package/mobile/lib/ui-kit/ReportDialog/useReportDialog.js +0 -11
  796. package/mobile/lib/ui-kit/ReportDialog/useReportDialog.js.map +0 -1
  797. package/mobile/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.d.ts +0 -9
  798. package/mobile/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js +0 -11
  799. package/mobile/lib/ui-kit/ResponseTypeDialog/useResponseTypeDialog.js.map +0 -1
  800. package/mobile/lib/ui-kit/SearchDialog/useSearchDialog.d.ts +0 -6
  801. package/mobile/lib/ui-kit/SearchDialog/useSearchDialog.js +0 -11
  802. package/mobile/lib/ui-kit/SearchDialog/useSearchDialog.js.map +0 -1
  803. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.d.ts +0 -5
  804. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +0 -11
  805. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +0 -1
  806. package/mobile/src/EventBus/useLatestEvent.ts +0 -16
  807. package/mobile/src/ui-kit/CaptchaDialog/useCaptchaDialog.tsx +0 -12
  808. package/mobile/src/ui-kit/Checkbox/getDocument.ts +0 -7
  809. package/mobile/src/ui-kit/DialogManager/openDocument.tsx +0 -27
  810. package/mobile/src/ui-kit/LocationDialog/useLocationDialog.tsx +0 -11
  811. package/mobile/src/ui-kit/ReportDialog/useReportDialog.tsx +0 -11
  812. package/mobile/src/ui-kit/ResponseTypeDialog/useResponseTypeDialog.tsx +0 -17
  813. package/mobile/src/ui-kit/SearchDialog/useSearchDialog.tsx +0 -12
  814. package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx +0 -12
  815. package/src/EventBus/useLatestEvent.ts +0 -16
  816. package/src/ui-kit/CaptchaDialog/useCaptchaDialog.tsx +0 -12
  817. package/src/ui-kit/Checkbox/getDocument.ts +0 -7
  818. package/src/ui-kit/DialogManager/openDocument.tsx +0 -27
  819. package/src/ui-kit/LocationDialog/useLocationDialog.tsx +0 -11
  820. package/src/ui-kit/ReportDialog/useReportDialog.tsx +0 -11
  821. package/src/ui-kit/ResponseTypeDialog/useResponseTypeDialog.tsx +0 -17
  822. package/src/ui-kit/SearchDialog/useSearchDialog.tsx +0 -12
  823. package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx +0 -12
  824. /package/bundle/components/LinkDocs/{RepordDialogButton.d.ts → ReportDialogButton.d.ts} +0 -0
  825. /package/dist/components/LinkDocs/{RepordDialogButton.d.ts → ReportDialogButton.d.ts} +0 -0
  826. /package/lib/components/LinkDocs/{RepordDialogButton.d.ts → ReportDialogButton.d.ts} +0 -0
  827. /package/mobile/bundle/components/LinkDocs/{RepordDialogButton.d.ts → ReportDialogButton.d.ts} +0 -0
  828. /package/mobile/dist/components/LinkDocs/{RepordDialogButton.d.ts → ReportDialogButton.d.ts} +0 -0
  829. /package/mobile/lib/components/LinkDocs/{RepordDialogButton.d.ts → ReportDialogButton.d.ts} +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),a=n("useState"),i=n("useEffect"),l=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:a,...i}=t||{},l=n?.slots?.default,r=a||l&&l();return e(Object.assign(i,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:a="p-xl",padding:i,block:l,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],i||a,e),...m?{"data-ver":t}:{},...l?.anchor?{id:l.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)=>b(100,e).map((e=>Math.floor(e))).map(y),y=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),b=(e,t)=>[e].concat(t>0?b(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:a,children:i})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:a||i}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),C={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"}},S=d((({className:e,version:t="",headlineVersion:n="XL",title:a,description:i,align:l="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=C[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(N,{className:u("whitespace-pre-wrap",l),...h?.title,as:r||h?.title.as,title:a}):null,i?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:l,...p,children:i}):null]})})),k=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...a}={}){const{key:i,blockDecorator:l=k,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return l({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:l})=>{const{content:r}=n;return d?o(d,{className:l,block:e,options:t,...r,...a},i):null}},i)}const B=[],P=(e,{key:t,ancestors:n=B,slotName:a=null,extraProps:i,renderProps:l=T,...r})=>{const s=i?(e,t)=>T(e,t,i):l;return(e||[]).map(((e,i)=>s(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...n||B,[r.parent,a]]:n},i)))};function R({block:e,options:t,children:n,extraProps:a,renderProps:i}){return n||(e&&t?P(e.blocks,{...t,parent:e,extraProps:a,renderProps:i}):null)}function D(){return D._impl()}D._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),D.setup=e=>{D._impl=e};const M=["CDN","BASE_PATH"],_=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return M.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),E=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),z=e=>Boolean(e?.startsWith("#")),F=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),O=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),V=(e,t)=>!(!e||!t)&&(!!e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:A,isLocalURL:E,isHash:z,withoutQuery:F,joinPath:O,hasPrefix:V});const $="/api/",j=`${$}v1/storage`,q=e=>(t,n)=>{if([!t,A(t),z(t),[_.CDN,$].some((e=>V(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`${j}/${t}/attachment`;const a=t?.startsWith("/");return O(V(t,n)?"":n,a?"/":(i=e.pathname,i?.split("/").slice(0,-1).join("/")),t);var i},U={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:a=`Иконка ${n}`,title:i=a,iconVersion:l="color",width:r,height:s})=>{const d=D(),m="normal"===l?`${n}.svg`:`sprites.svg#${n}`,h=q(d)(O(_.CDN,"/icons/",m));return"normal"===l?o("img",{className:e,src:h,alt:a,title:i,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:u(Y(r),U[l],{invert:"white"===l},t),width:r,height:s,"aria-hidden":"true",children:[i?o("title",{children:i}):null,a?o("desc",{children:a}):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)),G=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function X(e=""){try{return new URL(e).pathname}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":X(G.SITE_URL);return t&&!A(t)?q(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const a=D();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:i},l)=>o("source",{srcSet:J(a)(e),type:te(n),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${l}_${e}`))):null,t?.src?ee({...t,src:J(a)(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="",...a})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...a}):o(Q,{className:e,imageClassName:n,image:t}):null)),ae={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","":""},ie="bg-main-divider text-main-disabled",le={primary:ie,secondary:ie,white:ie,link:"",transparent:"",gray:ie,"":""},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?ae[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=e=>ce._impl(e);ce._impl=e=>e,ce.setup=e=>{ce._impl=e};class de{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const me=new de,ue=()=>({open:(e,t={})=>me.fire("dialog",{type:"open",dialog:e,...t}),close:()=>me.fire("dialog",{type:"close"}),closeAll:()=>me.fire("dialog",{type:"close",all:!0})});function he(){const e=X(G.SITE_URL),t=D(),{closeAll:n}=ue();return e=>{const n=q(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:ce(a({...e,href:n}))}};function a({href:a,target:i,onClick:l}){return r=>{l?.(r),pe(a,i,e)||(n(),r?.preventDefault(),t.push(((e,t="")=>e?.replace(t,"")||"/")(a,e)))}}}const pe=(e,t,n)=>{if(!E(e,t))return!0;const a=G.SUB_PORTALS?.split(",");return!!a?.some((t=>V(e,t)))||!V(e,n||"/")},ge=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},fe=d((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:i,version:l="primary"}=e,r=ye(e)&&"hidden lg:block";return c("div",{className:u(xe(e),"flex gap-xs"),children:[a?o("div",{className:u(r,se[l]),children:a}):null,ye(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,i?o("div",{className:u(r,se[l]),children:i}):null]})})),xe=e=>{const{version:t,aboveText:n,rounded:a}=e;if("link"===t)return"";const i=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",ye(e)?i:"h-12 w-12 m-auto",{"rounded-full":a})},ye=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),be=({className:e,rounded:t,version:n})=>["inline-block",re,n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ve=d((({disabled:e,children:t,method:n="LINK",href:a,...i})=>{const r=(({method:e,href:t})=>l((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:a,pathname:i,searchParams:l}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[a,i].join(""));for(const[e,t]of l.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:a}),s=he()({onClick:r,href:a,...i}),c=t??o(fe,{...s});return o(e?we:Ne,{...s,children:c})})),Ne=d((({className:e="",href:t,rel:n,target:a,ariaLabel:i,version:l,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:l,rounded:r}),href:t,rel:n,target:a,"aria-label":i||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...ge(d),children:m}))),we=d((({className:e,ariaLabel:t,version:n,rounded:a,children:i})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:be({className:e,rounded:a,version:n}),children:i})));function Ce({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:a=!1}){if(!n)return null;const i="primary"===e?"white":"black",l="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(a?"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}),l),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:i}})}),o(ve,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Se=()=>{const[e,t]=a(false);return i((()=>{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"},Ie=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Te=d((({className:e,version:t="primary",defaultPadding:n,padding:a="",title:i,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...y})=>{const b=Se(),v=D(),N=l((()=>v.back()),[]),w=y.options?.page?.common?.backwardButton,C=f&&!b;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",a||n,e),children:[C&&Ce({version:t,handleClick:N,text:w}),i?o("div",{className:"relative h-full",children:i}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Ie(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]}),Pe(R({...y,extraProps:{className:"@container-normal"}})),Ie(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Be(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Be=e=>u(e?"row-span-2":"@xl:row-span-2"),Pe=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Re=(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,De=d((e=>{const{__html:t="",richVersion:n="",itemSize:a="list-m",isDotted:i=!0}=e,l=i?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(n,a,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",l),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,_e=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Ae=(e,t)=>e?o(_e,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ee=(e,t)=>["label"in e?Ae(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(De,{...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?Re(n.icon,t):null,o("div",{children:Ee(n)})]}))),Fe=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)),Oe=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(Ee)}):null)),Ve=d((({isTabularBenefits:e,...t})=>o(e?Oe:Fe,{...t}))),Le=e=>Boolean(e?.src||e?.icon),$e=(e,{className:t,buttonClassName:n,isVertical:a}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",a?"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:a,icon:i,iconRight:l,version:r,...s}=t||{},c=qe(i,r),d=qe(l,r);return a||i?.icon?o(ve,{className:u("basis-full @lg:basis-auto",e),appendLeft:Ue({...i,iconVersion:c}),appendRight:Ue({...l,iconVersion:d}),version:r,text:a,...s},n?String(n):""):null},qe=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Ue=e=>Le(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),We=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),He=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(Ye)}):null)),Ye=({label:e,amount:t,unit:n},a)=>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(_e,{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:[We(2)(t)," ",n||"₽"]}):null]},String(a)),Ke=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ge)}):null)),Ge=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(_e,{size:"text-m",font:"font-light",children:e})},String(t)),Xe={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Je=d((({className:e,padding:t,defaultPadding:n,title:a,description:i,headlineVersion:l="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:y,image:b,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:k,children:I,...T})=>{const B=b?.src?o(ne,{image:b}):null,P=o(S,{title:a,description:i,headlineVersion:l,align:r,isEmbedded:!0}),R=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Te,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ze(B,N),isImageSecondary:C,imageAlign:v,isImageAlwaysOnRight:w,buttons:$e(y),backwardButton:k,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(Ve,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(De,{richVersion:p,__html:h,isDotted:m,itemSize:Xe[l]}):null,I,f?.length?o(He,{priceList:f}):null,Qe(x)]})})})),Ze=(e,t)=>t?{rightImage:e}:{leftImage:e},Qe=e=>e?.length?o(Ke,{tags:e}):null;class et{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof et?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const tt=()=>!0,nt=(e,t)=>(...n)=>e(...n)&&t(...n),at=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const it=e=>Boolean(e&&Array.isArray(e)),lt=e=>Boolean(e&&"object"==typeof e&&!it(e)),rt=e=>e;function st(e){return e instanceof et?e._:e}class ot extends et{from(e){return this.of(e.map(((e=rt)=>([,t])=>e(t))(st)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(it(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,a)=>a===e?t:this._[a])):Array.from({length:Number(e)+1},((n,a)=>a===e?t:void 0)))}}class ct extends et{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class dt extends et{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,st(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class mt extends et{proto=at([e=>it(this._)||"number"==typeof e,()=>ot.prototype],[e=>lt(this._)||"string"==typeof e,()=>dt.prototype],[tt,()=>ct.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const ut=e=>e instanceof et?e:new mt(e),ht=e=>{const t=(t,...n)=>st(e(ut(t),...n));return t.fn=e,t},pt=[],gt=e=>e instanceof Function?e:t=>e===t,ft=e=>(t,n,a=pt)=>ut(t).entries().reduce(((t,[n,i])=>ft(e)(i,t,a.concat(n))),e(n,[a,ut(t)])),xt=ht(((e,[t,n])=>{const[a,...i]=t;return e.set(a,i.length?xt(e.get(a),[i,n]):n)})),yt=ht(((e,t)=>t.reduce(xt.fn,e))),bt=e=>ft(((e,[t,n])=>vt(n)?[...e,[t,st(n)]]:e))(e,[]),vt=e=>0===e.size();ht(((e,t=pt)=>t.reduce(((e,t)=>e.get(t)),e)));const Nt=ht(((e,[t,...n])=>n.length?e.set(t,Nt(e.get(t),n)):e.filter((([e])=>e!==t)))),wt=(Ct=["$ref"]).map(((e,t)=>n=>gt(e)(n[t+n.length-Ct.length]))).reduceRight(nt,tt);var Ct;const St=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(kt,e),kt=at([it,(e,t)=>e[parseInt(t,10)]],[lt,(e,t)=>e[t]],[tt,rt]),It=(e,t)=>((e,t={})=>n=>yt(t,bt(n).map((t=>e(t)))))((([e,n])=>{return wt(e)?[(a=e,a.slice(0,-1)),St(t(n),n)]:[e,n];var a}))(e),Tt=e=>bt(e).filter(((e=rt)=>([t])=>e(t))(wt)),Bt=e=>{return t=Tt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Pt(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(),Dt=e=>[...new Set(e)],Mt={},_t=["/portal-resources"],At=(e,t)=>It(e,(e=>t?.[e])),Et=(e,t)=>{const n=Bt(e),[l,r]=a({});return i((()=>{zt(n).then(r)}),[n.join()]),n.length?At(e,{...t,...l}):e},zt=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(Dt(e).filter((e=>!_t.some((t=>e.startsWith(t))))).map((async e=>[e,Mt[e]||=await Rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),a={...t,...n},i=Object.entries(n).flatMap((([,e])=>Bt(e)));return i.length?zt(i,a):a}return t};function Ft(e,t={}){const n=d((t=>{const n=Et((({block:e,options:t,className:n,defaultPadding:a,padding:i,isTheme:l,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Ot=Ft((({className:e,padding:t,defaultPadding:n,...a})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...a,children:o(Je,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...a})})),{childrenTypes:["UnitBlock"]}),Vt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>Lt(0,t?.length)),[t]),a=t?.[n];return a?o(Ot,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),Lt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),$t=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getFullYear());return t?`${i}-${a}-${n}`:`${n}.${a}.${i}`}},jt=e=>e?.replace(/[^+\d]/g,""),qt="/api/v1";const Ut=e=>e?{phone:jt(e)}:{},Wt=(e,t="birthday")=>e?{[t]:$t(e)}:{},Ht=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Yt=(e,t=!0)=>({[t?"email":"mail"]:e}),Kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:jt(e)}:{},Gt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:a,params:i}of e)t[a??""]?.(n,i)};function Xt(){return Xt._impl()}Xt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Xt.setup=e=>{Xt._impl=e};const Jt="rshb-query-params";function Zt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Jt)||"";return e&&globalThis.sessionStorage?.setItem(Jt,e),e}const Qt=e=>{const t=e.target?.closest("a"),n=Xt();if(A(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=Zt();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,a]of new URLSearchParams(t))n.searchParams.set(e,a);return n.toString()})(t?.href)||t?.href;a&&n.assign(a,t?.target)}};function en(){return en._impl()}en._impl=()=>({forwardQuery:Qt}),en.setup=e=>{en._impl=e};const tn=e=>e,nn=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=a(e),c=l(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return an(t,n)?t:n}:r(e)):o,[r]);i((()=>{r&&o(r)}),[r]);const[d,m]=a(!1),[u,h]=a({}),p=l(((e,t)=>{const{parse:n=tn,format:a=tn}=t||{};return{value:a(s[e]),isDirty:d||u[e],onChange:t=>{c((a=>({...a,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=l((e=>{c(e),h(e)}),[]),f=l((()=>{c(e),m(!1),h({})}),[e]),x=l((e=>(e.preventDefault(),t?f():m(!0),n&&n(s,e),s)),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},an=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),ln=d((e=>{const{className:t,title:n,children:a,...i}=e;return o(g,{className:t,defaultPadding:"p-6xl",...i,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,a]})})}));function rn(e=!1){const[t,n]=a(e),i=l((()=>n(!0)),[]),r=l((()=>n(!1)),[]),s=l((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:i,setFalse:r,toggle:s}]}function sn(e,t,n,a){i((()=>{if(e&&n)return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}),[e,t,n])}function on(e){const t=s(null),n=l((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return sn(globalThis.document,"click",n),t}const cn=({label:e,errors:t})=>e&&t?`${e}*`:e,dn=()=>{},mn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",un=e=>e?o(_e,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,hn=d((({key:e,className:t="",id:n,name:a,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:y,pattern:b,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const C=s(null),S=l((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);i((()=>{v&&C.current?.focus()}),[v,C]);const k=g?"pr-3xl":"",I=pn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[un(d),N?o("textarea",{className:u("block resize-y min-h-24",gn,I),id:u("textarea",n),name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:y,disabled:w},e):o("input",{type:r,className:u("h-14",gn,k,I),ref:C,id:n,name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:y,pattern:b,disabled:w},e)]}),g]})})),pn=e=>e?mn:"border-error",gn="w-full border rounded-md text-primary-text outline-none p-m",fn=e=>o("div",{className:"h-6",children:e?o(_e,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),xn=e=>e?.value||"",yn={url:"suggest/address"},bn={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||""},addressRegistration:yn,addressFact:yn,organizationAddress:yn,addressCourier:yn},vn=()=>({open:(e,t)=>me.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>me.fire("popup",{type:"update",popup:e,...t}),close:()=>me.fire("popup",{type:"close"})}),Nn=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 wn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=a([]),f=vn(),x=bn[n],y=l((()=>{h.current=t,f.close()}),[t]),b=l((e=>{y(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[y,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await(e=>{const{url:t,query:n,queryPrefix:a,requestData:i={},responseItemHandler:l=xn}=e,r=(s=l,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${a?`${a}, `:""}${n}`;return fetch(`${qt}/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...i,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 a=(...i)=>{a.dispose(),n=setTimeout((()=>{e(...i)}),t)};return a.dispose=()=>{n&&clearTimeout(n)},a})(N,300)),[N]);return i((()=>{if(!e||!v.current||h.current===t)return void y();const n=v.current,{top:a,left:i,width:l,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.update(o(Nn,{options:p,value:t,onChange:b}),{top:a+globalThis.scrollY+r,left:i,width:l})}),[e,p,t,b]),v}const Cn=d((({className:e,label:t,value:n="",placeholder:a,error:r,errors:s,onChange:d=dn,onDaDataChange:m,onBlur:h,isTextarea:p,type:g,name:f="",daDataQueryPrefix:x,isInteger:y=!1,maxLength:b,dadata:v=!1,disabled:N=!1})=>{const[w,{setFalse:C,setTrue:S}]=rn(),k=on(C),I=l((e=>{v&&!w&&S(),b?e.length<=b&&d(e):d(e)}),[v,w,d]);i((()=>{y&&n&&d(Sn(n))}),[n]);const T=wn({isOpen:w&&v,name:f,value:n,daDataQueryPrefix:x,onChange:d,onDaDataChange:m});return c("div",{className:u("shrink-0 w-full",e),ref:k,onBlur:C,onFocus:S,children:[o("div",{ref:T,children:o(hn,{disabled:N,type:g||"text","aria-label":t,label:cn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:I,onBlur:h,isTextarea:p,placeholder:kn(a,s,t)})}),fn(r)]})})),Sn=(e="")=>e.replace(/[^\d]+/g,""),kn=(e,t,n)=>t&&!n?`${e}*`:e,In=e=>e?.text||e?.key||"",Tn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Bn=d((({popupRef:e,options:t,value:n,query:a,onChange:i,iconVersion:l})=>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:Tn(t,a).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(),i&&i(e)},children:[o("span",{className:"min-h-6",children:In(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:l,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const Pn=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[y,{setFalse:b,setTrue:v}]=rn(),[N,w]=a(""),C=Mn(x,n.length),S=y&&!C,k=l((()=>{w(""),b()}),[]),I=function({isOpen:e,options:t,value:n,query:a,onChange:r,onClose:c,iconVersion:d}){const m=vn(),u=l((()=>{m.close(),c&&c()}),[c]),h=l((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=on(u);return i((()=>{if(!e||!p.current)return;const i=p.current,{top:l,left:r,width:s,height:c}=i.getBoundingClientRect();m.update(o(Bn,{popupRef:g,options:t,value:n,query:a,onChange:h,iconVersion:d}),{top:l+window.scrollY+c,left:r,width:s})}),[e,t,n,a,h]),p}({isOpen:y,options:n,value:r,query:N,onChange:f,onClose:k,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[un(t),c("div",{className:u("relative",S?"z-20":"z-10"),ref:I,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",Dn(m,d,C)),onClick:S?k:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:In(r)||h}),Rn(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(hn,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),Rn=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Dn=(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"),Mn=(e,t)=>e||0===t,_n=d((({className:e="",label:t,error:n,errors:a,...i})=>c("div",{className:e,children:[o(Pn,{...i,valid:!n,label:cn({label:t,errors:a})}),fn(n)]}))),An=e=>!e?.length,En=e=>t=>n=>e(n)?[]:[t],zn=En((e=>null!=e&&""!==e)),Fn="Некорректно заполненное поле",On="Укажите регион, город/населенный пункт, улицу, дом",Vn=e=>zn(e??Fn),Ln=e=>En((e=>e?.key&&""!==e?.key))(e??Fn),$n=e=>En((e=>"string"==typeof e&&e.length>0&&e.length<=2))(e??Fn),jn=e=>En((e=>"string"==typeof e&&e.length>1&&Jn(e)))(e??Fn),qn=(e,t)=>En((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??Fn),Un=e=>En((e=>"string"==typeof e&&6===e.length))(e),Wn=e=>{return(t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,En((e=>"string"==typeof e&&t.test(e))))(e);var t},Hn=En((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Yn=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},Kn=e=>Boolean(e.region&&e.city&&e.house),Gn=()=>En(Kn)(On),Xn=/^[\u0400-\u04FF\d]+$/u,Jn=(e="")=>Xn.test(e),Zn=e=>{const t=new Date,n=new Date(t.getFullYear()-23,t.getMonth(),t.getDate()),a=new Date(t.getFullYear()-75,t.getMonth(),t.getDate());return!(!e||e>n||e<a)},Qn={typeForm:Vn(),surname:jn("Укажите свою фамилию"),name:jn("Укажите своё имя"),middleName:jn("Укажите своё отчество"),region:Ln(),addressBranch:Ln(),phone:Wn("Укажите номер телефона"),secondaryPhone:Wn("Укажите номер телефона"),organizationPhone:Wn("Укажите номер телефона"),birthday:Vn("Укажите дату рождения"),limitedBirthday:En(Zn)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:Vn("Укажите место рождения"),education:Vn("Выберите ваше образование"),housing:Vn("Выберите тип жилья"),employment:Vn("Выберите информацию о трудоустройстве"),organization:Vn("Выберите тип организации"),amountWorkers:Vn("Выберите информацию о количестве сотрудников"),employerActivities:Vn("Выберите вид деятельности организации"),employerOrganization:Vn("Выберите вид организации"),positionOrganization:Vn("Выберите вашу должность"),dulSerie:(ea="Укажите серию паспорта",En((e=>"string"==typeof e&&4===e.length))(ea)),dulNumber:Un("Укажите номер паспорта"),dulIssueDateField:Vn("Укажите дату выдачи паспорта"),dulSubdivisionCode:Un("Укажите код подразделения"),dulIssuedBy:Vn("Укажите организацию, выдавшую паспорт"),email:(e=>En((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),fullName:jn(),inn:(e=>En((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),legalForm:Vn("Укажите ОПФ"),organizationName:Vn("Укажите наименование организации"),generalSeniority:$n("Укажите количество лет стажа"),lastJobExperience:$n("Укажите стаж на последнем месте работы"),experience5Years:$n("Укажите общий стаж за последние 5 лет"),jobsNumber:$n("Укажите количество мест работы за последние 5 лет"),beginDate:Vn("Укажите дату заключения трудового договора"),addressFact:Gn(),partnerComments:Vn(),collectionCount:Vn(),comment:Vn(),acquiringType:Ln(),feedbackMethod:Ln(),serviceType:Ln(),serviceDirection:Ln(),regionRetail:Ln("Выберите регион"),meetingDay:Vn(),product:Vn(),localities:Vn(),consentDataProcessing:Hn,annualRevenue:Vn(),consentToReceiveMaterials:Hn,processPersonalDataFlg:Hn,consentProviderFlg:Hn,consentPfrFlg:Hn,consentOthersFlg:Hn,consentInformFlg:Hn,familyStatus:Vn("Выберите семейное положение"),children:qn(2,"Укажите количество детей"),familyMembers:qn(2,"Укажите количество членов семьи"),dependents:qn(2,"Укажите количество иждивенцев"),totalIncome:qn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:qn(10,"Укажите сумму обязательных выплат"),snils:(e=>En(Yn)(e))("Некорректный номер СНИЛС"),conscription:Vn(),armyIdFlg:Hn,sex:Vn("Укажите свой пол"),addressRegistration:Gn(),organizationAddress:En((e=>Boolean(e.fiasCode&&e.city&&e.house)))(On),participantDateRegistration:Vn("Укажите дату регистрации"),retirementIncome:Vn(),otherIncome:Vn(),wages:Vn(),mandatoryPayments:Vn(),disablePeopleFlg:Vn(),bankruptcyFlg:Vn(),shareholderFlg:Vn(),legalEntityName:Vn(),bankEmployeeCode:Vn(),partInBusiness:Vn(),addressRetail:Ln("Выберите адрес банка"),addressMatch:Vn(),codeWord:(e=>En((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&Jn(e)))(e??Fn))("Необходимо ввести кодовое слово"),confirmationIncome:Vn(),deliveryDate:Vn("Укажите дату доставки"),addressCourier:Gn(),cardCategory:Vn("Укажите категорию карты"),paymentSystem:Vn("Укажите тип платежной системы")};var ea;const ta=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>Boolean(e?.required))));return Object.fromEntries(t.map((e=>[e,Qn?.[e||""]])).filter((([,e])=>e)))},na=(e,t)=>{const{value:n,isDirty:a}=e,i=a?t(n):[];return{...e,errors:i,error:i[0]}},aa=(e,t,n=!1)=>n&&t?na(e,t):e,ia=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],la=d((({field:e,input:t})=>o(_n,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:ia,...aa(e("acquiringType"),Qn.acquiringType,t?.required)}))),ra=(e="")=>Boolean("trade"===e||"all"===e),sa=e=>null!=e,oa=new Map,ca=(e,t=oa)=>n=>{const a=ma(n),i=t.get(a);if(a&&sa(i))return i;const l=e(...n);return a&&sa(l)&&t.set(a,Promise.resolve(l)),l},da=e=>Boolean(e?.every((e=>Array.isArray(e)?da(e):!e||"string"==typeof e))),ma=e=>da(e)?e.toString():"",ua=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function ha(e,t,{fallback:n,cache:l}={}){const s=r((()=>pa(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);i((()=>{if(!s.some(sa))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await ca(t,l)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,l,s]);const u=n&&ua(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function pa(e){return Array.isArray(e)?e:e instanceof Function?pa(e()):[e]}const ga=`${qt}/branches`,fa=[];const xa=async e=>await Pt(e,{method:"GET"})||fa;function ya(e=!1){const{data:t}=ha(`${qt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,Rt);return Array.isArray(t)?t:[]}const ba=d((({field:e,input:t,isPremium:n=!1})=>{const a=e("region"),l=a?.value?.key,r=a?.value?.text,s=n?ya(n)?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=ha(e?`${ga}?regionCode=${e}`:null,xa);return t||fa}(l)?.filter((e=>e?.address));return i((()=>{""!==a?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[a?.value]),o(_n,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...aa(e("addressBranch"),Qn.addressBranch,t?.required),isSearch:!0})})),va=d((({field:e,input:t})=>{const n="addressFact",a=e(n).value,{value:r}=e("addressMatch");i((()=>{r&&e("addressFact")?.onChange?.(e("addressRegistration").value)}),[r,e("addressRegistration").value]);const s=l((t=>{e?.(n)?.onChange?.({apartment:t?.data?.flat,city:t?.data?.city,district:t?.data?.area_with_type,fullAddress:t?.value,fiasCode:t?.data?.fias_id,house:t?.data?.house,locality:t?.data?.settlement_with_type,okatoRegionCode:t?.data?.okato,postcode:t?.data?.postal_code,region:t?.data?.region,regionCode:t?.data?.region_kladr_id?t?.data?.region_kladr_id.substring(0,2):"",street:t?.data?.house,qc:t?.data?.qc,qcComplete:t?.data?.qc_complete,qcHouse:t?.data?.qc_house})}),[]),c=l((t=>{e?.(n)?.onChange?.({...e(n).value,fullAddress:t})}),[]);return o(Cn,{label:"Адрес",disabled:r,...aa(e(n),Qn[n],t?.required),value:a.fullAddress,onChange:c,...t,onDaDataChange:s})})),Na=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,wa=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,i=l((t=>{e?.(n)?.onChange?.({apartment:t?.data?.flat,city:t?.data?.city,district:t?.data?.area_with_type,fullAddress:t?.value,fiasCode:t?.data?.fias_id,house:t?.data?.house,locality:t?.data?.settlement_with_type,okatoRegionCode:t?.data?.okato,postcode:t?.data?.postal_code,region:t?.data?.region,regionCode:t?.data?.region_kladr_id?t?.data?.region_kladr_id.substring(0,2):"",street:t?.data?.house,qc:t?.data?.qc,qcComplete:t?.data?.qc_complete,qcHouse:t?.data?.qc_house})}),[]),r=l((t=>{e?.(n)?.onChange?.({...e(n).value,fullAddress:t})}),[]);return o(Cn,{disabled:t?.filledByEsia&&Na(e,n),label:"Адрес",...aa(e(n),Qn[n],t?.required),value:a.fullAddress,onChange:r,...t,onDaDataChange:i})})),Ca=d((({className:e,viewBox:t,fill:n="none",width:a,height:i,paths:l,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:a,height:i,children:l.map((({d:e,fill:t,...n},a)=>{const i={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:i.stroke,strokeLinecap:i.strokeLinecap,strokeLinejoin:i.strokeLinejoin,strokeWidth:i.strokeWidth,strokeMiterlimit:i.strokeMiterlimit},a)}))}))),Sa="appearance-none w-5 h-5 border-solid flex-none",ka=[{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"}],Ia=d((({className:e,value:t,text:n,disabled:a,isRadio:i,onChange:r})=>{const s=l((e=>{a||(e.preventDefault(),r&&r(!t))}),[r,a,t]),d=i?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Ca,{paths:ka,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",Ba(a)),onClick:s,children:[o("div",{className:u(Sa,"m-0",i?"rounded-full border-2":Ra(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Pa(i),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,Ta(n)]})})})),Ta=e=>e?o("div",{className:"ml-s",children:o(_e,{size:"text-l",font:"font-light",children:e})}):null,Ba=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Pa=(e=!1)=>e?"radio":"checkbox",Ra=(e=!1)=>u("rounded border",{"bg-primary-main":e}),Da=d((({className:e,text:t,value:n,key:a,disabled:i,error:l,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Ia,{text:t,value:n,disabled:i,onChange:r},a),fn(l)]}))),Ma=d((({field:e,input:t})=>o(Da,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...aa(e("addressMatch"),Qn.addressMatch,t?.required)}))),_a=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"})}))),Aa="/icons/MapMarkerClusterIcon.svg",Ea="/icons/MapMarkerClusterYellowIcon.svg";function za({yandexMaps:e,map:t,points:n,isLoad:a}){if(a||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const i=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),l=Fa("offices",e,i);if(n.length&&n.every((e=>"type"in e))){const a=Fa("workplaces",e,i),r=Oa(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Oa(n.filter((e=>"offices"===e.type)),"offices",e);l.add(s),a.add(r),t.geoObjects.add(a),t.geoObjects.add(l)}else{const a=Oa(n,"offices",e);l.add(a),t.geoObjects.add(l)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Fa=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Aa:Ea,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Oa=(e,t,n)=>e.map((({coords:e,content:a})=>new n.Placemark(e,{balloonContentHeader:a?.header,balloonContentBody:a?.body,balloonContentFooter:a?.footer,hintContent:a?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Aa:Ea,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Va={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},La={...Va,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},$a=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(La).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"})}),ja=e=>globalThis[e],qa=(e,t)=>{const n=document.getElementById(t);if(n){const t=ja(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(ja(e))}))}))}return new Promise(((n,a)=>{const i=document.createElement("script");i.src=t,i.async=!0,i.id=t,i.addEventListener("load",(()=>{n(ja(e))})),i.addEventListener("error",(e=>{a(e)})),document.head.appendChild(i)}))};const Ua=()=>function(e,t,n=!0){const[l,r]=a(void 0);return i((()=>{let a=!0;return qa(e,t).then((e=>{a&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(a=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${_.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),Wa={...Va,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Ha=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),a="in"===t?n+1:n-1;e.current.setZoom(a,{checkZoomRange:!0})},className:`${Object.values(Wa).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Ya=[55.753995,37.614069],Ka=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:l})=>{const r=s(null),d=s(null),m=Ua();if(i((()=>{r.current?za({yandexMaps:m,map:r.current,points:e,isLoad:a}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:Ga(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),za({yandexMaps:m,map:r.current,points:e,isLoad:a})})),r.current&&l&&m?.geocode(l).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();r.current.setCenter(t),r.current.setZoom(18)}))}),[m,e,n,a,l]),!m)return null;const h="z-10";return c("div",{ref:d,className:u("relative","w-full",t),children:[a?o(_a,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(Ha,{yandexMaps:r}),o(Ha,{yandexMaps:r,direction:"out"})]}),$a(r,m,u("right-2 top-80",h))]})})),Ga=e=>{const t=[Ja(Xa(e,0)),Ja(Xa(e,1))];return t.every((e=>e))?t:Ya},Xa=(e,t)=>e.map((e=>e.coords?.[t])),Ja=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Za=async(e,t,n)=>{try{return(await Qa(e,t,n)).json()}catch(e){return console.error(e),null}};async function Qa(e,t,n){return globalThis?.fetch?.(`${qt}${e}`,{method:t,headers:{"Content-Type":"application/json",...ei()},credentials:"include",body:n?JSON.stringify(n):null})}const ei=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},ti=e=>Number(e.toString().replace(",",".")),ni=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:i,renderFoldButton:r})=>{const[s,o]=a(n),d=l((()=>{o((e=>!e))}),[]),m=i({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 ai=d((({className:e="",isUnfolded:t,children:n})=>{const a=s(null),l=function(e,t){const n=s(null);return i((()=>{const t=n?.current;if(!t)return;const a=new ResizeObserver((n=>{e(t,n[0])}));return a.observe(t),()=>{a.disconnect()}}),[e,...t]),n}((e=>{a.current&&(a.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:a,className:`transition-max-h duration-300 overflow-hidden ${a.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:l,children:n})})})),ii=d((({value:e,subText:t,children:n,isPhone:a,...i})=>{const l=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[l.length,n,t].every((e=>!e))?null:li({textItems:l,subText:t,children:n,isPhone:a,...i})})),li=({label:e,labelSize:t="text-m",textItems:n,subColor:a,subText:i,className:l,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",l),children:[e?o(_e,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||ri(n,s),i?o(_e,{color:a,size:"text-m",children:i}):null]}),ri=(e,t)=>e.filter(Boolean).map(((e,n)=>o(_e,{size:"text-l",children:t?o("a",{href:`tel:${si(e)}`,children:e.trim()}):e.trim()},String(n)))),si=e=>e.replace(/\D/g,""),oi=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}))),ci=e=>{const t=mi(e);return o(ii,{label:"Режим работы",value:t,className:"max-w-none"})},di=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",mi=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))),a=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[di({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),di({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},ui=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],hi=e=>ui.map((([t,n,a])=>({key:t,title:a,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??"")}}))),pi=e=>{if(!e)return null;const t=gi(e);return c(oi,{className:"border-none",children:[o(ii,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(fi)})}),o(ii,{label:"Режим работы",className:"max-w-none",children:o(_e,{children:e})})]})},gi=e=>{const t=ui.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],a=n[n.length-1]?.toLowerCase();return a?.includes("выходной")?t.map((e=>({...e,status:!a?.includes(e.short.toLowerCase())}))):t},fi=({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(_e,{size:"text-xs",children:e})},String(n)),xi=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(ii,{label:"Валюта",value:e.currency}):null,t?o(ii,{label:"Купить",value:String(t)}):null,n?o(ii,{label:"Продать",value:String(n)}):null]},String(a)),yi={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"}},bi=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",yi[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(_e,{size:"text-m",color:yi[n].text,children:t})]}))),vi=(new Date).getDay(),Ni=e=>{const[t]=e?.slice(vi-1)??[];if(!t)return null;const{lunchHour:n,status:a,workTime:i,hasLunch:l}=t;return a?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[i?o(bi,{color:"green",children:i}):null,n&&l?o(bi,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(bi,{color:"red",children:"Выходной"})},wi=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",Ci=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:i},l)=>o(ii,{label:e,value:t&&n?n:"",subText:wi({lunchHour:a,hasLunch:i,status:t}),subColor:!t||i?"text-error":"text-green-dark"},String(l)),Si=["ArrowDownIcon","ArrowUpIcon"],ki=["Подробнее","Скрыть"],Ii=({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:ki[Number(e)]}),o(W,{className:"text-primary-text",name:Si[Number(e)],width:"16",height:"16"})]}),Ti=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Bi=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Pi=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Ri=({name:e,address:t,phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=hi(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(_e,{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(_e,{size:"text-l",children:t})]}):null]}),Ni(h)]}),o("div",{className:"hidden sm:block",children:Di({phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(ni,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(ai,{isUnfolded:e,children:Di({phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ii({isUnfolded:e,onToggle:t})})]},String(u))},Di=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:i,phoneCurrencyControl:l,workSchedule:r,exchangeRate:s})=>{const d=hi(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(oi,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(ii,{label:"Факс",value:t,isPhone:!0}),o(ii,{label:"Телефон филиала",value:e,isPhone:!0}),o(ii,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(ii,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(ii,{label:"Для консультаций по валютному контролю",value:l,isPhone:!0}),o(ii,{label:"Контакт-центр",value:i,isPhone:!0})]}),r?.isMatchesPattern?o(oi,{children:o(ii,{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(Ci)})})}):c(oi,{children:[o(ii,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(fi)})}),ci(d)]}),r?.businessScheduleVisibleTag?pi(r?.businessScheduleDescription):null,s?.currencies?.length?o(oi,{className:"flex-wrap",children:s?.currencies?.map(xi)}):null]})},Mi=({name:e="",address:t="",workSchedule:n})=>{const a=(i=e)?`${i?.charAt(0)?.toUpperCase()}${i?.slice(1)}`:"";var i;const l=`${t} ${(e=>{const t=hi(e),n=e?mi(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Ti(n):Pi(n,a):Bi(n):""})(n)}`;return{header:a,body:l}},_i={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Ai={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Ei={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)},zi=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Ei[t](e)))))},Fi=()=>{},Oi=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:a=Fi,getBalloonRemoteWorkplaces:i=Fi})=>{const[l,s,o,c]=r((()=>{const l=zi(e,n),r=zi(t,n),s=[...l.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a(e)}))),...r.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:i({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[l,s,r,l.length+r?.length]}),[e,t,n,a,i]);return{filteredItems:l,points:s,filteredRemoteWorkplaces:o,lengthItems:c}},Vi=e=>{const{data:t,error:n}=ha(`/api/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,Li);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},Li=async e=>await Pt(e,{method:"POST"})||[],$i=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),ji=d((({children:e})=>$i?e:null)),qi=d((({field:e,input:t})=>{const[n,l]=a([]),{data:r}=Vi("REGION_RF"),s=e("regionRetail")?.value||{},d=e("addressRetail");i((()=>{(async()=>{const e=await(async e=>{const t=await Za("/public-data/regionOffices","POST",{regionRfCd:{key:e},cashCardFlg:!0});return t?.offices?.map((e=>({...e,gpsLatitude:ti(e.latitude??Ya[0]),gpsLongitude:ti(e.longitude??Ya[1])})))||[]})(s?.key??"");l(e)})(),s?.key&&e?.("addressRetail")?.onChange?.("")}),[s.key]);const{points:m}=Oi({data:n,filtrationState:{},getBalloon:Mi}),u=Boolean(s?.key);return c("div",{children:[o(_n,{label:"Адрес отделения",placeholder:"Выберите отделение",options:n.map((({id:e,address:t=""})=>({key:e?.toString()||"",text:t}))),...aa(e("addressRetail"),Qn.addressRetail,t?.required&&u),isSearch:!0}),o("div",{className:"h-[600px]",children:o(ji,{children:o(Ka,{points:m,isLoad:!r,className:"h-full",selectedAddress:d?.value?.text})})})]})})),Ui=(e,{normalize:t,format:n})=>{const{value:i,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=a(!1),m=l((e=>{d(!0),r&&r(e)}),[]),u=l((()=>{d(!1),o&&o(t(i)),s&&s()}),[o,i]);return{value:c||!n?i:n(i),onFocus:m,onBlur:u}},Wi=(e,t,n)=>Math.max(t,Math.min(e,n));function Hi(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function Yi({list:e=[],min:t,max:n,step:a,value:i=e[0]||t,disabled:l,onChange:r}){const s=e.length?e.indexOf(i):i,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||l?"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:a,value:s,disabled:l,onChange:t=>{const n=Hi(t.target?.value),a=e.length?e[n]:n;r&&r(a||0)}})})]})}const Ki=1,Gi=100,Xi=d((e=>{const{className:t,title:n,items:a=[],list:i=[],min:r=(i.length?0:Ki),max:s=(i.length?i.length-1:Gi),step:d=1,value:m=i[0]||r,disabled:h=!1,onChange:p}=e,g=Ui(e,{normalize:(e=0)=>i.length?Ji(i)(e):Wi(e,r,s),format:We()}),f=l((e=>{p&&p(Hi(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(_e,{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",mn,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),Yi({list:i,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),Zi(a)]})})),Ji=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),Zi=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(_e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Qi=["От 1 000 ₽","До 1 000 000 000 ₽"],el=d((({field:e})=>o(Xi,{title:"Сумма, ₽",items:Qi,min:1e3,max:1e9,...e("amount")}))),tl=Ft((({field:e,source:t,label:n,fieldName:a,input:i,placeholder:l="Выберите из списка",isSearch:r=!1})=>{const s=t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(_n,{placeholder:l,label:n,options:s,isSearch:r,...aa(e(a),Qn[a],i?.required)})})),nl=d((({field:e,input:t})=>{const{data:n}=Vi("EMPLOYEES_NUMBER");return o(tl,{field:e,source:n,label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),al=d((({field:e,input:t})=>o(Cn,{label:"Годовая выручка, ₽",...aa(e("annualRevenue"),Qn.annualRevenue,t?.required)}))),il=d((({field:e,input:t})=>o(Da,{text:"Наличие военного билета",...aa(e("armyIdFlg"),Qn.armyIdFlg,t?.required)}))),ll=d((({field:e,input:t})=>o(Cn,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...aa(e("bankEmployeeCode"),Qn.bankEmployeeCode,t?.required),...t}))),rl=d((({field:e})=>o(Cn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),sl=d((({field:e,input:t})=>o(Da,{text:"В отношении меня ведётся производство по делу о банкротстве",...aa(e("bankruptcyFlg"),Qn.bankruptcyFlg,t?.required)}))),ol=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:a,currentYear:i,min:l,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(i,a,d),n=cl(t,e),c=dl(t,l,r);u.push(o("td",{children:o("div",{className:ml(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},cl=(e,t)=>t&&e.toDateString()===t.toDateString(),dl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),ml=(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"),ul=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],hl=d((({today:e,currentMonth:t,currentYear:n,min:a,max:i,onDateSelect:s=dn,setValue:d=dn})=>{const m=l((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:ul.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:ol({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:a,max:i,onDateClick:m})})]})})),pl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function gl(e,t){const n=e.replace(/\D/g,"");if(""===n||e?.length===t.length)return e;const a=[...t],i=a.findIndex(fl),l=a.map(((e,t)=>yl(e)?a.slice(0,t).filter(yl).length:-1)),r=a.map(((e,t)=>xl(e)?e:n.charAt(l[t])||e)),s=l.indexOf(n.length-1)+1;return r.slice(0,Math.max(i,s)).join("")}const fl=e=>"_"===e,xl=e=>/\d/.test(e),yl=e=>fl(e)||xl(e),bl=1940,vl={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Nl=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:l,disabled:r,onChange:d,onClick:m})=>{const h=s(null),[p,g]=a(l||"");return i((()=>{g(l||"")}),[l]),c("div",{onClick:()=>{null!==h.current&&h.current.focus(),m?.()},className:u("relative",n),children:[o("input",{ref:h,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(gl(t,"__.__.____"))},onBlur:()=>{if(wl(p)){const[n,a,i]=p.split(".");d?.(new Date(Number(i),Number(a)-1,Number(n))),e(Number(a)-1),t(Number(i))}else g(l||"")},disabled:r}),r?null:o(W,{className:"mr-s",...vl})]})})),wl=e=>{const[t,n,a]=e.split(".");if((e=>Number(e)>=bl&&Number(e)<=(new Date).getFullYear())(a)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(a),Number(n)-1,1);let i=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),i++;if(Number(t)>0&&Number(t)<=i)return!0}return!1},Cl=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:i,setSelectedYear:l,disabled:r=!1})=>o(Nl,{onChange:a,disabled:r,onClick:e,value:t&&$t(t),setSelectedMonth:i,setSelectedYear:l,className:u("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Sl=pl.map((e=>({key:e}))),kl=Array.from({length:(new Date).getFullYear()-bl+1},((e,t)=>bl+t)).reverse().map((e=>({key:String(e)}))),Il=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},Tl=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:i})=>{a&&i?.(new Date(t,n,Math.min(e,a.getDate())))},Bl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Pl={className:"min-w-32",iconVersion:"black",isBorder:!1},Rl=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:h})=>{const[p,{setValue:g}]=rn(!1),[f,x]=a(n?.getMonth()||(new Date).getMonth()),[y,b]=a(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:v,handleNextMonth:N,handleSelectMonth:w,handleSelectYear:C,monthsOptions:S,yearsOptions:k,handleChangeVisibleCalendar:I,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:a,onYearSelect:i,selectedYear:r,onChange:s,value:o})=>{const c=on(l((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:l((()=>e(!t)),[t]),handleNextMonth:l((()=>{n+1<=11?a(n+1):(a(0),i(r+1))}),[n]),handlePrevMonth:l((()=>{n-1>=0?a(n-1):(a(11),i(r-1))}),[n]),handleSelectMonth:l((({key:e})=>{a(pl.indexOf(e));const t=Il(r,pl.indexOf(e));Tl({maxDateOfMonth:t,selectedYear:r,selectedMonth:pl.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:l((({key:e})=>{i(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Sl,yearsOptions:kl,ref:c}})({onYearSelect:b,onMonthSelect:x,onShowCalendar:g,selectedYear:y,selectedMonth:f,showCalendar:p,onChange:h,value:n}),B=((e,t)=>{const[n,l]=a(!1);return i((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();l(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:[un(t),c("div",{className:"relative",children:[Cl({handleChangeVisibleCalendar:I,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:b}),p&&!m?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":B}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:v,children:o(W,{...Bl,className:"-rotate-90 cursor-pointer"})}),o(Pn,{onChange:w,value:{key:pl[f]},options:S,...Pl}),o(Pn,{onChange:C,value:{key:String(y)},options:k,...Pl}),o("div",{className:"my-auto",onClick:N,children:o(W,{...Bl,className:"rotate-90 cursor-pointer"})})]}),o(hl,{today:n,currentMonth:f,currentYear:y,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),Dl=d((({className:e,label:t,error:n,errors:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Rl,{label:cn({label:t,errors:a}),valid:Boolean(!n),...i}),fn(n)]}))),Ml=d((({field:e,input:t})=>o(Dl,{label:"Дата начала работы на текущем месте",...aa(e("beginDate"),Qn.beginDate,t?.required),...t}))),_l=d((({field:e,input:t})=>o(Dl,{label:"Дата рождения",...aa(e("birthday"),Qn.birthday,t?.required)}))),Al=d((({field:e,input:t})=>o(Cn,{label:"Место рождения",...aa(e("birthPlace"),Qn.birthPlace,t?.required),...t,disabled:t?.filledByEsia&&Na(e,"birthPlace")})));function El(e){const[t,n]=a(JSON.parse(globalThis.localStorage?.getItem(e)||"null"));return[t,l((t=>{globalThis.localStorage?.setItem(e,JSON.stringify(t)),n(t)}),[e,globalThis.localStorage])]}const zl=d((({field:e,input:t})=>{const[n,l]=a([]),[r]=El("programId"),{value:s,onChange:c}=e("cardCategory"),d=e("paymentSystem").value;return i((()=>{d&&r&&(async()=>{const e=await(async(e,t)=>{const n=await Za("/dictionaryFiltered","POST",{type:"CARD_TYPE",presets:{paymentSystemTypeCd:e,creditProgramId:t}});return Array.isArray(n)?n:[]})(d,r);l(e),Fl(e,s)||c&&c(null)})()}),[d]),o(tl,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t})})),Fl=(e,t)=>e.some((e=>e.key===t?.key)),Ol=d((({field:e,input:t})=>o(Cn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...aa(e("children"),Qn.children,t?.required),...t}))),Vl=d((({field:e,input:t})=>o(Cn,{label:"Кодовое слово",...aa(e("codeWord"),Qn.codeWord,t?.required),...t}))),Ll=d((({field:e,input:t})=>o(Cn,{label:"Количество объектов инкассации",isInteger:!0,...aa(e("collectionCount"),Qn.collectionCount,t?.required)}))),$l=d((({field:e,input:t})=>o(Cn,{className:"col-span-2",...aa(e("comment"),Qn.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),jl=d((({field:e,input:t})=>{const{data:n}=Vi("INCOME_CERT_UNITED");return o(tl,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),ql=d((({field:e,input:t})=>{const{data:n}=Vi("MILITARY_STATUS");return o(tl,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),Ul={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3},consentToReceiveMaterials:{text:"Согласен на получение информационных и аналитических материалов по электронной почте"}};function Wl({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Hl={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"},Yl={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")},Kl=d((({children:e,...t})=>{const n=e=>({...e,onClick:ce(Wl(e))}),{className:a,version:i="primary",active:l,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":l,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},l||r?"":u(Hl[i],Yl[i]),a),type:s,role:d,onClick:m,children:e})})),Gl=async(e,t=!1)=>{const n=await(async(e,t=!1)=>{const n=await Qa(`/feedback/file?id=${encodeURIComponent(e)}&convertToPngFlg=${t}`,"GET");return n?await n.blob():new Blob})(e,t);return URL.createObjectURL(n)},Xl=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"})}))),Jl=d((({className:e,head:t,children:n,onClose:a,onClick:i})=>{const{close:r}=ue(),s=l((()=>{r(),a&&a()}),[a]);return c("div",{onClick:i,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(Xl,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),Zl=async({open:e,close:t,id:n,convertToPng:a=!1})=>{const i=await Gl(n,a);e(c(Jl,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",children:[a?o("img",{src:i}):o("iframe",{src:`${i}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"}),o(Kl,{className:"mx-auto mt-m",type:"button",onClick:t,children:"Ознакомиться"})]}))},Ql=d((({className:e,error:t,docId:n,...a})=>{const{open:i,close:l}=ue(),r=Se();return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(Ia,{...a}),n?o(ve,{className:"text-primary-main",onClick:()=>Zl({open:i,close:l,id:n,convertToPng:r}),children:o(_e,{children:"Ознакомиться"})}):null]}),fn(t)]})})),er=d((({field:e,input:t})=>t&&t.name?o(Ql,{text:Ul[t.name]?.text,docId:Ul[t.name]?.docId,...aa(e(t.name),Qn[t.name],t?.required)}):null)),tr=Math.round(29.5),nr=d((({className:e,title:t,children:n,...a})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...a,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),ar="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",ir="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",lr="flex flex-col gap-y-xl min-w-52",rr=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:i})=>o(_e,{size:"text-h3",children:"number"==typeof e?[a,We(t,{fixed:n})(e),i].filter(Boolean).join(" "):e}))),sr=d((({className:e,title:t,value:n,color:a="text-secondary-text",...i})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(_e,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(rr,{value:n,...i}):o(_e,{size:"text-h3",children:"-"})]}))),or=(e=[],t=!1)=>cr([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),cr=(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]},dr=(e,t=0)=>e?.sum?e.sum:t,mr=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,ur=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,hr=({min:e=0,max:t=0,availableMonths:n,...a})=>o(Xi,{items:[`От ${pr(e)}`,`До ${pr(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),pr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,gr={horizontal:"@lg:flex-row",vertical:""},fr=d((({label:e,items:t,value:n,className:a,onChange:i,disabled:l=!1,orientation:r="horizontal"})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(_e,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",gr[r],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Ia,{isRadio:!0,text:t,value:n===e,onChange:()=>i&&i(e),disabled:l},String(e))))})]}))),xr=({items:e,title:t,mobileTitle:n=t,orientation:a="horizontal",value:i,onChange:l,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(_e,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(_e,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(fr,{orientation:a,items:e,value:e[i?0:1].id,onChange:t=>l&&l(t===e[0].id),...r})]}),yr=e=>xr({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),br=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...a})=>o(Xi,{items:e?[`От ${We(1)(a.min||0)} ${n}`,`До ${We(1)(a.max||0)} ${n}`]:[],step:t,...a}),vr=({field:e,defParams:t,calcParams:n,map:a,monthsValue:i="maxMonths"})=>{Object.entries(a).forEach((([n,a])=>{e?.(n)?.onChange?.(t?.[a])})),e?.("monthsValue")?.onChange?.(Wi(t?.[i],n.minMonths,n.maxMonths))},Nr=(e,t)=>{const{isAnnuity:n,moneyValue:a,monthsValue:i,moneyExtra:l}=t;if(0===e)return 0;if(n){const t=e/1200;return l?(a+l)*(t+t/(Math.pow(1+t,i)-1)):a*(t+t/(Math.pow(1+t,i)-1))}return Math.round(a/i)+a*(e/1200)},wr=e=>e,Cr=(e=wr)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Sr=Cr(),kr=(e=wr)=>Cr((t=>-e(t))),Ir=kr(),Tr=([e,t],n,a=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Br([e,t],a),Br=([e,t],n=[])=>({[e]:n.length?Ir(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Sr(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Pr=(e,[t,n],a)=>e>=a[t]&&e<=a[n],Rr={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Dr=e=>Mr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Mr({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Mr({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Mr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Mr=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],_r=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.rateRows||[Rr],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Dr({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=Tr(["minSum","maxSum"],r,l),{minMonths:c,maxMonths:d}=Tr(["minMonths","maxMonths"],r,l),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i})=>e?.find((e=>Dr({row:e,userInputParams:t,paramsViewSettings:n})&&Pr(a,["minSum","maxSum"],e)&&Pr(i,["minMonths","maxMonths"],e)))||Rr)({rateRows:l,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i}),{rate:u}=m,h=Nr(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:i,monthlyPayment:h}},Ar=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Er={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},zr=Ft((({className:e,title:t,calcSource:n,buttons:a,footnote:l,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const h=(p=n?.rateRows,cr([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f,isDirty:x}]=nn({moneyValue:dr(s,2e5),monthsValue:mr(s,tr),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)});i((()=>{x&&d?.(g)}),[g,x]);const y=_r(g,n,r),b=yr({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:v}=f("moneyValue"),{onChange:N}=f("monthsValue");return i((()=>{v&&v(Wi(g.moneyValue,y.minSum,y.maxSum))}),[y.minSum,y.maxSum]),i((()=>{N&&N(Wi(g.monthsValue,y.minMonths,y.maxMonths))}),[y.minMonths,y.maxMonths]),i((()=>{!Ar(s)&&h&&vr({field:f,defParams:h,calcParams:y,map:Er,monthsValue:"minMonths"})}),[n,s]),o(nr,{className:e,title:t,...m,children:c("section",{className:u(ar,e),children:[c("div",{className:ir,children:[br({title:"Сумма кредита, ₽",step:500,min:y.minSum,max:y.maxSum,...f("moneyValue"),value:y.moneyValue}),hr({title:"Срок кредита, месяцев",min:y.minMonths,max:y.maxMonths,...f("monthsValue"),value:y.monthsValue}),Fr({...y,...r},f),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:u(lr,"@4xl:w-1/2"),children:[o(sr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(sr,{title:"Ставка",value:y?.rate,fractionDigits:2,postfix:"%"}),o(sr,{title:"Ежемесячный платёж",value:y.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),$e(a,{isVertical:!0}),ur(l)]})]})})})),Fr=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Ia,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Ia,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Ia,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Ia,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Or={moneyValue:"sum",monthsValue:"period",isInsurance:"isEnableInsurance",isPensionClient:"isEnablePensionClient",isStateEmployee:"isEnableStateEmployee",isSalaryClient:"isEnableSalaryClient",isAnnuity:"isAnnuity"},Vr=(e,t=!1)=>{const n=t?Lr(Or):Or;return Object.fromEntries(Object.entries(e??{}).map((([e,t])=>[n[e],t])))},Lr=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e]))),$r="calculator",jr=d((({field:e,params:t})=>{const n=l((t=>{e($r).onChange?.(t)}),[]);return o(zr,{...t?.calcData,defaultParams:Vr(e($r).value),onChange:n})})),qr=d((({field:e,input:t})=>{const{data:n}=Vi("CREDIT_IN_RSHB");return o(tl,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком / \n вкладчиком с долей участия более 20% уставного капитала руководителем, \n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t})})),Ur=d((({className:e,label:t,onChange:n,error:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(fr,{label:cn({label:t,errors:i?.errors}),onChange:e=>n&&n(e),...i}),fn(a)]}))),Wr=[{id:"rub",text:"Рубль"}],Hr=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("currency");return o(Ur,{label:"Валюта",orientation:"horizontal",items:Wr,value:n,onChange:e=>a?.(e),...aa(e("currency"),Qn.currency,t?.required)})})),Yr=d((({field:e,input:t})=>o(Dl,{label:"Дата доставки",...aa(e("deliveryDate"),Qn.deliveryDate,t?.required)}))),Kr=d((({field:e,input:t})=>o(Cn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...aa(e("dependents"),Qn.dependents,t?.required),...t}))),Gr=d((({field:e,input:t})=>o(Dl,{label:"Желаемая дата встречи",...aa(e("desiredMeetingDate"),Qn.meetingDay,t?.required)}))),Xr=d((({field:e,input:t})=>o(Da,{text:"Являюсь инвалидом",...aa(e("disablePeopleFlg"),Qn.disablePeopleFlg,t?.required)}))),Jr="dulIssueDateField",Zr=d((({field:e,input:t})=>o(Dl,{label:"Дата выдачи",...aa(e(Jr),Qn.dulIssueDateField,t?.required),disabled:t?.filledByEsia&&Na(e,Jr)}))),Qr="dulIssuedBy",es=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),i=l((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(Cn,{disabled:t?.filledByEsia&&Na(e,Qr),label:"Кем выдан",...t,...aa(e(Qr),Qn.dulIssuedBy,t?.required),onDaDataChange:i,daDataQueryPrefix:n})})),ts=d((({field:e,input:t})=>o(Cn,{disabled:t?.filledByEsia&&Na(e,"dulNumber"),label:"Номер документа",isInteger:!0,maxLength:6,...aa(e("dulNumber"),Qn.dulNumber,t?.required)}))),ns=d((({field:e,input:t})=>o(Cn,{disabled:t?.filledByEsia&&Na(e,"dulSerie"),label:"Серия документа",isInteger:!0,maxLength:4,...aa(e("dulSerie"),Qn.dulSerie,t?.required)}))),as="dulSubdivisionCode",is=d((({field:e,input:t})=>{const n=l((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(Cn,{disabled:t?.filledByEsia&&Na(e,as),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...aa(e(as),Qn.dulSubdivisionCode,t?.required),onDaDataChange:n})})),ls=d((({field:e,input:t})=>{const{data:n}=Vi("EDUCATION_LEVEL");return o(tl,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),rs=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(Cn,{label:"Электронная почта",...aa(e("email"),Qn.email,n),...a})})),ss=d((({field:e,input:t})=>{const{data:n}=Vi("ORGANIZATION_ACTIVITY_TYPE");return o(tl,{field:e,source:n,label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),os=d((({field:e,input:t})=>{const{data:n}=Vi("ORGANIZATION_KIND");return o(tl,{field:e,source:n,label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),cs=d((({field:e,input:t})=>{const{data:n}=Vi("EMPLOYMENT_INFO_UNITED");return o(tl,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),ds=d((({field:e,input:t})=>o(Cn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...aa(e("expenses"),Qn.expenses,t?.required),...t}))),ms=d((({field:e,input:t})=>o(Cn,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",maxLength:2,...aa(e("experience5Years"),Qn.experience5Years,t?.required),...t}))),us=d((({field:e})=>{const{value:t,onChange:n}=e("familyMembers"),a=e("familyStatus")?.value?.key,l="MARRIED"===a?2:1,r=Number(e("children")?.value),s=Number(e("dependents")?.value),c=l+r+s;return i((()=>{e?.("familyMembers")?.onChange?.(c)}),[a,r,s]),o(Cn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:t,onChange:e=>n?.(e)})})),hs=d((({field:e,input:t})=>{const{data:n}=Vi("MARITAL_STATUS");return o(tl,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),ps=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],gs=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],fs=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],xs=d((({field:e,input:t})=>o(_n,{label:"Способ получения ответа",options:fs,...aa(e("feedbackMethod"),Qn.feedbackMethod,t?.required)}))),ys=d((({field:e,input:t})=>o(Cn,{label:"ФИО",...aa(e("fullName"),Qn.fullName,t?.required),...t}))),bs=d((({field:e,input:t})=>o(Cn,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...aa(e("generalSeniority"),Qn.generalSeniority,t?.required),...t}))),vs=d((({field:e,input:t})=>{const{data:n}=Vi("HOUSE_TYPE");return o(tl,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Ns=d((({field:e,input:t})=>{const n=l((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(Cn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...aa(e("inn"),Qn.inn,t?.required),onDaDataChange:n})})),ws=d((({field:e})=>o(Da,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Cs=d((({field:e,input:t})=>o(Cn,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...aa(e("jobsNumber"),Qn.jobsNumber,t?.required),...t}))),Ss=d((({field:e,input:t})=>o(Cn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...aa(e("lastJobExperience"),Qn.lastJobExperience,t?.required),...t}))),ks=d((({field:e,input:t})=>o(Cn,{label:"Наименование юридического лица",...t,...aa(e("legalEntityName"),Qn.legalEntityName,t?.required)}))),Is=d((({field:e,input:t})=>o(Cn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...aa(e("legalForm"),Qn.legalForm,t?.required),...t}))),Ts="limitedBirthday",Bs=d((({field:e,input:t})=>o(Dl,{label:"Дата рождения",...aa(e(Ts),Qn.limitedBirthday,t?.required),disabled:t?.filledByEsia&&Na(e,Ts)}))),Ps=`${qt}/outservice`,Rs=[];async function Ds(){const e=await Pt(`${Ps}/outserviceregions`);return e&&Array.isArray(e)?e:Rs}const Ms=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:l}=ha("outServiceRegions",Ds),r=l?.find((e=>e.code===a))?.localities?.map((e=>({key:e,text:e})));return i((()=>{""!==a&&e?.("localities")?.onChange?.("")}),[a]),o(_n,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:r,...aa(e("localities"),Qn.localities,t?.required),isSearch:!0})})),_s=d((({field:e,input:t})=>o(Cn,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...aa(e("mandatoryPayments"),Qn.mandatoryPayments,t?.required),...t}))),As=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],Es=d((({field:e,input:t})=>o(Ur,{orientation:"horizontal",items:As,...aa(e("methodObtain"),Qn.methodObtain,t?.required)}))),zs="middleName",Fs=d((({field:e,input:t})=>o(Cn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&Na(e,zs),...aa(e(zs),Qn.middleName,t?.required),...t}))),Os=d((({field:e,input:t})=>o(Cn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&Na(e,t.name??""),...aa(e("name"),Qn.name,t?.required),...t}))),Vs=d((({value:e=!1,text:t,type:n="checkbox",onChange:a})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>a&&a(!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(_e,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Ls=d((({field:e})=>ra(e("acquiringType")?.value?.key)?o(Vs,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),$s=d((({field:e,input:t})=>{const{data:n}=Vi("ORGANIZATION_TYPE");return o(tl,{field:e,source:n,label:"Тип организации",fieldName:"organization",input:t})})),js=d((({field:e,input:t})=>{const n=l((t=>{e?.("inn")?.onChange?.(t.data?.inn),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(Cn,{label:"Наименование организации",...t,...aa(e("organizationName"),Qn.organizationName,t?.required),onDaDataChange:n})})),qs=d((({field:e,input:t})=>o(Cn,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...aa(e("otherIncome"),Qn.otherIncome,t?.required),...t}))),Us=d((({field:e,input:t})=>o(Dl,{label:"Дата регистрации по месту жительства",...aa(e("participantDateRegistration"),Qn.participantDateRegistration,t?.required)}))),Ws="partInBusiness",Hs=d((({field:e,input:t})=>{const n=l((t=>{e(Ws)?.onChange?.(String(Number(t)>100?100:Number(t)||""))}),[]);return o(Cn,{label:"Доля участия в бизнесе",placeholder:"в %",isInteger:!0,maxLength:3,...aa(e(Ws),Qn.partInBusiness,t?.required),...t,onChange:n})})),Ys=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(Cn,{...aa(e("partnerComments"),Qn.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...a})})),Ks=d((({field:e,input:t})=>{const{value:n,onChange:l}=e("paymentSystem"),[r]=El("programId"),[s,c]=a([]);return i((()=>{r&&(async()=>{const e=await(async e=>{const t=await Za("/public-data/creditProgramConditions","POST",{creditProgramId:e});return t?.paymentSystems?.map((e=>({id:e.type,text:e.name})))??[]})(r);c(e||[])})()}),[]),o(Ur,{label:"Платежная система",orientation:"horizontal",items:s,value:n,onChange:e=>l?.(e),...aa(e("paymentSystem"),Qn.paymentSystem,t?.required)})})),Gs=e=>"_"===e,Xs=e=>/\d/.test(e),Js=e=>Gs(e)||Xs(e),Zs=[..."+7 (___) ___-__-__"],Qs=Zs.findIndex(Gs),eo=Zs.map(((e,t)=>Js(e)?Zs.slice(0,t).filter(Js).length:-1));function to(e){const t=e.replace(/\D/g,""),n=Zs.map(((e,n)=>Xs(e)?e:t.charAt(eo[n])||e)),a=eo.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(Qs,a)):n).join("")}const no=d((({children:e,onChange:t,...n})=>{const a=l((e=>t&&t(to(e))),[t]),i=l((e=>{"+7 ("===e&&t&&t("")}),[]);return o(hn,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>i(e?.target?.value||""),children:e})})),ao=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(no,{"aria-label":t,label:cn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),fn(n)]}))),io=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(ao,{label:"Телефон",...aa(e(n),Qn.phone,t?.required),disabled:t?.filledByEsia&&Na(e,n),...t})})),lo=d((({field:e,input:t})=>{const{data:n}=Vi("POSITION");return o(tl,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),ro=d((({field:e})=>ra(e("acquiringType")?.value?.key)?o(Vs,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),so=d((({field:e,source:t})=>o(_n,{placeholder:"Выберите продукт",label:"Продукт",options:oo(t?.productList),...na(e("product"),Qn.product)}))),oo=e=>(e??[]).map((e=>({key:e,value:e}))),co=`${qt}/outservice/outserviceregions`,mo=`${qt}/regions`,uo=[];function ho(e=mo){const{data:t}=ha(e,Rt);return Array.isArray(t)?t:uo}const po=d((({field:e,input:t,params:n})=>{var a;const i=ho((a=n?.typeForm,"OUTSERVICE"===a?co:void 0));return o(_n,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>i?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[i]),...aa(e("region"),Qn.region,t?.required)})})),go=d((({field:e,input:t})=>{const n=ya(!0),a=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(_n,{label:"Регион",placeholder:"Выберите регион",options:a,...aa(e("region"),Qn.region,t?.required)})})),fo=d((({field:e,input:t})=>{const{data:n}=Vi("REGION_RF"),a=n?.map((({key:e,value:t})=>({key:e,text:t})));return o(_n,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:a,...aa(e("regionRetail"),Qn.regionRetail,t?.required)})})),xo=d((({field:e,input:t})=>{const n=e("wages")?.value,a=l((t=>{const a=Number(t)+Number(n||0);e("retirementIncome")?.onChange?.(t),e("incomeAverage")?.onChange?.(String(a))}),[n]);return o(Cn,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...aa(e("retirementIncome"),Qn.retirementIncome,t?.required),...t,onChange:a})})),yo=d((({field:e})=>{const t=e("secondaryPhone");return o(ao,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?na(t,Qn.secondaryPhone):t})})),bo=d((({field:e,input:t})=>o(_n,{label:"Направление обслуживания",placeholder:"Выберите направление",options:gs,...aa(e("serviceDirection"),Qn.serviceDirection,t?.required)}))),vo=["male","female"],No=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],wo=d((({field:e,input:t})=>{const n=e("name")?.value,{value:a,onChange:l}=e("sex");return i((()=>{n&&!a&&(async()=>{const e=await(async e=>{const t=await Za("/suggestions/suggest/fio","POST",{query:e,count:1,parts:["NAME"]}),n=t?.suggestions[0]?.data?.gender?.toLowerCase()||"";return vo.includes(n)?n:""})(n);e&&l?.(e)})()}),[]),o(Ur,{label:"Пол",orientation:"horizontal",items:No,...aa(e("sex"),Qn.sex,t?.required)})})),Co=d((({field:e,input:t})=>o(Da,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...aa(e("shareholderFlg"),Qn.shareholderFlg,t?.required)}))),So=d((({children:e,onChange:t,...n})=>{const a=l((e=>t&&t(gl(e,"___-___-___ __"))),[t]),i=l((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(hn,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>i(e?.target?.value||""),children:e})})),ko=d((({className:e,label:t,value:n,error:a,onChange:i,onBlur:l,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(So,{"aria-label":t,label:cn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:i,onBlur:l,placeholder:"___-___-___ __"}),fn(a)]}))),Io=d((({field:e,input:t})=>o(ko,{label:"СНИЛС",...aa(e("snils"),Qn.snils,t?.required),...t}))),To=d((({field:e,input:t})=>o(Cn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&Na(e,"surname"),...aa(e("surname"),Qn.surname,t?.required),...t}))),Bo=["От 1 мес","До 15 лет"],Po=d((({field:e})=>o(Xi,{title:"Срок, месяцев",items:Bo,min:1,max:180,...e("term")}))),Ro=d((({field:e,input:t})=>o(Cn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...aa(e("totalIncome"),Qn.totalIncome,t?.required),...t}))),Do=d((({field:e,input:t})=>o(_n,{label:"Тип обслуживания",options:ps,...aa(e("serviceType"),Qn.serviceType,t?.required)}))),Mo=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],_o=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return i((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(fr,{className:"whitespace-normal",orientation:"horizontal",items:Mo,value:t,onChange:e=>n&&n(e)})})})),Ao=d((({field:e,input:t})=>{const n=e("retirementIncome")?.value,a=l((t=>{const a=Number(t)+Number(n||0);e("wages")?.onChange?.(t),e("incomeAverage")?.onChange?.(String(a))}),[n]);return o(Cn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...aa(e("wages"),Qn.wages,t?.required),...t,onChange:a})}));const Eo={$ref:"/wcms-resources/outservice-productlist.json"},zo=(e,t)=>(n,a)=>{const i="ULTRASERVICE"===t?.typeForm||"PREMIUMSERVICE"===t?.typeForm,l={surname:o(To,{field:e,input:n}),name:o(Os,{field:e,input:n}),middleName:o(Fs,{field:e,input:n}),phone:o(io,{field:e,input:n}),organizationPhone:o(io,{field:e,input:n}),email:o(rs,{field:e,input:n}),fullName:o(ys,{field:e,input:n}),inn:o(Ns,{field:e,input:n}),legalForm:o(Is,{field:e,input:n}),organizationName:o(js,{field:e,input:n}),generalSeniority:o(bs,{field:e,input:n}),lastJobExperience:o(Ss,{field:e,input:n}),experience5Years:o(ms,{field:e,input:n}),jobsNumber:o(Cs,{field:e,input:n}),beginDate:o(Ml,{field:e,input:n}),addressFact:o(va,{field:e,input:n}),organizationAddress:o(wa,{field:e,input:n}),comment:o($l,{field:e,input:n}),addressBranch:o(ba,{field:e,input:n,isPremium:i}),sex:o(wo,{field:e,input:n}),birthday:o(_l,{field:e,input:n}),limitedBirthday:o(Bs,{field:e,input:n}),birthPlace:o(Al,{field:e,input:n}),desiredMeetingDate:o(Gr,{field:e,input:n}),product:o(so,{field:e,source:Eo}),localities:o(Ms,{field:e,input:n}),isClient:o(ws,{field:e}),partnerComments:o(Ys,{field:e,input:n}),collectionCount:o(Ll,{field:e,input:n}),acquiringType:o(la,{field:e,input:n}),onlineCheckout:o(Ls,{field:e}),posTerminal:o(ro,{field:e}),serviceType:o(Do,{field:e,input:n}),term:o(Po,{field:e}),amount:o(el,{field:e}),annualRevenue:o(al,{field:e,input:n}),vedTypes:o(_o,{field:e}),feedbackMethod:o(xs,{field:e,input:n}),serviceDirection:o(bo,{field:e,input:n}),bankEmpolee:o(rl,{field:e}),secondaryPhone:o(yo,{field:e}),consentToReceiveMaterials:o(er,{field:e,input:n}),processPersonalDataFlg:o(er,{field:e,input:n}),consentProviderFlg:o(er,{field:e,input:n}),consentOthersFlg:o(er,{field:e,input:n}),consentInformFlg:o(er,{field:e,input:n}),consentPfrFlg:o(er,{field:e,input:n}),applicationDate:o(Cn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),region:i?o(go,{field:e}):o(po,{field:e,input:n,params:t}),education:o(ls,{field:e,input:n}),housing:o(vs,{field:e,input:n}),employment:o(cs,{field:e,input:n}),organization:o($s,{field:e,input:n}),amountWorkers:o(nl,{field:e,input:n}),employerActivities:o(ss,{field:e,input:n}),employerOrganization:o(os,{field:e,input:n}),positionOrganization:o(lo,{field:e,input:n}),familyStatus:o(hs,{field:e,input:n}),children:o(Ol,{field:e,input:n}),familyMembers:o(us,{field:e,input:n}),dependents:o(Kr,{field:e,input:n}),totalIncome:o(Ro,{field:e,input:n}),expenses:o(ds,{field:e,input:n}),snils:o(Io,{field:e,input:n}),conscription:o(ql,{field:e,input:n}),armyIdFlg:o(il,{field:e,input:n}),dulSerie:o(ns,{field:e,input:n}),dulNumber:o(ts,{field:e,input:n}),dulIssueDateField:o(Zr,{field:e,input:n}),dulSubdivisionCode:o(is,{field:e,input:n}),dulIssuedBy:o(es,{field:e,input:n}),addressRegistration:o(wa,{field:e,input:n}),addressCourier:o(wa,{field:e,input:n}),participantDateRegistration:o(Us,{field:e,input:n}),retirementIncome:o(xo,{field:e,input:n}),otherIncome:o(qs,{field:e,input:n}),wages:o(Ao,{field:e,input:n}),mandatoryPayments:o(_s,{field:e,input:n}),disablePeopleFlg:o(Xr,{field:e,input:n}),bankruptcyFlg:o(sl,{field:e,input:n}),shareholderFlg:o(Co,{field:e,input:n}),legalEntityName:o(ks,{field:e,input:n}),creditInRshbCd:o(qr,{field:e,input:n}),bankEmployeeCode:o(ll,{field:e,input:n}),partInBusiness:o(Hs,{field:e,input:n}),regionRetail:o(fo,{field:e,input:n}),addressRetail:o(qi,{field:e,input:n}),addressMatch:o(Ma,{field:e,input:n}),paymentSystem:o(Ks,{field:e,input:n}),currency:o(Hr,{field:e,input:n}),cardCategory:o(zl,{field:e,input:n}),codeWord:o(Vl,{field:e,input:n}),confirmationIncome:o(jl,{field:e,input:n}),methodObtain:o(Es,{field:e,input:n}),deliveryDate:o(Yr,{field:e,input:n}),calculator:o(jr,{field:e,params:t})};return function({input:e,field:t}){const{condition:n}=e,{value:a}=t(n?.name||"");return!n||n?.values?.find((e=>e===(a?.key??a)))}({input:n,field:e})?o("div",{children:l[n?.name||""]},String(a)):null},Fo=e=>2===e?"@xl:grid-cols-2":"",Oo=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(_e,{size:"text-h6",children:e})}):null,Vo=d((function({responseType:e,typeForm:t}){const n="OK"===e,a=n?"ResponseOKIcon":"ResponseFailIcon",{close:i}=ue(),r=l((()=>{i()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Jl,{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:a,iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Kl,{type:"button",onClick:r,children:"Хорошо"})]})})})),Lo=e=>{const{open:t,close:n}=ue();return{open:(n,a={})=>t(o(Vo,{...e,...n}),a),close:n}},$o=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],jo=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:i,term:l,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:i,amount:l,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${ra(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${l}/Срок=${i}/Выручка=${r}`})(e):null,u={...d,...Uo(o),...qo(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},qo=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Uo=e=>e?{vedTypes:Object.fromEntries(Mo.map((({id:t})=>[t,t===e])))}:{},Wo={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:ia[0],serviceType:ps[0],feedbackMethod:fs[0],serviceDirection:gs[0],vedTypes:Mo[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},Ho=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(_e,{children:e}):null,t?o(ve,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(_e,{children:t.text})}):null]}))),Yo=(e,t)=>o(Kl,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Ko=(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(Ia,{...e}),o(Ho,{link:t})]}),fn(na(e,Hn).error)]}):o(Ho,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Yo(n)]}),Go={send:async function(e,t=!1){const{typeForm:n,region:a,phone:i="",email:l,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=`${qt}${g?"/lead":"/sendcorporatelead"}`,x={typeForm:n,...Ht(a,g),...Yt(l,g),...Ut(i),...Wt(s,"desiredMeetingDate"),...g?Wt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...Kt(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}}},Xo=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))||[],y=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Wo[e.name||""]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=ps[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[b,v]=a(""),w=Lo({typeForm:n}),C=l((async(e,t)=>{const n=Jo(x,e),a=$o(ta(n));if(!An(a(e)))return console.warn("validation fail");const i=jo({...e,...h}),l=await Go.send(i,"lead"===m)?"OK":"Fail";if(v(l),l&&w.open({responseType:l}),"OK"===l&&g){const e=en();Gt({aspectsAttributes:g,aspects:e,ev:t})}return l}),[]),[,{field:S,onSubmit:k,reset:I}]=nn(y,{onSubmit:C}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return i((()=>{"OK"===b&&(v(""),I())}),[b]),c(ln,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:k,children:[r.map(((e,t)=>c("div",{className:u(Fo(e.columns),"grid gap-x-m"),children:[Oo(e.title),(e?.inputs||[])?.map(zo(S,{typeForm:n}))]},`section-${t}`))),Ko(T?S("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]})})),Jo=(e,t)=>e.filter((e=>"secondaryPhone"===e?.name?Boolean(t.secondaryPhone):e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const a=t?.[e?.condition?.name??""];return n===(a?.key??a)})))),Zo=d((({inputs:e=[],typeForm:t="",field:n,key:a})=>{const i=e.every((e=>Boolean(n(e.name).value))),l=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(na(n(e?.name),Qn[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(ni,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:a})=>o(ai,{isUnfolded:a,className:"flex flex-col pl-2xl",children:e.map(zo(n,{typeForm:t}))}),renderFoldButton:Qo(c("div",{children:[o(Ia,{value:i,onChange:t=>{for(const a of e){const e=n(a.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},a),fn(l?"Отметьте все обязательные соглашения":"")]}))})})})),Qo=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",type:"button",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),ec=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:a,restInputs:i}=tc(n||[]);return a.length>2?c("div",{children:[i.map(zo(e,{typeForm:t})),o(Zo,{inputs:a,field:e})]}):(n||[])?.map(zo(e,{typeForm:t}))},tc=e=>({consentInputs:e?.filter((e=>Object.keys(Ul).includes(e.name||"")))||[],restInputs:e?.filter((e=>!Object.keys(Ul).includes(e.name||"")))||[]}),nc=[{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:"limitedBirthday",required:!0},{fieldType:"common",name:"phone",required:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{inputs:[{fieldType:"common",name:"processPersonalDataFlg",required:!0},{fieldType:"common",name:"consentProviderFlg",required:!0},{fieldType:"common",name:"consentOthersFlg",required:!0},{fieldType:"common",name:"consentInformFlg"},{fieldType:"common",name:"consentPfrFlg"}]}],ac={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",organizationPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:ia[0],serviceType:ps[0],feedbackMethod:fs[0],serviceDirection:gs[0],vedTypes:Mo[0],birthday:void 0,limitedBirthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,addressRegistration:"",participantDateRegistration:void 0,currency:"",paymentSystem:"",cardCategory:{key:"",text:""},codeWord:"",addressRetail:{key:"",text:""}},ic=(e,t,n="")=>{if(t){const e={...t};return e.limitedBirthday=new Date(e?.limitedBirthday||0),e}return{...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||ac[e.name||""]]))),typeForm:{key:n,text:""}}},lc=(e,t)=>o(Kl,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),rc=e=>Qa("/user-data/updateUserProfile","PUT",e),sc=e=>Qa("/user-data/updateUserTask","PUT",e),oc=(e,t)=>Boolean(e)&&"string"!=typeof e&&Boolean(e?.errorMessage.startsWith(`Too many request for phoneNumber [${t}]`)),cc={width:"118",height:"24"},dc={"bg-white":"color",transparent:"white"},mc={"bg-white":"text-primary-main",transparent:"text-white"},uc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:dc[e]},className:mc[e],width:n?.width,height:n?.height}),hc={"bg-white":"text-primary-text",transparent:"text-white"},pc=d((({className:e,href:t="/",logo:n,children:a,targetBlank:i,bgColor:l="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:i?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...ge(s),children:[uc(l,n?.image,cc),r?a??o("div",{className:"ml-s",children:o(_e,{font:"font-medium",color:hc[l],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),gc=d((({phoneNumber:e,close:t,sendCode:n,onClose:r})=>{const[s,d]=a(""),[m,u]=a(""),[h,p]=a(!1),g=l((async()=>{const e=await(a={captchaText:m},Qa("/sms/checkCaptcha","POST",a).then((e=>e.text())).then((e=>"ERROR"!==e)));var a;e?(n?.(),t?.()):p(e)}),[m]),f=l((()=>{(async()=>{d(URL.createObjectURL(await(e=>Qa(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return i(f,[]),o(Jl,{head:o(pc,{}),onClose:r,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:s}),o("div",{onClick:f,className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(hn,{className:"w-[300px]",onChange:u,value:m,placeholder:"Введите код с картинки"}),h?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(Kl,{onClick:t,version:"secondary",children:"Вернуться"}),o(Kl,{type:"submit",disabled:!m,onClick:g,version:"secondary",children:"Отправить"})]})]})})})),fc=d((({time:e,setTime:t,className:n})=>(i((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:xc(e)})))),xc=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,yc=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=a(0),u=s([]);i((()=>{u.current?.[d]?.focus()}),[d]);const h=l((n=>a=>{const{value:i}=a.currentTarget,l=i.slice(0,1);t(e.map(((e,t)=>t===n?l:e))),m(n+1)}),[e]),p=l((n=>a=>{const{key:i}=a;if("Backspace"===i&&!e[n]){const a=n>0?n-1:e.length-1,i=e.map(((e,t)=>t===a?"":e));t(i),m(a)}}),[e]),g=l((n=>{n.preventDefault();const a=n.clipboardData.getData("text"),i=e.map(((e,t)=>t<a.length?a[t]:e));t(i),m(i.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,a)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(a),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[a]=e},onFocus:e=>e.target.select(),onKeyDown:p(a),className:bc(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),bc=(e,t,n=!1)=>{const a=!t[e];return`w-20 h-24 text-5xl text-center p-lg m-2 border ${n&&a?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},vc=d((({isDisabled:e,onClick:t,text:n})=>o(Kl,{type:"button",onClick:t,disabled:e,children:o(_e,{font:"font-normal",children:n})}))),Nc=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},wc=({close:e,values:t})=>{const[n,s]=a(!1),[o,c]=a(""),[d,m]=a(!1),[u,h]=a(0),[p,g]=a(!1),[f,x]=a(0),y=l((()=>{s(!1),c("")}),[]),b=r((()=>0===u&&p),[u,p]),v=r((()=>f>2||!t.every(Boolean)||b),[t]),N=l((async()=>{try{g(!1),h(0),x(f+1),m(!0),await(async e=>Za("/sms/checkCode","POST",e).then(Nc))({smsText:t.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),y(),e&&e(t.join(""))}catch{m(!1),c(f>1?"Исчерпан лимит ввода смс-кода":"Неверный код"),s(!0)}}),[t,f]);return i((()=>{b?(s(!0),c("Код просрочен")):s(!1)}),[b]),{handleSubmit:N,hasError:n,errorText:o,isLoading:d,timeNextReq:u,isSubmitButtonDisabled:v,setTimeNextReq:h,setIsTimerStarted:g,setAttemps:x}},Cc=d((({close:e=dn,onClose:t=dn,title:n,description:r,__html:s,code:d=!0,codeLength:m=4,textButton:u="Далее",phoneNumber:h="+79999999999"})=>{const[p,g]=a(Array(m).fill("")),{handleSubmit:f,hasError:x,errorText:y,isLoading:b,timeNextReq:v,isSubmitButtonDisabled:N,setTimeNextReq:w,setIsTimerStarted:C,setAttemps:k}=wc({values:p,close:e}),I=l((async()=>{var e;await(e={phoneNumber:h,smsCodesSetName:{key:"AUTHENTICATION"}},Za("/sms/sendCode","POST",e).then((t=>!oc(t,e.phoneNumber))))?(k(0),w(180),C(!0)):T.open()}),[]),T=((e,t)=>{const{open:n,close:a,closeAll:i}=ue();return{open:()=>n(o(gc,{close:a,onClose:t,...e})),close:a,closeAll:i}})({phoneNumber:h,sendCode:I},t);return i((()=>{I()}),[]),o(Jl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl px-5xl py-0",children:c("div",{className:"flex flex-col gap-xl items-center rounded-md",children:[o(S,{className:"w-full",title:n,description:r,headlineVersion:"XS",isEmbedded:!0,as:"h6"}),d?o(yc,{values:p,setValues:g,errorText:y,hasError:x}):null,kc(v,w,I),o(De,{itemSize:"list-s",__html:s}),Sc(u,N,f),b?o(_a,{blur:!1}):null]})})})),Sc=(e,t,n)=>e?o(vc,{isDisabled:t,onClick:n,text:e}):null,kc=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o(fc,{className:"text-base ml-1",time:e,setTime:t})]}):o(ve,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Ic=()=>{const{open:e,close:t}=ue();return{open:(n,a)=>e(o(Cc,{onClose:t,close:n,...a})),close:t}},Tc={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},Bc={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},Pc=d((function({handleSubmit:e=dn,onClose:t=dn}){const[n,i]=a(""),[r,s]=a(!1),{open:d,close:m}=ue(),u=Se(),h=l((()=>{m(),e(n)}),[n]),p=l((e=>{i(e),"REFUSE"===e&&s(!0)}),[]),g=r?Bc:Tc;return o(Jl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:t,children:c("div",{className:"flex flex-col gap-xl items-center",children:[o("div",{role:"button",onClick:()=>Zl({open:d,close:m,id:Dc,convertToPng:u}),children:o(N,{className:"text-center text-balance",headingType:"h2",title:g.title})}),o(w,{align:"text-center",children:g.description}),o(fr,{className:"whitespace-normal",orientation:"horizontal",items:Rc,value:n,onChange:p}),o(Kl,{disabled:!n,type:"button",onClick:h,children:"Продолжить"})]})})})),Rc=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],Dc=2,Mc=e=>{const{open:t,close:n}=ue(),a=Ic(),i=(t,i)=>async l=>{n(),"SIGNED"===l&&t?a.open((t=>async n=>{try{t&&await rc({profile:{id:t,consentBkiFlg:!0,smsConsentBki:n}}),e()}catch(e){console.log(e)}})(i),_c(t)):e()};return{open:(n,a)=>t(o(Pc,{handleSubmit:i(n,a),onClose:e}))}},_c=e=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:jt(e),textButton:"Далее",__html:"<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>\n <ul><li>согласие на запрос информации в БКИ</li></ul>"}),Ac=d((function({handleClose:e}){const t=Xt(),n=l((async()=>{const e=await(n={redirectUri:t.href},Za("/esia/getLink","POST",n));var n;e&&t.assign(e.link)}),[]);return o(Jl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex items-center justify-around w-full",children:[c("ul",{className:"list-disc",children:[o("li",{children:"Вероятность одобрения выше"}),o("li",{children:"Без справок о доходах и трудоустройстве"}),o("li",{children:"С защитой Ваших данных"})]}),o(ne,{image:{icon:"GosUslugiIcon",iconVersion:"normal"},height:"70"})]}),c("div",{className:"flex items-center justify-between w-full m-0",children:[o(Kl,{type:"button",onClick:n,children:"Заполнить через Госуслуги"}),o(Kl,{type:"button",version:"secondary",onClick:e,children:"Пропустить"})]})]})})})),Ec={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},zc={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK"},Fc={incomeAverage:"INCOME_AVERAGE",mandatoryPayments:"MANDATORY_PAYMENTS",additionalIncome:"ADDITIONAL_INCOME",otherIncome:"OTHER_INCOME",otherPayments:"OTHER_PAYMENTS",rentalIncome:"RENTAL_INCOME",wages:"WAGES",retirementIncome:"RETIREMENT_INCOME"},Oc=e=>Object.entries(e).reduce(((e,[t,n])=>t in Ec?[...e,{contactTypeCd:{key:Ec[t]},value:n}]:e),[]),Vc=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in zc){const a=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:zc[t]},...a}]}return e}),[]),Lc=e=>Object.entries(e).reduce(((e,[t,n])=>t in Fc?[...e,{incomeTypeCd:{key:Fc[t]},value:Number(n||0)}]:e),[]),$c=({inputs:e,programId:t,nextStepLink:n,saveForm:i})=>{const[r,s]=a(""),[,c]=El("taskId"),[,d]=El("profileId"),[,m]=El("participantId"),[,u]=El("programId"),h=(e=>{const{open:t,close:n}=ue(),a=Xt(),i=l((()=>{n(),a.assign(e)}),[]);return{open:(e={})=>t(o(Ac,{handleClose:i}),e),close:n}})(n),p=Mc(h.open),g=Ic(),f=l((({participantId:e,taskId:t,profileId:n,programId:a})=>{m(e),c(t),d(n),u(a)}),[]);return{handleSubmit:l((async n=>{const a=$o(ta(e));if(!An(a(n)))return console.warn("validation fail");try{const e=await(l={profile:{phone:jt(n.phone)}},Za("/public-data/createUserProfile","POST",l).then((e=>e?.profile?.id||null)));if(e&&n?.phone){const a=async()=>{try{await jc({programId:t,profileId:e,formData:n,saveUserData:f,saveForm:i}),g.close(),p.open(n.phone,e)}catch{s("Fail")}},l=Object.keys(Ul).filter((e=>n[e])).map((e=>Ul[e]?.text));g.open(a,qc(n?.phone,l))}}catch{s("Fail")}var l}),[]),responseStatus:r}},jc=async({programId:e,profileId:t,formData:n,saveUserData:a,saveForm:i})=>{const l=Wc(n);await rc(((e,t)=>{const{name:n="",surname:a="",middleName:i="",limitedBirthday:l="",phone:r="",email:s="",processPersonalDataFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:a,midname:i,birthDate:l&&$t(l,!0),email:s,phone:jt(r),processPersonalDataFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(t,l));const{taskId:r,participantId:s}=await(async e=>await Za("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await sc((({participantId:e,taskId:t,profileId:n,formData:a})=>{const{name:i,surname:l,middleName:r,limitedBirthday:s,phone:o,email:c}=a;return{sendToBank:!0,taskKind:"SHORT",task:{taskSource:Xt().origin,id:t,participants:[{birthDate:s&&$t(s,!0),id:e,midname:r,name:i,surname:l,profile:{id:n},participantContacts:Oc({phone:o&&jt(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}]}}})({participantId:s,taskId:r,profileId:t,formData:l}))}catch(e){console.log(e)}a({participantId:s,taskId:r,profileId:t,programId:e}),i(n)},qc=(e,t)=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:jt(e),textButton:"Далее",__html:`<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${Uc(t)}`}),Uc=e=>`<ul>${e?.map((e=>"<li>"+e+"</li>")).join("")}</ul>`,Wc=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Hc=e=>{const{profile:t,addInfo:n,document:a,addressRegistration:i,addressFact:l}=e;return{name:t?.name,surname:t?.surname,middleName:t?.midname,limitedBirthday:t?.birthDate,phone:to(t?.phone),email:t?.email,dulIssueDateField:a?.dulIssueDate,dulIssuedBy:a?.dulIssuedBy,dulNumber:a?.dulNumber,dulSerie:a?.dulSerie,dulSubdivisionCode:a?.dulSubdivisionCode,snils:n?.snils,birthPlace:n?.birthPlace,addressRegistration:Yc(i),addressFact:Yc(l),esiaAccountTypeCd:t?.esiaAccountType}},Yc=e=>{const{postcode:t,region:n,regionCode:a,locality:i,city:l,street:r,house:s,building:o,block:c,apartment:d}=e,m=[t,n,i||l,r?`ул ${r}`:void 0,s?`д ${s}`:void 0,c?`к ${c}`:void 0,o?`стр ${o}`:void 0,d?`кв ${d}`:void 0].reduce(((e,t)=>t?e?`${e}, ${t}`:t:e),"");return{...e,regionCode:a?.key,fullAddress:m}},Kc=e=>{const t=Xt(),[n,r]=a(!1),[s]=El("profileId"),[o,c]=El("leadForm"),d=new URLSearchParams(decodeURIComponent(globalThis.location?.search)),m=d.get("code"),u=d.get("state"),h=l((async()=>{if(s&&m&&u){const a=await(n={profileId:s,code:m,state:u,redirectUri:t.href},Za("/esia/updateProfileEsia","POST",n));a&&c({...o,...Hc(a)}),t.assign(e)}var n}),[]);return i((()=>{m?(r(!0),h()):(sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken"))}),[]),{isLoading:n}},Gc=d((({className:e,title:t,programId:n="",nextStepLink:l="/credit-lead",button:r,...s})=>{const d=nc?.flatMap((e=>e?.inputs))||[],[m,h]=a(""),{isLoading:p}=Kc(l),[g,f]=El("leadForm"),x=ic(d,g),{handleSubmit:y,responseStatus:b}=$c({inputs:d,programId:n,nextStepLink:l,saveForm:f});if(b){Lo({responseType:b}).open()}const[,{field:v,onSubmit:N,reset:w}]=nn(x,{onSubmit:y});return i((()=>{"OK"===m&&(h(""),w())}),[m]),o(ln,{className:u("container space-y-m",e),title:t,...s,children:c("form",{onSubmit:N,className:"space-y-m relative",children:[p?o(_a,{blur:!1}):null,nc.map(((e,t)=>c("div",{className:u(Fo(e.columns),"grid gap-x-m"),children:[Oo(e.title),ec({field:v,inputs:e?.inputs})]},`section-${t}`))),lc(r)]})})})),Xc=d((({title:e,description:t})=>{const n=Se();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(S,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Jc=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Zc=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Qc=10;function ed(e,{sensitivity:t,rootRef:n}={}){const a=s(null),l=r((()=>({threshold:td(t),root:n?.current})),[t,n?.current]);return i((()=>{if(!a.current)return;const t=new IntersectionObserver(e,l);return t.observe(a.current),()=>{t.disconnect()}}),[e,l]),a}function td(e=0){const t=Math.round(e*Qc);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const nd=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:i,children:r,onIntersection:s})=>{const c=ed(l((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),i);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:c,role:"listitem",children:r})})),ad=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],id=d((({className:e,itemClassName:t,containerRef:n,activeIndex:a,visibleItemCount:i=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},y=s([]),b=l(((e,t)=>{const n=[...y.current||[]];n[e]=t,y.current=n,g&&g(n),f&&f(rd(n))}),[g,f]),v=i>0?r*Number(i)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?ld(c,v):{},...N?Zc(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:C,ref:n,role:"list",children:(S=(e,n)=>o(nd,{className:u(m,i?ad[i-1]:"",{"h-full":N},t),style:w?ld(c/4):{},activeIndex:a,idx:n,observerOptions:x,onIntersection:b,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),ld=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),rd=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),sd={"horizontal-list":"w-6","vertical-list":"h-6"},od=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(a,i)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",i===e?sd[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(i)},String(i)),cd=({activeIndex:e,onClick:t})=>(n,a)=>{const i=a===e,l=i?"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=i?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=i?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"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",l),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(a))},dd=e=>t=>e.scrollWidth/t,md=e=>(t,n)=>{e.scrollBy({left:n*dd(e)(t),behavior:"smooth"})},ud=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[i,r]=a([]),o=l((e=>{r((t=>{return(n=t)===(a=e)||Boolean(n&&a&&n?.length===a?.length&&n.every(((e,t)=>e===a[t])))?t:e;var n,a})),t&&t(e)}),[t]),[c,d]=i.length?[kr()(i),Cr()(i)]:[-1,-1],m=c>0,u=d<e-1,h=l((()=>{var t;n.current&&(m?md(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=l((()=>{n.current&&(u?md(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=l(((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}]},hd={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},pd=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:a="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Se(),[h,p]=ud({itemCount:s.length}),g=gd(Boolean(s?.length));i((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=l((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(id,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(cd({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",hd[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(od({activeIndex:t,onClick:f,listType:a}))}):null})),gd=(e=!1)=>({behavior:e?"auto":"smooth"}),fd=d((({className:e,disabled:t,...n})=>o(ve,{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"})}))),xd=d((e=>o(fd,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),yd=d((e=>o(fd,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),bd="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",vd=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:a,isBottom:i})=>{const{canScrollLeft:l,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=a&&!i;return c("div",{className:e,children:[n?Nd(t):null,l?o(xd,{className:u(wd(i),m?"left-1":"left-0"),onClick:s}):null,r?o(yd,{className:u(wd(i),m?"right-1":"right-0"),onClick:d}):null]})})),Nd=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(bd,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(bd,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),wd=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Cd=d((({className:e,version:t,gap:n=14,padding:a=16,visibleItemCount:i=1,listType:l="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const y=Array.isArray(g)?g.length:0,[b,v]=ud({itemCount:y,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===l?"relative h-full":""),children:[o(id,{containerRef:b,activeIndex:N,visibleItemCount:i,gap:n,padding:a,listType:l,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(vd,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(pd,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:y,listType:l,version:t,navButtons:x,containerRef:b,containerScroll:v})]})})),Sd=({blocksToRender:e,...t})=>o(Cd,{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",Jc(!0)),children:T(e,t)},String(n))})}),kd=e=>e%2!=0,Id=d((({textNode:e,iconNode:t,tag:n,onClick:a,justifyContent:i="between",className:l,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===i?"justify-between":"justify-center",l),onClick:a,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Td=d((({className:e="",label:t,icon:n,dataTheme:a="pc",disabled:i=!1,onClick:l})=>o(Id,{tag:"button",onClick:l,disabled:i,"data-theme":a,justifyContent:"center",role:"button",className:u("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",i?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(_e,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Bd=({isUnfolded:e,onToggle:t})=>o(Td,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Pd=["ArrowDownIcon","ArrowUpIcon"],Rd="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Dd=({topItemsCount:e=0,label:t="",block:n,blocksToRender:a=[],...i})=>{const[l,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]];return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(Rd),children:[P(l,{...i.options,parent:n}),kd(l.length)?o(Vt,{className:"col-span-6",...i}):null]}),o(ni,{renderFoldableSection:({isUnfolded:e})=>c(ai,{className:u(Rd),isUnfolded:e,children:[P(r,{...i.options,parent:n}),kd(r.length)?o(Vt,{className:"col-span-6",...i}):null]}),renderFoldButton:({isUnfolded:n,onToggle:a})=>o(Td,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:Pd[Number(n)],dataTheme:i.options?.page?.colorPalette,onClick:a})})]})},Md=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[_d(n,t),Dd({...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[_d(n,t),Sd({...a,blocksToRender:t})]});default:return null}})),_d=(e,t)=>e&&!t.length?o(Xc,{...e}):null,Ad=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),Ed=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(Vs,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const i=e?.includes(n);t(a?i?(e||[]).filter((e=>e!==n)):[...e||[],n]:i?[]:[n])})(n.value),type:a?"checkbox":"radio"},n.value))))),zd=d((({children:e,filtrationSchema:t,resetButton:n,field:a,reset:i})=>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,Ad(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Fd(a)).filter(Boolean))]}),n?o("div",{children:o(Kl,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:i,children:n?.text})}):null]}))),Fd=e=>([t,n])=>{const a=n?.type;return"array"===a?Od(t,e)(n):null},Od=(e,t)=>n=>{const a=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(_e,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Ed,{items:a,multiple:!n?.single,...t(e)})]},e)};function Vd(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Ld=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,$d=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>Ld(t[e])||Ld(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Ld(t[e])||Ld(n[e])||jd(t[e])<=jd(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>Ld(t[e])||Ld(n[e])||jd(t[e]?.min)>=jd(n[e]?.min)&&jd(t[e]?.min)<=jd(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>Ld(t[e])||Ld(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Ld(t[e])||Ld(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),jd=e=>Number(e||0),qd=(e,{block:t,page:n,normalize:a=tn})=>{const i=t?.blocks||[],[l,{field:s,reset:o,update:c}]=nn(e),d=r((()=>Vd(i,i.map((e=>At(e.content,n?.fallback))))),[i,n?.fallback]),m=l===e?i:((e,t)=>(n=tn)=>e?.filter((([,e])=>$d(t,n(e)||{}))).map((([e])=>e)))(d,l)(a);return[l,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Ud={},Wd={},Hd=Ft((({className:e,filtrationSchema:t=Ud,consumerField:n={},resetButton:a,...i})=>{const[,{blocksToRender:l},{field:r,reset:s}]=qd(Wd,{block:i.block,page:i.options?.page}),d=o(Pn,{className:"w-64",label:n?.title,options:Yd(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Yd(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...i,children:[o(zd,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Kl,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(Md,{blocksToRender:l,...i})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Yd=e=>Vd(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Kd=(e=!1)=>e?"text-left":"text-center",Gd={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Xd=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:a,icon:i,...l})=>{const r=String(a?.width||t);return i?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",Gd[n],e),children:o(W,{...l,width:"54%",height:"54%",name:i})}):null})),Jd=d((({className:e="",title:t,benefitList:n,...a})=>{const i=Se();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(N,{headingType:"h3",as:"h2",className:Kd(i),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(Zd)}):null]})})),Zd=({label:e,description:t,__html:n,icon:a,isDotted:i=!1,iconBgVersion:l},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[a?.icon?o(Xd,{className:"shrink-0",iconBgVersion:l,...a}):null,a?.src?o(ne,{className:"shrink-0",image:a}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(_e,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(De,{__html:n,isDotted:i,itemSize:"list-s"}):null]}):null]},String(r)),Qd=e=>({icon:t,title:n,description:a},i)=>c("div",{className:u("flex flex-col gap-1","items-center",{"justify-center":!a&&!n}),children:[n?o(_e,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,a?o(_e,{size:"text-h6",font:"font-normal",align:e,children:a}):null]},String(i)),em=(e,t,n)=>o("div",{className:`grid gap-2xs ${tm(t)}`,children:e.map(Qd(n))}),tm=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},nm=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:a="4",subtitle:i,title:l,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(S,{defaultPadding:"",title:l,description:i,headlineVersion:"M"}),e?.length?em(e,a,t):null]}))),am={start:"justify-start",center:"justify-center",end:"justify-end"},im=d((({buttons:e,className:t="",align:n,...a})=>{const i=n&&u("flex",am[n]);return o(g,{className:u("!bg-transparent",i,t),defaultPadding:"p-0",...a,children:$e(e)})})),lm=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:a=2,depositeName:i,isShowDepositeName:l,color:r="text-secondary-text"})=>c("div",{children:[o(_e,{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:We(a,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),i&&l?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:i}):null]})]}))),rm=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(_e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),sm=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:a=2,color:i="text-secondary-text",children:l,...r})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(lm,{title:e,rate:t,unit:n,fractionDigits:a,color:i,...r})}),o(sr,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:i,...r}),l]}):o(rm,{title:e,...r}),om={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},cm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},dm=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[i,l]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:i=om.prefMonthsNum,prefTravelBonusRate:l=om.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(l*t)+Math.round(r*n),a);return[c,c*i+Math.min(Math.round(s*t)+Math.round(o*n),a)*(12-i)]})(t||cm,n,a);return{...t,...e,monthBonus:i,yearBonus:l}},mm=Ft((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,...l})=>{const[r,{field:s}]=nn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=dm(r,n);return o(nr,{className:e,title:t,...l,children:c("section",{className:u(ar,e),children:[c("div",{className:ir,children:[br({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),br({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?sm({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:lr,children:[f>=0?o(sr,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,$e(a,{isVertical:!0}),ur(i)]})]})})})),um=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,hm=e=>xr({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),pm=" (c капитализацией)",gm=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:i=[],isCapitalization:l=!1})=>c("div",{className:lr,children:[o(sr,{title:`Доход в конце срока${l?pm:""}`,value:e,postfix:n,prefix:"+"}),o(sr,{title:`Сумма в конце срока${l?pm:""}`,value:t,postfix:n}),$e(a,{isVertical:!0}),i?.map(ur)]}),fm={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const xm={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},ym=(e,t)=>{const{daysValue:n,moneyValue:a,isPartialWithdrawal:i,isReplenished:l,isMonthlyInterestPayment:r}=e,s=l||i,o=n<90||n>730,c=function(e){const t=e?.rateType?fm[e?.rateType]:"",{data:n}=ha(t?`${qt}/depositrates/${t}`:null,Rt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&bm(s,e)&&Pr(a,["minSum","maxSum"],e)&&Pr(n,["minDays","maxDays"],e)))||xm,{rate:m}=d,u=vm(m,e),h=a+u,p=c||[xm];return{...d,...Br(["minSum","maxSum"],p),...Br(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},bm=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,vm=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,daysValue:i}=t;return n?Math.round(a*Math.pow((1200+e)/1200,i/30)-a):Math.round(a*e*i/365/100)},Nm=Ft((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:i,isShowDepositeName:l,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=nn({moneyValue:dr(r,1e5),daysValue:mr(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=ym(m,s),{income:g,finalSum:f,rate:x,depositeName:y}=p;return o(nr,{className:e,title:t,...d,children:c("section",{className:u(ar,e),children:[c("div",{className:ir,children:[br({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(b={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(Xi,{items:[`От ${um(b.min||0)}`,`До ${um(b.max||0)}`],step:1,...b})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[wm(p,h),hm({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),sm({rate:x,depositeName:y,isShowDepositeName:l}),gm({income:g,finalSum:f,buttons:n,footnotes:[a,i]})]})});var b})),wm=(e,t)=>c("div",{className:"space-y-s",children:[o(_e,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Ia,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Ia,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Cm=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,a]=t[n-1],[i,l]=t[n];a>=i?t.splice(n-1,2,[e,Math.max(a,l)]):n++}return t},Sm={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},km=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.[0]?Bm(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=>[Tm({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Tm({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Tm({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Tm({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,Pr(a,["minSum","maxSum"],t),Pr(i||l,["minMonths","maxMonths"],t)].every(Boolean)))||Sm,{rate:u}=m,h=Im(u,e),p=a+h,g=t||[Sm];return{...m,...Br(["minSum","maxSum"],g),...Br(["minMonths","maxMonths"],g),availableMonths:Cm(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((a,i)=>t>=e?e+i*n:e-i*n)))(e,t))),...e,defaultMonth:l,income:h,finalSum:p}},Im=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,monthsValue:i}=t;return n?Math.round(a*Math.pow((1200+e)/1200,i)-a):Math.round(a*e*30*i/365/100)},Tm=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],Bm=(e,t)=>e+Math.round((t-e)/2),Pm=(e="rub")=>"rub"===e,Rm=(e,t)=>{const{minMonths:n,maxMonths:a}=Br(["minMonths","maxMonths"],Am(t,e?.currency)),i=e.monthsValue||Math.round((n+a)/2);return{monthsValue:Wi(i,n,a)}},Dm=(e,t)=>{const{minSum:n,maxSum:a}=Br(["minSum","maxSum"],Am(t,e?.currency)),i=e.moneyValue||n;return{moneyValue:Wi(i,n,a)}},Mm=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),_m=e=>{const t=Pm(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Am=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Em=(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?xr({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?xr({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),zm(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?hm({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(a={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},xr({...a,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),zm(e.isShowNewClient),e.isShowNewClient?o(Ia,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},zm=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Fm={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Om={text:"₽",key:"rub"},Vm=Ft((({className:e,title:t,calcSource:n,buttons:a=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[Om],g=l((e=>t=>e?{...t,..._m(t),...Dm(t,e),...Rm(t,e),...Mm(t,e)}:t)(h),[h]),[f,{field:x}]=nn({moneyValue:dr(d,2e4),monthsValue:mr(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:Om},{normalize:g}),y=x?.("currency")?.value??Om,b=x?.("isNewClient")?.value,v=Am(h,y),N=km(f,v,s),{rate:w,income:C,finalSum:S,type:k=""}=N,I=l((()=>{vr({field:x,defParams:or(v,b),calcParams:N,monthsValue:"minMonths",map:Fm})}),[x,h]);i((()=>{!Ar(d)&&v&&I()}),[d,h]);const T=w===or(v,b)?.rate;return o(nr,{className:e,title:t,...m,children:c("section",{className:u(ar,e),children:[c("div",{className:ir,children:[c("div",{className:"flex gap-m",children:[br({className:"w-full",title:`Сумма, ${y?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:y?.text,step:Lm(y?.key)}),h&&h?.length>1?o(_n,{label:"Валюта",options:p,...x("currency")}):null]}),hr({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),Em({...N,...s},x)]}),sm({rate:w,children:jm(I,T)}),gm({income:C,finalSum:S,buttons:[...a,$m(n?.buttons,k)],footnotes:[r],postfix:y?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Lm=(e="")=>Pm(e)?1e3:100,$m=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},jm=(e,t=!1)=>t?null:o(Kl,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),qm=e=>Um({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Um({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Um=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],Wm={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Hm=(e,t,n)=>{const{moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}=e,s=t?.rateRows||[Wm],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>qm({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=Tr(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=Tr(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r})=>e?.find((e=>qm({row:e,userInputParams:t,paramsViewSettings:n})&&Pr(a+r,["minSum","maxSum"],e)&&Pr(l,["minSumOld","maxSumOld"],e)&&Pr(r,["minSumExtra","maxSumExtra"],e)&&Pr(i,["minMonths","maxMonths"],e)))||Wm)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}),{rate:p}=h,g=Nr(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r,monthlyPayment:g,benefit:f}},Ym=Ft((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,paramsViewSettings:l,...r})=>{const[s,{field:d}]=nn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Hm(s,n,l),h=yr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(nr,{className:e,title:t,...r,children:c("section",{className:u(ar,e),children:[c("div",{className:ir,children:[br({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),br({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),hr({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Km({...m,...l},d),m.isExtraMoney?br({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(lr,"@4xl:w-1/2"),children:[o(sr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(sr,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(sr,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(sr,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),$e(a,{isVertical:!0}),ur(i)]})]})})})),Km=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Ia,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Ia,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Ia,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Gm=d((e=>{const{onChange:t,min:n,max:a,defaultValue:i="0",fractionDigits:r=0,...s}=e,c=Ui(e,{normalize:(e=i)=>n&&a?String(Wi(Number(Xm(e)),n,a)):Xm(e),format:We(r)}),d=l((e=>t&&t(Xm(e))),[t]);return o(hn,{onChange:d,...s,...c})})),Xm=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Jm=d((e=>o(Gm,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(_e,{size:"text-xl",font:"font-light",children:"₽"})})}))),Zm={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Qm={amount:1500},eu=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:r="private",...s})=>{const[{amount:d},{field:m}]=nn(Qm),[h,p]=a(!1);return i((()=>{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:Zm[r],children:[o(Jm,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),l?.text?o(Kl,{className:"w-full mt-lg",type:"submit",disabled:h,children:l.text}):null]})]})})),tu=({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})]}),nu="relative h-full",au={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},iu=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:i}=a.block||{},l=i?.some(su),r=n?{defaultPadding:"p-6xl pb-m"}:{};return R({...a,renderProps:(n,a,i)=>c("div",{className:lu(n,{someCardsHighlighted:l}),children:[T(n,a,{className:ru(n,{someCardsHighlighted:l,showBorder:!e,cardSize:t}),...r,blockIndex:i}),su(n)?tu({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},lu=(e,{someCardsHighlighted:t})=>u(nu,t&&(su(e)?"pt-3xl":"pt-3xl sm:pt-16")),ru=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(nu,"min-w-80",au[a],t&&(su(e)?"pt-3xl sm:pt-16":"pt-3xl"),Jc(n),n&&"h-full"),su=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ou=Ft((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:a=!0,isGap:i=!0,cardSize:l="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(Cd,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:i?16:0,padding:0,arrowsPadded:a,navButtons:r?cu(s?.block?.blocks):[],hasBlur:!0,children:iu({noCardBorder:n,cardSize:l,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),cu=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],du="z-10 border border-solid w-full h-full",mu=u(du,"absolute hidden @xl:block border-transparent"),uu=d((({className:e,title:t,description:n,button:a,...i})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...i,children:c("div",{className:"relative h-full",children:[o("div",{className:u(mu,"top-9 right-12 bg-green-dark")}),o("div",{className:u(mu,"top-6 right-8 bg-green")}),o("div",{className:u(mu,"top-3 right-4 bg-green-light")}),c("div",{className:u(du,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),$e([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),hu={black:"bg-black",white:"bg-white"},pu=d((({className:e="",title:t,description:n,image:a,price:i,button:l,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(Te,{className:"h-full",padding:d,title:o(S,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:a?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:a}):null,buttons:$e([l],{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(_e,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(gu)]}):null,i?c(_e,{size:"text-h3",align:"text-left",children:[i," ₽"]}):null]})}))),gu=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${hu[e]}`},String(t)),fu=d((({icon:e,...t})=>{const n=he(),{text:a,href:i,target:l,onClick:r}=n(t);return a?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:i,target:l,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:a}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:a})]})})}):null})),xu=d((({className:e,additionalDescription:t,description:n,links:a,title:i,...l})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...l,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(S,{isEmbedded:!0,title:i,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?yu(a):null]})}))),yu=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(fu,{...e},String(t))))}),bu=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),vu=d((({className:e="",href:t,target:n,onClick:a,data:i,children:l})=>{const r=he()({href:t,target:n,onClick:a});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...ge(i),children:l})})),Nu=[{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"}}],wu=d((({className:e="",media:t,showButtonText:n,stretched:i,version:l="white",children:r})=>{if(!t?.length)return null;const[s,d]=a(),m=t?.map((e=>{const{href:t,icon:a,text:i}=e,{iconMapped:r}=(e=>Nu.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Le(a)?a:r,c=n?{text:i}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&i&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??l}})),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},Cu(i));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:Su(s??!1,i??!1,n),buttonClassName:h})}),r?o(_e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Cu=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",Su=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),ku=d((({className:e,padding:t,description:n,additionalDescription:a,href:i,icon:l,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:y=true,isImageSecondary:b=!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(vu,{href:i,target:m,className:"h-full",data:bu(v),children:c(Te,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ze(Le(l)?o(ne,{image:l}):null,x),buttons:d.length?o(wu,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:y,isImageSecondary:b,imageAlign:"center",children:[o(Ve,{benefits:f}),s?o(De,{__html:s,isDotted:r,itemSize:"list-s"}):null,Iu(a,p)]})})}))),Iu=(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,Tu=(e,t)=>{const{title:n,description:a,buttons:i}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(_e,{size:"text-m",color:"text-secondary-text",children:n})}):null,a?o("div",{className:"mt-2xs",children:o(_e,{size:"text-xl",color:"text-primary-text",children:a})}):null,i?.length?o("div",{className:"text-primary-main",children:$e(i)}):null]},String(t))},Bu=d((({className:e="",title:t,align:n="text-center",icon:l,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:h,...p})=>{const f=d.map(Tu),[x,y]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[b,v]=a(!1);return i((()=>me.subscribe("fold",(e=>{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:[Le(l)?o("div",{className:"self-center",children:o(ne,{image:l})}):null,t?o(N,{className:u("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(ve,{className:"w-full mt-m mb-lg",...r}):null,y.length?o(ni,{renderFoldableSection:()=>c("div",{children:[x,o(ai,{isUnfolded:b,children:y})]}),renderFoldButton:d.length>=s?Pu(m?.parent,h,b):null}):o("div",{children:x})]})})),Pu=(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&&me.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?ge(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Ru=d((({className:e,contacts:t,info:n,version:a="secondary",...i})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:a,...i,children:[n?.length?Du(n):null,t?.length?Du(t):null]}))),Du=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>Mu({column:e,i:t})))}),Mu=({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:a},i)=>c("div",{children:[o(S,{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(a?.text)}),children:$e([a])})]},String(i))))},`col-${String(t)}`):null,_u=()=>{const e=globalThis.sessionStorage?.getItem("refreshToken"),t=globalThis.sessionStorage?.getItem("accessToken"),n=globalThis.localStorage.getItem("taskId"),a=Xt();if(!t||!e||!n)return a.assign("/"),()=>{};const i=async()=>{const n=await Qa("/auth/refresh","POST",{refresh_token:e,access_token:t});if(401==n?.status&&a.assign("/"),n?.ok){const e=await n.json();globalThis.sessionStorage.setItem("refreshToken",e.refresh_token),globalThis.sessionStorage.setItem("accessToken",e.access_token)}};i();const l=setInterval(i,24e4);return()=>clearInterval(l)},Au=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]})]}))),Eu=d((({step:e=1,totalSteps:t=6,stepsTitles:n=[]})=>{const a=r((()=>(e+1)/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 mr-s",children:["Шаг ",e+1," из ",t,"."]}),n[e]||null,o(Au,{step:a,showPercentage:!1})]})})}));var zu;!function(e){e.process="IN_PROCESS",e.ok="APPROVED",e.fail="CANCELLED",e.rework="REVISION"}(zu||(zu={}));const Fu=e=>Za("/user-data/getTaskStatus","POST",e),Ou=e=>Qa("/user-data/sendSignalToProcess","POST",e),Vu=(e,t)=>{const n=s(null),a=l((()=>n.current&&clearInterval(n.current)),[]);return i((()=>(n.current=setInterval((()=>e(a)),t),a)),[e,t]),a},Lu=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black",link:a})=>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})}),c("div",{className:"",children:[o(De,{__html:e}),a?.text?o(ve,{className:"text-primary-main",children:a.text}):null]})]}))),$u=d((({interval:e=0,intervalExpireAction:t=(()=>null),title:n,__html:i})=>{const[l,r]=a(e),s=100-(e-l)/e*100;return c("div",{children:[n?o(S,{title:n,headlineVersion:"S"}):null,c("div",{className:"flex justify-center items-center flex-col",children:[c("div",{className:u("relative flex items-center justify-center w-24 h-24 rounded-full bg-gray text-transparent mb-5"),children:[o("div",{className:"absolute inset-0 rounded-full",style:{background:`conic-gradient(rgb(66, 171, 68) ${s}%, rgb(125, 126, 127) 0deg)`}}),o("div",{className:"z-10 flex items-center justify-center px-4 py-2 rounded-full w-20 h-20 bg-white text-primary-text text-m",children:o(fc,{interval:e,time:l,setTime:e=>{0===e&&t(),r(e)}})})]}),i?o(De,{__html:i}):null]})]})})),ju=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:i,sectionAdditionalTitle:l,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o($u,{interval:d,intervalExpireAction:m}):null]}),o(qu,{title:a,items:i}),o(qu,{title:l,items:r,countColumns:!0}),n?.__html?o(Lu,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(ve,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),qu=({title:e,items:t,countColumns:n=!1})=>{const a=Se();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(_e,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Fo(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Uu(e)},t)))}):null]})]}):null},Uu=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(_e,{color:"text-secondary-text",size:"text-l",children:e}),o(_e,{color:"text-primary-text",size:"text-xl",children:t})]}),Wu=d((()=>o(ju,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),Hu=d((({handleExpireTimer:e})=>{const[t]=El("leadForm");return o(ju,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory?.text}]})})),Yu=d((()=>{const[e]=El("leadForm");return o(ju,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail?.text},{label:"Адрес",description:e?.addressRetail?.text}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Ku=d((()=>{const[e]=El("leadForm");return o(ju,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.monthsValue+" мес"},{label:"Тип платежа",description:e?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),Gu=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Xu=d((()=>{const[e,t]=a(zu.process),[n]=El("taskId");i((()=>{(async()=>{for(const e of Gu)await Ou({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await Fu({taskId:n});a&&a?.statusCd!==zu.process&&(e(),t(a.statusCd))}),[n]);Vu(r,3e4);return Ju(e,(()=>t(zu.rework)))})),Ju=(e,t)=>({IN_PROCESS:o(Hu,{handleExpireTimer:t}),CANCELLED:o(Wu,{}),APPROVED:o(Ku,{}),REVISION:o(Yu,{})}[e]||null),Zu=[{paymentSystem:"",currency:"rub",codeWord:""},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0,methodObtain:"office",addressCourier:{fullAddress:"",fiasCode:""}},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:"",addressRetail:{key:"",text:""},bankEmployeeCode:void 0,addressCourier:{fullAddress:"",fiasCode:""},methodObtain:"office",deliveryDate:void 0}],Qu=e=>{if(e)try{return new Date(e)}catch(e){return}},eh=e=>(t,n)=>t.filter((e=>e)).map((t=>[th(n,e),nh(t,e),ah(t,e),ih(t,e),lh(t,e),rh(t,e)].some(Boolean)?{...t,required:!1}:t)),th=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,nh=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,ah=({name:e},t)=>"snils"===e&&!t("consentPfrFlg"),ih=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,lh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),rh=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),sh=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e,name:t},n)=>o(Lu,{__html:e},`${t}_${n}`))):null},oh=({field:e,inputs:t,params:n})=>t.map(zo(e,n)),ch=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=eh(dh(t))(e,n),o=s.filter((e=>!rh(e,dh(t))));return c("div",{className:u(Fo(i),"grid gap-x-m"),children:[sh(o),Oo(l),oh({field:t,inputs:s,params:a})]},`section-${r}`)})),dh=e=>t=>e(t)?.value,mh=d((({step:e,onPrevStep:t})=>{const n=6===e;return c("div",{className:"flex justify-between gap-m",children:[o(Kl,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Kl,{type:"submit",children:n?"Отправить заявку":"Далее"})]})})),uh=e=>{const{methodObtain:t,deliveryDate:n=""}=e;return{courierDeliveryFlg:"courier"===t,deliveryDate:(a=n,a?new Date(a).toISOString().split(".")[0]:""),deliveryTimeCd:{value:"TIME_2"}};var a},hh=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},ph=(e,t)=>{switch(e){case 0:return(e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:i}=e;return{currencyCode:t,paymentSystemTypeCd:n,classCard:a,codeWord:i}})(t);case 1:return(e=>{const{name:t,surname:n,middleName:a,limitedBirthday:i="",phone:l="",email:r,sex:s,birthPlace:o,dulIssueDateField:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:y}=e;return{birthDate:$t(i,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:$t(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:$t(g,!0),houseTypeCd:f,participantContacts:Oc({phone:jt(l),email:r}),participantAddresses:Vc({addressRegistration:x,addressFact:y}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}})(t);case 2:return(e=>{const{beginDate:t,employment:n,organizationName:a,inn:i,legalForm:l,organization:r,amountWorkers:s,employerActivities:o,employerOrganization:c,generalSeniority:d,lastJobExperience:m,experience5Years:u,jobsNumber:h,organizationPhone:p,organizationAddress:g,positionOrganization:f}=e;return{employmentContractDate:$t(t||"",!0),employmentTypeCd:n,organizationName:a,organizationInn:i,organizationActivityTypeCd:o,organizationTypeCd:r,organizationKindCd:c,employeesNumberCd:s,opf:l,seniority:d,generalSeniority:u,jobsNumber:h,lastWorkDuration:m,payrollCardRshbFlg:!0,positionCd:f,participantContacts:Oc({organizationPhone:p&&jt(p)}),participantAddresses:Vc({organizationAddress:g})}})(t);case 3:return(e=>{const{familyStatus:t,dependents:n,familyMembers:a,children:i,wages:l,mandatoryPayments:r,incomeAverage:s,additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u,snils:h,armyIdFlg:p,conscription:g}=e;return{maritalStatusCd:t,childrenDependents:i,totalDependents:a,otherDependents:n,militaryStatusCd:g,participantIncomes:Lc({wages:l,mandatoryPayments:r,incomeAverage:s,additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u}),snils:h?.replaceAll(" ",""),armyIdFlg:p}})(t);case 4:return(e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:i}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:i}})(t);case 5:return(e=>{const{addressCourier:t}=e;return{participantAddresses:Vc({addressCourier:t})}})(t);default:return{}}},gh=({step:e,inputs:t,onNextStep:n,saveStep:a,finishForm:i})=>{const[r]=El("taskId"),[s]=El("profileId"),[o]=El("participantId"),c=l((async l=>{const c=$o(ta(eh(fh(l))(t,e)));if(!An(c(l)))return console.warn("validation fail");a(l);try{r&&s&&o&&await sc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Xt().origin,id:t,...hh(a),authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...ph(i,a)}],...uh(a)}}))({participantId:o,taskId:r,profileId:s,step:e,formData:l}))}catch(e){return"Fail"}return n(),5===e&&i?.(!0),"OK"}),[]);return{handleSubmit:c}},fh=e=>t=>e[t],xh=d((({step:e,sections:t,onPrevStep:n,onNextStep:a,isFormFinished:i,finishForm:l})=>{const[r,s]=El("leadForm"),d=((e,t)=>({...Zu[e],...t,limitedBirthday:Qu(t?.limitedBirthday),dulIssueDateField:Qu(t?.dulIssueDateField),participantDateRegistration:Qu(t?.participantDateRegistration),beginDate:Qu(t?.beginDate),deliveryDate:Qu(t?.deliveryDate)}))(e,r),m=t?.flatMap((e=>e?.inputs))||[],{handleSubmit:u}=gh({step:e,inputs:m,onNextStep:a,saveStep:s,finishForm:l}),[,{field:h,onSubmit:p}]=nn(d,{onSubmit:u});return i?o(Xu,{}):c("form",{onSubmit:p,className:"space-y-m",children:[ch({sections:t,field:h,step:e}),o(mh,{step:e,onPrevStep:n})]})})),yh=[[{title:"Параметры карты",inputs:[]},{inputs:[{fieldType:"common",name:"currency",required:!0},{fieldType:"common",name:"paymentSystem",required:!0},{fieldType:"common",name:"cardCategory",required:!0},{fieldType:"common",name:"codeWord",required:!0}]}],[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"name",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"middleName",dadata:!0,filledByEsia:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"limitedBirthday",required:!0,filledByEsia:!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,filledByEsia:!0},{fieldType:"common",name:"dulNumber",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulIssueDateField",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"addressMatch"}]},{columns:2,inputs:[{fieldType:"common",name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{fieldType:"common",name:"housing",required:!0}]},{inputs:[{fieldType:"common",name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{fieldType:"info",text:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{fieldType:"common",name:"employment"},{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:!1},{fieldType:"common",name:"amountWorkers",required:!1}]},{columns:2,inputs:[{fieldType:"common",name:"employerActivities",required:!1},{fieldType:"common",name:"employerOrganization",required:!1},{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:"organizationPhone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"positionOrganization",required:!1},{fieldType:"common",name:"partInBusiness",required:!0,condition:{name:"positionOrganization",values:["BUSINESS_OWNER"]}}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"dependents",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"wages",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryPayments",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"snils",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"conscription",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],[{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"}]}],[{title:"Способ получения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"methodObtain"}]},{title:"Адрес",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressCourier",dadata:!0,condition:{name:"methodObtain",values:["courier"]},required:!0},{fieldType:"common",name:"deliveryDate",condition:{name:"methodObtain",values:["courier"]},required:!0},{fieldType:"common",name:"comment",condition:{name:"methodObtain",values:["courier"]}}]},{inputs:[{fieldType:"common",name:"regionRetail",required:!0,condition:{name:"methodObtain",values:["office"]}},{fieldType:"common",name:"addressRetail",required:!0,condition:{name:"methodObtain",values:["office"]}}]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код",condition:{name:"methodObtain",values:["office"]}},{fieldType:"common",name:"bankEmployeeCode",condition:{name:"methodObtain",values:["office"]}}]}]],bh=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],vh=d((({className:e,...t})=>{const[n,d]=a(0),m=s(null),h=l((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);i(_u,[]);const p=l((()=>{d((e=>Math.min(e+1,6))),h()}),[]),f=l((()=>{d((e=>Math.max(e-1,0))),h()}),[]),x=r((()=>yh[n]),[n]),[y,b]=a(!1);return o(g,{className:u("bg-transparent",e),defaultPadding:"p-0",...t,children:c("div",{ref:m,className:"container grid grid-cols-12",children:[y?null:o(Eu,{stepsTitles:bh,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(xh,{step:n,sections:x,onNextStep:p,onPrevStep:f,isFormFinished:y,finishForm:b},String(n))})]})})})),Nh=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const a=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 mr-s",children:["Шаг ",e," из ",t,"."]}),n[e]||null,o(Au,{step:a,showPercentage:!1})]})})})),wh=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:i,sectionAdditionalTitle:l,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o($u,{interval:d,intervalExpireAction:m}):null]}),o(Ch,{title:a,items:i}),o(Ch,{title:l,items:r,countColumns:!0}),n?.__html?o(Lu,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(ve,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),Ch=({title:e,items:t,countColumns:n=!1})=>{const a=Se();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(_e,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Fo(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Sh(e)},t)))}):null]})]}):null},Sh=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(_e,{color:"text-secondary-text",size:"text-l",children:e}),o(_e,{color:"text-primary-text",size:"text-xl",children:t})]}),kh=d((()=>o(wh,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),Ih=d((({handleExpireTimer:e})=>{const[t]=El("leadForm");return o(wh,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Цель кредита",description:"На любые цели"},{label:"Сумма",description:t?.moneyValue?.toLocaleString()+" ₽"},{label:"Срок кредита",description:t?.monthsValue+" мес"},{label:"Тип платежа",description:t?.isAnnuity?"Аннуитетный":"Дифференцированный"}]})})),Th=d((()=>{const[e]=El("leadForm");return o(wh,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail?.text},{label:"Адрес",description:e?.addressRetail?.text}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Bh=d((()=>{const[e]=El("leadForm");return o(wh,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.monthsValue+" мес"},{label:"Тип платежа",description:e?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),Ph=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Rh=d((()=>{const[e,t]=a(zu.process),[n]=El("taskId");i((()=>{(async()=>{for(const e of Ph)await Ou({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await Fu({taskId:n});a&&a?.statusCd!==zu.process&&(e(),t(a.statusCd))}),[n]);Vu(r,3e4);return Dh(e,(()=>t(zu.rework)))})),Dh=(e,t)=>({IN_PROCESS:o(Ih,{handleExpireTimer:t}),CANCELLED:o(kh,{}),APPROVED:o(Bh,{}),REVISION:o(Th,{})}[e]||null),Mh=[{calculator:{moneyValue:0,monthsValue:0,isAnnuity:!1,isInsurance:!1,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1}},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:"",addressRetail:void 0,bankEmployeeCode:void 0}],_h=e=>{if(e)try{return new Date(e)}catch(e){return}},Ah=e=>(t,n)=>t.filter((e=>e)).map((t=>[Eh(n,e),zh(t,e),Fh(t,e),Oh(t,e),Vh(t,e),Lh(t,e)].some(Boolean)?{...t,required:!1}:t)),Eh=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,zh=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,Fh=({name:e},t)=>"snils"===e&&$h(t),Oh=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,Vh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),Lh=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),$h=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,jh=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e,name:t},n)=>o(Lu,{__html:e},`${t}_${n}`))):null},qh=({field:e,inputs:t,params:n})=>t.map(zo(e,n)),Uh=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Ah(Wh(t))(e,n);return c("div",{className:u(Fo(i),"grid gap-x-m"),children:[jh(s),Oo(l),qh({field:t,inputs:s,params:a})]},`section-${r}`)})),Wh=e=>t=>e(t)?.value,Hh=d((({step:e,onPrevStep:t})=>{const n=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Kl,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Kl,{type:"submit",children:n?"Отправить заявку":"Далее"})]})})),Yh={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},Kh=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:Yh[a?"annuity":"differential"]}},Gh=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},Xh=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return(e=>{const{name:t,surname:n,middleName:a,limitedBirthday:i="",phone:l="",email:r,sex:s,birthPlace:o,dulIssueDateField:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:y}=e;return{birthDate:$t(i,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:$t(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:$t(g,!0),houseTypeCd:f,participantContacts:Oc({phone:jt(l),email:r}),participantAddresses:Vc({addressRegistration:x,addressFact:y}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}})(t);case 2:return(e=>{const{beginDate:t,employment:n,organizationName:a,inn:i,legalForm:l,organization:r,amountWorkers:s,employerActivities:o,employerOrganization:c,generalSeniority:d,lastJobExperience:m,experience5Years:u,jobsNumber:h,organizationPhone:p,organizationAddress:g,positionOrganization:f}=e;return{employmentContractDate:$t(t||"",!0),employmentTypeCd:n,organizationName:a,organizationInn:i,organizationActivityTypeCd:o,organizationTypeCd:r,organizationKindCd:c,employeesNumberCd:s,opf:l,seniority:d,generalSeniority:u,jobsNumber:h,lastWorkDuration:m,positionCd:f,participantContacts:Oc({organizationPhone:p&&jt(p)}),participantAddresses:Vc({organizationAddress:g})}})(t);case 3:return(e=>{const{familyStatus:t,dependents:n,familyMembers:a,children:i,confirmationIncome:l,wages:r,mandatoryPayments:s,incomeAverage:o,additionalIncome:c,otherIncome:d,otherPayments:m,rentalIncome:u,retirementIncome:h,snils:p,armyIdFlg:g,conscription:f}=e;return{maritalStatusCd:t,totalDependents:a,incomeCertificateCd:l,otherDependents:n,childrenDependents:i,militaryStatusCd:f,participantIncomes:Lc({wages:r,mandatoryPayments:s,incomeAverage:o,additionalIncome:c,otherIncome:d,otherPayments:m,rentalIncome:u,retirementIncome:h}),snils:p?.replaceAll(" ",""),armyIdFlg:g}})(t);case 4:return(e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:i}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:i}})(t);default:return{}}},Jh=({step:e,inputs:t,onNextStep:n,saveStep:a,finishForm:i})=>{const[r]=El("taskId"),[s]=El("profileId"),[o]=El("participantId"),c=l((async l=>{const c=$o(ta(Ah(Zh(l))(t,e)));if(!An(c(l)))return console.warn("validation fail");a(l);try{r&&s&&o&&await sc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Xt().origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Xh(i,a)}],...Kh(a),...Gh(a),esiaAccountTypeCd:{key:a?.esiaAccountTypeCd?.key}}}))({participantId:o,taskId:r,profileId:s,step:e,formData:l}))}catch(e){return"Fail"}return n(),5===e&&i?.(!0),"OK"}),[]);return{handleSubmit:c}},Zh=e=>t=>e[t],Qh=d((({step:e,sections:t,onPrevStep:n,onNextStep:a,isFormFinished:i,finishForm:l,programsSource:r})=>{const[s,d]=El("leadForm"),[m]=El("programId"),u=r?.[m??""],h=((e,t)=>({...Mh[e],...t,limitedBirthday:_h(t?.limitedBirthday),dulIssueDateField:_h(t?.dulIssueDateField),participantDateRegistration:_h(t?.participantDateRegistration),beginDate:_h(t?.beginDate),deliveryDate:_h(t?.deliveryDate)}))(e,s),p=t?.flatMap((e=>e?.inputs))||[],{handleSubmit:g}=Jh({step:e,inputs:p,onNextStep:a,saveStep:d,finishForm:l}),[,{field:f,onSubmit:x}]=nn(h,{onSubmit:g});return i?o(Rh,{}):c("form",{onSubmit:x,className:"space-y-m",children:[Uh({sections:t,field:f,step:e,params:{calcData:u}}),o(Hh,{step:e,onPrevStep:n})]})})),ep=[[{columns:1,inputs:[{fieldType:"common",name:"calculator"}]}],[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"name",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"middleName",dadata:!0,filledByEsia:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"limitedBirthday",required:!0,filledByEsia:!0},{fieldType:"common",name:"birthPlace",required:!0,filledByEsia:!0},{fieldType:"common",name:"phone",required:!0,filledByEsia:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulNumber",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulIssueDateField",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"addressMatch"}]},{columns:2,inputs:[{fieldType:"common",name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{fieldType:"common",name:"housing",required:!0}]},{inputs:[{fieldType:"common",name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{fieldType:"info",text:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{fieldType:"common",name:"employment"},{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:!1},{fieldType:"common",name:"amountWorkers",required:!1}]},{columns:2,inputs:[{fieldType:"common",name:"employerActivities",required:!1},{fieldType:"common",name:"employerOrganization",required:!1},{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:"organizationPhone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"positionOrganization",required:!1},{fieldType:"common",name:"partInBusiness",required:!0,condition:{name:"positionOrganization",values:["BUSINESS_OWNER"]}}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"dependents",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"wages",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryPayments",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"snils",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"conscription",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],[{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"}]}],[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"regionRetail",required:!0}]},{inputs:[{fieldType:"common",name:"addressRetail",required:!0}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{fieldType:"common",name:"bankEmployeeCode"}]}]],tp=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],np=Ft((({className:e,programsSource:t,...n})=>{const[d,m]=a(0),h=s(null),p=l((()=>h?.current?.scrollIntoView({behavior:"smooth"})),[h]);i(_u,[]);const f=l((()=>{m((e=>Math.min(e+1,5))),p()}),[]),x=l((()=>{m((e=>Math.max(e-1,0))),p()}),[]),y=r((()=>ep[d]),[d]),b=0===d,[v,N]=a(!1);return o(g,{className:u("bg-transparent",e),defaultPadding:"p-0",...n,children:c("div",{ref:h,className:"container grid grid-cols-12",children:[b||v?null:o(Nh,{stepsTitles:tp,step:d,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(Qh,{step:d,sections:y,onNextStep:f,onPrevStep:x,isFormFinished:v,finishForm:N,programsSource:t},String(d))})]})})})),ap=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ip=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),lp=1e9,rp={sum:{min:1e4,max:lp},period:3},sp=Ft((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:i,...l})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=qd(rp,{block:l.block,page:l.options?.page,normalize:e=>({...e,period:op(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=cp(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(zd,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Jm,{label:a?.title,min:500,max:lp,...d("sum",{parse:e=>({min:Number(e),max:lp}),format:({min:e})=>String(e)})}),o(Xi,{title:i?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(Md,{blocksToRender:r,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),op=e=>Dt((e?.paramsSource?.rateRows||[]).filter(ap).flatMap((e=>ip(e.minMonths,e.maxMonths)))),cp=e=>Dt(e.flatMap((e=>e||[])).filter(ap).flatMap((e=>ip(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],dp=[{key:"10"},{key:"50"},{key:"100"}],mp=({itemCount:e,onItemCountChange:t})=>{const n=l((({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(Pn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:dp,iconVersion:"black"})]})},up="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",hp=(e,t)=>{const{currentPage:n,onPageChange:a,totalPages:i}=e,l=t+1;return l===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:l},String(t)):1!==l&&l!==i&&((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))(l,n,i)?o("div",{onClick:()=>a(l),className:up,"aria-label":`Страница ${l}`,children:l},String(t)):null},pp={width:"24",height:"24"},gp=({currentPage:e,onPageChange:t,totalPages:n})=>{const a=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),i=l((()=>{e>1&&t(e-1)}),[e]),s=l((()=>{e<n&&t(e+1)}),[e,n]),d=l((()=>t(1)),[]),m=l((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:i,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:fp(1===e),...pp})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:up,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(hp),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:up,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:fp(e===n),...pp})})]})},fp=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",xp=({currentPage:e,onPageChange:t,totalPages:n,itemCount:a,onItemCountChange:i})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(gp,{currentPage:e,onPageChange:t,totalPages:n}),a&&i?o(mp,{itemCount:a,onItemCountChange:i}):null]}),yp=d((({className:e,value:t,autoFocus:n,onChange:a,onFocus:i,placeholder:r="Поиск по сайту"})=>{const s=l((e=>{a&&a(e.target?.value||"")}),[a]);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",mn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:i})]})})),bp=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(yp,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Rl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Rl,{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(Kl,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),vp=d((({title:e,timestamp:t,publicId:n})=>{const a=he(),{href:i}=a({href:`${qt}/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(_e,{size:"text-m","font-weight":"font-light",children:$t(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:i,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Np=`${qt}/depository`,wp={startDate:void 0,endDate:void 0,query:""},Cp=Ft((({className:e,...t})=>{const[n,i]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=nn(wp),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:i})=>{const l=a?$t(a,!0):"",r=i?$t(i,!0):"",s=new URLSearchParams(Np);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",l),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=ha(Np+o,Rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=l((e=>i(e-1)),[]),y=l((e=>{r!==e?(s(e),i(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(bp,{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(_e,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(_e,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(vp,{...e},String(e.publicId)))):o(Xc,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(xp,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:y})]})]})})),Sp=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,kp=d((({className:e="",title:t,description:n,error:a,button:i,...l})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...l,children:[o("div",{className:"flex justify-center",children:Sp(a)}),o(S,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),i?.text?o(ve,{version:i?.version,text:i?.text,...i}):null]})));function Ip(e,t){for(const[n,a]of e.entries())null!=a?t.setItem(n,a):t.removeItem(n)}const Tp={};function Bp(e,t=Tp){const n=s(null),o=function(){const[,e]=a(0);return l((()=>e((e=>(e+1)%65536))),[])}();return i((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),r((()=>new Proxy(t,{get:(t,a)=>(n.current||=new Set,n.current.add(a),e.getItem(a)),has:(t,a)=>(n.current||=new Set,n.current.add(a),e.hasItem(a)),set:(t,n,a)=>(e.setItem(n,a),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const Pp=new class{bus;store=new Map;get size(){return this.store.size}constructor(e=new de){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}};var Rp,Dp;function Mp(e){return Bp(Pp,e)}Rp=Pp,Dp=new class{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new de){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}(globalThis?.localStorage),Ip(Rp,Dp),Ip(Dp,Rp),Rp.bus.watch((({type:e,event:t})=>{null!=t?Dp.setItem(e,t):Dp.removeItem(e)}));const _p=`${qt}/region`;function Ap(e="Москва"){return Mp().location??{name:e}}function Ep(e="Москва"){const t=Mp(),n=l((async()=>{if(!t.location){const n=await Pt(_p);t.location=n??{name:e}}}),[t,e]);return ha(_p,n),t}var zp;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(zp||(zp={}));const Fp=new Intl.NumberFormat("ru",{style:"currency",currency:zp.RUB}),Op=e=>e?Fp.format(e):"",Vp="text-m font-light text-secondary-text ",Lp=`${Vp} text-left`,$p=`${Vp} pl-5xl text-center`,jp=`${Vp} pl-5xl text-right`,qp={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Up=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Lp,children:o(_e,{size:"text-m",children:"Валюта"})}),o("th",{className:$p,children:o(_e,{size:"text-m",children:"Купить"})}),o("th",{className:jp,children:o(_e,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Wp)})]}))),Wp=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:qp[t]},width:"24",height:"24"}):null,o(_e,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(_e,{size:"text-h6",children:Op(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(_e,{size:"text-h6",children:Op(e?.buyExchangeRate)})})]},t)},Hp={icon:"GpsIcon"},Yp=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Xd,{...Hp,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:"Курс указан для заданного офиса"})]})]}))),Kp=(e,t,n)=>{const a=Number(Gp(e))*Math.pow(t,n?-1:1);return Number.isInteger(a)?a:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(a)},Gp=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function Xp(e){if(!e)throw new Error("Value should be fulfilled");return e}const Jp=e=>t=>{const[,n]=Xp(e.find((([e])=>e(t))));return n(t)},Zp=e=>Jp(e.map((([e,t])=>[e,()=>t])));Zp.if=e=>new Qp(void 0,e);class Qp{parent;predicate;unit;get entry(){return[Xp(this.predicate),Xp(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Qp(this,e)}then(e){return new Qp(this.parent,this.predicate,e)}else(e){return Jp([...eg(this),[()=>!0,e]])}}const eg=e=>[...e?.parent?eg(e.parent):[],e.entry],tg=e=>Zp([[e=>e.value!==zp.RUB&&e.oppositeValue!==zp.RUB,()=>e.handleConvert(e.value,zp.RUB)],[e=>e.value===zp.RUB&&e.oppositeValue===zp.RUB,()=>e.handleConvert(e.value,zp.USD)],[e=>e.value===zp.RUB&&e.oppositeValue===zp.RUB,()=>e.handleConvert(e.value,zp.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function ng(e){const{placeholder:t,rates:n,selected:a,value:i,setValue:l,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:a,text:a};return c("div",{className:"relative flex",children:[o(hn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:i,onChange:l}),s.length?o(Pn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const ag=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:i})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||zp.RUB,selectBuy:n?.[0]?.currency?.currency||zp.USD}),d=l((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:[ng({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:ig(r,d,n),value:r.inputSell,setValue:e=>rg(d,n)(e,r.selectSell,r.selectBuy)}),ng({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:lg(r,d,t),value:r.inputBuy,setValue:e=>sg(d,t)(e,r.selectBuy,r.selectSell)})]}):null,i?.text?o(ve,{text:i.text,version:i?.version,...i}):null]})})),ig=(e,t,n)=>a=>{t({selectSell:a}),tg({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,i=e.selectBuy)=>{rg(t,n)(e.inputSell,a,i)}})},lg=(e,t,n)=>a=>{t({selectBuy:a}),tg({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,i=e.selectSell)=>sg(t,n)(e.inputBuy,a,i)})},rg=(e,t)=>(n,a,i)=>{e({inputSell:Gp(n),selectBuy:i});const l=t.find((e=>e.currency?.currency===i))?.buyExchangeRate||t.find((e=>e.currency?.currency===a))?.buyExchangeRate;l&&e({inputBuy:String(Kp(n,l,a===zp.RUB)||"")})},sg=(e,t)=>(n,a,i)=>{e({inputBuy:Gp(n),selectSell:i});const l=t.find((e=>e.currency?.currency===i))?.saleExchangeRate||t.find((e=>e.currency?.currency===a))?.saleExchangeRate;l&&e({inputSell:String(Kp(n,l,a===zp.RUB)||"")})},og=`${qt}/exchangerates`;const cg=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const i=function(e){const t=e?.code||"000",{data:n}=ha(og+`?regionCode=${t}`,Rt);return n||{}}(Ap()),l=dg(i?.exchangeRate?.currencies),r=l.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:zp.RUB}});const s=l.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:zp.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Te,{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:[l?o(Up,{className:"mb-xl",exchangeCurrencyItems:l}):null,o(Yp,{address:i?.address})]}),o(ag,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),dg=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],mg=d((({className:e="",items:t})=>{const n=he();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(ug(n))})})),ug=e=>({dataFooter:t,...n},a)=>{const{text:i,href:l,target:r,onClick:s}=e(n);return i?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:l,target:r||"_self",onClick:s,...ge(t),children:i||null})},String(a)):null},hg=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),pg=["all","footer"],gg=d((({className:e,navigationItems:t})=>{const n=he();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(hg(pg)).map(n).map(fg)})})),fg=(e,t)=>{const{text:n,items:a=[],href:i,target:l="_self",onClick:r,dataFooter:s}=e,d=a.filter(hg(pg));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:i,target:l,onClick:r,...ge(s),children:n}),d?o(mg,{items:d}):null]},String(t))},xg=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(yg)}):null)),yg=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(_e,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(bg)})]},String(t)),bg=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:vg(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),vg=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Ng(t)}`,children:o(_e,{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})}},Ng=e=>e.replaceAll(/\D/g,""),wg=d((({className:e="",index:t,text:n,...a})=>{const i=he(),{href:l,target:r,onClick:s}=i(a);return o("a",{className:u("text-secondary-text",e),href:l,target:r,onClick:s,children:n||`Документ ${t}`})})),Cg=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(_e,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(wg,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Sg="w-full lg:w-52";function kg(e,t,n=300){i((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const Ig=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:a,s2Matches:i}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),a=Array.from({length:e.length}),i=Array.from({length:t.length});let l=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++)a[r]||i[n]||e[r]!==t[n]||(l++,a[r]=!0,i[n]=!0)}return{m:l,s1Matches:a,s2Matches:i}}(e,t);if(0===n)return 0;const l=function(e,t,{s1Matches:n,s2Matches:a}){let i=0;for(let l=0,r=0;l<e.length;l++){if(!n[l])continue;let s=r;for(;s<t.length;s++)if(a[s]){r=s+1;break}e[l]!==t[s]&&i++}return i}(e,t,{s1Matches:a,s2Matches:i}),r=(n/e.length+n/t.length+(n-l/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 Tg=(e,t)=>(n,a)=>{for(const[i,l]of a)n.set(i,e(n.get(i)||t,l));return n},Bg=(e=[])=>e.reduce(((e,t)=>e+t),0),Pg=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Rg=e=>t=>e.map((([e,n])=>[Ig(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>Mg(t,e))).reduce(Tg(Math.max,0),new Map),Dg=e=>t=>{return Vd(t,t.map((({title:e})=>e)).map((e=>t=>{const n=Pg(t||"");return n.length?Bg(e.map((e=>Sr(n.map(Ig(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},Mg=(e,t)=>new Map(e.map((e=>[e,t]))),_g=({basePathList:e,initialQuery:t=""})=>{const[n,l]=a(t||"");i((()=>{null!=t&&l(t)}),[t]);const{data:r}=ha(e?.length?e:null,Ag),[s,o]=a(null);return kg((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:a}=t||{};if(!(e&&n?.length&&a&&Object.keys(a).length))return[];const i=Pg(e);if(!i.length)return[];const l=Object.entries(a),r=[...i.map(Rg(l)).reduce(Tg(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*i.length)).map((([e])=>n[e]));return Dg(i)(r)})(n)))}),[r,n]),[s,{value:n,onChange:l}]},Ag=async(...e)=>(await Promise.allSettled(e.map((e=>Pt(O(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Eg=d((({initialQuery:e,navigationItems:t})=>{const n=r((()=>t?.map((e=>e.href||"/"))),[t]),[a,i]=_g({basePathList:n,initialQuery:e}),l=r((()=>zg(t)(a)),[t,a]);return o(Jl,{head:o(yp,{autoFocus:!0,...i}),children:o(gg,{navigationItems:l})})})),zg=e=>t=>e?.length&&t?.length?Vd(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:O("/",t)})))}))):[],Fg=(e={})=>{const{open:t,close:n}=ue();return{open:(n={},a={})=>t(o(Eg,{...e,...n}),a),close:n}},Og=d((({className:e,search:t,...n})=>{const[i,r]=a(""),s=l((()=>r("")),[]),d=Fg(n),m=l((e=>{r(e),Vg(e)&&d.open({initialQuery:e},{onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(yp,{value:i,placeholder:t?.placeholder,onChange:m}),o(Xl,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),Vg=e=>e&&e.length>=3,Lg=(e,t)=>{const{logo:n}=e??{},{dataHeader:a,dataFooter:i,...l}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(pc,{className:Sg,logo:l,data:i,showTitle:!1}),o(Og,{className:"grow",navigationItems:t,...e})]})},$g=d((({className:e="",index:t,...n})=>{const a=he(),{href:i,target:l,text:r,onClick:s}=a(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:i,target:l,onClick:s,children:r||`Документ ${t}`})})),jg=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(_e,{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($g,{index:t,...e},String(t))))}):null]}))),qg=Ft((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{},i=n.options?.page?.common??{},{documents:l,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:[Lg(i,a),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(gg,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(Sg,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(xg,{items:s}),h?o(ve,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(wu,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(ve,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Cg,{title:m,links:r}),o(jg,{links:l,license:p})]})})),Ug=d((({className:e="",title:t,description:n,calendar:a,...i})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...i,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),a?Wg(a):null]}))),Wg=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=>Hg(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:Yg(e)}),c("div",{className:"text-s",children:[o(_e,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(_e,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Hg=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),Yg=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)),Kg=Ft((({className:e,title:t,button:n,regionSource:i,data:l,...r})=>{const[s,d]=a({key:""}),m=i?.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(_n,{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(ve,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:bu(l,s?.key),children:f})}):null]})})}));function Gg(e=[]){const t=D(),n=Array.from(e.entries()).filter((([,e])=>Xg(t)(e)));return n.find((([,e])=>Xg(t,!0)(e)))??n[n.length-1]??[]}const Xg=(e,t=!1)=>({href:n})=>{if(!n)return!1;const a=F(Jg(e)(n));return t?a===F(n):a.startsWith(F(n))},Jg=e=>t=>{const n=X(G.SITE_URL);return A(t)?e.href:O(n,e.pathname)},Zg=d((({className:e="",items:t,activeItem:n,ariaLabel:a="Меню"})=>{const[r,{setFalse:d,toggle:m}]=rn(!1),h=on(d),p=s(null),g=l((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),a=t.current.getBoundingClientRect(),i=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${i}px`:a.left>e.left&&(i>a.left?n.current.style.left="":n.current.style.left=`${i}px`)}}),[r]);return sn(globalThis,"resize",(()=>g({isOpened:r,buttonRef:h,menuRef:p}))),i((()=>{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":a,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:ef(t,n)})]})})),Qg=d((({isActive:e,...t})=>{const n=he(),{text:a,href:i,target:l,onClick:r}=n(t);return o("a",{className:u("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:i,target:l,onClick:r,role:"link",...ge(t?.data),children:a})})),ef=(e,t)=>e?.map(((e,n)=>o(Qg,{isActive:e===t,...e},e?.text??String(n)))),tf={default:"w-6 h-6",large:"w-12 h-12"},nf=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:a=!1,disabled:i,ariaLabel:l="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:u("group/btn border-0 flex shrink-0 items-center",a?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":a&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${tf[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:i,"aria-label":l,onClick:c,...ge(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"})}))),af="chatbot",lf="text-page__btn-chat",rf={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},sf=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:a="Чат",version:l})=>{const r=(e=>{i((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=rf[e??""];return n=>{if(t)if("personal"!==e)qa(af,t);else{const e=n.target;e?.classList.contains(lf)||e?.classList.add(lf),document.getElementById("webchat-js-container:webchat_rshb")||qa(af,t)}}})(e);return o(nf,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:a,onClick:r,buttonSize:"large",isGrayBg:!0,version:l})})),of=d((({className:e="",active:t,dataItemName:n,children:a,data:i,...l})=>{const r=he(),{href:s,target:d,text:m,onClick:h}=r(l);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,...ge(i),children:[o("span",{className:cf(t),children:m||a}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),cf=(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"),df=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=ed(l((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(of,{...i,children:n})})})),mf={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"},uf=d((({version:e,text:t,mobileText:n,...a})=>{const i=Se()?n:t;return i?o(ve,{className:u("py-s px-lg font-light whitespace-nowrap",mf["transparent"===e?"transparent":"default"]),...a,children:i}):null})),hf=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:i,chatBotAriaLabel:l})=>{const d="transparent"===t?"white":"black",[,m]=Gg(e),[u,h]=a(e.length),p=e.slice(u),g=s(null),f={rootRef:g},x=r((()=>e.map(((e,t)=>e=>{h(e?pf(t):gf(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(df,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Zg,{items:p,activeItem:m,ariaLabel:i}):null,_.CHAT_BOT?o(sf,{version:t,iconVersion:d,chat:_.CHAT_BOT,ariaLabel:l}):null,o(uf,{version:t,...n})]})})),pf=e=>t=>Math.max(t,e+1),gf=e=>t=>Math.min(t,e),ff=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(_e,{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(xf,{...e},String(t))))})]}):null,xf=d((({icon:e,...t})=>{const n=he(),{text:a,target:i,href:l,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,a?o("a",{className:"hover:text-primary-hover",href:l,target:i,onClick:r,children:o(_e,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})}):null]})})),yf=(e,t)=>n=>n.name?o(vu,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:bu(e,n.name),children:o(_e,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,bf=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(mn,"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"})]}))),vf=d((({defaultLocation:e})=>{const t=Ap(e),n=he(),{href:a}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(vu,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Nf=d((({foreignOffices:e,branches:t})=>{const n=Ep(t?.default),[i,s]=a(""),d=ho(),m=r((()=>Cf(d).sort(((e,t)=>e.name.localeCompare(t.name)))),[d]),u=r((()=>((e,t)=>{const n=new Map;for(const a of e){const e=t(a),i=n.get(e)||[];n.set(e,[...i,a])}return n})(m,wf)),[m]),{close:h}=ue(),p=l((e=>{n.location=e,h()}),[n]);return c(Jl,{className:"pb-20",head:c("div",{children:[o(_e,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(vf,{defaultLocation:t?.default}),o(bf,{onSearch:s,searchTerm:i})]}),children:[i&&i.length>=3?o("div",{children:m.filter((({name:e})=>e&&Ig(e.toLowerCase())(i.toLowerCase())>=.8)).map(yf(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((g=p,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(_e,{size:"text-h6",children:e})}),t.map(yf(f,g))]},e)))}),ff(e)]});var g,f})),wf=e=>e.name?.charAt(0)??"",Cf=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Sf=d((({className:e="",active:t,flat:n,children:a,data:i,...l})=>{const r=he(),{href:s,target:c,text:d,onClick:m}=r(l);return o("a",{className:u(kf(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...ge(i),children:o("span",{suppressHydrationWarning:!0,className:If(t,n),children:d||a})})})),kf=(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}),If=(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"),Tf=d((({className:e,version:t,...n})=>{const a="transparent"===t?"white":"black",i=Ap(n?.branches?.default),r=Fg(n),s=(e=>{const{open:t,close:n}=ue();return{open:(n={})=>t(o(Nf,{...e}),n),close:n}})(n),d=l((()=>r.open()),[r]),m=l((()=>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(Sf,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:i?.name,data:bu(n?.branches?.dataClick,i?.name??""),onClick:m}):null,n?.officesAtms?.href?o(Sf,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(nf,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),Bf=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=ed(l((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(Sf,{...i,children:n})})})),Pf=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:i,headerData:l,search:d,bgColor:m,logo:u})=>{const[h,p]=a(e.length),g=e.slice(h),f=s(null),x={rootRef:f},y=r((()=>e.map(((e,t)=>e=>{p(e?Rf(t):Df(t))}))),[e]),{dataFooter:b,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(pc,{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(Bf,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:y[n],data:e.dataHeader,...e},String(n))))}),g.length?o(Zg,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(Tf,{version:i,className:"ml-auto",search:d,navigationItems:e,...l})]})})),Rf=e=>t=>Math.max(t,e+1),Df=e=>t=>Math.min(t,e),Mf={"bg-white":"primary",transparent:"transparent"},_f=["all","header"],Af=Ft((({className:e,bgColor:t="bg-white",logo:n={},version:a=Mf[t],portal:i,header:l={},...r})=>{const{common:s,navigation:d}=zf(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=Gg(m),{internetBankButton:f}=i||{},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:a,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(Pf,{activeTopItem:p,navigationItems:m?.filter(hg(_f)),version:a,headerData:{...l,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",Ef(a))}),p?.items?.length&&o(hf,{subItems:p?.items?.filter(hg(_f)),version:a,internetBankButton:f})]})})})),Ef=e=>"transparent"===e?"opacity-30":"",zf=e=>({navigation:e?.navigation??{},common:e?.common??{}}),Ff=(e=!1)=>e?{}:{padding:"p-0"},Of={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Vf=Ft((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:a=!0,version:i="transparent",isTheme:l=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",Of[n],e),padding:t,version:i,isTheme:l,...s,children:R({...s,extraProps:{...Ff(a),className:Jc(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),Lf=d((e=>{const{className:t,align:n,image:a,...i}=e,l=n?u("flex",am[n]):"";return o(g,{className:u(l,t),defaultPadding:"p-0",...i,children:o(ne,{image:a})})})),$f=(e,t=0)=>{const{itemCount:n,visibleItemCount:i}=e,[r,s]=a(t),o=l((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=l((()=>s((e=>Math.max(e-1,0)))),[n]),d=i?n>i&&r<n-i:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function jf({dec:e,inc:t,canDec:n,canInc:a,btnClass:i,className:l=""}){return n||a?c("div",{children:[n?o(fd,{className:u("absolute z-40",i[0],l),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,a?o(fd,{className:u("absolute z-40 rotate-180",i[1],l),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const qf=d((({className:e="",cards:t=[],button:n})=>{const[i,r]=a(0),s=l((e=>r(e)),[]),d=t.length,[m,u]=$f({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?Uf({activeIndex:m,cards:t,selectedCardIndex:i,onClick:s}):null,jf({...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(ve,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function Uf({activeIndex:e,cards:t,selectedCardIndex:n,onClick:a}){const i=460*e,l=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${i}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${l}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:a}){return c("button",{type:"button",onClick:a,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?Wf("страховая сумма",e.sum):null,e?.fee?Wf("страховой взнос",e.fee):null]}),Hf(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})})}function Wf(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(_e,{size:"text-h6",children:[We(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(_e,{size:"text-l",color:"text-secondary-text",children:e})})]})}function Hf(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 Yf=d((({className:e="",title:t,insuranceTabs:n=[],button:i,...r})=>{const[s,d]=a(0),m=l((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:a}){return o("button",{type:"button",onClick:a,"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:Kf({insuranceTabs:n,button:i})})]})})),Kf=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(qf,{button:t,cards:e},String(n)))):null};const Gf={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Xf={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Jf=d((e=>{const{className:t="",__html:n,isDotted:a,investmentZeroColumn:i,investmentColumns:l,...r}=e,s=l?[...l]:[];return i&&s.unshift(i),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:[Ad(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Zf)),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(tx)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(De,{__html:n,isDotted:a,itemSize:"list-s"})}):null]})})})),Zf=(e,t,n)=>{const a=1===t,i=t===n.length-1,l=e.cells?.reverse()||[];return o("div",{className:`${Qf(a,i,e.cells)}`,children:l.length?o("div",{className:"w-full "+(i?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:l.map(ex)}):null},`column_${t}`)},Qf=(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(" "),ex=(e,t)=>{const n=e.cellSize||"XS",a=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${Xf[n]} ${Gf[a]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(_e,{align:"text-center",children:e.text})},`cell_${t}`):null},tx=(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,nx=["байт","Кб","Мб","Гб","Тб","Пб"],ax=d((({icon:e,text:t,href:n,target:a,fileFormat:i,data:l,fileSize:r})=>{const s=r&&i?",":"",d=r??"",m=i?String(i):"";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:a,...ge(l),children:[e,t?c(_e,{size:"text-l",font:"font-light",children:[t," ",ix(d,m),o(_e,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),ix=(e,t)=>e||t?o("span",{children:", "}):"",lx=(e,t)=>(n,a)=>{const i=q(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),l="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))} ${nx[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?sx(i):n?.fileFormat;return c("div",{role:"listitem",children:[o(ax,{text:n?.text,target:n?.target,href:i,fileFormat:r,fileSize:l,icon:rx(t),data:n?.data}),o(De,{__html:n?.__html})]},String(a))},rx=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,sx=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),a=-1!==t?e.substring(t+1):"";return a.includes("/")?a.replace(n,""):a},ox=d((({href:e,__html:t,target:n})=>{const{close:a}=ue(),i=D(),r=q(i)(e),s=l((()=>{a()}),[]);return c(Jl,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(ve,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(Kl,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),cx=d((({text:e,href:t,target:n,__html:a,icon:i})=>{if(!e&&!a)return null;const r=(e=>{const{open:t,close:n}=ue();return{open:(n={})=>t(o(ox,{...e}),n),close:n}})({__html:a,href:t,target:n}),s=l((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[rx(i),o(_e,{font:"font-light",children:e})]})})),dx={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},mx=Ft((({className:e="",title:t,description:n,align:a="text-center",documents:i,icon:l={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=D();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(S,{title:t,description:n,align:a,headlineVersion:"M",as:"h2",isEmbedded:!0}),i?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",dx[r]),role:"list",children:i.map(ux(d,l))}):null]})})),ux=(e,t)=>(n,a)=>{const i=n?.docType;return""===i?null:"reportSource"in n&&n?.reportSource?.__html?hx(t)(n,a):lx(e,t)(n,a)},hx=e=>(t,n)=>{const a={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(cx,{...a,icon:e,href:px(t)?t?.href:t?.attachment?.src}),o(De,{__html:t?.__html})]},String(n)):null},px=e=>"href"in e,gx=Ft((({className:e,padding:t,align:n="text-left",buttons:a=[],description:i,image:l,__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",y=l?.src?o(ne,{className:"hidden lg:block",image:l}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Te,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:y,buttons:$e(a,{className:"flex-wrap"}),children:[i?o(_e,{size:"text-xl","font-weight":"font-light",children:i}):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(De,{__html:r,itemSize:"list-m"}):null,o(_e,{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,l?.src?o(ne,{className:"lg:hidden",image:l}):null]})]})})})),fx=(e,t)=>e&&"underlined"!==t?"primary":"secondary",xx=(e=[],t={})=>e.filter((({content:e={}})=>$d(t,e))).length,yx=(e,t)=>e===t;const bx=(e=>(t,n)=>t===n||Boolean(t&&n&&Object.keys(t).length===Object.keys(n).length&&Object.entries(t).every((([t,a])=>e(a,n[t])))))(function(...e){return(t,n)=>e.some((e=>e(t,n)))}(yx,((e=yx)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),vx=[],Nx={},wx={primary:"bg-white/30",secondary:"bg-main-divider"},Cx={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Sx=d((({count:e,version:t="secondary"})=>{const n=Se(),a=n?"bg-main-divider":wx[t],i=Cx[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",a),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(_e,{size:"text-xs",color:i,children:e})})})),kx=({text:e,description:t,icon:n,isActive:a,type:i})=>{const l=(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"}))(a);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",l.icon),image:{...n,iconVersion:n?.iconVersion??l.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===i?l.text:l.oldText,children:e}),o("div",{className:"animated"===i?l.desc:l.oldDesc,children:t})]})]})},Ix={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Tx={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Bx={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Px={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Rx=d((({tag:e="div",item:t={},isActive:n=!1,type:a="default",onClick:i})=>{const l=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(l,{className:u("h-12","block flex-1","cursor-pointer",Ix[a],n?Px[a]:Bx[a]),role:"tablist","aria-label":"Список табов",onClick:i,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Tx[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[kx({text:r,description:s,icon:d,isActive:n,type:a}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Sx,{count:m,version:fx(n,a)})}):null]})})})),Dx=d((e=>o(e?.item?.href?Mx:_x,{...e}))),Mx=d((e=>{const t=he(),n=l((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:a,...i}=t({...e.item,onClick:n});return o(Rx,{...e,tag:"a",item:i,onClick:a})})),_x=d((({item:e={},onClick:t,...n})=>{const a=l((()=>{t&&t(e)}),[t,e]);return o(Rx,{item:e,onClick:a,...n})})),Ax=(e,t,n)=>(a,i)=>o(Dx,{isActive:a===e,onClick:t,type:n,item:a},String(i)),Ex=d((({className:e,tabsType:t="default",items:n=[],activeItem:a,onChange:i})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Ax(a,i,t))}))),zx={categories:[],extraOptions:[],propertyType:[],stage:[]},Fx=Ft((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...i})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=qd(zx,{block:i.block,page:i.options?.page}),f=l(((e=zx)=>p(e)),[]),x=(({hotFilters:e=vx,filtrationState:t=Nx,blocks:n=vx,onFiltrationStateChange:a})=>{const i=r((()=>Math.max(0,e.findIndex((e=>bx(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:xx(n,t.filter),version:fx(t===e[i])})))),[e,n,i]),o=l((t=>{a(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[i],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:i.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Ex,{...x}),o(zd,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(Md,{blocksToRender:d,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Ox=(e,t,n)=>{const a=fx("all"===t),i=fx("business"===t),l=(e,t,a)=>{const i=e.currentTarget===e.target&&"business"===t?r(a):a;return n(t),i},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(Kl,{"data-id":"all",onClick:t=>l(t,"all",e),version:a,children:"Для физических лиц"}),o(Kl,{"data-id":"business",onClick:t=>l(t,"business",e),version:i,children:"Для юридических лиц"})]})},Vx=({__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(De,{__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(_e,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Lx="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",$x=({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:i})=>{const l=a?5:6,r=(e||[]).map((e=>o(Ia,{text:i[e],...t(e)},e))),[s,d]=l>0?[r.slice(0,l),r.slice(l)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(ni,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Lx,children:s}),o(ai,{className:Lx,isUnfolded:e,children:d})]}),renderFoldButton:jx(n,a)})}):null})},jx=(e,t=!1)=>({isUnfolded:n,onToggle:a})=>c("div",{className:"flex space-x-lg",children:[t?o(ve,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:a}):null,o(ve,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:qx()})]}),qx=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),Ux=(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(_e,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Wx=()=>{},Hx=e=>"all"===e?"block":"hidden",Yx=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:i=[],renderCard:l=Wx,renderRemoteWorkplaceCard:r=Wx,getBalloon:s=Wx,getBalloonRemoteWorkplaces:d=Wx,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=nn(_i),{filteredItems:y,points:b,filteredRemoteWorkplaces:v,lengthItems:N}=Oi({data:t,remoteWorkplaces:i,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all"),S={filters:Kx([...t,...i]),field:{field:f,reset:x},onlyOffice:p,labels:Ai};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Ux(h,N),m?Vx(m):null,p&&Ox(t,w,C),o("div",{className:u("pb-3xl",Hx(w)),children:$x(S)})]}),o("div",{className:"h-[600px]",children:o(ji,{children:o(Ka,{points:b,isLoad:n,className:"h-full"})})})]}),c(ji,{children:[y.map(l),v.map(r)]})]})})),Kx=e=>Object.keys(_i).filter((t=>e.filter((e=>Ei[t](e))).length)),Gx=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:i,atmCode:l="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Zx(a)},{label:"Модуль приема наличных",value:i?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:l}];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(_e,{size:"text-h4",children:Zx(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(_e,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(bi,{color:"green",children:Zx(s)})})]}),o("div",{className:"hidden sm:block",children:o(oi,{className:"flex-wrap",children:m?.map(Jx)})}),o(ni,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(ai,{isUnfolded:e,children:o(oi,{className:"flex-wrap",children:m?.map(Jx)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ii({isUnfolded:e,onToggle:t})})]},String(d))},Xx=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Zx(t)} №${n}`,body:e.toUpperCase()}),Jx=(e,t)=>o(ii,{...e},String(t)),Zx=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Qx=[];const ey=async e=>{const t=await Pt(e,{method:"GET"});return Array.isArray(t)?t:Qx},ty={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},ny={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)},ay=d((({descriptionData:e,className:t})=>{const n=Ap(),a=n?.code??"000",{data:i,isLoad:l}=function(e){const{data:t,error:n}=ha(`${qt}/atms?regionCode=${e}`,ey);return{data:t||Qx,isLoad:!t&&!n}}(a);return o(Yx,{className:t,filterItems:iy,data:i,isLoad:l,initFilterState:ty,renderCard:Gx,getBalloon:Xx,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),iy=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),a=n.filter((e=>e.startsWith("terminalType"))),i=n.filter((e=>!a.includes(e)));return e.filter((e=>{const t=i.every((t=>ny[t](e))),n=!a.length||a.some((t=>ny[t](e)));return t&&n}))},ly=({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(_e,{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(_e,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:ry({workScheduleDescription:t})}),o(ni,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(ai,{isUnfolded:e,children:ry({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ii({isUnfolded:e,onToggle:t})})]},String(n)):null,ry=({workScheduleDescription:e})=>c("div",{children:[c(oi,{className:"flex",children:[o(ii,{label:"Операции для физических лиц",children:o(_e,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(ii,{label:"Операции для физических лиц",children:o(_e,{children:"Оформление и обслуживание банковских карт"})}),o(ii,{label:"Операции для физических лиц",children:o(_e,{children:"Инвестиционное и накопительное страхование"})}),o(ii,{label:"Операции для физических лиц",children:o(_e,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(ii,{label:"Режим работы",className:"max-w-none",children:o(_e,{children:e})})]}),sy=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),oy={branches:[],remoteWorkplaces:[]};const cy=async e=>await Pt(e,{method:"GET"})||oy,dy=d((({className:e})=>{const t=Ap(),n=t?.code??"000",{data:a,isLoad:i}=function(e="000"){const{data:t,error:n}=ha(`${qt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,cy);return{data:t||oy,isLoad:!t&&!n}}(n);return o(Yx,{className:e,data:a?.branches,isLoad:i,remoteWorkplaces:a?.remoteWorkplaces,renderCard:Ri,renderRemoteWorkplaceCard:ly,getBalloon:Mi,getBalloonRemoteWorkplaces:sy,title:`Офисы филиала ${t?.name}`})})),my=d((({data:e,className:t,...n})=>{const a=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===a?o(dy,{}):o(ay,{descriptionData:e})})})),uy=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(S,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),hy="hidden sm:flex absolute z-40 top-10",py=Ft((({className:e="",padding:t,slides:n=[],...i})=>{const[l,r]=a(0),[s,d]=ud({itemCount:n?.length||0});return c(g,{className:u("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...i,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*l}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Je,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...i})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(id,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(gy({activeSlideIndex:l,onClick:r}))}),d.canScrollLeft?o(xd,{className:u("left-6",hy),onClick:d.scrollLeft}):null,d.canScrollRight?o(yd,{className:u("right-6",hy),onClick:d.scrollRight}):null]})]})})),gy=({activeSlideIndex:e,onClick:t})=>({nav:n},a)=>{const i=a===e,l=i?"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=i?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=i?"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(a),"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",l),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(a))},fy=d((({address:e,email:t,telephone:n,button:a,className:i="",__html:l,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",i),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Le(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:[l?xy({__html:l,richVersion:r}):null,yy({label:"Адрес",data:e,iconName:"GeolocationIcon"}),yy({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),yy({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?$e([a]):null]})]}))),xy=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{...e,itemSize:"list-s"})}),yy=({label:e,data:t,iconName:n,dataColor:a=""})=>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(_e,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(_e,{size:"text-xl",color:a,children:t})]})]}):null,by=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(De,{__html:t,richVersion:n})})})),vy=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:a,labelIcon:i})=>o(Id,{tag:"button",className:u("border-none bg-transparent items-center group/button",i?.icon?"py-xs":"py-lg"),onClick:a,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(_e,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Ny=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",wy=(e=!1)=>e?"MinusIcon":"PlusIcon",Cy=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Sy=Ft((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:a="Развернуть",labelIcon:i,labelIconBgVersion:l,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=Se();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(ni,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(ai,{className:u("gap-lg",Ny(m)),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ky({foldButtonVersion:r,label:a,labelIcon:i,labelIconBgVersion:l,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),ky=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:a,isUnfolded:i,onToggle:l,isMobile:r=!1})=>{const s=t||(i?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Cy(e):wy(e))(i,r);return"accordion"===e?o(vy,{label:s,labelIcon:n,labelIconBgVersion:a,icon:c,onToggle:l}):o(Td,{label:s,icon:i?"ArrowUpIcon":"ArrowDownIcon",onClick:l})},Iy=d((({name:e,text:t,value:n,checked:a,onChange:i,className:l})=>o("div",{className:l,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(mn.split(" ").filter((e=>"rounded"!==e)),Sa,"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:a,onChange:e=>i?.(e.target.value),role:"radio"}),t?o(_e,{color:"text-primary-text",children:t}):null]})}))),Ty=d((({className:e=""})=>{const[t,n]=a("option2"),i=l((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(Iy,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:i}),o(Iy,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:i})]})})),By=d((({data:e,fieldLabel:t,fieldValue:n,selected:a,placeholder:i="",setSelected:l,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===a));return o(Pn,{options:s,label:r,placeholder:i||a,onChange:e=>l(e.key),value:c})})),Py=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:a=[],selectedBranch:i,onSelectedBranch:l})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(By,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(By,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:i,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Ry=["От 1 дня","До 365 дней"],Dy=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(_e,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Xi,{min:1,max:365,value:e,items:Ry,onChange:t})]}))),My=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:a=[],selectedBoxSize:i,onSelectedBoxSize:l})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(By,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(By,{data:a,fieldLabel:"safeBoxCasesSize",selected:i,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),_y=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:a,days:i,selectedCaseVolume:l,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Py,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:Ay(m)}),o(Dy,{days:i,setDays:e=>m({days:e})}),o(My,{caseVolumes:d,selectedCaseVolume:l,onSelectedCaseVolume:Ey(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(_e,{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(Ty,{}),o(ve,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),Ay=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Ey=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},zy=d((({days:e,tariffs:t=[]})=>{const n=Oy(e,t),a="На рисунке изображена пачка листов\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:[Fy("Аренда за",e),Fy("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:a})}),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:a})})]})]})})),Fy=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(_e,{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})]}),Oy=(e,t)=>{const n=Vy(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Vy=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},Ly=(e,t)=>e.find((e=>e.branchCode===t)),$y=d((e=>{const{regions:t,data:n,branches:a,onChange:l,onClick:r}=e;i((()=>{l({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,l]);const s=Ly(a,n.selectedBranch),d=jy(s?.safeBoxCaseVolumes),m=qy(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=Uy(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(_y,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:l}),o(zy,{days:n.days,tariffs:u})]})})),jy=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],qy=(e,t)=>e?.find((e=>e.volume===t)),Uy=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Wy=`${qt}/safeboxes`,Hy=[];const Yy=async e=>await Pt(e,{method:"GET"})||Hy,Ky=d((({title:e,footnote:t,className:n="",...i})=>{const[r,s]=a(!1),d=l((()=>s((e=>!e))),[]),[m,u]=a({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=ho(),p=Gy(m.selectedRegion,h),f=function(e){const{data:t}=ha(e?`${Wy}?regionCode=${e}`:null,Yy);return t||Hy}(p),x=l((e=>u((t=>({...t,...e})))),[u]),y=(b=Ly(f,m.selectedBranch)||f,Array.isArray(b)?b.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):b?.gpsLatitude&&b?.gpsLongitude?[{coords:[b.gpsLatitude,b.gpsLongitude]}]:[]);var b;return c(g,{className:n,defaultPadding:"",...i,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($y,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),y.length&&r?o(Ka,{points:y,className:"h-[640px]"}):null]})})),Gy=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Xy=e=>e<4?"w-72":"w-52",Jy={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"},Zy=d((({buttons:e,className:t="",description:n,showLines:a=!0,steps:i=[],stepVersion:l="gray",title:r,version:s="primary",...d})=>{const m=i.length>3,h=Jy,p=(e=>e?"":"opacity-0")(a),f=Se();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(S,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Kd(f)}),i?.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:Ad(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(i.map(Qy(h,m,l)))}),o("div",{className:u("flex justify-between",m?"gap-x-s":"gap-x-20"),children:i.map((x={styleMap:h,version:s},(e,t,n)=>{const{styleMap:a,version:i}=x,{label:l,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",Xy(n.length)),children:[c("div",{className:"space-y-xs",children:[l?o(_e,{size:"text-h6",align:"text-center",children:l}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:a.description,children:r}):null,o(De,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(ve,{className:"box-border py-s w-full max-w-60 mt-auto",version:i,...s,children:s?.text}):null]},String(t))}))})]}):null,$e(e)]});var x})),Qy=(e,t,n)=>({icon:a},i)=>{const l="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${eb(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:Le(a)?o(ne,{image:{...a,iconVersion:a?.iconVersion||l},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:i+1})},String(i));var r},eb=e=>e?"h-16 w-16":"h-24 w-24",tb=d((()=>o("div",{className:"hidden",role:"none"}))),nb="hidden sm:flex absolute z-40",ab={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},ib=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:l="default"})=>{const[r,s]=ud({itemCount:t?.length||0});return i((()=>lb(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(id,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:ab[l].item,gap:ab[l].gap,children:t.map(Ax(n,a,l))}),s.canScrollLeft?o(xd,{className:u("left-6",nb,ab[l].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(yd,{className:u("right-6",nb,ab[l].buttonTop),onClick:s.scrollRight}):null]})})),lb=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},rb={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},sb=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(rb[t].wrapper,e),children:o(ib,{className:rb[t].component,tabsType:t,...n})}):null,ob=Ft((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=cb(n??{}),p=D(),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:y}=p,[b,v]=a(ub(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[b],w=x.findIndex((e=>Boolean(e.selected)));i((()=>{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)}),[y,w,h]);const C=mb(x[b],b),S=l((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:[sb({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:db(t,x),activeItem:N,tabsType:r,onChange:S}),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:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(mb)?.filter(Boolean)||[]}),cb=({__id:e,anchor:t})=>t??e??"tabs",db=(e,t)=>t?.length?t:e,mb=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",ub=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),hb={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},pb=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:hb[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),gb=d((({className:e="",isOpen:t,onClick:n})=>o(ve,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),fb={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(De,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(_e,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(_e,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:a,isOpen:i})=>e?o(gb,{className:"w-fit",isOpen:i,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},xb=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:l,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=a(!0);i((()=>{l===o&&s||m(!0)}),[s,o]);return yb({cell:e,cellProps:{rowIdx:n,cellIdx:l,fieldIdx:t,displayTable:e=>{m(!1),c(l),r(e)},isVisible:d}})})),yb=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in fb))return null;return o(fb[n],{...t,...a})},bb=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,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(xb,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r},String(s)))):null}))),vb=(e,t)=>140*Bg(e.slice(0,t).map((e=>e?.cols?.length??1))),Nb=(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(_e,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,wb=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,a]=$f({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((i=n,(e,t)=>{if(!e?.length)return null;const[n,...a]=e,l=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(_e,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:l,style:{transform:`translateX(-${vb(a,i)}px)`},children:a?.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(_e,{size:"text-xl",children:e.data}):null,e?.cols?Nb(e.cols,i):null]},`row${t}`)))})})]},String(t))})),jf({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var i})),Cb=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const a=`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(_e,{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(wb,{rows:t.rowsData})})})]},a)}))}))),Sb=(e=!1)=>""+(e?"text-white":"text-secondary-text"),kb=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:a})=>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:()=>a(t),children:o(_e,{size:"text-xl",font:"font-light",color:Sb(t===n),children:e||t+1})},e)))}):null,t?o(ve,{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]}))),Ib=Ft((({tableSource:e,pdfUrl:t,onClick:n})=>{const i=e?.tableData,[r,s]=a(0),d=l((e=>s(e)),[]),m=i?.[r]?.items??[],u=i?.map((e=>e.currency??""));return c("div",i?{className:"bg-white z-10",children:[o(kb,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Cb,{activeTabIndex:r,items:m}),o(gb,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(_e,{size:"text-h6",children:"Данных нет"}),o(gb,{onClick:n,isOpen:!0})]})})),Tb=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(Ib,{...t,onClick:n})}):null]}))),Bb=d((({row:{header:e,data:t},activeIndex:n,rowIdx:i,...r})=>{const[s,d]=a(void 0),m=l((e=>d(e)),[]),[h,p]=a(void 0),g=l((e=>p(e)),[]);return c(Tb,{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(_e,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(pb,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(bb,{cells:e,rowIdx:i,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),Pb=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,jf({...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]})})),Rb=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:i,hiddenRowsNum:l=0,...r})=>{const s=i?.map((({data:e})=>e))||[],d=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,p]=$f({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(Bb,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,y]=l>0?[f.slice(0,-l),f.slice(-l)]:[f,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:l>0?o(ni,{renderFoldableSection:({isUnfolded:e})=>c(Pb,{controls:p,children:[x,o(ai,{isUnfolded:e,children:y})]}),renderFoldButton:Bd}):o(Pb,{controls:p,children:f})})]})})),Db=d((({className:e="",title:t,description:n,iconVersion:a,__html:i,richVersion:l,...r})=>c(g,{className:u("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===a?Mb():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(_e,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?_b(n):null,i?o(De,{richVersion:l,__html:i}):null]})]}))),Mb=()=>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"}),_b=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Ab=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(_e,{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(_e,{size:"text-h2",children:n})}):null]}))),Eb=d((e=>{const{prefix:t,unit:n,suffix:a,...i}=e;return o(g,{defaultPadding:"p-0",...i,children:o(Ab,{prefix:t,unit:n,suffix:a})})})),zb=Ft((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:a=!0,version:i="transparent",isTheme:l=!1,isCardBorder:r=!1,image:s,...c})=>{const d=D();return o(g,{className:u("relative flex flex-col",Of[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:i,isTheme:l,...c,children:R({...c,extraProps:{className:u("w-full",Jc(r)),...Ff(a)}})})}),{childrenTypes:[]}),Fb=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(9),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",Ob=d((({className:e,title:t,url:n,previewImg:a,...i})=>{const l=D();return c(g,{className:e,defaultPadding:Fb(e),...i,children:[o(S,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:q(l)(a?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:q(l)(n)})}):null]})})),Vb={AdTile:Vt,ApplicationForm:Xo,ApplicationLeadForm:Gc,BankAccountFiltration:Hd,BenefitsBlock:Jd,BonusBenefitsBlock:nm,ButtonsBlock:im,CalculatorBonus:mm,CalculatorBusinessDeposit:Nm,CalculatorCredit:zr,CalculatorDeposit:Vm,CalculatorRefinancing:Ym,CardTransfer:eu,Carousel:ou,CarouselCard:uu,CarouselCatalogCard:pu,CarouselLinks:xu,CarouselRecommendationCard:ku,CarouselTariffsCard:Bu,ContactsBlock:Ru,CreditCardForm:vh,CreditForm:np,DepositFiltration:sp,Depository:Cp,ErrorBlock:kp,ExchangeRateTile:cg,Footer:qg,GracePeriod:Ug,GrantSupport:Kg,Header:Af,Headline:S,HorizontalLayout:Vf,ImgBlock:Lf,InsuranceAmountBlock:Yf,InvestmentInfo:Jf,LinkDocs:mx,MobileAppTile:gx,MortgageFiltration:Fx,OfficesAtmsMap:my,Placeholder:uy,ProductBlock:Ot,ProductGallery:py,RepresentativeOfficeInfo:fy,RichTextBlock:by,RollupItem:Sy,SafeDepositRental:Ky,StepsBlock:Zy,StickyBottomMenu:tb,TabsLayout:ob,TariffsTable:Rb,TextBlock:Db,UnitBlock:Eb,VerticalLayout:zb,Video:Ob},Lb=ce((()=>{i((()=>{Zt()}),[]);const e=en();sn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const a=JSON.parse(n?.dataset?.aspects??"[]");Gt({aspectsAttributes:a,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),$b="cookie",jb=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=rn();kg((()=>{globalThis.localStorage?.getItem($b)||n()}),[],3e3);const i=l((()=>{globalThis.localStorage?.setItem($b,"true"),a()}),[]);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(De,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Xl,{className:"bg-main-gray rounded-md w-11 h-11",onClose:i})})]})}):null}));function qb(e){throw new Error(e)}const Ub=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=a(e),i=l((e=>n((t=>[...t,e]))),[]),r=l((()=>n((e=>e.slice(0,-1)))),[]),s=l((e=>n((t=>t.filter((t=>t!==e))))),[]),o=l((()=>n([])),[]);return[t,{setList:n,push:i,pop:r,remove:s,clear:o}]}(),c=l((()=>{e&&e(n),o()}),[n,e]),d=l((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return i((()=>me.subscribe("dialog",(e=>{if(e)switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:qb(e)}}))),[c,d]),n},Wb=d((()=>{const e=l((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=l((e=>{e?.onClose&&e.onClose()}),[]),n=Ub({onCloseAll:e,onClose:t}),{close:a}=ue(),r=l((({key:e})=>{"Escape"===e&&a()}),[]);return sn(globalThis.document,"keydown",r),i((()=>{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},a)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:a!==n.length-1}),children:e},String(t||a))))}):null})),Hb=d((()=>{const[e,t]=a(null),n=l((()=>{t(null)}),[]);i((()=>me.subscribe("popup",(e=>{if(e)switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:qb(e)}}))),[]);const r=l((({key:e})=>{"Escape"===e&&n()}),[n]);return sn(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})),Yb="header",Kb="footer",Gb="sticky-footer",Xb={},Jb=d((({className:e,data:t=Xb,blocksRegistry:n,blockDecorator:a})=>{const{slots:i,blocks:l,fallback:r,...s}=t,d=Et(s,r);Lb(),Ep();const m={key:"",page:{slots:i,blocks:l,fallback:r,...d},blocksRegistry:n,blockDecorator:a,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[i?.[Yb]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(i?.[Yb],{...m,slotName:Yb})}):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(i?.[Kb],{...m,slotName:Kb})]})]}),i?.[Gb]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(i?.[Gb],{...m,slotName:Gb})}):null,o(Wb,{}),o(Hb,{}),o(jb,{__html:d?.cookieContent?.__html})]})}));Object.assign(Jb,{childrenTypes:[],slots:()=>[Yb,Kb,Gb]});e.Blocks=Vb,e.ContentPage=Jb,e.handlerDecorator=ce,e.joinList=Ad,e.locationNavigator=Xt,e.packageVersion="0.14.687",e.projectSettings=_,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=D,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),i=n("useState"),a=n("useEffect"),l=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:i,...a}=t||{},l=n?.slots?.default,r=i||l&&l();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:i="p-xl",padding:a,block:l,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||i,e),...m?{"data-ver":t}:{},...l?.anchor?{id:l.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)=>b(100,e).map((e=>Math.floor(e))).map(y),y=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),b=(e,t)=>[e].concat(t>0?b(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:i,children:a})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:i||a}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),C={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"}},S=d((({className:e,version:t="",headlineVersion:n="XL",title:i,description:a,align:l="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=C[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[i?o(N,{className:u("whitespace-pre-wrap",l),...h?.title,as:r||h?.title.as,title:i}):null,a?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:l,...p,children:a}):null]})})),k=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...i}={}){const{key:a,blockDecorator:l=k,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return l({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:l})=>{const{content:r}=n;return d?o(d,{className:l,block:e,options:t,...r,...i},a):null}},a)}const B=[],P=(e,{key:t,ancestors:n=B,slotName:i=null,extraProps:a,renderProps:l=T,...r})=>{const s=a?(e,t)=>T(e,t,a):l;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||B,[r.parent,i]]:n},a)))};function R({block:e,options:t,children:n,extraProps:i,renderProps:a}){return n||(e&&t?P(e.blocks,{...t,parent:e,extraProps:i,renderProps:a}):null)}function D(){return D._impl()}D._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),D.setup=e=>{D._impl=e};const M=["CDN","BASE_PATH"],_=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return M.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),E=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),z=e=>Boolean(e?.startsWith("#")),F=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),O=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),V=(e,t)=>!(!e||!t)&&(!!e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:A,isLocalURL:E,isHash:z,withoutQuery:F,joinPath:O,hasPrefix:V});const $="/api/",j=`${$}v1/storage`,q=e=>(t,n)=>{if([!t,A(t),z(t),[_.CDN,$].some((e=>V(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`${j}/${t}/attachment`;const i=t?.startsWith("/");return O(V(t,n)?"":n,i?"/":(a=e.pathname,a?.split("/").slice(0,-1).join("/")),t);var a},U={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:i=`Иконка ${n}`,title:a=i,iconVersion:l="color",width:r,height:s})=>{const d=D(),m="normal"===l?`${n}.svg`:`sprites.svg#${n}`,h=q(d)(O(_.CDN,"/icons/",m));return"normal"===l?o("img",{className:e,src:h,alt:i,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:u(Y(r),U[l],{invert:"white"===l},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,i?o("desc",{children:i}):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)),G=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function X(e=""){try{return new URL(e).pathname}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":X(G.SITE_URL);return t&&!A(t)?q(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const i=D();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:a},l)=>o("source",{srcSet:J(i)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${l}_${e}`))):null,t?.src?ee({...t,src:J(i)(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="",...i})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...i}):o(Q,{className:e,imageClassName:n,image:t}):null)),ie={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",le={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?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=e=>ce._impl(e);function de(e,t){const n=s({});return r((()=>new Proxy({},{get:(i,a)=>(n.current||={},n.current[a]||=n=>e.fire(t,{...n??{},type:a}),n.current[a])})),[e,t])}ce._impl=e=>e,ce.setup=e=>{ce._impl=e};class me{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const ue=new me,he=()=>de(ue.emitter,"dialog");function pe(){const e=X(G.SITE_URL),t=D(),{closeAll:n}=he();return e=>{const n=q(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:ce(i({...e,href:n}))}};function i({href:i,target:a,onClick:l}){return r=>{l?.(r),ge(i,a,e)||(n(),r?.preventDefault(),t.push(((e,t="")=>e?.replace(t,"")||"/")(i,e)))}}}const ge=(e,t,n)=>{if(!E(e,t))return!0;const i=G.SUB_PORTALS?.split(",");return!!i?.some((t=>V(e,t)))||!V(e,n||"/")},fe=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},xe=d((e=>{const{text:t,aboveText:n,appendLeft:i,appendRight:a,version:l="primary"}=e,r=be(e)&&"hidden lg:block";return c("div",{className:u(ye(e),"flex gap-xs"),children:[i?o("div",{className:u(r,se[l]),children:i}):null,be(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[l]),children:a}):null]})})),ye=e=>{const{version:t,aboveText:n,rounded:i}=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",be(e)?a:"h-12 w-12 m-auto",{"rounded-full":i})},be=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),ve=({className:e,rounded:t,version:n})=>["inline-block",re,n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Ne=d((({disabled:e,children:t,method:n="LINK",href:i,...a})=>{const r=(({method:e,href:t})=>l((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:i,pathname:a,searchParams:l}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[i,a].join(""));for(const[e,t]of l.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:i}),s=pe()({onClick:r,href:i,...a}),c=t??o(xe,{...s});return o(e?Ce:we,{...s,children:c})})),we=d((({className:e="",href:t,rel:n,target:i,ariaLabel:a,version:l,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:l,rounded:r}),href:t,rel:n,target:i,"aria-label":a||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...fe(d),children:m}))),Ce=d((({className:e,ariaLabel:t,version:n,rounded:i,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ve({className:e,rounded:i,version:n}),children:a})));function Se({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:i=!1}){if(!n)return null;const a="primary"===e?"white":"black",l="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(i?"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}),l),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(Ne,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const ke=()=>{const[e,t]=i(false);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Ie={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Te=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&Ie[n],t),children:e}):null,Be=d((({className:e,version:t="primary",defaultPadding:n,padding:i="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...y})=>{const b=ke(),v=D(),N=l((()=>v.back()),[]),w=y.options?.page?.common?.backwardButton,C=f&&!b;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",i||n,e),children:[C&&Se({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:[Te(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]}),Re(R({...y,extraProps:{className:"@container-normal"}})),Te(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Pe(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Pe=e=>u(e?"row-span-2":"@xl:row-span-2"),Re=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,De=(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,Me=d((e=>{const{__html:t="",richVersion:n="",itemSize:i="list-m",isDotted:a=!0}=e,l=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,i,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",l),dangerouslySetInnerHTML:{__html:t}})}):null})),_e=(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,Ae=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Ee=(e,t)=>e?o(Ae,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,ze=(e,t)=>["label"in e?Ee(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:_e(e.description,t)},String(t)):null,"__html"in e?o(Me,{...e},`rte-${t}`):null],Fe=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?De(n.icon,t):null,o("div",{children:ze(n)})]}))),Oe=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(Fe,{benefitsVersion:t,...e},String(n))))}):null)),Ve=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(ze)}):null)),Le=d((({isTabularBenefits:e,...t})=>o(e?Ve:Oe,{...t}))),$e=e=>Boolean(e?.src||e?.icon),je=(e,{className:t,buttonClassName:n,isVertical:i}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",i?"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(qe(n))}):null,qe=(e="")=>(t,n)=>{const{text:i,icon:a,iconRight:l,version:r,...s}=t||{},c=Ue(a,r),d=Ue(l,r);return i||a?.icon?o(Ne,{className:u("basis-full @lg:basis-auto",e),appendLeft:We({...a,iconVersion:c}),appendRight:We({...l,iconVersion:d}),version:r,text:i,...s},n?String(n):""):null},Ue=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},We=e=>$e(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),He=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Ye=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(Ke)}):null)),Ke=({label:e,amount:t,unit:n},i)=>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(Ae,{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:[He(2)(t)," ",n||"₽"]}):null]},String(i)),Ge=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Xe)}):null)),Xe=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ae,{size:"text-m",font:"font-light",children:e})},String(t)),Je={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Ze=d((({className:e,padding:t,defaultPadding:n,title:i,description:a,headlineVersion:l="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:y,image:b,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:k,children:I,...T})=>{const B=b?.src?o(ne,{image:b}):null,P=o(S,{title:i,description:a,headlineVersion:l,align:r,isEmbedded:!0}),R=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Be,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Qe(B,N),isImageSecondary:C,imageAlign:v,isImageAlwaysOnRight:w,buttons:je(y),backwardButton:k,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(Le,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(Me,{richVersion:p,__html:h,isDotted:m,itemSize:Je[l]}):null,I,f?.length?o(Ye,{priceList:f}):null,et(x)]})})})),Qe=(e,t)=>t?{rightImage:e}:{leftImage:e},et=e=>e?.length?o(Ge,{tags:e}):null;class tt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof tt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const nt=()=>!0,it=(e,t)=>(...n)=>e(...n)&&t(...n),at=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const lt=e=>Boolean(e&&Array.isArray(e)),rt=e=>Boolean(e&&"object"==typeof e&&!lt(e)),st=e=>e;function ot(e){return e instanceof tt?e._:e}class ct extends tt{from(e){return this.of(e.map(((e=st)=>([,t])=>e(t))(ot)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(lt(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,i)=>i===e?t:this._[i])):Array.from({length:Number(e)+1},((n,i)=>i===e?t:void 0)))}}class dt extends tt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class mt extends tt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,ot(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class ut extends tt{proto=at([e=>lt(this._)||"number"==typeof e,()=>ct.prototype],[e=>rt(this._)||"string"==typeof e,()=>mt.prototype],[nt,()=>dt.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const ht=e=>e instanceof tt?e:new ut(e),pt=e=>{const t=(t,...n)=>ot(e(ht(t),...n));return t.fn=e,t},gt=[],ft=e=>e instanceof Function?e:t=>e===t,xt=e=>(t,n,i=gt)=>ht(t).entries().reduce(((t,[n,a])=>xt(e)(a,t,i.concat(n))),e(n,[i,ht(t)])),yt=pt(((e,[t,n])=>{const[i,...a]=t;return e.set(i,a.length?yt(e.get(i),[a,n]):n)})),bt=pt(((e,t)=>t.reduce(yt.fn,e))),vt=e=>xt(((e,[t,n])=>Nt(n)?[...e,[t,ot(n)]]:e))(e,[]),Nt=e=>0===e.size();pt(((e,t=gt)=>t.reduce(((e,t)=>e.get(t)),e)));const wt=pt(((e,[t,...n])=>n.length?e.set(t,wt(e.get(t),n)):e.filter((([e])=>e!==t)))),Ct=(St=["$ref"]).map(((e,t)=>n=>ft(e)(n[t+n.length-St.length]))).reduceRight(it,nt);var St;const kt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(It,e),It=at([lt,(e,t)=>e[parseInt(t,10)]],[rt,(e,t)=>e[t]],[nt,st]),Tt=(e,t)=>((e,t={})=>n=>bt(t,vt(n).map((t=>e(t)))))((([e,n])=>{return Ct(e)?[(i=e,i.slice(0,-1)),kt(t(n),n)]:[e,n];var i}))(e),Bt=e=>vt(e).filter(((e=st)=>([t])=>e(t))(Ct)),Pt=e=>{return t=Bt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Rt(e,t){try{return e?await Dt(e,t):null}catch(e){console.error(e)}return null}const Dt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),Mt=e=>[...new Set(e)],_t={},At=["/portal-resources"],Et=(e,t)=>Tt(e,(e=>t?.[e])),zt=(e,t)=>{const n=Pt(e),[l,r]=i({});return a((()=>{Ft(n).then(r)}),[n.join()]),n.length?Et(e,{...t,...l}):e},Ft=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(Mt(e).filter((e=>!At.some((t=>e.startsWith(t))))).map((async e=>[e,_t[e]||=await Dt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),i={...t,...n},a=Object.entries(n).flatMap((([,e])=>Pt(e)));return a.length?Ft(a,i):i}return t};function Ot(e,t={}){const n=d((t=>{const n=zt((({block:e,options:t,className:n,defaultPadding:i,padding:a,isTheme:l,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Vt=Ot((({className:e,padding:t,defaultPadding:n,...i})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...i,children:o(Ze,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...i})})),{childrenTypes:["UnitBlock"]}),Lt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>$t(0,t?.length)),[t]),i=t?.[n];return i?o(Vt,{suppressHydrationWarning:!0,...i,...e}):o(g,{...e,children:o(f,{})})})),$t=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),jt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),i=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${i}-${n}`:`${n}.${i}.${a}`}},qt=e=>e?.replace(/[^+\d]/g,""),Ut="/api/v1";const Wt=e=>e?{phone:qt(e)}:{},Ht=(e,t="birthday")=>e?{[t]:jt(e)}:{},Yt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Kt=(e,t=!0)=>({[t?"email":"mail"]:e}),Gt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:qt(e)}:{},Xt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:i,params:a}of e)t[i??""]?.(n,a)};function Jt(){return Jt._impl()}Jt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Jt.setup=e=>{Jt._impl=e};const Zt="rshb-query-params";function Qt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Zt)||"";return e&&globalThis.sessionStorage?.setItem(Zt,e),e}const en=e=>{const t=e.target?.closest("a"),n=Jt();if(A(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const i=(e=>{const t=Qt();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,i]of new URLSearchParams(t))n.searchParams.set(e,i);return n.toString()})(t?.href)||t?.href;i&&n.assign(i,t?.target)}};function tn(){return tn._impl()}tn._impl=()=>({forwardQuery:en}),tn.setup=e=>{tn._impl=e};const nn=e=>e,an=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=i(e),c=l(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return ln(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=i(!1),[u,h]=i({}),p=l(((e,t)=>{const{parse:n=nn,format:i=nn}=t||{};return{value:i(s[e]),isDirty:d||u[e],onChange:t=>{c((i=>({...i,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=l((e=>{c(e),h(e)}),[]),f=l((()=>{c(e),m(!1),h({})}),[e]),x=l((e=>(e.preventDefault(),t?f():m(!0),n&&n(s,e),s)),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},ln=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),rn=d((e=>{const{className:t,title:n,children:i,...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,i]})})}));function sn(e,t={}){const{open:n,close:i,...a}=he();return{open:l(((a,l={})=>n({dialog:o(e,{...t,...a,onClose:()=>{i(),a.onClose?.()}}),...l})),[e,n,i]),close:i,...a}}function on(e=!1){const[t,n]=i(e),a=l((()=>n(!0)),[]),r=l((()=>n(!1)),[]),s=l((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}function cn(e,t,n,i){a((()=>{if(e&&n)return e.addEventListener(t,n,i),()=>{e.removeEventListener(t,n,i)}}),[e,t,n])}function dn(e){const t=s(null),n=l((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return cn(globalThis.document,"click",n),t}const mn=({label:e,errors:t})=>e&&t?`${e}*`:e,un=()=>{},hn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",pn=e=>e?o(Ae,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,gn=d((({key:e,className:t="",id:n,name:i,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:y,pattern:b,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const C=s(null),S=l((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);a((()=>{v&&C.current?.focus()}),[v,C]);const k=g?"pr-3xl":"",I=fn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[pn(d),N?o("textarea",{className:u("block resize-y min-h-24",xn,I),id:u("textarea",n),name:i||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:y,disabled:w},e):o("input",{type:r,className:u("h-14",xn,k,I),ref:C,id:n,name:i||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:y,pattern:b,disabled:w},e)]}),g]})})),fn=e=>e?hn:"border-error",xn="w-full border rounded-md text-primary-text outline-none p-m",yn=e=>o("div",{className:"h-6",children:e?o(Ae,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),bn=e=>e?.value||"",vn={url:"suggest/address"},Nn={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||""},addressRegistration:vn,addressFact:vn,organizationAddress:vn,addressCourier:vn},wn=()=>de(ue.emitter,"popup"),Cn=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 Sn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=i([]),f=wn(),x=Nn[n],y=l((()=>{h.current=t,f.close()}),[t]),b=l((e=>{y(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[y,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await(e=>{const{url:t,query:n,queryPrefix:i,requestData:a={},responseItemHandler:l=bn}=e,r=(s=l,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${i?`${i}, `:""}${n}`;return fetch(`${Ut}/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 i=(...a)=>{i.dispose(),n=setTimeout((()=>{e(...a)}),t)};return i.dispose=()=>{n&&clearTimeout(n)},i})(N,300)),[N]);return a((()=>{if(!e||!v.current||h.current===t)return void y();const n=v.current,{top:i,left:a,width:l,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.open({popup:o(Cn,{options:p,value:t,onChange:b}),top:i+globalThis.scrollY+r,left:a,width:l})}),[e,p,t,b]),v}const kn=d((({className:e,label:t,value:n="",placeholder:i,error:r,errors:s,onChange:d=un,onDaDataChange:m,onBlur:h,isTextarea:p,type:g,name:f="",daDataQueryPrefix:x,isInteger:y=!1,maxLength:b,dadata:v=!1,disabled:N=!1})=>{const[w,{setFalse:C,setTrue:S}]=on(),k=dn(C),I=l((e=>{v&&!w&&S(),b?e.length<=b&&d(e):d(e)}),[v,w,d]);a((()=>{y&&n&&d(In(n))}),[n]);const T=Sn({isOpen:w&&v,name:f,value:n,daDataQueryPrefix:x,onChange:d,onDaDataChange:m});return c("div",{className:u("shrink-0 w-full",e),ref:k,onBlur:C,onFocus:S,children:[o("div",{ref:T,children:o(gn,{disabled:N,type:g||"text","aria-label":t,label:mn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:I,onBlur:h,isTextarea:p,placeholder:Tn(i,s,t)})}),yn(r)]})})),In=(e="")=>e.replace(/[^\d]+/g,""),Tn=(e,t,n)=>t&&!n?`${e}*`:e,Bn=e=>e?.text||e?.key||"",Pn=(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:i,onChange:a,iconVersion:l})=>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:Pn(t,i).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:Bn(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:l,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const Dn=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[y,{setFalse:b,setTrue:v}]=on(),[N,w]=i(""),C=An(x,n.length),S=y&&!C,k=l((()=>{w(""),b()}),[]),I=function({isOpen:e,options:t,value:n,query:i,onChange:r,onClose:c,iconVersion:d}){const m=wn(),u=l((()=>{m.close(),c&&c()}),[c]),h=l((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=dn(u);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:l,left:r,width:s,height:c}=a.getBoundingClientRect();m.open({popup:o(Rn,{popupRef:g,options:t,value:n,query:i,onChange:h,iconVersion:d}),top:l+window.scrollY+c,left:r,width:s})}),[e,t,n,i,h]),p}({isOpen:y,options:n,value:r,query:N,onChange:f,onClose:k,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[pn(t),c("div",{className:u("relative",S?"z-20":"z-10"),ref:I,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",_n(m,d,C)),onClick:S?k:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Bn(r)||h}),Mn(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(gn,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),Mn=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),_n=(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"),An=(e,t)=>e||0===t,En=d((({className:e="",label:t,error:n,errors:i,...a})=>c("div",{className:e,children:[o(Dn,{...a,valid:!n,label:mn({label:t,errors:i})}),yn(n)]}))),zn=e=>!e?.length,Fn=e=>t=>n=>e(n)?[]:[t],On=Fn((e=>null!=e&&""!==e)),Vn="Некорректно заполненное поле",Ln="Укажите регион, город/населенный пункт, улицу, дом",$n=e=>On(e??Vn),jn=e=>Fn((e=>e?.key&&""!==e?.key))(e??Vn),qn=e=>Fn((e=>"string"==typeof e&&e.length>0&&e.length<=2))(e??Vn),Un=e=>Fn((e=>"string"==typeof e&&e.length>1&&Qn(e)))(e??Vn),Wn=(e,t)=>Fn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??Vn),Hn=e=>Fn((e=>"string"==typeof e&&6===e.length))(e),Yn=e=>{return(t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Fn((e=>"string"==typeof e&&t.test(e))))(e);var t},Kn=Fn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Gn=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},Xn=e=>Boolean(e.region&&e.city&&e.house),Jn=()=>Fn(Xn)(Ln),Zn=/^[\u0400-\u04FF\d]+$/u,Qn=(e="")=>Zn.test(e),ei=e=>{const t=new Date,n=new Date(t.getFullYear()-23,t.getMonth(),t.getDate()),i=new Date(t.getFullYear()-75,t.getMonth(),t.getDate());return!(!e||e>n||e<i)},ti={typeForm:$n(),surname:Un("Укажите свою фамилию"),name:Un("Укажите своё имя"),middleName:Un("Укажите своё отчество"),region:jn(),addressBranch:jn(),phone:Yn("Укажите номер телефона"),secondaryPhone:Yn("Укажите номер телефона"),organizationPhone:Yn("Укажите номер телефона"),birthday:$n("Укажите дату рождения"),limitedBirthday:Fn(ei)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:$n("Укажите место рождения"),education:$n("Выберите ваше образование"),housing:$n("Выберите тип жилья"),employment:$n("Выберите информацию о трудоустройстве"),organization:$n("Выберите тип организации"),amountWorkers:$n("Выберите информацию о количестве сотрудников"),employerActivities:$n("Выберите вид деятельности организации"),employerOrganization:$n("Выберите вид организации"),positionOrganization:$n("Выберите вашу должность"),dulSerie:(ni="Укажите серию паспорта",Fn((e=>"string"==typeof e&&4===e.length))(ni)),dulNumber:Hn("Укажите номер паспорта"),dulIssueDateField:$n("Укажите дату выдачи паспорта"),dulSubdivisionCode:Hn("Укажите код подразделения"),dulIssuedBy:$n("Укажите организацию, выдавшую паспорт"),email:(e=>Fn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),fullName:Un(),inn:(e=>Fn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),legalForm:$n("Укажите ОПФ"),organizationName:$n("Укажите наименование организации"),generalSeniority:qn("Укажите количество лет стажа"),lastJobExperience:qn("Укажите стаж на последнем месте работы"),experience5Years:qn("Укажите общий стаж за последние 5 лет"),jobsNumber:qn("Укажите количество мест работы за последние 5 лет"),beginDate:$n("Укажите дату заключения трудового договора"),addressFact:Jn(),partnerComments:$n(),collectionCount:$n(),comment:$n(),acquiringType:jn(),feedbackMethod:jn(),serviceType:jn(),serviceDirection:jn(),regionRetail:jn("Выберите регион"),meetingDay:$n(),product:$n(),localities:$n(),consentDataProcessing:Kn,annualRevenue:$n(),consentToReceiveMaterials:Kn,processPersonalDataFlg:Kn,consentProviderFlg:Kn,consentPfrFlg:Kn,consentOthersFlg:Kn,consentInformFlg:Kn,familyStatus:$n("Выберите семейное положение"),children:Wn(2,"Укажите количество детей"),familyMembers:Wn(2,"Укажите количество членов семьи"),dependents:Wn(2,"Укажите количество иждивенцев"),totalIncome:Wn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:Wn(10,"Укажите сумму обязательных выплат"),snils:(e=>Fn(Gn)(e))("Некорректный номер СНИЛС"),conscription:$n(),armyIdFlg:Kn,sex:$n("Укажите свой пол"),addressRegistration:Jn(),organizationAddress:Fn((e=>Boolean(e.fiasCode&&e.city&&e.house)))(Ln),participantDateRegistration:$n("Укажите дату регистрации"),retirementIncome:$n(),otherIncome:$n(),wages:$n(),mandatoryPayments:$n(),disablePeopleFlg:$n(),bankruptcyFlg:$n(),shareholderFlg:$n(),legalEntityName:$n(),bankEmployeeCode:$n(),partInBusiness:$n(),addressRetail:jn("Выберите адрес банка"),addressMatch:$n(),codeWord:(e=>Fn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&Qn(e)))(e??Vn))("Необходимо ввести кодовое слово"),confirmationIncome:$n(),deliveryDate:$n("Укажите дату доставки"),addressCourier:Jn(),cardCategory:$n("Укажите категорию карты"),paymentSystem:$n("Укажите тип платежной системы")};var ni;const ii=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>Boolean(e?.required))));return Object.fromEntries(t.map((e=>[e,ti?.[e||""]])).filter((([,e])=>e)))},ai=(e,t)=>{const{value:n,isDirty:i}=e,a=i?t(n):[];return{...e,errors:a,error:a[0]}},li=(e,t,n=!1)=>n&&t?ai(e,t):e,ri=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],si=d((({field:e,input:t})=>o(En,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:ri,...li(e("acquiringType"),ti.acquiringType,t?.required)}))),oi=(e="")=>Boolean("trade"===e||"all"===e),ci=e=>null!=e,di=new Map,mi=(e,t=di)=>n=>{const i=hi(n),a=t.get(i);if(i&&ci(a))return a;const l=e(...n);return i&&ci(l)&&t.set(i,Promise.resolve(l)),l},ui=e=>Boolean(e?.every((e=>Array.isArray(e)?ui(e):!e||"string"==typeof e))),hi=e=>ui(e)?e.toString():"",pi=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function gi(e,t,{fallback:n,cache:l}={}){const s=r((()=>fi(e)),[e]),[o,c]=i(void 0),[d,m]=i(void 0);a((()=>{if(!s.some(ci))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await mi(t,l)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,l,s]);const u=n&&pi(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function fi(e){return Array.isArray(e)?e:e instanceof Function?fi(e()):[e]}const xi=`${Ut}/branches`,yi=[];const bi=async e=>await Rt(e,{method:"GET"})||yi;function vi(e=!1){const{data:t}=gi(`${Ut}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,Dt);return Array.isArray(t)?t:[]}const Ni=d((({field:e,input:t,isPremium:n=!1})=>{const i=e("region"),l=i?.value?.key,r=i?.value?.text,s=n?vi(n)?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=gi(e?`${xi}?regionCode=${e}`:null,bi);return t||yi}(l)?.filter((e=>e?.address));return a((()=>{""!==i?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[i?.value]),o(En,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...li(e("addressBranch"),ti.addressBranch,t?.required),isSearch:!0})})),wi=d((({field:e,input:t})=>{const n="addressFact",i=e(n).value,{value:r}=e("addressMatch");a((()=>{r&&e("addressFact")?.onChange?.(e("addressRegistration").value)}),[r,e("addressRegistration").value]);const s=l((t=>{e?.(n)?.onChange?.({apartment:t?.data?.flat,city:t?.data?.city,district:t?.data?.area_with_type,fullAddress:t?.value,fiasCode:t?.data?.fias_id,house:t?.data?.house,locality:t?.data?.settlement_with_type,okatoRegionCode:t?.data?.okato,postcode:t?.data?.postal_code,region:t?.data?.region,regionCode:t?.data?.region_kladr_id?t?.data?.region_kladr_id.substring(0,2):"",street:t?.data?.house,qc:t?.data?.qc,qcComplete:t?.data?.qc_complete,qcHouse:t?.data?.qc_house})}),[]),c=l((t=>{e?.(n)?.onChange?.({...e(n).value,fullAddress:t})}),[]);return o(kn,{label:"Адрес",disabled:r,...li(e(n),ti[n],t?.required),value:i.fullAddress,onChange:c,...t,onDaDataChange:s})})),Ci=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,Si=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",i=e(n).value,a=l((t=>{e?.(n)?.onChange?.({apartment:t?.data?.flat,city:t?.data?.city,district:t?.data?.area_with_type,fullAddress:t?.value,fiasCode:t?.data?.fias_id,house:t?.data?.house,locality:t?.data?.settlement_with_type,okatoRegionCode:t?.data?.okato,postcode:t?.data?.postal_code,region:t?.data?.region,regionCode:t?.data?.region_kladr_id?t?.data?.region_kladr_id.substring(0,2):"",street:t?.data?.house,qc:t?.data?.qc,qcComplete:t?.data?.qc_complete,qcHouse:t?.data?.qc_house})}),[]),r=l((t=>{e?.(n)?.onChange?.({apartment:"",city:"",district:"",fullAddress:t,fiasCode:"",house:"",locality:"",okatoRegionCode:"",postcode:"",region:"",regionCode:"",street:"",qc:"",qcComplete:"",qcHouse:""})}),[]);return o(kn,{disabled:t?.filledByEsia&&Ci(e,n),label:"Адрес",...li(e(n),ti[n],t?.required),value:i.fullAddress,onChange:r,...t,onDaDataChange:a})})),ki=d((({className:e,viewBox:t,fill:n="none",width:i,height:a,paths:l,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:i,height:a,children:l.map((({d:e,fill:t,...n},i)=>{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},i)}))}))),Ii="appearance-none w-5 h-5 border-solid flex-none",Ti=[{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"}],Bi=d((({className:e,value:t,text:n,disabled:i,isRadio:a,onChange:r})=>{const s=l((e=>{i||(e.preventDefault(),r&&r(!t))}),[r,i,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(ki,{paths:Ti,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",Ri(i)),onClick:s,children:[o("div",{className:u(Ii,"m-0",a?"rounded-full border-2":Mi(t),!i&&t?"border-primary-main":"border-gray",i?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Di(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(i),"aria-label":n}),t?d:null,Pi(n)]})})})),Pi=e=>e?o("div",{className:"ml-s",children:o(Ae,{size:"text-l",font:"font-light",children:e})}):null,Ri=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Di=(e=!1)=>e?"radio":"checkbox",Mi=(e=!1)=>u("rounded border",{"bg-primary-main":e}),_i=d((({className:e,text:t,value:n,key:i,disabled:a,error:l,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Bi,{text:t,value:n,disabled:a,onChange:r},i),yn(l)]}))),Ai=d((({field:e,input:t})=>o(_i,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...li(e("addressMatch"),ti.addressMatch,t?.required)}))),Ei=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"})}))),zi="/icons/MapMarkerClusterIcon.svg",Fi="/icons/MapMarkerClusterYellowIcon.svg";function Oi({yandexMaps:e,map:t,points:n,isLoad:i}){if(i||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),l=Vi("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const i=Vi("workplaces",e,a),r=Li(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Li(n.filter((e=>"offices"===e.type)),"offices",e);l.add(s),i.add(r),t.geoObjects.add(i),t.geoObjects.add(l)}else{const i=Li(n,"offices",e);l.add(i),t.geoObjects.add(l)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Vi=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?zi:Fi,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Li=(e,t,n)=>e.map((({coords:e,content:i})=>new n.Placemark(e,{balloonContentHeader:i?.header,balloonContentBody:i?.body,balloonContentFooter:i?.footer,hintContent:i?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?zi:Fi,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),$i={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},ji={...$i,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},qi=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(ji).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"})}),Ui=e=>globalThis[e],Wi=(e,t)=>{const n=document.getElementById(t);if(n){const t=Ui(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Ui(e))}))}))}return new Promise(((n,i)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(Ui(e))})),a.addEventListener("error",(e=>{i(e)})),document.head.appendChild(a)}))};const Hi=()=>function(e,t,n=!0){const[l,r]=i(void 0);return a((()=>{let i=!0;return Wi(e,t).then((e=>{i&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(i=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${_.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),Yi={...$i,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Ki=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),i="in"===t?n+1:n-1;e.current.setZoom(i,{checkZoomRange:!0})},className:`${Object.values(Yi).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Gi=[55.753995,37.614069],Xi=d((({points:e,className:t="",zoom:n=5,isLoad:i,selectedAddress:l})=>{const r=s(null),d=s(null),m=Hi();if(a((()=>{r.current?Oi({yandexMaps:m,map:r.current,points:e,isLoad:i}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:Ji(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),Oi({yandexMaps:m,map:r.current,points:e,isLoad:i})})),r.current&&l&&m?.geocode(l).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();r.current.setCenter(t),r.current.setZoom(18)}))}),[m,e,n,i,l]),!m)return null;const h="z-10";return c("div",{ref:d,className:u("relative","w-full",t),children:[i?o(Ei,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(Ki,{yandexMaps:r}),o(Ki,{yandexMaps:r,direction:"out"})]}),qi(r,m,u("right-2 top-80",h))]})})),Ji=e=>{const t=[Qi(Zi(e,0)),Qi(Zi(e,1))];return t.every((e=>e))?t:Gi},Zi=(e,t)=>e.map((e=>e.coords?.[t])),Qi=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,ea=async(e,t,n)=>{try{return(await ta(e,t,n)).json()}catch(e){return console.error(e),null}};async function ta(e,t,n){return globalThis?.fetch?.(`${Ut}${e}`,{method:t,headers:{"Content-Type":"application/json",...na()},credentials:"include",body:n?JSON.stringify(n):null})}const na=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},ia=e=>Number(e.toString().replace(",",".")),aa=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=i(n),d=l((()=>{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 la=d((({className:e="",isUnfolded:t,children:n})=>{const i=s(null),l=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const i=new ResizeObserver((n=>{e(t,n[0])}));return i.observe(t),()=>{i.disconnect()}}),[e,...t]),n}((e=>{i.current&&(i.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:i,className:`transition-max-h duration-300 overflow-hidden ${i.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:l,children:n})})})),ra=d((({value:e,subText:t,children:n,isPhone:i,...a})=>{const l=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[l.length,n,t].every((e=>!e))?null:sa({textItems:l,subText:t,children:n,isPhone:i,...a})})),sa=({label:e,labelSize:t="text-m",textItems:n,subColor:i,subText:a,className:l,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",l),children:[e?o(Ae,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||oa(n,s),a?o(Ae,{color:i,size:"text-m",children:a}):null]}),oa=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ae,{size:"text-l",children:t?o("a",{href:`tel:${ca(e)}`,children:e.trim()}):e.trim()},String(n)))),ca=e=>e.replace(/\D/g,""),da=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}))),ma=e=>{const t=ha(e);return o(ra,{label:"Режим работы",value:t,className:"max-w-none"})},ua=({workTime:e="",lunchHour:t="",daysOff:n=""},i=!1)=>e?[`${i?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",ha=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))),i=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[ua({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":i}),ua({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:i},!0)].filter(Boolean)},pa=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],ga=e=>pa.map((([t,n,i])=>({key:t,title:i,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??"")}}))),fa=e=>{if(!e)return null;const t=xa(e);return c(da,{className:"border-none",children:[o(ra,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(ya)})}),o(ra,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]})},xa=e=>{const t=pa.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],i=n[n.length-1]?.toLowerCase();return i?.includes("выходной")?t.map((e=>({...e,status:!i?.includes(e.short.toLowerCase())}))):t},ya=({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(Ae,{size:"text-xs",children:e})},String(n)),ba=({currency:e,buyExchangeRate:t,saleExchangeRate:n},i)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(ra,{label:"Валюта",value:e.currency}):null,t?o(ra,{label:"Купить",value:String(t)}):null,n?o(ra,{label:"Продать",value:String(n)}):null]},String(i)),va={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"}},Na=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",va[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(Ae,{size:"text-m",color:va[n].text,children:t})]}))),wa=(new Date).getDay(),Ca=e=>{const[t]=e?.slice(wa-1)??[];if(!t)return null;const{lunchHour:n,status:i,workTime:a,hasLunch:l}=t;return i?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Na,{color:"green",children:a}):null,n&&l?o(Na,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Na,{color:"red",children:"Выходной"})},Sa=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",ka=({title:e,status:t,workTime:n,lunchHour:i,hasLunch:a},l)=>o(ra,{label:e,value:t&&n?n:"",subText:Sa({lunchHour:i,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(l)),Ia=["ArrowDownIcon","ArrowUpIcon"],Ta=["Подробнее","Скрыть"],Ba=({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:Ta[Number(e)]}),o(W,{className:"text-primary-text",name:Ia[Number(e)],width:"16",height:"16"})]}),Pa=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Ra=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Da=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Ma=({name:e,address:t,phone:n,fax:i,phoneBusiness:a,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=ga(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(Ae,{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(Ae,{size:"text-l",children:t})]}):null]}),Ca(h)]}),o("div",{className:"hidden sm:block",children:_a({phone:n,fax:i,phoneBusiness:a,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(aa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(la,{isUnfolded:e,children:_a({phone:n,fax:i,phoneBusiness:a,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ba({isUnfolded:e,onToggle:t})})]},String(u))},_a=({phone:e,fax:t,phoneBusiness:n,phoneNatural:i,phoneCallCentre:a,phoneCurrencyControl:l,workSchedule:r,exchangeRate:s})=>{const d=ga(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(da,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(ra,{label:"Факс",value:t,isPhone:!0}),o(ra,{label:"Телефон филиала",value:e,isPhone:!0}),o(ra,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(ra,{label:"Обслуживание физических лиц",value:i,isPhone:!0}),o(ra,{label:"Для консультаций по валютному контролю",value:l,isPhone:!0}),o(ra,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(da,{children:o(ra,{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(ka)})})}):c(da,{children:[o(ra,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(ya)})}),ma(d)]}),r?.businessScheduleVisibleTag?fa(r?.businessScheduleDescription):null,s?.currencies?.length?o(da,{className:"flex-wrap",children:s?.currencies?.map(ba)}):null]})},Aa=({name:e="",address:t="",workSchedule:n})=>{const i=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const l=`${t} ${(e=>{const t=ga(e),n=e?ha(t):"",i=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Pa(n):Da(n,i):Ra(n):""})(n)}`;return{header:i,body:l}},Ea={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},za={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Fa={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)},Oa=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Fa[t](e)))))},Va=()=>{},La=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:i=Va,getBalloonRemoteWorkplaces:a=Va})=>{const[l,s,o,c]=r((()=>{const l=Oa(e,n),r=Oa(t,n),s=[...l.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:i(e)}))),...r.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[l,s,r,l.length+r?.length]}),[e,t,n,i,a]);return{filteredItems:l,points:s,filteredRemoteWorkplaces:o,lengthItems:c}},$a=e=>{const{data:t,error:n}=gi(`/api/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,ja);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},ja=async e=>await Rt(e,{method:"POST"})||[],qa=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Ua=d((({children:e})=>qa?e:null)),Wa=d((({field:e,input:t})=>{const[n,l]=i([]),{data:r}=$a("REGION_RF"),s=e("regionRetail")?.value||{},d=e("addressRetail");a((()=>{(async()=>{const e=await(async e=>{const t=await ea("/public-data/regionOffices","POST",{regionRfCd:{key:e},cashCardFlg:!0});return t?.offices?.map((e=>({...e,gpsLatitude:ia(e.latitude??Gi[0]),gpsLongitude:ia(e.longitude??Gi[1])})))||[]})(s?.key??"");l(e)})(),s?.key&&e?.("addressRetail")?.onChange?.("")}),[s.key]);const{points:m}=La({data:n,filtrationState:{},getBalloon:Aa}),u=Boolean(s?.key);return c("div",{children:[o(En,{label:"Адрес отделения",placeholder:"Выберите отделение",options:n.map((({id:e,address:t=""})=>({key:e?.toString()||"",text:t}))),...li(e("addressRetail"),ti.addressRetail,t?.required&&u),isSearch:!0}),o("div",{className:"h-[600px]",children:o(Ua,{children:o(Xi,{points:m,isLoad:!r,className:"h-full",selectedAddress:d?.value?.text})})})]})})),Ha=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=i(!1),m=l((e=>{d(!0),r&&r(e)}),[]),u=l((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:u}},Ya=(e,t,n)=>Math.max(t,Math.min(e,n));function Ka(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function Ga({list:e=[],min:t,max:n,step:i,value:a=e[0]||t,disabled:l,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||l?"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:i,value:s,disabled:l,onChange:t=>{const n=Ka(t.target?.value),i=e.length?e[n]:n;r&&r(i||0)}})})]})}const Xa=1,Ja=100,Za=d((e=>{const{className:t,title:n,items:i=[],list:a=[],min:r=(a.length?0:Xa),max:s=(a.length?a.length-1:Ja),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:p}=e,g=Ha(e,{normalize:(e=0)=>a.length?Qa(a)(e):Ya(e,r,s),format:He()}),f=l((e=>{p&&p(Ka(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Ae,{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",hn,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),Ga({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),el(i)]})})),Qa=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(Ae,{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(Za,{title:"Сумма, ₽",items:tl,min:1e3,max:1e9,...e("amount")}))),il=Ot((({field:e,source:t,fieldName:n,input:i,placeholder:a="Выберите из списка",options:l,...r})=>{const s=t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(En,{placeholder:a,options:s,...li(e(n),ti[n],i?.required),...r})})),al=d((({field:e,input:t})=>{const{data:n}=$a("EMPLOYEES_NUMBER");return o(il,{field:e,source:n,label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),ll=d((({field:e,input:t})=>o(kn,{label:"Годовая выручка, ₽",...li(e("annualRevenue"),ti.annualRevenue,t?.required)}))),rl=d((({field:e,input:t})=>o(_i,{text:"Наличие военного билета",...li(e("armyIdFlg"),ti.armyIdFlg,t?.required)}))),sl=d((({field:e,input:t})=>o(kn,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...li(e("bankEmployeeCode"),ti.bankEmployeeCode,t?.required),...t}))),ol=d((({field:e})=>o(kn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),cl=d((({field:e,input:t})=>o(_i,{text:"В отношении меня ведётся производство по делу о банкротстве",...li(e("bankruptcyFlg"),ti.bankruptcyFlg,t?.required)}))),dl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:i,currentYear:a,min:l,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,i,d),n=ml(t,e),c=ul(t,l,r);u.push(o("td",{children:o("div",{className:hl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},ml=(e,t)=>t&&e.toDateString()===t.toDateString(),ul=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),hl=(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"),pl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],gl=d((({today:e,currentMonth:t,currentYear:n,min:i,max:a,onDateSelect:s=un,setValue:d=un})=>{const m=l((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:pl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:dl({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:i,max:a,onDateClick:m})})]})})),fl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function xl(e,t){const n=e.replace(/\D/g,"");if(""===n||e?.length===t.length)return e;const i=[...t],a=i.findIndex(yl),l=i.map(((e,t)=>vl(e)?i.slice(0,t).filter(vl).length:-1)),r=i.map(((e,t)=>bl(e)?e:n.charAt(l[t])||e)),s=l.indexOf(n.length-1)+1;return r.slice(0,Math.max(a,s)).join("")}const yl=e=>"_"===e,bl=e=>/\d/.test(e),vl=e=>yl(e)||bl(e),Nl=1940,wl={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Cl=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:l,disabled:r,onChange:d,onClick:m})=>{const h=s(null),[p,g]=i(l||"");return a((()=>{g(l||"")}),[l]),c("div",{onClick:()=>{null!==h.current&&h.current.focus(),m?.()},className:u("relative",n),children:[o("input",{ref:h,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(xl(t,"__.__.____"))},onBlur:()=>{if(Sl(p)){const[n,i,a]=p.split(".");d?.(new Date(Number(a),Number(i)-1,Number(n))),e(Number(i)-1),t(Number(a))}else g(l||"")},disabled:r}),r?null:o(W,{className:"mr-s",...wl})]})})),Sl=e=>{const[t,n,i]=e.split(".");if((e=>Number(e)>=Nl&&Number(e)<=(new Date).getFullYear())(i)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(i),Number(n)-1,1);let a=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),a++;if(Number(t)>0&&Number(t)<=a)return!0}return!1},kl=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:i,setSelectedMonth:a,setSelectedYear:l,disabled:r=!1})=>o(Cl,{onChange:i,disabled:r,onClick:e,value:t&&jt(t),setSelectedMonth:a,setSelectedYear:l,className:u("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Il=fl.map((e=>({key:e}))),Tl=Array.from({length:(new Date).getFullYear()-Nl+1},((e,t)=>Nl+t)).reverse().map((e=>({key:String(e)}))),Bl=(e,t)=>{const n=new Date(e,t,1);let i=0;for(;n.getMonth()===t;)i++,n.setDate(n.getDate()+1);return i},Pl=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:i,onChange:a})=>{i&&a?.(new Date(t,n,Math.min(e,i.getDate())))},Rl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Dl={className:"min-w-32",iconVersion:"black",isBorder:!1},Ml=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:h})=>{const[p,{setValue:g}]=on(!1),[f,x]=i(n?.getMonth()||(new Date).getMonth()),[y,b]=i(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:v,handleNextMonth:N,handleSelectMonth:w,handleSelectYear:C,monthsOptions:S,yearsOptions:k,handleChangeVisibleCalendar:I,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:i,onYearSelect:a,selectedYear:r,onChange:s,value:o})=>{const c=dn(l((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:l((()=>e(!t)),[t]),handleNextMonth:l((()=>{n+1<=11?i(n+1):(i(0),a(r+1))}),[n]),handlePrevMonth:l((()=>{n-1>=0?i(n-1):(i(11),a(r-1))}),[n]),handleSelectMonth:l((({key:e})=>{i(fl.indexOf(e));const t=Bl(r,fl.indexOf(e));Pl({maxDateOfMonth:t,selectedYear:r,selectedMonth:fl.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:l((({key:e})=>{a(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Il,yearsOptions:Tl,ref:c}})({onYearSelect:b,onMonthSelect:x,onShowCalendar:g,selectedYear:y,selectedMonth:f,showCalendar:p,onChange:h,value:n}),B=((e,t)=>{const[n,l]=i(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();l(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:[pn(t),c("div",{className:"relative",children:[kl({handleChangeVisibleCalendar:I,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:b}),p&&!m?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":B}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:v,children:o(W,{...Rl,className:"-rotate-90 cursor-pointer"})}),o(Dn,{onChange:w,value:{key:fl[f]},options:S,...Dl}),o(Dn,{onChange:C,value:{key:String(y)},options:k,...Dl}),o("div",{className:"my-auto",onClick:N,children:o(W,{...Rl,className:"rotate-90 cursor-pointer"})})]}),o(gl,{today:n,currentMonth:f,currentYear:y,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),_l=d((({className:e,label:t,error:n,errors:i,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ml,{label:mn({label:t,errors:i}),valid:Boolean(!n),...a}),yn(n)]}))),Al=d((({field:e,input:t})=>o(_l,{label:"Дата начала работы на текущем месте",...li(e("beginDate"),ti.beginDate,t?.required),...t}))),El=d((({field:e,input:t})=>o(_l,{label:"Дата рождения",...li(e("birthday"),ti.birthday,t?.required)}))),zl=d((({field:e,input:t})=>o(kn,{label:"Место рождения",...li(e("birthPlace"),ti.birthPlace,t?.required),...t,disabled:t?.filledByEsia&&Ci(e,"birthPlace")})));function Fl(e){const t=globalThis.localStorage?.getItem(e),[n,a]=i(t?JSON.parse(t):null);return[n,l((t=>{a((n=>{const i=t instanceof Function?t(n):t;return globalThis.localStorage?.setItem(e,JSON.stringify(i)),i}))}),[e])]}const Ol=d((({field:e,input:t})=>{const[n,l]=i([]),[r]=Fl("programId"),{value:s,onChange:c}=e("cardCategory"),d=e("paymentSystem").value;return a((()=>{d&&r&&(async()=>{const e=await(async(e,t)=>{const n=await ea("/dictionaryFiltered","POST",{type:"CARD_TYPE",presets:{paymentSystemTypeCd:e,creditProgramId:t}});return Array.isArray(n)?n:[]})(d,r);l(e),Vl(e,s)||c&&c(null)})()}),[d]),o(il,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t})})),Vl=(e,t)=>e.some((e=>e.key===t?.key)),Ll=d((({field:e,input:t})=>o(kn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...li(e("children"),ti.children,t?.required),...t}))),$l=d((({field:e,input:t})=>o(kn,{label:"Кодовое слово",...li(e("codeWord"),ti.codeWord,t?.required),...t}))),jl=d((({field:e,input:t})=>o(kn,{label:"Количество объектов инкассации",isInteger:!0,...li(e("collectionCount"),ti.collectionCount,t?.required)}))),ql=d((({field:e,input:t})=>o(kn,{className:"col-span-2",...li(e("comment"),ti.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Ul=d((({field:e,input:t})=>{const{data:n}=$a("INCOME_CERT_UNITED");return o(il,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),Wl=d((({field:e,input:t})=>{const{data:n}=$a("MILITARY_STATUS");return o(il,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),Hl={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3},consentToReceiveMaterials:{text:"Согласен на получение информационных и аналитических материалов по электронной почте"}};function Yl({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Kl={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"},Gl={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")},Xl=d((({children:e,...t})=>{const n=e=>({...e,onClick:ce(Yl(e))}),{className:i,version:a="primary",active:l,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":l,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},l||r?"":u(Kl[a],Gl[a]),i),type:s,role:d,onClick:m,children:e})})),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"})}))),Zl=d((({className:e,head:t,children:n,onClose:i,onClick:a})=>c("div",{className:u("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",onClick:a,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Jl,{className:"absolute top-0 right-0",onClose:i}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),Ql=d((({src:e,convertToPng:t,onClose:n})=>c(Zl,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",onClose:n,children:[t?o("img",{src:e}):o("iframe",{src:`${e}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"}),o(Xl,{className:"mx-auto mt-m",type:"button",onClick:n,children:"Ознакомиться"})]}))),er=e=>{const{open:t}=sn(Ql),n=ke();return l((async()=>{if(e){const i=URL.createObjectURL(await(async(e,t=!1)=>{const n=await ta(`/feedback/file?id=${encodeURIComponent(e)}&convertToPngFlg=${t}`,"GET");return n?await n.blob():new Blob})(e,n));t({src:i})}}),[t,e,n])},tr=d((({className:e,error:t,docId:n,...i})=>{const a=er(n);return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(Bi,{...i}),n?o(Ne,{className:"text-primary-main",onClick:a,children:o(Ae,{children:"Ознакомиться"})}):null]}),yn(t)]})})),nr=d((({field:e,input:t})=>t&&t.name?o(tr,{text:Hl[t.name]?.text,docId:Hl[t.name]?.docId,...li(e(t.name),ti[t.name],t?.required)}):null)),ir=Math.round(29.5),ar=d((({className:e,title:t,children:n,...i})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...i,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),lr="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",rr="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",sr="flex flex-col gap-y-xl min-w-52",or=d((({value:e,fractionDigits:t,fixed:n,prefix:i,postfix:a})=>o(Ae,{size:"text-h3",children:"number"==typeof e?[i,He(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),cr=d((({className:e,title:t,value:n,color:i="text-secondary-text",...a})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Ae,{size:"text-l",font:"font-light",color:i,children:t}):null,n?o(or,{value:n,...a}):o(Ae,{size:"text-h3",children:"-"})]}))),dr=(e=[],t=!1)=>mr([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),mr=(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]},ur=(e,t=0)=>e?.sum?e.sum:t,hr=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,pr=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,gr=({min:e=0,max:t=0,availableMonths:n,...i})=>o(Za,{items:[`От ${fr(e)}`,`До ${fr(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...i}),fr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,xr={horizontal:"@lg:flex-row",vertical:""},yr=d((({label:e,items:t,value:n,className:i,onChange:a,disabled:l=!1,orientation:r="horizontal"})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",xr[r],i),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Bi,{isRadio:!0,text:t,value:n===e,onChange:()=>a&&a(e),disabled:l},String(e))))})]}))),br=({items:e,title:t,mobileTitle:n=t,orientation:i="horizontal",value:a,onChange:l,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(yr,{orientation:i,items:e,value:e[a?0:1].id,onChange:t=>l&&l(t===e[0].id),...r})]}),vr=e=>br({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Nr=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...i})=>o(Za,{items:e?[`От ${He(1)(i.min||0)} ${n}`,`До ${He(1)(i.max||0)} ${n}`]:[],step:t,...i}),wr=({field:e,defParams:t,calcParams:n,map:i,monthsValue:a="maxMonths"})=>{Object.entries(i).forEach((([n,i])=>{e?.(n)?.onChange?.(t?.[i])})),e?.("monthsValue")?.onChange?.(Ya(t?.[a],n.minMonths,n.maxMonths))},Cr=(e,t)=>{const{isAnnuity:n,moneyValue:i,monthsValue:a,moneyExtra:l}=t;if(0===e)return 0;if(n){const t=e/1200;return l?(i+l)*(t+t/(Math.pow(1+t,a)-1)):i*(t+t/(Math.pow(1+t,a)-1))}return Math.round(i/a)+i*(e/1200)},Sr=e=>e,kr=(e=Sr)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Ir=kr(),Tr=(e=Sr)=>kr((t=>-e(t))),Br=Tr(),Pr=([e,t],n,i=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Rr([e,t],i),Rr=([e,t],n=[])=>({[e]:n.length?Br(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Ir(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Dr=(e,[t,n],i)=>e>=i[t]&&e<=i[n],Mr={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},_r=e=>Ar({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ar({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Ar({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Ar({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ar=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:i,viewSettingFieldKey:a})=>!!n&&!n[a]||t[i]===e[i],Er=(e,t,n)=>{const{moneyValue:i,monthsValue:a}=e,l=t?.rateRows||[Mr],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>_r({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=Pr(["minSum","maxSum"],r,l),{minMonths:c,maxMonths:d}=Pr(["minMonths","maxMonths"],r,l),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:i,monthsValue:a})=>e?.find((e=>_r({row:e,userInputParams:t,paramsViewSettings:n})&&Dr(i,["minSum","maxSum"],e)&&Dr(a,["minMonths","maxMonths"],e)))||Mr)({rateRows:l,userInputParams:e,paramsViewSettings:n,moneyValue:i,monthsValue:a}),{rate:u}=m,h=Cr(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:i,monthsValue:a,monthlyPayment:h}},zr=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Fr={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Or=Ot((({className:e,title:t,calcSource:n,buttons:i,footnote:l,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const h=(p=n?.rateRows,mr([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f,isDirty:x}]=an({moneyValue:ur(s,2e5),monthsValue:hr(s,ir),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)});a((()=>{x&&d?.(g)}),[g,x]);const y=Er(g,n,r),b=vr({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:v}=f("moneyValue"),{onChange:N}=f("monthsValue");return a((()=>{v&&v(Ya(g.moneyValue,y.minSum,y.maxSum))}),[y.minSum,y.maxSum]),a((()=>{N&&N(Ya(g.monthsValue,y.minMonths,y.maxMonths))}),[y.minMonths,y.maxMonths]),a((()=>{!zr(s)&&h&&wr({field:f,defParams:h,calcParams:y,map:Fr,monthsValue:"minMonths"})}),[n,s]),o(ar,{className:e,title:t,...m,children:c("section",{className:u(lr,e),children:[c("div",{className:rr,children:[Nr({title:"Сумма кредита, ₽",step:500,min:y.minSum,max:y.maxSum,...f("moneyValue"),value:y.moneyValue}),gr({title:"Срок кредита, месяцев",min:y.minMonths,max:y.maxMonths,...f("monthsValue"),value:y.monthsValue}),Vr({...y,...r},f),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:u(sr,"@4xl:w-1/2"),children:[o(cr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(cr,{title:"Ставка",value:y?.rate,fractionDigits:2,postfix:"%"}),o(cr,{title:"Ежемесячный платёж",value:y.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),je(i,{isVertical:!0}),pr(l)]})]})})})),Vr=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Bi,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Bi,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Bi,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Bi,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Lr={moneyValue:"sum",monthsValue:"period",isInsurance:"isEnableInsurance",isPensionClient:"isEnablePensionClient",isStateEmployee:"isEnableStateEmployee",isSalaryClient:"isEnableSalaryClient",isAnnuity:"isAnnuity"},$r=(e,t=!1)=>{const n=t?jr(Lr):Lr;return Object.fromEntries(Object.entries(e??{}).map((([e,t])=>[n[e],t])))},jr=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e]))),qr="calculator",Ur=d((({field:e,params:t})=>{const n=l((t=>{e(qr).onChange?.(t)}),[]);return o(Or,{...t?.calcData,defaultParams:$r(e(qr).value),onChange:n})})),Wr=d((({field:e,input:t})=>{const{data:n}=$a("CREDIT_IN_RSHB");return o(il,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /\n вкладчиком с долей участия более 20% уставного капитала руководителем,\n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t,disabled:!e?.("shareholderFlg")?.value})})),Hr=d((({className:e,label:t,onChange:n,error:i,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(yr,{label:mn({label:t,errors:a?.errors}),onChange:e=>n&&n(e),...a}),yn(i)]}))),Yr=[{id:"rub",text:"Рубль"}],Kr=d((({field:e,input:t})=>{const{value:n,onChange:i}=e("currency");return o(Hr,{label:"Валюта",orientation:"horizontal",items:Yr,value:n,onChange:e=>i?.(e),...li(e("currency"),ti.currency,t?.required)})})),Gr=d((({field:e,input:t})=>o(_l,{label:"Дата доставки",...li(e("deliveryDate"),ti.deliveryDate,t?.required)}))),Xr=d((({field:e,input:t})=>o(kn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...li(e("dependents"),ti.dependents,t?.required),...t}))),Jr=d((({field:e,input:t})=>o(_l,{label:"Желаемая дата встречи",...li(e("desiredMeetingDate"),ti.meetingDay,t?.required)}))),Zr=d((({field:e,input:t})=>o(_i,{text:"Являюсь инвалидом",...li(e("disablePeopleFlg"),ti.disablePeopleFlg,t?.required)}))),Qr="dulIssueDateField",es=d((({field:e,input:t})=>o(_l,{label:"Дата выдачи",...li(e(Qr),ti.dulIssueDateField,t?.required),disabled:t?.filledByEsia&&Ci(e,Qr)}))),ts="dulIssuedBy",ns=d((({field:e,input:t})=>{const{value:n,onChange:i}=e("dulSubdivisionCode"),a=l((e=>{i?.(e?.data?.code?.replace("-",""))}),[]);return o(kn,{disabled:t?.filledByEsia&&Ci(e,ts),label:"Кем выдан",...t,...li(e(ts),ti.dulIssuedBy,t?.required),onDaDataChange:a,daDataQueryPrefix:n})})),is=d((({field:e,input:t})=>o(kn,{disabled:t?.filledByEsia&&Ci(e,"dulNumber"),label:"Номер документа",isInteger:!0,maxLength:6,...li(e("dulNumber"),ti.dulNumber,t?.required)}))),as=d((({field:e,input:t})=>o(kn,{disabled:t?.filledByEsia&&Ci(e,"dulSerie"),label:"Серия документа",isInteger:!0,maxLength:4,...li(e("dulSerie"),ti.dulSerie,t?.required)}))),ls="dulSubdivisionCode",rs=d((({field:e,input:t})=>{const n=l((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(kn,{disabled:t?.filledByEsia&&Ci(e,ls),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...li(e(ls),ti.dulSubdivisionCode,t?.required),onDaDataChange:n})})),ss=d((({field:e,input:t})=>{const{data:n}=$a("EDUCATION_LEVEL");return o(il,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),os=d((({field:e,input:t})=>{const{required:n,...i}=t;return o(kn,{label:"Электронная почта",...li(e("email"),ti.email,n),...i})})),cs=d((({field:e,input:t})=>{const{data:n}=$a("ORGANIZATION_ACTIVITY_TYPE");return o(il,{field:e,source:n,label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),ds=d((({field:e,input:t})=>{const{data:n}=$a("ORGANIZATION_KIND");return o(il,{field:e,source:n,label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),ms=d((({field:e,input:t})=>{const{data:n}=$a("EMPLOYMENT_INFO_UNITED");return o(il,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),us=d((({field:e,input:t})=>o(kn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...li(e("expenses"),ti.expenses,t?.required),...t}))),hs=d((({field:e,input:t})=>o(kn,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",maxLength:2,...li(e("experience5Years"),ti.experience5Years,t?.required),...t}))),ps=d((({field:e})=>{const{value:t,onChange:n}=e("familyMembers"),i=e("familyStatus")?.value?.key,l="MARRIED"===i?2:1,r=Number(e("children")?.value),s=Number(e("dependents")?.value),c=l+r+s;return a((()=>{e?.("familyMembers")?.onChange?.(c)}),[i,r,s]),o(kn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:t,onChange:e=>n?.(e)})})),gs=d((({field:e,input:t})=>{const{data:n}=$a("MARITAL_STATUS");return o(il,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),fs=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],xs=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],ys=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],bs=d((({field:e,input:t})=>o(En,{label:"Способ получения ответа",options:ys,...li(e("feedbackMethod"),ti.feedbackMethod,t?.required)}))),vs=d((({field:e,input:t})=>o(kn,{label:"ФИО",...li(e("fullName"),ti.fullName,t?.required),...t}))),Ns=d((({field:e,input:t})=>o(kn,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...li(e("generalSeniority"),ti.generalSeniority,t?.required),...t}))),ws=d((({field:e,input:t})=>{const{data:n}=$a("HOUSE_TYPE");return o(il,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Cs=d((({field:e,input:t})=>{const n=l((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(kn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...li(e("inn"),ti.inn,t?.required),onDaDataChange:n})})),Ss=d((({field:e})=>o(_i,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),ks=d((({field:e,input:t})=>o(kn,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...li(e("jobsNumber"),ti.jobsNumber,t?.required),...t}))),Is=d((({field:e,input:t})=>o(kn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...li(e("lastJobExperience"),ti.lastJobExperience,t?.required),...t}))),Ts=d((({field:e,input:t})=>o(kn,{label:"Наименование юридического лица",...t,...li(e("legalEntityName"),ti.legalEntityName,t?.required),disabled:!e?.("shareholderFlg")?.value}))),Bs=d((({field:e,input:t})=>o(kn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...li(e("legalForm"),ti.legalForm,t?.required),...t}))),Ps="limitedBirthday",Rs=d((({field:e,input:t})=>o(_l,{label:"Дата рождения",...li(e(Ps),ti.limitedBirthday,t?.required),disabled:t?.filledByEsia&&Ci(e,Ps)}))),Ds=`${Ut}/outservice`,Ms=[];async function _s(){const e=await Rt(`${Ds}/outserviceregions`);return e&&Array.isArray(e)?e:Ms}const As=d((({field:e,input:t})=>{const n=e("region"),i=n?.value?.key,{data:l}=gi("outServiceRegions",_s),r=l?.find((e=>e.code===i))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==i&&e?.("localities")?.onChange?.("")}),[i]),o(En,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:r,...li(e("localities"),ti.localities,t?.required),isSearch:!0})})),Es=d((({field:e,input:t})=>o(kn,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...li(e("mandatoryPayments"),ti.mandatoryPayments,t?.required),...t}))),zs=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],Fs=d((({field:e,input:t})=>o(Hr,{orientation:"horizontal",items:zs,...li(e("methodObtain"),ti.methodObtain,t?.required)}))),Os="middleName",Vs=d((({field:e,input:t})=>o(kn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&Ci(e,Os),...li(e(Os),ti.middleName,t?.required),...t}))),Ls=d((({field:e,input:t})=>o(kn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&Ci(e,t.name??""),...li(e("name"),ti.name,t?.required),...t}))),$s=d((({value:e=!1,text:t,type:n="checkbox",onChange:i})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>i&&i(!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(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),js=d((({field:e})=>oi(e("acquiringType")?.value?.key)?o($s,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),qs=d((({field:e,input:t})=>{const{data:n}=$a("ORGANIZATION_TYPE");return o(il,{field:e,source:n,label:"Тип организации",fieldName:"organization",input:t})})),Us=d((({field:e,input:t})=>{const n=l((t=>{e?.("inn")?.onChange?.(t.data?.inn),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(kn,{label:"Наименование организации",...t,...li(e("organizationName"),ti.organizationName,t?.required),onDaDataChange:n})})),Ws=d((({field:e,input:t})=>o(kn,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...li(e("otherIncome"),ti.otherIncome,t?.required),...t}))),Hs=d((({field:e,input:t})=>o(_l,{label:"Дата регистрации по месту жительства",...li(e("participantDateRegistration"),ti.participantDateRegistration,t?.required)}))),Ys="partInBusiness",Ks=d((({field:e,input:t})=>{const n=l((t=>{e(Ys)?.onChange?.(String(Number(t)>100?100:Number(t)||""))}),[]);return o(kn,{label:"Доля участия в бизнесе",placeholder:"в %",isInteger:!0,maxLength:3,...li(e(Ys),ti.partInBusiness,t?.required),...t,onChange:n})})),Gs=d((({field:e,input:t})=>{const{required:n,...i}=t;return o(kn,{...li(e("partnerComments"),ti.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...i})})),Xs=d((({field:e,input:t})=>{const{value:n,onChange:l}=e("paymentSystem"),[r]=Fl("programId"),[s,c]=i([]);return a((()=>{r&&(async()=>{const e=await(async e=>{const t=await ea("/public-data/creditProgramConditions","POST",{creditProgramId:e});return t?.paymentSystems?.map((e=>({id:e.type,text:e.name})))??[]})(r);c(e||[])})()}),[]),o(Hr,{label:"Платежная система",orientation:"horizontal",items:s,value:n,onChange:e=>l?.(e),...li(e("paymentSystem"),ti.paymentSystem,t?.required)})})),Js=e=>"_"===e,Zs=e=>/\d/.test(e),Qs=e=>Js(e)||Zs(e),eo=[..."+7 (___) ___-__-__"],to=eo.findIndex(Js),no=eo.map(((e,t)=>Qs(e)?eo.slice(0,t).filter(Qs).length:-1));function io(e){const t=e.replace(/\D/g,""),n=eo.map(((e,n)=>Zs(e)?e:t.charAt(no[n])||e)),i=no.indexOf(t.length-1)+1;return(i?n.slice(0,Math.max(to,i)):n).join("")}const ao=d((({children:e,onChange:t,...n})=>{const i=l((e=>t&&t(io(e))),[t]),a=l((e=>{"+7 ("===e&&t&&t("")}),[]);return o(gn,{...n,onChange:i,onFocus:e=>i(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),lo=d((({className:e,label:t,error:n,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(ao,{"aria-label":t,label:mn({label:t,errors:i?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...i}),yn(n)]}))),ro=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(lo,{label:"Телефон",...li(e(n),ti.phone,t?.required),disabled:t?.filledByEsia&&Ci(e,n),...t})})),so=d((({field:e,input:t})=>{const{data:n}=$a("POSITION");return o(il,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),oo=d((({field:e})=>oi(e("acquiringType")?.value?.key)?o($s,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),co=d((({field:e,source:t})=>o(En,{placeholder:"Выберите продукт",label:"Продукт",options:mo(t?.productList),...ai(e("product"),ti.product)}))),mo=e=>(e??[]).map((e=>({key:e,value:e}))),uo=`${Ut}/outservice/outserviceregions`,ho=`${Ut}/regions`,po=[];function go(e=ho){const{data:t}=gi(e,Dt);return Array.isArray(t)?t:po}const fo=d((({field:e,input:t,params:n})=>{var i;const a=go((i=n?.typeForm,"OUTSERVICE"===i?uo:void 0));return o(En,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>a?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[a]),...li(e("region"),ti.region,t?.required)})})),xo=d((({field:e,input:t})=>{const n=vi(!0),i=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(En,{label:"Регион",placeholder:"Выберите регион",options:i,...li(e("region"),ti.region,t?.required)})})),yo=d((({field:e,input:t})=>{const{data:n}=$a("REGION_RF"),i=n?.map((({key:e,value:t})=>({key:e,text:t})));return o(En,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:i,...li(e("regionRetail"),ti.regionRetail,t?.required)})})),bo=d((({field:e,input:t})=>{const n=e("wages")?.value,i=l((t=>{const i=Number(t)+Number(n||0);e("retirementIncome")?.onChange?.(t),e("incomeAverage")?.onChange?.(String(i))}),[n]);return o(kn,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...li(e("retirementIncome"),ti.retirementIncome,t?.required),...t,onChange:i})})),vo=d((({field:e})=>{const t=e("secondaryPhone");return o(lo,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?ai(t,ti.secondaryPhone):t})})),No=d((({field:e,input:t})=>o(En,{label:"Направление обслуживания",placeholder:"Выберите направление",options:xs,...li(e("serviceDirection"),ti.serviceDirection,t?.required)}))),wo=["male","female"],Co=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],So=d((({field:e,input:t})=>{const n=e("name")?.value,{value:i,onChange:l}=e("sex");return a((()=>{n&&!i&&(async()=>{const e=await(async e=>{const t=await ea("/suggestions/suggest/fio","POST",{query:e,count:1,parts:["NAME"]}),n=t?.suggestions[0]?.data?.gender?.toLowerCase()||"";return wo.includes(n)?n:""})(n);e&&l?.(e)})()}),[]),o(Hr,{label:"Пол",orientation:"horizontal",items:Co,...li(e("sex"),ti.sex,t?.required)})})),ko=d((({field:e,input:t})=>o(_i,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...li(e("shareholderFlg"),ti.shareholderFlg,t?.required)}))),Io=d((({children:e,onChange:t,...n})=>{const i=l((e=>t&&t(xl(e,"___-___-___ __"))),[t]),a=l((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(gn,{...n,onChange:i,onFocus:e=>i(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),To=d((({className:e,label:t,value:n,error:i,onChange:a,onBlur:l,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Io,{"aria-label":t,label:mn({label:t,errors:r?.errors}),valid:Boolean(!i),value:n,onChange:a,onBlur:l,placeholder:"___-___-___ __"}),yn(i)]}))),Bo=d((({field:e,input:t})=>o(To,{label:"СНИЛС",...li(e("snils"),ti.snils,t?.required),...t}))),Po=d((({field:e,input:t})=>o(kn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&Ci(e,"surname"),...li(e("surname"),ti.surname,t?.required),...t}))),Ro=["От 1 мес","До 15 лет"],Do=d((({field:e})=>o(Za,{title:"Срок, месяцев",items:Ro,min:1,max:180,...e("term")}))),Mo=d((({field:e,input:t})=>o(kn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...li(e("totalIncome"),ti.totalIncome,t?.required),...t}))),_o=d((({field:e,input:t})=>o(En,{label:"Тип обслуживания",options:fs,...li(e("serviceType"),ti.serviceType,t?.required)}))),Ao=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Eo=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(yr,{className:"whitespace-normal",orientation:"horizontal",items:Ao,value:t,onChange:e=>n&&n(e)})})})),zo=d((({field:e,input:t})=>{const n=e("retirementIncome")?.value,i=l((t=>{const i=Number(t)+Number(n||0);e("wages")?.onChange?.(t),e("incomeAverage")?.onChange?.(String(i))}),[n]);return o(kn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...li(e("wages"),ti.wages,t?.required),...t,onChange:i})}));const Fo={$ref:"/wcms-resources/outservice-productlist.json"},Oo=(e,t)=>(n,i)=>{const a="ULTRASERVICE"===t?.typeForm||"PREMIUMSERVICE"===t?.typeForm,l={surname:o(Po,{field:e,input:n}),name:o(Ls,{field:e,input:n}),middleName:o(Vs,{field:e,input:n}),phone:o(ro,{field:e,input:n}),organizationPhone:o(ro,{field:e,input:n}),email:o(os,{field:e,input:n}),fullName:o(vs,{field:e,input:n}),inn:o(Cs,{field:e,input:n}),legalForm:o(Bs,{field:e,input:n}),organizationName:o(Us,{field:e,input:n}),generalSeniority:o(Ns,{field:e,input:n}),lastJobExperience:o(Is,{field:e,input:n}),experience5Years:o(hs,{field:e,input:n}),jobsNumber:o(ks,{field:e,input:n}),beginDate:o(Al,{field:e,input:n}),addressFact:o(wi,{field:e,input:n}),organizationAddress:o(Si,{field:e,input:n}),comment:o(ql,{field:e,input:n}),addressBranch:o(Ni,{field:e,input:n,isPremium:a}),sex:o(So,{field:e,input:n}),birthday:o(El,{field:e,input:n}),limitedBirthday:o(Rs,{field:e,input:n}),birthPlace:o(zl,{field:e,input:n}),desiredMeetingDate:o(Jr,{field:e,input:n}),product:o(co,{field:e,source:Fo}),localities:o(As,{field:e,input:n}),isClient:o(Ss,{field:e}),partnerComments:o(Gs,{field:e,input:n}),collectionCount:o(jl,{field:e,input:n}),acquiringType:o(si,{field:e,input:n}),onlineCheckout:o(js,{field:e}),posTerminal:o(oo,{field:e}),serviceType:o(_o,{field:e,input:n}),term:o(Do,{field:e}),amount:o(nl,{field:e}),annualRevenue:o(ll,{field:e,input:n}),vedTypes:o(Eo,{field:e}),feedbackMethod:o(bs,{field:e,input:n}),serviceDirection:o(No,{field:e,input:n}),bankEmpolee:o(ol,{field:e}),secondaryPhone:o(vo,{field:e}),consentToReceiveMaterials:o(nr,{field:e,input:n}),processPersonalDataFlg:o(nr,{field:e,input:n}),consentProviderFlg:o(nr,{field:e,input:n}),consentOthersFlg:o(nr,{field:e,input:n}),consentInformFlg:o(nr,{field:e,input:n}),consentPfrFlg:o(nr,{field:e,input:n}),applicationDate:o(kn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),region:a?o(xo,{field:e}):o(fo,{field:e,input:n,params:t}),education:o(ss,{field:e,input:n}),housing:o(ws,{field:e,input:n}),employment:o(ms,{field:e,input:n}),organization:o(qs,{field:e,input:n}),amountWorkers:o(al,{field:e,input:n}),employerActivities:o(cs,{field:e,input:n}),employerOrganization:o(ds,{field:e,input:n}),positionOrganization:o(so,{field:e,input:n}),familyStatus:o(gs,{field:e,input:n}),children:o(Ll,{field:e,input:n}),familyMembers:o(ps,{field:e,input:n}),dependents:o(Xr,{field:e,input:n}),totalIncome:o(Mo,{field:e,input:n}),expenses:o(us,{field:e,input:n}),snils:o(Bo,{field:e,input:n}),conscription:o(Wl,{field:e,input:n}),armyIdFlg:o(rl,{field:e,input:n}),dulSerie:o(as,{field:e,input:n}),dulNumber:o(is,{field:e,input:n}),dulIssueDateField:o(es,{field:e,input:n}),dulSubdivisionCode:o(rs,{field:e,input:n}),dulIssuedBy:o(ns,{field:e,input:n}),addressRegistration:o(Si,{field:e,input:n}),addressCourier:o(Si,{field:e,input:n}),participantDateRegistration:o(Hs,{field:e,input:n}),retirementIncome:o(bo,{field:e,input:n}),otherIncome:o(Ws,{field:e,input:n}),wages:o(zo,{field:e,input:n}),mandatoryPayments:o(Es,{field:e,input:n}),disablePeopleFlg:o(Zr,{field:e,input:n}),bankruptcyFlg:o(cl,{field:e,input:n}),shareholderFlg:o(ko,{field:e,input:n}),legalEntityName:o(Ts,{field:e,input:n}),creditInRshbCd:o(Wr,{field:e,input:n}),bankEmployeeCode:o(sl,{field:e,input:n}),partInBusiness:o(Ks,{field:e,input:n}),regionRetail:o(yo,{field:e,input:n}),addressRetail:o(Wa,{field:e,input:n}),addressMatch:o(Ai,{field:e,input:n}),paymentSystem:o(Xs,{field:e,input:n}),currency:o(Kr,{field:e,input:n}),cardCategory:o(Ol,{field:e,input:n}),codeWord:o($l,{field:e,input:n}),confirmationIncome:o(Ul,{field:e,input:n}),methodObtain:o(Fs,{field:e,input:n}),deliveryDate:o(Gr,{field:e,input:n}),calculator:o(Ur,{field:e,params:t})};return function({input:e,field:t}){const{condition:n}=e,{value:i}=t(n?.name||"");return!n||n?.values?.find((e=>e===(i?.key??i)))}({input:n,field:e})?o("div",{children:l[n?.name||""]},String(i)):null},Vo=e=>2===e?"@xl:grid-cols-2":"",Lo=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ae,{size:"text-h6",children:e})}):null,$o=d((({responseType:e,typeForm:t,onClose:n})=>{const i="OK"===e,a="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Zl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:i?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:i?"Ваша заявка отправлена":"Не удалось отправить заявку",description:i?a:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Xl,{type:"button",onClick:n,children:"Хорошо"})]})})})),jo=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],qo=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:i,amount:a,term:l,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:i=!1,term:a,amount:l,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${oi(t?.key)?`/Онлайн касса=${n}/POS-терминал=${i}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${l}/Срок=${a}/Выручка=${r}`})(e):null,u={...d,...Wo(o),...Uo(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Uo=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Wo=e=>e?{vedTypes:Object.fromEntries(Ao.map((({id:t})=>[t,t===e])))}:{},Ho={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:ri[0],serviceType:fs[0],feedbackMethod:ys[0],serviceDirection:xs[0],vedTypes:Ao[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},Yo=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ae,{children:e}):null,t?o(Ne,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Ae,{children:t.text})}):null]}))),Ko=(e,t)=>o(Xl,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Go=(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(Bi,{...e}),o(Yo,{link:t})]}),yn(ai(e,Kn).error)]}):o(Yo,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Ko(n)]}),Xo={send:async function(e,t=!1){const{typeForm:n,region:i,phone:a="",email:l,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=`${Ut}${g?"/lead":"/sendcorporatelead"}`,x={typeForm:n,...Yt(i,g),...Kt(l,g),...Wt(a),...Ht(s,"desiredMeetingDate"),...g?Ht(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...Gt(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}}},Jo=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))||[],y=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Ho[e.name||""]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=fs[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[b,v]=i(""),w=sn($o),C=l((async(e,t)=>{const i=Zo(x,e),a=jo(ii(i));if(!zn(a(e)))return console.warn("validation fail");const l=qo({...e,...h}),r=await Xo.send(l,"lead"===m)?"OK":"Fail";if(v(r),r&&w.open({typeForm:n,responseType:r}),"OK"===r&&g){const e=tn();Xt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[n]),[,{field:S,onSubmit:k,reset:I}]=an(y,{onSubmit:C}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return a((()=>{"OK"===b&&(v(""),I())}),[b]),c(rn,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:k,children:[r.map(((e,t)=>c("div",{className:u(Vo(e.columns),"grid gap-x-m"),children:[Lo(e.title),(e?.inputs||[])?.map(Oo(S,{typeForm:n}))]},`section-${t}`))),Go(T?S("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]})})),Zo=(e,t)=>e.filter((e=>"secondaryPhone"===e?.name?Boolean(t.secondaryPhone):e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const i=t?.[e?.condition?.name??""];return n===(i?.key??i)})))),Qo=d((({inputs:e=[],typeForm:t="",field:n,key:i})=>{const a=e.every((e=>Boolean(n(e.name).value))),l=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(ai(n(e?.name),ti[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(aa,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:i})=>o(la,{isUnfolded:i,className:"flex flex-col pl-2xl",children:e.map(Oo(n,{typeForm:t}))}),renderFoldButton:ec(c("div",{children:[o(Bi,{value:a,onChange:t=>{for(const i of e){const e=n(i.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},i),yn(l?"Отметьте все обязательные соглашения":"")]}))})})})),ec=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",type:"button",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),tc=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:i,restInputs:a}=nc(n||[]);return i.length>2?c("div",{children:[a.map(Oo(e,{typeForm:t})),o(Qo,{inputs:i,field:e})]}):(n||[])?.map(Oo(e,{typeForm:t}))},nc=e=>({consentInputs:e?.filter((e=>Object.keys(Hl).includes(e.name||"")))||[],restInputs:e?.filter((e=>!Object.keys(Hl).includes(e.name||"")))||[]}),ic=[{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:"limitedBirthday",required:!0},{fieldType:"common",name:"phone",required:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{inputs:[{fieldType:"common",name:"processPersonalDataFlg",required:!0},{fieldType:"common",name:"consentProviderFlg",required:!0},{fieldType:"common",name:"consentOthersFlg",required:!0},{fieldType:"common",name:"consentInformFlg"},{fieldType:"common",name:"consentPfrFlg"}]}],ac={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",organizationPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:ri[0],serviceType:fs[0],feedbackMethod:ys[0],serviceDirection:xs[0],vedTypes:Ao[0],birthday:void 0,limitedBirthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,addressRegistration:"",participantDateRegistration:void 0,currency:"",paymentSystem:"",cardCategory:{key:"",text:""},codeWord:"",addressRetail:{key:"",text:""}},lc=(e,t,n="")=>{if(t){const e={...t};return e.limitedBirthday=new Date(e?.limitedBirthday||0),e}return{...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||ac[e.name||""]]))),typeForm:{key:n,text:""}}},rc=(e,t)=>o(Xl,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),sc=e=>ta("/user-data/updateUserProfile","PUT",e),oc=e=>ta("/user-data/updateUserTask","PUT",e),cc=(e,t)=>Boolean(e)&&"string"!=typeof e&&Boolean(e?.errorMessage.startsWith(`Too many request for phoneNumber [${t}]`)),dc={width:"118",height:"24"},mc={"bg-white":"color",transparent:"white"},uc={"bg-white":"text-primary-main",transparent:"text-white"},hc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:mc[e]},className:uc[e],width:n?.width,height:n?.height}),pc={"bg-white":"text-primary-text",transparent:"text-white"},gc=d((({className:e,href:t="/",logo:n,children:i,targetBlank:a,bgColor:l="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??"Россельхозбанк",...fe(s),children:[hc(l,n?.image,dc),r?i??o("div",{className:"ml-s",children:o(Ae,{font:"font-medium",color:pc[l],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),fc=d((({phoneNumber:e,sendCode:t,onClose:n})=>{const[r,s]=i(""),[d,m]=i(""),[u,h]=i(!1),p=l((async()=>{const e=await(i={captchaText:d},ta("/sms/checkCaptcha","POST",i).then((e=>e.text())).then((e=>"ERROR"!==e)));var i;e?(t?.(),n?.()):h(e)}),[d,t]),g=l((()=>{(async()=>{s(URL.createObjectURL(await(e=>ta(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return a(g,[]),o(Zl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",head:o(gc,{}),onClose:n,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:g,className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(gn,{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(Xl,{onClick:close,version:"secondary",children:"Вернуться"}),o(Xl,{type:"submit",disabled:!d,onClick:p,version:"secondary",children:"Отправить"})]})]})})})),xc=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:yc(e)})))),yc=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,bc=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=i(0),u=s([]);a((()=>{u.current?.[d]?.focus()}),[d]);const h=l((n=>i=>{const{value:a}=i.currentTarget,l=a.slice(0,1);t(e.map(((e,t)=>t===n?l:e))),m(n+1)}),[e]),p=l((n=>i=>{const{key:a}=i;if("Backspace"===a&&!e[n]){const i=n>0?n-1:e.length-1,a=e.map(((e,t)=>t===i?"":e));t(a),m(i)}}),[e]),g=l((n=>{n.preventDefault();const i=n.clipboardData.getData("text"),a=e.map(((e,t)=>t<i.length?i[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,i)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(i),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[i]=e},onFocus:e=>e.target.select(),onKeyDown:p(i),className:vc(i,e,n)},i)))}),n?o("div",{className:"text-error",children:r}):null]})})),vc=(e,t,n=!1)=>{const i=!t[e];return`w-20 h-24 text-5xl text-center p-lg m-2 border ${n&&i?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},Nc=d((({isDisabled:e,onClick:t,text:n})=>o(Xl,{type:"button",onClick:t,disabled:e,children:o(Ae,{font:"font-normal",children:n})}))),wc=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},Cc=({values:e,onSuccess:t})=>{const[n,r]=i(""),[s,o]=i(!1),[c,d]=i(0),[m,u]=i(!1),[h,p]=i(0),g=l((()=>r("")),[]),f=Boolean(0===c&&m),x=h>2||f||!e.every(Boolean),y=l((async()=>{try{u(!1),d(0),p((e=>e+1)),o(!0),await(async e=>ea("/sms/checkCode","POST",e).then(wc))({smsText:e.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),g(),t?.(e.join(""))}catch{r(h>1?"Исчерпан лимит ввода смс-кода":"Неверный код")}finally{o(!1)}}),[e,h]);return a((()=>{r(f?"Код просрочен":"")}),[f]),{handleSubmit:y,hasError:Boolean(n),errorText:n,isLoading:s,timeNextReq:c,isSubmitButtonDisabled:x,setTimeNextReq:d,setIsTimerStarted:u,setAttempts:p}},Sc=d((({title:e,description:t,__html:n,code:r=!0,codeLength:s=4,textButton:d="Далее",phoneNumber:m="+79999999999",onSuccess:u=un,onClose:h=un})=>{const[p,g]=i(Array(s).fill("")),{handleSubmit:f,hasError:x,errorText:y,isLoading:b,timeNextReq:v,isSubmitButtonDisabled:N,setTimeNextReq:w,setIsTimerStarted:C,setAttempts:k}=Cc({values:p,onSuccess:u}),I=sn(fc),T=l((async()=>{var e;await(e={phoneNumber:m,smsCodesSetName:{key:"AUTHENTICATION"}},ea("/sms/sendCode","POST",e).then((t=>!cc(t,e.phoneNumber))))?(k(0),w(180),C(!0)):I.open({phoneNumber:m,sendCode:T,onClose:h})}),[m,h]);return a((()=>{T()}),[]),o(Zl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl px-5xl py-0",onClose:h,children:c("div",{className:"flex flex-col gap-xl items-center rounded-md",children:[o(S,{className:"w-full",title:e,description:t,headlineVersion:"XS",isEmbedded:!0,as:"h6"}),r?o(bc,{values:p,setValues:g,errorText:y,hasError:x}):null,Ic(v,w,T),o(Me,{itemSize:"list-s",__html:n}),kc(d,N,f),b?o(Ei,{blur:!1}):null]})})})),kc=(e,t,n)=>e?o(Nc,{isDisabled:t,onClick:n,text:e}):null,Ic=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o(xc,{className:"text-base ml-1",time:e,setTime:t})]}):o(Ne,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Tc={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},Bc={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},Pc=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],Rc=d((({onSubmit:e=un,onClose:t=un})=>{const[n,a]=i(""),[r,s]=i(!1),d=er(2),m=l((()=>{e(n)}),[e,n]),u=l((e=>{a(e),"REFUSE"===e&&s(!0)}),[]),h=r?Bc:Tc;return o(Zl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:t,children:c("div",{className:"flex flex-col gap-xl items-center",children:[o("div",{role:"button",onClick:d,children:o(N,{className:"text-center text-balance",headingType:"h2",title:h.title})}),o(w,{align:"text-center",children:h.description}),o(yr,{className:"whitespace-normal",orientation:"horizontal",items:Pc,value:n,onChange:u}),o(Xl,{disabled:!n,type:"button",onClick:m,children:"Продолжить"})]})})})),Dc=e=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:qt(e),textButton:"Далее",__html:"<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>\n <ul><li>согласие на запрос информации в БКИ</li></ul>"}),Mc=d((({onClose:e})=>{const t=Jt(),n=l((async()=>{const e=await(n={redirectUri:t.href},ea("/esia/getLink","POST",n));var n;e?.link&&t.assign(e.link)}),[]);return o(Zl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex items-center justify-around w-full",children:[c("ul",{className:"list-disc",children:[o("li",{children:"Вероятность одобрения выше"}),o("li",{children:"Без справок о доходах и трудоустройстве"}),o("li",{children:"С защитой Ваших данных"})]}),o(ne,{image:{icon:"GosUslugiIcon",iconVersion:"normal"},height:"70"})]}),c("div",{className:"flex items-center justify-between w-full m-0",children:[o(Xl,{type:"button",onClick:n,children:"Заполнить через Госуслуги"}),o(Xl,{type:"button",version:"secondary",onClick:e,children:"Пропустить"})]})]})})})),_c={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},Ac={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK"},Ec={incomeAverage:"INCOME_AVERAGE",mandatoryPayments:"MANDATORY_PAYMENTS",additionalIncome:"ADDITIONAL_INCOME",otherIncome:"OTHER_INCOME",otherPayments:"OTHER_PAYMENTS",rentalIncome:"RENTAL_INCOME",wages:"WAGES",retirementIncome:"RETIREMENT_INCOME"},zc=e=>Object.entries(e).reduce(((e,[t,n])=>t in _c?[...e,{contactTypeCd:{key:_c[t]},value:n}]:e),[]),Fc=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in Ac){const i=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:Ac[t]},...i}]}return e}),[]),Oc=e=>Object.entries(e).reduce(((e,[t,n])=>t in Ec?[...e,{incomeTypeCd:{key:Ec[t]},value:Number(n||0)}]:e),[]),Vc=({inputs:e,programId:t,nextStepLink:n,saveForm:a})=>{const[r,s]=i(""),[,o]=Fl("taskId"),[,c]=Fl("profileId"),[,d]=Fl("participantId"),[,m]=Fl("programId"),u=(e=>{const{open:t}=sn(Mc),n=Jt();return l((()=>{t({onClose:()=>n.assign(e)})}),[t,e])})(n),h=(e=>{const{open:t}=sn(Rc),n=sn(Sc),i=t=>async n=>{try{t&&await sc({profile:{id:t,consentBkiFlg:!0,smsConsentBki:n}}),e()}catch(e){console.log(e)}},a=(t,a)=>async l=>{"SIGNED"===l&&t?n.open({...Dc(t),onSuccess:i(a)}):e()};return{open:(n,i)=>t({onSubmit:a(n,i),onClose:e})}})(u),p=sn(Sc),g=l((({participantId:e,taskId:t,profileId:n,programId:i})=>{d(e),o(t),c(n),m(i)}),[]);return{handleSubmit:l((async n=>{const i=jo(ii(e));var l;if(zn(i(n)))try{const e=await(l={profile:{phone:qt(n.phone)}},ea("/public-data/createUserProfile","POST",l).then((e=>e?.profile?.id||null)));if(e&&n?.phone){const i=async()=>{try{await Lc({programId:t,profileId:e,formData:n,saveUserData:g,saveForm:a}),p.close(),h.open(n.phone,e)}catch{s("Fail")}},l=Object.keys(Hl).filter((e=>n[e])).map((e=>Hl[e]?.text));p.open({...$c(n?.phone,l),onSuccess:i})}}catch{s("Fail")}}),[]),responseStatus:r}},Lc=async({programId:e,profileId:t,formData:n,saveUserData:i,saveForm:a})=>{const l=qc(n);await sc(((e,t)=>{const{name:n="",surname:i="",middleName:a="",limitedBirthday:l="",phone:r="",email:s="",processPersonalDataFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:i,midname:a,birthDate:l&&jt(l,!0),email:s,phone:qt(r),processPersonalDataFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(t,l));const{taskId:r,participantId:s}=await(async e=>await ea("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await oc((({participantId:e,taskId:t,profileId:n,formData:i})=>{const{name:a,surname:l,middleName:r,limitedBirthday:s,phone:o,email:c}=i;return{sendToBank:!0,taskKind:"SHORT",task:{taskSource:Jt().origin,id:t,participants:[{birthDate:s&&jt(s,!0),id:e,midname:r,name:a,surname:l,profile:{id:n},participantContacts:zc({phone:o&&qt(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}]}}})({participantId:s,taskId:r,profileId:t,formData:l}))}catch(e){console.log(e)}i({participantId:s,taskId:r,profileId:t,programId:e}),a(n)},$c=(e,t)=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:qt(e),textButton:"Далее",__html:`<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${jc(t)}`}),jc=e=>`<ul>${e?.map((e=>"<li>"+e+"</li>")).join("")}</ul>`,qc=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Uc=e=>{const{profile:t,addInfo:n,document:i,addressRegistration:a,addressFact:l}=e;return{name:t?.name,surname:t?.surname,middleName:t?.midname,limitedBirthday:t?.birthDate,phone:io(t?.phone),email:t?.email,dulIssueDateField:i?.dulIssueDate,dulIssuedBy:i?.dulIssuedBy,dulNumber:i?.dulNumber,dulSerie:i?.dulSerie,dulSubdivisionCode:i?.dulSubdivisionCode,snils:n?.snils,birthPlace:n?.birthPlace,addressRegistration:Wc(a),addressFact:Wc(l),esiaAccountTypeCd:t?.esiaAccountType}},Wc=e=>{const{postcode:t,region:n,regionCode:i,locality:a,city:l,street:r,house:s,building:o,block:c,apartment:d}=e,m=[t,n,a||l,r?`ул ${r}`:void 0,s?`д ${s}`:void 0,c?`к ${c}`:void 0,o?`стр ${o}`:void 0,d?`кв ${d}`:void 0].reduce(((e,t)=>t?e?`${e}, ${t}`:t:e),"");return{...e,regionCode:i?.key,fullAddress:m}},Hc=e=>{const t=Jt(),[n,{setTrue:i,setFalse:r}]=on(!1),[,s]=Fl("leadForm"),o=l((async(n,a,l)=>{i();try{const i=await(o={profileId:n,code:a,state:l,redirectUri:globalThis.location?.href},ea("/esia/updateProfileEsia","POST",o));i&&s((e=>({...e,...Uc(i)}))),t.assign(e)}finally{r()}var o}),[e]);return a((()=>{const e=JSON.parse(globalThis.localStorage?.getItem("profileId")??"null"),t=new URLSearchParams(decodeURIComponent(globalThis.location?.search)),n=t.get("code"),i=t.get("state");e&&n&&i?o(e,n,i):(sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken"))}),[]),{isLoading:n}},Yc=d((({className:e,title:t,programId:n="",nextStepLink:i="/credit-lead",button:l,...r})=>{const s=ic?.flatMap((e=>e?.inputs))||[],{isLoading:d}=Hc(i),[m,h]=Fl("leadForm"),p=lc(s,m),{handleSubmit:g,responseStatus:f}=Vc({inputs:s,programId:n,nextStepLink:i,saveForm:h}),[,{field:x,onSubmit:y}]=an(p,{onSubmit:g}),b=sn($o);return a((()=>{f&&b.open({responseType:f})}),[f]),o(rn,{className:u("container space-y-m",e),title:t,...r,children:c("form",{onSubmit:y,className:"space-y-m relative",children:[d?o(Ei,{blur:!1}):null,ic.map(((e,t)=>c("div",{className:u(Vo(e.columns),"grid gap-x-m"),children:[Lo(e.title),tc({field:x,inputs:e?.inputs})]},`section-${t}`))),rc(l)]})})})),Kc=d((({title:e,description:t})=>{const n=ke();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(S,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Gc=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Xc=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Jc=10;function Zc(e,{sensitivity:t,rootRef:n}={}){const i=s(null),l=r((()=>({threshold:Qc(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!i.current)return;const t=new IntersectionObserver(e,l);return t.observe(i.current),()=>{t.disconnect()}}),[e,l]),i}function Qc(e=0){const t=Math.round(e*Jc);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const ed=d((({className:e,style:t,idx:n,activeIndex:i,observerOptions:a,children:r,onIntersection:s})=>{const c=Zc(l((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===i),ref:c,role:"listitem",children:r})})),td=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],nd=d((({className:e,itemClassName:t,containerRef:n,activeIndex:i,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},y=s([]),b=l(((e,t)=>{const n=[...y.current||[]];n[e]=t,y.current=n,g&&g(n),f&&f(ad(n))}),[g,f]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?id(c,v):{},...N?Xc(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:C,ref:n,role:"list",children:(S=(e,n)=>o(ed,{className:u(m,a?td[a-1]:"",{"h-full":N},t),style:w?id(c/4):{},activeIndex:i,idx:n,observerOptions:x,onIntersection:b,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),id=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),ad=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ld={"horizontal-list":"w-6","vertical-list":"h-6"},rd=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(i,a)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?ld[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),sd=({activeIndex:e,onClick:t})=>(n,i)=>{const a=i===e,l=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(i),"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",l),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(i))},od=e=>t=>e.scrollWidth/t,cd=e=>(t,n)=>{e.scrollBy({left:n*od(e)(t),behavior:"smooth"})},dd=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=i([]),o=l((e=>{r((t=>{return(n=t)===(i=e)||Boolean(n&&i&&n?.length===i?.length&&n.every(((e,t)=>e===i[t])))?t:e;var n,i})),t&&t(e)}),[t]),[c,d]=a.length?[Tr()(a),kr()(a)]:[-1,-1],m=c>0,u=d<e-1,h=l((()=>{var t;n.current&&(m?cd(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=l((()=>{n.current&&(u?cd(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=l(((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}]},md={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},ud=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:i="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=ke(),[h,p]=dd({itemCount:s.length}),g=hd(Boolean(s?.length));a((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=l((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(nd,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(sd({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",md[i],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(rd({activeIndex:t,onClick:f,listType:i}))}):null})),hd=(e=!1)=>({behavior:e?"auto":"smooth"}),pd=d((({className:e,disabled:t,...n})=>o(Ne,{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"})}))),gd=d((e=>o(pd,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),fd=d((e=>o(pd,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),xd="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",yd=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:i,isBottom:a})=>{const{canScrollLeft:l,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=i&&!a;return c("div",{className:e,children:[n?bd(t):null,l?o(gd,{className:u(vd(a),m?"left-1":"left-0"),onClick:s}):null,r?o(fd,{className:u(vd(a),m?"right-1":"right-0"),onClick:d}):null]})})),bd=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(xd,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(xd,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),vd=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Nd=d((({className:e,version:t,gap:n=14,padding:i=16,visibleItemCount:a=1,listType:l="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const y=Array.isArray(g)?g.length:0,[b,v]=dd({itemCount:y,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===l?"relative h-full":""),children:[o(nd,{containerRef:b,activeIndex:N,visibleItemCount:a,gap:n,padding:i,listType:l,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(yd,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(ud,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:y,listType:l,version:t,navButtons:x,containerRef:b,containerScroll:v})]})})),wd=({blocksToRender:e,...t})=>o(Nd,{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",Gc(!0)),children:T(e,t)},String(n))})}),Cd=e=>e%2!=0,Sd=d((({textNode:e,iconNode:t,tag:n,onClick:i,justifyContent:a="between",className:l,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",l),onClick:i,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),kd=d((({className:e="",label:t,icon:n,dataTheme:i="pc",disabled:a=!1,onClick:l})=>o(Sd,{tag:"button",onClick:l,disabled:a,"data-theme":i,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(Ae,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Id=({isUnfolded:e,onToggle:t})=>o(kd,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Td=["ArrowDownIcon","ArrowUpIcon"],Bd="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Pd=({topItemsCount:e=0,label:t="",block:n,blocksToRender:i=[],...a})=>{const[l,r]=e>0?[i.slice(0,e),i.slice(e)]:[i,[]];return c("div",{className:u("space-y-2xs",{hidden:!i.length}),children:[c("div",{className:u(Bd),children:[P(l,{...a.options,parent:n}),Cd(l.length)?o(Lt,{className:"col-span-6",...a}):null]}),o(aa,{renderFoldableSection:({isUnfolded:e})=>c(la,{className:u(Bd),isUnfolded:e,children:[P(r,{...a.options,parent:n}),Cd(r.length)?o(Lt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:i})=>o(kd,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:Td[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:i})})]})},Rd=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...i})=>{switch(e?.view){case"grid":return c("div",{children:[Dd(n,t),Pd({...e,...i,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Dd(n,t),wd({...i,blocksToRender:t})]});default:return null}})),Dd=(e,t)=>e&&!t.length?o(Kc,{...e}):null,Md=e=>t=>t.reduce(((t,n,i)=>t.length?t.concat({...e,key:`sep-${i}`},n):[n]),[]),_d=d((({value:e,onChange:t,items:n=[],multiple:i})=>n.map((n=>o($s,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(i?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:i?"checkbox":"radio"},n.value))))),Ad=d((({children:e,filtrationSchema:t,resetButton:n,field:i,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,Md(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Ed(i)).filter(Boolean))]}),n?o("div",{children:o(Xl,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Ed=e=>([t,n])=>{const i=n?.type;return"array"===i?zd(t,e)(n):null},zd=(e,t)=>n=>{const i=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(Ae,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(_d,{items:i,multiple:!n?.single,...t(e)})]},e)};function Fd(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Od=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Vd=(e,t)=>Object.entries(e).map((([n,i])=>"number"==typeof i?Array.isArray(t[n])?((e,t)=>n=>Od(t[e])||Od(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Od(t[e])||Od(n[e])||Ld(t[e])<=Ld(n[e]))(n,e):"object"==typeof i&&"min"in i&&"max"in i?((e,t)=>n=>Od(t[e])||Od(n[e])||Ld(t[e]?.min)>=Ld(n[e]?.min)&&Ld(t[e]?.min)<=Ld(n[e]?.max))(n,e):Array.isArray(i)?((e,t)=>n=>Od(t[e])||Od(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Od(t[e])||Od(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Ld=e=>Number(e||0),$d=(e,{block:t,page:n,normalize:i=nn})=>{const a=t?.blocks||[],[l,{field:s,reset:o,update:c}]=an(e),d=r((()=>Fd(a,a.map((e=>Et(e.content,n?.fallback))))),[a,n?.fallback]),m=l===e?a:((e,t)=>(n=nn)=>e?.filter((([,e])=>Vd(t,n(e)||{}))).map((([e])=>e)))(d,l)(i);return[l,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},jd={},qd={},Ud=Ot((({className:e,filtrationSchema:t=jd,consumerField:n={},resetButton:i,...a})=>{const[,{blocksToRender:l},{field:r,reset:s}]=$d(qd,{block:a.block,page:a.options?.page}),d=o(Dn,{className:"w-64",label:n?.title,options:Wd(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Wd(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Ad,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Xl,{type:"reset",className:"mt-lg w-64",onClick:s,version:i?.version,children:i?.text})})]})}),o(Rd,{blocksToRender:l,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Wd=e=>Fd(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Hd=(e=!1)=>e?"text-left":"text-center",Yd={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Kd=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:i,icon:a,...l})=>{const r=String(i?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",Yd[n],e),children:o(W,{...l,width:"54%",height:"54%",name:a})}):null})),Gd=d((({className:e="",title:t,benefitList:n,...i})=>{const a=ke();return c(g,{className:e,defaultPadding:"p-6xl",...i,children:[t?o(N,{headingType:"h3",as:"h2",className:Hd(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(Xd)}):null]})})),Xd=({label:e,description:t,__html:n,icon:i,isDotted:a=!1,iconBgVersion:l},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[i?.icon?o(Kd,{className:"shrink-0",iconBgVersion:l,...i}):null,i?.src?o(ne,{className:"shrink-0",image:i}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Ae,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Me,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),Jd=e=>({icon:t,title:n,description:i},a)=>c("div",{className:u("flex flex-col gap-1","items-center",{"justify-center":!i&&!n}),children:[n?o(Ae,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,i?o(Ae,{size:"text-h6",font:"font-normal",align:e,children:i}):null]},String(a)),Zd=(e,t,n)=>o("div",{className:`grid gap-2xs ${Qd(t)}`,children:e.map(Jd(n))}),Qd=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},em=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:i="4",subtitle:a,title:l,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(S,{defaultPadding:"",title:l,description:a,headlineVersion:"M"}),e?.length?Zd(e,i,t):null]}))),tm={start:"justify-start",center:"justify-center",end:"justify-end"},nm=d((({buttons:e,className:t="",align:n,...i})=>{const a=n&&u("flex",tm[n]);return o(g,{className:u("!bg-transparent",a,t),defaultPadding:"p-0",...i,children:je(e)})})),im=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:i=2,depositeName:a,isShowDepositeName:l,color:r="text-secondary-text"})=>c("div",{children:[o(Ae,{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:He(i,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&l?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),am=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),lm=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:i=2,color:a="text-secondary-text",children:l,...r})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(im,{title:e,rate:t,unit:n,fractionDigits:i,color:a,...r})}),o(cr,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:i,fixed:!0,color:a,...r}),l]}):o(am,{title:e,...r}),rm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},sm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},om=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:i}=e,[a,l]=((e,t,n)=>{const{maxBonus:i=5e3,prefMonthsNum:a=rm.prefMonthsNum,prefTravelBonusRate:l=rm.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(l*t)+Math.round(r*n),i);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),i)*(12-a)]})(t||sm,n,i);return{...t,...e,monthBonus:a,yearBonus:l}},cm=Ot((({className:e="",title:t,calcSource:n,buttons:i,footnote:a,...l})=>{const[r,{field:s}]=an({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=om(r,n);return o(ar,{className:e,title:t,...l,children:c("section",{className:u(lr,e),children:[c("div",{className:rr,children:[Nr({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Nr({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?lm({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:sr,children:[f>=0?o(cr,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,je(i,{isVertical:!0}),pr(a)]})]})})})),dm=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,mm=e=>br({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),um=" (c капитализацией)",hm=({income:e,finalSum:t,postfix:n="₽",buttons:i=[],footnotes:a=[],isCapitalization:l=!1})=>c("div",{className:sr,children:[o(cr,{title:`Доход в конце срока${l?um:""}`,value:e,postfix:n,prefix:"+"}),o(cr,{title:`Сумма в конце срока${l?um:""}`,value:t,postfix:n}),je(i,{isVertical:!0}),a?.map(pr)]}),pm={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const gm={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},fm=(e,t)=>{const{daysValue:n,moneyValue:i,isPartialWithdrawal:a,isReplenished:l,isMonthlyInterestPayment:r}=e,s=l||a,o=n<90||n>730,c=function(e){const t=e?.rateType?pm[e?.rateType]:"",{data:n}=gi(t?`${Ut}/depositrates/${t}`:null,Dt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&xm(s,e)&&Dr(i,["minSum","maxSum"],e)&&Dr(n,["minDays","maxDays"],e)))||gm,{rate:m}=d,u=ym(m,e),h=i+u,p=c||[gm];return{...d,...Rr(["minSum","maxSum"],p),...Rr(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},xm=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,ym=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:i,daysValue:a}=t;return n?Math.round(i*Math.pow((1200+e)/1200,a/30)-i):Math.round(i*e*a/365/100)},bm=Ot((({className:e="",title:t,buttons:n,footnote:i,bottomFootnote:a,isShowDepositeName:l,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=an({moneyValue:ur(r,1e5),daysValue:hr(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=fm(m,s),{income:g,finalSum:f,rate:x,depositeName:y}=p;return o(ar,{className:e,title:t,...d,children:c("section",{className:u(lr,e),children:[c("div",{className:rr,children:[Nr({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(b={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(Za,{items:[`От ${dm(b.min||0)}`,`До ${dm(b.max||0)}`],step:1,...b})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[vm(p,h),mm({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),lm({rate:x,depositeName:y,isShowDepositeName:l}),hm({income:g,finalSum:f,buttons:n,footnotes:[i,a]})]})});var b})),vm=(e,t)=>c("div",{className:"space-y-s",children:[o(Ae,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Bi,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Bi,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Nm=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,i]=t[n-1],[a,l]=t[n];i>=a?t.splice(n-1,2,[e,Math.max(i,l)]):n++}return t},wm={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Cm=(e,t,n)=>{const{moneyValue:i,monthsValue:a}=e,l=t?.[0]?Im(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=>[km({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),km({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),km({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),km({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,Dr(i,["minSum","maxSum"],t),Dr(a||l,["minMonths","maxMonths"],t)].every(Boolean)))||wm,{rate:u}=m,h=Sm(u,e),p=i+h,g=t||[wm];return{...m,...Rr(["minSum","maxSum"],g),...Rr(["minMonths","maxMonths"],g),availableMonths:Nm(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((i,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:l,income:h,finalSum:p}},Sm=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:i,monthsValue:a}=t;return n?Math.round(i*Math.pow((1200+e)/1200,a)-i):Math.round(i*e*30*a/365/100)},km=({row:e,userInputParams:t,paramKey:n,isExclude:i})=>i||t[n]===e[n],Im=(e,t)=>e+Math.round((t-e)/2),Tm=(e="rub")=>"rub"===e,Bm=(e,t)=>{const{minMonths:n,maxMonths:i}=Rr(["minMonths","maxMonths"],Mm(t,e?.currency)),a=e.monthsValue||Math.round((n+i)/2);return{monthsValue:Ya(a,n,i)}},Pm=(e,t)=>{const{minSum:n,maxSum:i}=Rr(["minSum","maxSum"],Mm(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:Ya(a,n,i)}},Rm=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Dm=e=>{const t=Tm(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Mm=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},_m=(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?br({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?br({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Am(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?mm({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(i={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},br({...i,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Am(e.isShowNewClient),e.isShowNewClient?o(Bi,{text:"Новый вкладчик",...t("isNewClient")}):null]});var i},Am=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Em={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},zm={text:"₽",key:"rub"},Fm=Ot((({className:e,title:t,calcSource:n,buttons:i=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[zm],g=l((e=>t=>e?{...t,...Dm(t),...Pm(t,e),...Bm(t,e),...Rm(t,e)}:t)(h),[h]),[f,{field:x}]=an({moneyValue:ur(d,2e4),monthsValue:hr(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:zm},{normalize:g}),y=x?.("currency")?.value??zm,b=x?.("isNewClient")?.value,v=Mm(h,y),N=Cm(f,v,s),{rate:w,income:C,finalSum:S,type:k=""}=N,I=l((()=>{wr({field:x,defParams:dr(v,b),calcParams:N,monthsValue:"minMonths",map:Em})}),[x,h]);a((()=>{!zr(d)&&v&&I()}),[d,h]);const T=w===dr(v,b)?.rate;return o(ar,{className:e,title:t,...m,children:c("section",{className:u(lr,e),children:[c("div",{className:rr,children:[c("div",{className:"flex gap-m",children:[Nr({className:"w-full",title:`Сумма, ${y?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:y?.text,step:Om(y?.key)}),h&&h?.length>1?o(En,{label:"Валюта",options:p,...x("currency")}):null]}),gr({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),_m({...N,...s},x)]}),lm({rate:w,children:Lm(I,T)}),hm({income:C,finalSum:S,buttons:[...i,Vm(n?.buttons,k)],footnotes:[r],postfix:y?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Om=(e="")=>Tm(e)?1e3:100,Vm=(e=[],t="")=>{const{type:n,...i}=e.find((e=>e.type===t))??{};return i},Lm=(e,t=!1)=>t?null:o(Xl,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),$m=e=>jm({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&jm({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),jm=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:i,viewSettingFieldKey:a})=>!!n&&!n[a]||t[i]===e[i],qm={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Um=(e,t,n)=>{const{moneyValue:i,monthsValue:a,oldMonthlyPayment:l,moneyExtra:r}=e,s=t?.rateRows||[qm],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>$m({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=Pr(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=Pr(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:i,monthsValue:a,oldMonthlyPayment:l,moneyExtra:r})=>e?.find((e=>$m({row:e,userInputParams:t,paramsViewSettings:n})&&Dr(i+r,["minSum","maxSum"],e)&&Dr(l,["minSumOld","maxSumOld"],e)&&Dr(r,["minSumExtra","maxSumExtra"],e)&&Dr(a,["minMonths","maxMonths"],e)))||qm)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:i,monthsValue:a,oldMonthlyPayment:l,moneyExtra:r}),{rate:p}=h,g=Cr(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:i,monthsValue:a,oldMonthlyPayment:l,moneyExtra:r,monthlyPayment:g,benefit:f}},Wm=Ot((({className:e="",title:t,calcSource:n,buttons:i,footnote:a,paramsViewSettings:l,...r})=>{const[s,{field:d}]=an({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Um(s,n,l),h=vr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(ar,{className:e,title:t,...r,children:c("section",{className:u(lr,e),children:[c("div",{className:rr,children:[Nr({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Nr({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),gr({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Hm({...m,...l},d),m.isExtraMoney?Nr({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(sr,"@4xl:w-1/2"),children:[o(cr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(cr,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(cr,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(cr,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),je(i,{isVertical:!0}),pr(a)]})]})})})),Hm=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Bi,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Bi,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Bi,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Ym=d((e=>{const{onChange:t,min:n,max:i,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Ha(e,{normalize:(e=a)=>n&&i?String(Ya(Number(Km(e)),n,i)):Km(e),format:He(r)}),d=l((e=>t&&t(Km(e))),[t]);return o(gn,{onChange:d,...s,...c})})),Km=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Gm=d((e=>o(Ym,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ae,{size:"text-xl",font:"font-light",children:"₽"})})}))),Xm={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Jm={amount:1500},Zm=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:r="private",...s})=>{const[{amount:d},{field:m}]=an(Jm),[h,p]=i(!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:Xm[r],children:[o(Gm,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),l?.text?o(Xl,{className:"w-full mt-lg",type:"submit",disabled:h,children:l.text}):null]})]})})),Qm=({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})]}),eu="relative h-full",tu={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},nu=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...i})=>{const{blocks:a}=i.block||{},l=a?.some(lu),r=n?{defaultPadding:"p-6xl pb-m"}:{};return R({...i,renderProps:(n,i,a)=>c("div",{className:iu(n,{someCardsHighlighted:l}),children:[T(n,i,{className:au(n,{someCardsHighlighted:l,showBorder:!e,cardSize:t}),...r,blockIndex:a}),lu(n)?Qm({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},iu=(e,{someCardsHighlighted:t})=>u(eu,t&&(lu(e)?"pt-3xl":"pt-3xl sm:pt-16")),au=(e,{someCardsHighlighted:t,showBorder:n,cardSize:i="normal"})=>u(eu,"min-w-80",tu[i],t&&(lu(e)?"pt-3xl sm:pt-16":"pt-3xl"),Gc(n),n&&"h-full"),lu=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ru=Ot((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:i=!0,isGap:a=!0,cardSize:l="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(Nd,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:i,navButtons:r?su(s?.block?.blocks):[],hasBlur:!0,children:nu({noCardBorder:n,cardSize:l,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),su=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],ou="z-10 border border-solid w-full h-full",cu=u(ou,"absolute hidden @xl:block border-transparent"),du=d((({className:e,title:t,description:n,button:i,...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(cu,"top-9 right-12 bg-green-dark")}),o("div",{className:u(cu,"top-6 right-8 bg-green")}),o("div",{className:u(cu,"top-3 right-4 bg-green-light")}),c("div",{className:u(ou,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),je([i],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),mu={black:"bg-black",white:"bg-white"},uu=d((({className:e="",title:t,description:n,image:i,price:a,button:l,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(Be,{className:"h-full",padding:d,title:o(S,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:i?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:i}):null,buttons:je([l],{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(Ae,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(hu)]}):null,a?c(Ae,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),hu=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${mu[e]}`},String(t)),pu=d((({icon:e,...t})=>{const n=pe(),{text:i,href:a,target:l,onClick:r}=n(t);return i?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:l,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:i}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:i})]})})}):null})),gu=d((({className:e,additionalDescription:t,description:n,links:i,title:a,...l})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...l,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(S,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),i?.length?fu(i):null]})}))),fu=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(pu,{...e},String(t))))}),xu=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),yu=d((({className:e="",href:t,target:n,onClick:i,data:a,children:l})=>{const r=pe()({href:t,target:n,onClick:i});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...fe(a),children:l})})),bu=[{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"}}],vu=d((({className:e="",media:t,showButtonText:n,stretched:a,version:l="white",children:r})=>{if(!t?.length)return null;const[s,d]=i(),m=t?.map((e=>{const{href:t,icon:i,text:a}=e,{iconMapped:r}=(e=>bu.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=$e(i)?i: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??l}})),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},Nu(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:wu(s??!1,a??!1,n),buttonClassName:h})}),r?o(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Nu=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",wu=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),Cu=d((({className:e,padding:t,description:n,additionalDescription:i,href:a,icon:l,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:y=true,isImageSecondary:b=!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(yu,{href:a,target:m,className:"h-full",data:xu(v),children:c(Be,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Qe($e(l)?o(ne,{image:l}):null,x),buttons:d.length?o(vu,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:y,isImageSecondary:b,imageAlign:"center",children:[o(Le,{benefits:f}),s?o(Me,{__html:s,isDotted:r,itemSize:"list-s"}):null,Su(i,p)]})})}))),Su=(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,ku=(e,t)=>{const{title:n,description:i,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:n})}):null,i?o("div",{className:"mt-2xs",children:o(Ae,{size:"text-xl",color:"text-primary-text",children:i})}):null,a?.length?o("div",{className:"text-primary-main",children:je(a)}):null]},String(t))},Iu=d((({className:e="",title:t,align:n="text-center",icon:l,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:h,...p})=>{const f=d.map(ku),[x,y]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[b,v]=i(!1);return a((()=>ue.subscribe("fold",(e=>{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:[$e(l)?o("div",{className:"self-center",children:o(ne,{image:l})}):null,t?o(N,{className:u("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(Ne,{className:"w-full mt-m mb-lg",...r}):null,y.length?o(aa,{renderFoldableSection:()=>c("div",{children:[x,o(la,{isUnfolded:b,children:y})]}),renderFoldButton:d.length>=s?Tu(m?.parent,h,b):null}):o("div",{children:x})]})})),Tu=(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&&ue.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?fe(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Bu=d((({className:e,contacts:t,info:n,version:i="secondary",...a})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:i,...a,children:[n?.length?Pu(n):null,t?.length?Pu(t):null]}))),Pu=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>Ru({column:e,i:t})))}),Ru=({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:i},a)=>c("div",{children:[o(S,{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(i?.text)}),children:je([i])})]},String(a))))},`col-${String(t)}`):null,Du=()=>{const e=globalThis.sessionStorage?.getItem("refreshToken"),t=globalThis.sessionStorage?.getItem("accessToken"),n=globalThis.localStorage.getItem("taskId"),i=Jt();if(!t||!e||!n)return i.assign("/"),()=>{};const a=async()=>{const n=await ta("/auth/refresh","POST",{refresh_token:e,access_token:t});if(401==n?.status&&i.assign("/"),n?.ok){const e=await n.json();globalThis.sessionStorage.setItem("refreshToken",e.refresh_token),globalThis.sessionStorage.setItem("accessToken",e.access_token)}};a();const l=setInterval(a,24e4);return()=>clearInterval(l)},Mu=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]})]}))),_u=d((({step:e=1,totalSteps:t=6,stepsTitles:n=[]})=>{const i=r((()=>(e+1)/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 mr-s",children:["Шаг ",e+1," из ",t,"."]}),n[e]||null,o(Mu,{step:i,showPercentage:!1})]})})}));var Au;!function(e){e.process="IN_PROCESS",e.ok="APPROVED",e.fail="CANCELLED",e.rework="REVISION"}(Au||(Au={}));const Eu=e=>ea("/user-data/getTaskStatus","POST",e),zu=e=>ta("/user-data/sendSignalToProcess","POST",e),Fu=(e,t)=>{const n=s(null),i=l((()=>n.current&&clearInterval(n.current)),[]);return a((()=>(n.current=setInterval((()=>e(i)),t),i)),[e,t]),i},Ou=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black",link:i})=>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})}),c("div",{className:"",children:[o(Me,{__html:e}),i?.text?o(Ne,{className:"text-primary-main",children:i.text}):null]})]}))),Vu=d((({interval:e=0,intervalExpireAction:t=(()=>null),title:n,__html:a})=>{const[l,r]=i(e),s=100-(e-l)/e*100;return c("div",{children:[n?o(S,{title:n,headlineVersion:"S"}):null,c("div",{className:"flex justify-center items-center flex-col",children:[c("div",{className:u("relative flex items-center justify-center w-24 h-24 rounded-full bg-gray text-transparent mb-5"),children:[o("div",{className:"absolute inset-0 rounded-full",style:{background:`conic-gradient(rgb(66, 171, 68) ${s}%, rgb(125, 126, 127) 0deg)`}}),o("div",{className:"z-10 flex items-center justify-center px-4 py-2 rounded-full w-20 h-20 bg-white text-primary-text text-m",children:o(xc,{interval:e,time:l,setTime:e=>{0===e&&t(),r(e)}})})]}),a?o(Me,{__html:a}):null]})]})})),Lu=d((({title:e,description:t,infoCard:n,sectionInfoTitle:i,sectionInfo:a,sectionAdditionalTitle:l,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Vu,{interval:d,intervalExpireAction:m}):null]}),o($u,{title:i,items:a}),o($u,{title:l,items:r,countColumns:!0}),n?.__html?o(Ou,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(Ne,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),$u=({title:e,items:t,countColumns:n=!1})=>{const i=ke();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Ae,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Vo(n||i?1:2)),children:t.map(((e,t)=>o("div",{children:ju(e)},t)))}):null]})]}):null},ju=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ae,{color:"text-secondary-text",size:"text-l",children:e}),o(Ae,{color:"text-primary-text",size:"text-xl",children:t})]}),qu=d((()=>o(Lu,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),Uu=d((({handleExpireTimer:e})=>{const[t]=Fl("leadForm");return o(Lu,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory?.text}]})})),Wu=d((()=>{const[e]=Fl("leadForm");return o(Lu,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail?.text},{label:"Адрес",description:e?.addressRetail?.text}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Hu=d((()=>{const[e]=Fl("leadForm");return o(Lu,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.monthsValue+" мес"},{label:"Тип платежа",description:e?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),Yu=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Ku=d((()=>{const[e,t]=i(Au.process),[n]=Fl("taskId");a((()=>{(async()=>{for(const e of Yu)await zu({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const i=await Eu({taskId:n});i&&i?.statusCd!==Au.process&&(e(),t(i.statusCd))}),[n]);Fu(r,3e4);return Gu(e,(()=>t(Au.rework)))})),Gu=(e,t)=>({IN_PROCESS:o(Uu,{handleExpireTimer:t}),CANCELLED:o(qu,{}),APPROVED:o(Hu,{}),REVISION:o(Wu,{})}[e]||null),Xu=[{paymentSystem:"",currency:"rub",codeWord:""},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0,methodObtain:"office",addressCourier:{fullAddress:"",fiasCode:""}},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:"",addressRetail:{key:"",text:""},bankEmployeeCode:void 0,addressCourier:{fullAddress:"",fiasCode:""},methodObtain:"office",deliveryDate:void 0}],Ju=e=>{if(e)try{return new Date(e)}catch(e){return}},Zu=e=>(t,n)=>t.filter((e=>e)).map((t=>[Qu(n,e),eh(t,e),ah(t,e),th(t,e),nh(t,e),ih(t,e)].some(Boolean)?{...t,required:!1}:t)),Qu=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,eh=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,th=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,nh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),ih=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const i=t(e?.name);return n!==(i?.key??i)})),ah=({name:e},t)=>"snils"===e&&lh(t),lh=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,rh=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e,name:t},n)=>o(Ou,{__html:e},`${t}_${n}`))):null},sh=({field:e,inputs:t,params:n})=>t.map(Oo(e,n)),oh=({sections:e,field:t,step:n,params:i})=>e?.map((({inputs:e=[],columns:a,title:l},r)=>{const s=Zu(ch(t))(e,n),o=s.filter((e=>!ih(e,ch(t))));return c("div",{className:u(Vo(a),"grid gap-x-m"),children:[rh(o),Lo(l),sh({field:t,inputs:s,params:i})]},`section-${r}`)})),ch=e=>t=>e(t)?.value,dh=d((({step:e,onPrevStep:t})=>{const n=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Xl,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Xl,{type:"submit",children:n?"Отправить заявку":"Далее"})]})})),mh=e=>{const{currency:t,paymentSystem:n,cardCategory:i,codeWord:a}=e;return{currencyCode:t,paymentSystemTypeCd:n,classCard:i,codeWord:a}},uh=e=>{const{methodObtain:t,deliveryDate:n=""}=e;return{courierDeliveryFlg:"courier"===t,deliveryDate:(i=n,i?new Date(i).toISOString().split(".")[0]:""),deliveryTimeCd:{value:"TIME_2"}};var i},hh=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},ph=(e,t)=>{switch(e){case 0:default:return{};case 1:return(e=>{const{name:t,surname:n,middleName:i,limitedBirthday:a="",phone:l="",email:r,sex:s,birthPlace:o,dulIssueDateField:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:y}=e;return{birthDate:jt(a,!0),midname:i,name:t,surname:n,birthPlace:o,dulIssueDate:jt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:jt(g,!0),houseTypeCd:f,participantContacts:zc({phone:qt(l),email:r}),participantAddresses:Fc({addressRegistration:x,addressFact:y}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}})(t);case 2:return(e=>{const{beginDate:t,employment:n,organizationName:i,inn:a,legalForm:l,organization:r,amountWorkers:s,employerActivities:o,employerOrganization:c,generalSeniority:d,lastJobExperience:m,experience5Years:u,jobsNumber:h,organizationPhone:p,organizationAddress:g,positionOrganization:f}=e;return{employmentContractDate:jt(t||"",!0),employmentTypeCd:n,organizationName:i,organizationInn:a,organizationActivityTypeCd:o,organizationTypeCd:r,organizationKindCd:c,employeesNumberCd:s,opf:l,seniority:d,generalSeniority:u,jobsNumber:h,lastWorkDuration:m,payrollCardRshbFlg:!0,positionCd:f,participantContacts:zc({organizationPhone:p&&qt(p)}),participantAddresses:Fc({organizationAddress:g})}})(t);case 3:return(e=>{const{familyStatus:t,dependents:n,familyMembers:i,children:a,wages:l,mandatoryPayments:r,incomeAverage:s,additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u,snils:h,armyIdFlg:p,conscription:g}=e;return{maritalStatusCd:t,childrenDependents:a,totalDependents:i,otherDependents:n,militaryStatusCd:g,participantIncomes:Oc({wages:l,mandatoryPayments:r,incomeAverage:s,additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u}),snils:h?.replaceAll(" ",""),armyIdFlg:p}})(t);case 4:return(e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:i,creditInRshbCd:a}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:i,creditInRshbCd:a}})(t);case 5:return(e=>{const{addressCourier:t}=e;return{participantAddresses:Fc({addressCourier:t})}})(t)}},gh=({step:e,inputs:t,onNextStep:n,saveStep:i,finishForm:a})=>{const[r]=Fl("taskId"),[s]=Fl("profileId"),[o]=Fl("participantId"),c=l((async l=>{const c=jo(ii(Zu(fh(l))(t,e)));if(!zn(c(l)))return console.warn("validation fail");i(l);try{r&&s&&o&&await oc((({participantId:e,taskId:t,profileId:n,formData:i,step:a=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,...hh(i),authorizedAgentId:i?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...ph(a,i)}],...mh(i),...uh(i)}}))({participantId:o,taskId:r,profileId:s,step:e,formData:l}))}catch(e){return"Fail"}return n(),5===e&&a?.(!0),"OK"}),[]);return{handleSubmit:c}},fh=e=>t=>e[t],xh=d((({step:e,sections:t,onPrevStep:n,onNextStep:i,isFormFinished:a,finishForm:l})=>{const[r,s]=Fl("leadForm"),d=((e,t)=>({...Xu[e],...t,limitedBirthday:Ju(t?.limitedBirthday),dulIssueDateField:Ju(t?.dulIssueDateField),participantDateRegistration:Ju(t?.participantDateRegistration),beginDate:Ju(t?.beginDate),deliveryDate:Ju(t?.deliveryDate)}))(e,r),m=t?.flatMap((e=>e?.inputs))||[],{handleSubmit:u}=gh({step:e,inputs:m,onNextStep:i,saveStep:s,finishForm:l}),[,{field:h,onSubmit:p}]=an(d,{onSubmit:u});return a?o(Ku,{}):c("form",{onSubmit:p,className:"space-y-m",children:[oh({sections:t,field:h,step:e}),o(dh,{step:e,onPrevStep:n})]})})),yh=[[{title:"Параметры карты",inputs:[]},{inputs:[{fieldType:"common",name:"currency",required:!0},{fieldType:"common",name:"paymentSystem",required:!0},{fieldType:"common",name:"cardCategory",required:!0},{fieldType:"common",name:"codeWord",required:!0}]}],[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"name",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"middleName",dadata:!0,filledByEsia:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"limitedBirthday",required:!0,filledByEsia:!0},{fieldType:"common",name:"birthPlace",required:!0,filledByEsia:!0},{fieldType:"common",name:"phone",required:!0,filledByEsia:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulNumber",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulIssueDateField",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"addressMatch"}]},{columns:2,inputs:[{fieldType:"common",name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{fieldType:"common",name:"housing",required:!0}]},{inputs:[{fieldType:"common",name:"addressFact",required:!0,dadata:!0}]}],[{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:"organizationPhone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"positionOrganization",required:!0},{fieldType:"common",name:"partInBusiness",required:!0,condition:{name:"positionOrganization",values:["BUSINESS_OWNER"]}}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"dependents",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"wages",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryPayments",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"snils",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"conscription",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],[{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"}]}],[{title:"Способ получения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"methodObtain"}]},{title:"Адрес",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressCourier",dadata:!0,condition:{name:"methodObtain",values:["courier"]},required:!0},{fieldType:"common",name:"deliveryDate",condition:{name:"methodObtain",values:["courier"]},required:!0},{fieldType:"common",name:"comment",condition:{name:"methodObtain",values:["courier"]}}]},{inputs:[{fieldType:"common",name:"regionRetail",required:!0,condition:{name:"methodObtain",values:["office"]}},{fieldType:"common",name:"addressRetail",required:!0,condition:{name:"methodObtain",values:["office"]}}]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код",condition:{name:"methodObtain",values:["office"]}},{fieldType:"common",name:"bankEmployeeCode",condition:{name:"methodObtain",values:["office"]}}]}]],bh=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],vh=d((({className:e,...t})=>{const[n,d]=i(0),m=s(null),h=l((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);a(Du,[]);const p=l((()=>{d((e=>Math.min(e+1,6))),h()}),[]),f=l((()=>{d((e=>Math.max(e-1,0))),h()}),[]),x=r((()=>yh[n]),[n]),[y,b]=i(!1);return o(g,{className:u("bg-transparent",e),defaultPadding:"p-0",...t,children:c("div",{ref:m,className:"container grid grid-cols-12",children:[y?null:o(_u,{stepsTitles:bh,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(xh,{step:n,sections:x,onNextStep:p,onPrevStep:f,isFormFinished:y,finishForm:b},String(n))})]})})})),Nh=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const i=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 mr-s",children:["Шаг ",e," из ",t,"."]}),n[e]||null,o(Mu,{step:i,showPercentage:!1})]})})})),wh=d((({title:e,description:t,infoCard:n,sectionInfoTitle:i,sectionInfo:a,sectionAdditionalTitle:l,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Vu,{interval:d,intervalExpireAction:m}):null]}),o(Ch,{title:i,items:a}),o(Ch,{title:l,items:r,countColumns:!0}),n?.__html?o(Ou,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(Ne,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),Ch=({title:e,items:t,countColumns:n=!1})=>{const i=ke();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Ae,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Vo(n||i?1:2)),children:t.map(((e,t)=>o("div",{children:Sh(e)},t)))}):null]})]}):null},Sh=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ae,{color:"text-secondary-text",size:"text-l",children:e}),o(Ae,{color:"text-primary-text",size:"text-xl",children:t})]}),kh=d((()=>o(wh,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),Ih=d((({handleExpireTimer:e})=>{const[t]=Fl("leadForm");return o(wh,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Цель кредита",description:"На любые цели"},{label:"Сумма",description:t?.moneyValue?.toLocaleString()+" ₽"},{label:"Срок кредита",description:t?.monthsValue+" мес"},{label:"Тип платежа",description:t?.isAnnuity?"Аннуитетный":"Дифференцированный"}]})})),Th=d((()=>{const[e]=Fl("leadForm");return o(wh,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail?.text},{label:"Адрес",description:e?.addressRetail?.text}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Bh=d((()=>{const[e]=Fl("leadForm");return o(wh,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.monthsValue+" мес"},{label:"Тип платежа",description:e?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),Ph=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Rh=d((()=>{const[e,t]=i(Au.process),[n]=Fl("taskId");a((()=>{(async()=>{for(const e of Ph)await zu({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const i=await Eu({taskId:n});i&&i?.statusCd!==Au.process&&(e(),t(i.statusCd))}),[n]);Fu(r,3e4);return Dh(e,(()=>t(Au.rework)))})),Dh=(e,t)=>({IN_PROCESS:o(Ih,{handleExpireTimer:t}),CANCELLED:o(kh,{}),APPROVED:o(Bh,{}),REVISION:o(Th,{})}[e]||null),Mh=[{calculator:{moneyValue:0,monthsValue:0,isAnnuity:!1,isInsurance:!1,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1}},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:"",addressRetail:void 0,bankEmployeeCode:void 0}],_h=e=>{if(e)try{return new Date(e)}catch(e){return}},Ah=e=>(t,n)=>t.filter((e=>e)).map((t=>[Eh(n,e),zh(t,e),Lh(t,e),Fh(t,e),Oh(t,e),Vh(t,e)].some(Boolean)?{...t,required:!1}:t)),Eh=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,zh=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,Fh=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,Oh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),Vh=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const i=t(e?.name);return n!==(i?.key??i)})),Lh=({name:e},t)=>"snils"===e&&$h(t),$h=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,jh=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e,name:t},n)=>o(Ou,{__html:e},`${t}_${n}`))):null},qh=({field:e,inputs:t,params:n})=>t.map(Oo(e,n)),Uh=({sections:e,field:t,step:n,params:i})=>e?.map((({inputs:e=[],columns:a,title:l},r)=>{const s=Ah(Wh(t))(e,n);return c("div",{className:u(Vo(a),"grid gap-x-m"),children:[jh(s),Lo(l),qh({field:t,inputs:s,params:i})]},`section-${r}`)})),Wh=e=>t=>e(t)?.value,Hh=d((({step:e,onPrevStep:t})=>{const n=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Xl,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Xl,{type:"submit",children:n?"Отправить заявку":"Далее"})]})})),Yh={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},Kh=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:i}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:Yh[i?"annuity":"differential"]}},Gh=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},Xh=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return(e=>{const{name:t,surname:n,middleName:i,limitedBirthday:a="",phone:l="",email:r,sex:s,birthPlace:o,dulIssueDateField:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:y}=e;return{birthDate:jt(a,!0),midname:i,name:t,surname:n,birthPlace:o,dulIssueDate:jt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:jt(g,!0),houseTypeCd:f,participantContacts:zc({phone:qt(l),email:r}),participantAddresses:Fc({addressRegistration:x,addressFact:y}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}})(t);case 2:return(e=>{const{beginDate:t,employment:n,organizationName:i,inn:a,legalForm:l,organization:r,amountWorkers:s,employerActivities:o,employerOrganization:c,generalSeniority:d,lastJobExperience:m,experience5Years:u,jobsNumber:h,organizationPhone:p,organizationAddress:g,positionOrganization:f}=e;return{employmentContractDate:jt(t||"",!0),employmentTypeCd:n,organizationName:i,organizationInn:a,organizationActivityTypeCd:o,organizationTypeCd:r,organizationKindCd:c,employeesNumberCd:s,opf:l,seniority:d,generalSeniority:u,jobsNumber:h,lastWorkDuration:m,positionCd:f,participantContacts:zc({organizationPhone:p&&qt(p)}),participantAddresses:Fc({organizationAddress:g})}})(t);case 3:return(e=>{const{familyStatus:t,dependents:n,familyMembers:i,children:a,confirmationIncome:l,wages:r,mandatoryPayments:s,incomeAverage:o,additionalIncome:c,otherIncome:d,otherPayments:m,rentalIncome:u,retirementIncome:h,snils:p,armyIdFlg:g,conscription:f}=e;return{maritalStatusCd:t,totalDependents:i,incomeCertificateCd:l,otherDependents:n,childrenDependents:a,militaryStatusCd:f,participantIncomes:Oc({wages:r,mandatoryPayments:s,incomeAverage:o,additionalIncome:c,otherIncome:d,otherPayments:m,rentalIncome:u,retirementIncome:h}),snils:p?.replaceAll(" ",""),armyIdFlg:g}})(t);case 4:return(e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:i,creditInRshbCd:a}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:i,creditInRshbCd:a}})(t);default:return{}}},Jh=({step:e,inputs:t,onNextStep:n,saveStep:i,finishForm:a})=>{const[r]=Fl("taskId"),[s]=Fl("profileId"),[o]=Fl("participantId"),c=l((async l=>{const c=jo(ii(Ah(Zh(l))(t,e)));if(!zn(c(l)))return console.warn("validation fail");i(l);try{r&&s&&o&&await oc((({participantId:e,taskId:t,profileId:n,formData:i,step:a=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,authorizedAgentId:i?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Xh(a,i)}],...Kh(i),...Gh(i),esiaAccountTypeCd:{key:i?.esiaAccountTypeCd?.key}}}))({participantId:o,taskId:r,profileId:s,step:e,formData:l}))}catch(e){return"Fail"}return n(),5===e&&a?.(!0),"OK"}),[]);return{handleSubmit:c}},Zh=e=>t=>e[t],Qh=d((({step:e,sections:t,onPrevStep:n,onNextStep:i,isFormFinished:a,finishForm:l,programsSource:r})=>{const[s,d]=Fl("leadForm"),[m]=Fl("programId"),u=r?.[m??""],h=((e,t)=>({...Mh[e],...t,limitedBirthday:_h(t?.limitedBirthday),dulIssueDateField:_h(t?.dulIssueDateField),participantDateRegistration:_h(t?.participantDateRegistration),beginDate:_h(t?.beginDate),deliveryDate:_h(t?.deliveryDate)}))(e,s),p=t?.flatMap((e=>e?.inputs))||[],{handleSubmit:g}=Jh({step:e,inputs:p,onNextStep:i,saveStep:d,finishForm:l}),[,{field:f,onSubmit:x}]=an(h,{onSubmit:g});return a?o(Rh,{}):c("form",{onSubmit:x,className:"space-y-m",children:[Uh({sections:t,field:f,step:e,params:{calcData:u}}),o(Hh,{step:e,onPrevStep:n})]})})),ep=[[{columns:1,inputs:[{fieldType:"common",name:"calculator"}]}],[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"name",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"middleName",dadata:!0,filledByEsia:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"limitedBirthday",required:!0,filledByEsia:!0},{fieldType:"common",name:"birthPlace",required:!0,filledByEsia:!0},{fieldType:"common",name:"phone",required:!0,filledByEsia:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulNumber",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulIssueDateField",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"addressMatch"}]},{columns:2,inputs:[{fieldType:"common",name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{fieldType:"common",name:"housing",required:!0}]},{inputs:[{fieldType:"common",name:"addressFact",required:!0,dadata:!0}]}],[{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:"organizationPhone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"positionOrganization",required:!0},{fieldType:"common",name:"partInBusiness",required:!0,condition:{name:"positionOrganization",values:["BUSINESS_OWNER"]}}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"dependents",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"wages",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryPayments",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"snils",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"conscription",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],[{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"}]}],[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"regionRetail",required:!0}]},{inputs:[{fieldType:"common",name:"addressRetail",required:!0}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{fieldType:"common",name:"bankEmployeeCode"}]}]],tp=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],np=Ot((({className:e,programsSource:t,...n})=>{const[d,m]=i(0),h=s(null),p=l((()=>h?.current?.scrollIntoView({behavior:"smooth"})),[h]);a(Du,[]);const f=l((()=>{m((e=>Math.min(e+1,5))),p()}),[]),x=l((()=>{m((e=>Math.max(e-1,0))),p()}),[]),y=r((()=>ep[d]),[d]),b=0===d,[v,N]=i(!1);return o(g,{className:u("bg-transparent",e),defaultPadding:"p-0",...n,children:c("div",{ref:h,className:"container grid grid-cols-12",children:[b||v?null:o(Nh,{stepsTitles:tp,step:d,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(Qh,{step:d,sections:y,onNextStep:f,onPrevStep:x,isFormFinished:v,finishForm:N,programsSource:t},String(d))})]})})})),ip=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ap=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),lp=1e9,rp={sum:{min:1e4,max:lp},period:3},sp=Ot((({className:e,filtrationSchema:t={},resetButton:n,sumInput:i,periodInput:a,...l})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=$d(rp,{block:l.block,page:l.options?.page,normalize:e=>({...e,period:op(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=cp(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(Ad,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Gm,{label:i?.title,min:500,max:lp,...d("sum",{parse:e=>({min:Number(e),max:lp}),format:({min:e})=>String(e)})}),o(Za,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(Rd,{blocksToRender:r,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),op=e=>Mt((e?.paramsSource?.rateRows||[]).filter(ip).flatMap((e=>ap(e.minMonths,e.maxMonths)))),cp=e=>Mt(e.flatMap((e=>e||[])).filter(ip).flatMap((e=>ap(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],dp=[{key:"10"},{key:"50"},{key:"100"}],mp=({itemCount:e,onItemCountChange:t})=>{const n=l((({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(Dn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:dp,iconVersion:"black"})]})},up="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",hp=(e,t)=>{const{currentPage:n,onPageChange:i,totalPages:a}=e,l=t+1;return l===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:l},String(t)):1!==l&&l!==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))(l,n,a)?o("div",{onClick:()=>i(l),className:up,"aria-label":`Страница ${l}`,children:l},String(t)):null},pp={width:"24",height:"24"},gp=({currentPage:e,onPageChange:t,totalPages:n})=>{const i=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=l((()=>{e>1&&t(e-1)}),[e]),s=l((()=>{e<n&&t(e+1)}),[e,n]),d=l((()=>t(1)),[]),m=l((()=>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:fp(1===e),...pp})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:up,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,i.map(hp),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:up,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:fp(e===n),...pp})})]})},fp=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",xp=({currentPage:e,onPageChange:t,totalPages:n,itemCount:i,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(gp,{currentPage:e,onPageChange:t,totalPages:n}),i&&a?o(mp,{itemCount:i,onItemCountChange:a}):null]}),yp=d((({className:e,value:t,autoFocus:n,onChange:i,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=l((e=>{i&&i(e.target?.value||"")}),[i]);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",hn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),bp=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(yp,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Ml,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Ml,{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(Xl,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),vp=d((({title:e,timestamp:t,publicId:n})=>{const i=pe(),{href:a}=i({href:`${Ut}/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(Ae,{size:"text-m","font-weight":"font-light",children:jt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Np=`${Ut}/depository`,wp={startDate:void 0,endDate:void 0,query:""},Cp=Ot((({className:e,...t})=>{const[n,a]=i(0),[r,s]=i(10),[d,{field:m,reset:h}]=an(wp),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:i,endDate:a})=>{const l=i?jt(i,!0):"",r=a?jt(a,!0):"",s=new URLSearchParams(Np);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",l),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=gi(Np+o,Dt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=l((e=>a(e-1)),[]),y=l((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(bp,{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(Ae,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(vp,{...e},String(e.publicId)))):o(Kc,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(xp,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:y})]})]})})),Sp=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,kp=d((({className:e="",title:t,description:n,error:i,button:a,...l})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...l,children:[o("div",{className:"flex justify-center",children:Sp(i)}),o(S,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(Ne,{version:a?.version,text:a?.text,...a}):null]})));function Ip(e,t){for(const[n,i]of e.entries())null!=i?t.setItem(n,i):t.removeItem(n)}const Tp={};function Bp(e,t=Tp){const n=s(null),o=function(){const[,e]=i(0);return l((()=>e((e=>(e+1)%65536))),[])}();return a((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),r((()=>new Proxy(t,{get:(t,i)=>(n.current||=new Set,n.current.add(i),e.getItem(i)),has:(t,i)=>(n.current||=new Set,n.current.add(i),e.hasItem(i)),set:(t,n,i)=>(e.setItem(n,i),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const Pp=new class{bus;store=new Map;get size(){return this.store.size}constructor(e=new me){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}};var Rp,Dp;function Mp(e){return Bp(Pp,e)}Rp=Pp,Dp=new class{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new me){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}(globalThis?.localStorage),Ip(Rp,Dp),Ip(Dp,Rp),Rp.bus.watch((({type:e,event:t})=>{null!=t?Dp.setItem(e,t):Dp.removeItem(e)}));const _p=`${Ut}/region`;function Ap(e="Москва"){return Mp().location??{name:e}}function Ep(e="Москва"){const t=Mp(),n=l((async()=>{if(!t.location){const n=await Rt(_p);t.location=n??{name:e}}}),[t,e]);return gi(_p,n),t}var zp;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(zp||(zp={}));const Fp=new Intl.NumberFormat("ru",{style:"currency",currency:zp.RUB}),Op=e=>e?Fp.format(e):"",Vp="text-m font-light text-secondary-text ",Lp=`${Vp} text-left`,$p=`${Vp} pl-5xl text-center`,jp=`${Vp} pl-5xl text-right`,qp={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Up=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Lp,children:o(Ae,{size:"text-m",children:"Валюта"})}),o("th",{className:$p,children:o(Ae,{size:"text-m",children:"Купить"})}),o("th",{className:jp,children:o(Ae,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Wp)})]}))),Wp=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:qp[t]},width:"24",height:"24"}):null,o(Ae,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ae,{size:"text-h6",children:Op(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ae,{size:"text-h6",children:Op(e?.buyExchangeRate)})})]},t)},Hp={icon:"GpsIcon"},Yp=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Kd,{...Hp,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:"Курс указан для заданного офиса"})]})]}))),Kp=(e,t,n)=>{const i=Number(Gp(e))*Math.pow(t,n?-1:1);return Number.isInteger(i)?i:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(i)},Gp=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function Xp(e){if(!e)throw new Error("Value should be fulfilled");return e}const Jp=e=>t=>{const[,n]=Xp(e.find((([e])=>e(t))));return n(t)},Zp=e=>Jp(e.map((([e,t])=>[e,()=>t])));Zp.if=e=>new Qp(void 0,e);class Qp{parent;predicate;unit;get entry(){return[Xp(this.predicate),Xp(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Qp(this,e)}then(e){return new Qp(this.parent,this.predicate,e)}else(e){return Jp([...eg(this),[()=>!0,e]])}}const eg=e=>[...e?.parent?eg(e.parent):[],e.entry],tg=e=>Zp([[e=>e.value!==zp.RUB&&e.oppositeValue!==zp.RUB,()=>e.handleConvert(e.value,zp.RUB)],[e=>e.value===zp.RUB&&e.oppositeValue===zp.RUB,()=>e.handleConvert(e.value,zp.USD)],[e=>e.value===zp.RUB&&e.oppositeValue===zp.RUB,()=>e.handleConvert(e.value,zp.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function ng(e){const{placeholder:t,rates:n,selected:i,value:a,setValue:l,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:i,text:i};return c("div",{className:"relative flex",children:[o(gn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:l}),s.length?o(Dn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const ig=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=i({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||zp.RUB,selectBuy:n?.[0]?.currency?.currency||zp.USD}),d=l((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:[ng({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:ag(r,d,n),value:r.inputSell,setValue:e=>rg(d,n)(e,r.selectSell,r.selectBuy)}),ng({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:lg(r,d,t),value:r.inputBuy,setValue:e=>sg(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(Ne,{text:a.text,version:a?.version,...a}):null]})})),ag=(e,t,n)=>i=>{t({selectSell:i}),tg({value:i,oppositeValue:e.selectBuy,handleConvert:(i=e.selectSell,a=e.selectBuy)=>{rg(t,n)(e.inputSell,i,a)}})},lg=(e,t,n)=>i=>{t({selectBuy:i}),tg({value:i,oppositeValue:e.selectSell,handleConvert:(i=e.selectBuy,a=e.selectSell)=>sg(t,n)(e.inputBuy,i,a)})},rg=(e,t)=>(n,i,a)=>{e({inputSell:Gp(n),selectBuy:a});const l=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===i))?.buyExchangeRate;l&&e({inputBuy:String(Kp(n,l,i===zp.RUB)||"")})},sg=(e,t)=>(n,i,a)=>{e({inputBuy:Gp(n),selectSell:a});const l=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===i))?.saleExchangeRate;l&&e({inputSell:String(Kp(n,l,i===zp.RUB)||"")})},og=`${Ut}/exchangerates`;const cg=d((({className:e="",title:t="Курсы обмена валют",button:n,...i})=>{const a=function(e){const t=e?.code||"000",{data:n}=gi(og+`?regionCode=${t}`,Dt);return n||{}}(Ap()),l=dg(a?.exchangeRate?.currencies),r=l.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:zp.RUB}});const s=l.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:zp.RUB}}),o(g,{className:u("box-border min-h-80",e),...i,children:o(Be,{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:[l?o(Up,{className:"mb-xl",exchangeCurrencyItems:l}):null,o(Yp,{address:a?.address})]}),o(ig,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),dg=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],mg=d((({className:e="",items:t})=>{const n=pe();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(ug(n))})})),ug=e=>({dataFooter:t,...n},i)=>{const{text:a,href:l,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:l,target:r||"_self",onClick:s,...fe(t),children:a||null})},String(i)):null},hg=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),pg=["all","footer"],gg=d((({className:e,navigationItems:t})=>{const n=pe();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(hg(pg)).map(n).map(fg)})})),fg=(e,t)=>{const{text:n,items:i=[],href:a,target:l="_self",onClick:r,dataFooter:s}=e,d=i.filter(hg(pg));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:l,onClick:r,...fe(s),children:n}),d?o(mg,{items:d}):null]},String(t))},xg=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(yg)}):null)),yg=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Ae,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(bg)})]},String(t)),bg=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:vg(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),vg=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Ng(t)}`,children:o(Ae,{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})}},Ng=e=>e.replaceAll(/\D/g,""),wg=d((({className:e="",index:t,text:n,...i})=>{const a=pe(),{href:l,target:r,onClick:s}=a(i);return o("a",{className:u("text-secondary-text",e),href:l,target:r,onClick:s,children:n||`Документ ${t}`})})),Cg=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(Ae,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(wg,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Sg="w-full lg:w-52";function kg(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const Ig=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:i,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),i=Array.from({length:e.length}),a=Array.from({length:t.length});let l=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++)i[r]||a[n]||e[r]!==t[n]||(l++,i[r]=!0,a[n]=!0)}return{m:l,s1Matches:i,s2Matches:a}}(e,t);if(0===n)return 0;const l=function(e,t,{s1Matches:n,s2Matches:i}){let a=0;for(let l=0,r=0;l<e.length;l++){if(!n[l])continue;let s=r;for(;s<t.length;s++)if(i[s]){r=s+1;break}e[l]!==t[s]&&a++}return a}(e,t,{s1Matches:i,s2Matches:a}),r=(n/e.length+n/t.length+(n-l/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 Tg=(e,t)=>(n,i)=>{for(const[a,l]of i)n.set(a,e(n.get(a)||t,l));return n},Bg=(e=[])=>e.reduce(((e,t)=>e+t),0),Pg=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Rg=e=>t=>e.map((([e,n])=>[Ig(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>Mg(t,e))).reduce(Tg(Math.max,0),new Map),Dg=e=>t=>{return Fd(t,t.map((({title:e})=>e)).map((e=>t=>{const n=Pg(t||"");return n.length?Bg(e.map((e=>Ir(n.map(Ig(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},Mg=(e,t)=>new Map(e.map((e=>[e,t]))),_g=({basePathList:e,initialQuery:t=""})=>{const[n,l]=i(t||"");a((()=>{null!=t&&l(t)}),[t]);const{data:r}=gi(e?.length?e:null,Ag),[s,o]=i(null);return kg((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:i}=t||{};if(!(e&&n?.length&&i&&Object.keys(i).length))return[];const a=Pg(e);if(!a.length)return[];const l=Object.entries(i),r=[...a.map(Rg(l)).reduce(Tg(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>n[e]));return Dg(a)(r)})(n)))}),[r,n]),[s,{value:n,onChange:l}]},Ag=async(...e)=>(await Promise.allSettled(e.map((e=>Rt(O(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Eg=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const i=r((()=>t?.map((e=>e.href||"/"))),[t]),[a,l]=_g({basePathList:i,initialQuery:e}),s=r((()=>zg(t)(a)),[t,a]);return o(Zl,{head:o(yp,{autoFocus:!0,...l}),onClose:n,children:o(gg,{navigationItems:s})})})),zg=e=>t=>e?.length&&t?.length?Fd(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:O("/",t)})))}))):[],Fg=d((({className:e,search:t,...n})=>{const[a,r]=i(""),s=l((()=>r("")),[]),d=sn(Eg,n),m=l((e=>{r(e),Og(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(yp,{value:a,placeholder:t?.placeholder,onChange:m}),o(Jl,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),Og=e=>e&&e.length>=3,Vg=(e,t)=>{const{logo:n}=e??{},{dataHeader:i,dataFooter:a,...l}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(gc,{className:Sg,logo:l,data:a,showTitle:!1}),o(Fg,{className:"grow",navigationItems:t,...e})]})},Lg=d((({className:e="",index:t,...n})=>{const i=pe(),{href:a,target:l,text:r,onClick:s}=i(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:l,onClick:s,children:r||`Документ ${t}`})})),$g=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Ae,{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(Lg,{index:t,...e},String(t))))}):null]}))),jg=Ot((({className:e,footer:t,...n})=>{const{navigationItems:i}=n.options?.page?.navigation??{},a=n.options?.page?.common??{},{documents:l,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:[Vg(a,i),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(gg,{navigationItems:i}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(Sg,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(xg,{items:s}),h?o(Ne,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(vu,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(Ne,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Cg,{title:m,links:r}),o($g,{links:l,license:p})]})})),qg=d((({className:e="",title:t,description:n,calendar:i,...a})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...a,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),i?Ug(i):null]}))),Ug=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=>Wg(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:Hg(e)}),c("div",{className:"text-s",children:[o(Ae,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Ae,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Wg=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),Hg=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)),Yg=Ot((({className:e,title:t,button:n,regionSource:a,data:l,...r})=>{const[s,d]=i({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(En,{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(Ne,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:xu(l,s?.key),children:f})}):null]})})}));function Kg(e=[]){const t=D(),n=Array.from(e.entries()).filter((([,e])=>Gg(t)(e)));return n.find((([,e])=>Gg(t,!0)(e)))??n[n.length-1]??[]}const Gg=(e,t=!1)=>({href:n})=>{if(!n)return!1;const i=F(Xg(e)(n));return t?i===F(n):i.startsWith(F(n))},Xg=e=>t=>{const n=X(G.SITE_URL);return A(t)?e.href:O(n,e.pathname)},Jg=d((({className:e="",items:t,activeItem:n,ariaLabel:i="Меню"})=>{const[r,{setFalse:d,toggle:m}]=on(!1),h=dn(d),p=s(null),g=l((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),i=t.current.getBoundingClientRect(),a=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${a}px`:i.left>e.left&&(a>i.left?n.current.style.left="":n.current.style.left=`${a}px`)}}),[r]);return cn(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":i,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:Qg(t,n)})]})})),Zg=d((({isActive:e,...t})=>{const n=pe(),{text:i,href:a,target:l,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:l,onClick:r,role:"link",...fe(t?.data),children:i})})),Qg=(e,t)=>e?.map(((e,n)=>o(Zg,{isActive:e===t,...e},e?.text??String(n)))),ef={default:"w-6 h-6",large:"w-12 h-12"},tf=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:i=!1,disabled:a,ariaLabel:l="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:u("group/btn border-0 flex shrink-0 items-center",i?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":i&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${ef[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":l,onClick:c,...fe(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"})}))),nf="chatbot",af="text-page__btn-chat",lf={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},rf=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:i="Чат",version:l})=>{const r=(e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=lf[e??""];return n=>{if(t)if("personal"!==e)Wi(nf,t);else{const e=n.target;e?.classList.contains(af)||e?.classList.add(af),document.getElementById("webchat-js-container:webchat_rshb")||Wi(nf,t)}}})(e);return o(tf,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:i,onClick:r,buttonSize:"large",isGrayBg:!0,version:l})})),sf=d((({className:e="",active:t,dataItemName:n,children:i,data:a,...l})=>{const r=pe(),{href:s,target:d,text:m,onClick:h}=r(l);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,...fe(a),children:[o("span",{className:of(t),children:m||i}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),of=(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"),cf=d((({observerOptions:e,onVisibilityChange:t,children:n,className:i,...a})=>{const r=Zc(l((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:i,role:"menuitem",children:o(sf,{...a,children:n})})})),df={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"},mf=d((({version:e,text:t,mobileText:n,...i})=>{const a=ke()?n:t;return a?o(Ne,{className:u("py-s px-lg font-light whitespace-nowrap",df["transparent"===e?"transparent":"default"]),...i,children:a}):null})),uf=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:a,chatBotAriaLabel:l})=>{const d="transparent"===t?"white":"black",[,m]=Kg(e),[u,h]=i(e.length),p=e.slice(u),g=s(null),f={rootRef:g},x=r((()=>e.map(((e,t)=>e=>{h(e?hf(t):pf(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(cf,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Jg,{items:p,activeItem:m,ariaLabel:a}):null,_.CHAT_BOT?o(rf,{version:t,iconVersion:d,chat:_.CHAT_BOT,ariaLabel:l}):null,o(mf,{version:t,...n})]})})),hf=e=>t=>Math.max(t,e+1),pf=e=>t=>Math.min(t,e),gf=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(Ae,{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(ff,{...e},String(t))))})]}):null,ff=d((({icon:e,...t})=>{const n=pe(),{text:i,target:a,href:l,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,i?o("a",{className:"hover:text-primary-hover",href:l,target:a,onClick:r,children:o(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:i})}):null]})})),xf=(e,t)=>n=>n.name?o(yu,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:xu(e,n.name),children:o(Ae,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,yf=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(hn,"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"})]}))),bf=d((({defaultLocation:e})=>{const t=Ap(e),n=pe(),{href:i}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(yu,{href:i,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),vf=d((({foreignOffices:e,branches:t,onClose:n})=>{const a=Ep(t?.default),[s,d]=i(""),m=go(),u=r((()=>wf(m).sort(((e,t)=>e.name.localeCompare(t.name)))),[m]),h=r((()=>((e,t)=>{const n=new Map;for(const i of e){const e=t(i),a=n.get(e)||[];n.set(e,[...a,i])}return n})(u,Nf)),[u]),p=l((e=>{a.location=e,n?.()}),[a,n]);return c(Zl,{className:"pb-20",head:c("div",{children:[o(Ae,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(bf,{defaultLocation:t?.default}),o(yf,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&Ig(e.toLowerCase())(s.toLowerCase())>=.8)).map(xf(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((g=p,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ae,{size:"text-h6",children:e})}),t.map(xf(f,g))]},e)))}),gf(e)]});var g,f})),Nf=e=>e.name?.charAt(0)??"",wf=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Cf=d((({className:e="",active:t,flat:n,children:i,data:a,...l})=>{const r=pe(),{href:s,target:c,text:d,onClick:m}=r(l);return o("a",{className:u(Sf(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...fe(a),children:o("span",{suppressHydrationWarning:!0,className:kf(t,n),children:d||i})})})),Sf=(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}),kf=(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"),If=d((({className:e,version:t,...n})=>{const i="transparent"===t?"white":"black",a=Ap(n?.branches?.default),r=sn(Eg,n),s=sn(vf,n),d=l((()=>r.open({})),[r]),m=l((()=>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(Cf,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:a?.name,data:xu(n?.branches?.dataClick,a?.name??""),onClick:m}):null,n?.officesAtms?.href?o(Cf,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(tf,{image:{icon:"LoupeIcon",iconVersion:i},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),Tf=d((({observerOptions:e,onVisibilityChange:t,children:n,className:i,...a})=>{const r=Zc(l((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:i,role:"menuitem",children:o(Cf,{...a,children:n})})})),Bf=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:a,headerData:l,search:d,bgColor:m,logo:u})=>{const[h,p]=i(e.length),g=e.slice(h),f=s(null),x={rootRef:f},y=r((()=>e.map(((e,t)=>e=>{p(e?Pf(t):Rf(t))}))),[e]),{dataFooter:b,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(gc,{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(Tf,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:y[n],data:e.dataHeader,...e},String(n))))}),g.length?o(Jg,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(If,{version:a,className:"ml-auto",search:d,navigationItems:e,...l})]})})),Pf=e=>t=>Math.max(t,e+1),Rf=e=>t=>Math.min(t,e),Df={"bg-white":"primary",transparent:"transparent"},Mf=["all","header"],_f=Ot((({className:e,bgColor:t="bg-white",logo:n={},version:i=Df[t],portal:a,header:l={},...r})=>{const{common:s,navigation:d}=Ef(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=Kg(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:i,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(Bf,{activeTopItem:p,navigationItems:m?.filter(hg(Mf)),version:i,headerData:{...l,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",Af(i))}),p?.items?.length&&o(uf,{subItems:p?.items?.filter(hg(Mf)),version:i,internetBankButton:f})]})})})),Af=e=>"transparent"===e?"opacity-30":"",Ef=e=>({navigation:e?.navigation??{},common:e?.common??{}}),zf=(e=!1)=>e?{}:{padding:"p-0"},Ff={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Of=Ot((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:i=!0,version:a="transparent",isTheme:l=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",Ff[n],e),padding:t,version:a,isTheme:l,...s,children:R({...s,extraProps:{...zf(i),className:Gc(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),Vf=d((e=>{const{className:t,align:n,image:i,...a}=e,l=n?u("flex",tm[n]):"";return o(g,{className:u(l,t),defaultPadding:"p-0",...a,children:o(ne,{image:i})})})),Lf=(e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=i(t),o=l((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=l((()=>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 $f({dec:e,inc:t,canDec:n,canInc:i,btnClass:a,className:l=""}){return n||i?c("div",{children:[n?o(pd,{className:u("absolute z-40",a[0],l),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,i?o(pd,{className:u("absolute z-40 rotate-180",a[1],l),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!i}):null]}):null}const jf=d((({className:e="",cards:t=[],button:n})=>{const[a,r]=i(0),s=l((e=>r(e)),[]),d=t.length,[m,u]=Lf({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?qf({activeIndex:m,cards:t,selectedCardIndex:a,onClick:s}):null,$f({...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(Ne,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function qf({activeIndex:e,cards:t,selectedCardIndex:n,onClick:i}){const a=460*e,l=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 ${l}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:i}){return c("button",{type:"button",onClick:i,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?Uf("страховая сумма",e.sum):null,e?.fee?Uf("страховой взнос",e.fee):null]}),Wf(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>i(t)})))})})}function Uf(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Ae,{size:"text-h6",children:[He(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Ae,{size:"text-l",color:"text-secondary-text",children:e})})]})}function Wf(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 Hf=d((({className:e="",title:t,insuranceTabs:n=[],button:a,...r})=>{const[s,d]=i(0),m=l((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:i}){return o("button",{type:"button",onClick:i,"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:Yf({insuranceTabs:n,button:a})})]})})),Yf=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(jf,{button:t,cards:e},String(n)))):null};const Kf={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Gf={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Xf=d((e=>{const{className:t="",__html:n,isDotted:i,investmentZeroColumn:a,investmentColumns:l,...r}=e,s=l?[...l]:[];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:[Md(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Jf)),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(ex)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(Me,{__html:n,isDotted:i,itemSize:"list-s"})}):null]})})})),Jf=(e,t,n)=>{const i=1===t,a=t===n.length-1,l=e.cells?.reverse()||[];return o("div",{className:`${Zf(i,a,e.cells)}`,children:l.length?o("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:l.map(Qf)}):null},`column_${t}`)},Zf=(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(" "),Qf=(e,t)=>{const n=e.cellSize||"XS",i=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${Gf[n]} ${Kf[i]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Ae,{align:"text-center",children:e.text})},`cell_${t}`):null},ex=(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,tx=["байт","Кб","Мб","Гб","Тб","Пб"],nx=d((({icon:e,text:t,href:n,target:i,fileFormat:a,data:l,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:i,...fe(l),children:[e,t?c(Ae,{size:"text-l",font:"font-light",children:[t," ",ix(d,m),o(Ae,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),ix=(e,t)=>e||t?o("span",{children:", "}):"",ax=(e,t)=>(n,i)=>{const a=q(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),l="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))} ${tx[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?rx(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(nx,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:l,icon:lx(t),data:n?.data}),o(Me,{__html:n?.__html})]},String(i))},lx=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,rx=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),i=-1!==t?e.substring(t+1):"";return i.includes("/")?i.replace(n,""):i},sx=d((({href:e,__html:t,target:n,onClose:i})=>{const a=D(),l=q(a)(e);return c(Zl,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:i,children:[t?o(Me,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Ne,{text:"Я согласен",version:"primary",target:n,href:l,onClick:i}),o(Xl,{type:"button",version:"secondary",onClick:i,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),ox=d((({text:e,href:t,target:n,__html:i,icon:a})=>{const{open:r}=sn(sx),s=l((()=>r({__html:i,href:t,target:n})),[i,t,n]);return e?c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[lx(a),o(Ae,{font:"font-light",children:e})]}):null})),cx={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},dx=Ot((({className:e="",title:t,description:n,align:i="text-center",documents:a,icon:l={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=D();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(S,{title:t,description:n,align:i,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",cx[r]),role:"list",children:a.map(mx(d,l))}):null]})})),mx=(e,t)=>(n,i)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?ux(t)(n,i):ax(e,t)(n,i)},ux=e=>(t,n)=>{const i={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(ox,{...i,icon:e,href:hx(t)?t?.href:t?.attachment?.src}),o(Me,{__html:t?.__html})]},String(n)):null},hx=e=>"href"in e,px=Ot((({className:e,padding:t,align:n="text-left",buttons:i=[],description:a,image:l,__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",y=l?.src?o(ne,{className:"hidden lg:block",image:l}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Be,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:y,buttons:je(i,{className:"flex-wrap"}),children:[a?o(Ae,{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(Me,{__html:r,itemSize:"list-m"}):null,o(Ae,{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,l?.src?o(ne,{className:"lg:hidden",image:l}):null]})]})})})),gx=(e,t)=>e&&"underlined"!==t?"primary":"secondary",fx=(e=[],t={})=>e.filter((({content:e={}})=>Vd(t,e))).length,xx=(e,t)=>e===t;const yx=(e=>(t,n)=>t===n||Boolean(t&&n&&Object.keys(t).length===Object.keys(n).length&&Object.entries(t).every((([t,i])=>e(i,n[t])))))(function(...e){return(t,n)=>e.some((e=>e(t,n)))}(xx,((e=xx)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,i)=>e(t,n[i])))))())),bx=[],vx={},Nx={primary:"bg-white/30",secondary:"bg-main-divider"},wx={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Cx=d((({count:e,version:t="secondary"})=>{const n=ke(),i=n?"bg-main-divider":Nx[t],a=wx[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",i),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Ae,{size:"text-xs",color:a,children:e})})})),Sx=({text:e,description:t,icon:n,isActive:i,type:a})=>{const l=(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"}))(i);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",l.icon),image:{...n,iconVersion:n?.iconVersion??l.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?l.text:l.oldText,children:e}),o("div",{className:"animated"===a?l.desc:l.oldDesc,children:t})]})]})},kx={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Ix={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Tx={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Bx={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Px=d((({tag:e="div",item:t={},isActive:n=!1,type:i="default",onClick:a})=>{const l=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(l,{className:u("h-12","block flex-1","cursor-pointer",kx[i],n?Bx[i]:Tx[i]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Ix[i]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Sx({text:r,description:s,icon:d,isActive:n,type:i}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Cx,{count:m,version:gx(n,i)})}):null]})})})),Rx=d((e=>o(e?.item?.href?Dx:Mx,{...e}))),Dx=d((e=>{const t=pe(),n=l((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:i,...a}=t({...e.item,onClick:n});return o(Px,{...e,tag:"a",item:a,onClick:i})})),Mx=d((({item:e={},onClick:t,...n})=>{const i=l((()=>{t&&t(e)}),[t,e]);return o(Px,{item:e,onClick:i,...n})})),_x=(e,t,n)=>(i,a)=>o(Rx,{isActive:i===e,onClick:t,type:n,item:i},String(a)),Ax=d((({className:e,tabsType:t="default",items:n=[],activeItem:i,onChange:a})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(_x(i,a,t))}))),Ex={categories:[],extraOptions:[],propertyType:[],stage:[]},zx=Ot((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:i,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=$d(Ex,{block:a.block,page:a.options?.page}),f=l(((e=Ex)=>p(e)),[]),x=(({hotFilters:e=bx,filtrationState:t=vx,blocks:n=bx,onFiltrationStateChange:i})=>{const a=r((()=>Math.max(0,e.findIndex((e=>yx(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:fx(n,t.filter),version:gx(t===e[a])})))),[e,n,a]),o=l((t=>{i(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(Ax,{...x}),o(Ad,{filtrationSchema:n,resetButton:i,field:m,reset:h}),o(Rd,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Fx=(e,t,n)=>{const i=gx("all"===t),a=gx("business"===t),l=(e,t,i)=>{const a=e.currentTarget===e.target&&"business"===t?r(i):i;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(Xl,{"data-id":"all",onClick:t=>l(t,"all",e),version:i,children:"Для физических лиц"}),o(Xl,{"data-id":"business",onClick:t=>l(t,"business",e),version:a,children:"Для юридических лиц"})]})},Ox=({__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(Me,{__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(Ae,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Vx="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Lx=({filters:e,field:{field:t,reset:n},onlyOffice:i,labels:a})=>{const l=i?5:6,r=(e||[]).map((e=>o(Bi,{text:a[e],...t(e)},e))),[s,d]=l>0?[r.slice(0,l),r.slice(l)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(aa,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Vx,children:s}),o(la,{className:Vx,isUnfolded:e,children:d})]}),renderFoldButton:$x(n,i)})}):null})},$x=(e,t=!1)=>({isUnfolded:n,onToggle:i})=>c("div",{className:"flex space-x-lg",children:[t?o(Ne,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:i}):null,o(Ne,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:jx()})]}),jx=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),qx=(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(Ae,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Ux=()=>{},Wx=e=>"all"===e?"block":"hidden",Hx=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:l=Ux,renderRemoteWorkplaceCard:r=Ux,getBalloon:s=Ux,getBalloonRemoteWorkplaces:d=Ux,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=an(Ea),{filteredItems:y,points:b,filteredRemoteWorkplaces:v,lengthItems:N}=La({data:t,remoteWorkplaces:a,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=i("all"),S={filters:Yx([...t,...a]),field:{field:f,reset:x},onlyOffice:p,labels:za};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[qx(h,N),m?Ox(m):null,p&&Fx(t,w,C),o("div",{className:u("pb-3xl",Wx(w)),children:Lx(S)})]}),o("div",{className:"h-[600px]",children:o(Ua,{children:o(Xi,{points:b,isLoad:n,className:"h-full"})})})]}),c(Ua,{children:[y.map(l),v.map(r)]})]})})),Yx=e=>Object.keys(Ea).filter((t=>e.filter((e=>Fa[t](e))).length)),Kx=({location:e,address:t,billAcceptorType:n,terminalType:i,billAcceptorEnable:a,atmCode:l="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Jx(i)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:l}];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(Ae,{size:"text-h4",children:Jx(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Na,{color:"green",children:Jx(s)})})]}),o("div",{className:"hidden sm:block",children:o(da,{className:"flex-wrap",children:m?.map(Xx)})}),o(aa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(la,{isUnfolded:e,children:o(da,{className:"flex-wrap",children:m?.map(Xx)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ba({isUnfolded:e,onToggle:t})})]},String(d))},Gx=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Jx(t)} №${n}`,body:e.toUpperCase()}),Xx=(e,t)=>o(ra,{...e},String(t)),Jx=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Zx=[];const Qx=async e=>{const t=await Rt(e,{method:"GET"});return Array.isArray(t)?t:Zx},ey={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},ty={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)},ny=d((({descriptionData:e,className:t})=>{const n=Ap(),i=n?.code??"000",{data:a,isLoad:l}=function(e){const{data:t,error:n}=gi(`${Ut}/atms?regionCode=${e}`,Qx);return{data:t||Zx,isLoad:!t&&!n}}(i);return o(Hx,{className:t,filterItems:iy,data:a,isLoad:l,initFilterState:ey,renderCard:Kx,getBalloon:Gx,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),iy=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),i=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!i.includes(e)));return e.filter((e=>{const t=a.every((t=>ty[t](e))),n=!i.length||i.some((t=>ty[t](e)));return t&&n}))},ay=({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(Ae,{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(Ae,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:ly({workScheduleDescription:t})}),o(aa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(la,{isUnfolded:e,children:ly({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ba({isUnfolded:e,onToggle:t})})]},String(n)):null,ly=({workScheduleDescription:e})=>c("div",{children:[c(da,{className:"flex",children:[o(ra,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(ra,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание банковских карт"})}),o(ra,{label:"Операции для физических лиц",children:o(Ae,{children:"Инвестиционное и накопительное страхование"})}),o(ra,{label:"Операции для физических лиц",children:o(Ae,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(ra,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]}),ry=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),sy={branches:[],remoteWorkplaces:[]};const oy=async e=>await Rt(e,{method:"GET"})||sy,cy=d((({className:e})=>{const t=Ap(),n=t?.code??"000",{data:i,isLoad:a}=function(e="000"){const{data:t,error:n}=gi(`${Ut}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,oy);return{data:t||sy,isLoad:!t&&!n}}(n);return o(Hx,{className:e,data:i?.branches,isLoad:a,remoteWorkplaces:i?.remoteWorkplaces,renderCard:Ma,renderRemoteWorkplaceCard:ay,getBalloon:Aa,getBalloonRemoteWorkplaces:ry,title:`Офисы филиала ${t?.name}`})})),dy=d((({data:e,className:t,...n})=>{const i=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===i?o(cy,{}):o(ny,{descriptionData:e})})})),my=d((({className:e,title:t,description:n="Блок в разработке...",...i})=>c(g,{className:u("box-border",e),...i,children:[o(S,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),uy="hidden sm:flex absolute z-40 top-10",hy=Ot((({className:e="",padding:t,slides:n=[],...a})=>{const[l,r]=i(0),[s,d]=dd({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*l}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Ze,{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(nd,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(py({activeSlideIndex:l,onClick:r}))}),d.canScrollLeft?o(gd,{className:u("left-6",uy),onClick:d.scrollLeft}):null,d.canScrollRight?o(fd,{className:u("right-6",uy),onClick:d.scrollRight}):null]})]})})),py=({activeSlideIndex:e,onClick:t})=>({nav:n},i)=>{const a=i===e,l=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(i),"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",l),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(i))},gy=d((({address:e,email:t,telephone:n,button:i,className:a="",__html:l,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:[$e(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:[l?fy({__html:l,richVersion:r}):null,xy({label:"Адрес",data:e,iconName:"GeolocationIcon"}),xy({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),xy({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),i?.text?je([i]):null]})]}))),fy=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Me,{...e,itemSize:"list-s"})}),xy=({label:e,data:t,iconName:n,dataColor:i=""})=>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(Ae,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ae,{size:"text-xl",color:i,children:t})]})]}):null,yy=d((e=>{const{__html:t,richVersion:n="",...i}=e;return o(g,{defaultPadding:"p-0",...i,children:o(Me,{__html:t,richVersion:n})})})),by=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:i,labelIcon:a})=>o(Sd,{tag:"button",className:u("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:i,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(Ae,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),vy=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Ny=(e=!1)=>e?"MinusIcon":"PlusIcon",wy=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Cy=Ot((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:i="Развернуть",labelIcon:a,labelIconBgVersion:l,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=ke();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(aa,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(la,{className:u("gap-lg",vy(m)),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Sy({foldButtonVersion:r,label:i,labelIcon:a,labelIconBgVersion:l,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),Sy=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:i,isUnfolded:a,onToggle:l,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?wy(e):Ny(e))(a,r);return"accordion"===e?o(by,{label:s,labelIcon:n,labelIconBgVersion:i,icon:c,onToggle:l}):o(kd,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:l})},ky=d((({name:e,text:t,value:n,checked:i,onChange:a,className:l})=>o("div",{className:l,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(hn.split(" ").filter((e=>"rounded"!==e)),Ii,"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:i,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Ae,{color:"text-primary-text",children:t}):null]})}))),Iy=d((({className:e=""})=>{const[t,n]=i("option2"),a=l((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(ky,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(ky,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Ty=d((({data:e,fieldLabel:t,fieldValue:n,selected:i,placeholder:a="",setSelected:l,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===i));return o(Dn,{options:s,label:r,placeholder:a||i,onChange:e=>l(e.key),value:c})})),By=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:i=[],selectedBranch:a,onSelectedBranch:l})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Ty,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Ty,{data:i,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Py=["От 1 дня","До 365 дней"],Ry=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ae,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Za,{min:1,max:365,value:e,items:Py,onChange:t})]}))),Dy=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:i=[],selectedBoxSize:a,onSelectedBoxSize:l})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Ty,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Ty,{data:i,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),My=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:i,days:a,selectedCaseVolume:l,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(By,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:i,onSelectedBranch:_y(m)}),o(Ry,{days:a,setDays:e=>m({days:e})}),o(Dy,{caseVolumes:d,selectedCaseVolume:l,onSelectedCaseVolume:Ay(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ae,{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(Iy,{}),o(Ne,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),_y=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Ay=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Ey=d((({days:e,tariffs:t=[]})=>{const n=Fy(e,t),i="На рисунке изображена пачка листов\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:[zy("Аренда за",e),zy("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:i})}),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:i})})]})]})})),zy=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ae,{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})]}),Fy=(e,t)=>{const n=Oy(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Oy=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},Vy=(e,t)=>e.find((e=>e.branchCode===t)),Ly=d((e=>{const{regions:t,data:n,branches:i,onChange:l,onClick:r}=e;a((()=>{l({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,l]);const s=Vy(i,n.selectedBranch),d=$y(s?.safeBoxCaseVolumes),m=jy(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=qy(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(My,{...n,regions:t,onClick:r,branches:i,caseVolumes:d,safeBoxCases:m,onChange:l}),o(Ey,{days:n.days,tariffs:u})]})})),$y=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],jy=(e,t)=>e?.find((e=>e.volume===t)),qy=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Uy=`${Ut}/safeboxes`,Wy=[];const Hy=async e=>await Rt(e,{method:"GET"})||Wy,Yy=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=i(!1),d=l((()=>s((e=>!e))),[]),[m,u]=i({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=go(),p=Ky(m.selectedRegion,h),f=function(e){const{data:t}=gi(e?`${Uy}?regionCode=${e}`:null,Hy);return t||Wy}(p),x=l((e=>u((t=>({...t,...e})))),[u]),y=(b=Vy(f,m.selectedBranch)||f,Array.isArray(b)?b.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):b?.gpsLatitude&&b?.gpsLongitude?[{coords:[b.gpsLatitude,b.gpsLongitude]}]:[]);var b;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(Ly,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),y.length&&r?o(Xi,{points:y,className:"h-[640px]"}):null]})})),Ky=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Gy=e=>e<4?"w-72":"w-52",Xy={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"},Jy=d((({buttons:e,className:t="",description:n,showLines:i=!0,steps:a=[],stepVersion:l="gray",title:r,version:s="primary",...d})=>{const m=a.length>3,h=Xy,p=(e=>e?"":"opacity-0")(i),f=ke();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(S,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Hd(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:Md(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(a.map(Zy(h,m,l)))}),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:i,version:a}=x,{label:l,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",Gy(n.length)),children:[c("div",{className:"space-y-xs",children:[l?o(Ae,{size:"text-h6",align:"text-center",children:l}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:i.description,children:r}):null,o(Me,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(Ne,{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})),Zy=(e,t,n)=>({icon:i},a)=>{const l="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${Qy(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:$e(i)?o(ne,{image:{...i,iconVersion:i?.iconVersion||l},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},Qy=e=>e?"h-16 w-16":"h-24 w-24",eb=d((()=>o("div",{className:"hidden",role:"none"}))),tb="hidden sm:flex absolute z-40",nb={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},ib=d((({className:e,items:t=[],activeItem:n,onChange:i,tabsType:l="default"})=>{const[r,s]=dd({itemCount:t?.length||0});return a((()=>ab(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(nd,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:nb[l].item,gap:nb[l].gap,children:t.map(_x(n,i,l))}),s.canScrollLeft?o(gd,{className:u("left-6",tb,nb[l].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(fd,{className:u("right-6",tb,nb[l].buttonTop),onClick:s.scrollRight}):null]})})),ab=(e,t,n)=>{const i=t.findIndex((e=>e===n));e&&i>0&&e.scrollTo({left:e?.children[i]?.offsetLeft,behavior:"smooth"})},lb={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},rb=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(lb[t].wrapper,e),children:o(ib,{className:lb[t].component,tabsType:t,...n})}):null,sb=Ot((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=ob(n??{}),p=D(),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:y}=p,[b,v]=i(mb(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[b],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)}),[y,w,h]);const C=db(x[b],b),S=l((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:[rb({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:cb(t,x),activeItem:N,tabsType:r,onChange:S}),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:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(db)?.filter(Boolean)||[]}),ob=({__id:e,anchor:t})=>t??e??"tabs",cb=(e,t)=>t?.length?t:e,db=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",mb=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),ub={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},hb=d((({children:e,activeIndex:t,columnWidth:n,version:i="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:ub[i],style:{transform:`translateX(-${t*n}px)`},children:e})}))),pb=d((({className:e="",isOpen:t,onClick:n})=>o(Ne,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),gb={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(Me,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ae,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Ae,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:i,isOpen:a})=>e?o(pb,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:i})}}):null},fb=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:l,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=i(!0);a((()=>{l===o&&s||m(!0)}),[s,o]);return xb({cell:e,cellProps:{rowIdx:n,cellIdx:l,fieldIdx:t,displayTable:e=>{m(!1),c(l),r(e)},isVisible:d}})})),xb=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...i}=e;if(!n||!(n in gb))return null;return o(gb[n],{...t,...i})},yb=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:i,tableInner:a,openTableInnerIdx:l,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(fb,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:i,tableInner:a,openTableInnerIdx:l,setOpenTableInnerIdx:r},String(s)))):null}))),bb=(e,t)=>140*Bg(e.slice(0,t).map((e=>e?.cols?.length??1))),vb=(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(Ae,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Nb=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,i]=Lf({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((a=n,(e,t)=>{if(!e?.length)return null;const[n,...i]=e,l=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(Ae,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:l,style:{transform:`translateX(-${bb(i,a)}px)`},children:i?.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(Ae,{size:"text-xl",children:e.data}):null,e?.cols?vb(e.cols,a):null]},`row${t}`)))})})]},String(t))})),$f({...i,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),wb=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const i=`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(Ae,{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(Nb,{rows:t.rowsData})})})]},i)}))}))),Cb=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Sb=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:i})=>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:()=>i(t),children:o(Ae,{size:"text-xl",font:"font-light",color:Cb(t===n),children:e||t+1})},e)))}):null,t?o(Ne,{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]}))),kb=Ot((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=i(0),d=l((e=>s(e)),[]),m=a?.[r]?.items??[],u=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(Sb,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(wb,{activeTabIndex:r,items:m}),o(pb,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ae,{size:"text-h6",children:"Данных нет"}),o(pb,{onClick:n,isOpen:!0})]})})),Ib=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(kb,{...t,onClick:n})}):null]}))),Tb=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=i(void 0),m=l((e=>d(e)),[]),[h,p]=i(void 0),g=l((e=>p(e)),[]);return c(Ib,{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(Ae,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(hb,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(yb,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),Bb=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,$f({...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]})})),Pb=d((({className:e="",title:t,description:n,rowHeaders:i,tariffsColumns:a,hiddenRowsNum:l=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=i?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,p]=Lf({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(Tb,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,y]=l>0?[f.slice(0,-l),f.slice(-l)]:[f,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:l>0?o(aa,{renderFoldableSection:({isUnfolded:e})=>c(Bb,{controls:p,children:[x,o(la,{isUnfolded:e,children:y})]}),renderFoldButton:Id}):o(Bb,{controls:p,children:f})})]})})),Rb=d((({className:e="",title:t,description:n,iconVersion:i,__html:a,richVersion:l,...r})=>c(g,{className:u("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===i?Db():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ae,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Mb(n):null,a?o(Me,{richVersion:l,__html:a}):null]})]}))),Db=()=>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"}),Mb=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),_b=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(Ae,{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(Ae,{size:"text-h2",children:n})}):null]}))),Ab=d((e=>{const{prefix:t,unit:n,suffix:i,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(_b,{prefix:t,unit:n,suffix:i})})})),Eb=Ot((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:i=!0,version:a="transparent",isTheme:l=!1,isCardBorder:r=!1,image:s,...c})=>{const d=D();return o(g,{className:u("relative flex flex-col",Ff[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:l,...c,children:R({...c,extraProps:{className:u("w-full",Gc(r)),...zf(i)}})})}),{childrenTypes:[]}),zb=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(9),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",Fb=d((({className:e,title:t,url:n,previewImg:i,...a})=>{const l=D();return c(g,{className:e,defaultPadding:zb(e),...a,children:[o(S,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:q(l)(i?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:q(l)(n)})}):null]})})),Ob={AdTile:Lt,ApplicationForm:Jo,ApplicationLeadForm:Yc,BankAccountFiltration:Ud,BenefitsBlock:Gd,BonusBenefitsBlock:em,ButtonsBlock:nm,CalculatorBonus:cm,CalculatorBusinessDeposit:bm,CalculatorCredit:Or,CalculatorDeposit:Fm,CalculatorRefinancing:Wm,CardTransfer:Zm,Carousel:ru,CarouselCard:du,CarouselCatalogCard:uu,CarouselLinks:gu,CarouselRecommendationCard:Cu,CarouselTariffsCard:Iu,ContactsBlock:Bu,CreditCardForm:vh,CreditForm:np,DepositFiltration:sp,Depository:Cp,ErrorBlock:kp,ExchangeRateTile:cg,Footer:jg,GracePeriod:qg,GrantSupport:Yg,Header:_f,Headline:S,HorizontalLayout:Of,ImgBlock:Vf,InsuranceAmountBlock:Hf,InvestmentInfo:Xf,LinkDocs:dx,MobileAppTile:px,MortgageFiltration:zx,OfficesAtmsMap:dy,Placeholder:my,ProductBlock:Vt,ProductGallery:hy,RepresentativeOfficeInfo:gy,RichTextBlock:yy,RollupItem:Cy,SafeDepositRental:Yy,StepsBlock:Jy,StickyBottomMenu:eb,TabsLayout:sb,TariffsTable:Pb,TextBlock:Rb,UnitBlock:Ab,VerticalLayout:Eb,Video:Fb},Vb=ce((()=>{a((()=>{Qt()}),[]);const e=tn();cn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const i=JSON.parse(n?.dataset?.aspects??"[]");Xt({aspectsAttributes:i,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),Lb="cookie",$b=d((({__html:e})=>{const[t,{setTrue:n,setFalse:i}]=on();kg((()=>{globalThis.localStorage?.getItem(Lb)||n()}),[],3e3);const a=l((()=>{globalThis.localStorage?.setItem(Lb,"true"),i()}),[]);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(Me,{__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 jb(e){const t=l((({key:t})=>{"Escape"===t&&e()}),[e]);cn(globalThis.document,"keydown",t)}function qb(e,t,n){a((()=>e.subscribe(t,(e=>{const t=e?.type;if(t&&"string"==typeof t){const i=n[t];i&&i(e)}}))),[e,t,...Object.values(n)])}const Ub=()=>{const[e,{push:t,pop:n,clear:a}]=function(e=[]){const[t,n]=i(e),a=l((e=>n((t=>[...t,e]))),[]),r=l((()=>n((e=>e.slice(0,-1)))),[]),s=l((e=>n((t=>t.filter((t=>t!==e))))),[]),o=l((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}();return qb(ue.observable,"dialog",{open:t,close:n,closeAll:a}),[e,{close:n,closeAll:a}]},Wb=d((()=>{const[e,{close:t}]=Ub(),n=Boolean(e.length);return jb(t),a((()=>{n?globalThis.document?.body.classList.add("no-scrollbar","overflow-hidden"):globalThis.document?.body.classList.remove("no-scrollbar","overflow-hidden")}),[n]),n?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:e.map((({dialog:t,id:n},i)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:i!==e.length-1}),children:t},String(n||i))))}):null})),Hb=d((()=>{const[e,t]=i(null),n=l((()=>{t(null)}),[]);return qb(ue.observable,"popup",{open:t,close:n}),jb(n),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})),Yb="header",Kb="footer",Gb="sticky-footer",Xb={},Jb=d((({className:e,data:t=Xb,blocksRegistry:n,blockDecorator:i})=>{const{slots:a,blocks:l,fallback:r,...s}=t,d=zt(s,r);Vb(),Ep();const m={key:"",page:{slots:a,blocks:l,fallback:r,...d},blocksRegistry:n,blockDecorator:i,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[a?.[Yb]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(a?.[Yb],{...m,slotName:Yb})}):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?.[Kb],{...m,slotName:Kb})]})]}),a?.[Gb]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(a?.[Gb],{...m,slotName:Gb})}):null,o(Wb,{}),o(Hb,{}),o($b,{__html:d?.cookieContent?.__html})]})}));Object.assign(Jb,{childrenTypes:[],slots:()=>[Yb,Kb,Gb]});e.Blocks=Ob,e.ContentPage=Jb,e.handlerDecorator=ce,e.joinList=Md,e.locationNavigator=Jt,e.packageVersion="0.14.689",e.projectSettings=_,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=D,Object.defineProperty(e,"__esModule",{value:!0})}));