@redneckz/wildless-cms-uni-blocks 0.13.4 → 0.13.6
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.
- package/bin/migration-scripts/0.13.4.js +30 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +168 -124
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ButtonsBlock/ButtonsBlockContent.d.ts +2 -0
- package/bundle/components/Carousel/CarouselContent.d.ts +6 -0
- package/bundle/components/Carousel/renderCarouselCards.d.ts +3 -1
- package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +2 -4
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +1 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -4
- package/bundle/components/Header/HeaderSubMenu.d.ts +1 -1
- package/bundle/components/LinkDocs/LinkDocsContent.d.ts +2 -5
- package/bundle/components/ParagraphBlock/ParagraphBlockContent.d.ts +3 -3
- package/bundle/icons/IconName.d.ts +4 -2
- package/bundle/model/HeadlineType.d.ts +1 -1
- package/bundle/ui-kit/DialogManager/useDialogsList.d.ts +7 -0
- package/bundle/ui-kit/Input/InputProps.d.ts +1 -0
- package/bundle/ui-kit/List/ListContent.d.ts +2 -2
- package/bundle/ui-kit/Select/Select.d.ts +1 -0
- package/cosmos-static/icons/CourtHouseIcon.svg +1 -0
- package/dist/components/ApplicationForm/ApplicationFormCredit.js +2 -1
- package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/dist/components/ApplicationForm/PhoneInputControl.js +1 -1
- package/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/renderCreditParameters.js +1 -1
- package/dist/components/ApplicationForm/renderCreditParameters.js.map +1 -1
- package/dist/components/ApplicationForm/renderRegion.js +1 -1
- package/dist/components/ApplicationForm/renderRegion.js.map +1 -1
- package/dist/components/ApplicationForm/renderRegionDepartment.js +1 -1
- package/dist/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
- package/dist/components/ButtonsBlock/ButtonsBlock.js +9 -1
- package/dist/components/ButtonsBlock/ButtonsBlock.js.map +1 -1
- package/dist/components/ButtonsBlock/ButtonsBlockContent.d.ts +2 -0
- package/dist/components/Carousel/Carousel.js +2 -2
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselContent.d.ts +6 -0
- package/dist/components/Carousel/renderCarouselCards.d.ts +3 -1
- package/dist/components/Carousel/renderCarouselCards.js +12 -3
- package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +2 -4
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -4
- package/dist/components/Header/HeaderSubMenu.d.ts +1 -1
- package/dist/components/Header/HeaderSubMenu.js +4 -4
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/Headline/headlineVersionStyles.js +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +2 -5
- package/dist/components/ParagraphBlock/ParagraphBlockContent.d.ts +3 -3
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +2 -0
- package/dist/icons/IconName.js.map +1 -1
- package/dist/model/HeadlineType.d.ts +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.js +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/dist/ui-kit/DialogManager/DialogManager.js +9 -29
- package/dist/ui-kit/DialogManager/DialogManager.js.map +1 -1
- package/dist/ui-kit/DialogManager/useDialogsList.d.ts +7 -0
- package/dist/ui-kit/DialogManager/useDialogsList.js +37 -0
- package/dist/ui-kit/DialogManager/useDialogsList.js.map +1 -0
- package/dist/ui-kit/Input/Input.js +2 -2
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/Input/InputProps.d.ts +1 -0
- package/dist/ui-kit/List/List.js +2 -0
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/List/ListContent.d.ts +2 -2
- package/dist/ui-kit/List/ListItem.js +1 -0
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/dist/ui-kit/Select/Select.d.ts +1 -0
- package/dist/ui-kit/Select/Select.js +18 -4
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationFormCredit.js +2 -1
- package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/lib/components/ApplicationForm/PhoneInputControl.js +1 -1
- package/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/renderCreditParameters.js +1 -1
- package/lib/components/ApplicationForm/renderCreditParameters.js.map +1 -1
- package/lib/components/ApplicationForm/renderRegion.js +1 -1
- package/lib/components/ApplicationForm/renderRegion.js.map +1 -1
- package/lib/components/ApplicationForm/renderRegionDepartment.js +1 -1
- package/lib/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
- package/lib/components/ButtonsBlock/ButtonsBlock.js +9 -1
- package/lib/components/ButtonsBlock/ButtonsBlock.js.map +1 -1
- package/lib/components/ButtonsBlock/ButtonsBlockContent.d.ts +2 -0
- package/lib/components/Carousel/Carousel.js +2 -2
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselContent.d.ts +6 -0
- package/lib/components/Carousel/renderCarouselCards.d.ts +3 -1
- package/lib/components/Carousel/renderCarouselCards.js +12 -3
- package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +2 -4
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -4
- package/lib/components/Header/HeaderSubMenu.d.ts +1 -1
- package/lib/components/Header/HeaderSubMenu.js +4 -4
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/Headline/headlineVersionStyles.js +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +2 -5
- package/lib/components/ParagraphBlock/ParagraphBlockContent.d.ts +3 -3
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +2 -0
- package/lib/icons/IconName.js.map +1 -1
- package/lib/model/HeadlineType.d.ts +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.js +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/lib/ui-kit/DialogManager/DialogManager.js +9 -29
- package/lib/ui-kit/DialogManager/DialogManager.js.map +1 -1
- package/lib/ui-kit/DialogManager/useDialogsList.d.ts +7 -0
- package/lib/ui-kit/DialogManager/useDialogsList.js +34 -0
- package/lib/ui-kit/DialogManager/useDialogsList.js.map +1 -0
- package/lib/ui-kit/Input/Input.js +2 -2
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/Input/InputProps.d.ts +1 -0
- package/lib/ui-kit/List/List.js +2 -0
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/List/ListContent.d.ts +2 -2
- package/lib/ui-kit/List/ListItem.js +1 -0
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/lib/ui-kit/Select/Select.d.ts +1 -0
- package/lib/ui-kit/Select/Select.js +19 -5
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +139 -31
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ButtonsBlock/ButtonsBlockContent.d.ts +2 -0
- package/mobile/bundle/components/Carousel/CarouselContent.d.ts +6 -0
- package/mobile/bundle/components/Carousel/renderCarouselCards.d.ts +3 -1
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +2 -4
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -4
- package/mobile/bundle/components/Header/HeaderSubMenu.d.ts +1 -1
- package/mobile/bundle/components/LinkDocs/LinkDocsContent.d.ts +2 -5
- package/mobile/bundle/components/ParagraphBlock/ParagraphBlockContent.d.ts +3 -3
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/bundle/model/HeadlineType.d.ts +1 -1
- package/mobile/bundle/ui-kit/DialogManager/useDialogsList.d.ts +7 -0
- package/mobile/bundle/ui-kit/Input/InputProps.d.ts +1 -0
- package/mobile/bundle/ui-kit/List/ListContent.d.ts +2 -2
- package/mobile/bundle/ui-kit/Select/Select.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +2 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.js +1 -1
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditParameters.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditParameters.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderRegion.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderRegion.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
- package/mobile/dist/components/ButtonsBlock/ButtonsBlock.js +9 -1
- package/mobile/dist/components/ButtonsBlock/ButtonsBlock.js.map +1 -1
- package/mobile/dist/components/ButtonsBlock/ButtonsBlockContent.d.ts +2 -0
- package/mobile/dist/components/Carousel/Carousel.js +2 -2
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselContent.d.ts +6 -0
- package/mobile/dist/components/Carousel/renderCarouselCards.d.ts +3 -1
- package/mobile/dist/components/Carousel/renderCarouselCards.js +12 -3
- package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +2 -4
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -4
- package/mobile/dist/components/Footer/buttonSizeStyles.js +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.d.ts +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js +4 -4
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/Headline/headlineVersionStyles.js +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +2 -5
- package/mobile/dist/components/ParagraphBlock/ParagraphBlockContent.d.ts +3 -3
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +2 -0
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/model/HeadlineType.d.ts +1 -1
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js +1 -1
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/DialogManager.js +9 -29
- package/mobile/dist/ui-kit/DialogManager/DialogManager.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/useDialogsList.d.ts +7 -0
- package/mobile/dist/ui-kit/DialogManager/useDialogsList.js +37 -0
- package/mobile/dist/ui-kit/DialogManager/useDialogsList.js.map +1 -0
- package/mobile/dist/ui-kit/Input/Input.js +2 -2
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputProps.d.ts +1 -0
- package/mobile/dist/ui-kit/List/List.js +2 -0
- package/mobile/dist/ui-kit/List/List.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListContent.d.ts +2 -2
- package/mobile/dist/ui-kit/List/ListItem.js +1 -0
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/dist/ui-kit/Select/Select.d.ts +1 -0
- package/mobile/dist/ui-kit/Select/Select.js +18 -4
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +2 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.js +1 -1
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditParameters.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditParameters.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderRegion.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderRegion.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
- package/mobile/lib/components/ButtonsBlock/ButtonsBlock.js +9 -1
- package/mobile/lib/components/ButtonsBlock/ButtonsBlock.js.map +1 -1
- package/mobile/lib/components/ButtonsBlock/ButtonsBlockContent.d.ts +2 -0
- package/mobile/lib/components/Carousel/Carousel.js +2 -2
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselContent.d.ts +6 -0
- package/mobile/lib/components/Carousel/renderCarouselCards.d.ts +3 -1
- package/mobile/lib/components/Carousel/renderCarouselCards.js +12 -3
- package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +2 -4
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -4
- package/mobile/lib/components/Footer/buttonSizeStyles.js +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.d.ts +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js +4 -4
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/Headline/headlineVersionStyles.js +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +2 -5
- package/mobile/lib/components/ParagraphBlock/ParagraphBlockContent.d.ts +3 -3
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +2 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/model/HeadlineType.d.ts +1 -1
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js +1 -1
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/DialogManager.js +9 -29
- package/mobile/lib/ui-kit/DialogManager/DialogManager.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/useDialogsList.d.ts +7 -0
- package/mobile/lib/ui-kit/DialogManager/useDialogsList.js +34 -0
- package/mobile/lib/ui-kit/DialogManager/useDialogsList.js.map +1 -0
- package/mobile/lib/ui-kit/Input/Input.js +2 -2
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputProps.d.ts +1 -0
- package/mobile/lib/ui-kit/List/List.js +2 -0
- package/mobile/lib/ui-kit/List/List.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListContent.d.ts +2 -2
- package/mobile/lib/ui-kit/List/ListItem.js +1 -0
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/ui-kit/Select/Select.d.ts +1 -0
- package/mobile/lib/ui-kit/Select/Select.js +19 -5
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +2 -1
- package/mobile/src/components/ApplicationForm/PhoneInputControl.tsx +1 -0
- package/mobile/src/components/ApplicationForm/renderCreditDataOrganization.tsx +1 -1
- package/mobile/src/components/ApplicationForm/renderCreditParameters.tsx +2 -2
- package/mobile/src/components/ApplicationForm/renderRegion.tsx +1 -0
- package/mobile/src/components/ApplicationForm/renderRegionDepartment.tsx +1 -0
- package/mobile/src/components/ButtonsBlock/ButtonsBlock.tsx +22 -5
- package/mobile/src/components/ButtonsBlock/ButtonsBlockContent.ts +2 -0
- package/mobile/src/components/Carousel/Carousel.example.json +2 -1
- package/mobile/src/components/Carousel/Carousel.tsx +2 -1
- package/mobile/src/components/Carousel/CarouselContent.ts +7 -0
- package/mobile/src/components/Carousel/renderCarouselCards.tsx +20 -4
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +7 -4
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +7 -7
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +3 -4
- package/mobile/src/components/Footer/buttonSizeStyles.ts +1 -1
- package/mobile/src/components/Header/HeaderSubMenu.tsx +17 -15
- package/mobile/src/components/Headline/Headline.example.json +1 -1
- package/mobile/src/components/Headline/headlineVersionStyles.ts +1 -1
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +3 -5
- package/mobile/src/components/ParagraphBlock/ParagraphBlockContent.ts +9 -8
- package/mobile/src/icons/CourtHouseIcon.svg +1 -0
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/model/HeadlineType.ts +1 -1
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
- package/mobile/src/ui-kit/DialogManager/DialogManager.tsx +9 -34
- package/mobile/src/ui-kit/DialogManager/useDialogsList.ts +50 -0
- package/mobile/src/ui-kit/Input/Input.tsx +2 -0
- package/mobile/src/ui-kit/Input/InputProps.ts +1 -0
- package/mobile/src/ui-kit/List/List.tsx +2 -0
- package/mobile/src/ui-kit/List/ListContent.ts +2 -2
- package/mobile/src/ui-kit/List/ListItem.tsx +1 -0
- package/mobile/src/ui-kit/Select/Select.tsx +46 -12
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormCredit.tsx +2 -1
- package/src/components/ApplicationForm/PhoneInputControl.tsx +1 -0
- package/src/components/ApplicationForm/renderCreditDataOrganization.tsx +1 -1
- package/src/components/ApplicationForm/renderCreditParameters.tsx +2 -2
- package/src/components/ApplicationForm/renderRegion.tsx +1 -0
- package/src/components/ApplicationForm/renderRegionDepartment.tsx +1 -0
- package/src/components/ButtonsBlock/ButtonsBlock.tsx +22 -5
- package/src/components/ButtonsBlock/ButtonsBlockContent.ts +2 -0
- package/src/components/Carousel/Carousel.example.json +2 -1
- package/src/components/Carousel/Carousel.fixture.tsx +2 -0
- package/src/components/Carousel/Carousel.tsx +2 -1
- package/src/components/Carousel/CarouselContent.ts +7 -0
- package/src/components/Carousel/renderCarouselCards.tsx +20 -4
- package/src/components/CarouselLinks/CarouselLinks.fixture.tsx +12 -9
- package/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
- package/src/components/CarouselProductCard/CarouselProductCardContent.ts +7 -4
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.tsx +1 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.tsx +7 -7
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +3 -4
- package/src/components/Header/HeaderSubMenu.tsx +17 -15
- package/src/components/Headline/Headline.example.json +1 -1
- package/src/components/Headline/headlineVersionStyles.ts +1 -1
- package/src/components/LinkDocs/LinkDocsContent.ts +3 -5
- package/src/components/ParagraphBlock/ParagraphBlockContent.ts +9 -8
- package/src/icons/CourtHouseIcon.svg +1 -0
- package/src/icons/IconName.ts +4 -1
- package/src/model/HeadlineType.ts +1 -1
- package/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
- package/src/ui-kit/DialogManager/DialogManager.tsx +9 -34
- package/src/ui-kit/DialogManager/useDialogsList.ts +50 -0
- package/src/ui-kit/Input/Input.tsx +2 -0
- package/src/ui-kit/Input/InputProps.ts +1 -0
- package/src/ui-kit/List/List.tsx +2 -0
- package/src/ui-kit/List/ListContent.ts +2 -2
- package/src/ui-kit/List/ListItem.tsx +1 -0
- package/src/ui-kit/Select/Select.tsx +46 -12
- package/bundle/components/Footer/buttonSizeStyles.mobile.d.ts +0 -4
- package/dist/components/Footer/buttonSizeStyles.mobile.d.ts +0 -4
- package/dist/components/Footer/buttonSizeStyles.mobile.js +0 -7
- package/dist/components/Footer/buttonSizeStyles.mobile.js.map +0 -1
- package/lib/components/Footer/buttonSizeStyles.mobile.d.ts +0 -4
- package/lib/components/Footer/buttonSizeStyles.mobile.js +0 -5
- package/lib/components/Footer/buttonSizeStyles.mobile.js.map +0 -1
- package/src/components/Footer/buttonSizeStyles.mobile.ts +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};class f{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const b=new f;function y(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:v(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new f;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},k=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[g,x]=n(!1);a((()=>b.subscribe("tab",(e=>{x(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:w("@container font-sans",f?"group":"",S[t],g?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=C[l]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:n||a})})),B=e=>e,R=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},V=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],M=e=>!e?.length,P=e=>t=>l=>e(l)?[]:[t],_=e=>null!=e,z=new Map;function j(e,t,{fallback:l,cache:i}={}){const s=r((()=>A(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{!s.some(_)||(async()=>{try{const e=await(o?((e,t=z)=>l=>{const n=t.get(l);if(_(n))return n;const a=e(l);return _(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function A(e){return Array.isArray(e)?e:e instanceof Function?A(e()):[e]}async function E(e,t){try{return e?await D(e,t):null}catch(e){console.error(e)}return null}async function D(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}const $=[];function O(){const{data:e}=j("/api/v1/regions",D);return e||$}const L=e=>Boolean(e?.includes(":")),F=(e,t)=>Boolean(e&&!L(e)&&(!t||"_self"===t)),U=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var H=Object.freeze({__proto__:null,isURL:L,isLocalURL:F,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:U});const K=e=>(t,l=d.BASE_PATH)=>{if(!t||L(t)||W(t,d.CDN))return t;const n=t.startsWith("/");return U(W(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W=(e,t)=>t&&e&&e.startsWith(t),G=(e,t)=>G._impl(e,t);function X(){return X._impl()}function J(e={}){const{isRemote:t,basePath:l}=e,n=X(),{closeAll:a}={open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})};return e=>({...e,href:t&&!l?e.href:K(n)(e.href,l),"aria-label":e.text,onClick:G(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&F(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}G._impl=e=>e,G.setup=e=>{G._impl=e},X._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),X.setup=e=>{X._impl=e};const Y={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},q="bg-main-divider text-main-disabled",Z={primary:q,secondary:q,white:q,link:"",transparent:"",gray:q,"":""},Q="text-center font-sans select-none",ee={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},te=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e;return p("div",{className:w(le(e),"flex gap-xs"),children:[n?u("div",{className:ee[i],children:n}):null,ne(e)?p("div",{children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:ee[i],children:a}):null]})})),le=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return["group/btn items-center justify-center",ne(e)?a:"h-12 w-12",n?"rounded-full":""].join(" ")},ne=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ae=({className:e,rounded:t,version:l})=>["inline-block",Q,l?Z[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ie=({className:e,rounded:t,version:l})=>[Q,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?Y[l]:"",t?"rounded-full":"rounded-md",e].join(" "),re=g((({disabled:e,children:t,...l})=>{const n=J()(l),a=t??u(te,{...n});return u(e?oe:se,{...n,children:a})})),se=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:ie({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),oe=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ae({className:e,rounded:n,version:l}),children:a}))),ce=g((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),de=g((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),me=g((({link:e})=>p(ce,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(de,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(re,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(de,{children:e.text})}):null]}))),he=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},ue=g((({key:e,className:t="",inputClassName:l="",id:n,name:a,type:r="text",label:s,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:g,onBlur:x,pattern:f})=>{const b=i((e=>{h&&h(e.target?.value||"")}),[h]),y=m?"pr-3xl":"",v=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[s?u("div",{className:"mb-xs",children:u(de,{size:"text-m",font:"font-light",children:s})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-m",y,v,l),id:n,name:a||n,placeholder:o,type:r,value:c,onInput:b,onFocus:g,onBlur:x,pattern:f},e)]}),m]})})),pe=g((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(ue,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),ge=e=>"_"===e,xe=e=>/\d/.test(e),fe=e=>ge(e)||xe(e),be=[..."+7 (___) ___-__-__"],ye=be.findIndex(ge),ve=be.map(((e,t)=>fe(e)?be.slice(0,t).filter(fe).length:-1));const Ne=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=be.map(((e,l)=>xe(e)?e:t.charAt(ve[l])||e)),n=ve.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(ye,n)):l).join("")}(e))),[t]);return u(ue,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),we=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Ne,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Se="Некорректно заполненное поле",ke=P((e=>null!=e&&""!==e))(Se),Ce=P((e=>"string"==typeof e&&e.length>1))(Se),Ie=P((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Se),Te=(Be=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,P((e=>"string"==typeof e&&Be.test(e))))(Se);var Be;const Re=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Наименование организации",...he(e("fullName"),ke)}),u(pe,{className:"shrink-0 w-full",label:"Контактное лицо",...he(e("name"),Ce)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"ИНН",...he(e("inn"),Ie)}),u(we,{className:"shrink-0 w-full",label:"Телефон",...he(e("phone"),Te)})]})]}),Ve=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function Me(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const Pe={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},_e=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",...r})=>{const s=X(),o=K(s)(U(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(je,{className:e,children:p("svg",{className:w(ze(r.width),Pe[i],"white"===i?"invert":"",t),...r,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(r.style={height:`${r.height}px`}),u("img",{className:e,src:o,alt:n,title:a,"aria-hidden":"true",...r}))})),ze=e=>e?"":"w-full h-full",je=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Ae=g((({className:e="",label:t,options:l=[],value:n,valid:r=!0,isBorder:o=!0,placeholder:c="",onChange:d})=>{const[m,{setFalse:h,toggle:g}]=Me(),x=function(e){const t=s(null);return a((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}(h),f=i((e=>{h(),d&&d(e)}),[d]);return p("div",{className:e,ref:x,children:[t?u("div",{className:"mb-xs",children:u(de,{size:"text-m",color:"text-primary-text",font:"font-light",children:t})}):null,p("div",{className:w("relative",m?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer",$e(o,r)),onClick:g,children:[u("p",{className:"p-m pr-3xl h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:De(n)||c}),u(_e,{className:w("absolute right-3",m?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),l?.length?u("div",{className:w("h-0",m?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:l.map(Ee(f,m,(e=>e.key===n?.key)))})}):null]})]})})),Ee=(e,t,l)=>(n,a)=>p("div",{onClick:()=>{e(n)},className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",children:[u("span",{className:"min-h-6",children:De(n)}),u(_e,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-3xs",l(n)&&t?"":"hidden")})]},String(a)),De=e=>e?.text||e?.key||"",$e=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Oe=g((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(Ae,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),Le=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider sm:border-none sm:flex sm:justify-between gap-lg ",children:[u("div",{className:"sm:w-1/2",children:u(Oe,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ve.map((({name:e=""})=>({key:e,text:e}))),...he(t("acquiringType"),ke)})}),u("div",{className:"sm:w-1/2",children:u(Oe,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(t("region"),ke)})})]}),Fe=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:w("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(de,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Ue=e=>p("div",{children:[u(Fe,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Fe,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),He=(e,t)=>{const l=ie({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-m w-full sm:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},Ke={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},We=V({acquiringType:ke,region:ke,fullName:ke,inn:Ie,name:Ce,phone:Te}),Ge=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;M(We(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s})}),[n]),[,{field:r,...s}]=R(Ke,a),o=O();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"sm:text-center"}),Le({regions:o,field:r}),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Re(r),Ue(r),He(t),u(me,{link:l})]})})),Xe=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Контактное лицо",...he(e("name"),Ce)}),u(pe,{className:"shrink-0 w-full",label:"ИНН",...he(e("inn"),Ie)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(we,{className:"shrink-0 w-full",label:"Телефон",...he(e("phone"),Te)}),u(pe,{className:"shrink-0 w-full",label:"Электронная почта",...he(e("mail"),ke)})]})]}),Je=({regions:e,field:t})=>u(Oe,{className:"w-full",label:"Регион",placeholder:"Выберите регион",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(t("region"),ke)}),Ye={name:"",phone:"",inn:"",mail:""},qe=V({region:ke,name:Ce,phone:Te,inn:Ie,mail:ke}),Ze=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;M(qe(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,phone:a,inn:i,mail:r})}),[n]),[,{field:r,...s}]=R(Ye,a),o=O();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[Je({regions:o,field:r}),Xe(r),He(t),u(me,{link:l})]})})),Qe=[];const et=async e=>await E(e,{method:"GET"})||Qe,tt=["От 1 000 ₽","До 1 000 000 000 ₽"],lt=["От 1 мес","До 15 лет"],nt=e=>p("div",{className:"pb-2xs border-b border-b-main-divider sm:flex sm:justify-between sm:gap-lg sm:border-none sm:pb-0",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Наименование организации",...e("fullName")}),u(pe,{className:"shrink-0 w-full",label:"ИНН",...he(e("inn"),Ie)}),u(we,{className:"shrink-0 w-full",label:"Телефон",...he(e("phone"),Te)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...he(e("annualRevenue"),ke)}),u(pe,{className:"shrink-0 w-full",label:"Контактное лицо",...he(e("name"),Ce)}),u(pe,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),at=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},it=(e,t,l)=>Math.max(t,Math.min(e,l)),rt=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function st(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function ot({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s-t)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:"w-2 h-2 rounded-full "+(s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=st(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const ct=1,dt=100,mt=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:ct),max:s=(a.length?a.length-1:dt),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=at(e,{normalize:(e=0)=>a.length?ht(a)(e):it(e,r,s),format:rt()}),g=i((e=>{m&&m(st(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(de,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("m-0 mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),ot({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),ut(n)]})})),ht=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),ut=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),pt=e=>p("div",{className:"border-b border-b-main-divider sm:flex sm:justify-between gap-lg sm:border-none",children:[p("div",{className:"sm:w-1/2",children:[u("label",{children:u(de,{size:"text-m",font:"font-light",children:"Сумма кредита, ₽"})}),u(mt,{items:tt,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"sm:w-1/2",children:[u("label",{children:u(de,{size:"text-m",font:"font-light",children:"Срок кредита, месяцев"})}),u(mt,{items:lt,min:1,max:180,...e("term")})]})]}),gt=({regions:e,branches:t,field:l})=>p("div",{className:"sm:flex sm:justify-between sm:gap-m sm:mb-2xl sm:border-none sm:pb-0",children:[u("div",{className:"sm:w-1/2",children:u(Oe,{label:"Регион",placeholder:"Выберите регион",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(l("region"),ke)})}),u("div",{className:"sm:w-1/2",children:u(Oe,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...he(l("department"),ke)})})]}),xt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},ft=V({annualRevenue:ke,inn:Ie,name:Ce,phone:Te,region:ke,department:ke}),bt=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;M(ft(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=R(xt,n),o=O(),c=function(e){const{data:t}=j(e?`/api/v1/branches?regionCode=${e}`:null,et);return t||Qe}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры кредита",className:"sm:text-center"}),pt(r),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),nt(r),u(T,{headingType:"h6",title:"Офис банка",className:"sm:text-center"}),gt({regions:o,branches:c,field:r}),He(e),u(me,{link:t})]})})),yt={name:"",phone:""},vt=V({name:Ce,phone:Te}),Nt=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{name:t,phone:l}=e;M(vt(e))&&n({typeForm:"dpst",name:t,phone:l})}),[n]),[,{field:r,...s}]=R(yt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"sm:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Имя",...he(r("name"),Ce)}),u(we,{className:"shrink-0 w-full",label:"Телефон",...he(r("phone"),Te)})]}),p("div",{className:"flex justify-between flex-col-reverse sm:items-center sm:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(me,{link:l})}),He(t)]})]})})),wt={};function St(e,t=wt){const{data:l}=j(e?`/wcms-resources/${e}.json`:null,D,{fallback:t});return l||wt}const kt=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=St(l||"regions-grant-support"),[i,r]=n({key:""}),s=ie({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s sm:space-y-lg",children:[a?u(Oe,{label:"Ваш регион",placeholder:"Выберите регион",options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(re,{href:o,target:"_blank",className:w("p-m w-full sm:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Ct=(e,t)=>e?.media&&t?.media?e.media-t.media:0,It=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=X();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Ct).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:Bt(a,n)(e),type:Rt(l),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,t?.src?Tt({...t,src:Bt(a,n)(t.src)},l):null]})})),Tt=(e,t="")=>u("img",{src:e.src,className:w("object-contain",t),alt:e.alt||e.title,title:e.title||"",style:{width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"auto"},...e.size}),Bt=(e,t)=>l=>l&&!L(l)?K(e)(U(t,l)):l,Rt=e=>e?`image/${String(e)}`:void 0,Vt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(_e,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(It,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),Mt=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>u("path",{d:e,fill:t||"currentColor",...r,...l},n)))}))),Pt=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],_t=g((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Mt,{paths:Pt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":zt(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(de,{size:"text-l",font:"font-light",children:l})}):null]})})})),zt=e=>w("rounded border",e?"bg-primary-main":""),jt=e=>{const t=e("text");return p("div",{className:"space-y-m",children:[p("div",{className:"sm:flex sm:items-center sm:gap-xl",children:[u(_t,{text:"Валютный контроль",...e("currencyControl")}),u(_t,{text:"Документарные операции",...e("documentaryOperations")}),u(_t,{text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-m outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},At=e=>p("div",{children:[p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"Наименование организации",...he(e("fullName"),ke)})}),u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"ФИО",...he(e("name"),Ce)})})]}),p("div",{className:"sm:flex sm:justify-between sm:gap-lg sm:mb-2xl",children:[u("div",{className:"sm:w-1/2",children:u(we,{className:"shrink-0 w-full mb-s",label:"Телефон",...he(e("phone"),Te)})}),u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"Электронная почта",...he(e("mail"),ke)})})]})]}),Et={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Dt=V({fullName:ke,name:Ce,phone:Te,mail:ke}),$t={ApplicationFormBusinessCard:Ze,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,currencyControl:r,documentaryOperations:s,conversionOperations:o,text:c}=e;M(Dt(e))&&n({typeForm:"kved",fullName:t,name:l,phone:a,mail:i,partnerComments:`Валютный контроль=${r}/Документарные операции=${s}/Конверсионные операции=${o}/Доп инф=${c}`})}),[n]),[,{field:r,...s}]=R(Et,a);return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),At(r),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"sm:text-center"}),jt(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg sm:items-center sm:flex-row sm:pb-4xl",children:[He(t),u(me,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"sm:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(Vt,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(Vt,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Nt,ApplicationFormCredit:bt,ApplicationFormAcquiring:Ge,ApplicationFormGrantSupport:kt},Ot=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(Vt,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Lt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Ft=g((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async e=>{const t=await Lt.send(e)?"OK":"Fail";return s(t),t}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"sm:text-center"}):null,l?Ut(l,o):null,r?u(Ot,{responseType:r}):null]})})})),Ut=(e,t)=>{const l=e?.formType;if(!l||!(l in $t))return null;return u($t[l],{...e,onSubmit:t})},Ht={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Kt=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:w("rounded-icon object-fit flex justify-center items-center ",Ht[l],e),children:u(_e,{...i,width:"54%",height:"54%",name:a})}):null})),Wt=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:"text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full sm:justify-center mt-xl gap-5xl",role:"list",children:l.map(Gt)}):null]}))),Gt=(e,t)=>p("div",{className:"flex gap-m items-center md:basis-1/2 md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(Kt,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(Vt,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),Xt(e.description)]}):null]},String(t)),Xt=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?Yt(e):Jt(e)}):null},Jt=e=>e?.name||null,Yt=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},qt={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-l",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},Zt={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},Qt=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=qt[l],m={marginTop:d.descriptionStyle};return p(k,{className:w(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(ce,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),el=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),tl=g((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=y(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),ll=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],nl=g((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=s([]),f=i(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,h&&h(l),p&&p(il(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?al(r,b):{},...y?el(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(S=(e,t)=>u(tl,{className:w(c,n?ll[n-1]:"",y?"h-full":""),style:v?al(r/4):{},activeIndex:l,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),al=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),il=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),rl={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},sl={"horizontal-list":"w-6","vertical-list":"h-6"},ol=g((({containerRef:e,activeIndex:t,dotCount:l=0,listType:n="horizontal-list",version:a})=>l?u("div",{className:w("flex gap-xs",rl[n],a?"group":""),...a?{"data-ver":a}:{},children:new Array(l).fill(null).map(((l,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?sl[n]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),cl=e=>e,dl=(e=cl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),ml=dl(),hl=(e=cl)=>dl((t=>-e(t))),ul=hl(),pl=e=>t=>e.scrollWidth/t,gl=e=>(t,l)=>{e.scrollBy({left:l*pl(e)(t),behavior:"smooth"})},xl=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[hl()(a),dl()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?gl(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?gl(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]);return[l,{scrollLeft:u,scrollRight:p,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},fl=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=!0,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=xl({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(nl,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(ol,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),bl="text-left",yl=(e,t,l)=>u(fl,{children:e.map(((e,t)=>(({icon:e,title:t,description:l},n)=>p("div",{className:w("flex flex-col","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(de,{size:"text-h6",font:"font-normal",align:bl,children:t}):null,e?u(Vt,{image:e,height:"180",className:"w-auto"}):null,l?u(de,{size:"text-h6",font:"font-normal",align:bl,children:l}):null]},String(n)))({...e},t)))}),vl=g((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(k,{className:l,defaultPadding:"p-6xl",...r,children:[u(Qt,{className:"mb-4xl sm:mb-3xl",title:i,description:a,headlineVersion:"M"}),e?.length?yl(e):null]}))),Nl=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap gap-m",t),children:e.map(wl(l))}):null,wl=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o="secondary"===r?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return n||a?.icon?u(re,{className:w("basis-full sm:basis-auto",e),appendLeft:Sl({...a,iconVersion:c}),appendRight:Sl({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Sl=e=>e?.icon||e?.src?u(Vt,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,kl=g((({buttons:e,className:t,...l})=>u(k,{className:w("!bg-transparent",t),defaultPadding:"p-0",...l,children:Nl(e)}))),Cl=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),Il=g((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),Tl=g((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("flex justify-between md:flex-col",a),children:[e?u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(de,{size:"text-h3",children:[n," ",rt(2)(Math.round(t))," ",l]})}:{children:u(de,{size:"text-h3",children:"-"})})]}))),Bl=Math.round(23.5),Rl={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:12.5,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Vl={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:7.5,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ml={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Pl={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},_l={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},zl=g((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,rateBlockClassName:i,fractionDigits:r=2})=>p("div",{children:[u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:w("font-mohave text-title-huge pr-xl -mt-m",i),children:String(e.toFixed(r)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:n}):null]})]}))),jl=e=>e?u(ce,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null;function Al({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${rt(2)(l.min||0)} ₽`,`До ${rt(2)(l.max||0)} ₽`];return u(mt,{items:e?n:[],step:t,...l})}function El(e){const{data:t}=j(`/wcms-resources/${e}.json`,D);return t}const Dl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=El(t||"bonus-calculator-data")||Ml,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},$l=g((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[a,{field:i}]=R({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Dl(a,t);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Al({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Al({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?u(zl,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null,p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[m>=0?u(Tl,{title:"Баллов за год",value:m}):null,Nl(l,{isVertical:!0}),jl(n)]})]})})),Ol=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Ll=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Fl([e,t],n),Fl=([e,t],l=[])=>({[e]:l.length?ul(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?ml(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Ul=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Hl=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Kl=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Wl=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Gl={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Xl=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:w(`flex ${Gl[a]}`,l),children:e?.map((({id:e,text:l})=>u(_t,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Jl=({items:e,title:t,orientation:l="horizontal",value:n,radioGroupClassName:a,onChange:i})=>p("div",{className:"space-y-s",children:[t?u("div",{children:u(de,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(Xl,{orientation:l,items:e,checkedItem:e[n?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),Yl=e=>Jl({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),ql=g((({title:e="Ставка"})=>p("div",{children:[u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-2xs pt-2xs pl-lg pb-xs",children:u(_e,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-64 mt-m",children:p(ce,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),Zl=({rate:e,depositeName:t,isShowDepositeName:l})=>u(zl,{rate:e,depositeName:t,isShowDepositeName:l,rateBlockClassName:"tracking-[-25px]",unit:"%"}),Ql=({rate:e})=>u(Tl,{title:"Ставка",value:e,postfix:"%"}),en=e=>e.isShowUnknownRate?u(ql,{}):p("div",{children:[u("div",{className:"hidden md:block",children:Zl(e)}),u("div",{className:"md:hidden",children:Ql(e)})]}),tn=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i})=>{const[r,{field:s}]=R({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isSmallBusiness:r,isMonthlyInterestPayment:s}=e,o=El(t||"business-calculator-data"),c=i||a,d=l<90||l>730;if(l<=30)return{..._l,...e,isDisabledOperatingDeposit:d,isShowUnknownRate:!0};const m=o?.rateRows?.find((e=>s===e.isMonthlyInterestPayment&&r===e.isSmallBusiness&&Hl(c,e)&&Ul(n,["minSum","maxSum"],e)&&Ul(l,["minDays","maxDays"],e)))||_l,{rate:h}=m,u=Kl(h,e),p=n+u,g=o?.rateRows||[_l];return{...m,...Fl(["minSum","maxSum"],g),...Fl(["minDays","maxDays"],g),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(r,t),{income:c,finalSum:d,rate:m,isShowUnknownRate:h,depositeName:g}=o;return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Al({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(x={title:"Срок, дней",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(mt,{items:[`От ${Wl(x.min||0)}`,`До ${Wl(x.max||0)}`],step:1,...x})),ln(o,s),Yl({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]}),u("div",{className:"border-b border-main-divider md:hidden"}),en({rate:m,depositeName:g,isShowDepositeName:i,isShowUnknownRate:h}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[nn(d,c),Nl(l,{isVertical:!0}),jl(n),jl(a)]})]});var x})),ln=(e,t)=>p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(_t,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(_t,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(_t,{text:"ИП / малое предприятие",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),nn=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Tl,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Tl,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),an=({min:e=0,max:t=0,availableMonths:l,...n})=>u(mt,{items:[`От ${rn(e)}`,`До ${rn(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),rn=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,sn=e=>on({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&on({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&on({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&on({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),on=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],cn=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},dn=(e,t,l)=>{let{moneyValue:n,monthsValue:a}=e;const i=El(t||"credit-calculator-data"),s=i?.rateRows||[Rl],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>sn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Ll(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Ll(["minMonths","maxMonths"],o,s);n=it(n,c,d),a=it(a,m,h);const u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>sn({row:e,userInputParams:t,paramsViewSettings:l})&&Ul(n,["minSum","maxSum"],e)&&Ul(a,["minMonths","maxMonths"],e)))||Rl)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=cn(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},mn=e=>Jl({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),hn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,isMobile:i})=>{const[r,{field:s}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:Bl}),o=dn(r,t,a),c=mn({title:i?"Тип платежа":"",orientation:"vertical",...s("isAnnuity")});return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Al({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),an({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),un({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),en({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Tl,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),Nl(l,{isVertical:!0}),jl(n)]})]})})),un=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(_t,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(_t,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(_t,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(_t,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),pn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=El(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?fn(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>xn({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&xn({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Ul(n,["minSum","maxSum"],t)&&Ul(a||r,["minMonths","maxMonths"],t)))||Pl,{rate:d}=c,m=gn(d,e),h=n+m,u=i?.rateRows||[Pl];return{...c,...Fl(["minSum","maxSum"],u),...Fl(["minMonths","maxMonths"],u),availableMonths:Ol(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},gn=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},xn=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],fn=(e,t)=>e+Math.round((t-e)/2),bn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[r,{field:s}]=R({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=pn(r,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:g}=s("monthsValue");return a((()=>{g&&g(c)}),[c]),p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Al({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),an({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),yn({...o,...i},s)]}),u("div",{className:"border-b border-main-divider md:hidden"}),en({rate:d}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Tl,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(Tl,{title:"Сумма в конце срока",value:h,postfix:"₽"}),Nl(l,{isVertical:!0}),jl(n)]})]})})),yn=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Yl({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Jl({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},vn=e=>Nn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Nn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"})&&Nn({...e,fieldKey:"isExtraMoney",viewSettingFieldKey:"isShowExtraMoney"}),Nn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],wn=(e,t,l)=>{let{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e;const o=El(t||"refinancing-calculator-data"),c=o?.rateRows||[Vl],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>vn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=Ll(["minSum","maxSum"],d,c),{minSumOld:u,maxSumOld:p}=Ll(["minSumOld","maxSumOld"],d,c),{minSumExtra:g,maxSumExtra:x}=Ll(["minSumExtra","maxSumExtra"],d,c),{minMonths:f,maxMonths:b}=Ll(["minMonths","maxMonths"],d,c);n=it(n,m,h),i=it(i,u,p),s=it(s,g,x),a=it(a,f,b);const y=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>vn({row:e,userInputParams:t,paramsViewSettings:l})&&Ul(n,["minSum","maxSum"],e)&&Ul(i,["minSumOld","maxSumOld"],e)&&Ul(r,["minSumExtra","maxSumExtra"],e)&&Ul(a,["minMonths","maxMonths"],e)))||Vl)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:v}=y,N=cn(v,e),w=e.oldMonthlyPayment-N;return r((()=>({...y,...e,minSum:m,maxSum:h,minMonths:f,maxMonths:b,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:N,benefit:w})),[e,o])},Sn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=wn(i,t,a);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Al({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum,...r("moneyValue"),value:s.moneyValue}),Al({title:"Ежемесячный платеж в других банках, ₽",isShowItems:!1,step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),an({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),kn({...s,...a},r),s.isExtraMoney?Al({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null]}),u(zl,{title:"Ставка",rate:s.rate,fractionDigits:1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Tl,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Tl,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,mn({orientation:"vertical",...r("isAnnuity")}),Nl(l,{isVertical:!0}),jl(n)]})]})})),kn=(e,t)=>p("div",{className:"space-y-s",children:[e.isShowSalaryClient?u(_t,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(_t,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,e.isShowExtraMoney?u(_t,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney}):null]}),Cn={CreditCalculatorForm:hn,DepositCalculatorForm:bn,BusinessDepositCalculatorForm:tn,BonusCalculatorForm:$l,RefinancingCalculatorForm:Sn},In=g((({className:e,calculatorTabs:t=[]})=>u(k,{className:e,defaultPadding:"p-0",children:Bn(t)}))),Tn=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Cn))return null;return u(Cn[t],{...e.calculatorBlock,isMobile:!0})},Bn=e=>{if(!e||!e.length)return null;return 1===e.length?u(k,{children:Tn(e[0])}):e.map(((e,t)=>u(Cl,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Il,{isUnfolded:t,children:u(k,{children:Tn(e)})}),renderFoldButton:Rn(e)},t.toString())))},Rn=e=>({isUnfolded:t,onToggle:l})=>p("button",{onClick:l,className:"w-full p-xl bg-green flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(_e,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(de,{align:"text-left",color:"text-white",children:e.nav?.title}),u(de,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(_e,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),Vn=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=at(e,{normalize:(e=a)=>l&&n?String(it(Number(Mn(e)),l,n)):Mn(e),format:rt(r)}),c=i((e=>t&&t(Mn(e))),[t]);return u(ue,{onChange:c,...s,...o})})),Mn=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Pn=g((e=>u(Vn,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(de,{size:"text-xl",font:"font-light",children:"₽"})})}))),_n={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},zn={amount:1500,_amount:1500},jn=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...r})=>{const[{amount:s,_amount:o},{field:c}]=R(zn),d=s<=0,m=d?ae({version:a?.version}):ie({className:"text-white",version:a?.version}),h=J();return p(k,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h2",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:_n[i],children:[u(Pn,{name:"_amount",valid:!d,placeholder:n,label:l,...c("_amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:o}),a?.text?u("button",{type:"submit",className:w("w-full p-m mt-lg",m),disabled:d,...h(a),children:a.text}):null]})]})})),An=g((({className:e,disabled:t,...l})=>u(re,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(Vt,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),En=g((e=>u(An,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Dn=g((e=>u(An,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),$n="absolute top-[calc(50%-24px)] z-40",On="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Ln=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[Fn(e),h?u(En,{className:w($n,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(Dn,{className:w($n,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Fn=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(On,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(On,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Un=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),Hn=[];function Kn(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=Un,blocksRegistry:r={},ancestors:s=Hn}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const Wn=[],Gn=(e,{key:t,ancestors:l=Wn,slotName:n=null,extraProps:a,renderProps:i=Kn,...r})=>{const s=a?(e,t)=>Kn(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||Wn,[r.parent,n]]:l},a)))};function Xn({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?Gn(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const Jn=({className:e,text:t="ХИТ"}={})=>p("div",{className:w("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",e),children:[u(_e,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(ce,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Yn="relative h-full",qn=({noCardBorder:e,activeIndex:t,...l})=>{const{blocks:n}=l.block||{},a=n?.some(ea);return Xn({...l,renderProps:(l,n,i)=>p("div",{className:Zn(l,{someCardsHighlighted:a}),children:[Kn(l,n,{className:Qn(l,{someCardsHighlighted:a,showBorder:!e}),blockIndex:i,isActive:i===t}),ea(l)?Jn({className:"absolute top-0 -right-4 z-40"}):null]})})},Zn=(e,{someCardsHighlighted:t})=>w(Yn,t&&(ea(e)?"pt-3xl":"pt-3xl sm:pt-16")),Qn=(e,{someCardsHighlighted:t,showBorder:l})=>w(Yn,"min-w-80 sm:min-w-96",t&&(ea(e)?"pt-3xl sm:pt-16":"pt-3xl"),l&&"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),ea=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ta=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:a,isAlignCenter:r,showDots:s,arrowsPadded:o=!0,isGap:c=!0,...d})=>{const{blocks:m=[]}=d.block||{},h=t||m?.length,[g,{inc:x,dec:f}]=((e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:h,visibleItemCount:l},Math.floor(l/2)),[b,y]=xl({itemCount:h}),[v]=y.visibleIndicesRange,N=m&&"CarouselBankHistoryCard"===m[0]?.type;return u(k,{className:e,defaultPadding:"p-6xl",...d,children:p("div",{className:w(r?"flex justify-center":"","relative max-w-full"),children:[u(nl,{containerRef:b,visibleItemCount:l,snapAlign:"snap-start",gap:c?16:void 0,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:qn({noCardBorder:a,activeIndex:g,...d})}),u(Ln,{scroll:y,arrowsPadded:o,onScrollLeft:f,onScrollRight:x,hasEdgeBlocks:N,activeIndex:g,itemCount:h}),s?u(ol,{containerRef:b,activeIndex:v,dotCount:h,listType:"horizontal-list"}):null]})})}));ta.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"],ta.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const la=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(Qt,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),na="z-10 border border-solid w-full h-full",aa=w(na,"absolute hidden sm:block border-transparent"),ia=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:w("sm:pl-6xl sm:pb-4xl",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(aa,"top-9 right-12 bg-green-dark")}),u("div",{className:w(aa,"top-6 right-8 bg-green")}),u("div",{className:w(aa,"top-3 right-4 bg-green-light")}),p("div",{className:w(na,"relative p-xl sm:p-5xl bg-white border-green-light"),children:[u(Qt,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Nl([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),ra={black:"bg-black",white:"bg-white"},sa=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r,...s})=>p(k,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...s,children:[n?.src?u(Vt,{className:"flex justify-center mb-xl",image:n}):null,u(Qt,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:"text-left",className:"mb-m"}),r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(de,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(oa)]}):null,a?p(de,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,Nl([i],{buttonClassName:"w-full mt-lg"})]}))),oa=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ra[e]}`},String(t)),ca=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=J({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),da={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs"},ma=g((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",da[n])})}):null,u("span",{children:l})]}))),ha={S:"text-l font-light",M:"text-h6",L:"text-h5"},ua={S:"ml-xs",M:"ml-s",L:"ml-m"},pa=g((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",ha[a],t?ua[a]:"",e),role:"list",children:n.map(((e,t)=>u(ma,{isDotted:l,size:a,children:e},String(t))))}):null)),ga=g((({additionalDescription:e,align:t="text-left",button:l={},className:n="",description:a,headlineSmallVersion:i="H6",href:r,icon:s,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:g,version:x="primary",...f})=>p(k,{className:w("flex flex-col justify-between",t,n),defaultPadding:"p-0",version:x,...f,children:[p(ca,{className:"p-m flex flex-col gap-xs",href:r,target:u,children:[fa(i,g),ba(a),va(h,o,x),ya(e),xa(s,d,m)]}),Nl([l],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),xa=(e,t,l)=>p("div",{className:w("flex gap-lg",l?"order-first":"order-last",t?"":"justify-center"),children:[e?.src?u(Vt,{className:"shrink-0",image:e}):null,e?.icon?u(Vt,{className:w("shrink-0",t?"":"w-8 h-8 min-w-8"),image:e}):null]}),fa=(e,t)=>t?u(de,{size:Zt[e],children:t}):null,ba=e=>e?u(ce,{size:"text-l",children:e}):null,ya=e=>e?u(de,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e}):null,va=(e,t,l="primary")=>e?.length?u(pa,{className:w("text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,Na={start:"self-start",center:"self-center",end:"self-end"},wa=g((({className:e,defaultPadding:t,padding:l,title:n="",insetTitle:a="",buttons:i,leftImage:r,rightImage:s,imageAlign:o,backImage:c,children:d})=>p("div",{className:w("relative flex flex-col gap-3xl font-sans overflow-hidden",l||t,e),children:[n?u("div",{className:"relative",children:n}):null,p("div",{className:"grow relative flex flex-wrap @xl:flex-nowrap justify-around @xl:justify-between items-stretch gap-3xl",children:[Sa(r,{imageAlign:o}),p("div",{className:w("flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]",r?"":"grow"),children:[a,u("div",{className:"grow",children:d}),c?u("div",{className:"mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4",children:c}):null,i]}),Sa(s,{className:"-order-1 @xl:order-1",imageAlign:o})]})]}))),Sa=(e,{className:t,imageAlign:l})=>{const n=e?.props?.image.size?.width>400;return e?u("div",{className:w("flex-shrink-0",n?"w-full @xl:w-auto":"",l&&Na[l],t),children:e}):null},ka=(e=[])=>e?.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e)/e.length:0,Ca=(e,t="normal")=>e?u("div",{className:w("w-12 h-12 min-w-12 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(Vt,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Ia=g((e=>{const{__html:t="",richVersion:l=""}=e;return u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),Ta=(e,t)=>e?u(ce,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ba=(e,t)=>e?u(de,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ra=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Ia,{...e},`rte-${t}`):["label"in e?Ba(e.label,t):null,"description"in e?Ta(e.description,t):null],Va=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:w("flex gap-m","description"in l&&l.description?"items-start":"items-center",e),children:["icon"in l?Ca(l.icon,t):null,u("div",{children:Ra(l)})]}))),Ma=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Pa=e=>{return((t=e.map(Ma))?.length?Math.sqrt(Math.abs(ka(t.map((e=>e**2)))-ka(t)**2)):0)>16;var t},_a=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),za=e=>!e.some(_a),ja=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:w("flex gap-x-m gap-y-s",Pa(l)||za(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Va,{benefitsVersion:t,...e},String(l))))}):null)),Aa=g((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Ra)}):null)),Ea=g((({isTabularBenefits:e,...t})=>u(e?Aa:ja,{...t}))),Da=g((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map($a)}):null)),$a=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(de,{size:"text-m",font:"font-light",children:e})},String(t)),Oa=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",isInsetTitle:s=!0,benefitsVersion:o,isTabularBenefits:c,benefits:d,__html:m,items:h,isDotted:g=!0,listItemSize:x,tags:f,buttons:b,image:y,imageOptions:{imageAlign:v="end",directionRight:N=!0,isBackground:w}={},children:S})=>{const k=y?.src?u(Vt,{image:y}):null,C=u(Qt,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0});return u(wa,{className:e,padding:t,defaultPadding:l,...s?{insetTitle:C}:{title:C},...w?{backImage:k}:La(k,N),imageAlign:v,buttons:Nl(b),children:p("div",{className:"flex flex-col gap-xl",children:[u(Ea,{benefitsVersion:o,isTabularBenefits:c,benefits:d}),m?u(Ia,{__html:m}):null,h?.length?u(pa,{items:h,isDotted:g,listItemSize:x}):null,S,f?.length?u(Da,{tags:f}):null]})})})),La=(e,t)=>t?{rightImage:e}:{leftImage:e},Fa=g((({className:e,title:t,icon:l,list:n,href:a,target:i,...r})=>u(k,{className:e,defaultPadding:"p-3xl",...r,children:u(ca,{className:"flex items-center h-full",href:a,target:i,children:u(Oa,{title:t,headlineVersion:"XS",image:l,imageOptions:{directionRight:!1,imageAlign:"center"},benefits:n?.map((e=>({type:"default",label:e.title,description:e.description})))})})}))),Ua={default:"w-24 h-14",stretched:"flex-1 h-14"},Ha=(e,t)=>e?"":w("py-m group/media flex items-center justify-center box-border",Ua[t]),Ka=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],Wa=e=>Ka.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Ga=g((({buttonSize:e="default",rounded:t=!1,icon:l,...n})=>{const{href:a,version:i,text:r=""}=n,{iconMapped:s,label:o}=Wa(a),c=Xa(l)??s;return u(re,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",Ha(r,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:r,version:i,...n,children:c&&!r?u(Vt,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),Xa=e=>e?.src||e?.icon?e:void 0,Ja=g((({className:e="",media:t,children:l,buttonSize:n})=>p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[l?u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l}):null,u("div",{className:w("flex gap-xs",e),children:t?.map(((e,t)=>u(Ga,{buttonSize:n,...e},String(t))))})]}))),Ya=g((({className:e="",description:t,href:l,icon:n,items:a=[],socialMedia:i=[],target:r,title:s,align:o="text-left",...c})=>u(k,{className:w("relative group-data-gray:bg-main-divider/50 space-y-m",e),defaultPadding:"p-6xl",...c,children:p(ca,{href:l,target:r,children:[u(Qt,{title:s,description:t,headlineVersion:"S",isEmbedded:!0,align:o}),a.length?u(pa,{className:"flex flex-col gap-xs",items:a,listItemSize:"S"}):null,qa(n),i.length?u(Ja,{media:i}):null]})}))),qa=e=>e?.src||e?.icon?u("div",{children:u(Vt,{image:e})}):null,Za=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(de,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(de,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Nl(a)}):null]},String(t))},Qa=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(Za),o=s.slice(0,1),c=s.slice(1);return p(k,{className:w("flex flex-col",e),defaultPadding:"p-3xl",...r,children:[ei(n),t?u(T,{className:w("pt-xs",l),headingType:"h5",title:t}):null,a?u(re,{className:"w-full mt-m",...a}):null,i.length?u(Cl,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(Il,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?ti:null}):null]})})),ei=e=>u("div",{className:"self-center",children:e?.src||e?.icon?u(Vt,{image:e}):null}),ti=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(_e,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),li=(e=!1)=>e?"text-white":"",ni=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),ai=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(Vt,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(Vt,{image:t})}),l?u(T,{headingType:"h4",className:li(a),title:l}):null,n?u("div",{className:ni(a),children:n}):null]}))),ii=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(ri(l,t))})}))),ri=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right "+(e?"text-white":""),children:l}):null,n?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),si=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-m mb-m ${n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(ai,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(ii,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(re,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,oi({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),oi=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),ci=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(di,{...e})})]})})),di=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(si,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(fl,{onVisibleIndicesChange:m,children:h}):h}));var mi;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(mi||(mi={}));const hi=new Intl.NumberFormat("ru",{style:"currency",currency:mi.RUB}),ui=e=>e?hi.format(e):"",pi="text-left text-m font-light text-secondary-text",gi=`${pi} pl-5xl`,xi={USD:"DollarIcon",EUR:"EuroIcon"},fi=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:pi,children:u(de,{size:"text-m",children:"Валюта"})}),u("th",{className:gi,children:u(de,{size:"text-m",children:"Купить"})}),u("th",{className:gi,children:u(de,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(bi)})]}))),bi=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(Vt,{image:{icon:xi[t]},width:"24",height:"24"}):null,u(de,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(de,{size:"text-h6",children:ui(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(de,{size:"text-h6",children:ui(e?.buyExchangeRate)})})]},t)},yi={icon:"GpsIcon"},vi=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Kt,{...yi,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Ni=(e,t,l)=>{const n=Number(wi(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},wi=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Si=e=>{return(t=[[e=>e.value!==mi.RUB&&e.oppositeValue!==mi.RUB,()=>e.handleConvert(e.value,mi.RUB)],[e=>e.value===mi.RUB&&e.oppositeValue===mi.RUB,()=>e.handleConvert(e.value,mi.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function ki(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(ue,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(Ae,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Ci=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||mi.RUB,selectBuy:l?.[0]?.currency?.currency||mi.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[ki({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Ii(r,o,l),value:r.inputSell,setValue:e=>Bi(o,l)(e,r.selectSell,r.selectBuy)}),ki({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Ti(r,o,t),value:r.inputBuy,setValue:e=>Ri(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(re,{className:"py-4 px-9",version:a?.version,...a,children:a.text}):null]})})),Ii=(e,t,l)=>n=>{t({selectSell:n}),Si({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Bi(t,l)(e.inputSell,n,a)}})},Ti=(e,t,l)=>n=>{t({selectBuy:n}),Si({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Ri(t,l)(e.inputBuy,n,a)})},Bi=(e,t)=>(l,n,a)=>{e({inputSell:wi(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Ni(l,i,n===mi.RUB)||"")})},Ri=(e,t)=>(l,n,a)=>{e({inputBuy:wi(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Ni(l,i,n===mi.RUB)||"")})};const Vi=async e=>{const t=await Mi(),l=t?.code||"000";return{region:t,exchangeRates:await Pi(e,l)}},Mi=async()=>{try{return await D("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Pi=async(e,t)=>{try{return await D(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},_i=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=j("/api/v1/exchangerates",Vi);return e||{}}(),i=zi(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:mi.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:mi.RUB}}),u(k,{className:w("box-border min-h-80",e),...n,children:u(wa,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[i?u(fi,{className:"mb-xl",exchangeCurrencyItems:i}):null,u(vi,{address:a?.address})]}),i.length&&r.length&&s.length?u(Ci,{className:"grow",currencyRatesBuy:r,currencyRatesSell:s,button:l}):null]})})})})),zi=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],ji=e=>St(d.SITEMAP||"sitemap",e),Ai=g((({className:e="",items:t})=>t?.length?u("ul",{className:w("flex flex-col","",e),children:t.map(Ei)}):null)),Ei=(e,t)=>{const{text:l,...n}=e;return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",...n,children:l||null})},`list_item_${String(t)}`)},Di=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>p("button",{className:w("flex justify-center w-full py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:i,disabled:a,"data-theme":n,children:[u("span",{className:"text-h4 pr-s",children:t}),l?u(Vt,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),$i=e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Oi=(e,t)=>u(Kt,{...e,iconBgVersion:t,className:"shrink-0"}),Li=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,version:r="primary",...s})=>u(k,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...s,children:u(Cl,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(Il,{className:w("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:Xn({...s,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Fi({version:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));Li.childrenTypes={exclude:["RollupItem"]};const Fi=({version:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть");return"primary"===e?Ui({label:r,labelIcon:l,labelIconBgVersion:n,icon:$i(a),onToggle:i}):u(Di,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Ui=({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>p("button",{className:w("border-none bg-transparent flex justify-between items-center w-full group/button",a?.icon?"py-xs":"py-lg"),onClick:n,children:[p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Oi(a,t),e?u(de,{size:"text-h6",font:"font-normal",children:e}):null]}),l?u(_e,{name:l,iconVersion:"black",width:"24",height:"24"}):null]}),Hi=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(Ki):null,u(re,{version:"primary",className:"w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),Ki=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(de,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(Wi)})]},String(t)),Wi=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:Gi(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),Gi=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Xi(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},Xi=e=>e.replaceAll(/\D/g,""),Ji=g((({className:e="",index:t,text:l,...n})=>{const a=J(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),Yi=g((({title:e,links:t,className:l=""})=>p("div",{className:l,children:[u(de,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg mt-lg",children:t.map(((e,t)=>u(Ji,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),qi=g((({className:e="",index:t,...l})=>{const n=J({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Zi=g((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"pt-lg",children:u(de,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col sm:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(qi,{index:t,...e},String(t))))}):null]}))),Qi=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=ji(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:o,documents:c}=St(d.FOOTER||"footer",l);return p(k,{tag:"footer",className:e,...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(Li,{label:e?.text,labelIcon:e?.icon,children:u(Ai,{items:e.items})},String(t))))}),u(Hi,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(Ja,{className:"mb-xl",media:r,buttonSize:"stretched",children:"Соцсети"}),u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:s?.map(er)})]}),u(Yi,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(Zi,{links:c})]})})),er=({href:e="/"},t)=>{const{label:l}=Wa(e);return u(re,{className:"w-full mb-lg",text:l,version:"secondary",href:e,target:"_blank"},String(t))},tr={"bg-white":"color",transparent:"white"},lr={"bg-white":"text-primary-main",transparent:"text-white"},nr=(e,t,l)=>u(Vt,t?.src?{image:t,className:lr[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:tr[e]},className:lr[e],width:l?.width,height:l?.height}),ar={"bg-white":"text-primary-text",transparent:"text-white"},ir=(e,t,l)=>u("span",{className:`${ar[t]} ml-s font-medium ${l||""}`,children:e||"Россельхозбанк"}),rr=g((({bgColor:e="bg-white",children:t,className:l="",href:n,logo:a,showTitle:i=!0,targetBlank:r})=>p("a",{className:`inline-flex items-center font-sans no-underline ${l}`,href:n||"https://rshb.ru/",target:r?"_blank":"_self","aria-label":a?.title||"Россельхозбанк",children:[nr(e,a?.image,{width:"34",height:"34"}),i?ir(t||a?.title,e,"text-s"):null]}))),sr={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},or=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=X(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u(rr,{className:"mt-2xs",bgColor:e,logo:t}):cr(s),l?u(re,{href:l,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",sr["transparent"===n?"transparent":"default"]),children:"Войти"}):null]})})),cr=e=>p("button",{className:"flex items-center text-l mt-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(Vt,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]}),dr={"bg-white":"primary",transparent:"transparent"},mr=g((({bgColor:e="bg-white",version:t=dr[e],...l})=>{const{logo:n,internetBankUrl:a}=ji(l.options?.page?.fallback);return u(k,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(or,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),hr={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},ur=g((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,...r})=>u(k,{className:w("relative flex flex-col",hr[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...r,children:Xn({...r,extraProps:{className:"w-full",padding:n?"":"p-0"}})})));ur.childrenTypes=[];const pr=g((e=>u(ur,{...e})));pr.childrenTypes=[];const gr=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(Vt,{image:l})})})),xr=["байт","Кб","Мб","Гб","Тб","Пб"],fr=g((({icon:e,text:t,fileSize:l,...n})=>p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...n,children:[e,t?p(de,{size:"text-l",font:"font-light",children:[t,u(de,{color:"text-secondary-text",children:n?.href&&br(yr(n.href),l)})]}):null]}))),br=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),yr=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},vr={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Nr=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=X();return p(k,{className:w("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(Qt,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:w("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",vr[r]),role:"list",children:a.map(wr(o,r,i))}):null]})})),wr=(e,t,l)=>(t,n)=>{const a="Attachment"===t?.docType?K(e)(t?.attachment?.src):t?.href,i="Attachment"===t?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${xr[l]}`})(t?.attachment?.fileSize||0):t?.fileSize;return u("div",{role:"listitem",children:u(fr,{text:t?.text,target:t?.target,href:a,fileSize:i,icon:l?u(Vt,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:l,width:"24",height:"24"}):null})},String(n))},Sr={left:"text-left",center:"text-center",right:"text-right"},kr=e=>e?u("div",{className:"mb-lg pt-3xs",children:u(de,{size:"text-xl","font-weight":"light",children:e})}):null,Cr=e=>e?.length?u(pa,{items:e,className:"text-l font-light"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Ir=e=>{const t=e.length>2;return Nl(e,{className:w(t?"w-full":"flex-nowrap"),isVertical:t})},Tr=g((({className:e,padding:t,alignTitle:l="left",buttons:n=[],description:a,headingType:i="h4",image:r,items:s,qr:o,title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24";return u(k,{className:w("min-h-80",e),padding:"p-0",version:d,...m,children:p(wa,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:c?u(T,{headingType:i,title:c,className:w("whitespace-pre-wrap",Sr[l])}):null,rightImage:r?.src?u(Vt,{className:"hidden lg:block",image:r}):null,buttons:Ir(n),children:[kr(a),p("div",{className:"flex flex-1 flex-wrap gap-m items-center",children:[o?.src?u("div",{className:w("flex justify-center bg-white rounded-md",h),children:u(Vt,{className:"w-fit",image:o})}):null,Cr(s),r?.src?u(Vt,{className:"lg:hidden",image:r}):null]})]})})})),Br=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?Rr("Страховая сумма:",e):null,Number(t)>0?Rr("Ежемесячный лимит:",t):null]}):null,Rr=(e,t=0)=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre",children:[u(de,{font:"font-light",size:"text-l",children:e}),p(de,{size:"text-h6",color:"text-primary-text",children:[rt(2)(t)," ₽"]})]}),Vr=g((({className:e,padding:t,headlineVersion:l="M",align:n="text-center",sum:a,monthLimit:i,imageOptions:r,...s})=>u(k,{className:e,padding:"p-0",...s,children:u(Oa,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:l,align:n,isInsetTitle:!1,imageOptions:{directionRight:!1,imageAlign:"center",...r},...s,children:Br(Number(a),Number(i))})}))),Mr=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:w("box-border",e),...n,children:[u(Qt,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:Pr()})]}))),Pr=(e=3)=>zr(100,e).map((e=>Math.floor(e))).map(_r),_r=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),zr=(e,t)=>[e].concat(t>0?zr(e/1.618,t-1):[]);function jr({text:e,href:t,target:l,icon:n},a){const i="primary"===a?"white":"black",r={text:e,href:t,target:l,ariaLabel:e};return p("div",{className:"flex items-center gap-s",children:[u(re,{className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:a,rounded:!0,...r,children:u(Vt,{className:"w-4 h-4",image:{...n,icon:n?.icon||"ArrowLeftIcon",iconVersion:n?.iconVersion||i}})}),u(re,{version:"link",...r})]})}const Ar=g((({className:e,padding:t,backwardButton:l,...n})=>p(k,{className:w("overflow-hidden flex flex-col gap-3xl box-border",e),defaultPadding:"p-6xl",padding:t,...n,children:[l?.text?jr(l,n.version&&"primary"!==n.version?"white":"primary"):null,u(Oa,{className:"grow h-full",...n})]}))),Er=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:w("overflow-hidden relative",e),padding:t,...n,children:u(fl,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(Oa,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Dr=g((({className:e,padding:t,headlineVersion:l="S",isTabularBenefits:n=!0,additionalDescription:a,imageOptions:i,...r})=>u(k,{className:e,padding:"p-0",...r,children:u(Oa,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,isTabularBenefits:n,imageOptions:{isBackground:!0,...i},...r,children:a?u(ce,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),$r=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Ia,{__html:t,richVersion:l})})})),Or=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function Lr(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Fr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},Ur=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(Fr).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),Hr={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},Kr=(e,t,l)=>p("div",{className:`${Object.values(Hr).join(" ")} bg-white py-s pl-5xl pr-m w-full`,children:[u(_e,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),Wr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},Gr=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Wr).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(_e,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Xr=e=>globalThis[e];const Jr=()=>function(e,t){const[l,r]=n(),s=i((()=>r(Xr(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!Xr(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),Yr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},qr=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Yr).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(_e,{name:l,width:"20",height:"16"})})})),Zr={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},Qr=g((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const r=s(null),o=Jr(),[c,d]=n(),[m,h]=n(ns(Or)),g=es(e);if(a((()=>{r?.current||o?.ready((()=>{r.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),Lr(o,r.current,m)}))}),[o,r,m]),a((()=>{if(r.current&&m&&o){const e=m.length<1?ns(Or):m;Lr(o,r.current,e)}}),[r,m,o]),!o)return null;const x=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-1/2 ${x}`,children:i?Kr(Or,0,(e=>{if(e){const t=ns(e);h(t)}})):Ur(g)}),u("div",{className:`${Object.values(Zr).join(" ")} ${x} right-2 top-4 bg-white`,onClick:()=>{const e=r.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:u(_e,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${x}`,children:[u(qr,{yandexMaps:r}),u(qr,{yandexMaps:r,direction:"out"})]}),Gr(r.current,o,`right-2 top-80 ${x}`)]})})),es=e=>[ls(ts(e,0)),ls(ts(e,1))],ts=(e,t)=>e.map((e=>e[t])),ls=e=>e.reduce(((e,t)=>e+t))/e.length,ns=e=>e?e.map((e=>e.coords)):null,as=g((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(Ae,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),is=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(as,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(as,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),rs=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u("span",{className:"text-primary-text cursor-pointer",children:t}):null]})}))),ss=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:w("order-4",e),children:[u(rs,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(rs,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),os=["От 1 дня","До 365 дней"],cs=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(de,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(mt,{min:1,max:365,value:e,items:os,onChange:t})]}))),ds=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(as,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(as,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),ms=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents sm:block flex-1 space-y-xl",children:[u(is,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:hs(c)}),u(cs,{days:a,setDays:e=>c({days:e})}),u(ds,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:us(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents sm:flex justify-between items-center gap-m",children:[u(ss,{}),u(re,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),hs=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},us=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},ps=g((({days:e,tariffs:t=[]})=>{const l=xs(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents sm:flex flex-col justify-between order-2",children:[p("div",{className:"flex flex-col sm:flex-row gap-x-6xl gap-y-2xl order-5 sm:order-none py-2xl sm:py-0 border-t border-main-divider sm:border-none",children:[gs("Аренда за",e),gs("Цена",l+" ₽")]}),u("span",{className:"sm:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("div",{className:"flex flex-col items-center gap-s order-3 sm:order-none mb-xl sm:mb-0 bg-primary-main py-s sm:p-3xl text-center",children:[u(Vt,{image:{icon:"PackA4Icon"},className:"sm:h-60"}),u("span",{className:"hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),gs=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs sm:flex-col sm:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l sm:text-h3 text-primary-text",children:t})]}),xs=(e,t)=>{const l=fs(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},fs=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},bs=(e,t)=>e.find((e=>e.branchCode===t)),ys=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=bs(n,l.selectedBranch),o=vs(s?.safeBoxCaseVolumes),c=Ns(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=ws(c,l.selectedBoxSize);return p("div",{className:"flex flex-col sm:flex-row gap-4xl align-top",children:[u(ms,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(ps,{days:l.days,tariffs:d})]})})),vs=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Ns=(e,t)=>e?.find((e=>e.volume===t)),ws=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Ss=[];const ks=async e=>await E(e,{method:"GET"})||Ss,Cs=g((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=O(),h=Is(c.selectedRegion,m),g=function(e){const{data:t}=j(e?`/api/v1/safeboxes?regionCode=${e}`:null,ks);return t||Ss}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=bs(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(ys,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(ce,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(Qr,{points:f,className:"h-[640px]"}):null]})})),Is=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Ts(e){throw new Error(e)}const Bs=e=>Boolean(e?.icon||e?.src),Rs={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Vs={normal:"",small:"min-h-6xl"},Ms={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},Ps=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:r="primary",...s})=>p(k,{className:w("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[u(Qt,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(_s(i,r))})}):null,Nl(a,{isVertical:!0})]}))),_s=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return zs(e,t)(l,n);case"rte":return u(Ia,{__html:l.__html});default:Ts(l)}},zs=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:js(e,t)(l,n)}),p("div",{className:w("flex flex-col justify-center h-fit",Vs[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:w("text-s font-light text-left",Ms.description),children:l.description}):null]})]})},String(n)),js=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(l?.icon?.src),s=Rs[e][r?"image":"icon"];return u("div",{className:w(s,r?"":`rounded-md ${Ms.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex self-center text-h4 text-secondary-text group-data-secondary:text-white",children:Bs(l?.icon)?u(Vt,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},width:a,height:a}):u("span",{children:n+1})})})},As={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Es={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Ds={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},$s={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Os=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,...s}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",As[n],l?$s[n]:Ds[n]),role:"tab","aria-selected":l,onClick:a,...s,children:u("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Es[n]:"text-secondary-text hover:text-primary-main"),children:u(de,{size:"text-m",children:r})})})})),Ls=g((e=>u(e?.item?.href?Fs:Us,{...e}))),Fs=g((e=>{const t=J(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Os,{...e,tag:"a",item:a,onClick:n})})),Us=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(Os,{item:e,onClick:n,...l})})),Hs=(e,t,l)=>(n,a)=>u(Ls,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Ks="hidden sm:flex absolute z-40 top-0",Ws=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=xl({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(nl,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(Hs(l,n,a))}),r.canScrollLeft?u(En,{className:w("left-6",Ks),onClick:r.scrollLeft}):null,r.canScrollRight?u(Dn,{className:w("right-6",Ks),onClick:r.scrollRight}):null]})})),Gs=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(Hs(n,a,t))}))),Xs=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(Gs,{...t});case"centered":return u("div",{className:"flex",children:u(Gs,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Ws,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Js=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=r((()=>l.map(qs)),[l]),[d,m]=n(0);a((()=>{l&&l[0]&&Ys(l[0])}),[]),a((()=>{const e=l[d];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[l,d]);const h=i((e=>{const t=c.indexOf(e);m(t),Ys(l[t])}),[l,c]);return u(k,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:Xs({items:c,value:c[d],tabsMode:s,onChange:h})})})),Ys=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},qs=e=>"group"===e?.type?{text:e.title}:e,Zs={Buttons:({buttons:e})=>Nl(e,{className:"mt-s",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(Vt,{image:e,className:"m-0",imageClassName:"m-0"}):null,List:({isDotted:e,...t})=>u(pa,{className:"flex flex-col justify-between items-start text-m pl-xs text-base",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"mb-xs",children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},Qs=g((({title:e,icon:t})=>p("div",{className:"mb-xs",children:[e?u(de,{size:"text-l",font:"font-light",children:e}):null,t?u(Vt,{className:"ml-auto min-w-6",image:t,width:"24",height:"24"}):null]}))),eo=g((({tile:e,...t})=>p("div",{className:"h-full",children:[u(Qs,{title:e?.header?.title}),e?.data?.length?e.data.map(((e,l)=>u("div",{className:"mb-xs",children:to(e,t)},String(l)))):null]})));function to(e,t){if(!e||!e.tableCellType||!(e.tableCellType in Zs))return null;const l=Zs[e.tableCellType];return u(l,{displayTable:()=>null,isVisible:!0,...e,...t})}const lo=g((({tiles:e,...t})=>e?.length?u(fl,{...t,padding:void 0,children:e.map(((e,l)=>u(eo,{tile:e,...t},String(l))))}):null)),no=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-s",children:e.map(((e,l)=>u(eo,{tile:e,...t},String(l))))}):null)),ao=g((({className:e,title:t,description:l,tariffsColumns:n,rowHeaders:a,orientation:i="vertical",...r})=>{const s=io(n),o=ro(a,s);return p("section",{className:`p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[u(Qt,{title:t,description:l,headlineVersion:"M",align:"text-left",isEmbedded:!0}),u("vertical"===i?no:lo,{tiles:o,...r})]})})),io=e=>e?.[0]?.data?e[0].data:[],ro=(e,t)=>e?.map(((e,l)=>({header:e,data:t?.[l]||[{}]}))),so=g((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(k,{className:w("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?oo():null,"big"===n?co(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(de,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?mo(l):null,r?.length?ho(r,!0):null,i?u(Ia,{__html:i}):null]})]}))),oo=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),co=e=>e?.src?u(Vt,{className:"h-fit flex-shrink-0",image:e}):null,mo=e=>u(ce,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),ho=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(de,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),uo=g((({className:e,padding:t,headlineVersion:l="S",listItemSize:n="M",...a})=>u(k,{className:e,padding:"p-0",...a,children:u(Oa,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,listItemSize:n,...a})}))),po={ApplicationForm:Ft,BenefitsBlock:Wt,BonusBenefitsBlock:vl,ButtonsBlock:kl,Calculator:In,CardTransfer:jn,Carousel:ta,CarouselBankHistoryCard:la,CarouselCard:ia,CarouselCatalogCard:sa,CarouselProductCard:ga,CarouselProgramsCard:Fa,CarouselRecommendationCard:Ya,CarouselTariffsCard:Qa,ComparisonTable:ci,ExchangeRateTile:_i,Footer:Qi,Header:mr,Headline:Qt,HorizontalLayout:pr,ImgBlock:gr,LinkDocs:Nr,MobileAppTile:Tr,PictureText:Vr,Placeholder:Mr,ProductBlock:Ar,ProductGallery:Er,ProductTile:Dr,RichTextBlock:$r,RollupItem:Li,SafeDepositRental:Cs,StepsBlock:Ps,Tabs:Js,TariffsTable:ao,TextBlock:so,Tile:uo,VerticalLayout:ur};const go=["Header","Footer"],xo=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function fo(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!go.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?hl(xo)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const bo=g((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(Vt,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),yo="cookie",vo=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:r}]=Me();((e,t,l=300)=>{a((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t)})((()=>{globalThis.localStorage?.getItem(yo)||n()}),[],3e3);const s=i((()=>{globalThis.localStorage?.setItem(yo,"true"),r()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"sm:flex-1",children:p(ce,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(ca,{isRemote:!0,className:No(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(ca,{isRemote:!0,className:No(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(bo,{className:"bg-main-gray rounded-md",onClose:s})})]})}):null})),No=e=>w("inline mx-2xs",e?"text-green-dark":"");const wo=g((()=>{const[e,{push:t,pop:l,clear:r}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),s=i((()=>{for(const t of e)t.onClose&&t.onClose();r()}),[e]),o=i((()=>{const t=e[e.length-1];t?.onClose&&t.onClose(),l()}),[e]);return a((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":t(e);break;case"close":e.all?s():o();break;default:Ts(e)}}))),[s,o]),a((()=>{const e=({key:e})=>{"Escape"===e&&o()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[o]),a((()=>{e.length?globalThis.document?.body.classList.add("no-scrollbar"):globalThis.document?.body.classList.remove("no-scrollbar")}),[e]),e.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:e.map((({dialog:t,id:l},n)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===e.length-1?"":"hidden"),children:t},String(l||n))))}):null})),So=h();const ko=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Co()}))),Co=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Io=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await So.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await So.like(e))}),[e]),dislike:i((async()=>{l(await So.dislike(e))}),[e])}}(X().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(ko,{onClick:G(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(ko,{onClick:G(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),To=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return fo(),p("div",{children:[p("section",{className:w("relative @container",a,e),"data-theme":s,children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:Gn(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container @lg:grid @lg:grid-cols-12 @lg:gap-2xs",children:[Xn({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),Gn(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Io,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(wo,{}),u(vo,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));To.childrenTypes=[],To.slots=()=>["header","footer"];e.Blocks=po,e.ContentPage=To,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=G,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.13.4",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=H,e.useRouter=X,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};class f{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const b=new f;function y(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:v(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new f;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},k=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[g,x]=n(!1);a((()=>b.subscribe("tab",(e=>{x(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:w("@container font-sans",f?"group":"",S[t],g?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=C[l]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:n||a})})),B=e=>e,R=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},M=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],V=e=>!e?.length,_=e=>t=>l=>e(l)?[]:[t],P=e=>null!=e,z=new Map;function j(e,t,{fallback:l,cache:i}={}){const s=r((()=>A(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{!s.some(P)||(async()=>{try{const e=await(o?((e,t=z)=>l=>{const n=t.get(l);if(P(n))return n;const a=e(l);return P(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function A(e){return Array.isArray(e)?e:e instanceof Function?A(e()):[e]}async function E(e,t){try{return e?await D(e,t):null}catch(e){console.error(e)}return null}async function D(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}const $=[];function L(){const{data:e}=j("/api/v1/regions",D);return e||$}const O=()=>({open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})}),F=e=>Boolean(e?.includes(":")),U=(e,t)=>Boolean(e&&!F(e)&&(!t||"_self"===t)),H=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var K=Object.freeze({__proto__:null,isURL:F,isLocalURL:U,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:H});const W=e=>(t,l=d.BASE_PATH)=>{if(!t||F(t)||X(t,d.CDN))return t;const n=t.startsWith("/");return H(X(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},X=(e,t)=>t&&e&&e.startsWith(t),G=(e,t)=>G._impl(e,t);function J(){return J._impl()}function Y(e={}){const{isRemote:t,basePath:l}=e,n=J(),{closeAll:a}=O();return e=>({...e,href:t&&!l?e.href:W(n)(e.href,l),"aria-label":e.text,onClick:G(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&U(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}G._impl=e=>e,G.setup=e=>{G._impl=e},J._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),J.setup=e=>{J._impl=e};const q={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},Z="bg-main-divider text-main-disabled",Q={primary:Z,secondary:Z,white:Z,link:"",transparent:"",gray:Z,"":""},ee="text-center font-sans select-none",te={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},le=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e;return p("div",{className:w(ne(e),"flex gap-xs"),children:[n?u("div",{className:te[i],children:n}):null,ae(e)?p("div",{children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:te[i],children:a}):null]})})),ne=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return["group/btn items-center justify-center",ae(e)?a:"h-12 w-12",n?"rounded-full":""].join(" ")},ae=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ie=({className:e,rounded:t,version:l})=>["inline-block",ee,l?Q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),re=({className:e,rounded:t,version:l})=>[ee,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),se=g((({disabled:e,children:t,...l})=>{const n=Y()(l),a=t??u(le,{...n});return u(e?ce:oe,{...n,children:a})})),oe=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:re({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),ce=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ie({className:e,rounded:n,version:l}),children:a}))),de=g((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),me=g((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),he=g((({link:e})=>p(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(me,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(se,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(me,{children:e.text})}):null]}))),ue=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},pe=g((({key:e,className:t="",inputClassName:l="",id:n,name:a,type:r="text",label:s,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:g,onBlur:x,pattern:f,autoFocus:b=!1})=>{const y=i((e=>{h&&h(e.target?.value||"")}),[h]),v=m?"pr-3xl":"",N=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[s?u("div",{className:"mb-xs",children:u(me,{size:"text-m",font:"font-light",children:s})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-m",v,N,l),id:n,name:a||n,placeholder:o,type:r,value:c,onInput:y,onFocus:g,onBlur:x,pattern:f,autoFocus:b},e)]}),m]})})),ge=g((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(pe,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(me,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),xe=e=>"_"===e,fe=e=>/\d/.test(e),be=e=>xe(e)||fe(e),ye=[..."+7 (___) ___-__-__"],ve=ye.findIndex(xe),Ne=ye.map(((e,t)=>be(e)?ye.slice(0,t).filter(be).length:-1));const we=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=ye.map(((e,l)=>fe(e)?e:t.charAt(Ne[l])||e)),n=Ne.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(ve,n)):l).join("")}(e))),[t]);return u(pe,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Se=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(we,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(me,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),ke="Некорректно заполненное поле",Ce=_((e=>null!=e&&""!==e))(ke),Ie=_((e=>"string"==typeof e&&e.length>1))(ke),Te=_((e=>"string"==typeof e&&(10===e.length||12===e.length)))(ke),Be=(Re=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,_((e=>"string"==typeof e&&Re.test(e))))(ke);var Re;const Me=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Наименование организации",...ue(e("fullName"),Ce)}),u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...ue(e("name"),Ie)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"ИНН",...ue(e("inn"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(e("phone"),Be)})]})]}),Ve=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function _e(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const Pe=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=new Array(e.length),a=new Array(t.length);let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const ze={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},je=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",...r})=>{const s=J(),o=W(s)(H(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(Ee,{className:e,children:p("svg",{className:w(Ae(r.width),ze[i],"white"===i?"invert":"",t),...r,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(r.style={height:`${r.height}px`}),u("img",{className:e,src:o,alt:n,title:a,"aria-hidden":"true",...r}))})),Ae=e=>e?"":"w-full h-full",Ee=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),De=g((({className:e="",label:t,options:l=[],value:r,valid:o=!0,isBorder:c=!0,placeholder:d="",onChange:m,isSearch:h=!1})=>{const[g,{setFalse:x,toggle:f}]=_e(),[b,y]=n(""),v=i((()=>{x(),y("")}),[]),N=function(e){const t=s(null);return a((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}(v),S=i((e=>{v(),m&&m(e)}),[m]);return p("div",{className:e,ref:N,children:[$e(t),p("div",{className:w("relative",g?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",He(c,o)),onClick:f,children:[u("p",{className:"p-m pr-3xl h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:Ue(r)||d}),u(je,{className:w("absolute right-3",g?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),h?Oe(g,b,y):null,l?.length?u("div",{className:w("h-0",g?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:Le(l,b).map(Fe(S,g,(e=>e.key===r?.key)))})}):null]})]})})),$e=e=>e?u("div",{className:"mb-xs",children:u(me,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,Le=(e,t)=>t?e.filter((e=>Pe(e.text?.toLowerCase())(t.toLowerCase())>=.6)):e,Oe=(e,t,l)=>e?u("div",{className:w("absolute top-0 w-full h-full z-20"),children:u(pe,{type:"text",autoFocus:!0,value:t,onChange:l})}):null,Fe=(e,t,l)=>(n,a)=>p("div",{onClick:()=>{e(n)},className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",children:[u("span",{className:"min-h-6",children:Ue(n)}),u(je,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-3xs",l(n)&&t?"":"hidden")})]},String(a)),Ue=e=>e?.text||e?.key||"",He=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Ke=g((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(De,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(me,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),We=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider sm:border-none sm:flex sm:justify-between gap-lg ",children:[u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ve.map((({name:e=""})=>({key:e,text:e}))),...ue(t("acquiringType"),Ce)})}),u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ue(t("region"),Ce)})})]}),Xe=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:w("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(me,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Ge=e=>p("div",{children:[u(Xe,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Xe,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),Je=(e,t)=>{const l=re({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-m w-full sm:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},Ye={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},qe=M({acquiringType:Ce,region:Ce,fullName:Ce,inn:Te,name:Ie,phone:Be}),Ze=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;V(qe(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s})}),[n]),[,{field:r,...s}]=R(Ye,a),o=L();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"sm:text-center"}),We({regions:o,field:r}),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Me(r),Ge(r),Je(t),u(he,{link:l})]})})),Qe=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...ue(e("name"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...ue(e("inn"),Te)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(e("phone"),Be)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...ue(e("mail"),Ce)})]})]}),et=({regions:e,field:t})=>u(Ke,{className:"w-full",label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ue(t("region"),Ce)}),tt={name:"",phone:"",inn:"",mail:""},lt=M({region:Ce,name:Ie,phone:Be,inn:Te,mail:Ce}),nt=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;V(lt(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,phone:a,inn:i,mail:r})}),[n]),[,{field:r,...s}]=R(tt,a),o=L();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[et({regions:o,field:r}),Qe(r),Je(t),u(he,{link:l})]})})),at=[];const it=async e=>await E(e,{method:"GET"})||at,rt=["От 1 000 ₽","До 1 000 000 000 ₽"],st=["От 1 мес","До 15 лет"],ot=e=>p("div",{className:"pb-2xs border-b border-b-main-divider sm:flex sm:justify-between sm:gap-lg sm:border-none sm:pb-0",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Наименование организации",...ue(e("fullName"),Ce)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...ue(e("inn"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(e("phone"),Be)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...ue(e("annualRevenue"),Ce)}),u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...ue(e("name"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),ct=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},dt=(e,t,l)=>Math.max(t,Math.min(e,l)),mt=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function ht(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function ut({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s-t)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:"w-2 h-2 rounded-full "+(s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=ht(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const pt=1,gt=100,xt=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:pt),max:s=(a.length?a.length-1:gt),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=ct(e,{normalize:(e=0)=>a.length?ft(a)(e):dt(e,r,s),format:mt()}),g=i((e=>{m&&m(ht(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(me,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("m-0 mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),ut({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),bt(n)]})})),ft=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),bt=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),yt=e=>p("div",{className:"border-b border-b-main-divider sm:flex sm:justify-between gap-lg sm:border-none",children:[p("div",{className:"sm:w-1/2",children:[u("label",{children:u(me,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(xt,{items:rt,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"sm:w-1/2",children:[u("label",{children:u(me,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(xt,{items:st,min:1,max:180,...e("term")})]})]}),vt=({regions:e,branches:t,field:l})=>p("div",{className:"sm:flex sm:justify-between sm:gap-m sm:mb-2xl sm:border-none sm:pb-0",children:[u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ue(l("region"),Ce)})}),u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...ue(l("department"),Ce)})})]}),Nt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},wt=M({fullName:Ce,annualRevenue:Ce,inn:Te,name:Ie,phone:Be,region:Ce,department:Ce}),St=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;V(wt(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=R(Nt,n),o=L(),c=function(e){const{data:t}=j(e?`/api/v1/branches?regionCode=${e}`:null,it);return t||at}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры",className:"sm:text-center"}),yt(r),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),ot(r),u(T,{headingType:"h6",title:"Офис банка",className:"sm:text-center"}),vt({regions:o,branches:c,field:r}),Je(e),u(he,{link:t})]})})),kt={name:"",phone:""},Ct=M({name:Ie,phone:Be}),It=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{name:t,phone:l}=e;V(Ct(e))&&n({typeForm:"dpst",name:t,phone:l})}),[n]),[,{field:r,...s}]=R(kt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"sm:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Имя",...ue(r("name"),Ie)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(r("phone"),Be)})]}),p("div",{className:"flex justify-between flex-col-reverse sm:items-center sm:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(he,{link:l})}),Je(t)]})]})})),Tt={};function Bt(e,t=Tt){const{data:l}=j(e?`/wcms-resources/${e}.json`:null,D,{fallback:t});return l||Tt}const Rt=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=Bt(l||"regions-grant-support"),[i,r]=n({key:""}),s=re({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s sm:space-y-lg",children:[a?u(Ke,{label:"Ваш регион",placeholder:"Выберите регион",options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(se,{href:o,target:"_blank",className:w("p-m w-full sm:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Mt=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Vt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=J();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Mt).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:Pt(a,n)(e),type:zt(l),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,t?.src?_t({...t,src:Pt(a,n)(t.src)},l):null]})})),_t=(e,t="")=>u("img",{src:e.src,className:w("object-contain",t),alt:e.alt||e.title,title:e.title||"",style:{width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"auto"},...e.size}),Pt=(e,t)=>l=>l&&!F(l)?W(e)(H(t,l)):l,zt=e=>e?`image/${String(e)}`:void 0,jt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(je,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(Vt,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),At=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>u("path",{d:e,fill:t||"currentColor",...r,...l},n)))}))),Et=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Dt=g((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(At,{paths:Et,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":$t(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(me,{size:"text-l",font:"font-light",children:l})}):null]})})})),$t=e=>w("rounded border",e?"bg-primary-main":""),Lt=e=>{const t=e("text");return p("div",{className:"space-y-m",children:[p("div",{className:"sm:flex sm:items-center sm:gap-xl",children:[u(Dt,{text:"Валютный контроль",...e("currencyControl")}),u(Dt,{text:"Документарные операции",...e("documentaryOperations")}),u(Dt,{text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-m outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},Ot=e=>p("div",{children:[p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[u("div",{className:"sm:w-1/2",children:u(ge,{className:"shrink-0 w-full mb-s",label:"Наименование организации",...ue(e("fullName"),Ce)})}),u("div",{className:"sm:w-1/2",children:u(ge,{className:"shrink-0 w-full mb-s",label:"ФИО",...ue(e("name"),Ie)})})]}),p("div",{className:"sm:flex sm:justify-between sm:gap-lg sm:mb-2xl",children:[u("div",{className:"sm:w-1/2",children:u(Se,{className:"shrink-0 w-full mb-s",label:"Телефон",...ue(e("phone"),Be)})}),u("div",{className:"sm:w-1/2",children:u(ge,{className:"shrink-0 w-full mb-s",label:"Электронная почта",...ue(e("mail"),Ce)})})]})]}),Ft={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Ut=M({fullName:Ce,name:Ie,phone:Be,mail:Ce}),Ht={ApplicationFormBusinessCard:nt,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,currencyControl:r,documentaryOperations:s,conversionOperations:o,text:c}=e;V(Ut(e))&&n({typeForm:"kved",fullName:t,name:l,phone:a,mail:i,partnerComments:`Валютный контроль=${r}/Документарные операции=${s}/Конверсионные операции=${o}/Доп инф=${c}`})}),[n]),[,{field:r,...s}]=R(Ft,a);return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Ot(r),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"sm:text-center"}),Lt(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg sm:items-center sm:flex-row sm:pb-4xl",children:[Je(t),u(he,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"sm:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(jt,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(jt,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:It,ApplicationFormCredit:St,ApplicationFormAcquiring:Ze,ApplicationFormGrantSupport:Rt},Kt=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(jt,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Wt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Xt=g((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async e=>{const t=await Wt.send(e)?"OK":"Fail";return s(t),t}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"sm:text-center"}):null,l?Gt(l,o):null,r?u(Kt,{responseType:r}):null]})})})),Gt=(e,t)=>{const l=e?.formType;if(!l||!(l in Ht))return null;return u(Ht[l],{...e,onSubmit:t})},Jt={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Yt=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:w("rounded-icon object-fit flex justify-center items-center ",Jt[l],e),children:u(je,{...i,width:"54%",height:"54%",name:a})}):null})),qt=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:"text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full sm:justify-center mt-xl gap-5xl",role:"list",children:l.map(Zt)}):null]}))),Zt=(e,t)=>p("div",{className:"flex gap-m items-center md:basis-1/2 md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(Yt,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(jt,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),Qt(e.description)]}):null]},String(t)),Qt=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?tl(e):el(e)}):null},el=e=>e?.name||null,tl=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},ll={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},nl={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},al=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=ll[l],m={marginTop:d.descriptionStyle};return p(k,{className:w(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(de,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),il=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),rl=g((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=y(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),sl=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],ol=g((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=s([]),f=i(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,h&&h(l),p&&p(dl(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?cl(r,b):{},...y?il(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(S=(e,t)=>u(rl,{className:w(c,n?sl[n-1]:"",y?"h-full":""),style:v?cl(r/4):{},activeIndex:l,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),cl=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),dl=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ml={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},hl={"horizontal-list":"w-6","vertical-list":"h-6"},ul=g((({containerRef:e,activeIndex:t,dotCount:l=0,listType:n="horizontal-list",version:a})=>l?u("div",{className:w("flex gap-xs",ml[n],a?"group":""),...a?{"data-ver":a}:{},children:new Array(l).fill(null).map(((l,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?hl[n]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),pl=e=>e,gl=(e=pl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),xl=gl(),fl=(e=pl)=>gl((t=>-e(t))),bl=fl(),yl=e=>t=>e.scrollWidth/t,vl=e=>(t,l)=>{e.scrollBy({left:l*yl(e)(t),behavior:"smooth"})},Nl=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[fl()(a),gl()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?vl(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?vl(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]);return[l,{scrollLeft:u,scrollRight:p,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},wl=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=!0,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=Nl({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(ol,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(ul,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Sl="text-left",kl=(e,t,l)=>u(wl,{children:e.map(((e,t)=>(({icon:e,title:t,description:l},n)=>p("div",{className:w("flex flex-col","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(me,{size:"text-h6",font:"font-normal",align:Sl,children:t}):null,e?u(jt,{image:e,height:"180",className:"w-auto"}):null,l?u(me,{size:"text-h6",font:"font-normal",align:Sl,children:l}):null]},String(n)))({...e},t)))}),Cl=g((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(k,{className:l,defaultPadding:"p-6xl",...r,children:[u(al,{className:"mb-4xl sm:mb-3xl",title:i,description:a,headlineVersion:"M"}),e?.length?kl(e):null]}))),Il=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap gap-m",t),children:e.map(Tl(l))}):null,Tl=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o="secondary"===r?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return n||a?.icon?u(se,{className:w("basis-full sm:basis-auto",e),appendLeft:Bl({...a,iconVersion:c}),appendRight:Bl({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Bl=e=>e?.icon||e?.src?u(jt,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Rl={start:"justify-start",center:"justify-center",end:"justify-end"},Ml=g((({buttons:e,className:t="",align:l,...n})=>{const a=l?w("flex",Rl[l]):"";return u(k,{className:w("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Il(e)})})),Vl=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),_l=g((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),Pl=g((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("flex justify-between md:flex-col",a),children:[e?u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(me,{size:"text-h3",children:[n," ",mt(2)(Math.round(t))," ",l]})}:{children:u(me,{size:"text-h3",children:"-"})})]}))),zl=Math.round(23.5),jl={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:12.5,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Al={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:7.5,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},El={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Dl={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},$l={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},Ll=g((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,rateBlockClassName:i,fractionDigits:r=2})=>p("div",{children:[u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:w("font-mohave text-title-huge pr-xl -mt-m",i),children:String(e.toFixed(r)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:n}):null]})]}))),Ol=e=>e?u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null;function Fl({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${mt(2)(l.min||0)} ₽`,`До ${mt(2)(l.max||0)} ₽`];return u(xt,{items:e?n:[],step:t,...l})}function Ul(e){const{data:t}=j(`/wcms-resources/${e}.json`,D);return t}const Hl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Ul(t||"bonus-calculator-data")||El,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},Kl=g((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[a,{field:i}]=R({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Hl(a,t);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Fl({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Fl({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?u(Ll,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null,p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[m>=0?u(Pl,{title:"Баллов за год",value:m}):null,Il(l,{isVertical:!0}),Ol(n)]})]})})),Wl=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Xl=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Gl([e,t],n),Gl=([e,t],l=[])=>({[e]:l.length?bl(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?xl(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Jl=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Yl=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,ql=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Zl=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ql={horizontal:"gap-5xl",vertical:"flex-col gap-s"},en=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:w(`flex ${Ql[a]}`,l),children:e?.map((({id:e,text:l})=>u(Dt,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),tn=({items:e,title:t,orientation:l="horizontal",value:n,radioGroupClassName:a,onChange:i})=>p("div",{className:"space-y-s",children:[t?u("div",{children:u(me,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(en,{orientation:l,items:e,checkedItem:e[n?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),ln=e=>tn({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),nn=g((({title:e="Ставка"})=>p("div",{children:[u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-2xs pt-2xs pl-lg pb-xs",children:u(je,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-64 mt-m",children:p(de,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),an=({rate:e,depositeName:t,isShowDepositeName:l})=>u(Ll,{rate:e,depositeName:t,isShowDepositeName:l,rateBlockClassName:"tracking-[-25px]",unit:"%"}),rn=({rate:e})=>u(Pl,{title:"Ставка",value:e,postfix:"%"}),sn=e=>e.isShowUnknownRate?u(nn,{}):p("div",{children:[u("div",{className:"hidden md:block",children:an(e)}),u("div",{className:"md:hidden",children:rn(e)})]}),on=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i})=>{const[r,{field:s}]=R({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isSmallBusiness:r,isMonthlyInterestPayment:s}=e,o=Ul(t||"business-calculator-data"),c=i||a,d=l<90||l>730;if(l<=30)return{...$l,...e,isDisabledOperatingDeposit:d,isShowUnknownRate:!0};const m=o?.rateRows?.find((e=>s===e.isMonthlyInterestPayment&&r===e.isSmallBusiness&&Yl(c,e)&&Jl(n,["minSum","maxSum"],e)&&Jl(l,["minDays","maxDays"],e)))||$l,{rate:h}=m,u=ql(h,e),p=n+u,g=o?.rateRows||[$l];return{...m,...Gl(["minSum","maxSum"],g),...Gl(["minDays","maxDays"],g),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(r,t),{income:c,finalSum:d,rate:m,isShowUnknownRate:h,depositeName:g}=o;return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Fl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(x={title:"Срок, дней",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(xt,{items:[`От ${Zl(x.min||0)}`,`До ${Zl(x.max||0)}`],step:1,...x})),cn(o,s),ln({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]}),u("div",{className:"border-b border-main-divider md:hidden"}),sn({rate:m,depositeName:g,isShowDepositeName:i,isShowUnknownRate:h}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[dn(d,c),Il(l,{isVertical:!0}),Ol(n),Ol(a)]})]});var x})),cn=(e,t)=>p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(Dt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(Dt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(Dt,{text:"ИП / малое предприятие",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),dn=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Pl,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Pl,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),mn=({min:e=0,max:t=0,availableMonths:l,...n})=>u(xt,{items:[`От ${hn(e)}`,`До ${hn(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),hn=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,un=e=>pn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&pn({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&pn({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&pn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),pn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],gn=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},xn=(e,t,l)=>{let{moneyValue:n,monthsValue:a}=e;const i=Ul(t||"credit-calculator-data"),s=i?.rateRows||[jl],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>un({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Xl(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Xl(["minMonths","maxMonths"],o,s);n=dt(n,c,d),a=dt(a,m,h);const u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>un({row:e,userInputParams:t,paramsViewSettings:l})&&Jl(n,["minSum","maxSum"],e)&&Jl(a,["minMonths","maxMonths"],e)))||jl)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=gn(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},fn=e=>tn({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),bn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,isMobile:i})=>{const[r,{field:s}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:zl}),o=xn(r,t,a),c=fn({title:i?"Тип платежа":"",orientation:"vertical",...s("isAnnuity")});return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Fl({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),mn({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),yn({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),sn({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Pl,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),Il(l,{isVertical:!0}),Ol(n)]})]})})),yn=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(Dt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(Dt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(Dt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(Dt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),vn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Ul(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Sn(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>wn({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&wn({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Jl(n,["minSum","maxSum"],t)&&Jl(a||r,["minMonths","maxMonths"],t)))||Dl,{rate:d}=c,m=Nn(d,e),h=n+m,u=i?.rateRows||[Dl];return{...c,...Gl(["minSum","maxSum"],u),...Gl(["minMonths","maxMonths"],u),availableMonths:Wl(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},Nn=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},wn=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Sn=(e,t)=>e+Math.round((t-e)/2),kn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[r,{field:s}]=R({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=vn(r,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:g}=s("monthsValue");return a((()=>{g&&g(c)}),[c]),p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Fl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),mn({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),Cn({...o,...i},s)]}),u("div",{className:"border-b border-main-divider md:hidden"}),sn({rate:d}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Pl,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(Pl,{title:"Сумма в конце срока",value:h,postfix:"₽"}),Il(l,{isVertical:!0}),Ol(n)]})]})})),Cn=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?ln({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},tn({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},In=e=>Tn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Tn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"})&&Tn({...e,fieldKey:"isExtraMoney",viewSettingFieldKey:"isShowExtraMoney"}),Tn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Bn=(e,t,l)=>{let{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e;const o=Ul(t||"refinancing-calculator-data"),c=o?.rateRows||[Al],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>In({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=Xl(["minSum","maxSum"],d,c),{minSumOld:u,maxSumOld:p}=Xl(["minSumOld","maxSumOld"],d,c),{minSumExtra:g,maxSumExtra:x}=Xl(["minSumExtra","maxSumExtra"],d,c),{minMonths:f,maxMonths:b}=Xl(["minMonths","maxMonths"],d,c);n=dt(n,m,h),i=dt(i,u,p),s=dt(s,g,x),a=dt(a,f,b);const y=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>In({row:e,userInputParams:t,paramsViewSettings:l})&&Jl(n,["minSum","maxSum"],e)&&Jl(i,["minSumOld","maxSumOld"],e)&&Jl(r,["minSumExtra","maxSumExtra"],e)&&Jl(a,["minMonths","maxMonths"],e)))||Al)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:v}=y,N=gn(v,e),w=e.oldMonthlyPayment-N;return r((()=>({...y,...e,minSum:m,maxSum:h,minMonths:f,maxMonths:b,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:N,benefit:w})),[e,o])},Rn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Bn(i,t,a);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Fl({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum,...r("moneyValue"),value:s.moneyValue}),Fl({title:"Ежемесячный платеж в других банках, ₽",isShowItems:!1,step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),mn({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Mn({...s,...a},r),s.isExtraMoney?Fl({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null]}),u(Ll,{title:"Ставка",rate:s.rate,fractionDigits:1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Pl,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Pl,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,fn({orientation:"vertical",...r("isAnnuity")}),Il(l,{isVertical:!0}),Ol(n)]})]})})),Mn=(e,t)=>p("div",{className:"space-y-s",children:[e.isShowSalaryClient?u(Dt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(Dt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,e.isShowExtraMoney?u(Dt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney}):null]}),Vn={CreditCalculatorForm:bn,DepositCalculatorForm:kn,BusinessDepositCalculatorForm:on,BonusCalculatorForm:Kl,RefinancingCalculatorForm:Rn},_n=g((({className:e,calculatorTabs:t=[]})=>u(k,{className:e,defaultPadding:"p-0",children:zn(t)}))),Pn=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Vn))return null;return u(Vn[t],{...e.calculatorBlock,isMobile:!0})},zn=e=>{if(!e||!e.length)return null;return 1===e.length?u(k,{children:Pn(e[0])}):e.map(((e,t)=>u(Vl,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(_l,{isUnfolded:t,children:u(k,{children:Pn(e)})}),renderFoldButton:jn(e)},t.toString())))},jn=e=>({isUnfolded:t,onToggle:l})=>p("button",{onClick:l,className:"w-full p-xl bg-green flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(je,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(me,{align:"text-left",color:"text-white",children:e.nav?.title}),u(me,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(je,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),An=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=ct(e,{normalize:(e=a)=>l&&n?String(dt(Number(En(e)),l,n)):En(e),format:mt(r)}),c=i((e=>t&&t(En(e))),[t]);return u(pe,{onChange:c,...s,...o})})),En=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Dn=g((e=>u(An,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(me,{size:"text-xl",font:"font-light",children:"₽"})})}))),$n={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Ln={amount:1500,_amount:1500},On=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...r})=>{const[{amount:s,_amount:o},{field:c}]=R(Ln),d=s<=0,m=d?ie({version:a?.version}):re({className:"text-white",version:a?.version}),h=Y();return p(k,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h2",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:$n[i],children:[u(Dn,{name:"_amount",valid:!d,placeholder:n,label:l,...c("_amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:o}),a?.text?u("button",{type:"submit",className:w("w-full p-m mt-lg",m),disabled:d,...h(a),children:a.text}):null]})]})})),Fn=g((({className:e,disabled:t,...l})=>u(se,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(jt,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Un=g((e=>u(Fn,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Hn=g((e=>u(Fn,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Kn="absolute top-[calc(50%-24px)] z-40",Wn="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Xn=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[Gn(e),h?u(Un,{className:w(Kn,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(Hn,{className:w(Kn,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Gn=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(Wn,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(Wn,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Jn=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),Yn=[];function qn(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=Jn,blocksRegistry:r={},ancestors:s=Yn}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const Zn=[],Qn=(e,{key:t,ancestors:l=Zn,slotName:n=null,extraProps:a,renderProps:i=qn,...r})=>{const s=a?(e,t)=>qn(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||Zn,[r.parent,n]]:l},a)))};function ea({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?Qn(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const ta=({className:e,text:t="ХИТ"}={})=>p("div",{className:w("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",e),children:[u(je,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(de,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),la="relative h-full",na={normal:"sm:min-w-96",big:"sm:min-w-[515px]"},aa=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(sa);return ea({...n,renderProps:(n,a,r)=>p("div",{className:ia(n,{someCardsHighlighted:i}),children:[qn(n,a,{className:ra(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),sa(n)?ta({className:"absolute top-0 -right-4 z-40"}):null]})})},ia=(e,{someCardsHighlighted:t})=>w(la,t&&(sa(e)?"pt-3xl":"pt-3xl sm:pt-16")),ra=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>w(la,"min-w-80",na[n],t&&(sa(e)?"pt-3xl sm:pt-16":"pt-3xl"),l&&"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),sa=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,oa=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:a,isAlignCenter:r,showDots:s,arrowsPadded:o=!0,isGap:c=!0,cardSize:d="normal",...m})=>{const{blocks:h=[]}=m.block||{},g=t||h?.length,[x,{inc:f,dec:b}]=((e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:g,visibleItemCount:l},Math.floor(l/2)),[y,v]=Nl({itemCount:g}),[N]=v.visibleIndicesRange,S=h&&"CarouselBankHistoryCard"===h[0]?.type;return u(k,{className:e,defaultPadding:"p-6xl",...m,children:p("div",{className:w(r?"flex justify-center":"","relative max-w-full"),children:[u(ol,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:c?16:void 0,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:aa({noCardBorder:a,activeIndex:x,cardSize:d,...m})}),u(Xn,{scroll:v,arrowsPadded:o,onScrollLeft:b,onScrollRight:f,hasEdgeBlocks:S,activeIndex:x,itemCount:g}),s?u(ul,{containerRef:y,activeIndex:N,dotCount:g,listType:"horizontal-list"}):null]})})}));oa.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"],oa.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const ca=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(al,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),da="z-10 border border-solid w-full h-full",ma=w(da,"absolute hidden sm:block border-transparent"),ha=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:w("sm:pl-6xl sm:pb-4xl",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(ma,"top-9 right-12 bg-green-dark")}),u("div",{className:w(ma,"top-6 right-8 bg-green")}),u("div",{className:w(ma,"top-3 right-4 bg-green-light")}),p("div",{className:w(da,"relative p-xl sm:p-5xl bg-white border-green-light"),children:[u(al,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Il([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),ua={black:"bg-black",white:"bg-white"},pa=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r,...s})=>p(k,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...s,children:[n?.src?u(jt,{className:"flex justify-center mb-xl",image:n}):null,u(al,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:"text-left",className:"mb-m"}),r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(me,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(ga)]}):null,a?p(me,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,Il([i],{buttonClassName:"w-full mt-lg"})]}))),ga=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ua[e]}`},String(t)),xa=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=Y({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),fa={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs",XS:"w-1 h-1 mr-xs"},ba=g((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",fa[n])})}):null,u("span",{children:l})]}))),ya={XS:"text-m font-light",S:"text-l font-light",M:"text-h6",L:"text-h5"},va={XS:"ml-2xs",S:"ml-xs",M:"ml-s",L:"ml-m"},Na=g((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",ya[a],t?va[a]:"",e),role:"list",children:n.map(((e,t)=>u(ba,{isDotted:l,size:a,children:e},String(t))))}):null)),wa=g((({additionalDescription:e,align:t="text-left",button:l={},className:n="",description:a,headlineSmallVersion:i="H6",href:r,icon:s,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:g,version:x="primary",...f})=>p(k,{className:w("flex flex-col justify-between",t,n),defaultPadding:"p-0",version:x,...f,children:[p(xa,{className:"p-m flex flex-col gap-xs",href:r,target:u,children:[ka(i,g),Ca(a),Ta(h,o,x),Ia(e),Sa(s,d,m)]}),Il([l],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),Sa=(e,t,l)=>p("div",{className:w("flex gap-lg",l?"order-first":"order-last",t?"":"justify-center"),children:[e?.src?u(jt,{className:"shrink-0",image:e}):null,e?.icon?u(jt,{className:w("shrink-0",t?"":"w-8 h-8 min-w-8"),image:e}):null]}),ka=(e,t)=>t?u(me,{size:nl[e],children:t}):null,Ca=e=>e?u(de,{size:"text-l",children:e}):null,Ia=e=>e?u(me,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e}):null,Ta=(e,t,l="primary")=>e?.length?u(Na,{className:w("text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,Ba={start:"self-start",center:"self-center",end:"self-end"},Ra=g((({className:e,defaultPadding:t,padding:l,title:n="",insetTitle:a="",buttons:i,leftImage:r,rightImage:s,imageAlign:o,backImage:c,children:d})=>p("div",{className:w("relative flex flex-col gap-3xl font-sans overflow-hidden",l||t,e),children:[n?u("div",{className:"relative",children:n}):null,p("div",{className:"grow relative flex flex-wrap @xl:flex-nowrap justify-around @xl:justify-between items-stretch gap-3xl",children:[Ma(r,{imageAlign:o}),p("div",{className:w("flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]",r?"":"grow"),children:[a,u("div",{className:"grow",children:d}),c?u("div",{className:"mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4",children:c}):null,i]}),Ma(s,{className:"-order-1 @xl:order-1",imageAlign:o})]})]}))),Ma=(e,{className:t,imageAlign:l})=>e?u("div",{className:w("flex-shrink-0",e?.props?.image?.size?.width>400?"w-full @xl:w-auto":"",l&&Ba[l],t),children:e}):null,Va=(e=[])=>e?.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e)/e.length:0,_a=(e,t="normal")=>e?u("div",{className:w("w-12 h-12 min-w-12 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(jt,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pa=g((e=>{const{__html:t="",richVersion:l=""}=e;return u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),za=(e,t)=>e?u(de,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,ja=(e,t)=>e?u(me,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Aa=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Pa,{...e},`rte-${t}`):["label"in e?ja(e.label,t):null,"description"in e?za(e.description,t):null],Ea=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:w("flex gap-m","description"in l&&l.description?"items-start":"items-center",e),children:["icon"in l?_a(l.icon,t):null,u("div",{children:Aa(l)})]}))),Da=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),$a=e=>{return((t=e.map(Da))?.length?Math.sqrt(Math.abs(Va(t.map((e=>e**2)))-Va(t)**2)):0)>16;var t},La=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Oa=e=>!e.some(La),Fa=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:w("flex gap-x-m gap-y-s",$a(l)||Oa(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Ea,{benefitsVersion:t,...e},String(l))))}):null)),Ua=g((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Aa)}):null)),Ha=g((({isTabularBenefits:e,...t})=>u(e?Ua:Fa,{...t}))),Ka=g((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map(Wa)}):null)),Wa=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(me,{size:"text-m",font:"font-light",children:e})},String(t)),Xa=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",isInsetTitle:s=!0,benefitsVersion:o,isTabularBenefits:c,benefits:d,__html:m,items:h,isDotted:g=!0,listItemSize:x,tags:f,buttons:b,image:y,imageOptions:{imageAlign:v="end",directionRight:N=!0,isBackground:w}={},children:S})=>{const k=y?.src?u(jt,{image:y}):null,C=u(al,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0});return u(Ra,{className:e,padding:t,defaultPadding:l,...s?{insetTitle:C}:{title:C},...w?{backImage:k}:Ga(k,N),imageAlign:v,buttons:Il(b),children:p("div",{className:"flex flex-col gap-xl",children:[u(Ha,{benefitsVersion:o,isTabularBenefits:c,benefits:d}),m?u(Pa,{__html:m}):null,h?.length?u(Na,{items:h,isDotted:g,listItemSize:x}):null,S,f?.length?u(Ka,{tags:f}):null]})})})),Ga=(e,t)=>t?{rightImage:e}:{leftImage:e},Ja=g((({className:e,title:t,icon:l,list:n,href:a,target:i,...r})=>u(k,{className:e,defaultPadding:"p-3xl",...r,children:u(xa,{className:"flex items-center h-full",href:a,target:i,children:u(Xa,{title:t,headlineVersion:"XS",image:l,imageOptions:{directionRight:!1,imageAlign:"center"},benefits:n?.map((e=>({type:"default",label:e.title,description:e.description})))})})}))),Ya={default:"w-14 h-14",stretched:"flex-1 h-14"},qa=(e,t)=>e?"":w("py-m group/media flex items-center justify-center box-border",Ya[t]),Za=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],Qa=e=>Za.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},ei=g((({buttonSize:e="default",rounded:t=!1,icon:l,...n})=>{const{href:a,version:i,text:r=""}=n,{iconMapped:s,label:o}=Qa(a),c=ti(l)??s;return u(se,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",qa(r,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:r,version:i,...n,children:c&&!r?u(jt,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),ti=e=>e?.src||e?.icon?e:void 0,li=g((({className:e="",media:t,children:l,buttonSize:n})=>p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[l?u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l}):null,u("div",{className:w("flex gap-xs",e),children:t?.map(((e,t)=>u(ei,{buttonSize:n,...e},String(t))))})]}))),ni=g((({className:e="",description:t,href:l,icon:n,items:a=[],socialMedia:i=[],target:r,title:s,align:o="text-left",...c})=>u(k,{className:w("relative group-data-gray:bg-main-divider/50",e),defaultPadding:"p-3xl",...c,children:p(xa,{href:l,target:r,className:"space-y-lg",children:[u(al,{title:s,description:t,headlineVersion:"XS",isEmbedded:!0,align:o}),a.length?u(Na,{className:"flex flex-col gap-xs",items:a,listItemSize:"XS"}):null,ai(n),i.length?u(li,{media:i}):null]})}))),ai=e=>e?.src||e?.icon?u("div",{children:u(jt,{image:e})}):null,ii=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(me,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(me,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Il(a)}):null]},String(t))},ri=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(ii),o=s.slice(0,1),c=s.slice(1);return p(k,{className:w("flex flex-col",e),defaultPadding:"p-3xl",...r,children:[si(n),t?u(T,{className:w("pt-xs",l),headingType:"h5",title:t}):null,a?u(se,{className:"w-full mt-m",...a}):null,i.length?u(Vl,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(_l,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?oi:null}):null]})})),si=e=>u("div",{className:"self-center",children:e?.src||e?.icon?u(jt,{image:e}):null}),oi=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(je,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),ci=(e=!1)=>e?"text-white":"",di=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),mi=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(jt,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(jt,{image:t})}),l?u(T,{headingType:"h4",className:ci(a),title:l}):null,n?u("div",{className:di(a),children:n}):null]}))),hi=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(ui(l,t))})}))),ui=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right "+(e?"text-white":""),children:l}):null,n?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),pi=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-m mb-m ${n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(mi,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(hi,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(se,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,gi({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),gi=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),xi=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(fi,{...e})})]})})),fi=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(pi,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(wl,{onVisibleIndicesChange:m,children:h}):h}));var bi;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(bi||(bi={}));const yi=new Intl.NumberFormat("ru",{style:"currency",currency:bi.RUB}),vi=e=>e?yi.format(e):"",Ni="text-left text-m font-light text-secondary-text",wi=`${Ni} pl-5xl`,Si={USD:"DollarIcon",EUR:"EuroIcon"},ki=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Ni,children:u(me,{size:"text-m",children:"Валюта"})}),u("th",{className:wi,children:u(me,{size:"text-m",children:"Купить"})}),u("th",{className:wi,children:u(me,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Ci)})]}))),Ci=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(jt,{image:{icon:Si[t]},width:"24",height:"24"}):null,u(me,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(me,{size:"text-h6",children:vi(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(me,{size:"text-h6",children:vi(e?.buyExchangeRate)})})]},t)},Ii={icon:"GpsIcon"},Ti=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Yt,{...Ii,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Bi=(e,t,l)=>{const n=Number(Ri(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Ri=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Mi=e=>{return(t=[[e=>e.value!==bi.RUB&&e.oppositeValue!==bi.RUB,()=>e.handleConvert(e.value,bi.RUB)],[e=>e.value===bi.RUB&&e.oppositeValue===bi.RUB,()=>e.handleConvert(e.value,bi.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Vi(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(pe,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(De,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const _i=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||bi.RUB,selectBuy:l?.[0]?.currency?.currency||bi.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Vi({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Pi(r,o,l),value:r.inputSell,setValue:e=>ji(o,l)(e,r.selectSell,r.selectBuy)}),Vi({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:zi(r,o,t),value:r.inputBuy,setValue:e=>Ai(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(se,{className:"py-4 px-9",version:a?.version,...a,children:a.text}):null]})})),Pi=(e,t,l)=>n=>{t({selectSell:n}),Mi({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{ji(t,l)(e.inputSell,n,a)}})},zi=(e,t,l)=>n=>{t({selectBuy:n}),Mi({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Ai(t,l)(e.inputBuy,n,a)})},ji=(e,t)=>(l,n,a)=>{e({inputSell:Ri(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Bi(l,i,n===bi.RUB)||"")})},Ai=(e,t)=>(l,n,a)=>{e({inputBuy:Ri(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Bi(l,i,n===bi.RUB)||"")})};const Ei=async e=>{const t=await Di(),l=t?.code||"000";return{region:t,exchangeRates:await $i(e,l)}},Di=async()=>{try{return await D("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},$i=async(e,t)=>{try{return await D(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},Li=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=j("/api/v1/exchangerates",Ei);return e||{}}(),i=Oi(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:bi.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:bi.RUB}}),u(k,{className:w("box-border min-h-80",e),...n,children:u(Ra,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[i?u(ki,{className:"mb-xl",exchangeCurrencyItems:i}):null,u(Ti,{address:a?.address})]}),i.length&&r.length&&s.length?u(_i,{className:"grow",currencyRatesBuy:r,currencyRatesSell:s,button:l}):null]})})})})),Oi=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Fi=e=>Bt(d.SITEMAP||"sitemap",e),Ui=g((({className:e="",items:t})=>t?.length?u("ul",{className:w("flex flex-col","",e),children:t.map(Hi)}):null)),Hi=(e,t)=>{const{text:l,...n}=e;return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",...n,children:l||null})},`list_item_${String(t)}`)},Ki=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>p("button",{className:w("flex justify-center w-full py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:i,disabled:a,"data-theme":n,children:[u("span",{className:"text-h4 pr-s",children:t}),l?u(jt,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),Wi=e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Xi=(e,t)=>u(Yt,{...e,iconBgVersion:t,className:"shrink-0"}),Gi=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,version:r="primary",...s})=>u(k,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...s,children:u(Vl,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(_l,{className:w("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:ea({...s,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ji({version:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));Gi.childrenTypes={exclude:["RollupItem"]};const Ji=({version:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть");return"primary"===e?Yi({label:r,labelIcon:l,labelIconBgVersion:n,icon:Wi(a),onToggle:i}):u(Ki,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Yi=({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>p("button",{className:w("border-none bg-transparent flex justify-between items-center w-full group/button",a?.icon?"py-xs":"py-lg"),onClick:n,children:[p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Xi(a,t),e?u(me,{size:"text-h6",font:"font-normal",children:e}):null]}),l?u(je,{name:l,iconVersion:"black",width:"24",height:"24"}):null]}),qi=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(Zi):null,u(se,{version:"primary",className:"w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),Zi=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(me,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(Qi)})]},String(t)),Qi=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:er(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),er=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${tr(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},tr=e=>e.replaceAll(/\D/g,""),lr=g((({className:e="",index:t,text:l,...n})=>{const a=Y(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),nr=g((({title:e,links:t,className:l=""})=>p("div",{className:l,children:[u(me,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg mt-lg",children:t.map(((e,t)=>u(lr,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),ar=g((({className:e="",index:t,...l})=>{const n=Y({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),ir=g((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"pt-lg",children:u(me,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col sm:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(ar,{index:t,...e},String(t))))}):null]}))),rr=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=Fi(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:o,documents:c}=Bt(d.FOOTER||"footer",l);return p(k,{tag:"footer",className:e,...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(Gi,{label:e?.text,labelIcon:e?.icon,children:u(Ui,{items:e.items})},String(t))))}),u(qi,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(li,{className:"mb-xl",media:r,buttonSize:"stretched",children:"Соцсети"}),u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:s?.map(sr)})]}),u(nr,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(ir,{links:c})]})})),sr=({href:e="/"},t)=>{const{label:l}=Qa(e);return u(se,{className:"w-full mb-lg",text:l,version:"secondary",href:e,target:"_blank"},String(t))},or={"bg-white":"color",transparent:"white"},cr={"bg-white":"text-primary-main",transparent:"text-white"},dr=(e,t,l)=>u(jt,t?.src?{image:t,className:cr[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:or[e]},className:cr[e],width:l?.width,height:l?.height}),mr={"bg-white":"text-primary-text",transparent:"text-white"},hr=(e,t,l)=>u("span",{className:`${mr[t]} ml-s font-medium ${l||""}`,children:e||"Россельхозбанк"}),ur=g((({bgColor:e="bg-white",children:t,className:l="",href:n,logo:a,showTitle:i=!0,targetBlank:r})=>p("a",{className:`inline-flex items-center font-sans no-underline ${l}`,href:n||"https://rshb.ru/",target:r?"_blank":"_self","aria-label":a?.title||"Россельхозбанк",children:[dr(e,a?.image,{width:"34",height:"34"}),i?hr(t||a?.title,e,"text-s"):null]}))),pr={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},gr=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=J(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u(ur,{className:"mt-2xs",bgColor:e,logo:t}):xr(s),l?u(se,{href:l,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",pr["transparent"===n?"transparent":"default"]),children:"Войти"}):null]})})),xr=e=>p("button",{className:"flex items-center text-l mt-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(jt,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]}),fr={"bg-white":"primary",transparent:"transparent"},br=g((({bgColor:e="bg-white",version:t=fr[e],...l})=>{const{logo:n,internetBankUrl:a}=Fi(l.options?.page?.fallback);return u(k,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(gr,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),yr={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},vr=g((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,...r})=>u(k,{className:w("relative flex flex-col",yr[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...r,children:ea({...r,extraProps:{className:"w-full",padding:n?"":"p-0"}})})));vr.childrenTypes=[];const Nr=g((e=>u(vr,{...e})));Nr.childrenTypes=[];const wr=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(jt,{image:l})})})),Sr=["байт","Кб","Мб","Гб","Тб","Пб"],kr=g((({icon:e,text:t,fileSize:l,...n})=>p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...n,children:[e,t?p(me,{size:"text-l",font:"font-light",children:[t,u(me,{color:"text-secondary-text",children:n?.href&&Cr(Ir(n.href),l)})]}):null]}))),Cr=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Ir=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Tr={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Br=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=J();return p(k,{className:w("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(al,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:w("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Tr[r]),role:"list",children:a.map(Rr(o,r,i))}):null]})})),Rr=(e,t,l)=>(t,n)=>{const a="Attachment"===t?.docType?W(e)(t?.attachment?.src):t?.href,i="Attachment"===t?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Sr[l]}`})(t?.attachment?.fileSize||0):t?.fileSize;return u("div",{role:"listitem",children:u(kr,{text:t?.text,target:t?.target,href:a,fileSize:i,icon:l?u(jt,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:l,width:"24",height:"24"}):null})},String(n))},Mr={left:"text-left",center:"text-center",right:"text-right"},Vr=e=>e?u("div",{className:"mb-lg pt-3xs",children:u(me,{size:"text-xl","font-weight":"light",children:e})}):null,_r=e=>e?.length?u(Na,{items:e,className:"text-l font-light"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Pr=e=>{const t=e.length>2;return Il(e,{className:w(t?"w-full":"flex-nowrap"),isVertical:t})},zr=g((({className:e,padding:t,alignTitle:l="left",buttons:n=[],description:a,headingType:i="h4",image:r,items:s,qr:o,title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24";return u(k,{className:w("min-h-80",e),padding:"p-0",version:d,...m,children:p(Ra,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:c?u(T,{headingType:i,title:c,className:w("whitespace-pre-wrap",Mr[l])}):null,rightImage:r?.src?u(jt,{className:"hidden lg:block",image:r}):null,buttons:Pr(n),children:[Vr(a),p("div",{className:"flex flex-1 flex-wrap gap-m items-center",children:[o?.src?u("div",{className:w("flex justify-center bg-white rounded-md",h),children:u(jt,{className:"w-fit",image:o})}):null,_r(s),r?.src?u(jt,{className:"lg:hidden",image:r}):null]})]})})})),jr=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?Ar("Страховая сумма:",e):null,Number(t)>0?Ar("Ежемесячный лимит:",t):null]}):null,Ar=(e,t=0)=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre",children:[u(me,{font:"font-light",size:"text-l",children:e}),p(me,{size:"text-h6",color:"text-primary-text",children:[mt(2)(t)," ₽"]})]}),Er=g((({className:e,padding:t,headlineVersion:l="M",align:n="text-center",sum:a,monthLimit:i,imageOptions:r,...s})=>u(k,{className:e,padding:"p-0",...s,children:u(Xa,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:l,align:n,isInsetTitle:!1,imageOptions:{directionRight:!1,imageAlign:"center",...r},...s,children:jr(Number(a),Number(i))})}))),Dr=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:w("box-border",e),...n,children:[u(al,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:$r()})]}))),$r=(e=3)=>Or(100,e).map((e=>Math.floor(e))).map(Lr),Lr=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Or=(e,t)=>[e].concat(t>0?Or(e/1.618,t-1):[]);function Fr({text:e,href:t,target:l,icon:n},a){const i="primary"===a?"white":"black",r={text:e,href:t,target:l,ariaLabel:e};return p("div",{className:"flex items-center gap-s",children:[u(se,{className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:a,rounded:!0,...r,children:u(jt,{className:"w-4 h-4",image:{...n,icon:n?.icon||"ArrowLeftIcon",iconVersion:n?.iconVersion||i}})}),u(se,{version:"link",...r})]})}const Ur=g((({className:e,padding:t,backwardButton:l,...n})=>p(k,{className:w("overflow-hidden flex flex-col gap-3xl box-border",e),defaultPadding:"p-6xl",padding:t,...n,children:[l?.text?Fr(l,n.version&&"primary"!==n.version?"white":"primary"):null,u(Xa,{className:"grow h-full",...n})]}))),Hr=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:w("overflow-hidden relative",e),padding:t,...n,children:u(wl,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(Xa,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Kr=g((({className:e,padding:t,headlineVersion:l="S",isTabularBenefits:n=!0,additionalDescription:a,imageOptions:i,...r})=>u(k,{className:e,padding:"p-0",...r,children:u(Xa,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,isTabularBenefits:n,imageOptions:{isBackground:!0,...i},...r,children:a?u(de,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),Wr=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Pa,{__html:t,richVersion:l})})})),Xr=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function Gr(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Jr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},Yr=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(Jr).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),qr={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},Zr=(e,t,l)=>p("div",{className:`${Object.values(qr).join(" ")} bg-white py-s pl-5xl pr-m w-full`,children:[u(je,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),Qr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},es=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Qr).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(je,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),ts=e=>globalThis[e];const ls=()=>function(e,t){const[l,r]=n(),s=i((()=>r(ts(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!ts(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),ns={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},as=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(ns).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(je,{name:l,width:"20",height:"16"})})})),is={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},rs=g((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const r=s(null),o=ls(),[c,d]=n(),[m,h]=n(ds(Xr)),g=ss(e);if(a((()=>{r?.current||o?.ready((()=>{r.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),Gr(o,r.current,m)}))}),[o,r,m]),a((()=>{if(r.current&&m&&o){const e=m.length<1?ds(Xr):m;Gr(o,r.current,e)}}),[r,m,o]),!o)return null;const x=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-1/2 ${x}`,children:i?Zr(Xr,0,(e=>{if(e){const t=ds(e);h(t)}})):Yr(g)}),u("div",{className:`${Object.values(is).join(" ")} ${x} right-2 top-4 bg-white`,onClick:()=>{const e=r.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:u(je,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${x}`,children:[u(as,{yandexMaps:r}),u(as,{yandexMaps:r,direction:"out"})]}),es(r.current,o,`right-2 top-80 ${x}`)]})})),ss=e=>[cs(os(e,0)),cs(os(e,1))],os=(e,t)=>e.map((e=>e[t])),cs=e=>e.reduce(((e,t)=>e+t))/e.length,ds=e=>e?e.map((e=>e.coords)):null,ms=g((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(De,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),hs=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(ms,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(ms,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),us=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u("span",{className:"text-primary-text cursor-pointer",children:t}):null]})}))),ps=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:w("order-4",e),children:[u(us,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(us,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),gs=["От 1 дня","До 365 дней"],xs=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(me,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(xt,{min:1,max:365,value:e,items:gs,onChange:t})]}))),fs=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(ms,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(ms,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),bs=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents sm:block flex-1 space-y-xl",children:[u(hs,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:ys(c)}),u(xs,{days:a,setDays:e=>c({days:e})}),u(fs,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:vs(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents sm:flex justify-between items-center gap-m",children:[u(ps,{}),u(se,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),ys=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},vs=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Ns=g((({days:e,tariffs:t=[]})=>{const l=Ss(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents sm:flex flex-col justify-between order-2",children:[p("div",{className:"flex flex-col sm:flex-row gap-x-6xl gap-y-2xl order-5 sm:order-none py-2xl sm:py-0 border-t border-main-divider sm:border-none",children:[ws("Аренда за",e),ws("Цена",l+" ₽")]}),u("span",{className:"sm:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("div",{className:"flex flex-col items-center gap-s order-3 sm:order-none mb-xl sm:mb-0 bg-primary-main py-s sm:p-3xl text-center",children:[u(jt,{image:{icon:"PackA4Icon"},className:"sm:h-60"}),u("span",{className:"hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),ws=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs sm:flex-col sm:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l sm:text-h3 text-primary-text",children:t})]}),Ss=(e,t)=>{const l=ks(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},ks=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Cs=(e,t)=>e.find((e=>e.branchCode===t)),Is=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Cs(n,l.selectedBranch),o=Ts(s?.safeBoxCaseVolumes),c=Bs(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Rs(c,l.selectedBoxSize);return p("div",{className:"flex flex-col sm:flex-row gap-4xl align-top",children:[u(bs,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Ns,{days:l.days,tariffs:d})]})})),Ts=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Bs=(e,t)=>e?.find((e=>e.volume===t)),Rs=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Ms=[];const Vs=async e=>await E(e,{method:"GET"})||Ms,_s=g((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=L(),h=Ps(c.selectedRegion,m),g=function(e){const{data:t}=j(e?`/api/v1/safeboxes?regionCode=${e}`:null,Vs);return t||Ms}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Cs(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Is,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(de,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(rs,{points:f,className:"h-[640px]"}):null]})})),Ps=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function zs(e){throw new Error(e)}const js=e=>Boolean(e?.icon||e?.src),As={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Es={normal:"",small:"min-h-6xl"},Ds={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},$s=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:r="primary",...s})=>p(k,{className:w("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[u(al,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Ls(i,r))})}):null,Il(a,{isVertical:!0})]}))),Ls=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Os(e,t)(l,n);case"rte":return u(Pa,{__html:l.__html});default:zs(l)}},Os=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Fs(e,t)(l,n)}),p("div",{className:w("flex flex-col justify-center h-fit",Es[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:w("text-s font-light text-left",Ds.description),children:l.description}):null]})]})},String(n)),Fs=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(l?.icon?.src),s=As[e][r?"image":"icon"];return u("div",{className:w(s,r?"":`rounded-md ${Ds.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex self-center text-h4 text-secondary-text group-data-secondary:text-white",children:js(l?.icon)?u(jt,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},width:a,height:a}):u("span",{children:n+1})})})},Us={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Hs={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Ks={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Ws={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Xs=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,...s}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",Us[n],l?Ws[n]:Ks[n]),role:"tab","aria-selected":l,onClick:a,...s,children:u("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Hs[n]:"text-secondary-text hover:text-primary-main"),children:u(me,{size:"text-m",children:r})})})})),Gs=g((e=>u(e?.item?.href?Js:Ys,{...e}))),Js=g((e=>{const t=Y(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Xs,{...e,tag:"a",item:a,onClick:n})})),Ys=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(Xs,{item:e,onClick:n,...l})})),qs=(e,t,l)=>(n,a)=>u(Gs,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Zs="hidden sm:flex absolute z-40 top-0",Qs=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Nl({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(ol,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(qs(l,n,a))}),r.canScrollLeft?u(Un,{className:w("left-6",Zs),onClick:r.scrollLeft}):null,r.canScrollRight?u(Hn,{className:w("right-6",Zs),onClick:r.scrollRight}):null]})})),eo=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(qs(n,a,t))}))),to=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(eo,{...t});case"centered":return u("div",{className:"flex",children:u(eo,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Qs,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},lo=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=r((()=>l.map(ao)),[l]),[d,m]=n(0);a((()=>{l&&l[0]&&no(l[0])}),[]),a((()=>{const e=l[d];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[l,d]);const h=i((e=>{const t=c.indexOf(e);m(t),no(l[t])}),[l,c]);return u(k,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:to({items:c,value:c[d],tabsMode:s,onChange:h})})})),no=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},ao=e=>"group"===e?.type?{text:e.title}:e,io={Buttons:({buttons:e})=>Il(e,{className:"mt-s",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(jt,{image:e,className:"m-0",imageClassName:"m-0"}):null,List:({isDotted:e,...t})=>u(Na,{className:"flex flex-col justify-between items-start text-m pl-xs text-base",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"mb-xs",children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},ro=g((({title:e,icon:t})=>p("div",{className:"mb-xs",children:[e?u(me,{size:"text-l",font:"font-light",children:e}):null,t?u(jt,{className:"ml-auto min-w-6",image:t,width:"24",height:"24"}):null]}))),so=g((({tile:e,...t})=>p("div",{className:"h-full",children:[u(ro,{title:e?.header?.title}),e?.data?.length?e.data.map(((e,l)=>u("div",{className:"mb-xs",children:oo(e,t)},String(l)))):null]})));function oo(e,t){if(!e||!e.tableCellType||!(e.tableCellType in io))return null;const l=io[e.tableCellType];return u(l,{displayTable:()=>null,isVisible:!0,...e,...t})}const co=g((({tiles:e,...t})=>e?.length?u(wl,{...t,padding:void 0,children:e.map(((e,l)=>u(so,{tile:e,...t},String(l))))}):null)),mo=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-s",children:e.map(((e,l)=>u(so,{tile:e,...t},String(l))))}):null)),ho=g((({className:e,title:t,description:l,tariffsColumns:n,rowHeaders:a,orientation:i="vertical",...r})=>{const s=uo(n),o=po(a,s);return p("section",{className:`p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[u(al,{title:t,description:l,headlineVersion:"M",align:"text-left",isEmbedded:!0}),u("vertical"===i?mo:co,{tiles:o,...r})]})})),uo=e=>e?.[0]?.data?e[0].data:[],po=(e,t)=>e?.map(((e,l)=>({header:e,data:t?.[l]||[{}]}))),go=g((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(k,{className:w("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?xo():null,"big"===n?fo(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(me,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?bo(l):null,r?.length?yo(r,!0):null,i?u(Pa,{__html:i}):null]})]}))),xo=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),fo=e=>e?.src?u(jt,{className:"h-fit flex-shrink-0",image:e}):null,bo=e=>u(de,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),yo=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(me,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),vo=g((({className:e,padding:t,headlineVersion:l="S",listItemSize:n="M",...a})=>u(k,{className:e,padding:"p-0",...a,children:u(Xa,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,listItemSize:n,...a})}))),No={ApplicationForm:Xt,BenefitsBlock:qt,BonusBenefitsBlock:Cl,ButtonsBlock:Ml,Calculator:_n,CardTransfer:On,Carousel:oa,CarouselBankHistoryCard:ca,CarouselCard:ha,CarouselCatalogCard:pa,CarouselProductCard:wa,CarouselProgramsCard:Ja,CarouselRecommendationCard:ni,CarouselTariffsCard:ri,ComparisonTable:xi,ExchangeRateTile:Li,Footer:rr,Header:br,Headline:al,HorizontalLayout:Nr,ImgBlock:wr,LinkDocs:Br,MobileAppTile:zr,PictureText:Er,Placeholder:Dr,ProductBlock:Ur,ProductGallery:Hr,ProductTile:Kr,RichTextBlock:Wr,RollupItem:Gi,SafeDepositRental:_s,StepsBlock:$s,Tabs:lo,TariffsTable:ho,TextBlock:go,Tile:vo,VerticalLayout:vr};const wo=["Header","Footer"],So=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function ko(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!wo.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?fl(So)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Co=g((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(jt,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),Io="cookie",To=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:r}]=_e();((e,t,l=300)=>{a((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t)})((()=>{globalThis.localStorage?.getItem(Io)||n()}),[],3e3);const s=i((()=>{globalThis.localStorage?.setItem(Io,"true"),r()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"sm:flex-1",children:p(de,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(xa,{isRemote:!0,className:Bo(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(xa,{isRemote:!0,className:Bo(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(Co,{className:"bg-main-gray rounded-md",onClose:s})})]})}):null})),Bo=e=>w("inline mx-2xs",e?"text-green-dark":"");const Ro=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:zs(e)}}))),[c,d]),l},Mo=g((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Ro({onCloseAll:e,onClose:t}),{close:n}=O();return a((()=>{const e=({key:e})=>{"Escape"===e&&n()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[n]),a((()=>{l.length?globalThis.document?.body.classList.add("no-scrollbar"):globalThis.document?.body.classList.remove("no-scrollbar")}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Vo=h();const _o=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Po()}))),Po=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},zo=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Vo.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Vo.like(e))}),[e]),dislike:i((async()=>{l(await Vo.dislike(e))}),[e])}}(J().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(_o,{onClick:G(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(_o,{onClick:G(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),jo=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return ko(),p("div",{children:[p("section",{className:w("relative @container",a,e),"data-theme":s,children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:Qn(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container @lg:grid @lg:grid-cols-12 @lg:gap-2xs",children:[ea({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),Qn(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(zo,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Mo,{}),u(To,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));jo.childrenTypes=[],jo.slots=()=>["header","footer"];e.Blocks=No,e.ContentPage=jo,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=G,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.13.6",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=K,e.useRouter=J,Object.defineProperty(e,"__esModule",{value:!0})}));
|