@redneckz/wildless-cms-uni-blocks 0.3.20 → 0.3.21

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 (224) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +51 -11
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/cosmos-static/icons/ArrowDownIcon.svg +1 -0
  5. package/cosmos-static/icons/ArrowUpIcon.svg +1 -0
  6. package/dist/components/Accordion/AccordionContent.d.ts +2 -72
  7. package/dist/components/Accordion/AccordionItem.js +2 -2
  8. package/dist/components/Accordion/AccordionItem.js.map +1 -1
  9. package/dist/components/Accordion/AccordionItem.mobile.js +2 -2
  10. package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
  11. package/dist/components/Accordion/AccordionItemInner.js +3 -11
  12. package/dist/components/Accordion/AccordionItemInner.js.map +1 -1
  13. package/dist/components/Accordion/AccordionItemInner.mobile.js +4 -10
  14. package/dist/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
  15. package/{lib/components/Accordion/utils/isActiveHandler.d.ts → dist/components/Accordion/utils/useActiveHandler.d.ts} +1 -1
  16. package/{mobile/dist/components/Accordion/utils/isActiveHandler.js → dist/components/Accordion/utils/useActiveHandler.js} +4 -4
  17. package/dist/components/Accordion/utils/useActiveHandler.js.map +1 -0
  18. package/dist/components/Blocks.d.ts +1 -0
  19. package/dist/components/Blocks.js +2 -0
  20. package/dist/components/Blocks.js.map +1 -1
  21. package/dist/components/OtherProducts/OtherProducts.d.ts +5 -0
  22. package/dist/components/OtherProducts/OtherProducts.js +9 -0
  23. package/dist/components/OtherProducts/OtherProducts.js.map +1 -0
  24. package/dist/components/OtherProducts/OtherProductsContent.d.ts +36 -0
  25. package/dist/components/OtherProducts/OtherProductsContent.js +2 -0
  26. package/dist/components/OtherProducts/OtherProductsContent.js.map +1 -0
  27. package/dist/components/OtherProducts/OtherProductsItem.d.ts +5 -0
  28. package/dist/components/OtherProducts/OtherProductsItem.js +16 -0
  29. package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -0
  30. package/dist/components/OtherProducts/OtherProductsItemInner.d.ts +2 -0
  31. package/dist/components/OtherProducts/OtherProductsItemInner.js +10 -0
  32. package/dist/components/OtherProducts/OtherProductsItemInner.js.map +1 -0
  33. package/dist/components/OtherProducts/utils/useActiveHandler.d.ts +9 -0
  34. package/dist/components/OtherProducts/utils/useActiveHandler.js +21 -0
  35. package/dist/components/OtherProducts/utils/useActiveHandler.js.map +1 -0
  36. package/dist/icons/IconName.d.ts +4 -2
  37. package/dist/icons/IconName.js +3 -0
  38. package/dist/icons/IconName.js.map +1 -1
  39. package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +71 -0
  40. package/dist/ui-kit/BlocksList/BlocksListProps.js +2 -0
  41. package/dist/ui-kit/BlocksList/BlocksListProps.js.map +1 -0
  42. package/dist/ui-kit/BlocksList/EmbeddableBlocks.d.ts +12 -0
  43. package/dist/ui-kit/BlocksList/EmbeddableBlocks.js +25 -0
  44. package/dist/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -0
  45. package/dist/ui-kit/BlocksList/renderBlocksList.d.ts +11 -0
  46. package/dist/ui-kit/BlocksList/renderBlocksList.js +17 -0
  47. package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
  48. package/lib/common.css +1 -1
  49. package/lib/components/Accordion/Accordion.fixture.d.ts +0 -1
  50. package/lib/components/Accordion/AccordionContent.d.ts +2 -72
  51. package/lib/components/Accordion/AccordionItem.js +2 -2
  52. package/lib/components/Accordion/AccordionItem.js.map +1 -1
  53. package/lib/components/Accordion/AccordionItem.mobile.js +2 -2
  54. package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
  55. package/lib/components/Accordion/AccordionItemInner.js +3 -11
  56. package/lib/components/Accordion/AccordionItemInner.js.map +1 -1
  57. package/lib/components/Accordion/AccordionItemInner.mobile.js +4 -10
  58. package/lib/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
  59. package/{mobile/dist/components/Accordion/utils/isActiveHandler.d.ts → lib/components/Accordion/utils/useActiveHandler.d.ts} +1 -1
  60. package/{mobile/lib/components/Accordion/utils/isActiveHandler.js → lib/components/Accordion/utils/useActiveHandler.js} +2 -2
  61. package/lib/components/Accordion/utils/useActiveHandler.js.map +1 -0
  62. package/lib/components/BaseTile/getTileHeadingType.d.ts +1 -1
  63. package/lib/components/Blocks.d.ts +1 -0
  64. package/lib/components/Blocks.js +2 -0
  65. package/lib/components/Blocks.js.map +1 -1
  66. package/lib/components/OtherProducts/OtherProducts.d.ts +5 -0
  67. package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +5 -0
  68. package/lib/components/OtherProducts/OtherProducts.js +7 -0
  69. package/lib/components/OtherProducts/OtherProducts.js.map +1 -0
  70. package/lib/components/OtherProducts/OtherProductsContent.d.ts +36 -0
  71. package/lib/components/OtherProducts/OtherProductsContent.js +2 -0
  72. package/lib/components/OtherProducts/OtherProductsContent.js.map +1 -0
  73. package/lib/components/OtherProducts/OtherProductsItem.d.ts +5 -0
  74. package/lib/components/OtherProducts/OtherProductsItem.js +14 -0
  75. package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -0
  76. package/lib/components/OtherProducts/OtherProductsItemInner.d.ts +2 -0
  77. package/lib/components/OtherProducts/OtherProductsItemInner.js +8 -0
  78. package/lib/components/OtherProducts/OtherProductsItemInner.js.map +1 -0
  79. package/lib/components/OtherProducts/utils/useActiveHandler.d.ts +9 -0
  80. package/lib/components/OtherProducts/utils/useActiveHandler.js +18 -0
  81. package/lib/components/OtherProducts/utils/useActiveHandler.js.map +1 -0
  82. package/lib/icons/IconName.d.ts +4 -2
  83. package/lib/icons/IconName.js +3 -0
  84. package/lib/icons/IconName.js.map +1 -1
  85. package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +71 -0
  86. package/lib/ui-kit/BlocksList/BlocksListProps.js +2 -0
  87. package/lib/ui-kit/BlocksList/BlocksListProps.js.map +1 -0
  88. package/lib/ui-kit/BlocksList/EmbeddableBlocks.d.ts +12 -0
  89. package/lib/ui-kit/BlocksList/EmbeddableBlocks.js +23 -0
  90. package/lib/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -0
  91. package/lib/ui-kit/BlocksList/renderBlocksList.d.ts +11 -0
  92. package/lib/ui-kit/BlocksList/renderBlocksList.js +13 -0
  93. package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
  94. package/mobile/bundle/bundle.umd.js +16 -11
  95. package/mobile/bundle/bundle.umd.min.js +1 -1
  96. package/mobile/dist/components/Accordion/AccordionContent.d.ts +2 -72
  97. package/mobile/dist/components/Accordion/AccordionItem.js +2 -2
  98. package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
  99. package/mobile/dist/components/Accordion/AccordionItemInner.js +4 -10
  100. package/mobile/dist/components/Accordion/AccordionItemInner.js.map +1 -1
  101. package/mobile/{lib/components/Accordion/utils/isActiveHandler.d.ts → dist/components/Accordion/utils/useActiveHandler.d.ts} +1 -1
  102. package/{dist/components/Accordion/utils/isActiveHandler.js → mobile/dist/components/Accordion/utils/useActiveHandler.js} +4 -4
  103. package/mobile/dist/components/Accordion/utils/useActiveHandler.js.map +1 -0
  104. package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +5 -0
  105. package/mobile/dist/components/OtherProducts/OtherProducts.js +9 -0
  106. package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -0
  107. package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +36 -0
  108. package/mobile/dist/components/OtherProducts/OtherProductsContent.js +2 -0
  109. package/mobile/dist/components/OtherProducts/OtherProductsContent.js.map +1 -0
  110. package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +5 -0
  111. package/mobile/dist/components/OtherProducts/OtherProductsItem.js +16 -0
  112. package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -0
  113. package/mobile/dist/components/OtherProducts/OtherProductsItemInner.d.ts +2 -0
  114. package/mobile/dist/components/OtherProducts/OtherProductsItemInner.js +10 -0
  115. package/mobile/dist/components/OtherProducts/OtherProductsItemInner.js.map +1 -0
  116. package/mobile/dist/components/OtherProducts/utils/useActiveHandler.d.ts +9 -0
  117. package/mobile/dist/components/OtherProducts/utils/useActiveHandler.js +21 -0
  118. package/mobile/dist/components/OtherProducts/utils/useActiveHandler.js.map +1 -0
  119. package/mobile/dist/icons/IconName.d.ts +4 -2
  120. package/mobile/dist/icons/IconName.js +3 -0
  121. package/mobile/dist/icons/IconName.js.map +1 -1
  122. package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +71 -0
  123. package/mobile/dist/ui-kit/BlocksList/BlocksListProps.js +2 -0
  124. package/mobile/dist/ui-kit/BlocksList/BlocksListProps.js.map +1 -0
  125. package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.d.ts +12 -0
  126. package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.js +25 -0
  127. package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -0
  128. package/mobile/dist/ui-kit/BlocksList/renderBlocksList.d.ts +11 -0
  129. package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +17 -0
  130. package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
  131. package/mobile/lib/components/Accordion/AccordionContent.d.ts +2 -72
  132. package/mobile/lib/components/Accordion/AccordionItem.js +2 -2
  133. package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
  134. package/mobile/lib/components/Accordion/AccordionItemInner.js +4 -10
  135. package/mobile/lib/components/Accordion/AccordionItemInner.js.map +1 -1
  136. package/{dist/components/Accordion/utils/isActiveHandler.d.ts → mobile/lib/components/Accordion/utils/useActiveHandler.d.ts} +1 -1
  137. package/{lib/components/Accordion/utils/isActiveHandler.js → mobile/lib/components/Accordion/utils/useActiveHandler.js} +2 -2
  138. package/mobile/lib/components/Accordion/utils/useActiveHandler.js.map +1 -0
  139. package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +5 -0
  140. package/mobile/lib/components/OtherProducts/OtherProducts.js +7 -0
  141. package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -0
  142. package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +36 -0
  143. package/mobile/lib/components/OtherProducts/OtherProductsContent.js +2 -0
  144. package/mobile/lib/components/OtherProducts/OtherProductsContent.js.map +1 -0
  145. package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +5 -0
  146. package/mobile/lib/components/OtherProducts/OtherProductsItem.js +14 -0
  147. package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -0
  148. package/mobile/lib/components/OtherProducts/OtherProductsItemInner.d.ts +2 -0
  149. package/mobile/lib/components/OtherProducts/OtherProductsItemInner.js +8 -0
  150. package/mobile/lib/components/OtherProducts/OtherProductsItemInner.js.map +1 -0
  151. package/mobile/lib/components/OtherProducts/utils/useActiveHandler.d.ts +9 -0
  152. package/mobile/lib/components/OtherProducts/utils/useActiveHandler.js +18 -0
  153. package/mobile/lib/components/OtherProducts/utils/useActiveHandler.js.map +1 -0
  154. package/mobile/lib/icons/IconName.d.ts +4 -2
  155. package/mobile/lib/icons/IconName.js +3 -0
  156. package/mobile/lib/icons/IconName.js.map +1 -1
  157. package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +71 -0
  158. package/mobile/lib/ui-kit/BlocksList/BlocksListProps.js +2 -0
  159. package/mobile/lib/ui-kit/BlocksList/BlocksListProps.js.map +1 -0
  160. package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.d.ts +12 -0
  161. package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.js +23 -0
  162. package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -0
  163. package/mobile/lib/ui-kit/BlocksList/renderBlocksList.d.ts +11 -0
  164. package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +13 -0
  165. package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
  166. package/mobile/src/components/Accordion/Accordion.example.json +6 -6
  167. package/mobile/src/components/Accordion/AccordionContent.ts +2 -108
  168. package/mobile/src/components/Accordion/AccordionItem.tsx +2 -2
  169. package/mobile/src/components/Accordion/AccordionItemInner.tsx +4 -19
  170. package/mobile/src/components/Accordion/utils/{isActiveHandler.ts → useActiveHandler.ts} +1 -1
  171. package/mobile/src/components/OtherProducts/OtherProducts.example.json +50 -0
  172. package/mobile/src/components/OtherProducts/OtherProducts.tsx +20 -0
  173. package/mobile/src/components/OtherProducts/OtherProductsContent.ts +38 -0
  174. package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +36 -0
  175. package/mobile/src/components/OtherProducts/OtherProductsItemInner.tsx +14 -0
  176. package/mobile/src/components/OtherProducts/utils/useActiveHandler.ts +23 -0
  177. package/mobile/src/icons/ArrowDownIcon.svg +4 -0
  178. package/mobile/src/icons/ArrowUpIcon.svg +4 -0
  179. package/mobile/src/icons/IconName.ts +4 -3
  180. package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +106 -0
  181. package/mobile/src/ui-kit/BlocksList/EmbeddableBlocks.tsx +23 -0
  182. package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +30 -0
  183. package/package.json +1 -1
  184. package/src/components/Accordion/Accordion.example.json +6 -6
  185. package/src/components/Accordion/Accordion.fixture.mobile.tsx +13 -13
  186. package/src/components/Accordion/Accordion.fixture.tsx +28 -93
  187. package/src/components/Accordion/AccordionContent.ts +2 -108
  188. package/src/components/Accordion/AccordionItem.mobile.tsx +2 -2
  189. package/src/components/Accordion/AccordionItem.tsx +2 -2
  190. package/src/components/Accordion/AccordionItemInner.mobile.tsx +4 -19
  191. package/src/components/Accordion/AccordionItemInner.tsx +4 -25
  192. package/src/components/Accordion/utils/{isActiveHandler.ts → useActiveHandler.ts} +1 -1
  193. package/src/components/Blocks.ts +2 -0
  194. package/src/components/OtherProducts/OtherProducts.example.json +50 -0
  195. package/src/components/OtherProducts/OtherProducts.fixture.tsx +137 -0
  196. package/src/components/OtherProducts/OtherProducts.tsx +20 -0
  197. package/src/components/OtherProducts/OtherProductsContent.ts +38 -0
  198. package/src/components/OtherProducts/OtherProductsItem.tsx +36 -0
  199. package/src/components/OtherProducts/OtherProductsItemInner.tsx +14 -0
  200. package/src/components/OtherProducts/utils/useActiveHandler.ts +23 -0
  201. package/src/icons/ArrowDownIcon.svg +4 -0
  202. package/src/icons/ArrowUpIcon.svg +4 -0
  203. package/src/icons/IconName.ts +6 -1
  204. package/src/ui-kit/BlocksList/BlocksListProps.ts +106 -0
  205. package/src/ui-kit/BlocksList/EmbeddableBlocks.tsx +23 -0
  206. package/src/ui-kit/BlocksList/renderBlocksList.tsx +30 -0
  207. package/dist/components/Accordion/AccordionBlocks.d.ts +0 -12
  208. package/dist/components/Accordion/AccordionBlocks.js +0 -25
  209. package/dist/components/Accordion/AccordionBlocks.js.map +0 -1
  210. package/dist/components/Accordion/utils/isActiveHandler.js.map +0 -1
  211. package/lib/components/Accordion/AccordionBlocks.d.ts +0 -12
  212. package/lib/components/Accordion/AccordionBlocks.js +0 -23
  213. package/lib/components/Accordion/AccordionBlocks.js.map +0 -1
  214. package/lib/components/Accordion/utils/isActiveHandler.js.map +0 -1
  215. package/mobile/dist/components/Accordion/AccordionBlocks.d.ts +0 -12
  216. package/mobile/dist/components/Accordion/AccordionBlocks.js +0 -25
  217. package/mobile/dist/components/Accordion/AccordionBlocks.js.map +0 -1
  218. package/mobile/dist/components/Accordion/utils/isActiveHandler.js.map +0 -1
  219. package/mobile/lib/components/Accordion/AccordionBlocks.d.ts +0 -12
  220. package/mobile/lib/components/Accordion/AccordionBlocks.js +0 -23
  221. package/mobile/lib/components/Accordion/AccordionBlocks.js.map +0 -1
  222. package/mobile/lib/components/Accordion/utils/isActiveHandler.js.map +0 -1
  223. package/mobile/src/components/Accordion/AccordionBlocks.tsx +0 -23
  224. package/src/components/Accordion/AccordionBlocks.tsx +0 -23
@@ -0,0 +1,11 @@
1
+ import type { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
2
+ import type { BlockDef, ColumnsCount } from './BlocksListProps';
3
+ declare type EmbeddableBlocksProps = {
4
+ blocks?: BlockDef[];
5
+ context: ContentPageContext;
6
+ columns?: ColumnsCount;
7
+ className?: string;
8
+ };
9
+ export declare const renderBlocksList: ({ blocks, context, className, columns }: EmbeddableBlocksProps) => any[] | null;
10
+ export declare const renderBlock: ({ context, columns, className }: EmbeddableBlocksProps) => (block: BlockDef, i: number) => any;
11
+ export {};
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { EmbeddableBlocks } from './EmbeddableBlocks.js';
3
+ export const renderBlocksList = ({ blocks, context, className, columns }) => blocks?.length ? blocks.map(renderBlock({ context, className, columns })) : null;
4
+ export const renderBlock = ({ context, columns, className }) => (block, i) => {
5
+ const type = block?.blockListType;
6
+ if (!type || !(type in EmbeddableBlocks)) {
7
+ return null;
8
+ }
9
+ const columnsCountClass = columns === 2 ? 'w-1/2' : '';
10
+ const EmbeddedBlock = EmbeddableBlocks[type];
11
+ return (_jsx("div", { className: `${className} ${columnsCountClass}`, children: _jsx(EmbeddedBlock, { context: context, ...block, className: "!p-0" }) }, `block_${i}`));
12
+ };
13
+ //# sourceMappingURL=renderBlocksList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderBlocksList.js","sourceRoot":"","sources":["../../../src/ui-kit/BlocksList/renderBlocksList.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAStD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAyB,EAAE,EAAE,CACjG,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAEnF,MAAM,CAAC,MAAM,WAAW,GACtB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAyB,EAAE,EAAE,CAC3D,CAAC,KAAe,EAAE,CAAS,EAAE,EAAE;IAC7B,MAAM,IAAI,GAAG,KAAK,EAAE,aAAa,CAAC;IAClC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,gBAAgB,CAAC,EAAE;QACxC,OAAO,IAAI,CAAC;KACb;IACD,MAAM,iBAAiB,GAAG,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IACvD,MAAM,aAAa,GAAa,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACvD,OAAO,CACL,cAAK,SAAS,EAAE,GAAG,SAAS,IAAI,iBAAiB,EAAE,YACjD,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,KAAM,KAAK,EAAE,SAAS,EAAC,MAAM,GAAG,IADP,SAAS,CAAC,EAAE,CAEhE,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -877,7 +877,7 @@
877
877
  });
878
878
  };
879
879
 
880
- const AccordionBlocks = {
880
+ const EmbeddableBlocks = {
881
881
  Headline,
882
882
  LinkDocs,
883
883
  TextBlock,
@@ -890,19 +890,24 @@
890
890
  LinkList,
891
891
  };
892
892
 
893
- const AccordionItemInner = JSX(({ blocks, context }) => {
894
- return (jsx("div", { className: "transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0", children: blocks?.length ? blocks.map(renderBlock$1(context)) : null }));
895
- });
896
- const renderBlock$1 = (context) => (block, i) => {
897
- const type = block?.accordionBlockType;
898
- if (!type || !(type in AccordionBlocks)) {
893
+ const renderBlocksList = ({ blocks, context, className, columns }) => blocks?.length ? blocks.map(renderBlock$1({ context, className, columns })) : null;
894
+ const renderBlock$1 = ({ context, columns, className }) => (block, i) => {
895
+ const type = block?.blockListType;
896
+ if (!type || !(type in EmbeddableBlocks)) {
899
897
  return null;
900
898
  }
901
- const AccordionBlock = AccordionBlocks[type];
902
- return (jsx("div", { className: "mb-5 last:mb-0 first:mt-2", children: jsx(AccordionBlock, { context: context, ...block, className: "!p-0" }) }, `block_${i}`));
899
+ const columnsCountClass = columns === 2 ? 'w-1/2' : '';
900
+ const EmbeddedBlock = EmbeddableBlocks[type];
901
+ return (jsx("div", { className: `${className} ${columnsCountClass}`, children: jsx(EmbeddedBlock, { context: context, ...block, className: "!p-0" }) }, `block_${i}`));
903
902
  };
904
903
 
905
- const isActiveHandler = ({ context, blocks }) => {
904
+ const AccordionItemInner = JSX(({ blocks, context }) => {
905
+ const className = 'mb-5 last:mb-0 first:mt-2';
906
+ const columns = 1;
907
+ return (jsx("div", { className: "transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0", children: renderBlocksList({ context, className, columns, blocks }) }));
908
+ });
909
+
910
+ const useActiveHandler = ({ context, blocks }) => {
906
911
  const [isActive, setIsActive] = context.useState(false);
907
912
  const hasContent = blocks?.length;
908
913
  const icon = isActive ? 'MinusIcon' : 'PlusIcon';
@@ -921,7 +926,7 @@
921
926
  };
922
927
 
923
928
  const AccordionItem = JSX(({ label, blocks, bordered, context }) => {
924
- const { hasContent, icon, handleToggle } = isActiveHandler({
929
+ const { hasContent, icon, handleToggle } = useActiveHandler({
925
930
  context,
926
931
  blocks,
927
932
  });
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";const t=(e,n)=>{t._jsx=e,t._jsxs=n||e};t.vue=e=>{t(((t,{children:n,dangerouslySetInnerHTML:r,...i}={})=>{const a=Object.assign({},i,r?{innerHTML:r.__html}:{});return e(t,a,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),r=(...e)=>t._jsxs(...e),i=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:r,...i}=t||{},a=n?.slots?.default,l=r||a&&a();return e(Object.assign(i,l&&{children:l}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const a="likesToken";const l={h1:"text-m-title",h2:"text-m-title",h3:"text-m-title-md",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},s=i((e=>{const{className:t,headingType:r,title:i}=e;if(!r)return;return n(r,{className:`font-sans font-medium m-0 ${l[r]} ${t||""}`,children:i})})),c=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ENABLE_ASSIST(){return this._.ENABLE_ASSIST}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},o={none:"",primary:"text-primary-main"},m=i((({className:e="",name:t,alt:i=`Icon ${t}`,title:a=i,asSVG:l,color:s="primary",...m})=>{const d=`${c.CDN||""}icons/${t}.svg`;return l?r("svg",{className:`${o[s]} ${e}`,...m,"aria-hidden":"true",children:[a?n("title",{children:a}):null,i?n("desc",{children:i}):null,n("use",{href:`${d}#icon`,xlinkHref:`${d}#icon`})]}):n("img",{className:e,src:d,alt:i,title:a,...m,"aria-hidden":"true"})})),d=i((({className:e="",image:t,imageClassName:i})=>t?r("picture",{className:e,children:[t.sources?.length?t.sources.map((({src:e,format:t},r)=>n("source",{srcSet:e,type:x(t)},`${r}_${e}`))):null,h(t,i)]}):null)),h=(e,t="")=>{const r={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},i=e.title||"",a=e.alt||e.title;return n("img",{src:e.src,className:`m-auto ${t}`,alt:a,title:i,style:r,...e.size})};function x(e){return e?`image/${String(e)}`:void 0}const u={left:"text-left",center:"text-center",right:"text-right"},p={transparent:{background:"bg-transparent",text:"text-primary-text",description:"text-primary-text"},primary:{background:"bg-white",text:"text-primary-text",description:"text-primary-text"},secondary:{background:"bg-primary-main",text:"text-white",description:"text-white/80"}},g=i((({bgColorHeadline:e="transparent",className:t="",title:i,description:a,image:l,align:c="left"})=>{const o=p[e];return r("section",{className:`px-4 py-6 ${o.background} ${t}`,children:[i&&n(s,{headingType:"h2",className:`${o.text} ${u[c]}`,title:i}),a&&n("p",{className:`font-normal text-m-md ${o.description} ${u[c]} ${i?"mt-2.5":""}`,children:a}),l?.src&&n("div",{className:"mt-5 mx-auto flex justify-center",children:n(d,{image:l})})]})})),b=i((({children:e,activeIndex:t,indexFraction:r,showDots:i})=>{const a=e=>n=>{if(e===t)return;const r=n.currentTarget.parentElement?.previousElementSibling;r?.children[e]?.scrollIntoView({behavior:"smooth"})};return i&&e?.length?n("div",{className:"flex gap-2 mx-auto mt-5 w-fit",children:e?.map(((e,i)=>n("div",{onClick:a(i),className:"bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full",style:f(i,t,r),"aria-hidden":!0},String(i))))}):null})),f=(e,t,n)=>{if(e<t||e>t+1)return null;const r=1-n;return e===t?{opacity:""+(.3+.7*r),width:6+16*r+"px"}:{opacity:""+(.3+.7*n),width:6+16*n+"px"}},N=i((({className:e="",children:t,...r})=>n("div",{className:`snap-center snap-always min-w-full box-border ${e}`,role:"listitem",...r,children:t}))),y=e=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e}px`}),v=i((({className:e="",children:t,activeIndex:r,onScroll:i,gap:a=14,padding:l=16})=>n("div",{className:`overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...y(l),gap:`${a}px`},role:"list",onScroll:i,children:t?.length?t?.map(((e,t)=>n(N,{style:y(l/4),"aria-current":Boolean(r===t),children:e},String(t)))):n(N,{children:t})}))),w=i((({className:e,context:t,children:i,gap:a=14,padding:l=16,showDots:s=!0,onSlideChange:c})=>{const[o,m]=t.useState(0),[d,h]=t.useState(0),x={activeIndex:o,indexFraction:d,showDots:s,children:i};return r("div",{className:e,children:[n(v,{gap:a,padding:l,activeIndex:o,onScroll:e=>{const{scrollLeft:t,clientWidth:n,childElementCount:r,scrollWidth:i,children:s}=e.currentTarget,d=s[0].offsetWidth-l/2,x=(({gap:e,padding:t,clientWidth:n,scrollWidth:r,childElementCount:i,itemWidth:a})=>{const l=a+e,s=r-n,c=n-e-t,o=i-2,m=new Array(i).fill(0).map(((e,t)=>0===t||t===o?[t>0?s-c:0,t>0?s:c]:[(t-1)*l+c,t*l+c]));return m[i-1]=[s,r],m})({gap:a,padding:l,clientWidth:n,scrollWidth:i,childElementCount:r,itemWidth:d}),{index:u,fraction:p}=((e,t)=>{const n=t.findIndex((([t,n])=>t<=e&&e<n));if(n<0)return{index:n,fraction:0};const[r,i]=t[n];return{index:n,fraction:(e-r)/(i-r)}})(t,x);u!==o&&c&&c(),m(u),h(p)},children:i}),n(b,{...x})]})})),k=i((({className:e,iconClassName:t,textClassName:i,suffixClassName:a,doc:l,icon:s})=>{const{text:c,fileSize:o,...d}=l;return r("a",{className:e,role:"link",...d,children:[s?n(m,{className:t,name:s,width:"24px",height:"24px",asSVG:!0}):null,c?r("span",{className:i,children:[c,n("span",{className:a,children:d?.href&&$(C(d.href),o)})]}):null]})})),$=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),C=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},S=i((({className:e="",doc:t,icon:r})=>n(k,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:r}))),T=i((({context:e,hasBorder:t=!0,documents:r,icon:i})=>n(w,{context:e,className:"text-m-sm text-primary-main",children:r?.length?r.map(((e,r)=>n(S,{className:t?"rounded-md border-main-stroke border p-4":"",doc:e,icon:i},String(r)))):null}))),D=i((({hasBorder:e=!0,documents:t,icon:r})=>n("div",{className:"text-m-sm text-primary-main flex flex-col "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,i)=>n("div",{role:"listitem",children:n(S,{className:e?"rounded-md border-main-stroke border p-4":"",doc:t,icon:r})},String(i)))):null}))),j=i((({className:e="",context:t,title:i,subtitle:a,icon:l="DocIconMonoColor",documents:c,listMode:o="vertical",hasBorder:m=!0})=>r("section",{className:`font-sans text-primary-text py-6 px-4 bg-white ${e}`,children:[i?n(s,{headingType:"h2",className:"text-center "+(a?"mb-2":"mb-5"),title:i}):null,a?n("h3",{className:"mt-0 font-normal mb-5 text-center text-m-md",children:a}):null,"vertical"===o?n(D,{hasBorder:m,documents:c,icon:l}):n(T,{context:t,hasBorder:m,documents:c,icon:l})]}))),R=i((({className:e="",title:t,image:i,benefits:a})=>r("section",{className:`relative font-sans text-primary-text bg-white p-14 ${e}`,children:[n(s,{headingType:"h2",className:"text-center",title:t}),r("div",{className:"flex justify-center mt-9",children:[i?.src&&n(d,{className:"mr-6",image:i}),a?.length?n("div",{className:"flex flex-col",children:a.map(_)}):null]})]})));function _(e,t){return r("div",{className:"flex flex-row mb-8",children:[e.icon&&n(m,{className:"w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]",name:e.icon,width:"48",height:"48",asSVG:!0}),r("div",{className:"flex gap-1 flex-col h-full ml-5 max-w-[490px]",children:[e.label&&n("div",{className:"font-medium text-primary-text text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const L=e=>e?.includes("//"),I=e=>(e||"").replace(/\/?\?.*/,""),V=e=>{if(!e||!L(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t};var B=Object.freeze({__proto__:null,isURL:L,withoutQuery:I,getOrigin:V});const A="/mobile",O=(e,t)=>{if(!e)return e;const n=V(t?.href);return n?e.replace(n,"")||"/":e},G=e=>e;function E({router:e,handlerDecorator:t=G},n){const r=((e,t)=>{if(!e)return e;const n=O(e,t)||"",r=t?.pathname.startsWith(A);return r&&!L(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:r,ariaLabel:n.text,onClick:t((t=>{const i=r&&!L(r),a=!n.target||"_self"===n.target;i&&a&&(t.preventDefault(),e.push(r))}),n)}}const F=i((e=>{const{text:t,aboveText:i,appendLeft:a}=e;return r("div",{className:H(e),children:[a||null,M(e)?r("div",{children:[n("div",{className:"text-m-2xs text-left",children:i}),n("div",{className:"text-m-button font-medium text-left",children:t})]}):null]})})),H=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const i="px-8 gap-2 "+(n?"py-2":"py-3.5");return["flex items-center justify-center",M(e)?i:"h-12 w-12",r?"rounded-full":""].join(" ")},M=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),P={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active",link:"text-primary-main"},Z={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},z="w-full text-center font-sans select-none",W=i((({className:e,text:t,aboveText:r,appendLeft:i,href:a,target:l,onClick:s,children:c,disabled:o,rounded:m,version:d="primary",ariaLabel:h,...x})=>{const u=c??n(F,{text:t,aboveText:r,appendLeft:i,rounded:m,version:d});return o?n("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:"-1",className:`inline-block ${z} ${Z[d]||""} ${m?"rounded-full":"rounded-md"} ${e||""}`,children:u}):n("a",{className:`${z} inline-block cursor-pointer no-underline ${P[d]||""} ${m?"rounded-full":"rounded-md"} ${e||""}`,href:a,target:l,onClick:s,"aria-label":h,role:a?"link":"button",...x,children:u})})),U=i((({context:e,className:t="",buttons:r})=>{const{handlerDecorator:i}=e,a=e.useRouter();return r?.length?n("div",{className:`${t}`,children:r.map(((e,t)=>function({icon:e,...t},r){if(!t?.text)return;return n(W,e?{appendLeft:n(m,{name:e,width:"24",height:"24",asSVG:!0}),...t}:{...t},String(r))}(E({router:a,handlerDecorator:i},e),t)))}):null}));const J=i((e=>{const{className:t="",description:r}=e;return n("div",{className:`font-normal text-base ${t}`,children:r})})),K={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},Q={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},X=i((({className:e="",isDotted:t=!0,children:i,version:a="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:Y(a)}),n("span",{className:`text-m-md ${K[a]}`,children:i})]}))),Y=e=>`rounded-full inline-block mr-3 mt-2 ${Q[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,q=i((e=>{const{className:t="",itemClassName:r,isDotted:i,items:a,version:l}=e;return n("section",{className:`${t}`,role:"list",children:a?.length?a.map(((e,t)=>n(X,{className:r,isDotted:i,version:l,children:e},String(t)))):null})})),ee=i((({className:e="",title:t,children:i,buttons:a,image:l})=>r("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,r("div",{className:"flex grow w-full justify-between",children:[r("div",{className:"flex flex-col justify-between w-full",children:[n("div",{children:i}),a?n("div",{children:a}):null]}),l]})]}))),te={primary:"text-primary-text",secondary:"text-white"},ne={primary:"text-secondary-text",secondary:"text-white"};const re=i((({className:e="",context:t,title:i,headingType:a="h2",description:l,benefits:c,buttons:o,image:d,items:h,version:x="primary"})=>r("div",{className:`w-full text-primary-text ${e}`,children:[n("div",{children:r(ee,{context:t,title:i&&n(s,{headingType:a,title:i,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:o?.length?n(U,{context:t,buttons:o,className:"flex flex-col mt-5 gap-2.5"}):null,children:[l?n(J,{className:"mt-3 text-m-md",description:l}):null,c?.filter((e=>e.label))?.length?n("div",{className:"mt-3",children:c.map(((e,t)=>function(e,t,i){return r("div",{className:"flex gap-3 items-center mb-2.5 last:mb-0",children:[e.icon&&n(m,{className:"w-6 h-6 rounded-full box-border",name:e.icon,width:"24",height:"24",asSVG:!0}),n("div",{className:`font-medium text-m-title-xs m-0 ${te[i]}`,children:e.label}),e.description&&n("div",{className:`font-normal text-m-sm ${ne[i]}`,children:e.description})]},String(t))}(e,t,x)))}):null,h?.length?n(q,{className:"mt-3",items:h}):null]})}),ie(d)]})));function ie(e){return e?.src?n("div",{className:"mt-5",children:n(d,{image:{className:"block",...e}})}):null}const ae=i((e=>{const{className:t}=e;return n("section",{className:`font-sans bg-white px-4 py-6 ${t||""}`,children:n(re,{...e})})})),le={primary:{background:"bg-white",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"},secondary:{background:"bg-primary-main",icon:"bg-white text-primary-main",title:"text-white",description:"text-white"},"secondary-light":{background:"bg-primary-main/10",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"}},se=i((({title:e,description:t,blockVersion:i="primary",iconVersion:a,image:l,className:s="",items:c,isDotted:o=!0})=>{const m=le[i];return r("section",{className:`font-sans px-4 py-[18px] flex flex-col ${m.background} ${s}`,children:["small"===a?ce(m.icon):null,"big"===a?oe(l):null,r("div",{className:"py-0.5",children:[e?n("div",{className:`font-medium text-base mb-1 ${m.title}`,children:e}):null,t?n("div",{className:`text-sm ${m.description}`,children:t}):null,c?.length?n(q,{className:"mt-1",items:c,isDotted:o,version:-1!==i.indexOf("secondary")?"secondary":"gray"}):null]})]})}));function ce(e){return n("div",{className:"mb-3",children:n("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function oe(e){return e?.src?n(d,{className:"pb-3 mr-auto",image:e}):null}const me=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function de(e=""){const t=me(e);return t<=4?"h4":t<=8?"h3":"h2"}function he(e=""){const t=me(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function xe(e=""){const t=me(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const ue={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},pe=i((e=>{const{context:t,title:i,description:a,items:l,children:c,buttons:o,image:m,className:h="",version:x="primary",role:u}=e;return n("section",{className:`overflow-hidden font-sans p-9 box-border ${h} ${ue[x]} ${xe(h)} ${he(h)} `,role:u,children:r(ee,{context:t,title:i&&n(s,{headingType:de(h),title:i,className:`whitespace-pre-wrap max-w-[600px] ${i?"mb-3":""}\n ${"primary"===x?"text-primary-text":""}`}),buttons:o?.length?n(U,{context:t,buttons:o,className:"flex mt-9 gap-3"}):null,image:m?.src&&n(d,{className:"mt-auto ml-7",image:m}),children:[a&&n(J,{className:"mt-4 max-w-[600px]",description:a}),c,ge(l,x)]})})}));function ge(e,t){return e?.length?n(q,{items:e,version:t}):null}const be={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},fe=i((({context:e,className:t="",title:i,description:a,benefits:l,buttons:c,image:o,version:m="primary"})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${t} ${be[m]} ${xe(t)} ${he(t)} `,children:r(ee,{context:e,title:i&&n(s,{headingType:de(t),title:i,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:c?.length?n(U,{context:e,buttons:c,className:"flex mt-9 gap-3"}):null,image:o?.src&&n(d,{className:"mt-auto ml-7",image:o}),children:[a&&n(J,{className:"mt-4 max-w-[600px]",description:a}),r("div",{className:"flex mt-5 mb-1",children:[l?.length?n("div",{className:"mr-8",children:l.map(Ne)}):null,l?.length?n("div",{className:"pt-1",children:l.map(((e,t)=>function(e,t,r="primary"){return n("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[r]}`,children:e.description},String(t))}(e,t,m)))}):null]})]})})));function Ne(e,t){return n("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.label},String(t))}const ye={primary:"bg-white",secondary:"bg-primary-main text-white"},ve=i((({context:e,title:t,description:i,cards:a=[],className:l,isScroll:c=!0})=>r("section",{className:`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${l}`,children:[r("div",{className:"flex flex-col items-center mb-5",children:[t?n(s,{headingType:"h3",className:"text-center "+(i?"mb-2":"mb-5"),title:t}):null,i?n("div",{className:"font-normal text-m-md max-w-[600px] text-center mb-5",children:i}):null]}),we(c,a,e)]})));function we(e,t,r){return e?n(w,{context:r,children:t?.map(ke)}):n("div",{className:"grid gap-[14px]",children:t?.map(ke)})}function ke(e,t){return r("div",{className:`h-full justify-between box-border horizontal-list-item border-solid border rounded-md border-main-stroke p-4 flex flex-col\n ${ye[e.version??"primary"]}`,children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(d,{className:"mb-3.5",image:e.image})}):null,e.title?n("h3",{className:"font-medium text-m-title-xs m-0",children:e.title}):null,e.description?$e(e):null,e.items?.length?Ce(e.items,e.version):null]}),e?.button?.text?(i=e.button,n(W,{className:"mt-3",appendLeft:i?.icon&&n(m,{name:i?.icon,width:"24px",height:"24px",asSVG:!0}),...i})):null]},t);var i}function $e(e){return n("div",{className:"text-secondary-text mt-1 text-m-sm "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}function Ce(e,t="primary"){return n("section",{className:"mt-3",children:e.map(((e,i)=>r("div",{children:[n("span",{className:"text-m-md font-medium",children:e.title}),n("span",{className:"text-m-sm pl-2 "+("primary"===t?"text-secondary-text":""),children:e.text})]},String(i))))})}const Se=i((({className:e,viewBox:t,fill:r="none",width:i,height:a,paths:l,...s})=>n("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:r,width:i,height:a,children:l.map((({d:e,fill:t,...r},i)=>n("path",{d:e,fill:t||"currentColor",...s,...r},i)))}))),Te=[{d:"m9 12 4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",fill:"none"},{d:"M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z"}],De=i((({className:e,disabled:t,...r})=>n(W,{rounded:!0,className:`shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...r,children:n(Se,{paths:Te,viewBox:"0 0 16 16",fill:"none",width:"16",height:"16"})}))),je={primary:"bg-white text-secondary-text",secondary:"bg-primary-main text-white"},Re={normal:3,mini:4},_e={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Le={normal:380,mini:276},Ie={primary:"text-secondary-text",secondary:"text-white",gray:"text-secondary-text"},Ve={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},Be=i((({className:e="",isDotted:t=!0,text:i,children:a,version:l="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:Ae(l)}),n("span",{className:Ie[l],children:i||a})]}))),Ae=e=>`rounded-full inline-block mr-3 mt-2 ${Ve[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,Oe=i((({title:e,description:t,image:i,items:a,button:l,version:s})=>{const c=function(e,t,n){return`font-medium text-xl m-0\n ${"secondary"!==e?"text-primary-text":""}\n ${t||n?.length?"":"text-center"}\n `}(s,t,a);return r("div",{children:[r("div",{children:[i?.src?n("div",{className:"flex justify-center",children:n(d,{className:"mb-6",image:i})}):null,e?Ee(e,c):null,t?n("div",{className:"font-normal text-sm "+(e?"mt-2":""),children:t}):null,a?.length?Fe(a,s):null]}),l?.text?Ge(l):null]})}));function Ge(e){return n(W,{className:"mt-6 w-full",appendLeft:e.icon&&n(m,{name:e.icon,width:"24px",height:"24px",asSVG:!0}),...e})}function Ee(e,t){return n("div",{className:`font-medium text-xl m-0 ${t}`,children:e})}function Fe(e,t){return n("section",{className:"max-w-[308px] mt-2",role:"list",children:e.filter((e=>e?.text)).map(((e,r)=>function(e,t,r){return n(Be,{version:r??"primary",children:n("span",{className:"text-sm",children:e})},String(t))}(e.text,r,t)))})}const He=i((({context:e,title:t,description:i,cards:a=[],version:l="normal",activeCardIndex:c})=>r("div",{children:[n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"}),r("div",{className:"flex flex-col items-center mb-8",children:[t?n(s,{headingType:"h2",className:"text-center",title:t}):null,i?n("div",{className:"font-normal text-base max-w-[600px] mt-2.5",children:i}):null]}),n("div",{className:`flex ${a?.length<=Re[l]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${c*Le[l]}px)`},role:"list",children:a?.map(((t,r)=>function({card:e,version:t},r){return n("section",{className:`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between\n items-stretch ${_e[t]} ${je[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:n(Oe,{...e})},String(r))}({card:t,version:l,context:e},r)))})]})));const Me=i((({context:e,cards:t=[],className:i="",version:a="normal",...l})=>{const[s,c]=e.useState(0),o=t?.length>Re[a],m=o&&t?.length-s>Re[a],d=o&&s>0;return r("section",{className:`relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${i}`,children:[n(He,{context:e,cards:t,version:a,activeCardIndex:s,...l}),d&&n(De,{className:"absolute top-1/2 left-8 rotate-180 z-10 mt-[25px]",onClick:()=>c(s-1),ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}),m&&n(De,{className:"absolute top-1/2 right-8 z-10 mt-[25px]",onClick:()=>c(s+1),ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}),n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white"}),n("div",{className:"absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white"})]})})),Pe=i((e=>n(Me,{...e,version:"mini"}))),Ze=i((({className:e="",documents:t})=>n("section",{className:`font-sans bg-white mt-[10px] ${e}`,children:n("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?ze(t):null})}))),ze=e=>e.map(((e,t)=>{const{text:r,...i}=e;return n("li",{className:"mb-4 list-none",children:n("a",{className:"hover:text-primary-main",role:"link",...i,children:r||null})},`list_item_${String(t)}`)})),We={Headline:g,LinkDocs:j,TextBlock:se,PictureText:R,ProductBlock:ae,Tile:pe,ProductTile:fe,Gallery:ve,MiniGallery:Pe,LinkList:Ze},Ue=i((({blocks:e,context:t})=>n("div",{className:"transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0",children:e?.length?e.map(Je(t)):null}))),Je=e=>(t,r)=>{const i=t?.accordionBlockType;if(!i||!(i in We))return null;return n("div",{className:"mb-5 last:mb-0 first:mt-2",children:n(We[i],{context:e,...t,className:"!p-0"})},`block_${r}`)},Ke=i((({label:e,blocks:t,bordered:i,context:a})=>{const{hasContent:l,icon:s,handleToggle:c}=(({context:e,blocks:t})=>{const[n,r]=e.useState(!1),i=t?.length;return{isActive:n,hasContent:i,icon:n?"MinusIcon":"PlusIcon",handleToggle:e=>{if(!i)return;r(!n);const t=(({currentTarget:e})=>e.nextSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:a,blocks:t});return r("li",{className:(i?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0")+" border-solid border-main-divider",children:[r("button",{className:`border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text\n ${i?"":"py-[14px] px-0"}\n ${l?"group cursor-pointer":""}`,onClick:c,children:[n("span",{className:"text-m-title-xs pr-2.5 font-medium "+(l?"group-hover:text-primary-main":""),children:e}),l?n(m,{name:s,width:"24",height:"24",asSVG:!0}):null]}),l?n(Ue,{blocks:t,context:a}):null]})})),Qe=i((({title:e,description:t,accordionItems:i,context:a,className:l="",bordered:c})=>r("section",{className:`py-6 px-4 font-sans bg-white text-primary-text ${l}`,children:[e?n(s,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?n("div",{className:"mb-5 text-m-md text-center",children:t}):null,i?.length?n("ul",{className:"list-none m-0 p-0",children:i.map(((e,t)=>n(Ke,{...e,context:a,bordered:c},`AccordionItem${t}`)))}):null]}))),Xe=i((({icon:e,image:t,title:i,subtitle:a,isFillGradient:l})=>r("div",{role:"columnheader",scope:"col",children:[e&&n(m,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",name:e,width:"63",height:"63"}),t?.src&&n("div",{className:"mb-3.5",children:n(d,{image:t})}),i&&n(s,{headingType:"h4",className:""+(l?"text-white":""),title:i}),a&&n("div",{className:"text-m-sm mb-3.5 "+(l?"text-white":"text-secondary-text/80"),children:a})]}))),Ye=i((({cell:e,rowHeader:t,isFillGradient:r=!1})=>n("div",{className:"box-border flex flex-col",role:"cell",children:n("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(qe(r,t))})}))),qe=(e,t)=>({label:i,description:a},l)=>r("div",{className:"flex justify-between text-m-sm py-3.5",children:[n("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),r("div",{className:"basis-1/2",children:[i&&n("div",{className:"text-right "+(e?"text-white":""),children:i}),a&&n("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:a})]})]},String(l)),et=i((({header:e,columnData:t,visibleRowLength:i=0,isFillGradient:a,showRow:l,onToggleColumn:s})=>{const c=t?.slice(0,l?t.length:i),o=a?"secondary":"primary";return r("div",{className:`border border-main-stroke rounded-md p-4 mb-3.5 ${a?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[n(Xe,{...e,isFillGradient:a}),c?.length?c.map((({rowHeader:e,cell:t},r)=>n(Ye,{cell:t,rowHeader:e,isFillGradient:a},String(r)))):null,l&&tt({header:e,buttonVersion:o}),nt({onToggleColumn:s,isFillGradient:a,showRow:l})]})})),tt=({header:e,buttonVersion:t})=>n(W,{href:e.link.href,target:e.link.target,version:t,className:"font-medium text-m-sm mt-4 py-[11px]",children:e.link.text}),nt=({onToggleColumn:e,isFillGradient:t,showRow:r})=>n("div",{className:"mt-5",role:"cell",children:n("a",{role:"link",onClick:e,className:"font-medium text-m-sm cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:r?"Скрыть":"Показать описание"})}),rt=i((({className:e,context:t,title:i,rowHeaders:a,columns:l,visibleRowLength:c=0,isColoredFirstColumn:o=!1,useSwiper:m=!1})=>{const d=l?.map((({data:e,header:t})=>({header:t,column:e?.map(((e,t)=>({cell:e,rowHeader:a?.[t]?.title})))})))||[],[h,x]=t.useState(new Array(l?.length).fill(!c));return r("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${e||""}`,children:[i&&n(s,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:i}),it({tableData:d,context:t,visibleRowLength:c,isColoredFirstColumn:o,columnsViewState:h,handleToggleColumn:e=>{h[e]=!h[e],x([...h])},useSwiper:m,setColumnsViewState:x})]})})),it=({context:e,tableData:t,visibleRowLength:r,isColoredFirstColumn:i,columnsViewState:a,handleToggleColumn:l,useSwiper:s,setColumnsViewState:c})=>n("div",{role:"table",children:t?.length?s?n(w,{context:e,onSlideChange:lt(a,c),children:t.map(at({context:e,visibleRowLength:r,isColoredFirstColumn:i,columnsViewState:a,handleToggleColumn:l}))}):t.map(at({context:e,visibleRowLength:r,isColoredFirstColumn:i,columnsViewState:a,handleToggleColumn:l})):null}),at=({context:e,visibleRowLength:t,isColoredFirstColumn:r,columnsViewState:i,handleToggleColumn:a})=>(l,s)=>n(et,{context:e,visibleRowLength:t,showRow:i[s],header:l.header,columnData:l.column,isFillGradient:0===s&&r,onToggleColumn:()=>a(s)},String(s)),lt=(e,t)=>()=>{t(new Array(e.length).fill(!1))};async function st(){try{const e=await fetch(ct);return await e.json()}catch(e){console.error(e)}}const ct="/api/v1/exchangerates.json",ot=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),mt=e=>e?ot.format(e):"",dt="text-left font-normal text-sm text-secondary-text",ht={USD:"DollarIcon",EUR:"EuroIcon"},xt=i((({className:e,exchangeCurrencyItems:t})=>r("table",{className:`h-fit w-fit ${e}`,children:[n("thead",{children:r("tr",{children:[n("th",{className:dt,children:"Валюта"}),n("th",{className:`${dt} pl-11`,children:"Купить"}),n("th",{className:`${dt} pl-11`,children:"Продать"})]})}),n("tbody",{children:t.map((e=>ut(e)))})]}))),ut=e=>{const t=e?.currency?.currency;return r("tr",{children:[n("td",{className:"pt-4",children:r("div",{className:"flex items-center",children:[t?n(m,{name:ht[t],width:"24",height:"24"}):null,n("span",{className:"ml-2",children:t})]})}),n("td",{className:"pt-4 pl-11",children:mt(e.buyExchangeRate)}),n("td",{className:"pt-4 pl-11",children:mt(e.saleExchangeRate)})]},t)},pt=i((({className:e="",address:t,distance:i})=>r("div",{className:`flex text-sm ${e}`,children:[n(m,{className:"min-w-fit",name:"GpsIcon",width:"24",height:"24",asSVG:!0}),r("div",{className:"ml-1.5",children:[t?n("p",{className:"m-0",children:t}):null,i?r("p",{className:"text-secondary-text m-0",children:["Курс указан для ближайшего офиса - ",i]}):null]})]}))),gt=i((({className:e="",id:t,name:r,type:i="text",placeholder:a})=>n("input",{className:e,id:t,name:r||t,type:i,placeholder:a}))),bt=i((({className:e="",id:t,name:r,children:i})=>n("select",{className:e,id:t,name:r||t,children:i}))),ft=i((({className:e="",value:t,children:r})=>n("option",{className:e,value:`${t}`,children:r}))),Nt=i((({codes:e,className:t=""})=>r("div",{className:`grid gap-3.5 ${t}`,children:[yt("Хочу продать",e),yt("Получу",e),n(W,{className:"box-border mt-3.5 py-3 h-12 w-44",version:"primary",href:"#",children:"Купить валюту"})]})));function yt(e,t){return r("div",{className:"flex items-center",children:[n(gt,{className:"h-10 border pl-2.5 rounded-md text-m-sm w-full appearance-none",type:"number",placeholder:`${e}`}),t.length?n(bt,{className:"h-9 -translate-x-16",children:t.map(((e,t)=>n(ft,{value:e,children:e},String(t))))}):null]})}const vt=["USD","EUR"],wt=["RUB","USD","EUR"],kt=[{buyExchangeRate:90.6,saleExchangeRate:92.8,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:73.75,saleExchangeRate:75.95,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],$t={address:"Москва, ул.Ленина д.28",distance:"6км"},Ct=i((({className:e="",context:t,title:i="Курсы обмена валют"})=>{const a=function(e){const{data:t}=e(ct,st);return t||{}}(t.useAsyncData)?.exchangeRate?.currencies?.filter((e=>-1!==vt.indexOf(e?.currency?.currency||"")))||kt;return n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,children:n(ee,{context:t,title:n(s,{headingType:de(e),title:i,className:"whitespace-pre-wrap mb-3"}),children:r("div",{className:"flex",children:[r("div",{className:"mr-20 pt-3",children:[a?n(xt,{className:"mb-7",exchangeCurrencyItems:a}):null,n(pt,{...$t})]}),a?.length?n(Nt,{className:"grow",exchangeCurrencyItems:a,codes:wt}):null]})})})})),St=["m13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z","M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z","M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z","M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z","M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z"],Tt={"bg-white":"text-primary-main",transparent:"text-white"},Dt={"bg-white":"text-black",transparent:"text-white"},jt=i((({className:e="",href:t,children:i,targetBlank:a,bgColor:l="bg-white",hideTitle:s})=>r("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"https://rshb.ru/",target:a?"_blank":"_self","aria-label":"Россельхозбанк",children:[n(Se,{className:`${Tt[l]} w-10 h-[38px]`,viewBox:"0 0 40 45",paths:St.map((e=>({d:e})))}),!s&&n("span",{className:`${Dt[l]} text-sm font-medium ml-2.5`,children:i||"Россельхозбанк"})]}))),Rt=i((({className:e,title:t="Мобильное приложение",description:i,href:a="#"})=>n("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light ${e||""}`,children:a?r("div",{className:"flex",children:[n("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]",children:n(jt,{className:"w-[33px]",bgColor:"transparent",hideTitle:!0})}),r("a",{href:a,target:"_blank",className:"flex flex-col justify-center pl-3",children:[n("div",{className:"text-m-button font-medium mb-[3px]",children:t}),n("div",{className:"text-m-button text-secondary-text",children:i})]})]}):null}))),_t=i((({className:e,items:t,hasButton:i,context:a})=>{const l=a.useRouter(),{handlerDecorator:s}=a;return r("div",{className:`flex flex-col ${e||""}`,children:[t?.length?t.map(Lt):null,i?n(W,{version:"primary",className:"mt-0.5 mb-5",...E({router:l,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),Lt=(e,t)=>{const{type:i,text:a,description:l}=e;return r("div",{className:"mb-3.5",children:[n("div",{children:It(i,a)}),n("div",{className:"font-sans text-sm text-secondary-text",children:l})]},String(t))},It=(e,t="")=>{switch(e){case"tel":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`tel:${Vt(t)}`,children:t});case"email":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},Vt=e=>e.replaceAll(/\D/g,""),Bt=i((({title:e,links:t,className:i="",context:a})=>{const l=a.useRouter(),{handlerDecorator:s}=a;return r("div",{className:i,children:[n("span",{className:"text-primary-text font-sans font-medium text-sm",children:e}),t?.length?n("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>n(At,{index:t,...E({router:l,handlerDecorator:s},e)},String(t))))}):null]})})),At=i((({className:e="",index:t,text:r,href:i,target:a,onClick:l})=>n("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:i,target:a,onClick:l,children:r||`Документ ${t}`}))),Ot=[{origins:["t.me","telegram.org"],icon:"TelegramIcon",label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:"VKIcon",label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:"OkIcon",label:"Одноклассники",width:"12px",height:"20px"}],Gt=i((({href:e})=>{const{icon:t,width:r,height:i,label:a}=Ot.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};return t?n("a",{className:"flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[38px] h-[38px] hover:text-primary-main",href:e,"aria-label":a,target:"_blank",rel:"noopener noreferrer",children:m&&n(m,{name:t,width:r,height:i,asSVG:!0,className:"block",color:"none"})}):null})),Et=i((({className:e,media:t,context:r})=>{const i=r.useRouter(),{handlerDecorator:a}=r;return n("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e||""}`,children:t?.map(((e,t)=>n(Gt,{...E({router:i,handlerDecorator:a},e)},String(t))))})})),Ft=i((({className:e,links:t,context:i})=>{const a=i.useRouter(),{handlerDecorator:l}=i;return r("div",{className:`${e||""}`,children:[n("div",{className:"py-6",children:n("span",{className:"font-sans font-normal text-xs text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?n("div",{className:"flex flex-col justify-start items-start gap-2",children:t.map(((e,t)=>n(Ht,{index:t,...E({router:a,handlerDecorator:l},e)},String(t))))}):null]})})),Ht=i((({className:e,index:t,text:r,href:i,target:a,onClick:l})=>n("a",{className:`font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:i,target:a,onClick:l,children:r||`Документ ${t}`})));function Mt(e){const{data:t}=e(Zt(),Pt);return t||{}}async function Pt(){const e=await fetch(Zt());return await e.json()}function Zt(){return`/wcms-resources/${c.SITEMAP||"sitemap"}.json`}const zt=i((({className:e,context:t})=>{const{term:i,setTerm:a}=t.useSearch();return r("form",{className:`relative ${e||""}`,children:[r("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[n("div",{className:"w-[20px] h-[20px]",children:n(m,{name:"LoupeIcon",width:"24",height:"24"})}),!i&&n("label",{htmlFor:"search-bar-input",className:"font-sans font-normal text-sm text-secondary-text",children:"Поиск по сайту"})]}),n("input",{id:"search-bar-input",className:"h-12 pl-12 w-full peer placeholder-transparent font-sans font-normal text-base text-black border border-solid rounded box-border outline-none pr-[6%] border-main-divider focus:border-primary-text",value:i,onChange:e=>a(e.target.value),type:"text",name:"search-bar-input",placeholder:"some search"}),n("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer",onClick:e=>{e.preventDefault(),a("")},children:n(m,{name:"CloseIcon",width:"24",height:"24"})})]})})),Wt=e=>e?.map((e=>({label:e.text||"",blocks:[{accordionBlockType:"LinkList",documents:e.items||[]}]}))),Ut=i((({className:e="",documents:t,relatedEnterprises:i,contacts:a,socialMedia:l,context:s,horizontalNavigationTitle:c})=>{const o=Mt(s.useAsyncData),m=o?.dispositions;return r("footer",{className:`px-4 py-[26px] bg-white ${e}`,children:[n(_t,{className:"overflow-hidden",items:a,context:s,hasButton:!0}),n(Qe,{context:s,className:"!p-0 mb-4",accordionItems:Wt(o.topItems)}),n("div",{children:m?.map(Jt)}),n(Rt,{context:s,title:"Мобильное приложение",description:"Загрузить для IOS и Android"}),n(zt,{context:s,className:"grow"}),n(Et,{className:"pb-4",media:l,context:s}),n(Bt,{title:c,links:i,context:s}),n(Ft,{links:t,context:s})]})})),Jt=(e,t)=>{const{icon:i,href:a,text:l}=e;return r(W,{version:"link",href:a,className:"flex text-sm mb-4",children:[i?n(m,{className:"pr-1",name:i,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-2.5 font-medium text-primary-text",children:l})]},`footer-${t}`)},Kt=(e,t,n=((e,t)=>t.startsWith(e)))=>n(I(e),(e=>(e||"").replace(A,""))(I(L(e)?t.href:t.pathname))),Qt=e=>t=>Kt(t.href,e),Xt=e=>t=>t.items?.some(Qt(e))||Kt(t.href,e)||((e,t)=>V(e)===V(t.href))(t.href,e),Yt=e=>t=>e?.href===t?.href,qt=(e,t)=>{return(r=e,i=t,(r||[]).map((e=>i?.find(Yt(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(Yt(e))))));var n,r,i},en="absolute left-0 -bottom-3 w-full h-[2px]",tn=i((({className:e,text:t,href:i,target:a,active:l,onClick:s,children:c,bgColor:o="bg-white"})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:i,target:a,onClick:s,children:[n("span",{className:nn(o,l),children:t||c}),l?n("div",{className:rn(o,l)}):null]}))),nn=(e,t)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-secondary-text hover:text-primary-main"),`${n} font-sans font-normal text-sm`},rn=(e,t)=>t?`${"bg-white"===e?"bg-primary-main":e} ${en}`:en,an=i((({context:e,burgerSubMenu:t,onClick:i,defaultLocation:a="",children:l})=>{const[s,c]=e.useGeolocation(a);return r("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[n("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:i,children:n(m,{name:"CloseIcon",width:"24",height:"24",asSVG:!0})}),r("button",{onClick:c,className:"flex items-center text-sm text-secondary-text p-0 mb-4 bg-transparent cursor-pointer",children:[n(m,{name:"GeolocationIcon",width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),s]}),l,n("div",{className:"mb-7",children:t?.map(ln)}),n(zt,{context:e,className:"grow"})]})})),ln=(e,t)=>{const{icon:i,href:a,text:l}=e;return r("a",{href:a,className:"flex text-sm mb-4 hover:text-primary-main",children:[i?n(m,{className:"text-primary-main pr-1",name:i,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-0.5 font-medium",children:l})]},`headerSubMenu-${t}`)},sn=i((({onClick:e,bgColor:t})=>r("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-[50px]",children:[r("div",{className:"flex items-center",children:[n("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:n(m,{name:"bg-white"===t?"BurgerIcon":"BurgerIconWhite",width:"24",height:"24",asSVG:!0})}),n(jt,{bgColor:t})]}),n("button",{className:("bg-white"===t?"text-primary-main":"text-white")+" text-sm border-0 bg-transparent cursor-pointer",children:"Войти"})]}))),cn=i((({className:e="",defaultLocation:t,bgColor:i="bg-white",context:a,topItems:l})=>{const s=a.useRouter(),c=Mt(a.useAsyncData),o=c?.dispositions,{handlerDecorator:m}=a,d=qt(c.topItems,l).find(Xt(s))?.items,h=(e=>(t=[])=>{const n=t?.filter(Qt(e));var r;return n?.length?(r=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>r(e)>r(t)?e:t)))(n):null})(s)(d),[x,u]=a.useState(!1),p=()=>u(!x);return r("header",{className:`${i} ${e}`,children:[r("div",{className:"container px-4 py-0 box-border",children:[n(sn,{onClick:p,bgColor:i}),n("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]",children:n("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:d?.map(((e,t)=>on({...E({router:s,handlerDecorator:m},e),active:e===h,bgColor:i},t)))})})]}),x?n(an,{context:a,onClick:p,burgerSubMenu:o,defaultLocation:t,children:n(Qe,{context:a,accordionItems:Wt(c.topItems),className:"!p-0 mb-4"})}):null]})})),on=(e,t)=>n(tn,{className:"mr-8 whitespace-nowrap text-sm",...e},String(t)),mn=i((({block:e,headingType:t,context:r})=>n("section",{className:"flex grow-0 shrink-0 basis-full px-4 pt-6",children:n("div",{className:"flex grow",children:n(re,{context:r,headingType:t||"h2",...e})})}))),dn=i((({className:e,context:t,slides:r=[]})=>{const i=r.map((e=>e.productBlock));return n("section",{className:`font-sans bg-white overflow-hidden w-100 pb-6 ${e||""}`,children:n(w,{context:t,children:i.map(((e,r)=>n(mn,{block:e,context:t},String(r))))})})})),hn={primary:{background:"bg-white",title:"text-primary-text",description:"text-secondary-text",iconBackground:"bg-secondary-light",iconConnector:"bg-secondary-light"},secondary:{background:"bg-primary-main",title:"text-white",description:"text-white/80",iconBackground:"bg-white/30",iconConnector:"bg-white"}},xn=e=>hn[e],un=i((({className:e,title:t,description:i,steps:a,size:l="normal",version:c="primary"})=>{const o=xn(c);return r("section",{className:`box-border font-sans bg-white px-4 py-6 flex flex-col\n ${o.background} ${o.title} ${e||""}`,children:[t&&n(s,{headingType:"h3",className:`text-center ${o.title}`,title:t}),i&&n("p",{className:`text-m-md text-center ${o.description} ${t&&"mt-2"}`,children:i}),a?.length?n("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:n("div",{className:"flex flex-col justify-between gap-x-[101px]",children:a.map(((e,t)=>pn({step:e,size:l,i:t,length:a.length,version:c})))})}):null]})})),pn=e=>{const{step:t,size:i,i:a,length:l,version:s}=e,c=l-1===a,o="normal"===i?"ml-[34px]":"ml-[24px]",m=xn(s);return n("div",{children:r("div",{className:"flex flex-row text-center relative",children:[r("div",{className:"overflow-hidden",children:[gn(e),!c&&n("div",{className:`min-h-8 h-full w-[2px] ${m.iconConnector} ${o}`})]}),r("div",{className:"flex flex-col justify-start relative",children:[t.label&&n("div",{className:"font-medium text-m-title-xs m-0 text-left",children:t.label}),t.description&&n("div",{className:`font-normal text-sm ${m.description} text-left ${t.label?"mt-1":""}`,children:t.description})]})]},String(a))},String(a))},gn=e=>{const{step:t,size:r,i:i,version:a}=e,l=xn(a),s="normal"===r?"38":"27",c="normal"===r?"text-m-title":"text-m-title-xs";return n("div",{className:`${"normal"===r?"h-[70px] w-[70px] min-w-[70px] min-h-[70px]":"h-[50px] w-[50px] min-w-[50px] min-h-[50px]"} ${l.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:n("span",{className:`font-medium flex self-center ${l.title} ${c}`,children:t.icon&&n(m,{name:t.icon,width:s,height:s,asSVG:!0})||i+1})})},bn=i((({title:e,icon:t})=>r("div",{className:"flex gap-2.5 mb-2",children:[e?n(s,{headingType:"h3",className:"font-medium",title:e}):null,t?n(m,{className:"ml-auto max-w-6 max-h-6",name:t,width:"24px",height:"24px"}):null]}))),fn=i((({header:e,data:t})=>r("div",{className:"rounded-md border-main-stroke h-full box-border border p-4",children:[n(bn,{...e}),t?.length?t.map(Nn):null]}))),Nn=({label:e,description:t,list:i,image:a,buttons:l},s)=>r("div",{children:[s>0&&n("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-2"}),e?n("div",{className:"text-m-sm m-0",children:e}):null,t?n("div",{className:"text-m-sm text-secondary-text mt-[3px]",children:t}):null,i?.items?.length?n("div",{className:"flex flex-col justify-between items-start",children:n("div",{role:"list",children:i.items.map(((e,t)=>n(Be,{className:"text-m-sm",text:e,version:"gray",isDotted:i.isDotted??!0},String(t))))})}):null,a&&n(d,{image:{...a,className:"m-0"}}),l?.length?n("div",{children:l.map((({icon:e,rounded:t,...r},i)=>n(W,{className:`mt-3 ${i>0&&t?"ml-2.5":""} ${e?"w-12 h-12":""}`,rounded:t,appendLeft:e&&n(m,{name:e,width:"24px",height:"24px",asSVG:!0}),...r,"aria-label":e},String(i))))}):null]},String(s)),yn=i((({tiles:e})=>n("div",{className:"flex flex-col gap-3.5",children:e.map(((e,t)=>n(fn,{...e},String(t))))}))),vn=i((({tiles:e,context:t})=>n(w,{context:t,children:e.map(((e,t)=>n(fn,{...e},String(t))))}))),wn=i((({className:e,context:t,title:i,description:a,columns:l,rowHeaders:c,orientation:o="vertical"})=>{const m=$n(l),d=Cn(c,m);return r("section",{className:`px-4 py-6 bg-white font-sans text-primary-text ${e}`,children:[i?n(s,{headingType:"h2",className:"text-center "+(a?"mb-2":"mb-5"),title:i}):null,a?n("div",{className:"mb-5 text-center text-m-md",children:a}):null,d?.length?kn(o,d,t):null]})}));function kn(e,t,r){return"vertical"===e?n(yn,{tiles:t}):n(vn,{context:r,tiles:t})}const $n=e=>e?.[0].data?e[0].data:[],Cn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),Sn={Accordion:Qe,ComparisonTable:rt,ExchangeRateTile:Ct,Footer:Ut,Gallery:ve,Header:cn,Headline:g,LinkDocs:j,LinkList:Ze,MobileAppTile:Rt,ProductBlock:ae,ProductGallery:dn,StepsBlock:un,TariffsTable:wn,TextBlock:se},Tn=i((({className:e,onClick:t,ariaLabel:r})=>n("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":r,children:Dn()}))),Dn=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[n("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),n("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},jn=i((({className:e,context:t})=>{const i=t.useLikeService();return r("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,children:[n(Tn,{onClick:i.like,ariaLabel:"Поставить отметку «лайк»"}),n(Tn,{onClick:i.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:i.likeCount})]})})),Rn=i((({className:e,context:t,title:i,description:a="Блок в разработке..."})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${xe(e)} ${he(e)} `,children:r(ee,{context:t,title:i?n(s,{headingType:de(e),title:i,className:"whitespace-pre-wrap max-w-[600px]"}):null,children:[a?n(J,{className:"mt-4 max-w-[600px]",description:a}):null,n("figure",{className:"m-0 min-w-[600px]",children:_n()})]})}))),_n=(e=3)=>In(100,e).map((e=>Math.floor(e))).map(Ln),Ln=(e=100,t)=>n("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),In=(e,t)=>[e].concat(t>0?In(e/1.618,t-1):[]),Vn=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),Bn=i((({className:e,context:t,blocksRegistry:i,data:{style:a,blocks:l,slots:s={},likeControl:c,colorPalette:o="pc"},blockDecorator:m=Vn})=>{const{header:d}=s;return r("section",{className:`relative ${On(a)} ${e||""}`,"data-theme":o,children:[d?.blocks?.length?n("div",{className:`${On(d?.style)}`,children:d.blocks.map(((e,n)=>An({block:e,blockDecorator:m,blocksRegistry:i,context:t},n)))}):null,l?.length?n("div",{className:"container grid grid-cols-12 gap-1",children:l.map(((e,n)=>An({block:e,blockDecorator:m,blocksRegistry:i,context:t},n)))}):null,c&&n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(jn,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t})})]})}));function An({block:e,blockDecorator:t,blocksRegistry:r,context:i},a){const{type:l}=e;l&&l in r||console.warn(`No block with "${l}" is registered`);const s=r[l||"Placeholder"]||Rn;return t({blockClassName:On(e.style),block:e,render:e=>{const{version:t,content:r}=e.block;return n(s,{className:e.blockClassName,version:t,context:i,...r},`${l}-${a}`)}},`block-${a}`)}function On(e){return e?e.join(" "):""}const Gn=i((({HeadComponent:e,data:t,children:i})=>{const{title:a,main:l,og:s,twitter:c,jsonLd:o}=t,{description:m,keywords:d,canonical:h,robots:x}=l||{};return r(e,{children:[n("title",{children:a}),n("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),m&&n("meta",{name:"description",content:m}),d&&n("meta",{name:"keywords",content:d.join(",")}),x&&n("meta",{name:"robots",content:x.join(",")}),En(s),Fn(c),h&&n("link",{rel:"canonical",href:h}),o&&n("script",{type:"application/ld+json",children:o}),i]})}));function En(e){return e?Object.entries(e).map((([e,t])=>n("meta",{property:`og:${e}`,content:t},e))):null}function Fn(e){return e?Object.entries(e).map((([e,t])=>n("meta",{name:`twitter:${e}`,content:t},e))):null}function Hn(e){const{mobile:t,...n}=e;return t?{...n,...t,content:{...n.content,...t.content}}:e}function Mn(e){return e?.filter((e=>(e?.type||e?.mobile?.type||"")in Sn&&!e.mobile?.hidden)).map(Hn)}e.Blocks=Sn,e.ContentPage=Bn,e.ContentPageHead=Gn,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.Header=cn,e.Icon=m,e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(a)||"");if(e?.token)return e}catch(e){}try{const e=await fetch(`${t}/assist/v1/public/auth`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:n,name:r}=await e.json();return globalThis.localStorage.setItem(a,JSON.stringify({token:n,name:r})),{token:n,name:r}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...r){if(!r.length)return[];const{token:i}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:i},body:JSON.stringify({node_ids:r})}),{likes:a}=await n.json();return a||[]}catch(e){return console.error(e),[]}},like:async function(r){if(!r)return 0;const{token:i,name:a}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:i,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{likes:l}=await n.json();return l||0}catch(e){return console.error(e),0}},dislike:async function(r){if(!r)return 0;const{token:i,name:a}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:i,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{likes:l}=await n.json();return l||0}catch(e){return console.error(e),0}}}},e.joinList=function(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])},e.normalizePage=function(e){if(!e)return;const{blocks:t,slots:n}=e;return{...e,blocks:Mn(t),slots:n&&Object.keys(n).reduce(((e,t)=>({...e,[t]:{...n[t],blocks:Mn(n[t].blocks)}})),{})}},e.projectSettings=c,e.setup=t,e.url=B,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";const t=(e,n)=>{t._jsx=e,t._jsxs=n||e};t.vue=e=>{t(((t,{children:n,dangerouslySetInnerHTML:r,...i}={})=>{const a=Object.assign({},i,r?{innerHTML:r.__html}:{});return e(t,a,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),r=(...e)=>t._jsxs(...e),i=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:r,...i}=t||{},a=n?.slots?.default,l=r||a&&a();return e(Object.assign(i,l&&{children:l}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const a="likesToken";const l={h1:"text-m-title",h2:"text-m-title",h3:"text-m-title-md",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},s=i((e=>{const{className:t,headingType:r,title:i}=e;if(!r)return;return n(r,{className:`font-sans font-medium m-0 ${l[r]} ${t||""}`,children:i})})),c=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ENABLE_ASSIST(){return this._.ENABLE_ASSIST}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},o={none:"",primary:"text-primary-main"},m=i((({className:e="",name:t,alt:i=`Icon ${t}`,title:a=i,asSVG:l,color:s="primary",...m})=>{const d=`${c.CDN||""}icons/${t}.svg`;return l?r("svg",{className:`${o[s]} ${e}`,...m,"aria-hidden":"true",children:[a?n("title",{children:a}):null,i?n("desc",{children:i}):null,n("use",{href:`${d}#icon`,xlinkHref:`${d}#icon`})]}):n("img",{className:e,src:d,alt:i,title:a,...m,"aria-hidden":"true"})})),d=i((({className:e="",image:t,imageClassName:i})=>t?r("picture",{className:e,children:[t.sources?.length?t.sources.map((({src:e,format:t},r)=>n("source",{srcSet:e,type:x(t)},`${r}_${e}`))):null,h(t,i)]}):null)),h=(e,t="")=>{const r={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},i=e.title||"",a=e.alt||e.title;return n("img",{src:e.src,className:`m-auto ${t}`,alt:a,title:i,style:r,...e.size})};function x(e){return e?`image/${String(e)}`:void 0}const u={left:"text-left",center:"text-center",right:"text-right"},p={transparent:{background:"bg-transparent",text:"text-primary-text",description:"text-primary-text"},primary:{background:"bg-white",text:"text-primary-text",description:"text-primary-text"},secondary:{background:"bg-primary-main",text:"text-white",description:"text-white/80"}},g=i((({bgColorHeadline:e="transparent",className:t="",title:i,description:a,image:l,align:c="left"})=>{const o=p[e];return r("section",{className:`px-4 py-6 ${o.background} ${t}`,children:[i&&n(s,{headingType:"h2",className:`${o.text} ${u[c]}`,title:i}),a&&n("p",{className:`font-normal text-m-md ${o.description} ${u[c]} ${i?"mt-2.5":""}`,children:a}),l?.src&&n("div",{className:"mt-5 mx-auto flex justify-center",children:n(d,{image:l})})]})})),b=i((({children:e,activeIndex:t,indexFraction:r,showDots:i})=>{const a=e=>n=>{if(e===t)return;const r=n.currentTarget.parentElement?.previousElementSibling;r?.children[e]?.scrollIntoView({behavior:"smooth"})};return i&&e?.length?n("div",{className:"flex gap-2 mx-auto mt-5 w-fit",children:e?.map(((e,i)=>n("div",{onClick:a(i),className:"bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full",style:f(i,t,r),"aria-hidden":!0},String(i))))}):null})),f=(e,t,n)=>{if(e<t||e>t+1)return null;const r=1-n;return e===t?{opacity:""+(.3+.7*r),width:6+16*r+"px"}:{opacity:""+(.3+.7*n),width:6+16*n+"px"}},N=i((({className:e="",children:t,...r})=>n("div",{className:`snap-center snap-always min-w-full box-border ${e}`,role:"listitem",...r,children:t}))),y=e=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e}px`}),v=i((({className:e="",children:t,activeIndex:r,onScroll:i,gap:a=14,padding:l=16})=>n("div",{className:`overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...y(l),gap:`${a}px`},role:"list",onScroll:i,children:t?.length?t?.map(((e,t)=>n(N,{style:y(l/4),"aria-current":Boolean(r===t),children:e},String(t)))):n(N,{children:t})}))),w=i((({className:e,context:t,children:i,gap:a=14,padding:l=16,showDots:s=!0,onSlideChange:c})=>{const[o,m]=t.useState(0),[d,h]=t.useState(0),x={activeIndex:o,indexFraction:d,showDots:s,children:i};return r("div",{className:e,children:[n(v,{gap:a,padding:l,activeIndex:o,onScroll:e=>{const{scrollLeft:t,clientWidth:n,childElementCount:r,scrollWidth:i,children:s}=e.currentTarget,d=s[0].offsetWidth-l/2,x=(({gap:e,padding:t,clientWidth:n,scrollWidth:r,childElementCount:i,itemWidth:a})=>{const l=a+e,s=r-n,c=n-e-t,o=i-2,m=new Array(i).fill(0).map(((e,t)=>0===t||t===o?[t>0?s-c:0,t>0?s:c]:[(t-1)*l+c,t*l+c]));return m[i-1]=[s,r],m})({gap:a,padding:l,clientWidth:n,scrollWidth:i,childElementCount:r,itemWidth:d}),{index:u,fraction:p}=((e,t)=>{const n=t.findIndex((([t,n])=>t<=e&&e<n));if(n<0)return{index:n,fraction:0};const[r,i]=t[n];return{index:n,fraction:(e-r)/(i-r)}})(t,x);u!==o&&c&&c(),m(u),h(p)},children:i}),n(b,{...x})]})})),k=i((({className:e,iconClassName:t,textClassName:i,suffixClassName:a,doc:l,icon:s})=>{const{text:c,fileSize:o,...d}=l;return r("a",{className:e,role:"link",...d,children:[s?n(m,{className:t,name:s,width:"24px",height:"24px",asSVG:!0}):null,c?r("span",{className:i,children:[c,n("span",{className:a,children:d?.href&&$(C(d.href),o)})]}):null]})})),$=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),C=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},S=i((({className:e="",doc:t,icon:r})=>n(k,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:r}))),T=i((({context:e,hasBorder:t=!0,documents:r,icon:i})=>n(w,{context:e,className:"text-m-sm text-primary-main",children:r?.length?r.map(((e,r)=>n(S,{className:t?"rounded-md border-main-stroke border p-4":"",doc:e,icon:i},String(r)))):null}))),D=i((({hasBorder:e=!0,documents:t,icon:r})=>n("div",{className:"text-m-sm text-primary-main flex flex-col "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,i)=>n("div",{role:"listitem",children:n(S,{className:e?"rounded-md border-main-stroke border p-4":"",doc:t,icon:r})},String(i)))):null}))),j=i((({className:e="",context:t,title:i,subtitle:a,icon:l="DocIconMonoColor",documents:c,listMode:o="vertical",hasBorder:m=!0})=>r("section",{className:`font-sans text-primary-text py-6 px-4 bg-white ${e}`,children:[i?n(s,{headingType:"h2",className:"text-center "+(a?"mb-2":"mb-5"),title:i}):null,a?n("h3",{className:"mt-0 font-normal mb-5 text-center text-m-md",children:a}):null,"vertical"===o?n(D,{hasBorder:m,documents:c,icon:l}):n(T,{context:t,hasBorder:m,documents:c,icon:l})]}))),R=i((({className:e="",title:t,image:i,benefits:a})=>r("section",{className:`relative font-sans text-primary-text bg-white p-14 ${e}`,children:[n(s,{headingType:"h2",className:"text-center",title:t}),r("div",{className:"flex justify-center mt-9",children:[i?.src&&n(d,{className:"mr-6",image:i}),a?.length?n("div",{className:"flex flex-col",children:a.map(_)}):null]})]})));function _(e,t){return r("div",{className:"flex flex-row mb-8",children:[e.icon&&n(m,{className:"w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]",name:e.icon,width:"48",height:"48",asSVG:!0}),r("div",{className:"flex gap-1 flex-col h-full ml-5 max-w-[490px]",children:[e.label&&n("div",{className:"font-medium text-primary-text text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const L=e=>e?.includes("//"),I=e=>(e||"").replace(/\/?\?.*/,""),V=e=>{if(!e||!L(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t};var B=Object.freeze({__proto__:null,isURL:L,withoutQuery:I,getOrigin:V});const A="/mobile",O=(e,t)=>{if(!e)return e;const n=V(t?.href);return n?e.replace(n,"")||"/":e},G=e=>e;function E({router:e,handlerDecorator:t=G},n){const r=((e,t)=>{if(!e)return e;const n=O(e,t)||"",r=t?.pathname.startsWith(A);return r&&!L(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:r,ariaLabel:n.text,onClick:t((t=>{const i=r&&!L(r),a=!n.target||"_self"===n.target;i&&a&&(t.preventDefault(),e.push(r))}),n)}}const F=i((e=>{const{text:t,aboveText:i,appendLeft:a}=e;return r("div",{className:H(e),children:[a||null,M(e)?r("div",{children:[n("div",{className:"text-m-2xs text-left",children:i}),n("div",{className:"text-m-button font-medium text-left",children:t})]}):null]})})),H=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const i="px-8 gap-2 "+(n?"py-2":"py-3.5");return["flex items-center justify-center",M(e)?i:"h-12 w-12",r?"rounded-full":""].join(" ")},M=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),P={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active",link:"text-primary-main"},Z={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},z="w-full text-center font-sans select-none",W=i((({className:e,text:t,aboveText:r,appendLeft:i,href:a,target:l,onClick:s,children:c,disabled:o,rounded:m,version:d="primary",ariaLabel:h,...x})=>{const u=c??n(F,{text:t,aboveText:r,appendLeft:i,rounded:m,version:d});return o?n("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:"-1",className:`inline-block ${z} ${Z[d]||""} ${m?"rounded-full":"rounded-md"} ${e||""}`,children:u}):n("a",{className:`${z} inline-block cursor-pointer no-underline ${P[d]||""} ${m?"rounded-full":"rounded-md"} ${e||""}`,href:a,target:l,onClick:s,"aria-label":h,role:a?"link":"button",...x,children:u})})),U=i((({context:e,className:t="",buttons:r})=>{const{handlerDecorator:i}=e,a=e.useRouter();return r?.length?n("div",{className:`${t}`,children:r.map(((e,t)=>function({icon:e,...t},r){if(!t?.text)return;return n(W,e?{appendLeft:n(m,{name:e,width:"24",height:"24",asSVG:!0}),...t}:{...t},String(r))}(E({router:a,handlerDecorator:i},e),t)))}):null}));const J=i((e=>{const{className:t="",description:r}=e;return n("div",{className:`font-normal text-base ${t}`,children:r})})),K={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},Q={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},X=i((({className:e="",isDotted:t=!0,children:i,version:a="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:Y(a)}),n("span",{className:`text-m-md ${K[a]}`,children:i})]}))),Y=e=>`rounded-full inline-block mr-3 mt-2 ${Q[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,q=i((e=>{const{className:t="",itemClassName:r,isDotted:i,items:a,version:l}=e;return n("section",{className:`${t}`,role:"list",children:a?.length?a.map(((e,t)=>n(X,{className:r,isDotted:i,version:l,children:e},String(t)))):null})})),ee=i((({className:e="",title:t,children:i,buttons:a,image:l})=>r("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,r("div",{className:"flex grow w-full justify-between",children:[r("div",{className:"flex flex-col justify-between w-full",children:[n("div",{children:i}),a?n("div",{children:a}):null]}),l]})]}))),te={primary:"text-primary-text",secondary:"text-white"},ne={primary:"text-secondary-text",secondary:"text-white"};const re=i((({className:e="",context:t,title:i,headingType:a="h2",description:l,benefits:c,buttons:o,image:d,items:h,version:x="primary"})=>r("div",{className:`w-full text-primary-text ${e}`,children:[n("div",{children:r(ee,{context:t,title:i&&n(s,{headingType:a,title:i,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:o?.length?n(U,{context:t,buttons:o,className:"flex flex-col mt-5 gap-2.5"}):null,children:[l?n(J,{className:"mt-3 text-m-md",description:l}):null,c?.filter((e=>e.label))?.length?n("div",{className:"mt-3",children:c.map(((e,t)=>function(e,t,i){return r("div",{className:"flex gap-3 items-center mb-2.5 last:mb-0",children:[e.icon&&n(m,{className:"w-6 h-6 rounded-full box-border",name:e.icon,width:"24",height:"24",asSVG:!0}),n("div",{className:`font-medium text-m-title-xs m-0 ${te[i]}`,children:e.label}),e.description&&n("div",{className:`font-normal text-m-sm ${ne[i]}`,children:e.description})]},String(t))}(e,t,x)))}):null,h?.length?n(q,{className:"mt-3",items:h}):null]})}),ie(d)]})));function ie(e){return e?.src?n("div",{className:"mt-5",children:n(d,{image:{className:"block",...e}})}):null}const ae=i((e=>{const{className:t}=e;return n("section",{className:`font-sans bg-white px-4 py-6 ${t||""}`,children:n(re,{...e})})})),le={primary:{background:"bg-white",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"},secondary:{background:"bg-primary-main",icon:"bg-white text-primary-main",title:"text-white",description:"text-white"},"secondary-light":{background:"bg-primary-main/10",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"}},se=i((({title:e,description:t,blockVersion:i="primary",iconVersion:a,image:l,className:s="",items:c,isDotted:o=!0})=>{const m=le[i];return r("section",{className:`font-sans px-4 py-[18px] flex flex-col ${m.background} ${s}`,children:["small"===a?ce(m.icon):null,"big"===a?oe(l):null,r("div",{className:"py-0.5",children:[e?n("div",{className:`font-medium text-base mb-1 ${m.title}`,children:e}):null,t?n("div",{className:`text-sm ${m.description}`,children:t}):null,c?.length?n(q,{className:"mt-1",items:c,isDotted:o,version:-1!==i.indexOf("secondary")?"secondary":"gray"}):null]})]})}));function ce(e){return n("div",{className:"mb-3",children:n("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function oe(e){return e?.src?n(d,{className:"pb-3 mr-auto",image:e}):null}const me=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function de(e=""){const t=me(e);return t<=4?"h4":t<=8?"h3":"h2"}function he(e=""){const t=me(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function xe(e=""){const t=me(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const ue={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},pe=i((e=>{const{context:t,title:i,description:a,items:l,children:c,buttons:o,image:m,className:h="",version:x="primary",role:u}=e;return n("section",{className:`overflow-hidden font-sans p-9 box-border ${h} ${ue[x]} ${xe(h)} ${he(h)} `,role:u,children:r(ee,{context:t,title:i&&n(s,{headingType:de(h),title:i,className:`whitespace-pre-wrap max-w-[600px] ${i?"mb-3":""}\n ${"primary"===x?"text-primary-text":""}`}),buttons:o?.length?n(U,{context:t,buttons:o,className:"flex mt-9 gap-3"}):null,image:m?.src&&n(d,{className:"mt-auto ml-7",image:m}),children:[a&&n(J,{className:"mt-4 max-w-[600px]",description:a}),c,ge(l,x)]})})}));function ge(e,t){return e?.length?n(q,{items:e,version:t}):null}const be={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},fe=i((({context:e,className:t="",title:i,description:a,benefits:l,buttons:c,image:o,version:m="primary"})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${t} ${be[m]} ${xe(t)} ${he(t)} `,children:r(ee,{context:e,title:i&&n(s,{headingType:de(t),title:i,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:c?.length?n(U,{context:e,buttons:c,className:"flex mt-9 gap-3"}):null,image:o?.src&&n(d,{className:"mt-auto ml-7",image:o}),children:[a&&n(J,{className:"mt-4 max-w-[600px]",description:a}),r("div",{className:"flex mt-5 mb-1",children:[l?.length?n("div",{className:"mr-8",children:l.map(Ne)}):null,l?.length?n("div",{className:"pt-1",children:l.map(((e,t)=>function(e,t,r="primary"){return n("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[r]}`,children:e.description},String(t))}(e,t,m)))}):null]})]})})));function Ne(e,t){return n("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.label},String(t))}const ye={primary:"bg-white",secondary:"bg-primary-main text-white"},ve=i((({context:e,title:t,description:i,cards:a=[],className:l,isScroll:c=!0})=>r("section",{className:`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${l}`,children:[r("div",{className:"flex flex-col items-center mb-5",children:[t?n(s,{headingType:"h3",className:"text-center "+(i?"mb-2":"mb-5"),title:t}):null,i?n("div",{className:"font-normal text-m-md max-w-[600px] text-center mb-5",children:i}):null]}),we(c,a,e)]})));function we(e,t,r){return e?n(w,{context:r,children:t?.map(ke)}):n("div",{className:"grid gap-[14px]",children:t?.map(ke)})}function ke(e,t){return r("div",{className:`h-full justify-between box-border horizontal-list-item border-solid border rounded-md border-main-stroke p-4 flex flex-col\n ${ye[e.version??"primary"]}`,children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(d,{className:"mb-3.5",image:e.image})}):null,e.title?n("h3",{className:"font-medium text-m-title-xs m-0",children:e.title}):null,e.description?$e(e):null,e.items?.length?Ce(e.items,e.version):null]}),e?.button?.text?(i=e.button,n(W,{className:"mt-3",appendLeft:i?.icon&&n(m,{name:i?.icon,width:"24px",height:"24px",asSVG:!0}),...i})):null]},t);var i}function $e(e){return n("div",{className:"text-secondary-text mt-1 text-m-sm "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}function Ce(e,t="primary"){return n("section",{className:"mt-3",children:e.map(((e,i)=>r("div",{children:[n("span",{className:"text-m-md font-medium",children:e.title}),n("span",{className:"text-m-sm pl-2 "+("primary"===t?"text-secondary-text":""),children:e.text})]},String(i))))})}const Se=i((({className:e,viewBox:t,fill:r="none",width:i,height:a,paths:l,...s})=>n("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:r,width:i,height:a,children:l.map((({d:e,fill:t,...r},i)=>n("path",{d:e,fill:t||"currentColor",...s,...r},i)))}))),Te=[{d:"m9 12 4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",fill:"none"},{d:"M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z"}],De=i((({className:e,disabled:t,...r})=>n(W,{rounded:!0,className:`shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...r,children:n(Se,{paths:Te,viewBox:"0 0 16 16",fill:"none",width:"16",height:"16"})}))),je={primary:"bg-white text-secondary-text",secondary:"bg-primary-main text-white"},Re={normal:3,mini:4},_e={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Le={normal:380,mini:276},Ie={primary:"text-secondary-text",secondary:"text-white",gray:"text-secondary-text"},Ve={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},Be=i((({className:e="",isDotted:t=!0,text:i,children:a,version:l="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:Ae(l)}),n("span",{className:Ie[l],children:i||a})]}))),Ae=e=>`rounded-full inline-block mr-3 mt-2 ${Ve[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,Oe=i((({title:e,description:t,image:i,items:a,button:l,version:s})=>{const c=function(e,t,n){return`font-medium text-xl m-0\n ${"secondary"!==e?"text-primary-text":""}\n ${t||n?.length?"":"text-center"}\n `}(s,t,a);return r("div",{children:[r("div",{children:[i?.src?n("div",{className:"flex justify-center",children:n(d,{className:"mb-6",image:i})}):null,e?Ee(e,c):null,t?n("div",{className:"font-normal text-sm "+(e?"mt-2":""),children:t}):null,a?.length?Fe(a,s):null]}),l?.text?Ge(l):null]})}));function Ge(e){return n(W,{className:"mt-6 w-full",appendLeft:e.icon&&n(m,{name:e.icon,width:"24px",height:"24px",asSVG:!0}),...e})}function Ee(e,t){return n("div",{className:`font-medium text-xl m-0 ${t}`,children:e})}function Fe(e,t){return n("section",{className:"max-w-[308px] mt-2",role:"list",children:e.filter((e=>e?.text)).map(((e,r)=>function(e,t,r){return n(Be,{version:r??"primary",children:n("span",{className:"text-sm",children:e})},String(t))}(e.text,r,t)))})}const He=i((({context:e,title:t,description:i,cards:a=[],version:l="normal",activeCardIndex:c})=>r("div",{children:[n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"}),r("div",{className:"flex flex-col items-center mb-8",children:[t?n(s,{headingType:"h2",className:"text-center",title:t}):null,i?n("div",{className:"font-normal text-base max-w-[600px] mt-2.5",children:i}):null]}),n("div",{className:`flex ${a?.length<=Re[l]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${c*Le[l]}px)`},role:"list",children:a?.map(((t,r)=>function({card:e,version:t},r){return n("section",{className:`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between\n items-stretch ${_e[t]} ${je[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:n(Oe,{...e})},String(r))}({card:t,version:l,context:e},r)))})]})));const Me=i((({context:e,cards:t=[],className:i="",version:a="normal",...l})=>{const[s,c]=e.useState(0),o=t?.length>Re[a],m=o&&t?.length-s>Re[a],d=o&&s>0;return r("section",{className:`relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${i}`,children:[n(He,{context:e,cards:t,version:a,activeCardIndex:s,...l}),d&&n(De,{className:"absolute top-1/2 left-8 rotate-180 z-10 mt-[25px]",onClick:()=>c(s-1),ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}),m&&n(De,{className:"absolute top-1/2 right-8 z-10 mt-[25px]",onClick:()=>c(s+1),ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}),n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white"}),n("div",{className:"absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white"})]})})),Pe=i((e=>n(Me,{...e,version:"mini"}))),Ze=i((({className:e="",documents:t})=>n("section",{className:`font-sans bg-white mt-[10px] ${e}`,children:n("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?ze(t):null})}))),ze=e=>e.map(((e,t)=>{const{text:r,...i}=e;return n("li",{className:"mb-4 list-none",children:n("a",{className:"hover:text-primary-main",role:"link",...i,children:r||null})},`list_item_${String(t)}`)})),We={Headline:g,LinkDocs:j,TextBlock:se,PictureText:R,ProductBlock:ae,Tile:pe,ProductTile:fe,Gallery:ve,MiniGallery:Pe,LinkList:Ze},Ue=({blocks:e,context:t,className:n,columns:r})=>e?.length?e.map(Je({context:t,className:n,columns:r})):null,Je=({context:e,columns:t,className:r})=>(i,a)=>{const l=i?.blockListType;if(!l||!(l in We))return null;return n("div",{className:`${r} ${2===t?"w-1/2":""}`,children:n(We[l],{context:e,...i,className:"!p-0"})},`block_${a}`)},Ke=i((({blocks:e,context:t})=>n("div",{className:"transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0",children:Ue({context:t,className:"mb-5 last:mb-0 first:mt-2",columns:1,blocks:e})}))),Qe=i((({label:e,blocks:t,bordered:i,context:a})=>{const{hasContent:l,icon:s,handleToggle:c}=(({context:e,blocks:t})=>{const[n,r]=e.useState(!1),i=t?.length;return{isActive:n,hasContent:i,icon:n?"MinusIcon":"PlusIcon",handleToggle:e=>{if(!i)return;r(!n);const t=(({currentTarget:e})=>e.nextSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:a,blocks:t});return r("li",{className:(i?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0")+" border-solid border-main-divider",children:[r("button",{className:`border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text\n ${i?"":"py-[14px] px-0"}\n ${l?"group cursor-pointer":""}`,onClick:c,children:[n("span",{className:"text-m-title-xs pr-2.5 font-medium "+(l?"group-hover:text-primary-main":""),children:e}),l?n(m,{name:s,width:"24",height:"24",asSVG:!0}):null]}),l?n(Ke,{blocks:t,context:a}):null]})})),Xe=i((({title:e,description:t,accordionItems:i,context:a,className:l="",bordered:c})=>r("section",{className:`py-6 px-4 font-sans bg-white text-primary-text ${l}`,children:[e?n(s,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?n("div",{className:"mb-5 text-m-md text-center",children:t}):null,i?.length?n("ul",{className:"list-none m-0 p-0",children:i.map(((e,t)=>n(Qe,{...e,context:a,bordered:c},`AccordionItem${t}`)))}):null]}))),Ye=i((({icon:e,image:t,title:i,subtitle:a,isFillGradient:l})=>r("div",{role:"columnheader",scope:"col",children:[e&&n(m,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",name:e,width:"63",height:"63"}),t?.src&&n("div",{className:"mb-3.5",children:n(d,{image:t})}),i&&n(s,{headingType:"h4",className:""+(l?"text-white":""),title:i}),a&&n("div",{className:"text-m-sm mb-3.5 "+(l?"text-white":"text-secondary-text/80"),children:a})]}))),qe=i((({cell:e,rowHeader:t,isFillGradient:r=!1})=>n("div",{className:"box-border flex flex-col",role:"cell",children:n("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(et(r,t))})}))),et=(e,t)=>({label:i,description:a},l)=>r("div",{className:"flex justify-between text-m-sm py-3.5",children:[n("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),r("div",{className:"basis-1/2",children:[i&&n("div",{className:"text-right "+(e?"text-white":""),children:i}),a&&n("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:a})]})]},String(l)),tt=i((({header:e,columnData:t,visibleRowLength:i=0,isFillGradient:a,showRow:l,onToggleColumn:s})=>{const c=t?.slice(0,l?t.length:i),o=a?"secondary":"primary";return r("div",{className:`border border-main-stroke rounded-md p-4 mb-3.5 ${a?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[n(Ye,{...e,isFillGradient:a}),c?.length?c.map((({rowHeader:e,cell:t},r)=>n(qe,{cell:t,rowHeader:e,isFillGradient:a},String(r)))):null,l&&nt({header:e,buttonVersion:o}),rt({onToggleColumn:s,isFillGradient:a,showRow:l})]})})),nt=({header:e,buttonVersion:t})=>n(W,{href:e.link.href,target:e.link.target,version:t,className:"font-medium text-m-sm mt-4 py-[11px]",children:e.link.text}),rt=({onToggleColumn:e,isFillGradient:t,showRow:r})=>n("div",{className:"mt-5",role:"cell",children:n("a",{role:"link",onClick:e,className:"font-medium text-m-sm cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:r?"Скрыть":"Показать описание"})}),it=i((({className:e,context:t,title:i,rowHeaders:a,columns:l,visibleRowLength:c=0,isColoredFirstColumn:o=!1,useSwiper:m=!1})=>{const d=l?.map((({data:e,header:t})=>({header:t,column:e?.map(((e,t)=>({cell:e,rowHeader:a?.[t]?.title})))})))||[],[h,x]=t.useState(new Array(l?.length).fill(!c));return r("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${e||""}`,children:[i&&n(s,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:i}),at({tableData:d,context:t,visibleRowLength:c,isColoredFirstColumn:o,columnsViewState:h,handleToggleColumn:e=>{h[e]=!h[e],x([...h])},useSwiper:m,setColumnsViewState:x})]})})),at=({context:e,tableData:t,visibleRowLength:r,isColoredFirstColumn:i,columnsViewState:a,handleToggleColumn:l,useSwiper:s,setColumnsViewState:c})=>n("div",{role:"table",children:t?.length?s?n(w,{context:e,onSlideChange:st(a,c),children:t.map(lt({context:e,visibleRowLength:r,isColoredFirstColumn:i,columnsViewState:a,handleToggleColumn:l}))}):t.map(lt({context:e,visibleRowLength:r,isColoredFirstColumn:i,columnsViewState:a,handleToggleColumn:l})):null}),lt=({context:e,visibleRowLength:t,isColoredFirstColumn:r,columnsViewState:i,handleToggleColumn:a})=>(l,s)=>n(tt,{context:e,visibleRowLength:t,showRow:i[s],header:l.header,columnData:l.column,isFillGradient:0===s&&r,onToggleColumn:()=>a(s)},String(s)),st=(e,t)=>()=>{t(new Array(e.length).fill(!1))};async function ct(){try{const e=await fetch(ot);return await e.json()}catch(e){console.error(e)}}const ot="/api/v1/exchangerates.json",mt=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),dt=e=>e?mt.format(e):"",ht="text-left font-normal text-sm text-secondary-text",xt={USD:"DollarIcon",EUR:"EuroIcon"},ut=i((({className:e,exchangeCurrencyItems:t})=>r("table",{className:`h-fit w-fit ${e}`,children:[n("thead",{children:r("tr",{children:[n("th",{className:ht,children:"Валюта"}),n("th",{className:`${ht} pl-11`,children:"Купить"}),n("th",{className:`${ht} pl-11`,children:"Продать"})]})}),n("tbody",{children:t.map((e=>pt(e)))})]}))),pt=e=>{const t=e?.currency?.currency;return r("tr",{children:[n("td",{className:"pt-4",children:r("div",{className:"flex items-center",children:[t?n(m,{name:xt[t],width:"24",height:"24"}):null,n("span",{className:"ml-2",children:t})]})}),n("td",{className:"pt-4 pl-11",children:dt(e.buyExchangeRate)}),n("td",{className:"pt-4 pl-11",children:dt(e.saleExchangeRate)})]},t)},gt=i((({className:e="",address:t,distance:i})=>r("div",{className:`flex text-sm ${e}`,children:[n(m,{className:"min-w-fit",name:"GpsIcon",width:"24",height:"24",asSVG:!0}),r("div",{className:"ml-1.5",children:[t?n("p",{className:"m-0",children:t}):null,i?r("p",{className:"text-secondary-text m-0",children:["Курс указан для ближайшего офиса - ",i]}):null]})]}))),bt=i((({className:e="",id:t,name:r,type:i="text",placeholder:a})=>n("input",{className:e,id:t,name:r||t,type:i,placeholder:a}))),ft=i((({className:e="",id:t,name:r,children:i})=>n("select",{className:e,id:t,name:r||t,children:i}))),Nt=i((({className:e="",value:t,children:r})=>n("option",{className:e,value:`${t}`,children:r}))),yt=i((({codes:e,className:t=""})=>r("div",{className:`grid gap-3.5 ${t}`,children:[vt("Хочу продать",e),vt("Получу",e),n(W,{className:"box-border mt-3.5 py-3 h-12 w-44",version:"primary",href:"#",children:"Купить валюту"})]})));function vt(e,t){return r("div",{className:"flex items-center",children:[n(bt,{className:"h-10 border pl-2.5 rounded-md text-m-sm w-full appearance-none",type:"number",placeholder:`${e}`}),t.length?n(ft,{className:"h-9 -translate-x-16",children:t.map(((e,t)=>n(Nt,{value:e,children:e},String(t))))}):null]})}const wt=["USD","EUR"],kt=["RUB","USD","EUR"],$t=[{buyExchangeRate:90.6,saleExchangeRate:92.8,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:73.75,saleExchangeRate:75.95,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],Ct={address:"Москва, ул.Ленина д.28",distance:"6км"},St=i((({className:e="",context:t,title:i="Курсы обмена валют"})=>{const a=function(e){const{data:t}=e(ot,ct);return t||{}}(t.useAsyncData)?.exchangeRate?.currencies?.filter((e=>-1!==wt.indexOf(e?.currency?.currency||"")))||$t;return n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,children:n(ee,{context:t,title:n(s,{headingType:de(e),title:i,className:"whitespace-pre-wrap mb-3"}),children:r("div",{className:"flex",children:[r("div",{className:"mr-20 pt-3",children:[a?n(ut,{className:"mb-7",exchangeCurrencyItems:a}):null,n(gt,{...Ct})]}),a?.length?n(yt,{className:"grow",exchangeCurrencyItems:a,codes:kt}):null]})})})})),Tt=["m13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z","M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z","M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z","M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z","M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z"],Dt={"bg-white":"text-primary-main",transparent:"text-white"},jt={"bg-white":"text-black",transparent:"text-white"},Rt=i((({className:e="",href:t,children:i,targetBlank:a,bgColor:l="bg-white",hideTitle:s})=>r("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"https://rshb.ru/",target:a?"_blank":"_self","aria-label":"Россельхозбанк",children:[n(Se,{className:`${Dt[l]} w-10 h-[38px]`,viewBox:"0 0 40 45",paths:Tt.map((e=>({d:e})))}),!s&&n("span",{className:`${jt[l]} text-sm font-medium ml-2.5`,children:i||"Россельхозбанк"})]}))),_t=i((({className:e,title:t="Мобильное приложение",description:i,href:a="#"})=>n("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light ${e||""}`,children:a?r("div",{className:"flex",children:[n("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]",children:n(Rt,{className:"w-[33px]",bgColor:"transparent",hideTitle:!0})}),r("a",{href:a,target:"_blank",className:"flex flex-col justify-center pl-3",children:[n("div",{className:"text-m-button font-medium mb-[3px]",children:t}),n("div",{className:"text-m-button text-secondary-text",children:i})]})]}):null}))),Lt=i((({className:e,items:t,hasButton:i,context:a})=>{const l=a.useRouter(),{handlerDecorator:s}=a;return r("div",{className:`flex flex-col ${e||""}`,children:[t?.length?t.map(It):null,i?n(W,{version:"primary",className:"mt-0.5 mb-5",...E({router:l,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),It=(e,t)=>{const{type:i,text:a,description:l}=e;return r("div",{className:"mb-3.5",children:[n("div",{children:Vt(i,a)}),n("div",{className:"font-sans text-sm text-secondary-text",children:l})]},String(t))},Vt=(e,t="")=>{switch(e){case"tel":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`tel:${Bt(t)}`,children:t});case"email":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},Bt=e=>e.replaceAll(/\D/g,""),At=i((({title:e,links:t,className:i="",context:a})=>{const l=a.useRouter(),{handlerDecorator:s}=a;return r("div",{className:i,children:[n("span",{className:"text-primary-text font-sans font-medium text-sm",children:e}),t?.length?n("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>n(Ot,{index:t,...E({router:l,handlerDecorator:s},e)},String(t))))}):null]})})),Ot=i((({className:e="",index:t,text:r,href:i,target:a,onClick:l})=>n("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:i,target:a,onClick:l,children:r||`Документ ${t}`}))),Gt=[{origins:["t.me","telegram.org"],icon:"TelegramIcon",label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:"VKIcon",label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:"OkIcon",label:"Одноклассники",width:"12px",height:"20px"}],Et=i((({href:e})=>{const{icon:t,width:r,height:i,label:a}=Gt.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};return t?n("a",{className:"flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[38px] h-[38px] hover:text-primary-main",href:e,"aria-label":a,target:"_blank",rel:"noopener noreferrer",children:m&&n(m,{name:t,width:r,height:i,asSVG:!0,className:"block",color:"none"})}):null})),Ft=i((({className:e,media:t,context:r})=>{const i=r.useRouter(),{handlerDecorator:a}=r;return n("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e||""}`,children:t?.map(((e,t)=>n(Et,{...E({router:i,handlerDecorator:a},e)},String(t))))})})),Ht=i((({className:e,links:t,context:i})=>{const a=i.useRouter(),{handlerDecorator:l}=i;return r("div",{className:`${e||""}`,children:[n("div",{className:"py-6",children:n("span",{className:"font-sans font-normal text-xs text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?n("div",{className:"flex flex-col justify-start items-start gap-2",children:t.map(((e,t)=>n(Mt,{index:t,...E({router:a,handlerDecorator:l},e)},String(t))))}):null]})})),Mt=i((({className:e,index:t,text:r,href:i,target:a,onClick:l})=>n("a",{className:`font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:i,target:a,onClick:l,children:r||`Документ ${t}`})));function Pt(e){const{data:t}=e(zt(),Zt);return t||{}}async function Zt(){const e=await fetch(zt());return await e.json()}function zt(){return`/wcms-resources/${c.SITEMAP||"sitemap"}.json`}const Wt=i((({className:e,context:t})=>{const{term:i,setTerm:a}=t.useSearch();return r("form",{className:`relative ${e||""}`,children:[r("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[n("div",{className:"w-[20px] h-[20px]",children:n(m,{name:"LoupeIcon",width:"24",height:"24"})}),!i&&n("label",{htmlFor:"search-bar-input",className:"font-sans font-normal text-sm text-secondary-text",children:"Поиск по сайту"})]}),n("input",{id:"search-bar-input",className:"h-12 pl-12 w-full peer placeholder-transparent font-sans font-normal text-base text-black border border-solid rounded box-border outline-none pr-[6%] border-main-divider focus:border-primary-text",value:i,onChange:e=>a(e.target.value),type:"text",name:"search-bar-input",placeholder:"some search"}),n("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer",onClick:e=>{e.preventDefault(),a("")},children:n(m,{name:"CloseIcon",width:"24",height:"24"})})]})})),Ut=e=>e?.map((e=>({label:e.text||"",blocks:[{accordionBlockType:"LinkList",documents:e.items||[]}]}))),Jt=i((({className:e="",documents:t,relatedEnterprises:i,contacts:a,socialMedia:l,context:s,horizontalNavigationTitle:c})=>{const o=Pt(s.useAsyncData),m=o?.dispositions;return r("footer",{className:`px-4 py-[26px] bg-white ${e}`,children:[n(Lt,{className:"overflow-hidden",items:a,context:s,hasButton:!0}),n(Xe,{context:s,className:"!p-0 mb-4",accordionItems:Ut(o.topItems)}),n("div",{children:m?.map(Kt)}),n(_t,{context:s,title:"Мобильное приложение",description:"Загрузить для IOS и Android"}),n(Wt,{context:s,className:"grow"}),n(Ft,{className:"pb-4",media:l,context:s}),n(At,{title:c,links:i,context:s}),n(Ht,{links:t,context:s})]})})),Kt=(e,t)=>{const{icon:i,href:a,text:l}=e;return r(W,{version:"link",href:a,className:"flex text-sm mb-4",children:[i?n(m,{className:"pr-1",name:i,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-2.5 font-medium text-primary-text",children:l})]},`footer-${t}`)},Qt=(e,t,n=((e,t)=>t.startsWith(e)))=>n(I(e),(e=>(e||"").replace(A,""))(I(L(e)?t.href:t.pathname))),Xt=e=>t=>Qt(t.href,e),Yt=e=>t=>t.items?.some(Xt(e))||Qt(t.href,e)||((e,t)=>V(e)===V(t.href))(t.href,e),qt=e=>t=>e?.href===t?.href,en=(e,t)=>{return(r=e,i=t,(r||[]).map((e=>i?.find(qt(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(qt(e))))));var n,r,i},tn="absolute left-0 -bottom-3 w-full h-[2px]",nn=i((({className:e,text:t,href:i,target:a,active:l,onClick:s,children:c,bgColor:o="bg-white"})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:i,target:a,onClick:s,children:[n("span",{className:rn(o,l),children:t||c}),l?n("div",{className:an(o,l)}):null]}))),rn=(e,t)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-secondary-text hover:text-primary-main"),`${n} font-sans font-normal text-sm`},an=(e,t)=>t?`${"bg-white"===e?"bg-primary-main":e} ${tn}`:tn,ln=i((({context:e,burgerSubMenu:t,onClick:i,defaultLocation:a="",children:l})=>{const[s,c]=e.useGeolocation(a);return r("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[n("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:i,children:n(m,{name:"CloseIcon",width:"24",height:"24",asSVG:!0})}),r("button",{onClick:c,className:"flex items-center text-sm text-secondary-text p-0 mb-4 bg-transparent cursor-pointer",children:[n(m,{name:"GeolocationIcon",width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),s]}),l,n("div",{className:"mb-7",children:t?.map(sn)}),n(Wt,{context:e,className:"grow"})]})})),sn=(e,t)=>{const{icon:i,href:a,text:l}=e;return r("a",{href:a,className:"flex text-sm mb-4 hover:text-primary-main",children:[i?n(m,{className:"text-primary-main pr-1",name:i,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-0.5 font-medium",children:l})]},`headerSubMenu-${t}`)},cn=i((({onClick:e,bgColor:t})=>r("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-[50px]",children:[r("div",{className:"flex items-center",children:[n("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:n(m,{name:"bg-white"===t?"BurgerIcon":"BurgerIconWhite",width:"24",height:"24",asSVG:!0})}),n(Rt,{bgColor:t})]}),n("button",{className:("bg-white"===t?"text-primary-main":"text-white")+" text-sm border-0 bg-transparent cursor-pointer",children:"Войти"})]}))),on=i((({className:e="",defaultLocation:t,bgColor:i="bg-white",context:a,topItems:l})=>{const s=a.useRouter(),c=Pt(a.useAsyncData),o=c?.dispositions,{handlerDecorator:m}=a,d=en(c.topItems,l).find(Yt(s))?.items,h=(e=>(t=[])=>{const n=t?.filter(Xt(e));var r;return n?.length?(r=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>r(e)>r(t)?e:t)))(n):null})(s)(d),[x,u]=a.useState(!1),p=()=>u(!x);return r("header",{className:`${i} ${e}`,children:[r("div",{className:"container px-4 py-0 box-border",children:[n(cn,{onClick:p,bgColor:i}),n("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]",children:n("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:d?.map(((e,t)=>mn({...E({router:s,handlerDecorator:m},e),active:e===h,bgColor:i},t)))})})]}),x?n(ln,{context:a,onClick:p,burgerSubMenu:o,defaultLocation:t,children:n(Xe,{context:a,accordionItems:Ut(c.topItems),className:"!p-0 mb-4"})}):null]})})),mn=(e,t)=>n(nn,{className:"mr-8 whitespace-nowrap text-sm",...e},String(t)),dn=i((({block:e,headingType:t,context:r})=>n("section",{className:"flex grow-0 shrink-0 basis-full px-4 pt-6",children:n("div",{className:"flex grow",children:n(re,{context:r,headingType:t||"h2",...e})})}))),hn=i((({className:e,context:t,slides:r=[]})=>{const i=r.map((e=>e.productBlock));return n("section",{className:`font-sans bg-white overflow-hidden w-100 pb-6 ${e||""}`,children:n(w,{context:t,children:i.map(((e,r)=>n(dn,{block:e,context:t},String(r))))})})})),xn={primary:{background:"bg-white",title:"text-primary-text",description:"text-secondary-text",iconBackground:"bg-secondary-light",iconConnector:"bg-secondary-light"},secondary:{background:"bg-primary-main",title:"text-white",description:"text-white/80",iconBackground:"bg-white/30",iconConnector:"bg-white"}},un=e=>xn[e],pn=i((({className:e,title:t,description:i,steps:a,size:l="normal",version:c="primary"})=>{const o=un(c);return r("section",{className:`box-border font-sans bg-white px-4 py-6 flex flex-col\n ${o.background} ${o.title} ${e||""}`,children:[t&&n(s,{headingType:"h3",className:`text-center ${o.title}`,title:t}),i&&n("p",{className:`text-m-md text-center ${o.description} ${t&&"mt-2"}`,children:i}),a?.length?n("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:n("div",{className:"flex flex-col justify-between gap-x-[101px]",children:a.map(((e,t)=>gn({step:e,size:l,i:t,length:a.length,version:c})))})}):null]})})),gn=e=>{const{step:t,size:i,i:a,length:l,version:s}=e,c=l-1===a,o="normal"===i?"ml-[34px]":"ml-[24px]",m=un(s);return n("div",{children:r("div",{className:"flex flex-row text-center relative",children:[r("div",{className:"overflow-hidden",children:[bn(e),!c&&n("div",{className:`min-h-8 h-full w-[2px] ${m.iconConnector} ${o}`})]}),r("div",{className:"flex flex-col justify-start relative",children:[t.label&&n("div",{className:"font-medium text-m-title-xs m-0 text-left",children:t.label}),t.description&&n("div",{className:`font-normal text-sm ${m.description} text-left ${t.label?"mt-1":""}`,children:t.description})]})]},String(a))},String(a))},bn=e=>{const{step:t,size:r,i:i,version:a}=e,l=un(a),s="normal"===r?"38":"27",c="normal"===r?"text-m-title":"text-m-title-xs";return n("div",{className:`${"normal"===r?"h-[70px] w-[70px] min-w-[70px] min-h-[70px]":"h-[50px] w-[50px] min-w-[50px] min-h-[50px]"} ${l.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:n("span",{className:`font-medium flex self-center ${l.title} ${c}`,children:t.icon&&n(m,{name:t.icon,width:s,height:s,asSVG:!0})||i+1})})},fn=i((({title:e,icon:t})=>r("div",{className:"flex gap-2.5 mb-2",children:[e?n(s,{headingType:"h3",className:"font-medium",title:e}):null,t?n(m,{className:"ml-auto max-w-6 max-h-6",name:t,width:"24px",height:"24px"}):null]}))),Nn=i((({header:e,data:t})=>r("div",{className:"rounded-md border-main-stroke h-full box-border border p-4",children:[n(fn,{...e}),t?.length?t.map(yn):null]}))),yn=({label:e,description:t,list:i,image:a,buttons:l},s)=>r("div",{children:[s>0&&n("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-2"}),e?n("div",{className:"text-m-sm m-0",children:e}):null,t?n("div",{className:"text-m-sm text-secondary-text mt-[3px]",children:t}):null,i?.items?.length?n("div",{className:"flex flex-col justify-between items-start",children:n("div",{role:"list",children:i.items.map(((e,t)=>n(Be,{className:"text-m-sm",text:e,version:"gray",isDotted:i.isDotted??!0},String(t))))})}):null,a&&n(d,{image:{...a,className:"m-0"}}),l?.length?n("div",{children:l.map((({icon:e,rounded:t,...r},i)=>n(W,{className:`mt-3 ${i>0&&t?"ml-2.5":""} ${e?"w-12 h-12":""}`,rounded:t,appendLeft:e&&n(m,{name:e,width:"24px",height:"24px",asSVG:!0}),...r,"aria-label":e},String(i))))}):null]},String(s)),vn=i((({tiles:e})=>n("div",{className:"flex flex-col gap-3.5",children:e.map(((e,t)=>n(Nn,{...e},String(t))))}))),wn=i((({tiles:e,context:t})=>n(w,{context:t,children:e.map(((e,t)=>n(Nn,{...e},String(t))))}))),kn=i((({className:e,context:t,title:i,description:a,columns:l,rowHeaders:c,orientation:o="vertical"})=>{const m=Cn(l),d=Sn(c,m);return r("section",{className:`px-4 py-6 bg-white font-sans text-primary-text ${e}`,children:[i?n(s,{headingType:"h2",className:"text-center "+(a?"mb-2":"mb-5"),title:i}):null,a?n("div",{className:"mb-5 text-center text-m-md",children:a}):null,d?.length?$n(o,d,t):null]})}));function $n(e,t,r){return"vertical"===e?n(vn,{tiles:t}):n(wn,{context:r,tiles:t})}const Cn=e=>e?.[0].data?e[0].data:[],Sn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),Tn={Accordion:Xe,ComparisonTable:it,ExchangeRateTile:St,Footer:Jt,Gallery:ve,Header:on,Headline:g,LinkDocs:j,LinkList:Ze,MobileAppTile:_t,ProductBlock:ae,ProductGallery:hn,StepsBlock:pn,TariffsTable:kn,TextBlock:se},Dn=i((({className:e,onClick:t,ariaLabel:r})=>n("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":r,children:jn()}))),jn=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[n("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),n("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Rn=i((({className:e,context:t})=>{const i=t.useLikeService();return r("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,children:[n(Dn,{onClick:i.like,ariaLabel:"Поставить отметку «лайк»"}),n(Dn,{onClick:i.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:i.likeCount})]})})),_n=i((({className:e,context:t,title:i,description:a="Блок в разработке..."})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${xe(e)} ${he(e)} `,children:r(ee,{context:t,title:i?n(s,{headingType:de(e),title:i,className:"whitespace-pre-wrap max-w-[600px]"}):null,children:[a?n(J,{className:"mt-4 max-w-[600px]",description:a}):null,n("figure",{className:"m-0 min-w-[600px]",children:Ln()})]})}))),Ln=(e=3)=>Vn(100,e).map((e=>Math.floor(e))).map(In),In=(e=100,t)=>n("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Vn=(e,t)=>[e].concat(t>0?Vn(e/1.618,t-1):[]),Bn=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),An=i((({className:e,context:t,blocksRegistry:i,data:{style:a,blocks:l,slots:s={},likeControl:c,colorPalette:o="pc"},blockDecorator:m=Bn})=>{const{header:d}=s;return r("section",{className:`relative ${Gn(a)} ${e||""}`,"data-theme":o,children:[d?.blocks?.length?n("div",{className:`${Gn(d?.style)}`,children:d.blocks.map(((e,n)=>On({block:e,blockDecorator:m,blocksRegistry:i,context:t},n)))}):null,l?.length?n("div",{className:"container grid grid-cols-12 gap-1",children:l.map(((e,n)=>On({block:e,blockDecorator:m,blocksRegistry:i,context:t},n)))}):null,c&&n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(Rn,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t})})]})}));function On({block:e,blockDecorator:t,blocksRegistry:r,context:i},a){const{type:l}=e;l&&l in r||console.warn(`No block with "${l}" is registered`);const s=r[l||"Placeholder"]||_n;return t({blockClassName:Gn(e.style),block:e,render:e=>{const{version:t,content:r}=e.block;return n(s,{className:e.blockClassName,version:t,context:i,...r},`${l}-${a}`)}},`block-${a}`)}function Gn(e){return e?e.join(" "):""}const En=i((({HeadComponent:e,data:t,children:i})=>{const{title:a,main:l,og:s,twitter:c,jsonLd:o}=t,{description:m,keywords:d,canonical:h,robots:x}=l||{};return r(e,{children:[n("title",{children:a}),n("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),m&&n("meta",{name:"description",content:m}),d&&n("meta",{name:"keywords",content:d.join(",")}),x&&n("meta",{name:"robots",content:x.join(",")}),Fn(s),Hn(c),h&&n("link",{rel:"canonical",href:h}),o&&n("script",{type:"application/ld+json",children:o}),i]})}));function Fn(e){return e?Object.entries(e).map((([e,t])=>n("meta",{property:`og:${e}`,content:t},e))):null}function Hn(e){return e?Object.entries(e).map((([e,t])=>n("meta",{name:`twitter:${e}`,content:t},e))):null}function Mn(e){const{mobile:t,...n}=e;return t?{...n,...t,content:{...n.content,...t.content}}:e}function Pn(e){return e?.filter((e=>(e?.type||e?.mobile?.type||"")in Tn&&!e.mobile?.hidden)).map(Mn)}e.Blocks=Tn,e.ContentPage=An,e.ContentPageHead=En,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.Header=on,e.Icon=m,e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(a)||"");if(e?.token)return e}catch(e){}try{const e=await fetch(`${t}/assist/v1/public/auth`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:n,name:r}=await e.json();return globalThis.localStorage.setItem(a,JSON.stringify({token:n,name:r})),{token:n,name:r}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...r){if(!r.length)return[];const{token:i}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:i},body:JSON.stringify({node_ids:r})}),{likes:a}=await n.json();return a||[]}catch(e){return console.error(e),[]}},like:async function(r){if(!r)return 0;const{token:i,name:a}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:i,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{likes:l}=await n.json();return l||0}catch(e){return console.error(e),0}},dislike:async function(r){if(!r)return 0;const{token:i,name:a}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:i,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{likes:l}=await n.json();return l||0}catch(e){return console.error(e),0}}}},e.joinList=function(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])},e.normalizePage=function(e){if(!e)return;const{blocks:t,slots:n}=e;return{...e,blocks:Pn(t),slots:n&&Object.keys(n).reduce(((e,t)=>({...e,[t]:{...n[t],blocks:Pn(n[t].blocks)}})),{})}},e.projectSettings=c,e.setup=t,e.url=B,Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -1,73 +1,4 @@
1
- import type { GalleryContent } from '../Gallery/GalleryContent';
2
- import type { HeadlineContent } from '../Headline/HeadlineContent';
3
- import type { LinkDocsContent } from '../LinkDocs/LinkDocsContent';
4
- import type { MiniGalleryContent } from '../MiniGallery/MiniGalleryContent';
5
- import type { PictureTextContent } from '../PictureText/PictureTextContent';
6
- import type { ProductBlockContent } from '../ProductBlock/ProductBlockContent';
7
- import type { ProductTileContent } from '../ProductTile/ProductTileContent';
8
- import type { TextBlockContent } from '../TextBlock/TextBlockContent';
9
- import type { TileContent } from '../Tile/TileContent';
10
- import type { LinkListContent } from '../LinkList/LinkListContent';
11
- /**
12
- * @title Тип блока
13
- */
14
- export declare type AccordionBlockType = 'Headline' | 'LinkDocs' | 'TextBlock' | 'PictureText' | 'Tile' | 'ProductTile' | 'ProductBlock' | 'Gallery' | 'MiniGallery' | 'LinkList';
15
- interface AccordionBlockDef {
16
- accordionBlockType: AccordionBlockType;
17
- }
18
- /**
19
- * @title Заголовок
20
- */
21
- export declare type HeadlineAccordionBlockDef = HeadlineContent & AccordionBlockDef;
22
- /**
23
- * @title Список документов
24
- */
25
- export declare type LinkDocsAccordionBlockDef = LinkDocsContent & AccordionBlockDef;
26
- /**
27
- * @title Текстовый блок
28
- */
29
- export declare type TextBlockAccordionBlockDef = TextBlockContent & AccordionBlockDef;
30
- /**
31
- * @title Картинка с текстом
32
- */
33
- export declare type PictureTextAccordionBlockDef = PictureTextContent & AccordionBlockDef;
34
- /**
35
- * @title Продуктовый блок
36
- */
37
- export declare type ProductBlockAccordionBlockDef = ProductBlockContent & AccordionBlockDef;
38
- /**
39
- * @title Плитка
40
- */
41
- export declare type TileAccordionBlockDef = TileContent & AccordionBlockDef;
42
- /**
43
- * @title Продуктовая плитка
44
- */
45
- export declare type ProductTileAccordionBlockDef = ProductTileContent & AccordionBlockDef;
46
- /**
47
- * @title Галлерея
48
- */
49
- export declare type GalleryAccordionBlockDef = GalleryContent & AccordionBlockDef;
50
- /**
51
- * @title Мини-галлерея
52
- */
53
- export declare type MiniGalleryAccordionBlockDef = MiniGalleryContent & AccordionBlockDef;
54
- /**
55
- * @title Список ссылок
56
- */
57
- export declare type LinkListAccordionBlockDef = LinkListContent & AccordionBlockDef;
58
- /**
59
- * @title Выберите блок
60
- */
61
- export declare type EmptyOption = null;
62
- /**
63
- * @title Содержимое аккордеона
64
- */
65
- export declare type AccordionBlockProps = EmptyOption | HeadlineAccordionBlockDef | LinkDocsAccordionBlockDef | TextBlockAccordionBlockDef | PictureTextAccordionBlockDef | ProductBlockAccordionBlockDef | TileAccordionBlockDef | ProductTileAccordionBlockDef | GalleryAccordionBlockDef | MiniGalleryAccordionBlockDef | LinkListAccordionBlockDef;
66
- /**
67
- * @title Количество колонок
68
- * @enumNames ["1 колонка", "2 колонки"]
69
- */
70
- export declare type ColumnsCount = 1 | 2;
1
+ import type { BlockDef, ColumnsCount } from '../../ui-kit/BlocksList/BlocksListProps';
71
2
  /**
72
3
  * @title Элемент списка
73
4
  */
@@ -78,7 +9,7 @@ export interface AccordionItemCommonProps {
78
9
  */
79
10
  label?: string;
80
11
  /** @title Блоки */
81
- blocks?: AccordionBlockProps[];
12
+ blocks?: BlockDef[];
82
13
  /**
83
14
  * @title Отображать/скрывать обводку элемента
84
15
  * @default false
@@ -102,4 +33,3 @@ export interface AccordionContent {
102
33
  */
103
34
  bordered?: boolean;
104
35
  }
105
- export {};
@@ -4,9 +4,9 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const uni_jsx_1 = require("@redneckz/uni-jsx");
5
5
  const Icon_1 = require("../../ui-kit/Icon/Icon");
6
6
  const AccordionItemInner_1 = require("./AccordionItemInner");
7
- const isActiveHandler_1 = require("./utils/isActiveHandler");
7
+ const useActiveHandler_1 = require("./utils/useActiveHandler");
8
8
  exports.AccordionItem = (0, uni_jsx_1.JSX)(({ label, blocks, bordered, context }) => {
9
- const { hasContent, icon, handleToggle } = (0, isActiveHandler_1.isActiveHandler)({
9
+ const { hasContent, icon, handleToggle } = (0, useActiveHandler_1.useActiveHandler)({
10
10
  context,
11
11
  blocks,
12
12
  });
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionItem.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,iDAA8C;AAE9C,6DAA0D;AAC1D,6DAA0D;AAI7C,QAAA,aAAa,GAAG,IAAA,aAAG,EAAqB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;IAC5F,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,IAAA,iCAAe,EAAC;QACzD,OAAO;QACP,MAAM;KACP,CAAC,CAAC;IAEH,OAAO,CACL,gCACE,SAAS,EAAE,GACT,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,mCACzC,mCAAmC,aAEnC,oCACE,SAAS,EAAE;YACP,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB;YAChC,UAAU,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,EAAE,EAC9C,OAAO,EAAE,YAAY,aAErB,iCACE,SAAS,EAAE,sCACT,UAAU,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EACjD,EAAE,YAED,KAAK,GACD,EACN,UAAU,CAAC,CAAC,CAAC,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,CAAC,CAAC,CAAC,IAAI,IAC/D,EACR,UAAU,CAAC,CAAC,CAAC,uBAAC,uCAAkB,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,IAAI,IAC1E,CACN,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"AccordionItem.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,iDAA8C;AAE9C,6DAA0D;AAC1D,+DAA4D;AAI/C,QAAA,aAAa,GAAG,IAAA,aAAG,EAAqB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;IAC5F,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,IAAA,mCAAgB,EAAC;QAC1D,OAAO;QACP,MAAM;KACP,CAAC,CAAC;IAEH,OAAO,CACL,gCACE,SAAS,EAAE,GACT,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,mCACzC,mCAAmC,aAEnC,oCACE,SAAS,EAAE;YACP,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB;YAChC,UAAU,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,EAAE,EAC9C,OAAO,EAAE,YAAY,aAErB,iCACE,SAAS,EAAE,sCACT,UAAU,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EACjD,EAAE,YAED,KAAK,GACD,EACN,UAAU,CAAC,CAAC,CAAC,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,CAAC,CAAC,CAAC,IAAI,IAC/D,EACR,UAAU,CAAC,CAAC,CAAC,uBAAC,uCAAkB,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,IAAI,IAC1E,CACN,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -2,16 +2,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.AccordionItemInner = void 0;
3
3
  const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const AccordionBlocks_1 = require("./AccordionBlocks");
5
+ const renderBlocksList_1 = require("../../ui-kit/BlocksList/renderBlocksList");
6
6
  exports.AccordionItemInner = (0, uni_jsx_1.JSX)(({ blocks, context }) => {
7
- return ((0, jsx_runtime_1.jsx)("div", { className: "transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0", children: blocks?.length ? blocks.map(renderBlock(context)) : null }));
7
+ const className = 'mb-5 last:mb-0 first:mt-2';
8
+ const columns = 1;
9
+ return ((0, jsx_runtime_1.jsx)("div", { className: "transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0", children: (0, renderBlocksList_1.renderBlocksList)({ context, className, columns, blocks }) }));
8
10
  });
9
- const renderBlock = (context) => (block, i) => {
10
- const type = block?.accordionBlockType;
11
- if (!type || !(type in AccordionBlocks_1.AccordionBlocks)) {
12
- return null;
13
- }
14
- const AccordionBlock = AccordionBlocks_1.AccordionBlocks[type];
15
- return ((0, jsx_runtime_1.jsx)("div", { className: "mb-5 last:mb-0 first:mt-2", children: (0, jsx_runtime_1.jsx)(AccordionBlock, { context: context, ...block, className: "!p-0" }) }, `block_${i}`));
16
- };
17
11
  //# sourceMappingURL=AccordionItemInner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionItemInner.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionItemInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,uDAAoD;AAIvC,QAAA,kBAAkB,GAAG,IAAA,aAAG,EAAqB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;IAChF,OAAO,CACL,gCAAK,SAAS,EAAC,0EAA0E,YACtF,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GACrD,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,CAAC,OAA2B,EAAE,EAAE,CAAC,CAAC,KAA0B,EAAE,CAAS,EAAE,EAAE;IAC7F,MAAM,IAAI,GAAG,KAAK,EAAE,kBAAkB,CAAC;IACvC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,iCAAe,CAAC,EAAE;QACvC,OAAO,IAAI,CAAC;KACb;IAED,MAAM,cAAc,GAAa,iCAAe,CAAC,IAAI,CAAC,CAAC;IACvD,OAAO,CACL,gCAAK,SAAS,EAAC,2BAA2B,YACxC,uBAAC,cAAc,IAAC,OAAO,EAAE,OAAO,KAAM,KAAK,EAAE,SAAS,EAAC,MAAM,GAAG,IADlB,SAAS,CAAC,EAAE,CAEtD,CACP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"AccordionItemInner.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionItemInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,+EAA4E;AAE/D,QAAA,kBAAkB,GAAG,IAAA,aAAG,EAAqB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;IAChF,MAAM,SAAS,GAAG,2BAA2B,CAAC;IAC9C,MAAM,OAAO,GAAG,CAAC,CAAC;IAClB,OAAO,CACL,gCAAK,SAAS,EAAC,0EAA0E,YACtF,IAAA,mCAAgB,EAAC,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,GACtD,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- export declare const isActiveHandler: ({ context, blocks }: {
1
+ export declare const useActiveHandler: ({ context, blocks }: {
2
2
  context: any;
3
3
  blocks: any;
4
4
  }) => {
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.isActiveHandler = void 0;
3
- const isActiveHandler = ({ context, blocks }) => {
2
+ exports.useActiveHandler = void 0;
3
+ const useActiveHandler = ({ context, blocks }) => {
4
4
  const [isActive, setIsActive] = context.useState(false);
5
5
  const hasContent = blocks?.length;
6
6
  const icon = isActive ? 'MinusIcon' : 'PlusIcon';
@@ -17,5 +17,5 @@ const isActiveHandler = ({ context, blocks }) => {
17
17
  };
18
18
  return { isActive, hasContent, icon, handleToggle };
19
19
  };
20
- exports.isActiveHandler = isActiveHandler;
21
- //# sourceMappingURL=isActiveHandler.js.map
20
+ exports.useActiveHandler = useActiveHandler;
21
+ //# sourceMappingURL=useActiveHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useActiveHandler.js","sourceRoot":"","sources":["../../../../src/components/Accordion/utils/useActiveHandler.ts"],"names":[],"mappings":";;AAEO,MAAM,gBAAgB,GAAG,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE;IACtD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,UAAU,GAAG,MAAM,EAAE,MAAM,CAAC;IAClC,MAAM,IAAI,GAAa,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC;IAE3D,MAAM,eAAe,GAAG,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC;IAEzE,MAAM,YAAY,GAAG,CAAC,CAAa,EAAE,EAAE;QACrC,IAAI,CAAC,UAAU,EAAE;YACf,OAAO;SACR;QAED,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC;QACvB,MAAM,YAAY,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;QACxC,YAAY,CAAC,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,SAAS;YACzD,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,GAAG,YAAY,CAAC,YAAY,IAAI,CAAC;IACvC,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;AACtD,CAAC,CAAC;AApBW,QAAA,gBAAgB,oBAoB3B"}
@@ -0,0 +1,5 @@
1
+ import type { UniBlockProps } from '../../types';
2
+ import type { OtherProductsContent } from './OtherProductsContent';
3
+ export interface OtherProductsProps extends OtherProductsContent, UniBlockProps {
4
+ }
5
+ export declare const OtherProducts: (props: import("@redneckz/uni-jsx").PropsWithChildren<OtherProductsProps, any>, context?: any) => any;
@@ -0,0 +1,9 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.OtherProducts = void 0;
3
+ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
+ const uni_jsx_1 = require("@redneckz/uni-jsx");
5
+ const OtherProductsItem_1 = require("./OtherProductsItem");
6
+ exports.OtherProducts = (0, uni_jsx_1.JSX)(({ blockItems, context, className }) => {
7
+ return ((0, jsx_runtime_1.jsx)("section", { className: `font-sans bg-white text-primary-text ${className || ''}`, children: blockItems?.length ? ((0, jsx_runtime_1.jsx)("div", { className: "list-none m-0 p-0", children: blockItems.map((item, i) => ((0, jsx_runtime_1.jsx)(OtherProductsItem_1.OtherProductsItem, { ...item, context: context }, `BlockItem${i}`))) })) : null }));
8
+ });
9
+ //# sourceMappingURL=OtherProducts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtherProducts.js","sourceRoot":"","sources":["../../../src/components/OtherProducts/OtherProducts.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,2DAAwD;AAI3C,QAAA,aAAa,GAAG,IAAA,aAAG,EAAqB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE;IAC1F,OAAO,CACL,oCAAS,SAAS,EAAE,wCAAwC,SAAS,IAAI,EAAE,EAAE,YAC1E,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,CACpB,gCAAK,SAAS,EAAC,mBAAmB,YAC/B,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAC3B,uBAAC,qCAAiB,OAA2B,IAAI,EAAE,OAAO,EAAE,OAAO,IAA3C,YAAY,CAAC,EAAE,CAAgC,CACxE,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,GACA,CACX,CAAC;AACJ,CAAC,CAAC,CAAC"}