@topvisor/ui 1.5.9-pnpm.4 → 1.5.9-pnpm.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.chunks/formsExt-DtFeVRvE.es.amd.js +2 -0
  2. package/.chunks/formsExt-DtFeVRvE.es.amd.js.map +1 -0
  3. package/.chunks/{formsExt-BD8Sap5u.es.js → formsExt-DtFeVRvE.es.js} +155 -155
  4. package/.chunks/formsExt-DtFeVRvE.es.js.map +1 -0
  5. package/assets/schedule.css +1 -1
  6. package/assets/themes/dark-th.css +1 -1
  7. package/assets/themes/dark.css +1 -1
  8. package/assets/themes/light.css +1 -1
  9. package/autoload-css-manifest.amd.json +1 -1
  10. package/autoload-css-manifest.json +1 -1
  11. package/formsExt/formsExt.amd.js +1 -1
  12. package/formsExt/formsExt.amd.js.map +1 -1
  13. package/formsExt/formsExt.js +1 -1
  14. package/package.json +2 -1
  15. package/project/project.amd.js +1 -1
  16. package/project/project.amd.js.map +1 -1
  17. package/project/project.js +349 -348
  18. package/project/project.js.map +1 -1
  19. package/schedule/schedule.amd.js +1 -1
  20. package/schedule/schedule.amd.js.map +1 -1
  21. package/schedule/schedule.js +346 -276
  22. package/schedule/schedule.js.map +1 -1
  23. package/src/api/api/types/client/request.d.ts +3 -1
  24. package/src/components/project/groupSelector/groups/utils.d.ts +0 -1
  25. package/src/components/project/projectSelector/utils.d.ts +8 -2
  26. package/src/components/project/regionSelector/types.d.ts +17 -10
  27. package/src/components/project/regionSelector/utils/utils.d.ts +14 -14
  28. package/src/components/schedule/schedule/compoents/calendar/composables/useDaysByCalendarMode.d.ts +6 -0
  29. package/src/components/schedule/schedule/compoents/calendar/types.d.ts +23 -22
  30. package/src/components/schedule/schedule/compoents/{email → emails}/selector/types.d.ts +2 -2
  31. package/src/components/schedule/schedule/compoents/{email → emails}/types.d.ts +1 -2
  32. package/src/components/schedule/schedule/compoents/{reportSend → socials}/types.d.ts +5 -4
  33. package/src/components/schedule/schedule/compoents/timeSelector/types.d.ts +4 -13
  34. package/src/components/schedule/schedule/composables/useModeOptions.d.ts +8 -0
  35. package/src/components/schedule/schedule/composables/useModelByModeCache.d.ts +9 -0
  36. package/src/components/schedule/schedule/types.d.ts +29 -46
  37. package/src/components/schedule/schedule/utils.d.ts +19 -0
  38. package/src/components/schedule/schedule.d.ts +2 -7
  39. package/utils/searchers.amd.js.map +1 -1
  40. package/utils/searchers.js.map +1 -1
  41. package/.chunks/formsExt-BD8Sap5u.es.amd.js +0 -2
  42. package/.chunks/formsExt-BD8Sap5u.es.amd.js.map +0 -1
  43. package/.chunks/formsExt-BD8Sap5u.es.js.map +0 -1
  44. package/src/components/schedule/schedule/compoents/calendar/utils.d.ts +0 -10
  45. package/src/components/schedule/schedule/compoents/timeSelectors/types.d.ts +0 -10
@@ -1,70 +1,53 @@
1
- import { Option as TopSelectOption } from '../../forms/select/types';
1
+ import { Props as CalendarProps } from './compoents/calendar/types';
2
+ import { Props as TimeSelectorProps } from './compoents/timeSelector/types';
2
3
  import { components as TypeMethodComponents } from 'topvisor-openapi/src/ts/Schedule_2/Types/TypeMethod';
3
4
  /**
4
5
  * Режим вывода календаря
5
6
  */
6
- export type TriggerType = 'onDemand' | 'dayOfWeek' | 'dayOfMonth' | 'afterYandexUpdated' | 'afterCheck';
7
- export type TriggerTypeOption = Omit<TopSelectOption, 'value'> & {
8
- value: TriggerType;
9
- };
7
+ export type Mode = 'onDemand' | 'dayOfWeek' | 'dayOfMonth' | 'afterYandexUpdated' | 'afterCheck';
8
+ /**
9
+ * Режимы, которые можно добавить к базовому набору расписания.
10
+ */
11
+ export type ExtraMode = Extract<Mode, 'afterYandexUpdated'>;
10
12
  export interface Props {
11
13
  /**
12
- * Стили для компонента
13
- *
14
- * - `go`: Календарь запуска инструмента
15
- * - `report`: Календарь рассылки отчетов
16
- * - `neutral`: Другое
14
+ * Настройки расписания: дни и временные слоты.
17
15
  */
18
- styling: TypeMethodComponents['schemas']['Schedule_2.Types.TypeMethod'] | 'neutral';
16
+ modelValue: {
17
+ days: CalendarProps['modelValue'];
18
+ times: TimeSelectorProps['modelValue'];
19
+ };
19
20
  /**
20
- * Выбранный режим календаря
21
+ * Вариант типа расписания:
21
22
  *
22
- * - По дням недели
23
- * - По дням месяца
24
- * - После апдейтов
25
- * - После проверки
23
+ * - `go`: календарь запуска инструмента
24
+ * - `report`: календарь рассылки отчетов
26
25
  *
27
- * todo: Сдлеать modelValue
28
- * todo: Рекомендую переименовать в `mode`, имя короткое, определяет вид вывода календаря, а не рельное значение `times`
26
+ * @default go
29
27
  */
30
- triggerType: TriggerType;
28
+ type?: TypeMethodComponents['schemas']['Schedule_2.Types.TypeMethod'];
31
29
  /**
32
- * Дотсупные режимы календаря
33
- *
34
- * todo: Исползовать вместо triggerTypeOptions
30
+ * Дополнительные режимы календаря.
35
31
  */
36
- triggerTypes?: ['onDemand', 'onDayOfWeek', 'onDayOfMonth', 'afterYandexUpdated', 'afterCheck'];
32
+ extraMods?: ExtraMode[];
37
33
  /**
38
- * Типы тригера
39
- *
40
- * todo: Переписать на triggerTypes
34
+ * Возможность выбирать один или несколько временных слотов.
41
35
  */
42
- triggerTypeOptions: TriggerTypeOption[];
36
+ multipleTimes?: boolean;
43
37
  /**
44
- * Кастомный заголовок
38
+ * Кастомный заголовок.
45
39
  *
46
- * Имеет приоритет над дефолтными заголовками
40
+ * Имеет приоритет над дефолтными заголовками.
47
41
  */
48
42
  title?: string;
49
43
  }
50
- /**
51
- * @todo: реализовать слоты вместо container.vue, сам container.vue можно по условию исползовать внутри компонента при укаазнии слота
52
- *
53
- * - Если в дизайне нужен разделитель слотов, то можно добавить компонент Delimiter и использовать его для разделения
54
- * контент им, это удобнее, чем
55
- * - Календарь должен вставялться всегда в завсисимости от выбранного `triggerTypes` в самом компоненте, его кастомаизпация из родительского
56
- * компонента не предусмотрена
57
- */
58
44
  export interface Slots {
59
45
  /**
60
- * Слот для вставки проивзольного контента после календаря
61
- */
62
- settings?(props: Record<string, unknown>): any;
63
- /**
64
- * Слот для вставки футера
46
+ * Слот для вставки произвольного контента с дополнительными настройками или описанием.
47
+ *
48
+ * Для разделения секция используйте `<hr>`
65
49
  */
66
- footer?(props: Record<string, unknown>): any;
67
- }
68
- export interface Emits {
69
- (e: 'update:triggerType', value: TriggerType): void;
50
+ settings?(props: {
51
+ mode: Mode;
52
+ }): any;
70
53
  }
@@ -0,0 +1,19 @@
1
+ import { Props as CalendarProps } from './compoents/calendar/types';
2
+ import { Mode, Props } from './types';
3
+ import { Option as TopSelectOption } from '../../forms/select/types';
4
+ /**
5
+ * Генерирует варианты задержки запуска после апдейта Яндекса.
6
+ *
7
+ * См. Апометр
8
+ */
9
+ export declare const genAfterYandexUpdatedOptions: () => TopSelectOption[];
10
+ /**
11
+ * Проверяет, относится ли режим к календарным режимам.
12
+ *
13
+ * Календарный режим, это режим с выбором дней недели или месяца.
14
+ */
15
+ export declare const isCalendarMode: (value: Mode) => value is CalendarProps["mode"];
16
+ /**
17
+ * Определяет режим расписания по выбранным дням.
18
+ */
19
+ export declare const getModeByDays: (days: Props["modelValue"]["days"], currentMode?: Mode) => Mode;
@@ -1,8 +1,3 @@
1
1
  export { default as TopSchedule } from './schedule/schedule.vue';
2
- export { default as TopScheduleContainer } from './schedule/compoents/container/container.vue';
3
- export { default as TopScheduleCalendar } from './schedule/compoents/calendar/calendar.vue';
4
- export { default as TopScheduleEmail } from './schedule/compoents/email/email.vue';
5
- export { default as TopScheduleEmailSelector } from './schedule/compoents/email/selector/selector.vue';
6
- export { default as TopScheduleReportSend } from './schedule/compoents/reportSend/reportSend.vue';
7
- export { default as TopScheduleTimeSelector } from './schedule/compoents/timeSelector/timeSelector.vue';
8
- export { default as TopScheduleTimeSelectors } from './schedule/compoents/timeSelectors/timeSelectors.vue';
2
+ export { default as TopScheduleEmails } from './schedule/compoents/emails/emails.vue';
3
+ export { default as TopScheduleSocials } from './schedule/compoents/socials/socials.vue';
@@ -1 +1 @@
1
- {"version":3,"sources":["utils/searchers.js","../../src/core/utils/searchers.ts"],"names":["vue","exports"],"mappings":"AAAA,OAAO,CAAC,UAAW,SAAS,EAAG,SAAU,EAAS,EAAS,CCK9C,aAAA,GAAAA,IAAA,OAAA,IAAAA,EAAA,OAAA,IACT,OAAA,eAAAC,EAAA,aAAA,CAAA,MAAA,EAAA,CAAA,EACH,EAAI,eAAA,EAAA,kBAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,eAAA,EAAA,eAAA,IAAA,GDmHD,EAAQ,eAAiB,CChHzB,EAAA,SACA,GAAA,aACA,GAAA,gBACA,GAAA,aACA,EAAA,SACA,EAAA,UACE,EAAA,OACA,EAAA,SACA,EAAA,WAO2B,EAAA,aAC5B,IAAO,KAIX,IAFI,WAGE,IAAA,SD2FsB,EACzB,EAAQ,iBC3FL,GAAA,CACG,IAAA,EAAA,GAEP,OAAA,OAAA,GAAA,WAAA,EAAA,OAAA,CAAA,GAAA,EAAA,CACI,IAAA,GACA,IAAA,IACG,EAAA,IAEP,MACI,IAAA,IACG,IAAA,IAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IAEA,MAGF,IAAA,GAEO,EAAA,IAM2D,MACvD,KAAA,KAAA,EAAA,GAIX,CACM,OAAA,CACJ,ED4BC,EAAQ,eC5BF,GAAA,CAEP,IAAA,EAAA,GACI,OAAA,OAAA,GAAA,WAAA,EAAA,OAAA,CAAA,GAAA,EAAA,GAAA,CACG,IAAA,GAEP,EAAA,IAEO,MAGT,IAAA,GAEO,EAAA,IAMmD,MACtD,IAAO,GAAA,EAAgB,GAGrB,CACA,OAAA,CACL,EDIE,EAAQ,cCJL,EAAA,IAAA,CACA,OAAA,OAAA,GAAA,WAAA,EAAA,OAAA,CAAA,GAAA,EAAA,EAAA,CACA,IAAA,GAEJ,IAAO,GACT,IAAA,GAEO,IAAA,GAMsC,IAAoB,GACzD,IAAR,GAAA,OAAA,CAEM,CACJ,MAAqB,EACpB,EDbA,EAAQ,gBCaH,EAAA,EAAA,IAAA,CACJ,OAAkB,EAAA,EAAlB,CAEA,IAAA,GACI,OAAA,EAAA,EAAA,CACe,IAAA,GAEnB,EAAA,IAAA,EAAA,GACI,MACe,IAAA,GAEnB,EAAA,KAAA,EAAA,GAEoB,MAGtB,IAAA,GACA,EAAA,KAAA,EAAA,IAGkB,MAGpB,IAAA,GAAA,EAAA,MAAA,EAAA,GAEO,CAM+C,MAElD,IAAe,GAAA,EAAM,IAAa,EAAA,EAGhC,CACS,OAAA,CAEb,EDnDC,EAAQ,mBCmDT,EAAA,IAAA,CACI,OAAA,IAAA,OAAA,EAAA,GAAA,EAAA,CACS,IAAA,GAEb,EAAA,EACI,MACa,IAAgB,GAEjC,EAAA,EAEA,MAAM,IAAA,GAAG,EAAA,IAAA,EAAA,GAAG,MAAG,QAAA,CAAG,EAAsB,EAC1C,EAEO,EACR,CD1EY,CAAC,CAAC,SAAS,CAAC,IAAM,EAAI,EAC1B,CACA,OAAO,CACX,CAOJ,CAAC","sourcesContent":["define([\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.searchersNames = exports.prepareVolumeType = exports.getSearcherGIcon = exports.getLangLabel = exports.getDeviceGIcon = exports.genVolumeLabel = void 0;\n //#region src/core/utils/searchers.ts\n var e = {\n 0: \"Yandex\",\n 20: \"Yandex.com\",\n 21: \"Yandex.com.tr\",\n 22: \"YandexLive\",\n 1: \"Google\",\n 4: \"YouTube\",\n 5: \"Bing\",\n 7: \"Seznam\",\n 8: \"AppStore\",\n 9: \"GooglePlay\",\n 101: \"VK\",\n 102: \"Facebook\",\n 103: \"Twitter\"\n }, t = (e) => {\n let t = \"\";\n switch (typeof e == \"string\" && (e = Number(e)), e) {\n case 0:\n case 22:\n t = \"\";\n break;\n case 20:\n case 21:\n t = \"\";\n break;\n case 1:\n t = \"\";\n break;\n case 2:\n t = \"\";\n break;\n case 3:\n t = \"\";\n break;\n case 4:\n t = \"\";\n break;\n case 5:\n t = \"\";\n break;\n case 6:\n t = \"\";\n break;\n case 7:\n t = \"\";\n break;\n case 8:\n t = \"\";\n break;\n case 9:\n t = \"\";\n break;\n case null: t = \"\";\n }\n return t;\n }, n = (e) => {\n let t = \"\";\n switch (typeof e == \"string\" && (e = Number(e)), e % 10) {\n case 0:\n t = \"\";\n break;\n case 1:\n t = \"\";\n break;\n case 2: t = \"\";\n }\n return t;\n }, r = (e, t) => {\n switch (typeof e == \"string\" && (e = Number(e)), e * 1) {\n case 1:\n case 4:\n case 5:\n case 6:\n case 8:\n case 9: return t;\n }\n return \"\";\n }, i = (e, t, n) => {\n switch (t * 1) {\n case 0:\n switch (n * 1) {\n case 2:\n e = `\"${e}\"`;\n break;\n case 3:\n e = `\"!${e}\"`;\n break;\n case 5:\n e = `\"[${e}]\"`;\n break;\n case 6: e = `\"[!${e}]\"`;\n }\n break;\n case 1: e = `[${e}]`;\n }\n return e;\n }, a = (e, t) => {\n switch (t === null && (t = 6), e) {\n case 1:\n t = 3;\n break;\n case 2:\n t = 2;\n break;\n case 5:\n t > 1 && (t = 1);\n break;\n default: [\n 1,\n 2,\n 3,\n 5,\n 6\n ].includes(t) || (t = 3);\n }\n return t;\n };\n exports.searchersNames = e;\n exports.getSearcherGIcon = t;\n exports.getDeviceGIcon = n;\n exports.getLangLabel = r;\n exports.genVolumeLabel = i;\n exports.prepareVolumeType = a;\n});\n//# sourceMappingURL=searchers.js.map\n","\n\n/**\n * Вспомогательный класс для работы с разными Поисковиками\n */\nexport const searchersNames = {\n\t0: 'Yandex',\n\t20: 'Yandex.com',\n\t21: 'Yandex.com.tr',\n\t22: 'YandexLive',\n\t1: 'Google',\n\t4: 'YouTube',\n\t5: 'Bing',\n\t7: 'Seznam',\n\t8: 'AppStore',\n\t9: 'GooglePlay',\n\t101: 'VK',\n\t102: 'Facebook',\n\t103: 'Twitter',\n};\n\n/**\n * Получить иконку ПС\n * @param searcherKey - цифра или строка с цифрой обозначающая ПС. Если null вернется иконка с глобусом\n */\nexport const getSearcherGIcon = (searcherKey: number | string | undefined): string => {\n\tlet icon = '';\n\n\tif (typeof searcherKey === 'string') searcherKey = Number(searcherKey);\n\n\tswitch (searcherKey) {\n\t\tcase 0:\n\t\tcase 22:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 20:\n\t\tcase 21:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase null:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t}\n\n\treturn icon;\n};\n\n/**\n * Получить иконку устройства (ПК, планшет, смартфон)\n */\nexport const getDeviceGIcon = (device: number | string): string => {\n\tlet icon = '';\n\n\tif (typeof device === 'string') device = Number(device);\n\n\tswitch (device % 10) {\n\t\tcase 0:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t}\n\n\treturn icon;\n};\n\n/**\n * Получить иконку языка\n */\nexport const getLangLabel = (searcherKey: number | string, lang: string) => {\n\tif (typeof searcherKey === 'string') searcherKey = Number(searcherKey);\n\n\tswitch (searcherKey * 1) {\n\t\tcase 1:\n\t\tcase 4:\n\t\tcase 5:\n\t\tcase 6:\n\t\tcase 8:\n\t\tcase 9:\n\t\t\treturn lang;\n\t}\n\n\treturn '';\n};\n\n/**\n * Сгенерировать заголовок типа частоты\n */\nexport const genVolumeLabel = (label: string, searcherKey: 0 | 1, volumeType: 1 | 2 | 3 | 5 | 6): string => {\n\tswitch (searcherKey * 1) {\n\t\t// Яндекс\n\t\tcase 0:\n\t\t\tswitch (volumeType * 1) {\n\t\t\t\tcase 2:\n\t\t\t\t\tlabel = `\"${label}\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tlabel = `\"!${label}\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tlabel = `\"[${label}]\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tlabel = `\"[!${label}]\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\t// Google\n\t\tcase 1:\n\t\t\tlabel = `[${label}]`;\n\n\t\t\tbreak;\n\t}\n\n\treturn label;\n};\n\n/**\n * Проверить значение частоты, вернуть правильное значение частоты\n */\nexport const prepareVolumeType = (searcherKey: number, volumeType: number): number => {\n\t// по умолчанию выбрана сама точная частота\n\tif (volumeType === null) volumeType = 6;\n\n\tswitch (searcherKey) {\n\t\tcase 1:\n\t\t\tvolumeType = 3;\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tvolumeType = 2;\n\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tif (volumeType > 1) volumeType = 1;\n\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tif (![1, 2, 3, 5, 6].includes(volumeType)) volumeType = 3;\n\t}\n\n\treturn volumeType;\n};\n"]}
1
+ {"version":3,"sources":["utils/searchers.js","../../src/core/utils/searchers.ts"],"names":["vue","exports"],"mappings":"AAAA,OAAO,CAAC,UAAW,SAAS,EAAG,SAAU,EAAS,EAAS,CCK9C,aAAA,GAAAA,IAAA,OAAA,IAAAA,EAAA,OAAA,IACT,OAAA,eAAAC,EAAA,aAAA,CAAA,MAAA,EAAA,CAAA,EACH,EAAI,eAAA,EAAA,kBAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,eAAA,EAAA,eAAA,IAAA,GDmHD,EAAQ,eAAiB,CChHzB,EAAA,SACA,GAAA,aACA,GAAA,gBACA,GAAA,aACA,EAAA,SACA,EAAA,UACE,EAAA,OACA,EAAA,SACA,EAAA,WAO2B,EAAA,aAC5B,IAAO,KAIX,IAFI,WAGE,IAAA,SD2FsB,EACzB,EAAQ,iBC3FL,GAAA,CACG,IAAA,EAAA,GAEP,OAAA,OAAA,GAAA,WAAA,EAAA,OAAA,CAAA,GAAA,EAAA,CACI,IAAA,GACA,IAAA,IACG,EAAA,IAEP,MACI,IAAA,IACG,IAAA,IAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IACI,MACG,IAAA,GAEP,EAAA,IAEA,MAGF,IAAA,GAEO,EAAA,IAM2D,MACvD,KAAA,KAAA,EAAA,GAIX,CACM,OAAA,CACJ,ED4BC,EAAQ,eC5BF,GAAA,CAEP,IAAA,EAAA,GACI,OAAA,OAAA,GAAA,WAAA,EAAA,OAAA,CAAA,GAAA,EAAA,GAAA,CACG,IAAA,GAEP,EAAA,IAEO,MAGT,IAAA,GAEO,EAAA,IAMmD,MACtD,IAAO,GAAA,EAAgB,GAGrB,CACA,OAAA,CACL,EDIE,EAAQ,cCJL,EAAA,IAAA,CACA,OAAA,OAAA,GAAA,WAAA,EAAA,OAAA,CAAA,GAAA,EAAA,EAAA,CACA,IAAA,GAEJ,IAAO,GACT,IAAA,GAEO,IAAA,GAMsC,IAAoB,GACzD,IAAR,GAAA,OAAA,CAEM,CACJ,MAAqB,EACpB,EDbA,EAAQ,gBCaH,EAAA,EAAA,IAAA,CACJ,OAAkB,EAAA,EAAlB,CAEA,IAAA,GACI,OAAA,EAAA,EAAA,CACe,IAAA,GAEnB,EAAA,IAAA,EAAA,GACI,MACe,IAAA,GAEnB,EAAA,KAAA,EAAA,GAEoB,MAGtB,IAAA,GAEA,EAAA,KAAA,EAAA,IAGkB,MAGpB,IAAA,GAAA,EAAA,MAAA,EAAA,GAEO,CAM+C,MAElD,IAAe,GAAA,EAAM,IAAa,EAAA,EAGhC,CACS,OAAA,CAEb,EDpDC,EAAQ,mBCoDT,EAAA,IAAA,CACI,OAAA,IAAA,OAAA,EAAA,GAAA,EAAA,CACS,IAAA,GAEb,EAAA,EACI,MACa,IAAgB,GAEjC,EAAA,EAEA,MAAM,IAAA,GAAG,EAAA,IAAA,EAAA,GAAG,MAAG,QAAA,CAAG,EAAsB,EAC1C,EAEO,EACR,CD3EY,CAAC,CAAC,SAAS,CAAC,IAAM,EAAI,EAC1B,CACA,OAAO,CACX,CAOJ,CAAC","sourcesContent":["define([\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.searchersNames = exports.prepareVolumeType = exports.getSearcherGIcon = exports.getLangLabel = exports.getDeviceGIcon = exports.genVolumeLabel = void 0;\n //#region src/core/utils/searchers.ts\n var e = {\n 0: \"Yandex\",\n 20: \"Yandex.com\",\n 21: \"Yandex.com.tr\",\n 22: \"YandexLive\",\n 1: \"Google\",\n 4: \"YouTube\",\n 5: \"Bing\",\n 7: \"Seznam\",\n 8: \"AppStore\",\n 9: \"GooglePlay\",\n 101: \"VK\",\n 102: \"Facebook\",\n 103: \"Twitter\"\n }, t = (e) => {\n let t = \"\";\n switch (typeof e == \"string\" && (e = Number(e)), e) {\n case 0:\n case 22:\n t = \"\";\n break;\n case 20:\n case 21:\n t = \"\";\n break;\n case 1:\n t = \"\";\n break;\n case 2:\n t = \"\";\n break;\n case 3:\n t = \"\";\n break;\n case 4:\n t = \"\";\n break;\n case 5:\n t = \"\";\n break;\n case 6:\n t = \"\";\n break;\n case 7:\n t = \"\";\n break;\n case 8:\n t = \"\";\n break;\n case 9:\n t = \"\";\n break;\n case null: t = \"\";\n }\n return t;\n }, n = (e) => {\n let t = \"\";\n switch (typeof e == \"string\" && (e = Number(e)), e % 10) {\n case 0:\n t = \"\";\n break;\n case 1:\n t = \"\";\n break;\n case 2: t = \"\";\n }\n return t;\n }, r = (e, t) => {\n switch (typeof e == \"string\" && (e = Number(e)), e * 1) {\n case 1:\n case 4:\n case 5:\n case 6:\n case 8:\n case 9: return t;\n }\n return \"\";\n }, i = (e, t, n) => {\n switch (t * 1) {\n case 0:\n switch (n * 1) {\n case 2:\n e = `\"${e}\"`;\n break;\n case 3:\n e = `\"!${e}\"`;\n break;\n case 5:\n e = `\"[${e}]\"`;\n break;\n case 6: e = `\"[!${e}]\"`;\n }\n break;\n case 1: e = `[${e}]`;\n }\n return e;\n }, a = (e, t) => {\n switch (t === null && (t = 6), e) {\n case 1:\n t = 3;\n break;\n case 2:\n t = 2;\n break;\n case 5:\n t > 1 && (t = 1);\n break;\n default: [\n 1,\n 2,\n 3,\n 5,\n 6\n ].includes(t) || (t = 3);\n }\n return t;\n };\n exports.searchersNames = e;\n exports.getSearcherGIcon = t;\n exports.getDeviceGIcon = n;\n exports.getLangLabel = r;\n exports.genVolumeLabel = i;\n exports.prepareVolumeType = a;\n});\n//# sourceMappingURL=searchers.js.map\n","\n\n/**\n * Вспомогательный класс для работы с разными Поисковиками\n */\nexport const searchersNames = {\n\t0: 'Yandex',\n\t20: 'Yandex.com',\n\t21: 'Yandex.com.tr',\n\t22: 'YandexLive',\n\t1: 'Google',\n\t4: 'YouTube',\n\t5: 'Bing',\n\t7: 'Seznam',\n\t8: 'AppStore',\n\t9: 'GooglePlay',\n\t101: 'VK',\n\t102: 'Facebook',\n\t103: 'Twitter',\n};\n\n/**\n * Получить иконку ПС\n * @param searcherKey - цифра или строка с цифрой обозначающая ПС. Если null вернется иконка с глобусом\n */\nexport const getSearcherGIcon = (searcherKey: number | string | undefined): string => {\n\tlet icon = '';\n\n\tif (typeof searcherKey === 'string') searcherKey = Number(searcherKey);\n\n\tswitch (searcherKey) {\n\t\tcase 0:\n\t\tcase 22:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 20:\n\t\tcase 21:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase null:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t}\n\n\treturn icon;\n};\n\n/**\n * Получить иконку устройства (ПК, планшет, смартфон)\n */\nexport const getDeviceGIcon = (device: number | string): string => {\n\tlet icon = '';\n\n\tif (typeof device === 'string') device = Number(device);\n\n\tswitch (device % 10) {\n\t\tcase 0:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t}\n\n\treturn icon;\n};\n\n/**\n * Получить иконку языка\n */\nexport const getLangLabel = (searcherKey: number | string, lang: string) => {\n\tif (typeof searcherKey === 'string') searcherKey = Number(searcherKey);\n\n\tswitch (searcherKey * 1) {\n\t\tcase 1:\n\t\tcase 4:\n\t\tcase 5:\n\t\tcase 6:\n\t\tcase 8:\n\t\tcase 9:\n\t\t\treturn lang;\n\t}\n\n\treturn '';\n};\n\n/**\n * Сгенерировать заголовок типа частоты\n */\nexport const genVolumeLabel = (label: string, searcherKey: 0 | 1, volumeType: 1 | 2 | 3 | 5 | 6): string => {\n\tswitch (searcherKey * 1) {\n\t\t// Яндекс\n\t\tcase 0:\n\t\t\tswitch (volumeType * 1) {\n\t\t\t\tcase 2:\n\t\t\t\t\tlabel = `\"${label}\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tlabel = `\"!${label}\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tlabel = `\"[${label}]\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tlabel = `\"[!${label}]\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tbreak;\n\t\t// Google\n\t\tcase 1:\n\t\t\tlabel = `[${label}]`;\n\n\t\t\tbreak;\n\t}\n\n\treturn label;\n};\n\n/**\n * Проверить значение частоты, вернуть правильное значение частоты\n */\nexport const prepareVolumeType = (searcherKey: number, volumeType: number): number => {\n\t// по умолчанию выбрана сама точная частота\n\tif (volumeType === null) volumeType = 6;\n\n\tswitch (searcherKey) {\n\t\tcase 1:\n\t\t\tvolumeType = 3;\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tvolumeType = 2;\n\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tif (volumeType > 1) volumeType = 1;\n\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tif (![1, 2, 3, 5, 6].includes(volumeType)) volumeType = 3;\n\t}\n\n\treturn volumeType;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"searchers.js","names":[],"sources":["../../src/core/utils/searchers.ts"],"sourcesContent":["\n\n/**\n * Вспомогательный класс для работы с разными Поисковиками\n */\nexport const searchersNames = {\n\t0: 'Yandex',\n\t20: 'Yandex.com',\n\t21: 'Yandex.com.tr',\n\t22: 'YandexLive',\n\t1: 'Google',\n\t4: 'YouTube',\n\t5: 'Bing',\n\t7: 'Seznam',\n\t8: 'AppStore',\n\t9: 'GooglePlay',\n\t101: 'VK',\n\t102: 'Facebook',\n\t103: 'Twitter',\n};\n\n/**\n * Получить иконку ПС\n * @param searcherKey - цифра или строка с цифрой обозначающая ПС. Если null вернется иконка с глобусом\n */\nexport const getSearcherGIcon = (searcherKey: number | string | undefined): string => {\n\tlet icon = '';\n\n\tif (typeof searcherKey === 'string') searcherKey = Number(searcherKey);\n\n\tswitch (searcherKey) {\n\t\tcase 0:\n\t\tcase 22:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 20:\n\t\tcase 21:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase null:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t}\n\n\treturn icon;\n};\n\n/**\n * Получить иконку устройства (ПК, планшет, смартфон)\n */\nexport const getDeviceGIcon = (device: number | string): string => {\n\tlet icon = '';\n\n\tif (typeof device === 'string') device = Number(device);\n\n\tswitch (device % 10) {\n\t\tcase 0:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t}\n\n\treturn icon;\n};\n\n/**\n * Получить иконку языка\n */\nexport const getLangLabel = (searcherKey: number | string, lang: string) => {\n\tif (typeof searcherKey === 'string') searcherKey = Number(searcherKey);\n\n\tswitch (searcherKey * 1) {\n\t\tcase 1:\n\t\tcase 4:\n\t\tcase 5:\n\t\tcase 6:\n\t\tcase 8:\n\t\tcase 9:\n\t\t\treturn lang;\n\t}\n\n\treturn '';\n};\n\n/**\n * Сгенерировать заголовок типа частоты\n */\nexport const genVolumeLabel = (label: string, searcherKey: 0 | 1, volumeType: 1 | 2 | 3 | 5 | 6): string => {\n\tswitch (searcherKey * 1) {\n\t\t// Яндекс\n\t\tcase 0:\n\t\t\tswitch (volumeType * 1) {\n\t\t\t\tcase 2:\n\t\t\t\t\tlabel = `\"${label}\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tlabel = `\"!${label}\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tlabel = `\"[${label}]\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tlabel = `\"[!${label}]\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\t// Google\n\t\tcase 1:\n\t\t\tlabel = `[${label}]`;\n\n\t\t\tbreak;\n\t}\n\n\treturn label;\n};\n\n/**\n * Проверить значение частоты, вернуть правильное значение частоты\n */\nexport const prepareVolumeType = (searcherKey: number, volumeType: number): number => {\n\t// по умолчанию выбрана сама точная частота\n\tif (volumeType === null) volumeType = 6;\n\n\tswitch (searcherKey) {\n\t\tcase 1:\n\t\t\tvolumeType = 3;\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tvolumeType = 2;\n\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tif (volumeType > 1) volumeType = 1;\n\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tif (![1, 2, 3, 5, 6].includes(volumeType)) volumeType = 3;\n\t}\n\n\treturn volumeType;\n};\n"],"mappings":";AAKA,IAAa,IAAiB;CAC7B,GAAG;CACH,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,KAAK;CACL,KAAK;CACL,KAAK;AACN,GAMa,KAAoB,MAAqD;CACrF,IAAI,IAAO;CAIX,QAFI,OAAO,KAAgB,aAAU,IAAc,OAAO,CAAW,IAE7D,GAAR;EACC,KAAK;EACL,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;EACL,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK,MACJ,IAAO;CAGT;CAEA,OAAO;AACR,GAKa,KAAkB,MAAoC;CAClE,IAAI,IAAO;CAIX,QAFI,OAAO,KAAW,aAAU,IAAS,OAAO,CAAM,IAE9C,IAAS,IAAjB;EACC,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK,GACJ,IAAO;CAGT;CAEA,OAAO;AACR,GAKa,KAAgB,GAA8B,MAAiB;CAG3E,QAFI,OAAO,KAAgB,aAAU,IAAc,OAAO,CAAW,IAE7D,IAAc,GAAtB;EACC,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,GACJ,OAAO;CACT;CAEA,OAAO;AACR,GAKa,KAAkB,GAAe,GAAoB,MAA0C;CAC3G,QAAQ,IAAc,GAAtB;EAEC,KAAK;GACJ,QAAQ,IAAa,GAArB;IACC,KAAK;KACJ,IAAQ,IAAI,EAAM;KAElB;IACD,KAAK;KACJ,IAAQ,KAAK,EAAM;KAEnB;IACD,KAAK;KACJ,IAAQ,KAAK,EAAM;KAEnB;IACD,KAAK,GACJ,IAAQ,MAAM,EAAM;GAGtB;GACA;EAED,KAAK,GACJ,IAAQ,IAAI,EAAM;CAGpB;CAEA,OAAO;AACR,GAKa,KAAqB,GAAqB,MAA+B;CAIrF,QAFI,MAAe,SAAM,IAAa,IAE9B,GAAR;EACC,KAAK;GACJ,IAAa;GAEb;EACD,KAAK;GACJ,IAAa;GAEb;EACD,KAAK;GACJ,AAAI,IAAa,MAAG,IAAa;GAEjC;EACD,SACC,AAAK;GAAC;GAAG;GAAG;GAAG;GAAG;EAAC,CAAC,CAAC,SAAS,CAAU,MAAG,IAAa;CAC1D;CAEA,OAAO;AACR"}
1
+ {"version":3,"file":"searchers.js","names":[],"sources":["../../src/core/utils/searchers.ts"],"sourcesContent":["\n\n/**\n * Вспомогательный класс для работы с разными Поисковиками\n */\nexport const searchersNames = {\n\t0: 'Yandex',\n\t20: 'Yandex.com',\n\t21: 'Yandex.com.tr',\n\t22: 'YandexLive',\n\t1: 'Google',\n\t4: 'YouTube',\n\t5: 'Bing',\n\t7: 'Seznam',\n\t8: 'AppStore',\n\t9: 'GooglePlay',\n\t101: 'VK',\n\t102: 'Facebook',\n\t103: 'Twitter',\n};\n\n/**\n * Получить иконку ПС\n * @param searcherKey - цифра или строка с цифрой обозначающая ПС. Если null вернется иконка с глобусом\n */\nexport const getSearcherGIcon = (searcherKey: number | string | undefined): string => {\n\tlet icon = '';\n\n\tif (typeof searcherKey === 'string') searcherKey = Number(searcherKey);\n\n\tswitch (searcherKey) {\n\t\tcase 0:\n\t\tcase 22:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 20:\n\t\tcase 21:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase null:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t}\n\n\treturn icon;\n};\n\n/**\n * Получить иконку устройства (ПК, планшет, смартфон)\n */\nexport const getDeviceGIcon = (device: number | string): string => {\n\tlet icon = '';\n\n\tif (typeof device === 'string') device = Number(device);\n\n\tswitch (device % 10) {\n\t\tcase 0:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ticon = '';\n\n\t\t\tbreak;\n\t}\n\n\treturn icon;\n};\n\n/**\n * Получить иконку языка\n */\nexport const getLangLabel = (searcherKey: number | string, lang: string) => {\n\tif (typeof searcherKey === 'string') searcherKey = Number(searcherKey);\n\n\tswitch (searcherKey * 1) {\n\t\tcase 1:\n\t\tcase 4:\n\t\tcase 5:\n\t\tcase 6:\n\t\tcase 8:\n\t\tcase 9:\n\t\t\treturn lang;\n\t}\n\n\treturn '';\n};\n\n/**\n * Сгенерировать заголовок типа частоты\n */\nexport const genVolumeLabel = (label: string, searcherKey: 0 | 1, volumeType: 1 | 2 | 3 | 5 | 6): string => {\n\tswitch (searcherKey * 1) {\n\t\t// Яндекс\n\t\tcase 0:\n\t\t\tswitch (volumeType * 1) {\n\t\t\t\tcase 2:\n\t\t\t\t\tlabel = `\"${label}\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tlabel = `\"!${label}\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tlabel = `\"[${label}]\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tlabel = `\"[!${label}]\"`;\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tbreak;\n\t\t// Google\n\t\tcase 1:\n\t\t\tlabel = `[${label}]`;\n\n\t\t\tbreak;\n\t}\n\n\treturn label;\n};\n\n/**\n * Проверить значение частоты, вернуть правильное значение частоты\n */\nexport const prepareVolumeType = (searcherKey: number, volumeType: number): number => {\n\t// по умолчанию выбрана сама точная частота\n\tif (volumeType === null) volumeType = 6;\n\n\tswitch (searcherKey) {\n\t\tcase 1:\n\t\t\tvolumeType = 3;\n\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tvolumeType = 2;\n\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tif (volumeType > 1) volumeType = 1;\n\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tif (![1, 2, 3, 5, 6].includes(volumeType)) volumeType = 3;\n\t}\n\n\treturn volumeType;\n};\n"],"mappings":";AAKA,IAAa,IAAiB;CAC7B,GAAG;CACH,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,KAAK;CACL,KAAK;CACL,KAAK;AACN,GAMa,KAAoB,MAAqD;CACrF,IAAI,IAAO;CAIX,QAFI,OAAO,KAAgB,aAAU,IAAc,OAAO,CAAW,IAE7D,GAAR;EACC,KAAK;EACL,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;EACL,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK,MACJ,IAAO;CAGT;CAEA,OAAO;AACR,GAKa,KAAkB,MAAoC;CAClE,IAAI,IAAO;CAIX,QAFI,OAAO,KAAW,aAAU,IAAS,OAAO,CAAM,IAE9C,IAAS,IAAjB;EACC,KAAK;GACJ,IAAO;GAEP;EACD,KAAK;GACJ,IAAO;GAEP;EACD,KAAK,GACJ,IAAO;CAGT;CAEA,OAAO;AACR,GAKa,KAAgB,GAA8B,MAAiB;CAG3E,QAFI,OAAO,KAAgB,aAAU,IAAc,OAAO,CAAW,IAE7D,IAAc,GAAtB;EACC,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,GACJ,OAAO;CACT;CAEA,OAAO;AACR,GAKa,KAAkB,GAAe,GAAoB,MAA0C;CAC3G,QAAQ,IAAc,GAAtB;EAEC,KAAK;GACJ,QAAQ,IAAa,GAArB;IACC,KAAK;KACJ,IAAQ,IAAI,EAAM;KAElB;IACD,KAAK;KACJ,IAAQ,KAAK,EAAM;KAEnB;IACD,KAAK;KACJ,IAAQ,KAAK,EAAM;KAEnB;IACD,KAAK,GACJ,IAAQ,MAAM,EAAM;GAGtB;GAEA;EAED,KAAK,GACJ,IAAQ,IAAI,EAAM;CAGpB;CAEA,OAAO;AACR,GAKa,KAAqB,GAAqB,MAA+B;CAIrF,QAFI,MAAe,SAAM,IAAa,IAE9B,GAAR;EACC,KAAK;GACJ,IAAa;GAEb;EACD,KAAK;GACJ,IAAa;GAEb;EACD,KAAK;GACJ,AAAI,IAAa,MAAG,IAAa;GAEjC;EACD,SACC,AAAK;GAAC;GAAG;GAAG;GAAG;GAAG;EAAC,CAAC,CAAC,SAAS,CAAU,MAAG,IAAa;CAC1D;CAEA,OAAO;AACR"}
@@ -1,2 +0,0 @@
1
- define([`require`,`exports`,`./forms-Ch1q0UUt.es.amd`,`./field-DEusYVqS.es.amd`,`../utils/keyboard.amd`,`./popup-DA17NrM5.es.amd`,`vue`,`./api-lAoAK33f.es.amd`,`../require/css.amd!../assets/formsExt.css`],function(e,t,n,r,i,a,o){"use strict";if(s===void 0)var s=window.Vue;Object.defineProperty(t,"__esModule",{value:!0}),t.u=t.t=t.s=t.r=t.p=t.o=t.n=t.l=t.i=t.f=t.d=t.c=t.a=void 0;var c={key:0,class:`top-menu_selectAll`},l=(0,o.defineComponent)({__name:`menu`,props:(0,o.mergeModels)({modelValue:{},items:{},isMultiple:{type:Boolean},canBeEmptyMultiple:{type:Boolean},styling:{default:`default`},selectAllItem:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,r=(0,o.useModel)(e,`modelValue`),i=(0,o.ref)();!t.isMultiple&&typeof r.value!=`string`&&typeof r.value!=`number`&&console.warn(`Type check failed for prop "modelValue". Expected String: `+typeof r.value),t.isMultiple&&!Array.isArray(r.value)&&console.warn(`Type check failed for prop "modelValue". Expected Array: `+typeof r.value),t.isMultiple&&!t.canBeEmptyMultiple&&Array.isArray(r.value)&&!r.value.length&&t.items[0]&&(r.value=[t.items[0]?.href??t.items[0]?.value]);let a=e=>Array.isArray(r.value)?r.value.includes(e.value):e.value===r.value,s=(e,n=!1)=>{if(Array.isArray(r.value)){let i=r.value.slice();if(n){i.length||(i=t.items.map(e=>e.value));let n=i.indexOf(e.value);n===-1?i.push(e.value):i.splice(n,1)}else i=i.length===1&&i[0]===e.value?[]:[e.value];!t.canBeEmptyMultiple&&!i.length&&(i=[e.value]),r.value=i;return}r.value=e.value},l=e=>{if(i.value.scrollWidth<=i.value.offsetWidth||e.shiftKey||Math.abs(e.deltaY)<50)return;e.preventDefault();let t=e.deltaY>0?30:-30;i.value.scrollLeft=i.value.scrollLeft+t},u=(e=!0)=>{let t=i.value.querySelector(`.top-active`);if(!t)return;let r=t.offsetLeft-i.value.offsetLeft-24,a=t.offsetLeft-i.value.offsetLeft+t.clientWidth+24,o=i.value.scrollLeft,s=i.value.clientWidth+i.value.scrollLeft,c;r<o&&(c=r),a>s&&(c=a-i.value.clientWidth),c!==void 0&&((0,n.G)()?n.O.$?.(i.value).animate({scrollLeft:c},e?200:0):i.value.scrollTo({left:c,behavior:e?`smooth`:`auto`}))},d=()=>{if(Array.isArray(r.value)){if(r.value.length===t.items.length){r.value=[t.items[0].href??t.items[0].value];return}r.value=t.items.map(e=>e.href??e.value)}};return(0,o.onMounted)(()=>u(!1)),(0,o.onUpdated)(()=>u(!0)),(t,u)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{ref_key:`el`,ref:i,class:(0,o.normalizeClass)({"top-menu":!0,[`top-style_`+e.styling]:!0}),onWheel:l},[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.items,e=>((0,o.openBlock)(),(0,o.createBlock)(n.h,(0,o.mergeProps)({ref_for:!0},e,{class:`top-menu_item`,color:`theme`,onClick:t=>s(e,t.ctrlKey||t.metaKey),isActive:a(e)}),(0,o.createSlots)({_:2},[e.content?{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.content),1)]),key:`0`}:void 0]),1040,[`onClick`,`isActive`]))),256)),Array.isArray(r.value)&&e.selectAllItem?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,c,[(0,o.createVNode)(n.h,(0,o.mergeProps)(e.selectAllItem,{class:`top-menu_item`,color:`theme`,styling:``,onClick:u[0]||=e=>d(),isActive:r.value.length===e.items.length}),(0,o.createSlots)({_:2},[e.selectAllItem.content?{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.selectAllItem.content),1)]),key:`0`}:void 0]),1040,[`isActive`])])):(0,o.createCommentVNode)(``,!0)],34))}}),u={class:`top-selector2_itemMulti top-ellipsis`},d=(0,o.defineComponent)({__name:`itemMulti`,props:{id:{},name:{}},emits:[`delete`],setup(e,{emit:t}){return(n,r)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,u,[(0,o.createTextVNode)((0,o.toDisplayString)(e.name)+` `,1),(0,o.createElementVNode)(`span`,{class:`top-selector2_itemMultiDelete`,"data-top-icon":``,onClick:r[0]||=n=>t(`delete`,{id:e.id,name:e.name}),onMousedown:r[1]||=(0,o.withModifiers)(()=>{},[`stop`])},null,32)]))}}),f=new Map,p=new Map,m=new Map,h=e=>(m.has(e)||m.set(e,(0,o.ref)(0)),m.get(e)),g=e=>{h(e).value++},_=e=>{f.get(e)?.clear(),g(e)},v=(e,t)=>{f.get(e)?.forEach(e=>t(e))},y=(e,t)=>{p.get(e)?.forEach(e=>t(e))},b=(e,t,n)=>{y(e,e=>{let r=!1;if(Array.isArray(e.value))e.value.filter(e=>e.id===t).forEach(e=>{Object.assign(e,n),r=!0});else{if(e.value.id!==t)return;Object.assign(e.value,n),r=!0}r&&(0,o.triggerRef)(e)})},x=e=>{let t=window.mo?.user?.id;return JSON.stringify(e.params)+`:`+e.url+`:`+t},S=(e,t)=>{let n=f.get(t)?.get(e);if(n)return n.result=n.result.map(e=>({...e})),n},C=(e,t,n)=>{f.has(t)||f.set(t,new Map),f.get(t)?.set(e,n)},w=(e,t)=>{p.has(e)||p.set(e,new Set),p.get(e)?.add(t),(0,o.onUnmounted)(()=>p.get(e)?.delete(t))},T=(e,t,n)=>{v(e,e=>{let r=e.result.find(e=>e.id===t);r&&Object.assign(r,n)}),b(e,t,n),g(e)},E=(e,t)=>{v(e,e=>{let n=e.result.findIndex(e=>e.id===t);n!==-1&&(e.result.splice(n,1),e.nextOffset&&e.nextOffset--)}),b(e,t,{name:`--`}),g(e)},D=(e,t,r,i,a)=>{let s=(0,o.ref)([]),c=(0,o.ref)(!1),l=(0,o.ref)(0),u=``,d;e&&!e.params.limit&&(e.params.limit=100),e&&w(e.path,a);let f=()=>{if(!e)return;e.params.offset=0;let t=S(x(e),e.path);if(!t){s.value=[],d=void 0;return}s.value=t.result,d=t.nextOffset};e&&i&&(0,o.watch)(h(e.path),()=>{f()});let p=async()=>{if(!e)return;let t=i?x(e):void 0;if(t){let n=S(t,e.path);if(n)return e.abortByFingerprint(),n}let n=await e.call();if(n.errors)return;if(!Array.isArray(n.result)){console.warn("Array expected in `res.result`");return}let r=n.result.findIndex(e=>e.id===void 0||e.name===void 0);if(r!==-1){console.warn(`В result[${r}] нет id или name`);return}return t&&C(t,e.path,n),n},m=async n=>{if(!e)return;if(n){if(!d||c.value)return;e.params.offset=d}else e.params.offset=0;t?.(e,u),c.value=!0;let r=await p();c.value=!1,l.value++,r&&(d=r.nextOffset,n?s.value=s.value.concat(r.result):s.value=r.result)},g=(0,n.P)(()=>m(!1),200);return{apiRequest:e,items:s,isLoading:c,countLoading:l,load:m,setSearchTextAndLoad:(t,n=!0)=>{if(e){if(t.length<r){e.abortByFingerprint(),s.value=[];return}t===u&&s.value.length||(u=t,n?g():m(!1))}}}},O=0,k=null,A=(e,t,n=!0)=>n&&t.id===null?Array.isArray(e)?e.some(e=>e.id===t.id&&e.name===t.name):t.name===e.name:Array.isArray(e)?e.some(e=>e.id===t.id):t.id===e.id,j=(e,t,n)=>{let i=e.params.filters??[];i=i.filter(e=>e.name!==n),t&&i.push((0,r.t)(n,`CONTAINS`,[t])),e.changeParams({filters:i})},M=(e,t,r,a)=>{let s=(0,o.ref)(``),c={id:0,name:(0,n.E)().Common.All},l=()=>{s.value=``},u=()=>!(!a.apiRequest||s.value.length>=t.minLength),d=(0,o.computed)(()=>{let e=[];return!t.multiselect&&t.useAllItem&&(typeof t.useAllItem==`string`&&(c.name=t.useAllItem),e.push(c)),t.items?.forEach(t=>e.push(t)),e}),f=(0,o.ref)([]),p=(0,o.ref)(t.itemsChunkSize),m=()=>{f.value=_()},h=()=>{t.itemsChunkSize&&p.value!==void 0&&(p.value+=t.itemsChunkSize)},g=()=>{t.itemsChunkSize&&(p.value=t.itemsChunkSize)},_=()=>{let n=s.value.toLowerCase(),r=(0,i.invertKeyboardLayout)(n),o=[],c,l=[],u=()=>{l.at(-1)?.listItemProps?.type===`delimiter`&&l.pop(),l.length&&=(c&&o.push(c),o.push(...l),0)},f=e=>{let i=t.searchFields?.includes(`id`),a=e.name.toLowerCase(),o=t.searchFields?.filter(e=>e!==`id`).map(t=>typeof e[t]==`string`||typeof e[t]==`number`?e[t]:``).join(`☼`).toLowerCase();(i&&e.id===Number(n)||o?.includes(n)||o?.includes(r))&&(a===n||a===r?l.unshift(e):l.push(e))};for(let e of d.value)switch(e.listItemProps?.type){case`title`:u(),c=e;break;case`delimiter`:if(l.length){let t=l.length;l.at(-1)?.listItemProps?.type===`delimiter`&&t--,l[t]=e}break;default:f(e)}if(u(),o.push(...a.items.value),t.itemsChunkSize&&!a.apiRequest&&(o=o.slice(0,p.value)),t.appendSearchToResult&&s.value&&(!t.appendSearchToResultCond||t.appendSearchToResultCond(n))&&(t.appendSearchAllowDuplicate||!o.find(e=>e.name.toLowerCase()===n))){let e={id:null,name:s.value};t.appendWithoutSelect&&(e.listItemProps={closeByClick:!1}),o.push(e)}return t.multiselect&&(o=o.filter(t=>!A(e.value,t))),t.prepareItemsBeforeRender&&(o=t.prepareItemsBeforeRender(o)),o},v=n=>{n.listItemProps?.type!==`title`&&n.listItemProps?.type!==`delimiter`&&(n.id===null&&(r(`appendItem`,n),t.appendWithoutSelect)||(t.multiselect&&Array.isArray(e.value)?A(e.value,n)||(e.value=[...e.value,n]):e.value=n,setTimeout(()=>{l()})))};if(a.apiRequest){let n=[()=>t.items,a.items];t.multiselect&&n.push(e),(0,o.watch)(n,()=>{m()},{deep:2})}else(0,o.watch)(s,()=>{g()}),(0,o.watch)([e,()=>t.items,s,p],()=>{m()},{immediate:!0,deep:2}),(0,o.watch)([()=>t.items?.length??0,()=>t.items],(n,r)=>{(n[0]<r[0]||n[1]!==r[1])&&(Array.isArray(e.value)?e.value:[e.value]).forEach(e=>{e.id!==c.id&&(t.items?.find(t=>t.id===e.id)||(e.name=`--`))})});return{searchText:s,resetSearch:l,genIsShort:u,itemsForShow:f,revelItemsForShow:h,resetItemsForShow:g,selectItem:v,selectNextItem:()=>{if(Array.isArray(e.value))return;let t=f.value.filter(e=>![`title`,`delimiter`].includes(e.listItemProps?.type??``));e.value={...t[(t.findIndex(t=>t.id===e.value.id)+1)%t.length]}},deleteItemByItem:async t=>{Array.isArray(e.value)&&(e.value=e.value.filter(e=>e.id!==t.id||e.name!==t.name))}}},N={key:0,class:`top-selector2_activeItems`},P={key:1,class:`top-selector2_activeName top-ellipsis`},F={key:2,class:`top-selector2_placeholder top-ellipsis`},I={class:`top-selector2_searchWidget`},L=(0,o.defineComponent)({__name:`selector2`,props:(0,o.mergeModels)({modelValue:{},items:{default:()=>[]},itemsChunkSize:{},itemsIsLoading:{type:Boolean},title:{},disabled:{type:Boolean},icon:{},modificator:{},size:{default:`s`},isError:{type:Boolean},openByFocusInput:{type:Boolean,default:void 0},searchType:{default:`popup`},searchFields:{default:()=>[`id`,`name`]},placeholder:{},hasCloserBtn:{type:Boolean},prepareItemsBeforeRender:{},api:{},apiSetSearchParams:{},minLength:{default:0},useCache:{type:Boolean},appendSearchToResult:{type:Boolean},appendSearchAllowDuplicate:{type:Boolean},appendSearchToResultCond:{},appendWithoutSelect:{type:Boolean},multiselect:{type:Boolean},useAllItem:{type:[Boolean,String]},addChanger:{type:Boolean},buttonProps:{},selectedAsPlaceholder:{type:Boolean},openerShortcut:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:(0,o.mergeModels)([`appendItem`,`open`],[`update:modelValue`]),setup(e,{expose:t,emit:r,slots:i}){let s=e,c=(0,o.useModel)(e,`modelValue`),l=r,u=(0,o.computed)(()=>s.searchType===`inline`&&s.multiselect||s.searchType===`inline`&&n.O.state.isMobile?`popup`:s.searchType),f=D(s.api,s.apiSetSearchParams,s.minLength,s.useCache,c),p=M(c,s,l,f),m=(0,o.computed)(()=>s.buttonProps?`TopButton`:u.value===`inline`?`TopInput`:`div`),h=(0,o.ref)(null),g=(0,o.ref)(null),v=()=>h.value?.popup;f.apiRequest&&(0,o.watch)(p.searchText,()=>{f.setSearchTextAndLoad(p.searchText.value)});let y=(0,o.computed)(()=>Array.isArray(c.value)||s.multiselect||!s.selectedAsPlaceholder&&u.value!==`inline`?s.placeholder:c.value?.name||s.placeholder),b=e=>{let t=!1;switch(e.key){case`Delete`:case`Backspace`:Array.isArray(c.value)&&(e.preventDefault(),e.stopPropagation(),c.value.pop());break;case`ArrowUp`:case`ArrowRight`:case`ArrowDown`:case`ArrowLeft`:case`Enter`:case` `:t=!0;break;case`Escape`:u.value===`inline`&&p.resetSearch()}let n=e.key.length===1&&!e.ctrlKey&&!e.metaKey;(u.value===`popup`||u.value===`inline`)&&n&&(t=!0),v()?.elPopup&&(t=!1),t&&(u.value===`popup`&&(e.preventDefault(),e.stopPropagation(),n&&(p.searchText.value||(p.searchText.value=e.key))),e.currentTarget?.click())},x=e=>{e.preventDefault(),p.selectNextItem()},S=()=>{f.apiRequest&&f.setSearchTextAndLoad(p.searchText.value,!1),l(`open`)},C=()=>{p.resetItemsForShow(),u.value===`popup`&&p.searchText.value&&p.resetSearch()},w=e=>{let t=e.target;t.scrollTop/(t.scrollHeight-t.offsetHeight)>.8&&(s.api?f.load(!0):p.revelItemsForShow())};return t({getPopup:v,popupOpenerRef:g,resetCache:(e=!1)=>{f.apiRequest&&(e&&_(f.apiRequest.path),f.items.value=[],f.countLoading.value=0,f.apiRequest.params.offset=0,requestAnimationFrame(()=>{p.itemsForShow.value=[]}),v()?.elPopup&&f.setSearchTextAndLoad(p.searchText.value))},updateCacheItemById:(e,t)=>{f.apiRequest&&T(f.apiRequest.path,e,t)},deleteCacheItemById:e=>{f.apiRequest&&E(f.apiRequest.path,e)}}),(t,r)=>{let s=(0,o.resolveComponent)(`TopLoadbar`),l=(0,o.resolveDirective)(`top-focus`),_=(0,o.resolveDirective)(`top-shortcut`);return(0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(a.s),{ref_key:`popupRef`,ref:h,onOpen:r[3]||=e=>S(),onClose:r[4]||=e=>C(),onScrollContentList:r[5]||=e=>w(e),notch:!1,transitionDuration:0,openByFocusInput:u.value===`inline`&&(e.openByFocusInput??!0),disabled:u.value===`inline`&&(0,o.unref)(p).genIsShort()},(0,o.createSlots)({opener:(0,o.withCtx)(()=>[(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)(m.value),(0,o.mergeProps)({ref_key:`popupOpenerRef`,ref:g},e.buttonProps,{class:{"top-selector2":!0,"top-selector2-multiselect":e.multiselect,[`top-selector2-`+e.modificator]:!!e.modificator,"top-as-input":!e.buttonProps&&u.value!==`inline`,"top-as-selector":!0,[`top-size_`+e.size]:!0,"top-disabled":e.disabled,"top-forms-focusable":!e.disabled,"top-error":e.isError},icon:e.icon,tabindex:`0`,onKeydown:b,onBlur:r[0]||=e=>u.value===`inline`&&(0,o.unref)(p).resetSearch(),placeholder:y.value,title:e.title,captionType:u.value===`inline`&&e.title!==void 0?`top`:void 0,modelValue:(0,o.unref)(p).searchText.value,"onUpdate:modelValue":r[1]||=e=>(0,o.unref)(p).searchText.value=e}),{default:(0,o.withCtx)(()=>[e.multiselect?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,N,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(c.value,e=>((0,o.openBlock)(),(0,o.createBlock)(d,{key:e.id??void 0,id:e.id,name:e.name,onDelete:(0,o.unref)(p).deleteItemByItem},null,8,[`id`,`name`,`onDelete`]))),128))])):(0,o.createCommentVNode)(``,!0),u.value!==`inline`&&!e.multiselect?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,P,(0,o.toDisplayString)(Array.isArray(c.value)?``:c.value.name),1)):(0,o.createCommentVNode)(``,!0),e.multiselect&&!c.value.length?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,F,(0,o.toDisplayString)(y.value),1)):(0,o.createCommentVNode)(``,!0),e.addChanger&&!e.buttonProps&&!e.multiselect&&(0,o.unref)(p).itemsForShow.value.length>1&&!e.disabled?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,{key:3,class:`top-changer top-changer-selector`,"data-top-popup-disabled":`true`,onClick:x})):(0,o.createCommentVNode)(``,!0)]),_:1},16,[`class`,`icon`,`placeholder`,`title`,`captionType`,`modelValue`])),[[l,e.isError,void 0,{onupdate:!0}],[_,e.openerShortcut]])]),contentList:(0,o.withCtx)(()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)((0,o.unref)(p).itemsForShow.value,r=>((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(a.o),(0,o.mergeProps)({key:r.id??void 0,class:{"top-active":!Array.isArray(c.value)&&!e.multiselect&&c.value.id===r.id&&c.value.name===r.name,"top-selector2_item-all":r.id===(0,o.unref)(0),"top-selector2_item-new":r.id===(0,o.unref)(null)},closeByClick:!e.multiselect||(0,o.unref)(n.O).state.isMobile},{ref_for:!0},r.listItemProps,{onClick:e=>(0,o.unref)(p).selectItem(r)}),(0,o.createSlots)({default:(0,o.withCtx)(()=>[i.item?(0,o.renderSlot)(t.$slots,`item`,{item:r},void 0,void 0,0):((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:1},[(0,o.createTextVNode)((0,o.toDisplayString)(r.name),1)],64))]),_:2},[i.actions?{name:`actions`,fn:(0,o.withCtx)(()=>[(0,o.renderSlot)(t.$slots,`actions`,{item:r})]),key:`0`}:void 0]),1040,[`class`,`closeByClick`,`onClick`]))),128)),!(0,o.unref)(p).itemsForShow.value.length&&!(0,o.unref)(p).genIsShort()?((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(a.o),{key:0,type:`regular`},{default:(0,o.withCtx)(()=>[(0,o.unref)(f).isLoading.value&&!(0,o.unref)(f).countLoading.value||e.itemsIsLoading?((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(n.t),{key:0,type:`circles`})):((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:1},[(0,o.createTextVNode)((0,o.toDisplayString)(t.$i18n.Common.No_results),1)],64))]),_:1})):(0,o.createCommentVNode)(``,!0),(0,o.unref)(f).countLoading.value&&(0,o.unref)(f).isLoading.value&&u.value===`inline`?((0,o.openBlock)(),(0,o.createBlock)(s,{key:1})):(0,o.createCommentVNode)(``,!0)]),_:2},[u.value===`popup`?{name:`widget`,fn:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,I,[(0,o.withDirectives)((0,o.createVNode)((0,o.unref)(a.a),{title:`Поиск`,icon:``,modelValue:(0,o.unref)(p).searchText.value,"onUpdate:modelValue":r[2]||=e=>(0,o.unref)(p).searchText.value=e,isLoading:!!(0,o.unref)(f).countLoading.value&&(0,o.unref)(f).isLoading.value,placeholder:y.value},null,8,[`modelValue`,`isLoading`,`placeholder`]),[[l,c.value,void 0,{onupdate:!0}]]),e.hasCloserBtn&&!t.$core.state.isMobile?((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(n.h),{key:0,class:`closer`,color:`theme`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(t.$i18n.Common.Cancel),1)]),_:1})):(0,o.createCommentVNode)(``,!0)])]),key:`0`}:void 0]),1032,[`openByFocusInput`,`disabled`])}}}),R={class:`top-editArea_footer`},z=(0,o.defineComponent)({__name:`editArea`,props:{defaultValue:{default:``},title:{},cancelText:{default:`Cancel`},submitText:{default:`Send`},closeText:{default:`Close`},isFocused:{type:Boolean},forceShowCloseBtn:{type:Boolean},attachToKeyboard:{type:Boolean},modelValue:{},name:{},placeholder:{},styling:{},rows:{},minHeight:{},expandable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},isError:{type:Boolean},hint:{},maxLength:{}},emits:[`submit`,`close`,`clickOnTitle`],setup(e,{emit:t,slots:r}){let i=e,a=t,s=(0,o.ref)(i.defaultValue),c=(0,o.ref)(i.isFocused),l=(0,o.computed)(()=>s.value!==i.defaultValue),u=e=>{a(`submit`,e),s.value=i.defaultValue},d=()=>{if(i.forceShowCloseBtn&&!l.value){a(`close`);return}s.value=i.defaultValue},f=()=>{i.attachToKeyboard&&a(`clickOnTitle`)};return(t,i)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{class:(0,o.normalizeClass)({"top-editArea":!0,"top-editArea-attachedToKeyboard":e.attachToKeyboard})},[e.title||r.caption?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:0,class:`top-editArea_caption`,onClick:i[0]||=e=>f()},[(0,o.renderSlot)(t.$slots,`caption`,{},()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.title),1)])])):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`div`,{class:(0,o.normalizeClass)({"top-editArea_form":!0,"top-forms-focusable":!0,"top-as-input":!0,"top-error":e.isError,"top-focus":c.value})},[(0,o.createVNode)(n.r,{modelValue:s.value,"onUpdate:modelValue":i[1]||=e=>s.value=e,name:e.name,placeholder:e.placeholder,rows:e.rows,minHeight:e.minHeight,expandable:e.expandable,disabled:e.disabled,readonly:e.readonly,isError:e.isError,hint:e.hint,class:`top-editArea_element`,onFocus:i[2]||=()=>c.value=!0,onBlur:i[3]||=()=>c.value=!1,onKeyup:[(0,o.withKeys)(d,[`esc`]),i[4]||=(0,o.withKeys)((0,o.withModifiers)(e=>u(s.value),[`ctrl`]),[`enter`])]},null,8,[`modelValue`,`name`,`placeholder`,`rows`,`minHeight`,`expandable`,`disabled`,`readonly`,`isError`,`hint`]),(0,o.createElementVNode)(`div`,R,[l.value||e.forceShowCloseBtn?((0,o.openBlock)(),(0,o.createBlock)(n.h,{key:0,icon:t.$core.state.isMobile?``:``,class:`top-editArea_button`,color:`theme`,styling:`soft`,onClick:d},(0,o.createSlots)({_:2},[t.$core.state.isMobile?void 0:{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.cancelText),1)]),key:`0`}]),1032,[`icon`])):(0,o.createCommentVNode)(``,!0),l.value?((0,o.openBlock)(),(0,o.createBlock)(n.h,{key:1,class:`top-editArea_button`,icon:t.$core.state.isMobile?``:``,onClick:i[5]||=e=>u(s.value)},(0,o.createSlots)({_:2},[t.$core.state.isMobile?void 0:{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.submitText),1)]),key:`0`}]),1032,[`icon`])):(0,o.createCommentVNode)(``,!0)])],2)],2))}}),B={class:`top-editInput`},V=(0,o.defineComponent)({__name:`editInput`,props:{modelValue:{},alwaysShowSubmitBtn:{type:Boolean},input:{},button:{}},emits:[`update:modelValue`],setup(e,{emit:t,slots:r}){let i=e,a=(0,o.ref)(i.modelValue);(0,o.watch)(()=>i.modelValue,()=>{a.value=i.modelValue});let s=t,c=()=>{s(`update:modelValue`,a.value)};return(t,i)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,B,[(0,o.createVNode)(n.c,(0,o.mergeProps)(e.input,{onKeydownCapture:i[0]||=(0,o.withKeys)((0,o.withModifiers)(t=>a.value=e.modelValue,[`stop`]),[`esc`]),onKeydown:(0,o.withKeys)((0,o.withModifiers)(c,[`stop`]),[`enter`]),modelValue:a.value,"onUpdate:modelValue":i[1]||=e=>a.value=e}),(0,o.createSlots)({_:2},[r.caption?{name:`caption`,fn:(0,o.withCtx)(()=>[(0,o.renderSlot)(t.$slots,`caption`)]),key:`0`}:void 0]),1040,[`onKeydown`,`modelValue`]),a.value!==e.modelValue||e.alwaysShowSubmitBtn?((0,o.openBlock)(),(0,o.createBlock)(n.h,(0,o.mergeProps)({key:0,icon:``,styling:`soft`},e.button,{onClick:c}),null,16)):(0,o.createCommentVNode)(``,!0)]))}}),H=(0,o.defineComponent)({__name:`optionGroup`,props:(0,o.mergeModels)({modelValue:{},items:{},size:{default:`s`},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,o.useModel)(e,`modelValue`),r=e,i=(0,o.ref)(null);(0,o.watch)(t,()=>{let e=r.items.map(e=>e.value);Array.isArray(t.value)?t.value.find(t=>!e.includes(t))&&(t.value=t.value.filter(t=>e.includes(t))):e.includes(t.value)||(t.value=e[0]??``),i.value?.querySelector(`.radioGroup_item-selected`)?.scrollIntoView()},{immediate:!0});let a=`optionGroup-`+Math.random();return(r,s)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{ref_key:`elRef`,ref:i,class:(0,o.normalizeClass)({"top-optionGroup":!0,[`top-optionGroup-showIndicator_`+Number(e.showIndicator)]:!0,"top-scrollBarXHidding":!0,[`top-size_`+e.size]:!!e.size,"top-error":e.isError})},[Array.isArray(t.value)?((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,{key:0},(0,o.renderList)(e.items,r=>((0,o.openBlock)(),(0,o.createBlock)(n.f,{class:(0,o.normalizeClass)({"top-optionGroup_item-selected":t.value.includes(r.value),"top-optionGroup_item":!0}),modelValue:t.value,"onUpdate:modelValue":s[0]||=e=>t.value=e,value:r.value,title:r.title,disabled:r.disabled,isError:e.isError,"data-top-icon":r.icon},(0,o.createSlots)({_:2},[r.label?{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(r.label),1)]),key:`0`}:void 0]),1032,[`class`,`modelValue`,`value`,`title`,`disabled`,`isError`,`data-top-icon`]))),256)):((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,{key:1},(0,o.renderList)(e.items,r=>((0,o.openBlock)(),(0,o.createBlock)(n.a,{class:(0,o.normalizeClass)({"top-optionGroup_item-selected":r.value===t.value,"top-optionGroup_item":!0}),modelValue:t.value,"onUpdate:modelValue":s[1]||=e=>t.value=e,name:a,value:r.value,title:r.title,disabled:r.disabled,isError:e.isError,"data-top-icon":r.icon},(0,o.createSlots)({_:2},[r.label?{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(r.label),1)]),key:`0`}:void 0]),1032,[`class`,`modelValue`,`value`,`title`,`disabled`,`isError`,`data-top-icon`]))),256))],2))}}),U=(0,o.defineComponent)({__name:`radioGroup`,props:(0,o.mergeModels)({modelValue:{},items:{},size:{},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=(0,o.useModel)(e,`modelValue`);return(e,r)=>((0,o.openBlock)(),(0,o.createBlock)(H,{class:`top-radioGroup`,modelValue:n.value,"onUpdate:modelValue":r[0]||=e=>n.value=e,items:t.items,size:t.size,showIndicator:t.showIndicator,isError:t.isError},{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(e.$slots,`default`)]),_:3},8,[`modelValue`,`items`,`size`,`showIndicator`,`isError`]))}}),W=(0,o.defineComponent)({__name:`checkboxGroup`,props:(0,o.mergeModels)({modelValue:{},items:{},size:{},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=(0,o.useModel)(e,`modelValue`);return(e,r)=>((0,o.openBlock)(),(0,o.createBlock)(H,{class:`top-checkboxGroup`,modelValue:n.value,"onUpdate:modelValue":r[0]||=e=>n.value=e,items:t.items,size:t.size,showIndicator:t.showIndicator,isError:t.isError},{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(e.$slots,`default`)]),_:3},8,[`modelValue`,`items`,`size`,`showIndicator`,`isError`]))}}),G=[`data-top-icon`],K={class:`top-info_text`},q={key:0,class:`top-info_value`},J=(0,o.defineComponent)({__name:`info`,props:{icon:{},styling:{default:`default`},size:{default:`default`}},setup(e,{slots:t}){return(n,r)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{class:(0,o.normalizeClass)({"top-info":!0,[`top-size_`+e.size]:!0,[`top-info-styling_`+e.styling]:!0}),"data-top-icon":e.icon},[(0,o.createElementVNode)(`div`,K,[(0,o.renderSlot)(n.$slots,`default`)]),t.additional?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,q,[(0,o.renderSlot)(n.$slots,`additional`)])):(0,o.createCommentVNode)(``,!0)],10,G))}}),Y={key:0,class:`top-policy`},X={class:`top-policy_title`},Z=[`innerHTML`],Q=(0,o.defineComponent)({__name:`policy`,props:{title:{},description:{},acceptText:{}},emits:[`accept`],setup(e,{emit:t}){let r=t,i=(0,o.ref)(!0),a=()=>{i.value=!1,r(`accept`)};return(t,r)=>i.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,Y,[(0,o.createElementVNode)(`div`,X,(0,o.toDisplayString)(e.title),1),(0,o.createElementVNode)(`div`,{class:`top-policy_description`,innerHTML:e.description},null,8,Z),(0,o.createVNode)((0,o.unref)(n.h),{size:`m`,onClick:a},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.acceptText),1)]),_:1})])):(0,o.createCommentVNode)(``,!0)}}),$={key:0,class:`top-banner`},ee={class:`top-banner_wrapper`},te={class:`top-banner_content`},ne={class:`top-banner_contentText`},re=(0,o.defineComponent)({__name:`banner`,props:{showCloseButton:{type:Boolean,default:!0},buttonProps:{}},emits:[`close`],setup(e,{emit:t}){let r=t,i=(0,o.ref)(!0),a=()=>{i.value=!1},s=e=>{e instanceof HTMLElement&&(e.style.height=`${e.offsetHeight}px`,requestAnimationFrame(()=>{e.style.height=`0px`,e.style.paddingTop=`0px`,e.style.paddingBottom=`0px`}))},c=()=>{r(`close`)};return(t,r)=>((0,o.openBlock)(),(0,o.createBlock)(o.Transition,{onBeforeLeave:s,onAfterLeave:c},{default:(0,o.withCtx)(()=>[i.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,$,[(0,o.createElementVNode)(`div`,ee,[(0,o.createElementVNode)(`div`,te,[(0,o.createElementVNode)(`span`,ne,[(0,o.renderSlot)(t.$slots,`default`)]),e.buttonProps?((0,o.openBlock)(),(0,o.createBlock)(n.h,(0,o.normalizeProps)((0,o.mergeProps)({key:0},e.buttonProps)),{default:(0,o.withCtx)(()=>[e.buttonProps.default?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:0},[(0,o.createTextVNode)((0,o.toDisplayString)(e.buttonProps.default),1)],64)):(0,o.createCommentVNode)(``,!0)]),_:1},16)):(0,o.createCommentVNode)(``,!0)]),e.showCloseButton?((0,o.openBlock)(),(0,o.createBlock)(n.h,{key:0,class:`top-banner_closeButton`,color:`theme`,icon:``,title:t.$i18n.Common.Close,onClick:a},null,8,[`title`])):(0,o.createCommentVNode)(``,!0)])])):(0,o.createCommentVNode)(``,!0)]),_:3}))}});t.p=l,t.f=_,t.l=O,t.u=k,t.d=j,t.c=L,t.s=z,t.o=V,t.a=U,t.i=W,t.r=J,t.n=Q,t.t=re});
2
- //# sourceMappingURL=formsExt-BD8Sap5u.es.amd.js.map