@redneckz/wildless-cms-uni-blocks 0.12.13 → 0.13.0

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 (1628) hide show
  1. package/bin/migration-scripts/0.12.12.js +48 -0
  2. package/bundle/EventBus/defaultEventBus.d.ts +4 -2
  3. package/bundle/EventBus/useLatestEvent.d.ts +2 -0
  4. package/bundle/blocks.schema.json +1 -1
  5. package/bundle/bundle.umd.js +450 -422
  6. package/bundle/bundle.umd.min.js +1 -1
  7. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  8. package/bundle/components/Bonus/BonusContent.d.ts +2 -7
  9. package/bundle/components/BusinessBlock/BusinessBlockContent.d.ts +3 -2
  10. package/bundle/components/ButtonsBlock/ButtonsBlockContent.d.ts +2 -2
  11. package/bundle/components/Calculator/Calculator.mobile.d.ts +5 -0
  12. package/bundle/components/Calculator/CalculatorContent.d.ts +2 -2
  13. package/bundle/components/Calculator/CreditCalculatorForm.d.ts +1 -0
  14. package/bundle/components/Calculator/DepositCalculatorForm.d.ts +1 -1
  15. package/bundle/components/Calculator/RefinancingCalculatorForm.d.ts +1 -1
  16. package/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
  17. package/bundle/components/Calculator/renderRate.d.ts +9 -0
  18. package/bundle/components/CardTransfer/CardTransferContent.d.ts +2 -2
  19. package/bundle/components/CarouselCard/CarouselCardContent.d.ts +3 -2
  20. package/bundle/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +3 -2
  21. package/bundle/components/CarouselCatalogCard/CatalogCard.d.ts +2 -2
  22. package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +3 -2
  23. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -2
  24. package/bundle/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +4 -9
  25. package/bundle/components/ContactsBlock/ContactsBlockContent.d.ts +2 -2
  26. package/bundle/components/ContentPage/computeAPIFallback.d.ts +2 -2
  27. package/bundle/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  28. package/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +2 -2
  29. package/bundle/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +2 -2
  30. package/bundle/components/Footer/FooterProps.d.ts +0 -2
  31. package/bundle/components/Footer/SocialMedia.d.ts +2 -2
  32. package/bundle/components/Header/HeaderProps.d.ts +0 -4
  33. package/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -1
  34. package/bundle/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +2 -2
  35. package/bundle/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +2 -2
  36. package/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +2 -2
  37. package/bundle/components/MortgageFiltration/HotFilterRecord.d.ts +11 -0
  38. package/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +12 -0
  39. package/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -2
  40. package/bundle/components/ProductBlock/renderBackwardButton.d.ts +2 -2
  41. package/bundle/components/PromoTile/PromoTileContent.d.ts +2 -2
  42. package/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +2 -2
  43. package/bundle/components/RollupItem/rollupIconVersion.mobile.d.ts +1 -1
  44. package/bundle/components/StepsBlock/StepsBlockContent.d.ts +6 -9
  45. package/bundle/components/Tabs/renderTabs.d.ts +12 -0
  46. package/bundle/components/TariffsTable/EmbeddableCellData.d.ts +3 -2
  47. package/bundle/components/TariffsTable/EmbeddableCellData.mobile.d.ts +3 -2
  48. package/bundle/components/TariffsTable/TariffsTableContent.d.ts +2 -2
  49. package/bundle/hooks/useForm.d.ts +1 -0
  50. package/bundle/hooks/useList.d.ts +10 -0
  51. package/bundle/hooks/useLocation.d.ts +1 -1
  52. package/bundle/hooks/useSWRResource.d.ts +1 -1
  53. package/bundle/icons/IconName.d.ts +3 -3
  54. package/bundle/services/sitemap/useSitemap.d.ts +3 -0
  55. package/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
  56. package/bundle/ui-kit/Button/Button.d.ts +2 -2
  57. package/bundle/ui-kit/Button/ButtonContent.d.ts +19 -0
  58. package/bundle/ui-kit/Button/ButtonInner.d.ts +2 -7
  59. package/bundle/ui-kit/Button/ButtonProps.d.ts +4 -44
  60. package/bundle/ui-kit/Button/ButtonsSectionContent.d.ts +7 -0
  61. package/bundle/ui-kit/Button/renderButtonsSection.d.ts +2 -2
  62. package/{lib/ui-kit/Dialog → bundle/ui-kit/DialogManager}/CloseButton.d.ts +1 -1
  63. package/bundle/ui-kit/{Dialog → DialogManager}/Dialog.d.ts +0 -1
  64. package/bundle/ui-kit/DialogManager/DialogAction.d.ts +12 -0
  65. package/bundle/ui-kit/DialogManager/DialogManager.d.ts +2 -0
  66. package/bundle/ui-kit/DialogManager/useDialogManager.d.ts +10 -0
  67. package/bundle/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  68. package/bundle/ui-kit/ListControlProps.d.ts +4 -0
  69. package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +2 -3
  70. package/bundle/ui-kit/LocationDialog/renderForeignOffices.d.ts +5 -0
  71. package/bundle/ui-kit/LocationDialog/renderRegion.d.ts +3 -0
  72. package/bundle/ui-kit/LocationDialog/renderRegionGroup.d.ts +3 -0
  73. package/bundle/ui-kit/LocationDialog/useLocationDialog.d.ts +5 -0
  74. package/bundle/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -0
  75. package/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +1 -3
  76. package/bundle/ui-kit/SearchDialog/useSearchDialog.d.ts +6 -0
  77. package/bundle/ui-kit/TabsControl/ScrollableTabsControl.d.ts +2 -0
  78. package/bundle/ui-kit/TabsControl/TabItem.d.ts +11 -0
  79. package/bundle/ui-kit/TabsControl/TabsControl.d.ts +2 -0
  80. package/bundle/ui-kit/TabsControl/TabsControlProps.d.ts +6 -0
  81. package/bundle/ui-kit/TabsControl/renderTab.d.ts +4 -0
  82. package/bundle/utils/BoolComparator.d.ts +11 -0
  83. package/cosmos-static/icons/ArrowDownSolidIcon.svg +1 -1
  84. package/cosmos-static/icons/ArrowUpSolidIcon.svg +1 -1
  85. package/dist/EventBus/defaultEventBus.d.ts +4 -2
  86. package/dist/EventBus/defaultEventBus.js.map +1 -1
  87. package/dist/EventBus/useLatestEvent.d.ts +2 -0
  88. package/dist/EventBus/useLatestEvent.js +11 -0
  89. package/dist/EventBus/useLatestEvent.js.map +1 -0
  90. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  91. package/dist/components/Blocks.mobile.js +2 -0
  92. package/dist/components/Blocks.mobile.js.map +1 -1
  93. package/dist/components/Bonus/BonusContent.d.ts +2 -7
  94. package/dist/components/BusinessBlock/BusinessBlockContent.d.ts +3 -2
  95. package/dist/components/ButtonsBlock/ButtonsBlockContent.d.ts +2 -2
  96. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +19 -13
  97. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  98. package/dist/components/Calculator/Calculator.mobile.d.ts +5 -0
  99. package/dist/components/Calculator/Calculator.mobile.js +33 -0
  100. package/dist/components/Calculator/Calculator.mobile.js.map +1 -0
  101. package/dist/components/Calculator/CalculatorContent.d.ts +2 -2
  102. package/dist/components/Calculator/CalculatorValueBlock.js +2 -1
  103. package/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
  104. package/dist/components/Calculator/CreditCalculatorForm.d.ts +1 -0
  105. package/dist/components/Calculator/CreditCalculatorForm.js +18 -11
  106. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  107. package/dist/components/Calculator/DepositCalculatorForm.d.ts +1 -1
  108. package/dist/components/Calculator/DepositCalculatorForm.js +13 -11
  109. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  110. package/dist/components/Calculator/RefinancingCalculatorForm.d.ts +1 -1
  111. package/dist/components/Calculator/RefinancingCalculatorForm.js +1 -0
  112. package/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  113. package/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
  114. package/dist/components/Calculator/renderBinaryRadioButtonGroup.js +2 -1
  115. package/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  116. package/dist/components/Calculator/renderDaysInput.js +1 -1
  117. package/dist/components/Calculator/renderDaysInput.js.map +1 -1
  118. package/dist/components/Calculator/renderMonthsInput.js +1 -1
  119. package/dist/components/Calculator/renderMonthsInput.js.map +1 -1
  120. package/dist/components/Calculator/renderPaymentType.js +1 -0
  121. package/dist/components/Calculator/renderPaymentType.js.map +1 -1
  122. package/dist/components/Calculator/renderRate.d.ts +9 -0
  123. package/dist/components/Calculator/renderRate.js +16 -0
  124. package/dist/components/Calculator/renderRate.js.map +1 -0
  125. package/dist/components/CardTransfer/CardTransferContent.d.ts +2 -2
  126. package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.mobile.js +1 -1
  127. package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.mobile.js.map +1 -1
  128. package/dist/components/CarouselCard/CarouselCardContent.d.ts +3 -2
  129. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -2
  130. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  131. package/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +3 -2
  132. package/dist/components/CarouselCatalogCard/CatalogCard.d.ts +2 -2
  133. package/dist/components/CarouselCatalogCard/CatalogCard.js.map +1 -1
  134. package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +3 -2
  135. package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +6 -7
  136. package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  137. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -2
  138. package/dist/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +4 -9
  139. package/dist/components/ContactsBlock/ContactsBlockContent.d.ts +2 -2
  140. package/dist/components/ContentPage/ContentPage.js +2 -23
  141. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  142. package/dist/components/ContentPage/computeAPIFallback.d.ts +2 -2
  143. package/dist/components/ContentPage/computeAPIFallback.js +10 -27
  144. package/dist/components/ContentPage/computeAPIFallback.js.map +1 -1
  145. package/dist/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  146. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +2 -2
  147. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  148. package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +2 -2
  149. package/dist/components/Footer/Footer.js +4 -2
  150. package/dist/components/Footer/Footer.js.map +1 -1
  151. package/dist/components/Footer/Footer.mobile.js +7 -4
  152. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  153. package/dist/components/Footer/FooterProps.d.ts +0 -2
  154. package/dist/components/Footer/SocialMedia.d.ts +2 -2
  155. package/dist/components/Header/Header.js +5 -4
  156. package/dist/components/Header/Header.js.map +1 -1
  157. package/dist/components/Header/Header.mobile.js +4 -3
  158. package/dist/components/Header/Header.mobile.js.map +1 -1
  159. package/dist/components/Header/HeaderProps.d.ts +0 -4
  160. package/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -1
  161. package/dist/components/Header/HeaderSecondaryMenu.js +10 -9
  162. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  163. package/dist/components/Header/HeaderSubMenu.js +1 -1
  164. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  165. package/dist/components/Header/HeaderTop.js +9 -6
  166. package/dist/components/Header/HeaderTop.js.map +1 -1
  167. package/dist/components/Header/findActiveSubItem.js.map +1 -0
  168. package/dist/components/Header/isHrefActive.js.map +1 -0
  169. package/dist/components/Header/isTopItemActive.js.map +1 -0
  170. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +2 -2
  171. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +2 -2
  172. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  173. package/dist/components/MobileAppTile/MobileAppTile.js +1 -1
  174. package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  175. package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +2 -2
  176. package/dist/components/MortgageFiltration/HotFilterRecord.d.ts +11 -0
  177. package/dist/components/MortgageFiltration/HotFilterRecord.js +5 -0
  178. package/dist/components/MortgageFiltration/HotFilterRecord.js.map +1 -0
  179. package/dist/components/MortgageFiltration/MortgageFiltration.js +24 -4
  180. package/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  181. package/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +12 -0
  182. package/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -2
  183. package/dist/components/ProductBlock/renderBackwardButton.d.ts +2 -2
  184. package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
  185. package/dist/components/PromoTile/PromoTileContent.d.ts +2 -2
  186. package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +2 -2
  187. package/dist/components/RollupItem/RollupItem.js +1 -1
  188. package/dist/components/RollupItem/RollupItem.js.map +1 -1
  189. package/dist/components/RollupItem/renderRoundedIcon.mobile.js +1 -1
  190. package/dist/components/RollupItem/renderRoundedIcon.mobile.js.map +1 -1
  191. package/dist/components/RollupItem/rollupIconVersion.mobile.d.ts +1 -1
  192. package/dist/components/RollupItem/rollupIconVersion.mobile.js +1 -1
  193. package/dist/components/RollupItem/rollupIconVersion.mobile.js.map +1 -1
  194. package/dist/components/StepsBlock/StepsBlockContent.d.ts +6 -9
  195. package/dist/components/Tabs/Tabs.js +19 -24
  196. package/dist/components/Tabs/Tabs.js.map +1 -1
  197. package/dist/components/Tabs/renderTabs.d.ts +12 -0
  198. package/dist/components/Tabs/renderTabs.js +19 -0
  199. package/dist/components/Tabs/renderTabs.js.map +1 -0
  200. package/dist/components/TariffsTable/EmbeddableCellData.d.ts +3 -2
  201. package/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  202. package/dist/components/TariffsTable/EmbeddableCellData.mobile.d.ts +3 -2
  203. package/dist/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
  204. package/dist/components/TariffsTable/TariffsTableContent.d.ts +2 -2
  205. package/dist/hooks/useForm.d.ts +1 -0
  206. package/dist/hooks/useForm.js +5 -0
  207. package/dist/hooks/useForm.js.map +1 -1
  208. package/dist/hooks/useLink.js +3 -3
  209. package/dist/hooks/useLink.js.map +1 -1
  210. package/dist/hooks/useList.d.ts +10 -0
  211. package/dist/hooks/useList.js +13 -0
  212. package/dist/hooks/useList.js.map +1 -0
  213. package/dist/hooks/useLocation.d.ts +1 -1
  214. package/dist/hooks/useLocation.js +27 -16
  215. package/dist/hooks/useLocation.js.map +1 -1
  216. package/dist/hooks/useSWRResource.d.ts +1 -1
  217. package/dist/hooks/useSWRResource.js +2 -4
  218. package/dist/hooks/useSWRResource.js.map +1 -1
  219. package/dist/icons/IconName.d.ts +3 -3
  220. package/dist/icons/IconName.js +3 -3
  221. package/dist/icons/IconName.js.map +1 -1
  222. package/dist/services/sitemap/useSitemap.d.ts +3 -0
  223. package/dist/services/sitemap/useSitemap.js +7 -0
  224. package/dist/services/sitemap/useSitemap.js.map +1 -0
  225. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
  226. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  227. package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +2 -2
  228. package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
  229. package/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
  230. package/dist/ui-kit/BaseTile/BaseTile.js +1 -1
  231. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  232. package/dist/ui-kit/BenefitsList/DefaultBenefitsList.js +5 -3
  233. package/dist/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
  234. package/dist/ui-kit/Button/Button.d.ts +2 -2
  235. package/dist/ui-kit/Button/Button.js.map +1 -1
  236. package/dist/ui-kit/Button/ButtonContent.d.ts +19 -0
  237. package/dist/{model/Button.js → ui-kit/Button/ButtonContent.js} +1 -1
  238. package/dist/ui-kit/Button/ButtonContent.js.map +1 -0
  239. package/dist/ui-kit/Button/ButtonInner.d.ts +2 -7
  240. package/dist/ui-kit/Button/ButtonInner.js.map +1 -1
  241. package/dist/ui-kit/Button/ButtonProps.d.ts +4 -44
  242. package/dist/ui-kit/Button/ButtonsSectionContent.d.ts +7 -0
  243. package/dist/ui-kit/{LocationDialog/LocationDialogProps.js → Button/ButtonsSectionContent.js} +1 -1
  244. package/dist/ui-kit/Button/ButtonsSectionContent.js.map +1 -0
  245. package/dist/ui-kit/Button/renderButtonsSection.d.ts +2 -2
  246. package/dist/ui-kit/Button/renderButtonsSection.js.map +1 -1
  247. package/dist/ui-kit/CookiePopup/CookiePopup.js +6 -6
  248. package/dist/ui-kit/CookiePopup/CookiePopup.js.map +1 -1
  249. package/{bundle/ui-kit/Dialog → dist/ui-kit/DialogManager}/CloseButton.d.ts +1 -1
  250. package/{mobile/dist/ui-kit/Dialog → dist/ui-kit/DialogManager}/CloseButton.js +1 -1
  251. package/dist/ui-kit/DialogManager/CloseButton.js.map +1 -0
  252. package/dist/ui-kit/{Dialog → DialogManager}/Dialog.d.ts +0 -1
  253. package/dist/ui-kit/DialogManager/Dialog.js +17 -0
  254. package/dist/ui-kit/DialogManager/Dialog.js.map +1 -0
  255. package/dist/ui-kit/DialogManager/DialogAction.d.ts +12 -0
  256. package/dist/ui-kit/DialogManager/DialogAction.js.map +1 -0
  257. package/dist/ui-kit/DialogManager/DialogManager.d.ts +2 -0
  258. package/dist/ui-kit/DialogManager/DialogManager.js +61 -0
  259. package/dist/ui-kit/DialogManager/DialogManager.js.map +1 -0
  260. package/dist/ui-kit/DialogManager/useDialogManager.d.ts +10 -0
  261. package/dist/ui-kit/DialogManager/useDialogManager.js +10 -0
  262. package/dist/ui-kit/DialogManager/useDialogManager.js.map +1 -0
  263. package/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  264. package/dist/ui-kit/ListControlProps.d.ts +4 -0
  265. package/dist/ui-kit/ListControlProps.js +2 -0
  266. package/dist/ui-kit/ListControlProps.js.map +1 -0
  267. package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +2 -3
  268. package/dist/ui-kit/LocationDialog/LocationDialog.js +17 -26
  269. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  270. package/dist/ui-kit/LocationDialog/renderForeignOffices.d.ts +5 -0
  271. package/dist/ui-kit/LocationDialog/renderForeignOffices.js +15 -0
  272. package/dist/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -0
  273. package/dist/ui-kit/LocationDialog/renderRegion.d.ts +3 -0
  274. package/dist/ui-kit/LocationDialog/renderRegion.js +8 -0
  275. package/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -0
  276. package/dist/ui-kit/LocationDialog/renderRegionGroup.d.ts +3 -0
  277. package/dist/ui-kit/LocationDialog/renderRegionGroup.js +8 -0
  278. package/dist/ui-kit/LocationDialog/renderRegionGroup.js.map +1 -0
  279. package/dist/ui-kit/LocationDialog/useLocationDialog.d.ts +5 -0
  280. package/dist/ui-kit/LocationDialog/useLocationDialog.js +14 -0
  281. package/dist/ui-kit/LocationDialog/useLocationDialog.js.map +1 -0
  282. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -0
  283. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +2 -1
  284. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  285. package/dist/ui-kit/SearchBar/SearchBar.js +6 -9
  286. package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  287. package/dist/ui-kit/SearchDialog/SearchDialog.d.ts +1 -3
  288. package/dist/ui-kit/SearchDialog/SearchDialog.js +8 -9
  289. package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  290. package/dist/ui-kit/SearchDialog/useSearchDialog.d.ts +6 -0
  291. package/dist/ui-kit/SearchDialog/useSearchDialog.js +14 -0
  292. package/dist/ui-kit/SearchDialog/useSearchDialog.js.map +1 -0
  293. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
  294. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  295. package/dist/ui-kit/TabsControl/ScrollableTabsControl.d.ts +2 -0
  296. package/dist/ui-kit/TabsControl/ScrollableTabsControl.js +17 -0
  297. package/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -0
  298. package/dist/ui-kit/TabsControl/TabItem.d.ts +11 -0
  299. package/dist/ui-kit/TabsControl/TabItem.js +38 -0
  300. package/dist/ui-kit/TabsControl/TabItem.js.map +1 -0
  301. package/dist/ui-kit/TabsControl/TabsControl.d.ts +2 -0
  302. package/dist/ui-kit/TabsControl/TabsControl.js +8 -0
  303. package/dist/ui-kit/TabsControl/TabsControl.js.map +1 -0
  304. package/dist/ui-kit/TabsControl/TabsControlProps.d.ts +6 -0
  305. package/dist/ui-kit/TabsControl/TabsControlProps.js +2 -0
  306. package/dist/ui-kit/TabsControl/TabsControlProps.js.map +1 -0
  307. package/dist/ui-kit/TabsControl/renderTab.d.ts +4 -0
  308. package/dist/ui-kit/TabsControl/renderTab.js +7 -0
  309. package/dist/ui-kit/TabsControl/renderTab.js.map +1 -0
  310. package/dist/utils/BoolComparator.d.ts +11 -0
  311. package/dist/utils/BoolComparator.js +19 -0
  312. package/dist/utils/BoolComparator.js.map +1 -0
  313. package/lib/EventBus/defaultEventBus.d.ts +4 -2
  314. package/lib/EventBus/defaultEventBus.js.map +1 -1
  315. package/lib/EventBus/useLatestEvent.d.ts +2 -0
  316. package/lib/EventBus/useLatestEvent.js +8 -0
  317. package/lib/EventBus/useLatestEvent.js.map +1 -0
  318. package/lib/common.css +1 -1
  319. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  320. package/lib/components/Blocks.mobile.js +2 -0
  321. package/lib/components/Blocks.mobile.js.map +1 -1
  322. package/lib/components/Bonus/BonusContent.d.ts +2 -7
  323. package/lib/components/BusinessBlock/BusinessBlockContent.d.ts +3 -2
  324. package/lib/components/ButtonsBlock/ButtonsBlockContent.d.ts +2 -2
  325. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +19 -13
  326. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  327. package/lib/components/Calculator/Calculator.fixture.mobile.d.ts +8 -0
  328. package/lib/components/Calculator/Calculator.mobile.d.ts +5 -0
  329. package/lib/components/Calculator/Calculator.mobile.js +31 -0
  330. package/lib/components/Calculator/Calculator.mobile.js.map +1 -0
  331. package/lib/components/Calculator/CalculatorContent.d.ts +2 -2
  332. package/lib/components/Calculator/CalculatorValueBlock.js +2 -1
  333. package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
  334. package/lib/components/Calculator/CreditCalculatorForm.d.ts +1 -0
  335. package/lib/components/Calculator/CreditCalculatorForm.js +18 -11
  336. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  337. package/lib/components/Calculator/DepositCalculatorForm.d.ts +1 -1
  338. package/lib/components/Calculator/DepositCalculatorForm.js +13 -11
  339. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  340. package/lib/components/Calculator/RefinancingCalculatorForm.d.ts +1 -1
  341. package/lib/components/Calculator/RefinancingCalculatorForm.js +1 -0
  342. package/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  343. package/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -2
  344. package/lib/components/Calculator/renderBinaryRadioButtonGroup.js +2 -1
  345. package/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  346. package/lib/components/Calculator/renderDaysInput.d.ts +0 -1
  347. package/lib/components/Calculator/renderDaysInput.js +1 -1
  348. package/lib/components/Calculator/renderDaysInput.js.map +1 -1
  349. package/lib/components/Calculator/renderFootnote.d.ts +0 -1
  350. package/lib/components/Calculator/renderInterestPayment.d.ts +0 -1
  351. package/lib/components/Calculator/renderMonthsInput.d.ts +0 -1
  352. package/lib/components/Calculator/renderMonthsInput.js +1 -1
  353. package/lib/components/Calculator/renderMonthsInput.js.map +1 -1
  354. package/lib/components/Calculator/renderPaymentType.d.ts +0 -1
  355. package/lib/components/Calculator/renderPaymentType.js +1 -0
  356. package/lib/components/Calculator/renderPaymentType.js.map +1 -1
  357. package/lib/components/Calculator/renderRate.d.ts +8 -0
  358. package/lib/components/Calculator/renderRate.js +13 -0
  359. package/lib/components/Calculator/renderRate.js.map +1 -0
  360. package/lib/components/Calculator/renderRegistrationType.d.ts +0 -1
  361. package/lib/components/CardTransfer/CardTransferContent.d.ts +2 -2
  362. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.mobile.js +1 -1
  363. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.mobile.js.map +1 -1
  364. package/lib/components/CarouselCard/CarouselCardContent.d.ts +3 -2
  365. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -2
  366. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  367. package/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +3 -2
  368. package/lib/components/CarouselCatalogCard/CatalogCard.d.ts +2 -2
  369. package/lib/components/CarouselCatalogCard/CatalogCard.js.map +1 -1
  370. package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +3 -2
  371. package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +7 -8
  372. package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  373. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -2
  374. package/lib/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +4 -9
  375. package/lib/components/ContactsBlock/ContactsBlockContent.d.ts +2 -2
  376. package/lib/components/ContentPage/ContentPage.js +2 -23
  377. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  378. package/lib/components/ContentPage/computeAPIFallback.d.ts +2 -2
  379. package/lib/components/ContentPage/computeAPIFallback.js +8 -25
  380. package/lib/components/ContentPage/computeAPIFallback.js.map +1 -1
  381. package/lib/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  382. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +2 -2
  383. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  384. package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +2 -2
  385. package/lib/components/Footer/Footer.js +4 -2
  386. package/lib/components/Footer/Footer.js.map +1 -1
  387. package/lib/components/Footer/Footer.mobile.js +7 -4
  388. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  389. package/lib/components/Footer/FooterProps.d.ts +0 -2
  390. package/lib/components/Footer/SocialMedia.d.ts +2 -2
  391. package/lib/components/Header/Header.js +5 -4
  392. package/lib/components/Header/Header.js.map +1 -1
  393. package/lib/components/Header/Header.mobile.js +4 -3
  394. package/lib/components/Header/Header.mobile.js.map +1 -1
  395. package/lib/components/Header/HeaderProps.d.ts +0 -4
  396. package/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -1
  397. package/lib/components/Header/HeaderSecondaryMenu.js +10 -9
  398. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  399. package/lib/components/Header/HeaderSubMenu.js +1 -1
  400. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  401. package/lib/components/Header/HeaderTop.js +9 -6
  402. package/lib/components/Header/HeaderTop.js.map +1 -1
  403. package/lib/components/Header/findActiveSubItem.js.map +1 -0
  404. package/lib/components/Header/isHrefActive.js.map +1 -0
  405. package/lib/components/Header/isTopItemActive.js.map +1 -0
  406. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +2 -2
  407. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +2 -2
  408. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  409. package/lib/components/MobileAppTile/MobileAppTile.js +1 -1
  410. package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  411. package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +2 -2
  412. package/lib/components/MortgageFiltration/HotFilterRecord.d.ts +11 -0
  413. package/lib/components/MortgageFiltration/HotFilterRecord.js +3 -0
  414. package/lib/components/MortgageFiltration/HotFilterRecord.js.map +1 -0
  415. package/lib/components/MortgageFiltration/MortgageFiltration.js +24 -4
  416. package/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  417. package/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +12 -0
  418. package/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -2
  419. package/lib/components/ProductBlock/renderBackwardButton.d.ts +2 -2
  420. package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
  421. package/lib/components/PromoTile/PromoTileContent.d.ts +2 -2
  422. package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +2 -2
  423. package/lib/components/RollupItem/RollupItem.js +1 -1
  424. package/lib/components/RollupItem/RollupItem.js.map +1 -1
  425. package/lib/components/RollupItem/renderRoundedIcon.mobile.js +1 -1
  426. package/lib/components/RollupItem/renderRoundedIcon.mobile.js.map +1 -1
  427. package/lib/components/RollupItem/rollupIconVersion.mobile.d.ts +1 -1
  428. package/lib/components/RollupItem/rollupIconVersion.mobile.js +1 -1
  429. package/lib/components/RollupItem/rollupIconVersion.mobile.js.map +1 -1
  430. package/lib/components/StepsBlock/StepsBlockContent.d.ts +6 -9
  431. package/lib/components/Tabs/Tabs.js +20 -25
  432. package/lib/components/Tabs/Tabs.js.map +1 -1
  433. package/lib/components/Tabs/renderTabs.d.ts +11 -0
  434. package/lib/components/Tabs/renderTabs.js +16 -0
  435. package/lib/components/Tabs/renderTabs.js.map +1 -0
  436. package/lib/components/TariffsTable/EmbeddableCellData.d.ts +3 -2
  437. package/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  438. package/lib/components/TariffsTable/EmbeddableCellData.mobile.d.ts +3 -2
  439. package/lib/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
  440. package/lib/components/TariffsTable/TariffsTableContent.d.ts +2 -2
  441. package/lib/hooks/useForm.d.ts +1 -0
  442. package/lib/hooks/useForm.js +5 -0
  443. package/lib/hooks/useForm.js.map +1 -1
  444. package/lib/hooks/useLink.js +3 -3
  445. package/lib/hooks/useLink.js.map +1 -1
  446. package/lib/hooks/useList.d.ts +10 -0
  447. package/lib/hooks/useList.js +10 -0
  448. package/lib/hooks/useList.js.map +1 -0
  449. package/lib/hooks/useLocation.d.ts +1 -1
  450. package/lib/hooks/useLocation.js +28 -17
  451. package/lib/hooks/useLocation.js.map +1 -1
  452. package/lib/hooks/useSWRResource.d.ts +1 -1
  453. package/lib/hooks/useSWRResource.js +2 -4
  454. package/lib/hooks/useSWRResource.js.map +1 -1
  455. package/lib/icons/IconName.d.ts +3 -3
  456. package/lib/icons/IconName.js +3 -3
  457. package/lib/icons/IconName.js.map +1 -1
  458. package/lib/services/sitemap/useSitemap.d.ts +3 -0
  459. package/lib/services/sitemap/useSitemap.js +4 -0
  460. package/lib/services/sitemap/useSitemap.js.map +1 -0
  461. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
  462. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  463. package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +2 -2
  464. package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
  465. package/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
  466. package/lib/ui-kit/BaseTile/BaseTile.js +1 -1
  467. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  468. package/lib/ui-kit/BenefitsList/DefaultBenefitsList.js +5 -3
  469. package/lib/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
  470. package/lib/ui-kit/Button/Button.d.ts +2 -2
  471. package/lib/ui-kit/Button/Button.js.map +1 -1
  472. package/lib/ui-kit/Button/ButtonContent.d.ts +19 -0
  473. package/lib/ui-kit/Button/ButtonContent.js +2 -0
  474. package/lib/ui-kit/Button/ButtonContent.js.map +1 -0
  475. package/lib/ui-kit/Button/ButtonInner.d.ts +2 -7
  476. package/lib/ui-kit/Button/ButtonInner.js.map +1 -1
  477. package/lib/ui-kit/Button/ButtonProps.d.ts +4 -44
  478. package/lib/ui-kit/Button/ButtonsSectionContent.d.ts +7 -0
  479. package/lib/ui-kit/Button/ButtonsSectionContent.js +2 -0
  480. package/lib/ui-kit/Button/ButtonsSectionContent.js.map +1 -0
  481. package/lib/ui-kit/Button/renderButtonsSection.d.ts +2 -2
  482. package/lib/ui-kit/Button/renderButtonsSection.js.map +1 -1
  483. package/lib/ui-kit/CookiePopup/CookiePopup.js +6 -6
  484. package/lib/ui-kit/CookiePopup/CookiePopup.js.map +1 -1
  485. package/{dist/ui-kit/Dialog → lib/ui-kit/DialogManager}/CloseButton.d.ts +1 -1
  486. package/lib/ui-kit/{Dialog → DialogManager}/CloseButton.js +1 -1
  487. package/lib/ui-kit/DialogManager/CloseButton.js.map +1 -0
  488. package/lib/ui-kit/{Dialog → DialogManager}/Dialog.d.ts +0 -1
  489. package/lib/ui-kit/DialogManager/Dialog.js +15 -0
  490. package/lib/ui-kit/DialogManager/Dialog.js.map +1 -0
  491. package/lib/ui-kit/DialogManager/DialogAction.d.ts +12 -0
  492. package/lib/ui-kit/DialogManager/DialogAction.js.map +1 -0
  493. package/lib/ui-kit/DialogManager/DialogManager.d.ts +2 -0
  494. package/lib/ui-kit/DialogManager/DialogManager.js +59 -0
  495. package/lib/ui-kit/DialogManager/DialogManager.js.map +1 -0
  496. package/lib/ui-kit/DialogManager/useDialogManager.d.ts +10 -0
  497. package/lib/ui-kit/DialogManager/useDialogManager.js +7 -0
  498. package/lib/ui-kit/DialogManager/useDialogManager.js.map +1 -0
  499. package/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  500. package/lib/ui-kit/ListControlProps.d.ts +4 -0
  501. package/lib/ui-kit/ListControlProps.js +2 -0
  502. package/lib/ui-kit/ListControlProps.js.map +1 -0
  503. package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +2 -3
  504. package/lib/ui-kit/LocationDialog/LocationDialog.js +16 -25
  505. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  506. package/lib/ui-kit/LocationDialog/renderForeignOffices.d.ts +5 -0
  507. package/lib/ui-kit/LocationDialog/renderForeignOffices.js +12 -0
  508. package/lib/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -0
  509. package/lib/ui-kit/LocationDialog/renderRegion.d.ts +3 -0
  510. package/lib/ui-kit/LocationDialog/renderRegion.js +5 -0
  511. package/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -0
  512. package/lib/ui-kit/LocationDialog/renderRegionGroup.d.ts +3 -0
  513. package/lib/ui-kit/LocationDialog/renderRegionGroup.js +5 -0
  514. package/lib/ui-kit/LocationDialog/renderRegionGroup.js.map +1 -0
  515. package/lib/ui-kit/LocationDialog/useLocationDialog.d.ts +5 -0
  516. package/lib/ui-kit/LocationDialog/useLocationDialog.js +11 -0
  517. package/lib/ui-kit/LocationDialog/useLocationDialog.js.map +1 -0
  518. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -0
  519. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +2 -1
  520. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  521. package/lib/ui-kit/SearchBar/SearchBar.js +6 -9
  522. package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  523. package/lib/ui-kit/SearchDialog/SearchDialog.d.ts +1 -3
  524. package/lib/ui-kit/SearchDialog/SearchDialog.js +7 -8
  525. package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  526. package/lib/ui-kit/SearchDialog/useSearchDialog.d.ts +6 -0
  527. package/lib/ui-kit/SearchDialog/useSearchDialog.js +11 -0
  528. package/lib/ui-kit/SearchDialog/useSearchDialog.js.map +1 -0
  529. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
  530. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  531. package/lib/ui-kit/TabsControl/ScrollableTabsControl.d.ts +2 -0
  532. package/lib/ui-kit/TabsControl/ScrollableTabsControl.js +15 -0
  533. package/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -0
  534. package/lib/ui-kit/TabsControl/TabItem.d.ts +11 -0
  535. package/lib/ui-kit/TabsControl/TabItem.js +36 -0
  536. package/lib/ui-kit/TabsControl/TabItem.js.map +1 -0
  537. package/lib/ui-kit/TabsControl/TabsControl.d.ts +2 -0
  538. package/lib/ui-kit/TabsControl/TabsControl.fixture.d.ts +8 -0
  539. package/lib/ui-kit/TabsControl/TabsControl.js +6 -0
  540. package/lib/ui-kit/TabsControl/TabsControl.js.map +1 -0
  541. package/lib/ui-kit/TabsControl/TabsControlProps.d.ts +6 -0
  542. package/lib/ui-kit/TabsControl/TabsControlProps.js +2 -0
  543. package/lib/ui-kit/TabsControl/TabsControlProps.js.map +1 -0
  544. package/lib/ui-kit/TabsControl/renderTab.d.ts +3 -0
  545. package/lib/ui-kit/TabsControl/renderTab.js +4 -0
  546. package/lib/ui-kit/TabsControl/renderTab.js.map +1 -0
  547. package/lib/utils/BoolComparator.d.ts +11 -0
  548. package/lib/utils/BoolComparator.js +12 -0
  549. package/lib/utils/BoolComparator.js.map +1 -0
  550. package/mobile/bundle/EventBus/defaultEventBus.d.ts +4 -2
  551. package/mobile/bundle/EventBus/useLatestEvent.d.ts +2 -0
  552. package/mobile/bundle/bundle.umd.js +975 -590
  553. package/mobile/bundle/bundle.umd.min.js +1 -1
  554. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  555. package/mobile/bundle/components/Bonus/BonusContent.d.ts +2 -7
  556. package/mobile/bundle/components/BusinessBlock/BusinessBlockContent.d.ts +3 -2
  557. package/mobile/bundle/components/ButtonsBlock/ButtonsBlockContent.d.ts +2 -2
  558. package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +2 -2
  559. package/mobile/bundle/components/Calculator/CreditCalculatorForm.d.ts +1 -0
  560. package/mobile/bundle/components/Calculator/DepositCalculatorForm.d.ts +1 -1
  561. package/mobile/bundle/components/Calculator/RefinancingCalculatorForm.d.ts +1 -1
  562. package/mobile/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
  563. package/mobile/bundle/components/Calculator/renderRate.d.ts +9 -0
  564. package/mobile/bundle/components/CardTransfer/CardTransferContent.d.ts +2 -2
  565. package/mobile/bundle/components/CarouselCard/CarouselCardContent.d.ts +3 -2
  566. package/mobile/bundle/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +3 -2
  567. package/mobile/bundle/components/CarouselCatalogCard/CatalogCard.d.ts +2 -2
  568. package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +3 -2
  569. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -2
  570. package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +4 -9
  571. package/mobile/bundle/components/ContactsBlock/ContactsBlockContent.d.ts +2 -2
  572. package/mobile/bundle/components/ContentPage/computeAPIFallback.d.ts +2 -2
  573. package/mobile/bundle/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  574. package/mobile/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +2 -2
  575. package/mobile/bundle/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +2 -2
  576. package/mobile/bundle/components/Footer/FooterProps.d.ts +0 -2
  577. package/mobile/bundle/components/Footer/SocialMedia.d.ts +2 -2
  578. package/mobile/bundle/components/Header/HeaderProps.d.ts +0 -4
  579. package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -1
  580. package/mobile/bundle/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +2 -2
  581. package/mobile/bundle/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +2 -2
  582. package/mobile/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +2 -2
  583. package/mobile/bundle/components/MortgageFiltration/HotFilterRecord.d.ts +11 -0
  584. package/mobile/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +12 -0
  585. package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -2
  586. package/mobile/bundle/components/ProductBlock/renderBackwardButton.d.ts +2 -2
  587. package/mobile/bundle/components/PromoTile/PromoTileContent.d.ts +2 -2
  588. package/mobile/bundle/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +2 -2
  589. package/mobile/bundle/components/RollupItem/rollupIconVersion.d.ts +1 -1
  590. package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +6 -9
  591. package/mobile/bundle/components/Tabs/renderTabs.d.ts +12 -0
  592. package/mobile/bundle/components/TariffsTable/EmbeddableCellData.d.ts +3 -2
  593. package/mobile/bundle/components/TariffsTable/TariffsTableContent.d.ts +2 -2
  594. package/mobile/bundle/hooks/useForm.d.ts +1 -0
  595. package/mobile/bundle/hooks/useList.d.ts +10 -0
  596. package/mobile/bundle/hooks/useLocation.d.ts +1 -1
  597. package/mobile/bundle/hooks/useSWRResource.d.ts +1 -1
  598. package/mobile/bundle/icons/IconName.d.ts +3 -3
  599. package/mobile/bundle/services/sitemap/useSitemap.d.ts +3 -0
  600. package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
  601. package/mobile/bundle/ui-kit/Button/Button.d.ts +2 -2
  602. package/mobile/bundle/ui-kit/Button/ButtonContent.d.ts +19 -0
  603. package/mobile/bundle/ui-kit/Button/ButtonInner.d.ts +2 -7
  604. package/mobile/bundle/ui-kit/Button/ButtonProps.d.ts +4 -44
  605. package/mobile/bundle/ui-kit/Button/ButtonsSectionContent.d.ts +7 -0
  606. package/mobile/bundle/ui-kit/Button/renderButtonsSection.d.ts +2 -2
  607. package/mobile/bundle/ui-kit/{Dialog → DialogManager}/CloseButton.d.ts +1 -1
  608. package/mobile/bundle/ui-kit/{Dialog → DialogManager}/Dialog.d.ts +0 -1
  609. package/mobile/bundle/ui-kit/DialogManager/DialogAction.d.ts +12 -0
  610. package/mobile/bundle/ui-kit/DialogManager/DialogManager.d.ts +2 -0
  611. package/mobile/bundle/ui-kit/DialogManager/useDialogManager.d.ts +10 -0
  612. package/mobile/bundle/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  613. package/mobile/bundle/ui-kit/ListControlProps.d.ts +4 -0
  614. package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +2 -3
  615. package/mobile/bundle/ui-kit/LocationDialog/renderForeignOffices.d.ts +5 -0
  616. package/mobile/bundle/ui-kit/LocationDialog/renderRegion.d.ts +3 -0
  617. package/mobile/bundle/ui-kit/LocationDialog/renderRegionGroup.d.ts +3 -0
  618. package/mobile/bundle/ui-kit/LocationDialog/useLocationDialog.d.ts +5 -0
  619. package/mobile/bundle/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -0
  620. package/mobile/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +1 -3
  621. package/mobile/bundle/ui-kit/SearchDialog/useSearchDialog.d.ts +6 -0
  622. package/mobile/bundle/ui-kit/TabsControl/ScrollableTabsControl.d.ts +2 -0
  623. package/mobile/bundle/ui-kit/TabsControl/TabItem.d.ts +11 -0
  624. package/mobile/bundle/ui-kit/TabsControl/TabsControl.d.ts +2 -0
  625. package/mobile/bundle/ui-kit/TabsControl/TabsControlProps.d.ts +6 -0
  626. package/mobile/bundle/ui-kit/TabsControl/renderTab.d.ts +4 -0
  627. package/mobile/bundle/utils/BoolComparator.d.ts +11 -0
  628. package/mobile/dist/EventBus/defaultEventBus.d.ts +4 -2
  629. package/mobile/dist/EventBus/defaultEventBus.js.map +1 -1
  630. package/mobile/dist/EventBus/useLatestEvent.d.ts +2 -0
  631. package/mobile/dist/EventBus/useLatestEvent.js +11 -0
  632. package/mobile/dist/EventBus/useLatestEvent.js.map +1 -0
  633. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  634. package/mobile/dist/components/Blocks.js +2 -0
  635. package/mobile/dist/components/Blocks.js.map +1 -1
  636. package/mobile/dist/components/Bonus/BonusContent.d.ts +2 -7
  637. package/mobile/dist/components/BusinessBlock/BusinessBlockContent.d.ts +3 -2
  638. package/mobile/dist/components/ButtonsBlock/ButtonsBlockContent.d.ts +2 -2
  639. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +19 -13
  640. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  641. package/mobile/dist/components/Calculator/Calculator.js +27 -49
  642. package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
  643. package/mobile/dist/components/Calculator/CalculatorContent.d.ts +2 -2
  644. package/mobile/dist/components/Calculator/CalculatorValueBlock.js +2 -1
  645. package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
  646. package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +1 -0
  647. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +18 -11
  648. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  649. package/mobile/dist/components/Calculator/DepositCalculatorForm.d.ts +1 -1
  650. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +13 -11
  651. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  652. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.d.ts +1 -1
  653. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js +1 -0
  654. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  655. package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
  656. package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js +2 -1
  657. package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  658. package/mobile/dist/components/Calculator/renderDaysInput.js +1 -1
  659. package/mobile/dist/components/Calculator/renderDaysInput.js.map +1 -1
  660. package/mobile/dist/components/Calculator/renderMonthsInput.js +1 -1
  661. package/mobile/dist/components/Calculator/renderMonthsInput.js.map +1 -1
  662. package/mobile/dist/components/Calculator/renderPaymentType.js +1 -0
  663. package/mobile/dist/components/Calculator/renderPaymentType.js.map +1 -1
  664. package/mobile/dist/components/Calculator/renderRate.d.ts +9 -0
  665. package/mobile/dist/components/Calculator/renderRate.js +16 -0
  666. package/mobile/dist/components/Calculator/renderRate.js.map +1 -0
  667. package/mobile/dist/components/CardTransfer/CardTransferContent.d.ts +2 -2
  668. package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  669. package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  670. package/mobile/dist/components/CarouselCard/CarouselCardContent.d.ts +3 -2
  671. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -2
  672. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  673. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +3 -2
  674. package/mobile/dist/components/CarouselCatalogCard/CatalogCard.d.ts +2 -2
  675. package/mobile/dist/components/CarouselCatalogCard/CatalogCard.js.map +1 -1
  676. package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +3 -2
  677. package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +6 -7
  678. package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  679. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -2
  680. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +4 -9
  681. package/mobile/dist/components/ContactsBlock/ContactsBlockContent.d.ts +2 -2
  682. package/mobile/dist/components/ContentPage/ContentPage.js +2 -23
  683. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  684. package/mobile/dist/components/ContentPage/computeAPIFallback.d.ts +2 -2
  685. package/mobile/dist/components/ContentPage/computeAPIFallback.js +10 -27
  686. package/mobile/dist/components/ContentPage/computeAPIFallback.js.map +1 -1
  687. package/mobile/dist/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  688. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +2 -2
  689. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  690. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +2 -2
  691. package/mobile/dist/components/Footer/Footer.js +7 -4
  692. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  693. package/mobile/dist/components/Footer/FooterProps.d.ts +0 -2
  694. package/mobile/dist/components/Footer/SocialMedia.d.ts +2 -2
  695. package/mobile/dist/components/Header/Header.js +4 -3
  696. package/mobile/dist/components/Header/Header.js.map +1 -1
  697. package/mobile/dist/components/Header/HeaderProps.d.ts +0 -4
  698. package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -1
  699. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +10 -9
  700. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  701. package/mobile/dist/components/Header/HeaderSubMenu.js +1 -1
  702. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  703. package/mobile/dist/components/Header/HeaderTop.js +9 -6
  704. package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
  705. package/mobile/dist/components/Header/findActiveSubItem.js.map +1 -0
  706. package/mobile/dist/components/Header/isHrefActive.js.map +1 -0
  707. package/mobile/dist/components/Header/isTopItemActive.js.map +1 -0
  708. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +2 -2
  709. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +2 -2
  710. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  711. package/mobile/dist/components/MobileAppTile/MobileAppTile.js +1 -1
  712. package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  713. package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +2 -2
  714. package/mobile/dist/components/MortgageFiltration/HotFilterRecord.d.ts +11 -0
  715. package/mobile/dist/components/MortgageFiltration/HotFilterRecord.js +5 -0
  716. package/mobile/dist/components/MortgageFiltration/HotFilterRecord.js.map +1 -0
  717. package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js +24 -4
  718. package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  719. package/mobile/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +12 -0
  720. package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -2
  721. package/mobile/dist/components/ProductBlock/renderBackwardButton.d.ts +2 -2
  722. package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
  723. package/mobile/dist/components/PromoTile/PromoTileContent.d.ts +2 -2
  724. package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +2 -2
  725. package/mobile/dist/components/RollupItem/RollupItem.js +1 -1
  726. package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
  727. package/mobile/dist/components/RollupItem/renderRoundedIcon.js +1 -1
  728. package/mobile/dist/components/RollupItem/renderRoundedIcon.js.map +1 -1
  729. package/mobile/dist/components/RollupItem/rollupIconVersion.d.ts +1 -1
  730. package/mobile/dist/components/RollupItem/rollupIconVersion.js +1 -1
  731. package/mobile/dist/components/RollupItem/rollupIconVersion.js.map +1 -1
  732. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +6 -9
  733. package/mobile/dist/components/Tabs/Tabs.js +19 -24
  734. package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
  735. package/mobile/dist/components/Tabs/renderTabs.d.ts +12 -0
  736. package/mobile/dist/components/Tabs/renderTabs.js +19 -0
  737. package/mobile/dist/components/Tabs/renderTabs.js.map +1 -0
  738. package/mobile/dist/components/TariffsTable/EmbeddableCellData.d.ts +3 -2
  739. package/mobile/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  740. package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +2 -2
  741. package/mobile/dist/hooks/useForm.d.ts +1 -0
  742. package/mobile/dist/hooks/useForm.js +5 -0
  743. package/mobile/dist/hooks/useForm.js.map +1 -1
  744. package/mobile/dist/hooks/useLink.js +3 -3
  745. package/mobile/dist/hooks/useLink.js.map +1 -1
  746. package/mobile/dist/hooks/useList.d.ts +10 -0
  747. package/mobile/dist/hooks/useList.js +13 -0
  748. package/mobile/dist/hooks/useList.js.map +1 -0
  749. package/mobile/dist/hooks/useLocation.d.ts +1 -1
  750. package/mobile/dist/hooks/useLocation.js +27 -16
  751. package/mobile/dist/hooks/useLocation.js.map +1 -1
  752. package/mobile/dist/hooks/useSWRResource.d.ts +1 -1
  753. package/mobile/dist/hooks/useSWRResource.js +2 -4
  754. package/mobile/dist/hooks/useSWRResource.js.map +1 -1
  755. package/mobile/dist/icons/IconName.d.ts +3 -3
  756. package/mobile/dist/icons/IconName.js +3 -3
  757. package/mobile/dist/icons/IconName.js.map +1 -1
  758. package/mobile/dist/services/sitemap/useSitemap.d.ts +3 -0
  759. package/mobile/dist/services/sitemap/useSitemap.js +7 -0
  760. package/mobile/dist/services/sitemap/useSitemap.js.map +1 -0
  761. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
  762. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  763. package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +2 -2
  764. package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
  765. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
  766. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +1 -1
  767. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  768. package/mobile/dist/ui-kit/BenefitsList/DefaultBenefitsList.js +5 -3
  769. package/mobile/dist/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
  770. package/mobile/dist/ui-kit/Button/Button.d.ts +2 -2
  771. package/mobile/dist/ui-kit/Button/Button.js.map +1 -1
  772. package/mobile/dist/ui-kit/Button/ButtonContent.d.ts +19 -0
  773. package/mobile/dist/{model/Button.js → ui-kit/Button/ButtonContent.js} +1 -1
  774. package/mobile/dist/ui-kit/Button/ButtonContent.js.map +1 -0
  775. package/mobile/dist/ui-kit/Button/ButtonInner.d.ts +2 -7
  776. package/mobile/dist/ui-kit/Button/ButtonInner.js.map +1 -1
  777. package/mobile/dist/ui-kit/Button/ButtonProps.d.ts +4 -44
  778. package/mobile/dist/ui-kit/Button/ButtonsSectionContent.d.ts +7 -0
  779. package/mobile/dist/ui-kit/Button/ButtonsSectionContent.js +2 -0
  780. package/mobile/dist/ui-kit/Button/ButtonsSectionContent.js.map +1 -0
  781. package/mobile/dist/ui-kit/Button/renderButtonsSection.d.ts +2 -2
  782. package/mobile/dist/ui-kit/Button/renderButtonsSection.js.map +1 -1
  783. package/mobile/dist/ui-kit/CookiePopup/CookiePopup.js +6 -6
  784. package/mobile/dist/ui-kit/CookiePopup/CookiePopup.js.map +1 -1
  785. package/mobile/dist/ui-kit/DialogManager/CloseButton.d.ts +7 -0
  786. package/{dist/ui-kit/Dialog → mobile/dist/ui-kit/DialogManager}/CloseButton.js +1 -1
  787. package/mobile/dist/ui-kit/DialogManager/CloseButton.js.map +1 -0
  788. package/mobile/dist/ui-kit/DialogManager/Dialog.d.ts +7 -0
  789. package/mobile/dist/ui-kit/DialogManager/Dialog.js +17 -0
  790. package/mobile/dist/ui-kit/DialogManager/Dialog.js.map +1 -0
  791. package/mobile/dist/ui-kit/DialogManager/DialogAction.d.ts +12 -0
  792. package/mobile/dist/ui-kit/DialogManager/DialogAction.js.map +1 -0
  793. package/mobile/dist/ui-kit/DialogManager/DialogManager.d.ts +2 -0
  794. package/mobile/dist/ui-kit/DialogManager/DialogManager.js +61 -0
  795. package/mobile/dist/ui-kit/DialogManager/DialogManager.js.map +1 -0
  796. package/mobile/dist/ui-kit/DialogManager/useDialogManager.d.ts +10 -0
  797. package/mobile/dist/ui-kit/DialogManager/useDialogManager.js +10 -0
  798. package/mobile/dist/ui-kit/DialogManager/useDialogManager.js.map +1 -0
  799. package/mobile/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  800. package/mobile/dist/ui-kit/ListControlProps.d.ts +4 -0
  801. package/mobile/dist/ui-kit/ListControlProps.js +2 -0
  802. package/mobile/dist/ui-kit/ListControlProps.js.map +1 -0
  803. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +2 -3
  804. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +17 -26
  805. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  806. package/mobile/dist/ui-kit/LocationDialog/renderForeignOffices.d.ts +5 -0
  807. package/mobile/dist/ui-kit/LocationDialog/renderForeignOffices.js +15 -0
  808. package/mobile/dist/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -0
  809. package/mobile/dist/ui-kit/LocationDialog/renderRegion.d.ts +3 -0
  810. package/mobile/dist/ui-kit/LocationDialog/renderRegion.js +8 -0
  811. package/mobile/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -0
  812. package/mobile/dist/ui-kit/LocationDialog/renderRegionGroup.d.ts +3 -0
  813. package/mobile/dist/ui-kit/LocationDialog/renderRegionGroup.js +8 -0
  814. package/mobile/dist/ui-kit/LocationDialog/renderRegionGroup.js.map +1 -0
  815. package/mobile/dist/ui-kit/LocationDialog/useLocationDialog.d.ts +5 -0
  816. package/mobile/dist/ui-kit/LocationDialog/useLocationDialog.js +14 -0
  817. package/mobile/dist/ui-kit/LocationDialog/useLocationDialog.js.map +1 -0
  818. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -0
  819. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +2 -1
  820. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  821. package/mobile/dist/ui-kit/SearchBar/SearchBar.js +6 -9
  822. package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  823. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.d.ts +1 -3
  824. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +8 -9
  825. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  826. package/mobile/dist/ui-kit/SearchDialog/useSearchDialog.d.ts +6 -0
  827. package/mobile/dist/ui-kit/SearchDialog/useSearchDialog.js +14 -0
  828. package/mobile/dist/ui-kit/SearchDialog/useSearchDialog.js.map +1 -0
  829. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
  830. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  831. package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.d.ts +2 -0
  832. package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js +17 -0
  833. package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -0
  834. package/mobile/dist/ui-kit/TabsControl/TabItem.d.ts +11 -0
  835. package/mobile/dist/ui-kit/TabsControl/TabItem.js +38 -0
  836. package/mobile/dist/ui-kit/TabsControl/TabItem.js.map +1 -0
  837. package/mobile/dist/ui-kit/TabsControl/TabsControl.d.ts +2 -0
  838. package/mobile/dist/ui-kit/TabsControl/TabsControl.js +8 -0
  839. package/mobile/dist/ui-kit/TabsControl/TabsControl.js.map +1 -0
  840. package/mobile/dist/ui-kit/TabsControl/TabsControlProps.d.ts +6 -0
  841. package/mobile/dist/ui-kit/TabsControl/TabsControlProps.js +2 -0
  842. package/mobile/dist/ui-kit/TabsControl/TabsControlProps.js.map +1 -0
  843. package/mobile/dist/ui-kit/TabsControl/renderTab.d.ts +4 -0
  844. package/mobile/dist/ui-kit/TabsControl/renderTab.js +7 -0
  845. package/mobile/dist/ui-kit/TabsControl/renderTab.js.map +1 -0
  846. package/mobile/dist/utils/BoolComparator.d.ts +11 -0
  847. package/mobile/dist/utils/BoolComparator.js +19 -0
  848. package/mobile/dist/utils/BoolComparator.js.map +1 -0
  849. package/mobile/lib/EventBus/defaultEventBus.d.ts +4 -2
  850. package/mobile/lib/EventBus/defaultEventBus.js.map +1 -1
  851. package/mobile/lib/EventBus/useLatestEvent.d.ts +2 -0
  852. package/mobile/lib/EventBus/useLatestEvent.js +8 -0
  853. package/mobile/lib/EventBus/useLatestEvent.js.map +1 -0
  854. package/mobile/lib/common.css +1 -1
  855. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  856. package/mobile/lib/components/Blocks.js +2 -0
  857. package/mobile/lib/components/Blocks.js.map +1 -1
  858. package/mobile/lib/components/Bonus/BonusContent.d.ts +2 -7
  859. package/mobile/lib/components/BusinessBlock/BusinessBlockContent.d.ts +3 -2
  860. package/mobile/lib/components/ButtonsBlock/ButtonsBlockContent.d.ts +2 -2
  861. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +19 -13
  862. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  863. package/mobile/lib/components/Calculator/Calculator.js +28 -50
  864. package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
  865. package/mobile/lib/components/Calculator/CalculatorContent.d.ts +2 -2
  866. package/mobile/lib/components/Calculator/CalculatorValueBlock.js +2 -1
  867. package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
  868. package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +1 -0
  869. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +18 -11
  870. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  871. package/mobile/lib/components/Calculator/DepositCalculatorForm.d.ts +1 -1
  872. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +13 -11
  873. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  874. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.d.ts +1 -1
  875. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js +1 -0
  876. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  877. package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
  878. package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js +2 -1
  879. package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  880. package/mobile/lib/components/Calculator/renderDaysInput.js +1 -1
  881. package/mobile/lib/components/Calculator/renderDaysInput.js.map +1 -1
  882. package/mobile/lib/components/Calculator/renderMonthsInput.js +1 -1
  883. package/mobile/lib/components/Calculator/renderMonthsInput.js.map +1 -1
  884. package/mobile/lib/components/Calculator/renderPaymentType.js +1 -0
  885. package/mobile/lib/components/Calculator/renderPaymentType.js.map +1 -1
  886. package/mobile/lib/components/Calculator/renderRate.d.ts +9 -0
  887. package/mobile/lib/components/Calculator/renderRate.js +13 -0
  888. package/mobile/lib/components/Calculator/renderRate.js.map +1 -0
  889. package/mobile/lib/components/CardTransfer/CardTransferContent.d.ts +2 -2
  890. package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  891. package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  892. package/mobile/lib/components/CarouselCard/CarouselCardContent.d.ts +3 -2
  893. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -2
  894. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  895. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +3 -2
  896. package/mobile/lib/components/CarouselCatalogCard/CatalogCard.d.ts +2 -2
  897. package/mobile/lib/components/CarouselCatalogCard/CatalogCard.js.map +1 -1
  898. package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +3 -2
  899. package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +7 -8
  900. package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  901. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -2
  902. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +4 -9
  903. package/mobile/lib/components/ContactsBlock/ContactsBlockContent.d.ts +2 -2
  904. package/mobile/lib/components/ContentPage/ContentPage.js +2 -23
  905. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  906. package/mobile/lib/components/ContentPage/computeAPIFallback.d.ts +2 -2
  907. package/mobile/lib/components/ContentPage/computeAPIFallback.js +8 -25
  908. package/mobile/lib/components/ContentPage/computeAPIFallback.js.map +1 -1
  909. package/mobile/lib/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  910. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +2 -2
  911. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  912. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +2 -2
  913. package/mobile/lib/components/Footer/Footer.js +7 -4
  914. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  915. package/mobile/lib/components/Footer/FooterProps.d.ts +0 -2
  916. package/mobile/lib/components/Footer/SocialMedia.d.ts +2 -2
  917. package/mobile/lib/components/Header/Header.js +4 -3
  918. package/mobile/lib/components/Header/Header.js.map +1 -1
  919. package/mobile/lib/components/Header/HeaderProps.d.ts +0 -4
  920. package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -1
  921. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +10 -9
  922. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  923. package/mobile/lib/components/Header/HeaderSubMenu.js +1 -1
  924. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  925. package/mobile/lib/components/Header/HeaderTop.js +9 -6
  926. package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
  927. package/mobile/lib/components/Header/findActiveSubItem.js.map +1 -0
  928. package/mobile/lib/components/Header/isHrefActive.js.map +1 -0
  929. package/mobile/lib/components/Header/isTopItemActive.js.map +1 -0
  930. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +2 -2
  931. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +2 -2
  932. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  933. package/mobile/lib/components/MobileAppTile/MobileAppTile.js +1 -1
  934. package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  935. package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +2 -2
  936. package/mobile/lib/components/MortgageFiltration/HotFilterRecord.d.ts +11 -0
  937. package/mobile/lib/components/MortgageFiltration/HotFilterRecord.js +3 -0
  938. package/mobile/lib/components/MortgageFiltration/HotFilterRecord.js.map +1 -0
  939. package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js +24 -4
  940. package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  941. package/mobile/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +12 -0
  942. package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -2
  943. package/mobile/lib/components/ProductBlock/renderBackwardButton.d.ts +2 -2
  944. package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
  945. package/mobile/lib/components/PromoTile/PromoTileContent.d.ts +2 -2
  946. package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.d.ts +2 -2
  947. package/mobile/lib/components/RollupItem/RollupItem.js +1 -1
  948. package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
  949. package/mobile/lib/components/RollupItem/renderRoundedIcon.js +1 -1
  950. package/mobile/lib/components/RollupItem/renderRoundedIcon.js.map +1 -1
  951. package/mobile/lib/components/RollupItem/rollupIconVersion.d.ts +1 -1
  952. package/mobile/lib/components/RollupItem/rollupIconVersion.js +1 -1
  953. package/mobile/lib/components/RollupItem/rollupIconVersion.js.map +1 -1
  954. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +6 -9
  955. package/mobile/lib/components/Tabs/Tabs.js +20 -25
  956. package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
  957. package/mobile/lib/components/Tabs/renderTabs.d.ts +12 -0
  958. package/mobile/lib/components/Tabs/renderTabs.js +16 -0
  959. package/mobile/lib/components/Tabs/renderTabs.js.map +1 -0
  960. package/mobile/lib/components/TariffsTable/EmbeddableCellData.d.ts +3 -2
  961. package/mobile/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  962. package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +2 -2
  963. package/mobile/lib/hooks/useForm.d.ts +1 -0
  964. package/mobile/lib/hooks/useForm.js +5 -0
  965. package/mobile/lib/hooks/useForm.js.map +1 -1
  966. package/mobile/lib/hooks/useLink.js +3 -3
  967. package/mobile/lib/hooks/useLink.js.map +1 -1
  968. package/mobile/lib/hooks/useList.d.ts +10 -0
  969. package/mobile/lib/hooks/useList.js +10 -0
  970. package/mobile/lib/hooks/useList.js.map +1 -0
  971. package/mobile/lib/hooks/useLocation.d.ts +1 -1
  972. package/mobile/lib/hooks/useLocation.js +28 -17
  973. package/mobile/lib/hooks/useLocation.js.map +1 -1
  974. package/mobile/lib/hooks/useSWRResource.d.ts +1 -1
  975. package/mobile/lib/hooks/useSWRResource.js +2 -4
  976. package/mobile/lib/hooks/useSWRResource.js.map +1 -1
  977. package/mobile/lib/icons/IconName.d.ts +3 -3
  978. package/mobile/lib/icons/IconName.js +3 -3
  979. package/mobile/lib/icons/IconName.js.map +1 -1
  980. package/mobile/lib/services/sitemap/useSitemap.d.ts +3 -0
  981. package/mobile/lib/services/sitemap/useSitemap.js +4 -0
  982. package/mobile/lib/services/sitemap/useSitemap.js.map +1 -0
  983. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
  984. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  985. package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +2 -2
  986. package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
  987. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
  988. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +1 -1
  989. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  990. package/mobile/lib/ui-kit/BenefitsList/DefaultBenefitsList.js +5 -3
  991. package/mobile/lib/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
  992. package/mobile/lib/ui-kit/Button/Button.d.ts +2 -2
  993. package/mobile/lib/ui-kit/Button/Button.js.map +1 -1
  994. package/mobile/lib/ui-kit/Button/ButtonContent.d.ts +19 -0
  995. package/mobile/lib/ui-kit/Button/ButtonContent.js +2 -0
  996. package/mobile/lib/ui-kit/Button/ButtonContent.js.map +1 -0
  997. package/mobile/lib/ui-kit/Button/ButtonInner.d.ts +2 -7
  998. package/mobile/lib/ui-kit/Button/ButtonInner.js.map +1 -1
  999. package/mobile/lib/ui-kit/Button/ButtonProps.d.ts +4 -44
  1000. package/mobile/lib/ui-kit/Button/ButtonsSectionContent.d.ts +7 -0
  1001. package/mobile/lib/ui-kit/Button/ButtonsSectionContent.js +2 -0
  1002. package/mobile/lib/ui-kit/Button/ButtonsSectionContent.js.map +1 -0
  1003. package/mobile/lib/ui-kit/Button/renderButtonsSection.d.ts +2 -2
  1004. package/mobile/lib/ui-kit/Button/renderButtonsSection.js.map +1 -1
  1005. package/mobile/lib/ui-kit/CookiePopup/CookiePopup.js +6 -6
  1006. package/mobile/lib/ui-kit/CookiePopup/CookiePopup.js.map +1 -1
  1007. package/mobile/lib/ui-kit/DialogManager/CloseButton.d.ts +7 -0
  1008. package/mobile/lib/ui-kit/{Dialog → DialogManager}/CloseButton.js +1 -1
  1009. package/mobile/lib/ui-kit/DialogManager/CloseButton.js.map +1 -0
  1010. package/mobile/lib/ui-kit/DialogManager/Dialog.d.ts +7 -0
  1011. package/mobile/lib/ui-kit/DialogManager/Dialog.js +15 -0
  1012. package/mobile/lib/ui-kit/DialogManager/Dialog.js.map +1 -0
  1013. package/mobile/lib/ui-kit/DialogManager/DialogAction.d.ts +12 -0
  1014. package/mobile/lib/ui-kit/DialogManager/DialogAction.js.map +1 -0
  1015. package/mobile/lib/ui-kit/DialogManager/DialogManager.d.ts +2 -0
  1016. package/mobile/lib/ui-kit/DialogManager/DialogManager.js +59 -0
  1017. package/mobile/lib/ui-kit/DialogManager/DialogManager.js.map +1 -0
  1018. package/mobile/lib/ui-kit/DialogManager/useDialogManager.d.ts +10 -0
  1019. package/mobile/lib/ui-kit/DialogManager/useDialogManager.js +7 -0
  1020. package/mobile/lib/ui-kit/DialogManager/useDialogManager.js.map +1 -0
  1021. package/mobile/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  1022. package/mobile/lib/ui-kit/ListControlProps.d.ts +4 -0
  1023. package/mobile/lib/ui-kit/ListControlProps.js +2 -0
  1024. package/mobile/lib/ui-kit/ListControlProps.js.map +1 -0
  1025. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +2 -3
  1026. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +16 -25
  1027. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  1028. package/mobile/lib/ui-kit/LocationDialog/renderForeignOffices.d.ts +5 -0
  1029. package/mobile/lib/ui-kit/LocationDialog/renderForeignOffices.js +12 -0
  1030. package/mobile/lib/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -0
  1031. package/mobile/lib/ui-kit/LocationDialog/renderRegion.d.ts +3 -0
  1032. package/mobile/lib/ui-kit/LocationDialog/renderRegion.js +5 -0
  1033. package/mobile/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -0
  1034. package/mobile/lib/ui-kit/LocationDialog/renderRegionGroup.d.ts +3 -0
  1035. package/mobile/lib/ui-kit/LocationDialog/renderRegionGroup.js +5 -0
  1036. package/mobile/lib/ui-kit/LocationDialog/renderRegionGroup.js.map +1 -0
  1037. package/mobile/lib/ui-kit/LocationDialog/useLocationDialog.d.ts +5 -0
  1038. package/mobile/lib/ui-kit/LocationDialog/useLocationDialog.js +11 -0
  1039. package/mobile/lib/ui-kit/LocationDialog/useLocationDialog.js.map +1 -0
  1040. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -0
  1041. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +2 -1
  1042. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  1043. package/mobile/lib/ui-kit/SearchBar/SearchBar.js +6 -9
  1044. package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  1045. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.d.ts +1 -3
  1046. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +7 -8
  1047. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  1048. package/mobile/lib/ui-kit/SearchDialog/useSearchDialog.d.ts +6 -0
  1049. package/mobile/lib/ui-kit/SearchDialog/useSearchDialog.js +11 -0
  1050. package/mobile/lib/ui-kit/SearchDialog/useSearchDialog.js.map +1 -0
  1051. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
  1052. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  1053. package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.d.ts +2 -0
  1054. package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js +15 -0
  1055. package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -0
  1056. package/mobile/lib/ui-kit/TabsControl/TabItem.d.ts +11 -0
  1057. package/mobile/lib/ui-kit/TabsControl/TabItem.js +36 -0
  1058. package/mobile/lib/ui-kit/TabsControl/TabItem.js.map +1 -0
  1059. package/mobile/lib/ui-kit/TabsControl/TabsControl.d.ts +2 -0
  1060. package/mobile/lib/ui-kit/TabsControl/TabsControl.js +6 -0
  1061. package/mobile/lib/ui-kit/TabsControl/TabsControl.js.map +1 -0
  1062. package/mobile/lib/ui-kit/TabsControl/TabsControlProps.d.ts +6 -0
  1063. package/mobile/lib/ui-kit/TabsControl/TabsControlProps.js +2 -0
  1064. package/mobile/lib/ui-kit/TabsControl/TabsControlProps.js.map +1 -0
  1065. package/mobile/lib/ui-kit/TabsControl/renderTab.d.ts +4 -0
  1066. package/mobile/lib/ui-kit/TabsControl/renderTab.js +4 -0
  1067. package/mobile/lib/ui-kit/TabsControl/renderTab.js.map +1 -0
  1068. package/mobile/lib/utils/BoolComparator.d.ts +11 -0
  1069. package/mobile/lib/utils/BoolComparator.js +12 -0
  1070. package/mobile/lib/utils/BoolComparator.js.map +1 -0
  1071. package/mobile/src/EventBus/defaultEventBus.ts +4 -2
  1072. package/mobile/src/EventBus/useLatestEvent.ts +16 -0
  1073. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +2 -2
  1074. package/mobile/src/components/Blocks.ts +2 -0
  1075. package/mobile/src/components/Bonus/BonusContent.ts +5 -9
  1076. package/mobile/src/components/BusinessBlock/BusinessBlockContent.ts +3 -3
  1077. package/mobile/src/components/ButtonsBlock/ButtonsBlockContent.ts +2 -2
  1078. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +36 -41
  1079. package/mobile/src/components/Calculator/Calculator.tsx +69 -118
  1080. package/mobile/src/components/Calculator/CalculatorContent.ts +2 -2
  1081. package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +3 -1
  1082. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +29 -27
  1083. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +23 -16
  1084. package/mobile/src/components/Calculator/RefinancingCalculatorForm.tsx +5 -2
  1085. package/mobile/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +4 -0
  1086. package/mobile/src/components/Calculator/renderDaysInput.tsx +0 -1
  1087. package/mobile/src/components/Calculator/renderMonthsInput.tsx +0 -1
  1088. package/mobile/src/components/Calculator/renderPaymentType.tsx +1 -0
  1089. package/mobile/src/components/Calculator/renderRate.tsx +37 -0
  1090. package/mobile/src/components/CardTransfer/CardTransferContent.ts +2 -2
  1091. package/mobile/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +1 -1
  1092. package/mobile/src/components/CarouselCard/CarouselCardContent.ts +3 -3
  1093. package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +7 -6
  1094. package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCardContent.ts +3 -3
  1095. package/mobile/src/components/CarouselCatalogCard/CatalogCard.ts +2 -2
  1096. package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +2 -2
  1097. package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +15 -33
  1098. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -2
  1099. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCardContent.ts +4 -9
  1100. package/mobile/src/components/ContactsBlock/ContactsBlockContent.ts +2 -2
  1101. package/mobile/src/components/ContentPage/ContentPage.tsx +18 -54
  1102. package/mobile/src/components/ContentPage/computeAPIFallback.ts +10 -27
  1103. package/mobile/src/components/ErrorBlock/ErrorBlockContent.ts +2 -2
  1104. package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +2 -2
  1105. package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +2 -2
  1106. package/mobile/src/components/Footer/Footer.tsx +8 -8
  1107. package/mobile/src/components/Footer/FooterProps.ts +1 -4
  1108. package/mobile/src/components/Footer/SocialMedia.tsx +2 -2
  1109. package/mobile/src/components/Header/Header.tsx +4 -3
  1110. package/mobile/src/components/Header/HeaderProps.ts +1 -6
  1111. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +13 -11
  1112. package/mobile/src/components/Header/HeaderSubMenu.tsx +1 -1
  1113. package/mobile/src/components/Header/HeaderTop.tsx +27 -14
  1114. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +2 -2
  1115. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +2 -2
  1116. package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +2 -1
  1117. package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +2 -2
  1118. package/mobile/src/components/MortgageFiltration/HotFilterRecord.ts +14 -0
  1119. package/mobile/src/components/MortgageFiltration/MortgageFiltration.example.json +54 -4
  1120. package/mobile/src/components/MortgageFiltration/MortgageFiltration.tsx +51 -4
  1121. package/mobile/src/components/MortgageFiltration/MortgageFiltrationContent.ts +13 -0
  1122. package/mobile/src/components/ProductBlock/ProductBlockContent.ts +2 -2
  1123. package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +2 -2
  1124. package/mobile/src/components/PromoTile/PromoTileContent.ts +2 -2
  1125. package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.ts +2 -2
  1126. package/mobile/src/components/RollupItem/RollupItem.tsx +1 -1
  1127. package/mobile/src/components/RollupItem/renderRoundedIcon.tsx +1 -1
  1128. package/mobile/src/components/RollupItem/rollupIconVersion.tsx +1 -1
  1129. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +9 -9
  1130. package/mobile/src/components/Tabs/Tabs.tsx +42 -53
  1131. package/mobile/src/components/Tabs/renderTabs.tsx +37 -0
  1132. package/mobile/src/components/TariffsTable/EmbeddableCellData.tsx +3 -2
  1133. package/mobile/src/components/TariffsTable/TariffsTableContent.ts +2 -2
  1134. package/mobile/src/hooks/useForm.ts +7 -0
  1135. package/mobile/src/hooks/useLink.ts +3 -3
  1136. package/mobile/src/hooks/useList.ts +24 -0
  1137. package/mobile/src/hooks/useLocation.ts +34 -28
  1138. package/mobile/src/hooks/useSWRResource.ts +9 -4
  1139. package/mobile/src/icons/ArrowDownSolidIcon.svg +1 -1
  1140. package/mobile/src/icons/ArrowUpSolidIcon.svg +1 -1
  1141. package/mobile/src/icons/IconName.ts +4 -4
  1142. package/mobile/src/services/sitemap/useSitemap.ts +7 -0
  1143. package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +2 -2
  1144. package/mobile/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +4 -4
  1145. package/mobile/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +2 -2
  1146. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
  1147. package/mobile/src/ui-kit/BenefitsList/DefaultBenefitsList.tsx +8 -3
  1148. package/mobile/src/ui-kit/Button/Button.tsx +14 -16
  1149. package/mobile/src/ui-kit/Button/ButtonContent.ts +21 -0
  1150. package/mobile/src/ui-kit/Button/ButtonInner.tsx +5 -9
  1151. package/mobile/src/ui-kit/Button/ButtonProps.ts +4 -49
  1152. package/mobile/src/ui-kit/Button/ButtonsSectionContent.ts +8 -0
  1153. package/mobile/src/ui-kit/Button/renderButtonsSection.tsx +3 -3
  1154. package/mobile/src/ui-kit/CookiePopup/CookiePopup.tsx +12 -17
  1155. package/mobile/src/ui-kit/{Dialog → DialogManager}/CloseButton.tsx +3 -3
  1156. package/mobile/src/ui-kit/DialogManager/Dialog.tsx +31 -0
  1157. package/mobile/src/ui-kit/DialogManager/DialogAction.ts +15 -0
  1158. package/mobile/src/ui-kit/DialogManager/DialogManager.tsx +85 -0
  1159. package/mobile/src/ui-kit/DialogManager/useDialogManager.ts +14 -0
  1160. package/mobile/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
  1161. package/mobile/src/ui-kit/ListControlProps.ts +5 -0
  1162. package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +57 -138
  1163. package/mobile/src/ui-kit/LocationDialog/renderForeignOffices.tsx +37 -0
  1164. package/mobile/src/ui-kit/LocationDialog/renderRegion.tsx +15 -0
  1165. package/mobile/src/ui-kit/LocationDialog/renderRegionGroup.tsx +15 -0
  1166. package/mobile/src/ui-kit/LocationDialog/useLocationDialog.tsx +11 -0
  1167. package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +10 -2
  1168. package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +14 -15
  1169. package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +8 -10
  1170. package/mobile/src/ui-kit/SearchDialog/useSearchDialog.tsx +12 -0
  1171. package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +1 -1
  1172. package/mobile/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +41 -0
  1173. package/mobile/src/ui-kit/TabsControl/TabItem.tsx +81 -0
  1174. package/mobile/src/ui-kit/TabsControl/TabsControl.tsx +12 -0
  1175. package/mobile/src/ui-kit/TabsControl/TabsControlProps.ts +7 -0
  1176. package/mobile/src/ui-kit/TabsControl/renderTab.tsx +15 -0
  1177. package/mobile/src/utils/BoolComparator.ts +47 -0
  1178. package/package.json +1 -1
  1179. package/src/EventBus/defaultEventBus.ts +4 -2
  1180. package/src/EventBus/useLatestEvent.ts +16 -0
  1181. package/src/components/ApplicationForm/ApplicationFormContent.ts +2 -2
  1182. package/src/components/Blocks.mobile.ts +2 -0
  1183. package/src/components/Bonus/BonusContent.ts +5 -9
  1184. package/src/components/BusinessBlock/BusinessBlock.fixture.tsx +2 -3
  1185. package/src/components/BusinessBlock/BusinessBlockContent.ts +3 -3
  1186. package/src/components/ButtonsBlock/ButtonsBlock.fixture.mobile.tsx +2 -2
  1187. package/src/components/ButtonsBlock/ButtonsBlock.fixture.tsx +2 -2
  1188. package/src/components/ButtonsBlock/ButtonsBlockContent.ts +2 -2
  1189. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +36 -41
  1190. package/src/components/Calculator/Calculator.fixture.mobile.tsx +114 -0
  1191. package/src/components/Calculator/Calculator.fixture.tsx +2 -2
  1192. package/src/components/Calculator/Calculator.mobile.tsx +85 -0
  1193. package/src/components/Calculator/CalculatorContent.ts +2 -2
  1194. package/src/components/Calculator/CalculatorValueBlock.tsx +3 -1
  1195. package/src/components/Calculator/CreditCalculatorForm.tsx +29 -27
  1196. package/src/components/Calculator/DepositCalculatorForm.tsx +23 -16
  1197. package/src/components/Calculator/RefinancingCalculatorForm.tsx +5 -2
  1198. package/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +4 -0
  1199. package/src/components/Calculator/renderDaysInput.tsx +0 -1
  1200. package/src/components/Calculator/renderMonthsInput.tsx +0 -1
  1201. package/src/components/Calculator/renderPaymentType.tsx +1 -0
  1202. package/src/components/Calculator/renderRate.tsx +37 -0
  1203. package/src/components/CardTransfer/CardTransferContent.ts +2 -2
  1204. package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.mobile.tsx +1 -1
  1205. package/src/components/CarouselCard/CarouselCardContent.ts +3 -3
  1206. package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +7 -6
  1207. package/src/components/CarouselCatalogCard/CarouselCatalogCardContent.ts +3 -3
  1208. package/src/components/CarouselCatalogCard/CatalogCard.ts +2 -2
  1209. package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +3 -3
  1210. package/src/components/CarouselProductCard/CarouselProductCardContent.ts +2 -2
  1211. package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +15 -33
  1212. package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -2
  1213. package/src/components/CarouselTariffsCard/CarouselTariffsCard.fixture.mobile.tsx +3 -2
  1214. package/src/components/CarouselTariffsCard/CarouselTariffsCard.fixture.tsx +4 -4
  1215. package/src/components/CarouselTariffsCard/CarouselTariffsCardContent.ts +4 -9
  1216. package/src/components/ContactsBlock/ContactsBlockContent.ts +2 -2
  1217. package/src/components/ContentPage/ContentPage.tsx +18 -54
  1218. package/src/components/ContentPage/computeAPIFallback.ts +10 -27
  1219. package/src/components/ErrorBlock/ErrorBlockContent.ts +2 -2
  1220. package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +2 -2
  1221. package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +2 -2
  1222. package/src/components/Footer/Footer.fixture.mobile.tsx +3 -3
  1223. package/src/components/Footer/Footer.fixture.tsx +3 -5
  1224. package/src/components/Footer/Footer.mobile.tsx +8 -8
  1225. package/src/components/Footer/Footer.tsx +5 -3
  1226. package/src/components/Footer/FooterProps.ts +1 -4
  1227. package/src/components/Footer/SocialMedia.tsx +2 -2
  1228. package/src/components/Header/Header.fixture.mobile.tsx +14 -5
  1229. package/src/components/Header/Header.fixture.tsx +13 -4
  1230. package/src/components/Header/Header.mobile.tsx +4 -3
  1231. package/src/components/Header/Header.tsx +7 -11
  1232. package/src/components/Header/HeaderProps.ts +1 -6
  1233. package/src/components/Header/HeaderSecondaryMenu.tsx +13 -11
  1234. package/src/components/Header/HeaderSubMenu.tsx +1 -1
  1235. package/src/components/Header/HeaderTop.tsx +27 -14
  1236. package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +2 -2
  1237. package/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +2 -2
  1238. package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +2 -2
  1239. package/src/components/MobileAppTile/MobileAppTile.fixture.mobile.tsx +8 -19
  1240. package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +10 -12
  1241. package/src/components/MobileAppTile/MobileAppTile.tsx +2 -1
  1242. package/src/components/MobileAppTile/MobileAppTileContent.ts +2 -2
  1243. package/src/components/MortgageFiltration/HotFilterRecord.ts +14 -0
  1244. package/src/components/MortgageFiltration/MortgageFiltration.example.json +54 -4
  1245. package/src/components/MortgageFiltration/MortgageFiltration.fixture.tsx +51 -14
  1246. package/src/components/MortgageFiltration/MortgageFiltration.tsx +51 -4
  1247. package/src/components/MortgageFiltration/MortgageFiltrationContent.ts +13 -0
  1248. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +2 -2
  1249. package/src/components/ProductBlock/ProductBlock.fixture.tsx +4 -4
  1250. package/src/components/ProductBlock/ProductBlockContent.ts +2 -2
  1251. package/src/components/ProductBlock/renderBackwardButton.tsx +2 -2
  1252. package/src/components/ProductGallery/ProductGallery.fixture.mobile.tsx +3 -3
  1253. package/src/components/ProductGallery/ProductGallery.fixture.tsx +3 -3
  1254. package/src/components/PromoTile/PromoTileContent.ts +2 -2
  1255. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.mobile.tsx +2 -2
  1256. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.tsx +2 -2
  1257. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfoContent.ts +2 -2
  1258. package/src/components/RollupItem/RollupItem.tsx +1 -1
  1259. package/src/components/RollupItem/renderRoundedIcon.mobile.tsx +1 -1
  1260. package/src/components/RollupItem/rollupIconVersion.mobile.tsx +1 -1
  1261. package/src/components/StepsBlock/StepsBlockContent.ts +9 -9
  1262. package/src/components/Tabs/Tabs.tsx +42 -53
  1263. package/src/components/Tabs/renderTabs.tsx +37 -0
  1264. package/src/components/TariffsTable/EmbeddableCellData.mobile.tsx +3 -2
  1265. package/src/components/TariffsTable/EmbeddableCellData.tsx +3 -2
  1266. package/src/components/TariffsTable/TariffsTableContent.ts +2 -2
  1267. package/src/hooks/useForm.ts +7 -0
  1268. package/src/hooks/useLink.ts +3 -3
  1269. package/src/hooks/useList.ts +24 -0
  1270. package/src/hooks/useLocation.ts +34 -28
  1271. package/src/hooks/useSWRResource.ts +9 -4
  1272. package/src/icons/ArrowDownSolidIcon.svg +1 -1
  1273. package/src/icons/ArrowUpSolidIcon.svg +1 -1
  1274. package/src/icons/IconName.ts +4 -4
  1275. package/src/services/sitemap/useSitemap.ts +7 -0
  1276. package/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +2 -2
  1277. package/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +4 -4
  1278. package/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +2 -2
  1279. package/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
  1280. package/src/ui-kit/BenefitsList/DefaultBenefitsList.tsx +8 -3
  1281. package/src/ui-kit/Button/Button.tsx +14 -16
  1282. package/src/ui-kit/Button/ButtonContent.ts +21 -0
  1283. package/src/ui-kit/Button/ButtonInner.tsx +5 -9
  1284. package/src/ui-kit/Button/ButtonProps.ts +4 -49
  1285. package/src/ui-kit/Button/ButtonsSectionContent.ts +8 -0
  1286. package/src/ui-kit/Button/renderButtonsSection.tsx +3 -3
  1287. package/src/ui-kit/CookiePopup/CookiePopup.tsx +12 -17
  1288. package/src/ui-kit/{Dialog → DialogManager}/CloseButton.tsx +3 -3
  1289. package/src/ui-kit/DialogManager/Dialog.tsx +31 -0
  1290. package/src/ui-kit/DialogManager/DialogAction.ts +15 -0
  1291. package/src/ui-kit/DialogManager/DialogManager.tsx +85 -0
  1292. package/src/ui-kit/DialogManager/useDialogManager.ts +14 -0
  1293. package/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
  1294. package/src/ui-kit/ListControlProps.ts +5 -0
  1295. package/src/ui-kit/LocationDialog/LocationDialog.fixture.tsx +1 -74
  1296. package/src/ui-kit/LocationDialog/LocationDialog.tsx +57 -138
  1297. package/src/ui-kit/LocationDialog/renderForeignOffices.tsx +37 -0
  1298. package/src/ui-kit/LocationDialog/renderRegion.tsx +15 -0
  1299. package/src/ui-kit/LocationDialog/renderRegionGroup.tsx +15 -0
  1300. package/src/ui-kit/LocationDialog/useLocationDialog.tsx +11 -0
  1301. package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +10 -2
  1302. package/src/ui-kit/SearchBar/SearchBar.tsx +14 -15
  1303. package/src/ui-kit/SearchDialog/SearchDialog.tsx +8 -10
  1304. package/src/ui-kit/SearchDialog/useSearchDialog.tsx +12 -0
  1305. package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +1 -1
  1306. package/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +41 -0
  1307. package/src/ui-kit/TabsControl/TabItem.tsx +81 -0
  1308. package/src/ui-kit/TabsControl/TabsControl.fixture.tsx +103 -0
  1309. package/src/ui-kit/TabsControl/TabsControl.tsx +12 -0
  1310. package/src/ui-kit/TabsControl/TabsControlProps.ts +7 -0
  1311. package/src/ui-kit/TabsControl/renderTab.tsx +15 -0
  1312. package/src/utils/BoolComparator.ts +47 -0
  1313. package/bundle/components/CarouselProgramsCard/programCardStyles.d.ts +0 -2
  1314. package/bundle/components/CarouselProgramsCard/programCardStyles.mobile.d.ts +0 -2
  1315. package/bundle/components/Tabs/CenteredTabs.d.ts +0 -7
  1316. package/bundle/components/Tabs/LinkTab.d.ts +0 -9
  1317. package/bundle/components/Tabs/ScrollableTabs.d.ts +0 -8
  1318. package/bundle/components/Tabs/renderGroupTab.d.ts +0 -4
  1319. package/bundle/components/Tabs/renderTab.d.ts +0 -11
  1320. package/bundle/components/Tabs/tabItemClasses.d.ts +0 -11
  1321. package/bundle/hooks/useCachedAsyncData.d.ts +0 -2
  1322. package/bundle/model/Button.d.ts +0 -15
  1323. package/bundle/ui-kit/BaseTile/getTileRightPadding.d.ts +0 -1
  1324. package/bundle/ui-kit/Dialog/DialogAction.d.ts +0 -12
  1325. package/bundle/ui-kit/Dialog/useDialog.d.ts +0 -4
  1326. package/bundle/ui-kit/Dialog/useDialogHandlers.d.ts +0 -6
  1327. package/bundle/ui-kit/Dialog/useDialogProps.d.ts +0 -7
  1328. package/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +0 -14
  1329. package/dist/components/CarouselProgramsCard/programCardStyles.d.ts +0 -2
  1330. package/dist/components/CarouselProgramsCard/programCardStyles.js +0 -5
  1331. package/dist/components/CarouselProgramsCard/programCardStyles.js.map +0 -1
  1332. package/dist/components/CarouselProgramsCard/programCardStyles.mobile.d.ts +0 -2
  1333. package/dist/components/CarouselProgramsCard/programCardStyles.mobile.js +0 -5
  1334. package/dist/components/CarouselProgramsCard/programCardStyles.mobile.js.map +0 -1
  1335. package/dist/components/Tabs/CenteredTabs.d.ts +0 -7
  1336. package/dist/components/Tabs/CenteredTabs.js +0 -7
  1337. package/dist/components/Tabs/CenteredTabs.js.map +0 -1
  1338. package/dist/components/Tabs/LinkTab.d.ts +0 -9
  1339. package/dist/components/Tabs/LinkTab.js +0 -19
  1340. package/dist/components/Tabs/LinkTab.js.map +0 -1
  1341. package/dist/components/Tabs/ScrollableTabs.d.ts +0 -8
  1342. package/dist/components/Tabs/ScrollableTabs.js +0 -17
  1343. package/dist/components/Tabs/ScrollableTabs.js.map +0 -1
  1344. package/dist/components/Tabs/renderGroupTab.d.ts +0 -4
  1345. package/dist/components/Tabs/renderGroupTab.js +0 -20
  1346. package/dist/components/Tabs/renderGroupTab.js.map +0 -1
  1347. package/dist/components/Tabs/renderTab.d.ts +0 -11
  1348. package/dist/components/Tabs/renderTab.js +0 -24
  1349. package/dist/components/Tabs/renderTab.js.map +0 -1
  1350. package/dist/components/Tabs/tabItemClasses.d.ts +0 -11
  1351. package/dist/components/Tabs/tabItemClasses.js +0 -48
  1352. package/dist/components/Tabs/tabItemClasses.js.map +0 -1
  1353. package/dist/hooks/useCachedAsyncData.d.ts +0 -2
  1354. package/dist/hooks/useCachedAsyncData.js +0 -25
  1355. package/dist/hooks/useCachedAsyncData.js.map +0 -1
  1356. package/dist/model/Button.d.ts +0 -15
  1357. package/dist/model/Button.js.map +0 -1
  1358. package/dist/services/sitemap/findActiveSubItem.js.map +0 -1
  1359. package/dist/services/sitemap/isHrefActive.js.map +0 -1
  1360. package/dist/services/sitemap/isTopItemActive.js.map +0 -1
  1361. package/dist/ui-kit/BaseTile/getTileRightPadding.d.ts +0 -1
  1362. package/dist/ui-kit/BaseTile/getTileRightPadding.js +0 -17
  1363. package/dist/ui-kit/BaseTile/getTileRightPadding.js.map +0 -1
  1364. package/dist/ui-kit/Dialog/CloseButton.js.map +0 -1
  1365. package/dist/ui-kit/Dialog/Dialog.js +0 -22
  1366. package/dist/ui-kit/Dialog/Dialog.js.map +0 -1
  1367. package/dist/ui-kit/Dialog/DialogAction.d.ts +0 -12
  1368. package/dist/ui-kit/Dialog/DialogAction.js.map +0 -1
  1369. package/dist/ui-kit/Dialog/useDialog.d.ts +0 -4
  1370. package/dist/ui-kit/Dialog/useDialog.js +0 -9
  1371. package/dist/ui-kit/Dialog/useDialog.js.map +0 -1
  1372. package/dist/ui-kit/Dialog/useDialogHandlers.d.ts +0 -6
  1373. package/dist/ui-kit/Dialog/useDialogHandlers.js +0 -21
  1374. package/dist/ui-kit/Dialog/useDialogHandlers.js.map +0 -1
  1375. package/dist/ui-kit/Dialog/useDialogProps.d.ts +0 -7
  1376. package/dist/ui-kit/Dialog/useDialogProps.js +0 -39
  1377. package/dist/ui-kit/Dialog/useDialogProps.js.map +0 -1
  1378. package/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +0 -14
  1379. package/dist/ui-kit/LocationDialog/LocationDialogProps.js.map +0 -1
  1380. package/lib/components/CarouselProgramsCard/programCardStyles.d.ts +0 -2
  1381. package/lib/components/CarouselProgramsCard/programCardStyles.js +0 -3
  1382. package/lib/components/CarouselProgramsCard/programCardStyles.js.map +0 -1
  1383. package/lib/components/CarouselProgramsCard/programCardStyles.mobile.d.ts +0 -2
  1384. package/lib/components/CarouselProgramsCard/programCardStyles.mobile.js +0 -3
  1385. package/lib/components/CarouselProgramsCard/programCardStyles.mobile.js.map +0 -1
  1386. package/lib/components/Tabs/CenteredTabs.d.ts +0 -7
  1387. package/lib/components/Tabs/CenteredTabs.js +0 -5
  1388. package/lib/components/Tabs/CenteredTabs.js.map +0 -1
  1389. package/lib/components/Tabs/LinkTab.d.ts +0 -9
  1390. package/lib/components/Tabs/LinkTab.js +0 -17
  1391. package/lib/components/Tabs/LinkTab.js.map +0 -1
  1392. package/lib/components/Tabs/ScrollableTabs.d.ts +0 -8
  1393. package/lib/components/Tabs/ScrollableTabs.js +0 -15
  1394. package/lib/components/Tabs/ScrollableTabs.js.map +0 -1
  1395. package/lib/components/Tabs/renderGroupTab.d.ts +0 -3
  1396. package/lib/components/Tabs/renderGroupTab.js +0 -17
  1397. package/lib/components/Tabs/renderGroupTab.js.map +0 -1
  1398. package/lib/components/Tabs/renderTab.d.ts +0 -10
  1399. package/lib/components/Tabs/renderTab.js +0 -21
  1400. package/lib/components/Tabs/renderTab.js.map +0 -1
  1401. package/lib/components/Tabs/tabItemClasses.d.ts +0 -11
  1402. package/lib/components/Tabs/tabItemClasses.js +0 -45
  1403. package/lib/components/Tabs/tabItemClasses.js.map +0 -1
  1404. package/lib/hooks/useCachedAsyncData.d.ts +0 -2
  1405. package/lib/hooks/useCachedAsyncData.js +0 -22
  1406. package/lib/hooks/useCachedAsyncData.js.map +0 -1
  1407. package/lib/model/Button.d.ts +0 -15
  1408. package/lib/model/Button.js +0 -2
  1409. package/lib/model/Button.js.map +0 -1
  1410. package/lib/services/sitemap/findActiveSubItem.js.map +0 -1
  1411. package/lib/services/sitemap/isHrefActive.js.map +0 -1
  1412. package/lib/services/sitemap/isTopItemActive.js.map +0 -1
  1413. package/lib/ui-kit/BaseTile/getTileRightPadding.d.ts +0 -1
  1414. package/lib/ui-kit/BaseTile/getTileRightPadding.js +0 -14
  1415. package/lib/ui-kit/BaseTile/getTileRightPadding.js.map +0 -1
  1416. package/lib/ui-kit/Dialog/CloseButton.js.map +0 -1
  1417. package/lib/ui-kit/Dialog/Dialog.js +0 -20
  1418. package/lib/ui-kit/Dialog/Dialog.js.map +0 -1
  1419. package/lib/ui-kit/Dialog/DialogAction.d.ts +0 -12
  1420. package/lib/ui-kit/Dialog/DialogAction.js.map +0 -1
  1421. package/lib/ui-kit/Dialog/useDialog.d.ts +0 -4
  1422. package/lib/ui-kit/Dialog/useDialog.js +0 -6
  1423. package/lib/ui-kit/Dialog/useDialog.js.map +0 -1
  1424. package/lib/ui-kit/Dialog/useDialogHandlers.d.ts +0 -6
  1425. package/lib/ui-kit/Dialog/useDialogHandlers.js +0 -18
  1426. package/lib/ui-kit/Dialog/useDialogHandlers.js.map +0 -1
  1427. package/lib/ui-kit/Dialog/useDialogProps.d.ts +0 -7
  1428. package/lib/ui-kit/Dialog/useDialogProps.js +0 -36
  1429. package/lib/ui-kit/Dialog/useDialogProps.js.map +0 -1
  1430. package/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +0 -14
  1431. package/lib/ui-kit/LocationDialog/LocationDialogProps.js +0 -2
  1432. package/lib/ui-kit/LocationDialog/LocationDialogProps.js.map +0 -1
  1433. package/mobile/bundle/components/CarouselProgramsCard/programCardStyles.d.ts +0 -2
  1434. package/mobile/bundle/components/Tabs/CenteredTabs.d.ts +0 -7
  1435. package/mobile/bundle/components/Tabs/LinkTab.d.ts +0 -9
  1436. package/mobile/bundle/components/Tabs/ScrollableTabs.d.ts +0 -8
  1437. package/mobile/bundle/components/Tabs/renderGroupTab.d.ts +0 -4
  1438. package/mobile/bundle/components/Tabs/renderTab.d.ts +0 -11
  1439. package/mobile/bundle/components/Tabs/tabItemClasses.d.ts +0 -11
  1440. package/mobile/bundle/hooks/useCachedAsyncData.d.ts +0 -2
  1441. package/mobile/bundle/model/Button.d.ts +0 -15
  1442. package/mobile/bundle/ui-kit/BaseTile/getTileRightPadding.d.ts +0 -1
  1443. package/mobile/bundle/ui-kit/Dialog/DialogAction.d.ts +0 -12
  1444. package/mobile/bundle/ui-kit/Dialog/useDialog.d.ts +0 -4
  1445. package/mobile/bundle/ui-kit/Dialog/useDialogHandlers.d.ts +0 -6
  1446. package/mobile/bundle/ui-kit/Dialog/useDialogProps.d.ts +0 -7
  1447. package/mobile/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +0 -14
  1448. package/mobile/dist/components/CarouselProgramsCard/programCardStyles.d.ts +0 -2
  1449. package/mobile/dist/components/CarouselProgramsCard/programCardStyles.js +0 -5
  1450. package/mobile/dist/components/CarouselProgramsCard/programCardStyles.js.map +0 -1
  1451. package/mobile/dist/components/Tabs/CenteredTabs.d.ts +0 -7
  1452. package/mobile/dist/components/Tabs/CenteredTabs.js +0 -7
  1453. package/mobile/dist/components/Tabs/CenteredTabs.js.map +0 -1
  1454. package/mobile/dist/components/Tabs/LinkTab.d.ts +0 -9
  1455. package/mobile/dist/components/Tabs/LinkTab.js +0 -19
  1456. package/mobile/dist/components/Tabs/LinkTab.js.map +0 -1
  1457. package/mobile/dist/components/Tabs/ScrollableTabs.d.ts +0 -8
  1458. package/mobile/dist/components/Tabs/ScrollableTabs.js +0 -17
  1459. package/mobile/dist/components/Tabs/ScrollableTabs.js.map +0 -1
  1460. package/mobile/dist/components/Tabs/renderGroupTab.d.ts +0 -4
  1461. package/mobile/dist/components/Tabs/renderGroupTab.js +0 -20
  1462. package/mobile/dist/components/Tabs/renderGroupTab.js.map +0 -1
  1463. package/mobile/dist/components/Tabs/renderTab.d.ts +0 -11
  1464. package/mobile/dist/components/Tabs/renderTab.js +0 -24
  1465. package/mobile/dist/components/Tabs/renderTab.js.map +0 -1
  1466. package/mobile/dist/components/Tabs/tabItemClasses.d.ts +0 -11
  1467. package/mobile/dist/components/Tabs/tabItemClasses.js +0 -48
  1468. package/mobile/dist/components/Tabs/tabItemClasses.js.map +0 -1
  1469. package/mobile/dist/hooks/useCachedAsyncData.d.ts +0 -2
  1470. package/mobile/dist/hooks/useCachedAsyncData.js +0 -25
  1471. package/mobile/dist/hooks/useCachedAsyncData.js.map +0 -1
  1472. package/mobile/dist/model/Button.d.ts +0 -15
  1473. package/mobile/dist/model/Button.js.map +0 -1
  1474. package/mobile/dist/services/sitemap/findActiveSubItem.js.map +0 -1
  1475. package/mobile/dist/services/sitemap/isHrefActive.js.map +0 -1
  1476. package/mobile/dist/services/sitemap/isTopItemActive.js.map +0 -1
  1477. package/mobile/dist/ui-kit/BaseTile/getTileRightPadding.d.ts +0 -1
  1478. package/mobile/dist/ui-kit/BaseTile/getTileRightPadding.js +0 -17
  1479. package/mobile/dist/ui-kit/BaseTile/getTileRightPadding.js.map +0 -1
  1480. package/mobile/dist/ui-kit/Dialog/CloseButton.d.ts +0 -7
  1481. package/mobile/dist/ui-kit/Dialog/CloseButton.js.map +0 -1
  1482. package/mobile/dist/ui-kit/Dialog/Dialog.d.ts +0 -8
  1483. package/mobile/dist/ui-kit/Dialog/Dialog.js +0 -22
  1484. package/mobile/dist/ui-kit/Dialog/Dialog.js.map +0 -1
  1485. package/mobile/dist/ui-kit/Dialog/DialogAction.d.ts +0 -12
  1486. package/mobile/dist/ui-kit/Dialog/DialogAction.js.map +0 -1
  1487. package/mobile/dist/ui-kit/Dialog/useDialog.d.ts +0 -4
  1488. package/mobile/dist/ui-kit/Dialog/useDialog.js +0 -9
  1489. package/mobile/dist/ui-kit/Dialog/useDialog.js.map +0 -1
  1490. package/mobile/dist/ui-kit/Dialog/useDialogHandlers.d.ts +0 -6
  1491. package/mobile/dist/ui-kit/Dialog/useDialogHandlers.js +0 -21
  1492. package/mobile/dist/ui-kit/Dialog/useDialogHandlers.js.map +0 -1
  1493. package/mobile/dist/ui-kit/Dialog/useDialogProps.d.ts +0 -7
  1494. package/mobile/dist/ui-kit/Dialog/useDialogProps.js +0 -39
  1495. package/mobile/dist/ui-kit/Dialog/useDialogProps.js.map +0 -1
  1496. package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +0 -14
  1497. package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.js +0 -2
  1498. package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.js.map +0 -1
  1499. package/mobile/lib/components/CarouselProgramsCard/programCardStyles.d.ts +0 -2
  1500. package/mobile/lib/components/CarouselProgramsCard/programCardStyles.js +0 -3
  1501. package/mobile/lib/components/CarouselProgramsCard/programCardStyles.js.map +0 -1
  1502. package/mobile/lib/components/Tabs/CenteredTabs.d.ts +0 -7
  1503. package/mobile/lib/components/Tabs/CenteredTabs.js +0 -5
  1504. package/mobile/lib/components/Tabs/CenteredTabs.js.map +0 -1
  1505. package/mobile/lib/components/Tabs/LinkTab.d.ts +0 -9
  1506. package/mobile/lib/components/Tabs/LinkTab.js +0 -17
  1507. package/mobile/lib/components/Tabs/LinkTab.js.map +0 -1
  1508. package/mobile/lib/components/Tabs/ScrollableTabs.d.ts +0 -8
  1509. package/mobile/lib/components/Tabs/ScrollableTabs.js +0 -15
  1510. package/mobile/lib/components/Tabs/ScrollableTabs.js.map +0 -1
  1511. package/mobile/lib/components/Tabs/renderGroupTab.d.ts +0 -4
  1512. package/mobile/lib/components/Tabs/renderGroupTab.js +0 -17
  1513. package/mobile/lib/components/Tabs/renderGroupTab.js.map +0 -1
  1514. package/mobile/lib/components/Tabs/renderTab.d.ts +0 -11
  1515. package/mobile/lib/components/Tabs/renderTab.js +0 -21
  1516. package/mobile/lib/components/Tabs/renderTab.js.map +0 -1
  1517. package/mobile/lib/components/Tabs/tabItemClasses.d.ts +0 -11
  1518. package/mobile/lib/components/Tabs/tabItemClasses.js +0 -45
  1519. package/mobile/lib/components/Tabs/tabItemClasses.js.map +0 -1
  1520. package/mobile/lib/hooks/useCachedAsyncData.d.ts +0 -2
  1521. package/mobile/lib/hooks/useCachedAsyncData.js +0 -22
  1522. package/mobile/lib/hooks/useCachedAsyncData.js.map +0 -1
  1523. package/mobile/lib/model/Button.d.ts +0 -15
  1524. package/mobile/lib/model/Button.js +0 -2
  1525. package/mobile/lib/model/Button.js.map +0 -1
  1526. package/mobile/lib/services/sitemap/findActiveSubItem.js.map +0 -1
  1527. package/mobile/lib/services/sitemap/isHrefActive.js.map +0 -1
  1528. package/mobile/lib/services/sitemap/isTopItemActive.js.map +0 -1
  1529. package/mobile/lib/ui-kit/BaseTile/getTileRightPadding.d.ts +0 -1
  1530. package/mobile/lib/ui-kit/BaseTile/getTileRightPadding.js +0 -14
  1531. package/mobile/lib/ui-kit/BaseTile/getTileRightPadding.js.map +0 -1
  1532. package/mobile/lib/ui-kit/Dialog/CloseButton.d.ts +0 -7
  1533. package/mobile/lib/ui-kit/Dialog/CloseButton.js.map +0 -1
  1534. package/mobile/lib/ui-kit/Dialog/Dialog.d.ts +0 -8
  1535. package/mobile/lib/ui-kit/Dialog/Dialog.js +0 -20
  1536. package/mobile/lib/ui-kit/Dialog/Dialog.js.map +0 -1
  1537. package/mobile/lib/ui-kit/Dialog/DialogAction.d.ts +0 -12
  1538. package/mobile/lib/ui-kit/Dialog/DialogAction.js.map +0 -1
  1539. package/mobile/lib/ui-kit/Dialog/useDialog.d.ts +0 -4
  1540. package/mobile/lib/ui-kit/Dialog/useDialog.js +0 -6
  1541. package/mobile/lib/ui-kit/Dialog/useDialog.js.map +0 -1
  1542. package/mobile/lib/ui-kit/Dialog/useDialogHandlers.d.ts +0 -6
  1543. package/mobile/lib/ui-kit/Dialog/useDialogHandlers.js +0 -18
  1544. package/mobile/lib/ui-kit/Dialog/useDialogHandlers.js.map +0 -1
  1545. package/mobile/lib/ui-kit/Dialog/useDialogProps.d.ts +0 -7
  1546. package/mobile/lib/ui-kit/Dialog/useDialogProps.js +0 -36
  1547. package/mobile/lib/ui-kit/Dialog/useDialogProps.js.map +0 -1
  1548. package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +0 -14
  1549. package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.js +0 -2
  1550. package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.js.map +0 -1
  1551. package/mobile/src/components/CarouselProgramsCard/programCardStyles.ts +0 -2
  1552. package/mobile/src/components/Header/sitemap.wcms-resource.json +0 -144
  1553. package/mobile/src/components/Tabs/CenteredTabs.tsx +0 -12
  1554. package/mobile/src/components/Tabs/LinkTab.tsx +0 -47
  1555. package/mobile/src/components/Tabs/ScrollableTabs.tsx +0 -46
  1556. package/mobile/src/components/Tabs/renderGroupTab.tsx +0 -53
  1557. package/mobile/src/components/Tabs/renderTab.tsx +0 -35
  1558. package/mobile/src/components/Tabs/tabItemClasses.ts +0 -56
  1559. package/mobile/src/hooks/useCachedAsyncData.ts +0 -37
  1560. package/mobile/src/model/Button.ts +0 -16
  1561. package/mobile/src/ui-kit/BaseTile/getTileRightPadding.ts +0 -12
  1562. package/mobile/src/ui-kit/Dialog/Dialog.tsx +0 -46
  1563. package/mobile/src/ui-kit/Dialog/DialogAction.ts +0 -14
  1564. package/mobile/src/ui-kit/Dialog/useDialog.ts +0 -6
  1565. package/mobile/src/ui-kit/Dialog/useDialogHandlers.ts +0 -28
  1566. package/mobile/src/ui-kit/Dialog/useDialogProps.ts +0 -48
  1567. package/mobile/src/ui-kit/LocationDialog/LocationDialogProps.ts +0 -21
  1568. package/src/components/CarouselProgramsCard/programCardStyles.mobile.ts +0 -2
  1569. package/src/components/CarouselProgramsCard/programCardStyles.ts +0 -2
  1570. package/src/components/Header/sitemap.wcms-resource.json +0 -144
  1571. package/src/components/Tabs/CenteredTabs.tsx +0 -12
  1572. package/src/components/Tabs/LinkTab.tsx +0 -47
  1573. package/src/components/Tabs/ScrollableTabs.tsx +0 -46
  1574. package/src/components/Tabs/renderGroupTab.tsx +0 -53
  1575. package/src/components/Tabs/renderTab.tsx +0 -35
  1576. package/src/components/Tabs/tabItemClasses.ts +0 -56
  1577. package/src/hooks/useCachedAsyncData.ts +0 -37
  1578. package/src/model/Button.ts +0 -16
  1579. package/src/ui-kit/BaseTile/getTileRightPadding.ts +0 -12
  1580. package/src/ui-kit/Dialog/Dialog.tsx +0 -46
  1581. package/src/ui-kit/Dialog/DialogAction.ts +0 -14
  1582. package/src/ui-kit/Dialog/useDialog.ts +0 -6
  1583. package/src/ui-kit/Dialog/useDialogHandlers.ts +0 -28
  1584. package/src/ui-kit/Dialog/useDialogProps.ts +0 -48
  1585. package/src/ui-kit/LocationDialog/LocationDialogProps.ts +0 -21
  1586. /package/bundle/{services/sitemap → components/Header}/findActiveSubItem.d.ts +0 -0
  1587. /package/bundle/{services/sitemap → components/Header}/isHrefActive.d.ts +0 -0
  1588. /package/bundle/{services/sitemap → components/Header}/isTopItemActive.d.ts +0 -0
  1589. /package/cosmos-static/icons/{ChevronLeft.svg → ChevronLeftIcon.svg} +0 -0
  1590. /package/dist/{services/sitemap → components/Header}/findActiveSubItem.d.ts +0 -0
  1591. /package/dist/{services/sitemap → components/Header}/findActiveSubItem.js +0 -0
  1592. /package/dist/{services/sitemap → components/Header}/isHrefActive.d.ts +0 -0
  1593. /package/dist/{services/sitemap → components/Header}/isHrefActive.js +0 -0
  1594. /package/dist/{services/sitemap → components/Header}/isTopItemActive.d.ts +0 -0
  1595. /package/dist/{services/sitemap → components/Header}/isTopItemActive.js +0 -0
  1596. /package/dist/ui-kit/{Dialog → DialogManager}/DialogAction.js +0 -0
  1597. /package/lib/{services/sitemap → components/Header}/findActiveSubItem.d.ts +0 -0
  1598. /package/lib/{services/sitemap → components/Header}/findActiveSubItem.js +0 -0
  1599. /package/lib/{services/sitemap → components/Header}/isHrefActive.d.ts +0 -0
  1600. /package/lib/{services/sitemap → components/Header}/isHrefActive.js +0 -0
  1601. /package/lib/{services/sitemap → components/Header}/isTopItemActive.d.ts +0 -0
  1602. /package/lib/{services/sitemap → components/Header}/isTopItemActive.js +0 -0
  1603. /package/lib/ui-kit/{Dialog → DialogManager}/DialogAction.js +0 -0
  1604. /package/mobile/bundle/{services/sitemap → components/Header}/findActiveSubItem.d.ts +0 -0
  1605. /package/mobile/bundle/{services/sitemap → components/Header}/isHrefActive.d.ts +0 -0
  1606. /package/mobile/bundle/{services/sitemap → components/Header}/isTopItemActive.d.ts +0 -0
  1607. /package/mobile/dist/{services/sitemap → components/Header}/findActiveSubItem.d.ts +0 -0
  1608. /package/mobile/dist/{services/sitemap → components/Header}/findActiveSubItem.js +0 -0
  1609. /package/mobile/dist/{services/sitemap → components/Header}/isHrefActive.d.ts +0 -0
  1610. /package/mobile/dist/{services/sitemap → components/Header}/isHrefActive.js +0 -0
  1611. /package/mobile/dist/{services/sitemap → components/Header}/isTopItemActive.d.ts +0 -0
  1612. /package/mobile/dist/{services/sitemap → components/Header}/isTopItemActive.js +0 -0
  1613. /package/mobile/dist/ui-kit/{Dialog → DialogManager}/DialogAction.js +0 -0
  1614. /package/mobile/lib/{services/sitemap → components/Header}/findActiveSubItem.d.ts +0 -0
  1615. /package/mobile/lib/{services/sitemap → components/Header}/findActiveSubItem.js +0 -0
  1616. /package/mobile/lib/{services/sitemap → components/Header}/isHrefActive.d.ts +0 -0
  1617. /package/mobile/lib/{services/sitemap → components/Header}/isHrefActive.js +0 -0
  1618. /package/mobile/lib/{services/sitemap → components/Header}/isTopItemActive.d.ts +0 -0
  1619. /package/mobile/lib/{services/sitemap → components/Header}/isTopItemActive.js +0 -0
  1620. /package/mobile/lib/ui-kit/{Dialog → DialogManager}/DialogAction.js +0 -0
  1621. /package/mobile/src/{services/sitemap → components/Header}/findActiveSubItem.ts +0 -0
  1622. /package/mobile/src/{services/sitemap → components/Header}/isHrefActive.ts +0 -0
  1623. /package/mobile/src/{services/sitemap → components/Header}/isTopItemActive.ts +0 -0
  1624. /package/mobile/src/icons/{ChevronLeft.svg → ChevronLeftIcon.svg} +0 -0
  1625. /package/src/{services/sitemap → components/Header}/findActiveSubItem.ts +0 -0
  1626. /package/src/{services/sitemap → components/Header}/isHrefActive.ts +0 -0
  1627. /package/src/{services/sitemap → components/Header}/isTopItemActive.ts +0 -0
  1628. /package/src/icons/{ChevronLeft.svg → ChevronLeftIcon.svg} +0 -0
@@ -394,6 +394,10 @@
394
394
  onChange: handlersMap.current[fieldName],
395
395
  };
396
396
  }, [formState, isDirtyForm, dirtyFieldsMap]);
397
+ const update = useCallback((_) => {
398
+ setFormState(_);
399
+ setDirtyFieldsMap(_);
400
+ }, []);
397
401
  const reset = useCallback(() => {
398
402
  setFormState(initialState);
399
403
  setDirtyForm(false);
@@ -409,6 +413,7 @@
409
413
  {
410
414
  isDirty: isDirtyForm || Object.values(dirtyFieldsMap).some(Boolean),
411
415
  field,
416
+ update,
412
417
  reset,
413
418
  onSubmit: handleSubmit,
414
419
  },
@@ -505,16 +510,17 @@
505
510
  return await response.json();
506
511
  }
507
512
 
508
- const REGIONS_URL$1 = '/api/v1/regions';
513
+ const REGIONS_URL = '/api/v1/regions';
509
514
  const EMPTY_VALUE$3 = [];
510
515
  function useGetRegions() {
511
- const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
516
+ const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
512
517
  return data || EMPTY_VALUE$3;
513
518
  }
514
519
 
515
- const useDialog = (id = '') => ({
516
- open: (message) => defaultEventBus.fire('dialog', { type: 'open', id, message }),
520
+ const useDialogManager = () => ({
521
+ open: (dialog, options = {}) => defaultEventBus.fire('dialog', { type: 'open', dialog, ...options }),
517
522
  close: () => defaultEventBus.fire('dialog', { type: 'close' }),
523
+ closeAll: () => defaultEventBus.fire('dialog', { type: 'close', all: true }),
518
524
  });
519
525
 
520
526
  const dirname = (path) => path?.split('/').slice(0, -1).join('/');
@@ -576,7 +582,7 @@
576
582
  function useLink(params = {}) {
577
583
  const { isRemote, basePath } = params;
578
584
  const router = useRouter();
579
- const { close } = useDialog();
585
+ const { closeAll } = useDialogManager();
580
586
  return (props) => ({
581
587
  ...props,
582
588
  href: isRemote && !basePath ? props.href : adjustHref(router)(props.href, basePath),
@@ -590,7 +596,7 @@
590
596
  // Default routing
591
597
  return;
592
598
  }
593
- close();
599
+ closeAll();
594
600
  // Client routing
595
601
  ev?.preventDefault();
596
602
  router.push(href);
@@ -869,7 +875,7 @@
869
875
 
870
876
  const renderBusinessCardDataOrganization = (field) => (jsxs("div", { className: "sm:flex sm:justify-between sm:gap-5", children: [jsxs("div", { className: "sm:w-1/2", children: [jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: "sm:w-1/2", children: [jsx(PhoneInputControl, { className: "shrink-0 w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })] })] }));
871
877
 
872
- const renderRegion$1 = ({ regions, field }) => (jsx("div", { className: "w-full mb-3 sm:mb-5", children: jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }));
878
+ const renderRegion = ({ regions, field }) => (jsx("div", { className: "w-full mb-3 sm:mb-5", children: jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }));
873
879
 
874
880
  const initialFormState$3 = {
875
881
  name: '',
@@ -900,7 +906,7 @@
900
906
  }, [onSubmit]);
901
907
  const [, { field, ...formProps }] = useForm(initialFormState$3, handleSubmit);
902
908
  const regions = useGetRegions();
903
- return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [renderRegion$1({ regions, field }), renderBusinessCardDataOrganization(field), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
909
+ return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [renderRegion({ regions, field }), renderBusinessCardDataOrganization(field), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
904
910
  });
905
911
 
906
912
  const BRANCHES_URL = '/api/v1/branches';
@@ -1055,10 +1061,8 @@
1055
1061
  });
1056
1062
 
1057
1063
  const EMPTY_VALUE$1 = {};
1058
- function useSWRResource(filename, fallback = {}) {
1059
- const { data } = useAsyncData(`/wcms-resources/${filename}.json`, fetchJSONUnsafe, {
1060
- fallback,
1061
- });
1064
+ function useSWRResource(filename, fallback = EMPTY_VALUE$1) {
1065
+ const { data } = useAsyncData(filename ? `/wcms-resources/${filename}.json` : null, fetchJSONUnsafe, { fallback });
1062
1066
  return data || EMPTY_VALUE$1;
1063
1067
  }
1064
1068
 
@@ -1321,7 +1325,7 @@
1321
1325
  return (jsx("div", { className: `inline-block snap-always box-border ${className}`, style: style, "aria-current": Boolean(idx === activeIndex), ref: ref, children: children }));
1322
1326
  });
1323
1327
 
1324
- const childStyleMap = ['min-w-full', 'min-w-1/2', 'min-w-1/3', 'min-w-1/4'];
1328
+ const childStyleMap = ['min-w-full', '@lg:min-w-[50%]', '@lg:min-w-[33.3%]', '@lg:min-w-[25%]'];
1325
1329
  const SwipeListContainer = JSX(({ className = '', containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, listType = 'horizontal-list', snapAlign = 'snap-center', minHeight, children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
1326
1330
  const observerOptions = {
1327
1331
  sensitivity: 1,
@@ -1386,6 +1390,7 @@
1386
1390
  const max = maxBy();
1387
1391
 
1388
1392
  const minBy = (discriminator = defaultDiscriminator) => maxBy((_) => -discriminator(_));
1393
+ const min = minBy();
1389
1394
 
1390
1395
  const getItemWidth = (container) => (itemCount) => container.scrollWidth / itemCount;
1391
1396
  const scrollBy = (container) => (itemCount, delta) => {
@@ -1488,6 +1493,753 @@
1488
1493
 
1489
1494
  const ButtonsBlock = JSX(({ buttons, className, ...rest }) => (jsx(BlockWrapper, { className: style('!bg-transparent', className), defaultPadding: "p-0", ...rest, children: renderButtonsSection(buttons) })));
1490
1495
 
1496
+ const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
1497
+ const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
1498
+ const onToggle = useCallback(() => {
1499
+ setIsUnfolded((_) => !_);
1500
+ }, []);
1501
+ const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
1502
+ const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
1503
+ return isFoldButtonOnTop ? (jsxs("div", { className: className, children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, children: [sectionNode, buttonNode] }));
1504
+ });
1505
+
1506
+ const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
1507
+ const containerRef = useRef(null);
1508
+ useEffect(() => {
1509
+ if (containerRef.current) {
1510
+ containerRef.current.style.maxHeight = isUnfolded
1511
+ ? `${containerRef.current.scrollHeight}px`
1512
+ : '';
1513
+ }
1514
+ }, [isUnfolded, children?.length]);
1515
+ return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
1516
+ });
1517
+
1518
+ const calculatorValueBlockStyle = 'flex justify-between md:mb-7 md:flex-col';
1519
+ const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => (jsxs("div", { className: style(calculatorValueBlockStyle, className), children: [title ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title })) : null, value ? (jsx("div", { children: jsxs(Text, { size: "text-h3", children: [prefix, " ", toLocalNumberFormat(2)(Math.round(value)), " ", postfix] }) })) : (jsx("div", { children: jsx(Text, { size: "text-h3", children: "-" }) }))] })));
1520
+
1521
+ const DEFAULT_MIN_SUM = 10000;
1522
+ const DEFAULT_MAX_SUM = 5000000;
1523
+ const CREDIT_DEFAULT_SUM = 200000;
1524
+ const REFINANCING_DEFAULT_SUM = 700000;
1525
+ const REFINANCING_DEFAULT_MAX_SUM = 3000000;
1526
+ const REFINANCING_OLD_MIN_SUM = 0;
1527
+ const REFINANCING_OLD_DEFAULT_SUM = 0;
1528
+ const REFINANCING_OLD_MAX_SUM = 2500000;
1529
+ const REFINANCING_EXTRA_MIN_SUM = 0;
1530
+ const REFINANCING_EXTRA_MAX_SUM = 500000;
1531
+ const DEPOSIT_DEFAULT_SUM = 20000;
1532
+ const DEFAULT_MIN_MONTHS = 13;
1533
+ const DEFAULT_REFINANCING_MIN_MONTHS = 13;
1534
+ const DEFAULT_REFINANCING_MONTHS = 48;
1535
+ const DEFAULT_MAX_MONTHS = 60;
1536
+ const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS - DEFAULT_MIN_MONTHS) / 2);
1537
+ const BUSINESS_DEFAULT_SUM = 100000;
1538
+ const BUSINESS_MIN_DAYS = 1;
1539
+ const BUSINESS_MAX_DAYS = 1095;
1540
+ const BUSINESS_RATE_MIN_DAYS = 30; // порог количества дней, при которых ставка не доступна
1541
+ const BUSINESS_OPERATING_MIN_DAYS = 90;
1542
+ const BUSINESS_OPERATING_MAX_DAYS = 730;
1543
+ const BUSINESS_DEFAULT_DAYS = 90;
1544
+ const MONTHS_IN_YEAR = 12;
1545
+ const MONTHLY_INTEREST_RATE = MONTHS_IN_YEAR * 100;
1546
+ const DEFAULT_CREDIT_CALCULATOR_PARAMS = {
1547
+ minSum: DEFAULT_MIN_SUM,
1548
+ maxSum: DEFAULT_MAX_SUM,
1549
+ minMonths: DEFAULT_MIN_MONTHS,
1550
+ maxMonths: DEFAULT_MAX_MONTHS,
1551
+ rate: 12.5,
1552
+ isSalaryClient: false,
1553
+ isPensionClient: false,
1554
+ isStateEmployee: false,
1555
+ isInsurance: true,
1556
+ };
1557
+ const DEFAULT_REFINANCING_CALCULATOR_PARAMS = {
1558
+ minSum: DEFAULT_MIN_SUM,
1559
+ maxSum: REFINANCING_DEFAULT_MAX_SUM,
1560
+ minSumOld: REFINANCING_OLD_MIN_SUM,
1561
+ maxSumOld: REFINANCING_OLD_MAX_SUM,
1562
+ minSumExtra: REFINANCING_EXTRA_MIN_SUM,
1563
+ maxSumExtra: REFINANCING_EXTRA_MAX_SUM,
1564
+ minMonths: DEFAULT_REFINANCING_MIN_MONTHS,
1565
+ maxMonths: DEFAULT_MAX_MONTHS,
1566
+ rate: 7.5,
1567
+ isExtraMoney: false,
1568
+ isSalaryClient: false,
1569
+ isInsurance: true,
1570
+ };
1571
+ const DEFAULT_TRAVEL_MIN_SUM = 6000;
1572
+ const DEFAULT_REST_MIN_SUM = 6000;
1573
+ const DEFAULT_BONUS_CALCULATOR_PARAMS = {
1574
+ minSumTravel: 6000,
1575
+ maxSumTravel: 200000,
1576
+ minSumOther: 6000,
1577
+ maxSumOther: 200000,
1578
+ maxBonus: 5000,
1579
+ prefMonthsNum: 2,
1580
+ prefTravelBonusRate: 0.015,
1581
+ prefRestBonusRate: 0.01,
1582
+ travelBonusRate: 0.015,
1583
+ restBonusRate: 0.01,
1584
+ };
1585
+ const DEFAULT_DEPOSIT_CALCULATOR_PARAMS = {
1586
+ minSum: 50000,
1587
+ maxSum: 5000000,
1588
+ minMonths: 2,
1589
+ maxMonths: 10,
1590
+ rate: 0,
1591
+ isMonthlyInterestPayment: true,
1592
+ isRemoteRegistration: true,
1593
+ };
1594
+ const DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS = {
1595
+ minSum: 1000,
1596
+ maxSum: 500000,
1597
+ minDays: BUSINESS_MIN_DAYS,
1598
+ maxDays: BUSINESS_MAX_DAYS,
1599
+ rate: 0,
1600
+ isMonthlyInterestPayment: true,
1601
+ isReplenished: false,
1602
+ isPartialWithdrawal: false,
1603
+ isSmallBusiness: false,
1604
+ depositeName: "Депозит 'Стабильный'",
1605
+ };
1606
+ const CREDIT_CALC_DEFAULT_DIR = 'credit-calculator-data';
1607
+ const BONUS_CALC_DEFAULT_DIR = 'bonus-calculator-data';
1608
+ const DEPOSIT_CALC_DEFAULT_DIR = 'deposit-calculator-data';
1609
+ const BUSINESS_DEPOSIT_CALC_DEFAULT_DIR = 'business-calculator-data';
1610
+ const REFINANCING_CALC_DEFAULT_DIR = 'refinancing-calculator-data';
1611
+
1612
+ const Rate = JSX(({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, rateBlockClassName, fractionDigits = 2, }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex justify-start gradient-color-text", children: [jsx("span", { className: style('font-mohave text-title-huge pr-6 -mt-4', rateBlockClassName), children: String(rate.toFixed(fractionDigits)).replace('.', ',') }), unit ? jsx("span", { className: "text-7xl", children: unit }) : null] }), depositeName && isShowDepositeName ? (jsx("div", { className: "absolute bottom-7 w-full text-center whitespace-nowrap", children: depositeName })) : null] })] })));
1613
+
1614
+ const renderFootnote = (text) => text ? (jsx(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: text })) : null;
1615
+
1616
+ const DEFAULT_MONEY_STEP = 1000;
1617
+ function renderWantedSumInput({ isShowItems = true, step = DEFAULT_MONEY_STEP, ...rest }) {
1618
+ const items = [
1619
+ `От ${toLocalNumberFormat(2)(rest.min || 0)} ₽`,
1620
+ `До ${toLocalNumberFormat(2)(rest.max || 0)} ₽`,
1621
+ ];
1622
+ return jsx(InputRange, { items: isShowItems ? items : [], step: step, ...rest });
1623
+ }
1624
+
1625
+ const getBonus = (params, bonusTravelValue, bonusOtherValue) => {
1626
+ const { minSumTravel, minSumOther, maxBonus, prefMonthsNum, prefTravelBonusRate, prefRestBonusRate, travelBonusRate, restBonusRate, } = params;
1627
+ if (bonusTravelValue === minSumTravel && bonusOtherValue === minSumOther) {
1628
+ return [0, 0];
1629
+ }
1630
+ const prefBonus = Math.min(Math.round(prefTravelBonusRate * bonusTravelValue) +
1631
+ Math.round(prefRestBonusRate * bonusOtherValue), maxBonus);
1632
+ const bonus = Math.min(Math.round(travelBonusRate * bonusTravelValue) + Math.round(restBonusRate * bonusOtherValue), maxBonus);
1633
+ const yearBonus = prefBonus * prefMonthsNum + bonus * (MONTHS_IN_YEAR - prefMonthsNum);
1634
+ return [prefBonus, yearBonus];
1635
+ };
1636
+
1637
+ function useCalculatorParams(dir) {
1638
+ const { data } = useAsyncData(`/wcms-resources/${dir}.json`, fetchJSONUnsafe);
1639
+ return data;
1640
+ }
1641
+
1642
+ const useBonusCalculatorParams = (userInputParams, sourceBookDir) => {
1643
+ const { travelExpenseValue, restExpenseValue } = userInputParams;
1644
+ const bonusCalculatorSourceBookParams = useCalculatorParams(sourceBookDir || BONUS_CALC_DEFAULT_DIR) ||
1645
+ DEFAULT_BONUS_CALCULATOR_PARAMS;
1646
+ const [monthBonus, yearBonus] = getBonus(bonusCalculatorSourceBookParams, travelExpenseValue, restExpenseValue);
1647
+ return {
1648
+ ...bonusCalculatorSourceBookParams,
1649
+ ...userInputParams,
1650
+ monthBonus,
1651
+ yearBonus,
1652
+ };
1653
+ };
1654
+
1655
+ const BonusCalculatorForm = JSX(({ className = '', sourceBookDir = '', buttons, footnote }) => {
1656
+ const [userInputParams, { field }] = useForm({
1657
+ travelExpenseValue: DEFAULT_TRAVEL_MIN_SUM,
1658
+ restExpenseValue: DEFAULT_REST_MIN_SUM,
1659
+ });
1660
+ const { minSumTravel, maxSumTravel, minSumOther, maxSumOther, monthBonus, yearBonus } = useBonusCalculatorParams(userInputParams, sourceBookDir);
1661
+ return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-2/5", children: [renderWantedSumInput({
1662
+ title: 'Сумма покупок в категории путешествия, ₽',
1663
+ min: minSumTravel,
1664
+ max: maxSumTravel,
1665
+ step: 500,
1666
+ isShowItems: false,
1667
+ ...field('travelExpenseValue'),
1668
+ }), renderWantedSumInput({
1669
+ title: 'Сумма покупок в остальных категориях, ₽',
1670
+ className: 'mt-7',
1671
+ min: minSumOther,
1672
+ max: maxSumOther,
1673
+ step: 500,
1674
+ isShowItems: false,
1675
+ ...field('restExpenseValue'),
1676
+ })] }), jsx("div", { children: monthBonus >= 0 ? (jsx(Rate, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u043C\u0435\u0441\u044F\u0446", rate: monthBonus, rateBlockClassName: "tracking-[-14px]", fractionDigits: 0 })) : null }), jsxs("div", { className: "w-96", children: [yearBonus >= 0 ? jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: yearBonus }) : null, renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
1677
+ });
1678
+
1679
+ const mergeIntervals = (intervals) => {
1680
+ const result = [...intervals];
1681
+ result.sort(([a], [c]) => a - c);
1682
+ let i = 1;
1683
+ while (i < result.length) {
1684
+ const [a, b] = result[i - 1];
1685
+ const [c, d] = result[i];
1686
+ if (b >= c) {
1687
+ result.splice(i - 1, 2, [a, Math.max(b, d)]);
1688
+ }
1689
+ else {
1690
+ i++;
1691
+ }
1692
+ }
1693
+ return result;
1694
+ };
1695
+
1696
+ const getLimitRangeByKeys = ([minKey, maxKey], limitParams, rateRows = []) => limitParams && limitParams[minKey] && limitParams[maxKey]
1697
+ ? {
1698
+ [minKey]: limitParams[minKey],
1699
+ [maxKey]: limitParams[maxKey],
1700
+ }
1701
+ : getRangeByKeys([minKey, maxKey], rateRows);
1702
+ const getRangeByKeys = ([minKey, maxKey], rows = []) => ({
1703
+ [minKey]: rows.length
1704
+ ? min(rows.filter((row) => typeof row[minKey] === 'number').map((row) => row[minKey]))
1705
+ : 0,
1706
+ [maxKey]: rows.length
1707
+ ? max(rows.filter((row) => typeof row[minKey] === 'number').map((row) => row[maxKey]))
1708
+ : 0,
1709
+ });
1710
+ const checkRangeByKeys = (value, [minKey, maxKey], sourceBookRow) => value >= sourceBookRow[minKey] && value <= sourceBookRow[maxKey];
1711
+
1712
+ const useBusinessDepositCalculatorParams = (userInputParams, sourceBookDir) => {
1713
+ const { daysValue, moneyValue, isPartialWithdrawal, isReplenished, isSmallBusiness, isMonthlyInterestPayment, } = userInputParams;
1714
+ const data = useCalculatorParams(sourceBookDir || BUSINESS_DEPOSIT_CALC_DEFAULT_DIR);
1715
+ const isOperatingDeposit = isReplenished || isPartialWithdrawal;
1716
+ const isDisabledOperatingDeposit = daysValue < BUSINESS_OPERATING_MIN_DAYS || daysValue > BUSINESS_OPERATING_MAX_DAYS;
1717
+ if (daysValue <= BUSINESS_RATE_MIN_DAYS) {
1718
+ return {
1719
+ ...DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS,
1720
+ ...userInputParams,
1721
+ isDisabledOperatingDeposit,
1722
+ isShowUnknownRate: true,
1723
+ };
1724
+ }
1725
+ const businessDepositCalculatorSourceBookParams = data?.rateRows?.find((_) => {
1726
+ return (isMonthlyInterestPayment === _.isMonthlyInterestPayment &&
1727
+ isSmallBusiness === _.isSmallBusiness &&
1728
+ checkIsOperatingDeposit(isOperatingDeposit, _) &&
1729
+ checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], _) &&
1730
+ checkRangeByKeys(daysValue, ['minDays', 'maxDays'], _));
1731
+ }) || DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS;
1732
+ const { rate } = businessDepositCalculatorSourceBookParams;
1733
+ const income = getDepositIncome$1(rate, userInputParams);
1734
+ const finalSum = moneyValue + income;
1735
+ const sourceBookRows = data?.rateRows || [DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS];
1736
+ return {
1737
+ ...businessDepositCalculatorSourceBookParams,
1738
+ ...getRangeByKeys(['minSum', 'maxSum'], sourceBookRows),
1739
+ ...getRangeByKeys(['minDays', 'maxDays'], sourceBookRows),
1740
+ ...userInputParams,
1741
+ isDisabledOperatingDeposit,
1742
+ income,
1743
+ finalSum,
1744
+ };
1745
+ };
1746
+ const checkIsOperatingDeposit = (isOperatingDeposit, sourceBookRow) => isOperatingDeposit
1747
+ ? sourceBookRow.isReplenished && sourceBookRow.isPartialWithdrawal
1748
+ : !sourceBookRow.isReplenished && !sourceBookRow.isPartialWithdrawal;
1749
+ const getDepositIncome$1 = (rate, userInputParams) => {
1750
+ const { isMonthlyInterestPayment, moneyValue, daysValue } = userInputParams;
1751
+ /*
1752
+ Приблизительный расчёт, не учитывающий разницу в количестве дней в месяцах. Месяц принят за 30 дней, год за 365 дней.
1753
+ */
1754
+ if (isMonthlyInterestPayment) {
1755
+ return Math.round(moneyValue * Math.pow((1200 + rate) / 1200, daysValue / 30) - moneyValue);
1756
+ }
1757
+ else {
1758
+ return Math.round((moneyValue * rate * daysValue) / 365 / 100);
1759
+ }
1760
+ };
1761
+
1762
+ const STEP_DAYS = 1;
1763
+ const renderDaysInput = (props) => (jsx(InputRange, { items: [`От ${daysText(props.min || 0)}`, `До ${daysText(props.max || 0)}`], step: STEP_DAYS, ...props }));
1764
+ const daysText = (days) => `${days} ${Number(days) % 10 === 1 ? 'дня' : 'дней'}`;
1765
+
1766
+ const orientationStyleMap = {
1767
+ horizontal: 'gap-10',
1768
+ vertical: 'flex-col gap-3',
1769
+ };
1770
+ const RadioButtonGroup = JSX(({ items, checkedItem, className, onChange: onChangeCheckedItem, orientation = 'horizontal', }) => (jsx("div", { className: style(`flex ${orientationStyleMap[orientation]}`, className), children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
1771
+
1772
+ const renderBinaryRadioButtonGroup = ({ items, title, orientation = 'horizontal', value, radioGroupClassName, onChange, }) => (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: items, checkedItem: items[value ? 0 : 1].id, className: style('flex-col sm:flex-row', radioGroupClassName), onChange: (_) => onChange && onChange(_ === items[0].id) })] }));
1773
+
1774
+ const renderInterestPayment = (props) => renderBinaryRadioButtonGroup({
1775
+ ...props,
1776
+ items: [
1777
+ { id: 'everyMonth', text: 'Ежемесячно' },
1778
+ { id: 'atEndTerm', text: 'В конце срока' },
1779
+ ],
1780
+ });
1781
+
1782
+ const UnknownRate = JSX(({ title = 'Ставка' }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx("div", { className: "mt-2xs pt-2xs pl-lg pb-xs", children: jsx(Icon, { name: "PercentIcon", width: "90", height: "85" }) }), jsx("div", { className: "w-64 mt-m", children: jsxs(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: ["\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043B\u044F \u0441\u0440\u043E\u043A\u0430 ", jsx("strong", { children: "1-30 \u0434\u043D\u0435\u0439" }), " \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0438 \u0432 \u0411\u0430\u043D\u043A"] }) })] })));
1783
+
1784
+ const renderDesktopRate = ({ rate, depositeName, isShowDepositeName }) => (jsx(Rate, { rate: rate, depositeName: depositeName, isShowDepositeName: isShowDepositeName, rateBlockClassName: "tracking-[-25px]", unit: "%" }));
1785
+ const renderMobileRate = ({ rate }) => (jsx(CalculatorValueBlock, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", value: rate, postfix: "%" }));
1786
+ const renderRate = (props) => {
1787
+ if (props.isShowUnknownRate) {
1788
+ return jsx(UnknownRate, {});
1789
+ }
1790
+ return (jsxs("div", { children: [jsx("div", { className: "hidden md:block", children: renderDesktopRate(props) }), jsx("div", { className: "md:hidden", children: renderMobileRate(props) })] }));
1791
+ };
1792
+
1793
+ const BusinessDepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote, bottomFootnote, isShowDepositeName }) => {
1794
+ const [userInputParams, { field }] = useForm({
1795
+ moneyValue: BUSINESS_DEFAULT_SUM,
1796
+ daysValue: BUSINESS_DEFAULT_DAYS,
1797
+ isReplenished: false,
1798
+ isPartialWithdrawal: false,
1799
+ isSmallBusiness: false,
1800
+ isMonthlyInterestPayment: false,
1801
+ });
1802
+ const calculatorParams = useBusinessDepositCalculatorParams(userInputParams, sourceBookDir);
1803
+ const { income, finalSum, rate, isShowUnknownRate, depositeName } = calculatorParams;
1804
+ return (jsxs("section", { className: className, children: [jsxs("div", { className: "flex flex-col justify-between sm:flex-row", children: [jsxs("div", { className: "flex flex-col gap-y-m sm:w-2/5 sm:gap-y-lg", children: [renderWantedSumInput({
1805
+ title: 'Сумма, ₽',
1806
+ min: calculatorParams.minSum,
1807
+ max: calculatorParams.maxSum,
1808
+ ...field('moneyValue'),
1809
+ value: calculatorParams.moneyValue,
1810
+ }), renderDaysInput({
1811
+ title: 'Срок, дней',
1812
+ min: calculatorParams.minDays,
1813
+ max: calculatorParams.maxDays,
1814
+ ...field('daysValue'),
1815
+ value: calculatorParams.daysValue,
1816
+ }), jsxs("div", { className: "flex flex-col gap-xl justify-between sm:flex-row sm:gap-0", children: [renderBusinessDepositParamsForm(calculatorParams, field), renderInterestPayment({
1817
+ title: 'Выплата процентов',
1818
+ orientation: 'vertical',
1819
+ ...field('isMonthlyInterestPayment'),
1820
+ radioGroupClassName: 'sm:flex-col',
1821
+ })] })] }), jsx("div", { className: "border-b border-main-divider my-xl sm:hidden" }), renderRate({
1822
+ rate,
1823
+ depositeName,
1824
+ isShowDepositeName,
1825
+ isShowUnknownRate,
1826
+ }), jsxs("div", { className: "flex flex-col gap-y-xl mt-3xl sm:gap-0 sm:w-96 sm:mt-0", children: [renderDepositResults(finalSum, income), renderButtonsSection(buttons, { isVertical: true }), jsx("div", { className: "sm:mt-2xl", children: renderFootnote(footnote) })] })] }), jsx("div", { className: "mt-lg", children: renderFootnote(bottomFootnote) })] }));
1827
+ });
1828
+ const renderBusinessDepositParamsForm = (calculatorParams, field) => (jsxs("div", { className: "flex flex-col gap-y-xl sm:gap-y-s", children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: calculatorParams.isDisabledOperatingDeposit, ...field('isReplenished'), value: calculatorParams.isReplenished }), jsx(Checkbox, { disabled: calculatorParams.isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", ...field('isPartialWithdrawal'), value: calculatorParams.isPartialWithdrawal }), jsx(Checkbox, { text: "\u0418\u041F / \u043C\u0430\u043B\u043E\u0435 \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0435", ...field('isSmallBusiness'), value: calculatorParams.isSmallBusiness })] }));
1829
+ const renderDepositResults = (finalSum, income) => (jsxs("div", { className: "flex flex-col gap-2xl sm:gap-0", children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: income, postfix: "\u20BD", prefix: "+" }), jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" })] }));
1830
+
1831
+ const STEP_MONTHS = 1;
1832
+ const renderMonthsInput = ({ min = 0, max = 0, availableMonths, ...rest }) => (jsx(InputRange, { items: [`От ${monthText(min)}`, `До ${monthText(max)}`], step: STEP_MONTHS, ...(availableMonths?.length ? { list: availableMonths } : { min, max }), ...rest }));
1833
+ const monthText = (month) => `${month} ${Number(month) % 10 === 1 ? 'месяца' : 'месяцев'}`;
1834
+
1835
+ const checkCreditSourceBookRowCommonParams = (props) => checkRowParam$1({
1836
+ ...props,
1837
+ fieldKey: 'isSalaryClient',
1838
+ viewSettingFieldKey: 'isShowSalaryClient',
1839
+ }) &&
1840
+ checkRowParam$1({
1841
+ ...props,
1842
+ fieldKey: 'isStateEmployee',
1843
+ viewSettingFieldKey: 'isShowStateEmployee',
1844
+ }) &&
1845
+ checkRowParam$1({
1846
+ ...props,
1847
+ fieldKey: 'isPensionClient',
1848
+ viewSettingFieldKey: 'isShowPensionClient',
1849
+ }) &&
1850
+ checkRowParam$1({
1851
+ ...props,
1852
+ fieldKey: 'isInsurance',
1853
+ viewSettingFieldKey: 'isShowInsurance',
1854
+ });
1855
+ const checkRowParam$1 = ({ row, userInputParams, paramsViewSettings, fieldKey, viewSettingFieldKey, }) => {
1856
+ const isExclude = paramsViewSettings ? !paramsViewSettings[viewSettingFieldKey] : false;
1857
+ return isExclude || userInputParams[fieldKey] === row[fieldKey];
1858
+ };
1859
+
1860
+ const getCreditCalculatorLimitParams = ({ limitRows, userInputParams, paramsViewSettings, }) => limitRows?.find((row) => checkCreditSourceBookRowCommonParams({
1861
+ row,
1862
+ userInputParams,
1863
+ paramsViewSettings,
1864
+ }));
1865
+
1866
+ const getCreditCalculatorRateParams = ({ rateRows = [], userInputParams, paramsViewSettings, moneyValue, monthsValue, }) => rateRows?.find((row) => checkCreditSourceBookRowCommonParams({
1867
+ row,
1868
+ userInputParams,
1869
+ paramsViewSettings,
1870
+ }) &&
1871
+ checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row) &&
1872
+ checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], row)) || DEFAULT_CREDIT_CALCULATOR_PARAMS;
1873
+
1874
+ /**
1875
+ * Формулы расчёта аннуитетных и дифференцированных платежей:
1876
+ * https://finuslugi.ru/potrebitelskie_kredity/stat_annuitetnye_i_differentsirovannye_platezhi
1877
+ */
1878
+ const getMonthlyPayment = (rate, params) => {
1879
+ const { isAnnuity, moneyValue, monthsValue, moneyExtra } = params;
1880
+ if (rate === 0) {
1881
+ return 0;
1882
+ }
1883
+ else if (isAnnuity) {
1884
+ const i = rate / MONTHLY_INTEREST_RATE; // Используется значение ставки в процентах
1885
+ if (moneyExtra) {
1886
+ return (moneyValue + moneyExtra) * (i + i / (Math.pow(1 + i, monthsValue) - 1));
1887
+ }
1888
+ else {
1889
+ return moneyValue * (i + i / (Math.pow(1 + i, monthsValue) - 1));
1890
+ }
1891
+ }
1892
+ else {
1893
+ return Math.round(moneyValue / monthsValue) + moneyValue * (rate / (MONTHS_IN_YEAR * 100)); // Используется значение ставки (rate) в процентах, делённое на сто.
1894
+ }
1895
+ };
1896
+
1897
+ const useCreditCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
1898
+ let { moneyValue, monthsValue } = userInputParams;
1899
+ const data = useCalculatorParams(sourceBookDir || CREDIT_CALC_DEFAULT_DIR);
1900
+ const rateRows = data?.rateRows || [DEFAULT_CREDIT_CALCULATOR_PARAMS];
1901
+ const limitRows = data?.limitRows || [];
1902
+ const creditCalculatorSourceBookLimitParams = getCreditCalculatorLimitParams({
1903
+ limitRows,
1904
+ userInputParams,
1905
+ paramsViewSettings,
1906
+ });
1907
+ const { minSum, maxSum } = getLimitRangeByKeys(['minSum', 'maxSum'], creditCalculatorSourceBookLimitParams, rateRows);
1908
+ const { minMonths, maxMonths } = getLimitRangeByKeys(['minMonths', 'maxMonths'], creditCalculatorSourceBookLimitParams, rateRows);
1909
+ moneyValue = clamp(moneyValue, minSum, maxSum);
1910
+ monthsValue = clamp(monthsValue, minMonths, maxMonths);
1911
+ const creditCalculatorRateParams = getCreditCalculatorRateParams({
1912
+ rateRows,
1913
+ userInputParams,
1914
+ paramsViewSettings,
1915
+ moneyValue,
1916
+ monthsValue,
1917
+ });
1918
+ const { rate } = creditCalculatorRateParams;
1919
+ const monthlyPayment = getMonthlyPayment(rate, userInputParams);
1920
+ return useMemo(() => ({
1921
+ ...creditCalculatorRateParams,
1922
+ ...userInputParams,
1923
+ minSum,
1924
+ maxSum,
1925
+ minMonths,
1926
+ maxMonths,
1927
+ moneyValue,
1928
+ monthsValue,
1929
+ monthlyPayment,
1930
+ }), [userInputParams, data]);
1931
+ };
1932
+
1933
+ const renderPaymentType = (props) => renderBinaryRadioButtonGroup({
1934
+ ...props,
1935
+ radioGroupClassName: 'sm:flex-col',
1936
+ items: [
1937
+ { id: 'annuity', text: 'Аннуитетный' },
1938
+ { id: 'differential', text: 'Дифференцированный' },
1939
+ ],
1940
+ });
1941
+
1942
+ const CreditCalculatorForm = JSX(({ className, sourceBookDir, buttons, footnote, paramsViewSettings, isMobile }) => {
1943
+ const [userInputParams, { field }] = useForm({
1944
+ isAnnuity: true,
1945
+ isInsurance: true,
1946
+ isSalaryClient: false,
1947
+ isPensionClient: false,
1948
+ isStateEmployee: false,
1949
+ moneyValue: CREDIT_DEFAULT_SUM,
1950
+ monthsValue: DEFAULT_MONTHS,
1951
+ });
1952
+ const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir, paramsViewSettings);
1953
+ const paymentTypeElement = renderPaymentType({
1954
+ title: isMobile ? 'Тип платежа' : '',
1955
+ orientation: 'vertical',
1956
+ ...field('isAnnuity'),
1957
+ });
1958
+ return (jsxs("section", { className: style('flex flex-col justify-between sm:flex-row', className), children: [jsxs("div", { className: "flex flex-col gap-y-m sm:w-2/5 sm:gap-y-lg", children: [renderWantedSumInput({
1959
+ title: 'Сумма кредита, ₽',
1960
+ step: 500,
1961
+ min: calculatorParams.minSum,
1962
+ max: calculatorParams.maxSum,
1963
+ ...field('moneyValue'),
1964
+ value: calculatorParams.moneyValue,
1965
+ }), renderMonthsInput({
1966
+ title: 'Срок кредита, месяцев',
1967
+ min: calculatorParams.minMonths,
1968
+ max: calculatorParams.maxMonths,
1969
+ ...field('monthsValue'),
1970
+ value: calculatorParams.monthsValue,
1971
+ }), renderCreditParamsForm$1({ ...calculatorParams, ...paramsViewSettings }, field), jsx("div", { className: "mt-s sm:hidden", children: paymentTypeElement })] }), jsx("div", { className: "border-b border-main-divider mt-xl mb-3xl sm:hidden" }), renderRate({
1972
+ rate: calculatorParams.rate,
1973
+ }), jsxs("div", { className: "mt-6xl flex flex-col gap-lg sm:w-96 sm:mt-0 sm:gap-0", children: [jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), jsx("div", { className: "hidden sm:block", children: paymentTypeElement }), renderButtonsSection(buttons, { className: 'mt-2xl', isVertical: true }), renderFootnote(footnote)] })] }));
1974
+ });
1975
+ const renderCreditParamsForm$1 = (params, field) => (jsxs("div", { className: "gap-xl flex flex-col sm:gap-s", children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: `Получаю зарплату на счёт\nв Россельхозбанке`, ...field('isSalaryClient'), value: params.isSalaryClient, className: "whitespace-pre-line sm:whitespace-normal" })) : null, params.isShowStateEmployee ? (jsx(Checkbox, { text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('isStateEmployee'), value: params.isStateEmployee })) : null, params.isShowPensionClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", ...field('isPensionClient'), value: params.isPensionClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", ...field('isInsurance'), value: params.isInsurance })) : null] }));
1976
+
1977
+ const arrayByRange = (start, stop, step = 1) => Array.from({ length: Math.abs(stop - start) / step + 1 }, (value, index) => stop >= start ? start + index * step : start - index * step);
1978
+
1979
+ const useDepositCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
1980
+ const { moneyValue, monthsValue } = userInputParams;
1981
+ const data = useCalculatorParams(sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR);
1982
+ const defaultMonth = data?.rateRows?.[0]
1983
+ ? getMiddleMonth(data.rateRows[0].minMonths, data.rateRows[0].maxMonths)
1984
+ : 1;
1985
+ const isExcludeMonthlyInterestPayment = !paramsViewSettings?.isShowMonthlyInterestPayment;
1986
+ const isExcludeRemoteRegistration = !paramsViewSettings?.isShowRemoteRegistration;
1987
+ const depositCalculatorSourceBookParams = data?.rateRows?.find((row) => checkRowByParam({
1988
+ row,
1989
+ userInputParams,
1990
+ paramKey: 'isMonthlyInterestPayment',
1991
+ isExclude: isExcludeMonthlyInterestPayment,
1992
+ }) &&
1993
+ checkRowByParam({
1994
+ row,
1995
+ userInputParams,
1996
+ paramKey: 'isRemoteRegistration',
1997
+ isExclude: isExcludeRemoteRegistration,
1998
+ }) &&
1999
+ checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row) &&
2000
+ checkRangeByKeys(monthsValue || defaultMonth, ['minMonths', 'maxMonths'], row)) || DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
2001
+ const { rate } = depositCalculatorSourceBookParams;
2002
+ const income = getDepositIncome(rate, userInputParams);
2003
+ const finalSum = moneyValue + income;
2004
+ const sourceBookRows = data?.rateRows || [DEFAULT_DEPOSIT_CALCULATOR_PARAMS];
2005
+ return {
2006
+ ...depositCalculatorSourceBookParams,
2007
+ ...getRangeByKeys(['minSum', 'maxSum'], sourceBookRows),
2008
+ ...getRangeByKeys(['minMonths', 'maxMonths'], sourceBookRows),
2009
+ availableMonths: mergeIntervals(sourceBookRows.map((row) => [row['minMonths'], row['maxMonths']])).flatMap(([start, end]) => arrayByRange(start, end)),
2010
+ ...userInputParams,
2011
+ defaultMonth,
2012
+ income,
2013
+ finalSum,
2014
+ };
2015
+ };
2016
+ const getDepositIncome = (rate, userInputParams) => {
2017
+ const { isMonthlyInterestPayment, moneyValue, monthsValue } = userInputParams;
2018
+ if (isMonthlyInterestPayment) {
2019
+ return Math.round(moneyValue * Math.pow((1200 + rate) / 1200, monthsValue) - moneyValue);
2020
+ }
2021
+ else {
2022
+ /*
2023
+ Приблизительный расчёт, не учитывающий разницу в количестве дней в месяцах. Месяц принят за 30 дней, год за 365 дней.
2024
+ */
2025
+ return Math.round((moneyValue * rate * 30 * monthsValue) / 365 / 100);
2026
+ }
2027
+ };
2028
+ const checkRowByParam = ({ row, userInputParams, paramKey, isExclude }) => isExclude || userInputParams[paramKey] === row[paramKey];
2029
+ const getMiddleMonth = (minMonths, maxMonths) => minMonths + Math.round((maxMonths - minMonths) / 2);
2030
+
2031
+ const renderRegistrationType = (props) => renderBinaryRadioButtonGroup({
2032
+ ...props,
2033
+ items: [
2034
+ { id: 'remote', text: 'Дистанционно' },
2035
+ { id: 'office', text: 'Офис Банка' },
2036
+ ],
2037
+ });
2038
+
2039
+ const DepositCalculatorForm = JSX(({ className, sourceBookDir, buttons, footnote, paramsViewSettings }) => {
2040
+ const [userInputParams, { field }] = useForm({
2041
+ moneyValue: DEPOSIT_DEFAULT_SUM,
2042
+ monthsValue: 0,
2043
+ isMonthlyInterestPayment: false,
2044
+ isRemoteRegistration: false,
2045
+ });
2046
+ const calculatorParams = useDepositCalculatorParams(userInputParams, sourceBookDir, paramsViewSettings);
2047
+ const { defaultMonth, rate, income, finalSum } = calculatorParams;
2048
+ const { onChange: setMonthsValue } = field('monthsValue');
2049
+ useEffect(() => {
2050
+ setMonthsValue && setMonthsValue(defaultMonth);
2051
+ }, [defaultMonth]);
2052
+ return (jsxs("section", { className: style('flex flex-col justify-between sm:flex-row', className), children: [jsxs("div", { className: "flex flex-col gap-lg sm:w-2/5", children: [renderWantedSumInput({
2053
+ title: 'Сумма, ₽',
2054
+ min: calculatorParams.minSum,
2055
+ max: calculatorParams.maxSum,
2056
+ ...field('moneyValue'),
2057
+ value: calculatorParams.moneyValue,
2058
+ }), renderMonthsInput({
2059
+ title: 'Срок, месяцев',
2060
+ min: calculatorParams.minMonths,
2061
+ max: calculatorParams.maxMonths,
2062
+ availableMonths: calculatorParams.availableMonths,
2063
+ ...field('monthsValue'),
2064
+ value: calculatorParams.monthsValue,
2065
+ }), jsx("div", { className: "flex flex-col gap-y-2xl", children: renderDepositParamsForm({ ...calculatorParams, ...paramsViewSettings }, field) })] }), jsx("div", { className: "border-b border-main-divider mt-lg mb-2xl md:hidden" }), renderRate({
2066
+ rate,
2067
+ }), jsxs("div", { className: "mt-2xl flex flex-col gap-y-2xl sm:w-96 sm:gap-y-0 sm:mt-0", children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: income, postfix: "\u20BD", prefix: "+" }), jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
2068
+ });
2069
+ const renderDepositParamsForm = (params, field) => (jsxs("div", { className: "flex flex-col gap-y-2xl", children: [params.isShowMonthlyInterestPayment
2070
+ ? renderInterestPayment({
2071
+ title: 'Выплата процентов',
2072
+ ...field('isMonthlyInterestPayment'),
2073
+ value: params.isMonthlyInterestPayment,
2074
+ })
2075
+ : null, params.isShowRemoteRegistration
2076
+ ? renderRegistrationType({
2077
+ title: 'Оформление',
2078
+ ...field('isRemoteRegistration'),
2079
+ value: params.isRemoteRegistration,
2080
+ })
2081
+ : null] }));
2082
+
2083
+ const checkRefinancingSourceBookRowCommonParams = (props) => checkRowParam({
2084
+ ...props,
2085
+ fieldKey: 'isSalaryClient',
2086
+ viewSettingFieldKey: 'isShowSalaryClient',
2087
+ }) &&
2088
+ checkRowParam({
2089
+ ...props,
2090
+ fieldKey: 'isInsurance',
2091
+ viewSettingFieldKey: 'isShowInsurance',
2092
+ }) &&
2093
+ checkRowParam({
2094
+ ...props,
2095
+ fieldKey: 'isExtraMoney',
2096
+ viewSettingFieldKey: 'isShowExtraMoney',
2097
+ });
2098
+ const checkRowParam = ({ row, userInputParams, paramsViewSettings, fieldKey, viewSettingFieldKey, }) => {
2099
+ const isExclude = paramsViewSettings ? !paramsViewSettings[viewSettingFieldKey] : false;
2100
+ return isExclude || userInputParams[fieldKey] === row[fieldKey];
2101
+ };
2102
+
2103
+ const getRefinancingCalculatorLimitParams = ({ limitRows, userInputParams, paramsViewSettings, }) => limitRows?.find((row) => checkRefinancingSourceBookRowCommonParams({
2104
+ row,
2105
+ userInputParams,
2106
+ paramsViewSettings,
2107
+ }));
2108
+
2109
+ const getRefinancingCalculatorRateParams = ({ rateRows = [], userInputParams, paramsViewSettings, moneyValue, monthsValue, oldMonthlyPayment, moneyExtra, }) => rateRows?.find((row) => checkRefinancingSourceBookRowCommonParams({
2110
+ row,
2111
+ userInputParams,
2112
+ paramsViewSettings,
2113
+ }) &&
2114
+ checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row) &&
2115
+ checkRangeByKeys(oldMonthlyPayment, ['minSumOld', 'maxSumOld'], row) &&
2116
+ checkRangeByKeys(moneyExtra, ['minSumExtra', 'maxSumExtra'], row) &&
2117
+ checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], row)) || DEFAULT_REFINANCING_CALCULATOR_PARAMS;
2118
+
2119
+ const useRefinancingCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
2120
+ let { moneyValue, monthsValue, oldMonthlyPayment, moneyExtra } = userInputParams;
2121
+ const data = useCalculatorParams(sourceBookDir || REFINANCING_CALC_DEFAULT_DIR);
2122
+ const rateRows = data?.rateRows || [DEFAULT_REFINANCING_CALCULATOR_PARAMS];
2123
+ const limitRows = data?.limitRows || [];
2124
+ const sourceBookLimitParams = getRefinancingCalculatorLimitParams({
2125
+ limitRows,
2126
+ userInputParams,
2127
+ paramsViewSettings,
2128
+ });
2129
+ const { minSum, maxSum } = getLimitRangeByKeys(['minSum', 'maxSum'], sourceBookLimitParams, rateRows);
2130
+ const { minSumOld, maxSumOld } = getLimitRangeByKeys(['minSumOld', 'maxSumOld'], sourceBookLimitParams, rateRows);
2131
+ const { minSumExtra, maxSumExtra } = getLimitRangeByKeys(['minSumExtra', 'maxSumExtra'], sourceBookLimitParams, rateRows);
2132
+ const { minMonths, maxMonths } = getLimitRangeByKeys(['minMonths', 'maxMonths'], sourceBookLimitParams, rateRows);
2133
+ moneyValue = clamp(moneyValue, minSum, maxSum);
2134
+ oldMonthlyPayment = clamp(oldMonthlyPayment, minSumOld, maxSumOld);
2135
+ moneyExtra = clamp(moneyExtra, minSumExtra, maxSumExtra);
2136
+ monthsValue = clamp(monthsValue, minMonths, maxMonths);
2137
+ const refinancingCalculatorSourceBookRateParams = getRefinancingCalculatorRateParams({
2138
+ rateRows,
2139
+ userInputParams,
2140
+ paramsViewSettings,
2141
+ moneyValue,
2142
+ monthsValue,
2143
+ oldMonthlyPayment,
2144
+ moneyExtra,
2145
+ });
2146
+ const { rate } = refinancingCalculatorSourceBookRateParams;
2147
+ const monthlyPayment = getMonthlyPayment(rate, userInputParams);
2148
+ const benefit = userInputParams.oldMonthlyPayment - monthlyPayment;
2149
+ return useMemo(() => ({
2150
+ ...refinancingCalculatorSourceBookRateParams,
2151
+ ...userInputParams,
2152
+ minSum,
2153
+ maxSum,
2154
+ minMonths,
2155
+ maxMonths,
2156
+ moneyValue,
2157
+ monthsValue,
2158
+ oldMonthlyPayment,
2159
+ moneyExtra,
2160
+ monthlyPayment,
2161
+ benefit,
2162
+ }), [userInputParams, data]);
2163
+ };
2164
+
2165
+ const RefinancingCalculatorForm = JSX(({ className, sourceBookDir, buttons, footnote, paramsViewSettings }) => {
2166
+ const [userInputParams, { field }] = useForm({
2167
+ isAnnuity: true,
2168
+ isInsurance: true,
2169
+ isSalaryClient: false,
2170
+ isExtraMoney: false,
2171
+ moneyValue: REFINANCING_DEFAULT_SUM,
2172
+ oldMonthlyPayment: REFINANCING_OLD_DEFAULT_SUM,
2173
+ monthsValue: DEFAULT_REFINANCING_MONTHS,
2174
+ moneyExtra: REFINANCING_OLD_DEFAULT_SUM,
2175
+ });
2176
+ const calculatorParams = useRefinancingCalculatorParams(userInputParams, sourceBookDir, paramsViewSettings);
2177
+ return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-2/5", children: [renderWantedSumInput({
2178
+ title: 'Остаток долга в других банках, ₽ ',
2179
+ step: 500,
2180
+ min: calculatorParams.minSum,
2181
+ max: calculatorParams.maxSum,
2182
+ ...field('moneyValue'),
2183
+ value: calculatorParams.moneyValue,
2184
+ }), renderWantedSumInput({
2185
+ title: 'Ежемесячный платеж в других банках, ₽',
2186
+ isShowItems: false,
2187
+ step: 500,
2188
+ min: calculatorParams.minSumOld,
2189
+ max: calculatorParams.maxSumOld,
2190
+ ...field('oldMonthlyPayment'),
2191
+ value: calculatorParams.oldMonthlyPayment,
2192
+ }), renderMonthsInput({
2193
+ title: 'Новый срок кредита, месяцев',
2194
+ min: calculatorParams.minMonths,
2195
+ max: calculatorParams.maxMonths,
2196
+ ...field('monthsValue'),
2197
+ value: calculatorParams.monthsValue,
2198
+ className: 'mt-2xl',
2199
+ }), jsx("div", { className: style('mt-7', calculatorParams.isExtraMoney ? 'mb-3' : ''), children: renderCreditParamsForm({ ...calculatorParams, ...paramsViewSettings }, field) }), calculatorParams.isExtraMoney
2200
+ ? renderWantedSumInput({
2201
+ title: 'Дополнительная сумма, ₽ ',
2202
+ step: 500,
2203
+ min: calculatorParams.minSumExtra,
2204
+ max: calculatorParams.maxSumExtra,
2205
+ ...field('moneyExtra'),
2206
+ value: calculatorParams.moneyExtra,
2207
+ })
2208
+ : null] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.rate, fractionDigits: 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-96", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? (jsx(CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null, renderPaymentType({ orientation: 'vertical', ...field('isAnnuity') }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
2209
+ });
2210
+ const renderCreditParamsForm = (params, field) => (jsxs("div", { children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", ...field('isSalaryClient'), value: params.isSalaryClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", ...field('isInsurance'), value: params.isInsurance })) : null, params.isShowExtraMoney ? (jsx(Checkbox, { className: "mt-3", text: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0443\u044E \u0441\u0443\u043C\u043C\u0443", ...field('isExtraMoney'), value: params.isExtraMoney })) : null] }));
2211
+
2212
+ const EmbeddableCalcBlocks = {
2213
+ CreditCalculatorForm,
2214
+ DepositCalculatorForm,
2215
+ BusinessDepositCalculatorForm,
2216
+ BonusCalculatorForm,
2217
+ RefinancingCalculatorForm,
2218
+ };
2219
+
2220
+ const Calculator = JSX(({ className, calculatorTabs = [] }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-0", children: renderTabs$1(calculatorTabs) })));
2221
+ const renderCalculator = (tab) => {
2222
+ const type = tab.calculatorBlock?.calcType;
2223
+ if (!type || !(type in EmbeddableCalcBlocks)) {
2224
+ return null;
2225
+ }
2226
+ const EmbeddedBlock = EmbeddableCalcBlocks[type];
2227
+ return jsx(EmbeddedBlock, { ...tab.calculatorBlock, isMobile: true });
2228
+ };
2229
+ const renderTabs$1 = (tabs) => {
2230
+ if (!tabs || !tabs.length) {
2231
+ return null;
2232
+ }
2233
+ const isSingleTab = tabs.length === 1;
2234
+ if (isSingleTab) {
2235
+ return jsx(BlockWrapper, { children: renderCalculator(tabs[0]) });
2236
+ }
2237
+ return tabs.map((tab, index) => (jsx(Foldable, { isFoldButtonOnTop: true, unfoldedByDefault: index === 0, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { isUnfolded: isUnfolded, children: jsx(BlockWrapper, { children: renderCalculator(tab) }) })), renderFoldButton: renderFoldButton$2(tab) }, index.toString())));
2238
+ };
2239
+ const renderFoldButton$2 = (tab) => ({ isUnfolded, onToggle }) => {
2240
+ return (jsxs("button", { onClick: onToggle, className: "w-full p-xl bg-green flex items-center border-b border-white", children: [jsx("div", { className: "w-11 h-11 bg-white rounded-md flex justify-center items-center", children: jsx(Icon, { name: tab.nav?.icon?.icon, iconVersion: "color", width: "24", height: "24" }) }), jsxs("div", { className: "flex-1 flex flex-col pl-s", children: [jsx(Text, { align: "text-left", color: "text-white", children: tab.nav?.title }), jsx(Text, { align: "text-left", size: "text-s", color: "text-white", font: "font-light", children: tab.nav?.description })] }), jsx(Icon, { name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', iconVersion: "white", width: "24", height: "24" })] }));
2241
+ };
2242
+
1491
2243
  const NumberInput = JSX((props) => {
1492
2244
  const { onChange, min, max, defaultValue = '0', fractionDigits = 0, ...inputProps } = props;
1493
2245
  const normalizedProps = useNormalizedInput(props, {
@@ -1663,20 +2415,54 @@
1663
2415
  'CarouselEventCard',
1664
2416
  ];
1665
2417
 
1666
- const CarouselBankHistoryCard = JSX(({ title, description, className }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", children: jsx(Headline, { headlineVersion: "S", title: title, description: description, align: "text-left", className: "text-primary-text", isPadding: false }) })));
2418
+ const CarouselBankHistoryCard = JSX(({ title, description, className }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", children: jsx(Headline, { headlineVersion: "XS", title: title, description: description, align: "text-left", className: "text-primary-text", isPadding: false }) })));
1667
2419
 
1668
- const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, children }) => {
1669
- const link = useLink({ isRemote });
1670
- const linkProps = link({ href, target });
1671
- const Tag = href ? 'a' : 'div';
1672
- return (jsx(Tag, { className: style('block', className), ...(href ? linkProps : {}), children: children }));
2420
+ const imageAlignmentMap = {
2421
+ start: 'self-start',
2422
+ center: 'self-center',
2423
+ end: 'self-end',
2424
+ };
2425
+ const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, backImage, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-3xl font-sans overflow-hidden', padding || defaultPadding, className), children: [title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: "grow relative flex flex-wrap @xl:flex-nowrap justify-around @xl:justify-between items-stretch gap-3xl", children: [renderImageContainer(leftImage, { imageAlign }), jsxs("div", { className: style('flex flex-col gap-3xl max-w-[600px] xl:max-w-[728px]', leftImage ? '' : 'grow'), children: [insetTitle, jsx("div", { className: "grow", children: children }), backImage ? (jsx("div", { className: "mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4", children: backImage })) : null, buttons] }), renderImageContainer(rightImage, { className: '-order-1 @xl:order-1', imageAlign })] })] })));
2426
+ const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('flex-shrink-0', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
2427
+
2428
+ const sum = (list = []) => list.reduce((a, b) => a + b, 0);
2429
+
2430
+ const avg = (items = []) => (items?.length ? sum(items) / items.length : 0);
2431
+
2432
+ const deviation = (items) => items?.length ? Math.sqrt(Math.abs(avg(items.map((_) => _ ** 2)) - avg(items) ** 2)) : 0;
2433
+
2434
+ const renderBenefitIcon = (icon, benefitsVersion = 'normal') => icon ? (jsx("div", { className: style('w-12 h-12 min-w-12 box-border flex items-center justify-center rounded-icon', benefitsVersion === 'normal'
2435
+ ? 'bg-secondary-light text-primary-main'
2436
+ : 'bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black'), children: jsx(Img, { className: "w-6 h-6", image: { ...icon, iconVersion: icon.iconVersion || benefitsVersion } }) })) : null;
2437
+
2438
+ const RichText = JSX((props) => {
2439
+ const { __html = '', richVersion = '' } = props;
2440
+ return (jsx("div", { className: style(richVersion, 'md-container'), dangerouslySetInnerHTML: { __html } }));
1673
2441
  });
1674
2442
 
1675
- const cardTitleFont = 'font-light';
1676
- const cardDescriptionColor = '';
2443
+ const renderBenefitDescription = (description, i) => description ? (jsx(Paragraph, { font: "font-light", size: "text-m", color: "text-secondary-text group-data-secondary:text-white", children: description }, `description-${i}`)) : null;
2444
+
2445
+ const renderBenefitLabel = (label, i) => label ? (jsx(Text, { color: "text-primary-text group-data-secondary:text-white", size: "text-h6", children: label }, `label-${i}`)) : null;
1677
2446
 
1678
- const CarouselProgramsCard = JSX(({ className, title, icon, list = [], href, target, ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-3xl sm:p-0", ...rest, children: jsxs(LinkWrapper, { className: "sm:flex sm:items-center", href: href, target: target, children: [jsx("div", { className: "flex justify-center px-xl", children: icon?.src || icon?.icon ? jsx(Img, { image: icon }) : null }), jsxs("div", { className: "sm:px-s p-5xl", children: [title ? jsx(Heading, { className: "mb-xs sm:mb-m", headingType: "h6", title: title }) : null, list.length ? (jsx("div", { className: "flex flex-col gap-xs sm:gap-s", children: list?.map(renderList$2) })) : null] })] }) })));
1679
- const renderList$2 = (_, i) => (jsxs("div", { className: "flex flex-row-reverse justify-between gap-y-2xs sm:flex-col", children: [_.title ? (jsx(Text, { size: "text-l", font: cardTitleFont, children: _.title })) : null, _.description ? (jsx(Paragraph, { size: "text-l", font: "font-light", color: cardDescriptionColor, children: _.description })) : null] }, String(i)));
2447
+ const renderBenefitText = (_, i) => _.type === 'rte' && '__html' in _ && _.__html ? (jsx(RichText, { ..._ }, `rte-${i}`)) : ([
2448
+ 'label' in _ ? renderBenefitLabel(_.label, i) : null,
2449
+ 'description' in _ ? renderBenefitDescription(_.description, i) : null,
2450
+ ]);
2451
+
2452
+ const BenefitItem = JSX(({ className, benefitsVersion, ..._ }) => (jsxs("div", { className: style('flex gap-m', 'description' in _ && _.description ? 'items-start' : 'items-center', className), children: ['icon' in _ ? renderBenefitIcon(_.icon, benefitsVersion) : null, jsx("div", { children: renderBenefitText(_) })] })));
2453
+
2454
+ const MAX_BENEFITS_LEN_DEVIATION = 16;
2455
+ const benefitLength = (_) => _.type === 'rte'
2456
+ ? _?.__html?.length || 0
2457
+ : Math.max(_?.label?.length || 0, _?.description?.length || 0);
2458
+ const isDistortedBenefits = (benefits) => deviation(benefits.map(benefitLength)) > MAX_BENEFITS_LEN_DEVIATION;
2459
+ const hasIcon = (_) => _ && 'icon' in _ && _.icon && (_.icon.icon || _.icon.src);
2460
+ const isTextualBenefits = (benefits) => !benefits.some(hasIcon);
2461
+ const DefaultBenefitsList = JSX(({ className, benefitsVersion = 'normal', benefits }) => benefits?.length ? (jsx("div", { className: style('flex gap-x-m gap-y-s', isDistortedBenefits(benefits) || isTextualBenefits(benefits) ? 'flex-col' : 'flex-wrap', className), children: benefits.map((_, i) => (jsx(BenefitItem, { benefitsVersion: benefitsVersion, ..._ }, String(i)))) })) : null);
2462
+
2463
+ const TabularBenefitsList = JSX(({ className, benefits }) => benefits?.length ? (jsx("div", { className: style('grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs', className), children: benefits.flatMap(renderBenefitText) })) : null);
2464
+
2465
+ const BenefitsList = JSX(({ isTabularBenefits, ...rest }) => isTabularBenefits ? jsx(TabularBenefitsList, { ...rest }) : jsx(DefaultBenefitsList, { ...rest }));
1680
2466
 
1681
2467
  const DOT_SIZE_MAP = {
1682
2468
  L: 'w-1.5 h-1.5 mr-m',
@@ -1697,6 +2483,29 @@
1697
2483
  };
1698
2484
  const List = JSX(({ className, hasIndent, isDotted, items, listItemSize = 'M' }) => items?.length ? (jsx("section", { className: style('flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text', TEXT_SIZE_MAP[listItemSize], hasIndent ? ITEM_INDENT_MAP[listItemSize] : '', className), role: "list", children: items.map((item, i) => (jsx(ListItem, { isDotted: isDotted, size: listItemSize, children: item }, String(i)))) })) : null);
1699
2485
 
2486
+ const Tags = JSX(({ className, tags }) => tags?.length ? (jsx("div", { className: style('flex flex-wrap gap-xs', className), role: "list", children: tags.map(renderTag) })) : null);
2487
+ const renderTag = (tag, key) => (jsx("div", { className: "py-2 px-2.5 border-solid border rounded-md border-gray", role: "listitem", children: jsx(Text, { size: "text-m", font: "font-light", children: tag }) }, String(key)));
2488
+
2489
+ const BaseProductTile = JSX(({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', isInsetTitle = true, benefitsVersion, isTabularBenefits, benefits, __html, items, isDotted = true, listItemSize, tags, buttons, image, imageOptions: { imageAlign = 'end', directionRight = true, isBackground } = {}, children, }) => {
2490
+ const img = image?.src ? jsx(Img, { image: image }) : null;
2491
+ const headline = (jsx(Headline, { title: title, description: description, headlineVersion: headlineVersion, align: align, isPadding: false }));
2492
+ return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isInsetTitle ? { insetTitle: headline } : { title: headline }), ...(isBackground ? { backImage: img } : leftOrRightImage(img, directionRight)), imageAlign: imageAlign, buttons: renderButtonsSection(buttons), children: jsxs("div", { className: "flex flex-col gap-xl", children: [jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: benefits }), __html ? jsx(RichText, { __html: __html }) : null, items?.length ? (jsx(List, { items: items, isDotted: isDotted, listItemSize: listItemSize })) : null, children, tags?.length ? jsx(Tags, { tags: tags }) : null] }) }));
2493
+ });
2494
+ const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
2495
+
2496
+ const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, children }) => {
2497
+ const link = useLink({ isRemote });
2498
+ const linkProps = link({ href, target });
2499
+ const Tag = href ? 'a' : 'div';
2500
+ return (jsx(Tag, { className: style('block', className), ...(href ? linkProps : {}), children: children }));
2501
+ });
2502
+
2503
+ const CarouselProgramsCard = JSX(({ className, title, icon, list, href, target, ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-3xl", ...rest, children: jsx(LinkWrapper, { className: "flex items-center h-full", href: href, target: target, children: jsx(BaseProductTile, { title: title, headlineVersion: "XS", image: icon, imageOptions: { directionRight: false, imageAlign: 'center' }, benefits: list?.map((_) => ({
2504
+ type: 'default',
2505
+ label: _.title,
2506
+ description: _.description,
2507
+ })) }) }) })));
2508
+
1700
2509
  const buttonSizeStyles = {
1701
2510
  default: 'w-24 h-14',
1702
2511
  stretched: 'flex-1 h-14',
@@ -1756,28 +2565,6 @@
1756
2565
  });
1757
2566
  const renderIcon$1 = (icon) => icon?.src || icon?.icon ? (jsx("div", { children: jsx(Img, { image: icon }) })) : null;
1758
2567
 
1759
- const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
1760
- const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
1761
- const onToggle = useCallback(() => {
1762
- setIsUnfolded((_) => !_);
1763
- }, []);
1764
- const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
1765
- const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
1766
- return isFoldButtonOnTop ? (jsxs("div", { className: className, children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, children: [sectionNode, buttonNode] }));
1767
- });
1768
-
1769
- const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
1770
- const containerRef = useRef(null);
1771
- useEffect(() => {
1772
- if (containerRef.current) {
1773
- containerRef.current.style.maxHeight = isUnfolded
1774
- ? `${containerRef.current.scrollHeight}px`
1775
- : '';
1776
- }
1777
- }, [isUnfolded, children?.length]);
1778
- return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
1779
- });
1780
-
1781
2568
  const getPaddingStyle = (isHighlighting = false) => isHighlighting ? 'p-6xl mt-6' : 'mt-6 p-6xl'; // Хак для мобильной версии т.к. контракт должен быть идентичный
1782
2569
 
1783
2570
  const renderCardInfo = (cell, i) => {
@@ -1809,8 +2596,8 @@
1809
2596
  black: 'bg-black',
1810
2597
  white: 'bg-white',
1811
2598
  };
1812
- const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors, ...rest }) => (jsxs(BlockWrapper, { className: style('flex flex-col justify-left gap-m', className), defaultPadding: "p-6xl sm:p-7", ...rest, children: [image?.src ? jsx(Img, { className: "flex justify-center", image: image }) : null, jsx(Headline, { title: title, description: description, headlineVersion: "XS", isPadding: false, align: "text-left" }), colors?.length ? (jsxs("div", { className: "flex text-secondary-text", children: [jsx("div", { className: "mr-xs", children: jsx(Text, { size: "text-s", align: "text-left", font: "font-light", children: "\u0426\u0432\u0435\u0442\u0430:" }) }), colors.map(renderColorOption)] })) : null, price ? (jsxs(Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null, renderButtonsSection([button], { buttonClassName: 'w-full' })] })));
1813
- const renderColorOption = (color, i) => (jsx("div", { role: "figure", className: `w-6 h-6 ml-1 sm:ml-3 border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
2599
+ const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors, ...rest }) => (jsxs(BlockWrapper, { className: style('flex flex-col justify-left', className), defaultPadding: "p-2xl", ...rest, children: [image?.src ? jsx(Img, { className: "flex justify-center mb-xl", image: image }) : null, jsx(Headline, { title: title, description: description, headlineVersion: "XS", isPadding: false, align: "text-left", className: "mb-m" }), colors?.length ? (jsxs("div", { className: "flex text-secondary-text mb-m", children: [jsx("div", { className: "mr-xs", children: jsx(Text, { size: "text-s", align: "text-left", font: "font-light", children: "\u0426\u0432\u0435\u0442\u0430:" }) }), colors.map(renderColorOption)] })) : null, price ? (jsxs(Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null, renderButtonsSection([button], { buttonClassName: 'w-full mt-lg' })] })));
2600
+ const renderColorOption = (color, i) => (jsx("div", { role: "figure", className: `w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
1814
2601
 
1815
2602
  const alignTextStyle = 'text-left';
1816
2603
 
@@ -1866,14 +2653,6 @@
1866
2653
  return orientation === 'horizontal' ? (jsx(SwipeListControl, { onVisibleIndicesChange: handleSlideChange, children: tableColumns })) : (tableColumns);
1867
2654
  });
1868
2655
 
1869
- const imageAlignmentMap = {
1870
- start: 'self-start',
1871
- center: 'self-center',
1872
- end: 'self-end',
1873
- };
1874
- const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, backImage, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-3xl font-sans overflow-hidden', padding || defaultPadding, className), children: [title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: "grow relative flex flex-wrap @xl:flex-nowrap justify-between items-stretch gap-3xl", children: [renderImageContainer(leftImage, { imageAlign }), jsxs("div", { className: style('flex flex-col gap-3xl max-w-[600px] xl:max-w-[728px]', leftImage ? '' : 'grow'), children: [insetTitle, jsx("div", { className: "grow", children: children }), backImage ? (jsx("div", { className: "mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4", children: backImage })) : null, buttons] }), renderImageContainer(rightImage, { className: '-order-1 @xl:order-1', imageAlign })] })] })));
1875
- const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('flex-shrink-0', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
1876
-
1877
2656
  var Currency;
1878
2657
  (function (Currency) {
1879
2658
  Currency["RUB"] = "RUB";
@@ -1900,7 +2679,7 @@
1900
2679
  };
1901
2680
 
1902
2681
  const icon = { icon: 'GpsIcon' };
1903
- const CurrentLocation$1 = JSX(({ className = '', address }) => (jsxs("div", { className: `flex gap-s ${className}`, children: [jsx(RoundedIcon, { ...icon, iconBgVersion: "primary" }), jsxs("div", { className: "space-y-2xs", children: [address ? jsx("p", { className: "text-primary-main text-l", children: address }) : null, jsx("p", { className: "text-secondary-text text-m", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
2682
+ const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: `flex gap-s ${className}`, children: [jsx(RoundedIcon, { ...icon, iconBgVersion: "primary" }), jsxs("div", { className: "space-y-2xs", children: [address ? jsx("p", { className: "text-primary-main text-l", children: address }) : null, jsx("p", { className: "text-secondary-text text-m", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
1904
2683
 
1905
2684
  const roundTo = (value, precision = 2) => {
1906
2685
  const factor = 10 ** precision;
@@ -2004,7 +2783,7 @@
2004
2783
  };
2005
2784
 
2006
2785
  const EXCHANGE_RATES_URL = '/api/v1/exchangerates';
2007
- const REGION_URL$1 = '/api/v1/region';
2786
+ const REGION_URL = '/api/v1/region';
2008
2787
  function useFetchExchangeRateData() {
2009
2788
  const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchData);
2010
2789
  return data || {};
@@ -2017,7 +2796,7 @@
2017
2796
  };
2018
2797
  const fetchRegion = async () => {
2019
2798
  try {
2020
- return await fetchJSONUnsafe(REGION_URL$1, { method: 'GET' });
2799
+ return await fetchJSONUnsafe(REGION_URL, { method: 'GET' });
2021
2800
  }
2022
2801
  catch (error) {
2023
2802
  console.log(error);
@@ -2043,12 +2822,14 @@
2043
2822
  currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
2044
2823
  const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
2045
2824
  currencyRatesSell.push({ currency: { currency: Currency.RUB } });
2046
- return (jsx(BlockWrapper, { className: style('box-border min-h-80', className), ...rest, children: jsx(BaseTile, { className: "h-full", title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex gap-6xl flex-wrap", children: [jsxs("div", { children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-xl", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation$1, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
2825
+ return (jsx(BlockWrapper, { className: style('box-border min-h-80', className), ...rest, children: jsx(BaseTile, { className: "h-full", title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex gap-6xl flex-wrap", children: [jsxs("div", { children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-xl", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
2047
2826
  });
2048
2827
  const getCurrencyRates = (currencies) => {
2049
2828
  return currencies?.filter((_) => _?.currency?.id === 1 || _?.currency?.id === 2) || [];
2050
2829
  };
2051
2830
 
2831
+ const useSitemap = (fallback) => useSWRResource(projectSettings.SITEMAP || 'sitemap', fallback);
2832
+
2052
2833
  const linkListStyles = '';
2053
2834
 
2054
2835
  const LinkList = JSX(({ className = '', items }) => items?.length ? (jsx("ul", { className: style('flex flex-col', linkListStyles, className), children: items.map(renderLinkListItem) })) : null);
@@ -2070,9 +2851,9 @@
2070
2851
 
2071
2852
  const getIconName = (isUnfolded) => isUnfolded ? 'ArrowUpSolidIcon' : 'ArrowDownSolidIcon';
2072
2853
 
2073
- const renderRoundedIcon = (icon, iconBgVersion) => (jsx(RoundedIcon, { ...icon, iconBgVersion: iconBgVersion }));
2854
+ const renderRoundedIcon = (icon, iconBgVersion) => (jsx(RoundedIcon, { ...icon, iconBgVersion: iconBgVersion, className: "shrink-0" }));
2074
2855
 
2075
- const rollupIconVersion = 'normal';
2856
+ const rollupIconVersion = 'black';
2076
2857
 
2077
2858
  const rollupItemStyles = '';
2078
2859
 
@@ -2103,7 +2884,7 @@
2103
2884
  })) : (jsx(DefaultFoldButton, { label: label, icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: onToggle }));
2104
2885
  };
2105
2886
  const renderPrimaryFoldButton = ({ label, labelIconBgVersion, icon, onToggle, labelIcon, }) => {
2106
- return (jsxs("button", { className: style('border-none bg-transparent flex justify-between items-center w-full group/button', labelIcon?.icon ? 'py-xs' : 'py-lg'), onClick: onToggle, children: [jsxs("div", { className: "flex items-center group-hover/button:text-primary-main gap-s", children: [renderRoundedIcon(labelIcon, labelIconBgVersion), label ? (jsx(Text, { size: "text-h6", font: "font-normal", children: label })) : null] }), icon ? jsx(Icon, { name: icon, iconVersion: rollupIconVersion, width: "24", height: "24" }) : null] }));
2887
+ return (jsxs("button", { className: style('border-none bg-transparent flex justify-between items-center w-full group/button', labelIcon?.icon ? 'py-xs' : 'py-lg'), onClick: onToggle, children: [jsxs("div", { className: "flex items-center text-start group-hover/button:text-primary-main gap-s", children: [renderRoundedIcon(labelIcon, labelIconBgVersion), label ? (jsx(Text, { size: "text-h6", font: "font-normal", children: label })) : null] }), icon ? jsx(Icon, { name: icon, iconVersion: rollupIconVersion, width: "24", height: "24" }) : null] }));
2107
2888
  };
2108
2889
 
2109
2890
  const Contacts = JSX(({ className = '', items }) => (jsxs("div", { className: className, children: [items?.length ? items.map(renderContactsGroup) : null, jsx(Button, { version: "primary", className: "w-full", href: "https://www.rshb.ru/feedback/question/", target: "_blank", ariaLabel: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C", text: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C" })] })));
@@ -2139,9 +2920,11 @@
2139
2920
 
2140
2921
  const TextInformation = JSX(({ className = '', links }) => (jsxs("div", { className: className, children: [jsx("div", { className: "pt-lg", children: jsx(Text, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex flex-col sm:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ..._ }, String(i)))) })) : null] })));
2141
2922
 
2142
- const Footer = JSX(({ className, sitemap, ...rest }) => {
2143
- const { relatedEnterprises, contacts, socialMedia, mobileApps, horizontalNavigationTitle, documents, } = useSWRResource(projectSettings.FOOTER || 'footer', rest.options?.page?.fallback);
2144
- return (jsxs(BlockWrapper, { tag: "footer", className: className, ...rest, children: [jsx("div", { className: "mb-lg pb-xs border-b border-main-divider", children: sitemap?.topItems?.map((item, i) => (jsx(RollupItem, { label: item?.text, labelIcon: item?.icon, children: jsx(LinkList, { items: item.items }) }, String(i)))) }), jsx(Contacts, { className: "overflow-hidden", items: contacts }), jsxs("div", { className: "mt-xl", children: [jsx(SocialMedia, { className: "mb-xl", media: socialMedia, buttonSize: "stretched", children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), jsx("div", { className: "mt-xs", children: mobileApps?.map(renderButton) })] }), jsx(HorizontalNavigation, { className: "py-lg border-y border-main-divider", title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
2923
+ const Footer = JSX(({ className, ...rest }) => {
2924
+ const fallback = rest.options?.page?.fallback;
2925
+ const { topItems } = useSitemap(fallback);
2926
+ const { relatedEnterprises, contacts, socialMedia, mobileApps, horizontalNavigationTitle, documents, } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
2927
+ return (jsxs(BlockWrapper, { tag: "footer", className: className, ...rest, children: [jsx("div", { className: "mb-lg pb-xs border-b border-main-divider", children: topItems?.map((item, i) => (jsx(RollupItem, { label: item?.text, labelIcon: item?.icon, children: jsx(LinkList, { items: item.items }) }, String(i)))) }), jsx(Contacts, { className: "overflow-hidden", items: contacts }), jsxs("div", { className: "mt-xl", children: [jsx(SocialMedia, { className: "mb-xl", media: socialMedia, buttonSize: "stretched", children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), jsx("div", { className: "mt-xs", children: mobileApps?.map(renderButton) })] }), jsx(HorizontalNavigation, { className: "py-lg border-y border-main-divider", title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
2145
2928
  });
2146
2929
  const renderButton = ({ href = '/' }, i) => {
2147
2930
  const { label } = findIconByHref(href);
@@ -2181,23 +2964,25 @@
2181
2964
  };
2182
2965
  const HeaderTop = JSX(({ bgColor, logo, internetBankUrl, version }) => {
2183
2966
  const router = useRouter();
2184
- const isRootLocation = router.pathname === '/';
2185
- const onClick = useCallback(() => {
2967
+ const isRootLocation = projectSettings.BASE_PATH?.startsWith(router.pathname);
2968
+ const onClick = useCallback((e) => {
2969
+ e.preventDefault();
2186
2970
  router.back();
2187
2971
  }, []);
2188
- return (jsxs("div", { className: "flex items-center justify-between w-full", children: [isRootLocation ? (jsx(Logo, { bgColor: bgColor, logo: logo })) : (jsxs(Button, { className: "flex items-center text-l", ariaLabel: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434", onClick: onClick, children: [jsx(Img, { className: "w-6 h-6", image: {
2189
- icon: 'ChevronLeft',
2190
- iconVersion: 'black',
2191
- } }), "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434"] })), internetBankUrl ? (jsx(Button, { href: internetBankUrl, ariaLabel: "\u0412\u043E\u0439\u0442\u0438", target: "_blank", className: style('p-s my-2xs text-s whitespace-nowrap text-primary-main hover:text-primary-hover', BUTTON_STYLE[version === 'transparent' ? 'transparent' : 'default']), children: "\u0412\u043E\u0439\u0442\u0438" })) : null] }));
2972
+ return (jsxs("div", { className: "flex items-center justify-between w-full", children: [isRootLocation ? (jsx(Logo, { className: "mt-2xs", bgColor: bgColor, logo: logo })) : (renderBackButton(onClick)), internetBankUrl ? (jsx(Button, { href: internetBankUrl, ariaLabel: "\u0412\u043E\u0439\u0442\u0438", target: "_blank", className: style('p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover', BUTTON_STYLE[version === 'transparent' ? 'transparent' : 'default']), children: "\u0412\u043E\u0439\u0442\u0438" })) : null] }));
2192
2973
  });
2974
+ const renderBackButton = (onClick) => (jsxs("button", { className: "flex items-center text-l mt-2xs", "aria-label": "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434", onClick: onClick, children: [jsx(Img, { className: "w-6 h-6", image: {
2975
+ icon: 'ChevronLeftIcon',
2976
+ iconVersion: 'black',
2977
+ }, width: "24", height: "24" }), "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434"] }));
2193
2978
 
2194
2979
  const BG_COLOR_TO_BLOCK_VERSION = {
2195
2980
  'bg-white': 'primary',
2196
2981
  transparent: 'transparent',
2197
2982
  };
2198
- const Header = JSX(({ bgColor = 'bg-white', version = BG_COLOR_TO_BLOCK_VERSION[bgColor], sitemap, ...rest }) => {
2199
- const { logo, internetBankUrl } = sitemap || {};
2200
- return (jsx(BlockWrapper, { tag: "header", defaultPadding: "", version: version, ...rest, children: jsx("div", { className: "container px-4 py-2xs box-border", children: jsx(HeaderTop, { bgColor: bgColor, logo: logo, internetBankUrl: internetBankUrl, version: version, ...rest }) }) }));
2983
+ const Header = JSX(({ bgColor = 'bg-white', version = BG_COLOR_TO_BLOCK_VERSION[bgColor], ...rest }) => {
2984
+ const { logo, internetBankUrl } = useSitemap(rest.options?.page?.fallback);
2985
+ return (jsx(BlockWrapper, { tag: "header", defaultPadding: "", version: version, ...rest, children: jsx("div", { className: "container px-5 py-2xs box-border", children: jsx(HeaderTop, { bgColor: bgColor, logo: logo, internetBankUrl: internetBankUrl, version: version, ...rest }) }) }));
2201
2986
  });
2202
2987
 
2203
2988
  const gapStyles = {
@@ -2286,56 +3071,9 @@
2286
3071
 
2287
3072
  const MobileAppTile = JSX(({ className, padding, alignTitle = 'left', buttons = [], description, headingType = 'h4', image, items, qr, title = 'Мобильное приложение', version = 'primary', ...rest }) => {
2288
3073
  const containerStyle = version === 'secondary' ? 'p-m min-w-32' : 'min-w-24';
2289
- return (jsx(BlockWrapper, { className: style('min-h-80', className), padding: "p-0", version: version, ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, defaultPadding: "p-6xl", title: title ? (jsx(Heading, { headingType: headingType, title: title, className: style('whitespace-pre-wrap', AlignText[alignTitle]) })) : null, buttons: renderButtonsSection(buttons, { isVertical: buttons.length > 4 }), children: [renderDescription$1(description), jsxs("div", { className: "flex flex-1 flex-wrap gap-m items-center", children: [qr?.src ? (jsx("div", { className: style('flex justify-center bg-white rounded-md', containerStyle), children: jsx(Img, { className: "w-fit", image: qr }) })) : null, renderList$1(items), image?.src ? jsx(Img, { image: image }) : null] })] }) }));
3074
+ return (jsx(BlockWrapper, { className: style('min-h-80', className), padding: "p-0", version: version, ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, defaultPadding: "p-6xl", title: title ? (jsx(Heading, { headingType: headingType, title: title, className: style('whitespace-pre-wrap', AlignText[alignTitle]) })) : null, rightImage: image?.src ? jsx(Img, { className: "hidden lg:block", image: image }) : null, buttons: renderButtonsSection(buttons, { isVertical: buttons.length > 4 }), children: [renderDescription$1(description), jsxs("div", { className: "flex flex-1 flex-wrap gap-m items-center", children: [qr?.src ? (jsx("div", { className: style('flex justify-center bg-white rounded-md', containerStyle), children: jsx(Img, { className: "w-fit", image: qr }) })) : null, renderList$1(items), image?.src ? jsx(Img, { className: "lg:hidden", image: image }) : null] })] }) }));
2290
3075
  });
2291
3076
 
2292
- const sum = (list = []) => list.reduce((a, b) => a + b, 0);
2293
-
2294
- const avg = (items = []) => (items?.length ? sum(items) / items.length : 0);
2295
-
2296
- const deviation = (items) => items?.length ? Math.sqrt(Math.abs(avg(items.map((_) => _ ** 2)) - avg(items) ** 2)) : 0;
2297
-
2298
- const renderBenefitIcon = (icon, benefitsVersion = 'normal') => icon ? (jsx("div", { className: style('w-12 h-12 min-w-12 box-border flex items-center justify-center rounded-icon', benefitsVersion === 'normal'
2299
- ? 'bg-secondary-light text-primary-main'
2300
- : 'bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black'), children: jsx(Img, { className: "w-6 h-6", image: { ...icon, iconVersion: icon.iconVersion || benefitsVersion } }) })) : null;
2301
-
2302
- const RichText = JSX((props) => {
2303
- const { __html = '', richVersion = '' } = props;
2304
- return (jsx("div", { className: style(richVersion, 'md-container'), dangerouslySetInnerHTML: { __html } }));
2305
- });
2306
-
2307
- const renderBenefitDescription = (description, i) => description ? (jsx(Paragraph, { font: "font-light", size: "text-m", color: "text-secondary-text group-data-secondary:text-white", children: description }, `description-${i}`)) : null;
2308
-
2309
- const renderBenefitLabel = (label, i) => label ? (jsx(Text, { color: "text-primary-text group-data-secondary:text-white", size: "text-h6", children: label }, `label-${i}`)) : null;
2310
-
2311
- const renderBenefitText = (_, i) => _.type === 'rte' && '__html' in _ && _.__html ? (jsx(RichText, { ..._ }, `rte-${i}`)) : ([
2312
- 'label' in _ ? renderBenefitLabel(_.label, i) : null,
2313
- 'description' in _ ? renderBenefitDescription(_.description, i) : null,
2314
- ]);
2315
-
2316
- const BenefitItem = JSX(({ className, benefitsVersion, ..._ }) => (jsxs("div", { className: style('flex gap-m', 'description' in _ && _.description ? 'items-start' : 'items-center', className), children: ['icon' in _ ? renderBenefitIcon(_.icon, benefitsVersion) : null, jsx("div", { children: renderBenefitText(_) })] })));
2317
-
2318
- const MAX_BENEFITS_LEN_DEVIATION = 16;
2319
- const benefitLength = (_) => _.type === 'rte'
2320
- ? _.__html?.length || 0
2321
- : Math.max(_.label?.length || 0, _.description?.length || 0);
2322
- const isDistortedBenefits = (benefits) => deviation(benefits.map(benefitLength)) > MAX_BENEFITS_LEN_DEVIATION;
2323
- const DefaultBenefitsList = JSX(({ className, benefitsVersion = 'normal', benefits }) => benefits?.length ? (jsx("div", { className: style('flex gap-x-m gap-y-s', isDistortedBenefits(benefits) ? 'flex-col' : 'flex-wrap', className), children: benefits.map((_, i) => (jsx(BenefitItem, { benefitsVersion: benefitsVersion, ..._ }, String(i)))) })) : null);
2324
-
2325
- const TabularBenefitsList = JSX(({ className, benefits }) => benefits?.length ? (jsx("div", { className: style('grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs', className), children: benefits.flatMap(renderBenefitText) })) : null);
2326
-
2327
- const BenefitsList = JSX(({ isTabularBenefits, ...rest }) => isTabularBenefits ? jsx(TabularBenefitsList, { ...rest }) : jsx(DefaultBenefitsList, { ...rest }));
2328
-
2329
- const Tags = JSX(({ className, tags }) => tags?.length ? (jsx("div", { className: style('flex flex-wrap gap-xs', className), role: "list", children: tags.map(renderTag) })) : null);
2330
- const renderTag = (tag, key) => (jsx("div", { className: "py-2 px-2.5 border-solid border rounded-md border-gray", role: "listitem", children: jsx(Text, { size: "text-m", font: "font-light", children: tag }) }, String(key)));
2331
-
2332
- const BaseProductTile = JSX(({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', isInsetTitle = true, benefitsVersion, isTabularBenefits, benefits, __html, items, isDotted = true, listItemSize, tags, buttons, image, imageOptions: { imageAlign = 'end', directionRight = true, isBackground } = {}, children, }) => {
2333
- const img = image?.src ? jsx(Img, { image: image }) : null;
2334
- const headline = (jsx(Headline, { title: title, description: description, headlineVersion: headlineVersion, align: align, isPadding: false }));
2335
- return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isInsetTitle ? { insetTitle: headline } : { title: headline }), ...(isBackground ? { backImage: img } : leftOrRightImage(img, directionRight)), imageAlign: imageAlign, buttons: renderButtonsSection(buttons), children: jsxs("div", { className: "flex flex-col gap-xl", children: [jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: benefits }), __html ? jsx(RichText, { __html: __html }) : null, items?.length ? (jsx(List, { items: items, isDotted: isDotted, listItemSize: listItemSize })) : null, children, tags?.length ? jsx(Tags, { tags: tags }) : null] }) }));
2336
- });
2337
- const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
2338
-
2339
3077
  const renderInsuranceSumMonth = (sum, monthLimit) => sum || monthLimit ? (jsxs("div", { className: "flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl", children: [Number(sum) > 0 ? renderValueBlock('Страховая сумма:', sum) : null, Number(monthLimit) > 0 ? renderValueBlock('Ежемесячный лимит:', monthLimit) : null] })) : null;
2340
3078
  const renderValueBlock = (title, value = 0) => (jsxs("div", { className: "basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre", children: [jsx(Text, { font: "font-light", size: "text-l", children: title }), jsxs(Text, { size: "text-h6", color: "text-primary-text", children: [toLocalNumberFormat(2)(value), " \u20BD"] })] }));
2341
3079
 
@@ -2805,106 +3543,65 @@
2805
3543
  return (jsx("div", { className: style(iconAreaSize, containerStyle, 'z-10 mr-s flex justify-center content-center'), children: jsx("span", { className: "flex self-center text-h4 text-secondary-text group-data-secondary:text-white", children: checkCanRenderIcon(step?.icon) ? (jsx(Img, { image: { ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }, width: iconSize, height: iconSize })) : (jsx("span", { children: i + 1 })) }) }));
2806
3544
  };
2807
3545
 
2808
- const LINK_CLASSES = 'h-12 flex-1 flex items-center justify-center cursor-pointer';
2809
- const INACTIVE_LINK_CLASSES = 'group/btn bg-white';
2810
- const SCROLLABLE_ACTIVE_LINK_CLASSES = 'bg-white text-primary-main';
2811
- const WIDESCREEN_ACTIVE_LINK_CLASSES = 'bg-primary-main text-white';
2812
- const TEXT_CLASSES = 'font-sans text-m text-center';
2813
- const ACTIVE_TEXT_CLASSES = 'text-white';
2814
- const INACTIVE_TEXT_CLASSES = 'text-secondary-text sm:group-hover/btn:text-primary-main';
2815
- const TAB_CLASSES = {
2816
- block: {
2817
- scrollable: {
2818
- active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
2819
- default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
2820
- },
2821
- centered: {
2822
- active: `px-4 rounded-md ${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
2823
- default: `px-4 rounded-md ${LINK_CLASSES} group/btn bg-transparent whitespace-nowrap`,
2824
- },
2825
- wideScreen: {
2826
- active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
2827
- default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES} whitespace-nowrap`,
2828
- },
2829
- },
2830
- text: {
2831
- scrollable: {
2832
- active: `${TEXT_CLASSES} flex items-center h-full border-0 border-b-2`,
2833
- default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
2834
- },
2835
- centered: {
2836
- active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES}`,
2837
- default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
2838
- },
2839
- wideScreen: {
2840
- active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES} text-black px-2.5 bg-white sm:bg-primary-main sm:text-white`,
2841
- default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES} px-2.5 bg-white`,
2842
- },
2843
- },
3546
+ const tabPaddingStyleMap = {
3547
+ default: 'px-xs',
3548
+ underlined: 'px-m',
3549
+ rounded: 'px-lg rounded-md',
2844
3550
  };
2845
- const getTabClassName = (type, active, tabsMode) => {
2846
- const styleActive = active ? 'active' : 'default';
2847
- const mode = tabsMode || 'wideScreen';
2848
- return TAB_CLASSES[type][mode][styleActive];
3551
+ const tabTextStyle = 'text-secondary-text hover:text-primary-main';
3552
+ const activeTabTextStyleMap = {
3553
+ default: 'text-black sm:text-white',
3554
+ underlined: 'text-primary-main border-b-2',
3555
+ rounded: 'text-white',
2849
3556
  };
2850
-
2851
- const LinkTab = JSX((props) => {
2852
- const { tab, currentTab, onClick, tabsMode } = props;
2853
- const active = currentTab?.type === 'link' && currentTab.href === tab.href;
3557
+ const tabBgStyleMap = {
3558
+ default: 'bg-white',
3559
+ underlined: 'bg-white',
3560
+ rounded: 'bg-transparent',
3561
+ };
3562
+ const activeTabBgStyleMap = {
3563
+ default: 'sm:bg-primary-main',
3564
+ underlined: 'bg-white',
3565
+ rounded: 'bg-primary-main',
3566
+ };
3567
+ const TabItem = JSX(({ item = {}, isActive, onClick, type = 'default' }) => {
2854
3568
  const link = useLink();
2855
- const adjustedProps = link(tab);
2856
- const handleClick = (ev) => {
2857
- adjustedProps.onClick(ev);
2858
- onClick(tab);
3569
+ const handleClick = () => {
3570
+ onClick && onClick(item);
2859
3571
  };
2860
- return (jsx("div", { className: getTabClassName('block', active, tabsMode), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsx("a", { role: "tab", className: style('flex flex-1 items-center justify-center h-full', getTabClassName('text', active, tabsMode)), target: tab.target, href: adjustedProps.href, onClick: handleClick, children: jsx("span", { children: tab.text }) }) }));
3572
+ const { text, ...linkProps } = link({ ...item, onClick: handleClick });
3573
+ const Tag = item.href ? 'a' : 'div';
3574
+ return (jsx(Tag, { className: style('h-12', 'block flex-1', 'cursor-pointer', tabPaddingStyleMap[type], isActive ? activeTabBgStyleMap[type] : tabBgStyleMap[type]), role: "tab", "aria-selected": isActive, ...linkProps, children: jsx("div", { className: style('h-full', 'flex justify-center items-center', 'text-center whitespace-nowrap', isActive ? activeTabTextStyleMap[type] : tabTextStyle), children: jsx(Text, { size: "text-m", children: text }) }) }));
2861
3575
  });
2862
3576
 
2863
- const BADGE_CLASSES = 'bg-main-divider min-w-[22px] h-[22px] rounded-full text-xs ml-xs flex justify-center items-center';
2864
- const LIGHT_BADGE_CLASSES = 'bg-white/30 text-white';
2865
- const DARK_BADGE_CLASSES = 'text-secondary-text group-hover/btn:text-primary-main';
2866
- const renderGroupTab = ({ page, currentTab, showCounter, onClick, tabsMode }) => (tab, i) => {
2867
- const active = currentTab === tab;
2868
- const count = tab.ref && page?.blocks
2869
- ? page.blocks.filter((block) => block?.labels?.includes(tab.ref)).length
2870
- : 0;
2871
- return (jsx("div", { className: getTabClassName('block', active, tabsMode), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: style('flex flex-1 items-center justify-center h-full', getTabClassName('text', active, tabsMode)), children: [jsx("span", { children: tab.title }), showCounter && count ? renderCount(tabsMode, count, active) : null] }) }, `group-${String(i)}`));
2872
- };
2873
- const renderCount = (tabsMode, count, active) => {
2874
- return (jsx("div", { className: style(BADGE_CLASSES, active && tabsMode !== 'scrollable' ? LIGHT_BADGE_CLASSES : DARK_BADGE_CLASSES), children: count }));
2875
- };
3577
+ const renderTab = (activeTab, onClick, type) => (tab, i) => (jsx(TabItem, { isActive: tab === activeTab, onClick: onClick, type: type, item: tab }, String(i)));
2876
3578
 
2877
- const renderTab = ({ page, showCounter, ...rest }) => (tab, i) => {
2878
- const type = tab.type;
2879
- if (!(type === 'group' || type === 'link')) {
2880
- return null;
2881
- }
2882
- switch (type) {
2883
- case 'group':
2884
- return renderGroupTab({ page, showCounter, ...rest })(tab, i);
2885
- case 'link': {
2886
- return jsx(LinkTab, { tab: tab, ...rest }, String(i));
2887
- }
2888
- default:
2889
- assertUnreachable(type);
2890
- }
2891
- return null;
2892
- };
2893
-
2894
- const CenteredTabs = JSX(({ tabs, ...rest }) => (jsx("div", { className: "flex p-1 m-auto bg-main-gray rounded-md", children: tabs?.map(renderTab({ ...rest })) })));
2895
-
2896
- const scrollButtonStyle = 'absolute z-40 top-0';
2897
- const ScrollableTabs = JSX((props) => {
2898
- const { tabs, ...rest } = props;
3579
+ const scrollButtonStyle = 'hidden sm:flex absolute z-40 top-0';
3580
+ const ScrollableTabsControl = JSX(({ className, items = [], value, onChange, tabsType }) => {
2899
3581
  const [containerRef, scroll] = useSwipeListScroll({
2900
- itemCount: tabs?.length || 0,
3582
+ itemCount: items?.length || 0,
2901
3583
  });
2902
- return (jsxs("div", { className: "relative max-w-full m-auto", children: [jsx("div", { className: `font-sans max-w-full w-full overflow-hidden relative bg-white`, children: jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs?.map(renderTab({ ...rest })) }) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: `${scrollButtonStyle} left-6`, onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: `${scrollButtonStyle} rotate-180 right-6`, onClick: scroll.scrollRight })) : null] }));
3584
+ return (jsxs("div", { className: style('relative overflow-x-auto no-scrollbar', className), role: "tablist", children: [jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: items.map(renderTab(value, onChange, tabsType)) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: style('left-6', scrollButtonStyle), onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: style('right-6', scrollButtonStyle), onClick: scroll.scrollRight })) : null] }));
2903
3585
  });
2904
3586
 
2905
- const Tabs = JSX((props) => {
2906
- const { className = '', isSticky, tabs, ...rest } = props;
2907
- const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
3587
+ const TabsControl = JSX(({ className, tabsType = 'default', items = [], value, onChange }) => (jsx("div", { className: style('flex gap-x-2xs overflow-x-auto no-scrollbar', className), role: "tablist", children: items.map(renderTab(value, onChange, tabsType)) })));
3588
+
3589
+ const renderTabs = ({ tabsMode, ...props }) => {
3590
+ switch (tabsMode) {
3591
+ case 'wideScreen':
3592
+ return jsx(TabsControl, { ...props });
3593
+ case 'centered':
3594
+ return (jsx("div", { className: "flex", children: jsx(TabsControl, { className: "m-auto p-xs rounded-md bg-main-gray", tabsType: "rounded", ...props }) }));
3595
+ case 'scrollable':
3596
+ return (jsx("div", { className: "flex", children: jsx(ScrollableTabsControl, { className: "m-auto", tabsType: "underlined", ...props }) }));
3597
+ default:
3598
+ return null;
3599
+ }
3600
+ };
3601
+
3602
+ const Tabs = JSX(({ className = '', isSticky, tabs = [], tabsMode, ...rest }) => {
3603
+ const normalizedTabs = useMemo(() => tabs.map(normalizeTab), [tabs]);
3604
+ const [activeTabIndex, setActiveTabIndex] = useState(0);
2908
3605
  useEffect(() => {
2909
3606
  if (!tabs || !tabs[0]) {
2910
3607
  return;
@@ -2912,27 +3609,23 @@
2912
3609
  fireTabEvent(tabs[0]);
2913
3610
  }, []);
2914
3611
  useEffect(() => {
2915
- if (currentTab?.type === 'group') {
2916
- defaultEventBus.subject('tab', { type: currentTab.type, label: currentTab.ref });
2917
- }
2918
- }, [currentTab]);
2919
- const handleClick = useCallback((selectedTab) => {
2920
- fireTabEvent(selectedTab);
2921
- setCurrentTab(selectedTab);
3612
+ const activeTab = tabs[activeTabIndex];
3613
+ if (activeTab?.type === 'group') {
3614
+ defaultEventBus.subject('tab', { type: activeTab.type, label: activeTab.ref });
3615
+ }
3616
+ }, [tabs, activeTabIndex]);
3617
+ const handleChange = useCallback((_) => {
3618
+ const index = normalizedTabs.indexOf(_);
3619
+ setActiveTabIndex(index);
3620
+ fireTabEvent(tabs[index]);
2922
3621
  }, []);
2923
- return (jsx(BlockWrapper, { className: style('relative box-border flex gap-x-1 w-full overflow-x-auto no-scrollbar', isSticky ? 'sticky top-1 z-20' : '', className), defaultPadding: "p-0", role: "tablist", ...rest, children: renderTabs({ tabs, onClick: handleClick, currentTab, ...rest }) }));
3622
+ return (jsx(BlockWrapper, { className: style(isSticky ? 'sticky top-1 z-20' : '', className), defaultPadding: "p-0", ...rest, children: renderTabs({
3623
+ items: normalizedTabs,
3624
+ onChange: handleChange,
3625
+ value: normalizedTabs[activeTabIndex],
3626
+ tabsMode,
3627
+ }) }));
2924
3628
  });
2925
- const renderTabs = ({ tabsMode, tabs, ...rest }) => {
2926
- switch (tabsMode) {
2927
- case 'wideScreen':
2928
- return tabs?.map(renderTab({ tabsMode, ...rest }));
2929
- case 'centered':
2930
- return jsx(CenteredTabs, { tabs: tabs, tabsMode: tabsMode, ...rest });
2931
- case 'scrollable':
2932
- return jsx(ScrollableTabs, { tabs: tabs, tabsMode: tabsMode, ...rest });
2933
- }
2934
- return null;
2935
- };
2936
3629
  const fireTabEvent = (tab) => {
2937
3630
  if (tab.type === 'group') {
2938
3631
  defaultEventBus.fire('tab', { type: tab.type, label: tab.ref });
@@ -2941,6 +3634,7 @@
2941
3634
  defaultEventBus.fire('tab', { type: tab.type, label: tab.href });
2942
3635
  }
2943
3636
  };
3637
+ const normalizeTab = (_) => (_?.type === 'group' ? { text: _.title } : _);
2944
3638
 
2945
3639
  const renderButtonsCellData = ({ buttons }) => renderButtonsSection(buttons, {
2946
3640
  className: 'mt-3',
@@ -2997,6 +3691,7 @@
2997
3691
  ApplicationForm,
2998
3692
  ButtonsBlock,
2999
3693
  BonusBenefitsBlock,
3694
+ Calculator,
3000
3695
  CardTransfer,
3001
3696
  Carousel,
3002
3697
  CarouselCard,
@@ -3030,52 +3725,6 @@
3030
3725
  BenefitsBlock,
3031
3726
  };
3032
3727
 
3033
- const STORAGE_DEFAULT_TTL = 86400000; // 24 * 60 * 60 * 1000
3034
- function useCachedAsyncData(key, fetcher, storage = globalThis?.localStorage) {
3035
- const cachedFetcher = useCallback(async (...args) => {
3036
- const storageKey = `async:${key}`;
3037
- const storageData = storage.getItem(storageKey);
3038
- const cachedData = getParsedData(storageData);
3039
- if (cachedData) {
3040
- return cachedData;
3041
- }
3042
- const data = await fetcher(...args);
3043
- storage.setItem(storageKey, JSON.stringify({ data, timestamp: Date.now() }));
3044
- return data;
3045
- }, [key, fetcher]);
3046
- return useAsyncData(key, cachedFetcher);
3047
- }
3048
- function getParsedData(storageData) {
3049
- const { data = null, timestamp = null } = storageData ? JSON.parse(storageData) : {};
3050
- return data && Date.now() - timestamp < STORAGE_DEFAULT_TTL ? data : undefined;
3051
- }
3052
-
3053
- const REGION_URL = '/api/v1/region';
3054
- function useLocation(defaultLocation = 'Москва') {
3055
- const currentLocation = getLocalStorageLocation();
3056
- const [location, setLocation] = useState(currentLocation?.region ?? { name: defaultLocation });
3057
- const { data } = useCachedAsyncData(REGION_URL, fetchJSONUnsafe);
3058
- useEffect(() => {
3059
- setLocation(currentLocation?.region && currentLocation?.manual
3060
- ? currentLocation.region
3061
- : data || { name: defaultLocation });
3062
- }, [data]);
3063
- const onChangeLocation = useCallback((region) => {
3064
- globalThis.localStorage?.setItem('location', JSON.stringify({ manual: true, region }));
3065
- setLocation(region);
3066
- }, []);
3067
- return [location, onChangeLocation];
3068
- }
3069
- const getLocalStorageLocation = () => {
3070
- const localStorageLocation = globalThis.localStorage?.getItem('location');
3071
- try {
3072
- return localStorageLocation ? JSON.parse(localStorageLocation) : null;
3073
- }
3074
- catch (_) {
3075
- return null;
3076
- }
3077
- };
3078
-
3079
3728
  const debounce = (fn, delay = 600) => {
3080
3729
  let timerId;
3081
3730
  const debouncedCallback = (...args) => {
@@ -3138,59 +3787,12 @@
3138
3787
  };
3139
3788
  }, deps);
3140
3789
 
3141
- const CloseButton = JSX(({ className, onClick }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-1 bg-transparent border-none', className), onClick: onClick, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(Img, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
3142
-
3143
- function useDialogHandlers({ onOpen, onClose } = {}) {
3144
- useEffect(() => defaultEventBus.subscribe('dialog', (action) => {
3145
- switch (action.type) {
3146
- case 'open':
3147
- onOpen && onOpen(action);
3148
- break;
3149
- case 'close':
3150
- onClose && onClose();
3151
- break;
3152
- default:
3153
- assertUnreachable(action);
3154
- }
3155
- }), [onOpen, onClose]);
3156
- }
3157
-
3158
- function useDialogProps(id, isOpenedOnInit = false) {
3159
- const [isOpened, { setTrue: open, setFalse: close }] = useBool(isOpenedOnInit);
3160
- const [params, setParams] = useState({ id });
3161
- const wasOpened = useRef(isOpened);
3162
- wasOpened.current ||= isOpened;
3163
- const handleOpen = useCallback((_) => {
3164
- if (_.id === id) {
3165
- setParams(_);
3166
- open();
3167
- }
3168
- else {
3169
- close();
3170
- }
3171
- }, [id]);
3172
- const handleClose = useCallback(() => {
3173
- close();
3174
- defaultEventBus.fire('dialog', { type: 'close' });
3175
- }, []);
3176
- useDialogHandlers({
3177
- onOpen: handleOpen,
3178
- onClose: close,
3179
- });
3180
- return {
3181
- ...params,
3182
- isOpened,
3183
- wasOpened: wasOpened.current,
3184
- open,
3185
- close,
3186
- onClose: handleClose,
3187
- };
3188
- }
3790
+ const CloseButton = JSX(({ className, onClose }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-1 bg-transparent border-none', className), onClick: onClose, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(Img, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
3189
3791
 
3190
3792
  const COOKIE_DIALOG_ID = 'cookie';
3191
3793
  const DIALOG_INITIAL_DELAY = 3 * 1000;
3192
3794
  const CookiePopup = JSX(({ termLink, personalDataPolicyLink }) => {
3193
- const { isOpened, open, close } = useDialogProps(COOKIE_DIALOG_ID);
3795
+ const [opened, { setTrue: open, setFalse: close }] = useBool();
3194
3796
  useDebouncedEffect(() => {
3195
3797
  if (!globalThis.localStorage?.getItem(COOKIE_DIALOG_ID)) {
3196
3798
  open();
@@ -3199,274 +3801,72 @@
3199
3801
  const handleClose = useCallback(() => {
3200
3802
  globalThis.localStorage?.setItem(COOKIE_DIALOG_ID, 'true');
3201
3803
  close();
3202
- }, [close]);
3203
- return isOpened ? (jsx("div", { className: "container z-40 fixed bottom-0 left-0 right-0 pointer-events-none", children: jsxs("div", { className: "bg-white m-5 p-5 sm:m-6 sm:p-6 rounded-md flex sm:items-center pointer-events-auto shadow-[0_4px_25px_rgba(0,0,0,0.07)]", children: [jsx("div", { className: "sm:flex-1", children: jsxs(Paragraph, { size: "text-s", font: "font-light", color: "text-primary-text", children: ["\u0410\u041E \u00AB\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u00BB \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442", jsx(LinkWrapper, { isRemote: true, className: style(getStyleLinkWrapper(termLink?.href)), ...termLink, children: "cookie" }), "(\u0444\u0430\u0439\u043B\u044B \u0441 \u0434\u0430\u043D\u043D\u044B\u043C\u0438 \u043E \u043F\u0440\u043E\u0448\u043B\u044B\u0445 \u043F\u043E\u0441\u0435\u0449\u0435\u043D\u0438\u044F\u0445 \u0441\u0430\u0439\u0442\u0430) \u0434\u043B\u044F \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043E\u0432 \u0438 \u0443\u0434\u043E\u0431\u0441\u0442\u0432\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439. \u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0437\u0430\u043F\u0440\u0435\u0442\u0438\u0442\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435 cookie \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u0441\u0432\u043E\u0435\u0433\u043E \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.", jsx(LinkWrapper, { isRemote: true, className: style(getStyleLinkWrapper(personalDataPolicyLink?.href)), ...personalDataPolicyLink, children: "\u041E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0430 \u0412\u0430\u0448\u0438\u0445 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" }), "\u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0441\u044F \u0432 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C\u0438 \u0424\u0435\u0434\u0435\u0440\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u0430\u043A\u043E\u043D\u0430 \u043E\u0442 27.07.2006 \u2116 152-\u04243 \u00AB\u041E \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445\u00BB."] }) }), jsx("div", { className: "ml-3 sm:ml-0 w-24 flex justify-end", children: jsx(CloseButton, { className: "bg-main-gray rounded-md", onClick: handleClose }) })] }) })) : null;
3804
+ }, []);
3805
+ return opened ? (jsx("div", { className: "container fixed left-0 right-0 bottom-0 z-50", children: jsxs("div", { className: "bg-white m-xl p-xl rounded-md flex sm:items-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]", children: [jsx("div", { className: "sm:flex-1", children: jsxs(Paragraph, { size: "text-s", font: "font-light", color: "text-primary-text", children: ["\u0410\u041E \u00AB\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u00BB \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442", jsx(LinkWrapper, { isRemote: true, className: linkWrapperStyle(termLink?.href), ...termLink, children: "cookie" }), "(\u0444\u0430\u0439\u043B\u044B \u0441 \u0434\u0430\u043D\u043D\u044B\u043C\u0438 \u043E \u043F\u0440\u043E\u0448\u043B\u044B\u0445 \u043F\u043E\u0441\u0435\u0449\u0435\u043D\u0438\u044F\u0445 \u0441\u0430\u0439\u0442\u0430) \u0434\u043B\u044F \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043E\u0432 \u0438 \u0443\u0434\u043E\u0431\u0441\u0442\u0432\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439. \u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0437\u0430\u043F\u0440\u0435\u0442\u0438\u0442\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435 cookie \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u0441\u0432\u043E\u0435\u0433\u043E \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.", jsx(LinkWrapper, { isRemote: true, className: linkWrapperStyle(personalDataPolicyLink?.href), ...personalDataPolicyLink, children: "\u041E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0430 \u0412\u0430\u0448\u0438\u0445 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" }), "\u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0441\u044F \u0432 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C\u0438 \u0424\u0435\u0434\u0435\u0440\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u0430\u043A\u043E\u043D\u0430 \u043E\u0442 27.07.2006 \u2116 152-\u04243 \u00AB\u041E \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445\u00BB."] }) }), jsx("div", { className: "ml-s sm:ml-0 w-24 flex justify-end", children: jsx(CloseButton, { className: "bg-main-gray rounded-md", onClose: handleClose }) })] }) })) : null;
3204
3806
  });
3205
- const getStyleLinkWrapper = (href) => ['inline mx-1', href ? 'text-green-dark' : ''];
3807
+ const linkWrapperStyle = (href) => style('inline mx-1', href ? 'text-green-dark' : '');
3206
3808
 
3207
- const REGIONS_URL = '/api/v1/regions';
3208
- function useRegions() {
3209
- const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
3210
- return data || [];
3809
+ function useList(initialList = []) {
3810
+ const [list, setList] = useState(initialList);
3811
+ const push = useCallback((item) => setList((_) => [..._, item]), []);
3812
+ const pop = useCallback(() => setList((_) => _.slice(0, -1)), []);
3813
+ const remove = useCallback((item) => setList((_) => _.filter((currentItem) => currentItem !== item)), []);
3814
+ const clear = useCallback(() => setList([]), []);
3815
+ return [list, { setList, push, pop, remove, clear }];
3211
3816
  }
3212
3817
 
3213
- const JARO_WINKLER_P = 0.1;
3214
- const JARO_WINKLER_MAX_L = 4;
3215
- const jaroWinklerDistance = (s1) => (s2) => {
3216
- if (s1 === s2) {
3217
- return 1;
3218
- }
3219
- if (!s1 || !s2) {
3220
- return 0;
3221
- }
3222
- const { m, s1Matches, s2Matches } = computeM(s1, s2);
3223
- if (m === 0) {
3224
- return 0;
3225
- }
3226
- const t = computeT(s1, s2, { s1Matches, s2Matches });
3227
- const jaroWeight = (m / s1.length + m / s2.length + (m - t / 2) / m) / 3;
3228
- const winklerWeight = jaroWeight > 0.7 ? computePrefixL(s1, s2) * JARO_WINKLER_P : 0;
3229
- return jaroWeight + winklerWeight * (1 - jaroWeight);
3230
- };
3231
- function computeM(s1, s2) {
3232
- const range = Math.max(0, Math.floor(Math.max(s1.length, s2.length) / 2) - 1);
3233
- const s1Matches = new Array(s1.length);
3234
- const s2Matches = new Array(s2.length);
3235
- let m = 0;
3236
- for (let i = 0; i < s1.length; i++) {
3237
- const low = Math.max(0, i - range);
3238
- const high = Math.min(i + range, s2.length - 1);
3239
- for (let j = low; j <= high; j++) {
3240
- if (s1Matches[i] || s2Matches[j] || s1[i] !== s2[j]) {
3241
- continue;
3242
- }
3243
- m++;
3244
- s1Matches[i] = true;
3245
- s2Matches[j] = true;
3246
- }
3247
- }
3248
- return { m, s1Matches, s2Matches };
3249
- }
3250
- function computeT(s1, s2, { s1Matches, s2Matches }) {
3251
- let t = 0;
3252
- for (let i = 0, k = 0; i < s1.length; i++) {
3253
- if (!s1Matches[i]) {
3254
- continue;
3255
- }
3256
- let j = k;
3257
- for (; j < s2.length; j++) {
3258
- if (s2Matches[j]) {
3259
- k = j + 1;
3818
+ const DialogManager = JSX(() => {
3819
+ const [dialogs, { push, pop, clear }] = useList();
3820
+ const closeAll = useCallback(() => {
3821
+ for (const _ of dialogs) {
3822
+ _.onClose && _.onClose();
3823
+ }
3824
+ clear();
3825
+ }, [dialogs]);
3826
+ const close = useCallback(() => {
3827
+ const _ = dialogs[dialogs.length - 1];
3828
+ _?.onClose && _.onClose();
3829
+ pop();
3830
+ }, [dialogs]);
3831
+ useEffect(() => defaultEventBus.subscribe('dialog', (action) => {
3832
+ switch (action.type) {
3833
+ case 'open':
3834
+ push(action);
3260
3835
  break;
3261
- }
3262
- }
3263
- if (s1[i] !== s2[j]) {
3264
- t++;
3836
+ case 'close':
3837
+ if (action.all) {
3838
+ closeAll();
3839
+ }
3840
+ else {
3841
+ close();
3842
+ }
3843
+ break;
3844
+ default:
3845
+ assertUnreachable(action);
3265
3846
  }
3266
- }
3267
- return t;
3268
- }
3269
- function computePrefixL(s1, s2) {
3270
- let prefixL = 0;
3271
- while (s1[prefixL] === s2[prefixL] && prefixL < JARO_WINKLER_MAX_L) {
3272
- prefixL++;
3273
- }
3274
- return prefixL;
3275
- }
3276
-
3277
- const groupBy = (list, keyGetter) => {
3278
- const result = new Map();
3279
- for (const item of list) {
3280
- const key = keyGetter(item);
3281
- const group = result.get(key) || [];
3282
- result.set(key, [...group, item]);
3283
- }
3284
- return result;
3285
- };
3286
-
3287
- const Dialog = JSX(({ className, isOpened, head, children, onClose }) => {
3847
+ }), [closeAll, close]);
3288
3848
  useEffect(() => {
3289
3849
  const handleEscape = ({ key }) => {
3290
3850
  if (key === 'Escape') {
3291
- onClose && onClose();
3851
+ close();
3292
3852
  }
3293
3853
  };
3294
3854
  globalThis.document?.addEventListener('keydown', handleEscape);
3295
3855
  return () => {
3296
3856
  globalThis.document?.removeEventListener('keydown', handleEscape);
3297
3857
  };
3298
- }, [onClose]);
3299
- return isOpened ? (jsx("div", { className: style('fixed inset-0 bg-white text-l font-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar', className), role: "dialog", children: jsxs("div", { className: "relative container pb-6xl min-h-full", children: [jsxs("div", { className: "sticky bg-white pt-xl top-0", children: [jsx(CloseButton, { className: "absolute top-0 -right-6xl", onClick: onClose }), head] }), children] }) })) : null;
3300
- });
3301
-
3302
- const SearchBar = JSX(({ className, searchTerm, onSearch }) => {
3303
- return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsx("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-44 gap-3.5 pointer-events-none", children: searchTerm ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text `, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0444\u0438\u043B\u0438\u0430\u043B\u0430\u043C" })) }), jsx("input", { id: "search-bar-input", className: `h-12 pl-4 w-full peer text-l text-black border border-solid rounded-md box-border
3304
- outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text`, value: searchTerm, onChange: (e) => onSearch(e.target.value.toLowerCase()), type: "text", name: "location-search-bar-input" })] }));
3305
- });
3306
-
3307
- const SEARCH_TERM_MIN_LENGTH = 3;
3308
- const LOCATION_DIALOG_ID = 'location';
3309
- const LocationDialog = JSX(({ currentLocation, onChangeLocation, foreignOffices }) => {
3310
- const dialogProps = useDialogProps(LOCATION_DIALOG_ID);
3311
- const [query, setQuery] = useState('');
3312
- const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
3313
- const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
3314
- const handleChangeLocation = useCallback((region) => {
3315
- dialogProps.onClose && dialogProps.onClose();
3316
- onChangeLocation && onChangeLocation(region);
3317
- }, [dialogProps.onClose, onChangeLocation]);
3318
- return (jsxs(Dialog, { ...dialogProps, head: jsxs("div", { children: [jsx(CurrentLocation, { currentLocation: currentLocation, onChangeLocation: handleChangeLocation }), jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
3319
- .filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
3320
- .map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), jsx(ForeignOffices, { foreignOffices: foreignOffices })] }));
3321
- });
3322
- const regionFirstLetter = (region) => region.name?.charAt(0) || '';
3323
- const cleanUpRegions = (regions) => regions.map((region) => ({
3324
- ...region,
3325
- name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
3326
- }));
3327
- const CurrentLocation = JSX(({ currentLocation, onChangeLocation }) => currentLocation ? (jsxs("div", { className: "mb-4", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx("button", { className: "cursor-pointer", onClick: () => {
3328
- onChangeLocation && onChangeLocation(currentLocation);
3329
- }, children: jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null);
3330
- const renderRegionGroup = (onChangeLocation) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-2xl w-56", children: [jsx("div", { className: "mb-s", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion(onChangeLocation))] }, letter));
3331
- const renderRegion = (onChangeLocation) => (region) => (jsx("div", { className: "mb-2xs", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
3332
- onChangeLocation && onChangeLocation(region);
3333
- }, children: region.name || '' }) }, region.id));
3334
- const ForeignOffices = JSX(({ foreignOffices }) => foreignOffices?.length ? (jsxs("div", { className: "border-t border-main-divider mt-2xs pt-2xs", children: [jsx("div", { className: "mb-m", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: "\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430 \u0437\u0430 \u0440\u0443\u0431\u0435\u0436\u043E\u043C:" }) }), jsx("div", { className: "flex gap-10", children: foreignOffices.map((office, i) => (jsx(ForeignOffice, { ...office }, String(i)))) })] })) : null);
3335
- const ForeignOffice = JSX(({ icon, ...rest }) => {
3336
- const link = useLink();
3337
- const { text, target, href, onClick } = link(rest);
3338
- return (jsxs("div", { className: "flex gap-x-3", children: [icon ? jsx(Img, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: text })) : null] }));
3339
- });
3340
-
3341
- const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
3342
- const desc = (cmp) => (a, b) => -cmp(a, b);
3343
-
3344
- function zip(firstCol, ...restCols) {
3345
- return firstCol.map((firstEl, rowIndex) => [firstEl, ...restCols.map((col) => col[rowIndex])]);
3346
- }
3347
-
3348
- const joinMaps = (aggregate, emptyVal) => (acc, map) => {
3349
- for (const [key, b] of map) {
3350
- acc.set(key, aggregate(acc.get(key) || emptyVal, b));
3351
- }
3352
- return acc;
3353
- };
3354
-
3355
- const MIN_TERM_LEN = 3;
3356
- const tokenize = (text) => text
3357
- .toLowerCase()
3358
- .split(/[^0-9a-zа-я-]+/)
3359
- .filter((token) => token.length >= MIN_TERM_LEN && !/[0-9a-z]/.test(token));
3360
-
3361
- const textRank = (queryTokens) => (text) => {
3362
- const textTokens = tokenize(text || '');
3363
- return textTokens.length
3364
- ? sum(queryTokens.map((qToken) => max(textTokens.map(jaroWinklerDistance(qToken)))))
3365
- : 0;
3366
- };
3367
-
3368
- const JW_THRESHOLD = 0.8;
3369
- const RANK_EPS = 0.001;
3370
- const search = (query) => (searchIndex) => {
3371
- const { corpus, dictionary } = searchIndex || {};
3372
- if (!query || !corpus?.length || !dictionary || !Object.keys(dictionary).length) {
3373
- return [];
3374
- }
3375
- const queryTokens = tokenize(query);
3376
- if (!queryTokens.length) {
3377
- return [];
3378
- }
3379
- const dictEntries = Object.entries(dictionary);
3380
- const pagesRanking = queryTokens
3381
- .map(computePagesRankingPerToken(dictEntries))
3382
- .reduce(joinMaps((a, b) => a + b, 0), new Map());
3383
- const relevantPages = [...pagesRanking.entries()]
3384
- .filter(([, pageRank]) => pageRank >= (JW_THRESHOLD - RANK_EPS) * queryTokens.length) // Multiplication of query tokens
3385
- .map(([pageIndex]) => corpus[pageIndex]);
3386
- return sortResultsByRank(queryTokens)(relevantPages);
3387
- };
3388
- const computePagesRankingPerToken = (dictEntries) => (qToken) => dictEntries
3389
- .map(([stem, pageIndices]) => [jaroWinklerDistance(qToken)(stem), pageIndices])
3390
- .filter(([stemRank]) => stemRank >= JW_THRESHOLD)
3391
- .map(([stemRank, pageIndices]) => fillMapWith(pageIndices, stemRank))
3392
- .reduce(joinMaps(Math.max, 0), new Map());
3393
- const sortResultsByRank = (queryTokens) => (results) => zip(results, results.map(({ title }) => title).map(textRank(queryTokens)))
3394
- .sort(desc(compareBy(([, pageTitleRank]) => pageTitleRank)))
3395
- .map(([corpusItem]) => corpusItem);
3396
- const fillMapWith = (keys, value) => new Map(keys.map((_) => [_, value]));
3397
-
3398
- const SEARCH_INDEX_FILENAME = 'search.index.json';
3399
- const DEFAULT_BASE_PATH = ['/'];
3400
- const useSearch = ({ basePathList = DEFAULT_BASE_PATH, initialQuery = '', wasOpened, }) => {
3401
- const [query, setQuery] = useState(initialQuery || '');
3858
+ }, [close]);
3402
3859
  useEffect(() => {
3403
- if (initialQuery !== undefined && initialQuery !== null) {
3404
- setQuery(initialQuery);
3860
+ if (dialogs.length) {
3861
+ globalThis.document?.body.classList.add('no-scrollbar');
3405
3862
  }
3406
- }, [initialQuery]);
3407
- const key = useMemo(() => basePathList.map((_) => (wasOpened ? _ : null)), // Load search index on very first search
3408
- [wasOpened, basePathList]);
3409
- const { data } = useAsyncData(key, fetchSearchIndex);
3410
- const [result, setResult] = useState(null);
3411
- useDebouncedEffect(() => {
3412
- if (data) {
3413
- setResult(data.map(search(query)));
3863
+ else {
3864
+ globalThis.document?.body.classList.remove('no-scrollbar');
3414
3865
  }
3415
- }, [data, query]);
3416
- return [result, { value: query, onChange: setQuery }];
3417
- };
3418
- const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map((basePath) => fetchJSON(joinPath(basePath, '/', SEARCH_INDEX_FILENAME))))).map((_) => (_.status === 'fulfilled' ? _.value : {}));
3419
-
3420
- const Sitemap = JSX(({ className, topItems }) => {
3421
- const link = useLink({ isRemote: true });
3422
- return (jsx("div", { className: style('flex items-start justify-between', className), children: topItems?.map(link).map(renderColumn) }));
3423
- });
3424
- const renderColumn = (menuItem, index) => {
3425
- const { text, items, href, target, onClick } = menuItem;
3426
- return (jsxs("div", { className: "flex flex-col gap-3.5 w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: appendSlash(href), index: i }, String(i))))] }, String(index)));
3427
- };
3428
- const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
3429
- const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
3430
- const link = useLink({ isRemote: isAnotherPortal, basePath });
3431
- const { href, target, onClick } = link(rest);
3432
- return (jsx("a", { className: style('text-l font-light text-secondary-text hover:text-primary-main no-underline', 'overflow-x-hidden overflow-ellipsis whitespace-nowrap'), href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }));
3433
- });
3434
-
3435
- const SearchInput = JSX(({ className, value, autoFocus, onChange, onFocus }) => {
3436
- const handleChange = useCallback((ev) => {
3437
- onChange && onChange(ev.target?.value || '');
3438
- }, [onChange]);
3439
- return (jsxs("div", { className: style('font-sans relative', className), role: "form", children: [jsx("div", { className: "absolute h-full flex items-center pl-m pointer-events-none", children: jsx(Img, { image: { icon: 'LoupeIcon' }, width: "24", height: "24" }) }), jsx("input", { className: style('h-12 pl-12 w-full text-l text-black outline-none box-border', 'border border-solid rounded-md border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'), value: value, type: "text", name: "search-bar-input", placeholder: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", autoFocus: autoFocus, onChange: handleChange, onFocus: onFocus })] }));
3866
+ }, [dialogs]);
3867
+ return dialogs.length ? (jsx("div", { className: "fixed inset-0 z-50", role: "dialog", children: dialogs.map(({ dialog, id }, i) => (jsx("div", { className: style('absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar', i === dialogs.length - 1 ? '' : 'hidden'), children: dialog }, String(id || i)))) })) : null;
3440
3868
  });
3441
3869
 
3442
- const SEARCH_DIALOG_ID = 'search';
3443
- const SearchDialog = JSX(({ topItems }) => {
3444
- const dialogProps = useDialogProps(SEARCH_DIALOG_ID);
3445
- const basePathList = useMemo(() => topItems?.map((_) => _.href || '/'), [topItems]);
3446
- const [searchResult, searchInputProps] = useSearch({
3447
- basePathList,
3448
- initialQuery: dialogProps.message,
3449
- wasOpened: dialogProps.wasOpened,
3450
- });
3451
- const searchItems = useMemo(() => combineTopItemsAndSearchResult(topItems)(searchResult), [topItems, searchResult]);
3452
- useEffect(() => printSearchItems(searchItems), [searchItems]); // Temp
3453
- return (jsx(Dialog, { ...dialogProps, head: jsx(SearchInput, { autoFocus: true, ...searchInputProps }), children: jsx(Sitemap, { topItems: searchItems }) }));
3454
- });
3455
- const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
3456
- ? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
3457
- ..._,
3458
- items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: joinPath('/', uri) })),
3459
- }))
3460
- : [];
3461
- // Temp
3462
- function printSearchItems(topItems) {
3463
- for (const _ of topItems.filter(({ items }) => items?.length)) {
3464
- console.group(_.text);
3465
- console.table(_.items, ['text', 'href']);
3466
- console.groupEnd();
3467
- }
3468
- }
3469
-
3470
3870
  const api = LikeAPI();
3471
3871
  function useLikeService(pagePath) {
3472
3872
  const [likeCount, setLikeCount] = useState(0);
@@ -3517,23 +3917,8 @@
3517
3917
  blockDecorator,
3518
3918
  parent: data,
3519
3919
  };
3520
- const sitemap = useSWRResource(projectSettings.SITEMAP || 'sitemap', data?.fallback);
3521
- const [location, onChangeLocation] = useLocation(sitemap?.defaultLocation);
3522
3920
  useBlockRouterProvider();
3523
- const [isSomeDialogOpened, { setTrue: setSomeDialogOpened, setFalse: resetSomeDialogOpened }] = useBool();
3524
- useDialogHandlers({
3525
- onOpen: setSomeDialogOpened,
3526
- onClose: resetSomeDialogOpened,
3527
- });
3528
- return (jsxs("section", { className: style('relative @container', pageStyle, className, isSomeDialogOpened ? 'overflow-hidden h-screen' : ''), "data-theme": colorPalette, children: [slots?.header ? (jsx("div", { className: "relative z-10 mb-5 shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, {
3529
- ...options,
3530
- slotName: 'header',
3531
- extraProps: { sitemap, location },
3532
- }) })) : null, jsxs("div", { className: "container @lg:grid @lg:grid-cols-12 @lg:gap-1", children: [renderChildren({ block: data, options, extraProps: { className: 'scroll-mt-12' } }), renderBlocksList(slots?.footer, {
3533
- ...options,
3534
- slotName: 'footer',
3535
- extraProps: { sitemap, location },
3536
- })] }), likeControl ? renderLikeControl() : null, jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } }), jsx(SearchDialog, { topItems: sitemap?.topItems }), jsx(LocationDialog, { currentLocation: location, foreignOffices: sitemap?.foreignOffices, onChangeLocation: onChangeLocation })] }));
3921
+ return (jsxs("div", { children: [jsxs("section", { className: style('relative @container', pageStyle, className), "data-theme": colorPalette, children: [slots?.header ? (jsx("div", { className: "relative z-10 mb-5 shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, { ...options, slotName: 'header' }) })) : null, jsxs("div", { className: "container @lg:grid @lg:grid-cols-12 @lg:gap-1", children: [renderChildren({ block: data, options, extraProps: { className: 'scroll-mt-12' } }), renderBlocksList(slots?.footer, { ...options, slotName: 'footer' })] }), likeControl ? renderLikeControl() : null] }), jsx(DialogManager, {}), jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } })] }));
3537
3922
  });
3538
3923
  ContentPage.childrenTypes = [];
3539
3924
  ContentPage.slots = () => ['header', 'footer'];
@@ -3543,7 +3928,7 @@
3543
3928
 
3544
3929
  const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
3545
3930
 
3546
- const packageVersion = "0.12.13";
3931
+ const packageVersion = "0.13.0";
3547
3932
 
3548
3933
  exports.Blocks = Blocks;
3549
3934
  exports.ContentPage = ContentPage;