@topvisor/ui 1.6.1-searcherKey.0 → 1.6.1-searcherKey.2
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/app-DRqHHgFb.es.amd.js +2 -0
- package/.chunks/app-DRqHHgFb.es.amd.js.map +1 -0
- package/.chunks/app-DRqHHgFb.es.js +487 -0
- package/.chunks/app-DRqHHgFb.es.js.map +1 -0
- package/.chunks/{datepicker-MlbIM78m.es.amd.js → datepicker-QBCcmy-4.es.amd.js} +2 -2
- package/.chunks/{datepicker-MlbIM78m.es.amd.js.map → datepicker-QBCcmy-4.es.amd.js.map} +1 -1
- package/.chunks/{datepicker-MlbIM78m.es.js → datepicker-QBCcmy-4.es.js} +2 -2
- package/.chunks/{datepicker-MlbIM78m.es.js.map → datepicker-QBCcmy-4.es.js.map} +1 -1
- package/.chunks/{dialog-C_1nmPXN.es.amd.js → dialog-yP5SpcG2.es.amd.js} +2 -2
- package/.chunks/{dialog-C_1nmPXN.es.amd.js.map → dialog-yP5SpcG2.es.amd.js.map} +1 -1
- package/.chunks/{dialog-C_1nmPXN.es.js → dialog-yP5SpcG2.es.js} +3 -3
- package/.chunks/{dialog-C_1nmPXN.es.js.map → dialog-yP5SpcG2.es.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-BPUDeHdW.es.amd.js → dialog_regionSelectorRegions-DHRahvlr.es.amd.js} +2 -2
- package/.chunks/{dialog_regionSelectorRegions-BPUDeHdW.es.amd.js.map → dialog_regionSelectorRegions-DHRahvlr.es.amd.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-BPUDeHdW.es.js → dialog_regionSelectorRegions-DHRahvlr.es.js} +4 -4
- package/.chunks/{dialog_regionSelectorRegions-BPUDeHdW.es.js.map → dialog_regionSelectorRegions-DHRahvlr.es.js.map} +1 -1
- package/.chunks/{forms-dosApNxi.es.amd.js → forms-CwTz6NZs.es.amd.js} +2 -2
- package/.chunks/forms-CwTz6NZs.es.amd.js.map +1 -0
- package/.chunks/{forms-dosApNxi.es.js → forms-CwTz6NZs.es.js} +6 -6
- package/.chunks/{forms-dosApNxi.es.js.map → forms-CwTz6NZs.es.js.map} +1 -1
- package/.chunks/{formsExt-D7XsRleI.es.amd.js → formsExt-UGuWA3IZ.es.amd.js} +2 -2
- package/.chunks/{formsExt-D7XsRleI.es.amd.js.map → formsExt-UGuWA3IZ.es.amd.js.map} +1 -1
- package/.chunks/{formsExt-D7XsRleI.es.js → formsExt-UGuWA3IZ.es.js} +3 -3
- package/.chunks/{formsExt-D7XsRleI.es.js.map → formsExt-UGuWA3IZ.es.js.map} +1 -1
- package/.chunks/{notice-8nwvAJQm.es.amd.js → notice-CEtqqU-D.es.amd.js} +2 -2
- package/.chunks/{notice-8nwvAJQm.es.amd.js.map → notice-CEtqqU-D.es.amd.js.map} +1 -1
- package/.chunks/{notice-8nwvAJQm.es.js → notice-CEtqqU-D.es.js} +2 -2
- package/.chunks/{notice-8nwvAJQm.es.js.map → notice-CEtqqU-D.es.js.map} +1 -1
- package/.chunks/{popup-Bn5Wm8WI.es.amd.js → popup-Ctmqg87k.es.amd.js} +2 -2
- package/.chunks/{popup-Bn5Wm8WI.es.amd.js.map → popup-Ctmqg87k.es.amd.js.map} +1 -1
- package/.chunks/{popup-Bn5Wm8WI.es.js → popup-Ctmqg87k.es.js} +3 -3
- package/.chunks/{popup-Bn5Wm8WI.es.js.map → popup-Ctmqg87k.es.js.map} +1 -1
- package/.chunks/{popup-cAqd6Dj3.es.amd.js → popup-DeoDmf_L.es.amd.js} +2 -2
- package/.chunks/{popup-cAqd6Dj3.es.amd.js.map → popup-DeoDmf_L.es.amd.js.map} +1 -1
- package/.chunks/{popup-cAqd6Dj3.es.js → popup-DeoDmf_L.es.js} +3 -3
- package/.chunks/{popup-cAqd6Dj3.es.js.map → popup-DeoDmf_L.es.js.map} +1 -1
- package/.chunks/{utils-mBJcBhkk.es.amd.js → utils-3yIeyK6N.es.amd.js} +2 -2
- package/.chunks/{utils-mBJcBhkk.es.amd.js.map → utils-3yIeyK6N.es.amd.js.map} +1 -1
- package/.chunks/{utils-mBJcBhkk.es.js → utils-3yIeyK6N.es.js} +2 -2
- package/.chunks/{utils-mBJcBhkk.es.js.map → utils-3yIeyK6N.es.js.map} +1 -1
- package/.chunks/{utils-D46Z7je_.es.amd.js → utils-B-9_dGm0.es.amd.js} +2 -2
- package/.chunks/{utils-D46Z7je_.es.amd.js.map → utils-B-9_dGm0.es.amd.js.map} +1 -1
- package/.chunks/{utils-D46Z7je_.es.js → utils-B-9_dGm0.es.js} +4 -4
- package/.chunks/{utils-D46Z7je_.es.js.map → utils-B-9_dGm0.es.js.map} +1 -1
- package/.chunks/{worker-BfCrg4RI.es.amd.js → worker-2yAM4kZz.es.amd.js} +2 -2
- package/.chunks/{worker-BfCrg4RI.es.amd.js.map → worker-2yAM4kZz.es.amd.js.map} +1 -1
- package/.chunks/{worker-BfCrg4RI.es.js → worker-2yAM4kZz.es.js} +3 -3
- package/.chunks/worker-2yAM4kZz.es.js.map +1 -0
- package/assets/project.css +1 -1
- package/autoload-css-manifest.amd.json +4 -4
- package/autoload-css-manifest.json +4 -4
- package/charts/charts.amd.js +1 -1
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.js +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +3 -3
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.amd.js.map +1 -1
- package/dialog/dialog.js +2 -2
- package/forms/forms.amd.js +1 -1
- package/forms/forms.amd.js.map +1 -1
- package/forms/forms.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +1 -1
- package/icomoon/Topvisor icons.json +338 -287
- package/icomoon/demo.html +29 -1
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +2 -0
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +11 -5
- package/layout/layout.amd.js +1 -1
- package/layout/layout.amd.js.map +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 +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +565 -448
- package/project/project.js.map +1 -1
- package/schedule/schedule.amd.js +1 -1
- package/schedule/schedule.amd.js.map +1 -1
- package/schedule/schedule.js +2 -2
- package/src/components/project/project.d.ts +1 -0
- package/src/components/project/projectBar/types.d.ts +47 -0
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +2 -2
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.amd.js.map +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.amd.js.map +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.amd.js.map +1 -1
- package/utils/device.js +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.amd.js.map +1 -1
- package/utils/lodash.js +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.amd.js.map +1 -1
- package/utils/price.js +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.amd.js.map +1 -1
- package/utils/searchers.js +2 -1
- package/utils/searchers.js.map +1 -1
- package/utils/string.amd.js +1 -1
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +1 -1
- package/.chunks/app-qGtdp_Vh.es.amd.js +0 -2
- package/.chunks/app-qGtdp_Vh.es.amd.js.map +0 -1
- package/.chunks/app-qGtdp_Vh.es.js +0 -405
- package/.chunks/app-qGtdp_Vh.es.js.map +0 -1
- package/.chunks/forms-dosApNxi.es.amd.js.map +0 -1
- package/.chunks/worker-BfCrg4RI.es.js.map +0 -1
package/project/project.js
CHANGED
|
@@ -6,20 +6,19 @@
|
|
|
6
6
|
/* end import css */
|
|
7
7
|
|
|
8
8
|
import { a as e, i as t } from "../.chunks/api-nVBtzTDk.es.js";
|
|
9
|
-
import { E as n, O as r, P as i, h as a,
|
|
10
|
-
import { storage as
|
|
11
|
-
import { t as
|
|
12
|
-
import "../.chunks/app-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { c as
|
|
19
|
-
import {
|
|
20
|
-
import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createSlots as ee, createTextVNode as A, createVNode as j, defineComponent as M, isRef as te, mergeModels as N, mergeProps as ne, nextTick as re, normalizeClass as P, onMounted as ie, openBlock as F, reactive as ae, ref as I, renderList as oe, renderSlot as se, resolveComponent as ce, resolveDirective as le, resolveDynamicComponent as ue, shallowRef as de, toDisplayString as L, toValue as fe, unref as R, useId as pe, useModel as z, watch as B, withCtx as V, withDirectives as me, withKeys as he, withModifiers as H } from "vue";
|
|
9
|
+
import { E as n, O as r, P as i, h as a, i as o, n as s } from "../.chunks/forms-CwTz6NZs.es.js";
|
|
10
|
+
import { storage as c } from "../utils/dom.js";
|
|
11
|
+
import { t as l } from "../.chunks/worker-2yAM4kZz.es.js";
|
|
12
|
+
import { a as u, i as d, n as f, r as p } from "../.chunks/app-DRqHHgFb.es.js";
|
|
13
|
+
import { validUrl as m } from "../utils/check.js";
|
|
14
|
+
import { ellipsis as h } from "../utils/string.js";
|
|
15
|
+
import { genRegionLabelData as g, getSearcherGIcon as _ } from "../utils/searchers.js";
|
|
16
|
+
import { invertKeyboardLayout as v } from "../utils/keyboard.js";
|
|
17
|
+
import { c as y, n as b, o as x, r as ee, s as S } from "../.chunks/popup-DeoDmf_L.es.js";
|
|
18
|
+
import { c as C, d as te, f as ne, p as re } from "../.chunks/formsExt-UGuWA3IZ.es.js";
|
|
19
|
+
import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createSlots as ie, createTextVNode as A, createVNode as j, defineComponent as M, isRef as ae, mergeModels as N, mergeProps as oe, nextTick as se, normalizeClass as P, normalizeStyle as ce, onMounted as le, onUnmounted as ue, openBlock as F, reactive as de, ref as I, renderList as L, renderSlot as R, resolveComponent as fe, resolveDirective as pe, resolveDynamicComponent as me, shallowRef as he, toDisplayString as z, toValue as ge, unref as B, useId as _e, useModel as V, watch as H, withCtx as U, withDirectives as ve, withKeys as ye, withModifiers as W } from "vue";
|
|
21
20
|
//#region src/components/project/competitorSelector/competitorSelector.vue?vue&type=script&setup=true&lang.ts
|
|
22
|
-
var
|
|
21
|
+
var be = { class: "top-competitorSelector" }, xe = { class: "top-ellipsis1" }, Se = /* @__PURE__ */ M({
|
|
23
22
|
__name: "competitorSelector",
|
|
24
23
|
props: /*@__PURE__*/ N({
|
|
25
24
|
modelValue: {},
|
|
@@ -35,7 +34,7 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
35
34
|
}),
|
|
36
35
|
emits: ["update:modelValue"],
|
|
37
36
|
setup(e) {
|
|
38
|
-
let t = e, i =
|
|
37
|
+
let t = e, i = V(e, "modelValue"), o = T(() => {
|
|
39
38
|
if (t.showSelectAllItem) return {
|
|
40
39
|
icon: t.selectAllItemIcon,
|
|
41
40
|
title: n().Common.Select_all,
|
|
@@ -43,23 +42,23 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
43
42
|
content: ""
|
|
44
43
|
};
|
|
45
44
|
});
|
|
46
|
-
return (t, n) => (F(), O("div",
|
|
47
|
-
opener:
|
|
45
|
+
return (t, n) => (F(), O("div", be, [B(r).state.isMobile ? (F(), E(S, { key: 0 }, {
|
|
46
|
+
opener: U(() => [j(a, {
|
|
48
47
|
class: "top-competitorSelector_opener",
|
|
49
48
|
color: "theme",
|
|
50
49
|
icon: "",
|
|
51
50
|
icon2: ""
|
|
52
51
|
}, {
|
|
53
|
-
default:
|
|
52
|
+
default: U(() => [A(z(e.items.find((e) => e.value === i.value?.[0])?.content), 1)]),
|
|
54
53
|
_: 1
|
|
55
54
|
})]),
|
|
56
|
-
contentList:
|
|
55
|
+
contentList: U(() => [(F(!0), O(w, null, L(e.items, (e) => (F(), E(x, {
|
|
57
56
|
class: P({ "top-active": i.value?.includes(e.value) }),
|
|
58
57
|
"data-top-icon": e.icon,
|
|
59
58
|
title: e.title,
|
|
60
59
|
onClick: () => i.value = [e.value]
|
|
61
60
|
}, {
|
|
62
|
-
default:
|
|
61
|
+
default: U(() => [k("span", xe, z(e.content), 1)]),
|
|
63
62
|
_: 2
|
|
64
63
|
}, 1032, [
|
|
65
64
|
"class",
|
|
@@ -68,7 +67,7 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
68
67
|
"onClick"
|
|
69
68
|
]))), 256))]),
|
|
70
69
|
_: 1
|
|
71
|
-
})) : (F(), E(
|
|
70
|
+
})) : (F(), E(re, {
|
|
72
71
|
key: 1,
|
|
73
72
|
modelValue: i.value,
|
|
74
73
|
"onUpdate:modelValue": n[0] ||= (e) => i.value = e,
|
|
@@ -83,94 +82,12 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
83
82
|
"selectAllItem"
|
|
84
83
|
]))]));
|
|
85
84
|
}
|
|
86
|
-
}),
|
|
85
|
+
}), Ce = (e, t) => T(() => ge(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
|
|
87
86
|
value: e.id,
|
|
88
87
|
title: e.url + ` [${e.id}]`,
|
|
89
|
-
icon: e.id ===
|
|
88
|
+
icon: e.id === ge(t) ? "" : "",
|
|
90
89
|
content: e.name
|
|
91
|
-
}))),
|
|
92
|
-
0: "Yandex",
|
|
93
|
-
1: "Google",
|
|
94
|
-
4: "YouTube",
|
|
95
|
-
5: "Bing",
|
|
96
|
-
7: "Seznam",
|
|
97
|
-
8: "AppStore",
|
|
98
|
-
9: "GoogleStore",
|
|
99
|
-
20: "Yandex.com",
|
|
100
|
-
21: "Yandex.com.tr",
|
|
101
|
-
22: "YandexLive"
|
|
102
|
-
}, xe = {
|
|
103
|
-
alt: "",
|
|
104
|
-
key: -2,
|
|
105
|
-
name: "--",
|
|
106
|
-
index: -2
|
|
107
|
-
}, Se = {
|
|
108
|
-
key: -2,
|
|
109
|
-
name: "--",
|
|
110
|
-
regions: [xe],
|
|
111
|
-
regionByIndex: /* @__PURE__ */ new Map([[-2, xe]])
|
|
112
|
-
}, U = {
|
|
113
|
-
alt: "",
|
|
114
|
-
key: -2,
|
|
115
|
-
name: "Autoselect",
|
|
116
|
-
index: -2
|
|
117
|
-
}, Ce = {
|
|
118
|
-
key: -2,
|
|
119
|
-
name: "Autoselect",
|
|
120
|
-
regions: [U],
|
|
121
|
-
regionByIndex: /* @__PURE__ */ new Map([[-2, U]])
|
|
122
|
-
}, we = {
|
|
123
|
-
alt: "",
|
|
124
|
-
countryCode: "00",
|
|
125
|
-
depth: 1,
|
|
126
|
-
device: 0,
|
|
127
|
-
key: -1,
|
|
128
|
-
index: -1,
|
|
129
|
-
lang: "ru",
|
|
130
|
-
name: "Without region"
|
|
131
|
-
}, Te = () => (U.name = n().Common.Autoselect, U), Ee = () => (Te(), Ce.name = n().Common.Autoselect, console.log(Ce), Ce), De = () => (we.name = n().Keywords.Without_region, we), Oe = [
|
|
132
|
-
4,
|
|
133
|
-
8,
|
|
134
|
-
9
|
|
135
|
-
], ke = (e, t, n = []) => {
|
|
136
|
-
let r = je(e, !1, n), i;
|
|
137
|
-
return r.forEach((n) => {
|
|
138
|
-
if ((t.searcher_key === void 0 || t.searcher_key == n.key) && n.regions && (n.regions.forEach((r) => {
|
|
139
|
-
if (!i && (t.key === void 0 || t.key == r.key) && (t.index === void 0 || t.index == r.index) && !(!e && (t.lang !== void 0 && t.lang != r.lang || t.device !== void 0 && t.device != r.device))) return r.searcher_key = n.key, i = r, !1;
|
|
140
|
-
}), i)) return !1;
|
|
141
|
-
}), i;
|
|
142
|
-
}, Ae = l(() => import("../.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.js")), je = (e = "", t = !1, n = []) => {
|
|
143
|
-
let r;
|
|
144
|
-
return r = e === "volume" || e === "cost_forecast" ? Me(n) : e === "project_relevant_url" ? Ne(n) : Pe(n, !0), t && r.set(-2, Ee()), r.size || r.set(-2, Se), r;
|
|
145
|
-
}, Me = (e) => {
|
|
146
|
-
e = e.filter((e) => r.state.forceSearchersKeysForKeywordsStats.includes(e.key));
|
|
147
|
-
let t = Pe(e, !1);
|
|
148
|
-
return r.state.forceSearchersKeysForKeywordsStats.forEach((e) => {
|
|
149
|
-
if (t.has(e)) return;
|
|
150
|
-
let n = {
|
|
151
|
-
key: e,
|
|
152
|
-
name: be[e],
|
|
153
|
-
regions: [],
|
|
154
|
-
regionByIndex: /* @__PURE__ */ new Map()
|
|
155
|
-
};
|
|
156
|
-
t.set(n.key, n);
|
|
157
|
-
}), r.state.showGlobalRegionForKeywordsStats && t.forEach((e) => {
|
|
158
|
-
if (!e.regionByIndex) return;
|
|
159
|
-
let t = { ...De() };
|
|
160
|
-
e.regionByIndex.set(t.index, t);
|
|
161
|
-
}), t;
|
|
162
|
-
}, Ne = (e) => (e = e.filter((e) => !Oe.includes(e.key)), Pe(e, !1)), Pe = (e, t) => {
|
|
163
|
-
let n = /* @__PURE__ */ new Map();
|
|
164
|
-
return e.forEach((e) => {
|
|
165
|
-
if (t && !e.enabled) return;
|
|
166
|
-
let r = { ...e };
|
|
167
|
-
r.regionByIndex = /* @__PURE__ */ new Map(), e.regions && e.regions.forEach((e) => {
|
|
168
|
-
if (t && !e.enabled) return;
|
|
169
|
-
let n = { ...e };
|
|
170
|
-
r.regionByIndex.set(n.index, n);
|
|
171
|
-
}), r.regionByIndex.size, (!e.regions || r.regionByIndex.size) && n.set(r.key, r);
|
|
172
|
-
}), n;
|
|
173
|
-
}, Fe = (e, t) => {
|
|
90
|
+
}))), we = (e, t) => {
|
|
174
91
|
let r = n();
|
|
175
92
|
return {
|
|
176
93
|
searcherKey: I(e.modelValueSearcherKey ?? t.value.keys().next().value ?? -2),
|
|
@@ -181,7 +98,7 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
181
98
|
value: t.key,
|
|
182
99
|
title: t.name
|
|
183
100
|
};
|
|
184
|
-
e.addSearcherIcon && (r.icon =
|
|
101
|
+
e.addSearcherIcon && (r.icon = _(t.key)), n.set(t.key, r);
|
|
185
102
|
}), e.addCompare && !n.has(-2)) {
|
|
186
103
|
let e = {
|
|
187
104
|
value: "",
|
|
@@ -198,7 +115,7 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
198
115
|
return n;
|
|
199
116
|
})
|
|
200
117
|
};
|
|
201
|
-
},
|
|
118
|
+
}, Te = (e, t) => {
|
|
202
119
|
let r = n(), i = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), a = I(-2);
|
|
203
120
|
e.modelValue.length === 1 && (a.value = e.modelValue[0]), a.value === -2 && (a.value = i.value ? t.value?.regionByIndex.values().next().value?.key ?? -2 : t.value?.regionByIndex.keys().next().value ?? -2);
|
|
204
121
|
let o = T(() => {
|
|
@@ -212,7 +129,7 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
212
129
|
e.has(t.key) || e.set(t.key, n);
|
|
213
130
|
return;
|
|
214
131
|
}
|
|
215
|
-
let n =
|
|
132
|
+
let n = g(t), r = [];
|
|
216
133
|
n.deviceLabel && r.push(n.deviceLabel), n.langLabel && r.push(n.langLabel), n.altLabel && r.push(n.altLabel);
|
|
217
134
|
let a = r.join(", ");
|
|
218
135
|
a &&= ` (${a})`;
|
|
@@ -224,7 +141,7 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
224
141
|
e.set(t.index, o);
|
|
225
142
|
}), e;
|
|
226
143
|
});
|
|
227
|
-
return
|
|
144
|
+
return H(o, (t, n) => {
|
|
228
145
|
if (e.onlySearcher || a.value !== void 0 && t.get(a.value)) return;
|
|
229
146
|
let i = t.keys().next().value;
|
|
230
147
|
if (a.value === -2 || i === -2) {
|
|
@@ -240,14 +157,14 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
240
157
|
break;
|
|
241
158
|
}
|
|
242
159
|
let a = RegExp(` \\((${r.Common.Device_1}|${r.Common.Device_2})\\)`), c = o, l = 3;
|
|
243
|
-
t.indexOf(c) === -1 && (c = o.replace(/^[^a-zа-я]/i, "").replace(a, ""), l--), t.indexOf(c) === -1 && (c = o.replace(
|
|
160
|
+
t.indexOf(c) === -1 && (c = o.replace(/^[^a-zа-я]/i, "").replace(a, ""), l--), t.indexOf(c) === -1 && (c = o.replace(/,\s*[a-z-]+\s*\)\s*$/i, ")").replace(/\s*\(\s*[a-z-]+\s*\)\s*$/i, ""), l--), t.indexOf(c) === -1 && (c = c.replace(/^[^a-zа-я]/i, "").replace(a, ""), l--), t.indexOf(c) !== -1 && (l <= s || (s = l, i = e));
|
|
244
161
|
}
|
|
245
162
|
a.value = i;
|
|
246
163
|
}), {
|
|
247
164
|
regionIndex: a,
|
|
248
165
|
optionByRegionIndex: o
|
|
249
166
|
};
|
|
250
|
-
},
|
|
167
|
+
}, Ee = (e, t, n) => {
|
|
251
168
|
let r = I([]), i = () => {
|
|
252
169
|
if (e.onlySearcher && t.value) {
|
|
253
170
|
r.value = Array.from(t.value.keys());
|
|
@@ -262,33 +179,37 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
262
179
|
}, a = () => {
|
|
263
180
|
r.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(r.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
|
|
264
181
|
};
|
|
265
|
-
return
|
|
182
|
+
return H(r, () => {
|
|
266
183
|
a();
|
|
267
184
|
}), e.addCompare && i(), { regionsIndexes: r };
|
|
268
|
-
},
|
|
269
|
-
let t = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = T(() =>
|
|
185
|
+
}, De = (e) => {
|
|
186
|
+
let t = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = T(() => d(e.forMode, e.autoRegion, e.searchers)), r = T(() => n.value.get(a.searcherKey.value) || u), i = T(() => {
|
|
270
187
|
let e = /* @__PURE__ */ new Set();
|
|
271
188
|
return n.value.forEach((t) => {
|
|
272
189
|
t.regionByIndex.forEach((t) => {
|
|
273
190
|
t.index !== -2 && e.add(t.index);
|
|
274
191
|
});
|
|
275
192
|
}), e;
|
|
276
|
-
}), a =
|
|
277
|
-
|
|
193
|
+
}), a = we(e, n), o = Te(e, r), s = Ee(e, n, i);
|
|
194
|
+
H(n, () => {
|
|
278
195
|
if (e.onlySearcher ? s.regionsIndexes.value = Array.from(n.value.keys()) : s.regionsIndexes.value = s.regionsIndexes.value.filter((e) => i.value.has(e)), a.searcherKey.value === -1) return;
|
|
279
|
-
let
|
|
280
|
-
e.modelValueSearcherKey
|
|
281
|
-
if (e.onlySearcher &&
|
|
282
|
-
|
|
196
|
+
let c = n.value.keys().next().value;
|
|
197
|
+
if (t.value && e.modelValueSearcherKey !== void 0 ? c = e.modelValueSearcherKey : n.value.forEach((t) => {
|
|
198
|
+
if (e.onlySearcher && t.key === a.searcherKey.value) {
|
|
199
|
+
c = a.searcherKey.value;
|
|
283
200
|
return;
|
|
284
201
|
}
|
|
285
|
-
if (o.regionIndex.value &&
|
|
202
|
+
if (o.regionIndex.value && t.regionByIndex?.has(o.regionIndex.value) && (c = t.key), !e.onlySearcher) {
|
|
286
203
|
let e;
|
|
287
|
-
|
|
288
|
-
let
|
|
289
|
-
e?.has(-2) && !
|
|
204
|
+
c !== void 0 && (e = n.value.get(c)?.regionByIndex);
|
|
205
|
+
let r = n.value.get(t.key)?.regionByIndex;
|
|
206
|
+
e?.has(-2) && !r?.has(-2) && (c = t.key);
|
|
290
207
|
}
|
|
291
|
-
})
|
|
208
|
+
}), c !== void 0 && (a.searcherKey.value = c), !e.onlySearcher && o.regionIndex.value !== void 0 && !(r.value?.regionByIndex)?.has(o.regionIndex.value)) {
|
|
209
|
+
let e = r.value?.regionByIndex.values().next().value;
|
|
210
|
+
if (!e) return;
|
|
211
|
+
o.regionIndex.value = t.value ? e.key : e.index;
|
|
212
|
+
}
|
|
292
213
|
}, { immediate: !0 });
|
|
293
214
|
let c = () => {
|
|
294
215
|
if (a.searcherKey.value !== -1 && a.searcherKey.value !== -2) return a.searcherKey.value;
|
|
@@ -297,13 +218,13 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
297
218
|
let n = o.regionIndex.value;
|
|
298
219
|
if (t.value && e.forMode) {
|
|
299
220
|
let t = o.regionIndex.value;
|
|
300
|
-
n =
|
|
221
|
+
n = p(e.forMode, {
|
|
301
222
|
searcher_key: c(),
|
|
302
223
|
key: t
|
|
303
224
|
}, e.searchers)?.index;
|
|
304
225
|
}
|
|
305
226
|
return n;
|
|
306
|
-
},
|
|
227
|
+
}, f = () => {
|
|
307
228
|
let e = c();
|
|
308
229
|
if (e !== void 0) return n.value.get(e);
|
|
309
230
|
};
|
|
@@ -313,13 +234,13 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
313
234
|
compare: s,
|
|
314
235
|
searcherByKey: n,
|
|
315
236
|
allRegionsIndexes: i,
|
|
316
|
-
getSearcher:
|
|
237
|
+
getSearcher: f,
|
|
317
238
|
getRegion: () => {
|
|
318
239
|
let e = l();
|
|
319
|
-
if (e !== void 0) return
|
|
240
|
+
if (e !== void 0) return f()?.regionByIndex?.get(e);
|
|
320
241
|
}
|
|
321
242
|
};
|
|
322
|
-
},
|
|
243
|
+
}, Oe = /* @__PURE__ */ M({
|
|
323
244
|
__name: "regionSelector",
|
|
324
245
|
props: /*@__PURE__*/ N({
|
|
325
246
|
projectId: {},
|
|
@@ -357,85 +278,90 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
357
278
|
"update:modelValueSearcherKey"
|
|
358
279
|
],
|
|
359
280
|
setup(e, { expose: t }) {
|
|
360
|
-
let n = e, r = T(() => n.forMode === "volume" || n.forMode === "cost_forecast"), i =
|
|
361
|
-
if (r.value && !n.onlySearcher && c.value === void 0 && l) throw Error("При использовании `region.key` в `modelValue` необходимо передавать `modelValueSearcherKey`");
|
|
362
|
-
let { selectSearcher: u, selectRegion: d, compare: f, searcherByKey: p, allRegionsIndexes: m, getSearcher: h, getRegion: g } = Re(n), _ = () => {
|
|
281
|
+
let n = e, r = T(() => n.forMode === "volume" || n.forMode === "cost_forecast"), i = V(e, "modelValue"), o = V(e, "modelValueSingle"), c = V(e, "modelValueSearcherKey"), { selectSearcher: l, selectRegion: u, compare: d, searcherByKey: p, allRegionsIndexes: m, getSearcher: h, getRegion: g } = De(n), _ = () => {
|
|
363
282
|
let e = [];
|
|
364
283
|
p.value.forEach((t) => {
|
|
365
284
|
(n.forMode === "project_relevant_url" || t.enabled) && t.regions.forEach((t) => {
|
|
366
285
|
(n.forMode === "project_relevant_url" || t.enabled) && t.index !== -1 && e.push(t);
|
|
367
286
|
});
|
|
368
|
-
}),
|
|
287
|
+
}), f.open("regions", {
|
|
369
288
|
regions: e,
|
|
370
|
-
regionsIndexes:
|
|
371
|
-
"@update:regionsIndexes": (e) =>
|
|
289
|
+
regionsIndexes: d.regionsIndexes.value,
|
|
290
|
+
"@update:regionsIndexes": (e) => d.regionsIndexes.value = e
|
|
372
291
|
});
|
|
373
292
|
};
|
|
374
|
-
return
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
293
|
+
return H([
|
|
294
|
+
r,
|
|
295
|
+
() => n.onlySearcher,
|
|
296
|
+
c
|
|
297
|
+
], () => {
|
|
298
|
+
let e = i.value.some((e) => e !== -2);
|
|
299
|
+
if (r.value && !n.onlySearcher && c.value === void 0 && e) throw Error("При использовании `region.key` в `modelValue` необходимо передавать `modelValueSearcherKey`");
|
|
300
|
+
}, { immediate: !0 }), H([
|
|
301
|
+
u.regionIndex,
|
|
302
|
+
l.searcherKey,
|
|
303
|
+
d.regionsIndexes
|
|
378
304
|
], () => {
|
|
379
|
-
if (
|
|
380
|
-
if (JSON.stringify(i.value) === JSON.stringify(
|
|
381
|
-
i.value = [...
|
|
382
|
-
} else n.onlySearcher ? (i.value = [
|
|
383
|
-
!n.onlySearcher && !m.value.size && (
|
|
384
|
-
}),
|
|
385
|
-
c.value !== void 0 && (
|
|
386
|
-
}),
|
|
387
|
-
c.value !== void 0 && (c.value =
|
|
388
|
-
}),
|
|
389
|
-
|
|
390
|
-
}, { immediate: !0 }),
|
|
391
|
-
if (i.value[0] && (
|
|
305
|
+
if (l.searcherKey.value === -1 && d.regionsIndexes.value.length) {
|
|
306
|
+
if (JSON.stringify(i.value) === JSON.stringify(d.regionsIndexes.value)) return;
|
|
307
|
+
i.value = [...d.regionsIndexes.value];
|
|
308
|
+
} else n.onlySearcher ? (i.value = [l.searcherKey.value], l.searcherKey.value === -2 && !n.autoRegion && (i.value.length = 0)) : (i.value = [u.regionIndex.value], u.regionIndex.value === -2 && !n.autoRegion && (i.value.length = 0));
|
|
309
|
+
!n.onlySearcher && !m.value.size && (l.searcherKey.value = -2);
|
|
310
|
+
}), H(c, () => {
|
|
311
|
+
r.value && c.value !== void 0 && (l.searcherKey.value = c.value);
|
|
312
|
+
}), H(l.searcherKey, () => {
|
|
313
|
+
r.value && c.value !== void 0 && (c.value = l.searcherKey.value);
|
|
314
|
+
}), o.value && H(o, () => {
|
|
315
|
+
o.value && (i.value = [o.value]);
|
|
316
|
+
}, { immediate: !0 }), H(i, () => {
|
|
317
|
+
if (i.value[0] && (o.value = i.value[0]), n.onlySearcher) {
|
|
392
318
|
if (!i.value.length || i.value.length === 1 && !p.value.has(i.value[0]) || i.value.length === 1 && i.value[0] === -2 && !n.autoRegion) {
|
|
393
319
|
let e = p.value.keys().next().value;
|
|
394
|
-
e === -2 && !n.autoRegion && (e = void 0,
|
|
320
|
+
e === -2 && !n.autoRegion && (e = void 0, o.value = -2), e === void 0 ? i.value.length = 0 : i.value = [e];
|
|
395
321
|
return;
|
|
396
322
|
}
|
|
397
|
-
if (i.value.length > 1 && JSON.stringify(i.value) !== JSON.stringify(
|
|
398
|
-
i.value = [...
|
|
323
|
+
if (i.value.length > 1 && JSON.stringify(i.value) !== JSON.stringify(d.regionsIndexes.value)) {
|
|
324
|
+
i.value = [...d.regionsIndexes.value];
|
|
399
325
|
return;
|
|
400
326
|
}
|
|
401
327
|
} else {
|
|
402
328
|
let e = [...new Set(i.value)], t = p.value.values().next().value?.regionByIndex?.keys().next().value;
|
|
403
|
-
if (r.value && (t = p.value.values().next().value?.regionByIndex?.values().next().value?.key), t === -2 && !n.autoRegion && (t = void 0,
|
|
329
|
+
if (r.value && (t = p.value.values().next().value?.regionByIndex?.values().next().value?.key), t === -2 && !n.autoRegion && (t = void 0, o.value = -2), !e.length) t !== void 0 && e.push(t);
|
|
404
330
|
else if (e.length === 1) {
|
|
405
|
-
let
|
|
406
|
-
r.value && (
|
|
331
|
+
let i = m.value;
|
|
332
|
+
r.value && (i = /* @__PURE__ */ new Set(), p.value.forEach((e) => {
|
|
407
333
|
e.regionByIndex.forEach((e) => {
|
|
408
|
-
e.index !== -2 &&
|
|
334
|
+
e.index !== -2 && i.add(e.key);
|
|
409
335
|
});
|
|
410
|
-
})),
|
|
336
|
+
})), !i.has(e[0]) && (e[0] !== -2 || !n.autoRegion) && (e = [], t !== void 0 && e.push(t));
|
|
411
337
|
} else e = e.filter((e) => m.value.has(e)), !e.length && t !== void 0 && e.push(t);
|
|
412
338
|
if (JSON.stringify(i.value) !== JSON.stringify(e)) {
|
|
413
339
|
i.value = e;
|
|
414
340
|
return;
|
|
415
341
|
}
|
|
416
342
|
}
|
|
417
|
-
if (i.value.length !== 1 || i.value[0] !== (n.onlySearcher ?
|
|
343
|
+
if (i.value.length !== 1 || i.value[0] !== (n.onlySearcher ? l.searcherKey.value : u.regionIndex.value)) {
|
|
418
344
|
if (n.onlySearcher) {
|
|
419
345
|
if (i.value.length === 1) {
|
|
420
|
-
|
|
346
|
+
l.searcherKey.value = i.value[0];
|
|
421
347
|
return;
|
|
422
348
|
}
|
|
423
|
-
|
|
349
|
+
l.searcherKey.value = -1;
|
|
424
350
|
return;
|
|
425
351
|
}
|
|
426
352
|
if (!i.value.length) return;
|
|
427
|
-
if (i.value.length === 1 &&
|
|
428
|
-
|
|
353
|
+
if (i.value.length === 1 && l.searcherKey.value !== -1) {
|
|
354
|
+
u.regionIndex.value = i.value[0];
|
|
429
355
|
let e = c.value;
|
|
430
356
|
if (e === void 0) for (let t of p.value.values()) {
|
|
431
|
-
for (let n of t.regionByIndex.values()) if ((r.value ? n.key : n.index) ===
|
|
357
|
+
for (let n of t.regionByIndex.values()) if ((r.value ? n.key : n.index) === u.regionIndex.value) {
|
|
432
358
|
e = t.key;
|
|
433
359
|
break;
|
|
434
360
|
}
|
|
435
361
|
if (e !== void 0) break;
|
|
436
362
|
}
|
|
437
|
-
e !== void 0 && (
|
|
438
|
-
} else
|
|
363
|
+
e !== void 0 && (l.searcherKey.value = e);
|
|
364
|
+
} else l.searcherKey.value = -1, d.regionsIndexes.value = [...i.value];
|
|
439
365
|
}
|
|
440
366
|
}, { immediate: !0 }), t({
|
|
441
367
|
getSearcher: h,
|
|
@@ -444,10 +370,10 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
444
370
|
"top-regionSelector": !0,
|
|
445
371
|
"top-regionSelector-onlySearcher": e.onlySearcher
|
|
446
372
|
}) }, [
|
|
447
|
-
j(
|
|
448
|
-
options:
|
|
449
|
-
modelValue:
|
|
450
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
373
|
+
j(s, {
|
|
374
|
+
options: B(l).optionBySearcherKey.value,
|
|
375
|
+
modelValue: B(l).searcherKey.value,
|
|
376
|
+
"onUpdate:modelValue": n[0] ||= (e) => B(l).searcherKey.value = e,
|
|
451
377
|
name: "searcher_key",
|
|
452
378
|
addChanger: e.addChanger
|
|
453
379
|
}, null, 8, [
|
|
@@ -455,12 +381,12 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
455
381
|
"modelValue",
|
|
456
382
|
"addChanger"
|
|
457
383
|
]),
|
|
458
|
-
!e.onlySearcher &&
|
|
384
|
+
!e.onlySearcher && B(l).searcherKey.value !== B(-1) ? (F(), E(s, {
|
|
459
385
|
key: 0,
|
|
460
386
|
class: "top-select-region",
|
|
461
|
-
options:
|
|
462
|
-
modelValue:
|
|
463
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
387
|
+
options: B(u).optionByRegionIndex.value,
|
|
388
|
+
modelValue: B(u).regionIndex.value,
|
|
389
|
+
"onUpdate:modelValue": n[1] ||= (e) => B(u).regionIndex.value = e,
|
|
464
390
|
name: r.value ? "region_key" : "region_index",
|
|
465
391
|
addChanger: e.addChanger,
|
|
466
392
|
"data-top-icon": e.addRegionIcon ? "" : void 0
|
|
@@ -471,30 +397,30 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
|
|
|
471
397
|
"addChanger",
|
|
472
398
|
"data-top-icon"
|
|
473
399
|
])) : D("", !0),
|
|
474
|
-
e.addCompare && !e.onlySearcher &&
|
|
400
|
+
e.addCompare && !e.onlySearcher && B(l).searcherKey.value === B(-1) ? (F(), E(a, {
|
|
475
401
|
key: 1,
|
|
476
402
|
name: "compare",
|
|
477
403
|
onClick: _,
|
|
478
|
-
"data-count-compare-regions-indexes":
|
|
404
|
+
"data-count-compare-regions-indexes": B(d).regionsIndexes.value.length
|
|
479
405
|
}, {
|
|
480
|
-
default:
|
|
406
|
+
default: U(() => [A(z(t.$i18n.Common.Selected_regions), 1)]),
|
|
481
407
|
_: 1
|
|
482
408
|
}, 8, ["data-count-compare-regions-indexes"])) : D("", !0)
|
|
483
409
|
], 2));
|
|
484
410
|
}
|
|
485
|
-
}),
|
|
411
|
+
}), G = {
|
|
486
412
|
id: 0,
|
|
487
413
|
name: "/",
|
|
488
414
|
path: "/"
|
|
489
415
|
};
|
|
490
|
-
function
|
|
416
|
+
function ke(e) {
|
|
491
417
|
return e ? n()?.Common.All_folders : "/ (" + n()?.Keywords.Root_folder + ")";
|
|
492
418
|
}
|
|
493
|
-
var
|
|
494
|
-
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name =
|
|
419
|
+
var Ae = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.childsIds = [], r.id && (r.countAllGroupsActive = r.count_groups_active), e[r.id] && e[r.id].forEach((a) => {
|
|
420
|
+
a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = ke(t));
|
|
495
421
|
let o = i > 1 ? "-".repeat(i - 1) + " " : "";
|
|
496
|
-
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a),
|
|
497
|
-
}), n),
|
|
422
|
+
o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Ae(e, t, n, a, i + 1), r.childsIds = r.childsIds.concat(a.childsIds), r.id && a.count_groups_active && (r.countAllGroupsActive += a.count_groups_active);
|
|
423
|
+
}), n), je = (e, t) => e.gen(`/get/${t}/folders/`, [
|
|
498
424
|
"id",
|
|
499
425
|
"parent_id",
|
|
500
426
|
"name",
|
|
@@ -505,9 +431,9 @@ var Ve = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
|
|
|
505
431
|
});
|
|
506
432
|
//#endregion
|
|
507
433
|
//#region src/core/utils/composables/useWatch.ts
|
|
508
|
-
function
|
|
434
|
+
function Me(e, t, n) {
|
|
509
435
|
let r = Object.keys(e), i = r.map((t) => e[t]);
|
|
510
|
-
return
|
|
436
|
+
return H(i, (e, n, i) => {
|
|
511
437
|
let a = {};
|
|
512
438
|
e.forEach((e, t) => {
|
|
513
439
|
if (!Object.is(e, n[t])) {
|
|
@@ -522,7 +448,7 @@ function Ue(e, t, n) {
|
|
|
522
448
|
}
|
|
523
449
|
//#endregion
|
|
524
450
|
//#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
|
|
525
|
-
var
|
|
451
|
+
var Ne = ["innerHTML"], Pe = /* @__PURE__ */ M({
|
|
526
452
|
__name: "folders",
|
|
527
453
|
props: /*@__PURE__*/ N({
|
|
528
454
|
folderId: {},
|
|
@@ -540,20 +466,20 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
540
466
|
}, {
|
|
541
467
|
folderId: { required: !0 },
|
|
542
468
|
folderIdModifiers: {},
|
|
543
|
-
folder: { default:
|
|
469
|
+
folder: { default: G },
|
|
544
470
|
folderModifiers: {}
|
|
545
471
|
}),
|
|
546
472
|
emits: ["update:folderId", "update:folder"],
|
|
547
473
|
setup(e) {
|
|
548
|
-
let t = e, n =
|
|
549
|
-
|
|
474
|
+
let t = e, n = V(e, "folderId"), r = V(e, "folder"), i = t.client && !t.folders ? je(t.client, t.service) : void 0, a = I(null);
|
|
475
|
+
H(() => t.projectId, () => {
|
|
550
476
|
i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
|
|
551
477
|
}, { immediate: !0 });
|
|
552
|
-
let o = T(() =>
|
|
478
|
+
let o = T(() => Ae(t.folders ?? { root: [G] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
|
|
553
479
|
...e[0],
|
|
554
|
-
name:
|
|
480
|
+
name: ke(!0)
|
|
555
481
|
}), e);
|
|
556
|
-
return
|
|
482
|
+
return Me({
|
|
557
483
|
modelFolder: r,
|
|
558
484
|
modelFolderId: n
|
|
559
485
|
}, async (e) => {
|
|
@@ -563,21 +489,21 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
563
489
|
return;
|
|
564
490
|
}
|
|
565
491
|
let i = o.value.get(t.folderId);
|
|
566
|
-
i ||=
|
|
567
|
-
}, { immediate: !0 }), (t, n) => (F(), E(
|
|
492
|
+
i ||= G, r.value = i, n.value = i.id;
|
|
493
|
+
}, { immediate: !0 }), (t, n) => (F(), E(C, {
|
|
568
494
|
class: "top-groupSelector_folder",
|
|
569
495
|
modelValue: r.value,
|
|
570
496
|
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
571
497
|
items: e.folders ? [...o.value.values()] : void 0,
|
|
572
498
|
"search-type": "inline",
|
|
573
499
|
icon: e.addIcon ? "" : void 0,
|
|
574
|
-
api: e.folders ? void 0 :
|
|
575
|
-
apiSetSearchParams: (...e) =>
|
|
500
|
+
api: e.folders ? void 0 : B(i),
|
|
501
|
+
apiSetSearchParams: (...e) => B(te)(...e, "name"),
|
|
576
502
|
prepareItemsBeforeRender: s,
|
|
577
503
|
addChanger: e.addChanger,
|
|
578
504
|
useCache: ""
|
|
579
505
|
}, {
|
|
580
|
-
item:
|
|
506
|
+
item: U(({ item: e }) => [k("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ne)]),
|
|
581
507
|
_: 1
|
|
582
508
|
}, 8, [
|
|
583
509
|
"modelValue",
|
|
@@ -588,17 +514,17 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
588
514
|
"addChanger"
|
|
589
515
|
]));
|
|
590
516
|
}
|
|
591
|
-
}),
|
|
517
|
+
}), K = {
|
|
592
518
|
id: -1,
|
|
593
519
|
name: "--",
|
|
594
|
-
folder_id:
|
|
595
|
-
folder_path:
|
|
596
|
-
},
|
|
520
|
+
folder_id: G.id,
|
|
521
|
+
folder_path: G.path
|
|
522
|
+
}, q = {
|
|
597
523
|
id: 0,
|
|
598
524
|
name: "All groups",
|
|
599
|
-
folder_id:
|
|
600
|
-
folder_path:
|
|
601
|
-
},
|
|
525
|
+
folder_id: G.id,
|
|
526
|
+
folder_path: G.path
|
|
527
|
+
}, J = () => (q.name = n()?.Common.All_groups, q), Fe = () => (q.name = n()?.Keywords.Choose_group, q), Ie = (e, t, n) => (e = [...e], t !== void 0 && (e = e.filter((e) => e.on == Number(t))), n && n.id && n.childsIds && (e = e.filter((e) => e.folder_id === n.id || n.childsIds.includes(e.folder_id))), e), Le = (e, t) => e.gen(`/get/${t}/groups/`, [
|
|
602
528
|
"id",
|
|
603
529
|
"name",
|
|
604
530
|
"folder_id",
|
|
@@ -606,10 +532,10 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
606
532
|
]).changeParams({
|
|
607
533
|
folder_id_depth: !0,
|
|
608
534
|
limit: 100
|
|
609
|
-
}),
|
|
535
|
+
}), Re = (e, t) => e.gen(`/add/${t}/groups/`), ze = (e, t) => e.gen(`/del/${t}/groups/`), Be = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Ve = { class: "top-groupSelector_groupItem top-ellipsis1" }, He = {
|
|
610
536
|
key: 0,
|
|
611
537
|
class: "top-comment"
|
|
612
|
-
},
|
|
538
|
+
}, Ue = ["innerHTML"], We = ["innerHTML"], Ge = ["innerHTML"], Ke = /* @__PURE__ */ M({
|
|
613
539
|
__name: "groups",
|
|
614
540
|
props: /*@__PURE__*/ N({
|
|
615
541
|
groupId: {},
|
|
@@ -648,8 +574,8 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
648
574
|
"delGroup"
|
|
649
575
|
], ["update:groupId", "update:group"]),
|
|
650
576
|
setup(e, { expose: n, emit: r }) {
|
|
651
|
-
let i = e, a = r, o =
|
|
652
|
-
if (i.groups !== void 0) return
|
|
577
|
+
let i = e, a = r, o = V(e, "groupId"), s = V(e, "group"), c = i.client && !i.groups ? Le(i.client, i.service) : void 0, l = i.client ? Re(i.client, i.service) : void 0, u = i.client ? ze(i.client, i.service) : void 0, d = i.client ? Be(i.client, i.service) : void 0, f = I(null), p = T(() => {
|
|
578
|
+
if (i.groups !== void 0) return Ie(i.groups, i.on, i.folder);
|
|
653
579
|
}), m = t("folder_id", "EQUALS", [i.folder?.id ?? 0]);
|
|
654
580
|
c?.changeParams({
|
|
655
581
|
project_id: i.projectId,
|
|
@@ -658,19 +584,19 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
658
584
|
}), i.on !== void 0 && c?.params.filters?.push(t("on", "EQUALS", [Number(i.on)]));
|
|
659
585
|
let h = (e) => {
|
|
660
586
|
s.value = e, o.value = e.id;
|
|
661
|
-
},
|
|
587
|
+
}, g = (e = !1) => {
|
|
662
588
|
f.value?.resetCache(e);
|
|
663
589
|
};
|
|
664
|
-
|
|
590
|
+
Me({
|
|
665
591
|
projectId: () => i.projectId,
|
|
666
592
|
folderId: () => i.folder?.id,
|
|
667
593
|
canSelectAll: () => i.canSelectAll
|
|
668
594
|
}, (e) => {
|
|
669
|
-
if (e.projectId && (c?.changeParams({ project_id: i.projectId }), c?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + i.projectId })), e.folderId && (m.values = [i.folder?.id ?? 0]),
|
|
595
|
+
if (e.projectId && (c?.changeParams({ project_id: i.projectId }), c?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + i.projectId })), e.folderId && (m.values = [i.folder?.id ?? 0]), g(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && o.value !== null) {
|
|
670
596
|
let e;
|
|
671
|
-
i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e =
|
|
597
|
+
i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e = de(J()))), (i.autoselect === "placeholder" || !e) && (e = Fe()), h(e);
|
|
672
598
|
}
|
|
673
|
-
}, { immediate: !0 }),
|
|
599
|
+
}, { immediate: !0 }), Me({
|
|
674
600
|
modelGroup: s,
|
|
675
601
|
modelGroupId: o
|
|
676
602
|
}, async (e) => {
|
|
@@ -682,14 +608,14 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
682
608
|
if (!(i.canAdd && o.value === null)) {
|
|
683
609
|
if (i.groups) {
|
|
684
610
|
let e = p.value?.find((e) => e.id === o.value);
|
|
685
|
-
if (!e && i.canSelectAll && (e =
|
|
611
|
+
if (!e && i.canSelectAll && (e = J()), e) h(e);
|
|
686
612
|
else {
|
|
687
613
|
let e = p.value?.[0];
|
|
688
|
-
e && !o.value ? h(e) : h(
|
|
614
|
+
e && !o.value ? h(e) : h(K);
|
|
689
615
|
}
|
|
690
616
|
}
|
|
691
617
|
if (i.client && !i.groups && (o.value || o.value === 0 && !i.canSelectAll)) {
|
|
692
|
-
let e =
|
|
618
|
+
let e = Le(i.client, i.service).changeParams({
|
|
693
619
|
project_id: i.projectId,
|
|
694
620
|
id: o.value,
|
|
695
621
|
filters: [m]
|
|
@@ -697,17 +623,17 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
697
623
|
e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + i.projectId });
|
|
698
624
|
let t = await e.call();
|
|
699
625
|
if (!t.errors?.length && !t.result) return;
|
|
700
|
-
!t.errors && t.result[0] ? h(t.result[0]) : h(
|
|
626
|
+
!t.errors && t.result[0] ? h(t.result[0]) : h(K);
|
|
701
627
|
}
|
|
702
628
|
}
|
|
703
629
|
}
|
|
704
630
|
}, { immediate: !0 });
|
|
705
|
-
let
|
|
631
|
+
let _ = async (e) => {
|
|
706
632
|
if (i.canAdd !== "api" || !l) return;
|
|
707
633
|
let t = s.value, n = await l.changeParams({
|
|
708
634
|
project_id: i.projectId,
|
|
709
635
|
names: [e.name],
|
|
710
|
-
to_id: i.folder?.id ??
|
|
636
|
+
to_id: i.folder?.id ?? G.id,
|
|
711
637
|
to_type: "in_folder_last"
|
|
712
638
|
}).call();
|
|
713
639
|
if (n.result) {
|
|
@@ -715,7 +641,7 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
715
641
|
h(e), a("addGroup", e);
|
|
716
642
|
} else h(t);
|
|
717
643
|
f.value?.resetCache(!0);
|
|
718
|
-
},
|
|
644
|
+
}, v = async (e, t) => {
|
|
719
645
|
d && ((await d.changeParams({
|
|
720
646
|
project_id: i.projectId,
|
|
721
647
|
id: e.id,
|
|
@@ -724,13 +650,13 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
724
650
|
id: e.id,
|
|
725
651
|
name: t
|
|
726
652
|
}), f.value?.updateCacheItemById(e.id, { name: t })));
|
|
727
|
-
},
|
|
653
|
+
}, y = async (e) => {
|
|
728
654
|
u && ((await u.changeParams({
|
|
729
655
|
project_id: i.projectId,
|
|
730
656
|
id: e.id
|
|
731
|
-
}).call()).errors || (s.value.id === e.id && h(i.canSelectAll ?
|
|
657
|
+
}).call()).errors || (s.value.id === e.id && h(i.canSelectAll ? J() : K), a("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
|
|
732
658
|
};
|
|
733
|
-
return n({ resetCacheGroups:
|
|
659
|
+
return n({ resetCacheGroups: g }), (t, n) => (F(), E(C, {
|
|
734
660
|
ref_key: "refSelector",
|
|
735
661
|
ref: f,
|
|
736
662
|
class: "top-groupSelector_group",
|
|
@@ -739,49 +665,49 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
739
665
|
items: p.value ?? e.groups,
|
|
740
666
|
searchType: "inline",
|
|
741
667
|
icon: e.addIcon ? "" : void 0,
|
|
742
|
-
api: e.groups ? void 0 :
|
|
743
|
-
apiSetSearchParams: (...e) =>
|
|
668
|
+
api: e.groups ? void 0 : B(c),
|
|
669
|
+
apiSetSearchParams: (...e) => B(te)(...e, "name"),
|
|
744
670
|
appendSearchToResult: !!e.canAdd,
|
|
745
|
-
useAllItem: e.canSelectAll ?
|
|
671
|
+
useAllItem: e.canSelectAll ? B(J)().name : !1,
|
|
746
672
|
addChanger: e.addChanger,
|
|
747
673
|
useCache: "",
|
|
748
|
-
onAppendItem:
|
|
749
|
-
},
|
|
750
|
-
item:
|
|
751
|
-
n.id ===
|
|
674
|
+
onAppendItem: _
|
|
675
|
+
}, ie({
|
|
676
|
+
item: U(({ item: n }) => [k("div", Ve, [
|
|
677
|
+
n.id === B(null) ? (F(), O("div", He, z(t.$i18n.Common.Add) + ": ", 1)) : D("", !0),
|
|
752
678
|
k("span", {
|
|
753
679
|
class: "top-groupSelector_groupItemName top-ellipsis1",
|
|
754
680
|
innerHTML: n.name
|
|
755
|
-
}, null, 8,
|
|
681
|
+
}, null, 8, Ue),
|
|
756
682
|
n.folder_path && e.showPath ? (F(), O("span", {
|
|
757
683
|
key: 1,
|
|
758
684
|
class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
|
|
759
685
|
innerHTML: n.folder_path
|
|
760
|
-
}, null, 8,
|
|
686
|
+
}, null, 8, We)) : D("", !0)
|
|
761
687
|
])]),
|
|
762
688
|
_: 2
|
|
763
689
|
}, [e.canEditAndDel && e.client ? {
|
|
764
690
|
name: "actions",
|
|
765
|
-
fn:
|
|
691
|
+
fn: U(({ item: r }) => [r.id ? (F(), O(w, { key: 0 }, [j(b, {
|
|
766
692
|
submitText: t.$i18n.Common.Save,
|
|
767
693
|
defaultValue: r.name,
|
|
768
694
|
inputProps: { addCleaner: !1 },
|
|
769
|
-
onSubmit: (e) =>
|
|
695
|
+
onSubmit: (e) => v(r, e)
|
|
770
696
|
}, {
|
|
771
|
-
opener:
|
|
772
|
-
default:
|
|
697
|
+
opener: U(() => [...n[1] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
|
|
698
|
+
default: U(() => [...n[2] ||= []]),
|
|
773
699
|
_: 1
|
|
774
700
|
}, 8, [
|
|
775
701
|
"submitText",
|
|
776
702
|
"defaultValue",
|
|
777
703
|
"onSubmit"
|
|
778
|
-
]), j(
|
|
704
|
+
]), j(ee, {
|
|
779
705
|
isWarning: "",
|
|
780
706
|
submitText: t.$i18n.Common.Delete,
|
|
781
|
-
onSubmit: (e) =>
|
|
707
|
+
onSubmit: (e) => y(r)
|
|
782
708
|
}, {
|
|
783
|
-
opener:
|
|
784
|
-
default:
|
|
709
|
+
opener: U(() => [...n[3] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
|
|
710
|
+
default: U(() => [k("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n.Aitracker.Delete_group_warning }, null, 8, Ge)]),
|
|
785
711
|
_: 1
|
|
786
712
|
}, 8, ["submitText", "onSubmit"])], 64)) : D("", !0)]),
|
|
787
713
|
key: "0"
|
|
@@ -796,7 +722,7 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
796
722
|
"addChanger"
|
|
797
723
|
]));
|
|
798
724
|
}
|
|
799
|
-
}),
|
|
725
|
+
}), qe = { class: "top-groupSelector" }, Je = /* @__PURE__ */ M({
|
|
800
726
|
__name: "groupSelector",
|
|
801
727
|
props: /*@__PURE__*/ N({
|
|
802
728
|
folderId: {},
|
|
@@ -843,7 +769,7 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
843
769
|
folderModifiers: {},
|
|
844
770
|
groupId: { required: !0 },
|
|
845
771
|
groupIdModifiers: {},
|
|
846
|
-
group: { default:
|
|
772
|
+
group: { default: K },
|
|
847
773
|
groupModifiers: {}
|
|
848
774
|
}),
|
|
849
775
|
emits: /*@__PURE__*/ N(["update:groups"], [
|
|
@@ -853,10 +779,10 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
853
779
|
"update:group"
|
|
854
780
|
]),
|
|
855
781
|
setup(e, { expose: t, emit: n }) {
|
|
856
|
-
let r = e, i = I(null), a =
|
|
857
|
-
o.value =
|
|
782
|
+
let r = e, i = I(null), a = V(e, "folderId"), o = V(e, "folder"), s = V(e, "groupId"), c = V(e, "group"), l = n;
|
|
783
|
+
o.value = Ae(r.folders ?? { root: [G] }, r.canSelectAllGroups).get(a.value);
|
|
858
784
|
let u = r.groups?.find((e) => e.id === s.value);
|
|
859
|
-
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u =
|
|
785
|
+
s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = J()), (r.autoselect === "placeholder" || !u) && (u = Fe()), u ??= K, c.value = u;
|
|
860
786
|
let d = (e) => {
|
|
861
787
|
let t;
|
|
862
788
|
r.groups && e && (t = [...r.groups, e]), l("update:groups", t);
|
|
@@ -882,7 +808,7 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
882
808
|
};
|
|
883
809
|
return t({ resetCacheGroups: (e = !1) => {
|
|
884
810
|
i.value?.resetCacheGroups(e);
|
|
885
|
-
} }), (t, n) => (F(), O("div",
|
|
811
|
+
} }), (t, n) => (F(), O("div", qe, [e.showFolders ? (F(), E(Pe, {
|
|
886
812
|
key: 0,
|
|
887
813
|
folderId: a.value,
|
|
888
814
|
"onUpdate:folderId": n[0] ||= (e) => a.value = e,
|
|
@@ -905,7 +831,7 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
905
831
|
"addIcon",
|
|
906
832
|
"client",
|
|
907
833
|
"service"
|
|
908
|
-
])) : D("", !0), e.showGroups ? (F(), E(
|
|
834
|
+
])) : D("", !0), e.showGroups ? (F(), E(Ke, {
|
|
909
835
|
key: 1,
|
|
910
836
|
ref_key: "componentGroupsRef",
|
|
911
837
|
ref: i,
|
|
@@ -947,44 +873,44 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
947
873
|
"service"
|
|
948
874
|
])) : D("", !0)]));
|
|
949
875
|
}
|
|
950
|
-
}),
|
|
876
|
+
}), Ye = (e) => ({
|
|
951
877
|
id: null,
|
|
952
878
|
name: e,
|
|
953
879
|
listItemProps: {
|
|
954
880
|
type: "title",
|
|
955
881
|
class: "top-projectSelector_item"
|
|
956
882
|
}
|
|
957
|
-
}),
|
|
883
|
+
}), Xe = {
|
|
958
884
|
scheduledUpdate: !1,
|
|
959
885
|
manualUpdate: !1,
|
|
960
886
|
guestProjects: !1
|
|
961
|
-
},
|
|
887
|
+
}, Ze = (e, t) => {
|
|
962
888
|
let r = [], i = {
|
|
963
|
-
scheduledUpdate:
|
|
964
|
-
manualUpdate:
|
|
965
|
-
guestProjects:
|
|
889
|
+
scheduledUpdate: Ye(n().Projects.Scheduled_update),
|
|
890
|
+
manualUpdate: Ye(n().Projects.Manual_update),
|
|
891
|
+
guestProjects: Ye(n().Projects.Guest_projects)
|
|
966
892
|
}, a = t ? {
|
|
967
893
|
scheduledUpdate: !1,
|
|
968
894
|
manualUpdate: !1,
|
|
969
895
|
guestProjects: !1
|
|
970
|
-
} :
|
|
896
|
+
} : Xe;
|
|
971
897
|
for (let t of e) !a.scheduledUpdate && t.right?.startsWith("1") && t.on > 0 && (r.push(i.scheduledUpdate), a.scheduledUpdate = !0), !a.manualUpdate && t.right?.startsWith("1") && t.on === 0 && (r.push(i.manualUpdate), a.manualUpdate = !0), !a.guestProjects && t.right?.startsWith("0") && t.on >= 0 && (r.push(i.guestProjects), a.guestProjects = !0), r.push(t);
|
|
972
898
|
return r;
|
|
973
|
-
},
|
|
899
|
+
}, Qe = (e) => ({
|
|
974
900
|
...e,
|
|
975
|
-
externalLink:
|
|
901
|
+
externalLink: it(e.url ?? ""),
|
|
976
902
|
listItemProps: {
|
|
977
903
|
class: "top-projectSelector_item",
|
|
978
904
|
attrs: { title: e.name }
|
|
979
905
|
}
|
|
980
|
-
}),
|
|
906
|
+
}), $e = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(Xe).forEach((e) => Xe[e] = !1), Ze(e.map(Qe), n)), et = (e) => {
|
|
981
907
|
e = e.replace(/#.*/, "");
|
|
982
908
|
let t = location.hash;
|
|
983
909
|
return t = t.replace(/%22historyView%22:[^,]*,/, ""), t = t.replace(/%22modelsKeys%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:\{[^}]*}(,?)/, "$1")), e + t;
|
|
984
|
-
},
|
|
985
|
-
location.href =
|
|
986
|
-
},
|
|
987
|
-
let t =
|
|
910
|
+
}, tt = (e) => {
|
|
911
|
+
location.href = nt(e);
|
|
912
|
+
}, nt = (e) => {
|
|
913
|
+
let t = rt(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
|
|
988
914
|
n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
|
|
989
915
|
"watcher",
|
|
990
916
|
"indexing",
|
|
@@ -994,16 +920,16 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
994
920
|
"adwords"
|
|
995
921
|
].includes(n[4]) && (i = n[4] + "/");
|
|
996
922
|
let a = "https://" + t + "/" + r + e + "/" + i;
|
|
997
|
-
return a =
|
|
998
|
-
},
|
|
923
|
+
return a = et(a), a;
|
|
924
|
+
}, rt = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, it = (e) => {
|
|
999
925
|
let t = e.startsWith("http") ? e : "https://" + e;
|
|
1000
926
|
return t = t.replace(/"/g, "%22"), t;
|
|
1001
|
-
},
|
|
927
|
+
}, at = (e, n) => {
|
|
1002
928
|
let r = e.params.filters ?? [];
|
|
1003
929
|
r = r.filter((e) => e.name !== "GEN_SEARCH_STRING()");
|
|
1004
|
-
let i =
|
|
930
|
+
let i = v(n), a = n.replace(/([[^$.|?*+()])/g, "\\$1"), o = i.replace(/([[^$.|?*+()])/g, "\\$1");
|
|
1005
931
|
n && r.push(t("GEN_SEARCH_STRING()", "REGEXP", [`(${a}|${o})`])), e.changeParams({ filters: r });
|
|
1006
|
-
},
|
|
932
|
+
}, ot = (n, i = !0) => {
|
|
1007
933
|
let a = n.gen("/get/projects_2/projects/", [
|
|
1008
934
|
"id",
|
|
1009
935
|
"user_id",
|
|
@@ -1023,9 +949,9 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1023
949
|
]
|
|
1024
950
|
}), a.options.loadingShowSpinner = !1, i && (a.options.onApiLoaded = (e, t, n) => {
|
|
1025
951
|
let r = t.data.filters.length > 1, i = t.data.offset === 0, a = t.data.offset === void 0 || i && !r, o = r;
|
|
1026
|
-
e.result =
|
|
952
|
+
e.result = $e(e.result, a, o), n?.(e, t);
|
|
1027
953
|
}), a;
|
|
1028
|
-
},
|
|
954
|
+
}, st = (e) => {
|
|
1029
955
|
let t = () => ({
|
|
1030
956
|
userId: r.state.userId,
|
|
1031
957
|
projectsIds: [],
|
|
@@ -1045,7 +971,7 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1045
971
|
return { getNextProjectId: async (a, o = !1) => {
|
|
1046
972
|
if (n.isLoading) return;
|
|
1047
973
|
n.userId !== r.state.userId && (n = t());
|
|
1048
|
-
let s =
|
|
974
|
+
let s = ot(e, !1);
|
|
1049
975
|
s.changeParams({ limit: 1e3 });
|
|
1050
976
|
let c;
|
|
1051
977
|
for (n.isLoading = !0, n.needFind = !0; c = i(a, o), n.needFind && !c && n.nextOffset !== null;) {
|
|
@@ -1056,11 +982,11 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1056
982
|
}
|
|
1057
983
|
return n.isLoading = !1, c;
|
|
1058
984
|
} };
|
|
1059
|
-
},
|
|
985
|
+
}, ct = (e) => e.gen("/add/projects_2/projects/"), lt = { class: "top-ellipsis1" }, ut = /* @__PURE__ */ M({
|
|
1060
986
|
__name: "submenu",
|
|
1061
987
|
props: { id: {} },
|
|
1062
988
|
setup(e) {
|
|
1063
|
-
let t = e, i = n(), a =
|
|
989
|
+
let t = e, i = n(), a = rt(), o = (e) => {
|
|
1064
990
|
let t = [
|
|
1065
991
|
{
|
|
1066
992
|
href: `https://${a}/project/keywords/${e.id}/`,
|
|
@@ -1137,58 +1063,58 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1137
1063
|
].filter((e) => !Object.entries(r.state.closedByMod).some(([t, n]) => n && e.href.includes(`/${t}/`)));
|
|
1138
1064
|
return e.right.includes("0") ? t.filter((t) => e.right[t.right] === "1") : t;
|
|
1139
1065
|
};
|
|
1140
|
-
return (e, n) => (F(), E(
|
|
1066
|
+
return (e, n) => (F(), E(B(S), {
|
|
1141
1067
|
id: t.id,
|
|
1142
1068
|
class: "top-projectSelectorSubmenu",
|
|
1143
1069
|
notch: !1,
|
|
1144
1070
|
pos: "2"
|
|
1145
1071
|
}, {
|
|
1146
|
-
contentList:
|
|
1072
|
+
contentList: U(({ data: t }) => [t ? (F(), O(w, { key: 0 }, [(F(!0), O(w, null, L(o(t.projectItem), (t) => (F(), E(B(x), {
|
|
1147
1073
|
href: t.href,
|
|
1148
1074
|
title: t.title,
|
|
1149
1075
|
"data-top-icon": t.icon,
|
|
1150
1076
|
"data-right": t.right
|
|
1151
1077
|
}, {
|
|
1152
|
-
default:
|
|
1078
|
+
default: U(() => [A(z(e.$core.state.isMobile ? t.title : ""), 1)]),
|
|
1153
1079
|
_: 2
|
|
1154
1080
|
}, 1032, [
|
|
1155
1081
|
"href",
|
|
1156
1082
|
"title",
|
|
1157
1083
|
"data-top-icon",
|
|
1158
1084
|
"data-right"
|
|
1159
|
-
]))), 256)), j(
|
|
1085
|
+
]))), 256)), j(B(x), {
|
|
1160
1086
|
href: t.projectItem.externalLink,
|
|
1161
1087
|
title: t.projectItem.externalLink,
|
|
1162
1088
|
class: "top-ellipsis",
|
|
1163
1089
|
"data-top-icon": "",
|
|
1164
1090
|
target: "_blank"
|
|
1165
1091
|
}, {
|
|
1166
|
-
default:
|
|
1092
|
+
default: U(() => [k("span", lt, z(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
|
|
1167
1093
|
_: 2
|
|
1168
1094
|
}, 1032, ["href", "title"])], 64)) : D("", !0)]),
|
|
1169
1095
|
_: 1
|
|
1170
1096
|
}, 8, ["id"]));
|
|
1171
1097
|
}
|
|
1172
|
-
}),
|
|
1173
|
-
localStorage.setItem(
|
|
1098
|
+
}), Y = "ui_project_selector_total", dt = 864e5, X = I(null), Z = he(), ft = (e) => {
|
|
1099
|
+
localStorage.setItem(Y + ":" + r.state.userId, JSON.stringify({
|
|
1174
1100
|
projectsTotal: e,
|
|
1175
|
-
expiresAt: Date.now() +
|
|
1101
|
+
expiresAt: Date.now() + dt
|
|
1176
1102
|
}));
|
|
1177
|
-
},
|
|
1178
|
-
let e = localStorage.getItem(
|
|
1103
|
+
}, pt = () => {
|
|
1104
|
+
let e = localStorage.getItem(Y + ":" + r.state.userId);
|
|
1179
1105
|
if (!e) return;
|
|
1180
1106
|
let { projectsTotal: t, expiresAt: n } = JSON.parse(e);
|
|
1181
1107
|
if (Date.now() > n) {
|
|
1182
|
-
localStorage.removeItem(
|
|
1108
|
+
localStorage.removeItem(Y + ":" + r.state.userId);
|
|
1183
1109
|
return;
|
|
1184
1110
|
}
|
|
1185
1111
|
return t;
|
|
1186
|
-
},
|
|
1187
|
-
|
|
1188
|
-
},
|
|
1112
|
+
}, mt = () => {
|
|
1113
|
+
X.value = null, Z.value = void 0, localStorage.removeItem(Y + ":" + r.state.userId), ne("/get/projects_2/projects/");
|
|
1114
|
+
}, ht = { class: "top-projectSelector_itemText" }, gt = { class: "top-comment" }, _t = {
|
|
1189
1115
|
key: 0,
|
|
1190
1116
|
class: "top-comment"
|
|
1191
|
-
},
|
|
1117
|
+
}, vt = ["href"], yt = 1e3, bt = /* @__PURE__ */ M({
|
|
1192
1118
|
__name: "projectSelector",
|
|
1193
1119
|
props: /*@__PURE__*/ N({
|
|
1194
1120
|
modelValue: {},
|
|
@@ -1211,69 +1137,69 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1211
1137
|
}),
|
|
1212
1138
|
emits: ["update:modelValue"],
|
|
1213
1139
|
setup(e, { expose: t }) {
|
|
1214
|
-
let i = n(), a = e, o =
|
|
1140
|
+
let i = n(), a = e, o = V(e, "modelValue"), s = ot(a.client), c = ct(a.client), l = I(pt()), u = I(null), d = _e(), f = T(() => a.placeholder ?? i.Projects.Select_project), p = T(() => !Z.value || !a.excludeProjectId ? Z.value : Z.value.filter((e) => e.id !== a.excludeProjectId)), { getNextProjectId: g } = st(a.client), _ = async (e = !1) => {
|
|
1215
1141
|
let t = o.value.id;
|
|
1216
1142
|
if (!t) return;
|
|
1217
|
-
let n = await
|
|
1218
|
-
n &&
|
|
1219
|
-
},
|
|
1220
|
-
if (l.value || l.value === 0) return l.value <
|
|
1221
|
-
}),
|
|
1222
|
-
|
|
1223
|
-
let e = await
|
|
1224
|
-
return
|
|
1225
|
-
},
|
|
1143
|
+
let n = await g(t, e);
|
|
1144
|
+
n && tt(n);
|
|
1145
|
+
}, v = T(() => {
|
|
1146
|
+
if (l.value || l.value === 0) return l.value < yt ? "static" : "api";
|
|
1147
|
+
}), b = async () => {
|
|
1148
|
+
X.value ||= s.call();
|
|
1149
|
+
let e = await X.value;
|
|
1150
|
+
return X.value = null, e;
|
|
1151
|
+
}, x = async (e) => {
|
|
1226
1152
|
let t = await c.changeParams({
|
|
1227
1153
|
url: e.name,
|
|
1228
1154
|
name: e.name
|
|
1229
1155
|
}).call();
|
|
1230
1156
|
if (!t.errors) {
|
|
1231
|
-
if (
|
|
1232
|
-
let n =
|
|
1157
|
+
if (Z.value && v.value === "static") {
|
|
1158
|
+
let n = Qe({
|
|
1233
1159
|
id: t.result,
|
|
1234
1160
|
user_id: r.state.userId,
|
|
1235
1161
|
name: e.name,
|
|
1236
1162
|
url: e.name,
|
|
1237
1163
|
on: 0,
|
|
1238
1164
|
right: "11111111111111111111"
|
|
1239
|
-
}), i =
|
|
1240
|
-
|
|
1241
|
-
...
|
|
1165
|
+
}), i = Z.value.findIndex((e) => e.on === 0);
|
|
1166
|
+
Z.value = [
|
|
1167
|
+
...Z.value.slice(0, i),
|
|
1242
1168
|
n,
|
|
1243
|
-
...
|
|
1244
|
-
], l.value && (l.value += 1,
|
|
1169
|
+
...Z.value.slice(i)
|
|
1170
|
+
], l.value && (l.value += 1, ft(l.value));
|
|
1245
1171
|
}
|
|
1246
|
-
|
|
1172
|
+
v.value === "api" && u.value?.resetCache(!0);
|
|
1247
1173
|
}
|
|
1248
|
-
}, C = async () => {
|
|
1249
|
-
if (X.value || y.value === "api") return;
|
|
1250
|
-
let e = await x();
|
|
1251
|
-
e.errors || (X.value = e.result);
|
|
1252
1174
|
}, ee = async () => {
|
|
1175
|
+
if (Z.value || v.value === "api") return;
|
|
1176
|
+
let e = await b();
|
|
1177
|
+
e.errors || (Z.value = e.result);
|
|
1178
|
+
}, S = async () => {
|
|
1253
1179
|
if (l.value) {
|
|
1254
|
-
let e =
|
|
1255
|
-
e && e.addEventListener("pointerenter", () =>
|
|
1180
|
+
let e = u.value?.popupOpenerRef?.$el;
|
|
1181
|
+
e && e.addEventListener("pointerenter", () => ee(), { once: !0 });
|
|
1256
1182
|
} else {
|
|
1257
|
-
s.changeParams({ limit:
|
|
1258
|
-
let e = await
|
|
1183
|
+
s.changeParams({ limit: yt });
|
|
1184
|
+
let e = await b();
|
|
1259
1185
|
if (e.errors) return;
|
|
1260
|
-
delete s.params.limit, l.value = e.total ?? void 0, !
|
|
1186
|
+
delete s.params.limit, l.value = e.total ?? void 0, !Z.value && v.value !== "api" && (Z.value = e.result), l.value && ft(l.value);
|
|
1261
1187
|
}
|
|
1262
1188
|
};
|
|
1263
|
-
return t({ goToNextProject:
|
|
1264
|
-
await
|
|
1189
|
+
return t({ goToNextProject: _ }), le(async () => {
|
|
1190
|
+
await S();
|
|
1265
1191
|
}), (t, n) => {
|
|
1266
|
-
let r =
|
|
1267
|
-
return F(), O(w, null, [(F(), E(
|
|
1268
|
-
key:
|
|
1192
|
+
let r = fe("TopButton");
|
|
1193
|
+
return F(), O(w, null, [(F(), E(C, {
|
|
1194
|
+
key: v.value ?? "dummy",
|
|
1269
1195
|
ref_key: "refSelector",
|
|
1270
|
-
ref:
|
|
1196
|
+
ref: u,
|
|
1271
1197
|
class: "top-projectSelector",
|
|
1272
1198
|
modelValue: o.value,
|
|
1273
|
-
"onUpdate:modelValue": n[1] ||= (t) => e.menuMode ?
|
|
1274
|
-
items:
|
|
1199
|
+
"onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? B(tt)(t.id) : o.value = t,
|
|
1200
|
+
items: p.value,
|
|
1275
1201
|
itemsChunkSize: 100,
|
|
1276
|
-
itemsIsLoading:
|
|
1202
|
+
itemsIsLoading: v.value === "static" && B(Z) === void 0,
|
|
1277
1203
|
title: t.$i18n.Projects.Search_projects,
|
|
1278
1204
|
modificator: e.modificator,
|
|
1279
1205
|
searchFields: [
|
|
@@ -1281,45 +1207,45 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1281
1207
|
"name",
|
|
1282
1208
|
"url"
|
|
1283
1209
|
],
|
|
1284
|
-
placeholder:
|
|
1210
|
+
placeholder: f.value,
|
|
1285
1211
|
hasCloserBtn: "",
|
|
1286
|
-
api:
|
|
1287
|
-
apiSetSearchParams:
|
|
1212
|
+
api: v.value === "api" ? B(s) : void 0,
|
|
1213
|
+
apiSetSearchParams: v.value === "api" ? (...e) => B(at)(...e) : void 0,
|
|
1288
1214
|
useCache: "",
|
|
1289
1215
|
appendSearchToResult: "",
|
|
1290
1216
|
appendSearchAllowDuplicate: "",
|
|
1291
|
-
appendSearchToResultCond:
|
|
1217
|
+
appendSearchToResultCond: B(m),
|
|
1292
1218
|
appendWithoutSelect: "",
|
|
1293
1219
|
buttonProps: {
|
|
1294
1220
|
...e.buttonProps,
|
|
1295
|
-
isProgress: !
|
|
1296
|
-
disabled: !
|
|
1221
|
+
isProgress: !v.value,
|
|
1222
|
+
disabled: !v.value
|
|
1297
1223
|
},
|
|
1298
1224
|
openerShortcut: e.openerShortcut,
|
|
1299
|
-
onAppendItem:
|
|
1300
|
-
onOpen:
|
|
1225
|
+
onAppendItem: x,
|
|
1226
|
+
onOpen: ee
|
|
1301
1227
|
}, {
|
|
1302
|
-
item:
|
|
1228
|
+
item: U(({ item: i }) => [k("div", ht, [i.id ? (F(), O(w, { key: 0 }, [A(z(B(h)(i.name, 20)) + " ", 1), k("span", gt, " id " + z(i.id), 1)], 64)) : (F(), O(w, { key: 1 }, [i.listItemProps?.type ? D("", !0) : (F(), O("div", _t, z(t.$i18n.Projects.Add_project) + ": ", 1)), A(" " + z(i.name), 1)], 64))]), i.id ? (F(), O(w, { key: 0 }, [
|
|
1303
1229
|
e.menuMode ? (F(), O("a", {
|
|
1304
1230
|
key: 0,
|
|
1305
1231
|
class: "top-projectSelector_itemLink",
|
|
1306
|
-
href:
|
|
1307
|
-
}, null, 8,
|
|
1232
|
+
href: B(nt)(i.id)
|
|
1233
|
+
}, null, 8, vt)) : D("", !0),
|
|
1308
1234
|
t.$core.state.isMobile ? D("", !0) : (F(), E(r, {
|
|
1309
1235
|
key: 1,
|
|
1310
1236
|
href: i.externalLink,
|
|
1311
1237
|
"data-top-icon": "",
|
|
1312
1238
|
color: "theme",
|
|
1313
1239
|
target: "_blank",
|
|
1314
|
-
onClick: n[0] ||=
|
|
1240
|
+
onClick: n[0] ||= W(() => {}, ["stop"])
|
|
1315
1241
|
}, null, 8, ["href"])),
|
|
1316
|
-
j(
|
|
1317
|
-
id:
|
|
1242
|
+
j(y, {
|
|
1243
|
+
id: B(d),
|
|
1318
1244
|
pos: "2",
|
|
1319
1245
|
notch: !1,
|
|
1320
1246
|
data: { projectItem: i }
|
|
1321
1247
|
}, {
|
|
1322
|
-
default:
|
|
1248
|
+
default: U(() => [j(r, {
|
|
1323
1249
|
class: "top-popup_listMore",
|
|
1324
1250
|
"data-top-icon": "",
|
|
1325
1251
|
color: "theme"
|
|
@@ -1340,16 +1266,16 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1340
1266
|
"appendSearchToResultCond",
|
|
1341
1267
|
"buttonProps",
|
|
1342
1268
|
"openerShortcut"
|
|
1343
|
-
])), j(
|
|
1269
|
+
])), j(ut, { id: B(d) }, null, 8, ["id"])], 64);
|
|
1344
1270
|
};
|
|
1345
1271
|
}
|
|
1346
|
-
}),
|
|
1347
|
-
e =
|
|
1272
|
+
}), xt = (e) => "-" + e, Q = (e) => e[0] === "-" ? e.substring(1) : e, St = (e, t) => {
|
|
1273
|
+
e = Q(e);
|
|
1348
1274
|
let n = t.find((t) => t.id === e);
|
|
1349
1275
|
if (n) return n;
|
|
1350
|
-
},
|
|
1276
|
+
}, Ct = (e, t, n) => {
|
|
1351
1277
|
t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
|
|
1352
|
-
let r =
|
|
1278
|
+
let r = l.genElPopupOpener("div", t);
|
|
1353
1279
|
return r.classList.add("top-tagSelector"), e.useTopButton && r.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || r.classList.add("top-tagSelector-custom"), e.mode === "filter" && r.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && r.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && r.classList.add("top-tagSelector-setter_several"), r.onclick = (t) => {
|
|
1354
1280
|
t.preventDefault(), t.stopPropagation(), r.onclick = null;
|
|
1355
1281
|
let i = I(e.modelValue), a = {
|
|
@@ -1359,24 +1285,24 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1359
1285
|
filters: e.filters,
|
|
1360
1286
|
payload: e.payload
|
|
1361
1287
|
};
|
|
1362
|
-
|
|
1363
|
-
e.modelValue = i.value,
|
|
1288
|
+
c(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, ae(e.modelValue) || H(i, () => {
|
|
1289
|
+
e.modelValue = i.value, Tt(r, e, n);
|
|
1364
1290
|
}), r.click();
|
|
1365
|
-
},
|
|
1291
|
+
}, ae(e.modelValue) ? H(e.modelValue, () => Tt(r, e, n)) : c(r, "topTagSelectorRender", (t) => {
|
|
1366
1292
|
e.modelValue = t;
|
|
1367
|
-
let i =
|
|
1368
|
-
i && (i.model.value = t),
|
|
1369
|
-
}),
|
|
1370
|
-
},
|
|
1371
|
-
|
|
1372
|
-
},
|
|
1373
|
-
let i =
|
|
1293
|
+
let i = c(r, "topTagSelectorTarget");
|
|
1294
|
+
i && (i.model.value = t), Tt(r, e, n);
|
|
1295
|
+
}), Tt(r, e, n), r;
|
|
1296
|
+
}, wt = (e, t) => {
|
|
1297
|
+
c(e, "topTagSelectorRender")?.(t);
|
|
1298
|
+
}, Tt = (e, t, r) => {
|
|
1299
|
+
let i = B(t.modelValue);
|
|
1374
1300
|
if (e.classList.toggle("top-tagSelector-selectedOne", !i.length || i.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", i.length > 5), t.mode === "setter" && t.filters) {
|
|
1375
1301
|
e.innerHTML = `<div>${r}</div>`;
|
|
1376
1302
|
return;
|
|
1377
1303
|
}
|
|
1378
1304
|
if (e.innerHTML = "", !i.length && t.mode === "filter") {
|
|
1379
|
-
let t =
|
|
1305
|
+
let t = Et({
|
|
1380
1306
|
id: "all",
|
|
1381
1307
|
colorId: "",
|
|
1382
1308
|
name: n().Common?.All_tags ?? "",
|
|
@@ -1385,18 +1311,18 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1385
1311
|
e.append(t);
|
|
1386
1312
|
}
|
|
1387
1313
|
i.forEach((n) => {
|
|
1388
|
-
let r =
|
|
1389
|
-
id:
|
|
1390
|
-
colorId:
|
|
1391
|
-
name:
|
|
1392
|
-
state:
|
|
1314
|
+
let r = Et({
|
|
1315
|
+
id: Q(n),
|
|
1316
|
+
colorId: St(n, t.tags)?.color_id ?? "",
|
|
1317
|
+
name: St(n, t.tags)?.name ?? "",
|
|
1318
|
+
state: Q(n) === n ? "selected" : "excluded"
|
|
1393
1319
|
});
|
|
1394
1320
|
e.append(r);
|
|
1395
1321
|
});
|
|
1396
|
-
},
|
|
1322
|
+
}, Et = (e) => {
|
|
1397
1323
|
let t = document.createElement("div");
|
|
1398
1324
|
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;
|
|
1399
|
-
},
|
|
1325
|
+
}, Dt = [
|
|
1400
1326
|
{
|
|
1401
1327
|
id: "1",
|
|
1402
1328
|
name: "Without Tag",
|
|
@@ -1447,11 +1373,11 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1447
1373
|
name: "Turquoise",
|
|
1448
1374
|
color_id: "10"
|
|
1449
1375
|
}
|
|
1450
|
-
],
|
|
1376
|
+
], Ot = [
|
|
1451
1377
|
"data-tag_id",
|
|
1452
1378
|
"data-tag_color_id",
|
|
1453
1379
|
"title"
|
|
1454
|
-
],
|
|
1380
|
+
], kt = /* @__PURE__ */ M({
|
|
1455
1381
|
__name: "tagIcon",
|
|
1456
1382
|
props: {
|
|
1457
1383
|
id: {},
|
|
@@ -1469,9 +1395,9 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1469
1395
|
"data-tag_id": e.id,
|
|
1470
1396
|
"data-tag_color_id": e.colorId,
|
|
1471
1397
|
title: e.name
|
|
1472
|
-
}, null, 10,
|
|
1398
|
+
}, null, 10, Ot));
|
|
1473
1399
|
}
|
|
1474
|
-
}),
|
|
1400
|
+
}), At = ["contenteditable", "onKeydown"], jt = /* @__PURE__ */ M({
|
|
1475
1401
|
__name: "tagPopupListItem",
|
|
1476
1402
|
props: /*@__PURE__*/ N({
|
|
1477
1403
|
editable: { type: Boolean },
|
|
@@ -1492,11 +1418,11 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1492
1418
|
"select"
|
|
1493
1419
|
], ["update:name"]),
|
|
1494
1420
|
setup(e, { emit: t }) {
|
|
1495
|
-
let n = e, r = t, i =
|
|
1421
|
+
let n = e, r = t, i = V(e, "name"), a = I(null), o = T(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
|
|
1496
1422
|
contenteditable: s.value,
|
|
1497
1423
|
onpaste: (e) => e.preventDefault()
|
|
1498
1424
|
}), s = I(!1), c = async () => {
|
|
1499
|
-
s.value = !0, await
|
|
1425
|
+
s.value = !0, await se(), a.value?.focus();
|
|
1500
1426
|
}, l = () => {
|
|
1501
1427
|
let e = a.value?.innerText;
|
|
1502
1428
|
if (!e) return u();
|
|
@@ -1508,7 +1434,7 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1508
1434
|
let t = "selected";
|
|
1509
1435
|
n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
|
|
1510
1436
|
};
|
|
1511
|
-
return (t, n) => (F(), E(
|
|
1437
|
+
return (t, n) => (F(), E(x, {
|
|
1512
1438
|
class: P({
|
|
1513
1439
|
"top-tagSelector_tagListItem": !0,
|
|
1514
1440
|
"top-tagSelector_tagListItem-inEdit": s.value,
|
|
@@ -1517,10 +1443,10 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1517
1443
|
"top-tagSelector-active": !!e.state,
|
|
1518
1444
|
"top-tagSelector-excluded": e.state === "excluded"
|
|
1519
1445
|
}),
|
|
1520
|
-
onClick:
|
|
1446
|
+
onClick: W(d, ["stop"])
|
|
1521
1447
|
}, {
|
|
1522
|
-
default:
|
|
1523
|
-
j(
|
|
1448
|
+
default: U(() => [
|
|
1449
|
+
j(kt, {
|
|
1524
1450
|
id: e.id,
|
|
1525
1451
|
name: i.value,
|
|
1526
1452
|
colorId: e.colorId,
|
|
@@ -1531,17 +1457,17 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1531
1457
|
"colorId",
|
|
1532
1458
|
"state"
|
|
1533
1459
|
]),
|
|
1534
|
-
k("span",
|
|
1460
|
+
k("span", oe({
|
|
1535
1461
|
ref_key: "elName",
|
|
1536
1462
|
ref: a,
|
|
1537
1463
|
class: "top-tagSelector_tagListItemName",
|
|
1538
1464
|
contenteditable: s.value ? "plaintext-only" : !1
|
|
1539
|
-
}, o.value, { onKeydown: [
|
|
1465
|
+
}, o.value, { onKeydown: [ye(W(l, ["stop"]), ["enter"]), ye(W(u, ["stop"]), ["esc"])] }), z(i.value), 17, At),
|
|
1540
1466
|
e.editable ? (F(), O(w, { key: 0 }, [s.value ? (F(), O("span", {
|
|
1541
1467
|
key: 1,
|
|
1542
1468
|
"data-top-icon": "",
|
|
1543
1469
|
class: "top-tagSelector_edit",
|
|
1544
|
-
onClick:
|
|
1470
|
+
onClick: W(l, ["stop"])
|
|
1545
1471
|
})) : (F(), O("span", {
|
|
1546
1472
|
key: 0,
|
|
1547
1473
|
"data-top-icon": "",
|
|
@@ -1552,7 +1478,7 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1552
1478
|
_: 1
|
|
1553
1479
|
}, 8, ["class"]));
|
|
1554
1480
|
}
|
|
1555
|
-
}),
|
|
1481
|
+
}), Mt = { key: 1 }, Nt = /* @__PURE__ */ M({
|
|
1556
1482
|
inheritAttrs: !1,
|
|
1557
1483
|
__name: "popupOpener",
|
|
1558
1484
|
props: /*@__PURE__*/ N({
|
|
@@ -1571,7 +1497,7 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1571
1497
|
}),
|
|
1572
1498
|
emits: ["update:modelValue"],
|
|
1573
1499
|
setup(e, { attrs: t }) {
|
|
1574
|
-
let n = e, r =
|
|
1500
|
+
let n = e, r = V(e, "modelValue"), i = n.useTopButton ? a : "div", o = n.useTopButton ? "html" : "default", s = {
|
|
1575
1501
|
model: r,
|
|
1576
1502
|
mode: n.mode,
|
|
1577
1503
|
targetId: n.targetId,
|
|
@@ -1579,9 +1505,9 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1579
1505
|
payload: n.payload
|
|
1580
1506
|
};
|
|
1581
1507
|
return (a, c) => {
|
|
1582
|
-
let l =
|
|
1583
|
-
return F(), E(
|
|
1584
|
-
default:
|
|
1508
|
+
let l = pe("top-data");
|
|
1509
|
+
return F(), E(y, { id: e.id }, {
|
|
1510
|
+
default: U(() => [ve((F(), E(me(B(i)), oe({
|
|
1585
1511
|
class: {
|
|
1586
1512
|
"top-tagSelector": !0,
|
|
1587
1513
|
"top-tagSelector-useTopButton": n.useTopButton,
|
|
@@ -1596,17 +1522,17 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1596
1522
|
color: "theme",
|
|
1597
1523
|
styling: e.styling
|
|
1598
1524
|
}, t), {
|
|
1599
|
-
[
|
|
1525
|
+
[B(o)]: U(() => [!r.value.length && e.mode === "filter" ? (F(), E(kt, {
|
|
1600
1526
|
key: 0,
|
|
1601
1527
|
id: "all",
|
|
1602
1528
|
colorId: "",
|
|
1603
1529
|
name: a.$i18n.Common.All_tags ?? "",
|
|
1604
1530
|
state: ""
|
|
1605
|
-
}, null, 8, ["name"])) : D("", !0), e.mode === "setter" && e.filters ? (F(), O("div",
|
|
1606
|
-
id:
|
|
1607
|
-
colorId:
|
|
1608
|
-
name:
|
|
1609
|
-
state:
|
|
1531
|
+
}, null, 8, ["name"])) : D("", !0), e.mode === "setter" && e.filters ? (F(), O("div", Mt, [R(a.$slots, "default")])) : (F(!0), O(w, { key: 2 }, L(r.value, (t) => (F(), E(kt, {
|
|
1532
|
+
id: B(Q)(t),
|
|
1533
|
+
colorId: B(St)(t, e.tags)?.color_id ?? "",
|
|
1534
|
+
name: B(St)(t, e.tags)?.name ?? "",
|
|
1535
|
+
state: B(Q)(t) === t ? "selected" : "excluded"
|
|
1610
1536
|
}, null, 8, [
|
|
1611
1537
|
"id",
|
|
1612
1538
|
"colorId",
|
|
@@ -1623,7 +1549,7 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1623
1549
|
}, 8, ["id"]);
|
|
1624
1550
|
};
|
|
1625
1551
|
}
|
|
1626
|
-
}),
|
|
1552
|
+
}), Pt = /* @__PURE__ */ M({
|
|
1627
1553
|
__name: "tagSelector",
|
|
1628
1554
|
props: /*@__PURE__*/ N({
|
|
1629
1555
|
modelValue: {},
|
|
@@ -1646,7 +1572,7 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1646
1572
|
}, {
|
|
1647
1573
|
modelValue: { required: !0 },
|
|
1648
1574
|
modelModifiers: {},
|
|
1649
|
-
tags: { default:
|
|
1575
|
+
tags: { default: de(Dt) },
|
|
1650
1576
|
tagsModifiers: {}
|
|
1651
1577
|
}),
|
|
1652
1578
|
emits: /*@__PURE__*/ N([
|
|
@@ -1655,51 +1581,51 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1655
1581
|
"tagsChanged"
|
|
1656
1582
|
], ["update:modelValue", "update:tags"]),
|
|
1657
1583
|
setup(e, { emit: t }) {
|
|
1658
|
-
let
|
|
1584
|
+
let o = n(), l = e, u = V(e, "modelValue"), d = V(e, "tags"), f = t, p = i((e, t) => {
|
|
1659
1585
|
f(e, t);
|
|
1660
1586
|
}, l.emitDelay);
|
|
1661
1587
|
l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
|
|
1662
1588
|
let m = l.id ?? "top-popup-id-" + Math.random(), h = I("add"), g = () => {
|
|
1663
|
-
let e = " " +
|
|
1589
|
+
let e = " " + o.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
|
|
1664
1590
|
return t.set("add", {
|
|
1665
1591
|
value: "add",
|
|
1666
|
-
title:
|
|
1592
|
+
title: o.Common.Add + e
|
|
1667
1593
|
}), t.set("replace", {
|
|
1668
1594
|
value: "replace",
|
|
1669
|
-
title:
|
|
1595
|
+
title: o.Common.Replace + e
|
|
1670
1596
|
}), t.set("delete", {
|
|
1671
1597
|
value: "delete",
|
|
1672
|
-
title:
|
|
1598
|
+
title: o.Common.Delete + e
|
|
1673
1599
|
}), t;
|
|
1674
|
-
},
|
|
1600
|
+
}, _ = he({
|
|
1675
1601
|
model: u,
|
|
1676
1602
|
mode: "filter",
|
|
1677
1603
|
targetId: void 0,
|
|
1678
1604
|
filters: void 0,
|
|
1679
1605
|
payload: void 0
|
|
1680
1606
|
});
|
|
1681
|
-
|
|
1607
|
+
H(u, () => {
|
|
1682
1608
|
p("selector", u.value);
|
|
1683
1609
|
});
|
|
1684
|
-
let
|
|
1685
|
-
if (
|
|
1686
|
-
}),
|
|
1610
|
+
let v = T(() => {
|
|
1611
|
+
if (_.value.mode === "setter" && l.maxTagsForSetter && !_.value.filters) return _.value.model.value.length >= l.maxTagsForSetter;
|
|
1612
|
+
}), y = (e) => {
|
|
1687
1613
|
if (e !== "all") {
|
|
1688
|
-
if (
|
|
1689
|
-
if (
|
|
1614
|
+
if (_.value.model.value.includes(e)) return "selected";
|
|
1615
|
+
if (_.value.model.value.includes(xt(e))) return "excluded";
|
|
1690
1616
|
}
|
|
1691
|
-
return e === "all" && !
|
|
1692
|
-
},
|
|
1693
|
-
let n =
|
|
1694
|
-
t === "select" && r.push(e), t === "exclude" && r.push(n),
|
|
1617
|
+
return e === "all" && !_.value.model.value.length ? "selected" : "";
|
|
1618
|
+
}, b = (e, t) => {
|
|
1619
|
+
let n = xt(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
|
|
1620
|
+
t === "select" && r.push(e), t === "exclude" && r.push(n), _.value.mode === "setter" && _.value.targetId !== void 0 && l.requiredForSetter && (r.length || r.push("1"), r.length === 2 && _.value.model.value.length === 1 && _.value.model.value[0] === "1" && (r = r.filter((e) => e !== "1"))), l.singleMode && !_.value.filters && (r.length || (r = _.value.model.value), r.length > 1 && (r = [r[r.length - 1]])), r.sort((e, t) => l.tags ? l.tags.findIndex((t) => t.id === e) - l.tags.findIndex((e) => e.id === t) : 0), _.value.model.value = r, _.value.mode === "setter" && _.value.targetId !== void 0 && p("setter", {
|
|
1695
1621
|
tagsIds: r,
|
|
1696
|
-
targetId:
|
|
1697
|
-
payload:
|
|
1622
|
+
targetId: _.value.targetId,
|
|
1623
|
+
payload: _.value.payload
|
|
1698
1624
|
});
|
|
1699
|
-
},
|
|
1625
|
+
}, ee = T(() => {
|
|
1700
1626
|
let e = "top-tagSelector_popup";
|
|
1701
|
-
return
|
|
1702
|
-
}),
|
|
1627
|
+
return _.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), _.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
|
|
1628
|
+
}), C = () => {
|
|
1703
1629
|
let e = prompt("", "New tag");
|
|
1704
1630
|
if (!e || e === "New tag") return;
|
|
1705
1631
|
let t = d.value.length + 1;
|
|
@@ -1708,9 +1634,9 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1708
1634
|
name: e,
|
|
1709
1635
|
color_id: String((t - 1) % 10 + 1)
|
|
1710
1636
|
}), f("tagsChanged", d.value);
|
|
1711
|
-
},
|
|
1712
|
-
if (
|
|
1713
|
-
if (
|
|
1637
|
+
}, te = (e) => {
|
|
1638
|
+
if (_.value = c(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
1639
|
+
if (_.value.filters && (h.value = "add", _.value.model.value = []), !r.$?.ui.sortable) {
|
|
1714
1640
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
1715
1641
|
return;
|
|
1716
1642
|
}
|
|
@@ -1728,13 +1654,13 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1728
1654
|
}), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
|
|
1729
1655
|
}
|
|
1730
1656
|
});
|
|
1731
|
-
},
|
|
1657
|
+
}, ne = (e) => {
|
|
1732
1658
|
r.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
|
|
1733
1659
|
};
|
|
1734
|
-
return (t, n) => (F(), O(w, null, [j(
|
|
1660
|
+
return (t, n) => (F(), O(w, null, [j(Nt, {
|
|
1735
1661
|
modelValue: u.value,
|
|
1736
1662
|
"onUpdate:modelValue": n[0] ||= (e) => u.value = e,
|
|
1737
|
-
id:
|
|
1663
|
+
id: B(m),
|
|
1738
1664
|
tags: d.value,
|
|
1739
1665
|
styling: e.styling,
|
|
1740
1666
|
mode: "filter",
|
|
@@ -1745,36 +1671,36 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1745
1671
|
"tags",
|
|
1746
1672
|
"styling",
|
|
1747
1673
|
"useTopButton"
|
|
1748
|
-
]), j(
|
|
1749
|
-
id:
|
|
1750
|
-
class: P(
|
|
1751
|
-
onOpen: n[4] ||= (e) =>
|
|
1752
|
-
onClose: n[5] ||= (e) =>
|
|
1674
|
+
]), j(S, {
|
|
1675
|
+
id: B(m),
|
|
1676
|
+
class: P(ee.value),
|
|
1677
|
+
onOpen: n[4] ||= (e) => te(e),
|
|
1678
|
+
onClose: n[5] ||= (e) => ne(e),
|
|
1753
1679
|
"transition-duration": 50
|
|
1754
|
-
},
|
|
1755
|
-
contentList:
|
|
1756
|
-
|
|
1680
|
+
}, ie({
|
|
1681
|
+
contentList: U(() => [
|
|
1682
|
+
_.value.mode === "filter" && !e.singleMode ? (F(), E(jt, {
|
|
1757
1683
|
key: 0,
|
|
1758
1684
|
id: "all",
|
|
1759
1685
|
colorId: "",
|
|
1760
1686
|
name: t.$i18n.Common.All_tags ?? "",
|
|
1761
|
-
state:
|
|
1762
|
-
onSelect: n[3] ||= (e) =>
|
|
1687
|
+
state: _.value.model.value.length ? "" : "selected",
|
|
1688
|
+
onSelect: n[3] ||= (e) => _.value.model.value = []
|
|
1763
1689
|
}, null, 8, ["name", "state"])) : D("", !0),
|
|
1764
|
-
(F(!0), O(w, null,
|
|
1690
|
+
(F(!0), O(w, null, L(d.value, (t) => (F(), E(jt, {
|
|
1765
1691
|
key: t.id,
|
|
1766
1692
|
id: t.id,
|
|
1767
1693
|
colorId: t.color_id,
|
|
1768
1694
|
name: t.name,
|
|
1769
|
-
state:
|
|
1770
|
-
canExclude:
|
|
1695
|
+
state: y(t.id),
|
|
1696
|
+
canExclude: _.value.mode === "filter" && !e.singleMode,
|
|
1771
1697
|
editable: e.tagsEditable,
|
|
1772
|
-
disabled:
|
|
1773
|
-
onUnselect: (e) =>
|
|
1774
|
-
onSelect: (e) =>
|
|
1775
|
-
onExclude: (e) =>
|
|
1698
|
+
disabled: v.value && y(t.id) === "",
|
|
1699
|
+
onUnselect: (e) => b(t.id, "unselect"),
|
|
1700
|
+
onSelect: (e) => b(t.id, "select"),
|
|
1701
|
+
onExclude: (e) => b(t.id, "exclude"),
|
|
1776
1702
|
"onUpdate:name": (e) => {
|
|
1777
|
-
t.name = e,
|
|
1703
|
+
t.name = e, B(p)("tagsChanged", d.value);
|
|
1778
1704
|
}
|
|
1779
1705
|
}, null, 8, [
|
|
1780
1706
|
"id",
|
|
@@ -1789,43 +1715,234 @@ var We = ["innerHTML"], Ge = /* @__PURE__ */ M({
|
|
|
1789
1715
|
"onExclude",
|
|
1790
1716
|
"onUpdate:name"
|
|
1791
1717
|
]))), 128)),
|
|
1792
|
-
e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (F(), E(
|
|
1718
|
+
e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (F(), E(x, {
|
|
1793
1719
|
key: 1,
|
|
1794
1720
|
"data-top-icon": "",
|
|
1795
|
-
onClick:
|
|
1721
|
+
onClick: W(C, ["stop"])
|
|
1796
1722
|
}, {
|
|
1797
|
-
default:
|
|
1723
|
+
default: U(() => [A(z(t.$i18n.Common.Add), 1)]),
|
|
1798
1724
|
_: 1
|
|
1799
1725
|
})) : D("", !0)
|
|
1800
1726
|
]),
|
|
1801
1727
|
_: 2
|
|
1802
|
-
}, [
|
|
1728
|
+
}, [_.value.mode === "setter" && _.value.filters ? {
|
|
1803
1729
|
name: "header",
|
|
1804
|
-
fn:
|
|
1730
|
+
fn: U(() => [j(s, {
|
|
1805
1731
|
modelValue: h.value,
|
|
1806
1732
|
"onUpdate:modelValue": n[1] ||= (e) => h.value = e,
|
|
1807
1733
|
options: g()
|
|
1808
1734
|
}, null, 8, ["modelValue", "options"])]),
|
|
1809
1735
|
key: "0"
|
|
1810
|
-
} : void 0,
|
|
1736
|
+
} : void 0, _.value.mode === "setter" && _.value.filters ? {
|
|
1811
1737
|
name: "footer",
|
|
1812
|
-
fn:
|
|
1813
|
-
default:
|
|
1738
|
+
fn: U(() => [j(a, { color: "theme" }, {
|
|
1739
|
+
default: U(() => [A(z(t.$i18n.Common.Cancel), 1)]),
|
|
1814
1740
|
_: 1
|
|
1815
|
-
}), j(a, { onClick: n[2] ||= (e) =>
|
|
1816
|
-
tagsIds:
|
|
1817
|
-
filters:
|
|
1741
|
+
}), j(a, { onClick: n[2] ||= (e) => B(p)("setter", {
|
|
1742
|
+
tagsIds: _.value.model.value,
|
|
1743
|
+
filters: _.value.filters,
|
|
1818
1744
|
filtersAction: h.value,
|
|
1819
|
-
payload:
|
|
1745
|
+
payload: _.value.payload
|
|
1820
1746
|
}) }, {
|
|
1821
|
-
default:
|
|
1747
|
+
default: U(() => [A(z(h.value === "add" ? t.$i18n.Common.Add : "") + " " + z(h.value === "replace" ? t.$i18n.Common.Replace : "") + " " + z(h.value === "delete" ? t.$i18n.Common.Delete : ""), 1)]),
|
|
1822
1748
|
_: 1
|
|
1823
1749
|
})]),
|
|
1824
1750
|
key: "1"
|
|
1825
1751
|
} : void 0]), 1032, ["id", "class"])], 64));
|
|
1826
1752
|
}
|
|
1753
|
+
}), Ft = (e) => {
|
|
1754
|
+
let t = e.getPropertyValue("rule").trim();
|
|
1755
|
+
if (!t) return {};
|
|
1756
|
+
let n = t.match(/(?:^|\s)(\d*\.?\d+)px(?:\s|$)/), r = n ? Number.parseFloat(n[1]) : void 0;
|
|
1757
|
+
return {
|
|
1758
|
+
color: t.replace(n?.[0] ?? "", " ").replace(/\b(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)\b/, "").trim() || void 0,
|
|
1759
|
+
width: Number.isFinite(r) ? r : void 0
|
|
1760
|
+
};
|
|
1761
|
+
}, It = (e, t, n) => {
|
|
1762
|
+
let r = CSS.supports("rule", "1px solid") ? e.getPropertyValue(`${t}-rule-style`).trim() : "";
|
|
1763
|
+
return n ?? (r || e.getPropertyValue(`--flex-${t}-rule`).trim() || "solid");
|
|
1764
|
+
}, Lt = (e, t, n) => {
|
|
1765
|
+
let r = t.getBoundingClientRect(), i = r.width / (t.clientWidth || 1), a = r.height / (t.clientHeight || 1), o = n.flexDirection.startsWith("row"), s = n.flexDirection.endsWith("reverse"), c = o ? n.direction === "rtl" === s : !s;
|
|
1766
|
+
return Array.from(e.children).filter((e) => e instanceof HTMLElement && e !== t).flatMap((e, t) => {
|
|
1767
|
+
let n = getComputedStyle(e);
|
|
1768
|
+
if (n.display === "none" || n.position === "absolute" || n.position === "fixed") return [];
|
|
1769
|
+
let s = e.getBoundingClientRect();
|
|
1770
|
+
if (s.width === 0 || s.height === 0) return [];
|
|
1771
|
+
let l = {
|
|
1772
|
+
left: (s.left - r.left) / i,
|
|
1773
|
+
right: (s.right - r.left) / i,
|
|
1774
|
+
top: (s.top - r.top) / a,
|
|
1775
|
+
bottom: (s.bottom - r.top) / a
|
|
1776
|
+
}, u = o ? l.left : l.top, d = o ? l.right : l.bottom;
|
|
1777
|
+
return [{
|
|
1778
|
+
index: t,
|
|
1779
|
+
order: Number.parseInt(n.order, 10) || 0,
|
|
1780
|
+
box: l,
|
|
1781
|
+
mainStart: c ? u : -d,
|
|
1782
|
+
mainEnd: c ? d : -u,
|
|
1783
|
+
crossStart: o ? l.top : l.left,
|
|
1784
|
+
crossEnd: o ? l.bottom : l.right
|
|
1785
|
+
}];
|
|
1786
|
+
}).sort((e, t) => e.order - t.order || e.index - t.index);
|
|
1787
|
+
}, Rt = (e, t) => {
|
|
1788
|
+
let n = [];
|
|
1789
|
+
for (let r of e) {
|
|
1790
|
+
let e = n[n.length - 1];
|
|
1791
|
+
if (!e || t !== "nowrap" && r.mainStart < e.lastMainEnd - .5) {
|
|
1792
|
+
n.push({
|
|
1793
|
+
items: [r],
|
|
1794
|
+
crossStart: r.crossStart,
|
|
1795
|
+
crossEnd: r.crossEnd,
|
|
1796
|
+
lastMainEnd: r.mainEnd
|
|
1797
|
+
});
|
|
1798
|
+
continue;
|
|
1799
|
+
}
|
|
1800
|
+
e.items.push(r), e.crossStart = Math.min(e.crossStart, r.crossStart), e.crossEnd = Math.max(e.crossEnd, r.crossEnd), e.lastMainEnd = r.mainEnd;
|
|
1801
|
+
}
|
|
1802
|
+
return n;
|
|
1803
|
+
}, zt = (e, t, n, r) => {
|
|
1804
|
+
let i = getComputedStyle(e), a = Ft(i), o = t.clientWidth, s = t.clientHeight, c = window.devicePixelRatio || 1, l = Math.round(o * c), u = Math.round(s * c);
|
|
1805
|
+
if ((t.width !== l || t.height !== u) && (t.width = l, t.height = u), n.setTransform(c, 0, 0, c, 0, 0), n.clearRect(0, 0, o, s), o === 0 || s === 0) return;
|
|
1806
|
+
let d = Rt(Lt(e, t, i), i.flexWrap), f = i.flexDirection.startsWith("row"), p = Number.parseFloat(f ? i.paddingLeft : i.paddingTop) || 0, m = (f ? o : s) - (Number.parseFloat(f ? i.paddingRight : i.paddingBottom) || 0), h = CSS.supports("rule-inset", "0px") ? i.getPropertyValue("rule-inset").trim() : "", g = r.inset ?? (h || i.getPropertyValue("--flex-rule-inset").trim()), _ = (typeof g == "number" ? `${g}px` : g.trim()).replace(/^(.+?)\s*\/\s*\1$/, "$1").match(/^(-?\d*\.?\d+px|0)(?:\s+(-?\d*\.?\d+px|0))?$/), v = _ ? Number.parseFloat(_[1]) : 0, y = _ ? Number.parseFloat(_[2] ?? _[1]) : 0, b = It(i, "row", r.rowRule), x = It(i, "column", r.columnRule);
|
|
1807
|
+
n.strokeStyle = r.color ?? a.color ?? (i.getPropertyValue("--flex-rule-color").trim() || i.color), n.lineWidth = r.width ?? a.width ?? (Number.parseFloat(i.getPropertyValue("--flex-rule-width")) || 1), n.beginPath();
|
|
1808
|
+
for (let e of d) if ((f ? x : b) === "solid") for (let t = 1; t < e.items.length; t++) {
|
|
1809
|
+
let r = e.items[t - 1], a = e.items[t];
|
|
1810
|
+
if (a.mainStart < r.mainEnd - .5) continue;
|
|
1811
|
+
let o = (r.mainEnd + a.mainStart) / 2, s = (f ? i.direction === "rtl" !== i.flexDirection.endsWith("reverse") : i.flexDirection.endsWith("reverse")) ? -o : o, c = e.crossStart + v, l = e.crossEnd - y;
|
|
1812
|
+
c >= l || (f ? (n.moveTo(s, c), n.lineTo(s, l)) : (n.moveTo(c, s), n.lineTo(l, s)));
|
|
1813
|
+
}
|
|
1814
|
+
for (let e = 1; e < d.length; e++) {
|
|
1815
|
+
if ((f ? b : x) !== "solid") continue;
|
|
1816
|
+
let t = d[e - 1], r = d[e], i = t.crossEnd <= r.crossStart, a = r.crossEnd <= t.crossStart;
|
|
1817
|
+
if (!i && !a) continue;
|
|
1818
|
+
let o = i ? (t.crossEnd + r.crossStart) / 2 : (r.crossEnd + t.crossStart) / 2, s = p + v, c = m - y;
|
|
1819
|
+
s >= c || (f ? (n.moveTo(s, o), n.lineTo(c, o)) : (n.moveTo(o, s), n.lineTo(o, c)));
|
|
1820
|
+
}
|
|
1821
|
+
n.stroke();
|
|
1822
|
+
}, Bt = (e, t = {}) => {
|
|
1823
|
+
if (!t.force && CSS.supports("rule", "1px solid")) return () => {};
|
|
1824
|
+
if (!["flex", "inline-flex"].includes(getComputedStyle(e).display)) throw TypeError("polyfillFlexRule expects display: flex or inline-flex");
|
|
1825
|
+
let n = document.createElement("canvas");
|
|
1826
|
+
n.dataset.flexRuleOverlay = "", n.setAttribute("aria-hidden", "true"), Object.assign(n.style, {
|
|
1827
|
+
position: "absolute",
|
|
1828
|
+
inset: "0",
|
|
1829
|
+
width: "100%",
|
|
1830
|
+
height: "100%",
|
|
1831
|
+
pointerEvents: "none",
|
|
1832
|
+
zIndex: "1"
|
|
1833
|
+
});
|
|
1834
|
+
let r = e.style.position, i = getComputedStyle(e).position === "static";
|
|
1835
|
+
i && (e.style.position = "relative"), e.append(n);
|
|
1836
|
+
let a = n.getContext("2d");
|
|
1837
|
+
if (!a) throw n.remove(), i && (e.style.position = r), Error("Canvas 2D is unavailable");
|
|
1838
|
+
let o = 0, s = !1, c = () => {
|
|
1839
|
+
!o && !s && (o = requestAnimationFrame(() => {
|
|
1840
|
+
o = 0, zt(e, n, a, t);
|
|
1841
|
+
}));
|
|
1842
|
+
}, l = new ResizeObserver(c), u = () => {
|
|
1843
|
+
l.disconnect(), l.observe(e);
|
|
1844
|
+
for (let t of Array.from(e.children)) t instanceof HTMLElement && t !== n && l.observe(t);
|
|
1845
|
+
c();
|
|
1846
|
+
}, d = new MutationObserver((t) => {
|
|
1847
|
+
if (t.some((t) => t.type === "childList" && t.target === e)) {
|
|
1848
|
+
u();
|
|
1849
|
+
return;
|
|
1850
|
+
}
|
|
1851
|
+
c();
|
|
1852
|
+
});
|
|
1853
|
+
return d.observe(e, {
|
|
1854
|
+
childList: !0,
|
|
1855
|
+
subtree: !0,
|
|
1856
|
+
attributes: !0,
|
|
1857
|
+
attributeFilter: [
|
|
1858
|
+
"class",
|
|
1859
|
+
"style",
|
|
1860
|
+
"hidden",
|
|
1861
|
+
"dir"
|
|
1862
|
+
]
|
|
1863
|
+
}), window.addEventListener("resize", c), window.addEventListener("scroll", c, !0), e.addEventListener("scroll", c), e.addEventListener("transitionend", c, !0), e.addEventListener("animationend", c, !0), u(), () => {
|
|
1864
|
+
s = !0, cancelAnimationFrame(o), d.disconnect(), l.disconnect(), window.removeEventListener("resize", c), window.removeEventListener("scroll", c, !0), e.removeEventListener("scroll", c), e.removeEventListener("transitionend", c, !0), e.removeEventListener("animationend", c, !0), n.remove(), i && (e.style.position = r);
|
|
1865
|
+
};
|
|
1866
|
+
}, Vt = {
|
|
1867
|
+
key: 0,
|
|
1868
|
+
class: "top-projectBarLeft"
|
|
1869
|
+
}, Ht = { class: "top-projectBarFilters" }, Ut = { class: "top-projectBarRight" }, Wt = {
|
|
1870
|
+
key: 1,
|
|
1871
|
+
class: "top-projectBarBottom"
|
|
1872
|
+
}, Gt = /* @__PURE__ */ M({
|
|
1873
|
+
__name: "projectBar",
|
|
1874
|
+
props: /*@__PURE__*/ N({
|
|
1875
|
+
styling: { default: "default" },
|
|
1876
|
+
isSticky: { type: Boolean },
|
|
1877
|
+
canChangeSticky: {
|
|
1878
|
+
type: Boolean,
|
|
1879
|
+
default: !1
|
|
1880
|
+
}
|
|
1881
|
+
}, {
|
|
1882
|
+
isSticky: {
|
|
1883
|
+
type: Boolean,
|
|
1884
|
+
default: !0
|
|
1885
|
+
},
|
|
1886
|
+
isStickyModifiers: {}
|
|
1887
|
+
}),
|
|
1888
|
+
emits: /*@__PURE__*/ N(["resize"], ["update:isSticky"]),
|
|
1889
|
+
setup(e, { emit: t, slots: n }) {
|
|
1890
|
+
let r = t, i = I(null), s = I("0px"), c = V(e, "isSticky"), l, u = () => {
|
|
1891
|
+
i.value && (s.value = `${i.value.getBoundingClientRect().height}px`);
|
|
1892
|
+
}, d = (e) => {
|
|
1893
|
+
let t = e[0];
|
|
1894
|
+
t && (u(), r("resize", t));
|
|
1895
|
+
};
|
|
1896
|
+
return le(() => {
|
|
1897
|
+
i.value && (u(), l = new ResizeObserver(d), l.observe(i.value), [i.value, ...i.value.querySelectorAll(".top-projectBarFilters, .top-regionSelector, .top-groupSelector")].forEach((e) => Bt(e)));
|
|
1898
|
+
}), ue(() => {
|
|
1899
|
+
l?.disconnect();
|
|
1900
|
+
}), (t, r) => (F(), O("div", {
|
|
1901
|
+
ref_key: "elBar",
|
|
1902
|
+
ref: i,
|
|
1903
|
+
class: P(["top-projectBar", {
|
|
1904
|
+
"top-projectBar": !0,
|
|
1905
|
+
"top-projectBar-sticky": c.value,
|
|
1906
|
+
["top-projectBar-" + e.styling]: !0
|
|
1907
|
+
}]),
|
|
1908
|
+
style: ce({ "--topProjectBar-height": s.value })
|
|
1909
|
+
}, [
|
|
1910
|
+
n.left ? (F(), O("div", Vt, [R(t.$slots, "left")])) : D("", !0),
|
|
1911
|
+
k("div", Ht, [R(t.$slots, "default")]),
|
|
1912
|
+
k("div", Ut, [n.right ? R(t.$slots, "right", {}, void 0, void 0, 0) : D("", !0), j(B(S), {
|
|
1913
|
+
notch: !1,
|
|
1914
|
+
pos: "2"
|
|
1915
|
+
}, {
|
|
1916
|
+
opener: U(() => [j(B(a), {
|
|
1917
|
+
color: "theme",
|
|
1918
|
+
icon: "",
|
|
1919
|
+
title: t.$i18n.Common.Settings
|
|
1920
|
+
}, null, 8, ["title"])]),
|
|
1921
|
+
contentList: U(() => [
|
|
1922
|
+
R(t.$slots, "menuItems"),
|
|
1923
|
+
R(t.$slots, "menuAdditional"),
|
|
1924
|
+
e.canChangeSticky ? (F(), O(w, { key: 0 }, [j(B(x), { type: "title" }, {
|
|
1925
|
+
default: U(() => [A(z(t.$i18n.Common.View), 1)]),
|
|
1926
|
+
_: 1
|
|
1927
|
+
}), j(B(x), { type: "formControls" }, {
|
|
1928
|
+
default: U(() => [j(B(o), {
|
|
1929
|
+
modelValue: c.value,
|
|
1930
|
+
"onUpdate:modelValue": r[0] ||= (e) => c.value = e,
|
|
1931
|
+
name: "pin"
|
|
1932
|
+
}, {
|
|
1933
|
+
default: U(() => [A(z(t.$i18n.Common.Bar_pin), 1)]),
|
|
1934
|
+
_: 1
|
|
1935
|
+
}, 8, ["modelValue"])]),
|
|
1936
|
+
_: 1
|
|
1937
|
+
})], 64)) : D("", !0)
|
|
1938
|
+
]),
|
|
1939
|
+
_: 3
|
|
1940
|
+
})]),
|
|
1941
|
+
n.bottom ? (F(), O("div", Wt, [R(t.$slots, "bottom")])) : D("", !0)
|
|
1942
|
+
], 6));
|
|
1943
|
+
}
|
|
1827
1944
|
});
|
|
1828
1945
|
//#endregion
|
|
1829
|
-
export {
|
|
1946
|
+
export { Se as TopCompetitorSelector, Je as TopGroupSelector, Gt as TopProjectBar, bt as TopProjectSelector, Oe as TopRegionSelector, Pt as TopTagSelector, Nt as TopTagSelectorPopupOpener, kt as TopTagSelectorTagIcon, f as dialogRegionSelector, p as findRegion, Ct as genElTopTagSelectorPopupOpener, d as genSearcherByKey, wt as renderElTopTagSelectorPopupOpener, mt as topProjectSelectorClearCache, Ce as useItemsFromCompetitors };
|
|
1830
1947
|
|
|
1831
1948
|
//# sourceMappingURL=project.js.map
|