@topvisor/ui 1.3.1-utils.0 → 1.3.1

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 (113) hide show
  1. package/.chunks/{core-CY6RkZz2.es.js → core-Cmk3j1ll.es.js} +4 -4
  2. package/.chunks/{core-CY6RkZz2.es.js.map → core-Cmk3j1ll.es.js.map} +1 -1
  3. package/.chunks/{core-CXqQSo9c.amd.js → core-DWQI6OYD.amd.js} +2 -2
  4. package/.chunks/{core-CXqQSo9c.amd.js.map → core-DWQI6OYD.amd.js.map} +1 -1
  5. package/.chunks/{datepicker-DUoArkDy.amd.js → datepicker-BgLipRW7.amd.js} +2 -2
  6. package/.chunks/{datepicker-DUoArkDy.amd.js.map → datepicker-BgLipRW7.amd.js.map} +1 -1
  7. package/.chunks/{datepicker-BiaXdEIn.es.js → datepicker-Dfl91fRZ.es.js} +2 -2
  8. package/.chunks/{datepicker-BiaXdEIn.es.js.map → datepicker-Dfl91fRZ.es.js.map} +1 -1
  9. package/.chunks/{dialog_selectorRegions-CPRVbPAk.amd.js → dialog_selectorRegions-JEsqs4cv.amd.js} +2 -2
  10. package/.chunks/{dialog_selectorRegions-CPRVbPAk.amd.js.map → dialog_selectorRegions-JEsqs4cv.amd.js.map} +1 -1
  11. package/.chunks/{dialog_selectorRegions-Zlm6K2mk.es.js → dialog_selectorRegions-eFMZwckA.es.js} +4 -4
  12. package/.chunks/{dialog_selectorRegions-Zlm6K2mk.es.js.map → dialog_selectorRegions-eFMZwckA.es.js.map} +1 -1
  13. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-CLahwA6M.es.js → dialogs.vue_vue_type_script_setup_true_lang-CuRb6ess.es.js} +15 -13
  14. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CuRb6ess.es.js.map +1 -0
  15. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DJoFuqCw.amd.js +2 -0
  16. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-DJoFuqCw.amd.js.map +1 -0
  17. package/.chunks/{forms-DarRVke_.es.js → forms-BWoAyEVH.es.js} +5 -5
  18. package/.chunks/{forms-DarRVke_.es.js.map → forms-BWoAyEVH.es.js.map} +1 -1
  19. package/.chunks/{forms-CgtkdwgA.amd.js → forms-BfDSGwrU.amd.js} +3 -3
  20. package/.chunks/{forms-CgtkdwgA.amd.js.map → forms-BfDSGwrU.amd.js.map} +1 -1
  21. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-DzJ_pc-d.es.js → listItem.vue_vue_type_script_setup_true_lang-Dljef_xa.es.js} +2 -2
  22. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-DzJ_pc-d.es.js.map → listItem.vue_vue_type_script_setup_true_lang-Dljef_xa.es.js.map} +1 -1
  23. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CT-EXxJj.amd.js → listItem.vue_vue_type_script_setup_true_lang-R7J0Cawj.amd.js} +2 -2
  24. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CT-EXxJj.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-R7J0Cawj.amd.js.map} +1 -1
  25. package/.chunks/{menu.vue_vue_type_style_index_0_lang-COD_4iTy.es.js → menu.vue_vue_type_style_index_0_lang-HDPVVgzy.es.js} +2 -2
  26. package/.chunks/{menu.vue_vue_type_style_index_0_lang-COD_4iTy.es.js.map → menu.vue_vue_type_style_index_0_lang-HDPVVgzy.es.js.map} +1 -1
  27. package/.chunks/{menu.vue_vue_type_style_index_0_lang-BLMYjYLV.amd.js → menu.vue_vue_type_style_index_0_lang-JZ-QwyLO.amd.js} +2 -2
  28. package/.chunks/{menu.vue_vue_type_style_index_0_lang-BLMYjYLV.amd.js.map → menu.vue_vue_type_style_index_0_lang-JZ-QwyLO.amd.js.map} +1 -1
  29. package/.chunks/notice-DAcU_6aT.amd.js +4 -0
  30. package/.chunks/notice-DAcU_6aT.amd.js.map +1 -0
  31. package/.chunks/notice-DYd206Yd.es.js +192 -0
  32. package/.chunks/notice-DYd206Yd.es.js.map +1 -0
  33. package/.chunks/{page.vue_vue_type_script_setup_true_lang-BS0aEP4i.es.js → page.vue_vue_type_script_setup_true_lang-CFR_XnIk.es.js} +4 -4
  34. package/.chunks/{page.vue_vue_type_script_setup_true_lang-BS0aEP4i.es.js.map → page.vue_vue_type_script_setup_true_lang-CFR_XnIk.es.js.map} +1 -1
  35. package/.chunks/{page.vue_vue_type_script_setup_true_lang-DLebrPmi.amd.js → page.vue_vue_type_script_setup_true_lang-Cy3k9hJN.amd.js} +2 -2
  36. package/.chunks/{page.vue_vue_type_script_setup_true_lang-DLebrPmi.amd.js.map → page.vue_vue_type_script_setup_true_lang-Cy3k9hJN.amd.js.map} +1 -1
  37. package/.chunks/{popup-AG94kehM.es.js → popup-1pqtx_O5.es.js} +2 -2
  38. package/.chunks/{popup-AG94kehM.es.js.map → popup-1pqtx_O5.es.js.map} +1 -1
  39. package/.chunks/{popup-CtvJLWn3.amd.js → popup-JuvnpqC-.amd.js} +2 -2
  40. package/.chunks/{popup-CtvJLWn3.amd.js.map → popup-JuvnpqC-.amd.js.map} +1 -1
  41. package/.chunks/{utils-D9D3zzjc.amd.js → utils-7_bMpPkj.amd.js} +2 -2
  42. package/.chunks/{utils-D9D3zzjc.amd.js.map → utils-7_bMpPkj.amd.js.map} +1 -1
  43. package/.chunks/{utils-3M9LC_L_.es.js → utils-CdePhhIZ.es.js} +2 -2
  44. package/.chunks/{utils-3M9LC_L_.es.js.map → utils-CdePhhIZ.es.js.map} +1 -1
  45. package/.chunks/{utils-BitKP31L.es.js → utils-DOkSnf59.es.js} +24 -22
  46. package/.chunks/utils-DOkSnf59.es.js.map +1 -0
  47. package/.chunks/utils-_O-2Zobt.amd.js +2 -0
  48. package/.chunks/utils-_O-2Zobt.amd.js.map +1 -0
  49. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-xwjgBq1L.es.js → widgetInput.vue_vue_type_script_setup_true_lang-Cr_jgOW4.es.js} +2 -2
  50. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-xwjgBq1L.es.js.map → widgetInput.vue_vue_type_script_setup_true_lang-Cr_jgOW4.es.js.map} +1 -1
  51. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-BK-pTu3V.amd.js → widgetInput.vue_vue_type_script_setup_true_lang-DVHWVUQM.amd.js} +2 -2
  52. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-BK-pTu3V.amd.js.map → widgetInput.vue_vue_type_script_setup_true_lang-DVHWVUQM.amd.js.map} +1 -1
  53. package/assets/formsExt.css +1 -1
  54. package/assets/notice.css +1 -1
  55. package/charts/charts.amd.js +1 -1
  56. package/charts/charts.js +1 -1
  57. package/core/app.amd.js +1 -1
  58. package/core/app.js +5 -5
  59. package/dialog/dialog.amd.js +1 -1
  60. package/dialog/dialog.js +2 -2
  61. package/forms/forms.amd.js +1 -1
  62. package/forms/forms.js +1 -1
  63. package/formsExt/formsExt.amd.js +1 -1
  64. package/formsExt/formsExt.amd.js.map +1 -1
  65. package/formsExt/formsExt.js +384 -363
  66. package/formsExt/formsExt.js.map +1 -1
  67. package/layout/layout.amd.js +1 -1
  68. package/layout/layout.js +1 -1
  69. package/package.json +1 -1
  70. package/popup/popup.amd.js +1 -1
  71. package/popup/popup.js +4 -4
  72. package/popup/worker.amd.js +1 -1
  73. package/popup/worker.js +2 -2
  74. package/project/project.amd.js +1 -1
  75. package/project/project.js +5 -5
  76. package/src/components/core/notice/item/types.d.ts +6 -0
  77. package/src/components/core/notice/utils.d.ts +1 -0
  78. package/src/components/forms/checkbox/checkbox.vue.d.ts +2 -2
  79. package/src/components/forms/checkbox/types.d.ts +4 -3
  80. package/src/components/formsExt/checkboxGroup/checkboxGroup.vue.d.ts +18 -7
  81. package/src/components/formsExt/checkboxGroup/types.d.ts +4 -18
  82. package/src/components/formsExt/libs/optionGroup/optionGroup.vue.d.ts +16 -0
  83. package/src/components/formsExt/libs/optionGroup/types.d.ts +18 -0
  84. package/src/components/formsExt/radioGroup/radioGroup.vue.d.ts +18 -7
  85. package/src/components/formsExt/radioGroup/types.d.ts +4 -20
  86. package/tabsView/tabsView.amd.js +1 -1
  87. package/tabsView/tabsView.js +2 -2
  88. package/utils/clipboard.amd.js +1 -1
  89. package/utils/clipboard.amd.js.map +1 -1
  90. package/utils/clipboard.js +1 -1
  91. package/utils/clipboard.js.map +1 -1
  92. package/utils/date.amd.js +1 -1
  93. package/utils/date.js +1 -1
  94. package/utils/device.amd.js +1 -1
  95. package/utils/device.js +1 -1
  96. package/utils/lodash.amd.js +1 -1
  97. package/utils/lodash.js +1 -1
  98. package/utils/price.amd.js +1 -1
  99. package/utils/price.js +1 -1
  100. package/utils/searchers.amd.js +1 -1
  101. package/utils/searchers.js +3 -3
  102. package/utils/string.amd.js +1 -1
  103. package/utils/string.js +1 -1
  104. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-CLahwA6M.es.js.map +0 -1
  105. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-D8NggYHD.amd.js +0 -2
  106. package/.chunks/dialogs.vue_vue_type_script_setup_true_lang-D8NggYHD.amd.js.map +0 -1
  107. package/.chunks/notice-CPtAnc7p.amd.js +0 -4
  108. package/.chunks/notice-CPtAnc7p.amd.js.map +0 -1
  109. package/.chunks/notice-fno9saBY.es.js +0 -175
  110. package/.chunks/notice-fno9saBY.es.js.map +0 -1
  111. package/.chunks/utils-BitKP31L.es.js.map +0 -1
  112. package/.chunks/utils-DcP4RFmH.amd.js +0 -2
  113. package/.chunks/utils-DcP4RFmH.amd.js.map +0 -1
@@ -37,6 +37,12 @@ export type Props = {
37
37
  buttonProps?: TopButtonProps & {
38
38
  default: string;
39
39
  };
40
+ /**
41
+ * Произвольные props для вывода кнопок
42
+ */
43
+ buttonsProps?: Array<TopButtonProps & {
44
+ default: string;
45
+ }>;
40
46
  isSafeHTML?: boolean;
41
47
  /**
42
48
  * Установить стиль выделения сообщения
@@ -9,6 +9,7 @@ export type Options = {
9
9
  title?: ItemProps['title'];
10
10
  metaText?: ItemProps['metaText'];
11
11
  buttonProps?: ItemProps['buttonProps'];
12
+ buttonsProps?: ItemProps['buttonsProps'];
12
13
  isSafeHTML?: ItemProps['isSafeHTML'];
13
14
  selectToClose?: ItemProps['selectToClose'];
14
15
  onClose?: Function;
@@ -14,9 +14,9 @@ declare function __VLS_template(): {
14
14
  };
15
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
16
  declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
17
- "update:modelValue": (value: boolean | number[] | string[] | Set<string> | Set<number> | undefined) => any;
17
+ "update:modelValue": (value: boolean | Set<string | number> | (string | number)[] | undefined) => any;
18
18
  }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
- "onUpdate:modelValue"?: ((value: boolean | number[] | string[] | Set<string> | Set<number> | undefined) => any) | undefined;
19
+ "onUpdate:modelValue"?: ((value: boolean | Set<string | number> | (string | number)[] | undefined) => any) | undefined;
20
20
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLLabelElement>;
21
21
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
22
  export default _default;
@@ -1,4 +1,5 @@
1
- type ModelValue = boolean | number[] | string[] | Set<number> | Set<string> | undefined;
1
+ type Model = boolean | BaseModel[] | Set<BaseModel> | undefined;
2
+ type BaseModel = number | string;
2
3
  export interface Props {
3
4
  /**
4
5
  * Может быть одного из типов:
@@ -10,9 +11,9 @@ export interface Props {
10
11
  *
11
12
  * [подробнее](https://vuejs.org/guide/essentials/forms.html#checkbox)
12
13
  */
13
- modelValue: ModelValue;
14
+ modelValue: Model;
14
15
  name?: string;
15
- value?: string;
16
+ value?: number | string;
16
17
  description?: string;
17
18
  disabled?: boolean;
18
19
  indeterminate?: boolean;
@@ -1,16 +1,27 @@
1
- import { Props, Style } from './types';
1
+ import { Props } from './types';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
- import { Size } from '../radioGroup/types';
4
3
  type __VLS_Props = Props;
5
4
  type __VLS_PublicProps = {
6
5
  modelValue: Props['modelValue'];
7
6
  } & __VLS_Props;
8
- declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {}): any;
11
+ };
12
+ refs: {};
13
+ rootEl: HTMLDivElement;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
9
17
  "update:modelValue": (value: (string | number)[]) => any;
10
18
  }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
19
  "onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
12
- }>, {
13
- size: Size;
14
- styling: Style;
15
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
20
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
21
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
22
  export default _default;
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -1,19 +1,5 @@
1
- import { Size } from '../../forms/helpers';
2
- export interface Item {
3
- id: string | number;
4
- title: string;
5
- icon?: string;
6
- disabled?: boolean;
1
+ import { Item, Props as PropsOption, Size } from '../libs/optionGroup/types';
2
+ export interface Props extends PropsOption {
3
+ modelValue: Item['value'][];
7
4
  }
8
- export interface Props {
9
- modelValue: Item['id'][];
10
- items: Item[];
11
- size?: Size;
12
- styling?: Style;
13
- isError?: boolean;
14
- }
15
- export declare const styling: {
16
- readonly outline: "outline";
17
- readonly borderless: "borderless";
18
- };
19
- export type Style = typeof styling[keyof typeof styling];
5
+ export type { Item, Size, };
@@ -0,0 +1,16 @@
1
+ import { Props, Size } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = Props;
4
+ type __VLS_PublicProps = {
5
+ modelValue: Props['modelValue'];
6
+ } & __VLS_Props;
7
+ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
8
+ "update:modelValue": (value: string | number | (string | number)[]) => any;
9
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
10
+ "onUpdate:modelValue"?: ((value: string | number | (string | number)[]) => any) | undefined;
11
+ }>, {
12
+ size: Size;
13
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
14
+ elRef: HTMLDivElement;
15
+ }, HTMLDivElement>;
16
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { Size } from '../../../forms/helpers';
2
+ export interface Props {
3
+ /**
4
+ * test
5
+ */
6
+ modelValue: Item['value'] | Item['value'][];
7
+ items: Item[];
8
+ size?: Size;
9
+ showIndicator?: boolean;
10
+ isError?: boolean;
11
+ }
12
+ export interface Item {
13
+ value: number | string;
14
+ title: string;
15
+ icon?: string;
16
+ disabled?: boolean;
17
+ }
18
+ export type { Size };
@@ -1,16 +1,27 @@
1
- import { Props, Size } from './types';
1
+ import { Props } from './types';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  type __VLS_Props = Props;
4
4
  type __VLS_PublicProps = {
5
5
  modelValue: Props['modelValue'];
6
6
  } & __VLS_Props;
7
- declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {}): any;
11
+ };
12
+ refs: {};
13
+ rootEl: HTMLDivElement;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
8
17
  "update:modelValue": (value: string | number) => any;
9
18
  }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
10
19
  "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
11
- }>, {
12
- size: Size;
13
- }, {}, {}, {}, string, ComponentProvideOptions, false, {
14
- elRef: HTMLDivElement;
15
- }, HTMLDivElement>;
20
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
21
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
22
  export default _default;
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -1,21 +1,5 @@
1
- import { Size } from '../../forms/helpers';
2
- export interface Props {
3
- modelValue: number | string;
4
- /**
5
- * Массив props для вставки radioGroupItem
6
- */
7
- radiosProps?: ItemProps[];
8
- showIndicator?: boolean;
9
- size?: Size;
10
- isError?: boolean;
1
+ import { Item, Props as PropsOption, Size } from '../libs/optionGroup/types';
2
+ export interface Props extends PropsOption {
3
+ modelValue: Item['value'];
11
4
  }
12
- export interface Emits {
13
- (e: 'update:modelValue', value: Props['modelValue']): void;
14
- }
15
- export interface ItemProps {
16
- value: Props['modelValue'];
17
- title: string;
18
- icon?: string;
19
- disabled?: boolean;
20
- }
21
- export type { Size };
5
+ export type { Item, Size, };
@@ -1,2 +1,2 @@
1
- define(["require","exports","vue","../.chunks/forms-CgtkdwgA.amd","../utils/route.amd","../.chunks/store-YRW59xEF.amd","../.chunks/listItem.vue_vue_type_script_setup_true_lang-CT-EXxJj.amd","../.chunks/widgetInput.vue_vue_type_style_index_0_lang-Cce9ZdtW.amd","../utils/system.amd","../require/css.amd!../assets/tabsView.css"],(function(J,h,e,m,f,g,_,G,L){"use strict";if(typeof e>"u")var e=window.Vue;const y=(o,n)=>`top:${String(o)}:${n}`,b={loadLocalStorge:(o,n)=>{if(!n.$id)return;const t=y(o,n.$id);try{const a=JSON.parse(localStorage.getItem(t));typeof a==typeof n[o]&&(n[o]=a)}catch{console.warn(new Error(`В localStorage[${t}] не корректный json`))}},addSaverLocalStorge:(o,n)=>{if(!n.$id)return;const t=y(o,n.$id);e.watch(()=>n[o],()=>{localStorage.setItem(t,JSON.stringify(n[o]))},{immediate:!0})}},k=new Set;addEventListener("popstate",o=>{k.forEach(n=>n(o))});const V=Symbol(),E=(o,n)=>{const t=g.defineStore(V,()=>{const a=e.computed(()=>o.showMenuInPopup??m.Core.state.isMobile),i=e.computed(()=>o.pageMod),u=e.ref(!1),r=e.ref(void 0),l=e.ref(!0);return{showMenuInPopup:a,pageMod:i,isShort:u,activeItemName:n,component:r,scrollable:l}},o.idState);if(o.isShortable){const a="isShort";b.loadLocalStorge(a,t),b.addSaverLocalStorge(a,t)}if(t.$id){const a=i=>{n.value=f.getHash(t.$id)};k.add(a)}return t},S=()=>g.useStore(V),P={key:1,class:"top-ellipsis"},v=e.defineComponent({__name:"menuItem",props:{name:{},href:{},icon:{},disabled:{type:Boolean},component:{default:void 0},scrollable:{type:Boolean,default:!0}},setup(o){const n=o,t=S(),a=e.computed(()=>n.name&&t.$id?f.genHash(t.$id,n.name):n.href),i=e.computed(()=>t.showMenuInPopup?_._sfc_main$2:a?"a":"button"),u=r=>{!n.href&&a.value&&r.preventDefault(),n.name&&(t.activeItemName=n.name)};return(r,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{target:"_self",class:e.normalizeClass({"top-tabsView_menuItem":!e.unref(t).showMenuInPopup,"top-active":r.name&&e.unref(t).activeItemName===r.name,"top-disabled":r.disabled,"top-spa-disabled":!0}),href:a.value,"data-top-icon":r.icon||void 0,disabled:r.disabled||void 0,onClick:u},{default:e.withCtx(()=>[e.unref(t).showMenuInPopup?e.renderSlot(r.$slots,"default",{key:0}):r.$slots.default&&!e.unref(t).isShort?(e.openBlock(),e.createElementBlock("span",P,[e.renderSlot(r.$slots,"default")])):e.createCommentVNode("",!0)]),_:3},8,["class","href","data-top-icon","disabled"]))}}),B=o=>(o==null?void 0:o.name)==="AsyncComponentWrapper"&&!(o!=null&&o.__asyncResolved),T=async(o,n)=>{(o==null?void 0:o.name)==="AsyncComponentWrapper"&&(o!=null&&o.__asyncResolved||(o.__asyncLoader(),await L.sleepWhile(()=>n()&&B(o),200)))},z={class:"top-tabsView_menuOpener"},R=["data-top-icon"],O={class:"top-ellipsis"},D={class:"top-tabsView_menuList"},H={key:0,class:"top-tabsView_menuFooter"},K=e.defineComponent({__name:"menu",props:e.mergeModels({isShortable:{type:Boolean},isLoading:{type:Boolean}},{isLoading:{},isLoadingModifiers:{}}),emits:["update:isLoading"],setup(o){const n=e.useModel(o,"isLoading"),t=S(),a=e.useSlots(),i=new Map,u=()=>{if(!a.default)return;const c=a.default({}).find(s=>s.key==="_menu");c&&r(c.children)},r=c=>{c.forEach(s=>{var M,$,N,C;if(s.type.__name&&s.type.__name!==v.__name)return;if(!s.type.__name&&typeof s.children=="object"){r(s.children);return}if(!((M=s.props)!=null&&M.name)||($=s.props)!=null&&$.disabled)return;const I={title:((C=(N=s.children).default)==null?void 0:C.call(N)[0].children).trim(),icon:s.props.icon,component:s.props.component?e.markRaw(s.props.component):v.props.component.default,scrollable:s.props.scrollable??v.props.scrollable.default};i.set(s.props.name,I)})},l=e.ref(null);let d=0;e.watch(()=>t.activeItemName,async()=>{const c=++d;if(i.size===0&&u(),i.size===0){t.activeItemName="";return}if(l.value=i.get(t.activeItemName)??null,!l.value&&t.$id){const s=f.getHash(t.$id);if(l.value=i.get(s)??null,l.value){t.activeItemName=s;return}}if(!l.value){t.activeItemName=i.keys().next().value;return}if(l.value.component===t.component){n.value=!1;return}t.$id&&f.setHash(t.$id,t.activeItemName,!1),n.value=!0,await T(l.value.component,()=>c===d),c===d&&(t.scrollable=l.value.scrollable,t.component=l.value.component,l.value&&!t.component&&console.warn(`Компонент вкладки ${t.activeItemName} не найден. Добавьте props.component для пункта меню ${t.activeItemName}.`))},{immediate:!0});const p=e.ref();let w;return e.onMounted(()=>{w=new ResizeObserver(()=>{p.value.parentElement.style.setProperty("--top-tabsView-contents-offset-top",p.value.offsetHeight+"px")}),w.observe(p.value)}),e.onUnmounted(()=>{w.disconnect()}),(c,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elRef",ref:p,class:e.normalizeClass({"top-tabsView_menu":!0,"top-tabsView_menu-inPopup_0":!e.unref(t).showMenuInPopup,"top-tabsView_menu-inPopup_1":e.unref(t).showMenuInPopup,"top-tabsView_menu-short":e.unref(t).isShort&&!e.unref(t).showMenuInPopup})},[e.unref(t).showMenuInPopup?(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{key:0},{opener:e.withCtx(()=>[e.createElementVNode("div",z,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-tabsView_menuOpenerActiveItem","data-top-icon":l.value.icon},[e.createElementVNode("span",O,e.toDisplayString(l.value.title),1)],8,R)):e.createCommentVNode("",!0),s[1]||(s[1]=e.createElementVNode("div",{class:"top-tabsView_menuOpenerIcon","data-top-icon":""},null,-1))])]),contentList:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",D,[e.renderSlot(c.$slots,"default")]),c.isShortable?(e.openBlock(),e.createElementBlock("div",H,[c.isShortable?(e.openBlock(),e.createBlock(v,{key:0,icon:e.unref(t).isShort?"":"",onClick:s[0]||(s[0]=I=>e.unref(t).isShort=!e.unref(t).isShort)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t).isShort?"":"Свернуть"),1)]),_:1},8,["icon"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))],2))}}),j=e.defineComponent({__name:"tabsView",props:e.mergeModels({modelValue:{},pageMod:{type:Boolean},showMenuInPopup:{type:Boolean,default:void 0},isShortable:{type:Boolean,default:!1},idState:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const n=o,t=e.useModel(o,"modelValue"),a=E(n,t),i=Math.random();n.pageMod&&m.Core.state.documentClassModificators.set(i,"top-hasTabsViewPageMod"),e.onUnmounted(()=>{n.pageMod&&m.Core.state.documentClassModificators.delete(i),a.$id&&f.delHash(a.$id,a.activeItemName,!0)});const u=e.ref(),r=e.ref(!1);return e.watch([u,()=>a.component],()=>{r.value=B(a.component)},{immediate:!0}),(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-tabsView":!0,"top-tabsView-pageMod":n.pageMod,"top-tabsView-inPopup":e.unref(a).showMenuInPopup})},[e.createVNode(K,{isShortable:l.isShortable,isLoading:r.value,"onUpdate:isLoading":d[0]||(d[0]=p=>r.value=p)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"menu")]),_:3},8,["isShortable","isLoading"]),e.createElementVNode("div",{class:e.normalizeClass({"top-tabsView_contents":!0,"top-tabsView_contents-isLoading":r.value,"top-tabsView_contents-noScrollable":!e.unref(a).scrollable})},[r.value?(e.openBlock(),e.createBlock(m.TopLoadbar,{key:0})):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a).component),{ref_key:"componentRef",ref:u},null,512))],1024))],2)],2))}}),A={},q={class:"top-tabsView_menuDelimeter"};function F(o,n){return e.openBlock(),e.createElementBlock("div",q)}const U=m._export_sfc(A,[["render",F]]),W=e.defineComponent({__name:"menuTitle",props:{isSubtitle:{type:Boolean}},setup(o){const n=S();return(t,a)=>e.unref(n).showMenuInPopup?(e.openBlock(),e.createBlock(e.unref(_._sfc_main$2),{key:0,type:"title"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3})):e.unref(n).isShort?(e.openBlock(),e.createBlock(U,{key:1})):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"top-tabsView_menuTitle":!0,"top-tabsView_menuTitle-subtitle":t.isSubtitle})},[e.renderSlot(t.$slots,"default")],2))}});h.TopTabsView=j,h.TopTabsViewMenuItem=v,h.TopTabsViewMenuTitle=W,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})}));
1
+ define(["require","exports","vue","../.chunks/forms-BfDSGwrU.amd","../utils/route.amd","../.chunks/store-YRW59xEF.amd","../.chunks/listItem.vue_vue_type_script_setup_true_lang-R7J0Cawj.amd","../.chunks/widgetInput.vue_vue_type_style_index_0_lang-Cce9ZdtW.amd","../utils/system.amd","../require/css.amd!../assets/tabsView.css"],(function(J,h,e,m,f,g,_,G,L){"use strict";if(typeof e>"u")var e=window.Vue;const y=(o,n)=>`top:${String(o)}:${n}`,b={loadLocalStorge:(o,n)=>{if(!n.$id)return;const t=y(o,n.$id);try{const a=JSON.parse(localStorage.getItem(t));typeof a==typeof n[o]&&(n[o]=a)}catch{console.warn(new Error(`В localStorage[${t}] не корректный json`))}},addSaverLocalStorge:(o,n)=>{if(!n.$id)return;const t=y(o,n.$id);e.watch(()=>n[o],()=>{localStorage.setItem(t,JSON.stringify(n[o]))},{immediate:!0})}},k=new Set;addEventListener("popstate",o=>{k.forEach(n=>n(o))});const V=Symbol(),E=(o,n)=>{const t=g.defineStore(V,()=>{const a=e.computed(()=>o.showMenuInPopup??m.Core.state.isMobile),i=e.computed(()=>o.pageMod),u=e.ref(!1),r=e.ref(void 0),l=e.ref(!0);return{showMenuInPopup:a,pageMod:i,isShort:u,activeItemName:n,component:r,scrollable:l}},o.idState);if(o.isShortable){const a="isShort";b.loadLocalStorge(a,t),b.addSaverLocalStorge(a,t)}if(t.$id){const a=i=>{n.value=f.getHash(t.$id)};k.add(a)}return t},S=()=>g.useStore(V),P={key:1,class:"top-ellipsis"},v=e.defineComponent({__name:"menuItem",props:{name:{},href:{},icon:{},disabled:{type:Boolean},component:{default:void 0},scrollable:{type:Boolean,default:!0}},setup(o){const n=o,t=S(),a=e.computed(()=>n.name&&t.$id?f.genHash(t.$id,n.name):n.href),i=e.computed(()=>t.showMenuInPopup?_._sfc_main$2:a?"a":"button"),u=r=>{!n.href&&a.value&&r.preventDefault(),n.name&&(t.activeItemName=n.name)};return(r,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{target:"_self",class:e.normalizeClass({"top-tabsView_menuItem":!e.unref(t).showMenuInPopup,"top-active":r.name&&e.unref(t).activeItemName===r.name,"top-disabled":r.disabled,"top-spa-disabled":!0}),href:a.value,"data-top-icon":r.icon||void 0,disabled:r.disabled||void 0,onClick:u},{default:e.withCtx(()=>[e.unref(t).showMenuInPopup?e.renderSlot(r.$slots,"default",{key:0}):r.$slots.default&&!e.unref(t).isShort?(e.openBlock(),e.createElementBlock("span",P,[e.renderSlot(r.$slots,"default")])):e.createCommentVNode("",!0)]),_:3},8,["class","href","data-top-icon","disabled"]))}}),B=o=>(o==null?void 0:o.name)==="AsyncComponentWrapper"&&!(o!=null&&o.__asyncResolved),T=async(o,n)=>{(o==null?void 0:o.name)==="AsyncComponentWrapper"&&(o!=null&&o.__asyncResolved||(o.__asyncLoader(),await L.sleepWhile(()=>n()&&B(o),200)))},z={class:"top-tabsView_menuOpener"},R=["data-top-icon"],O={class:"top-ellipsis"},D={class:"top-tabsView_menuList"},H={key:0,class:"top-tabsView_menuFooter"},K=e.defineComponent({__name:"menu",props:e.mergeModels({isShortable:{type:Boolean},isLoading:{type:Boolean}},{isLoading:{},isLoadingModifiers:{}}),emits:["update:isLoading"],setup(o){const n=e.useModel(o,"isLoading"),t=S(),a=e.useSlots(),i=new Map,u=()=>{if(!a.default)return;const c=a.default({}).find(s=>s.key==="_menu");c&&r(c.children)},r=c=>{c.forEach(s=>{var M,$,N,C;if(s.type.__name&&s.type.__name!==v.__name)return;if(!s.type.__name&&typeof s.children=="object"){r(s.children);return}if(!((M=s.props)!=null&&M.name)||($=s.props)!=null&&$.disabled)return;const I={title:((C=(N=s.children).default)==null?void 0:C.call(N)[0].children).trim(),icon:s.props.icon,component:s.props.component?e.markRaw(s.props.component):v.props.component.default,scrollable:s.props.scrollable??v.props.scrollable.default};i.set(s.props.name,I)})},l=e.ref(null);let d=0;e.watch(()=>t.activeItemName,async()=>{const c=++d;if(i.size===0&&u(),i.size===0){t.activeItemName="";return}if(l.value=i.get(t.activeItemName)??null,!l.value&&t.$id){const s=f.getHash(t.$id);if(l.value=i.get(s)??null,l.value){t.activeItemName=s;return}}if(!l.value){t.activeItemName=i.keys().next().value;return}if(l.value.component===t.component){n.value=!1;return}t.$id&&f.setHash(t.$id,t.activeItemName,!1),n.value=!0,await T(l.value.component,()=>c===d),c===d&&(t.scrollable=l.value.scrollable,t.component=l.value.component,l.value&&!t.component&&console.warn(`Компонент вкладки ${t.activeItemName} не найден. Добавьте props.component для пункта меню ${t.activeItemName}.`))},{immediate:!0});const p=e.ref();let w;return e.onMounted(()=>{w=new ResizeObserver(()=>{p.value.parentElement.style.setProperty("--top-tabsView-contents-offset-top",p.value.offsetHeight+"px")}),w.observe(p.value)}),e.onUnmounted(()=>{w.disconnect()}),(c,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elRef",ref:p,class:e.normalizeClass({"top-tabsView_menu":!0,"top-tabsView_menu-inPopup_0":!e.unref(t).showMenuInPopup,"top-tabsView_menu-inPopup_1":e.unref(t).showMenuInPopup,"top-tabsView_menu-short":e.unref(t).isShort&&!e.unref(t).showMenuInPopup})},[e.unref(t).showMenuInPopup?(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{key:0},{opener:e.withCtx(()=>[e.createElementVNode("div",z,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-tabsView_menuOpenerActiveItem","data-top-icon":l.value.icon},[e.createElementVNode("span",O,e.toDisplayString(l.value.title),1)],8,R)):e.createCommentVNode("",!0),s[1]||(s[1]=e.createElementVNode("div",{class:"top-tabsView_menuOpenerIcon","data-top-icon":""},null,-1))])]),contentList:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",D,[e.renderSlot(c.$slots,"default")]),c.isShortable?(e.openBlock(),e.createElementBlock("div",H,[c.isShortable?(e.openBlock(),e.createBlock(v,{key:0,icon:e.unref(t).isShort?"":"",onClick:s[0]||(s[0]=I=>e.unref(t).isShort=!e.unref(t).isShort)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t).isShort?"":"Свернуть"),1)]),_:1},8,["icon"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))],2))}}),j=e.defineComponent({__name:"tabsView",props:e.mergeModels({modelValue:{},pageMod:{type:Boolean},showMenuInPopup:{type:Boolean,default:void 0},isShortable:{type:Boolean,default:!1},idState:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const n=o,t=e.useModel(o,"modelValue"),a=E(n,t),i=Math.random();n.pageMod&&m.Core.state.documentClassModificators.set(i,"top-hasTabsViewPageMod"),e.onUnmounted(()=>{n.pageMod&&m.Core.state.documentClassModificators.delete(i),a.$id&&f.delHash(a.$id,a.activeItemName,!0)});const u=e.ref(),r=e.ref(!1);return e.watch([u,()=>a.component],()=>{r.value=B(a.component)},{immediate:!0}),(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-tabsView":!0,"top-tabsView-pageMod":n.pageMod,"top-tabsView-inPopup":e.unref(a).showMenuInPopup})},[e.createVNode(K,{isShortable:l.isShortable,isLoading:r.value,"onUpdate:isLoading":d[0]||(d[0]=p=>r.value=p)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"menu")]),_:3},8,["isShortable","isLoading"]),e.createElementVNode("div",{class:e.normalizeClass({"top-tabsView_contents":!0,"top-tabsView_contents-isLoading":r.value,"top-tabsView_contents-noScrollable":!e.unref(a).scrollable})},[r.value?(e.openBlock(),e.createBlock(m.TopLoadbar,{key:0})):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a).component),{ref_key:"componentRef",ref:u},null,512))],1024))],2)],2))}}),A={},q={class:"top-tabsView_menuDelimeter"};function F(o,n){return e.openBlock(),e.createElementBlock("div",q)}const U=m._export_sfc(A,[["render",F]]),W=e.defineComponent({__name:"menuTitle",props:{isSubtitle:{type:Boolean}},setup(o){const n=S();return(t,a)=>e.unref(n).showMenuInPopup?(e.openBlock(),e.createBlock(e.unref(_._sfc_main$2),{key:0,type:"title"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3})):e.unref(n).isShort?(e.openBlock(),e.createBlock(U,{key:1})):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"top-tabsView_menuTitle":!0,"top-tabsView_menuTitle-subtitle":t.isSubtitle})},[e.renderSlot(t.$slots,"default")],2))}});h.TopTabsView=j,h.TopTabsViewMenuItem=v,h.TopTabsViewMenuTitle=W,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=tabsView.amd.js.map
@@ -1,9 +1,9 @@
1
1
  import { Core as U } from "../core/app.js";
2
2
  import { watch as k, computed as I, ref as f, defineComponent as M, createBlock as m, openBlock as l, resolveDynamicComponent as O, normalizeClass as y, unref as i, withCtx as b, renderSlot as v, createElementBlock as p, createCommentVNode as g, mergeModels as z, useModel as D, useSlots as G, onMounted as Q, onUnmounted as H, createElementVNode as S, toDisplayString as R, Fragment as X, createTextVNode as Y, markRaw as Z, createVNode as x, KeepAlive as ee } from "vue";
3
- import { C as $, T as te, g as oe } from "../.chunks/forms-DarRVke_.es.js";
3
+ import { C as $, T as te, g as oe } from "../.chunks/forms-BWoAyEVH.es.js";
4
4
  import { getHash as K, genHash as ae, setHash as se, delHash as ne } from "../utils/route.js";
5
5
  import { u as ie, d as re } from "../.chunks/store-CX_6ZXhO.es.js";
6
- import { b as A, _ as le } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-DzJ_pc-d.es.js";
6
+ import { b as A, _ as le } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Dljef_xa.es.js";
7
7
  /* empty css */
8
8
  import { sleepWhile as ue } from "../utils/system.js";
9
9
  const q = ["../assets/tabsView.css"].map((t) => import.meta.resolve(t));
@@ -1,4 +1,4 @@
1
- define(["require","exports","../.chunks/forms-CgtkdwgA.amd"],(function(l,t,e){"use strict";if(typeof r>"u")var r=window.Vue;async function a(o,n=!1){let i=!1;return navigator.clipboard&&(await navigator.clipboard.writeText(o),i=!0,n&&e.Core.notice(e.useI18n().Common.Copied_to_clipboard+"","info")),i}async function u(o){let n=!1;e.isSafari()||(n=await a(o));const i='<a href="'+o+'" target="_blank">'+o+"</a>",c=e.useI18n().Common.Copied_to_clipboard+`:
1
+ define(["require","exports","../.chunks/forms-BfDSGwrU.amd"],(function(l,t,e){"use strict";if(typeof r>"u")var r=window.Vue;async function a(o,n=!1){let i=!1;return navigator.clipboard&&(await navigator.clipboard.writeText(o),i=!0,n&&e.Core.notice(e.useI18n().Common.Copied_to_clipboard+"","info")),i}async function u(o){let n=!1;e.isSafari()||(n=await a(o));const i='<a href="'+o+'" target="_blank">'+o+"</a>",c=e.useI18n().Common.Copied_to_clipboard+`:
2
2
  `+i;if(n)e.Core.notice(c,"info");else{if(!navigator.clipboard){e.Core.notice(e.useI18n().Common.Cannot_copied_to_clipboard+`:
3
3
  `+e.useI18n().Common.Copy_guest_link_manually+`
4
4
  `+i,"error");return}const d={onclick:()=>a(o).then(()=>e.Core.notice(c,"info")),default:e.useI18n().Common.Copy+"",class:"copy"};await e.Core.notice(e.useI18n().Common.Guest_link_created+`
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.amd.js","sources":["../../src/core/utils/clipboard.ts"],"sourcesContent":["import Core from '@/core/core/core';\nimport { useI18n } from '@/core/plugins/i18n';\nimport { isSafari } from '@/core/utils/device';\n\n/**\n * Работа с буфером обмена\n * @packageDocumentation\n */\n\n/**\n * Скопировать текст в буфер омбена\n */\nexport async function setClipboard(text: string, isInfoShowing = false) {\n\tlet copyOk = false;\n\n\tif (navigator.clipboard) {\n\t\tawait navigator.clipboard.writeText(text)\n\t\tcopyOk = true;\n\t\tif (isInfoShowing) void Core.notice(useI18n().Common.Copied_to_clipboard + '', 'info');\n\t}\n\n\treturn copyOk;\n}\n\n/**\n * Скопировать гостевую ссылку в буфер обмена\n */\nexport async function guestLinkToClipboard(link: string) {\n\tlet isCopied = false;\n\tif (!isSafari()) isCopied = await setClipboard(link);\n\n\tconst aLink = '<a href=\"' + link + '\" target=\"_blank\">' + link + '</a>';\n\tconst copiedMessage = useI18n().Common.Copied_to_clipboard + `:\\n` + aLink;\n\n\tif (isCopied) {\n\t\tvoid Core.notice(copiedMessage, 'info');\n\t} else {\n\t\tif (!navigator.clipboard) {\n\t\t\tvoid Core.notice(useI18n().Common.Cannot_copied_to_clipboard + `:\\n` + useI18n().Common.Copy_guest_link_manually + `\\n` + aLink, 'error');\n\t\t\treturn;\n\t\t}\n\n\t\tconst buttonProps = {\n\t\t\tonclick: () => setClipboard(link).then(() => Core.notice(copiedMessage, 'info')),\n\t\t\tdefault: useI18n().Common.Copy + '',\n\t\t\tclass: 'copy',\n\t\t};\n\n\t\tawait Core.notice(useI18n().Common.Guest_link_created + `\\n` + aLink, 'info', { buttonProps });\n\t}\n};\n"],"names":["setClipboard","text","isInfoShowing","forms","copyOk","aLink","link","copiedMessage","buttonProps"],"mappings":"4HAYA,eAAAA,EAAAC,EAAAC,EAAA,GAAA,UAGC,OAAA,UAAA,wDAGCA,GAAAC,EAAA,KAAA,OAAAA,EAAA,QAAA,EAAA,OAAA,oBAAA,GAAA,MAAA,GAGDC,CACD;EAU8DC,mCAGtB,CAEtC,GAAA,CAAA,UAAA,UAAA,CACCF,EAAA,KAAA,OAAAA,EAAA,QAAA,EAAA,OAAA,2BAAA;AAAA,EAA+DA,EAAA,QAAA,EAAA,OAAA,yBAAA;AAAA,EAAoDE,EAAA,OAAA,kBAIhG,QAAA,IAAAL,EAAAM,CAAA,EAAA,KAAA,IAAAH,EAAA,KAAA,OAAAI,EAAA,MAAA,CAAA,qCAEc,MAAA;EAIsBF,EAAA,OAAA,CAAA,YAAAG,CAAA,CAAA,EAE1D"}
1
+ {"version":3,"file":"clipboard.amd.js","sources":["../../src/core/utils/clipboard.ts"],"sourcesContent":["import Core from '@/core/core/core';\nimport { useI18n } from '@/core/plugins/i18n';\nimport { isSafari } from '@/core/utils/device';\n\n/**\n * Работа с буфером обмена\n * @packageDocumentation\n */\n\n/**\n * Скопировать текст в буфер омбена\n */\nexport async function setClipboard(text: string, isInfoShowing = false) {\n\tlet copyOk = false;\n\n\tif (navigator.clipboard) {\n\t\tawait navigator.clipboard.writeText(text);\n\t\tcopyOk = true;\n\t\tif (isInfoShowing) void Core.notice(useI18n().Common.Copied_to_clipboard + '', 'info');\n\t}\n\n\treturn copyOk;\n}\n\n/**\n * Скопировать гостевую ссылку в буфер обмена\n */\nexport async function guestLinkToClipboard(link: string) {\n\tlet isCopied = false;\n\tif (!isSafari()) isCopied = await setClipboard(link);\n\n\tconst aLink = '<a href=\"' + link + '\" target=\"_blank\">' + link + '</a>';\n\tconst copiedMessage = useI18n().Common.Copied_to_clipboard + `:\\n` + aLink;\n\n\tif (isCopied) {\n\t\tvoid Core.notice(copiedMessage, 'info');\n\t} else {\n\t\tif (!navigator.clipboard) {\n\t\t\tvoid Core.notice(useI18n().Common.Cannot_copied_to_clipboard + `:\\n` + useI18n().Common.Copy_guest_link_manually + `\\n` + aLink, 'error');\n\t\t\treturn;\n\t\t}\n\n\t\tconst buttonProps = {\n\t\t\t\tonclick: () => setClipboard(link).then(() => Core.notice(copiedMessage, 'info')),\n\t\t\t\tdefault: useI18n().Common.Copy + '',\n\t\t\t\tclass: 'copy',\n\t\t\t};\n\n\t\tawait Core.notice(useI18n().Common.Guest_link_created + `\\n` + aLink, 'info', { buttonProps });\n\t}\n};\n"],"names":["setClipboard","text","isInfoShowing","forms","copyOk","aLink","link","copiedMessage","buttonProps"],"mappings":"4HAYA,eAAAA,EAAAC,EAAAC,EAAA,GAAA,UAGC,OAAA,UAAA,wDAGCA,GAAAC,EAAA,KAAA,OAAAA,EAAA,QAAA,EAAA,OAAA,oBAAA,GAAA,MAAA,GAGDC,CACD;EAU8DC,mCAGtB,CAEtC,GAAA,CAAA,UAAA,UAAA,CACCF,EAAA,KAAA,OAAAA,EAAA,QAAA,EAAA,OAAA,2BAAA;AAAA,EAA+DA,EAAA,QAAA,EAAA,OAAA,yBAAA;AAAA,EAAoDE,EAAA,OAAA,kBAIhG,QAAA,IAAAL,EAAAM,CAAA,EAAA,KAAA,IAAAH,EAAA,KAAA,OAAAI,EAAA,MAAA,CAAA,qCAEe,MAAA;EAIqBF,EAAA,OAAA,CAAA,YAAAG,CAAA,CAAA,EAE1D"}
@@ -1,4 +1,4 @@
1
- import { C as t, u as a, b as s } from "../.chunks/forms-DarRVke_.es.js";
1
+ import { C as t, u as a, b as s } from "../.chunks/forms-BWoAyEVH.es.js";
2
2
  async function r(o, e = !1) {
3
3
  let i = !1;
4
4
  return navigator.clipboard && (await navigator.clipboard.writeText(o), i = !0, e && t.notice(a().Common.Copied_to_clipboard + "", "info")), i;
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.js","sources":["../../src/core/utils/clipboard.ts"],"sourcesContent":["import Core from '@/core/core/core';\nimport { useI18n } from '@/core/plugins/i18n';\nimport { isSafari } from '@/core/utils/device';\n\n/**\n * Работа с буфером обмена\n * @packageDocumentation\n */\n\n/**\n * Скопировать текст в буфер омбена\n */\nexport async function setClipboard(text: string, isInfoShowing = false) {\n\tlet copyOk = false;\n\n\tif (navigator.clipboard) {\n\t\tawait navigator.clipboard.writeText(text)\n\t\tcopyOk = true;\n\t\tif (isInfoShowing) void Core.notice(useI18n().Common.Copied_to_clipboard + '', 'info');\n\t}\n\n\treturn copyOk;\n}\n\n/**\n * Скопировать гостевую ссылку в буфер обмена\n */\nexport async function guestLinkToClipboard(link: string) {\n\tlet isCopied = false;\n\tif (!isSafari()) isCopied = await setClipboard(link);\n\n\tconst aLink = '<a href=\"' + link + '\" target=\"_blank\">' + link + '</a>';\n\tconst copiedMessage = useI18n().Common.Copied_to_clipboard + `:\\n` + aLink;\n\n\tif (isCopied) {\n\t\tvoid Core.notice(copiedMessage, 'info');\n\t} else {\n\t\tif (!navigator.clipboard) {\n\t\t\tvoid Core.notice(useI18n().Common.Cannot_copied_to_clipboard + `:\\n` + useI18n().Common.Copy_guest_link_manually + `\\n` + aLink, 'error');\n\t\t\treturn;\n\t\t}\n\n\t\tconst buttonProps = {\n\t\t\tonclick: () => setClipboard(link).then(() => Core.notice(copiedMessage, 'info')),\n\t\t\tdefault: useI18n().Common.Copy + '',\n\t\t\tclass: 'copy',\n\t\t};\n\n\t\tawait Core.notice(useI18n().Common.Guest_link_created + `\\n` + aLink, 'info', { buttonProps });\n\t}\n};\n"],"names":["setClipboard","text","isInfoShowing","copyOk","Core","useI18n","guestLinkToClipboard","link","isCopied","isSafari","aLink","copiedMessage","buttonProps"],"mappings":";AAYA,eAAsBA,EAAaC,GAAcC,IAAgB,IAAO;AACvE,MAAIC,IAAS;AAEb,SAAI,UAAU,cACb,MAAM,UAAU,UAAU,UAAUF,CAAI,GACxCE,IAAS,IACLD,KAAoBE,EAAK,OAAOC,IAAU,OAAO,sBAAsB,IAAI,MAAM,IAG/EF;AACR;AAKA,eAAsBG,EAAqBC,GAAc;AACxD,MAAIC,IAAW;AACf,EAAKC,EAAA,MAAYD,IAAW,MAAMR,EAAaO,CAAI;AAEnD,QAAMG,IAAQ,cAAcH,IAAO,uBAAuBA,IAAO,QAC3DI,IAAgBN,EAAA,EAAU,OAAO,sBAAsB;AAAA,IAAQK;AAErE,MAAIF;AACH,IAAKJ,EAAK,OAAOO,GAAe,MAAM;AAAA,OAChC;AACN,QAAI,CAAC,UAAU,WAAW;AACzB,MAAKP,EAAK,OAAOC,EAAA,EAAU,OAAO,6BAA6B;AAAA,IAAQA,EAAA,EAAU,OAAO,2BAA2B;AAAA,IAAOK,GAAO,OAAO;AACxI;AAAA,IACD;AAEA,UAAME,IAAc;AAAA,MACnB,SAAS,MAAMZ,EAAaO,CAAI,EAAE,KAAK,MAAMH,EAAK,OAAOO,GAAe,MAAM,CAAC;AAAA,MAC/E,SAASN,EAAA,EAAU,OAAO,OAAO;AAAA,MACjC,OAAO;AAAA,IAAA;AAGR,UAAMD,EAAK,OAAOC,EAAA,EAAU,OAAO,qBAAqB;AAAA,IAAOK,GAAO,QAAQ,EAAE,aAAAE,GAAa;AAAA,EAC9F;AACD;"}
1
+ {"version":3,"file":"clipboard.js","sources":["../../src/core/utils/clipboard.ts"],"sourcesContent":["import Core from '@/core/core/core';\nimport { useI18n } from '@/core/plugins/i18n';\nimport { isSafari } from '@/core/utils/device';\n\n/**\n * Работа с буфером обмена\n * @packageDocumentation\n */\n\n/**\n * Скопировать текст в буфер омбена\n */\nexport async function setClipboard(text: string, isInfoShowing = false) {\n\tlet copyOk = false;\n\n\tif (navigator.clipboard) {\n\t\tawait navigator.clipboard.writeText(text);\n\t\tcopyOk = true;\n\t\tif (isInfoShowing) void Core.notice(useI18n().Common.Copied_to_clipboard + '', 'info');\n\t}\n\n\treturn copyOk;\n}\n\n/**\n * Скопировать гостевую ссылку в буфер обмена\n */\nexport async function guestLinkToClipboard(link: string) {\n\tlet isCopied = false;\n\tif (!isSafari()) isCopied = await setClipboard(link);\n\n\tconst aLink = '<a href=\"' + link + '\" target=\"_blank\">' + link + '</a>';\n\tconst copiedMessage = useI18n().Common.Copied_to_clipboard + `:\\n` + aLink;\n\n\tif (isCopied) {\n\t\tvoid Core.notice(copiedMessage, 'info');\n\t} else {\n\t\tif (!navigator.clipboard) {\n\t\t\tvoid Core.notice(useI18n().Common.Cannot_copied_to_clipboard + `:\\n` + useI18n().Common.Copy_guest_link_manually + `\\n` + aLink, 'error');\n\t\t\treturn;\n\t\t}\n\n\t\tconst buttonProps = {\n\t\t\t\tonclick: () => setClipboard(link).then(() => Core.notice(copiedMessage, 'info')),\n\t\t\t\tdefault: useI18n().Common.Copy + '',\n\t\t\t\tclass: 'copy',\n\t\t\t};\n\n\t\tawait Core.notice(useI18n().Common.Guest_link_created + `\\n` + aLink, 'info', { buttonProps });\n\t}\n};\n"],"names":["setClipboard","text","isInfoShowing","copyOk","Core","useI18n","guestLinkToClipboard","link","isCopied","isSafari","aLink","copiedMessage","buttonProps"],"mappings":";AAYA,eAAsBA,EAAaC,GAAcC,IAAgB,IAAO;AACvE,MAAIC,IAAS;AAEb,SAAI,UAAU,cACb,MAAM,UAAU,UAAU,UAAUF,CAAI,GACxCE,IAAS,IACLD,KAAoBE,EAAK,OAAOC,IAAU,OAAO,sBAAsB,IAAI,MAAM,IAG/EF;AACR;AAKA,eAAsBG,EAAqBC,GAAc;AACxD,MAAIC,IAAW;AACf,EAAKC,EAAA,MAAYD,IAAW,MAAMR,EAAaO,CAAI;AAEnD,QAAMG,IAAQ,cAAcH,IAAO,uBAAuBA,IAAO,QAC3DI,IAAgBN,EAAA,EAAU,OAAO,sBAAsB;AAAA,IAAQK;AAErE,MAAIF;AACH,IAAKJ,EAAK,OAAOO,GAAe,MAAM;AAAA,OAChC;AACN,QAAI,CAAC,UAAU,WAAW;AACzB,MAAKP,EAAK,OAAOC,EAAA,EAAU,OAAO,6BAA6B;AAAA,IAAQA,EAAA,EAAU,OAAO,2BAA2B;AAAA,IAAOK,GAAO,OAAO;AACxI;AAAA,IACD;AAEA,UAAME,IAAc;AAAA,MAClB,SAAS,MAAMZ,EAAaO,CAAI,EAAE,KAAK,MAAMH,EAAK,OAAOO,GAAe,MAAM,CAAC;AAAA,MAC/E,SAASN,EAAA,EAAU,OAAO,OAAO;AAAA,MACjC,OAAO;AAAA,IAAA;AAGT,UAAMD,EAAK,OAAOC,EAAA,EAAU,OAAO,qBAAqB;AAAA,IAAOK,GAAO,QAAQ,EAAE,aAAAE,GAAa;AAAA,EAC9F;AACD;"}
package/utils/date.amd.js CHANGED
@@ -1,2 +1,2 @@
1
- define(["require","exports","../.chunks/forms-CgtkdwgA.amd"],(function(n,e,t){"use strict";if(typeof a>"u")var a=window.Vue;e.dateFormat=t.dateFormat,e.dateToString=t.dateToString,e.dateUnformat=t.dateUnformat,e.genDate=t.genDate,e.genDateMoscow=t.genDateMoscow,e.genUserDate=t.genUserDate,e.getDayOfWeek=t.getDayOfWeek,e.stringToDate=t.stringToDate,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
1
+ define(["require","exports","../.chunks/forms-BfDSGwrU.amd"],(function(n,e,t){"use strict";if(typeof a>"u")var a=window.Vue;e.dateFormat=t.dateFormat,e.dateToString=t.dateToString,e.dateUnformat=t.dateUnformat,e.genDate=t.genDate,e.genDateMoscow=t.genDateMoscow,e.genUserDate=t.genUserDate,e.getDayOfWeek=t.getDayOfWeek,e.stringToDate=t.stringToDate,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=date.amd.js.map
package/utils/date.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e as t, K as s, P as o, N as r, O as g, M as n, J as D, L as d } from "../.chunks/forms-DarRVke_.es.js";
1
+ import { e as t, K as s, P as o, N as r, O as g, M as n, J as D, L as d } from "../.chunks/forms-BWoAyEVH.es.js";
2
2
  export {
3
3
  t as dateFormat,
4
4
  s as dateToString,
@@ -1,2 +1,2 @@
1
- define(["require","exports","../.chunks/forms-CgtkdwgA.amd"],(function(a,e,i){"use strict";if(typeof l>"u")var l=window.Vue;e.get$scroll=i.get$scroll,e.getCommandKeyLabel=i.getCommandKeyLabel,e.getElsScroll=i.getElsScroll,e.getOS=i.getOS,e.getOSAsync=i.getOSAsync,e.getScrollTop=i.getScrollTop,e.isApp=i.isApp,e.isMacOS=i.isMacOS,e.isMobile=i.isMobile,e.isRetina=i.isRetina,e.isSafari=i.isSafari,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
1
+ define(["require","exports","../.chunks/forms-BfDSGwrU.amd"],(function(a,e,i){"use strict";if(typeof l>"u")var l=window.Vue;e.get$scroll=i.get$scroll,e.getCommandKeyLabel=i.getCommandKeyLabel,e.getElsScroll=i.getElsScroll,e.getOS=i.getOS,e.getOSAsync=i.getOSAsync,e.getScrollTop=i.getScrollTop,e.isApp=i.isApp,e.isMacOS=i.isMacOS,e.isMobile=i.isMobile,e.isRetina=i.isRetina,e.isSafari=i.isSafari,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=device.amd.js.map
package/utils/device.js CHANGED
@@ -1,4 +1,4 @@
1
- import { z as e, x as l, A as t, B as i, D as o, y as g, v as r, w as S, t as c, s as p, b } from "../.chunks/forms-DarRVke_.es.js";
1
+ import { z as e, x as l, A as t, B as i, D as o, y as g, v as r, w as S, t as c, s as p, b } from "../.chunks/forms-BWoAyEVH.es.js";
2
2
  export {
3
3
  e as get$scroll,
4
4
  l as getCommandKeyLabel,
@@ -1,2 +1,2 @@
1
- define(["require","exports","../.chunks/forms-CgtkdwgA.amd"],(function(u,e,n){"use strict";if(typeof i>"u")var i=window.Vue;e.cloneDeep=n.cloneDeep,e.debounce=n.debounce,e.memoize=n.memoize,e.merge=n.merge,e.throttle=n.throttle,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
1
+ define(["require","exports","../.chunks/forms-BfDSGwrU.amd"],(function(u,e,n){"use strict";if(typeof i>"u")var i=window.Vue;e.cloneDeep=n.cloneDeep,e.debounce=n.debounce,e.memoize=n.memoize,e.merge=n.merge,e.throttle=n.throttle,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=lodash.amd.js.map
package/utils/lodash.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as a, d as s, G as m, I as r, H as t } from "../.chunks/forms-DarRVke_.es.js";
1
+ import { F as a, d as s, G as m, I as r, H as t } from "../.chunks/forms-BWoAyEVH.es.js";
2
2
  export {
3
3
  a as cloneDeep,
4
4
  s as debounce,
@@ -1,2 +1,2 @@
1
- define(["require","exports","../.chunks/forms-CgtkdwgA.amd"],(function(a,t,i){"use strict";if(typeof n>"u")var n=window.Vue;const u=(c,e,o=i.Core.state.currency)=>{e=e??i.useI18nLang().value;let r=c.toLocaleString(e,{style:"currency",currency:o,maximumFractionDigits:2});return r=r.replace(",","."),r};t.genPrice=u,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
1
+ define(["require","exports","../.chunks/forms-BfDSGwrU.amd"],(function(a,t,i){"use strict";if(typeof n>"u")var n=window.Vue;const u=(c,e,o=i.Core.state.currency)=>{e=e??i.useI18nLang().value;let r=c.toLocaleString(e,{style:"currency",currency:o,maximumFractionDigits:2});return r=r.replace(",","."),r};t.genPrice=u,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=price.amd.js.map
package/utils/price.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as a, a as o } from "../.chunks/forms-DarRVke_.es.js";
1
+ import { C as a, a as o } from "../.chunks/forms-BWoAyEVH.es.js";
2
2
  const i = (t, e, c = a.state.currency) => {
3
3
  e = e ?? o().value;
4
4
  let r = t.toLocaleString(e, { style: "currency", currency: c, maximumFractionDigits: 2 });
@@ -1,2 +1,2 @@
1
- define(["require","exports","../.chunks/forms-CgtkdwgA.amd","../.chunks/core-CXqQSo9c.amd","vue","../.chunks/dialogs.vue_vue_type_script_setup_true_lang-D8NggYHD.amd"],(function(b,c,g,f,r,d){"use strict";if(typeof r>"u")var r=window.Vue;const s={0:"Yandex",20:"Yandex.com",21:"Yandex.com.tr",1:"Google",4:"YouTube",5:"Bing",7:"Seznam",8:"AppStore",9:"GooglePlay",101:"VK",102:"Facebook",103:"Twitter"},t=a=>{let e="";switch(typeof a=="string"&&(a=Number(a)),a){case 0:e="";break;case 20:case 21:e="";break;case 1:e="";break;case 2:e="";break;case 3:e="";break;case 4:e="";break;case 5:e="";break;case 6:e="";break;case 7:e="";break;case 8:e="";break;case 9:e="";break;case null:e="";break}return e},n=a=>{let e="";switch(typeof a=="string"&&(a=Number(a)),a%10){case 0:e="";break;case 1:e="";break;case 2:e="";break}return e},i=(a,e)=>{switch(typeof a=="string"&&(a=Number(a)),a*1){case 1:case 4:case 5:case 6:case 8:case 9:return e}return""},u=(a,e,k)=>{switch(e*1){case 0:switch(k*1){case 2:a=`"${a}"`;break;case 3:a=`"!${a}"`;break;case 5:a=`"[${a}]"`;break;case 6:a=`"[!${a}]"`;break}break;case 1:a=`[${a}]`;break}return a},o=(a,e)=>{switch(e===null&&(e=6),a){case 1:e=3;break;case 2:e=2;break;case 5:e>1&&(e=1);break;default:[1,2,3,5,6].includes(e)||(e=3)}return e};c.genVolumeLabel=u,c.getDeviceGIcon=n,c.getLangLabel=i,c.getSearcherGIcon=t,c.prepareVolumeType=o,c.searchersNames=s,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})}));
1
+ define(["require","exports","../.chunks/forms-BfDSGwrU.amd","../.chunks/core-DWQI6OYD.amd","vue","../.chunks/dialogs.vue_vue_type_script_setup_true_lang-DJoFuqCw.amd"],(function(b,c,g,f,r,d){"use strict";if(typeof r>"u")var r=window.Vue;const s={0:"Yandex",20:"Yandex.com",21:"Yandex.com.tr",1:"Google",4:"YouTube",5:"Bing",7:"Seznam",8:"AppStore",9:"GooglePlay",101:"VK",102:"Facebook",103:"Twitter"},t=a=>{let e="";switch(typeof a=="string"&&(a=Number(a)),a){case 0:e="";break;case 20:case 21:e="";break;case 1:e="";break;case 2:e="";break;case 3:e="";break;case 4:e="";break;case 5:e="";break;case 6:e="";break;case 7:e="";break;case 8:e="";break;case 9:e="";break;case null:e="";break}return e},n=a=>{let e="";switch(typeof a=="string"&&(a=Number(a)),a%10){case 0:e="";break;case 1:e="";break;case 2:e="";break}return e},i=(a,e)=>{switch(typeof a=="string"&&(a=Number(a)),a*1){case 1:case 4:case 5:case 6:case 8:case 9:return e}return""},u=(a,e,k)=>{switch(e*1){case 0:switch(k*1){case 2:a=`"${a}"`;break;case 3:a=`"!${a}"`;break;case 5:a=`"[${a}]"`;break;case 6:a=`"[!${a}]"`;break}break;case 1:a=`[${a}]`;break}return a},o=(a,e)=>{switch(e===null&&(e=6),a){case 1:e=3;break;case 2:e=2;break;case 5:e>1&&(e=1);break;default:[1,2,3,5,6].includes(e)||(e=3)}return e};c.genVolumeLabel=u,c.getDeviceGIcon=n,c.getLangLabel=i,c.getSearcherGIcon=t,c.prepareVolumeType=o,c.searchersNames=s,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=searchers.amd.js.map
@@ -1,7 +1,7 @@
1
- import "../.chunks/forms-DarRVke_.es.js";
2
- import "../.chunks/core-CY6RkZz2.es.js";
1
+ import "../.chunks/forms-BWoAyEVH.es.js";
2
+ import "../.chunks/core-Cmk3j1ll.es.js";
3
3
  import "vue";
4
- import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-CLahwA6M.es.js";
4
+ import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-CuRb6ess.es.js";
5
5
  const k = {
6
6
  0: "Yandex",
7
7
  20: "Yandex.com",
@@ -1,2 +1,2 @@
1
- define(["require","exports","./check.amd","../.chunks/forms-CgtkdwgA.amd"],(function(N,c,h,u){"use strict";if(typeof p>"u")var p=window.Vue;const i=new RegExp(`^[^a-zа-я0-9_%#!?.:'"«»[\\](){} \\r\\n\\t<>&/+-]`,"i"),s=e=>{var a;const l=(a=e==null?void 0:e[0])==null?void 0:a.match(i);return{icon:l?e[0]:null,content:l?e.substring(1):e}},f=e=>{e+="";let l=0;if(!e.length)return l;for(let a=0;a<e.length;a++){const n=e.charCodeAt(a);l=(l<<5)-l+n,l=l&l}return l<0&&(l*=-1),l},d=e=>/^\w+:\/\/([\w-]+\.)+[\w-]+(:\d+)?(\/|$)/.test(e),g=e=>{let l=e+"";l=l.replace("-","–");let a=l.split("."),n=a[0],o=a.length>1?"."+a[1]:"";if(n.replace(/[+–]/,"").length<=4)return l;const r=/(\d+)(\d{3})/;for(;r.test(n);)n=n.replace(r,"$1 $2");return n+o},m=e=>e===void 0?"":e.replace(/\r\n|\r|\n/g,"<br>"),w=e=>typeof e=="string"&&e.trim()!==""&&!isNaN(Number(e)),C=(e,l=2,a=1e3,n="")=>{if(w(e))e=Number(e);else return String(e);const o=Math.pow(10,l);let r;return Math.abs(e)>Math.pow(a,3)?r=Math.round(e/Math.pow(a,3)*o)/o+" <small>G"+n+"</small>":Math.abs(e)>Math.pow(a,2)?r=Math.round(e/Math.pow(a,2)*o)/o+" <small>M"+n+"</small>":Math.abs(e)>a?r=Math.round(e/a*o)/o+" <small>K"+n+"</small>":r=Math.round(e*o)/o+"",r=r.replace(/^(-?\d+)(\d{3})/,"$1 $2"),r},M=(e,l,a=1)=>{if(e==null)return"";if(e+="",l==null||e.length<=l)return e;if(a===0)e=e.substr(e.length-l,l),e="..."+e;else if(a===1){const n=e.substr(0,l/2),o=e.substr(e.length-l/2,Math.ceil(l/2));e=n+"..."+o}else a===2&&(e=e.substr(0,l),e=e+"...");return e},b=(e,l,a,n)=>{if(u.useI18nLang().value==="en")return e===1?a:l;const o=e%100,r=e%10;return o>=5&&o<=20||r===0?l:r===1?a:r>=2&&r<=4?n:r>=5&&r<=9?l:n},E=e=>{if(u.useI18nLang().value!="ru"||e=="")return e;const l=e.split(" ");return $.map(l,function(a,n){a=a+"а",a=a.replace("оа","о"),a=a.replace("аяа","ой"),a=a.replace("шийа","шого"),a=a.replace("ыйа","ого"),a=a.replace("йа","я"),a=a.replace("ьа","я"),a=a.replace("яа","и"),a=a.replace("оваа","овой"),a=a.replace("аа","ы"),a=a.replace("кия","кого"),a=a.replace("каи","кой"),l[n]=a}),e=l.join(" "),e},R=e=>{const l={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"j",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"shch",ъ:"",ы:"y",ь:"",э:"e",ю:"u",я:"ya"},a=e.split(" ");return $.map(a,function(n,o){const r=[];for(let t=0;t<n.length;++t)r.push(l[n[t]]||l[n[t].toLowerCase()]==null&&n[t]||l[n[t].toLowerCase()].replace(/^(.)/,function(I){return I.toUpperCase()}));a[o]=r.join("")}),e=a.join(" "),e},k=e=>(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"),e),A=(e,l)=>{let a=null;switch(l.operator){case"CONTAINS":case"REGEXP":try{let n=l.values[0];l.operator!="REGEXP"&&(n=n.replace(/([()\[\]])/g,"\\$1")),a=new RegExp("("+n+")","gi")}catch{return e}break}return e=e.replace(a,'<b class="found">$1</b>'),e},L=e=>{var l;return(l=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:l.map(a=>a.toLowerCase()).join("_")},S=e=>`/controller/file/?src=${"/cloud/common/flags/"+e.toUpperCase()+".svg"}`,y=e=>{const l=h.getDomainRegexp(),a="(([\\/?\\w&=%+#;:-]*(\\.\\w+)?))*",n=new RegExp(`(^|[\\s>(),])([a-z0-9а-яё_.]+@${l}${a})`,"gui");e=e.replace(n,'$1<a href="mailto:$2" target="_blank" rel="noopener">↑[$2]↓</a>');const o=new RegExp(`(^|[\\s>(),])(https?://)?(${l}${a})`,"gui");return e=e.replace(o,'$1<a href="√$2$3" target="_blank" rel="nofollow noopener">$2$3</a>'),e=e.replaceAll("√http","http"),e=e.replaceAll("√","http://"),e=e.replaceAll(/(↑\[|]↓)/g,""),e},v=e=>e.charAt(0).toUpperCase()+e.slice(1),T=(e=20)=>{const l="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";let a="";for(let n=0;n<e;n++)a+=l[Math.floor(Math.random()*l.length)];return a};c.REGEXP_START_SYMBOL_ICON=i,c.addCommasWhite=g,c.addLinkTags=y,c.camelToSnakeCase=L,c.ellipsis=M,c.extractIconAndContent=s,c.genFlagLinkByCountryCode=S,c.genIntHash=f,c.getRandomHash=T,c.highlightHtml=A,c.htmlspecialchars=k,c.isUrl=d,c.nl2br=m,c.numberEnding=b,c.numberWithWord=C,c.rusToLatin=R,c.toCapitalize=v,c.toRoditPadej=E,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})}));
1
+ define(["require","exports","./check.amd","../.chunks/forms-BfDSGwrU.amd"],(function(N,c,h,u){"use strict";if(typeof p>"u")var p=window.Vue;const i=new RegExp(`^[^a-zа-я0-9_%#!?.:'"«»[\\](){} \\r\\n\\t<>&/+-]`,"i"),s=e=>{var a;const l=(a=e==null?void 0:e[0])==null?void 0:a.match(i);return{icon:l?e[0]:null,content:l?e.substring(1):e}},f=e=>{e+="";let l=0;if(!e.length)return l;for(let a=0;a<e.length;a++){const n=e.charCodeAt(a);l=(l<<5)-l+n,l=l&l}return l<0&&(l*=-1),l},d=e=>/^\w+:\/\/([\w-]+\.)+[\w-]+(:\d+)?(\/|$)/.test(e),g=e=>{let l=e+"";l=l.replace("-","–");let a=l.split("."),n=a[0],o=a.length>1?"."+a[1]:"";if(n.replace(/[+–]/,"").length<=4)return l;const r=/(\d+)(\d{3})/;for(;r.test(n);)n=n.replace(r,"$1 $2");return n+o},m=e=>e===void 0?"":e.replace(/\r\n|\r|\n/g,"<br>"),w=e=>typeof e=="string"&&e.trim()!==""&&!isNaN(Number(e)),C=(e,l=2,a=1e3,n="")=>{if(w(e))e=Number(e);else return String(e);const o=Math.pow(10,l);let r;return Math.abs(e)>Math.pow(a,3)?r=Math.round(e/Math.pow(a,3)*o)/o+" <small>G"+n+"</small>":Math.abs(e)>Math.pow(a,2)?r=Math.round(e/Math.pow(a,2)*o)/o+" <small>M"+n+"</small>":Math.abs(e)>a?r=Math.round(e/a*o)/o+" <small>K"+n+"</small>":r=Math.round(e*o)/o+"",r=r.replace(/^(-?\d+)(\d{3})/,"$1 $2"),r},M=(e,l,a=1)=>{if(e==null)return"";if(e+="",l==null||e.length<=l)return e;if(a===0)e=e.substr(e.length-l,l),e="..."+e;else if(a===1){const n=e.substr(0,l/2),o=e.substr(e.length-l/2,Math.ceil(l/2));e=n+"..."+o}else a===2&&(e=e.substr(0,l),e=e+"...");return e},b=(e,l,a,n)=>{if(u.useI18nLang().value==="en")return e===1?a:l;const o=e%100,r=e%10;return o>=5&&o<=20||r===0?l:r===1?a:r>=2&&r<=4?n:r>=5&&r<=9?l:n},E=e=>{if(u.useI18nLang().value!="ru"||e=="")return e;const l=e.split(" ");return $.map(l,function(a,n){a=a+"а",a=a.replace("оа","о"),a=a.replace("аяа","ой"),a=a.replace("шийа","шого"),a=a.replace("ыйа","ого"),a=a.replace("йа","я"),a=a.replace("ьа","я"),a=a.replace("яа","и"),a=a.replace("оваа","овой"),a=a.replace("аа","ы"),a=a.replace("кия","кого"),a=a.replace("каи","кой"),l[n]=a}),e=l.join(" "),e},R=e=>{const l={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"j",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"shch",ъ:"",ы:"y",ь:"",э:"e",ю:"u",я:"ya"},a=e.split(" ");return $.map(a,function(n,o){const r=[];for(let t=0;t<n.length;++t)r.push(l[n[t]]||l[n[t].toLowerCase()]==null&&n[t]||l[n[t].toLowerCase()].replace(/^(.)/,function(I){return I.toUpperCase()}));a[o]=r.join("")}),e=a.join(" "),e},k=e=>(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"),e),A=(e,l)=>{let a=null;switch(l.operator){case"CONTAINS":case"REGEXP":try{let n=l.values[0];l.operator!="REGEXP"&&(n=n.replace(/([()\[\]])/g,"\\$1")),a=new RegExp("("+n+")","gi")}catch{return e}break}return e=e.replace(a,'<b class="found">$1</b>'),e},L=e=>{var l;return(l=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:l.map(a=>a.toLowerCase()).join("_")},S=e=>`/controller/file/?src=${"/cloud/common/flags/"+e.toUpperCase()+".svg"}`,y=e=>{const l=h.getDomainRegexp(),a="(([\\/?\\w&=%+#;:-]*(\\.\\w+)?))*",n=new RegExp(`(^|[\\s>(),])([a-z0-9а-яё_.]+@${l}${a})`,"gui");e=e.replace(n,'$1<a href="mailto:$2" target="_blank" rel="noopener">↑[$2]↓</a>');const o=new RegExp(`(^|[\\s>(),])(https?://)?(${l}${a})`,"gui");return e=e.replace(o,'$1<a href="√$2$3" target="_blank" rel="nofollow noopener">$2$3</a>'),e=e.replaceAll("√http","http"),e=e.replaceAll("√","http://"),e=e.replaceAll(/(↑\[|]↓)/g,""),e},v=e=>e.charAt(0).toUpperCase()+e.slice(1),T=(e=20)=>{const l="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";let a="";for(let n=0;n<e;n++)a+=l[Math.floor(Math.random()*l.length)];return a};c.REGEXP_START_SYMBOL_ICON=i,c.addCommasWhite=g,c.addLinkTags=y,c.camelToSnakeCase=L,c.ellipsis=M,c.extractIconAndContent=s,c.genFlagLinkByCountryCode=S,c.genIntHash=f,c.getRandomHash=T,c.highlightHtml=A,c.htmlspecialchars=k,c.isUrl=d,c.nl2br=m,c.numberEnding=b,c.numberWithWord=C,c.rusToLatin=R,c.toCapitalize=v,c.toRoditPadej=E,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=string.amd.js.map
package/utils/string.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { getDomainRegexp as u } from "./check.js";
2
- import { a as n } from "../.chunks/forms-DarRVke_.es.js";
2
+ import { a as n } from "../.chunks/forms-BWoAyEVH.es.js";
3
3
  const s = new RegExp(`^[^a-zа-я0-9_%#!?.:'"«»[\\](){} \\r\\n\\t<>&/+-]`, "i"), g = (e) => {
4
4
  var a;
5
5
  const l = (a = e == null ? void 0 : e[0]) == null ? void 0 : a.match(s);
@@ -1 +0,0 @@
1
- {"version":3,"file":"dialogs.vue_vue_type_script_setup_true_lang-CLahwA6M.es.js","sources":["../../src/components/dialog/lib/worker.ts","../../src/components/dialog/dialog/composables/dialogHandle.ts","../../src/components/dialog/dialog/dialogs/dialogs.vue"],"sourcesContent":["import { genHash, getHash, historySetState } from '@/core/utils/route';\nimport type { ElTopDialog, ElTopDialogOpener, ElTopDialogPage, MoveDirection, TopDialogOptions } from './types';\nimport { isVisible, querySelectorAllArray } from '@/core/utils/dom';\nimport type { $el } from '@/components/types';\n\nexport abstract class TopDialogWorker {\n\tstatic state = {\n\t\tload: undefined as TopDialogOptions['load'] | undefined,\n\t\tdecoratorOnCreate: undefined as TopDialogOptions['decoratorOnCreate'] | undefined,\n\n\t\t/**\n\t\t * Порядковый номер перехода в диалоговых окнах\n\t\t *\n\t\t * Для расчета анимации Вперед / Назад\n\t\t */\n\t\tviewPageN: 0,\n\t};\n\n\tprivate static inited = false;\n\n\t/**\n\t * Инициировать события слежения за парамтерами url\n\t *\n\t * Если в параметрах есть запрос на открытие диалогового окна, TopDialog будет автоматически подключен на страницу\n\t */\n\tstatic init(options?: TopDialogOptions) {\n\t\tif (this.inited) return;\n\t\tthis.inited = true;\n\n\t\tthis.state.load = options?.load;\n\t\tthis.state.decoratorOnCreate = options?.decoratorOnCreate;\n\n\t\tconst autoInitDelay = options?.autoInitDelay ?? 5000;\n\n\t\twindow.addEventListener('hashchange', (e) => {\n\t\t\tthis.opendDialogsFromChangeUrl(e.oldURL, e.newURL);\n\t\t});\n\n\t\tthis.opendDialogsFromChangeUrl('', location.href);\n\n\t\t/**\n\t\t * Сгенерировать ссылку для перехода к странице диалогового окна\n\t\t */\n\t\tdocument.addEventListener('mousedown', async (e) => {\n\t\t\tconst elEventTarget = e.target as HTMLElement;\n\n\t\t\tconst el = elEventTarget.closest<ElTopDialogOpener<HTMLAnchorElement>>('a[data-to-view]');\n\t\t\tif (!el) return;\n\n\t\t\t// const toView = el.dataset.toView;\n\t\t\t// const viewName = toView.split('-')[0];\n\t\t\t// const $toDialog = $('#' + viewName);\n\t\t\t// const $modalLayers = $('> .modal-layer', $toDialog);\n\t\t\t// const $currentPage = $('> .active', $modalLayers);\n\n\t\t\tlet moveDirection: MoveDirection = 'next';\n\n\t\t\t// /**\n\t\t\t// * Данный алгоритм определения направления работает не корректно, так как для чтения свойства order менят состояние через getDialogsUtils()\n\t\t\t// */\n\t\t\t// if ($currentPage.length) {\n\t\t\t// \tconst pageName = toView.split('-')[1].split(':')[0];\n\t\t\t//\n\t\t\t// \tconst TopDialogUtils = await this.getDialogsUtils();\n\t\t\t//\n\t\t\t// \tawait TopDialogUtils.updatePageVue(viewName, undefined, pageName);\n\t\t\t//\n\t\t\t// \tconst $nextPage = $('> [data-view-page=\"' + pageName + '\"]', $modalLayers);\n\t\t\t// \tif ($nextPage.data('order') < $currentPage.data('order')) moveDirection = 'prev';\n\t\t\t// }\n\n\t\t\tif (el.dataset.action === 'top-dialog-close') moveDirection = 'prev';\n\n\t\t\tel.href = TopDialogWorker.genViewPageHash(el.dataset.toView, moveDirection);\n\t\t});\n\n\t\t/**\n\t\t * Осуществить переход по ссылке с учетом historyType\n\t\t */\n\t\tdocument.addEventListener('click', async (e) => {\n\t\t\tconst elEventTarget = e.target as HTMLElement;\n\n\t\t\tconst el = elEventTarget.closest<ElTopDialogOpener>('[data-to-view]');\n\t\t\tif (!el) return;\n\n\t\t\t// Подождать генерацию ссылки\n\t\t\tif (el instanceof HTMLAnchorElement && el.href === '.') {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst mouseEvent = new MouseEvent('mousedown', {\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcancelable: true,\n\t\t\t\t\tview: window,\n\t\t\t\t});\n\n\t\t\t\tel.dispatchEvent(mouseEvent);\n\n\t\t\t\tsetTimeout(() => el.click());\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst TopDialogUtils = await this.getDialogsUtils();\n\n\t\t\tconst toView = el.dataset.toView;\n\t\t\tconst viewName = toView.split('-')[0];\n\n\t\t\tconst elDialog = TopDialogUtils.getElDialogById(viewName);\n\n\t\t\tlet moveDirection: MoveDirection = 'next';\n\n\t\t\tif (elDialog) {\n\t\t\t\tconst elModalLayers = querySelectorAllArray(elDialog, '.modal-layer');\n\t\t\t\tconst elCurrentPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, el) => {\n\t\t\t\t\tconst elCurrentPage = el.querySelector<ElTopDialogPage>(':scope > .active');\n\n\t\t\t\t\tif (elCurrentPage) acc.push(elCurrentPage);\n\n\t\t\t\t\treturn acc;\n\t\t\t\t}, []);\n\n\t\t\t\tif (elCurrentPages.length) {\n\t\t\t\t\tconst pageName = toView.split('-')[1].split(':')[0];\n\t\t\t\t\tconst elNextPages = elModalLayers.reduce<ElTopDialogPage[]>((acc, el) => {\n\t\t\t\t\t\tconst elNextPage = el?.querySelector<ElTopDialogPage>(`:scope > [data-view-page=\"${pageName}\"]`);\n\n\t\t\t\t\t\tif (elNextPage) acc.push(elNextPage);\n\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, []);\n\n\t\t\t\t\tif ((elNextPages[0]?.dataset.order ?? 0) < (elCurrentPages[0]?.dataset.order ?? 0)) moveDirection = 'prev';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (el.dataset.action === 'top-dialog-close') moveDirection = 'prev';\n\n\t\t\tconst hash = TopDialogWorker.genViewPageHash(toView, moveDirection);\n\n\t\t\tif (el instanceof HTMLAnchorElement) {\n\t\t\t\t// диалоговое окно еще не открыто, произвести переход по ссылке\n\t\t\t\tif (!elDialog || !isVisible(elDialog)) return;\n\n\t\t\t\t// в адресе уже указана эта страница, необходимо явно запросить ее открытие\n\t\t\t\tif (location.hash.indexOf(toView.replace('-', '=')) !== -1) {\n\t\t\t\t\tawait TopDialogUtils.toViewDirty(toView);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst replaceHistory = !!elDialog?.dataset.toViewReplace;\n\n\t\t\tif (replaceHistory) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\thistorySetState(true, hash);\n\n\t\t\t\tawait TopDialogUtils.toViewDirty(toView);\n\n\t\t\t\tif (moveDirection == 'next') {\n\t\t\t\t\tTopDialogWorker.state.viewPageN++;\n\t\t\t\t} else {\n\t\t\t\t\tTopDialogWorker.state.viewPageN--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (el.tagName !== 'A') {\n\t\t\t\t\tif (this.compareStates(hash, location.hash)) {\n\t\t\t\t\t\thistorySetState(false, hash);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tawait TopDialogUtils.toViewDirty(toView);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tsetTimeout(() => this.getDialogsUtils(), autoInitDelay);\n\t}\n\n\tprivate static opendDialogsFromChangeUrl(oldUrl: string, newUrl: string) {\n\t\tconst oldHash = oldUrl.replace(/.*?#/, '#');\n\t\tconst newHash = newUrl.replace(/.*?#/, '#');\n\n\t\tconst dialogsStateChanged = this.compareStates(oldHash, newHash);\n\t\tif (dialogsStateChanged) void this.opendDialogsFromUrl();\n\t}\n\n\tstatic async getDialogsUtils() {\n\t\tconst { TopDialogUtils } = await import('./utils');\n\n\t\treturn TopDialogUtils;\n\t}\n\n\tstatic getDialog(el: HTMLElement) {\n\t\treturn el.closest<ElTopDialog>('.ui-dialog-content');\n\t};\n\n\t/**\n\t * todo: Переписать на сайте на this.getDialog()\n\t *\n\t * @deprecated Для обратной совместимости\n\t */\n\tstatic get$dialog($el: $el) {\n\t\treturn $el.closest('.ui-dialog-content');\n\t};\n\n\tstatic getPage(el: HTMLElement) {\n\t\treturn el.closest<ElTopDialogPage>('[data-view-page]');\n\t};\n\n\t/**\n\t * todo: Переписать на сайте на this.getPage()\n\t *\n\t * @deprecated Для обратной совместимости\n\t */\n\tstatic get$page($el: $el) {\n\t\treturn $el.closest('[data-view-page]');\n\t};\n\n\t/**\n\t * todo: Переписать на сайте на this.getPairPage()\n\t *\n\t * @deprecated Для обратной совместимости\n\t */\n\tstatic get$pairPage($el: $el) {\n\t\tconst $dialog = TopDialogWorker.get$dialog($el);\n\n\t\tconst $page = TopDialogWorker.get$page($el);\n\t\tconst pageName = $page.data('view-page');\n\n\t\treturn $('[data-view-page=\"' + pageName + '\"]', $dialog);\n\t};\n\n\tstatic getPairPage(el: HTMLElement) {\n\t\tconst elDialog = TopDialogWorker.getDialog(el);\n\t\tif (!elDialog) return;\n\n\t\tconst elPage = TopDialogWorker.getPage(el);\n\t\tconst pageName = elPage?.dataset.viewPage;\n\n\t\treturn querySelectorAllArray(elDialog, `[data-view-page=\"${pageName}\"]`);\n\t};\n\n\t/**\n\t * Закрыть диалоговое окно\n\t */\n\tstatic close(dialogId: string) {\n\t\tconst $dialog = $('#' + dialogId);\n\t\tif ($dialog.dialog('instance')) {\n\t\t\t$dialog.dialog('close');\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst elDialog = document.getElementById(dialogId);\n\n\t\tif (!(elDialog instanceof HTMLDialogElement)) return;\n\n\t\telDialog.close();\n\t};\n\n\t/**\n\t * Размонтировать $.dialog\n\t */\n\tstatic destroy(dialogId: string) {\n\t\tconst $dialog = $('#' + dialogId);\n\n\t\tif ($dialog.dialog('instance')) {\n\t\t\t$dialog.dialog('close');\n\t\t\t$dialog.dialog('destroy');\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst elDialog = document.getElementById(dialogId);\n\t\tif (!(elDialog instanceof HTMLDialogElement)) return;\n\n\t\telDialog.close();\n\t};\n\n\t/**\n\t * Сгенерировать ссылку на страницу в диалоговом окне\n\t * @param toView - указатель в формате: dialog_{{ dialogId }}={{ pageName }}:{{ args }}\n\t * @param moveDirection\n\t */\n\tstatic genViewPageHash(toView: string, moveDirection: MoveDirection = 'next') {\n\t\tlet toViewPageN = this.state.viewPageN;\n\t\tif (moveDirection == 'prev') {\n\t\t\ttoViewPageN--;\n\t\t} else {\n\t\t\ttoViewPageN++;\n\t\t}\n\n\t\tconst viewNameAndPageLink = toView.split('-');\n\t\tconst viewName = viewNameAndPageLink.shift();\n\t\tconst pageLink = viewNameAndPageLink.join('-');\n\n\t\tlet hash = genHash('vpn', toViewPageN);\n\t\thash = genHash('view-' + viewName, pageLink, hash);\n\n\t\treturn hash;\n\t};\n\n\t/**\n\t * Сравнить версию открытых диалоговых окон\n\t * @returns вернет true, если состояния открытых окон изменилось\n\t */\n\tstatic compareStates(hash: string, hash2: string) {\n\t\tconst mathes = hash.match(/[#&]view-[^&]+/g) || [];\n\t\tconst mathes2 = hash2.match(/[#&]view-[^&]+/g) || [];\n\n\t\tif (mathes.length !== mathes2.length) return true;\n\n\t\tconst mathesChanged = mathes.filter((math, n) => {\n\t\t\tconst math2 = mathes2[n] || '';\n\n\t\t\treturn math !== math2;\n\t\t});\n\n\t\tif (mathesChanged.length) return true;\n\n\t\treturn false;\n\t};\n\n\tstatic opendDialogsFromUrl = async () => {\n\t\tconst toViewPageN = Number(getHash('vpn')) || 0;\n\n\t\t// Открыть диалоговое окно\n\t\tlet view: RegExpExecArray | null;\n\t\t// const regexp = new RegExp('view-((\\\\w+)=([\\\\w-]+)(?::([\\\\w.:-]+))?)' + '(' + Math.random() + ')?', 'g'); // fix babel minify regexp\n\t\tconst regexp = new RegExp('view-((\\\\w+)=([\\\\w-]+)(?::([\\\\w.:-]+))?)', 'g');\n\n\t\t// TODO: Цикл делает только одну оперцию и выходит (возможно, оставлен специально с какой-то целью, если нет - заменить на if)\n\t\twhile (view = regexp.exec(location.hash)) {\n\t\t\tlet moveDirection: MoveDirection = 'next';\n\t\t\tif (toViewPageN < this.state.viewPageN) moveDirection = 'prev';\n\n\t\t\tconst TopDialogUtils = await this.getDialogsUtils();\n\n\t\t\treturn TopDialogUtils.toViewDirty(view[1], moveDirection);\n\t\t}\n\n\t\t// Закрыть ненужные view\n\t\tconst elDialogs = querySelectorAllArray(document, '.ui-dialog-content[data-view-page-active]') as HTMLDialogElement[];\n\t\telDialogs.filter((elDialog) => {\n\t\t\treturn isVisible(elDialog);\n\t\t}).forEach((elDialog) => {\n\t\t\tconst viewName = elDialog.getAttribute('id');\n\t\t\tif (!viewName) throw 'Диалоговое окно не содержит id';\n\t\t\tconst pageName = getHash('view-' + viewName);\n\t\t\tif (!pageName) {\n\t\t\t\tconst $dialog = $(elDialog);\n\n\t\t\t\t$dialog.dialog('close');\n\t\t\t}\n\t\t});\n\n\t\tthis.state.viewPageN = toViewPageN;\n\n\t\treturn true;\n\t};\n}\n","import { type ComponentInstance, type ComponentInternalInstance, markRaw, ref } from 'vue';\nimport { waitWhile } from '@/core/utils/system';\nimport TopDialog from '../dialog.vue';\nimport { TopDialogWorker } from '@/components/dialog/lib/worker';\nimport type { MoveDirection } from '@/components/dialog/lib/types';\nimport type { TopDialogComponent } from './types';\nimport { historySetState } from '@/core/utils/route';\n\n/**\n * Объект для работы с диалоговым окном\n *\n * Каждое окно уникально и может быть открыто одновременно только один раз\n *\n * Можно определить много окон, после чего с ними можно вести работу в любой части приложения\n */\nexport class TopDialogHandle<T extends TopDialogComponent> {\n\n\t/**\n\t * Индентификатор, определяется на уровне компонента TopDialogComponent\n\t *\n\t * Может использоваться в навигации для открытия нужных окон с нужными настройками\n\t */\n\tid: string;\n\n\t/**\n\t * ID, используемый в верстке диалогового окна\n\t */\n\tidAttr: string;\n\n\t/**\n\t * Пользовательский компонент диалогового окна\n\t */\n\tComponent: T;\n\n\t/**\n\t * Компонент инициирован\n\t *\n\t * Устанавливается после первого вызова useTopDialog()\n\t */\n\tisMounted = ref(false);\n\n\t/**\n\t * Компонент готов к использованию\n\t *\n\t * Используется для внутренних преобразований после отрисовки\n\t */\n\tisReady = ref(false);\n\n\t/**\n\t * Диалоговое окно открыто\n\t */\n\tisOpened = ref(false);\n\n\t/**\n\t * Имя активной страницы дилогового окна\n\t */\n\tpageActive = ref('');\n\n\t/**\n\t * Диалоговое окно находится в состоянии загрузки своей страницы\n\t */\n\tisLoadingPage = ref(false);\n\n\t/**\n\t * Следующая активная страница\n\t *\n\t * В один момент времени может потребоваться отобразить две страницы, чтобы воспроизвести анимацию\n\t */\n\tpageActiveNext = ref('');\n\n\t/**\n\t * props компонента, доступны после инициализации\n\t */\n\tprops?: ComponentInstance<T>['$props'];\n\n\t/**\n\t * emit базового компонента `TopDialog`\n\t */\n\temit?: ComponentInstance<typeof TopDialog>['$emit'];\n\n\t/**\n\t * Одноразовое событие на закрытие диалогового окна\n\t *\n\t * Используется для привязки окна к сценариям использования\n\t */\n\tonCloseOnce?: (props: typeof this.props, pageName: string) => void;\n\n\tconstructor(TopDialogComponent: T) {\n\t\tthis.id = TopDialogComponent.id!;\n\t\tthis.idAttr = 'dialog_' + TopDialogComponent.id;\n\t\tthis.Component = markRaw(TopDialogComponent);\n\t}\n\n\t/**\n\t * Событие - компонент инициирован\n\t */\n\tonMounted(topDialogComponent: ComponentInternalInstance, topDialogBaseComponent: ComponentInternalInstance) {\n\t\tthis.isMounted.value = true;\n\t\tthis.props = topDialogComponent.props;\n\t\tthis.emit = topDialogBaseComponent.emit;\n\t}\n\n\t/**\n\t * Открыть диалоговое окно\n\t *\n\t * Учтите, что props в диалоговом окне будут доступны не сразу, а только после инициализации vue компонента\n\t */\n\tasync open(pageName: string = 'main', props?: {}, args: [] = [], onCloseOnce?: typeof this.onCloseOnce, moveDirection?: MoveDirection) {\n\t\tif (props) await this.setProps(props);\n\t\tif (onCloseOnce) this.onCloseOnce = onCloseOnce;\n\n\t\tconst TopDialogUtils = await TopDialogWorker.getDialogsUtils();\n\n\t\tawait TopDialogUtils.toView(this.idAttr, pageName, args, moveDirection);\n\t};\n\n\t/**\n\t * Открыть диалоговое окно как ссылку, для хеш-навигации\n\t *\n\t * Диалоговые окна загружаются по имени, см. настройку плагина Core topDialogLoader\n\t */\n\tasync openAsLink(\n\t\tpageName: string = 'main',\n\t\tprops?: {},\n\t\t_args: string[] = [],\n\t\tonCloseOnce?: typeof this.onCloseOnce,\n\t\tmoveDirection?: MoveDirection,\n\t) {\n\t\tif (props) await this.setProps(props);\n\t\tif (onCloseOnce) this.onCloseOnce = onCloseOnce;\n\n\t\tconst viewName = this.idAttr + '-' + pageName;\n\n\t\tconst hash = TopDialogWorker.genViewPageHash(viewName, moveDirection);\n\t\thistorySetState(false, hash);\n\t};\n\n\t/**\n\t * Закрыть диалоговое окно\n\t *\n\t * Не меняет состояние компонента диалогового окна\n\t */\n\tasync close() {\n\t\tTopDialogWorker.close(this.idAttr);\n\t};\n\n\t/**\n\t * Размонтировать $.dialog\n\t */\n\tasync destroy() {\n\t\tTopDialogWorker.destroy(this.idAttr);\n\t}\n\n\t/**\n\t * Устанвоить props\n\t *\n\t * Полностью сбрасывается состояние props\n\t */\n\tasync setProps(props: ComponentInstance<T>['$props'] = {}) {\n\t\t// ожидание инициализации компонента\n\t\tif (!this.isMounted) {\n\t\t\tawait waitWhile(() => !this.props);\n\t\t}\n\n\t\tfor (const name in this.props) {\n\t\t\tthis.props[name] = props[name];\n\t\t}\n\t}\n\n\t/**\n\t * Проверить, есть ли необходимость отрисовки страницы диалогового окна\n\t */\n\tneedShowPage(pageName: string): boolean {\n\t\tif (!this.isOpened.value) return false;\n\n\t\treturn this.pageActive.value === pageName || this.pageActiveNext.value === pageName;\n\t}\n}\n","<script lang=\"ts\">\nimport { shallowReactive } from 'vue';\nimport { TopDialogHandle } from '@/components/dialog/dialog/composables/dialogHandle';\nimport type { TopDialogComponent } from '@/components/dialog/dialog/composables/types';\n\n/**\n * Словарь всех используемых диалоговых окон\n *\n * В других компонентах не использовать\n */\nconst dialogsWorkers = shallowReactive(new Map<string, TopDialogHandle<TopDialogComponent>>());\n\n/**\n * Получить компонент диалогового окна по id\n */\nexport const getDialogWorker = (id: string) => {\n\tid = id.replace(/^dialog_/, '');\n\n\treturn dialogsWorkers.get(id);\n};\n\n/**\n * Добавить компонент диалогового окна для использования\n */\nexport const addDialogWorker = <T extends TopDialogComponent>(TopDialogComponent: T): TopDialogHandle<T> => {\n\tif (!TopDialogComponent?.id) {\n\t\tconsole.log({ TopDialogComponent: TopDialogComponent });\n\n\t\tthrow new Error('Expected TopDialogComponent');\n\t}\n\n\tif (!dialogsWorkers.has(TopDialogComponent.id)) {\n\t\tdialogsWorkers.set(TopDialogComponent.id, new TopDialogHandle(TopDialogComponent));\n\t}\n\n\treturn dialogsWorkers.get(TopDialogComponent.id) as TopDialogHandle<T>;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { onUnmounted } from 'vue';\n\ndefineOptions({\n\tname: 'DialogWrapper',\n});\n\nonUnmounted(() => {\n\tdialogsWorkers.forEach(dialog => dialog.destroy());\n\tdialogsWorkers.clear();\n});\n</script>\n\n<template>\n\t<div class=\"top-dialogs\" style=\"display: none;\">\n\t\t<component\n\t\t\tv-for=\"[dialogId, dialog] in dialogsWorkers\"\n\t\t\t:is=\"dialog.Component\"\n\t\t\t:key=\"dialogId\"\n\t\t/>\n\t</div>\n</template>\n"],"names":["TopDialogWorker","options","autoInitDelay","e","el","moveDirection","mouseEvent","TopDialogUtils","toView","viewName","elDialog","elModalLayers","querySelectorAllArray","elCurrentPages","acc","elCurrentPage","pageName","_a","elNextPage","_b","hash","isVisible","historySetState","oldUrl","newUrl","oldHash","newHash","$el","$dialog","elPage","dialogId","toViewPageN","viewNameAndPageLink","pageLink","genHash","hash2","mathes","mathes2","math","n","math2","getHash","view","regexp","TopDialogHandle","ref","TopDialogComponent","markRaw","topDialogComponent","topDialogBaseComponent","props","args","onCloseOnce","_args","waitWhile","name","dialogsWorkers","shallowReactive","getDialogWorker","id","addDialogWorker","onUnmounted","dialog","_openBlock","_createElementBlock","_h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Z,CAAA,GAAc,CAAA,CAAnC1B,GAAUgC,CAAM,OADzBC,EAAA,GAAAM,EAIEC,EAFIR,EAAO,SAAS,GAAA,EACpB,KAAKhC,GAAQ;;;;"}
@@ -1,2 +0,0 @@
1
- define(["require","exports","vue","../utils/system.amd","../utils/route.amd","../utils/dom.amd"],(function(H,f,s,S,g,u){"use strict";if(typeof s>"u")var s=window.Vue;class c{static state={load:void 0,decoratorOnCreate:void 0,viewPageN:0};static inited=!1;static init(e){if(this.inited)return;this.inited=!0,this.state.load=e==null?void 0:e.load,this.state.decoratorOnCreate=e==null?void 0:e.decoratorOnCreate;const a=(e==null?void 0:e.autoInitDelay)??5e3;window.addEventListener("hashchange",t=>{this.opendDialogsFromChangeUrl(t.oldURL,t.newURL)}),this.opendDialogsFromChangeUrl("",location.href),document.addEventListener("mousedown",async t=>{const i=t.target.closest("a[data-to-view]");if(!i)return;let r="next";i.dataset.action==="top-dialog-close"&&(r="prev"),i.href=c.genViewPageHash(i.dataset.toView,r)}),document.addEventListener("click",async t=>{var E,N;const i=t.target.closest("[data-to-view]");if(!i)return;if(i instanceof HTMLAnchorElement&&i.href==="."){t.preventDefault();const p=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});i.dispatchEvent(p),setTimeout(()=>i.click());return}const r=await this.getDialogsUtils(),o=i.dataset.toView,v=o.split("-")[0],h=r.getElDialogById(v);let m="next";if(h){const p=u.querySelectorAllArray(h,".modal-layer"),A=p.reduce((y,U)=>{const w=U.querySelector(":scope > .active");return w&&y.push(w),y},[]);if(A.length){const y=o.split("-")[1].split(":")[0];(((E=p.reduce((w,D)=>{const V=D==null?void 0:D.querySelector(`:scope > [data-view-page="${y}"]`);return V&&w.push(V),w},[])[0])==null?void 0:E.dataset.order)??0)<(((N=A[0])==null?void 0:N.dataset.order)??0)&&(m="prev")}}i.dataset.action==="top-dialog-close"&&(m="prev");const P=c.genViewPageHash(o,m);if(i instanceof HTMLAnchorElement){if(!h||!u.isVisible(h))return;if(location.hash.indexOf(o.replace("-","="))!==-1){await r.toViewDirty(o);return}}!!(h!=null&&h.dataset.toViewReplace)?(t.preventDefault(),g.historySetState(!0,P),await r.toViewDirty(o),m=="next"?c.state.viewPageN++:c.state.viewPageN--):i.tagName!=="A"&&(this.compareStates(P,location.hash)?g.historySetState(!1,P):await r.toViewDirty(o))}),setTimeout(()=>this.getDialogsUtils(),a)}static opendDialogsFromChangeUrl(e,a){const t=e.replace(/.*?#/,"#"),n=a.replace(/.*?#/,"#");this.compareStates(t,n)&&this.opendDialogsFromUrl()}static async getDialogsUtils(){const{TopDialogUtils:e}=await new Promise((a,t)=>H(["./utils-DcP4RFmH.amd"],a,t));return e}static getDialog(e){return e.closest(".ui-dialog-content")}static get$dialog(e){return e.closest(".ui-dialog-content")}static getPage(e){return e.closest("[data-view-page]")}static get$page(e){return e.closest("[data-view-page]")}static get$pairPage(e){const a=c.get$dialog(e),n=c.get$page(e).data("view-page");return $('[data-view-page="'+n+'"]',a)}static getPairPage(e){const a=c.getDialog(e);if(!a)return;const t=c.getPage(e),n=t==null?void 0:t.dataset.viewPage;return u.querySelectorAllArray(a,`[data-view-page="${n}"]`)}static close(e){const a=$("#"+e);if(a.dialog("instance")){a.dialog("close");return}const t=document.getElementById(e);t instanceof HTMLDialogElement&&t.close()}static destroy(e){const a=$("#"+e);if(a.dialog("instance")){a.dialog("close"),a.dialog("destroy");return}const t=document.getElementById(e);t instanceof HTMLDialogElement&&t.close()}static genViewPageHash(e,a="next"){let t=this.state.viewPageN;a=="prev"?t--:t++;const n=e.split("-"),i=n.shift(),r=n.join("-");let o=g.genHash("vpn",t);return o=g.genHash("view-"+i,r,o),o}static compareStates(e,a){const t=e.match(/[#&]view-[^&]+/g)||[],n=a.match(/[#&]view-[^&]+/g)||[];return!!(t.length!==n.length||t.filter((r,o)=>{const v=n[o]||"";return r!==v}).length)}static opendDialogsFromUrl=async()=>{const e=Number(g.getHash("vpn"))||0;let a;const t=new RegExp("view-((\\w+)=([\\w-]+)(?::([\\w.:-]+))?)","g");for(;a=t.exec(location.hash);){let i="next";return e<this.state.viewPageN&&(i="prev"),(await this.getDialogsUtils()).toViewDirty(a[1],i)}return u.querySelectorAllArray(document,".ui-dialog-content[data-view-page-active]").filter(i=>u.isVisible(i)).forEach(i=>{const r=i.getAttribute("id");if(!r)throw"Диалоговое окно не содержит id";g.getHash("view-"+r)||$(i).dialog("close")}),this.state.viewPageN=e,!0}}class L{id;idAttr;Component;isMounted=s.ref(!1);isReady=s.ref(!1);isOpened=s.ref(!1);pageActive=s.ref("");isLoadingPage=s.ref(!1);pageActiveNext=s.ref("");props;emit;onCloseOnce;constructor(e){this.id=e.id,this.idAttr="dialog_"+e.id,this.Component=s.markRaw(e)}onMounted(e,a){this.isMounted.value=!0,this.props=e.props,this.emit=a.emit}async open(e="main",a,t=[],n,i){a&&await this.setProps(a),n&&(this.onCloseOnce=n),await(await c.getDialogsUtils()).toView(this.idAttr,e,t,i)}async openAsLink(e="main",a,t=[],n,i){a&&await this.setProps(a),n&&(this.onCloseOnce=n);const r=this.idAttr+"-"+e,o=c.genViewPageHash(r,i);g.historySetState(!1,o)}async close(){c.close(this.idAttr)}async destroy(){c.destroy(this.idAttr)}async setProps(e={}){this.isMounted||await S.waitWhile(()=>!this.props);for(const a in this.props)this.props[a]=e[a]}needShowPage(e){return this.isOpened.value?this.pageActive.value===e||this.pageActiveNext.value===e:!1}}const x={class:"top-dialogs",style:{display:"none"}},d=s.shallowReactive(new Map),k=l=>(l=l.replace(/^dialog_/,""),d.get(l)),M=l=>{if(!(l!=null&&l.id))throw console.log({TopDialogComponent:l}),new Error("Expected TopDialogComponent");return d.has(l.id)||d.set(l.id,new L(l)),d.get(l.id)},B=s.defineComponent({name:"DialogWrapper",__name:"dialogs",setup(l){return s.onUnmounted(()=>{d.forEach(e=>e.destroy()),d.clear()}),(e,a)=>(s.openBlock(),s.createElementBlock("div",x,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(d),([t,n])=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(n.Component),{key:t}))),128))]))}});f.TopDialogWorker=c,f._sfc_main=B,f.addDialogWorker=M,f.getDialogWorker=k}));
2
- //# sourceMappingURL=dialogs.vue_vue_type_script_setup_true_lang-D8NggYHD.amd.js.map