@redneckz/wildless-cms-uni-blocks 0.2.92 → 0.2.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +165 -112
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/api/LikeAPI.js +1 -0
  5. package/dist/api/LikeAPI.js.map +1 -1
  6. package/dist/components/Accordion/AccordionBlocks.d.ts +1 -2
  7. package/dist/components/Accordion/AccordionBlocks.js +2 -2
  8. package/dist/components/Accordion/AccordionBlocks.js.map +1 -1
  9. package/dist/components/Accordion/AccordionContent.d.ts +38 -14
  10. package/dist/components/Accordion/AccordionItem.js +9 -10
  11. package/dist/components/Accordion/AccordionItem.js.map +1 -1
  12. package/dist/components/BaseTile/BaseTile.js +7 -2
  13. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  14. package/dist/components/Blocks.js +1 -1
  15. package/dist/components/Blocks.js.map +1 -1
  16. package/dist/components/ComparisonTable/ComparisonTable.js +11 -6
  17. package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
  18. package/dist/components/ComparisonTable/HeaderCell.js +1 -1
  19. package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  20. package/dist/components/ContentPage/ContentPage.d.ts +9 -1
  21. package/dist/components/ContentPage/ContentPage.js +20 -17
  22. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  23. package/dist/components/ContentPage/ContentPageHead.d.ts +1 -1
  24. package/dist/components/ContentPage/toMobilePage.js +13 -2
  25. package/dist/components/ContentPage/toMobilePage.js.map +1 -1
  26. package/dist/components/CreditCalculator/CreditCalculator.js +3 -3
  27. package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  28. package/dist/components/Footer/Contacts.js +1 -1
  29. package/dist/components/Footer/Contacts.js.map +1 -1
  30. package/dist/components/Footer/Footer.js +1 -1
  31. package/dist/components/Footer/Footer.js.map +1 -1
  32. package/dist/components/Footer/FooterContent.d.ts +1 -2
  33. package/dist/components/Footer/HorizontalNavigation.js +1 -1
  34. package/dist/components/Footer/Sitemap.js +1 -1
  35. package/dist/components/Footer/Sitemap.js.map +1 -1
  36. package/dist/components/Footer/SocialMedia.js +1 -2
  37. package/dist/components/Footer/SocialMedia.js.map +1 -1
  38. package/dist/components/Gallery/Gallery.mobile.js +1 -1
  39. package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
  40. package/dist/components/Gallery/GalleryCardInner.d.ts +2 -0
  41. package/dist/components/Gallery/GalleryCardInner.js +19 -0
  42. package/dist/components/Gallery/GalleryCardInner.js.map +1 -0
  43. package/dist/components/Gallery/GalleryContainer.d.ts +13 -0
  44. package/dist/components/Gallery/GalleryContainer.js +16 -0
  45. package/dist/components/Gallery/GalleryContainer.js.map +1 -0
  46. package/dist/components/Gallery/GalleryContent.d.ts +8 -2
  47. package/dist/components/Gallery/GalleryInner.d.ts +1 -1
  48. package/dist/components/Gallery/GalleryInner.js +8 -36
  49. package/dist/components/Gallery/GalleryInner.js.map +1 -1
  50. package/dist/components/Gallery/constants.d.ts +6 -0
  51. package/dist/components/Gallery/constants.js +19 -0
  52. package/dist/components/Gallery/constants.js.map +1 -0
  53. package/dist/components/Header/Header.js +3 -3
  54. package/dist/components/Header/Header.js.map +1 -1
  55. package/dist/components/LinkDocs/LinkDocs.js +5 -5
  56. package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
  57. package/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -2
  58. package/dist/components/MobileBlocks.js +0 -3
  59. package/dist/components/MobileBlocks.js.map +1 -1
  60. package/dist/components/PictureText/PictureTextContent.d.ts +1 -3
  61. package/dist/components/Placeholder/Placeholder.js.map +1 -1
  62. package/dist/components/ProductBlock/ProductBlock.js +1 -1
  63. package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  64. package/dist/components/ProductBlock/ProductBlock.mobile.js +3 -1
  65. package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
  66. package/dist/components/ProductBlock/ProductBlockInner.js +2 -5
  67. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  68. package/dist/components/ProductGallery/ProductGallery.js +2 -2
  69. package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  70. package/dist/components/PromoTile/PromoTile.d.ts +1 -1
  71. package/dist/components/PromoTile/PromoTile.js +1 -1
  72. package/dist/components/PromoTile/PromoTile.js.map +1 -1
  73. package/dist/components/TariffsTable/TariffsTable.js +8 -3
  74. package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  75. package/dist/components/TariffsTable/TariffsTableCell.js +3 -3
  76. package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
  77. package/dist/components/TariffsTable/TariffsTableContent.d.ts +5 -1
  78. package/dist/components/TextBlock/TextBlockContent.d.ts +1 -2
  79. package/dist/components/Tile/Tile.d.ts +1 -1
  80. package/dist/components/Tile/Tile.js +14 -2
  81. package/dist/components/Tile/Tile.js.map +1 -1
  82. package/dist/content-page-repository/ContentPageRepository.js +1 -0
  83. package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
  84. package/dist/hooks/useComparisonTableScroll.d.ts +6 -1
  85. package/dist/hooks/useComparisonTableScroll.js +1 -1
  86. package/dist/hooks/useComparisonTableScroll.js.map +1 -1
  87. package/dist/hooks/useLink.js +1 -1
  88. package/dist/hooks/useLink.js.map +1 -1
  89. package/dist/types.d.ts +8 -0
  90. package/dist/ui-kit/BlockItem/BlockItem.js +4 -4
  91. package/dist/ui-kit/BlockItem/BlockItem.js.map +1 -1
  92. package/dist/ui-kit/Checkbox/Checkbox.js +2 -2
  93. package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  94. package/dist/ui-kit/InputRange/InputRange.js +2 -1
  95. package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  96. package/dist/ui-kit/SearchBar.js +2 -1
  97. package/dist/ui-kit/SearchBar.js.map +1 -1
  98. package/lib/api/LikeAPI.js +1 -0
  99. package/lib/api/LikeAPI.js.map +1 -1
  100. package/lib/common.css +1 -1
  101. package/lib/components/Accordion/Accordion.fixture.d.ts +1 -4
  102. package/lib/components/Accordion/AccordionBlocks.d.ts +1 -2
  103. package/lib/components/Accordion/AccordionBlocks.js +1 -2
  104. package/lib/components/Accordion/AccordionBlocks.js.map +1 -1
  105. package/lib/components/Accordion/AccordionContent.d.ts +38 -14
  106. package/lib/components/Accordion/AccordionItem.js +9 -7
  107. package/lib/components/Accordion/AccordionItem.js.map +1 -1
  108. package/lib/components/BaseTile/BaseTile.js +7 -2
  109. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  110. package/lib/components/Blocks.js +1 -1
  111. package/lib/components/Blocks.js.map +1 -1
  112. package/lib/components/ComparisonTable/ComparisonTable.js +11 -6
  113. package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
  114. package/lib/components/ComparisonTable/HeaderCell.js +1 -1
  115. package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  116. package/lib/components/ContentPage/ContentPage.d.ts +9 -1
  117. package/lib/components/ContentPage/ContentPage.js +20 -17
  118. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  119. package/lib/components/ContentPage/ContentPageHead.d.ts +1 -1
  120. package/lib/components/ContentPage/toMobilePage.js +13 -2
  121. package/lib/components/ContentPage/toMobilePage.js.map +1 -1
  122. package/lib/components/CreditCalculator/CreditCalculator.js +3 -3
  123. package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  124. package/lib/components/Footer/Contacts.js +1 -1
  125. package/lib/components/Footer/Contacts.js.map +1 -1
  126. package/lib/components/Footer/Footer.js +1 -1
  127. package/lib/components/Footer/Footer.js.map +1 -1
  128. package/lib/components/Footer/FooterContent.d.ts +1 -2
  129. package/lib/components/Footer/HorizontalNavigation.js +1 -1
  130. package/lib/components/Footer/Sitemap.js +1 -1
  131. package/lib/components/Footer/Sitemap.js.map +1 -1
  132. package/lib/components/Footer/SocialMedia.js +1 -2
  133. package/lib/components/Footer/SocialMedia.js.map +1 -1
  134. package/lib/components/Gallery/Gallery.mobile.js +1 -1
  135. package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
  136. package/lib/components/Gallery/GalleryCardInner.d.ts +2 -0
  137. package/lib/components/Gallery/GalleryCardInner.js +17 -0
  138. package/lib/components/Gallery/GalleryCardInner.js.map +1 -0
  139. package/lib/components/Gallery/GalleryContainer.d.ts +13 -0
  140. package/lib/components/Gallery/GalleryContainer.js +14 -0
  141. package/lib/components/Gallery/GalleryContainer.js.map +1 -0
  142. package/lib/components/Gallery/GalleryContent.d.ts +8 -2
  143. package/lib/components/Gallery/GalleryInner.d.ts +1 -1
  144. package/lib/components/Gallery/GalleryInner.js +6 -34
  145. package/lib/components/Gallery/GalleryInner.js.map +1 -1
  146. package/lib/components/Gallery/constants.d.ts +6 -0
  147. package/lib/components/Gallery/constants.js +17 -0
  148. package/lib/components/Gallery/constants.js.map +1 -0
  149. package/lib/components/Header/Header.js +3 -3
  150. package/lib/components/Header/Header.js.map +1 -1
  151. package/lib/components/Headline/Headline.fixture.d.ts +3 -2
  152. package/lib/components/LinkDocs/LinkDocs.fixture.d.ts +7 -7
  153. package/lib/components/LinkDocs/LinkDocs.js +5 -5
  154. package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
  155. package/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -2
  156. package/lib/components/MobileBlocks.js +0 -3
  157. package/lib/components/MobileBlocks.js.map +1 -1
  158. package/lib/components/PictureText/PictureText.fixture.d.ts +2 -0
  159. package/lib/components/PictureText/PictureTextContent.d.ts +1 -3
  160. package/lib/components/Placeholder/Placeholder.js.map +1 -1
  161. package/lib/components/ProductBlock/ProductBlock.js +1 -1
  162. package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  163. package/lib/components/ProductBlock/ProductBlock.mobile.js +3 -1
  164. package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
  165. package/lib/components/ProductBlock/ProductBlockInner.js +2 -5
  166. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  167. package/lib/components/ProductGallery/ProductGallery.js +2 -2
  168. package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  169. package/lib/components/PromoTile/PromoTile.d.ts +1 -1
  170. package/lib/components/PromoTile/PromoTile.js +1 -1
  171. package/lib/components/PromoTile/PromoTile.js.map +1 -1
  172. package/lib/components/TariffsTable/TariffsTable.js +8 -3
  173. package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  174. package/lib/components/TariffsTable/TariffsTableCell.js +3 -3
  175. package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
  176. package/lib/components/TariffsTable/TariffsTableContent.d.ts +5 -1
  177. package/lib/components/TextBlock/TextBlock.fixture.d.ts +2 -0
  178. package/lib/components/TextBlock/TextBlockContent.d.ts +1 -2
  179. package/lib/components/Tile/Tile.d.ts +1 -1
  180. package/lib/components/Tile/Tile.js +14 -2
  181. package/lib/components/Tile/Tile.js.map +1 -1
  182. package/lib/content-page-repository/ContentPageRepository.js +1 -0
  183. package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
  184. package/lib/hooks/useComparisonTableScroll.d.ts +6 -1
  185. package/lib/hooks/useComparisonTableScroll.js +1 -1
  186. package/lib/hooks/useComparisonTableScroll.js.map +1 -1
  187. package/lib/hooks/useLink.js +1 -1
  188. package/lib/hooks/useLink.js.map +1 -1
  189. package/lib/types.d.ts +8 -0
  190. package/lib/ui-kit/BlockItem/BlockItem.js +4 -4
  191. package/lib/ui-kit/BlockItem/BlockItem.js.map +1 -1
  192. package/lib/ui-kit/Checkbox/Checkbox.js +2 -2
  193. package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  194. package/lib/ui-kit/InputRange/InputRange.js +2 -1
  195. package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  196. package/lib/ui-kit/SearchBar.js +2 -1
  197. package/lib/ui-kit/SearchBar.js.map +1 -1
  198. package/package.json +19 -8
  199. package/src/api/LikeAPI.ts +1 -0
  200. package/src/components/Accordion/Accordion.example.json +18 -42
  201. package/src/components/Accordion/Accordion.fixture.tsx +33 -119
  202. package/src/components/Accordion/AccordionBlocks.tsx +1 -3
  203. package/src/components/Accordion/AccordionContent.ts +47 -18
  204. package/src/components/Accordion/AccordionItem.tsx +14 -10
  205. package/src/components/BaseTile/BaseTile.tsx +13 -5
  206. package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +31 -28
  207. package/src/components/Blocks.ts +1 -1
  208. package/src/components/ComparisonTable/ComparisonTable.fixture.tsx +43 -53
  209. package/src/components/ComparisonTable/ComparisonTable.tsx +8 -8
  210. package/src/components/ComparisonTable/HeaderCell.tsx +3 -3
  211. package/src/components/ContentPage/ContentPage.fixture.tsx +3 -3
  212. package/src/components/ContentPage/ContentPage.page.json +45 -56
  213. package/src/components/ContentPage/ContentPage.tsx +71 -36
  214. package/src/components/ContentPage/ContentPageHead.tsx +1 -1
  215. package/src/components/ContentPage/toMobilePage.ts +19 -2
  216. package/src/components/CreditCalculator/CreditCalculator.fixture.tsx +9 -1
  217. package/src/components/CreditCalculator/CreditCalculator.tsx +12 -9
  218. package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
  219. package/src/components/Footer/Contacts.tsx +1 -1
  220. package/src/components/Footer/Footer.fixture.tsx +265 -258
  221. package/src/components/Footer/Footer.tsx +3 -3
  222. package/src/components/Footer/FooterContent.ts +1 -1
  223. package/src/components/Footer/HorizontalNavigation.tsx +1 -1
  224. package/src/components/Footer/Sitemap.tsx +1 -1
  225. package/src/components/Footer/SocialMedia.tsx +5 -6
  226. package/src/components/Gallery/Gallery.fixture.tsx +52 -48
  227. package/src/components/Gallery/Gallery.mobile.tsx +1 -3
  228. package/src/components/Gallery/GalleryCardInner.tsx +53 -0
  229. package/src/components/Gallery/GalleryContainer.tsx +58 -0
  230. package/src/components/Gallery/GalleryContent.ts +8 -2
  231. package/src/components/Gallery/GalleryInner.tsx +15 -93
  232. package/src/components/Gallery/constants.ts +22 -0
  233. package/src/components/Header/Header.tsx +14 -12
  234. package/src/components/Headline/Headline.fixture.tsx +30 -31
  235. package/src/components/LikeControl/LikeControl.fixture.tsx +5 -1
  236. package/src/components/LinkDocs/LinkDocs.example.json +26 -0
  237. package/src/components/LinkDocs/LinkDocs.fixture.tsx +30 -13
  238. package/src/components/LinkDocs/LinkDocs.tsx +9 -8
  239. package/src/components/MiniGallery/MiniGallery.fixture.tsx +12 -22
  240. package/src/components/MiniGallery/MiniGalleryContent.ts +1 -1
  241. package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +1 -1
  242. package/src/components/MobileBlocks.ts +0 -3
  243. package/src/components/PictureText/PictureText.fixture.tsx +22 -18
  244. package/src/components/PictureText/PictureTextContent.ts +1 -3
  245. package/src/components/Placeholder/Placeholder.fixture.tsx +5 -1
  246. package/src/components/Placeholder/Placeholder.tsx +2 -2
  247. package/src/components/ProductBlock/ProductBlock.fixture.tsx +83 -76
  248. package/src/components/ProductBlock/ProductBlock.mobile.tsx +1 -0
  249. package/src/components/ProductBlock/ProductBlock.tsx +3 -1
  250. package/src/components/ProductBlock/ProductBlockInner.tsx +9 -12
  251. package/src/components/ProductGallery/ProductGallery.example.json +1 -1
  252. package/src/components/ProductGallery/ProductGallery.fixture.tsx +103 -106
  253. package/src/components/ProductGallery/ProductGallery.tsx +7 -5
  254. package/src/components/ProductTile/ProductTile.fixture.tsx +4 -4
  255. package/src/components/PromoTile/PromoTile.fixture.tsx +1 -1
  256. package/src/components/PromoTile/PromoTile.tsx +3 -3
  257. package/src/components/StepsBlock/StepsBlock.fixture.tsx +21 -18
  258. package/src/components/TariffsTable/TariffsTable.example.json +3 -1
  259. package/src/components/TariffsTable/TariffsTable.fixture.tsx +8 -16
  260. package/src/components/TariffsTable/TariffsTable.tsx +39 -37
  261. package/src/components/TariffsTable/TariffsTableCell.tsx +4 -4
  262. package/src/components/TariffsTable/TariffsTableContent.ts +5 -1
  263. package/src/components/TextBlock/TextBlock.example.json +9 -2
  264. package/src/components/TextBlock/TextBlock.fixture.tsx +70 -97
  265. package/src/components/TextBlock/TextBlockContent.ts +1 -2
  266. package/src/components/Tile/Tile.example.json +5 -2
  267. package/src/components/Tile/Tile.fixture.tsx +11 -8
  268. package/src/components/Tile/Tile.tsx +16 -5
  269. package/src/content-page-repository/ContentPageRepository.ts +1 -0
  270. package/src/hooks/useComparisonTableScroll.ts +11 -6
  271. package/src/hooks/useLink.ts +1 -1
  272. package/src/setup-fixture.ts +1 -2
  273. package/src/types.ts +11 -1
  274. package/src/ui-kit/BlockItem/BlockItem.tsx +4 -4
  275. package/src/ui-kit/Checkbox/Checkbox.tsx +7 -3
  276. package/src/ui-kit/InputRange/InputRange.tsx +9 -8
  277. package/src/ui-kit/SearchBar.tsx +15 -6
  278. package/src/Icons/CalendarCircleIcon.svg +0 -14
  279. package/src/Icons/CardIcon.svg +0 -11
  280. package/src/Icons/CardPosIcon.svg +0 -12
  281. package/src/Icons/CardTickIcon.svg +0 -13
  282. package/src/Icons/EmptyWalletChangeIcon.svg +0 -21
  283. package/src/Icons/JCBIcon.svg +0 -42
  284. package/src/Icons/MastercardIcon.svg +0 -6
  285. package/src/Icons/MinusIcon.svg +0 -1
  286. package/src/Icons/MirIcon.svg +0 -13
  287. package/src/Icons/MoneyIcon.svg +0 -13
  288. package/src/Icons/MonitorMobileIcon.svg +0 -14
  289. package/src/Icons/PlusIcon.svg +0 -1
  290. package/src/Icons/Profile2UserIcon.svg +0 -14
  291. package/src/Icons/ShieldTickIcon.svg +0 -7
  292. package/src/Icons/UnionPayIcon.svg +0 -7
  293. package/src/Icons/UserIcon.svg +0 -11
  294. package/src/Icons/VisaIcon.svg +0 -7
  295. package/src/Icons/WalletIcon.svg +0 -19
@@ -71,6 +71,7 @@
71
71
 
72
72
  const AUTH_PREFIX = 'guest';
73
73
  const STORAGE_KEY = 'likesToken';
74
+ // eslint-disable-next-line max-lines-per-function
74
75
  function LikeAPI(projectId, baseURL = '') {
75
76
  async function getLikeCount(...nodeIds) {
76
77
  if (!nodeIds.length) {
@@ -283,7 +284,7 @@
283
284
  toRelativeHref: toRelativeHref
284
285
  });
285
286
 
286
- const defaultHandlerDecorator = (handler, targetContent) => handler;
287
+ const defaultHandlerDecorator = (handler) => handler;
287
288
  function useLink({ router, handlerDecorator = defaultHandlerDecorator, }, link) {
288
289
  const href = adjustHref(link.href, router);
289
290
  return {
@@ -302,12 +303,12 @@
302
303
  }
303
304
 
304
305
  const listStyleMap = {
305
- primary: 'bg-primary-main w-[8px] h-[8px] min-w-[8px] min-h-[8px] mt-2 rounded-full',
306
- secondary: 'bg-secondary-text w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5 rounded-full',
306
+ primary: 'bg-secondary-text w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5 rounded-full',
307
+ secondary: 'bg-white w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5 rounded-full',
307
308
  };
308
309
  const textStyleMap = {
309
- primary: 'text-primary-text',
310
- secondary: 'text-secondary-text',
310
+ primary: 'text-secondary-text',
311
+ secondary: '',
311
312
  };
312
313
  const BlockItem = JSX(({ className, isDotted = true, text, children, version = 'primary' }) => {
313
314
  return (jsxs("div", { className: `inline-block flex ${className || ''}`, role: "listitem", children: [isDotted && jsx("div", { className: `inline-block mr-3 ${listStyleMap[version]}` }), jsx("span", { className: `text-base font-normal font-sans mr-3 ${textStyleMap[version]}`, children: text || children })] }));
@@ -348,6 +349,11 @@
348
349
  return colSpanStr ? parseInt(colSpanStr.substring(colSpanPrefix.length), 10) : 12;
349
350
  };
350
351
 
352
+ const alignFlex = {
353
+ left: 'justify-between',
354
+ center: 'justify-center',
355
+ right: 'justify-end',
356
+ };
351
357
  const alignBlock = {
352
358
  left: 'items-start',
353
359
  center: 'items-center',
@@ -358,11 +364,11 @@
358
364
  center: 'text-center',
359
365
  right: 'text-right',
360
366
  };
361
- const TITLE_CLASSES = 'font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px]';
367
+ const TITLE_CLASSES = 'font-medium m-0 whitespace-pre-wrap max-w-[600px]';
362
368
  const BaseTile = JSX(({ className, context, title, titleSize, description, children, buttons, image, items, version = 'primary', align = 'left', }) => {
363
369
  const router = context.useRouter();
364
370
  const { handlerDecorator } = context;
365
- return (jsxs("div", { className: `font-sans flex flex-col grow h-full ${alignBlock[align]}`, children: [title && (jsx(Title, { size: titleSize || getTitleSizeByClassName(className), className: TITLE_CLASSES, children: title })), jsxs("div", { className: "flex grow justify-between", children: [jsxs("div", { className: `flex flex-col justify-between ${alignBlock[align]}`, children: [jsxs("div", { children: [description ? (jsx("div", { className: `font-normal text-base max-w-[600px] ${alignText[align]}`, children: description })) : null, children, items?.length ? renderItems$1(items, version) : null] }), buttons?.length ? (jsx("div", { className: "flex mt-9 gap-3", children: buttons.map((button, index) => renderButton$1(useLink({ router, handlerDecorator }, button), index)) })) : null] }), image?.src && jsx(Img, { className: "mt-auto ml-7", image: image })] })] }));
371
+ return (jsxs("div", { className: `font-sans flex flex-col grow h-full ${alignBlock[align]}`, children: [title && (jsx(Title, { size: titleSize || getTitleSizeByClassName(className), className: `${TITLE_CLASSES} ${version === 'primary' ? 'text-primary-text' : ''}`, children: title })), jsxs("div", { className: `flex grow w-full ${alignFlex[align]}`, children: [jsxs("div", { className: `flex flex-col justify-between ${alignBlock[align]}`, children: [jsxs("div", { children: [description ? (jsx("div", { className: `font-normal text-base mt-4 max-w-[600px] ${alignText[align]}`, children: description })) : null, children, items?.length ? renderItems$1(items, version) : null] }), buttons?.length ? (jsx("div", { className: "flex mt-9 gap-3", children: buttons.map((button, index) => renderButton$1(useLink({ router, handlerDecorator }, button), index)) })) : null] }), image?.src && jsx(Img, { className: "mt-auto ml-7", image: image })] })] }));
366
372
  });
367
373
  function getTitleSizeByClassName(className = '') {
368
374
  const colSpan = getColSpan(className);
@@ -396,7 +402,7 @@
396
402
  };
397
403
  const titleMarginsStyleMap = {
398
404
  double: 'mb-8',
399
- single: '',
405
+ single: 'mb-[26px]',
400
406
  };
401
407
  const linkColumnsModeStyleMap = {
402
408
  double: 'gap-x-5 gap-y-[26px] flex-wrap',
@@ -404,10 +410,10 @@
404
410
  };
405
411
  const LinkDocs = JSX(({ className, title, align, documents, icon, columnsMode = 'double' }) => {
406
412
  const containerClasses = linkColumnsModeStyleMap[columnsMode];
407
- return (jsxs("section", { className: `font-sans p-[50px] bg-white ${className}`, children: [title && (jsx(Title, { className: `font-medium m-0 ${titleMarginsStyleMap[columnsMode]} ${titleAlignStyleMap[align ?? 'center']}`, children: title })), jsx("div", { className: `flex ${containerClasses}`, role: "list", children: documents?.length
408
- ? documents.map(({ text, fileSize, ...linkProps }) => (jsxs("a", { className: `group flex items-center text-sm
409
- text-sm font-sans align-middle items-center text-primary-text no-underline group hover:text-primary-main
410
- ${columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : ''}`, role: "listitem", ...linkProps, children: [icon && jsx(Icon, { className: "mr-3.5", name: icon, width: "24px", height: "24px" }), jsxs("span", { children: [text, jsx("span", { className: "text-secondary-text group-hover:text-primary-main", children: linkProps?.href && formatSuffix(getExtFromHref(linkProps.href), fileSize) })] })] })))
413
+ return (jsxs("section", { className: `font-sans p-[50px] bg-white ${className}`, children: [title && (jsx(Title, { className: `font-medium mt-0 ${titleMarginsStyleMap[columnsMode]} ${titleAlignStyleMap[align ?? 'center']}`, children: title })), jsx("div", { className: `flex ${containerClasses}`, role: "list", children: documents?.length
414
+ ? documents.map(({ text, fileSize, ...linkProps }, i) => (jsxs("a", { className: `group flex text-sm align-middle h-fit
415
+ text-primary-text no-underline hover:text-primary-main
416
+ ${columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : ''}`, role: "listitem", ...linkProps, children: [icon && jsx(Icon, { className: "mr-2.5", name: icon, width: "24px", height: "24px" }), jsxs("span", { className: "self-center", children: [text, jsx("span", { className: "text-secondary-text group-hover:text-primary-main", children: linkProps?.href && formatSuffix(getExtFromHref(linkProps.href), fileSize) })] })] }, String(i))))
411
417
  : null })] }));
412
418
  });
413
419
  const getExtFromHref = (href) => {
@@ -475,8 +481,9 @@
475
481
  const hasContent = blocks?.length;
476
482
  const icon = isActive ? 'MinusIcon' : 'PlusIcon';
477
483
  const handleToggle = (e) => {
478
- if (!hasContent)
479
- return null;
484
+ if (!hasContent) {
485
+ return;
486
+ }
480
487
  setIsActive(!isActive);
481
488
  const contentBlock = getContentBlock(e);
482
489
  contentBlock.style.maxHeight = contentBlock.style.maxHeight
@@ -484,16 +491,17 @@
484
491
  : `${contentBlock.scrollHeight}px`;
485
492
  };
486
493
  return (jsxs("li", { className: "border-0 border-b border-solid border-main-divider last:border-b-0", children: [jsxs("button", { className: `border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans text-primary-text
487
- ${hasContent ? 'group cursor-pointer' : ''}`, onClick: handleToggle, children: [jsx("span", { className: `m-0 text-xl pr-2.5 font-medium ${hasContent ? 'group-hover:text-primary-main' : ''}`, children: label }), hasContent ? jsx(Icon, { name: icon, width: "24", height: "24" }) : null] }), hasContent ? (jsx("div", { className: `${isActive ? 'pb-5' : ''} text-sm transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0 `, children: blocks?.length ? blocks.map((block, i) => renderBlock(block, i, context)) : null })) : null] }));
494
+ ${hasContent ? 'group cursor-pointer' : ''}`, onClick: handleToggle, children: [jsx("span", { className: `m-0 text-xl pr-2.5 font-medium ${hasContent ? 'group-hover:text-primary-main' : ''}`, children: label }), hasContent ? jsx(Icon, { name: icon, width: "24", height: "24" }) : null] }), hasContent ? (jsx("div", { className: `${isActive ? 'pb-5' : ''} text-sm transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0 `, children: blocks?.length ? blocks.map((block, i) => renderBlock$1(block, i, context)) : null })) : null] }));
488
495
  });
489
- const renderBlock = (block, i, context) => {
490
- if (!block.type || !block.data || !AccordionBlocks.hasOwnProperty(block.type)) {
496
+ const renderBlock$1 = (block, i, context) => {
497
+ const type = block?.accordionBlockType;
498
+ if (!type || !(type in AccordionBlocks)) {
491
499
  return null;
492
500
  }
493
- const AccordionBlock = AccordionBlocks[block.type];
494
- return (jsx("div", { className: "mb-5 last:mb-0", children: jsx(AccordionBlock, { context: context, ...block.data }) }, `block_${i}`));
501
+ const AccordionBlock = AccordionBlocks[type];
502
+ return (jsx("div", { className: "mb-5 last:mb-0", children: jsx(AccordionBlock, { context: context, ...block }) }, `block_${i}`));
495
503
  };
496
- const getContentBlock = (e) => e.target.tagName === 'BUTTON' ? e.target.nextSibling : e.target.parentNode.nextSibling;
504
+ const getContentBlock = ({ target }) => target.tagName === 'BUTTON' ? target.nextSibling : target.parentNode.nextSibling;
497
505
 
498
506
  const Accordion = JSX(({ title, accordionItems, context, className }) => {
499
507
  return (jsxs("section", { className: `p-[50px] font-sans bg-white text-primary-text ${className || ''}`, children: [title ? jsx(Title, { className: "m-0 mb-2.5", children: title }) : null, accordionItems?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => (jsx(AccordionItem, { ...item, context: context }, `AccordionItem${i}`))) })) : null] }));
@@ -506,6 +514,15 @@
506
514
  return (jsxs("div", { className: "flex items-center p-10 gap-5 max-w-[580px]", children: [benefit.icon && (jsx(Icon, { className: "h-[70px] w-[70px] min-w-[70px] min-h-[70px]", name: benefit.icon, width: "70", height: "70" })), jsxs("div", { children: [jsx("h3", { className: "font-medium text-xl m-0", children: benefit.label }), benefit.description && (jsx("div", { className: "font-normal text-sm mt-2", children: benefit.description }))] })] }, String(i)));
507
515
  };
508
516
 
517
+ const useComparisonTableScroll = ({ colData, colsLengthForScroll, activeCardIndex, setActiveCardIndex, }) => {
518
+ const nextClick = () => setActiveCardIndex(activeCardIndex + 1);
519
+ const prevClick = () => setActiveCardIndex(activeCardIndex - 1);
520
+ const isScrollAvailable = colData?.length && colData.length > colsLengthForScroll;
521
+ const showNextButton = isScrollAvailable && colData?.length - activeCardIndex > colsLengthForScroll;
522
+ const showPrevButton = isScrollAvailable && activeCardIndex > 0;
523
+ return { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton };
524
+ };
525
+
509
526
  const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
510
527
  return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill, ...options }, i) => (jsx("path", { d: d, fill: fill || 'currentColor', ...commonOptions, ...options }, i))) }));
511
528
  });
@@ -526,14 +543,6 @@
526
543
  ? 'bg-secondary-light text-secondary-text'
527
544
  : 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(SVG, { paths: ARROW_PATHS, viewBox: "0 0 16 16", fill: "none", width: "16", height: "16" }) })));
528
545
 
529
- const TableRowContainer = JSX(({ children }) => (jsx("div", { className: "self-start flex flex-col", role: "row", children: jsx("div", { className: "flex", children: children }) })));
530
-
531
- const carouselContainerClassesMap = {
532
- comparison: 'flex gap-4 duration-1000',
533
- tariff: 'flex flex-grow duration-1000',
534
- };
535
- const TableCarouselContainer = JSX(({ children, activeCardIndex, columnWidth, version = 'comparison' }) => (jsx("div", { className: "flex flex-1 overflow-hidden", children: jsx("div", { className: carouselContainerClassesMap[version], style: { transform: `translateX(-${activeCardIndex * columnWidth}px)` }, children: children }) })));
536
-
537
546
  const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
538
547
  const BORDER_CLASSES = 'border-main-stroke border-solid border';
539
548
  const DIVIDER_CLASSES$1 = 'border-main-divider border border-t-0 border-x-0';
@@ -541,7 +550,13 @@
541
550
  const COLS_LENGTH_FOR_SCROLL$1 = 2;
542
551
  const COLUMN_WIDTH$1 = 4 * 80 + 4 * 4; // w-80 + gap-4 = 336px
543
552
 
544
- const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-12 ${BORDER_CLASSES} ${GRADIENT}`, role: "columnheader", scope: "col", children: [icon && !image?.src && (jsx(Icon, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", name: icon, width: "63", height: "63" })), image?.src && jsx(Img, { className: "mb-4", image: image }), title && (jsx(Title, { size: "S", className: "font-medium m-0 text-center text-white", children: title })), link?.text && (jsx("div", { className: "mt-auto w-full", children: jsx(Button, { href: link.href, target: link.target, className: "mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active", children: jsx("div", { className: "text-xs py-[11px]", children: link.text }) }) }))] })));
553
+ const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${BORDER_CLASSES} ${GRADIENT}`, role: "columnheader", scope: "col", children: [icon && !image?.src && (jsx(Icon, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", name: icon, width: "63", height: "63" })), image?.src && jsx(Img, { className: "mb-[18px]", image: image }), title && (jsx(Title, { size: "S", className: "font-medium m-0 text-center text-white", children: title })), link?.text && (jsx("div", { className: "mt-auto w-full", children: jsx(Button, { href: link.href, target: link.target, className: "mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active", children: jsx("div", { className: "font-medium text-xs py-[11px]", children: link.text }) }) }))] })));
554
+
555
+ const carouselContainerClassesMap = {
556
+ comparison: 'flex gap-4 duration-1000',
557
+ tariff: 'flex flex-grow duration-1000',
558
+ };
559
+ const TableCarouselContainer = JSX(({ children, activeCardIndex, columnWidth, version = 'comparison' }) => (jsx("div", { className: "flex flex-1 overflow-hidden", children: jsx("div", { className: carouselContainerClassesMap[version], style: { transform: `translateX(-${activeCardIndex * columnWidth}px)` }, children: children }) })));
545
560
 
546
561
  const TableCell = JSX(({ cell, isFirstRow, isLastRow, isFillGradient }) => {
547
562
  const cellWrapperClasses = `w-80 box-border flex flex-col ${BORDER_CLASSES} ${!isLastRow ? 'border-y-0' : 'border-t-0 rounded-b-md'} ${isFillGradient ? GRADIENT : ''}`;
@@ -550,16 +565,9 @@
550
565
  });
551
566
  const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label && (jsx("h5", { className: `text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`, children: label })), description && (jsx("div", { className: `text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`, children: description }))] }, String(i)));
552
567
 
553
- const TableRow = JSX(({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? (jsx("div", { className: `text-sm py-7 ${DIVIDER_CLASSES$1} ${FIRST_CELL_CLASSES$1} ${!isLastRow ? 'border-solid' : ''}`, children: header.title })) : null, data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: data.map((cell, i) => (jsx(TableCell, { cell: cell, isFirstRow: isFirstRow, isLastRow: isLastRow, isFillGradient: isColoredFirstColumn && i === 0 }, String(i)))) })) : null] })));
568
+ const TableRowContainer = JSX(({ children }) => (jsx("div", { className: "self-start flex flex-col", role: "row", children: jsx("div", { className: "flex", children: children }) })));
554
569
 
555
- const useComparisonTableScroll = (colData, colsLengthForScroll, activeCardIndex, setActiveCardIndex) => {
556
- const nextClick = () => setActiveCardIndex(activeCardIndex + 1);
557
- const prevClick = () => setActiveCardIndex(activeCardIndex - 1);
558
- const isScrollAvailable = colData?.length && colData.length > colsLengthForScroll;
559
- const showNextButton = isScrollAvailable && colData?.length - activeCardIndex > colsLengthForScroll;
560
- const showPrevButton = isScrollAvailable && activeCardIndex > 0;
561
- return { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton };
562
- };
570
+ const TableRow = JSX(({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? (jsx("div", { className: `text-sm py-7 ${DIVIDER_CLASSES$1} ${FIRST_CELL_CLASSES$1} ${!isLastRow ? 'border-solid' : ''}`, children: header.title })) : null, data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: data.map((cell, i) => (jsx(TableCell, { cell: cell, isFirstRow: isFirstRow, isLastRow: isLastRow, isFillGradient: isColoredFirstColumn && i === 0 }, String(i)))) })) : null] })));
563
571
 
564
572
  const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, }) => {
565
573
  const router = context.useRouter();
@@ -574,7 +582,12 @@
574
582
  data: colData.map((col) => col?.[i] || [{}]),
575
583
  }))
576
584
  .slice(0, isShowAllRow ? rowHeaders.length : visibleRowLength);
577
- const { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton } = useComparisonTableScroll(colData, COLS_LENGTH_FOR_SCROLL$1, activeCardIndex, setActiveCardIndex);
585
+ const { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton } = useComparisonTableScroll({
586
+ colData,
587
+ colsLengthForScroll: COLS_LENGTH_FOR_SCROLL$1,
588
+ activeCardIndex,
589
+ setActiveCardIndex,
590
+ });
578
591
  const showToggle = () => setIsShowAllRow(!isShowAllRow);
579
592
  return (jsxs("section", { className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, children: [jsx(Title, { className: "font-medium m-0 max-w-[47rem] text-center mb-9 mx-auto", children: title }), jsxs("div", { role: "table", children: [colHeaders?.length ? (jsxs(TableRowContainer, { children: [jsx("div", { className: FIRST_CELL_CLASSES$1, role: "columnheader", scope: "col" }), jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: colHeaders.map((header, i) => (jsx(HeaderCell, { ...header, link: header.link && useLink({ router, handlerDecorator }, header.link) }, String(i)))) })] })) : null, rowData?.length ? (jsxs("div", { className: "relative", children: [rowData.map((row, i, { length }) => (jsx(TableRow, { row: row, isFirstRow: i === 0, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex, isColoredFirstColumn: isColoredFirstColumn }, String(i)))), isScrollAvailable ? (jsx("div", { children: jsxs("div", { className: "absolute top-7 right-7 z-10", children: [jsx(ArrowButton, { onClick: nextClick, disabled: !showNextButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" }), jsx(ArrowButton, { className: "mt-4 rotate-180", onClick: prevClick, disabled: !showPrevButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })] }) })) : null] })) : null] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null, visibleRowLength ? (jsx("div", { className: "pr-[50px]", children: jsxs("div", { className: "flex w-full", children: [jsx("div", { className: FIRST_CELL_CLASSES$1 }), jsx("button", { onClick: showToggle, className: "mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main", children: jsx("div", { className: "font-sans font-medium text-xs py-[11px]", children: !isShowAllRow ? 'Показать все параметры' : 'Скрыть' }) })] }) })) : null] }));
580
593
  });
@@ -599,9 +612,9 @@
599
612
  fill: 'white',
600
613
  },
601
614
  ];
602
- const Checkbox = JSX(({ text, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center cursor-pointer relative", children: [jsx("input", { className: `peer appearance-none w-5 h-5 border-solid border rounded border-black checked:bg-primary-main checked:border-primary-main`, type: "checkbox", onChange: (e) => {
615
+ const Checkbox = JSX(({ text, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center cursor-pointer relative", children: [jsx("input", { className: `peer appearance-none w-5 h-5 border-solid border ${checked ? 'border-black' : 'border-main-stroke'} rounded checked:bg-primary-main checked:border-primary-main m-0`, type: "checkbox", onChange: (e) => {
603
616
  onChange(e.target.checked);
604
- }, checked: checked }), jsx(SVG, { paths: CHECK_PATHS, className: "hidden absolute left-2 ml-px peer-checked:block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }), text ? jsx("span", { className: "font-sans ml-2 text-sm cursor-pointer", children: text }) : null] }) })));
617
+ }, checked: checked }), jsx(SVG, { paths: CHECK_PATHS, className: "hidden absolute left-1 ml-px peer-checked:block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }), text ? (jsx("span", { className: "font-sans ml-3 text-sm leading-5 cursor-pointer", children: text })) : null] }) })));
605
618
 
606
619
  const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
607
620
 
@@ -623,7 +636,8 @@
623
636
  if (value > max)
624
637
  onChange(max);
625
638
  };
626
- return (jsxs("div", { className: className, children: [jsxs("div", { className: "relative", children: [title ? (jsx("span", { className: "absolute text-xs text-secondary-text top-1 mt-0.5 pl-4 ml-0.5", children: title })) : null, jsx("input", { className: `m-0 font-sans text-sm w-full h-12 border-2 border-solid border-main-divider rounded-md outline-none p-0 pl-4 m-0 box-border text-primary-text ${title ? 'pt-4' : ''}`, value: addSpacesBetweenNumbers(value), onChange: (e) => handleChange(e.target.value), onBlur: handleBlur }), jsx("div", { className: "absolute inset-x-0 mt-0.5 top-8 px-4", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider", type: "range", min: min, max: max, step: step, value: value, onChange: (e) => handleChange(e.target.value), style: inputStyle }) })] }), jsx("div", { className: "flex justify-between mt-3 mb-4", children: items.map((item, i) => (jsx("span", { className: "text-xs text-secondary-text pl-4", children: item }, String(i)))) })] }));
639
+ return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx("span", { className: "absolute text-xs text-secondary-text top-1 mt-0.5 pl-4 ml-0.5", children: title })) : null, jsx("input", { className: `m-0 font-sans text-sm w-full h-12 border border-solid border-main-stroke rounded-md
640
+ outline-none p-0 pl-4 m-0 box-border text-primary-text ${title ? 'pt-4' : ''}`, value: addSpacesBetweenNumbers(value), onChange: (e) => handleChange(e.target.value), onBlur: handleBlur }), jsx("div", { className: "absolute inset-x-0 top-8 px-4", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider", type: "range", min: min, max: max, step: step, value: value, onChange: (e) => handleChange(e.target.value), style: inputStyle }) })] }), jsx("div", { className: "flex justify-between my-3", children: items.map((item, i) => (jsx("span", { className: "text-xs leading-[14px] text-secondary-text pl-4", children: item }, String(i)))) })] }));
627
641
  });
628
642
 
629
643
  const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
@@ -682,7 +696,7 @@
682
696
  const STEP_MONEY = 1000;
683
697
  const STEP_MONTHS = 1;
684
698
  const DEFAULT_PAYMENT_TYPE = 'annuity';
685
- const borderStyle = 'border-solid border-3 border-primary-main rounded-md';
699
+ const borderStyle = 'border-solid border-[3px] border-primary-main rounded-md';
686
700
  const CreditCalculator = JSX(({ context, className, directoryName }) => {
687
701
  const [moneyValue, setMoneyValue] = context.useState(undefined);
688
702
  const [monthsValue, setMonthsValue] = context.useState(undefined);
@@ -712,10 +726,10 @@
712
726
  function handleButtonClick(value) {
713
727
  setMonthsValue(clamp(value * MONTHS_IN_YEAR, minMonths, maxMonths));
714
728
  }
715
- return (jsx("section", { className: `font-sans text-primary-text bg-white p-4 ${className}`, children: jsxs("div", { className: `box-border p-12 flex flex-col justify-between ${borderStyle}`, children: [jsxs("div", { className: "flex justify-between", children: [jsxs("div", { className: "grow mr-11", children: [jsx(InputRange, { title: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0441\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u20BD", items: [
729
+ return (jsx("section", { className: `font-sans text-primary-text bg-white p-4 w-[847px] ${className || ''}`, children: jsxs("div", { className: `box-border p-[49px] pr-[53px] flex flex-col justify-between ${borderStyle}`, children: [jsxs("div", { className: "flex justify-between ", children: [jsxs("div", { className: "grow mr-[42px] w-[465px]", children: [jsx(InputRange, { title: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0441\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u20BD", items: [
716
730
  `От ${addSpacesBetweenNumbers(minSum)} рублей`,
717
731
  `До ${addSpacesBetweenNumbers(maxSum)} рублей`,
718
- ], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }), jsx(InputRange, { title: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ['Или выберите из предложенных вариантов ниже'], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue || defaultMonths, onChange: setMonthsValue }), jsx("div", { className: "flex mb-7", children: creditTermYears.map((number, i) => renderButton(number, i, handleButtonClick)) }), jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isAnnuityChecked, onChange: setIsAnnuityChecked }), jsx(Checkbox, { className: "mb-4", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsuranceChecked, onChange: setIsInsuranceChecked })] }), jsxs("div", { className: "p-9 bg-primary-main rounded-md text-white", children: [jsx("div", { className: "text-base mb-5", children: "\u041D\u0430\u0448\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), jsx("div", { className: "text-sm opacity-60", children: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0451\u0436" }), jsxs("div", { className: "text-lg mb-3", children: [addSpacesBetweenNumbers(Math.round(montlyPayment)), " \u20BD"] }), jsx("div", { className: "text-sm opacity-60", children: "\u0421\u0442\u0430\u0432\u043A\u0430" }), jsxs("div", { className: "text-lg", children: [rate, " %"] })] })] }), jsxs("div", { className: "flex items-center", children: [jsx(Button, { className: "mr-3", text: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443", version: "primary", href: "#" }), jsx("div", { className: "w-80 text-xxs leading-4 text-secondary-text", "aria-label": "\u0421\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u0435 \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u044F \u0437\u0430\u044F\u0432\u043A\u0443, \u0432\u044B \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u0435\u0442\u0435\u0441\u044C \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C \u0424\u0417\u00A0\u00AB\u041E\u00A0\u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445\u00BB" })] })] }) }));
732
+ ], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }), jsx(InputRange, { className: "mt-[23px]", title: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ['Или выберите из предложенных вариантов ниже'], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue || defaultMonths, onChange: setMonthsValue }), jsx("div", { className: "flex mb-7", children: creditTermYears.map((number, i) => renderButton(number, i, handleButtonClick)) }), jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isAnnuityChecked, onChange: setIsAnnuityChecked }), jsx(Checkbox, { className: "mt-3 mb-7", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsuranceChecked, onChange: setIsInsuranceChecked })] }), jsxs("div", { className: "basis-[226px] shrink-0 box-border h-fit p-9 bg-primary-main rounded-md text-white", children: [jsx("div", { className: "text-base mb-[18px]", children: "\u041D\u0430\u0448\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), jsx("div", { className: "text-sm opacity-60", children: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0451\u0436" }), jsxs("div", { className: "text-lg mb-3", children: [addSpacesBetweenNumbers(Math.round(montlyPayment)), " \u20BD"] }), jsx("div", { className: "text-sm opacity-60", children: "\u0421\u0442\u0430\u0432\u043A\u0430" }), jsxs("div", { className: "text-lg", children: [rate, " %"] })] })] }), jsxs("div", { className: "flex items-center", children: [jsx(Button, { className: "mr-3", text: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443", version: "primary", href: "#" }), jsx("div", { className: "w-80 text-xxs leading-4 text-secondary-text", "aria-label": "\u0421\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u0435 \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u044F \u0437\u0430\u044F\u0432\u043A\u0443, \u0432\u044B \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u0435\u0442\u0435\u0441\u044C \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C \u0424\u0417 \u00AB\u041E \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445\u00BB" })] })] }) }));
719
733
  });
720
734
  function renderButton(number, i, handleClick) {
721
735
  return (jsx("button", { className: "bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none", onClick: () => handleClick(number), children: jsxs("span", { className: "font-semibold text-sm", children: [number, " ", number === 1 ? 'год' : number > 4 ? 'лет' : 'года'] }) }, String(i)));
@@ -727,7 +741,7 @@
727
741
  };
728
742
  const Tile = JSX((props) => {
729
743
  const { children, className, version = 'primary' } = props;
730
- return (jsx("section", { className: `font-sans p-9 min-h-[320px] box-border ${className || ''} ${tileStyleMap[version]} ${getContainerPaddingRight(className)} `, children: jsx(BaseTile, { ...props, children: children }) }));
744
+ return (jsx("section", { className: `font-sans p-9 box-border ${className || ''} ${tileStyleMap[version]} ${getContainerPaddingRight(className)} ${getContainerMinHeight(className)} `, children: jsx(BaseTile, { ...props, children: children }) }));
731
745
  });
732
746
  function getContainerPaddingRight(className = '') {
733
747
  const colSpan = getColSpan(className);
@@ -741,6 +755,18 @@
741
755
  return 'pr-[9.4rem]';
742
756
  }
743
757
  }
758
+ function getContainerMinHeight(className = '') {
759
+ const colSpan = getColSpan(className);
760
+ if (colSpan <= 6) {
761
+ return 'min-h-[300px]';
762
+ }
763
+ else if (colSpan <= 8) {
764
+ return 'min-h-[320px]';
765
+ }
766
+ else {
767
+ return 'min-h-[360px]';
768
+ }
769
+ }
744
770
 
745
771
  const CBR_EXCHANGE_RATE_URL = 'https://www.cbr-xml-daily.ru/daily_json.js';
746
772
  const CURRENCY_CODES = ['USD', 'EUR'];
@@ -784,7 +810,8 @@
784
810
 
785
811
  const SearchBar = JSX(({ className, context }) => {
786
812
  const { term, setTerm } = context.useSearch();
787
- return (jsxs("form", { className: `relative ${className || ''}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: "w-[24px] h-[24px]", children: jsx(Icon, { name: "LoupeIcon", width: "24", height: "24" }) }), !term && (jsx("span", { className: "font-sans font-normal text-base text-secondary-text", children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), jsx("input", { className: "pl-12 w-full font-sans font-normal text-base text-black border border-solid border-main-divider rounded h-full box-border outline-none pr-[6%]", value: term, onChange: (e) => setTerm(e.target.value), type: "text", name: "s" }), term && (jsx("button", { type: "submit", className: "absolute font-sans font-normal text-sm cursor-pointer bg-transparent hover:bg-primary-hover active:bg-primary-active text-primary-main hover:text-white border-none px-5 py-2 rounded top-1 right-1 outline-none", onClick: (e) => {
813
+ const [inputHasFocus, setInputHasFocus] = context.useState(false);
814
+ return (jsxs("form", { className: `relative ${className || ''}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: "w-[24px] h-[24px]", children: jsx(Icon, { name: "LoupeIcon", width: "24", height: "24" }) }), !term && (jsx("label", { htmlFor: "search-bar-input", className: "font-sans font-normal text-base text-secondary-text", children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), jsx("input", { id: "search-bar-input", className: `${inputHasFocus ? 'border-primary-text' : 'border-main-divider'} h-12 pl-12 w-full font-sans font-normal text-base text-black border border-solid rounded h-full box-border outline-none pr-[6%]`, value: term, onChange: (e) => setTerm(e.target.value), onFocus: (e) => setInputHasFocus(true), onBlur: (e) => setInputHasFocus(false), type: "text", name: "search-bar-input" }), inputHasFocus && (jsx("button", { type: "submit", className: "absolute font-sans font-normal cursor-pointer text-sm bg-primary-main hover:bg-primary-hover active:bg-primary-active border-none px-9 py-[9px] rounded top-1 right-1 outline-none text-secondary-text text-white", onClick: (e) => {
788
815
  e.preventDefault();
789
816
  console.log('click');
790
817
  }, children: "\u041D\u0430\u0439\u0442\u0438" }))] }));
@@ -813,14 +840,14 @@
813
840
  return jsx("span", { children: text });
814
841
  }
815
842
  };
816
- const formatTel = (s) => s.replaceAll(/(\-|\s|\(|\)|\D+)/g, '');
843
+ const formatTel = (s) => s.replaceAll(/\D/g, '');
817
844
 
818
845
  const HorizontalNavigation = JSX(({ className, links, context }) => {
819
846
  const router = context.useRouter();
820
847
  const { handlerDecorator } = context;
821
848
  return (jsx("div", { className: `${className || ''}`, children: links?.length ? (jsx("div", { className: "flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null }));
822
849
  });
823
- const HorizontalNavigationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-normal text-sm text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
850
+ const HorizontalNavigationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
824
851
 
825
852
  function useSitemap(useAsyncData) {
826
853
  const { data } = useAsyncData(sitemapURL(), fetchSitemap);
@@ -852,7 +879,7 @@
852
879
  });
853
880
  const renderColumn = (c, index, { router, handlerDecorator }) => {
854
881
  const { text, href, items, target } = c;
855
- return (jsxs("div", { className: "flex flex-col w-[235px] gap-[14px]", children: [jsx("a", { className: "block font-sans font-medium text-base text-primary-text no-underline", href: href, target: target || '_self', children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ...useLink({ router, handlerDecorator }, _) }, String(i))))] }, String(index)));
882
+ return (jsxs("div", { className: "flex flex-col gap-[14px]", children: [jsx("a", { className: "block font-sans font-medium text-base text-primary-text no-underline", href: href, target: target || '_self', children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ...useLink({ router, handlerDecorator }, _) }, String(i))))] }, String(index)));
856
883
  };
857
884
  const ColumnItem = JSX(({ text, href, target, index }) => (jsx("a", { className: "block font-sans font-normal text-base text-secondary-text hover:text-primary-main no-underline", href: href, target: target || '_self', children: text || `Раздел ${index}` })));
858
885
 
@@ -876,7 +903,7 @@
876
903
  const { icon, label, width, height } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
877
904
  if (!icon)
878
905
  return null;
879
- return (jsx(Button, { rounded: true, href: href, target: "_blank", rel: "noopener noreferrer", "aria-label": label, className: "border-solid border border-main-divider w-9 h-9 flex items-center justify-center hover:fill-primary-main", appendLeft: jsx(Icon, { name: icon, width: width, height: height, asSVG: true }) }));
906
+ return (jsx("a", { className: "flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[38px] h-[38px] hover:fill-primary-main", href: href, target: "_blank", rel: "noopener noreferrer", children: Icon && jsx(Icon, { name: icon, width: width, height: height, asSVG: true, className: "block" }) }));
880
907
  });
881
908
 
882
909
  const TextInformation = JSX(({ className, links, context }) => {
@@ -889,9 +916,17 @@
889
916
  const LEFT_COL_WIDTH_FULL_HD = 'w-[280px]';
890
917
  const LEFT_COL_WIDTH_SMALL_DESKTOP = 'xl:w-[220px]';
891
918
  const Footer$1 = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, topItems, context }) => {
892
- return (jsxs("footer", { className: `${className} px-9 py-10 bg-white`, children: [jsxs("div", { className: "flex items-stretch gap-32 pb-8 xl:gap-8", children: [jsx(Logo, { className: `${LEFT_COL_WIDTH_FULL_HD} ${LEFT_COL_WIDTH_SMALL_DESKTOP}` }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-32 xl:gap-8", children: [jsx(Contacts, { className: `${LEFT_COL_WIDTH_FULL_HD} shrink-0 overflow-hidden ${LEFT_COL_WIDTH_SMALL_DESKTOP}`, items: contacts, context: context, hasButton: true }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(SocialMedia, { media: socialMedia, context: context }), jsx(HorizontalNavigation, { links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
919
+ return (jsxs("footer", { className: `px-9 py-10 bg-white ${className || ''}`, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-8 xl:gap-8", children: [jsx(Logo, { className: `${LEFT_COL_WIDTH_FULL_HD} ${LEFT_COL_WIDTH_SMALL_DESKTOP}` }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsx(Contacts, { className: `${LEFT_COL_WIDTH_FULL_HD} shrink-0 overflow-hidden ${LEFT_COL_WIDTH_SMALL_DESKTOP}`, items: contacts, context: context, hasButton: true }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(SocialMedia, { media: socialMedia, context: context }), jsx(HorizontalNavigation, { links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
893
920
  });
894
921
 
922
+ const cardVersionMap = {
923
+ primary: 'text-secondary-text',
924
+ secondary: '',
925
+ };
926
+ const galleryLengthForScrollMap = {
927
+ normal: 3,
928
+ mini: 4,
929
+ };
895
930
  const cardStyleMap = {
896
931
  normal: 'min-w-[364px] w-[364px]',
897
932
  mini: 'min-w-[260px] w-[260px]',
@@ -900,34 +935,36 @@
900
935
  normal: 380,
901
936
  mini: 276,
902
937
  };
903
- const galleryLengthForScrollMap = {
904
- normal: 3,
905
- mini: 4,
906
- };
907
- const GalleryInner = JSX(({ title, description, context, cards = [], className, version = 'normal' }) => {
938
+
939
+ const GalleryCardInner = JSX(({ title, description, image, items, button, version }) => {
940
+ const cardVersionClasses = cardVersionMap[version ?? 'primary'];
941
+ return (jsxs("div", { children: [jsxs("div", { children: [image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: image }) })) : null, title && renderCardTitle(title, description, items), description && (jsx("div", { className: `font-normal text-sm mt-2 ${cardVersionClasses}`, children: description })), items?.length ? (jsx("section", { className: `max-w-[308px] mt-2 ${cardVersionClasses}`, role: "list", children: items.map((item, i) => renderItem(item, i, version)) })) : null] }), button?.href && jsx(Button, { className: "mt-6", ...button })] }));
942
+ });
943
+ function renderCardTitle(title, description, items) {
944
+ return (jsx("div", { className: `font-medium text-xl m-0 ${!description && !items?.length ? 'text-center' : ''}`, children: title }));
945
+ }
946
+ function renderItem(item, i, version) {
947
+ return (jsx(BlockItem, { version: version ?? 'primary', children: jsx("span", { className: "text-sm", children: item }) }, String(i)));
948
+ }
949
+
950
+ const GalleryContainer = JSX(({ context, title, description, cards = [], version = 'normal', activeCardIndex }) => {
951
+ return (jsxs("div", { children: [jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent" }), jsxs("div", { className: "flex flex-col items-center mb-8", children: [title ? jsx(Title, { className: "font-medium m-0 text-center", children: title }) : null, description ? (jsx("div", { className: "font-normal text-base max-w-[600px] mt-2.5", children: description })) : null] }), jsx("div", { className: `flex ${cards?.length <= galleryLengthForScrollMap[version] ? 'justify-center' : ''} duration-1000`, style: { transform: `translateX(-${activeCardIndex * cardWidthMap[version]}px)` }, role: "list", children: cards?.map((card, i) => renderCard$1({ card, version, context }, i)) })] }));
952
+ });
953
+ function renderCard$1({ card, version, context }, i) {
954
+ return (jsx(Tile, { context: context, className: `box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between
955
+ items-stretch ${cardStyleMap[version]} w-full col-span-4`, version: card.version, children: jsx(GalleryCardInner, { ...card }) }, String(i)));
956
+ }
957
+
958
+ const GalleryInner = JSX(({ context, cards = [], className, version = 'normal', ...rest }) => {
908
959
  const [activeCardIndex, setActiveCardIndex] = context.useState(0);
909
- function handleNextClick() {
910
- setActiveCardIndex(activeCardIndex + 1);
911
- }
912
- function handlePrevClick() {
913
- setActiveCardIndex(activeCardIndex - 1);
914
- }
960
+ const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
961
+ const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
915
962
  const isGalleryScrollAvailable = cards?.length > galleryLengthForScrollMap[version];
916
963
  const showNextButton = isGalleryScrollAvailable &&
917
964
  cards?.length - activeCardIndex > galleryLengthForScrollMap[version];
918
965
  const showPrevButton = isGalleryScrollAvailable && activeCardIndex > 0;
919
- return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-12 overflow-hidden ${className}`, children: [jsxs("div", { className: "flex flex-col items-center mb-8", children: [title ? jsx(Title, { className: "font-medium m-0 text-center", children: title }) : null, description ? (jsx("div", { className: "font-normal text-base max-w-[600px] mt-3", children: description })) : null] }), jsx("div", {
920
- // Need to place all cards at the center if count of cards less than 4
921
- className: `flex ${cards?.length <= galleryLengthForScrollMap[version] ? 'justify-center' : ''} duration-1000`,
922
- // All cards has same width
923
- style: { transform: `translateX(-${activeCardIndex * cardWidthMap[version]}px)` }, role: "list", children: cards?.map((card, i) => renderCard$1(card, i, version)) }), showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-1 z-10", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" })), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })] }));
966
+ return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${className}`, children: [jsx(GalleryContainer, { context: context, cards: cards, version: version, activeCardIndex: activeCardIndex, ...rest }), showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-1 z-10", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" })), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })] }));
924
967
  });
925
- function renderCard$1(card, i, version) {
926
- return (jsxs("div", { className: `box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between items-stretch ${cardStyleMap[version]} w-full`, role: "listitem", children: [jsxs("div", { children: [card.image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: card.image }) })) : null, card.title ? (jsx("h4", { className: `font-medium text-xl m-0 ${!card.description && !card.items?.length ? 'text-center' : ''}`, children: card.title })) : null, card.description ? (jsx("div", { className: "font-normal text-sm text-secondary-text mt-2", children: card.description })) : null, card.items?.length ? (jsx("section", { className: "max-w-[308px] mt-2", role: "list", children: card.items.map(renderItem) })) : null] }), card.href ? (jsx(Button, { className: "mt-6", text: "\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435", version: "secondary", href: card.href })) : null] }, String(i)));
927
- }
928
- function renderItem(item, i) {
929
- return (jsx(BlockItem, { children: jsx("span", { className: "text-sm text-secondary-text", children: item }) }, String(i)));
930
- }
931
968
 
932
969
  const Gallery$1 = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
933
970
 
@@ -969,7 +1006,7 @@
969
1006
  const activeSubItem = subItems?.find(isSubItemActive(router));
970
1007
  const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), ariaLabel: _.text }, String(i))));
971
1008
  const subMenu = subItems?.map((_) => (jsx(HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _) }, _.href)));
972
- return (jsxs("header", { className: `pt-5 pb-8 px-20 bg-white ${className || ''}`, children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8" }), topMenu, jsx(HeaderSecondaryMenu, { context: context, className: "ml-auto", defaultLocation: defaultLocation })] }), jsx("div", { className: "mt-5 h-[1px] bg-main-divider" }), jsx("nav", { className: "mt-5", children: subMenu })] }));
1009
+ return (jsx("header", { className: `pt-5 pb-8 px-20 bg-white ${className || ''}`, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8" }), topMenu, jsx(HeaderSecondaryMenu, { context: context, className: "ml-auto", defaultLocation: defaultLocation })] }), jsx("div", { className: "mt-5 h-[1px] bg-main-divider" }), jsx("nav", { className: "mt-5", children: subMenu })] }) }));
973
1010
  });
974
1011
 
975
1012
  const MiniGallery = JSX((props) => (jsx(GalleryInner, { ...props, version: "mini" })));
@@ -989,12 +1026,10 @@
989
1026
  const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
990
1027
 
991
1028
  const ProductBlockInner = JSX(({ className, context, title, titleSize, description, benefits, buttons, image, items }) => {
992
- return (jsxs("div", { className: `flex grow justify-between items-stretch ${className || ''}`, children: [jsxs("div", { className: 'flex flex-col', children: [title && (
993
- /* TODO Why <Title> is duplicated here? */
994
- jsx(Title, { size: titleSize || 'XL', className: "font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px] text-primary-text", children: title })), jsx(BaseTile, { context: context, description: description, items: items, buttons: buttons, children: benefits?.length ? (jsx("div", { className: "flex gap-6 mt-6 mb-3.5", children: benefits.map(renderBenefit) })) : null })] }), image?.src && jsx(Img, { className: "mt-auto", image: image })] }));
1029
+ return (jsxs("div", { className: `flex grow justify-between items-stretch ${className || ''}`, children: [jsx("div", { className: 'flex flex-col', children: jsx(BaseTile, { context: context, title: title, titleSize: titleSize || 'XL', description: description, items: items, buttons: buttons, children: benefits?.length ? (jsx("div", { className: "flex gap-6 mt-6 mb-3.5", children: benefits.map(renderBenefit) })) : null }) }), image?.src && jsx(Img, { className: "mt-auto", image: image })] }));
995
1030
  });
996
1031
  function renderBenefit(benefit, i) {
997
- return (jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon && (jsx(Icon, { className: "w-[50px] h-[50px] min-w-[50px] min-h-[50px] bg-main rounded-full p-[10px] box-border", name: benefit.icon, width: "24", height: "24" })), jsxs("div", { className: "flex gap-1 flex-col h-full", children: [jsx("h4", { className: "font-medium text-primary-text text-xl m-0", children: benefit.label }), benefit.description && (jsx("div", { className: "font-normal text-sm text-secondary-text", children: benefit.description }))] })] }, String(i)));
1032
+ return (jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon && (jsx(Icon, { className: "w-[50px] h-[50px] min-w-[50px] min-h-[50px] bg-main rounded-full p-[10px] box-border", name: benefit.icon, width: "24", height: "24" })), jsxs("div", { className: "flex gap-1 flex-col h-full max-w-[149px]", children: [jsx("h4", { className: "font-medium text-primary-text text-xl m-0", children: benefit.label }), benefit.description && (jsx("div", { className: "font-normal text-sm text-secondary-text", children: benefit.description }))] })] }, String(i)));
998
1033
  }
999
1034
 
1000
1035
  const Breadcrumb = JSX(({ text, href, target, onClick, className, children }) => {
@@ -1014,14 +1049,14 @@
1014
1049
  const { context, className, breadcrumbs } = props;
1015
1050
  const router = context.useRouter();
1016
1051
  const { handlerDecorator } = context;
1017
- return (jsxs("section", { className: `font-sans bg-white pt-10 pl-[50px] pb-[50px] pr-[7.5rem] ${className || ''}`, children: [breadcrumbs?.length ? (jsx("div", { className: "text-xs mb-6", children: joinList(jsx("span", { className: "text-secondary-text mx-2", children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { ...useLink({ router, handlerDecorator }, { className: 'text-secondary-text', ...breadcrumb }) }, String(i))))) })) : null, jsx(ProductBlockInner, { ...props })] }));
1052
+ return (jsxs("section", { className: `font-sans bg-white pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${className || ''}`, children: [breadcrumbs?.length ? (jsx("div", { className: "text-xs mb-6", children: joinList(jsx("span", { className: "text-secondary-text mx-2", children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { ...useLink({ router, handlerDecorator }, { className: 'text-secondary-text', ...breadcrumb }) }, String(i))))) })) : null, jsx(ProductBlockInner, { ...props })] }));
1018
1053
  });
1019
1054
 
1020
1055
  const ProductGallery = JSX(({ className, context, duration = 0, slides = [] }) => {
1021
1056
  const galleryNav = slides.map((s) => s.nav);
1022
1057
  const galleryBlocks = slides.map((s) => s.productBlock);
1023
1058
  const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
1024
- return (jsxs("section", { className: `font-sans bg-white overflow-hidden w-100 ${className || ''}`, children: [jsx("div", { className: `flex duration-1000`, style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock(_, i, context)) }), jsx("div", { className: `border-t border-solid border-main-divider flex`, children: galleryNav.map((slide, i) => renderNavButton({
1059
+ return (jsxs("section", { className: `font-sans bg-white overflow-hidden w-100 ${className || ''}`, children: [jsx("div", { className: `flex duration-1000`, style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock(_, i, context)) }), jsx("div", { className: "flex", children: galleryNav.map((slide, i) => renderNavButton({
1025
1060
  slide,
1026
1061
  i,
1027
1062
  activeSlideIndex,
@@ -1036,7 +1071,7 @@
1036
1071
  const isActiveBtn = i === activeSlideIndex;
1037
1072
  const progressBarClassName = isActiveBtn ? 'animate-slide' : '';
1038
1073
  const btnTitleClassName = isActiveBtn ? 'text-primary-text' : 'text-secondary-text';
1039
- return (jsxs("button", { type: "button", onClick: onClick, className: `group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 py-4 grow basis-0`, children: [jsxs("div", { className: "border-0 border-r border-solid border-main-divider px-6", children: [jsx("div", { className: `text-sm font-medium group-hover:text-primary-text ${btnTitleClassName}`, children: slide?.title }), jsx("div", { className: "text-xs text-secondary-text", children: slide.desc })] }), jsx("div", { className: `absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${progressBarClassName}`, style: { animationDuration: `${duration}s` } })] }, String(i)));
1074
+ return (jsxs("button", { type: "button", onClick: onClick, className: `font-sans group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 pt-4 pb-5 grow basis-0`, children: [jsxs("div", { className: "border-0 border-r border-solid border-main-divider px-6", children: [jsx("div", { className: `text-sm font-medium pb-1 group-hover:text-primary-text ${btnTitleClassName}`, children: slide?.title }), jsx("div", { className: "text-xs text-secondary-text pb-[2px]", children: slide.desc })] }), jsx("div", { className: `absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${progressBarClassName}`, style: { animationDuration: `${duration}s`, animationFillMode: 'forwards' } })] }, String(i)));
1040
1075
  }
1041
1076
 
1042
1077
  const ProductTile = JSX((props) => {
@@ -1055,7 +1090,7 @@
1055
1090
  }
1056
1091
 
1057
1092
  const PromoTile = JSX(({ className, context, title = 'Акции и спецпредложения', date, description, buttons = [], version, }) => {
1058
- return (jsx(Tile, { className: className, context: context, title: title, buttons: buttons, version: version, children: jsxs("div", { children: [date && jsx("div", { className: "text-sm mb-2", children: formatDate(date) }), jsx("div", { className: "text-base", children: description })] }) }));
1093
+ return (jsx(Tile, { className: className, context: context, title: title, buttons: buttons, version: version, children: jsxs("div", { className: "mt-1.5", children: [date && jsx("div", { className: "text-sm mb-2", children: formatDate(date) }), jsx("div", { className: "text-base", children: description })] }) }));
1059
1094
  });
1060
1095
  function formatDate(date) {
1061
1096
  const dateObj = new Date(date);
@@ -1085,11 +1120,11 @@
1085
1120
  const TariffsTableCell = JSX(({ cell, isLastRow }) => {
1086
1121
  const cellWrapperClasses = `first:pl-0 pl-10 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 ${isLastRow ? 'border-t-0 rounded-b-md' : ''}`;
1087
1122
  const cellClasses = `h-full ${DIVIDER_CLASSES}`;
1088
- return (jsx("div", { className: cellWrapperClasses, children: jsx("div", { className: cellClasses, children: cell.map((item, i) => renderCellInner(item, i)) }) }));
1123
+ return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { className: cellClasses, children: cell.map((item, i) => renderCellInner(item, i)) }) }));
1089
1124
  });
1090
- const renderCellInner = ({ label, description, list, image, buttons }, i) => (jsxs("div", { className: "first:pt-5 last:pb-5", children: [i > 0 && (jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-4" })), label && jsx("h5", { className: "text-xl font-medium m-0", children: label }), description && jsx("div", { className: "text-sm text-secondary-text", children: description }), list?.items?.length ? (jsx("div", { className: "flex flex-col justify-between items-start", children: jsx("div", { children: list.items.map((text, idx) => (jsx(BlockItem, { text: text, version: list.version ?? 'secondary', isDotted: list.isDotted ?? true }, String(idx)))) }) })) : null, image && jsx(Img, { image: image }), buttons?.length
1125
+ const renderCellInner = ({ label, description, list, image, buttons }, i) => (jsxs("div", { className: "first:pt-5 last:pb-5", children: [i > 0 && (jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-4" })), label && jsx("div", { className: "text-xl font-medium m-0", children: label }), description && jsx("div", { className: "text-sm text-secondary-text", children: description }), list?.items?.length ? (jsx("div", { className: "flex flex-col justify-between items-start", children: jsx("div", { role: "list", children: list.items.map((text, idx) => (jsx(BlockItem, { text: text, version: list.version ?? 'secondary', isDotted: list.isDotted ?? true }, String(idx)))) }) })) : null, image && jsx(Img, { image: image }), buttons?.length
1091
1126
  ? buttons.map(({ icon, ...buttonProps }, idx) => (jsx(Button, { className: `${idx > 0 ? 'ml-3' : ''} w-12 h-12`, appendLeft: icon && jsx(Icon, { name: icon, width: "24px", height: "24px" }), ...buttonProps }, String(idx))))
1092
- : null] }));
1127
+ : null] }, String(i)));
1093
1128
 
1094
1129
  const TariffsTableRow = JSX(({ row: { header, data }, activeCardIndex, isLastRow }) => {
1095
1130
  return (jsxs(TableRowContainer, { children: [jsx("div", { className: `text-sm py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES} ${!isLastRow ? 'border-solid' : ''}`, children: jsxs("div", { className: "flex items-center text-primary-text", children: [header?.icon && (jsx(Icon, { className: "pr-[14px]", name: header.icon, width: "24px", height: "24px" })), header?.title] }) }), data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH, version: "tariff", children: data.map((cell, i) => (jsx(TariffsTableCell, { cell: cell, isLastRow: isLastRow }, String(i)))) })) : null] }));
@@ -1102,8 +1137,13 @@
1102
1137
  header,
1103
1138
  data: colData.map((col) => col?.[i] || [{}]),
1104
1139
  }));
1105
- const { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton } = useComparisonTableScroll(colData, COLS_LENGTH_FOR_SCROLL, activeCardIndex, setActiveCardIndex);
1106
- return (jsxs("section", { className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, children: [jsx(Title, { className: "font-medium m-0 max-w-[47rem] text-center mb-9 mx-auto", children: title }), rowData?.length ? (jsxs("div", { className: "relative", children: [rowData.map((row, i, { length }) => (jsx(TariffsTableRow, { row: row, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex }, String(i)))), isScrollAvailable ? (jsx("div", { children: jsxs("div", { className: "absolute top-7 right-7 z-10", children: [jsx(ArrowButton, { onClick: nextClick, disabled: !showNextButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" }), jsx(ArrowButton, { className: "mt-4 rotate-180", onClick: prevClick, disabled: !showPrevButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })] }) })) : null] })) : null, isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
1140
+ const { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton } = useComparisonTableScroll({
1141
+ colData,
1142
+ colsLengthForScroll: COLS_LENGTH_FOR_SCROLL,
1143
+ activeCardIndex,
1144
+ setActiveCardIndex,
1145
+ });
1146
+ return (jsxs("section", { className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, children: [jsx(Title, { className: "font-medium m-0 max-w-[47rem] text-center mb-9 mx-auto", children: title }), jsxs("div", { role: "table", children: [rowData?.length ? (jsxs("div", { className: "relative", children: [rowData.map((row, i, { length }) => (jsx(TariffsTableRow, { row: row, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex }, String(i)))), isScrollAvailable ? (jsx("div", { children: jsxs("div", { className: "absolute top-7 right-7 z-10", children: [jsx(ArrowButton, { onClick: nextClick, disabled: !showNextButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" }), jsx(ArrowButton, { className: "mt-4 rotate-180", onClick: prevClick, disabled: !showPrevButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })] }) })) : null] })) : null, isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] })] }));
1107
1147
  });
1108
1148
 
1109
1149
  const Blocks = {
@@ -1148,24 +1188,27 @@
1148
1188
  });
1149
1189
 
1150
1190
  const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
1151
- const ContentPage = JSX(({ className, context, blocksRegistry, data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
1152
- return (jsxs("section", { className: "relative", "data-theme": colorPalette, children: [jsx("div", { className: `grid grid-cols-12 gap-1 ${style2className(pageStyle)} ${className || ''}`, children: blocks?.length ? blocks.map(renderBlock) : null }), likeControl && (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }) }))] }));
1153
- function renderBlock(block, i) {
1154
- const { type } = block;
1155
- if (!(type in blocksRegistry)) {
1156
- console.warn(`No block with "${type}" is registered`);
1157
- }
1158
- const BlockComponent = blocksRegistry[type] || Placeholder;
1159
- return blockDecorator({
1160
- blockClassName: style2className(block.style),
1161
- block,
1162
- render: (props) => {
1163
- const { version, content, blocks } = props.block;
1164
- return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, ...content, children: blocks?.length ? blocks.map(renderBlock) : null }, `${type}-${i}`));
1165
- },
1166
- }, `block-${i}`);
1167
- }
1191
+ const ContentPage = JSX(({ className, context, blocksRegistry, data: { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
1192
+ const { header } = slots;
1193
+ return (jsxs("section", { className: `relative ${style2className(pageStyle)} ${className || ''}`, "data-theme": colorPalette, children: [header?.blocks?.length ? (jsx("div", { className: `${style2className(header?.style)}`, children: header.blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i)) })) : null, blocks?.length ? (jsx("div", { className: "container grid grid-cols-12 gap-1", children: blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i)) })) : null, likeControl && (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }) }))] }));
1168
1194
  });
1195
+ function renderBlock({ block, blockDecorator, blocksRegistry, context }, i) {
1196
+ const { type } = block;
1197
+ if (!(type in blocksRegistry)) {
1198
+ console.warn(`No block with "${type}" is registered`);
1199
+ }
1200
+ const BlockComponent = blocksRegistry[type] || Placeholder;
1201
+ return blockDecorator({
1202
+ blockClassName: style2className(block.style),
1203
+ block,
1204
+ render: (props) => {
1205
+ const { version, content, blocks } = props.block;
1206
+ return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, ...content, children: blocks?.length
1207
+ ? blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i))
1208
+ : null }, `${type}-${i}`));
1209
+ },
1210
+ }, `block-${i}`);
1211
+ }
1169
1212
  function style2className(style) {
1170
1213
  return style ? style.join(' ') : '';
1171
1214
  }
@@ -1178,12 +1221,23 @@
1178
1221
  });
1179
1222
 
1180
1223
  function toMobilePage(contentPage) {
1181
- const blocks = contentPage.blocks?.filter(({ mobile }) => !mobile?.hidden).map(toMobileBlock);
1224
+ const { blocks, slots } = contentPage;
1182
1225
  return {
1183
1226
  ...contentPage,
1184
- blocks,
1227
+ blocks: getMobileBlocks(blocks),
1228
+ slots: slots &&
1229
+ Object.keys(slots).reduce((res, key) => ({
1230
+ ...res,
1231
+ [key]: {
1232
+ ...slots[key],
1233
+ blocks: getMobileBlocks(slots[key].blocks),
1234
+ },
1235
+ }), {}),
1185
1236
  };
1186
1237
  }
1238
+ function getMobileBlocks(blocks) {
1239
+ return blocks?.filter(({ mobile }) => !mobile?.hidden).map(toMobileBlock);
1240
+ }
1187
1241
  function toMobileBlock(block) {
1188
1242
  const { mobile } = block;
1189
1243
  if (mobile) {
@@ -1203,13 +1257,15 @@
1203
1257
  return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-4 overflow-hidden ${className}`, children: [jsxs("div", { className: "flex flex-col items-center mb-8", children: [jsx(Title, { className: "font-medium m-0 text-centers", children: title }), description ? (jsx("div", { className: "font-normal text-base max-w-[600px] mt-3", children: description })) : null] }), jsx("div", { className: "horizontal-list no-scrollbar", role: "list", children: cards?.map(renderCard) })] }));
1204
1258
  });
1205
1259
  function renderCard(card, key) {
1206
- return (jsxs("div", { className: "box-border horizontal-list-item border-solid border rounded-md border-main-divider p-4 mx-1 flex flex-col justify-between items-stretch", role: "listitem", children: [jsxs("div", { children: [card.image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: card.image }) })) : null, card.title ? (jsx("h4", { className: `font-medium text-xl m-0 ${!card.description && !card.items?.length ? 'text-center' : ''}`, children: card.title })) : null, card.description ? (jsx("div", { className: "font-normal text-sm text-secondary-text mt-2", children: card.description })) : null, card.items?.length ? renderItems(card.items) : null] }), card.href ? (jsx(Button, { className: "mt-6", text: "\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435", version: "secondary", href: card.href })) : null] }, key));
1260
+ return (jsxs("div", { className: "box-border horizontal-list-item border-solid border rounded-md border-main-divider p-4 mx-1 flex flex-col justify-between items-stretch", role: "listitem", children: [jsxs("div", { children: [card.image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: card.image }) })) : null, card.title ? (jsx("h4", { className: `font-medium text-xl m-0 ${!card.description && !card.items?.length ? 'text-center' : ''}`, children: card.title })) : null, card.description ? (jsx("div", { className: "font-normal text-sm text-secondary-text mt-2", children: card.description })) : null, card.items?.length ? renderItems(card.items) : null] }), card?.button?.href ? jsx(Button, { className: "mt-6", ...card.button }) : null] }, key));
1207
1261
  }
1208
1262
  function renderItems(items = []) {
1209
1263
  return (jsx("section", { className: "max-w-[308px] mt-2", role: "list", children: items.map((item, i) => (jsx(BlockItem, { children: jsx("span", { className: "text-sm text-secondary-text", children: item }) }, String(i)))) }));
1210
1264
  }
1211
1265
 
1212
- const ProductBlock = JSX(({ titleSize, image, benefits, ...props } /* Get rid of image and benefits */) => {
1266
+ const ProductBlock = JSX(
1267
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1268
+ ({ titleSize, image, benefits, ...props } /* Get rid of image and benefits */) => {
1213
1269
  const { className } = props;
1214
1270
  return (jsx("section", { className: `font-sans bg-white pt-10 pl-[50px] pb-[50px] pr-[7.5rem] ${className || ''}`, children: jsx(ProductBlockInner, { ...props, titleSize: "L" }) }));
1215
1271
  });
@@ -1227,9 +1283,6 @@
1227
1283
  ProductTile,
1228
1284
  TextBlock,
1229
1285
  Tile,
1230
- // TODO StepsBlock,
1231
- // TODO BenefitsBlock,
1232
- // TODO ProductGallery
1233
1286
  };
1234
1287
 
1235
1288
  exports.Blocks = Blocks;