@topvisor/ui 1.4.3-1 → 1.4.3-projectSelector.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.chunks/{core-CkdcFIiA.amd.js → core-BEpKBNHt.amd.js} +2 -2
- package/.chunks/{core-CkdcFIiA.amd.js.map → core-BEpKBNHt.amd.js.map} +1 -1
- package/.chunks/{core-D8Ou2oPH.es.js → core-DBWAn2Eg.es.js} +4 -4
- package/.chunks/{core-D8Ou2oPH.es.js.map → core-DBWAn2Eg.es.js.map} +1 -1
- package/.chunks/{datepicker-Dhlk31EZ.amd.js → datepicker-C5ErMHwe.amd.js} +2 -2
- package/.chunks/{datepicker-Dhlk31EZ.amd.js.map → datepicker-C5ErMHwe.amd.js.map} +1 -1
- package/.chunks/{datepicker-3ihHfSr7.es.js → datepicker-DMYB1RFK.es.js} +2 -2
- package/.chunks/{datepicker-3ihHfSr7.es.js.map → datepicker-DMYB1RFK.es.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-D9ZHTNkd.es.js → dialog_regionSelectorRegions-BMWyYCfD.es.js} +4 -4
- package/.chunks/{dialog_regionSelectorRegions-D9ZHTNkd.es.js.map → dialog_regionSelectorRegions-BMWyYCfD.es.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-nk70o5Ht.amd.js → dialog_regionSelectorRegions-CHC-Blbu.amd.js} +2 -2
- package/.chunks/{dialog_regionSelectorRegions-nk70o5Ht.amd.js.map → dialog_regionSelectorRegions-CHC-Blbu.amd.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-BI9rU5DL.es.js → dialogs.vue_vue_type_script_setup_true_lang-BZM_iKPW.es.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-BI9rU5DL.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-BZM_iKPW.es.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-B8xv-moy.amd.js → dialogs.vue_vue_type_script_setup_true_lang-C3qaTBlO.amd.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-B8xv-moy.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-C3qaTBlO.amd.js.map} +1 -1
- package/.chunks/{forms-CsPxqywz.es.js → forms-CUaoBGD5.es.js} +199 -195
- package/.chunks/{forms-CsPxqywz.es.js.map → forms-CUaoBGD5.es.js.map} +1 -1
- package/.chunks/{forms-D6S85mMQ.amd.js → forms-EhKRBbpk.amd.js} +3 -3
- package/.chunks/{forms-D6S85mMQ.amd.js.map → forms-EhKRBbpk.amd.js.map} +1 -1
- package/.chunks/{notice-IPOLYVCW.es.js → notice-Chj1PUTD.es.js} +2 -2
- package/.chunks/{notice-IPOLYVCW.es.js.map → notice-Chj1PUTD.es.js.map} +1 -1
- package/.chunks/{notice-CNyRUCZZ.amd.js → notice-DQb_Za5_.amd.js} +2 -2
- package/.chunks/{notice-CNyRUCZZ.amd.js.map → notice-DQb_Za5_.amd.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CRea7lRi.es.js → page.vue_vue_type_script_setup_true_lang-C-xQ-eC7.es.js} +4 -4
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CRea7lRi.es.js.map → page.vue_vue_type_script_setup_true_lang-C-xQ-eC7.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-BEpRLx2z.amd.js → page.vue_vue_type_script_setup_true_lang-bUK5c5qn.amd.js} +2 -2
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-BEpRLx2z.amd.js.map → page.vue_vue_type_script_setup_true_lang-bUK5c5qn.amd.js.map} +1 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-AfwHvWs8.amd.js +2 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-AfwHvWs8.amd.js.map +1 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BiCaYVJ6.es.js +515 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BiCaYVJ6.es.js.map +1 -0
- package/.chunks/{popup-BrEWCQkR.amd.js → popup-CDaQNt-3.amd.js} +2 -2
- package/.chunks/{popup-BrEWCQkR.amd.js.map → popup-CDaQNt-3.amd.js.map} +1 -1
- package/.chunks/{popup-DvXkX-lu.es.js → popup-COONSpqs.es.js} +2 -2
- package/.chunks/{popup-DvXkX-lu.es.js.map → popup-COONSpqs.es.js.map} +1 -1
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-KuWtifP4.amd.js → popupHint.vue_vue_type_style_index_0_lang-24i49Ad3.amd.js} +2 -2
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-KuWtifP4.amd.js.map → popupHint.vue_vue_type_style_index_0_lang-24i49Ad3.amd.js.map} +1 -1
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-TWsWJQFN.es.js → popupHint.vue_vue_type_style_index_0_lang-DzT1BFMx.es.js} +2 -2
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-TWsWJQFN.es.js.map → popupHint.vue_vue_type_style_index_0_lang-DzT1BFMx.es.js.map} +1 -1
- package/.chunks/utils-C2_4b48S.amd.js +2 -0
- package/.chunks/{utils-Daq8EBlT.amd.js.map → utils-C2_4b48S.amd.js.map} +1 -1
- package/.chunks/{utils-BlXb8CrZ.es.js → utils-DQ-xahGh.es.js} +4 -4
- package/.chunks/{utils-BlXb8CrZ.es.js.map → utils-DQ-xahGh.es.js.map} +1 -1
- package/.chunks/{utils-B0_n8dlR.amd.js → utils-DsGgpnXD.amd.js} +2 -2
- package/.chunks/{utils-B0_n8dlR.amd.js.map → utils-DsGgpnXD.amd.js.map} +1 -1
- package/.chunks/{utils-BywGu5Tr.es.js → utils-Kzz2mc2t.es.js} +2 -2
- package/.chunks/{utils-BywGu5Tr.es.js.map → utils-Kzz2mc2t.es.js.map} +1 -1
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-Pp4anQxP.es.js → widgetInput.vue_vue_type_script_setup_true_lang-BuoAaghB.es.js} +2 -2
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-Pp4anQxP.es.js.map → widgetInput.vue_vue_type_script_setup_true_lang-BuoAaghB.es.js.map} +1 -1
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-BUY8yqxb.amd.js → widgetInput.vue_vue_type_script_setup_true_lang-Dgjj70vU.amd.js} +2 -2
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-BUY8yqxb.amd.js.map → widgetInput.vue_vue_type_script_setup_true_lang-Dgjj70vU.amd.js.map} +1 -1
- package/assets/charts.css +1 -1
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/notice.css +1 -1
- package/assets/policy.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/extra/extra.amd.js +1 -1
- package/extra/extra.amd.js.map +1 -1
- package/extra/extra.js +9 -6
- package/extra/extra.js.map +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +1 -1
- package/forms/helpers.amd.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.js +2 -2
- package/layout/layout.amd.js +1 -1
- package/layout/layout.js +1 -1
- package/package.json +2 -2
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +6 -6
- 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 +857 -524
- package/project/project.js.map +1 -1
- package/src/components/formsExt/selector2/composables/useAPI.d.ts +2 -0
- package/src/components/formsExt/selector2/composables/useMenu.d.ts +3 -1
- package/src/components/formsExt/selector2/selector2.vue.d.ts +2 -0
- package/src/components/formsExt/selector2/types.d.ts +26 -0
- package/src/components/popup/popup/listItem.vue.d.ts +24 -4
- package/src/components/popup/popup/types.d.ts +1 -0
- package/src/components/project/groupSelector/groups/groups.vue.d.ts +9 -1
- package/src/components/project/groupSelector/groups/utils.d.ts +1 -1
- package/src/components/project/project.d.ts +1 -0
- package/src/components/project/projectSelector/cache.d.ts +30 -0
- package/src/components/project/projectSelector/projectSelector.vue.d.ts +128 -0
- package/src/components/project/projectSelector/submenu/submenu.vue.d.ts +4 -0
- package/src/components/project/projectSelector/submenu/types.d.ts +17 -0
- package/src/components/project/projectSelector/types.d.ts +52 -0
- package/src/components/project/projectSelector/utils.d.ts +230 -0
- package/src/core/utils/tests/date/dateFormat.test.d.ts +1 -0
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.js +3 -3
- package/tabsView/tabsView.js.map +1 -1
- 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/policy.vue_vue_type_style_index_0_lang-CtJ7J9YB.amd.js +0 -2
- package/.chunks/policy.vue_vue_type_style_index_0_lang-CtJ7J9YB.amd.js.map +0 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-D-FVZi-G.es.js +0 -496
- package/.chunks/policy.vue_vue_type_style_index_0_lang-D-FVZi-G.es.js.map +0 -1
- package/.chunks/utils-Daq8EBlT.amd.js +0 -2
package/project/project.js
CHANGED
|
@@ -3,18 +3,20 @@
|
|
|
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
|
|
8
|
-
import { _ as
|
|
9
|
-
import { a as
|
|
10
|
-
import { u as
|
|
11
|
-
import { getSearcherGIcon as
|
|
12
|
-
import "../.chunks/core-
|
|
13
|
-
import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { g as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
6
|
+
import { defineComponent as L, mergeModels as V, useModel as b, computed as M, createElementBlock as T, openBlock as p, createBlock as k, unref as m, withCtx as j, Fragment as F, renderList as fe, normalizeClass as oe, createElementVNode as R, toDisplayString as B, createVNode as O, createTextVNode as J, toValue as be, ref as _, watch as G, createCommentVNode as E, reactive as Ne, resolveComponent as De, shallowRef as qe, onMounted as Ze, withModifiers as W, isRef as we, mergeProps as Fe, withKeys as Pe, nextTick as et, resolveDirective as tt, withDirectives as ot, resolveDynamicComponent as at, renderSlot as lt, createSlots as nt } from "vue";
|
|
7
|
+
import { u as A, C as Q, e as ee, q as he, d as rt } from "../.chunks/forms-CUaoBGD5.es.js";
|
|
8
|
+
import { _ as ke, b as Te, a as it } from "../.chunks/popupHint.vue_vue_type_style_index_0_lang-DzT1BFMx.es.js";
|
|
9
|
+
import { a as dt, _ as je, b as Ae, c as We, I as me } from "../.chunks/policy.vue_vue_type_style_index_0_lang-BiCaYVJ6.es.js";
|
|
10
|
+
import { u as st } from "../.chunks/utils-Kzz2mc2t.es.js";
|
|
11
|
+
import { getSearcherGIcon as ut, getLangLabel as ct, getDeviceGIcon as ft } from "../utils/searchers.js";
|
|
12
|
+
import "../.chunks/core-DBWAn2Eg.es.js";
|
|
13
|
+
import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-BZM_iKPW.es.js";
|
|
14
|
+
import { g as ye, a as le } from "../.chunks/field-CyyFzM-Y.es.js";
|
|
15
|
+
import { validUrl as $e } from "../utils/check.js";
|
|
16
|
+
import { ellipsis as gt } from "../utils/string.js";
|
|
17
|
+
import { storage as X } from "../utils/dom.js";
|
|
18
|
+
import { TopPopupWorker as mt } from "../popup/worker.js";
|
|
19
|
+
const vt = { class: "top-competitorSelector" }, pt = { class: "top-ellipsis1" }, xo = /* @__PURE__ */ L({
|
|
18
20
|
__name: "competitorSelector",
|
|
19
21
|
props: /* @__PURE__ */ V({
|
|
20
22
|
modelValue: {},
|
|
@@ -26,47 +28,47 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
26
28
|
}),
|
|
27
29
|
emits: ["update:modelValue"],
|
|
28
30
|
setup(e) {
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
+
const t = e, o = b(e, "modelValue"), a = M(() => {
|
|
32
|
+
if (t.showSelectAllItem)
|
|
31
33
|
return {
|
|
32
34
|
icon: "",
|
|
33
|
-
title:
|
|
35
|
+
title: A().Common.Select_all,
|
|
34
36
|
value: "all",
|
|
35
37
|
content: ""
|
|
36
38
|
};
|
|
37
39
|
});
|
|
38
|
-
return (r, l) => (
|
|
39
|
-
|
|
40
|
-
opener:
|
|
41
|
-
|
|
40
|
+
return (r, l) => (p(), T("div", vt, [
|
|
41
|
+
m(Q).state.isMobile ? (p(), k(ke, { key: 0 }, {
|
|
42
|
+
opener: j(() => [
|
|
43
|
+
O(ee, {
|
|
42
44
|
class: "top-competitorSelector_opener",
|
|
43
45
|
color: "theme",
|
|
44
46
|
icon: "",
|
|
45
47
|
icon2: ""
|
|
46
48
|
}, {
|
|
47
|
-
default:
|
|
48
|
-
J(
|
|
49
|
+
default: j(() => [
|
|
50
|
+
J(B(e.items.find((n) => n.value === o.value?.[0])?.content), 1)
|
|
49
51
|
]),
|
|
50
52
|
_: 1
|
|
51
53
|
})
|
|
52
54
|
]),
|
|
53
|
-
contentList:
|
|
54
|
-
(
|
|
55
|
-
class:
|
|
55
|
+
contentList: j(() => [
|
|
56
|
+
(p(!0), T(F, null, fe(e.items, (n) => (p(), k(Te, {
|
|
57
|
+
class: oe({
|
|
56
58
|
"top-active": o.value?.includes(n.value)
|
|
57
59
|
}),
|
|
58
60
|
"data-top-icon": n.icon,
|
|
59
61
|
title: n.title,
|
|
60
62
|
onClick: () => o.value = [n.value]
|
|
61
63
|
}, {
|
|
62
|
-
default:
|
|
63
|
-
|
|
64
|
+
default: j(() => [
|
|
65
|
+
R("span", pt, B(n.content), 1)
|
|
64
66
|
]),
|
|
65
67
|
_: 2
|
|
66
68
|
}, 1032, ["class", "data-top-icon", "title", "onClick"]))), 256))
|
|
67
69
|
]),
|
|
68
70
|
_: 1
|
|
69
|
-
})) : (
|
|
71
|
+
})) : (p(), k(dt, {
|
|
70
72
|
key: 1,
|
|
71
73
|
modelValue: o.value,
|
|
72
74
|
"onUpdate:modelValue": l[0] || (l[0] = (n) => o.value = n),
|
|
@@ -74,16 +76,16 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
74
76
|
isMultiple: !0,
|
|
75
77
|
styling: "bar",
|
|
76
78
|
canBeEmptyMultiple: !1,
|
|
77
|
-
selectAllItem:
|
|
79
|
+
selectAllItem: a.value
|
|
78
80
|
}, null, 8, ["modelValue", "items", "selectAllItem"]))
|
|
79
81
|
]));
|
|
80
82
|
}
|
|
81
|
-
}),
|
|
83
|
+
}), Co = (e, t) => M(() => be(e).filter((r) => r.on >= 0 || r.id === t).map((r) => ({
|
|
82
84
|
value: r.id,
|
|
83
85
|
title: r.url + ` [${r.id}]`,
|
|
84
|
-
icon: r.id ===
|
|
86
|
+
icon: r.id === be(t) ? "" : "",
|
|
85
87
|
content: r.name
|
|
86
|
-
}))),
|
|
88
|
+
}))), D = -1, y = -2, ie = -1, ht = {
|
|
87
89
|
0: "Yandex",
|
|
88
90
|
1: "Google",
|
|
89
91
|
4: "YouTube",
|
|
@@ -93,44 +95,44 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
93
95
|
9: "GoogleStore",
|
|
94
96
|
20: "Yandex.com",
|
|
95
97
|
21: "Yandex.com.tr"
|
|
96
|
-
},
|
|
98
|
+
}, Me = {
|
|
97
99
|
key: y,
|
|
98
100
|
name: "--",
|
|
99
101
|
index: y
|
|
100
|
-
},
|
|
102
|
+
}, Je = {
|
|
101
103
|
key: y,
|
|
102
104
|
name: "--",
|
|
103
|
-
regions: [
|
|
104
|
-
regionByIndex: /* @__PURE__ */ new Map([[y,
|
|
105
|
-
},
|
|
105
|
+
regions: [Me],
|
|
106
|
+
regionByIndex: /* @__PURE__ */ new Map([[y, Me]])
|
|
107
|
+
}, de = {
|
|
106
108
|
key: y,
|
|
107
109
|
name: "Autoselect",
|
|
108
110
|
index: y
|
|
109
|
-
},
|
|
111
|
+
}, ve = {
|
|
110
112
|
key: y,
|
|
111
113
|
name: "Autoselect",
|
|
112
|
-
regions: [
|
|
113
|
-
regionByIndex: /* @__PURE__ */ new Map([[y,
|
|
114
|
-
},
|
|
114
|
+
regions: [de],
|
|
115
|
+
regionByIndex: /* @__PURE__ */ new Map([[y, de]])
|
|
116
|
+
}, _e = {
|
|
115
117
|
countryCode: "00",
|
|
116
118
|
depth: 1,
|
|
117
119
|
device: 0,
|
|
118
|
-
key:
|
|
119
|
-
index:
|
|
120
|
+
key: ie,
|
|
121
|
+
index: ie,
|
|
120
122
|
lang: "ru",
|
|
121
123
|
name: "Without region"
|
|
122
|
-
},
|
|
123
|
-
let
|
|
124
|
-
return e ?
|
|
125
|
-
},
|
|
124
|
+
}, yt = () => (de.name = A().Common.Autoselect, de), St = () => (yt(), ve.name = A().Common.Autoselect, console.log(ve), ve), It = () => (_e.name = A().Keywords.Without_region, _e), He = (e = !1, t = !1, o = []) => {
|
|
125
|
+
let a;
|
|
126
|
+
return e ? a = xt(o) : a = ze(o), t && a.set(y, St()), a.size || a.set(y, Je), a;
|
|
127
|
+
}, ze = (e, t = !0, o = [], a = !1) => {
|
|
126
128
|
const r = /* @__PURE__ */ new Map();
|
|
127
129
|
return e.forEach((l) => {
|
|
128
|
-
if (!l.enabled ||
|
|
130
|
+
if (!l.enabled || a && typeof l.key == "number" && l.key > 1) return;
|
|
129
131
|
const n = { ...l };
|
|
130
|
-
n.regionByIndex = /* @__PURE__ */ new Map(), l.regions && l.regions.forEach((
|
|
131
|
-
if (
|
|
132
|
-
const
|
|
133
|
-
n.regionByIndex.set(
|
|
132
|
+
n.regionByIndex = /* @__PURE__ */ new Map(), l.regions && l.regions.forEach((s) => {
|
|
133
|
+
if (t && !s.enabled) return;
|
|
134
|
+
const g = { ...s };
|
|
135
|
+
n.regionByIndex.set(g.index, g);
|
|
134
136
|
}), !n.regionByIndex.size && o.length, // режим вывода ПС без регионов
|
|
135
137
|
(!l.regions || // есть включенные регионы
|
|
136
138
|
n.regionByIndex.size || // запрошен вывод конкретных ПС
|
|
@@ -139,42 +141,42 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
139
141
|
if (r.has(l)) return;
|
|
140
142
|
const n = {
|
|
141
143
|
key: l,
|
|
142
|
-
name:
|
|
144
|
+
name: ht[l],
|
|
143
145
|
regions: [],
|
|
144
146
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
145
147
|
};
|
|
146
148
|
r.set(n.key, n);
|
|
147
149
|
}), r;
|
|
148
|
-
},
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
const o =
|
|
150
|
+
}, xt = (e) => {
|
|
151
|
+
const t = ze(e, !1, [0, 1], !0);
|
|
152
|
+
if (t.has(2)) {
|
|
153
|
+
const o = t.get(2);
|
|
152
154
|
o && (o.regionByIndex = /* @__PURE__ */ new Map());
|
|
153
155
|
}
|
|
154
|
-
return
|
|
156
|
+
return t.forEach((o) => {
|
|
155
157
|
if (!o.regionByIndex) return;
|
|
156
|
-
const
|
|
157
|
-
o.regionByIndex.set(
|
|
158
|
-
}),
|
|
159
|
-
},
|
|
160
|
-
const
|
|
158
|
+
const a = { ...It() };
|
|
159
|
+
o.regionByIndex.set(a.index, a);
|
|
160
|
+
}), t;
|
|
161
|
+
}, Ct = (e, t, o = []) => {
|
|
162
|
+
const a = He(e, !1, o);
|
|
161
163
|
let r;
|
|
162
|
-
return
|
|
163
|
-
if (!(
|
|
164
|
-
if (!r && !(
|
|
164
|
+
return a.forEach((l) => {
|
|
165
|
+
if (!(t.searcher_key !== void 0 && t.searcher_key != l.key) && l.regions && (l.regions.forEach((n) => {
|
|
166
|
+
if (!r && !(t.key !== void 0 && t.key != n.key) && !(t.index !== void 0 && t.index != n.index) && !(!e && (t.lang !== void 0 && t.lang != n.lang || t.device !== void 0 && t.device != n.device)))
|
|
165
167
|
return n.searcher_key = l.key, r = n, !1;
|
|
166
168
|
}), r))
|
|
167
169
|
return !1;
|
|
168
170
|
}), r;
|
|
169
|
-
},
|
|
170
|
-
const o =
|
|
171
|
+
}, kt = st(() => import("../.chunks/dialog_regionSelectorRegions-BMWyYCfD.es.js")), Tt = (e, t) => {
|
|
172
|
+
const o = A(), a = _(t.value.keys().next().value ?? y), r = M(() => {
|
|
171
173
|
const l = /* @__PURE__ */ new Map();
|
|
172
|
-
if (
|
|
173
|
-
let
|
|
174
|
+
if (t.value.forEach((n) => {
|
|
175
|
+
let s = {
|
|
174
176
|
value: n.key,
|
|
175
177
|
title: n.name
|
|
176
178
|
};
|
|
177
|
-
e.addSearcherIcon && (
|
|
179
|
+
e.addSearcherIcon && (s.icon = ut(n.key)), l.set(n.key, s);
|
|
178
180
|
}), e.addCompare && !l.has(y)) {
|
|
179
181
|
const n = {
|
|
180
182
|
value: "",
|
|
@@ -182,74 +184,74 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
182
184
|
disabled: !0
|
|
183
185
|
};
|
|
184
186
|
l.set(n.value, n);
|
|
185
|
-
const
|
|
186
|
-
value:
|
|
187
|
+
const s = {
|
|
188
|
+
value: D,
|
|
187
189
|
title: o.Common.Compare
|
|
188
190
|
};
|
|
189
|
-
l.set(
|
|
191
|
+
l.set(s.value, s);
|
|
190
192
|
}
|
|
191
193
|
return l;
|
|
192
194
|
});
|
|
193
195
|
return {
|
|
194
|
-
searcherKey:
|
|
196
|
+
searcherKey: a,
|
|
195
197
|
optionBySearcherKey: r
|
|
196
198
|
};
|
|
197
|
-
},
|
|
198
|
-
const o =
|
|
199
|
-
e.modelValue.length === 1 && (
|
|
199
|
+
}, jt = (e, t) => {
|
|
200
|
+
const o = A(), a = _(y);
|
|
201
|
+
e.modelValue.length === 1 && (a.value = e.modelValue[0]), a.value === y && (e.forFrequency ? a.value = t.value?.regionByIndex.values().next().value?.key ?? y : a.value = t.value?.regionByIndex.keys().next().value ?? y);
|
|
200
202
|
const r = M(() => {
|
|
201
203
|
const l = /* @__PURE__ */ new Map();
|
|
202
|
-
return
|
|
203
|
-
let
|
|
204
|
+
return t.value.regionByIndex?.forEach((n) => {
|
|
205
|
+
let s = n.name;
|
|
204
206
|
if (e.forFrequency) {
|
|
205
|
-
const
|
|
207
|
+
const S = {
|
|
206
208
|
value: n.key,
|
|
207
|
-
title:
|
|
209
|
+
title: s
|
|
208
210
|
};
|
|
209
|
-
l.has(n.key) || l.set(n.key,
|
|
211
|
+
l.has(n.key) || l.set(n.key, S);
|
|
210
212
|
return;
|
|
211
213
|
}
|
|
212
|
-
n.device && (
|
|
213
|
-
const
|
|
214
|
-
|
|
214
|
+
n.device && (s += " (" + o.Common["Device_" + n.device] + ")");
|
|
215
|
+
const g = ct(t.value.key || 0, n.lang ?? "");
|
|
216
|
+
g && (s += " / " + g);
|
|
215
217
|
const c = {
|
|
216
218
|
value: n.index,
|
|
217
|
-
title:
|
|
218
|
-
icon: n.device ?
|
|
219
|
+
title: s,
|
|
220
|
+
icon: n.device ? ft(n.device) : void 0
|
|
219
221
|
};
|
|
220
222
|
l.set(n.index, c);
|
|
221
223
|
}), l;
|
|
222
224
|
});
|
|
223
|
-
return
|
|
224
|
-
if (e.onlySearcher ||
|
|
225
|
+
return G(r, (l, n) => {
|
|
226
|
+
if (e.onlySearcher || a.value !== void 0 && l.get(a.value))
|
|
225
227
|
return;
|
|
226
|
-
let
|
|
227
|
-
if (
|
|
228
|
-
|
|
228
|
+
let s = l.keys().next().value;
|
|
229
|
+
if (a.value === y || s === y) {
|
|
230
|
+
a.value = s;
|
|
229
231
|
return;
|
|
230
232
|
}
|
|
231
|
-
let
|
|
232
|
-
for (const [
|
|
233
|
-
const
|
|
234
|
-
if (typeof
|
|
233
|
+
let g = n?.get(a.value)?.title || "", c = -1;
|
|
234
|
+
for (const [S, i] of l.entries()) {
|
|
235
|
+
const v = i.title;
|
|
236
|
+
if (typeof v != "string" || typeof S == "string")
|
|
235
237
|
break;
|
|
236
|
-
if (
|
|
237
|
-
|
|
238
|
+
if (v === g) {
|
|
239
|
+
s = S;
|
|
238
240
|
break;
|
|
239
241
|
}
|
|
240
242
|
const d = new RegExp(` \\((${o.Common.Device_1}|${o.Common.Device_2})\\)`);
|
|
241
|
-
let
|
|
242
|
-
|
|
243
|
+
let f = g, u = 3;
|
|
244
|
+
v.indexOf(f) === -1 && (f = g.replace(/^[^a-zа-я]/i, "").replace(d, ""), u--), v.indexOf(f) === -1 && (f = g.replace(/ \/.*/, ""), u--), v.indexOf(f) === -1 && (f = g.replace(/ \/.*/, ""), f = f.replace(/^[^a-zа-я]/i, "").replace(d, ""), u--), v.indexOf(f) !== -1 && (u <= c || (c = u, s = S));
|
|
243
245
|
}
|
|
244
|
-
|
|
246
|
+
a.value = s;
|
|
245
247
|
}), {
|
|
246
|
-
regionIndex:
|
|
248
|
+
regionIndex: a,
|
|
247
249
|
optionByRegionIndex: r
|
|
248
250
|
};
|
|
249
|
-
},
|
|
250
|
-
const
|
|
251
|
-
if (e.onlySearcher &&
|
|
252
|
-
|
|
251
|
+
}, At = (e, t, o) => {
|
|
252
|
+
const a = _([]), r = () => {
|
|
253
|
+
if (e.onlySearcher && t.value) {
|
|
254
|
+
a.value = Array.from(t.value.keys());
|
|
253
255
|
return;
|
|
254
256
|
}
|
|
255
257
|
let n = [];
|
|
@@ -262,70 +264,70 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
262
264
|
) ?? [];
|
|
263
265
|
} catch {
|
|
264
266
|
}
|
|
265
|
-
n.length && (n = n.filter((
|
|
267
|
+
n.length && (n = n.filter((s) => o.value.has(s))), n.length || (n = Array.from(o.value)), a.value = [...n];
|
|
266
268
|
}, l = () => {
|
|
267
|
-
|
|
269
|
+
a.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(a.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
|
|
268
270
|
};
|
|
269
|
-
return
|
|
271
|
+
return G(a, () => {
|
|
270
272
|
l();
|
|
271
273
|
}), e.addCompare && r(), {
|
|
272
|
-
regionsIndexes:
|
|
274
|
+
regionsIndexes: a
|
|
273
275
|
};
|
|
274
|
-
},
|
|
275
|
-
const
|
|
276
|
+
}, Bt = (e) => {
|
|
277
|
+
const t = M(() => He(e.forFrequency, e.autoRegion, e.searchers)), o = M(() => t.value.get(r.searcherKey.value) || Je), a = M(() => {
|
|
276
278
|
const i = /* @__PURE__ */ new Set();
|
|
277
|
-
return
|
|
278
|
-
|
|
279
|
-
d.index !==
|
|
279
|
+
return t.value.forEach((v) => {
|
|
280
|
+
v.regionByIndex.forEach((d) => {
|
|
281
|
+
d.index !== ie && d.index !== y && i.add(d.index);
|
|
280
282
|
});
|
|
281
283
|
}), i;
|
|
282
|
-
}), r =
|
|
283
|
-
|
|
284
|
-
if (e.onlySearcher ? n.regionsIndexes.value = Array.from(
|
|
285
|
-
let i =
|
|
286
|
-
|
|
287
|
-
if (e.onlySearcher &&
|
|
284
|
+
}), r = Tt(e, t), l = jt(e, o), n = At(e, t, a);
|
|
285
|
+
G(t, () => {
|
|
286
|
+
if (e.onlySearcher ? n.regionsIndexes.value = Array.from(t.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((v) => a.value.has(v)), r.searcherKey.value === D) return;
|
|
287
|
+
let i = t.value.keys().next().value;
|
|
288
|
+
t.value.forEach((v) => {
|
|
289
|
+
if (e.onlySearcher && v.key === r.searcherKey.value) {
|
|
288
290
|
i = r.searcherKey.value;
|
|
289
291
|
return;
|
|
290
292
|
}
|
|
291
|
-
if (l.regionIndex.value &&
|
|
293
|
+
if (l.regionIndex.value && v.regionByIndex?.has(l.regionIndex.value) && (i = v.key), !e.onlySearcher) {
|
|
292
294
|
let d;
|
|
293
|
-
i !== void 0 && (d =
|
|
294
|
-
const
|
|
295
|
-
d?.has(y) && !
|
|
295
|
+
i !== void 0 && (d = t.value.get(i)?.regionByIndex);
|
|
296
|
+
const f = t.value.get(v.key)?.regionByIndex;
|
|
297
|
+
d?.has(y) && !f?.has(y) && (i = v.key);
|
|
296
298
|
}
|
|
297
299
|
}), i !== void 0 && (r.searcherKey.value = i), l.regionIndex.value !== void 0 && !o.value?.regionByIndex?.has(l.regionIndex.value) && (l.regionIndex.value = o.value?.regions?.keys().next().value);
|
|
298
300
|
}, { immediate: !0 });
|
|
299
|
-
const
|
|
300
|
-
if (!(r.searcherKey.value ===
|
|
301
|
+
const s = () => {
|
|
302
|
+
if (!(r.searcherKey.value === D || r.searcherKey.value === y))
|
|
301
303
|
return r.searcherKey.value;
|
|
302
|
-
},
|
|
304
|
+
}, g = () => {
|
|
303
305
|
if (e.onlySearcher || l.regionIndex.value === y) return;
|
|
304
306
|
let i = l.regionIndex.value;
|
|
305
307
|
if (e.forFrequency) {
|
|
306
|
-
const
|
|
307
|
-
i =
|
|
308
|
+
const v = l.regionIndex.value;
|
|
309
|
+
i = Ct(e.forFrequency, { searcher_key: s(), key: v }, e.searchers)?.index;
|
|
308
310
|
}
|
|
309
311
|
return i;
|
|
310
312
|
}, c = () => {
|
|
311
|
-
const i =
|
|
313
|
+
const i = s();
|
|
312
314
|
if (i !== void 0)
|
|
313
|
-
return
|
|
315
|
+
return t.value.get(i);
|
|
314
316
|
};
|
|
315
317
|
return {
|
|
316
318
|
selectSearcher: r,
|
|
317
319
|
selectRegion: l,
|
|
318
320
|
compare: n,
|
|
319
|
-
searcherByKey:
|
|
320
|
-
allRegionsIndexes:
|
|
321
|
+
searcherByKey: t,
|
|
322
|
+
allRegionsIndexes: a,
|
|
321
323
|
getSearcher: c,
|
|
322
324
|
getRegion: () => {
|
|
323
|
-
const i =
|
|
325
|
+
const i = g();
|
|
324
326
|
if (i !== void 0)
|
|
325
327
|
return c()?.regionByIndex?.get(i);
|
|
326
328
|
}
|
|
327
329
|
};
|
|
328
|
-
},
|
|
330
|
+
}, ko = /* @__PURE__ */ L({
|
|
329
331
|
__name: "regionSelector",
|
|
330
332
|
props: /* @__PURE__ */ V({
|
|
331
333
|
projectId: {},
|
|
@@ -346,84 +348,84 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
346
348
|
modelValueSingleModifiers: {}
|
|
347
349
|
}),
|
|
348
350
|
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
349
|
-
setup(e, { expose:
|
|
350
|
-
const o = e,
|
|
351
|
+
setup(e, { expose: t }) {
|
|
352
|
+
const o = e, a = b(e, "modelValue"), r = b(e, "modelValueSingle"), {
|
|
351
353
|
selectSearcher: l,
|
|
352
354
|
selectRegion: n,
|
|
353
|
-
compare:
|
|
354
|
-
searcherByKey:
|
|
355
|
+
compare: s,
|
|
356
|
+
searcherByKey: g,
|
|
355
357
|
allRegionsIndexes: c,
|
|
356
|
-
getSearcher:
|
|
358
|
+
getSearcher: S,
|
|
357
359
|
getRegion: i
|
|
358
|
-
} =
|
|
360
|
+
} = Bt(o), v = () => {
|
|
359
361
|
const d = [];
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
362
|
+
g.value.forEach((f) => {
|
|
363
|
+
f.enabled && f.regions.forEach((u) => {
|
|
364
|
+
u.enabled && d.push(u);
|
|
363
365
|
});
|
|
364
|
-
}),
|
|
366
|
+
}), kt.open("regions", {
|
|
365
367
|
regions: d,
|
|
366
|
-
regionsIndexes:
|
|
367
|
-
"@update:regionsIndexes": (
|
|
368
|
+
regionsIndexes: s.regionsIndexes.value,
|
|
369
|
+
"@update:regionsIndexes": (f) => s.regionsIndexes.value = f
|
|
368
370
|
});
|
|
369
371
|
};
|
|
370
|
-
return
|
|
371
|
-
if (l.searcherKey.value ===
|
|
372
|
-
if (JSON.stringify(
|
|
372
|
+
return G([n.regionIndex, l.searcherKey, s.regionsIndexes], () => {
|
|
373
|
+
if (l.searcherKey.value === D && s.regionsIndexes.value.length) {
|
|
374
|
+
if (JSON.stringify(a.value) === JSON.stringify(s.regionsIndexes.value))
|
|
373
375
|
return;
|
|
374
|
-
|
|
376
|
+
a.value = [...s.regionsIndexes.value];
|
|
375
377
|
} else
|
|
376
|
-
o.onlySearcher ? (
|
|
378
|
+
o.onlySearcher ? (a.value = [l.searcherKey.value], l.searcherKey.value === y && !o.autoRegion && (a.value.length = 0)) : (a.value = [n.regionIndex.value], n.regionIndex.value === y && !o.autoRegion && (a.value.length = 0));
|
|
377
379
|
!o.onlySearcher && !c.value.size && (l.searcherKey.value = y);
|
|
378
|
-
}), r.value &&
|
|
379
|
-
r.value && (
|
|
380
|
-
}, { immediate: !0 }),
|
|
381
|
-
if (
|
|
382
|
-
if (!
|
|
383
|
-
let d =
|
|
384
|
-
d === y && !o.autoRegion && (d = void 0, r.value = y), d !== void 0 ?
|
|
380
|
+
}), r.value && G(r, () => {
|
|
381
|
+
r.value && (a.value = [r.value]);
|
|
382
|
+
}, { immediate: !0 }), G(a, () => {
|
|
383
|
+
if (a.value[0] && (r.value = a.value[0]), o.onlySearcher) {
|
|
384
|
+
if (!a.value.length || a.value.length === 1 && !g.value.has(a.value[0]) || a.value.length === 1 && a.value[0] === y && !o.autoRegion) {
|
|
385
|
+
let d = g.value.keys().next().value;
|
|
386
|
+
d === y && !o.autoRegion && (d = void 0, r.value = y), d !== void 0 ? a.value = [d] : a.value.length = 0;
|
|
385
387
|
return;
|
|
386
388
|
}
|
|
387
|
-
if (
|
|
388
|
-
|
|
389
|
+
if (a.value.length > 1 && JSON.stringify(a.value) !== JSON.stringify(s.regionsIndexes.value)) {
|
|
390
|
+
a.value = [...s.regionsIndexes.value];
|
|
389
391
|
return;
|
|
390
392
|
}
|
|
391
393
|
} else {
|
|
392
|
-
let d = [...new Set(
|
|
393
|
-
if (o.forFrequency && (
|
|
394
|
-
|
|
394
|
+
let d = [...new Set(a.value)], f = g.value.values().next().value?.regionByIndex?.keys().next().value;
|
|
395
|
+
if (o.forFrequency && (f = g.value.values().next().value?.regionByIndex?.values().next().value?.key), f === y && !o.autoRegion && (f = void 0, r.value = y), !d.length)
|
|
396
|
+
f !== void 0 && d.push(f);
|
|
395
397
|
else if (d.length === 1) {
|
|
396
|
-
let
|
|
397
|
-
o.forFrequency && (
|
|
398
|
-
|
|
399
|
-
|
|
398
|
+
let u = c.value;
|
|
399
|
+
o.forFrequency && (u = /* @__PURE__ */ new Set(), g.value.forEach((w) => {
|
|
400
|
+
w.regionByIndex.forEach((U) => {
|
|
401
|
+
U.index !== ie && U.index !== y && u.add(U.key);
|
|
400
402
|
});
|
|
401
|
-
})),
|
|
403
|
+
})), u.has(d[0]) || (d = [], f !== void 0 && d.push(f));
|
|
402
404
|
} else
|
|
403
|
-
d = d.filter((
|
|
404
|
-
if (JSON.stringify(
|
|
405
|
-
|
|
405
|
+
d = d.filter((u) => c.value.has(u)), !d.length && f !== void 0 && d.push(f);
|
|
406
|
+
if (JSON.stringify(a.value) !== JSON.stringify(d)) {
|
|
407
|
+
a.value = d;
|
|
406
408
|
return;
|
|
407
409
|
}
|
|
408
410
|
}
|
|
409
|
-
if (!(
|
|
411
|
+
if (!(a.value.length === 1 && a.value[0] === (o.onlySearcher ? l.searcherKey.value : n.regionIndex.value)))
|
|
410
412
|
if (o.onlySearcher) {
|
|
411
|
-
if (
|
|
412
|
-
l.searcherKey.value =
|
|
413
|
+
if (a.value.length === 1) {
|
|
414
|
+
l.searcherKey.value = a.value[0];
|
|
413
415
|
return;
|
|
414
416
|
}
|
|
415
|
-
l.searcherKey.value =
|
|
417
|
+
l.searcherKey.value = D;
|
|
416
418
|
return;
|
|
417
419
|
} else {
|
|
418
|
-
if (!
|
|
420
|
+
if (!a.value.length)
|
|
419
421
|
return;
|
|
420
|
-
if (
|
|
421
|
-
n.regionIndex.value =
|
|
422
|
+
if (a.value.length === 1 && l.searcherKey.value !== D) {
|
|
423
|
+
n.regionIndex.value = a.value[0];
|
|
422
424
|
let d;
|
|
423
|
-
for (const
|
|
424
|
-
for (const
|
|
425
|
-
if ((o.forFrequency ?
|
|
426
|
-
d =
|
|
425
|
+
for (const f of g.value.values()) {
|
|
426
|
+
for (const u of f.regionByIndex.values())
|
|
427
|
+
if ((o.forFrequency ? u.key : u.index) === n.regionIndex.value) {
|
|
428
|
+
d = f.key;
|
|
427
429
|
break;
|
|
428
430
|
}
|
|
429
431
|
if (d !== void 0)
|
|
@@ -431,76 +433,76 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
|
|
|
431
433
|
}
|
|
432
434
|
d !== void 0 && (l.searcherKey.value = d);
|
|
433
435
|
} else
|
|
434
|
-
l.searcherKey.value =
|
|
436
|
+
l.searcherKey.value = D, s.regionsIndexes.value = [...a.value];
|
|
435
437
|
}
|
|
436
|
-
}, { immediate: !0 }),
|
|
437
|
-
getSearcher:
|
|
438
|
+
}, { immediate: !0 }), t({
|
|
439
|
+
getSearcher: S,
|
|
438
440
|
getRegion: i
|
|
439
|
-
}), (d,
|
|
440
|
-
class:
|
|
441
|
+
}), (d, f) => (p(), T("div", {
|
|
442
|
+
class: oe({
|
|
441
443
|
"top-selectorRegion": !0,
|
|
442
444
|
"top-selectorRegion-onlySearcher": e.onlySearcher
|
|
443
445
|
})
|
|
444
446
|
}, [
|
|
445
|
-
|
|
446
|
-
options:
|
|
447
|
-
modelValue:
|
|
448
|
-
"onUpdate:modelValue":
|
|
447
|
+
O(he, {
|
|
448
|
+
options: m(l).optionBySearcherKey.value,
|
|
449
|
+
modelValue: m(l).searcherKey.value,
|
|
450
|
+
"onUpdate:modelValue": f[0] || (f[0] = (u) => m(l).searcherKey.value = u),
|
|
449
451
|
name: "searcher_key",
|
|
450
452
|
addChanger: e.addChanger
|
|
451
453
|
}, null, 8, ["options", "modelValue", "addChanger"]),
|
|
452
|
-
!e.onlySearcher &&
|
|
454
|
+
!e.onlySearcher && m(l).searcherKey.value !== m(D) ? (p(), k(he, {
|
|
453
455
|
key: 0,
|
|
454
456
|
class: "top-select-region",
|
|
455
|
-
options:
|
|
456
|
-
modelValue:
|
|
457
|
-
"onUpdate:modelValue":
|
|
457
|
+
options: m(n).optionByRegionIndex.value,
|
|
458
|
+
modelValue: m(n).regionIndex.value,
|
|
459
|
+
"onUpdate:modelValue": f[1] || (f[1] = (u) => m(n).regionIndex.value = u),
|
|
458
460
|
name: e.forFrequency ? "region_key" : "region_index",
|
|
459
461
|
addChanger: e.addChanger,
|
|
460
462
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
461
|
-
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) :
|
|
462
|
-
e.addCompare && !e.onlySearcher &&
|
|
463
|
+
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : E("", !0),
|
|
464
|
+
e.addCompare && !e.onlySearcher && m(l).searcherKey.value === m(D) ? (p(), k(ee, {
|
|
463
465
|
key: 1,
|
|
464
466
|
name: "compare",
|
|
465
|
-
onClick:
|
|
466
|
-
"data-count-compare-regions-indexes":
|
|
467
|
+
onClick: v,
|
|
468
|
+
"data-count-compare-regions-indexes": m(s).regionsIndexes.value.length
|
|
467
469
|
}, {
|
|
468
|
-
default:
|
|
469
|
-
J(
|
|
470
|
+
default: j(() => [
|
|
471
|
+
J(B(d.$i18n.Common.Selected_regions), 1)
|
|
470
472
|
]),
|
|
471
473
|
_: 1
|
|
472
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
474
|
+
}, 8, ["data-count-compare-regions-indexes"])) : E("", !0)
|
|
473
475
|
], 2));
|
|
474
476
|
}
|
|
475
|
-
}),
|
|
477
|
+
}), q = {
|
|
476
478
|
id: 0,
|
|
477
479
|
name: "/",
|
|
478
480
|
path: "/"
|
|
479
481
|
};
|
|
480
|
-
function
|
|
481
|
-
return e ?
|
|
482
|
+
function bt(e) {
|
|
483
|
+
return e ? A()?.Common.All_folders : "/ (" + A()?.Keywords.Root_folder + ")";
|
|
482
484
|
}
|
|
483
|
-
const
|
|
484
|
-
l = { ...l },
|
|
485
|
+
const Be = (e, t, o = /* @__PURE__ */ new Map(), a = { id: "root" }, r = 0) => (a.childsIds = [], a.id && (a.countAllGroupsActive = a.count_groups_active), e[a.id] && e[a.id].forEach((l) => {
|
|
486
|
+
l = { ...l }, a.childsIds.push(l.id), l.id === 0 && (l.name = bt(t));
|
|
485
487
|
const n = r > 1 ? "-".repeat(r - 1) + " " : "";
|
|
486
|
-
n && !l.name.startsWith(n) && (l.name = n + l.name), o.set(l.id, l),
|
|
487
|
-
}), o),
|
|
488
|
-
function
|
|
489
|
-
const
|
|
490
|
-
return
|
|
491
|
-
const
|
|
492
|
-
l.forEach((c,
|
|
493
|
-
if (!Object.is(c, n[
|
|
494
|
-
const i =
|
|
495
|
-
|
|
496
|
-
old: n[
|
|
488
|
+
n && !l.name.startsWith(n) && (l.name = n + l.name), o.set(l.id, l), Be(e, t, o, l, r + 1), a.childsIds = a.childsIds.concat(l.childsIds), a.id && l.count_groups_active && (a.countAllGroupsActive += l.count_groups_active);
|
|
489
|
+
}), o), wt = (e) => e.gen("/get/keywords_2/folders/", ["id", "parent_id", "name", "path"]).changeParams({ orders: ["ord_path"], limit: 100 });
|
|
490
|
+
function Se(e, t, o) {
|
|
491
|
+
const a = Object.keys(e), r = a.map((l) => e[l]);
|
|
492
|
+
return G(r, (l, n, s) => {
|
|
493
|
+
const g = {};
|
|
494
|
+
l.forEach((c, S) => {
|
|
495
|
+
if (!Object.is(c, n[S])) {
|
|
496
|
+
const i = a[S];
|
|
497
|
+
g[i] = {
|
|
498
|
+
old: n[S],
|
|
497
499
|
new: c
|
|
498
500
|
};
|
|
499
501
|
}
|
|
500
|
-
}), Object.keys(
|
|
502
|
+
}), Object.keys(g).length && t(g, s);
|
|
501
503
|
}, o);
|
|
502
504
|
}
|
|
503
|
-
const
|
|
505
|
+
const Pt = /* @__PURE__ */ L({
|
|
504
506
|
__name: "folders",
|
|
505
507
|
props: /* @__PURE__ */ V({
|
|
506
508
|
folderId: {},
|
|
@@ -514,62 +516,62 @@ const mt = /* @__PURE__ */ R({
|
|
|
514
516
|
}, {
|
|
515
517
|
folderId: { required: !0 },
|
|
516
518
|
folderIdModifiers: {},
|
|
517
|
-
folder: { default:
|
|
519
|
+
folder: { default: q },
|
|
518
520
|
folderModifiers: {}
|
|
519
521
|
}),
|
|
520
522
|
emits: ["update:folderId", "update:folder"],
|
|
521
523
|
setup(e) {
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
+
const t = e, o = b(e, "folderId"), a = b(e, "folder"), r = t.client && !t.folders ? wt(t.client) : void 0, l = _(null);
|
|
525
|
+
G(() => t.projectId, () => {
|
|
524
526
|
r?.changeParams({
|
|
525
|
-
project_id:
|
|
527
|
+
project_id: t.projectId
|
|
526
528
|
}), r?.setOptions({
|
|
527
|
-
checkFingerprint: "TopGroupSelectorFolders:" +
|
|
529
|
+
checkFingerprint: "TopGroupSelectorFolders:" + t.projectId
|
|
528
530
|
}), l.value?.resetCache();
|
|
529
531
|
}, { immediate: !0 });
|
|
530
|
-
const n = M(() =>
|
|
531
|
-
return
|
|
532
|
-
modelFolder:
|
|
532
|
+
const n = M(() => Be(t.folders ?? { root: [q] }, t.canSelectAll));
|
|
533
|
+
return Se({
|
|
534
|
+
modelFolder: a,
|
|
533
535
|
modelFolderId: o
|
|
534
|
-
}, async (
|
|
535
|
-
if (o.value ===
|
|
536
|
+
}, async (s) => {
|
|
537
|
+
if (o.value === a.value.id)
|
|
536
538
|
return;
|
|
537
|
-
if (
|
|
538
|
-
o.value =
|
|
539
|
+
if (s.modelFolder && !s.modelFolderId) {
|
|
540
|
+
o.value = a.value.id;
|
|
539
541
|
return;
|
|
540
542
|
}
|
|
541
|
-
let
|
|
542
|
-
|
|
543
|
-
}, { immediate: !0 }), (
|
|
543
|
+
let g = n.value.get(t.folderId);
|
|
544
|
+
g || (g = q), a.value = g, o.value = g.id;
|
|
545
|
+
}, { immediate: !0 }), (s, g) => (p(), k(je, {
|
|
544
546
|
class: "top-groupSelector_folder",
|
|
545
|
-
modelValue:
|
|
546
|
-
"onUpdate:modelValue":
|
|
547
|
+
modelValue: a.value,
|
|
548
|
+
"onUpdate:modelValue": g[0] || (g[0] = (c) => a.value = c),
|
|
547
549
|
items: e.folders ? [...n.value.values()] : void 0,
|
|
548
550
|
"search-type": "inline",
|
|
549
551
|
icon: e.addIcon ? "" : void 0,
|
|
550
|
-
api: e.folders ? void 0 :
|
|
551
|
-
apiSetSearchParams: (...c) =>
|
|
552
|
+
api: e.folders ? void 0 : m(r),
|
|
553
|
+
apiSetSearchParams: (...c) => m(Ae)(...c, "name"),
|
|
552
554
|
addChanger: e.addChanger,
|
|
553
555
|
useCache: ""
|
|
554
556
|
}, null, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "addChanger"]));
|
|
555
557
|
}
|
|
556
|
-
}),
|
|
558
|
+
}), se = {
|
|
557
559
|
id: -1,
|
|
558
560
|
name: "--",
|
|
559
|
-
folder_id:
|
|
560
|
-
folder_path:
|
|
561
|
-
},
|
|
562
|
-
id:
|
|
561
|
+
folder_id: q.id,
|
|
562
|
+
folder_path: q.path
|
|
563
|
+
}, ue = {
|
|
564
|
+
id: We,
|
|
563
565
|
name: "All groups",
|
|
564
|
-
folder_id:
|
|
565
|
-
folder_path:
|
|
566
|
-
},
|
|
566
|
+
folder_id: q.id,
|
|
567
|
+
folder_path: q.path
|
|
568
|
+
}, Z = () => (ue.name = A()?.Common.All_groups, ue), Ye = () => (ue.name = A()?.Keywords.Choose_group, ue), $t = (e, t, o) => (e = [...e], t !== void 0 && (e = e.filter((a) => a.on == Number(t))), o && o.id && o.childsIds && (e = e.filter((a) => a.folder_id === o.id || o.childsIds.includes(a.folder_id))), e), Ee = (e) => e.gen("/get/keywords_2/groups/", ["id", "name", "folder_id", "folder_path"]).changeParams({ folder_id_depth: !0, limit: 100 }), Mt = (e) => e.gen("/add/keywords_2/groups/"), _t = { class: "top-groupSelector_groupItem" }, Et = {
|
|
567
569
|
key: 0,
|
|
568
570
|
class: "top-comment"
|
|
569
|
-
},
|
|
571
|
+
}, Vt = {
|
|
570
572
|
key: 1,
|
|
571
573
|
class: "top-groupSelector_groupItemFolderPath"
|
|
572
|
-
},
|
|
574
|
+
}, Gt = /* @__PURE__ */ L({
|
|
573
575
|
__name: "groups",
|
|
574
576
|
props: /* @__PURE__ */ V({
|
|
575
577
|
groupId: {},
|
|
@@ -592,19 +594,19 @@ const mt = /* @__PURE__ */ R({
|
|
|
592
594
|
groupModifiers: {}
|
|
593
595
|
}),
|
|
594
596
|
emits: /* @__PURE__ */ V(["addGroup"], ["update:groupId", "update:group"]),
|
|
595
|
-
setup(e, { emit:
|
|
596
|
-
const o = e,
|
|
597
|
+
setup(e, { emit: t }) {
|
|
598
|
+
const o = e, a = t, r = b(e, "groupId"), l = b(e, "group"), n = o.client && !o.groups ? Ee(o.client) : void 0, s = o.client ? Mt(o.client) : void 0, g = _(null), c = _(void 0), S = ye("folder_id", "EQUALS", [o.folder?.id ?? 0]);
|
|
597
599
|
n?.changeParams({
|
|
598
600
|
project_id: o.projectId,
|
|
599
601
|
folder_id_depth: !0,
|
|
600
602
|
filters: [
|
|
601
|
-
|
|
603
|
+
S
|
|
602
604
|
]
|
|
603
|
-
}), o.on !== void 0 && n?.params.filters?.push(
|
|
605
|
+
}), o.on !== void 0 && n?.params.filters?.push(ye("on", "EQUALS", [Number(o.on)]));
|
|
604
606
|
const i = (d) => {
|
|
605
607
|
l.value = d, r.value = d.id;
|
|
606
608
|
};
|
|
607
|
-
|
|
609
|
+
Se({
|
|
608
610
|
projectId: () => o.projectId,
|
|
609
611
|
folderId: () => o.folder?.id,
|
|
610
612
|
canSelectAll: () => o.canSelectAll
|
|
@@ -613,13 +615,13 @@ const mt = /* @__PURE__ */ R({
|
|
|
613
615
|
project_id: o.projectId
|
|
614
616
|
}), n?.setOptions({
|
|
615
617
|
checkFingerprint: "TopGroupSelectorGroups:" + o.projectId
|
|
616
|
-
})), d.folderId && (
|
|
618
|
+
})), d.folderId && (S.values = [
|
|
617
619
|
o.folder?.id ?? 0
|
|
618
|
-
], o.groups && (c.value =
|
|
619
|
-
let
|
|
620
|
-
o.autoselect === "first" && (
|
|
620
|
+
], o.groups && (c.value = $t(o.groups, o.on, o.folder))), g.value?.resetCache(), (d.folderId?.old !== void 0 || d.canSelectAll?.old !== void 0) && r.value !== me) {
|
|
621
|
+
let f;
|
|
622
|
+
o.autoselect === "first" && (f = c.value?.[0], o.canSelectAll && (f = Ne(Z()))), (o.autoselect === "placeholder" || !f) && (f = Ye()), i(f);
|
|
621
623
|
}
|
|
622
|
-
}, { immediate: !0 }),
|
|
624
|
+
}, { immediate: !0 }), Se({
|
|
623
625
|
modelGroup: l,
|
|
624
626
|
modelGroupId: r
|
|
625
627
|
}, async (d) => {
|
|
@@ -628,72 +630,72 @@ const mt = /* @__PURE__ */ R({
|
|
|
628
630
|
r.value = l.value.id;
|
|
629
631
|
return;
|
|
630
632
|
}
|
|
631
|
-
if (!(o.canAdd && r.value ===
|
|
633
|
+
if (!(o.canAdd && r.value === me)) {
|
|
632
634
|
if (o.groups) {
|
|
633
|
-
let
|
|
634
|
-
if (!
|
|
635
|
-
i(
|
|
635
|
+
let f = c.value?.find((u) => u.id === r.value);
|
|
636
|
+
if (!f && o.canSelectAll && (f = Z()), f)
|
|
637
|
+
i(f);
|
|
636
638
|
else {
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
+
const u = c.value?.[0];
|
|
640
|
+
u && !r.value ? i(u) : i(se);
|
|
639
641
|
}
|
|
640
642
|
}
|
|
641
|
-
if (o.client && !o.groups && (r.value || r.value ===
|
|
642
|
-
const
|
|
643
|
+
if (o.client && !o.groups && (r.value || r.value === We && !o.canSelectAll)) {
|
|
644
|
+
const f = Ee(o.client).changeParams({
|
|
643
645
|
project_id: o.projectId,
|
|
644
646
|
id: r.value,
|
|
645
647
|
filters: [
|
|
646
|
-
|
|
648
|
+
S
|
|
647
649
|
]
|
|
648
650
|
});
|
|
649
|
-
|
|
651
|
+
f?.setOptions({
|
|
650
652
|
checkFingerprint: "TopGroupSelectorFindGroup:" + o.projectId
|
|
651
653
|
});
|
|
652
|
-
const
|
|
653
|
-
if (!
|
|
654
|
-
!
|
|
654
|
+
const u = await f.call();
|
|
655
|
+
if (!u.errors?.length && !u.result) return;
|
|
656
|
+
!u.errors && u.result[0] ? i(u.result[0]) : i(se);
|
|
655
657
|
}
|
|
656
658
|
}
|
|
657
659
|
}
|
|
658
660
|
}, { immediate: !0 });
|
|
659
|
-
const
|
|
660
|
-
if (o.canAdd !== "api" || !
|
|
661
|
-
const
|
|
661
|
+
const v = async (d) => {
|
|
662
|
+
if (o.canAdd !== "api" || !s) return;
|
|
663
|
+
const f = l.value, u = await s.changeParams({
|
|
662
664
|
project_id: o.projectId,
|
|
663
665
|
names: [d.name],
|
|
664
|
-
to_id: o.folder?.id ??
|
|
666
|
+
to_id: o.folder?.id ?? q.id,
|
|
665
667
|
to_type: "in_folder_last"
|
|
666
668
|
}).call();
|
|
667
|
-
|
|
669
|
+
u.result ? (i(u.result), a("addGroup", u.result)) : i(f), g.value?.resetCache(!0);
|
|
668
670
|
};
|
|
669
|
-
return (d,
|
|
671
|
+
return (d, f) => (p(), k(je, {
|
|
670
672
|
ref_key: "refSelector",
|
|
671
|
-
ref:
|
|
673
|
+
ref: g,
|
|
672
674
|
class: "top-groupSelector_group",
|
|
673
675
|
modelValue: l.value,
|
|
674
|
-
"onUpdate:modelValue":
|
|
676
|
+
"onUpdate:modelValue": f[0] || (f[0] = (u) => l.value = u),
|
|
675
677
|
items: c.value ?? e.groups,
|
|
676
678
|
searchType: "inline",
|
|
677
679
|
icon: e.addIcon ? "" : void 0,
|
|
678
|
-
api: e.groups ? void 0 :
|
|
679
|
-
apiSetSearchParams: (...
|
|
680
|
+
api: e.groups ? void 0 : m(n),
|
|
681
|
+
apiSetSearchParams: (...u) => m(Ae)(...u, "name"),
|
|
680
682
|
appendSearchToResult: !!e.canAdd,
|
|
681
|
-
useAllItem: e.canSelectAll ?
|
|
683
|
+
useAllItem: e.canSelectAll ? m(Z)().name : !1,
|
|
682
684
|
addChanger: e.addChanger,
|
|
683
685
|
useCache: "",
|
|
684
|
-
onAppendItem:
|
|
686
|
+
onAppendItem: v
|
|
685
687
|
}, {
|
|
686
|
-
item:
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
688
|
+
item: j(({ item: u }) => [
|
|
689
|
+
R("div", _t, [
|
|
690
|
+
u.id === m(me) ? (p(), T("div", Et, B(d.$i18n.Common.Add) + ": ", 1)) : E("", !0),
|
|
691
|
+
R("span", null, B(u.name), 1),
|
|
692
|
+
u.folder_path && e.showPath ? (p(), T("span", Vt, B(u.folder_path), 1)) : E("", !0)
|
|
691
693
|
])
|
|
692
694
|
]),
|
|
693
695
|
_: 1
|
|
694
696
|
}, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "appendSearchToResult", "useAllItem", "addChanger"]));
|
|
695
697
|
}
|
|
696
|
-
}),
|
|
698
|
+
}), Lt = { class: "top-groupSelector" }, To = /* @__PURE__ */ L({
|
|
697
699
|
__name: "groupSelector",
|
|
698
700
|
props: /* @__PURE__ */ V({
|
|
699
701
|
folderId: {},
|
|
@@ -719,39 +721,39 @@ const mt = /* @__PURE__ */ R({
|
|
|
719
721
|
folderModifiers: {},
|
|
720
722
|
groupId: { required: !0 },
|
|
721
723
|
groupIdModifiers: {},
|
|
722
|
-
group: { default:
|
|
724
|
+
group: { default: se },
|
|
723
725
|
groupModifiers: {}
|
|
724
726
|
}),
|
|
725
727
|
emits: /* @__PURE__ */ V(["update:groups"], ["update:folderId", "update:folder", "update:groupId", "update:group"]),
|
|
726
|
-
setup(e, { emit:
|
|
727
|
-
const o = e,
|
|
728
|
-
r.value =
|
|
728
|
+
setup(e, { emit: t }) {
|
|
729
|
+
const o = e, a = b(e, "folderId"), r = b(e, "folder"), l = b(e, "groupId"), n = b(e, "group"), s = t, g = Be(o.folders ?? { root: [q] }, o.canSelectAllGroups);
|
|
730
|
+
r.value = g.get(a.value);
|
|
729
731
|
let c = o.groups?.find((i) => i.id === l.value);
|
|
730
|
-
l.value || (c = o.groups?.[0]), o.canSelectAllGroups && !c && (c =
|
|
731
|
-
const
|
|
732
|
-
let
|
|
733
|
-
o.groups && i && (
|
|
732
|
+
l.value || (c = o.groups?.[0]), o.canSelectAllGroups && !c && (c = Z()), o.canSelectAllGroups && !c && (c = Z()), (o.autoselect === "placeholder" || !c) && (c = Ye()), c ??= se, n.value = c;
|
|
733
|
+
const S = (i) => {
|
|
734
|
+
let v;
|
|
735
|
+
o.groups && i && (v = [...o.groups, i]), s("update:groups", v);
|
|
734
736
|
};
|
|
735
|
-
return (i,
|
|
736
|
-
e.showFolders ? (
|
|
737
|
+
return (i, v) => (p(), T("div", Lt, [
|
|
738
|
+
e.showFolders ? (p(), k(Pt, {
|
|
737
739
|
key: 0,
|
|
738
|
-
folderId:
|
|
739
|
-
"onUpdate:folderId":
|
|
740
|
+
folderId: a.value,
|
|
741
|
+
"onUpdate:folderId": v[0] || (v[0] = (d) => a.value = d),
|
|
740
742
|
folder: r.value,
|
|
741
|
-
"onUpdate:folder":
|
|
743
|
+
"onUpdate:folder": v[1] || (v[1] = (d) => r.value = d),
|
|
742
744
|
projectId: e.projectId,
|
|
743
745
|
folders: e.folders,
|
|
744
746
|
canSelectAll: e.canSelectAllGroups,
|
|
745
747
|
addChanger: e.addChanger,
|
|
746
748
|
addIcon: e.addIcon,
|
|
747
749
|
client: e.client
|
|
748
|
-
}, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client"])) :
|
|
749
|
-
e.showGroups ? (
|
|
750
|
+
}, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client"])) : E("", !0),
|
|
751
|
+
e.showGroups ? (p(), k(Gt, {
|
|
750
752
|
key: 1,
|
|
751
753
|
groupId: l.value,
|
|
752
|
-
"onUpdate:groupId":
|
|
754
|
+
"onUpdate:groupId": v[2] || (v[2] = (d) => l.value = d),
|
|
753
755
|
group: n.value,
|
|
754
|
-
"onUpdate:group":
|
|
756
|
+
"onUpdate:group": v[3] || (v[3] = (d) => n.value = d),
|
|
755
757
|
projectId: e.projectId,
|
|
756
758
|
folder: r.value,
|
|
757
759
|
groups: e.groups,
|
|
@@ -763,65 +765,395 @@ const mt = /* @__PURE__ */ R({
|
|
|
763
765
|
showPath: e.showFolders && !!e.folders?.[0],
|
|
764
766
|
addIcon: e.addIcon,
|
|
765
767
|
client: e.client,
|
|
766
|
-
onAddGroup:
|
|
767
|
-
}, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "showPath", "addIcon", "client"])) :
|
|
768
|
+
onAddGroup: S
|
|
769
|
+
}, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "showPath", "addIcon", "client"])) : E("", !0)
|
|
768
770
|
]));
|
|
769
771
|
}
|
|
770
|
-
}),
|
|
771
|
-
|
|
772
|
-
|
|
772
|
+
}), Kt = { class: "top-projectSelectorSubmenu_item" }, Ot = ["href", "title", "data-top-icon", "data-right"], Rt = { class: "top-projectSelectorSubmenu_item" }, Ut = ["href"], Nt = /* @__PURE__ */ L({
|
|
773
|
+
__name: "submenu",
|
|
774
|
+
props: {
|
|
775
|
+
id: {},
|
|
776
|
+
right: {},
|
|
777
|
+
url: {}
|
|
778
|
+
},
|
|
779
|
+
setup(e) {
|
|
780
|
+
const t = e, o = A();
|
|
781
|
+
let a = [
|
|
782
|
+
{
|
|
783
|
+
href: `/project/keywords/${t.id}/`,
|
|
784
|
+
title: o.Common.Menu_phrases,
|
|
785
|
+
icon: "",
|
|
786
|
+
right: "2"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
href: `/project/dynamics/${t.id}/`,
|
|
790
|
+
title: o.Common.Menu_dynamics,
|
|
791
|
+
icon: "",
|
|
792
|
+
right: "1"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
href: `/project/snapshots/${t.id}/`,
|
|
796
|
+
title: o.Common.Menu_snapshots,
|
|
797
|
+
icon: "",
|
|
798
|
+
right: "1"
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
href: `/project/competitors/${t.id}/`,
|
|
802
|
+
title: o.Common.Menu_competitors,
|
|
803
|
+
icon: "",
|
|
804
|
+
right: "1"
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
href: `/project/analytics/${t.id}/`,
|
|
808
|
+
title: o.Common.Menu_analytics,
|
|
809
|
+
icon: "",
|
|
810
|
+
right: "5"
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
href: `/project/broker/${t.id}/`,
|
|
814
|
+
title: o.Common.Menu_broker,
|
|
815
|
+
icon: "",
|
|
816
|
+
right: "6"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
href: `/project/audit/${t.id}/sitemap/`,
|
|
820
|
+
title: o.Audit.Sitemap_gen,
|
|
821
|
+
icon: "",
|
|
822
|
+
right: "8"
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
href: `/project/audit/${t.id}/audit/`,
|
|
826
|
+
title: o.Common.Menu_audit,
|
|
827
|
+
icon: "",
|
|
828
|
+
right: "8"
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
href: `//project/audit/${t.id}/indexing/`,
|
|
832
|
+
title: o.Audit.Indexing,
|
|
833
|
+
icon: "",
|
|
834
|
+
right: "8"
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
href: `/project/audit/${t.id}/watcher/`,
|
|
838
|
+
title: o.Audit.Watcher,
|
|
839
|
+
icon: "",
|
|
840
|
+
right: "9"
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
href: `/project/settings/${t.id}/`,
|
|
844
|
+
title: o.Common.Menu_settings,
|
|
845
|
+
icon: "",
|
|
846
|
+
right: "2"
|
|
847
|
+
}
|
|
848
|
+
];
|
|
849
|
+
const r = M(() => t.right.includes("0") ? a.filter((l) => t.right[l.right] === "1") : a);
|
|
850
|
+
return (l, n) => {
|
|
851
|
+
const s = De("TopButton");
|
|
852
|
+
return p(), k(m(ke), {
|
|
853
|
+
class: "top-projectSelectorSubmenu",
|
|
854
|
+
notch: !1,
|
|
855
|
+
pos: "2"
|
|
856
|
+
}, {
|
|
857
|
+
opener: j(() => [
|
|
858
|
+
O(s, {
|
|
859
|
+
class: "top-projectSelectorSubmenu_opener",
|
|
860
|
+
"data-top-icon": "",
|
|
861
|
+
color: "theme"
|
|
862
|
+
})
|
|
863
|
+
]),
|
|
864
|
+
contentList: j(() => [
|
|
865
|
+
(p(!0), T(F, null, fe(r.value, (g) => (p(), T("li", Kt, [
|
|
866
|
+
R("a", {
|
|
867
|
+
href: g.href,
|
|
868
|
+
title: g.title,
|
|
869
|
+
"data-top-icon": g.icon,
|
|
870
|
+
"data-right": g.right
|
|
871
|
+
}, null, 8, Ot)
|
|
872
|
+
]))), 256)),
|
|
873
|
+
R("li", Rt, [
|
|
874
|
+
R("a", {
|
|
875
|
+
href: e.url,
|
|
876
|
+
"data-top-icon": "",
|
|
877
|
+
target: "_blank"
|
|
878
|
+
}, null, 8, Ut)
|
|
879
|
+
])
|
|
880
|
+
]),
|
|
881
|
+
_: 1
|
|
882
|
+
});
|
|
883
|
+
};
|
|
884
|
+
}
|
|
885
|
+
}), pe = (e) => ({
|
|
886
|
+
id: null,
|
|
887
|
+
name: e,
|
|
888
|
+
listItemProps: {
|
|
889
|
+
type: "title"
|
|
890
|
+
}
|
|
891
|
+
}), Ie = {
|
|
892
|
+
scheduledUpdate: !1,
|
|
893
|
+
manualUpdate: !1,
|
|
894
|
+
guestProjects: !1
|
|
895
|
+
}, Dt = (e, t) => {
|
|
896
|
+
const o = [], a = {
|
|
897
|
+
scheduledUpdate: pe(A().Projects.Scheduled_update),
|
|
898
|
+
manualUpdate: pe(A().Projects.Manual_update),
|
|
899
|
+
guestProjects: pe(A().Projects.Guest_projects)
|
|
900
|
+
}, r = t ? {
|
|
901
|
+
scheduledUpdate: !1,
|
|
902
|
+
manualUpdate: !1,
|
|
903
|
+
guestProjects: !1
|
|
904
|
+
} : Ie;
|
|
905
|
+
for (const l of e)
|
|
906
|
+
!r.scheduledUpdate && l.right?.startsWith("1") && l.on > 0 && (o.push(a.scheduledUpdate), r.scheduledUpdate = !0), !r.manualUpdate && l.right?.startsWith("1") && l.on === 0 && (o.push(a.manualUpdate), r.manualUpdate = !0), !r.guestProjects && l.right?.startsWith("0") && l.on >= 0 && (o.push(a.guestProjects), r.guestProjects = !0), o.push(l);
|
|
907
|
+
return o;
|
|
908
|
+
}, qt = (e, t, o, a) => !e || e.length === 0 ? [] : (t && (e = e.filter((r) => r.id !== t)), o && Object.keys(Ie).forEach((r) => Ie[r] = !1), Dt(e, a)), Ft = (e) => {
|
|
909
|
+
if (!e) return "";
|
|
910
|
+
let t = e;
|
|
911
|
+
return t = t.replace(/historyView=[^&]*/, ""), t = t.replace(/competitorsIds=[^&]*/, ""), t = t.replace(/searchersKeys=[^&]*/, ""), t = t.replace(/regionIndex=[^&]*/, ""), t = t.replace(/regionsIndexes=[^&]*/, ""), t = t.replace(/folderId=[^&]*/, ""), t = t.replace(/groupId=[^&]*/, ""), t = t.replace(/tags=[^&]*/, ""), window.mo?.getHash && !window.mo.getHash("dataSort").toString().includes("0000-00-00") && (t = t.replace(/dataSort=[^&]*/, "")), t = t.replace(/%22historyView%22:[^,]*,/, ""), t = t.replace(/%22competitorsIds%22:\[[^\]]*\],/, ""), t = t.replace(/%22searchersKeys%22:\[[^\]]*\],/, ""), t = t.replace(/%22regionIndex%22:[^,]*,/, ""), t = t.replace(/%22regionsIndexes%22:\[[^\]]*\],/, ""), t = t.replace(/%22folderId%22:[^,]*,/, ""), t = t.replace(/%22groupId%22:[^,]*,/, ""), t = t.replace(/%22tagsIds%22:\[[^\]]*\],/, ""), /%22dataSort%22:\{[^\}]*0000-00-00[^\}]*\}/.test(t) || (t = t.replace(/%22dataSort%22:\{[^\}]*\},/, "")), t;
|
|
912
|
+
}, Qe = (e) => {
|
|
913
|
+
const t = location.pathname.split("/");
|
|
914
|
+
let o = "project/dynamics/", a = "";
|
|
915
|
+
t[1] == "project" && (o = t[1] + "/" + t[2] + "/"), ["watcher", "indexing", "sitemap", "audit", "direct", "adwords"].includes(t[4]) && (a = t[4] + "/");
|
|
916
|
+
let r = "/" + o + e + "/" + a;
|
|
917
|
+
const l = Ft(location.hash);
|
|
918
|
+
return r += l, r;
|
|
919
|
+
}, Wt = (e, t) => {
|
|
920
|
+
if (e)
|
|
921
|
+
return e.map((o) => o.id ? {
|
|
922
|
+
...o,
|
|
923
|
+
listItemProps: {
|
|
924
|
+
class: "top-projectSelector_item",
|
|
925
|
+
href: t ? Qe(Number(o.id)) : void 0,
|
|
926
|
+
title: o.name
|
|
927
|
+
}
|
|
928
|
+
} : o);
|
|
929
|
+
}, Ve = (e) => {
|
|
930
|
+
let t = e.startsWith("http") ? e : "http://" + e;
|
|
931
|
+
return t = t.replace(/"/g, "%22"), t;
|
|
932
|
+
}, Ge = (e, t, o, a) => {
|
|
933
|
+
const r = e.gen("/get/projects_2/projects/", ["id", "user_id", "name", "url", "on", "right"]);
|
|
934
|
+
return r.params = {
|
|
935
|
+
...a,
|
|
936
|
+
filters: [
|
|
937
|
+
ye("on", "GREATER_THAN_EQUALS", [0])
|
|
938
|
+
],
|
|
939
|
+
orders: [
|
|
940
|
+
le("user_id", "DESC", [t]),
|
|
941
|
+
le("on", "DESC"),
|
|
942
|
+
le("favorite", "DESC"),
|
|
943
|
+
le("id", "DESC")
|
|
944
|
+
]
|
|
945
|
+
}, r.options.onApiLoaded = (l, n, s) => {
|
|
946
|
+
const g = n.data.filters.length === 1 && n.data.offset === 0 || n.data.limit === 1e3, c = n.data.limit === 100 && n.data.filters.length > 1 ? !0 : void 0;
|
|
947
|
+
l.result = qt(l.result, o, g, c), s?.(l, n);
|
|
948
|
+
}, r;
|
|
949
|
+
}, Jt = (e) => e.gen("/add/projects_2/projects/"), xe = "ui_project_selector_total:", Ht = 1440 * 60 * 1e3, N = qe(), Xe = _(0), ne = _(null), Le = (e, t) => {
|
|
950
|
+
localStorage.setItem(
|
|
951
|
+
xe + e,
|
|
952
|
+
JSON.stringify({ projectsTotal: t, expiresAt: Date.now() + Ht })
|
|
953
|
+
);
|
|
954
|
+
}, zt = (e) => {
|
|
955
|
+
const t = localStorage.getItem(xe + e);
|
|
956
|
+
if (!t) return;
|
|
957
|
+
const { projectsTotal: o, expiresAt: a } = JSON.parse(t);
|
|
958
|
+
if (Date.now() > a) {
|
|
959
|
+
localStorage.removeItem(xe + e);
|
|
960
|
+
return;
|
|
961
|
+
}
|
|
962
|
+
return o;
|
|
963
|
+
}, Yt = (e = !0) => {
|
|
964
|
+
N.value = void 0, e && Xe.value++;
|
|
965
|
+
}, Qt = { class: "top-projectSelector_itemText" }, Xt = { class: "top-projectSelector_itemName" }, Zt = { class: "top-projectSelector_itemId" }, eo = { key: 1 }, to = {
|
|
966
|
+
key: 0,
|
|
967
|
+
class: "top-comment"
|
|
968
|
+
}, Ke = 1e3, jo = /* @__PURE__ */ L({
|
|
969
|
+
__name: "projectSelector",
|
|
970
|
+
props: /* @__PURE__ */ V({
|
|
971
|
+
userId: { default: window.mo?.user?.id },
|
|
972
|
+
client: {},
|
|
973
|
+
project: {},
|
|
974
|
+
addLinksToProjects: { type: Boolean, default: !0 },
|
|
975
|
+
excludeProjectId: {},
|
|
976
|
+
modificator: { default: "projectSelector" },
|
|
977
|
+
placeholder: {},
|
|
978
|
+
buttonProps: {},
|
|
979
|
+
openerShortcut: {}
|
|
980
|
+
}, {
|
|
981
|
+
project: { required: !1 },
|
|
982
|
+
projectModifiers: {}
|
|
983
|
+
}),
|
|
984
|
+
emits: ["update:project"],
|
|
985
|
+
setup(e) {
|
|
986
|
+
const t = A(), o = e, a = b(e, "project"), r = Ge(
|
|
987
|
+
o.client,
|
|
988
|
+
o.userId,
|
|
989
|
+
o.excludeProjectId
|
|
990
|
+
), l = Jt(o.client), n = _(zt(o.userId)), s = _(null), g = M(() => o.placeholder ?? t.Projects.Select_project), c = M(() => {
|
|
991
|
+
if (!(!n.value && n.value !== 0))
|
|
992
|
+
return n.value < Ke ? "static" : "api";
|
|
993
|
+
});
|
|
994
|
+
G(Xe, () => {
|
|
995
|
+
d();
|
|
996
|
+
});
|
|
997
|
+
const S = async () => {
|
|
998
|
+
if (!ne.value) {
|
|
999
|
+
const w = Ge(
|
|
1000
|
+
o.client,
|
|
1001
|
+
o.userId,
|
|
1002
|
+
o.excludeProjectId,
|
|
1003
|
+
{ limit: Ke }
|
|
1004
|
+
);
|
|
1005
|
+
ne.value = w.call();
|
|
1006
|
+
}
|
|
1007
|
+
const u = await ne.value;
|
|
1008
|
+
if (!u.errors)
|
|
1009
|
+
return ne.value = null, u;
|
|
1010
|
+
}, i = async () => {
|
|
1011
|
+
if (n.value) return;
|
|
1012
|
+
const u = await S();
|
|
1013
|
+
u && (n.value = u.total, c.value === "static" && !N.value && (N.value = u.result), n.value && Le(o.userId, n.value));
|
|
1014
|
+
}, v = async (u) => {
|
|
1015
|
+
const w = await l.changeParams({
|
|
1016
|
+
url: u.name,
|
|
1017
|
+
name: u.name
|
|
1018
|
+
}).call();
|
|
1019
|
+
if (!w.errors) {
|
|
1020
|
+
if (N.value && c.value === "static") {
|
|
1021
|
+
const U = {
|
|
1022
|
+
id: Number(w.result),
|
|
1023
|
+
user_id: o.userId,
|
|
1024
|
+
name: u.name,
|
|
1025
|
+
url: u.name,
|
|
1026
|
+
on: 0,
|
|
1027
|
+
right: "11111111111111111111",
|
|
1028
|
+
listItemProps: {
|
|
1029
|
+
class: "top-projectSelector_item",
|
|
1030
|
+
href: o.addLinksToProjects ? Qe(Number(w.result)) : void 0,
|
|
1031
|
+
title: u.name
|
|
1032
|
+
}
|
|
1033
|
+
};
|
|
1034
|
+
N.value = [U, ...N.value], n.value && Le(o.userId, n.value + 1);
|
|
1035
|
+
}
|
|
1036
|
+
c.value === "api" && Yt(o.userId);
|
|
1037
|
+
}
|
|
1038
|
+
}, d = () => {
|
|
1039
|
+
c.value === "api" && s.value?.resetCache(!0);
|
|
1040
|
+
}, f = async () => {
|
|
1041
|
+
if (N.value || c.value !== "static") return;
|
|
1042
|
+
const u = await S();
|
|
1043
|
+
u && (N.value = u.result);
|
|
1044
|
+
};
|
|
1045
|
+
return Ze(async () => {
|
|
1046
|
+
await i();
|
|
1047
|
+
}), (u, w) => {
|
|
1048
|
+
const U = De("TopButton");
|
|
1049
|
+
return c.value ? (p(), k(je, {
|
|
1050
|
+
key: 0,
|
|
1051
|
+
ref_key: "refSelector",
|
|
1052
|
+
ref: s,
|
|
1053
|
+
class: "top-projectSelector",
|
|
1054
|
+
modelValue: a.value,
|
|
1055
|
+
"onUpdate:modelValue": w[1] || (w[1] = (P) => a.value = P),
|
|
1056
|
+
items: m(Wt)(m(N), e.addLinksToProjects),
|
|
1057
|
+
title: u.$i18n.Projects.Search_projects,
|
|
1058
|
+
modificator: e.modificator,
|
|
1059
|
+
placeholder: g.value,
|
|
1060
|
+
hasCloserBtn: "",
|
|
1061
|
+
api: c.value === "api" ? m(r) : void 0,
|
|
1062
|
+
apiSetSearchParams: c.value === "api" ? (...P) => m(Ae)(...P, "name") : void 0,
|
|
1063
|
+
useCache: "",
|
|
1064
|
+
appendSearchToResult: "",
|
|
1065
|
+
appendSearchToResultCond: m($e),
|
|
1066
|
+
appendWithoutSelect: "",
|
|
1067
|
+
buttonProps: e.buttonProps,
|
|
1068
|
+
openerShortcut: e.openerShortcut,
|
|
1069
|
+
onAppendItem: v,
|
|
1070
|
+
onOpen: f
|
|
1071
|
+
}, {
|
|
1072
|
+
item: j(({ item: P }) => [
|
|
1073
|
+
P.id ? (p(), T(F, { key: 0 }, [
|
|
1074
|
+
R("div", Qt, [
|
|
1075
|
+
R("span", Xt, B(m(gt)(P.name, 20)), 1),
|
|
1076
|
+
R("span", Zt, " id " + B(P.id), 1)
|
|
1077
|
+
]),
|
|
1078
|
+
u.$core.state.isMobile ? E("", !0) : (p(), k(U, {
|
|
1079
|
+
key: 0,
|
|
1080
|
+
class: "top-projectSelector_itemLink",
|
|
1081
|
+
href: m(Ve)(P.url),
|
|
1082
|
+
"data-top-icon": "",
|
|
1083
|
+
color: "theme",
|
|
1084
|
+
target: "_blank",
|
|
1085
|
+
onClick: w[0] || (w[0] = W(() => {
|
|
1086
|
+
}, ["stop"]))
|
|
1087
|
+
}, null, 8, ["href"])),
|
|
1088
|
+
O(Nt, {
|
|
1089
|
+
id: P.id,
|
|
1090
|
+
right: P.right ?? void 0,
|
|
1091
|
+
url: m(Ve)(P.url)
|
|
1092
|
+
}, null, 8, ["id", "right", "url"])
|
|
1093
|
+
], 64)) : (p(), T("div", eo, [
|
|
1094
|
+
m($e)(P.name) ? (p(), T("div", to, B(u.$i18n.Projects.Add_project) + ": ", 1)) : E("", !0),
|
|
1095
|
+
J(" " + B(P.name), 1)
|
|
1096
|
+
]))
|
|
1097
|
+
]),
|
|
1098
|
+
_: 1
|
|
1099
|
+
}, 8, ["modelValue", "items", "title", "modificator", "placeholder", "api", "apiSetSearchParams", "appendSearchToResultCond", "buttonProps", "openerShortcut"])) : E("", !0);
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
}), Oe = (e) => "-" + e, te = (e) => e[0] === "-" ? e.substring(1) : e, ce = (e, t) => {
|
|
1103
|
+
e = te(e);
|
|
1104
|
+
const o = t.find((a) => a.id === e);
|
|
773
1105
|
if (o)
|
|
774
1106
|
return o;
|
|
775
|
-
},
|
|
776
|
-
|
|
777
|
-
const
|
|
778
|
-
return
|
|
779
|
-
r.preventDefault(), r.stopPropagation(),
|
|
780
|
-
const l =
|
|
1107
|
+
}, Ao = (e, t, o) => {
|
|
1108
|
+
t || (t = { id: e.id }), t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
|
|
1109
|
+
const a = mt.genElPopupOpener("div", t);
|
|
1110
|
+
return a.classList.add("top-tagSelector"), e.useTopButton && a.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || a.classList.add("top-tagSelector-custom"), e.mode === "filter" && a.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && a.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && a.classList.add("top-tagSelector-setter_several"), a.onclick = (r) => {
|
|
1111
|
+
r.preventDefault(), r.stopPropagation(), a.onclick = null;
|
|
1112
|
+
const l = _(e.modelValue), n = {
|
|
781
1113
|
model: l,
|
|
782
1114
|
mode: e.mode,
|
|
783
1115
|
targetId: e.targetId,
|
|
784
1116
|
filters: e.filters,
|
|
785
1117
|
payload: e.payload
|
|
786
1118
|
};
|
|
787
|
-
|
|
788
|
-
e.modelValue = l.value,
|
|
789
|
-
}),
|
|
790
|
-
},
|
|
1119
|
+
X(a, "topTagSelectorTarget", n), delete a.dataset.topPopupDisabled, we(e.modelValue) || G(l, () => {
|
|
1120
|
+
e.modelValue = l.value, re(a, e, o);
|
|
1121
|
+
}), a.click();
|
|
1122
|
+
}, we(e.modelValue) ? G(e.modelValue, () => re(a, e, o)) : X(a, "topTagSelectorRender", (r) => {
|
|
791
1123
|
e.modelValue = r;
|
|
792
|
-
const l =
|
|
793
|
-
l && (l.model.value = r),
|
|
794
|
-
}),
|
|
795
|
-
},
|
|
796
|
-
|
|
797
|
-
},
|
|
798
|
-
const
|
|
799
|
-
if (e.classList.toggle("top-tagSelector-selectedOne", !
|
|
1124
|
+
const l = X(a, "topTagSelectorTarget");
|
|
1125
|
+
l && (l.model.value = r), re(a, e, o);
|
|
1126
|
+
}), re(a, e, o), a;
|
|
1127
|
+
}, Bo = (e, t) => {
|
|
1128
|
+
X(e, "topTagSelectorRender")?.(t);
|
|
1129
|
+
}, re = (e, t, o) => {
|
|
1130
|
+
const a = m(t.modelValue);
|
|
1131
|
+
if (e.classList.toggle("top-tagSelector-selectedOne", !a.length || a.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", a.length > 5), t.mode === "setter" && t.filters) {
|
|
800
1132
|
e.innerHTML = `<div>${o}</div>`;
|
|
801
1133
|
return;
|
|
802
1134
|
}
|
|
803
|
-
if (e.innerHTML = "", !
|
|
804
|
-
const r =
|
|
1135
|
+
if (e.innerHTML = "", !a.length && t.mode === "filter") {
|
|
1136
|
+
const r = Re({
|
|
805
1137
|
id: "all",
|
|
806
1138
|
colorId: "",
|
|
807
|
-
name:
|
|
1139
|
+
name: A().Common?.All_tags ?? "",
|
|
808
1140
|
state: ""
|
|
809
1141
|
});
|
|
810
1142
|
e.append(r);
|
|
811
1143
|
}
|
|
812
|
-
|
|
813
|
-
const l =
|
|
814
|
-
id:
|
|
815
|
-
colorId:
|
|
816
|
-
name:
|
|
817
|
-
state:
|
|
1144
|
+
a.forEach((r) => {
|
|
1145
|
+
const l = Re({
|
|
1146
|
+
id: te(r),
|
|
1147
|
+
colorId: ce(r, t.tags)?.color_id ?? "",
|
|
1148
|
+
name: ce(r, t.tags)?.name ?? "",
|
|
1149
|
+
state: te(r) === r ? "selected" : "excluded"
|
|
818
1150
|
});
|
|
819
1151
|
e.append(l);
|
|
820
1152
|
});
|
|
821
|
-
},
|
|
822
|
-
const
|
|
823
|
-
return
|
|
824
|
-
},
|
|
1153
|
+
}, Re = (e) => {
|
|
1154
|
+
const t = document.createElement("div");
|
|
1155
|
+
return t.classList.add("top-tagSelector_tagIcon"), t.classList.toggle("top-tagSelector-active", !!e.state), t.classList.toggle("top-tagSelector-excluded", e.state === "excluded"), t.dataset.tag_id = e.id, t.dataset.tag_color_id = e.colorId, t.title = e.name, t;
|
|
1156
|
+
}, oo = [
|
|
825
1157
|
{
|
|
826
1158
|
id: "1",
|
|
827
1159
|
name: "Without Tag",
|
|
@@ -872,7 +1204,7 @@ const mt = /* @__PURE__ */ R({
|
|
|
872
1204
|
name: "Turquoise",
|
|
873
1205
|
color_id: "10"
|
|
874
1206
|
}
|
|
875
|
-
],
|
|
1207
|
+
], ao = ["data-tag_id", "data-tag_color_id", "title"], Ce = /* @__PURE__ */ L({
|
|
876
1208
|
__name: "tagIcon",
|
|
877
1209
|
props: {
|
|
878
1210
|
id: {},
|
|
@@ -881,8 +1213,8 @@ const mt = /* @__PURE__ */ R({
|
|
|
881
1213
|
state: {}
|
|
882
1214
|
},
|
|
883
1215
|
setup(e) {
|
|
884
|
-
return (
|
|
885
|
-
class:
|
|
1216
|
+
return (t, o) => (p(), T("div", {
|
|
1217
|
+
class: oe({
|
|
886
1218
|
"top-tagSelector_tagIcon": !0,
|
|
887
1219
|
"top-tagSelector-active": !!e.state,
|
|
888
1220
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
@@ -890,9 +1222,9 @@ const mt = /* @__PURE__ */ R({
|
|
|
890
1222
|
"data-tag_id": e.id,
|
|
891
1223
|
"data-tag_color_id": e.colorId,
|
|
892
1224
|
title: e.name
|
|
893
|
-
}, null, 10,
|
|
1225
|
+
}, null, 10, ao));
|
|
894
1226
|
}
|
|
895
|
-
}),
|
|
1227
|
+
}), lo = ["contenteditable", "onKeydown"], Ue = /* @__PURE__ */ L({
|
|
896
1228
|
__name: "tagPopupListItem",
|
|
897
1229
|
props: /* @__PURE__ */ V({
|
|
898
1230
|
editable: { type: Boolean },
|
|
@@ -909,70 +1241,70 @@ const mt = /* @__PURE__ */ R({
|
|
|
909
1241
|
nameModifiers: {}
|
|
910
1242
|
}),
|
|
911
1243
|
emits: /* @__PURE__ */ V(["update:name", "unselect", "exclude", "select"], ["update:name"]),
|
|
912
|
-
setup(e, { emit:
|
|
913
|
-
const o = e,
|
|
914
|
-
contenteditable:
|
|
915
|
-
onpaste: (
|
|
916
|
-
} : {}),
|
|
917
|
-
|
|
1244
|
+
setup(e, { emit: t }) {
|
|
1245
|
+
const o = e, a = t, r = b(e, "name"), l = _(null), n = M(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
|
|
1246
|
+
contenteditable: s.value,
|
|
1247
|
+
onpaste: (v) => v.preventDefault()
|
|
1248
|
+
} : {}), s = _(!1), g = async () => {
|
|
1249
|
+
s.value = !0, await et(), l.value?.focus();
|
|
918
1250
|
}, c = () => {
|
|
919
|
-
const
|
|
920
|
-
if (!
|
|
921
|
-
l.value && (l.value.innerText =
|
|
922
|
-
},
|
|
923
|
-
l.value && (l.value.innerText = o.name),
|
|
924
|
-
}, i = (
|
|
925
|
-
if (
|
|
1251
|
+
const v = l.value?.innerText;
|
|
1252
|
+
if (!v) return S();
|
|
1253
|
+
l.value && (l.value.innerText = v), s.value = !1, a("update:name", v);
|
|
1254
|
+
}, S = async () => {
|
|
1255
|
+
l.value && (l.value.innerText = o.name), s.value = !1;
|
|
1256
|
+
}, i = (v) => {
|
|
1257
|
+
if (s.value || o.disabled) return;
|
|
926
1258
|
let d = "selected";
|
|
927
|
-
o.canExclude && (
|
|
1259
|
+
o.canExclude && (v.ctrlKey || v.metaKey) && (d = "excluded"), o.state == d && (d = ""), d === "" && a("unselect"), d === "selected" && a("select"), d === "excluded" && a("exclude");
|
|
928
1260
|
};
|
|
929
|
-
return (
|
|
930
|
-
class:
|
|
1261
|
+
return (v, d) => (p(), k(Te, {
|
|
1262
|
+
class: oe({
|
|
931
1263
|
"top-tagSelector_tagListItem": !0,
|
|
932
|
-
"top-tagSelector_tagListItem-inEdit":
|
|
1264
|
+
"top-tagSelector_tagListItem-inEdit": s.value,
|
|
933
1265
|
"top-tagSelector_tagListItem-disabled": e.disabled,
|
|
934
1266
|
"top-tagSelector_tagListItem-canExclude": e.canExclude,
|
|
935
1267
|
"top-tagSelector-active": !!e.state,
|
|
936
1268
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
937
1269
|
}),
|
|
938
|
-
onClick:
|
|
1270
|
+
onClick: W(i, ["stop"])
|
|
939
1271
|
}, {
|
|
940
|
-
default:
|
|
941
|
-
|
|
1272
|
+
default: j(() => [
|
|
1273
|
+
O(Ce, {
|
|
942
1274
|
id: e.id,
|
|
943
1275
|
name: r.value,
|
|
944
1276
|
colorId: e.colorId,
|
|
945
1277
|
state: e.state
|
|
946
1278
|
}, null, 8, ["id", "name", "colorId", "state"]),
|
|
947
|
-
|
|
1279
|
+
R("span", Fe({
|
|
948
1280
|
ref_key: "elName",
|
|
949
1281
|
ref: l,
|
|
950
1282
|
class: "top-tagSelector_tagListItemName",
|
|
951
|
-
contenteditable:
|
|
1283
|
+
contenteditable: s.value ? "plaintext-only" : !1
|
|
952
1284
|
}, n.value, {
|
|
953
1285
|
onKeydown: [
|
|
954
|
-
|
|
955
|
-
|
|
1286
|
+
Pe(W(c, ["stop"]), ["enter"]),
|
|
1287
|
+
Pe(W(S, ["stop"]), ["esc"])
|
|
956
1288
|
]
|
|
957
|
-
}),
|
|
958
|
-
e.editable ? (
|
|
959
|
-
|
|
1289
|
+
}), B(r.value), 17, lo),
|
|
1290
|
+
e.editable ? (p(), T(F, { key: 0 }, [
|
|
1291
|
+
s.value ? (p(), T("span", {
|
|
960
1292
|
key: 1,
|
|
961
1293
|
"data-top-icon": "",
|
|
962
1294
|
class: "top-tagSelector_edit",
|
|
963
|
-
onClick:
|
|
964
|
-
})) : (
|
|
1295
|
+
onClick: W(c, ["stop"])
|
|
1296
|
+
})) : (p(), T("span", {
|
|
965
1297
|
key: 0,
|
|
966
1298
|
"data-top-icon": "",
|
|
967
1299
|
class: "top-tagSelector_edit",
|
|
968
|
-
onClick:
|
|
1300
|
+
onClick: g
|
|
969
1301
|
}))
|
|
970
|
-
], 64)) :
|
|
1302
|
+
], 64)) : E("", !0)
|
|
971
1303
|
]),
|
|
972
1304
|
_: 1
|
|
973
1305
|
}, 8, ["class"]));
|
|
974
1306
|
}
|
|
975
|
-
}),
|
|
1307
|
+
}), no = { key: 1 }, ro = /* @__PURE__ */ L({
|
|
976
1308
|
inheritAttrs: !1,
|
|
977
1309
|
__name: "popupOpener",
|
|
978
1310
|
props: /* @__PURE__ */ V({
|
|
@@ -993,59 +1325,59 @@ const mt = /* @__PURE__ */ R({
|
|
|
993
1325
|
}),
|
|
994
1326
|
emits: ["update:modelValue"],
|
|
995
1327
|
setup(e) {
|
|
996
|
-
const
|
|
1328
|
+
const t = e, o = b(e, "modelValue"), a = t.useTopButton ? ee : "div", r = t.useTopButton ? "html" : "default", l = {
|
|
997
1329
|
model: o,
|
|
998
|
-
mode:
|
|
999
|
-
targetId:
|
|
1000
|
-
filters:
|
|
1001
|
-
payload:
|
|
1330
|
+
mode: t.mode,
|
|
1331
|
+
targetId: t.targetId,
|
|
1332
|
+
filters: t.filters,
|
|
1333
|
+
payload: t.payload
|
|
1002
1334
|
};
|
|
1003
|
-
return (n,
|
|
1004
|
-
const
|
|
1005
|
-
return
|
|
1006
|
-
default:
|
|
1007
|
-
|
|
1335
|
+
return (n, s) => {
|
|
1336
|
+
const g = tt("top-data");
|
|
1337
|
+
return p(), k(it, { id: e.id }, {
|
|
1338
|
+
default: j(() => [
|
|
1339
|
+
ot((p(), k(at(m(a)), Fe({
|
|
1008
1340
|
class: {
|
|
1009
1341
|
"top-tagSelector": !0,
|
|
1010
|
-
"top-tagSelector-useTopButton":
|
|
1011
|
-
"top-tagSelector-custom": !
|
|
1012
|
-
"top-as-selector":
|
|
1013
|
-
"top-tagSelector-filter":
|
|
1014
|
-
"top-tagSelector-setter_single":
|
|
1015
|
-
"top-tagSelector-setter_several":
|
|
1342
|
+
"top-tagSelector-useTopButton": t.useTopButton,
|
|
1343
|
+
"top-tagSelector-custom": !t.useTopButton,
|
|
1344
|
+
"top-as-selector": t.useTopButton,
|
|
1345
|
+
"top-tagSelector-filter": t.mode === "filter",
|
|
1346
|
+
"top-tagSelector-setter_single": t.mode === "setter" && !e.filters,
|
|
1347
|
+
"top-tagSelector-setter_several": t.mode === "setter" && e.filters,
|
|
1016
1348
|
"top-tagSelector-selectedOne": !o.value.length || o.value.length === 1,
|
|
1017
1349
|
"top-tagSelector-toTwoLine": o.value.length > 5
|
|
1018
1350
|
},
|
|
1019
1351
|
color: "theme",
|
|
1020
1352
|
styling: e.styling
|
|
1021
1353
|
}, n.$attrs), {
|
|
1022
|
-
[
|
|
1023
|
-
!o.value.length && e.mode === "filter" ? (
|
|
1354
|
+
[m(r)]: j(() => [
|
|
1355
|
+
!o.value.length && e.mode === "filter" ? (p(), k(Ce, {
|
|
1024
1356
|
key: 0,
|
|
1025
1357
|
id: "all",
|
|
1026
1358
|
colorId: "",
|
|
1027
1359
|
name: n.$i18n.Common.All_tags ?? "",
|
|
1028
1360
|
state: ""
|
|
1029
|
-
}, null, 8, ["name"])) :
|
|
1030
|
-
e.mode === "setter" && e.filters ? (
|
|
1031
|
-
|
|
1032
|
-
])) : (
|
|
1033
|
-
id:
|
|
1034
|
-
colorId:
|
|
1035
|
-
name:
|
|
1036
|
-
state:
|
|
1361
|
+
}, null, 8, ["name"])) : E("", !0),
|
|
1362
|
+
e.mode === "setter" && e.filters ? (p(), T("div", no, [
|
|
1363
|
+
lt(n.$slots, "default")
|
|
1364
|
+
])) : (p(!0), T(F, { key: 2 }, fe(o.value, (c) => (p(), k(Ce, {
|
|
1365
|
+
id: m(te)(c),
|
|
1366
|
+
colorId: m(ce)(c, e.tags)?.color_id ?? "",
|
|
1367
|
+
name: m(ce)(c, e.tags)?.name ?? "",
|
|
1368
|
+
state: m(te)(c) === c ? "selected" : "excluded"
|
|
1037
1369
|
}, null, 8, ["id", "colorId", "name", "state"]))), 256))
|
|
1038
1370
|
]),
|
|
1039
1371
|
_: 2
|
|
1040
1372
|
}, 1040, ["class", "styling"])), [
|
|
1041
|
-
[
|
|
1373
|
+
[g, l, "topTagSelectorTarget"]
|
|
1042
1374
|
])
|
|
1043
1375
|
]),
|
|
1044
1376
|
_: 3
|
|
1045
1377
|
}, 8, ["id"]);
|
|
1046
1378
|
};
|
|
1047
1379
|
}
|
|
1048
|
-
}),
|
|
1380
|
+
}), bo = /* @__PURE__ */ L({
|
|
1049
1381
|
__name: "tagSelector",
|
|
1050
1382
|
props: /* @__PURE__ */ V({
|
|
1051
1383
|
modelValue: {},
|
|
@@ -1065,177 +1397,177 @@ const mt = /* @__PURE__ */ R({
|
|
|
1065
1397
|
},
|
|
1066
1398
|
modelModifiers: {},
|
|
1067
1399
|
tags: {
|
|
1068
|
-
default:
|
|
1400
|
+
default: Ne(oo)
|
|
1069
1401
|
},
|
|
1070
1402
|
tagsModifiers: {}
|
|
1071
1403
|
}),
|
|
1072
1404
|
emits: /* @__PURE__ */ V(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
|
|
1073
|
-
setup(e, { emit:
|
|
1074
|
-
const o =
|
|
1075
|
-
n(
|
|
1076
|
-
},
|
|
1077
|
-
|
|
1078
|
-
const
|
|
1079
|
-
const
|
|
1080
|
-
return I.set("add", { value: "add", title: o.Common.Add +
|
|
1405
|
+
setup(e, { emit: t }) {
|
|
1406
|
+
const o = A(), a = e, r = b(e, "modelValue"), l = b(e, "tags"), n = t, s = rt((h, I) => {
|
|
1407
|
+
n(h, I);
|
|
1408
|
+
}, a.emitDelay);
|
|
1409
|
+
a.singleMode && !r.value.length && (r.value = [l.value[0].id]);
|
|
1410
|
+
const g = a.id ?? "top-popup-id-" + Math.random(), c = _("add"), S = () => {
|
|
1411
|
+
const h = " " + o.Common.Tags?.toLowerCase(), I = /* @__PURE__ */ new Map();
|
|
1412
|
+
return I.set("add", { value: "add", title: o.Common.Add + h }), I.set("replace", { value: "replace", title: o.Common.Replace + h }), I.set("delete", { value: "delete", title: o.Common.Delete + h }), I;
|
|
1081
1413
|
};
|
|
1082
|
-
let i =
|
|
1414
|
+
let i = qe({
|
|
1083
1415
|
model: r,
|
|
1084
1416
|
mode: "filter",
|
|
1085
1417
|
targetId: void 0,
|
|
1086
1418
|
filters: void 0,
|
|
1087
1419
|
payload: void 0
|
|
1088
1420
|
});
|
|
1089
|
-
|
|
1090
|
-
|
|
1421
|
+
G(r, () => {
|
|
1422
|
+
s("selector", r.value);
|
|
1091
1423
|
});
|
|
1092
|
-
const
|
|
1093
|
-
if (i.value.mode === "setter" &&
|
|
1094
|
-
return i.value.model.value.length >=
|
|
1095
|
-
}), d = (
|
|
1096
|
-
if (
|
|
1097
|
-
if (i.value.model.value.includes(
|
|
1098
|
-
if (i.value.model.value.includes(
|
|
1424
|
+
const v = M(() => {
|
|
1425
|
+
if (i.value.mode === "setter" && a.maxTagsForSetter && !i.value.filters)
|
|
1426
|
+
return i.value.model.value.length >= a.maxTagsForSetter;
|
|
1427
|
+
}), d = (h) => {
|
|
1428
|
+
if (h !== "all") {
|
|
1429
|
+
if (i.value.model.value.includes(h)) return "selected";
|
|
1430
|
+
if (i.value.model.value.includes(Oe(h))) return "excluded";
|
|
1099
1431
|
}
|
|
1100
|
-
return
|
|
1101
|
-
},
|
|
1102
|
-
const
|
|
1103
|
-
let
|
|
1104
|
-
I === "select" &&
|
|
1105
|
-
if (!
|
|
1106
|
-
const
|
|
1107
|
-
return
|
|
1108
|
-
}), i.value.model.value =
|
|
1109
|
-
tagsIds:
|
|
1432
|
+
return h === "all" && !i.value.model.value.length ? "selected" : "";
|
|
1433
|
+
}, f = (h, I) => {
|
|
1434
|
+
const x = Oe(h);
|
|
1435
|
+
let C = i.value.model.value.filter((K) => K !== h && K !== x);
|
|
1436
|
+
I === "select" && C.push(h), I === "exclude" && C.push(x), i.value.mode === "setter" && i.value.targetId !== void 0 && a.requiredForSetter && (C.length || C.push("1"), C.length === 2 && i.value.model.value.length === 1 && i.value.model.value[0] === "1" && (C = C.filter((K) => K !== "1"))), a.singleMode && !i.value.filters && (C.length || (C = i.value.model.value), C.length > 1 && (C = [C[C.length - 1]])), C.sort((K, ae) => {
|
|
1437
|
+
if (!a.tags) return 0;
|
|
1438
|
+
const H = a.tags.findIndex((Y) => Y.id === K), z = a.tags.findIndex((Y) => Y.id === ae);
|
|
1439
|
+
return H - z;
|
|
1440
|
+
}), i.value.model.value = C, i.value.mode === "setter" && i.value.targetId !== void 0 && s("setter", {
|
|
1441
|
+
tagsIds: C,
|
|
1110
1442
|
targetId: i.value.targetId,
|
|
1111
1443
|
payload: i.value.payload
|
|
1112
1444
|
});
|
|
1113
|
-
},
|
|
1114
|
-
let
|
|
1115
|
-
return i.value.mode === "filter" && (
|
|
1116
|
-
}),
|
|
1117
|
-
const
|
|
1118
|
-
if (!
|
|
1445
|
+
}, u = M(() => {
|
|
1446
|
+
let h = "top-tagSelector_popup";
|
|
1447
|
+
return i.value.mode === "filter" && (h += " top-tagSelector_popup-filter"), i.value.mode === "setter" && (h += " top-tagSelector_popup-setter"), h;
|
|
1448
|
+
}), w = () => {
|
|
1449
|
+
const h = prompt("", "New tag");
|
|
1450
|
+
if (!h || h === "New tag") return;
|
|
1119
1451
|
const I = l.value.length + 1;
|
|
1120
1452
|
l.value.push({
|
|
1121
1453
|
id: String(I),
|
|
1122
|
-
name:
|
|
1454
|
+
name: h,
|
|
1123
1455
|
color_id: String((I - 1) % 10 + 1)
|
|
1124
1456
|
}), n("tagsChanged", l.value);
|
|
1125
|
-
},
|
|
1126
|
-
if (i.value =
|
|
1127
|
-
if (i.value.filters && (c.value = "add", i.value.model.value = []), !
|
|
1457
|
+
}, U = (h) => {
|
|
1458
|
+
if (i.value = X(h.elPopupOpener, "topTagSelectorTarget"), !i.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1459
|
+
if (i.value.filters && (c.value = "add", i.value.model.value = []), !Q.$?.ui.sortable) {
|
|
1128
1460
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
1129
1461
|
return;
|
|
1130
1462
|
}
|
|
1131
|
-
!
|
|
1463
|
+
!Q.state.isMobile && !Q.state.isMobileUA && l.value && $(h.elPopup).sortable({
|
|
1132
1464
|
items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
|
|
1133
1465
|
/**
|
|
1134
1466
|
* @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
|
|
1135
1467
|
*/
|
|
1136
1468
|
cancel: '[contenteditable="plaintext-only"], [contenteditable="true"]',
|
|
1137
1469
|
distance: 10,
|
|
1138
|
-
stop: function(I,
|
|
1470
|
+
stop: function(I, x) {
|
|
1139
1471
|
if (!l.value) return;
|
|
1140
|
-
const
|
|
1141
|
-
|
|
1472
|
+
const C = $(x.item).parent().find("[data-tag_id]"), K = [];
|
|
1473
|
+
C.each((ae, H) => {
|
|
1142
1474
|
if (!l.value) return;
|
|
1143
|
-
const
|
|
1144
|
-
|
|
1145
|
-
}), l.value.sort((
|
|
1146
|
-
const
|
|
1147
|
-
return
|
|
1148
|
-
}),
|
|
1475
|
+
const z = $(H).attr("data-tag_id");
|
|
1476
|
+
K.push(z);
|
|
1477
|
+
}), l.value.sort((ae, H) => {
|
|
1478
|
+
const z = K.findIndex((ge) => ge === ae.id), Y = K.findIndex((ge) => ge === H.id);
|
|
1479
|
+
return z - Y;
|
|
1480
|
+
}), s("tagsChanged", l.value);
|
|
1149
1481
|
}
|
|
1150
1482
|
});
|
|
1151
|
-
},
|
|
1152
|
-
|
|
1483
|
+
}, P = (h) => {
|
|
1484
|
+
Q.$?.ui.sortable && $(h.elPopup).data("ui-sortable") && $(h.elPopup).sortable("destroy");
|
|
1153
1485
|
};
|
|
1154
|
-
return (
|
|
1155
|
-
|
|
1486
|
+
return (h, I) => (p(), T(F, null, [
|
|
1487
|
+
O(ro, {
|
|
1156
1488
|
modelValue: r.value,
|
|
1157
|
-
"onUpdate:modelValue": I[0] || (I[0] = (
|
|
1158
|
-
id:
|
|
1489
|
+
"onUpdate:modelValue": I[0] || (I[0] = (x) => r.value = x),
|
|
1490
|
+
id: m(g),
|
|
1159
1491
|
tags: l.value,
|
|
1160
1492
|
styling: e.styling,
|
|
1161
1493
|
mode: "filter",
|
|
1162
1494
|
useTopButton: e.useTopButton
|
|
1163
1495
|
}, null, 8, ["modelValue", "id", "tags", "styling", "useTopButton"]),
|
|
1164
|
-
|
|
1165
|
-
id:
|
|
1166
|
-
class:
|
|
1167
|
-
onOpen: I[4] || (I[4] = (
|
|
1168
|
-
onClose: I[5] || (I[5] = (
|
|
1496
|
+
O(ke, {
|
|
1497
|
+
id: m(g),
|
|
1498
|
+
class: oe(u.value),
|
|
1499
|
+
onOpen: I[4] || (I[4] = (x) => U(x)),
|
|
1500
|
+
onClose: I[5] || (I[5] = (x) => P(x)),
|
|
1169
1501
|
"transition-duration": 50
|
|
1170
|
-
},
|
|
1171
|
-
contentList:
|
|
1172
|
-
|
|
1502
|
+
}, nt({
|
|
1503
|
+
contentList: j(() => [
|
|
1504
|
+
m(i).mode === "filter" && !e.singleMode ? (p(), k(Ue, {
|
|
1173
1505
|
key: 0,
|
|
1174
1506
|
id: "all",
|
|
1175
1507
|
colorId: "",
|
|
1176
|
-
name:
|
|
1177
|
-
state:
|
|
1178
|
-
onSelect: I[3] || (I[3] = (
|
|
1179
|
-
}, null, 8, ["name", "state"])) :
|
|
1180
|
-
(
|
|
1181
|
-
key:
|
|
1182
|
-
id:
|
|
1183
|
-
colorId:
|
|
1184
|
-
name:
|
|
1185
|
-
state: d(
|
|
1186
|
-
canExclude:
|
|
1508
|
+
name: h.$i18n.Common.All_tags ?? "",
|
|
1509
|
+
state: m(i).model.value.length ? "" : "selected",
|
|
1510
|
+
onSelect: I[3] || (I[3] = (x) => m(i).model.value = [])
|
|
1511
|
+
}, null, 8, ["name", "state"])) : E("", !0),
|
|
1512
|
+
(p(!0), T(F, null, fe(l.value, (x) => (p(), k(Ue, {
|
|
1513
|
+
key: x.id,
|
|
1514
|
+
id: x.id,
|
|
1515
|
+
colorId: x.color_id,
|
|
1516
|
+
name: x.name,
|
|
1517
|
+
state: d(x.id),
|
|
1518
|
+
canExclude: m(i).mode === "filter" && !e.singleMode,
|
|
1187
1519
|
editable: e.tagsEditable,
|
|
1188
|
-
disabled:
|
|
1189
|
-
onUnselect: (
|
|
1190
|
-
onSelect: (
|
|
1191
|
-
onExclude: (
|
|
1192
|
-
"onUpdate:name": (
|
|
1193
|
-
|
|
1520
|
+
disabled: v.value && d(x.id) === "",
|
|
1521
|
+
onUnselect: (C) => f(x.id, "unselect"),
|
|
1522
|
+
onSelect: (C) => f(x.id, "select"),
|
|
1523
|
+
onExclude: (C) => f(x.id, "exclude"),
|
|
1524
|
+
"onUpdate:name": (C) => {
|
|
1525
|
+
x.name = C, m(s)("tagsChanged", l.value);
|
|
1194
1526
|
}
|
|
1195
1527
|
}, null, 8, ["id", "colorId", "name", "state", "canExclude", "editable", "disabled", "onUnselect", "onSelect", "onExclude", "onUpdate:name"]))), 128)),
|
|
1196
|
-
e.tagsEditable && l.value.length < e.tagsMax && l.value.length < 20 ? (
|
|
1528
|
+
e.tagsEditable && l.value.length < e.tagsMax && l.value.length < 20 ? (p(), k(Te, {
|
|
1197
1529
|
key: 1,
|
|
1198
1530
|
"data-top-icon": "",
|
|
1199
|
-
onClick:
|
|
1531
|
+
onClick: W(w, ["stop"])
|
|
1200
1532
|
}, {
|
|
1201
|
-
default:
|
|
1202
|
-
J(
|
|
1533
|
+
default: j(() => [
|
|
1534
|
+
J(B(h.$i18n.Common.Add), 1)
|
|
1203
1535
|
]),
|
|
1204
1536
|
_: 1
|
|
1205
|
-
})) :
|
|
1537
|
+
})) : E("", !0)
|
|
1206
1538
|
]),
|
|
1207
1539
|
_: 2
|
|
1208
1540
|
}, [
|
|
1209
|
-
|
|
1541
|
+
m(i).mode === "setter" && m(i).filters ? {
|
|
1210
1542
|
name: "header",
|
|
1211
|
-
fn:
|
|
1212
|
-
|
|
1543
|
+
fn: j(() => [
|
|
1544
|
+
O(he, {
|
|
1213
1545
|
modelValue: c.value,
|
|
1214
|
-
"onUpdate:modelValue": I[1] || (I[1] = (
|
|
1215
|
-
options:
|
|
1546
|
+
"onUpdate:modelValue": I[1] || (I[1] = (x) => c.value = x),
|
|
1547
|
+
options: S()
|
|
1216
1548
|
}, null, 8, ["modelValue", "options"])
|
|
1217
1549
|
]),
|
|
1218
1550
|
key: "0"
|
|
1219
1551
|
} : void 0,
|
|
1220
|
-
|
|
1552
|
+
m(i).mode === "setter" && m(i).filters ? {
|
|
1221
1553
|
name: "footer",
|
|
1222
|
-
fn:
|
|
1223
|
-
|
|
1224
|
-
default:
|
|
1225
|
-
J(
|
|
1554
|
+
fn: j(() => [
|
|
1555
|
+
O(ee, { color: "theme" }, {
|
|
1556
|
+
default: j(() => [
|
|
1557
|
+
J(B(h.$i18n.Common.Cancel2), 1)
|
|
1226
1558
|
]),
|
|
1227
1559
|
_: 1
|
|
1228
1560
|
}),
|
|
1229
|
-
|
|
1230
|
-
onClick: I[2] || (I[2] = (
|
|
1231
|
-
tagsIds:
|
|
1232
|
-
filters:
|
|
1561
|
+
O(ee, {
|
|
1562
|
+
onClick: I[2] || (I[2] = (x) => m(s)("setter", {
|
|
1563
|
+
tagsIds: m(i).model.value,
|
|
1564
|
+
filters: m(i).filters,
|
|
1233
1565
|
filtersAction: c.value,
|
|
1234
|
-
payload:
|
|
1566
|
+
payload: m(i).payload
|
|
1235
1567
|
}))
|
|
1236
1568
|
}, {
|
|
1237
|
-
default:
|
|
1238
|
-
J(
|
|
1569
|
+
default: j(() => [
|
|
1570
|
+
J(B(c.value === "add" ? h.$i18n.Common.Add : "") + " " + B(c.value === "replace" ? h.$i18n.Common.Replace : "") + " " + B(c.value === "delete" ? h.$i18n.Common.Delete : ""), 1)
|
|
1239
1571
|
]),
|
|
1240
1572
|
_: 1
|
|
1241
1573
|
})
|
|
@@ -1247,17 +1579,18 @@ const mt = /* @__PURE__ */ R({
|
|
|
1247
1579
|
}
|
|
1248
1580
|
});
|
|
1249
1581
|
export {
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1582
|
+
xo as TopCompetitorSelector,
|
|
1583
|
+
To as TopGroupSelector,
|
|
1584
|
+
jo as TopProjectSelector,
|
|
1585
|
+
ko as TopRegionSelector,
|
|
1586
|
+
bo as TopTagSelector,
|
|
1587
|
+
ro as TopTagSelectorPopupOpener,
|
|
1588
|
+
Ce as TopTagSelectorTagIcon,
|
|
1589
|
+
kt as dialogRegionSelector,
|
|
1590
|
+
Ct as findRegion,
|
|
1591
|
+
Ao as genElTopTagSelectorPopupOpener,
|
|
1592
|
+
He as genSearcherByKey,
|
|
1593
|
+
Bo as renderElTopTagSelectorPopupOpener,
|
|
1594
|
+
Co as useItemsFromCompetitors
|
|
1262
1595
|
};
|
|
1263
1596
|
//# sourceMappingURL=project.js.map
|