@redneckz/wildless-cms-uni-blocks 0.2.83 → 0.2.86

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 (284) hide show
  1. package/bundle/blocks.schema.json +1 -945
  2. package/bundle/bundle.umd.js +203 -198
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/Accordion/Accordion.js +1 -1
  5. package/dist/components/Accordion/Accordion.js.map +1 -1
  6. package/dist/components/Accordion/AccordionContent.d.ts +29 -10
  7. package/dist/components/Accordion/AccordionItem.d.ts +2 -2
  8. package/dist/components/Accordion/AccordionItem.js +5 -6
  9. package/dist/components/Accordion/AccordionItem.js.map +1 -1
  10. package/dist/components/BaseTile/BaseTile.d.ts +2 -2
  11. package/dist/components/BaseTile/BaseTile.js +1 -1
  12. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  13. package/dist/components/BaseTile/BaseTileProps.d.ts +31 -0
  14. package/dist/{model/SitemapContent.js → components/BaseTile/BaseTileProps.js} +1 -1
  15. package/dist/components/BaseTile/BaseTileProps.js.map +1 -0
  16. package/dist/components/BenefitsBlock/BenefitsBlock.d.ts +1 -1
  17. package/dist/components/BenefitsBlock/BenefitsBlock.js +2 -1
  18. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  19. package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +14 -1
  20. package/dist/components/BlockContent.d.ts +4 -1
  21. package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +45 -2
  22. package/dist/components/ComparisonTable/HeaderCell.d.ts +2 -2
  23. package/dist/components/ContentPage/ContentPage.d.ts +3 -2
  24. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  25. package/dist/components/CreditCalculator/CreditCalculatorContent.d.ts +4 -0
  26. package/dist/components/ExchangeRateTile/ExchangeRateTile.d.ts +1 -1
  27. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  28. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  29. package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +4 -0
  30. package/dist/components/Footer/Contacts.js +2 -2
  31. package/dist/components/Footer/Contacts.js.map +1 -1
  32. package/dist/components/Footer/FooterContent.d.ts +35 -9
  33. package/dist/components/Footer/FooterLink.d.ts +2 -2
  34. package/dist/components/Footer/HorizontalNavigation.js.map +1 -1
  35. package/dist/components/Footer/Sitemap.d.ts +1 -1
  36. package/dist/components/Footer/Sitemap.js +1 -1
  37. package/dist/components/Footer/Sitemap.js.map +1 -1
  38. package/dist/components/Footer/SocialMedia.d.ts +2 -2
  39. package/dist/components/Footer/SocialMedia.js +2 -2
  40. package/dist/components/Footer/SocialMedia.js.map +1 -1
  41. package/dist/components/Footer/TextInformation.js.map +1 -1
  42. package/dist/components/Gallery/GalleryContent.d.ts +13 -0
  43. package/dist/components/Header/HeaderContent.d.ts +10 -2
  44. package/dist/components/Header/HeaderSecondaryMenu.js +1 -1
  45. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  46. package/dist/components/Header/HeaderSecondaryMenuButton.js +1 -1
  47. package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  48. package/dist/components/Header/isSubItemActive.d.ts +2 -2
  49. package/dist/components/Header/isSubItemActive.js.map +1 -1
  50. package/dist/components/Header/isTopItemActive.d.ts +2 -2
  51. package/dist/components/Header/isTopItemActive.js.map +1 -1
  52. package/dist/components/MiniGallery/MiniGallery.d.ts +3 -3
  53. package/dist/components/MiniGallery/MiniGalleryContent.d.ts +6 -0
  54. package/dist/components/MiniGallery/MiniGalleryContent.js +2 -0
  55. package/dist/components/MiniGallery/MiniGalleryContent.js.map +1 -0
  56. package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +11 -2
  57. package/dist/components/Placeholder/PlaceholderContent.d.ts +3 -0
  58. package/dist/components/ProductBlock/ProductBlock.mobile.d.ts +2 -2
  59. package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
  60. package/dist/components/ProductBlock/ProductBlockContent.d.ts +10 -5
  61. package/dist/components/ProductBlock/ProductBlockInner.d.ts +2 -2
  62. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  63. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  64. package/dist/components/ProductGallery/ProductGallery.d.ts +1 -1
  65. package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  66. package/dist/components/ProductGallery/ProductGalleryContent.d.ts +17 -2
  67. package/dist/components/ProductTile/ProductTileContent.d.ts +6 -2
  68. package/dist/components/PromoTile/PromoTileContent.d.ts +6 -2
  69. package/dist/components/StepsBlock/StepsBlockContent.d.ts +13 -0
  70. package/dist/components/TextBlock/TextBlockContent.d.ts +13 -0
  71. package/dist/components/Tile/TileContent.d.ts +5 -2
  72. package/dist/hooks/useLink.d.ts +3 -3
  73. package/dist/hooks/useLink.js.map +1 -1
  74. package/dist/index.d.ts +12 -12
  75. package/dist/index.js +10 -10
  76. package/dist/index.js.map +1 -1
  77. package/dist/mergeTopItems.d.ts +2 -2
  78. package/dist/mergeTopItems.js.map +1 -1
  79. package/dist/model/BlockVersion.d.ts +4 -0
  80. package/dist/model/ButtonVersion.d.ts +4 -0
  81. package/dist/model/LinkProps.d.ts +21 -0
  82. package/dist/model/{LinkContent.js → LinkProps.js} +1 -1
  83. package/dist/model/LinkProps.js.map +1 -0
  84. package/dist/model/Picture.d.ts +11 -0
  85. package/dist/model/SitemapProps.d.ts +13 -0
  86. package/dist/{components/BaseTile/BaseTileContent.js → model/SitemapProps.js} +1 -1
  87. package/dist/model/SitemapProps.js.map +1 -0
  88. package/dist/types.d.ts +2 -2
  89. package/dist/ui-kit/Breadcrumb.d.ts +2 -2
  90. package/dist/ui-kit/Button/Button.d.ts +6 -3
  91. package/dist/ui-kit/Button/Button.js.map +1 -1
  92. package/dist/ui-kit/Button/ButtonProps.d.ts +15 -12
  93. package/dist/ui-kit/Icon/Icon.js +7 -1
  94. package/dist/ui-kit/Icon/Icon.js.map +1 -1
  95. package/dist/ui-kit/Icon/IconProps.d.ts +50 -19
  96. package/dist/ui-kit/Icon/IconProps.js +21 -18
  97. package/dist/ui-kit/Icon/IconProps.js.map +1 -1
  98. package/dist/ui-kit/TopItem/TopItem.d.ts +2 -2
  99. package/lib/common.css +1 -1
  100. package/lib/components/Accordion/Accordion.js +1 -1
  101. package/lib/components/Accordion/Accordion.js.map +1 -1
  102. package/lib/components/Accordion/AccordionContent.d.ts +29 -10
  103. package/lib/components/Accordion/AccordionItem.d.ts +2 -2
  104. package/lib/components/Accordion/AccordionItem.js +5 -6
  105. package/lib/components/Accordion/AccordionItem.js.map +1 -1
  106. package/lib/components/BaseTile/BaseTile.d.ts +2 -2
  107. package/lib/components/BaseTile/BaseTile.js +1 -1
  108. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  109. package/lib/components/BaseTile/BaseTileProps.d.ts +31 -0
  110. package/lib/components/BaseTile/BaseTileProps.js +2 -0
  111. package/lib/components/BaseTile/BaseTileProps.js.map +1 -0
  112. package/lib/components/BenefitsBlock/BenefitsBlock.d.ts +1 -1
  113. package/lib/components/BenefitsBlock/BenefitsBlock.js +2 -1
  114. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  115. package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +14 -1
  116. package/lib/components/BlockContent.d.ts +4 -1
  117. package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +45 -2
  118. package/lib/components/ComparisonTable/HeaderCell.d.ts +2 -2
  119. package/lib/components/ContentPage/ContentPage.d.ts +3 -2
  120. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  121. package/lib/components/CreditCalculator/CreditCalculatorContent.d.ts +4 -0
  122. package/lib/components/ExchangeRateTile/ExchangeRateTile.d.ts +1 -1
  123. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  124. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  125. package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +4 -0
  126. package/lib/components/Footer/Contacts.js +2 -2
  127. package/lib/components/Footer/Contacts.js.map +1 -1
  128. package/lib/components/Footer/FooterContent.d.ts +35 -9
  129. package/lib/components/Footer/FooterLink.d.ts +2 -2
  130. package/lib/components/Footer/HorizontalNavigation.js.map +1 -1
  131. package/lib/components/Footer/Sitemap.d.ts +1 -1
  132. package/lib/components/Footer/Sitemap.js +1 -1
  133. package/lib/components/Footer/Sitemap.js.map +1 -1
  134. package/lib/components/Footer/SocialMedia.d.ts +2 -2
  135. package/lib/components/Footer/SocialMedia.js +2 -2
  136. package/lib/components/Footer/SocialMedia.js.map +1 -1
  137. package/lib/components/Footer/TextInformation.js.map +1 -1
  138. package/lib/components/Gallery/GalleryContent.d.ts +13 -0
  139. package/lib/components/Header/HeaderContent.d.ts +10 -2
  140. package/lib/components/Header/HeaderSecondaryMenu.js +1 -1
  141. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  142. package/lib/components/Header/HeaderSecondaryMenuButton.js +1 -1
  143. package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  144. package/lib/components/Header/isSubItemActive.d.ts +2 -2
  145. package/lib/components/Header/isSubItemActive.js.map +1 -1
  146. package/lib/components/Header/isTopItemActive.d.ts +2 -2
  147. package/lib/components/Header/isTopItemActive.js.map +1 -1
  148. package/lib/components/MiniGallery/MiniGallery.d.ts +3 -3
  149. package/lib/components/MiniGallery/MiniGalleryContent.d.ts +6 -0
  150. package/lib/components/MiniGallery/MiniGalleryContent.js +2 -0
  151. package/lib/components/MiniGallery/MiniGalleryContent.js.map +1 -0
  152. package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +11 -2
  153. package/lib/components/Placeholder/PlaceholderContent.d.ts +3 -0
  154. package/lib/components/ProductBlock/ProductBlock.mobile.d.ts +2 -2
  155. package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
  156. package/lib/components/ProductBlock/ProductBlockContent.d.ts +10 -5
  157. package/lib/components/ProductBlock/ProductBlockInner.d.ts +2 -2
  158. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  159. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  160. package/lib/components/ProductGallery/ProductGallery.d.ts +1 -1
  161. package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  162. package/lib/components/ProductGallery/ProductGalleryContent.d.ts +17 -2
  163. package/lib/components/ProductTile/ProductTileContent.d.ts +6 -2
  164. package/lib/components/PromoTile/PromoTileContent.d.ts +6 -2
  165. package/lib/components/StepsBlock/StepsBlockContent.d.ts +13 -0
  166. package/lib/components/TextBlock/TextBlockContent.d.ts +13 -0
  167. package/lib/components/Tile/TileContent.d.ts +5 -2
  168. package/lib/hooks/useLink.d.ts +3 -3
  169. package/lib/hooks/useLink.js.map +1 -1
  170. package/lib/index.d.ts +12 -12
  171. package/lib/index.js +5 -5
  172. package/lib/index.js.map +1 -1
  173. package/lib/mergeTopItems.d.ts +2 -2
  174. package/lib/mergeTopItems.js.map +1 -1
  175. package/lib/model/BlockVersion.d.ts +4 -0
  176. package/lib/model/ButtonVersion.d.ts +4 -0
  177. package/lib/model/LinkProps.d.ts +21 -0
  178. package/lib/model/LinkProps.js +2 -0
  179. package/lib/model/LinkProps.js.map +1 -0
  180. package/lib/model/Picture.d.ts +11 -0
  181. package/lib/model/SitemapProps.d.ts +13 -0
  182. package/lib/model/SitemapProps.js +2 -0
  183. package/lib/model/SitemapProps.js.map +1 -0
  184. package/lib/types.d.ts +2 -2
  185. package/lib/ui-kit/Breadcrumb.d.ts +2 -2
  186. package/lib/ui-kit/Button/Button.d.ts +6 -3
  187. package/lib/ui-kit/Button/Button.js.map +1 -1
  188. package/lib/ui-kit/Button/ButtonProps.d.ts +15 -12
  189. package/lib/ui-kit/Icon/Icon.js +7 -1
  190. package/lib/ui-kit/Icon/Icon.js.map +1 -1
  191. package/lib/ui-kit/Icon/IconProps.d.ts +50 -19
  192. package/lib/ui-kit/Icon/IconProps.js +21 -18
  193. package/lib/ui-kit/Icon/IconProps.js.map +1 -1
  194. package/lib/ui-kit/TopItem/TopItem.d.ts +2 -2
  195. package/package.json +17 -36
  196. package/src/components/Accordion/Accordion.example.json +74 -0
  197. package/src/components/Accordion/Accordion.fixture.tsx +1 -16
  198. package/src/components/Accordion/Accordion.tsx +1 -1
  199. package/src/components/Accordion/AccordionContent.ts +31 -11
  200. package/src/components/Accordion/AccordionItem.tsx +10 -10
  201. package/src/components/BaseTile/BaseTile.tsx +4 -5
  202. package/src/components/BaseTile/BaseTileProps.ts +33 -0
  203. package/src/components/BenefitsBlock/BenefitsBlock.example.json +13 -0
  204. package/src/components/BenefitsBlock/BenefitsBlock.tsx +3 -2
  205. package/src/components/BenefitsBlock/BenefitsBlockContent.ts +14 -1
  206. package/src/components/BlockContent.ts +4 -1
  207. package/src/components/ComparisonTable/ComparisonTable.example.json +84 -0
  208. package/src/components/ComparisonTable/ComparisonTableContent.ts +46 -3
  209. package/src/components/ComparisonTable/HeaderCell.tsx +2 -2
  210. package/src/components/ContentPage/ContentPage.tsx +7 -5
  211. package/src/components/CreditCalculator/CreditCalculatorContent.ts +4 -0
  212. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
  213. package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +4 -0
  214. package/src/components/Footer/Contacts.tsx +2 -2
  215. package/src/components/Footer/FooterContent.ts +36 -9
  216. package/src/components/Footer/FooterLink.ts +2 -2
  217. package/src/components/Footer/HorizontalNavigation.tsx +2 -2
  218. package/src/components/Footer/Sitemap.tsx +5 -5
  219. package/src/components/Footer/SocialMedia.tsx +5 -12
  220. package/src/components/Footer/TextInformation.tsx +2 -2
  221. package/src/components/Gallery/Gallery.example.json +71 -0
  222. package/src/components/Gallery/GalleryContent.ts +13 -0
  223. package/src/components/Header/HeaderContent.ts +10 -2
  224. package/src/components/Header/HeaderSecondaryMenu.tsx +4 -8
  225. package/src/components/Header/HeaderSecondaryMenuButton.tsx +1 -1
  226. package/src/components/Header/isSubItemActive.ts +3 -3
  227. package/src/components/Header/isTopItemActive.ts +3 -3
  228. package/src/components/MiniGallery/MiniGallery.example.json +61 -0
  229. package/src/components/MiniGallery/MiniGallery.tsx +3 -3
  230. package/src/components/MiniGallery/MiniGalleryContent.ts +6 -0
  231. package/src/components/MobileAppTile/MobileAppTile.example.json +20 -0
  232. package/src/components/MobileAppTile/MobileAppTileContent.ts +11 -2
  233. package/src/components/Placeholder/PlaceholderContent.ts +3 -0
  234. package/src/components/ProductBlock/ProductBlock.example.json +17 -0
  235. package/src/components/ProductBlock/ProductBlock.mobile.tsx +3 -3
  236. package/src/components/ProductBlock/ProductBlockContent.ts +10 -5
  237. package/src/components/ProductBlock/ProductBlockInner.tsx +4 -4
  238. package/src/components/ProductGallery/ProductGallery.example.json +21 -0
  239. package/src/components/ProductGallery/ProductGallery.tsx +3 -3
  240. package/src/components/ProductGallery/ProductGalleryContent.ts +17 -2
  241. package/src/components/ProductTile/ProductTile.example.json +30 -0
  242. package/src/components/ProductTile/ProductTileContent.ts +6 -2
  243. package/src/components/PromoTile/PromoTile.example.json +13 -0
  244. package/src/components/PromoTile/PromoTileContent.ts +6 -2
  245. package/src/components/StepsBlock/StepsBlock.example.json +17 -0
  246. package/src/components/StepsBlock/StepsBlockContent.ts +13 -0
  247. package/src/components/TextBlock/TextBlock.example.json +6 -0
  248. package/src/components/TextBlock/TextBlockContent.ts +14 -0
  249. package/src/components/Tile/Tile.example.json +18 -0
  250. package/src/components/Tile/TileContent.ts +5 -2
  251. package/src/hooks/useLink.ts +2 -2
  252. package/src/icons/GridIcon.svg +4 -7
  253. package/src/index.ts +14 -21
  254. package/src/mergeTopItems.ts +5 -5
  255. package/src/model/BlockVersion.ts +4 -0
  256. package/src/model/ButtonVersion.ts +4 -0
  257. package/src/model/LinkProps.ts +22 -0
  258. package/src/model/Picture.ts +11 -0
  259. package/src/model/SitemapProps.ts +15 -0
  260. package/src/types.ts +2 -2
  261. package/src/ui-kit/Breadcrumb.tsx +2 -2
  262. package/src/ui-kit/Button/Button.tsx +7 -3
  263. package/src/ui-kit/Button/ButtonProps.ts +16 -13
  264. package/src/ui-kit/Icon/Icon.tsx +23 -9
  265. package/src/ui-kit/Icon/IconProps.ts +36 -5
  266. package/src/ui-kit/TopItem/TopItem.tsx +2 -2
  267. package/dist/components/BaseTile/BaseTileContent.d.ts +0 -13
  268. package/dist/components/BaseTile/BaseTileContent.js.map +0 -1
  269. package/dist/model/LinkContent.d.ts +0 -5
  270. package/dist/model/LinkContent.js.map +0 -1
  271. package/dist/model/SitemapContent.d.ts +0 -7
  272. package/dist/model/SitemapContent.js.map +0 -1
  273. package/lib/components/BaseTile/BaseTileContent.d.ts +0 -13
  274. package/lib/components/BaseTile/BaseTileContent.js +0 -2
  275. package/lib/components/BaseTile/BaseTileContent.js.map +0 -1
  276. package/lib/model/LinkContent.d.ts +0 -5
  277. package/lib/model/LinkContent.js +0 -2
  278. package/lib/model/LinkContent.js.map +0 -1
  279. package/lib/model/SitemapContent.d.ts +0 -7
  280. package/lib/model/SitemapContent.js +0 -2
  281. package/lib/model/SitemapContent.js.map +0 -1
  282. package/src/components/BaseTile/BaseTileContent.ts +0 -14
  283. package/src/model/LinkContent.ts +0 -5
  284. package/src/model/SitemapContent.ts +0 -9
@@ -38,36 +38,36 @@
38
38
  return Component._tmpl;
39
39
  };
40
40
 
41
- const projectSettings = new (class {
42
- _ = {
43
- PROD_BRANCH: 'master',
44
- FORCED_DRAFT_FLOW: false,
45
- };
46
- setup(_) {
47
- this._ = _;
48
- }
49
- get TEST_BRANCH() {
50
- return this._.TEST_BRANCH;
51
- }
52
- get RC_BRANCH() {
53
- return this._.RC_BRANCH;
54
- }
55
- get PROD_BRANCH() {
56
- return this._.PROD_BRANCH;
57
- }
58
- get FORCED_DRAFT_FLOW() {
59
- return this._.FORCED_DRAFT_FLOW;
60
- }
61
- get ENABLE_ASSIST() {
62
- return this._.ENABLE_ASSIST;
63
- }
64
- get SITEMAP() {
65
- return this._.SITEMAP;
66
- }
67
- get CDN() {
68
- return this._.CDN;
41
+ const getGeolocation = async () => new Promise((resolve) => navigator.geolocation.getCurrentPosition(({ coords }) => resolve(coords)));
42
+
43
+ function DaDataAPI(baseURL = '') {
44
+ async function getFetcherAddress() {
45
+ if (!('geolocation' in navigator)) {
46
+ return null;
47
+ }
48
+ try {
49
+ const coords = await getGeolocation();
50
+ const response = await fetch(`${baseURL}/geolocate`, {
51
+ method: 'POST',
52
+ mode: 'cors',
53
+ body: JSON.stringify({
54
+ lat: coords.latitude,
55
+ lon: coords.longitude,
56
+ count: 1,
57
+ }),
58
+ });
59
+ const data = (await response.json());
60
+ return data?.suggestions?.[0]?.data?.city;
61
+ }
62
+ catch (e) {
63
+ console.error(e);
64
+ return null;
65
+ }
69
66
  }
70
- })();
67
+ return {
68
+ getFetcherAddress,
69
+ };
70
+ }
71
71
 
72
72
  const AUTH_PREFIX = 'guest';
73
73
  const STORAGE_KEY = 'likesToken';
@@ -185,103 +185,45 @@
185
185
  };
186
186
  }
187
187
 
188
- const getGeolocation = async () => new Promise((resolve) => navigator.geolocation.getCurrentPosition(({ coords }) => resolve(coords)));
189
-
190
- function DaDataAPI(baseURL = '') {
191
- async function getFetcherAddress() {
192
- if (!('geolocation' in navigator)) {
193
- return null;
194
- }
195
- try {
196
- const coords = await getGeolocation();
197
- const response = await fetch(`${baseURL}/geolocate`, {
198
- method: 'POST',
199
- mode: 'cors',
200
- body: JSON.stringify({
201
- lat: coords.latitude,
202
- lon: coords.longitude,
203
- count: 1,
204
- }),
205
- });
206
- const data = (await response.json());
207
- return data?.suggestions?.[0]?.data?.city;
208
- }
209
- catch (e) {
210
- console.error(e);
211
- return null;
212
- }
213
- }
214
- return {
215
- getFetcherAddress,
216
- };
217
- }
218
-
219
- const ContentPageHead = JSX(({ HeadComponent, data, children }) => {
220
- const { title, description, keywords, robots, og } = data;
221
- return (jsxs(HeadComponent, { children: [jsx("title", { children: title }), jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), description && jsx("meta", { name: "description", content: description }), keywords && jsx("meta", { name: "keywords", content: keywords.join(',') }), robots && jsx("meta", { name: "robots", content: robots.join(',') }), og
222
- ? Object.entries(og).map(([key, value]) => (jsx("meta", { name: `og:${key}`, content: value }, key)))
223
- : null, children] }));
224
- });
225
-
226
- const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
227
- const renderLikeIcon = () => {
228
- const params = {
229
- stroke: '#292D32',
230
- strokeLinecap: 'round',
231
- strokeLinejoin: 'round',
232
- strokeWidth: '1.5',
188
+ const projectSettings = new (class {
189
+ _ = {
190
+ PROD_BRANCH: 'master',
191
+ FORCED_DRAFT_FLOW: false,
233
192
  };
234
- return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("path", { ...params, strokeMiterlimit: "10", d: "M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77" }), jsx("path", { ...params, d: "M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z" })] }));
235
- };
236
-
237
- const LikeControl = JSX(({ className, context }) => {
238
- const likeService = context.useLikeService();
239
- return (jsxs("div", { className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, children: [jsx(LikeButton, { onClick: likeService.like, ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u043B\u0430\u0439\u043A\u00BB" }), jsx(LikeButton, { onClick: likeService.dislike, className: "rotate-180", ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u0434\u0438\u0437\u043B\u0430\u0439\u043A\u00BB" }), jsx("span", { className: "select-none", children: likeService.likeCount })] }));
240
- });
241
-
242
- const listStyleMap = {
243
- primary: 'bg-primary-main',
244
- secondary: 'bg-white',
245
- };
246
- const textStyleMap = {
247
- primary: 'text-primary-text',
248
- secondary: 'text-white',
249
- };
250
- const BlockItem = JSX(({ className, text, children, version = 'primary' }) => {
251
- return (jsxs("div", { className: `inline-block flex ${className || ''}`, role: "listitem", children: [jsx("div", { className: `inline-block w-[8px] h-[8px] min-w-[8px] min-h-[8px] rounded-full mt-2 ${listStyleMap[version]}` }), jsx("span", { className: `text-base font-normal font-sans mx-3 ${textStyleMap[version]}`, children: text || children })] }));
252
- });
193
+ setup(_) {
194
+ this._ = _;
195
+ }
196
+ get TEST_BRANCH() {
197
+ return this._.TEST_BRANCH;
198
+ }
199
+ get RC_BRANCH() {
200
+ return this._.RC_BRANCH;
201
+ }
202
+ get PROD_BRANCH() {
203
+ return this._.PROD_BRANCH;
204
+ }
205
+ get FORCED_DRAFT_FLOW() {
206
+ return this._.FORCED_DRAFT_FLOW;
207
+ }
208
+ get ENABLE_ASSIST() {
209
+ return this._.ENABLE_ASSIST;
210
+ }
211
+ get SITEMAP() {
212
+ return this._.SITEMAP;
213
+ }
214
+ get CDN() {
215
+ return this._.CDN;
216
+ }
217
+ })();
253
218
 
254
- const buttonStyleMap = {
255
- primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
256
- secondary: 'text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active',
257
- };
258
- const buttonDisabledStyleMap = {
259
- primary: 'bg-secondary-dark text-secondary-text',
260
- secondary: 'bg-secondary-light text-secondary-text',
261
- };
262
- const styleButton = 'inline-block text-center font-sans select-none';
263
- const Button = JSX(({ className, text, aboveText, appendLeft, href, target, onClick, children, disabled, rounded, version = 'none', ariaLabel, ...rest }) => {
264
- const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded }));
265
- if (disabled) {
266
- return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `${styleButton} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: buttonInner }));
219
+ const Icon = JSX(({ className, name, alt = `Icon ${name}`, title = alt, asSVG, ...imgProps }) => {
220
+ const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
221
+ if (asSVG) {
222
+ return (jsxs("svg", { className: className, ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { href: `${href}#icon`, xlinkHref: `${href}#icon` })] }));
267
223
  }
268
- return (jsx("a", { className: `${styleButton} cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: !href ? 'button' : 'link', ...rest, children: buttonInner }));
269
- });
270
- const ButtonInner = JSX(({ text, aboveText, appendLeft, rounded }) => {
271
- const withoutText = !text && !aboveText && Boolean(appendLeft);
272
- const buttonInnerClasses = `flex items-center justify-center ${withoutText ? 'h-12 w-12 min-h-12 min-w-12' : `px-8 gap-2 ${aboveText ? 'py-2' : 'py-[13px]'}`} ${rounded ? 'rounded-full' : ''}`;
273
- return (jsxs("div", { className: buttonInnerClasses, children: [appendLeft ? appendLeft : null, !withoutText ? (jsxs("div", { children: [jsx("div", { className: "text-xxs text-left", children: aboveText }), jsx("div", { className: "text-sm font-medium text-left", children: text })] })) : null] }));
224
+ return (jsx("img", { className: className, src: href, alt: alt, title: title, ...imgProps, "aria-hidden": "true" }));
274
225
  });
275
226
 
276
- const Icon = JSX(({ className, name, alt = `Icon ${name}`, title = alt, ...imgProps }) => (jsxs("svg", { className: className, ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { href: `${projectSettings.CDN || ''}icons/${name}.svg#icon`, xlinkHref: `${projectSettings.CDN || ''}icons/${name}.svg#icon` })] })));
277
-
278
- const Img = JSX(({ className, image }) => (jsxs("picture", { className: `${className || ''}`, children: [image.sources?.length
279
- ? image.sources.map(({ src, format }, index) => (jsx("source", { srcSet: src, type: formatToMimeType(format) }, `${index}_${src}`)))
280
- : null, jsx("img", { src: image.src, alt: image.alt || image.title, title: image.title, ...image?.size })] })));
281
- function formatToMimeType(format) {
282
- return format ? `image/${String(format)}` : undefined;
283
- }
284
-
285
227
  var SizeTableClass;
286
228
  (function (SizeTableClass) {
287
229
  SizeTableClass["XL"] = "text-title-lg";
@@ -296,6 +238,13 @@
296
238
  });
297
239
  const getClasses = (...classes) => classes.filter(Boolean).join(' ');
298
240
 
241
+ const BenefitsBlock = JSX(({ className, title, benefits }) => {
242
+ return (jsxs("section", { className: `font-sans text-primary-text bg-white p-12 pb-2 flex flex-col items-center ${className || ''}`, children: [title ? jsx(Title, { className: "font-medium m-0 max-w-[47rem] text-center", children: title }) : null, benefits?.length ? (jsx("div", { className: "grid grid-cols-2 gap-5 mt-9", children: benefits.map(renderStep) })) : null] }));
243
+ });
244
+ const renderStep = (benefit, i) => {
245
+ 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)));
246
+ };
247
+
299
248
  const MOBILE_URL_PATH = '/mobile';
300
249
  const isURL = (href) => href?.includes('//');
301
250
  const isHrefActive = (href, router, cmp = (href, baseHref) => href === baseHref) => {
@@ -359,6 +308,47 @@
359
308
  };
360
309
  }
361
310
 
311
+ const listStyleMap = {
312
+ primary: 'bg-primary-main',
313
+ secondary: 'bg-white',
314
+ };
315
+ const textStyleMap = {
316
+ primary: 'text-primary-text',
317
+ secondary: 'text-white',
318
+ };
319
+ const BlockItem = JSX(({ className, text, children, version = 'primary' }) => {
320
+ return (jsxs("div", { className: `inline-block flex ${className || ''}`, role: "listitem", children: [jsx("div", { className: `inline-block w-[8px] h-[8px] min-w-[8px] min-h-[8px] rounded-full mt-2 ${listStyleMap[version]}` }), jsx("span", { className: `text-base font-normal font-sans mx-3 ${textStyleMap[version]}`, children: text || children })] }));
321
+ });
322
+
323
+ const buttonStyleMap = {
324
+ primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
325
+ secondary: 'text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active',
326
+ };
327
+ const buttonDisabledStyleMap = {
328
+ primary: 'bg-secondary-dark text-secondary-text',
329
+ secondary: 'bg-secondary-light text-secondary-text',
330
+ };
331
+ const styleButton = 'inline-block text-center font-sans select-none';
332
+ const Button = JSX(({ className, text, aboveText, appendLeft, href, target, onClick, children, disabled, rounded, version = 'none', ariaLabel, ...rest }) => {
333
+ const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded }));
334
+ if (disabled) {
335
+ return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `${styleButton} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: buttonInner }));
336
+ }
337
+ return (jsx("a", { className: `${styleButton} cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: !href ? 'button' : 'link', ...rest, children: buttonInner }));
338
+ });
339
+ const ButtonInner = JSX(({ text, aboveText, appendLeft, rounded }) => {
340
+ const withoutText = !text && !aboveText && Boolean(appendLeft);
341
+ const buttonInnerClasses = `flex items-center justify-center ${withoutText ? 'h-12 w-12 min-h-12 min-w-12' : `px-8 gap-2 ${aboveText ? 'py-2' : 'py-[13px]'}`} ${rounded ? 'rounded-full' : ''}`;
342
+ return (jsxs("div", { className: buttonInnerClasses, children: [appendLeft ? appendLeft : null, !withoutText ? (jsxs("div", { children: [jsx("div", { className: "text-xxs text-left", children: aboveText }), jsx("div", { className: "text-sm font-medium text-left", children: text })] })) : null] }));
343
+ });
344
+
345
+ const Img = JSX(({ className, image }) => (jsxs("picture", { className: `${className || ''}`, children: [image.sources?.length
346
+ ? image.sources.map(({ src, format }, index) => (jsx("source", { srcSet: src, type: formatToMimeType(format) }, `${index}_${src}`)))
347
+ : null, jsx("img", { src: image.src, alt: image.alt || image.title, title: image.title, ...image?.size })] })));
348
+ function formatToMimeType(format) {
349
+ return format ? `image/${String(format)}` : undefined;
350
+ }
351
+
362
352
  const getColSpan = (className) => {
363
353
  const colSpanPrefix = 'col-span-';
364
354
  const colSpanStr = className.split(/\s+/).find((_) => _.startsWith(colSpanPrefix));
@@ -415,66 +405,6 @@
415
405
  }
416
406
  }
417
407
 
418
- const GOLDEN_RATIO = 1.618;
419
- const Placeholder = JSX(({ className, context, title }) => {
420
- return (jsx(Tile, { className: className, context: context, title: title, description: "\u0411\u043B\u043E\u043A \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u043A\u0435...", children: jsx("figure", { className: "m-0 min-w-[600px]", children: renderShimmer() }) }));
421
- });
422
- const renderShimmer = (size = 3) => goldenSequence(100, size)
423
- .map((_) => Math.floor(_))
424
- .map(renderShimmerItem);
425
- const renderShimmerItem = (width = 100, index) => (jsx("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
426
- const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
427
-
428
- const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
429
- const ContentPage = JSX(({ className, context, blocksRegistry, data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
430
- 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 }) }))] }));
431
- function renderBlock(block, i) {
432
- const { type } = block;
433
- if (!(type in blocksRegistry)) {
434
- console.warn(`No block with "${type}" is registered`);
435
- }
436
- const BlockComponent = blocksRegistry[type] || Placeholder;
437
- return blockDecorator({
438
- blockClassName: style2className(block.style),
439
- block,
440
- render: (props) => {
441
- const { version, content, blocks } = props.block;
442
- return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, ...content, children: blocks?.length ? blocks.map(renderBlock) : null }, `${type}-${i}`));
443
- },
444
- }, `block-${i}`);
445
- }
446
- });
447
- function style2className(style) {
448
- return style ? style.join(' ') : '';
449
- }
450
-
451
- function toMobilePage(contentPage) {
452
- const blocks = contentPage.blocks?.filter(({ mobile }) => !mobile?.hidden).map(toMobileBlock);
453
- return {
454
- ...contentPage,
455
- blocks,
456
- };
457
- }
458
- function toMobileBlock(block) {
459
- const { mobile } = block;
460
- if (mobile) {
461
- return {
462
- ...block,
463
- style: mobile.style?.length ? mobile.style : block.style,
464
- };
465
- }
466
- else {
467
- return block;
468
- }
469
- }
470
-
471
- const BenefitsBlock = JSX(({ className, title, benefits }) => {
472
- return (jsxs("section", { className: `font-sans text-primary-text bg-white p-12 pb-2 flex flex-col items-center ${className || ''}`, children: [jsx("h2", { className: "font-medium text-title m-0 max-w-[47rem] text-center", children: title }), benefits?.length ? (jsx("div", { className: "grid grid-cols-2 gap-5 mt-9", children: benefits.map(renderStep) })) : null] }));
473
- });
474
- const renderStep = (benefit, i) => {
475
- 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)));
476
- };
477
-
478
408
  const CBR_EXCHANGE_RATE_URL = 'https://www.cbr-xml-daily.ru/daily_json.js';
479
409
  const CURRENCY_CODES = ['USD', 'EUR'];
480
410
  const CURRENCY_ICONS_MAP = {
@@ -540,7 +470,7 @@
540
470
  const { type, text, description } = item;
541
471
  return (jsxs("div", { className: "mb-4", children: [jsx("div", { children: renderText(type, text) }), jsx("div", { className: "font-sans text-sm text-secondary-text", children: description })] }, String(index)));
542
472
  };
543
- const renderText = (type, text) => {
473
+ const renderText = (type, text = '') => {
544
474
  switch (type) {
545
475
  case 'tel':
546
476
  return (jsx("a", { className: "font-sans font-medium text-xl text-primary-text no-underline", href: `tel:${formatTel(text)}`, children: text }));
@@ -559,13 +489,6 @@
559
489
  });
560
490
  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}` })));
561
491
 
562
- const cmp = (a) => (b) => a?.href === b?.href;
563
- const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
564
- const subtract = (minuend, subtrahend) => (minuend || []).filter((_) => !subtrahend?.find(cmp(_)));
565
- function mergeTopItems(left, right) {
566
- return substitute(left, right).concat(subtract(right, left));
567
- }
568
-
569
492
  function useSitemap(useAsyncData) {
570
493
  const { data } = useAsyncData(sitemapURL(), fetchSitemap);
571
494
  return data || {};
@@ -578,6 +501,13 @@
578
501
  return `/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`;
579
502
  }
580
503
 
504
+ const cmp = (a) => (b) => a?.href === b?.href;
505
+ const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
506
+ const subtract = (minuend, subtrahend) => (minuend || []).filter((_) => !subtrahend?.find(cmp(_)));
507
+ function mergeTopItems(left, right) {
508
+ return substitute(left, right).concat(subtract(right, left));
509
+ }
510
+
581
511
  const Sitemap = JSX(({ className, items, context }) => {
582
512
  const sitemap = useSitemap(context.useAsyncData);
583
513
  const mergedItems = mergeTopItems(sitemap.topItems, items);
@@ -613,7 +543,7 @@
613
543
  const { icon, label, width, height } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
614
544
  if (!icon)
615
545
  return null;
616
- 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, className: "[&>*]:fill-primary-text [&>*]:hover:fill-primary-main" }) }));
546
+ 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 }) }));
617
547
  });
618
548
 
619
549
  const TextInformation = JSX(({ className, links, context }) => {
@@ -697,11 +627,11 @@
697
627
  return (jsx("a", { className: `inline-block border border-solid bg-transparent text-center no-underline ${flat ? '' : 'px-4 py-2'} ${linkStyle} ${className || ''}`, href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": ariaLabel, children: jsx("span", { className: `font-sans font-normal text-sm ${textStyle}`, children: text || children }) }));
698
628
  });
699
629
 
700
- const HeaderSecondaryMenuButton = JSX(({ className, children, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 p-0 w-[24px] flex items-center bg-inherit cursor-pointer ${className || ''}`, disabled: true, "aria-label": ariaLabel, children: children })));
630
+ const HeaderSecondaryMenuButton = JSX(({ className, children, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${className || ''}`, disabled: true, "aria-label": ariaLabel, children: children })));
701
631
 
702
632
  const HeaderSecondaryMenu = JSX(({ context, className, defaultLocation = '' }) => {
703
633
  const [city, getCity] = context.useGeolocation(defaultLocation);
704
- return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity }), jsx(TopItem, { className: "mr-7", flat: true, href: "#", text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432" }), jsx(HeaderSecondaryMenuButton, { className: "mr-5 text-primary-text hover:text-primary-main", ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(Icon, { name: "LoupeIcon", "aria-hidden": "true" }) }), jsx(HeaderSecondaryMenuButton, { className: "mr-5 text-primary-text hover:text-primary-main", ariaLabel: "\u041F\u0440\u043E\u0444\u0438\u043B\u044C", children: jsx(Icon, { name: "ProfileIcon", "aria-hidden": "true" }) }), jsx(HeaderSecondaryMenuButton, { className: "mr-5 text-secondary-light hover:text-primary-main min-w-[32px] min-h-[32px]", ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: jsx(Icon, { name: "GridIcon", "aria-hidden": "true", className: "[&>*]:fill-secondary-light [&>*]:hover:fill-primary-main" }) })] }));
634
+ return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity }), jsx(TopItem, { className: "mr-7", flat: true, href: "#", text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432" }), jsx(HeaderSecondaryMenuButton, { className: "mr-5 text-primary-text hover:text-primary-main", ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(Icon, { name: "LoupeIcon", "aria-hidden": "true", className: "h-full", asSVG: true }) }), jsx(HeaderSecondaryMenuButton, { className: "mr-5 text-primary-text hover:text-primary-main", ariaLabel: "\u041F\u0440\u043E\u0444\u0438\u043B\u044C", children: jsx(Icon, { name: "ProfileIcon", "aria-hidden": "true", className: "h-full", asSVG: true }) }), jsx(HeaderSecondaryMenuButton, { className: "min-w-[32px] min-h-[32px] fill-secondary-light hover:fill-secondary-hover", ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: jsx(Icon, { name: "GridIcon", "aria-hidden": "true", className: "h-full", asSVG: true }) })] }));
705
635
  });
706
636
 
707
637
  function isSubItemActive(router) {
@@ -731,6 +661,16 @@
731
661
  return (jsx(Tile, { className: className, context: context, title: title, buttons: buttons, children: jsxs("div", { className: "flex items-center", children: [qr?.src && qr?.href && (jsx("a", { href: qr.href, target: "_blank", children: jsx("img", { src: qr.src, alt: title, title: title, width: "164", height: "164", className: "w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light" }) })), jsx("span", { className: "font-normal text-sm text-secondary-text ml-4", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }) }));
732
662
  });
733
663
 
664
+ const GOLDEN_RATIO = 1.618;
665
+ const Placeholder = JSX(({ className, context, title }) => {
666
+ return (jsx(Tile, { className: className, context: context, title: title, description: "\u0411\u043B\u043E\u043A \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u043A\u0435...", children: jsx("figure", { className: "m-0 min-w-[600px]", children: renderShimmer() }) }));
667
+ });
668
+ const renderShimmer = (size = 3) => goldenSequence(100, size)
669
+ .map((_) => Math.floor(_))
670
+ .map(renderShimmerItem);
671
+ const renderShimmerItem = (width = 100, index) => (jsx("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
672
+ const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
673
+
734
674
  const ProductBlockInner = JSX(({ className, context, title, titleSize, description, benefits, buttons, image, items }) => {
735
675
  return (jsxs("div", { className: `flex grow justify-between items-stretch ${className || ''}`, children: [jsxs("div", { className: 'flex flex-col', children: [title && (
736
676
  /* TODO Why <Title> is duplicated here? */
@@ -913,15 +853,14 @@
913
853
  : `${contentBlock.scrollHeight}px`;
914
854
  };
915
855
  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
916
- ${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(renderComponent) : null })) : null] }));
856
+ ${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] }));
917
857
  });
918
- // TODO: draft, for dynamic rendering of components
919
- const renderComponent = (block, i) => {
920
- if (block.type && block.data && !AccordionBlocks.hasOwnProperty(block.type)) {
858
+ const renderBlock = (block, i, context) => {
859
+ if (!block.type || !block.data || !AccordionBlocks.hasOwnProperty(block.type)) {
921
860
  return null;
922
861
  }
923
- const AccordionBlock = block.type && AccordionBlocks[block.type];
924
- return (jsx("div", { className: "mb-5 last:mb-0", children: jsx(AccordionBlock, { ...block.data }) }, `component${i}`));
862
+ const AccordionBlock = AccordionBlocks[block.type];
863
+ return (jsx("div", { className: "mb-5 last:mb-0", children: jsx(AccordionBlock, { context: context, ...block.data }) }, `block_${i}`));
925
864
  };
926
865
  const getContentBlock = (e) => e.target.tagName === 'BUTTON' ? e.target.nextSibling : e.target.parentNode.nextSibling;
927
866
 
@@ -1092,6 +1031,72 @@
1092
1031
  CreditCalculator,
1093
1032
  };
1094
1033
 
1034
+ const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
1035
+ const renderLikeIcon = () => {
1036
+ const params = {
1037
+ stroke: '#292D32',
1038
+ strokeLinecap: 'round',
1039
+ strokeLinejoin: 'round',
1040
+ strokeWidth: '1.5',
1041
+ };
1042
+ return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("path", { ...params, strokeMiterlimit: "10", d: "M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77" }), jsx("path", { ...params, d: "M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z" })] }));
1043
+ };
1044
+
1045
+ const LikeControl = JSX(({ className, context }) => {
1046
+ const likeService = context.useLikeService();
1047
+ return (jsxs("div", { className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, children: [jsx(LikeButton, { onClick: likeService.like, ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u043B\u0430\u0439\u043A\u00BB" }), jsx(LikeButton, { onClick: likeService.dislike, className: "rotate-180", ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u0434\u0438\u0437\u043B\u0430\u0439\u043A\u00BB" }), jsx("span", { className: "select-none", children: likeService.likeCount })] }));
1048
+ });
1049
+
1050
+ const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
1051
+ const ContentPage = JSX(({ className, context, blocksRegistry, data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
1052
+ 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 }) }))] }));
1053
+ function renderBlock(block, i) {
1054
+ const { type } = block;
1055
+ if (!(type in blocksRegistry)) {
1056
+ console.warn(`No block with "${type}" is registered`);
1057
+ }
1058
+ const BlockComponent = blocksRegistry[type] || Placeholder;
1059
+ return blockDecorator({
1060
+ blockClassName: style2className(block.style),
1061
+ block,
1062
+ render: (props) => {
1063
+ const { version, content, blocks } = props.block;
1064
+ return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, ...content, children: blocks?.length ? blocks.map(renderBlock) : null }, `${type}-${i}`));
1065
+ },
1066
+ }, `block-${i}`);
1067
+ }
1068
+ });
1069
+ function style2className(style) {
1070
+ return style ? style.join(' ') : '';
1071
+ }
1072
+
1073
+ const ContentPageHead = JSX(({ HeadComponent, data, children }) => {
1074
+ const { title, description, keywords, robots, og } = data;
1075
+ return (jsxs(HeadComponent, { children: [jsx("title", { children: title }), jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), description && jsx("meta", { name: "description", content: description }), keywords && jsx("meta", { name: "keywords", content: keywords.join(',') }), robots && jsx("meta", { name: "robots", content: robots.join(',') }), og
1076
+ ? Object.entries(og).map(([key, value]) => (jsx("meta", { name: `og:${key}`, content: value }, key)))
1077
+ : null, children] }));
1078
+ });
1079
+
1080
+ function toMobilePage(contentPage) {
1081
+ const blocks = contentPage.blocks?.filter(({ mobile }) => !mobile?.hidden).map(toMobileBlock);
1082
+ return {
1083
+ ...contentPage,
1084
+ blocks,
1085
+ };
1086
+ }
1087
+ function toMobileBlock(block) {
1088
+ const { mobile } = block;
1089
+ if (mobile) {
1090
+ return {
1091
+ ...block,
1092
+ style: mobile.style?.length ? mobile.style : block.style,
1093
+ };
1094
+ }
1095
+ else {
1096
+ return block;
1097
+ }
1098
+ }
1099
+
1095
1100
  const Footer = JSX(({ className, context }) => (jsx("footer", { className: `${className} px-9 py-2 bg-white rounded-bl-3xl rounded-br-3xl`, children: jsx(TextInformation, { context: context }) })));
1096
1101
 
1097
1102
  const Gallery = JSX(({ title, description, cards = [], className }) => {