@topvisor/ui 1.3.3 → 1.3.4
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.
- package/.chunks/{core-PgN-H_aP.es.js → core-BB__WDxl.es.js} +5 -5
- package/.chunks/{core-PgN-H_aP.es.js.map → core-BB__WDxl.es.js.map} +1 -1
- package/.chunks/{core-BU_5Yi6z.amd.js → core-D4Sv-IKP.amd.js} +2 -2
- package/.chunks/{core-BU_5Yi6z.amd.js.map → core-D4Sv-IKP.amd.js.map} +1 -1
- package/.chunks/{datepicker-BgLipRW7.amd.js → datepicker-CBzdb_fg.amd.js} +2 -2
- package/.chunks/{datepicker-BgLipRW7.amd.js.map → datepicker-CBzdb_fg.amd.js.map} +1 -1
- package/.chunks/{datepicker-lHzfJ7vE.es.js → datepicker-DNaE4Nvd.es.js} +2 -2
- package/.chunks/{datepicker-lHzfJ7vE.es.js.map → datepicker-DNaE4Nvd.es.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-6J3xu9IY.amd.js → dialog_selectorRegions-BISzXsyD.amd.js} +2 -2
- package/.chunks/{dialog_selectorRegions-6J3xu9IY.amd.js.map → dialog_selectorRegions-BISzXsyD.amd.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-Ccsrpo2C.es.js → dialog_selectorRegions-BYuC3Yqz.es.js} +4 -4
- package/.chunks/{dialog_selectorRegions-Ccsrpo2C.es.js.map → dialog_selectorRegions-BYuC3Yqz.es.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-Bei7eCOi.es.js → dialogs.vue_vue_type_script_setup_true_lang-B9iya2uP.es.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-Bei7eCOi.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-B9iya2uP.es.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-CTzGS920.amd.js → dialogs.vue_vue_type_script_setup_true_lang-YGicBjlC.amd.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-CTzGS920.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-YGicBjlC.amd.js.map} +1 -1
- package/.chunks/{forms-BfDSGwrU.amd.js → forms-DHThMe8-.amd.js} +3 -3
- package/.chunks/{forms-BfDSGwrU.amd.js.map → forms-DHThMe8-.amd.js.map} +1 -1
- package/.chunks/{forms-CuEEAPvm.es.js → forms-EIQ_3SBd.es.js} +5 -5
- package/.chunks/{forms-CuEEAPvm.es.js.map → forms-EIQ_3SBd.es.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-_3WmLmPV.es.js → listItem.vue_vue_type_script_setup_true_lang-CmBz0A7l.es.js} +51 -54
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-_3WmLmPV.es.js.map → listItem.vue_vue_type_script_setup_true_lang-CmBz0A7l.es.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-R7J0Cawj.amd.js → listItem.vue_vue_type_script_setup_true_lang-DFQ66WTg.amd.js} +2 -2
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-R7J0Cawj.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-DFQ66WTg.amd.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-Ct0tivnh.es.js → menu.vue_vue_type_style_index_0_lang-Crg7yUFK.es.js} +2 -2
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-Ct0tivnh.es.js.map → menu.vue_vue_type_style_index_0_lang-Crg7yUFK.es.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-JZ-QwyLO.amd.js → menu.vue_vue_type_style_index_0_lang-pAW8vFcF.amd.js} +2 -2
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-JZ-QwyLO.amd.js.map → menu.vue_vue_type_style_index_0_lang-pAW8vFcF.amd.js.map} +1 -1
- package/.chunks/{notice-DAcU_6aT.amd.js → notice-Bj_A6EZr.amd.js} +2 -2
- package/.chunks/{notice-DAcU_6aT.amd.js.map → notice-Bj_A6EZr.amd.js.map} +1 -1
- package/.chunks/{notice-Aw2dLsyE.es.js → notice-Ci-iQODq.es.js} +2 -2
- package/.chunks/{notice-Aw2dLsyE.es.js.map → notice-Ci-iQODq.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-B4eRUWew.amd.js → page.vue_vue_type_script_setup_true_lang-Bs3U8NAO.amd.js} +2 -2
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-B4eRUWew.amd.js.map → page.vue_vue_type_script_setup_true_lang-Bs3U8NAO.amd.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-x02Y0eiE.es.js → page.vue_vue_type_script_setup_true_lang-Bz40v24a.es.js} +4 -4
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-x02Y0eiE.es.js.map → page.vue_vue_type_script_setup_true_lang-Bz40v24a.es.js.map} +1 -1
- package/.chunks/popup-Babcz_K9.amd.js +2 -0
- package/.chunks/{popup-JuvnpqC-.amd.js.map → popup-Babcz_K9.amd.js.map} +1 -1
- package/.chunks/{popup-axQQEyIk.es.js → popup-ClYTPlLm.es.js} +10 -10
- package/.chunks/{popup-axQQEyIk.es.js.map → popup-ClYTPlLm.es.js.map} +1 -1
- package/.chunks/{utils-DxMSoFhe.amd.js → utils-BjaB2GZ1.amd.js} +2 -2
- package/.chunks/{utils-DxMSoFhe.amd.js.map → utils-BjaB2GZ1.amd.js.map} +1 -1
- package/.chunks/{utils-BHW-ownM.es.js → utils-CLxr2Yzo.es.js} +2 -2
- package/.chunks/{utils-BHW-ownM.es.js.map → utils-CLxr2Yzo.es.js.map} +1 -1
- package/.chunks/{utils-D1fvioEG.es.js → utils-DY3nA9fg.es.js} +3 -3
- package/.chunks/{utils-D1fvioEG.es.js.map → utils-DY3nA9fg.es.js.map} +1 -1
- package/.chunks/{utils-C9dKr-gR.amd.js → utils-Du1E6K8L.amd.js} +2 -2
- package/.chunks/{utils-C9dKr-gR.amd.js.map → utils-Du1E6K8L.amd.js.map} +1 -1
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-IWJIVl4_.es.js → widgetInput.vue_vue_type_script_setup_true_lang-5UjYRU5U.es.js} +2 -2
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-5UjYRU5U.es.js.map +1 -0
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-DVHWVUQM.amd.js → widgetInput.vue_vue_type_script_setup_true_lang-Depb8q1d.amd.js} +2 -2
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-Depb8q1d.amd.js.map +1 -0
- package/assets/core.css +1 -1
- package/assets/project.css +1 -1
- package/charts/charts.amd.js +1 -1
- package/charts/charts.js +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.js +5 -5
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.js +2 -2
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.js +4 -4
- package/layout/layout.amd.js +1 -1
- package/layout/layout.js +1 -1
- package/package.json +1 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +4 -4
- package/popup/popup.js.map +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.js +2 -2
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +323 -320
- package/project/project.js.map +1 -1
- package/src/components/popup/popup/listItem.vue.d.ts +1 -1
- package/src/components/popup/popup/types.d.ts +2 -1
- package/src/components/popup/popup/{widgetInput.vue.d.ts → widgetInput/widgetInput.vue.d.ts} +1 -1
- package/src/components/popup/popup.d.ts +1 -1
- package/src/components/project/tagSelector/popupOpener/types.d.ts +6 -3
- package/src/components/project/tagSelector/tagSelector.vue.d.ts +1 -0
- package/src/components/project/tagSelector/types.d.ts +9 -2
- package/src/components/project/tagSelector/utils/el.d.ts +3 -3
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.js +2 -2
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.js +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.js +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.js +3 -3
- package/utils/string.amd.js +1 -1
- package/utils/string.js +1 -1
- package/.chunks/popup-JuvnpqC-.amd.js +0 -2
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-DVHWVUQM.amd.js.map +0 -1
- package/.chunks/widgetInput.vue_vue_type_script_setup_true_lang-IWJIVl4_.es.js.map +0 -1
package/project/project.js
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
const fileNames = ['../assets/project.css'].map(fileName => import.meta.resolve(fileName));
|
|
4
4
|
_autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
|
|
5
5
|
|
|
6
|
-
import { defineComponent as
|
|
7
|
-
import { u as R, C as j, c as H, o as re, d as we } from "../.chunks/forms-
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as Ae } from "../.chunks/menu.vue_vue_type_style_index_0_lang-
|
|
10
|
-
import { u as Re } from "../.chunks/utils-
|
|
6
|
+
import { defineComponent as U, mergeModels as N, useModel as D, computed as E, createElementBlock as b, openBlock as k, createBlock as _, unref as y, withCtx as B, Fragment as Y, renderList as se, normalizeClass as X, createElementVNode as he, toDisplayString as K, createVNode as A, createTextVNode as G, toValue as de, ref as F, watch as w, createCommentVNode as q, isRef as ce, withModifiers as J, mergeProps as Se, withKeys as ge, nextTick as Be, resolveDirective as _e, withDirectives as be, resolveDynamicComponent as Ve, renderSlot as Ee, shallowRef as Me, createSlots as Ke, reactive as $e } from "vue";
|
|
7
|
+
import { u as R, C as j, c as H, o as re, d as we } from "../.chunks/forms-EIQ_3SBd.es.js";
|
|
8
|
+
import { _ as Ie, b as ue, a as Le } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-CmBz0A7l.es.js";
|
|
9
|
+
import { _ as Ae } from "../.chunks/menu.vue_vue_type_style_index_0_lang-Crg7yUFK.es.js";
|
|
10
|
+
import { u as Re } from "../.chunks/utils-CLxr2Yzo.es.js";
|
|
11
11
|
import { getSearcherGIcon as Oe, getLangLabel as Ne, getDeviceGIcon as De } from "../utils/searchers.js";
|
|
12
12
|
import { storage as W } from "../utils/dom.js";
|
|
13
13
|
import { TopPopupWorker as Fe } from "../popup/worker.js";
|
|
14
|
-
const qe = { class: "top-selectorCompetitors" },
|
|
14
|
+
const qe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }, mt = /* @__PURE__ */ U({
|
|
15
15
|
__name: "selectorCompetitors",
|
|
16
16
|
props: /* @__PURE__ */ N({
|
|
17
17
|
modelValue: {},
|
|
@@ -23,8 +23,8 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
23
23
|
}),
|
|
24
24
|
emits: ["update:modelValue"],
|
|
25
25
|
setup(t) {
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
26
|
+
const l = t, n = D(t, "modelValue"), e = E(() => {
|
|
27
|
+
if (l.showSelectAllItem)
|
|
28
28
|
return {
|
|
29
29
|
icon: "",
|
|
30
30
|
title: R().Common.Select_all,
|
|
@@ -32,50 +32,50 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
32
32
|
content: ""
|
|
33
33
|
};
|
|
34
34
|
});
|
|
35
|
-
return (i,
|
|
36
|
-
y(j).state.isMobile ? (k(),
|
|
37
|
-
opener:
|
|
35
|
+
return (i, a) => (k(), b("div", qe, [
|
|
36
|
+
y(j).state.isMobile ? (k(), _(Ie, { key: 0 }, {
|
|
37
|
+
opener: B(() => [
|
|
38
38
|
A(H, {
|
|
39
39
|
class: "top-selectorCompetitors_opener",
|
|
40
40
|
color: "theme",
|
|
41
41
|
icon: "",
|
|
42
42
|
icon2: ""
|
|
43
43
|
}, {
|
|
44
|
-
default:
|
|
45
|
-
var
|
|
44
|
+
default: B(() => {
|
|
45
|
+
var o;
|
|
46
46
|
return [
|
|
47
|
-
G(K((
|
|
47
|
+
G(K((o = i.items.find((u) => {
|
|
48
48
|
var f;
|
|
49
|
-
return u.value === ((f =
|
|
50
|
-
})) == null ? void 0 :
|
|
49
|
+
return u.value === ((f = n.value) == null ? void 0 : f[0]);
|
|
50
|
+
})) == null ? void 0 : o.content), 1)
|
|
51
51
|
];
|
|
52
52
|
}),
|
|
53
53
|
_: 1
|
|
54
54
|
})
|
|
55
55
|
]),
|
|
56
|
-
contentList:
|
|
57
|
-
(k(!0),
|
|
56
|
+
contentList: B(() => [
|
|
57
|
+
(k(!0), b(Y, null, se(i.items, (o) => {
|
|
58
58
|
var u;
|
|
59
|
-
return k(),
|
|
59
|
+
return k(), _(ue, {
|
|
60
60
|
class: X({
|
|
61
|
-
"top-active": (u =
|
|
61
|
+
"top-active": (u = n.value) == null ? void 0 : u.includes(o.value)
|
|
62
62
|
}),
|
|
63
|
-
"data-top-icon":
|
|
64
|
-
title:
|
|
65
|
-
onClick: () =>
|
|
63
|
+
"data-top-icon": o.icon,
|
|
64
|
+
title: o.title,
|
|
65
|
+
onClick: () => n.value = [o.value]
|
|
66
66
|
}, {
|
|
67
|
-
default:
|
|
68
|
-
he("span",
|
|
67
|
+
default: B(() => [
|
|
68
|
+
he("span", Ue, K(o.content), 1)
|
|
69
69
|
]),
|
|
70
70
|
_: 2
|
|
71
71
|
}, 1032, ["class", "data-top-icon", "title", "onClick"]);
|
|
72
72
|
}), 256))
|
|
73
73
|
]),
|
|
74
74
|
_: 1
|
|
75
|
-
})) : (k(),
|
|
75
|
+
})) : (k(), _(Ae, {
|
|
76
76
|
key: 1,
|
|
77
|
-
modelValue:
|
|
78
|
-
"onUpdate:modelValue":
|
|
77
|
+
modelValue: n.value,
|
|
78
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => n.value = o),
|
|
79
79
|
items: i.items,
|
|
80
80
|
isMultiple: !0,
|
|
81
81
|
styling: "bar",
|
|
@@ -84,12 +84,12 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
84
84
|
}, null, 8, ["modelValue", "items", "selectAllItem"]))
|
|
85
85
|
]));
|
|
86
86
|
}
|
|
87
|
-
}), ft = (t,
|
|
87
|
+
}), ft = (t, l) => E(() => de(t).filter((i) => i.on >= 0 || i.id === l).map((i) => ({
|
|
88
88
|
value: i.id,
|
|
89
89
|
title: i.url + ` [${i.id}]`,
|
|
90
|
-
icon: i.id === de(
|
|
90
|
+
icon: i.id === de(l) ? "" : "",
|
|
91
91
|
content: i.name
|
|
92
|
-
}))), M = -1, p = -2, te = -1,
|
|
92
|
+
}))), M = -1, p = -2, te = -1, Pe = {
|
|
93
93
|
0: "Yandex",
|
|
94
94
|
1: "Google",
|
|
95
95
|
4: "YouTube",
|
|
@@ -112,7 +112,7 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
112
112
|
key: p,
|
|
113
113
|
name: "Autoselect",
|
|
114
114
|
index: p
|
|
115
|
-
},
|
|
115
|
+
}, ne = {
|
|
116
116
|
key: p,
|
|
117
117
|
name: "Autoselect",
|
|
118
118
|
regions: [le],
|
|
@@ -125,209 +125,209 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
125
125
|
index: te,
|
|
126
126
|
lang: "ru",
|
|
127
127
|
name: "Without region"
|
|
128
|
-
}, ze = () => (le.name = R().Common.Autoselect, le), Je = () => (ze(),
|
|
128
|
+
}, ze = () => (le.name = R().Common.Autoselect, le), Je = () => (ze(), ne.name = R().Common.Autoselect, console.log(ne), ne), je = () => (fe.name = R().Keywords.Without_region, fe), ke = (t = !1, l = !1, n = []) => {
|
|
129
129
|
let e;
|
|
130
|
-
return t ? e = Ge(
|
|
131
|
-
},
|
|
130
|
+
return t ? e = Ge(n) : e = Te(n), l && e.set(p, Je()), e.size || e.set(p, xe), e;
|
|
131
|
+
}, Te = (t, l = !0, n = [], e = !1) => {
|
|
132
132
|
const i = /* @__PURE__ */ new Map();
|
|
133
|
-
return t.forEach((
|
|
134
|
-
if (!
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
if (
|
|
133
|
+
return t.forEach((a) => {
|
|
134
|
+
if (!a.enabled || e && typeof a.key == "number" && a.key > 1) return;
|
|
135
|
+
const o = { ...a };
|
|
136
|
+
o.regionByIndex = /* @__PURE__ */ new Map(), a.regions && a.regions.forEach((u) => {
|
|
137
|
+
if (l && !u.enabled) return;
|
|
138
138
|
const f = { ...u };
|
|
139
|
-
|
|
140
|
-
}), !
|
|
141
|
-
(!
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}),
|
|
145
|
-
if (i.has(
|
|
146
|
-
const
|
|
147
|
-
key:
|
|
148
|
-
name:
|
|
139
|
+
o.regionByIndex.set(f.index, f);
|
|
140
|
+
}), !o.regionByIndex.size && n.length, // режим вывода ПС без регионов
|
|
141
|
+
(!a.regions || // есть включенные регионы
|
|
142
|
+
o.regionByIndex.size || // запрошен вывод конкретных ПС
|
|
143
|
+
n.length) && typeof o.key == "number" && i.set(o.key, o);
|
|
144
|
+
}), n.forEach((a) => {
|
|
145
|
+
if (i.has(a)) return;
|
|
146
|
+
const o = {
|
|
147
|
+
key: a,
|
|
148
|
+
name: Pe[a],
|
|
149
149
|
regions: [],
|
|
150
150
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
151
151
|
};
|
|
152
|
-
i.set(
|
|
152
|
+
i.set(o.key, o);
|
|
153
153
|
}), i;
|
|
154
154
|
}, Ge = (t) => {
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
157
|
-
const
|
|
158
|
-
|
|
155
|
+
const l = Te(t, !1, [0, 1], !0);
|
|
156
|
+
if (l.has(2)) {
|
|
157
|
+
const n = l.get(2);
|
|
158
|
+
n && (n.regionByIndex = /* @__PURE__ */ new Map());
|
|
159
159
|
}
|
|
160
|
-
return
|
|
161
|
-
if (!
|
|
160
|
+
return l.forEach((n) => {
|
|
161
|
+
if (!n.regionByIndex) return;
|
|
162
162
|
const e = { ...je() };
|
|
163
|
-
|
|
164
|
-
}),
|
|
165
|
-
}, We = (t,
|
|
166
|
-
const e = ke(t, !1,
|
|
163
|
+
n.regionByIndex.set(e.index, e);
|
|
164
|
+
}), l;
|
|
165
|
+
}, We = (t, l, n = []) => {
|
|
166
|
+
const e = ke(t, !1, n);
|
|
167
167
|
let i;
|
|
168
|
-
return e.forEach((
|
|
169
|
-
if (!(
|
|
170
|
-
if (!i && !(
|
|
171
|
-
return
|
|
168
|
+
return e.forEach((a) => {
|
|
169
|
+
if (!(l.searcher_key !== void 0 && l.searcher_key != a.key) && a.regions && (a.regions.forEach((o) => {
|
|
170
|
+
if (!i && !(l.key !== void 0 && l.key != o.key) && !(l.index !== void 0 && l.index != o.index) && !(!t && (l.lang !== void 0 && l.lang != o.lang || l.device !== void 0 && l.device != o.device)))
|
|
171
|
+
return o.searcher_key = a.key, i = o, !1;
|
|
172
172
|
}), i))
|
|
173
173
|
return !1;
|
|
174
174
|
}), i;
|
|
175
|
-
}, Ye = Re(() => import("../.chunks/dialog_selectorRegions-
|
|
176
|
-
const
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
175
|
+
}, Ye = Re(() => import("../.chunks/dialog_selectorRegions-BYuC3Yqz.es.js")), He = (t, l) => {
|
|
176
|
+
const n = R(), e = F(l.value.keys().next().value ?? p), i = E(() => {
|
|
177
|
+
const a = /* @__PURE__ */ new Map();
|
|
178
|
+
if (l.value.forEach((o) => {
|
|
179
179
|
let u = {
|
|
180
|
-
value:
|
|
181
|
-
title:
|
|
180
|
+
value: o.key,
|
|
181
|
+
title: o.name
|
|
182
182
|
};
|
|
183
|
-
t.addSearcherIcon && (u.icon = Oe(
|
|
184
|
-
}), t.addCompare && !
|
|
185
|
-
const
|
|
183
|
+
t.addSearcherIcon && (u.icon = Oe(o.key)), a.set(o.key, u);
|
|
184
|
+
}), t.addCompare && !a.has(p)) {
|
|
185
|
+
const o = {
|
|
186
186
|
value: "",
|
|
187
187
|
title: "--------------------",
|
|
188
188
|
disabled: !0
|
|
189
189
|
};
|
|
190
|
-
|
|
190
|
+
a.set(o.value, o);
|
|
191
191
|
const u = {
|
|
192
192
|
value: M,
|
|
193
|
-
title:
|
|
193
|
+
title: n.Common.Compare
|
|
194
194
|
};
|
|
195
|
-
|
|
195
|
+
a.set(u.value, u);
|
|
196
196
|
}
|
|
197
|
-
return
|
|
197
|
+
return a;
|
|
198
198
|
});
|
|
199
199
|
return {
|
|
200
200
|
searcherKey: e,
|
|
201
201
|
optionBySearcherKey: i
|
|
202
202
|
};
|
|
203
|
-
}, Qe = (t,
|
|
204
|
-
var
|
|
205
|
-
const
|
|
206
|
-
t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value === p && (t.forFrequency ? e.value = ((
|
|
203
|
+
}, Qe = (t, l) => {
|
|
204
|
+
var a, o, u;
|
|
205
|
+
const n = R(), e = F(p);
|
|
206
|
+
t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value === p && (t.forFrequency ? e.value = ((o = (a = l.value) == null ? void 0 : a.regionByIndex.values().next().value) == null ? void 0 : o.key) ?? p : e.value = ((u = l.value) == null ? void 0 : u.regionByIndex.keys().next().value) ?? p);
|
|
207
207
|
const i = E(() => {
|
|
208
208
|
var h;
|
|
209
209
|
const f = /* @__PURE__ */ new Map();
|
|
210
|
-
return (h =
|
|
211
|
-
let r =
|
|
210
|
+
return (h = l.value.regionByIndex) == null || h.forEach((S) => {
|
|
211
|
+
let r = S.name;
|
|
212
212
|
if (t.forFrequency) {
|
|
213
213
|
const x = {
|
|
214
|
-
value:
|
|
214
|
+
value: S.key,
|
|
215
215
|
title: r
|
|
216
216
|
};
|
|
217
|
-
f.has(
|
|
217
|
+
f.has(S.key) || f.set(S.key, x);
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
|
|
221
|
-
const g = Ne(
|
|
220
|
+
S.device && (r += " (" + n.Common["Device_" + S.device] + ")");
|
|
221
|
+
const g = Ne(l.value.key || 0, S.lang ?? "");
|
|
222
222
|
g && (r += " / " + g);
|
|
223
223
|
const d = {
|
|
224
|
-
value:
|
|
224
|
+
value: S.index,
|
|
225
225
|
title: r,
|
|
226
|
-
icon:
|
|
226
|
+
icon: S.device ? De(S.device) : void 0
|
|
227
227
|
};
|
|
228
|
-
f.set(
|
|
228
|
+
f.set(S.index, d);
|
|
229
229
|
}), f;
|
|
230
230
|
});
|
|
231
231
|
return w(i, (f, h) => {
|
|
232
232
|
var d;
|
|
233
233
|
if (t.onlySearcher || e.value !== void 0 && f.get(e.value))
|
|
234
234
|
return;
|
|
235
|
-
let
|
|
236
|
-
if (e.value === p ||
|
|
237
|
-
e.value =
|
|
235
|
+
let S = f.keys().next().value;
|
|
236
|
+
if (e.value === p || S === p) {
|
|
237
|
+
e.value = S;
|
|
238
238
|
return;
|
|
239
239
|
}
|
|
240
240
|
let r = ((d = h == null ? void 0 : h.get(e.value)) == null ? void 0 : d.title) || "", g = -1;
|
|
241
|
-
for (const [x,
|
|
242
|
-
const
|
|
243
|
-
if (typeof
|
|
241
|
+
for (const [x, C] of f.entries()) {
|
|
242
|
+
const T = C.title;
|
|
243
|
+
if (typeof T != "string" || typeof x == "string")
|
|
244
244
|
break;
|
|
245
|
-
if (
|
|
246
|
-
|
|
245
|
+
if (T === r) {
|
|
246
|
+
S = x;
|
|
247
247
|
break;
|
|
248
248
|
}
|
|
249
|
-
const V = new RegExp(` \\((${
|
|
249
|
+
const V = new RegExp(` \\((${n.Common.Device_1}|${n.Common.Device_2})\\)`);
|
|
250
250
|
let m = r, s = 3;
|
|
251
|
-
|
|
251
|
+
T.indexOf(m) === -1 && (m = r.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), T.indexOf(m) === -1 && (m = r.replace(/ \/.*/, ""), s--), T.indexOf(m) === -1 && (m = r.replace(/ \/.*/, ""), m = m.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), T.indexOf(m) !== -1 && (s <= g || (g = s, S = x));
|
|
252
252
|
}
|
|
253
|
-
e.value =
|
|
253
|
+
e.value = S;
|
|
254
254
|
}), {
|
|
255
255
|
regionIndex: e,
|
|
256
256
|
optionByRegionIndex: i
|
|
257
257
|
};
|
|
258
|
-
}, Xe = (t,
|
|
258
|
+
}, Xe = (t, l, n) => {
|
|
259
259
|
const e = F([]), i = () => {
|
|
260
|
-
if (t.onlySearcher &&
|
|
261
|
-
e.value = Array.from(
|
|
260
|
+
if (t.onlySearcher && l.value) {
|
|
261
|
+
e.value = Array.from(l.value.keys());
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
|
-
let
|
|
264
|
+
let o = [];
|
|
265
265
|
if (t.modelValue.length > 1)
|
|
266
|
-
|
|
266
|
+
o = [...t.modelValue];
|
|
267
267
|
else
|
|
268
268
|
try {
|
|
269
|
-
|
|
269
|
+
o = JSON.parse(
|
|
270
270
|
localStorage.getItem("ui:project:regionSelector" + t.projectId + ":regionsIndexes")
|
|
271
271
|
) ?? [];
|
|
272
272
|
} catch {
|
|
273
273
|
}
|
|
274
|
-
|
|
275
|
-
},
|
|
274
|
+
o.length && (o = o.filter((u) => n.value.has(u))), o.length || (o = Array.from(n.value)), e.value = [...o];
|
|
275
|
+
}, a = () => {
|
|
276
276
|
e.value.length ? localStorage.setItem("ui:project:regionSelector:" + t.projectId + ":regionsIndexes", JSON.stringify(e.value)) : localStorage.removeItem("ui:project:regionSelector:" + t.projectId + ":regionsIndexes");
|
|
277
277
|
};
|
|
278
278
|
return w(e, () => {
|
|
279
|
-
|
|
279
|
+
a();
|
|
280
280
|
}), t.addCompare && i(), {
|
|
281
281
|
regionsIndexes: e
|
|
282
282
|
};
|
|
283
283
|
}, Ze = (t) => {
|
|
284
|
-
const
|
|
284
|
+
const l = E(() => ke(t.forFrequency, t.autoRegion, t.searchers)), n = E(() => l.value.get(i.searcherKey.value) || xe), e = E(() => {
|
|
285
285
|
const r = /* @__PURE__ */ new Set();
|
|
286
|
-
return
|
|
286
|
+
return l.value.forEach((g) => {
|
|
287
287
|
g.regionByIndex.forEach((d) => {
|
|
288
288
|
d.index !== te && d.index !== p && r.add(d.index);
|
|
289
289
|
});
|
|
290
290
|
}), r;
|
|
291
|
-
}), i = He(t,
|
|
292
|
-
w(
|
|
293
|
-
var g, d, x,
|
|
294
|
-
if (t.onlySearcher ?
|
|
295
|
-
let r =
|
|
296
|
-
|
|
291
|
+
}), i = He(t, l), a = Qe(t, n), o = Xe(t, l, e);
|
|
292
|
+
w(l, () => {
|
|
293
|
+
var g, d, x, C;
|
|
294
|
+
if (t.onlySearcher ? o.regionsIndexes.value = Array.from(l.value.keys()) : o.regionsIndexes.value = o.regionsIndexes.value.filter((T) => e.value.has(T)), i.searcherKey.value === M) return;
|
|
295
|
+
let r = l.value.keys().next().value;
|
|
296
|
+
l.value.forEach((T) => {
|
|
297
297
|
var V, m, s;
|
|
298
|
-
if (t.onlySearcher &&
|
|
298
|
+
if (t.onlySearcher && T.key === i.searcherKey.value) {
|
|
299
299
|
r = i.searcherKey.value;
|
|
300
300
|
return;
|
|
301
301
|
}
|
|
302
|
-
if (
|
|
302
|
+
if (a.regionIndex.value && ((V = T.regionByIndex) != null && V.has(a.regionIndex.value)) && (r = T.key), !t.onlySearcher) {
|
|
303
303
|
let c;
|
|
304
|
-
r !== void 0 && (c = (m =
|
|
305
|
-
const v = (s =
|
|
306
|
-
c != null && c.has(p) && !(v != null && v.has(p)) && (r =
|
|
304
|
+
r !== void 0 && (c = (m = l.value.get(r)) == null ? void 0 : m.regionByIndex);
|
|
305
|
+
const v = (s = l.value.get(T.key)) == null ? void 0 : s.regionByIndex;
|
|
306
|
+
c != null && c.has(p) && !(v != null && v.has(p)) && (r = T.key);
|
|
307
307
|
}
|
|
308
|
-
}), r !== void 0 && (i.searcherKey.value = r),
|
|
308
|
+
}), r !== void 0 && (i.searcherKey.value = r), a.regionIndex.value !== void 0 && !((d = (g = n.value) == null ? void 0 : g.regionByIndex) != null && d.has(a.regionIndex.value)) && (a.regionIndex.value = (C = (x = n.value) == null ? void 0 : x.regions) == null ? void 0 : C.keys().next().value);
|
|
309
309
|
}, { immediate: !0 });
|
|
310
310
|
const u = () => {
|
|
311
311
|
if (!(i.searcherKey.value === M || i.searcherKey.value === p))
|
|
312
312
|
return i.searcherKey.value;
|
|
313
313
|
}, f = () => {
|
|
314
|
-
if (t.onlySearcher ||
|
|
315
|
-
let r =
|
|
314
|
+
if (t.onlySearcher || a.regionIndex.value === p) return;
|
|
315
|
+
let r = a.regionIndex.value;
|
|
316
316
|
if (t.forFrequency) {
|
|
317
|
-
const g =
|
|
317
|
+
const g = a.regionIndex.value, d = We(t.forFrequency, { searcher_key: u(), key: g }, t.searchers);
|
|
318
318
|
r = d == null ? void 0 : d.index;
|
|
319
319
|
}
|
|
320
320
|
return r;
|
|
321
321
|
}, h = () => {
|
|
322
322
|
const r = u();
|
|
323
323
|
if (r !== void 0)
|
|
324
|
-
return
|
|
324
|
+
return l.value.get(r);
|
|
325
325
|
};
|
|
326
326
|
return {
|
|
327
327
|
selectSearcher: i,
|
|
328
|
-
selectRegion:
|
|
329
|
-
compare:
|
|
330
|
-
searcherByKey:
|
|
328
|
+
selectRegion: a,
|
|
329
|
+
compare: o,
|
|
330
|
+
searcherByKey: l,
|
|
331
331
|
allRegionsIndexes: e,
|
|
332
332
|
getSearcher: h,
|
|
333
333
|
getRegion: () => {
|
|
@@ -337,7 +337,7 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
337
337
|
return (d = (g = h()) == null ? void 0 : g.regionByIndex) == null ? void 0 : d.get(r);
|
|
338
338
|
}
|
|
339
339
|
};
|
|
340
|
-
}, vt = /* @__PURE__ */
|
|
340
|
+
}, vt = /* @__PURE__ */ U({
|
|
341
341
|
__name: "selectorRegion",
|
|
342
342
|
props: /* @__PURE__ */ N({
|
|
343
343
|
projectId: {},
|
|
@@ -358,20 +358,20 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
358
358
|
modelValueSingleModifiers: {}
|
|
359
359
|
}),
|
|
360
360
|
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
361
|
-
setup(t, { expose:
|
|
362
|
-
const
|
|
363
|
-
selectSearcher:
|
|
364
|
-
selectRegion:
|
|
361
|
+
setup(t, { expose: l }) {
|
|
362
|
+
const n = t, e = D(t, "modelValue"), i = D(t, "modelValueSingle"), {
|
|
363
|
+
selectSearcher: a,
|
|
364
|
+
selectRegion: o,
|
|
365
365
|
compare: u,
|
|
366
366
|
searcherByKey: f,
|
|
367
367
|
allRegionsIndexes: h,
|
|
368
|
-
getSearcher:
|
|
368
|
+
getSearcher: S,
|
|
369
369
|
getRegion: r
|
|
370
|
-
} = Ze(
|
|
370
|
+
} = Ze(n), g = () => {
|
|
371
371
|
const d = [];
|
|
372
372
|
f.value.forEach((x) => {
|
|
373
|
-
x.enabled && x.regions.forEach((
|
|
374
|
-
|
|
373
|
+
x.enabled && x.regions.forEach((C) => {
|
|
374
|
+
C.enabled && d.push(C);
|
|
375
375
|
});
|
|
376
376
|
}), Ye.open("selectorRegions", {
|
|
377
377
|
regions: d,
|
|
@@ -379,22 +379,22 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
379
379
|
"@update:regionsIndexes": (x) => u.regionsIndexes.value = x
|
|
380
380
|
});
|
|
381
381
|
};
|
|
382
|
-
return w([
|
|
383
|
-
if (
|
|
382
|
+
return w([o.regionIndex, a.searcherKey, u.regionsIndexes], () => {
|
|
383
|
+
if (a.searcherKey.value === M && u.regionsIndexes.value.length) {
|
|
384
384
|
if (JSON.stringify(e.value) === JSON.stringify(u.regionsIndexes.value))
|
|
385
385
|
return;
|
|
386
386
|
e.value = [...u.regionsIndexes.value];
|
|
387
387
|
} else
|
|
388
|
-
|
|
389
|
-
!
|
|
388
|
+
n.onlySearcher ? (e.value = [a.searcherKey.value], a.searcherKey.value === p && !n.autoRegion && (e.value.length = 0)) : (e.value = [o.regionIndex.value], o.regionIndex.value === p && !n.autoRegion && (e.value.length = 0));
|
|
389
|
+
!n.onlySearcher && !h.value.size && (a.searcherKey.value = p);
|
|
390
390
|
}), i.value && w(i, () => {
|
|
391
391
|
i.value && (e.value = [i.value]);
|
|
392
392
|
}, { immediate: !0 }), w(e, () => {
|
|
393
|
-
var d, x,
|
|
394
|
-
if (e.value[0] && (i.value = e.value[0]),
|
|
395
|
-
if (!e.value.length || e.value.length === 1 && !f.value.has(e.value[0]) || e.value.length === 1 && e.value[0] === p && !
|
|
393
|
+
var d, x, C, T, V;
|
|
394
|
+
if (e.value[0] && (i.value = e.value[0]), n.onlySearcher) {
|
|
395
|
+
if (!e.value.length || e.value.length === 1 && !f.value.has(e.value[0]) || e.value.length === 1 && e.value[0] === p && !n.autoRegion) {
|
|
396
396
|
let m = f.value.keys().next().value;
|
|
397
|
-
m === p && !
|
|
397
|
+
m === p && !n.autoRegion && (m = void 0, i.value = p), m !== void 0 ? e.value = [m] : e.value.length = 0;
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
400
|
if (e.value.length > 1 && JSON.stringify(e.value) !== JSON.stringify(u.regionsIndexes.value)) {
|
|
@@ -403,13 +403,13 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
403
403
|
}
|
|
404
404
|
} else {
|
|
405
405
|
let m = [...new Set(e.value)], s = (x = (d = f.value.values().next().value) == null ? void 0 : d.regionByIndex) == null ? void 0 : x.keys().next().value;
|
|
406
|
-
if (
|
|
406
|
+
if (n.forFrequency && (s = (V = (T = (C = f.value.values().next().value) == null ? void 0 : C.regionByIndex) == null ? void 0 : T.values().next().value) == null ? void 0 : V.key), s === p && !n.autoRegion && (s = void 0, i.value = p), !m.length)
|
|
407
407
|
s !== void 0 && m.push(s);
|
|
408
408
|
else if (m.length === 1) {
|
|
409
409
|
let c = h.value;
|
|
410
|
-
|
|
411
|
-
v.regionByIndex.forEach((
|
|
412
|
-
|
|
410
|
+
n.forFrequency && (c = /* @__PURE__ */ new Set(), f.value.forEach((v) => {
|
|
411
|
+
v.regionByIndex.forEach((I) => {
|
|
412
|
+
I.index !== te && I.index !== p && c.add(I.key);
|
|
413
413
|
});
|
|
414
414
|
})), c.has(m[0]) || (m = [], s !== void 0 && m.push(s));
|
|
415
415
|
} else
|
|
@@ -419,129 +419,129 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
419
419
|
return;
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
if (!(e.value.length === 1 && e.value[0] === (
|
|
423
|
-
if (
|
|
422
|
+
if (!(e.value.length === 1 && e.value[0] === (n.onlySearcher ? a.searcherKey.value : o.regionIndex.value)))
|
|
423
|
+
if (n.onlySearcher) {
|
|
424
424
|
if (e.value.length === 1) {
|
|
425
|
-
|
|
425
|
+
a.searcherKey.value = e.value[0];
|
|
426
426
|
return;
|
|
427
427
|
}
|
|
428
|
-
|
|
428
|
+
a.searcherKey.value = M;
|
|
429
429
|
return;
|
|
430
430
|
} else {
|
|
431
431
|
if (!e.value.length)
|
|
432
432
|
return;
|
|
433
|
-
if (e.value.length === 1 &&
|
|
434
|
-
|
|
433
|
+
if (e.value.length === 1 && a.searcherKey.value !== M) {
|
|
434
|
+
o.regionIndex.value = e.value[0];
|
|
435
435
|
let m;
|
|
436
436
|
for (const s of f.value.values()) {
|
|
437
437
|
for (const c of s.regionByIndex.values())
|
|
438
|
-
if ((
|
|
438
|
+
if ((n.forFrequency ? c.key : c.index) === o.regionIndex.value) {
|
|
439
439
|
m = s.key;
|
|
440
440
|
break;
|
|
441
441
|
}
|
|
442
442
|
if (m !== void 0)
|
|
443
443
|
break;
|
|
444
444
|
}
|
|
445
|
-
m !== void 0 && (
|
|
445
|
+
m !== void 0 && (a.searcherKey.value = m);
|
|
446
446
|
} else
|
|
447
|
-
|
|
447
|
+
a.searcherKey.value = M, u.regionsIndexes.value = [...e.value];
|
|
448
448
|
}
|
|
449
|
-
}, { immediate: !0 }),
|
|
450
|
-
getSearcher:
|
|
449
|
+
}, { immediate: !0 }), l({
|
|
450
|
+
getSearcher: S,
|
|
451
451
|
getRegion: r
|
|
452
|
-
}), (d, x) => (k(),
|
|
452
|
+
}), (d, x) => (k(), b("div", {
|
|
453
453
|
class: X({
|
|
454
454
|
"top-selectorRegion": !0,
|
|
455
455
|
"top-selectorRegion-onlySearcher": d.onlySearcher
|
|
456
456
|
})
|
|
457
457
|
}, [
|
|
458
458
|
A(re, {
|
|
459
|
-
options: y(
|
|
460
|
-
modelValue: y(
|
|
461
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
459
|
+
options: y(a).optionBySearcherKey.value,
|
|
460
|
+
modelValue: y(a).searcherKey.value,
|
|
461
|
+
"onUpdate:modelValue": x[0] || (x[0] = (C) => y(a).searcherKey.value = C),
|
|
462
462
|
name: "searcher_key",
|
|
463
463
|
addChanger: d.addChanger
|
|
464
464
|
}, null, 8, ["options", "modelValue", "addChanger"]),
|
|
465
|
-
!d.onlySearcher && y(
|
|
465
|
+
!d.onlySearcher && y(a).searcherKey.value !== y(M) ? (k(), _(re, {
|
|
466
466
|
key: 0,
|
|
467
467
|
class: "top-select-region",
|
|
468
|
-
options: y(
|
|
469
|
-
modelValue: y(
|
|
470
|
-
"onUpdate:modelValue": x[1] || (x[1] = (
|
|
468
|
+
options: y(o).optionByRegionIndex.value,
|
|
469
|
+
modelValue: y(o).regionIndex.value,
|
|
470
|
+
"onUpdate:modelValue": x[1] || (x[1] = (C) => y(o).regionIndex.value = C),
|
|
471
471
|
name: d.forFrequency ? "region_key" : "region_index",
|
|
472
472
|
addChanger: d.addChanger,
|
|
473
473
|
"data-top-icon": d.addRegionIcon ? "" : void 0
|
|
474
474
|
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : q("", !0),
|
|
475
|
-
d.addCompare && !d.onlySearcher && y(
|
|
475
|
+
d.addCompare && !d.onlySearcher && y(a).searcherKey.value === y(M) ? (k(), _(H, {
|
|
476
476
|
key: 1,
|
|
477
477
|
name: "compare",
|
|
478
478
|
onClick: g,
|
|
479
479
|
"data-count-compare-regions-indexes": y(u).regionsIndexes.value.length
|
|
480
480
|
}, {
|
|
481
|
-
default:
|
|
481
|
+
default: B(() => [
|
|
482
482
|
G(K(d.$i18n.Common.Selected_regions), 1)
|
|
483
483
|
]),
|
|
484
484
|
_: 1
|
|
485
485
|
}, 8, ["data-count-compare-regions-indexes"])) : q("", !0)
|
|
486
486
|
], 2));
|
|
487
487
|
}
|
|
488
|
-
}), ve = (t) => "-" + t, Q = (t) => t[0] === "-" ? t.substring(1) : t, ae = (t,
|
|
488
|
+
}), ve = (t) => "-" + t, Q = (t) => t[0] === "-" ? t.substring(1) : t, ae = (t, l) => {
|
|
489
489
|
t = Q(t);
|
|
490
|
-
const
|
|
491
|
-
if (
|
|
492
|
-
return
|
|
493
|
-
}, yt = (t,
|
|
494
|
-
|
|
495
|
-
const e = Fe.genElPopupOpener("div",
|
|
496
|
-
return e.classList.add("top-tagSelector"), t.useTopButton && e.classList.add("top-button", "top-color_theme"), t.mode === "filter" && e.classList.add("top-tagSelector-filter"), t.mode === "setter" && !t.filters && e.classList.add("top-tagSelector-setter_single"), t.mode === "setter" && t.filters && e.classList.add("top-tagSelector-setter_several"), e.onclick = (i) => {
|
|
490
|
+
const n = l.find((e) => e.id === t);
|
|
491
|
+
if (n)
|
|
492
|
+
return n;
|
|
493
|
+
}, yt = (t, l, n) => {
|
|
494
|
+
l || (l = { id: t.id }), l.id = t.id, l.pos ??= "3", l.notch ??= !0, l.posBy ??= "fixed";
|
|
495
|
+
const e = Fe.genElPopupOpener("div", l);
|
|
496
|
+
return e.classList.add("top-tagSelector"), t.useTopButton && e.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), t.useTopButton || e.classList.add("top-tagSelector-custom"), t.mode === "filter" && e.classList.add("top-tagSelector-filter"), t.mode === "setter" && !t.filters && e.classList.add("top-tagSelector-setter_single"), t.mode === "setter" && t.filters && e.classList.add("top-tagSelector-setter_several"), e.onclick = (i) => {
|
|
497
497
|
i.preventDefault(), i.stopPropagation(), e.onclick = null;
|
|
498
|
-
const
|
|
499
|
-
model:
|
|
498
|
+
const a = F(t.modelValue), o = {
|
|
499
|
+
model: a,
|
|
500
500
|
mode: t.mode,
|
|
501
501
|
targetId: t.targetId,
|
|
502
502
|
filters: t.filters,
|
|
503
503
|
payload: t.payload
|
|
504
504
|
};
|
|
505
|
-
W(e, "topTagSelectorTarget",
|
|
506
|
-
t.modelValue =
|
|
505
|
+
W(e, "topTagSelectorTarget", o), delete e.dataset.topPopupDisabled, ce(t.modelValue) || w(a, () => {
|
|
506
|
+
t.modelValue = a.value, ee(e, t, n);
|
|
507
507
|
}), e.click();
|
|
508
|
-
}, ce(t.modelValue) ? w(t.modelValue, () => ee(e, t,
|
|
508
|
+
}, ce(t.modelValue) ? w(t.modelValue, () => ee(e, t, n)) : W(e, "topTagSelectorRender", (i) => {
|
|
509
509
|
t.modelValue = i;
|
|
510
|
-
const
|
|
511
|
-
|
|
512
|
-
}), ee(e, t,
|
|
513
|
-
}, pt = (t,
|
|
514
|
-
var
|
|
515
|
-
(
|
|
516
|
-
}, ee = (t,
|
|
510
|
+
const a = W(e, "topTagSelectorTarget");
|
|
511
|
+
a && (a.model.value = i), ee(e, t, n);
|
|
512
|
+
}), ee(e, t, n), e;
|
|
513
|
+
}, pt = (t, l) => {
|
|
514
|
+
var n;
|
|
515
|
+
(n = W(t, "topTagSelectorRender")) == null || n(l);
|
|
516
|
+
}, ee = (t, l, n) => {
|
|
517
517
|
var i;
|
|
518
|
-
const e = y(
|
|
519
|
-
if (t.classList.toggle("top-tagSelector-selectedOne", !e.length || e.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", e.length > 5),
|
|
520
|
-
t.innerHTML = `<div>${
|
|
518
|
+
const e = y(l.modelValue);
|
|
519
|
+
if (t.classList.toggle("top-tagSelector-selectedOne", !e.length || e.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", e.length > 5), l.mode === "setter" && l.filters) {
|
|
520
|
+
t.innerHTML = `<div>${n}</div>`;
|
|
521
521
|
return;
|
|
522
522
|
}
|
|
523
|
-
if (t.innerHTML = "", !e.length &&
|
|
524
|
-
const
|
|
523
|
+
if (t.innerHTML = "", !e.length && l.mode === "filter") {
|
|
524
|
+
const a = ye({
|
|
525
525
|
id: "all",
|
|
526
526
|
colorId: "",
|
|
527
527
|
name: ((i = R().Common) == null ? void 0 : i.All_tags) ?? "",
|
|
528
528
|
state: ""
|
|
529
529
|
});
|
|
530
|
-
t.append(
|
|
530
|
+
t.append(a);
|
|
531
531
|
}
|
|
532
|
-
e.forEach((
|
|
532
|
+
e.forEach((a) => {
|
|
533
533
|
var u, f;
|
|
534
|
-
const
|
|
535
|
-
id: Q(
|
|
536
|
-
colorId: ((u = ae(
|
|
537
|
-
name: ((f = ae(
|
|
538
|
-
state: Q(
|
|
534
|
+
const o = ye({
|
|
535
|
+
id: Q(a),
|
|
536
|
+
colorId: ((u = ae(a, l.tags)) == null ? void 0 : u.color_id) ?? "",
|
|
537
|
+
name: ((f = ae(a, l.tags)) == null ? void 0 : f.name) ?? "",
|
|
538
|
+
state: Q(a) === a ? "selected" : "excluded"
|
|
539
539
|
});
|
|
540
|
-
t.append(
|
|
540
|
+
t.append(o);
|
|
541
541
|
});
|
|
542
542
|
}, ye = (t) => {
|
|
543
|
-
const
|
|
544
|
-
return
|
|
543
|
+
const l = document.createElement("div");
|
|
544
|
+
return l.classList.add("top-tagSelector_tagIcon"), l.classList.toggle("top-tagSelector-active", !!t.state), l.classList.toggle("top-tagSelector-excluded", t.state === "excluded"), l.dataset.tag_id = t.id, l.dataset.tag_color_id = t.colorId, l.title = t.name, l;
|
|
545
545
|
}, et = [
|
|
546
546
|
{
|
|
547
547
|
id: "1",
|
|
@@ -593,7 +593,7 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
593
593
|
name: "Turquoise",
|
|
594
594
|
color_id: "10"
|
|
595
595
|
}
|
|
596
|
-
], tt = ["data-tag_id", "data-tag_color_id", "title"], ie = /* @__PURE__ */
|
|
596
|
+
], tt = ["data-tag_id", "data-tag_color_id", "title"], ie = /* @__PURE__ */ U({
|
|
597
597
|
__name: "tagIcon",
|
|
598
598
|
props: {
|
|
599
599
|
id: {},
|
|
@@ -602,18 +602,18 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
602
602
|
state: {}
|
|
603
603
|
},
|
|
604
604
|
setup(t) {
|
|
605
|
-
return (
|
|
605
|
+
return (l, n) => (k(), b("div", {
|
|
606
606
|
class: X({
|
|
607
607
|
"top-tagSelector_tagIcon": !0,
|
|
608
|
-
"top-tagSelector-active": !!
|
|
609
|
-
"top-tagSelector-excluded":
|
|
608
|
+
"top-tagSelector-active": !!l.state,
|
|
609
|
+
"top-tagSelector-excluded": l.state === "excluded"
|
|
610
610
|
}),
|
|
611
|
-
"data-tag_id":
|
|
612
|
-
"data-tag_color_id":
|
|
613
|
-
title:
|
|
611
|
+
"data-tag_id": l.id,
|
|
612
|
+
"data-tag_color_id": l.colorId,
|
|
613
|
+
title: l.name
|
|
614
614
|
}, null, 10, tt));
|
|
615
615
|
}
|
|
616
|
-
}), lt = ["contenteditable", "onKeydown"], pe = /* @__PURE__ */
|
|
616
|
+
}), lt = ["contenteditable", "onKeydown"], pe = /* @__PURE__ */ U({
|
|
617
617
|
__name: "tagPopupListItem",
|
|
618
618
|
props: /* @__PURE__ */ N({
|
|
619
619
|
editable: { type: Boolean },
|
|
@@ -630,26 +630,26 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
630
630
|
nameModifiers: {}
|
|
631
631
|
}),
|
|
632
632
|
emits: /* @__PURE__ */ N(["update:name", "unselect", "exclude", "select"], ["update:name"]),
|
|
633
|
-
setup(t, { emit:
|
|
634
|
-
const
|
|
633
|
+
setup(t, { emit: l }) {
|
|
634
|
+
const n = t, e = l, i = D(t, "name"), a = F(null), o = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
|
|
635
635
|
contenteditable: u.value,
|
|
636
636
|
onpaste: (g) => g.preventDefault()
|
|
637
637
|
} : {}), u = F(!1), f = async () => {
|
|
638
638
|
var g;
|
|
639
|
-
u.value = !0, await
|
|
639
|
+
u.value = !0, await Be(), (g = a.value) == null || g.focus();
|
|
640
640
|
}, h = () => {
|
|
641
641
|
var d;
|
|
642
|
-
const g = (d =
|
|
643
|
-
if (!g) return
|
|
644
|
-
|
|
645
|
-
},
|
|
646
|
-
|
|
642
|
+
const g = (d = a.value) == null ? void 0 : d.innerText;
|
|
643
|
+
if (!g) return S();
|
|
644
|
+
a.value && (a.value.innerText = g), u.value = !1, e("update:name", g);
|
|
645
|
+
}, S = async () => {
|
|
646
|
+
a.value && (a.value.innerText = n.name), u.value = !1;
|
|
647
647
|
}, r = (g) => {
|
|
648
|
-
if (u.value ||
|
|
648
|
+
if (u.value || n.disabled) return;
|
|
649
649
|
let d = "selected";
|
|
650
|
-
|
|
650
|
+
n.canExclude && (g.ctrlKey || g.metaKey) && (d = "excluded"), n.state == d && (d = ""), d === "" && e("unselect"), d === "selected" && e("select"), d === "excluded" && e("exclude");
|
|
651
651
|
};
|
|
652
|
-
return (g, d) => (k(),
|
|
652
|
+
return (g, d) => (k(), _(ue, {
|
|
653
653
|
class: X({
|
|
654
654
|
"top-tagSelector_tagListItem": !0,
|
|
655
655
|
"top-tagSelector_tagListItem-inEdit": u.value,
|
|
@@ -660,31 +660,31 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
660
660
|
}),
|
|
661
661
|
onClick: J(r, ["stop"])
|
|
662
662
|
}, {
|
|
663
|
-
default:
|
|
663
|
+
default: B(() => [
|
|
664
664
|
A(ie, {
|
|
665
665
|
id: g.id,
|
|
666
666
|
name: i.value,
|
|
667
667
|
colorId: g.colorId,
|
|
668
668
|
state: g.state
|
|
669
669
|
}, null, 8, ["id", "name", "colorId", "state"]),
|
|
670
|
-
he("span",
|
|
670
|
+
he("span", Se({
|
|
671
671
|
ref_key: "elName",
|
|
672
|
-
ref:
|
|
672
|
+
ref: a,
|
|
673
673
|
class: "top-tagSelector_tagListItemName",
|
|
674
674
|
contenteditable: u.value ? "plaintext-only" : !1
|
|
675
|
-
},
|
|
675
|
+
}, o.value, {
|
|
676
676
|
onKeydown: [
|
|
677
677
|
ge(J(h, ["stop"]), ["enter"]),
|
|
678
|
-
ge(J(
|
|
678
|
+
ge(J(S, ["stop"]), ["esc"])
|
|
679
679
|
]
|
|
680
680
|
}), K(i.value), 17, lt),
|
|
681
|
-
g.editable ? (k(),
|
|
682
|
-
u.value ? (k(),
|
|
681
|
+
g.editable ? (k(), b(Y, { key: 0 }, [
|
|
682
|
+
u.value ? (k(), b("span", {
|
|
683
683
|
key: 1,
|
|
684
684
|
"data-top-icon": "",
|
|
685
685
|
class: "top-tagSelector_edit",
|
|
686
686
|
onClick: J(h, ["stop"])
|
|
687
|
-
})) : (k(),
|
|
687
|
+
})) : (k(), b("span", {
|
|
688
688
|
key: 0,
|
|
689
689
|
"data-top-icon": "",
|
|
690
690
|
class: "top-tagSelector_edit",
|
|
@@ -695,7 +695,7 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
695
695
|
_: 1
|
|
696
696
|
}, 8, ["class"]));
|
|
697
697
|
}
|
|
698
|
-
}), at = { key: 1 },
|
|
698
|
+
}), at = { key: 1 }, ot = /* @__PURE__ */ U({
|
|
699
699
|
inheritAttrs: !1,
|
|
700
700
|
__name: "popupOpener",
|
|
701
701
|
props: /* @__PURE__ */ N({
|
|
@@ -716,59 +716,62 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
716
716
|
}),
|
|
717
717
|
emits: ["update:modelValue"],
|
|
718
718
|
setup(t) {
|
|
719
|
-
const
|
|
720
|
-
model:
|
|
721
|
-
mode:
|
|
722
|
-
targetId:
|
|
723
|
-
filters:
|
|
724
|
-
payload:
|
|
719
|
+
const l = t, n = D(t, "modelValue"), e = l.useTopButton ? H : "div", i = l.useTopButton ? "html" : "default", a = {
|
|
720
|
+
model: n,
|
|
721
|
+
mode: l.mode,
|
|
722
|
+
targetId: l.targetId,
|
|
723
|
+
filters: l.filters,
|
|
724
|
+
payload: l.payload
|
|
725
725
|
};
|
|
726
|
-
return (
|
|
727
|
-
const f =
|
|
728
|
-
return k(),
|
|
729
|
-
default:
|
|
730
|
-
|
|
726
|
+
return (o, u) => {
|
|
727
|
+
const f = _e("top-data");
|
|
728
|
+
return k(), _(Le, { id: o.id }, {
|
|
729
|
+
default: B(() => [
|
|
730
|
+
be((k(), _(Ve(y(e)), Se({
|
|
731
731
|
class: {
|
|
732
732
|
"top-tagSelector": !0,
|
|
733
|
-
"top-tagSelector-
|
|
734
|
-
"top-tagSelector-
|
|
735
|
-
"top-
|
|
736
|
-
"top-tagSelector-
|
|
737
|
-
"top-tagSelector-
|
|
733
|
+
"top-tagSelector-useTopButton": l.useTopButton,
|
|
734
|
+
"top-tagSelector-custom": !l.useTopButton,
|
|
735
|
+
"top-as-selector": l.useTopButton,
|
|
736
|
+
"top-tagSelector-filter": l.mode === "filter",
|
|
737
|
+
"top-tagSelector-setter_single": l.mode === "setter" && !o.filters,
|
|
738
|
+
"top-tagSelector-setter_several": l.mode === "setter" && o.filters,
|
|
739
|
+
"top-tagSelector-selectedOne": !n.value.length || n.value.length === 1,
|
|
740
|
+
"top-tagSelector-toTwoLine": n.value.length > 5
|
|
738
741
|
},
|
|
739
742
|
color: "theme",
|
|
740
|
-
styling:
|
|
741
|
-
},
|
|
742
|
-
[y(i)]:
|
|
743
|
-
!
|
|
743
|
+
styling: o.styling
|
|
744
|
+
}, o.$attrs), {
|
|
745
|
+
[y(i)]: B(() => [
|
|
746
|
+
!n.value.length && o.mode === "filter" ? (k(), _(ie, {
|
|
744
747
|
key: 0,
|
|
745
748
|
id: "all",
|
|
746
749
|
colorId: "",
|
|
747
|
-
name:
|
|
750
|
+
name: o.$i18n.Common.All_tags ?? "",
|
|
748
751
|
state: ""
|
|
749
752
|
}, null, 8, ["name"])) : q("", !0),
|
|
750
|
-
|
|
751
|
-
Ee(
|
|
752
|
-
])) : (k(!0),
|
|
753
|
-
var
|
|
754
|
-
return k(),
|
|
753
|
+
o.mode === "setter" && o.filters ? (k(), b("div", at, [
|
|
754
|
+
Ee(o.$slots, "default")
|
|
755
|
+
])) : (k(!0), b(Y, { key: 2 }, se(n.value, (h) => {
|
|
756
|
+
var S, r;
|
|
757
|
+
return k(), _(ie, {
|
|
755
758
|
id: y(Q)(h),
|
|
756
|
-
colorId: ((
|
|
757
|
-
name: ((r = y(ae)(h,
|
|
759
|
+
colorId: ((S = y(ae)(h, o.tags)) == null ? void 0 : S.color_id) ?? "",
|
|
760
|
+
name: ((r = y(ae)(h, o.tags)) == null ? void 0 : r.name) ?? "",
|
|
758
761
|
state: y(Q)(h) === h ? "selected" : "excluded"
|
|
759
762
|
}, null, 8, ["id", "colorId", "name", "state"]);
|
|
760
763
|
}), 256))
|
|
761
764
|
]),
|
|
762
765
|
_: 2
|
|
763
766
|
}, 1040, ["class", "styling"])), [
|
|
764
|
-
[f,
|
|
767
|
+
[f, a, "topTagSelectorTarget"]
|
|
765
768
|
])
|
|
766
769
|
]),
|
|
767
770
|
_: 3
|
|
768
771
|
}, 8, ["id"]);
|
|
769
772
|
};
|
|
770
773
|
}
|
|
771
|
-
}), ht = /* @__PURE__ */
|
|
774
|
+
}), ht = /* @__PURE__ */ U({
|
|
772
775
|
__name: "tagSelector",
|
|
773
776
|
props: /* @__PURE__ */ N({
|
|
774
777
|
modelValue: {},
|
|
@@ -780,6 +783,7 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
780
783
|
requiredForSetter: { type: Boolean, default: !0 },
|
|
781
784
|
maxTagsForSetter: {},
|
|
782
785
|
emitDelay: { default: 500 },
|
|
786
|
+
useTopButton: { type: Boolean, default: !0 },
|
|
783
787
|
styling: {}
|
|
784
788
|
}, {
|
|
785
789
|
modelValue: {
|
|
@@ -792,15 +796,15 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
792
796
|
tagsModifiers: {}
|
|
793
797
|
}),
|
|
794
798
|
emits: /* @__PURE__ */ N(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
|
|
795
|
-
setup(t, { emit:
|
|
796
|
-
const
|
|
797
|
-
|
|
799
|
+
setup(t, { emit: l }) {
|
|
800
|
+
const n = R(), e = t, i = D(t, "modelValue"), a = D(t, "tags"), o = l, u = we((s, c) => {
|
|
801
|
+
o(s, c);
|
|
798
802
|
}, e.emitDelay);
|
|
799
|
-
e.singleMode && !i.value.length && (i.value = [
|
|
800
|
-
const f = e.id ?? "top-popup-id-" + Math.random(), h = F("add"),
|
|
803
|
+
e.singleMode && !i.value.length && (i.value = [a.value[0].id]);
|
|
804
|
+
const f = e.id ?? "top-popup-id-" + Math.random(), h = F("add"), S = () => {
|
|
801
805
|
var v;
|
|
802
|
-
const s = " " + ((v =
|
|
803
|
-
return c.set("add", { value: "add", title:
|
|
806
|
+
const s = " " + ((v = n.Common.Tags) == null ? void 0 : v.toLowerCase()), c = /* @__PURE__ */ new Map();
|
|
807
|
+
return c.set("add", { value: "add", title: n.Common.Add + s }), c.set("replace", { value: "replace", title: n.Common.Replace + s }), c.set("delete", { value: "delete", title: n.Common.Delete + s }), c;
|
|
804
808
|
};
|
|
805
809
|
let r = Me({
|
|
806
810
|
model: i,
|
|
@@ -823,28 +827,28 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
823
827
|
return s === "all" && !r.value.model.value.length ? "selected" : "";
|
|
824
828
|
}, x = (s, c) => {
|
|
825
829
|
const v = ve(s);
|
|
826
|
-
let
|
|
827
|
-
c === "select" &&
|
|
830
|
+
let I = r.value.model.value.filter((L) => L !== s && L !== v);
|
|
831
|
+
c === "select" && I.push(s), c === "exclude" && I.push(v), r.value.mode === "setter" && r.value.targetId !== void 0 && e.requiredForSetter && (I.length || I.push("1"), I.length === 2 && r.value.model.value.length === 1 && r.value.model.value[0] === "1" && (I = I.filter((L) => L !== "1"))), e.singleMode && !r.value.filters && (I.length || (I = r.value.model.value), I.length > 1 && (I = [I[I.length - 1]])), I.sort((L, P) => {
|
|
828
832
|
if (!e.tags) return 0;
|
|
829
|
-
const Z = e.tags.findIndex((O) => O.id === L), z = e.tags.findIndex((O) => O.id ===
|
|
833
|
+
const Z = e.tags.findIndex((O) => O.id === L), z = e.tags.findIndex((O) => O.id === P);
|
|
830
834
|
return Z - z;
|
|
831
|
-
}), r.value.model.value =
|
|
832
|
-
tagsIds:
|
|
835
|
+
}), r.value.model.value = I, r.value.mode === "setter" && r.value.targetId !== void 0 && u("setter", {
|
|
836
|
+
tagsIds: I,
|
|
833
837
|
targetId: r.value.targetId,
|
|
834
838
|
payload: r.value.payload
|
|
835
839
|
});
|
|
836
|
-
},
|
|
840
|
+
}, C = E(() => {
|
|
837
841
|
let s = "top-tagSelector_popup";
|
|
838
842
|
return r.value.mode === "filter" && (s += " top-tagSelector_popup-filter"), r.value.mode === "setter" && (s += " top-tagSelector_popup-setter"), s;
|
|
839
|
-
}),
|
|
843
|
+
}), T = () => {
|
|
840
844
|
const s = prompt("", "New tag");
|
|
841
845
|
if (!s || s === "New tag") return;
|
|
842
|
-
const c =
|
|
843
|
-
|
|
846
|
+
const c = a.value.length + 1;
|
|
847
|
+
a.value.push({
|
|
844
848
|
id: String(c),
|
|
845
849
|
name: s,
|
|
846
850
|
color_id: String((c - 1) % 10 + 1)
|
|
847
|
-
}),
|
|
851
|
+
}), o("tagsChanged", a.value);
|
|
848
852
|
}, V = (s) => {
|
|
849
853
|
var c;
|
|
850
854
|
if (r.value = W(s.elPopupOpener, "topTagSelectorTarget"), !r.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
@@ -852,50 +856,49 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
852
856
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
853
857
|
return;
|
|
854
858
|
}
|
|
855
|
-
!j.state.isMobile && !j.state.isMobileUA &&
|
|
859
|
+
!j.state.isMobile && !j.state.isMobileUA && a.value && $(s.elPopup).sortable({
|
|
856
860
|
items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
|
|
857
861
|
/**
|
|
858
862
|
* @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
|
|
859
863
|
*/
|
|
860
864
|
cancel: '[contenteditable="plaintext-only"], [contenteditable="true"]',
|
|
861
865
|
distance: 10,
|
|
862
|
-
stop: function(v,
|
|
863
|
-
if (!
|
|
864
|
-
const L = $(
|
|
866
|
+
stop: function(v, I) {
|
|
867
|
+
if (!a.value) return;
|
|
868
|
+
const L = $(I.item).parent().find("[data-tag_id]"), P = [];
|
|
865
869
|
L.each((Z, z) => {
|
|
866
|
-
if (!
|
|
870
|
+
if (!a.value) return;
|
|
867
871
|
const O = $(z).attr("data-tag_id");
|
|
868
|
-
|
|
869
|
-
}),
|
|
870
|
-
const O =
|
|
871
|
-
return O -
|
|
872
|
-
}), u("tagsChanged",
|
|
872
|
+
P.push(O);
|
|
873
|
+
}), a.value.sort((Z, z) => {
|
|
874
|
+
const O = P.findIndex((oe) => oe === Z.id), Ce = P.findIndex((oe) => oe === z.id);
|
|
875
|
+
return O - Ce;
|
|
876
|
+
}), u("tagsChanged", a.value);
|
|
873
877
|
}
|
|
874
878
|
});
|
|
875
879
|
}, m = (s) => {
|
|
876
880
|
var c;
|
|
877
881
|
(c = j.$) != null && c.ui.sortable && $(s.elPopup).data("ui-sortable") && $(s.elPopup).sortable("destroy");
|
|
878
882
|
};
|
|
879
|
-
return (s, c) => (k(),
|
|
880
|
-
A(
|
|
881
|
-
class: "top-as-selector",
|
|
883
|
+
return (s, c) => (k(), b(Y, null, [
|
|
884
|
+
A(ot, {
|
|
882
885
|
modelValue: i.value,
|
|
883
886
|
"onUpdate:modelValue": c[0] || (c[0] = (v) => i.value = v),
|
|
884
887
|
id: y(f),
|
|
885
|
-
tags:
|
|
888
|
+
tags: a.value,
|
|
886
889
|
styling: s.styling,
|
|
887
890
|
mode: "filter",
|
|
888
|
-
useTopButton:
|
|
889
|
-
}, null, 8, ["modelValue", "id", "tags", "styling"]),
|
|
890
|
-
A(
|
|
891
|
+
useTopButton: s.useTopButton
|
|
892
|
+
}, null, 8, ["modelValue", "id", "tags", "styling", "useTopButton"]),
|
|
893
|
+
A(Ie, {
|
|
891
894
|
id: y(f),
|
|
892
|
-
class: X(
|
|
895
|
+
class: X(C.value),
|
|
893
896
|
onOpen: c[4] || (c[4] = (v) => V(v)),
|
|
894
897
|
onClose: c[5] || (c[5] = (v) => m(v)),
|
|
895
898
|
"transition-duration": 50
|
|
896
899
|
}, Ke({
|
|
897
|
-
contentList:
|
|
898
|
-
y(r).mode === "filter" && !s.singleMode ? (k(),
|
|
900
|
+
contentList: B(() => [
|
|
901
|
+
y(r).mode === "filter" && !s.singleMode ? (k(), _(pe, {
|
|
899
902
|
key: 0,
|
|
900
903
|
id: "all",
|
|
901
904
|
colorId: "",
|
|
@@ -903,7 +906,7 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
903
906
|
state: y(r).model.value.length ? "" : "selected",
|
|
904
907
|
onSelect: c[3] || (c[3] = (v) => y(r).model.value = [])
|
|
905
908
|
}, null, 8, ["name", "state"])) : q("", !0),
|
|
906
|
-
(k(!0),
|
|
909
|
+
(k(!0), b(Y, null, se(a.value, (v) => (k(), _(pe, {
|
|
907
910
|
key: v.id,
|
|
908
911
|
id: v.id,
|
|
909
912
|
colorId: v.color_id,
|
|
@@ -912,19 +915,19 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
912
915
|
canExclude: y(r).mode === "filter" && !s.singleMode,
|
|
913
916
|
editable: s.tagsEditable,
|
|
914
917
|
disabled: g.value && d(v.id) === "",
|
|
915
|
-
onUnselect: (
|
|
916
|
-
onSelect: (
|
|
917
|
-
onExclude: (
|
|
918
|
-
"onUpdate:name": (
|
|
919
|
-
v.name =
|
|
918
|
+
onUnselect: (I) => x(v.id, "unselect"),
|
|
919
|
+
onSelect: (I) => x(v.id, "select"),
|
|
920
|
+
onExclude: (I) => x(v.id, "exclude"),
|
|
921
|
+
"onUpdate:name": (I) => {
|
|
922
|
+
v.name = I, y(u)("tagsChanged", a.value);
|
|
920
923
|
}
|
|
921
924
|
}, null, 8, ["id", "colorId", "name", "state", "canExclude", "editable", "disabled", "onUnselect", "onSelect", "onExclude", "onUpdate:name"]))), 128)),
|
|
922
|
-
s.tagsEditable &&
|
|
925
|
+
s.tagsEditable && a.value.length < s.tagsMax && a.value.length < 20 ? (k(), _(ue, {
|
|
923
926
|
key: 1,
|
|
924
927
|
"data-top-icon": "",
|
|
925
|
-
onClick: J(
|
|
928
|
+
onClick: J(T, ["stop"])
|
|
926
929
|
}, {
|
|
927
|
-
default:
|
|
930
|
+
default: B(() => [
|
|
928
931
|
G(K(s.$i18n.Common.Add), 1)
|
|
929
932
|
]),
|
|
930
933
|
_: 1
|
|
@@ -934,20 +937,20 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
934
937
|
}, [
|
|
935
938
|
y(r).mode === "setter" && y(r).filters ? {
|
|
936
939
|
name: "header",
|
|
937
|
-
fn:
|
|
940
|
+
fn: B(() => [
|
|
938
941
|
A(re, {
|
|
939
942
|
modelValue: h.value,
|
|
940
943
|
"onUpdate:modelValue": c[1] || (c[1] = (v) => h.value = v),
|
|
941
|
-
options:
|
|
944
|
+
options: S()
|
|
942
945
|
}, null, 8, ["modelValue", "options"])
|
|
943
946
|
]),
|
|
944
947
|
key: "0"
|
|
945
948
|
} : void 0,
|
|
946
949
|
y(r).mode === "setter" && y(r).filters ? {
|
|
947
950
|
name: "footer",
|
|
948
|
-
fn:
|
|
951
|
+
fn: B(() => [
|
|
949
952
|
A(H, { color: "theme" }, {
|
|
950
|
-
default:
|
|
953
|
+
default: B(() => [
|
|
951
954
|
G(K(s.$i18n.Common.Cancel), 1)
|
|
952
955
|
]),
|
|
953
956
|
_: 1
|
|
@@ -960,8 +963,8 @@ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }
|
|
|
960
963
|
payload: y(r).payload
|
|
961
964
|
}))
|
|
962
965
|
}, {
|
|
963
|
-
default:
|
|
964
|
-
G(K(h.value === "add" ? s.$i18n.Common.Add : "") + " " + K(h.value === "replace" ? s.$i18n.Common.Replace : "") + " " + K(h.value === "delete" ? s.$i18n.Common.
|
|
966
|
+
default: B(() => [
|
|
967
|
+
G(K(h.value === "add" ? s.$i18n.Common.Add : "") + " " + K(h.value === "replace" ? s.$i18n.Common.Replace : "") + " " + K(h.value === "delete" ? s.$i18n.Common.Delete : ""), 1)
|
|
965
968
|
]),
|
|
966
969
|
_: 1
|
|
967
970
|
})
|
|
@@ -976,7 +979,7 @@ export {
|
|
|
976
979
|
mt as TopSelectorCompetitors,
|
|
977
980
|
vt as TopSelectorRegion,
|
|
978
981
|
ht as TopTagSelector,
|
|
979
|
-
|
|
982
|
+
ot as TopTagSelectorPopupOpener,
|
|
980
983
|
ie as TopTagSelectorTagIcon,
|
|
981
984
|
Ye as dialogSelectorRegions,
|
|
982
985
|
We as findRegion,
|