@redneckz/wildless-cms-uni-blocks 0.8.31 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +93 -22
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/Filtration/Filtration.d.ts +6 -0
  5. package/bundle/components/Filtration/FiltrationContent.d.ts +78 -0
  6. package/bundle/components/Filtration/FiltrationInner.d.ts +7 -0
  7. package/bundle/components/Filtration/checkShouldRenderBlock.d.ts +1 -0
  8. package/bundle/components/Filtration/renderFormItem.d.ts +4 -0
  9. package/bundle/hooks/useForm.d.ts +12 -0
  10. package/bundle/model/JSXBlock.d.ts +2 -0
  11. package/bundle/ui-kit/ControlProps.d.ts +4 -0
  12. package/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
  13. package/bundle/ui-kit/SlideCheckbox/SlideCheckbox.d.ts +3 -2
  14. package/bundle/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.d.ts +15 -0
  15. package/dist/components/ApplicationForm/renderSlideCheckboxes.js +1 -1
  16. package/dist/components/ApplicationForm/renderSlideCheckboxes.js.map +1 -1
  17. package/dist/components/Blocks.js +2 -0
  18. package/dist/components/Blocks.js.map +1 -1
  19. package/dist/components/Filtration/Filtration.d.ts +6 -0
  20. package/dist/components/Filtration/Filtration.js +17 -0
  21. package/dist/components/Filtration/Filtration.js.map +1 -0
  22. package/dist/components/Filtration/FiltrationContent.d.ts +78 -0
  23. package/dist/components/Filtration/FiltrationContent.js +2 -0
  24. package/dist/components/Filtration/FiltrationContent.js.map +1 -0
  25. package/dist/components/Filtration/FiltrationInner.d.ts +7 -0
  26. package/dist/components/Filtration/FiltrationInner.js +23 -0
  27. package/dist/components/Filtration/FiltrationInner.js.map +1 -0
  28. package/dist/components/Filtration/checkShouldRenderBlock.d.ts +1 -0
  29. package/dist/components/Filtration/checkShouldRenderBlock.js +11 -0
  30. package/dist/components/Filtration/checkShouldRenderBlock.js.map +1 -0
  31. package/dist/components/Filtration/renderFormItem.d.ts +4 -0
  32. package/dist/components/Filtration/renderFormItem.js +21 -0
  33. package/dist/components/Filtration/renderFormItem.js.map +1 -0
  34. package/dist/hooks/useForm.d.ts +12 -0
  35. package/dist/hooks/useForm.js +21 -0
  36. package/dist/hooks/useForm.js.map +1 -0
  37. package/dist/model/JSXBlock.d.ts +2 -0
  38. package/dist/ui-kit/ControlProps.d.ts +4 -0
  39. package/dist/ui-kit/ControlProps.js +2 -0
  40. package/dist/ui-kit/ControlProps.js.map +1 -0
  41. package/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
  42. package/dist/ui-kit/Foldable/DefaultFoldButton.js +5 -7
  43. package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  44. package/dist/ui-kit/SlideCheckbox/SlideCheckbox.d.ts +3 -2
  45. package/dist/ui-kit/SlideCheckbox/SlideCheckbox.js +2 -2
  46. package/dist/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
  47. package/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.d.ts +15 -0
  48. package/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js +19 -0
  49. package/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js.map +1 -0
  50. package/lib/common.css +1 -1
  51. package/lib/components/ApplicationForm/renderSlideCheckboxes.js +1 -1
  52. package/lib/components/ApplicationForm/renderSlideCheckboxes.js.map +1 -1
  53. package/lib/components/Blocks.js +2 -0
  54. package/lib/components/Blocks.js.map +1 -1
  55. package/lib/components/Filtration/Filtration.d.ts +6 -0
  56. package/lib/components/Filtration/Filtration.fixture.d.ts +5 -0
  57. package/lib/components/Filtration/Filtration.js +15 -0
  58. package/lib/components/Filtration/Filtration.js.map +1 -0
  59. package/lib/components/Filtration/FiltrationContent.d.ts +78 -0
  60. package/lib/components/Filtration/FiltrationContent.js +2 -0
  61. package/lib/components/Filtration/FiltrationContent.js.map +1 -0
  62. package/lib/components/Filtration/FiltrationInner.d.ts +7 -0
  63. package/lib/components/Filtration/FiltrationInner.js +21 -0
  64. package/lib/components/Filtration/FiltrationInner.js.map +1 -0
  65. package/lib/components/Filtration/checkShouldRenderBlock.d.ts +1 -0
  66. package/lib/components/Filtration/checkShouldRenderBlock.js +8 -0
  67. package/lib/components/Filtration/checkShouldRenderBlock.js.map +1 -0
  68. package/lib/components/Filtration/renderFormItem.d.ts +4 -0
  69. package/lib/components/Filtration/renderFormItem.js +18 -0
  70. package/lib/components/Filtration/renderFormItem.js.map +1 -0
  71. package/lib/hooks/useForm.d.ts +12 -0
  72. package/lib/hooks/useForm.js +18 -0
  73. package/lib/hooks/useForm.js.map +1 -0
  74. package/lib/model/JSXBlock.d.ts +2 -0
  75. package/lib/ui-kit/ControlProps.d.ts +4 -0
  76. package/lib/ui-kit/ControlProps.js +2 -0
  77. package/lib/ui-kit/ControlProps.js.map +1 -0
  78. package/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
  79. package/lib/ui-kit/Foldable/DefaultFoldButton.js +5 -7
  80. package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  81. package/lib/ui-kit/SlideCheckbox/SlideCheckbox.d.ts +3 -2
  82. package/lib/ui-kit/SlideCheckbox/SlideCheckbox.js +2 -2
  83. package/lib/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
  84. package/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.d.ts +15 -0
  85. package/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js +17 -0
  86. package/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js.map +1 -0
  87. package/mobile/bundle/bundle.umd.js +5 -8
  88. package/mobile/bundle/bundle.umd.min.js +1 -1
  89. package/mobile/bundle/components/Filtration/Filtration.d.ts +6 -0
  90. package/mobile/bundle/components/Filtration/FiltrationContent.d.ts +78 -0
  91. package/mobile/bundle/components/Filtration/FiltrationInner.d.ts +7 -0
  92. package/mobile/bundle/components/Filtration/checkShouldRenderBlock.d.ts +1 -0
  93. package/mobile/bundle/components/Filtration/renderFormItem.d.ts +4 -0
  94. package/mobile/bundle/hooks/useForm.d.ts +12 -0
  95. package/mobile/bundle/model/JSXBlock.d.ts +2 -0
  96. package/mobile/bundle/ui-kit/ControlProps.d.ts +4 -0
  97. package/mobile/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
  98. package/mobile/bundle/ui-kit/SlideCheckbox/SlideCheckbox.d.ts +3 -2
  99. package/mobile/bundle/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.d.ts +15 -0
  100. package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.js +1 -1
  101. package/mobile/dist/components/ApplicationForm/renderSlideCheckboxes.js.map +1 -1
  102. package/mobile/dist/components/Filtration/Filtration.d.ts +6 -0
  103. package/mobile/dist/components/Filtration/Filtration.js +17 -0
  104. package/mobile/dist/components/Filtration/Filtration.js.map +1 -0
  105. package/mobile/dist/components/Filtration/FiltrationContent.d.ts +78 -0
  106. package/mobile/dist/components/Filtration/FiltrationContent.js +2 -0
  107. package/mobile/dist/components/Filtration/FiltrationContent.js.map +1 -0
  108. package/mobile/dist/components/Filtration/FiltrationInner.d.ts +7 -0
  109. package/mobile/dist/components/Filtration/FiltrationInner.js +23 -0
  110. package/mobile/dist/components/Filtration/FiltrationInner.js.map +1 -0
  111. package/mobile/dist/components/Filtration/checkShouldRenderBlock.d.ts +1 -0
  112. package/mobile/dist/components/Filtration/checkShouldRenderBlock.js +11 -0
  113. package/mobile/dist/components/Filtration/checkShouldRenderBlock.js.map +1 -0
  114. package/mobile/dist/components/Filtration/renderFormItem.d.ts +4 -0
  115. package/mobile/dist/components/Filtration/renderFormItem.js +21 -0
  116. package/mobile/dist/components/Filtration/renderFormItem.js.map +1 -0
  117. package/mobile/dist/hooks/useForm.d.ts +12 -0
  118. package/mobile/dist/hooks/useForm.js +21 -0
  119. package/mobile/dist/hooks/useForm.js.map +1 -0
  120. package/mobile/dist/model/JSXBlock.d.ts +2 -0
  121. package/mobile/dist/ui-kit/ControlProps.d.ts +4 -0
  122. package/mobile/dist/ui-kit/ControlProps.js +2 -0
  123. package/mobile/dist/ui-kit/ControlProps.js.map +1 -0
  124. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
  125. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +5 -7
  126. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  127. package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.d.ts +3 -2
  128. package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.js +2 -2
  129. package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
  130. package/mobile/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.d.ts +15 -0
  131. package/mobile/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js +19 -0
  132. package/mobile/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js.map +1 -0
  133. package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.js +1 -1
  134. package/mobile/lib/components/ApplicationForm/renderSlideCheckboxes.js.map +1 -1
  135. package/mobile/lib/components/Filtration/Filtration.d.ts +6 -0
  136. package/mobile/lib/components/Filtration/Filtration.js +15 -0
  137. package/mobile/lib/components/Filtration/Filtration.js.map +1 -0
  138. package/mobile/lib/components/Filtration/FiltrationContent.d.ts +78 -0
  139. package/mobile/lib/components/Filtration/FiltrationContent.js +2 -0
  140. package/mobile/lib/components/Filtration/FiltrationContent.js.map +1 -0
  141. package/mobile/lib/components/Filtration/FiltrationInner.d.ts +7 -0
  142. package/mobile/lib/components/Filtration/FiltrationInner.js +21 -0
  143. package/mobile/lib/components/Filtration/FiltrationInner.js.map +1 -0
  144. package/mobile/lib/components/Filtration/checkShouldRenderBlock.d.ts +1 -0
  145. package/mobile/lib/components/Filtration/checkShouldRenderBlock.js +8 -0
  146. package/mobile/lib/components/Filtration/checkShouldRenderBlock.js.map +1 -0
  147. package/mobile/lib/components/Filtration/renderFormItem.d.ts +4 -0
  148. package/mobile/lib/components/Filtration/renderFormItem.js +18 -0
  149. package/mobile/lib/components/Filtration/renderFormItem.js.map +1 -0
  150. package/mobile/lib/hooks/useForm.d.ts +12 -0
  151. package/mobile/lib/hooks/useForm.js +18 -0
  152. package/mobile/lib/hooks/useForm.js.map +1 -0
  153. package/mobile/lib/model/JSXBlock.d.ts +2 -0
  154. package/mobile/lib/ui-kit/ControlProps.d.ts +4 -0
  155. package/mobile/lib/ui-kit/ControlProps.js +2 -0
  156. package/mobile/lib/ui-kit/ControlProps.js.map +1 -0
  157. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
  158. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +5 -7
  159. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  160. package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.d.ts +3 -2
  161. package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.js +2 -2
  162. package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
  163. package/mobile/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.d.ts +15 -0
  164. package/mobile/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js +17 -0
  165. package/mobile/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js.map +1 -0
  166. package/mobile/src/components/ApplicationForm/renderSlideCheckboxes.tsx +4 -4
  167. package/mobile/src/components/Filtration/Filtration.example.json +37 -0
  168. package/mobile/src/components/Filtration/Filtration.tsx +41 -0
  169. package/mobile/src/components/Filtration/Filtration.ui.json +1 -0
  170. package/mobile/src/components/Filtration/FiltrationContent.ts +87 -0
  171. package/mobile/src/components/Filtration/FiltrationInner.tsx +67 -0
  172. package/mobile/src/components/Filtration/checkShouldRenderBlock.ts +18 -0
  173. package/mobile/src/components/Filtration/renderFormItem.tsx +36 -0
  174. package/mobile/src/hooks/useForm.ts +29 -0
  175. package/mobile/src/model/JSXBlock.ts +2 -0
  176. package/mobile/src/ui-kit/ControlProps.ts +4 -0
  177. package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +10 -4
  178. package/mobile/src/ui-kit/SlideCheckbox/SlideCheckbox.tsx +26 -23
  179. package/mobile/src/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.tsx +44 -0
  180. package/package.json +2 -1
  181. package/src/components/ApplicationForm/renderSlideCheckboxes.tsx +4 -4
  182. package/src/components/Blocks.ts +2 -0
  183. package/src/components/Filtration/Filtration.example.json +37 -0
  184. package/src/components/Filtration/Filtration.fixture.tsx +147 -0
  185. package/src/components/Filtration/Filtration.tsx +41 -0
  186. package/src/components/Filtration/Filtration.ui.json +1 -0
  187. package/src/components/Filtration/FiltrationContent.ts +87 -0
  188. package/src/components/Filtration/FiltrationInner.tsx +67 -0
  189. package/src/components/Filtration/checkShouldRenderBlock.ts +18 -0
  190. package/src/components/Filtration/renderFormItem.tsx +36 -0
  191. package/src/hooks/useForm.ts +29 -0
  192. package/src/model/JSXBlock.ts +2 -0
  193. package/src/ui-kit/ControlProps.ts +4 -0
  194. package/src/ui-kit/Foldable/DefaultFoldButton.tsx +10 -4
  195. package/src/ui-kit/SlideCheckbox/SlideCheckbox.fixture.tsx +1 -1
  196. package/src/ui-kit/SlideCheckbox/SlideCheckbox.tsx +26 -23
  197. package/src/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.tsx +44 -0
@@ -1,7 +1,8 @@
1
1
  interface SlideCheckboxProps {
2
- checked?: boolean;
2
+ value?: boolean;
3
3
  text?: string;
4
- onClick?: () => void;
4
+ type?: 'checkbox' | 'radio';
5
+ onChange?: (value: boolean) => void;
5
6
  }
6
7
  export declare const SlideCheckbox: import("@redneckz/uni-jsx").UNIComponent<SlideCheckboxProps, any, any>;
7
8
  export {};
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
- import { Text } from '../../ui-kit/Text/Text.js';
4
- export const SlideCheckbox = JSX(({ checked, text, onClick }) => (_jsxs("div", { role: "checkbox", "aria-checked": checked, className: "flex justify-start items-center w-full cursor-pointer mb-4", onClick: () => onClick && onClick(), children: [_jsx("div", { className: `relative duration-300 w-9 h-5 mr-3 rounded rounded-2xl ${checked ? 'bg-primary-main' : 'bg-main-divider'}`, children: _jsx("div", { className: `absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded rounded-full ${checked ? 'left-[50%]' : 'left-[5%]'}` }) }), _jsx("div", { children: _jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: text }) })] })));
3
+ import { Text } from '../Text/Text.js';
4
+ export const SlideCheckbox = JSX(({ value = false, text, type = 'checkbox', onChange }) => (_jsxs("div", { role: type, "aria-checked": value, className: "flex justify-start items-center w-full cursor-pointer mb-4", onClick: () => onChange && onChange(!value), children: [_jsx("div", { className: `relative flex-shrink-0 duration-300 w-9 h-5 mr-3 rounded-2xl ${value ? 'bg-primary-main' : 'bg-main-divider'}`, children: _jsx("div", { className: `absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full ${value ? 'left-[50%]' : 'left-[5%]'}` }) }), _jsx("div", { children: _jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: text }) })] })));
5
5
  //# sourceMappingURL=SlideCheckbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SlideCheckbox.js","sourceRoot":"","sources":["../../../src/ui-kit/SlideCheckbox/SlideCheckbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAO9C,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAqB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACnF,eACE,IAAI,EAAC,UAAU,kBACD,OAAO,EACrB,SAAS,EAAC,4DAA4D,EACtE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,IAAI,OAAO,EAAE,aAEnC,cACE,SAAS,EAAE,0DACT,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAChC,EAAE,YAEF,cACE,SAAS,EAAE,kFACT,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAC3B,EAAE,GACF,GACE,EACN,wBACE,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,mBAAmB,YAC5D,IAAI,GACA,GACH,IACF,CACP,CAAC,CAAC"}
1
+ {"version":3,"file":"SlideCheckbox.js","sourceRoot":"","sources":["../../../src/ui-kit/SlideCheckbox/SlideCheckbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAQpC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAC9B,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,IAAI,EAAE,IAAI,GAAG,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACxD,eACE,IAAI,EAAE,IAAI,kBACI,KAAK,EACnB,SAAS,EAAC,4DAA4D,EACtE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,KAAK,CAAC,aAE3C,cACE,SAAS,EAAE,gEACT,KAAK,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAC9B,EAAE,YAEF,cACE,SAAS,EAAE,0EACT,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WACzB,EAAE,GACF,GACE,EACN,wBACE,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,mBAAmB,YAC5D,IAAI,GACA,GACH,IACF,CACP,CACF,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { ControlProps } from '../ControlProps';
2
+ declare type SlideCheckboxGroupItem = {
3
+ value: string;
4
+ title: string;
5
+ };
6
+ interface SlideCheckboxGroupProps extends ControlProps<string> {
7
+ multiple: false;
8
+ items: SlideCheckboxGroupItem[];
9
+ }
10
+ interface MultipleSlideCheckboxGroupProps extends ControlProps<string[]> {
11
+ multiple: true;
12
+ items: SlideCheckboxGroupItem[];
13
+ }
14
+ export declare const SlideCheckboxGroup: import("@redneckz/uni-jsx").UNIComponent<SlideCheckboxGroupProps | MultipleSlideCheckboxGroupProps, any, any>;
15
+ export {};
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { SlideCheckbox } from '../SlideCheckbox/SlideCheckbox.js';
4
+ export const SlideCheckboxGroup = JSX(({ value, onChange, items = [], multiple }) => {
5
+ const handleChange = (newValue) => {
6
+ if (multiple) {
7
+ const hasAlready = value?.includes(newValue);
8
+ onChange &&
9
+ onChange(hasAlready ? value?.filter((v) => v !== newValue) : [...(value || []), newValue]);
10
+ }
11
+ else {
12
+ onChange && onChange(value === newValue ? undefined : newValue);
13
+ }
14
+ };
15
+ return items.map((item) => (_jsx(SlideCheckbox, { text: item.title, value: [value].flatMap((_) => _).includes(item.value), onChange: () => handleChange(item.value), type: multiple ? 'checkbox' : 'radio' }, item.value)));
16
+ });
17
+ //# sourceMappingURL=SlideCheckboxGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlideCheckboxGroup.js","sourceRoot":"","sources":["../../../src/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAiB/D,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CACnC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC5C,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE;QACxC,IAAI,QAAQ,EAAE;YACZ,MAAM,UAAU,GAAG,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC7C,QAAQ;gBACN,QAAQ,CACN,UAAU,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,CACjF,CAAC;SACL;aAAM;YACL,QAAQ,IAAI,QAAQ,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;SACjE;IACH,CAAC,CAAC;IAEF,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACzB,KAAC,aAAa,IAEZ,IAAI,EAAE,IAAI,CAAC,KAAK,EAChB,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EACrD,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,EACxC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,IAJhC,IAAI,CAAC,KAAK,CAKf,CACH,CAAC,CAAC;AACL,CAAC,CACF,CAAC"}
@@ -1183,15 +1183,12 @@
1183
1183
  return content || defaultContent;
1184
1184
  }
1185
1185
 
1186
- const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', onClick }) => {
1186
+ const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => {
1187
1187
  const STATE_STYLE = 'hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none';
1188
1188
  const DIMENSIONS_STYLE = 'flex justify-center w-full px-0 py-5';
1189
- return (jsxs("button", { className: [
1190
- 'border border-transparent bg-primary-main font-sans text-white cursor-pointer',
1191
- STATE_STYLE,
1192
- DIMENSIONS_STYLE,
1193
- className,
1194
- ].join(' '), "data-theme": dataTheme, onClick: onClick, children: [jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (jsx(Img, { image: {
1189
+ return (jsxs("button", { className: style('border border-transparent bg-primary-main font-sans text-white cursor-pointer', STATE_STYLE, DIMENSIONS_STYLE, disabled
1190
+ ? 'bg-main-divider text-main-disabled cursor-not-allowed hover:bg-main-divider active:bg-main-divider'
1191
+ : '', className), onClick: onClick, disabled: disabled, "data-theme": dataTheme, children: [jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (jsx(Img, { image: {
1195
1192
  icon,
1196
1193
  iconVersion: 'white',
1197
1194
  }, className: "flex-shrink-0 my-auto", width: "20", height: "20", asSVG: true })) : null] }));
@@ -1902,7 +1899,7 @@
1902
1899
  return (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: i }, el) : [el]), []);
1903
1900
  }
1904
1901
 
1905
- const packageVersion = "0.8.31";
1902
+ const packageVersion = "0.9.0";
1906
1903
 
1907
1904
  exports.Blocks = Blocks;
1908
1905
  exports.ContentPage = ContentPage;
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),r=n("useState"),i=n("useEffect"),a=n("useCallback"),l=n("useMemo"),s=n("useRef");const o={PROD_BRANCH:"master"},c=new class{_=o;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||o.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return d(this._.CDN)}get BASE_PATH(){return d(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},d=e=>e&&!e.endsWith("/")?`${e}/`:e,m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:n}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:n})),{token:t,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({node_ids:t})}),{likes:r}=await e.json();return r||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:n,name:r}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:r},body:JSON.stringify({node_id:t,user_name:r})}),{likes:i}=await e.json();return i||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:n,name:r}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:r},body:JSON.stringify({node_id:t,user_name:r})}),{likes:i}=await e.json();return i||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:b(e)),t._tmpl},b=e=>{function t(t,n){const{children:r,...i}=t||{},a=n?.slots?.default,l=r||a&&a();return e(Object.assign(i,l&&{children:l}),n)}return t.inheritAttrs=!1,t},x=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),f=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),v=[];function N(e,t){const{key:n,blockDecorator:r=f,blocksRegistry:i={},ancestors:a=v,className:l="",extraProps:s={}}=t,{type:o}=e;o&&o in i||console.warn(`No block with "${o}" is registered`);const c=o&&i[o];return r({blockClassName:x("scroll-mt-12",l,e.style||"col-span-12"),block:e,ancestors:a,render:({block:r,blockClassName:i})=>{const{content:a}=r;return c?u(c,{className:i,block:e,options:t,...a,...s},n):null}},n)}const y=[],w=(e,{key:t,ancestors:n=y,slotName:r=null,renderProps:i=N,...a})=>(e||[]).map(((e,l)=>i(e,{...a,key:`${t||e.type}-${l}`,ancestors:a.parent?[...n||y,[a.parent,r]]:n})));function k({children:e,block:t,options:n,renderProps:r}){return e||(t&&n?w(t.blocks,{...n,parent:t,renderProps:r}):null)}class T{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const C=new T;function S(e,{sensitivity:t,rootRef:n}={}){const r=s(null),a=l((()=>({threshold:_(t),root:n?.current})),[t,n?.current]);return i((()=>{if(!r.current)return;const t=new IntersectionObserver(e,a);return t.observe(r.current),()=>{t.disconnect()}}),[e,a]),r}function _(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const I=new T;const $={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},M=g((({className:e="",version:t="primary",block:n,tag:l="section",role:s,isTheme:o=!0,extraProps:c={},children:d})=>{const m=l,h=function(e){return S(a((t=>{if(!e||!t?.length)return;const n=t[t.length-1];I.fire("intersection",{block:e,intersection:n})}),[e]),{sensitivity:1})}(n),[p,g]=r(!1);return i((()=>C.subscribe("tab",(e=>{g(Boolean(e.label&&n?.labels?.length&&!n.labels.includes(e.label)))}))),[n]),u(m,{className:x(A(Boolean(t&&o)),$[t],p?"hidden":"",e),...t&&o?{"data-ver":t}:{},...n?.anchor?{id:n.anchor,ref:h}:{},role:s,...c,children:d})})),A=e=>e?"group":"",j={h0:"text-m-title",h1:"text-m-title",h2:"text-m-title",h3:"text-h6",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},R=g((e=>{const{className:t,headingType:n="h3",title:r,as:i="h3"}=e;return u(i,{className:`font-sans font-medium m-0 ${j[n]} ${t||""}`,children:r})})),P=g((({children:e,...t})=>u("p",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),L=g((({title:e,description:t,className:n="",...r})=>p(M,{className:`py-6 px-4 ${n}`,...r,children:[e?u(R,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?u("div",{className:"mb-5",children:u(P,{size:"text-m",font:"font-light",align:"text-center",children:t})}):null,u("div",{className:"list-none m-0 p-0",children:k(r)})]})));L.childrenTypes=["Accordion"];const D=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),O=g((({className:e="",style:t,idx:n,activeIndex:r,observerOptions:i,children:l,onIntersection:s})=>{const o=S(a((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),i);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(n===r),ref:o,children:l})})),V=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],B=g((({className:e="",containerRef:t,activeIndex:n,visibleItemCount:r=0,gap:i=0,padding:l=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},b=s([]),f=a(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,h&&h(n),p&&p(z(n))}),[h,p]),v=r>0?i*Number(r)-1:0,N="vertical-list"===o,y="horizontal-list"===o,w={...y?E(l,v):{},...N?D(d):{},gap:`${i}px`};return u("div",{className:x("box-border overflow-auto no-scrollbar",o,e),style:w,ref:t,children:(k=(e,t)=>u(O,{className:x(c,r?V[r-1]:"",N?"h-full":""),style:y?E(l/4):{},activeIndex:n,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(k):k(e,0))(m)});var k})),E=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),z=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),F={"horizontal-list":"mx-auto mt-5 w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},H={"horizontal-list":"w-6","vertical-list":"h-6"},G=g((({containerRef:e,activeIndex:t,dotCount:n=0,listType:r="horizontal-list",version:i})=>n?u("div",{className:x("flex gap-2",F[r],i?"group":""),...i?{"data-ver":i}:{},children:new Array(n).fill(null).map(((n,i)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${i===t?H[r]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(n=>{n!==t&&e?.current&&e.current.children[n]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(i)},String(i))))}):null)),J=e=>e,U=(e=J)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),X=U(),W=(e=J)=>U((t=>-e(t))),Y=e=>t=>e.scrollWidth/t,K=e=>(t,n)=>{e.scrollBy({left:n*Y(e)(t),behavior:"smooth"})},q=({itemCount:e,isCyclic:t,onVisibleIndicesChange:n})=>{const i=s(null),[l,o]=r([]),c=a((e=>{o((t=>{return(n=t)===(r=e)||Boolean(n&&r&&n?.length===r?.length&&n.every(((e,t)=>e===r[t])))?t:e;var n,r})),n&&n(e)}),[e]),[d,m]=l.length?[W()(l),U()(l)]:[-1,-1],h=d>0,u=m<e-1,p=a((()=>{var n;i.current&&(t&&!h?(n=i.current).scrollTo({left:n.scrollWidth,behavior:"smooth"}):K(i.current)(e,-1))}),[t,e,h]),g=a((()=>{i.current&&(t&&!u?i.current.scrollTo({left:0,behavior:"smooth"}):K(i.current)(e,1))}),[e,t,u]);return[i,{scrollLeft:p,scrollRight:g,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},Q=g((({className:e="",gap:t=14,padding:n=16,showDots:r=!0,minHeight:i,children:a,onVisibleIndicesChange:l,listType:s="horizontal-list",version:o})=>{const c=Array.isArray(a)?a.length:0,[d,m]=q({itemCount:c,onVisibleIndicesChange:l}),[h]=m.visibleIndicesRange;return p("div",{className:x(e,"vertical-list"===s?"relative h-full":""),children:[u(B,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:t,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:s,minHeight:i,children:a}),r?u(G,{containerRef:d,activeIndex:h,dotCount:c,listType:s,version:o}):null]})})),Z=e=>Boolean(e?.includes(":")),ee=(e,t)=>Boolean(e&&!Z(e)&&(!t||"_self"===t)),te=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),ne=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var re=Object.freeze({__proto__:null,isURL:Z,isLocalURL:ee,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:te,joinPath:ne});const ie=e=>t=>{if(!t||Z(t)||c.CDN&&t.startsWith(c.CDN))return t;const n=t.startsWith("/");return ne(c.BASE_PATH,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},ae=(e,t)=>ae._impl(e,t);function le(){return le._impl()}function se(e=!1){const t=le();return r=>({...r,href:e?r.href:ie(t)(r.href),"aria-label":r.text,onClick:ae(n(r),r)});function n({href:n,target:r,onClick:i}){return a=>{i&&i(a),n&&!e&&ee(n,r)&&(a?.preventDefault(),t.push(n))}}}ae._impl=e=>e,ae.setup=e=>{ae._impl=e},le._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),le.setup=e=>{le._impl=e};const oe={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ce="bg-main-divider text-main-disabled",de={primary:ce,secondary:ce,white:ce,link:"",transparent:"",gray:ce,"":""},me="text-center font-sans select-none",he={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},ue=g((e=>{const{text:t,aboveText:n,appendLeft:r,appendRight:i,version:a="primary"}=e;return p("div",{className:pe(e),children:[r?u("div",{className:he[a],children:r}):null,ge(e)?p("div",{children:[n?u("div",{className:"text-xs-light text-left",children:n}):null,u("div",{className:"text-left "+(n?"text-s -mt-0.5":"text-l"),children:t})]}):null,i?u("div",{className:he[a],children:i}):null]})})),pe=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const i="gap-2 "+(n?"py-2.5 px-7":"py-4 px-4");return["group/btn flex items-center justify-center",ge(e)?i:"h-12 w-12",r?"rounded-full":""].join(" ")},ge=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),be=({className:e,rounded:t,version:n})=>["inline-block",me,n?de[n]:"",t?"rounded-full":"rounded-md",e].join(" "),xe=({className:e,rounded:t,version:n})=>[me,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border",n?oe[n]:"",t?"rounded-full":"rounded-md",e].join(" "),fe=g((({disabled:e,children:t,...n})=>{const r=se()(n),i=t??u(ue,{...r});return u(e?Ne:ve,{...r,children:i})})),ve=g((({className:e="",href:t,rel:n,target:r,ariaLabel:i,version:a,rounded:l,onClick:s,children:o})=>u("a",{className:xe({className:e,version:a,rounded:l}),href:t,rel:n,target:r,"aria-label":i,role:t?"link":"button",onClick:s,children:o}))),Ne=g((({className:e,ariaLabel:t,version:n,rounded:r,children:i})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:be({className:e,rounded:r,version:n}),children:i}))),ye={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},we=g((({className:e="",imageClassName:t="",name:n="",alt:r=`Иконка ${n}`,title:i=r,iconVersion:a="color",asSVG:l,...s})=>{const o=le(),d=ie(o)(ne(c.CDN,"/icons",`${n}.svg`));return l&&"normal"!==a?u(Te,{className:e,children:p("svg",{className:x(ke(s.width),ye[a],"white"===a?"invert":"",t),...s,"aria-hidden":"true",children:[i?u("title",{children:i}):null,r?u("desc",{children:r}):null,u("use",{href:`${d}#icon`,xlinkHref:`${d}#icon`})]})}):(e.includes("h-")||(s.style={height:`${s.height}px`}),u("img",{className:e,src:d,alt:r,title:i,"aria-hidden":"true",...s}))})),ke=e=>e?"":"w-full h-full",Te=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Ce=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Se=g((({className:e="",image:t,imageClassName:n="",isMobile:r=!1,pathPrefix:i})=>{const a=le();return p("picture",{className:`${r?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Ce).map((({src:e,format:n,media:r},l)=>u("source",{srcSet:Ie(a,i)(e),type:$e(n),media:r?`(max-width: ${r}px)`:"",...t.size},`${l}_${e}`))):null,t?.src?_e({...t,src:Ie(a,i)(t.src)},n,r):null]})})),_e=(e,t="",n=!1)=>{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,l=n?"m-auto":"m-0";return u("img",{src:e.src,className:`${l} ${t}`,alt:a,title:i,style:r,...e.size})},Ie=(e,t)=>n=>n&&!Z(n)?ie(e)(ne(t,n)):n,$e=e=>e?`image/${String(e)}`:void 0,Me=g((({className:e="",image:t,imageClassName:n="",isMobile:r,pathPrefix:i,...a})=>t?.src||t?.icon?t.icon?u(we,{className:e,imageClassName:n,iconVersion:t?.iconVersion||"normal",name:t.icon,...a}):u(Se,{className:e,imageClassName:n,image:t,isMobile:r,pathPrefix:i}):null)),Ae=g((e=>u(Me,{...e,isMobile:!0}))),je=(e=!1)=>e?"text-white":"",Re=(e=!1)=>"text-s mb-3.5 "+(e?"text-white":"text-secondary-text/80"),Pe=g((({icon:e,image:t,title:n,subtitle:r,isFillGradient:i})=>p("div",{role:"columnheader",children:[e?u(Ae,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}):null,t?.src&&u("div",{className:"mb-3.5",children:u(Ae,{image:t})}),n?u(R,{headingType:"h4",className:je(i),title:n}):null,r?u("div",{className:Re(i),children:r}):null]}))),Le=g((({cell:e,rowHeader:t,isFillGradient:n=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(De(n,t))})}))),De=(e,t)=>({label:n,description:r},i)=>p("div",{className:"flex justify-between text-s py-3.5",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[n?u("div",{className:"text-right "+(e?"text-white":""),children:n}):null,r?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:r}):null]})]},String(i)),Oe=g((({header:e,columnData:t,visibleRowLength:n=0,isFillGradient:r,showRow:i,onToggleColumn:a})=>{const l=t?.slice(0,i?t.length:n),s=r?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-4 mb-3.5 ${r?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(Pe,{...e,isFillGradient:r}),l?.length?l.map((({rowHeader:e,cell:t},n)=>u(Le,{cell:t,rowHeader:e,isFillGradient:r},String(n)))):null,i&&e?.link?u(fe,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-4 py-[11px]",children:e.link.text}):null,Ve({onToggleColumn:a,isFillGradient:r,showRow:i})]})})),Ve=({onToggleColumn:e,isFillGradient:t,showRow:n})=>u("div",{className:"mt-5",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:n?"Скрыть":"Показать описание"})}),Be=g((e=>{const{className:t,title:n}=e;return p("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${t||""}`,children:[n?u(R,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:n}):null,u("div",{role:"table",children:u(Ee,{...e})})]})})),Ee=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:n,visibleRowLength:i,orientation:l,...s})=>{const[o,c]=r(new Array(e.length).fill(!i)),d=a((e=>{const t=(t,n)=>n===e?!t:t;c((e=>e.map(t)))}),[]),m=a((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:r},a)=>{return u(Oe,{visibleRowLength:i,showRow:o[a],header:r,columnData:(l=e,l?.map(((e,n)=>({cell:e,rowHeader:t?.[n]?.title})))),isFillGradient:0===a&&n,onToggleColumn:()=>d(a),...s},String(a));var l}));return"horizontal"===l?u(Q,{onVisibleIndicesChange:m,children:h}):h})),ze=new Map;function Fe(e,t,{fallback:n}={}){const a=l((()=>He(e)),[e]),[s,o]=r(),[c,d]=r(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};i((()=>{if(!a.every((e=>null===e)))try{const e=t(...a);"then"in e?(e=>{e.then((e=>ze.get(a)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...a]);const u=a[0],p=n&&"string"==typeof u&&n[u];return{data:!s&&p?p:s,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function He(e){return e?Array.isArray(e)?e:e instanceof Function?He(e()):[e]:[e]}async function Ge(e,t){const n=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await n.json()}function Je(e,t={}){const{data:n}=Fe(`/wcms-resources/${e}.json`,Ge,{fallback:t});return n||{}}function Ue(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Xe=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:r,s2Matches:i}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),r=new Array(e.length),i=new Array(t.length);let a=0;for(let l=0;l<e.length;l++){const s=Math.max(0,l-n),o=Math.min(l+n,t.length-1);for(let n=s;n<=o;n++)r[l]||i[n]||e[l]!==t[n]||(a++,r[l]=!0,i[n]=!0)}return{m:a,s1Matches:r,s2Matches:i}}(e,t);if(0===n)return 0;const a=function(e,t,{s1Matches:n,s2Matches:r}){let i=0;for(let a=0,l=0;a<e.length;a++){if(!n[a])continue;let s=l;for(;s<t.length;s++)if(r[s]){l=s+1;break}e[a]!==t[s]&&i++}return i}(e,t,{s1Matches:r,s2Matches:i}),l=(n/e.length+n/t.length+(n-a/2)/n)/3,s=l>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return l+s*(1-l)};const We=(e,t)=>(n,r)=>{for(const[i,a]of r)n.set(i,e(n.get(i)||t,a));return n},Ye=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Ke=e=>t=>e.map((([e,n])=>[Xe(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>Qe(t,e))).reduce(We(Math.max,0),new Map),qe=e=>t=>{return Ue(t,t.map((({title:e})=>e)).map((e=>t=>{const n=Ye(t||"");return n.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e.map((e=>X(n.map(Xe(e)))))):0})(e))).sort((r=([,e])=>e,n=(e,t)=>r(e)-r(t),(e,t)=>-n(e,t))).map((([e])=>e));var n,r},Qe=(e,t)=>new Map(e.map((e=>[e,t]))),Ze=(e=["/"])=>{const[t,n]=r(""),[s,o]=r(!1),c=a((()=>{o(!0)}),[]),d=l((()=>e.map((e=>s?e:null))),[s,...e]),{data:m}=Fe(d,et),[h,u]=r(null);return i((()=>{const e=setTimeout((()=>{m&&u(m.map((e=>t=>{const{corpus:n,dictionary:r}=t||{};if(!(e&&n?.length&&r&&Object.keys(r).length))return[];const i=Ye(e);if(!i.length)return[];const a=Object.entries(r),l=[...i.map(Ke(a)).reduce(We(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*i.length)).map((([e])=>n[e]));return qe(i)(l)})(t)))}),300);return()=>{clearTimeout(e)}}),[m,t]),[h,{value:t,onChange:n,onFocus:c}]},et=async(...e)=>(await Promise.allSettled(e.map((e=>async function(e,t){try{return e?await Ge(e,t):null}catch(e){console.error(e)}return null}(ne(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),tt=g((({className:e,onClick:t})=>u("button",{className:x("visible peer-placeholder-shown:invisible w-6 h-6 p-1 bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(Ae,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),nt=g((({className:e,head:t,children:n,onClose:r})=>{const l=a((e=>{e.preventDefault(),r&&r()}),[r]);return i((()=>{const e=({key:e})=>{"Escape"===e&&r&&r()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[r]),u("div",{className:x("fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar",e),role:"dialog",children:p("div",{className:"relative container pb-12 min-h-full",children:[p("div",{className:"sticky bg-white pt-6 top-0",children:[u(tt,{className:"absolute top-3 -right-6",onClick:l}),t]}),n]})})})),rt=g((({className:e,topItems:t})=>{const n=se(!0);return u("div",{className:x("flex items-start justify-between",e),children:t?.map(n).map(it)})})),it=(e,t)=>{const{text:n,items:r,href:i,target:a,onClick:l}=e;return p("div",{className:"flex flex-col gap-3.5 w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:i,target:a||"_self",onClick:l,children:n||`Раздел ${t}`}),r?.map(((e,t)=>u(at,{...e,basePath:i,index:t},String(t))))]},String(t))},at=g((({text:e,index:t,basePath:n,...r})=>{const i=!(!c.BASE_PATH||!n)&&!c.BASE_PATH.startsWith(n),a=se(i),{href:l,target:s,onClick:o}=a(r);return u("a",{className:x("text-l-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i?ne(n,l):l,target:s||"_self",onClick:o,children:e||`Раздел ${t}`})})),lt=g((({className:e,isMobile:t,value:n,autoFocus:r,onChange:i,onFocus:l})=>{const s=a((e=>{i&&i(e.target?.value||"")}),[i]);return p("div",{className:x("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-4 pointer-events-none",children:u(Ae,{image:{icon:"LoupeIcon"},width:"24",height:"24"})}),u("input",{className:x("h-12 pl-12 w-full text-l text-black outline-none box-border","border border-solid rounded-md border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",t?"":"h-full"),value:n,type:"text",name:"search-bar-input",placeholder:"Поиск по сайту",autoFocus:r,onChange:s,onFocus:l})]})})),st=g((({className:e,isMobile:t,topItems:n})=>{const s=n?.map((e=>e.href||"/")),[o,c]=Ze(s),{value:d,onChange:m,onFocus:h}=c,g=l((()=>ct(n)(o)),[n,o]);i((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(g)),[g]);const[b,{setTrue:x,setFalse:f}]=function(e=!1){const[t,n]=r(e),i=a((()=>n(!0)),[]),l=a((()=>n(!1)),[]),s=a((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:i,setFalse:l,toggle:s}]}(),v=a((e=>{m(e),ot(e)&&x()}),[m,ot]),N=a((()=>{h(),ot(d)&&x()}),[d,h]);return p("div",{className:e,children:[u(lt,{isMobile:t,value:d,onChange:v,onFocus:N}),t?u(tt,{className:"absolute top-2 right-3",onClick:e=>{e.preventDefault(),m("")}}):null,b?u(nt,{head:u(lt,{className:"my-5",isMobile:t,autoFocus:!0,...c}),onClose:f,children:u(rt,{topItems:g})}):null]})})),ot=e=>e&&e.length>=3,ct=e=>t=>e?.length&&t?.length?Ue(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:t})))}))):[];const dt=g((e=>u(st,{...e,isMobile:!0}))),mt=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),ht=g((({className:e="",documents:t,...n})=>u(M,{className:`mt-2.5 ${e}`,...n,children:u("ul",{className:"flex flex-col text-s text-secondary-text p-0",children:t?.length?ut(t):null})}))),ut=e=>e.map(((e,t)=>{const{text:n,...r}=e;return u("li",{className:"mb-4 list-none",children:u("a",{className:"hover:text-primary-main",role:"link",...r,children:n||null})},`list_item_${String(t)}`)})),pt={"bg-white":"color",transparent:"white"},gt={"bg-white":"text-primary-main",transparent:"text-white"},bt=(e,t,n)=>u(Ae,t?.src?{image:t,className:gt[e],width:n?.width,height:n?.height,pathPrefix:"/wcms-resources/",asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:pt[e]},className:gt[e],width:n?.width,height:n?.height,asSVG:!0}),xt={"bg-white":"text-primary-text",transparent:"text-white"},ft=(e,t,n)=>u("span",{className:`${xt[t]} ml-2.5 font-medium ${n||""}`,children:e||"Россельхозбанк"}),vt=g((({bgColor:e="bg-white",children:t,className:n="",href:r,logo:i,showTitle:a=!0,targetBlank:l})=>p("a",{className:`inline-flex items-center font-sans no-underline ${n}`,href:r||"https://rshb.ru/",target:l?"_blank":"_self","aria-label":i?.title||"Россельхозбанк",children:[bt(e,i?.image,{width:"34",height:"34"}),a?ft(t||i?.title,e,"text-s"):null]}))),Nt=g((({className:e="",title:t="Мобильное приложение",description:n,href:r="#"})=>u("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${e}`,children:r?p("div",{className:"flex",children:[u("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-12 h-12",children:u(vt,{className:"w-8",bgColor:"transparent",showTitle:!0})}),p("a",{href:r,target:"_blank",className:"flex flex-col justify-center pl-3",children:[u("div",{className:"text-s font-medium mb-[3px]",children:t}),u("div",{className:"text-s text-secondary-text",children:n})]})]}):null})));const yt=g((({className:e="",label:t,icon:n,dataTheme:r="",onClick:i})=>p("button",{className:["border border-transparent bg-primary-main font-sans text-white cursor-pointer","hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none","flex justify-center w-full px-0 py-5",e].join(" "),"data-theme":r,onClick:i,children:[u("span",{className:"text-h4 pr-3",children:t}),n?u(Ae,{image:{icon:n,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20",asSVG:!0}):null]}))),wt=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:i,renderFoldButton:l})=>{const[s,o]=r(n),c=a((()=>{o((e=>!e))}),[]),d=i({isUnfolded:s,onToggle:c}),m=l?l({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),kt=g((({className:e="",isUnfolded:t,children:n})=>{const r=s(null);return i((()=>{r.current&&(r.current.style.maxHeight=t?`${r.current.scrollHeight}px`:"")}),[t,n?.length]),u("div",{ref:r,className:`transition-max-h duration-300 overflow-hidden ${r.current||!t?"max-h-0":""} ${e}`,children:n})})),Tt=g((({children:e,...t})=>u("span",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),Ct=g((({className:e="",label:t="Развернуть",isExpanded:n,isFoldButtonOnTop:r=!0,version:i="primary",...a})=>{const{bordered:l}=function(e,t){const{content:n}=function(e){return e?.parent||{}}(e);return n||t}(a.options,{});return u(M,{className:x("border-b border-solid border-main-divider w-full",l?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0",e),tag:"div",version:"transparent",...a,children:u(wt,{isFoldButtonOnTop:r,unfoldedByDefault:n,renderFoldableSection:({isUnfolded:e})=>u(kt,{className:"flex flex-wrap group-last:last:pb-0 gap-5 [&>*]:p-0",isUnfolded:e,children:k(a)}),renderFoldButton:({isUnfolded:e,onToggle:n})=>St({version:i,label:t,isUnfolded:e,onToggle:n})})})}));Ct.childrenTypes={exclude:["RollupItem","Accordion","OtherProducts"]};const St=({version:e,label:t,isUnfolded:n,onToggle:r,className:i="",primaryIcon:a})=>{const l=t||(n?"Скрыть":"Развернуть");return"primary"===e?_t({label:l,icon:n?"MinusIcon":"PlusIcon",onToggle:r,className:i,primaryIcon:a}):u(yt,{label:l,icon:n?"ArrowUpIcon":"ArrowDownIcon",onClick:r})},_t=({label:e,icon:t,primaryIcon:n,onToggle:r})=>p("button",{className:"border-none bg-transparent flex justify-between text-left w-full text-primary-text group cursor-pointer py-3.5 px-0",onClick:r,children:[p("div",{className:"flex group-hover:text-primary-main",children:[n?u(Ae,{image:{...mt({...n})},className:"mr-3 flex-shrink-0",width:"24",height:"24",asSVG:!0}):null,u(Tt,{size:"text-m-title-xs",font:"font-medium",children:e})]}),u(Ae,{className:"flex-shrink-0",image:{...mt({icon:t})},width:"24",height:"24",asSVG:!0})]}),It=g((({className:e="",items:t,hasButton:n})=>p("div",{className:e,children:[t?.length?t.map($t):null,n?u(fe,{version:"primary",className:"mb-6 w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),$t=(e,t)=>{const{type:n,text:r,description:i}=e;return p("div",{className:"mb-4",children:[u("div",{children:Mt(n,r)}),u("div",{className:"mt-1 text-s-light text-secondary-text",children:i})]},String(t))},Mt=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${At(t)}`,children:t});case"email":return u("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},At=e=>e.replaceAll(/\D/g,""),jt=g((({className:e="",index:t,text:n,...r})=>{const i=se(),{href:a,target:l,onClick:s}=i(r);return u("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:a,target:l,onClick:s,children:n||`Документ ${t}`})})),Rt=g((({title:e,links:t,className:n=""})=>p("div",{className:n,children:[u("span",{className:"text-primary-text text-s font-medium",children:e}),t?.length?u("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>u(jt,{index:t,className:"text-s",...e},String(t))))}):null]}))),Pt=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],Lt={default:"w-14 h-14",small:"w-12 h-12"},Dt=(e,t)=>e?"":`group/media flex items-center justify-center box-border ${Lt[t]}`,Ot=g((({iconVersion:e="color",buttonSize:t="default",rounded:n=!1,icon:r,...i})=>{const{href:a,version:l,text:s,appendLeft:o,appendRight:c,aboveText:d}=i,{iconMapped:m,label:h}=Pt.find((({origins:e})=>e.some((e=>a?.includes(e)))))||{},p=r??m,g=p?{...mt(p),iconVersion:e}:void 0;return u(fe,{className:x(n?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",Dt(s,t)),aboveText:d,appendLeft:o,appendRight:c,"aria-label":h,rel:"noopener noreferrer",target:"_blank",text:s,version:l,...i,children:g&&!s?u(Ae,{image:g,imageClassName:"group-hover/media:text-white",width:"24",height:"24",asSVG:!0}):null})})),Vt=g((({className:e="",media:t})=>u("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e}`,children:t?.map(((e,t)=>u(Ot,{...e},String(t))))}))),Bt=g((({className:e="",index:t,...n})=>{const r=se(),{href:i,target:a,text:l,onClick:s}=r(n);return u("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:i,target:a,onClick:s,children:l||`Документ ${t}`})})),Et=g((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"py-6",children:u("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col justify-start items-start gap-2",children:t.map(((e,t)=>u(Bt,{index:t,...e},String(t))))}):null]}))),zt=g((({className:e="",...t})=>{const n=t.options?.page?.fallback,r=Je(c.SITEMAP||"sitemap",n),{documents:i,relatedEnterprises:a,contacts:l,socialMedia:s,horizontalNavigationTitle:o}=Je(c.FOOTER||"footer",n);return p(M,{tag:"footer",className:`px-4 py-[26px] ${e}`,...t,children:[u(It,{className:"overflow-hidden",items:l,hasButton:!0}),u("div",{className:"m-0 p-0",children:r.topItems?.map(((e,t)=>u(Ct,{label:e?.text,children:u(ht,{documents:e.items})},String(t))))}),u("div",{children:r?.dispositions?.map(Ft)}),u(Nt,{title:"Мобильное приложение",description:"Загрузить для IOS и Android",...t}),u(dt,{className:"grow"}),u(Vt,{className:"pb-4",media:s}),u(Rt,{title:o,links:a}),u(Et,{links:i})]})})),Ft=(e,t)=>{const{icon:n,href:r,text:i}=e;return p(fe,{version:"link",href:r,className:"flex text-s mb-4 w-6",children:[n?u(Ae,{className:"pr-1",image:mt(n),width:"24",height:"24",asSVG:!0}):null,u("span",{className:"pl-2.5 font-medium text-primary-text",children:i})]},`footer-${t}`)},Ht=e=>({href:t})=>te(Z(t)?e.href:e.pathname).startsWith(te(t)),Gt=g((({className:e="",active:t,dataItemName:n,children:r,...i})=>{const a=se(),{href:l,target:s,text:o,onClick:c}=a(i);return p("a",{className:x("relative inline-block bg-transparent text-center no-underline",e),href:l,target:s,"data-item-name":n,onClick:c,children:[u("span",{className:Jt(t),children:o||r}),t?u("div",{className:"absolute left-0 -bottom-3 w-full h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),Jt=(e=!1)=>x("font-sans text-s",e?"text-primary-main":"text-secondary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Ut=864e5;function Xt(e,t,n=globalThis?.localStorage){const r=a((async(...r)=>{const i=`async:${e}`,a=function(e){const{data:t=null,timestamp:n=null}=e?JSON.parse(e):{};return t&&Date.now()-n<Ut?t:void 0}(n.getItem(i));if(a)return a;const l=await t(...r);return n.setItem(i,JSON.stringify({data:l,timestamp:Date.now()})),l}),[e,t]);return Fe(e,r)}const Wt=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}},Yt=g((({burgerSubMenu:e,onClick:t,defaultLocation:n="",children:l})=>{const[s]=function(e){const t=Wt(),[n,l]=r(t?.region??{name:e}),{data:s}=Xt("/api/v1/region",Ge);return i((()=>{l(t?.region&&t?.manual?t.region:s||{name:e})}),[s]),[n,a((e=>{globalThis.localStorage?.setItem("location",JSON.stringify({manual:!0,region:e})),l(e)}),[l])]}(n);return p("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[u("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:t,children:u(Ae,{image:{icon:"CloseIcon"},width:"24",height:"24",asSVG:!0})}),p("button",{className:"flex items-center text-s p-0 mb-4 bg-transparent cursor-pointer",children:[u(Ae,{image:{icon:"GeolocationIcon"},width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),u(Tt,{color:"text-secondary-text",children:s.name})]}),l,u("div",{className:"mb-7",children:e?.map(Kt)}),u(dt,{className:"grow"})]})})),Kt=(e,t)=>{const{icon:n,href:r,text:i}=e;return p("a",{href:r,className:"flex text-s mb-4 hover:text-primary-main",children:[n?u(Ae,{className:"text-primary-main pr-1",image:n,width:"24",height:"24",asSVG:!0}):null,u("span",{className:"font-medium pl-0.5",children:i})]},`headerSubMenu-${t}`)},qt=g((({onClick:e,bgColor:t,logo:n})=>p("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-12",children:[p("div",{className:"flex items-center",children:[u("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:u(Ae,{image:{icon:"BurgerIcon",iconVersion:"bg-white"===t?"black":"white"},className:"text-primary-text w-6 h-6",width:"24",height:"24",asSVG:!0})}),u(vt,{className:"mr-8",bgColor:t,logo:n})]}),u("button",{className:"text-primary-main group-data-transparent:text-white group-data-transparent:hover:text-primary-hover text-s border-0 bg-transparent",children:"Войти"})]}))),Qt={"bg-white":"primary",transparent:"transparent"},Zt=g((({bgColor:e="bg-white",version:t=Qt[e],...n})=>{const i=le(),l=n.options?.page?.fallback,{topItems:s,dispositions:o,defaultLocation:d,logo:m}=Je(c.SITEMAP||"sitemap",l),h=s?.find((e=>Ht(c.BASE_PATH?{pathname:c.BASE_PATH}:e))(i)),g=h?.items,b=(e=>(t=[])=>{const n=t?.filter(Ht(e));return n?.length?U((e=>e.href?.length||0))(n):void 0})(i)(g),[x,f]=r(!1),v=a((()=>f((e=>!e))),[]);return p(M,{tag:"header",version:t,...n,children:[p("div",{className:"container px-4 py-0 box-border",children:[u(qt,{onClick:v,bgColor:e,logo:m}),u("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-12",children:u("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:g?.map(((e,t)=>u(Gt,{className:"mr-8 whitespace-nowrap text-s",active:e===b,...e},String(t))))})})]}),x?u(Yt,{onClick:v,burgerSubMenu:o,defaultLocation:d,children:u("div",{className:"list-none m-0 p-0",children:s?.map(((e,t)=>u(Ct,{label:e.text,children:u(ht,{documents:e.items})},String(t))))})}):null]})})),en={XXL:{wrapper:"gap-[18px]",title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5"},XL:{wrapper:"gap-4",title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl-light"},L:{wrapper:"gap-4",title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl-light"},M:{wrapper:"gap-3",title:{headingType:"h3",as:"h3"},descriptionSize:"text-xl-light"},S:{wrapper:"gap-2",title:{headingType:"h4",as:"h4"},descriptionSize:"text-xl-light"},XS:{wrapper:"gap-2",title:{headingType:"h5",as:"h5"},descriptionSize:"text-l-light"}},tn=g((({className:e,title:t,description:n,headlineVersion:r="XL",align:i="text-center",as:a,isPadding:l=!0,isTheme:s=!1,version:o="",...c})=>{const d=en[r];return p(M,{className:x("flex flex-col",l?"p-12":"",d.wrapper,e),version:o,isTheme:s,...c,children:[t?u(R,{className:x("whitespace-pre-wrap",i),...d?.title,as:a||d?.title.as,title:t}):null,n?u(P,{color:"group-data-secondary:text-white/80",size:d.descriptionSize,align:i,children:n}):null]})})),nn=g((({className:e,iconClassName:t,textClassName:n,suffixClassName:r,doc:i,icon:a})=>{const{text:l,fileSize:s,...o}=i;return p("a",{className:e,role:"link",...o,children:[a?u(Ae,{className:t,image:mt(a),width:"24px",height:"24px",asSVG:!0}):null,l?p("span",{className:n,children:[l,u("span",{className:r,children:o?.href&&rn(an(o.href),s)})]}):null]})})),rn=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),an=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},ln=g((({className:e="",doc:t,icon:n})=>u(nn,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:n}))),sn=g((({hasBorder:e=!0,documents:t,icon:n})=>u(Q,{className:"text-s text-primary-main mt-5",children:t?.length?t.map(((t,r)=>u(ln,{className:e?"rounded-md border-gray border border-solid p-4":"",doc:t,icon:n},String(r)))):null}))),on=g((({hasBorder:e=!0,documents:t,icon:n})=>u("div",{className:"text-s text-primary-main flex flex-col mt-5 "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,r)=>u("div",{role:"listitem",children:u(ln,{className:e?"rounded-md border-gray border border-solid p-4":"",doc:t,icon:n})},String(r)))):null}))),cn=g((({className:e="",title:t,description:n,icon:r={icon:"DocIconMonoColor"},documents:i,orientation:a="vertical",hasBorder:l=!0,align:s,...o})=>p(M,{className:x("py-6 px-4 overflow-x-hidden",e),...o,children:[u(tn,{className:"!p-0 "+(n?"gap-2":"gap-5"),title:t,description:n,align:s,headlineVersion:"M",as:"h2"}),u("vertical"===a?on:sn,{hasBorder:l,documents:i,icon:r})]}))),dn=e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function mn(e=""){const t=dn(e);return t<=4?"S":t<=8?"M":"L"}function hn(e=""){const t=dn(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function un(e=""){const t=dn(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const pn=g((({className:e,title:t,description:n="Блок в разработке...",...r})=>p(M,{className:x("p-9 box-border",e,un(e),hn(e)),...r,children:[u(tn,{className:"!p-0 max-w-[600px]",title:t,description:n,headlineVersion:mn(e)}),u("figure",{className:"m-0 min-w-[80%]",children:gn()})]}))),gn=(e=3)=>xn(100,e).map((e=>Math.floor(e))).map(bn),bn=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),xn=(e,t)=>[e].concat(t>0?xn(e/1.618,t-1):[]),fn=(e,{className:t="",buttonClassName:n,isVertical:r}={})=>e?.length&&e.some((e=>e?.text))?u("div",{className:x("flex",r?"flex-col gap-2":"gap-4",t),children:e.map(vn(n))}):null,vn=(e="")=>(t,n)=>{const{text:r,icon:i,iconRight:a,version:l,...s}=t||{},o="secondary"===l?"color":"white";return r?u(fe,{className:e,appendLeft:Nn({...i,iconVersion:o}),appendRight:Nn({...a,iconVersion:o}),version:l,text:r,...s},n?String(n):""):null},Nn=e=>e?.icon||e?.src?u(Ae,{image:e,width:String(e?.size?.width||24),height:String(24),asSVG:!0}):null,yn={L:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4",M:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3",S:"w-1 h-1 min-w-1 min-h-1 mr-2"},wn=g((({className:e="",isDotted:t=!0,children:n,size:r="M"})=>p("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?u("div",{children:u("div",{className:`rounded-full align-middle inline-block bg-primary-text group-data-secondary:bg-white ${yn[r]}`})}):null,u("span",{children:n})]}))),kn={S:"text-l-light",M:"text-h6",L:"text-h5"},Tn={S:"ml-2",M:"ml-3",L:"ml-4"},Cn=g((({className:e="",hasIndent:t,isDotted:n,itemClassName:r="",items:i,listItemSize:a="M"})=>i?.length?u("section",{className:`text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${kn[a]} ${t?Tn[a]:""} ${e}`,role:"list",children:i.map(((e,t)=>u(wn,{className:r,isDotted:n,size:a,children:e},String(t))))}):null)),Sn=g((({className:e="",title:t="",buttons:n,image:r,children:i})=>p("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,p("div",{className:"flex grow w-full justify-between",children:[p("div",{className:"flex flex-col justify-between w-full",children:[u("div",{className:"h-full",children:i}),n?u("div",{className:"mt-auto pt-8",children:n}):null]}),r]})]}))),_n=g((e=>{const{className:t="",icon:n,label:r,description:i,version:a="primary",benefitsVersion:l="normal"}=e,s="white"===l?"secondary":"primary";return p("div",{className:`flex gap-5 ${i?"items-start":"items-center"} ${t}`,children:[n?u("div",{className:In(a,l),children:u(Ae,{className:"w-6 h-6",image:mt(n,s),asSVG:!0})}):null,p("div",{className:"gap-0.5",children:[r?u("div",{className:"text-h6 text-primary-text group-data-secondary:text-white",children:r}):null,i?u("div",{className:"text-m-light text-secondary-text group-data-secondary:text-white",children:i}):null]})]})}));function In(e,t){let n="bg-primary-main text-black";return"secondary"===e?n="bg-white/30 text-black":"normal"===t&&(n="bg-secondary-light text-primary-main"),`w-12 h-12 min-w-12 rounded-full p-2.5 box-border flex items-center justify-center ${n}`}const $n=(e="primary",t="normal")=>({icon:n,label:r,description:i},a)=>u(_n,{icon:n,label:r,description:i,version:e,benefitsVersion:t},String(a)),Mn=g((({className:e="",headlineVersion:t="L",benefits:n,benefitsVersion:r="normal",buttons:i,image:a,items:l,isDotted:s=!0,label:o,title:c,description:d,...m})=>p(M,{className:`w-full ${e}`,...m,children:[p("div",{children:[o?jn(o):null,u(tn,{className:"!p-0 max-w-[600px]",title:c,description:d,headlineVersion:t,align:"text-left"}),p(Sn,{buttons:fn(i,{className:"mt-5",isVertical:!0}),children:[n?.filter((e=>e.label))?.length?u("div",{className:"mt-3",children:n.map($n("primary",r))}):null,l?.length?u(Cn,{className:"mt-3 text-m",items:l,isDotted:s}):null]})]}),An(a)]})));function An(e){return e?.src?u(Ae,{imageClassName:"mt-5 mx-auto block",image:{className:"block",...e}}):null}const jn=e=>u("div",{className:"w-fit px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid border-secondary-hover",children:u(Tt,{color:"text-primary-main group-data-secondary:text-white/80",children:e})}),Rn=g((e=>{const{className:t="",...n}=e;return u(M,{className:`px-4 py-6 ${t}`,...n,children:u(Mn,{...e})})})),Pn=g((e=>{const{__html:t=""}=e;return u("div",{className:"md-container",dangerouslySetInnerHTML:{__html:t}})}));const Ln={normal:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",small:"h-12 w-12 min-w-12 min-h-12"},Dn={normal:"min-h-[70px]",small:"min-h-12"},On={description:"text-white/80 text-l-light group-data-primary:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},Vn=g((({className:e="",title:t,description:n,showLines:r=!0,steps:i,size:a="normal",version:l="primary",...s})=>p(M,{className:`box-border px-4 py-6 flex flex-col ${e}`,version:l,...s,children:[t?u(R,{headingType:"h3",className:"text-center",title:t}):null,n?u("p",{className:`text-m-light text-center ${On.description} ${t?"mt-2":""}`,children:n}):null,i?.length?u("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:u("div",{className:"flex flex-col justify-between gap-x-[101px]",children:i.map(Bn(a,l,r))})}):null]}))),Bn=(e,t,n)=>(r,i,a)=>{const{type:l}=r;if("default"!==l&&"rte"!==l)return null;switch(l){case"default":return En(e,t,n)(r,i,a);case"rte":return u(Pn,{__html:r.__html});default:!function(e){throw new Error(e)}(r)}},En=(e,t,n)=>(r,i,a)=>{const l=a.length-1===i,s="normal"===e?"ml-[34px]":"ml-6";return u("div",{children:p("div",{className:"flex flex-row text-center relative",children:[p("div",{className:"overflow-hidden flex-shrink-0",children:[zn(e,t)(r,i),l?null:u("div",{className:`min-h-8 h-full w-0.5 ${n?On.iconConnector:""} ${s}`})]}),p("div",{className:`flex flex-col justify-center h-fit ${Dn[e]}`,children:[r.label?u("div",{className:"text-m-title-xs font-medium m-0 text-left mb-1",children:r.label}):null,r.description?u("div",{className:`text-s ${On.description} text-left`,children:r.description}):null]})]})},String(i))},zn=(e,t)=>(n,r)=>{const i="normal"===e?"38":"27";return u("div",{className:`${Ln[e]} ${On.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:u("span",{className:`font-medium flex self-center ${"normal"===e?"text-m-title":"text-m-title-xs"}`,children:(a=n?.icon,Boolean(a?.icon||a?.src)?u(Ae,{image:mt({...n.icon},t),width:i,height:i,asSVG:!0}):u("span",{children:r+1}))})});var a},Fn={Buttons:({buttons:e})=>fn(e,{className:"mt-3",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(Ae,{image:{...e,className:"m-0"}}):null,List:({isDotted:e,...t})=>u(Cn,{className:"flex flex-col justify-between items-start text-m",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"text-xl font-medium m-0 "+(t?"mb-1":""),children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},Hn=g((({title:e,icon:t})=>p("div",{className:"flex gap-2.5 mb-2",children:[e?u(R,{headingType:"h3",className:"font-medium",title:e}):null,t?u(Ae,{className:"ml-auto max-w-6 max-h-6",image:t,width:"24px",height:"24px"}):null]}))),Gn=g((({tile:e,...t})=>p("div",{className:"rounded-md border-gray h-full box-border border p-4",children:[u(Hn,{...e?.header}),e?.data?.length?e.data.map(((e,n)=>p("div",{children:[n>0?u("div",{className:"h-5"}):null,Jn(e,t)]},String(n)))):null]})));function Jn(e,t){if(!e||!e.tableCellType||!(e.tableCellType in Fn))return null;const n=Fn[e.tableCellType];return u(n,{displayTable:()=>null,isVisible:!0,...e,...t})}const Un=g((({tiles:e,...t})=>e?.length?u(Q,{...t,children:e.map(((e,n)=>u(Gn,{tile:e,...t},String(n))))}):null)),Xn=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-3.5",children:e.map(((e,n)=>u(Gn,{tile:e,...t},String(n))))}):null)),Wn=g((({className:e,title:t,description:n,tariffsColumns:r,rowHeaders:i,orientation:a="vertical",...l})=>{const s=Yn(r),o=Kn(i,s);return p("section",{className:`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[t?u(R,{headingType:"h2",className:`text-center ${n?"mb-2":"mb-5"}`,title:t}):null,n?u("div",{className:"mb-5 text-center text-m",children:n}):null,u("vertical"===a?Xn:Un,{tiles:o,...l})]})})),Yn=e=>e?.[0]?.data?e[0].data:[],Kn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),qn=g((({title:e,description:t,iconVersion:n,image:r,className:i="",items:a,isDotted:l=!0})=>p("section",{className:`font-sans px-4 py-[18px] flex flex-col bg-white group-data-secondary:bg-primary-main ${i}`,children:["small"===n?u("div",{className:"mb-3",children:u("div",{className:"rounded-full h-4 w-4 text-center text-xs-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"})}):null,"big"===n?Qn(r):null,p("div",{className:"py-0.5 text-secondary-text group-data-secondary:text-white",children:[e?u("div",{className:"text-l font-medium mb-1",children:e}):null,t?u("div",{className:"text-s ",children:t}):null,a?.length?u(Cn,{className:"mt-1 text-m",items:a,isDotted:l}):null]})]})));function Qn(e){return e?.src?u(Ae,{className:"pb-3 mr-auto",image:e}):null}const Zn={XXL:"gap-12",XL:"gap-10",L:"gap-8",M:"gap-4",S:"gap-2",XS:"gap-1","":""},er={stretch:"items-stretch",left:"items-start",center:"items-center",right:"items-end"},tr=g((({className:e="",gap:t="",align:n="stretch",isPadding:r=!1,isInnerPadding:i=!0,version:a="transparent",isTheme:l=!1,options:s,...o})=>{const c=i?"":"!p-0";return u(M,{className:x("flex flex-col [&>*]:max-w-full",r?"p-12":"",Zn[t],n&&er[n],e),version:a,isTheme:l,...o,children:k({...o,options:{...s,className:c}})})}));tr.childrenTypes={exclude:["Accordion","OtherProducts"]};const nr={Accordion:L,ComparisonTable:Be,Footer:zt,Header:Zt,Headline:tn,LinkDocs:cn,LinkList:ht,MobileAppTile:Nt,ProductBlock:Rn,RollupItem:Ct,StepsBlock:Vn,TariffsTable:Wn,TextBlock:qn,Placeholder:pn,VerticalLayout:tr};const rr=["Header","Footer"],ir=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function ar(e=globalThis){const t=s(new Map);i((()=>I.subscribe("intersection",(({block:e,intersection:n})=>{t.current&&t.current.set(e,n)}))),[]),i((()=>{const n=((e,t=600)=>{let n;const r=(...i)=>{r.dispose(),n=setTimeout((()=>{e(...i)}),t)};return r.dispose=()=>{n&&clearTimeout(n)},r})((()=>{!function(e){const t=`#${n=e?.anchor,n?.replace("#","")||""}`;var n;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!rr.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[n]=t.length>0?W(ir)(t):[];return n}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",n),()=>{n.dispose(),e.removeEventListener("scroll",n)}}),[e])}const lr=h();const sr=g((({className:e,onClick:t,ariaLabel:n})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:or()}))),or=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},cr=g((({className:e=""})=>{const t=function(e){const[t,n]=r(0);return i((()=>{(async()=>{const[t]=await lr.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:a((async()=>{n(await lr.like(e))}),[e]),dislike:a((async()=>{n(await lr.dislike(e))}),[e])}}(le().pathname);return p("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:[u(sr,{onClick:ae(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(sr,{onClick:ae(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),dr=g((e=>{const{className:t="",blocksRegistry:n,blockDecorator:a,data:l={}}=e,{style:s,blocks:o,slots:c,likeControl:d,colorPalette:m="pc"}=l,[h,g]=r(""),b={key:"",page:l,blocksRegistry:n,blockDecorator:a,parent:l};return ar(),i((()=>C.subscribe("setPageOverflowHidden",(e=>{g(e?"overflow-hidden h-screen":"")}))),[]),p("section",{className:x("relative",s,t,h),"data-theme":m,children:[c?.header?u("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:w(c?.header,{...b,slotName:"header"})}):null,p("div",{className:"container grid grid-cols-12 gap-1",children:[w(o,b),c?.footer?w(c?.footer,{...b,slotName:"footer"}):null]}),d?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(cr,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));dr.childrenTypes=[],dr.slots=()=>["header","footer"];e.Blocks=nr,e.ContentPage=dr,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.LikeAPI=h,e.handlerDecorator=ae,e.joinList=function(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])},e.packageVersion="0.8.31",e.projectSettings=c,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=re,e.useRouter=le,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),r=n("useState"),i=n("useEffect"),a=n("useCallback"),l=n("useMemo"),s=n("useRef");const o={PROD_BRANCH:"master"},c=new class{_=o;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||o.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return d(this._.CDN)}get BASE_PATH(){return d(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},d=e=>e&&!e.endsWith("/")?`${e}/`:e,m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:n}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:n})),{token:t,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({node_ids:t})}),{likes:r}=await e.json();return r||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:n,name:r}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:r},body:JSON.stringify({node_id:t,user_name:r})}),{likes:i}=await e.json();return i||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:n,name:r}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:r},body:JSON.stringify({node_id:t,user_name:r})}),{likes:i}=await e.json();return i||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:b(e)),t._tmpl},b=e=>{function t(t,n){const{children:r,...i}=t||{},a=n?.slots?.default,l=r||a&&a();return e(Object.assign(i,l&&{children:l}),n)}return t.inheritAttrs=!1,t},x=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),f=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),v=[];function N(e,t){const{key:n,blockDecorator:r=f,blocksRegistry:i={},ancestors:a=v,className:l="",extraProps:s={}}=t,{type:o}=e;o&&o in i||console.warn(`No block with "${o}" is registered`);const c=o&&i[o];return r({blockClassName:x("scroll-mt-12",l,e.style||"col-span-12"),block:e,ancestors:a,render:({block:r,blockClassName:i})=>{const{content:a}=r;return c?u(c,{className:i,block:e,options:t,...a,...s},n):null}},n)}const y=[],w=(e,{key:t,ancestors:n=y,slotName:r=null,renderProps:i=N,...a})=>(e||[]).map(((e,l)=>i(e,{...a,key:`${t||e.type}-${l}`,ancestors:a.parent?[...n||y,[a.parent,r]]:n})));function k({children:e,block:t,options:n,renderProps:r}){return e||(t&&n?w(t.blocks,{...n,parent:t,renderProps:r}):null)}class T{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const C=new T;function S(e,{sensitivity:t,rootRef:n}={}){const r=s(null),a=l((()=>({threshold:_(t),root:n?.current})),[t,n?.current]);return i((()=>{if(!r.current)return;const t=new IntersectionObserver(e,a);return t.observe(r.current),()=>{t.disconnect()}}),[e,a]),r}function _(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const I=new T;const $={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},M=g((({className:e="",version:t="primary",block:n,tag:l="section",role:s,isTheme:o=!0,extraProps:c={},children:d})=>{const m=l,h=function(e){return S(a((t=>{if(!e||!t?.length)return;const n=t[t.length-1];I.fire("intersection",{block:e,intersection:n})}),[e]),{sensitivity:1})}(n),[p,g]=r(!1);return i((()=>C.subscribe("tab",(e=>{g(Boolean(e.label&&n?.labels?.length&&!n.labels.includes(e.label)))}))),[n]),u(m,{className:x(A(Boolean(t&&o)),$[t],p?"hidden":"",e),...t&&o?{"data-ver":t}:{},...n?.anchor?{id:n.anchor,ref:h}:{},role:s,...c,children:d})})),A=e=>e?"group":"",j={h0:"text-m-title",h1:"text-m-title",h2:"text-m-title",h3:"text-h6",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},R=g((e=>{const{className:t,headingType:n="h3",title:r,as:i="h3"}=e;return u(i,{className:`font-sans font-medium m-0 ${j[n]} ${t||""}`,children:r})})),P=g((({children:e,...t})=>u("p",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),L=g((({title:e,description:t,className:n="",...r})=>p(M,{className:`py-6 px-4 ${n}`,...r,children:[e?u(R,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?u("div",{className:"mb-5",children:u(P,{size:"text-m",font:"font-light",align:"text-center",children:t})}):null,u("div",{className:"list-none m-0 p-0",children:k(r)})]})));L.childrenTypes=["Accordion"];const D=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),O=g((({className:e="",style:t,idx:n,activeIndex:r,observerOptions:i,children:l,onIntersection:s})=>{const o=S(a((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),i);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(n===r),ref:o,children:l})})),V=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],B=g((({className:e="",containerRef:t,activeIndex:n,visibleItemCount:r=0,gap:i=0,padding:l=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},b=s([]),f=a(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,h&&h(n),p&&p(z(n))}),[h,p]),v=r>0?i*Number(r)-1:0,N="vertical-list"===o,y="horizontal-list"===o,w={...y?E(l,v):{},...N?D(d):{},gap:`${i}px`};return u("div",{className:x("box-border overflow-auto no-scrollbar",o,e),style:w,ref:t,children:(k=(e,t)=>u(O,{className:x(c,r?V[r-1]:"",N?"h-full":""),style:y?E(l/4):{},activeIndex:n,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(k):k(e,0))(m)});var k})),E=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),z=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),F={"horizontal-list":"mx-auto mt-5 w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},H={"horizontal-list":"w-6","vertical-list":"h-6"},G=g((({containerRef:e,activeIndex:t,dotCount:n=0,listType:r="horizontal-list",version:i})=>n?u("div",{className:x("flex gap-2",F[r],i?"group":""),...i?{"data-ver":i}:{},children:new Array(n).fill(null).map(((n,i)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${i===t?H[r]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(n=>{n!==t&&e?.current&&e.current.children[n]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(i)},String(i))))}):null)),J=e=>e,U=(e=J)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),X=U(),W=(e=J)=>U((t=>-e(t))),Y=e=>t=>e.scrollWidth/t,K=e=>(t,n)=>{e.scrollBy({left:n*Y(e)(t),behavior:"smooth"})},q=({itemCount:e,isCyclic:t,onVisibleIndicesChange:n})=>{const i=s(null),[l,o]=r([]),c=a((e=>{o((t=>{return(n=t)===(r=e)||Boolean(n&&r&&n?.length===r?.length&&n.every(((e,t)=>e===r[t])))?t:e;var n,r})),n&&n(e)}),[e]),[d,m]=l.length?[W()(l),U()(l)]:[-1,-1],h=d>0,u=m<e-1,p=a((()=>{var n;i.current&&(t&&!h?(n=i.current).scrollTo({left:n.scrollWidth,behavior:"smooth"}):K(i.current)(e,-1))}),[t,e,h]),g=a((()=>{i.current&&(t&&!u?i.current.scrollTo({left:0,behavior:"smooth"}):K(i.current)(e,1))}),[e,t,u]);return[i,{scrollLeft:p,scrollRight:g,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},Q=g((({className:e="",gap:t=14,padding:n=16,showDots:r=!0,minHeight:i,children:a,onVisibleIndicesChange:l,listType:s="horizontal-list",version:o})=>{const c=Array.isArray(a)?a.length:0,[d,m]=q({itemCount:c,onVisibleIndicesChange:l}),[h]=m.visibleIndicesRange;return p("div",{className:x(e,"vertical-list"===s?"relative h-full":""),children:[u(B,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:t,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:s,minHeight:i,children:a}),r?u(G,{containerRef:d,activeIndex:h,dotCount:c,listType:s,version:o}):null]})})),Z=e=>Boolean(e?.includes(":")),ee=(e,t)=>Boolean(e&&!Z(e)&&(!t||"_self"===t)),te=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),ne=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var re=Object.freeze({__proto__:null,isURL:Z,isLocalURL:ee,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:te,joinPath:ne});const ie=e=>t=>{if(!t||Z(t)||c.CDN&&t.startsWith(c.CDN))return t;const n=t.startsWith("/");return ne(c.BASE_PATH,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},ae=(e,t)=>ae._impl(e,t);function le(){return le._impl()}function se(e=!1){const t=le();return r=>({...r,href:e?r.href:ie(t)(r.href),"aria-label":r.text,onClick:ae(n(r),r)});function n({href:n,target:r,onClick:i}){return a=>{i&&i(a),n&&!e&&ee(n,r)&&(a?.preventDefault(),t.push(n))}}}ae._impl=e=>e,ae.setup=e=>{ae._impl=e},le._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),le.setup=e=>{le._impl=e};const oe={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ce="bg-main-divider text-main-disabled",de={primary:ce,secondary:ce,white:ce,link:"",transparent:"",gray:ce,"":""},me="text-center font-sans select-none",he={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},ue=g((e=>{const{text:t,aboveText:n,appendLeft:r,appendRight:i,version:a="primary"}=e;return p("div",{className:pe(e),children:[r?u("div",{className:he[a],children:r}):null,ge(e)?p("div",{children:[n?u("div",{className:"text-xs-light text-left",children:n}):null,u("div",{className:"text-left "+(n?"text-s -mt-0.5":"text-l"),children:t})]}):null,i?u("div",{className:he[a],children:i}):null]})})),pe=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const i="gap-2 "+(n?"py-2.5 px-7":"py-4 px-4");return["group/btn flex items-center justify-center",ge(e)?i:"h-12 w-12",r?"rounded-full":""].join(" ")},ge=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),be=({className:e,rounded:t,version:n})=>["inline-block",me,n?de[n]:"",t?"rounded-full":"rounded-md",e].join(" "),xe=({className:e,rounded:t,version:n})=>[me,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border",n?oe[n]:"",t?"rounded-full":"rounded-md",e].join(" "),fe=g((({disabled:e,children:t,...n})=>{const r=se()(n),i=t??u(ue,{...r});return u(e?Ne:ve,{...r,children:i})})),ve=g((({className:e="",href:t,rel:n,target:r,ariaLabel:i,version:a,rounded:l,onClick:s,children:o})=>u("a",{className:xe({className:e,version:a,rounded:l}),href:t,rel:n,target:r,"aria-label":i,role:t?"link":"button",onClick:s,children:o}))),Ne=g((({className:e,ariaLabel:t,version:n,rounded:r,children:i})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:be({className:e,rounded:r,version:n}),children:i}))),ye={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},we=g((({className:e="",imageClassName:t="",name:n="",alt:r=`Иконка ${n}`,title:i=r,iconVersion:a="color",asSVG:l,...s})=>{const o=le(),d=ie(o)(ne(c.CDN,"/icons",`${n}.svg`));return l&&"normal"!==a?u(Te,{className:e,children:p("svg",{className:x(ke(s.width),ye[a],"white"===a?"invert":"",t),...s,"aria-hidden":"true",children:[i?u("title",{children:i}):null,r?u("desc",{children:r}):null,u("use",{href:`${d}#icon`,xlinkHref:`${d}#icon`})]})}):(e.includes("h-")||(s.style={height:`${s.height}px`}),u("img",{className:e,src:d,alt:r,title:i,"aria-hidden":"true",...s}))})),ke=e=>e?"":"w-full h-full",Te=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Ce=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Se=g((({className:e="",image:t,imageClassName:n="",isMobile:r=!1,pathPrefix:i})=>{const a=le();return p("picture",{className:`${r?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Ce).map((({src:e,format:n,media:r},l)=>u("source",{srcSet:Ie(a,i)(e),type:$e(n),media:r?`(max-width: ${r}px)`:"",...t.size},`${l}_${e}`))):null,t?.src?_e({...t,src:Ie(a,i)(t.src)},n,r):null]})})),_e=(e,t="",n=!1)=>{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,l=n?"m-auto":"m-0";return u("img",{src:e.src,className:`${l} ${t}`,alt:a,title:i,style:r,...e.size})},Ie=(e,t)=>n=>n&&!Z(n)?ie(e)(ne(t,n)):n,$e=e=>e?`image/${String(e)}`:void 0,Me=g((({className:e="",image:t,imageClassName:n="",isMobile:r,pathPrefix:i,...a})=>t?.src||t?.icon?t.icon?u(we,{className:e,imageClassName:n,iconVersion:t?.iconVersion||"normal",name:t.icon,...a}):u(Se,{className:e,imageClassName:n,image:t,isMobile:r,pathPrefix:i}):null)),Ae=g((e=>u(Me,{...e,isMobile:!0}))),je=(e=!1)=>e?"text-white":"",Re=(e=!1)=>"text-s mb-3.5 "+(e?"text-white":"text-secondary-text/80"),Pe=g((({icon:e,image:t,title:n,subtitle:r,isFillGradient:i})=>p("div",{role:"columnheader",children:[e?u(Ae,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}):null,t?.src&&u("div",{className:"mb-3.5",children:u(Ae,{image:t})}),n?u(R,{headingType:"h4",className:je(i),title:n}):null,r?u("div",{className:Re(i),children:r}):null]}))),Le=g((({cell:e,rowHeader:t,isFillGradient:n=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(De(n,t))})}))),De=(e,t)=>({label:n,description:r},i)=>p("div",{className:"flex justify-between text-s py-3.5",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[n?u("div",{className:"text-right "+(e?"text-white":""),children:n}):null,r?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:r}):null]})]},String(i)),Oe=g((({header:e,columnData:t,visibleRowLength:n=0,isFillGradient:r,showRow:i,onToggleColumn:a})=>{const l=t?.slice(0,i?t.length:n),s=r?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-4 mb-3.5 ${r?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(Pe,{...e,isFillGradient:r}),l?.length?l.map((({rowHeader:e,cell:t},n)=>u(Le,{cell:t,rowHeader:e,isFillGradient:r},String(n)))):null,i&&e?.link?u(fe,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-4 py-[11px]",children:e.link.text}):null,Ve({onToggleColumn:a,isFillGradient:r,showRow:i})]})})),Ve=({onToggleColumn:e,isFillGradient:t,showRow:n})=>u("div",{className:"mt-5",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:n?"Скрыть":"Показать описание"})}),Be=g((e=>{const{className:t,title:n}=e;return p("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${t||""}`,children:[n?u(R,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:n}):null,u("div",{role:"table",children:u(Ee,{...e})})]})})),Ee=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:n,visibleRowLength:i,orientation:l,...s})=>{const[o,c]=r(new Array(e.length).fill(!i)),d=a((e=>{const t=(t,n)=>n===e?!t:t;c((e=>e.map(t)))}),[]),m=a((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:r},a)=>{return u(Oe,{visibleRowLength:i,showRow:o[a],header:r,columnData:(l=e,l?.map(((e,n)=>({cell:e,rowHeader:t?.[n]?.title})))),isFillGradient:0===a&&n,onToggleColumn:()=>d(a),...s},String(a));var l}));return"horizontal"===l?u(Q,{onVisibleIndicesChange:m,children:h}):h})),ze=new Map;function Fe(e,t,{fallback:n}={}){const a=l((()=>He(e)),[e]),[s,o]=r(),[c,d]=r(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};i((()=>{if(!a.every((e=>null===e)))try{const e=t(...a);"then"in e?(e=>{e.then((e=>ze.get(a)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...a]);const u=a[0],p=n&&"string"==typeof u&&n[u];return{data:!s&&p?p:s,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function He(e){return e?Array.isArray(e)?e:e instanceof Function?He(e()):[e]:[e]}async function Ge(e,t){const n=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await n.json()}function Je(e,t={}){const{data:n}=Fe(`/wcms-resources/${e}.json`,Ge,{fallback:t});return n||{}}function Ue(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Xe=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:r,s2Matches:i}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),r=new Array(e.length),i=new Array(t.length);let a=0;for(let l=0;l<e.length;l++){const s=Math.max(0,l-n),o=Math.min(l+n,t.length-1);for(let n=s;n<=o;n++)r[l]||i[n]||e[l]!==t[n]||(a++,r[l]=!0,i[n]=!0)}return{m:a,s1Matches:r,s2Matches:i}}(e,t);if(0===n)return 0;const a=function(e,t,{s1Matches:n,s2Matches:r}){let i=0;for(let a=0,l=0;a<e.length;a++){if(!n[a])continue;let s=l;for(;s<t.length;s++)if(r[s]){l=s+1;break}e[a]!==t[s]&&i++}return i}(e,t,{s1Matches:r,s2Matches:i}),l=(n/e.length+n/t.length+(n-a/2)/n)/3,s=l>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return l+s*(1-l)};const We=(e,t)=>(n,r)=>{for(const[i,a]of r)n.set(i,e(n.get(i)||t,a));return n},Ye=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Ke=e=>t=>e.map((([e,n])=>[Xe(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>Qe(t,e))).reduce(We(Math.max,0),new Map),qe=e=>t=>{return Ue(t,t.map((({title:e})=>e)).map((e=>t=>{const n=Ye(t||"");return n.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e.map((e=>X(n.map(Xe(e)))))):0})(e))).sort((r=([,e])=>e,n=(e,t)=>r(e)-r(t),(e,t)=>-n(e,t))).map((([e])=>e));var n,r},Qe=(e,t)=>new Map(e.map((e=>[e,t]))),Ze=(e=["/"])=>{const[t,n]=r(""),[s,o]=r(!1),c=a((()=>{o(!0)}),[]),d=l((()=>e.map((e=>s?e:null))),[s,...e]),{data:m}=Fe(d,et),[h,u]=r(null);return i((()=>{const e=setTimeout((()=>{m&&u(m.map((e=>t=>{const{corpus:n,dictionary:r}=t||{};if(!(e&&n?.length&&r&&Object.keys(r).length))return[];const i=Ye(e);if(!i.length)return[];const a=Object.entries(r),l=[...i.map(Ke(a)).reduce(We(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*i.length)).map((([e])=>n[e]));return qe(i)(l)})(t)))}),300);return()=>{clearTimeout(e)}}),[m,t]),[h,{value:t,onChange:n,onFocus:c}]},et=async(...e)=>(await Promise.allSettled(e.map((e=>async function(e,t){try{return e?await Ge(e,t):null}catch(e){console.error(e)}return null}(ne(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),tt=g((({className:e,onClick:t})=>u("button",{className:x("visible peer-placeholder-shown:invisible w-6 h-6 p-1 bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(Ae,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),nt=g((({className:e,head:t,children:n,onClose:r})=>{const l=a((e=>{e.preventDefault(),r&&r()}),[r]);return i((()=>{const e=({key:e})=>{"Escape"===e&&r&&r()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[r]),u("div",{className:x("fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar",e),role:"dialog",children:p("div",{className:"relative container pb-12 min-h-full",children:[p("div",{className:"sticky bg-white pt-6 top-0",children:[u(tt,{className:"absolute top-3 -right-6",onClick:l}),t]}),n]})})})),rt=g((({className:e,topItems:t})=>{const n=se(!0);return u("div",{className:x("flex items-start justify-between",e),children:t?.map(n).map(it)})})),it=(e,t)=>{const{text:n,items:r,href:i,target:a,onClick:l}=e;return p("div",{className:"flex flex-col gap-3.5 w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:i,target:a||"_self",onClick:l,children:n||`Раздел ${t}`}),r?.map(((e,t)=>u(at,{...e,basePath:i,index:t},String(t))))]},String(t))},at=g((({text:e,index:t,basePath:n,...r})=>{const i=!(!c.BASE_PATH||!n)&&!c.BASE_PATH.startsWith(n),a=se(i),{href:l,target:s,onClick:o}=a(r);return u("a",{className:x("text-l-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i?ne(n,l):l,target:s||"_self",onClick:o,children:e||`Раздел ${t}`})})),lt=g((({className:e,isMobile:t,value:n,autoFocus:r,onChange:i,onFocus:l})=>{const s=a((e=>{i&&i(e.target?.value||"")}),[i]);return p("div",{className:x("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-4 pointer-events-none",children:u(Ae,{image:{icon:"LoupeIcon"},width:"24",height:"24"})}),u("input",{className:x("h-12 pl-12 w-full text-l text-black outline-none box-border","border border-solid rounded-md border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",t?"":"h-full"),value:n,type:"text",name:"search-bar-input",placeholder:"Поиск по сайту",autoFocus:r,onChange:s,onFocus:l})]})})),st=g((({className:e,isMobile:t,topItems:n})=>{const s=n?.map((e=>e.href||"/")),[o,c]=Ze(s),{value:d,onChange:m,onFocus:h}=c,g=l((()=>ct(n)(o)),[n,o]);i((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(g)),[g]);const[b,{setTrue:x,setFalse:f}]=function(e=!1){const[t,n]=r(e),i=a((()=>n(!0)),[]),l=a((()=>n(!1)),[]),s=a((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:i,setFalse:l,toggle:s}]}(),v=a((e=>{m(e),ot(e)&&x()}),[m,ot]),N=a((()=>{h(),ot(d)&&x()}),[d,h]);return p("div",{className:e,children:[u(lt,{isMobile:t,value:d,onChange:v,onFocus:N}),t?u(tt,{className:"absolute top-2 right-3",onClick:e=>{e.preventDefault(),m("")}}):null,b?u(nt,{head:u(lt,{className:"my-5",isMobile:t,autoFocus:!0,...c}),onClose:f,children:u(rt,{topItems:g})}):null]})})),ot=e=>e&&e.length>=3,ct=e=>t=>e?.length&&t?.length?Ue(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:t})))}))):[];const dt=g((e=>u(st,{...e,isMobile:!0}))),mt=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),ht=g((({className:e="",documents:t,...n})=>u(M,{className:`mt-2.5 ${e}`,...n,children:u("ul",{className:"flex flex-col text-s text-secondary-text p-0",children:t?.length?ut(t):null})}))),ut=e=>e.map(((e,t)=>{const{text:n,...r}=e;return u("li",{className:"mb-4 list-none",children:u("a",{className:"hover:text-primary-main",role:"link",...r,children:n||null})},`list_item_${String(t)}`)})),pt={"bg-white":"color",transparent:"white"},gt={"bg-white":"text-primary-main",transparent:"text-white"},bt=(e,t,n)=>u(Ae,t?.src?{image:t,className:gt[e],width:n?.width,height:n?.height,pathPrefix:"/wcms-resources/",asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:pt[e]},className:gt[e],width:n?.width,height:n?.height,asSVG:!0}),xt={"bg-white":"text-primary-text",transparent:"text-white"},ft=(e,t,n)=>u("span",{className:`${xt[t]} ml-2.5 font-medium ${n||""}`,children:e||"Россельхозбанк"}),vt=g((({bgColor:e="bg-white",children:t,className:n="",href:r,logo:i,showTitle:a=!0,targetBlank:l})=>p("a",{className:`inline-flex items-center font-sans no-underline ${n}`,href:r||"https://rshb.ru/",target:l?"_blank":"_self","aria-label":i?.title||"Россельхозбанк",children:[bt(e,i?.image,{width:"34",height:"34"}),a?ft(t||i?.title,e,"text-s"):null]}))),Nt=g((({className:e="",title:t="Мобильное приложение",description:n,href:r="#"})=>u("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${e}`,children:r?p("div",{className:"flex",children:[u("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-12 h-12",children:u(vt,{className:"w-8",bgColor:"transparent",showTitle:!0})}),p("a",{href:r,target:"_blank",className:"flex flex-col justify-center pl-3",children:[u("div",{className:"text-s font-medium mb-[3px]",children:t}),u("div",{className:"text-s text-secondary-text",children:n})]})]}):null})));const yt=g((({className:e="",label:t,icon:n,dataTheme:r="",disabled:i=!1,onClick:a})=>p("button",{className:x("border border-transparent bg-primary-main font-sans text-white cursor-pointer","hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none","flex justify-center w-full px-0 py-5",i?"bg-main-divider text-main-disabled cursor-not-allowed hover:bg-main-divider active:bg-main-divider":"",e),onClick:a,disabled:i,"data-theme":r,children:[u("span",{className:"text-h4 pr-3",children:t}),n?u(Ae,{image:{icon:n,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20",asSVG:!0}):null]}))),wt=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:i,renderFoldButton:l})=>{const[s,o]=r(n),c=a((()=>{o((e=>!e))}),[]),d=i({isUnfolded:s,onToggle:c}),m=l?l({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),kt=g((({className:e="",isUnfolded:t,children:n})=>{const r=s(null);return i((()=>{r.current&&(r.current.style.maxHeight=t?`${r.current.scrollHeight}px`:"")}),[t,n?.length]),u("div",{ref:r,className:`transition-max-h duration-300 overflow-hidden ${r.current||!t?"max-h-0":""} ${e}`,children:n})})),Tt=g((({children:e,...t})=>u("span",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),Ct=g((({className:e="",label:t="Развернуть",isExpanded:n,isFoldButtonOnTop:r=!0,version:i="primary",...a})=>{const{bordered:l}=function(e,t){const{content:n}=function(e){return e?.parent||{}}(e);return n||t}(a.options,{});return u(M,{className:x("border-b border-solid border-main-divider w-full",l?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0",e),tag:"div",version:"transparent",...a,children:u(wt,{isFoldButtonOnTop:r,unfoldedByDefault:n,renderFoldableSection:({isUnfolded:e})=>u(kt,{className:"flex flex-wrap group-last:last:pb-0 gap-5 [&>*]:p-0",isUnfolded:e,children:k(a)}),renderFoldButton:({isUnfolded:e,onToggle:n})=>St({version:i,label:t,isUnfolded:e,onToggle:n})})})}));Ct.childrenTypes={exclude:["RollupItem","Accordion","OtherProducts"]};const St=({version:e,label:t,isUnfolded:n,onToggle:r,className:i="",primaryIcon:a})=>{const l=t||(n?"Скрыть":"Развернуть");return"primary"===e?_t({label:l,icon:n?"MinusIcon":"PlusIcon",onToggle:r,className:i,primaryIcon:a}):u(yt,{label:l,icon:n?"ArrowUpIcon":"ArrowDownIcon",onClick:r})},_t=({label:e,icon:t,primaryIcon:n,onToggle:r})=>p("button",{className:"border-none bg-transparent flex justify-between text-left w-full text-primary-text group cursor-pointer py-3.5 px-0",onClick:r,children:[p("div",{className:"flex group-hover:text-primary-main",children:[n?u(Ae,{image:{...mt({...n})},className:"mr-3 flex-shrink-0",width:"24",height:"24",asSVG:!0}):null,u(Tt,{size:"text-m-title-xs",font:"font-medium",children:e})]}),u(Ae,{className:"flex-shrink-0",image:{...mt({icon:t})},width:"24",height:"24",asSVG:!0})]}),It=g((({className:e="",items:t,hasButton:n})=>p("div",{className:e,children:[t?.length?t.map($t):null,n?u(fe,{version:"primary",className:"mb-6 w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),$t=(e,t)=>{const{type:n,text:r,description:i}=e;return p("div",{className:"mb-4",children:[u("div",{children:Mt(n,r)}),u("div",{className:"mt-1 text-s-light text-secondary-text",children:i})]},String(t))},Mt=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${At(t)}`,children:t});case"email":return u("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},At=e=>e.replaceAll(/\D/g,""),jt=g((({className:e="",index:t,text:n,...r})=>{const i=se(),{href:a,target:l,onClick:s}=i(r);return u("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:a,target:l,onClick:s,children:n||`Документ ${t}`})})),Rt=g((({title:e,links:t,className:n=""})=>p("div",{className:n,children:[u("span",{className:"text-primary-text text-s font-medium",children:e}),t?.length?u("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>u(jt,{index:t,className:"text-s",...e},String(t))))}):null]}))),Pt=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],Lt={default:"w-14 h-14",small:"w-12 h-12"},Dt=(e,t)=>e?"":`group/media flex items-center justify-center box-border ${Lt[t]}`,Ot=g((({iconVersion:e="color",buttonSize:t="default",rounded:n=!1,icon:r,...i})=>{const{href:a,version:l,text:s,appendLeft:o,appendRight:c,aboveText:d}=i,{iconMapped:m,label:h}=Pt.find((({origins:e})=>e.some((e=>a?.includes(e)))))||{},p=r??m,g=p?{...mt(p),iconVersion:e}:void 0;return u(fe,{className:x(n?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",Dt(s,t)),aboveText:d,appendLeft:o,appendRight:c,"aria-label":h,rel:"noopener noreferrer",target:"_blank",text:s,version:l,...i,children:g&&!s?u(Ae,{image:g,imageClassName:"group-hover/media:text-white",width:"24",height:"24",asSVG:!0}):null})})),Vt=g((({className:e="",media:t})=>u("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e}`,children:t?.map(((e,t)=>u(Ot,{...e},String(t))))}))),Bt=g((({className:e="",index:t,...n})=>{const r=se(),{href:i,target:a,text:l,onClick:s}=r(n);return u("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:i,target:a,onClick:s,children:l||`Документ ${t}`})})),Et=g((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"py-6",children:u("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col justify-start items-start gap-2",children:t.map(((e,t)=>u(Bt,{index:t,...e},String(t))))}):null]}))),zt=g((({className:e="",...t})=>{const n=t.options?.page?.fallback,r=Je(c.SITEMAP||"sitemap",n),{documents:i,relatedEnterprises:a,contacts:l,socialMedia:s,horizontalNavigationTitle:o}=Je(c.FOOTER||"footer",n);return p(M,{tag:"footer",className:`px-4 py-[26px] ${e}`,...t,children:[u(It,{className:"overflow-hidden",items:l,hasButton:!0}),u("div",{className:"m-0 p-0",children:r.topItems?.map(((e,t)=>u(Ct,{label:e?.text,children:u(ht,{documents:e.items})},String(t))))}),u("div",{children:r?.dispositions?.map(Ft)}),u(Nt,{title:"Мобильное приложение",description:"Загрузить для IOS и Android",...t}),u(dt,{className:"grow"}),u(Vt,{className:"pb-4",media:s}),u(Rt,{title:o,links:a}),u(Et,{links:i})]})})),Ft=(e,t)=>{const{icon:n,href:r,text:i}=e;return p(fe,{version:"link",href:r,className:"flex text-s mb-4 w-6",children:[n?u(Ae,{className:"pr-1",image:mt(n),width:"24",height:"24",asSVG:!0}):null,u("span",{className:"pl-2.5 font-medium text-primary-text",children:i})]},`footer-${t}`)},Ht=e=>({href:t})=>te(Z(t)?e.href:e.pathname).startsWith(te(t)),Gt=g((({className:e="",active:t,dataItemName:n,children:r,...i})=>{const a=se(),{href:l,target:s,text:o,onClick:c}=a(i);return p("a",{className:x("relative inline-block bg-transparent text-center no-underline",e),href:l,target:s,"data-item-name":n,onClick:c,children:[u("span",{className:Jt(t),children:o||r}),t?u("div",{className:"absolute left-0 -bottom-3 w-full h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),Jt=(e=!1)=>x("font-sans text-s",e?"text-primary-main":"text-secondary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Ut=864e5;function Xt(e,t,n=globalThis?.localStorage){const r=a((async(...r)=>{const i=`async:${e}`,a=function(e){const{data:t=null,timestamp:n=null}=e?JSON.parse(e):{};return t&&Date.now()-n<Ut?t:void 0}(n.getItem(i));if(a)return a;const l=await t(...r);return n.setItem(i,JSON.stringify({data:l,timestamp:Date.now()})),l}),[e,t]);return Fe(e,r)}const Wt=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}},Yt=g((({burgerSubMenu:e,onClick:t,defaultLocation:n="",children:l})=>{const[s]=function(e){const t=Wt(),[n,l]=r(t?.region??{name:e}),{data:s}=Xt("/api/v1/region",Ge);return i((()=>{l(t?.region&&t?.manual?t.region:s||{name:e})}),[s]),[n,a((e=>{globalThis.localStorage?.setItem("location",JSON.stringify({manual:!0,region:e})),l(e)}),[l])]}(n);return p("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[u("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:t,children:u(Ae,{image:{icon:"CloseIcon"},width:"24",height:"24",asSVG:!0})}),p("button",{className:"flex items-center text-s p-0 mb-4 bg-transparent cursor-pointer",children:[u(Ae,{image:{icon:"GeolocationIcon"},width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),u(Tt,{color:"text-secondary-text",children:s.name})]}),l,u("div",{className:"mb-7",children:e?.map(Kt)}),u(dt,{className:"grow"})]})})),Kt=(e,t)=>{const{icon:n,href:r,text:i}=e;return p("a",{href:r,className:"flex text-s mb-4 hover:text-primary-main",children:[n?u(Ae,{className:"text-primary-main pr-1",image:n,width:"24",height:"24",asSVG:!0}):null,u("span",{className:"font-medium pl-0.5",children:i})]},`headerSubMenu-${t}`)},qt=g((({onClick:e,bgColor:t,logo:n})=>p("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-12",children:[p("div",{className:"flex items-center",children:[u("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:u(Ae,{image:{icon:"BurgerIcon",iconVersion:"bg-white"===t?"black":"white"},className:"text-primary-text w-6 h-6",width:"24",height:"24",asSVG:!0})}),u(vt,{className:"mr-8",bgColor:t,logo:n})]}),u("button",{className:"text-primary-main group-data-transparent:text-white group-data-transparent:hover:text-primary-hover text-s border-0 bg-transparent",children:"Войти"})]}))),Qt={"bg-white":"primary",transparent:"transparent"},Zt=g((({bgColor:e="bg-white",version:t=Qt[e],...n})=>{const i=le(),l=n.options?.page?.fallback,{topItems:s,dispositions:o,defaultLocation:d,logo:m}=Je(c.SITEMAP||"sitemap",l),h=s?.find((e=>Ht(c.BASE_PATH?{pathname:c.BASE_PATH}:e))(i)),g=h?.items,b=(e=>(t=[])=>{const n=t?.filter(Ht(e));return n?.length?U((e=>e.href?.length||0))(n):void 0})(i)(g),[x,f]=r(!1),v=a((()=>f((e=>!e))),[]);return p(M,{tag:"header",version:t,...n,children:[p("div",{className:"container px-4 py-0 box-border",children:[u(qt,{onClick:v,bgColor:e,logo:m}),u("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-12",children:u("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:g?.map(((e,t)=>u(Gt,{className:"mr-8 whitespace-nowrap text-s",active:e===b,...e},String(t))))})})]}),x?u(Yt,{onClick:v,burgerSubMenu:o,defaultLocation:d,children:u("div",{className:"list-none m-0 p-0",children:s?.map(((e,t)=>u(Ct,{label:e.text,children:u(ht,{documents:e.items})},String(t))))})}):null]})})),en={XXL:{wrapper:"gap-[18px]",title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5"},XL:{wrapper:"gap-4",title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl-light"},L:{wrapper:"gap-4",title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl-light"},M:{wrapper:"gap-3",title:{headingType:"h3",as:"h3"},descriptionSize:"text-xl-light"},S:{wrapper:"gap-2",title:{headingType:"h4",as:"h4"},descriptionSize:"text-xl-light"},XS:{wrapper:"gap-2",title:{headingType:"h5",as:"h5"},descriptionSize:"text-l-light"}},tn=g((({className:e,title:t,description:n,headlineVersion:r="XL",align:i="text-center",as:a,isPadding:l=!0,isTheme:s=!1,version:o="",...c})=>{const d=en[r];return p(M,{className:x("flex flex-col",l?"p-12":"",d.wrapper,e),version:o,isTheme:s,...c,children:[t?u(R,{className:x("whitespace-pre-wrap",i),...d?.title,as:a||d?.title.as,title:t}):null,n?u(P,{color:"group-data-secondary:text-white/80",size:d.descriptionSize,align:i,children:n}):null]})})),nn=g((({className:e,iconClassName:t,textClassName:n,suffixClassName:r,doc:i,icon:a})=>{const{text:l,fileSize:s,...o}=i;return p("a",{className:e,role:"link",...o,children:[a?u(Ae,{className:t,image:mt(a),width:"24px",height:"24px",asSVG:!0}):null,l?p("span",{className:n,children:[l,u("span",{className:r,children:o?.href&&rn(an(o.href),s)})]}):null]})})),rn=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),an=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},ln=g((({className:e="",doc:t,icon:n})=>u(nn,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:n}))),sn=g((({hasBorder:e=!0,documents:t,icon:n})=>u(Q,{className:"text-s text-primary-main mt-5",children:t?.length?t.map(((t,r)=>u(ln,{className:e?"rounded-md border-gray border border-solid p-4":"",doc:t,icon:n},String(r)))):null}))),on=g((({hasBorder:e=!0,documents:t,icon:n})=>u("div",{className:"text-s text-primary-main flex flex-col mt-5 "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,r)=>u("div",{role:"listitem",children:u(ln,{className:e?"rounded-md border-gray border border-solid p-4":"",doc:t,icon:n})},String(r)))):null}))),cn=g((({className:e="",title:t,description:n,icon:r={icon:"DocIconMonoColor"},documents:i,orientation:a="vertical",hasBorder:l=!0,align:s,...o})=>p(M,{className:x("py-6 px-4 overflow-x-hidden",e),...o,children:[u(tn,{className:"!p-0 "+(n?"gap-2":"gap-5"),title:t,description:n,align:s,headlineVersion:"M",as:"h2"}),u("vertical"===a?on:sn,{hasBorder:l,documents:i,icon:r})]}))),dn=e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function mn(e=""){const t=dn(e);return t<=4?"S":t<=8?"M":"L"}function hn(e=""){const t=dn(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function un(e=""){const t=dn(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const pn=g((({className:e,title:t,description:n="Блок в разработке...",...r})=>p(M,{className:x("p-9 box-border",e,un(e),hn(e)),...r,children:[u(tn,{className:"!p-0 max-w-[600px]",title:t,description:n,headlineVersion:mn(e)}),u("figure",{className:"m-0 min-w-[80%]",children:gn()})]}))),gn=(e=3)=>xn(100,e).map((e=>Math.floor(e))).map(bn),bn=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),xn=(e,t)=>[e].concat(t>0?xn(e/1.618,t-1):[]),fn=(e,{className:t="",buttonClassName:n,isVertical:r}={})=>e?.length&&e.some((e=>e?.text))?u("div",{className:x("flex",r?"flex-col gap-2":"gap-4",t),children:e.map(vn(n))}):null,vn=(e="")=>(t,n)=>{const{text:r,icon:i,iconRight:a,version:l,...s}=t||{},o="secondary"===l?"color":"white";return r?u(fe,{className:e,appendLeft:Nn({...i,iconVersion:o}),appendRight:Nn({...a,iconVersion:o}),version:l,text:r,...s},n?String(n):""):null},Nn=e=>e?.icon||e?.src?u(Ae,{image:e,width:String(e?.size?.width||24),height:String(24),asSVG:!0}):null,yn={L:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4",M:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3",S:"w-1 h-1 min-w-1 min-h-1 mr-2"},wn=g((({className:e="",isDotted:t=!0,children:n,size:r="M"})=>p("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?u("div",{children:u("div",{className:`rounded-full align-middle inline-block bg-primary-text group-data-secondary:bg-white ${yn[r]}`})}):null,u("span",{children:n})]}))),kn={S:"text-l-light",M:"text-h6",L:"text-h5"},Tn={S:"ml-2",M:"ml-3",L:"ml-4"},Cn=g((({className:e="",hasIndent:t,isDotted:n,itemClassName:r="",items:i,listItemSize:a="M"})=>i?.length?u("section",{className:`text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${kn[a]} ${t?Tn[a]:""} ${e}`,role:"list",children:i.map(((e,t)=>u(wn,{className:r,isDotted:n,size:a,children:e},String(t))))}):null)),Sn=g((({className:e="",title:t="",buttons:n,image:r,children:i})=>p("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,p("div",{className:"flex grow w-full justify-between",children:[p("div",{className:"flex flex-col justify-between w-full",children:[u("div",{className:"h-full",children:i}),n?u("div",{className:"mt-auto pt-8",children:n}):null]}),r]})]}))),_n=g((e=>{const{className:t="",icon:n,label:r,description:i,version:a="primary",benefitsVersion:l="normal"}=e,s="white"===l?"secondary":"primary";return p("div",{className:`flex gap-5 ${i?"items-start":"items-center"} ${t}`,children:[n?u("div",{className:In(a,l),children:u(Ae,{className:"w-6 h-6",image:mt(n,s),asSVG:!0})}):null,p("div",{className:"gap-0.5",children:[r?u("div",{className:"text-h6 text-primary-text group-data-secondary:text-white",children:r}):null,i?u("div",{className:"text-m-light text-secondary-text group-data-secondary:text-white",children:i}):null]})]})}));function In(e,t){let n="bg-primary-main text-black";return"secondary"===e?n="bg-white/30 text-black":"normal"===t&&(n="bg-secondary-light text-primary-main"),`w-12 h-12 min-w-12 rounded-full p-2.5 box-border flex items-center justify-center ${n}`}const $n=(e="primary",t="normal")=>({icon:n,label:r,description:i},a)=>u(_n,{icon:n,label:r,description:i,version:e,benefitsVersion:t},String(a)),Mn=g((({className:e="",headlineVersion:t="L",benefits:n,benefitsVersion:r="normal",buttons:i,image:a,items:l,isDotted:s=!0,label:o,title:c,description:d,...m})=>p(M,{className:`w-full ${e}`,...m,children:[p("div",{children:[o?jn(o):null,u(tn,{className:"!p-0 max-w-[600px]",title:c,description:d,headlineVersion:t,align:"text-left"}),p(Sn,{buttons:fn(i,{className:"mt-5",isVertical:!0}),children:[n?.filter((e=>e.label))?.length?u("div",{className:"mt-3",children:n.map($n("primary",r))}):null,l?.length?u(Cn,{className:"mt-3 text-m",items:l,isDotted:s}):null]})]}),An(a)]})));function An(e){return e?.src?u(Ae,{imageClassName:"mt-5 mx-auto block",image:{className:"block",...e}}):null}const jn=e=>u("div",{className:"w-fit px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid border-secondary-hover",children:u(Tt,{color:"text-primary-main group-data-secondary:text-white/80",children:e})}),Rn=g((e=>{const{className:t="",...n}=e;return u(M,{className:`px-4 py-6 ${t}`,...n,children:u(Mn,{...e})})})),Pn=g((e=>{const{__html:t=""}=e;return u("div",{className:"md-container",dangerouslySetInnerHTML:{__html:t}})}));const Ln={normal:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",small:"h-12 w-12 min-w-12 min-h-12"},Dn={normal:"min-h-[70px]",small:"min-h-12"},On={description:"text-white/80 text-l-light group-data-primary:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},Vn=g((({className:e="",title:t,description:n,showLines:r=!0,steps:i,size:a="normal",version:l="primary",...s})=>p(M,{className:`box-border px-4 py-6 flex flex-col ${e}`,version:l,...s,children:[t?u(R,{headingType:"h3",className:"text-center",title:t}):null,n?u("p",{className:`text-m-light text-center ${On.description} ${t?"mt-2":""}`,children:n}):null,i?.length?u("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:u("div",{className:"flex flex-col justify-between gap-x-[101px]",children:i.map(Bn(a,l,r))})}):null]}))),Bn=(e,t,n)=>(r,i,a)=>{const{type:l}=r;if("default"!==l&&"rte"!==l)return null;switch(l){case"default":return En(e,t,n)(r,i,a);case"rte":return u(Pn,{__html:r.__html});default:!function(e){throw new Error(e)}(r)}},En=(e,t,n)=>(r,i,a)=>{const l=a.length-1===i,s="normal"===e?"ml-[34px]":"ml-6";return u("div",{children:p("div",{className:"flex flex-row text-center relative",children:[p("div",{className:"overflow-hidden flex-shrink-0",children:[zn(e,t)(r,i),l?null:u("div",{className:`min-h-8 h-full w-0.5 ${n?On.iconConnector:""} ${s}`})]}),p("div",{className:`flex flex-col justify-center h-fit ${Dn[e]}`,children:[r.label?u("div",{className:"text-m-title-xs font-medium m-0 text-left mb-1",children:r.label}):null,r.description?u("div",{className:`text-s ${On.description} text-left`,children:r.description}):null]})]})},String(i))},zn=(e,t)=>(n,r)=>{const i="normal"===e?"38":"27";return u("div",{className:`${Ln[e]} ${On.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:u("span",{className:`font-medium flex self-center ${"normal"===e?"text-m-title":"text-m-title-xs"}`,children:(a=n?.icon,Boolean(a?.icon||a?.src)?u(Ae,{image:mt({...n.icon},t),width:i,height:i,asSVG:!0}):u("span",{children:r+1}))})});var a},Fn={Buttons:({buttons:e})=>fn(e,{className:"mt-3",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(Ae,{image:{...e,className:"m-0"}}):null,List:({isDotted:e,...t})=>u(Cn,{className:"flex flex-col justify-between items-start text-m",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"text-xl font-medium m-0 "+(t?"mb-1":""),children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},Hn=g((({title:e,icon:t})=>p("div",{className:"flex gap-2.5 mb-2",children:[e?u(R,{headingType:"h3",className:"font-medium",title:e}):null,t?u(Ae,{className:"ml-auto max-w-6 max-h-6",image:t,width:"24px",height:"24px"}):null]}))),Gn=g((({tile:e,...t})=>p("div",{className:"rounded-md border-gray h-full box-border border p-4",children:[u(Hn,{...e?.header}),e?.data?.length?e.data.map(((e,n)=>p("div",{children:[n>0?u("div",{className:"h-5"}):null,Jn(e,t)]},String(n)))):null]})));function Jn(e,t){if(!e||!e.tableCellType||!(e.tableCellType in Fn))return null;const n=Fn[e.tableCellType];return u(n,{displayTable:()=>null,isVisible:!0,...e,...t})}const Un=g((({tiles:e,...t})=>e?.length?u(Q,{...t,children:e.map(((e,n)=>u(Gn,{tile:e,...t},String(n))))}):null)),Xn=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-3.5",children:e.map(((e,n)=>u(Gn,{tile:e,...t},String(n))))}):null)),Wn=g((({className:e,title:t,description:n,tariffsColumns:r,rowHeaders:i,orientation:a="vertical",...l})=>{const s=Yn(r),o=Kn(i,s);return p("section",{className:`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[t?u(R,{headingType:"h2",className:`text-center ${n?"mb-2":"mb-5"}`,title:t}):null,n?u("div",{className:"mb-5 text-center text-m",children:n}):null,u("vertical"===a?Xn:Un,{tiles:o,...l})]})})),Yn=e=>e?.[0]?.data?e[0].data:[],Kn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),qn=g((({title:e,description:t,iconVersion:n,image:r,className:i="",items:a,isDotted:l=!0})=>p("section",{className:`font-sans px-4 py-[18px] flex flex-col bg-white group-data-secondary:bg-primary-main ${i}`,children:["small"===n?u("div",{className:"mb-3",children:u("div",{className:"rounded-full h-4 w-4 text-center text-xs-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"})}):null,"big"===n?Qn(r):null,p("div",{className:"py-0.5 text-secondary-text group-data-secondary:text-white",children:[e?u("div",{className:"text-l font-medium mb-1",children:e}):null,t?u("div",{className:"text-s ",children:t}):null,a?.length?u(Cn,{className:"mt-1 text-m",items:a,isDotted:l}):null]})]})));function Qn(e){return e?.src?u(Ae,{className:"pb-3 mr-auto",image:e}):null}const Zn={XXL:"gap-12",XL:"gap-10",L:"gap-8",M:"gap-4",S:"gap-2",XS:"gap-1","":""},er={stretch:"items-stretch",left:"items-start",center:"items-center",right:"items-end"},tr=g((({className:e="",gap:t="",align:n="stretch",isPadding:r=!1,isInnerPadding:i=!0,version:a="transparent",isTheme:l=!1,options:s,...o})=>{const c=i?"":"!p-0";return u(M,{className:x("flex flex-col [&>*]:max-w-full",r?"p-12":"",Zn[t],n&&er[n],e),version:a,isTheme:l,...o,children:k({...o,options:{...s,className:c}})})}));tr.childrenTypes={exclude:["Accordion","OtherProducts"]};const nr={Accordion:L,ComparisonTable:Be,Footer:zt,Header:Zt,Headline:tn,LinkDocs:cn,LinkList:ht,MobileAppTile:Nt,ProductBlock:Rn,RollupItem:Ct,StepsBlock:Vn,TariffsTable:Wn,TextBlock:qn,Placeholder:pn,VerticalLayout:tr};const rr=["Header","Footer"],ir=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function ar(e=globalThis){const t=s(new Map);i((()=>I.subscribe("intersection",(({block:e,intersection:n})=>{t.current&&t.current.set(e,n)}))),[]),i((()=>{const n=((e,t=600)=>{let n;const r=(...i)=>{r.dispose(),n=setTimeout((()=>{e(...i)}),t)};return r.dispose=()=>{n&&clearTimeout(n)},r})((()=>{!function(e){const t=`#${n=e?.anchor,n?.replace("#","")||""}`;var n;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!rr.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[n]=t.length>0?W(ir)(t):[];return n}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",n),()=>{n.dispose(),e.removeEventListener("scroll",n)}}),[e])}const lr=h();const sr=g((({className:e,onClick:t,ariaLabel:n})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:or()}))),or=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},cr=g((({className:e=""})=>{const t=function(e){const[t,n]=r(0);return i((()=>{(async()=>{const[t]=await lr.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:a((async()=>{n(await lr.like(e))}),[e]),dislike:a((async()=>{n(await lr.dislike(e))}),[e])}}(le().pathname);return p("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:[u(sr,{onClick:ae(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(sr,{onClick:ae(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),dr=g((e=>{const{className:t="",blocksRegistry:n,blockDecorator:a,data:l={}}=e,{style:s,blocks:o,slots:c,likeControl:d,colorPalette:m="pc"}=l,[h,g]=r(""),b={key:"",page:l,blocksRegistry:n,blockDecorator:a,parent:l};return ar(),i((()=>C.subscribe("setPageOverflowHidden",(e=>{g(e?"overflow-hidden h-screen":"")}))),[]),p("section",{className:x("relative",s,t,h),"data-theme":m,children:[c?.header?u("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:w(c?.header,{...b,slotName:"header"})}):null,p("div",{className:"container grid grid-cols-12 gap-1",children:[w(o,b),c?.footer?w(c?.footer,{...b,slotName:"footer"}):null]}),d?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(cr,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));dr.childrenTypes=[],dr.slots=()=>["header","footer"];e.Blocks=nr,e.ContentPage=dr,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.LikeAPI=h,e.handlerDecorator=ae,e.joinList=function(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])},e.packageVersion="0.9.0",e.projectSettings=c,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=re,e.useRouter=le,Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -0,0 +1,6 @@
1
+ import type { JSXBlock, UniBlockProps } from '../../model/JSXBlock';
2
+ import type { FiltrationContent } from './FiltrationContent';
3
+ interface FiltrationProps extends FiltrationContent, UniBlockProps {
4
+ }
5
+ export declare const Filtration: JSXBlock<FiltrationProps>;
6
+ export {};
@@ -0,0 +1,78 @@
1
+ import type { ButtonVersion } from '../../model/ButtonVersion';
2
+ /**
3
+ * @title Заголовок
4
+ */
5
+ declare type Title = string;
6
+ /**
7
+ * @title Ключи
8
+ */
9
+ declare type Enum = string[];
10
+ /**
11
+ * @title Имена
12
+ */
13
+ declare type EnumNames = string[];
14
+ export declare type StringEnum = {
15
+ title?: Title;
16
+ /**
17
+ * @default string
18
+ * @hidden
19
+ */
20
+ type?: 'string';
21
+ enum?: Enum;
22
+ enumNames?: EnumNames;
23
+ };
24
+ export declare type StringArray = {
25
+ title?: Title;
26
+ /**
27
+ * @default array
28
+ * @hidden
29
+ */
30
+ type?: 'array';
31
+ items?: {
32
+ /**
33
+ * @default string
34
+ * @hidden
35
+ */
36
+ type?: 'string';
37
+ enum?: Enum;
38
+ enumNames?: EnumNames;
39
+ };
40
+ };
41
+ export declare type FiltrationSchema = {
42
+ /** @title Тип недвижимости */
43
+ propertyType?: StringEnum;
44
+ /** @title Этап строительства */
45
+ stage?: StringEnum;
46
+ /** @title Категории */
47
+ categories?: StringEnum;
48
+ /** @title Дополнительно */
49
+ extraOptions?: StringEnum;
50
+ };
51
+ /**
52
+ * @title Кнопка сброса
53
+ */
54
+ export declare type ResetButton = {
55
+ /**
56
+ * @title Текст кнопки
57
+ */
58
+ text: string;
59
+ /**
60
+ * @title Цвет кнопки
61
+ */
62
+ buttonVersion: ButtonVersion;
63
+ };
64
+ export interface FiltrationInnerContent {
65
+ /** @title Название кнопки */
66
+ label?: string;
67
+ /** @title Количество отображаемых предметов */
68
+ topItemsCount?: number;
69
+ }
70
+ /**
71
+ * @title Фильтрация
72
+ */
73
+ export interface FiltrationContent extends FiltrationInnerContent {
74
+ /** @title Параметры фильтрации */
75
+ filtrationSchema?: FiltrationSchema;
76
+ resetButton?: ResetButton;
77
+ }
78
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { UniBlockProps } from '../../model/JSXBlock';
2
+ import type { FiltrationInnerContent } from './FiltrationContent';
3
+ interface FiltrationInnerProps extends FiltrationInnerContent, UniBlockProps {
4
+ filtrationState?: Record<string, any>;
5
+ }
6
+ export declare const FiltrationInner: import("@redneckz/uni-jsx").UNIComponent<FiltrationInnerProps, any, any>;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare const checkShouldRenderBlock: (pattern: Record<string, any>, target: Record<string, any>) => boolean;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { FormElementRegisterer } from '../../hooks/useForm';
3
+ import type { FiltrationSchema } from './FiltrationContent';
4
+ export declare const renderFormItem: (filtrationSchema: FiltrationSchema, register: FormElementRegisterer) => (key: string) => JSX.Element | null;
@@ -0,0 +1,12 @@
1
+ export declare type FormElementRegisterer = ReturnType<typeof useForm>['register'];
2
+ export declare const useForm: <FormState extends Record<string, any>>(initialState?: Partial<FormState>) => {
3
+ formState: Partial<FormState>;
4
+ register: <FieldName extends keyof FormState>(fieldName: FieldName) => {
5
+ value?: undefined;
6
+ onChange?: undefined;
7
+ } | {
8
+ value: Partial<FormState>[FieldName];
9
+ onChange: Partial<Record<keyof FormState, () => void>>[FieldName];
10
+ };
11
+ resetForm: () => void;
12
+ };
@@ -1,4 +1,5 @@
1
1
  import type { UNIComponent } from '@redneckz/uni-jsx';
2
+ import type { JSONSchema7Definition } from 'json-schema';
2
3
  import type { BlockRendererOptions } from '../BlockRenderer/BlockRendererOptions';
3
4
  import type { SlotName } from './BlockDecorator';
4
5
  import type { BlockVersion } from './BlockVersion';
@@ -22,5 +23,6 @@ export declare type JSXBlock<BlockProps extends UniBlockProps = UniBlockProps> =
22
23
  include?: string[];
23
24
  exclude?: string[];
24
25
  };
26
+ childSchema?: (content: BlockDef['content']) => Record<string, JSONSchema7Definition>;
25
27
  slots?: (props: BlockProps) => SlotName[];
26
28
  };
@@ -0,0 +1,4 @@
1
+ export interface ControlProps<T> {
2
+ value?: T;
3
+ onChange?: (value: T | undefined) => void;
4
+ }
@@ -7,6 +7,7 @@ interface DefaultFoldButtonProps {
7
7
  label: string;
8
8
  icon: IconName;
9
9
  dataTheme?: ColorPalette;
10
+ disabled?: boolean;
10
11
  onClick?: () => void;
11
12
  }
12
13
  export declare const DefaultFoldButton: import("@redneckz/uni-jsx").UNIComponent<DefaultFoldButtonProps, any, any>;
@@ -1,7 +1,8 @@
1
1
  interface SlideCheckboxProps {
2
- checked?: boolean;
2
+ value?: boolean;
3
3
  text?: string;
4
- onClick?: () => void;
4
+ type?: 'checkbox' | 'radio';
5
+ onChange?: (value: boolean) => void;
5
6
  }
6
7
  export declare const SlideCheckbox: import("@redneckz/uni-jsx").UNIComponent<SlideCheckboxProps, any, any>;
7
8
  export {};
@@ -0,0 +1,15 @@
1
+ import type { ControlProps } from '../ControlProps';
2
+ declare type SlideCheckboxGroupItem = {
3
+ value: string;
4
+ title: string;
5
+ };
6
+ interface SlideCheckboxGroupProps extends ControlProps<string> {
7
+ multiple: false;
8
+ items: SlideCheckboxGroupItem[];
9
+ }
10
+ interface MultipleSlideCheckboxGroupProps extends ControlProps<string[]> {
11
+ multiple: true;
12
+ items: SlideCheckboxGroupItem[];
13
+ }
14
+ export declare const SlideCheckboxGroup: import("@redneckz/uni-jsx").UNIComponent<SlideCheckboxGroupProps | MultipleSlideCheckboxGroupProps, any, any>;
15
+ export {};
@@ -2,6 +2,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.renderSlideCheckboxes = void 0;
3
3
  const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const SlideCheckbox_1 = require("../../ui-kit/SlideCheckbox/SlideCheckbox");
5
- const renderSlideCheckboxes = ({ onlineСheckout, posTerminal, handleChange, }) => ((0, jsx_runtime_1.jsxs)("div", { className: "mb-5", children: [(0, jsx_runtime_1.jsx)(SlideCheckbox_1.SlideCheckbox, { checked: onlineСheckout, text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", onClick: () => handleChange({ onlineСheckout: !onlineСheckout }) }), (0, jsx_runtime_1.jsx)(SlideCheckbox_1.SlideCheckbox, { checked: posTerminal, text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", onClick: () => handleChange({ posTerminal: !posTerminal }) })] }));
5
+ const renderSlideCheckboxes = ({ onlineСheckout, posTerminal, handleChange, }) => ((0, jsx_runtime_1.jsxs)("div", { className: "mb-5", children: [(0, jsx_runtime_1.jsx)(SlideCheckbox_1.SlideCheckbox, { value: onlineСheckout, text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", onChange: () => handleChange({ onlineСheckout: !onlineСheckout }) }), (0, jsx_runtime_1.jsx)(SlideCheckbox_1.SlideCheckbox, { value: posTerminal, text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", onChange: () => handleChange({ posTerminal: !posTerminal }) })] }));
6
6
  exports.renderSlideCheckboxes = renderSlideCheckboxes;
7
7
  //# sourceMappingURL=renderSlideCheckboxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderSlideCheckboxes.js","sourceRoot":"","sources":["../../../src/components/ApplicationForm/renderSlideCheckboxes.tsx"],"names":[],"mappings":";;;AAAA,4EAAyE;AAUlE,MAAM,qBAAqB,GAAG,CAAC,EACpC,cAAc,EACd,WAAW,EACX,YAAY,GACS,EAAE,EAAE,CAAC,CAC1B,iCAAK,SAAS,EAAC,MAAM,aACnB,uBAAC,6BAAa,IACZ,OAAO,EAAE,cAAc,EACvB,IAAI,EAAC,mIAA0B,EAC/B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC,cAAc,EAAE,CAAC,GAChE,EACF,uBAAC,6BAAa,IACZ,OAAO,EAAE,WAAW,EACpB,IAAI,EAAC,oHAA0B,EAC/B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC,GAC1D,IACE,CACP,CAAC;AAjBW,QAAA,qBAAqB,yBAiBhC"}
1
+ {"version":3,"file":"renderSlideCheckboxes.js","sourceRoot":"","sources":["../../../src/components/ApplicationForm/renderSlideCheckboxes.tsx"],"names":[],"mappings":";;;AAAA,4EAAyE;AAUlE,MAAM,qBAAqB,GAAG,CAAC,EACpC,cAAc,EACd,WAAW,EACX,YAAY,GACS,EAAE,EAAE,CAAC,CAC1B,iCAAK,SAAS,EAAC,MAAM,aACnB,uBAAC,6BAAa,IACZ,KAAK,EAAE,cAAc,EACrB,IAAI,EAAC,mIAA0B,EAC/B,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC,cAAc,EAAE,CAAC,GACjE,EACF,uBAAC,6BAAa,IACZ,KAAK,EAAE,WAAW,EAClB,IAAI,EAAC,oHAA0B,EAC/B,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC,GAC3D,IACE,CACP,CAAC;AAjBW,QAAA,qBAAqB,yBAiBhC"}