@topvisor/ui 1.0.22-selectorRegion-pr → 1.0.23-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.chunks/{core-Cb1K4rks.es.js → core-Dxu5q2pq.es.js} +4 -4
- package/.chunks/{core-Cb1K4rks.es.js.map → core-Dxu5q2pq.es.js.map} +1 -1
- package/.chunks/{core-DOD2Zduv.amd.js → core-VAPdmxul.amd.js} +2 -2
- package/.chunks/{core-DOD2Zduv.amd.js.map → core-VAPdmxul.amd.js.map} +1 -1
- package/.chunks/{datepicker-BbLOzQtp.es.js → datepicker-B8BEVYYv.es.js} +2 -2
- package/.chunks/{datepicker-BbLOzQtp.es.js.map → datepicker-B8BEVYYv.es.js.map} +1 -1
- package/.chunks/{datepicker-DNOnzVIz.amd.js → datepicker-np32OBIB.amd.js} +2 -2
- package/.chunks/{datepicker-DNOnzVIz.amd.js.map → datepicker-np32OBIB.amd.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-BYAZLdbp.es.js → dialog_selectorRegions-eupaC53Q.es.js} +3 -3
- package/.chunks/{dialog_selectorRegions-BYAZLdbp.es.js.map → dialog_selectorRegions-eupaC53Q.es.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-D1YE2mYS.amd.js → dialog_selectorRegions-vtydbe7k.amd.js} +2 -2
- package/.chunks/{dialog_selectorRegions-D1YE2mYS.amd.js.map → dialog_selectorRegions-vtydbe7k.amd.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DtLpQTwi.es.js → dialogs.vue_vue_type_script_setup_true_lang-BEjw0nsH.es.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DtLpQTwi.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-BEjw0nsH.es.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-xoE5yB6b.amd.js → dialogs.vue_vue_type_script_setup_true_lang-CKz2r_HQ.amd.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-xoE5yB6b.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-CKz2r_HQ.amd.js.map} +1 -1
- package/.chunks/{forms-Dv9L8-AZ.amd.js → forms-B4wnA2qg.amd.js} +3 -3
- package/.chunks/{forms-Dv9L8-AZ.amd.js.map → forms-B4wnA2qg.amd.js.map} +1 -1
- package/.chunks/{forms-LTK63Ugt.es.js → forms-BEOYaG5x.es.js} +6 -6
- package/.chunks/{forms-LTK63Ugt.es.js.map → forms-BEOYaG5x.es.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-UC3o5oK5.es.js → listItem.vue_vue_type_script_setup_true_lang-BzHSHzgd.es.js} +2 -2
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-UC3o5oK5.es.js.map → listItem.vue_vue_type_script_setup_true_lang-BzHSHzgd.es.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-COGiIcDO.amd.js → listItem.vue_vue_type_script_setup_true_lang-Yoht7Zz1.amd.js} +2 -2
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-COGiIcDO.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-Yoht7Zz1.amd.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-hQu5BJPe.es.js → menu.vue_vue_type_style_index_0_lang-D38vuK6Z.es.js} +2 -2
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-hQu5BJPe.es.js.map → menu.vue_vue_type_style_index_0_lang-D38vuK6Z.es.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-BFmZ4tvs.amd.js → menu.vue_vue_type_style_index_0_lang-DpQWqw0S.amd.js} +2 -2
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-BFmZ4tvs.amd.js.map → menu.vue_vue_type_style_index_0_lang-DpQWqw0S.amd.js.map} +1 -1
- package/.chunks/{notice-CYutIom0.es.js → notice-BFubg4q7.es.js} +2 -2
- package/.chunks/{notice-CYutIom0.es.js.map → notice-BFubg4q7.es.js.map} +1 -1
- package/.chunks/{notice-BoZG4Mg1.amd.js → notice-BMEqHHl7.amd.js} +2 -2
- package/.chunks/{notice-BoZG4Mg1.amd.js.map → notice-BMEqHHl7.amd.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CffDh-th.amd.js → page.vue_vue_type_script_setup_true_lang-DOfSX4G2.amd.js} +2 -2
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CffDh-th.amd.js.map → page.vue_vue_type_script_setup_true_lang-DOfSX4G2.amd.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-B2wjrf5z.es.js → page.vue_vue_type_script_setup_true_lang-DkVrf3fD.es.js} +4 -4
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-B2wjrf5z.es.js.map → page.vue_vue_type_script_setup_true_lang-DkVrf3fD.es.js.map} +1 -1
- package/.chunks/{popup-ec_xLrTA.es.js → popup-KzrqppGt.es.js} +2 -2
- package/.chunks/{popup-ec_xLrTA.es.js.map → popup-KzrqppGt.es.js.map} +1 -1
- package/.chunks/{popup-Cg9w4Vy-.amd.js → popup-RsYK2WNs.amd.js} +2 -2
- package/.chunks/{popup-Cg9w4Vy-.amd.js.map → popup-RsYK2WNs.amd.js.map} +1 -1
- package/.chunks/{utils-z5wL437D.amd.js → utils-C-3nlmxS.amd.js} +2 -2
- package/.chunks/{utils-z5wL437D.amd.js.map → utils-C-3nlmxS.amd.js.map} +1 -1
- package/.chunks/{utils-GpKurv7L.amd.js → utils-CwjZqLi4.amd.js} +2 -2
- package/.chunks/{utils-GpKurv7L.amd.js.map → utils-CwjZqLi4.amd.js.map} +1 -1
- package/.chunks/{utils-BRLYX_ZC.es.js → utils-DkTeAU_D.es.js} +3 -3
- package/.chunks/{utils-BRLYX_ZC.es.js.map → utils-DkTeAU_D.es.js.map} +1 -1
- package/.chunks/{utils-COoE8KP7.es.js → utils-Lh80NiyA.es.js} +2 -2
- package/.chunks/{utils-COoE8KP7.es.js.map → utils-Lh80NiyA.es.js.map} +1 -1
- package/assets/forms.css +1 -1
- package/assets/formsExt.css +1 -1
- package/charts/charts.amd.js +1 -1
- package/charts/charts.js +1 -1
- package/components/formsExt/navigationMenu/navigationMenu.d.ts +24 -0
- package/components/formsExt/navigationMenu/stories/items.d.ts +3 -0
- package/core/app.amd.js +1 -1
- package/core/app.js +5 -5
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.js +2 -2
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +220 -213
- package/formsExt/formsExt.js.map +1 -1
- package/layout/layout.amd.js +1 -1
- package/layout/layout.js +1 -1
- package/package.json +1 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.js +2 -2
- package/popup/worker.amd.js +1 -1
- package/popup/worker.js +2 -2
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +75 -76
- package/project/project.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.js +1 -1
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.js +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.js +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.js +3 -3
- package/utils/string.amd.js +1 -1
- package/utils/string.js +1 -1
package/project/project.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Core as Te } from "../core/app.js";
|
|
2
2
|
import { defineComponent as q, mergeModels as R, useModel as N, computed as E, createElementBlock as B, openBlock as k, createBlock as b, unref as y, withCtx as _, Fragment as W, renderList as ie, normalizeClass as Q, createElementVNode as ye, toDisplayString as M, createVNode as L, createTextVNode as z, ref as D, watch as K, createCommentVNode as F, withModifiers as j, mergeProps as pe, withKeys as de, nextTick as be, resolveDirective as Be, withDirectives as Ve, resolveDynamicComponent as Ee, renderSlot as Me, shallowRef as $e, createSlots as Ke, reactive as we, toValue as ue, isRef as ce } from "vue";
|
|
3
|
-
import { u as A, C as J, _ as Y, x as re, d as Le } from "../.chunks/forms-
|
|
4
|
-
import { _ as he, a as se, b as Ae } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as Oe } from "../.chunks/menu.vue_vue_type_style_index_0_lang-
|
|
6
|
-
import { u as Re } from "../.chunks/utils-
|
|
3
|
+
import { u as A, C as J, _ as Y, x as re, d as Le } from "../.chunks/forms-BEOYaG5x.es.js";
|
|
4
|
+
import { _ as he, a as se, b as Ae } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-BzHSHzgd.es.js";
|
|
5
|
+
import { _ as Oe } from "../.chunks/menu.vue_vue_type_style_index_0_lang-D38vuK6Z.es.js";
|
|
6
|
+
import { u as Re } from "../.chunks/utils-Lh80NiyA.es.js";
|
|
7
7
|
import { getSearcherGIcon as Ne, getLangLabel as De, getDeviceGIcon as Fe } from "../utils/searchers.js";
|
|
8
8
|
import { storage as G } from "../utils/dom.js";
|
|
9
9
|
import { TopPopupWorker as qe } from "../popup/worker.js";
|
|
@@ -43,8 +43,8 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
43
43
|
var n;
|
|
44
44
|
return [
|
|
45
45
|
z(M((n = i.items.find((d) => {
|
|
46
|
-
var
|
|
47
|
-
return d.value === ((
|
|
46
|
+
var m;
|
|
47
|
+
return d.value === ((m = o.value) == null ? void 0 : m[0]);
|
|
48
48
|
})) == null ? void 0 : n.content), 1)
|
|
49
49
|
];
|
|
50
50
|
}),
|
|
@@ -53,10 +53,10 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
53
53
|
]),
|
|
54
54
|
contentList: _(() => [
|
|
55
55
|
(k(!0), B(W, null, ie(i.items, (n, d) => {
|
|
56
|
-
var
|
|
56
|
+
var m;
|
|
57
57
|
return k(), b(se, {
|
|
58
58
|
class: Q({
|
|
59
|
-
"top-active": (
|
|
59
|
+
"top-active": (m = o.value) == null ? void 0 : m.includes(n.value)
|
|
60
60
|
}),
|
|
61
61
|
"data-top-icon": n.icon,
|
|
62
62
|
title: n.title,
|
|
@@ -110,7 +110,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
110
110
|
name: "Autoselect",
|
|
111
111
|
regions: [te],
|
|
112
112
|
regionByIndex: /* @__PURE__ */ new Map([[x, te]])
|
|
113
|
-
},
|
|
113
|
+
}, ge = {
|
|
114
114
|
countryCode: "00",
|
|
115
115
|
depth: 1,
|
|
116
116
|
device: 0,
|
|
@@ -118,7 +118,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
118
118
|
index: -1,
|
|
119
119
|
lang: "ru",
|
|
120
120
|
name: "Without region"
|
|
121
|
-
}, ze = () => (te.name = A().Common.Autoselect, te), Ge = () => (ze(), oe.name = A().Common.Autoselect, console.log(oe), oe), We = () => (
|
|
121
|
+
}, ze = () => (te.name = A().Common.Autoselect, te), Ge = () => (ze(), oe.name = A().Common.Autoselect, console.log(oe), oe), We = () => (ge.name = A().Keywords.Without_region, ge), Ie = (t = !1, l = !1, o = []) => {
|
|
122
122
|
let e;
|
|
123
123
|
return t ? e = Ye(o) : e = xe(o), l && e.set(x, Ge()), e.size || e.set(x, Se), e;
|
|
124
124
|
}, xe = (t, l = !0, o = [], e = !1) => {
|
|
@@ -128,9 +128,8 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
128
128
|
const n = { ...a };
|
|
129
129
|
n.regionByIndex = /* @__PURE__ */ new Map(), a.regions && a.regions.forEach((d) => {
|
|
130
130
|
if (l && !d.enabled) return;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
n.regionByIndex.set(g.index, g);
|
|
131
|
+
const m = { ...d };
|
|
132
|
+
n.regionByIndex.set(m.index, m);
|
|
134
133
|
}), !n.regionByIndex.size && !o.length && n.regionByIndex.set(ee.index, ee), typeof n.key == "number" && i.set(n.key, n);
|
|
135
134
|
}), o.forEach((a) => {
|
|
136
135
|
if (i.has(a)) return;
|
|
@@ -163,7 +162,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
163
162
|
}), i))
|
|
164
163
|
return !1;
|
|
165
164
|
}), i;
|
|
166
|
-
}, Qe = Re(() => import("../.chunks/dialog_selectorRegions-
|
|
165
|
+
}, Qe = Re(() => import("../.chunks/dialog_selectorRegions-eupaC53Q.es.js")), Xe = (t, l) => {
|
|
167
166
|
const o = A(), e = D(l.value.keys().next().value ?? x), i = E(() => {
|
|
168
167
|
const a = /* @__PURE__ */ new Map();
|
|
169
168
|
if (l.value.forEach((n) => {
|
|
@@ -197,7 +196,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
197
196
|
t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value === x && (t.forFrequency ? e.value = ((n = (a = l.value) == null ? void 0 : a.regionByIndex.values().next().value) == null ? void 0 : n.key) ?? x : e.value = ((d = l.value) == null ? void 0 : d.regionByIndex.keys().next().value) ?? x);
|
|
198
197
|
const i = E(() => {
|
|
199
198
|
var p;
|
|
200
|
-
const
|
|
199
|
+
const m = /* @__PURE__ */ new Map();
|
|
201
200
|
return (p = l.value.regionByIndex) == null || p.forEach((h) => {
|
|
202
201
|
let r = h.name;
|
|
203
202
|
if (t.forFrequency) {
|
|
@@ -205,31 +204,31 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
205
204
|
value: h.key,
|
|
206
205
|
title: r
|
|
207
206
|
};
|
|
208
|
-
|
|
207
|
+
m.has(h.key) || m.set(h.key, I);
|
|
209
208
|
return;
|
|
210
209
|
}
|
|
211
210
|
h.device && (r += " (" + o.Common["Device_" + h.device] + ")");
|
|
212
|
-
const
|
|
213
|
-
|
|
211
|
+
const g = De(l.value.key || 0, h.lang ?? "");
|
|
212
|
+
g && (r += " / " + g);
|
|
214
213
|
const u = {
|
|
215
214
|
value: h.index,
|
|
216
215
|
title: r,
|
|
217
216
|
icon: h.device ? Fe(h.device) : void 0
|
|
218
217
|
};
|
|
219
|
-
|
|
220
|
-
}),
|
|
218
|
+
m.set(h.index, u);
|
|
219
|
+
}), m;
|
|
221
220
|
});
|
|
222
|
-
return K(i, (
|
|
221
|
+
return K(i, (m, p) => {
|
|
223
222
|
var u;
|
|
224
|
-
if (t.onlySearcher || e.value !== void 0 &&
|
|
223
|
+
if (t.onlySearcher || e.value !== void 0 && m.get(e.value))
|
|
225
224
|
return;
|
|
226
|
-
let h =
|
|
225
|
+
let h = m.keys().next().value;
|
|
227
226
|
if (e.value === x || h === x) {
|
|
228
227
|
e.value = h;
|
|
229
228
|
return;
|
|
230
229
|
}
|
|
231
|
-
let r = ((u = p == null ? void 0 : p.get(e.value)) == null ? void 0 : u.title) || "",
|
|
232
|
-
for (const [I, T] of
|
|
230
|
+
let r = ((u = p == null ? void 0 : p.get(e.value)) == null ? void 0 : u.title) || "", g = -1;
|
|
231
|
+
for (const [I, T] of m.entries()) {
|
|
233
232
|
const C = T.title;
|
|
234
233
|
if (typeof C != "string" || typeof I == "string")
|
|
235
234
|
break;
|
|
@@ -239,7 +238,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
239
238
|
}
|
|
240
239
|
const V = new RegExp(` \\((${o.Common.Device_1}|${o.Common.Device_2})\\)`);
|
|
241
240
|
let f = r, s = 3;
|
|
242
|
-
C.indexOf(f) === -1 && (f = r.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(f) === -1 && (f = r.replace(/ \/.*/, ""), s--), C.indexOf(f) === -1 && (f = r.replace(/ \/.*/, ""), f = f.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(f) !== -1 && (s <=
|
|
241
|
+
C.indexOf(f) === -1 && (f = r.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(f) === -1 && (f = r.replace(/ \/.*/, ""), s--), C.indexOf(f) === -1 && (f = r.replace(/ \/.*/, ""), f = f.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(f) !== -1 && (s <= g || (g = s, h = I));
|
|
243
242
|
}
|
|
244
243
|
e.value = h;
|
|
245
244
|
}), {
|
|
@@ -274,14 +273,14 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
274
273
|
}, tt = (t) => {
|
|
275
274
|
const l = E(() => Ie(t.forFrequency, t.autoRegion, t.searchers)), o = E(() => l.value.get(i.searcherKey.value) || Se), e = E(() => {
|
|
276
275
|
const r = /* @__PURE__ */ new Set();
|
|
277
|
-
return l.value.forEach((
|
|
278
|
-
|
|
276
|
+
return l.value.forEach((g) => {
|
|
277
|
+
g.regionByIndex.forEach((u) => {
|
|
279
278
|
u.index !== -1 && u.index !== x && r.add(u.index);
|
|
280
279
|
});
|
|
281
280
|
}), r;
|
|
282
281
|
}), i = Xe(t, l), a = Ze(t, o), n = et(t, l, e);
|
|
283
282
|
K(l, () => {
|
|
284
|
-
var
|
|
283
|
+
var g, u, I, T;
|
|
285
284
|
if (t.onlySearcher ? n.regionsIndexes.value = Array.from(l.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((C) => e.value.has(C)), i.searcherKey.value === -1) return;
|
|
286
285
|
let r = l.value.keys().next().value;
|
|
287
286
|
l.value.forEach((C) => {
|
|
@@ -296,16 +295,16 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
296
295
|
const v = (s = l.value.get(C.key)) == null ? void 0 : s.regionByIndex;
|
|
297
296
|
c != null && c.has(x) && !(v != null && v.has(x)) && (r = C.key);
|
|
298
297
|
}
|
|
299
|
-
}), r !== void 0 && (i.searcherKey.value = r), a.regionIndex.value !== void 0 && !((u = (
|
|
298
|
+
}), r !== void 0 && (i.searcherKey.value = r), a.regionIndex.value !== void 0 && !((u = (g = o.value) == null ? void 0 : g.regionByIndex) != null && u.has(a.regionIndex.value)) && (a.regionIndex.value = (T = (I = o.value) == null ? void 0 : I.regions) == null ? void 0 : T.keys().next().value);
|
|
300
299
|
}, { immediate: !0 });
|
|
301
300
|
const d = () => {
|
|
302
301
|
if (!(i.searcherKey.value === -1 || i.searcherKey.value === x))
|
|
303
302
|
return i.searcherKey.value;
|
|
304
|
-
},
|
|
303
|
+
}, m = () => {
|
|
305
304
|
if (t.onlySearcher || a.regionIndex.value === x) return;
|
|
306
305
|
let r = a.regionIndex.value;
|
|
307
306
|
if (t.forFrequency) {
|
|
308
|
-
const
|
|
307
|
+
const g = a.regionIndex.value, u = He(t.forFrequency, { searcher_key: d(), key: g }, t.searchers);
|
|
309
308
|
r = u == null ? void 0 : u.index;
|
|
310
309
|
}
|
|
311
310
|
return r;
|
|
@@ -322,10 +321,10 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
322
321
|
allRegionsIndexes: e,
|
|
323
322
|
getSearcher: p,
|
|
324
323
|
getRegion: () => {
|
|
325
|
-
var
|
|
326
|
-
const r =
|
|
324
|
+
var g, u;
|
|
325
|
+
const r = m();
|
|
327
326
|
if (r !== void 0)
|
|
328
|
-
return (u = (
|
|
327
|
+
return (u = (g = p()) == null ? void 0 : g.regionByIndex) == null ? void 0 : u.get(r);
|
|
329
328
|
}
|
|
330
329
|
};
|
|
331
330
|
}, at = /* @__PURE__ */ q({
|
|
@@ -354,13 +353,13 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
354
353
|
selectSearcher: a,
|
|
355
354
|
selectRegion: n,
|
|
356
355
|
compare: d,
|
|
357
|
-
searcherByKey:
|
|
356
|
+
searcherByKey: m,
|
|
358
357
|
allRegionsIndexes: p,
|
|
359
358
|
getSearcher: h,
|
|
360
359
|
getRegion: r
|
|
361
|
-
} = tt(o),
|
|
360
|
+
} = tt(o), g = () => {
|
|
362
361
|
const u = [];
|
|
363
|
-
|
|
362
|
+
m.value.forEach((I) => {
|
|
364
363
|
I.enabled && I.regions.forEach((T) => {
|
|
365
364
|
T.enabled && u.push(T);
|
|
366
365
|
});
|
|
@@ -383,8 +382,8 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
383
382
|
}, { immediate: !0 }), K(e, () => {
|
|
384
383
|
var u, I, T, C, V;
|
|
385
384
|
if (e.value[0] && (i.value = e.value[0]), o.onlySearcher) {
|
|
386
|
-
if (!e.value.length || e.value.length === 1 && !
|
|
387
|
-
let f =
|
|
385
|
+
if (!e.value.length || e.value.length === 1 && !m.value.has(e.value[0])) {
|
|
386
|
+
let f = m.value.keys().next().value;
|
|
388
387
|
f !== void 0 && (e.value = [f]);
|
|
389
388
|
return;
|
|
390
389
|
}
|
|
@@ -393,12 +392,12 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
393
392
|
return;
|
|
394
393
|
}
|
|
395
394
|
} else {
|
|
396
|
-
let f = [...new Set(e.value)], s = (I = (u =
|
|
397
|
-
if (o.forFrequency && (s = (V = (C = (T =
|
|
395
|
+
let f = [...new Set(e.value)], s = (I = (u = m.value.values().next().value) == null ? void 0 : u.regionByIndex) == null ? void 0 : I.keys().next().value;
|
|
396
|
+
if (o.forFrequency && (s = (V = (C = (T = m.value.values().next().value) == null ? void 0 : T.regionByIndex) == null ? void 0 : C.values().next().value) == null ? void 0 : V.key), !f.length)
|
|
398
397
|
s !== void 0 && f.push(s);
|
|
399
398
|
else if (f.length === 1) {
|
|
400
399
|
let c = p.value;
|
|
401
|
-
o.forFrequency && (c = /* @__PURE__ */ new Set(),
|
|
400
|
+
o.forFrequency && (c = /* @__PURE__ */ new Set(), m.value.forEach((v) => {
|
|
402
401
|
v.regionByIndex.forEach((S) => {
|
|
403
402
|
S.index !== -1 && S.index !== x && c.add(S.key);
|
|
404
403
|
});
|
|
@@ -421,7 +420,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
421
420
|
} else if (e.value.length === 1 && a.searcherKey.value !== -1) {
|
|
422
421
|
n.regionIndex.value = e.value[0];
|
|
423
422
|
let f;
|
|
424
|
-
for (const s of
|
|
423
|
+
for (const s of m.value.values()) {
|
|
425
424
|
for (const c of s.regionByIndex.values())
|
|
426
425
|
if ((o.forFrequency ? c.key : c.index) === n.regionIndex.value) {
|
|
427
426
|
f = s.key;
|
|
@@ -462,7 +461,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
462
461
|
u.addCompare && !u.onlySearcher && y(a).searcherKey.value === -1 ? (k(), b(Y, {
|
|
463
462
|
key: 1,
|
|
464
463
|
name: "compare",
|
|
465
|
-
onClick:
|
|
464
|
+
onClick: g,
|
|
466
465
|
"data-count-compare-regions-indexes": y(d).regionsIndexes.value.length
|
|
467
466
|
}, {
|
|
468
467
|
default: _(() => [
|
|
@@ -523,7 +522,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
523
522
|
name: "Turquoise",
|
|
524
523
|
color_id: "10"
|
|
525
524
|
}
|
|
526
|
-
],
|
|
525
|
+
], me = (t) => "-" + t, H = (t) => t[0] === "-" ? t.substring(1) : t, ae = (t, l) => {
|
|
527
526
|
t = H(t);
|
|
528
527
|
const o = l.find((e) => e.id === t);
|
|
529
528
|
if (o)
|
|
@@ -568,39 +567,39 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
568
567
|
setup(t, { emit: l }) {
|
|
569
568
|
const o = t, e = l, i = N(t, "name"), a = D(null), n = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
|
|
570
569
|
contenteditable: d.value,
|
|
571
|
-
onpaste: (
|
|
572
|
-
} : {}), d = D(!1),
|
|
573
|
-
var
|
|
574
|
-
d.value = !0, await be(), (
|
|
570
|
+
onpaste: (g) => g.preventDefault()
|
|
571
|
+
} : {}), d = D(!1), m = async () => {
|
|
572
|
+
var g;
|
|
573
|
+
d.value = !0, await be(), (g = a.value) == null || g.focus();
|
|
575
574
|
}, p = () => {
|
|
576
575
|
var u;
|
|
577
|
-
const
|
|
578
|
-
if (!
|
|
579
|
-
a.value && (a.value.innerText =
|
|
576
|
+
const g = (u = a.value) == null ? void 0 : u.innerText;
|
|
577
|
+
if (!g) return h();
|
|
578
|
+
a.value && (a.value.innerText = g), d.value = !1, e("update:name", g);
|
|
580
579
|
}, h = async () => {
|
|
581
580
|
a.value && (a.value.innerText = o.name), d.value = !1;
|
|
582
|
-
}, r = (
|
|
581
|
+
}, r = (g) => {
|
|
583
582
|
if (d.value || o.disabled) return;
|
|
584
583
|
let u = "selected";
|
|
585
|
-
o.canExclude && (
|
|
584
|
+
o.canExclude && (g.ctrlKey || g.metaKey) && (u = "excluded"), o.state == u && (u = ""), u === "" && e("unselect"), u === "selected" && e("select"), u === "excluded" && e("exclude");
|
|
586
585
|
};
|
|
587
|
-
return (
|
|
586
|
+
return (g, u) => (k(), b(se, {
|
|
588
587
|
class: Q({
|
|
589
588
|
"top-tagSelector_tagListItem": !0,
|
|
590
589
|
"top-tagSelector_tagListItem-inEdit": d.value,
|
|
591
|
-
"top-tagSelector_tagListItem-disabled":
|
|
592
|
-
"top-tagSelector_tagListItem-canExclude":
|
|
593
|
-
"top-tagSelector-active": !!
|
|
594
|
-
"top-tagSelector-excluded":
|
|
590
|
+
"top-tagSelector_tagListItem-disabled": g.disabled,
|
|
591
|
+
"top-tagSelector_tagListItem-canExclude": g.canExclude,
|
|
592
|
+
"top-tagSelector-active": !!g.state,
|
|
593
|
+
"top-tagSelector-excluded": g.state === "excluded"
|
|
595
594
|
}),
|
|
596
595
|
onClick: j(r, ["stop"])
|
|
597
596
|
}, {
|
|
598
597
|
default: _(() => [
|
|
599
598
|
L(le, {
|
|
600
|
-
id:
|
|
599
|
+
id: g.id,
|
|
601
600
|
name: i.value,
|
|
602
|
-
colorId:
|
|
603
|
-
state:
|
|
601
|
+
colorId: g.colorId,
|
|
602
|
+
state: g.state
|
|
604
603
|
}, null, 8, ["id", "name", "colorId", "state"]),
|
|
605
604
|
ye("span", pe({
|
|
606
605
|
ref_key: "elName",
|
|
@@ -613,7 +612,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
613
612
|
de(j(h, ["stop"]), ["esc"])
|
|
614
613
|
]
|
|
615
614
|
}), M(i.value), 17, ot),
|
|
616
|
-
|
|
615
|
+
g.editable ? (k(), B(W, { key: 0 }, [
|
|
617
616
|
d.value ? (k(), B("span", {
|
|
618
617
|
key: 1,
|
|
619
618
|
"data-top-icon": "",
|
|
@@ -623,7 +622,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
623
622
|
key: 0,
|
|
624
623
|
"data-top-icon": "",
|
|
625
624
|
class: "top-tagSelector_edit",
|
|
626
|
-
onClick:
|
|
625
|
+
onClick: m
|
|
627
626
|
}))
|
|
628
627
|
], 64)) : F("", !0)
|
|
629
628
|
]),
|
|
@@ -658,7 +657,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
658
657
|
payload: l.payload
|
|
659
658
|
};
|
|
660
659
|
return (n, d) => {
|
|
661
|
-
const
|
|
660
|
+
const m = Be("top-data");
|
|
662
661
|
return k(), b(Ae, { id: n.id }, {
|
|
663
662
|
default: _(() => [
|
|
664
663
|
Ve((k(), b(Ee(y(e)), pe({
|
|
@@ -695,7 +694,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
695
694
|
]),
|
|
696
695
|
_: 2
|
|
697
696
|
}, 1040, ["class"])), [
|
|
698
|
-
[
|
|
697
|
+
[m, a, "topTagSelectorTarget"]
|
|
699
698
|
])
|
|
700
699
|
]),
|
|
701
700
|
_: 3
|
|
@@ -730,7 +729,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
730
729
|
n(s, c);
|
|
731
730
|
}, e.emitDelay);
|
|
732
731
|
e.singleMode && !i.value.length && (i.value = [a.value[0].id]);
|
|
733
|
-
const
|
|
732
|
+
const m = e.id ?? "top-popup-id-" + Math.random(), p = D("add"), h = () => {
|
|
734
733
|
var v;
|
|
735
734
|
const s = " " + ((v = o.Common.Tags) == null ? void 0 : v.toLowerCase()), c = /* @__PURE__ */ new Map();
|
|
736
735
|
return c.set("add", { value: "add", title: o.Common.Add + s }), c.set("replace", { value: "replace", title: o.Common.Replace + s }), c.set("delete", { value: "delete", title: o.Common.Delete + s }), c;
|
|
@@ -745,17 +744,17 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
745
744
|
K(i, () => {
|
|
746
745
|
d("selector", i.value);
|
|
747
746
|
});
|
|
748
|
-
const
|
|
747
|
+
const g = E(() => {
|
|
749
748
|
if (r.value.mode === "setter" && e.maxTagsForSetter && !r.value.filters)
|
|
750
749
|
return r.value.model.value.length >= e.maxTagsForSetter;
|
|
751
750
|
}), u = (s) => {
|
|
752
751
|
if (s !== "all") {
|
|
753
752
|
if (r.value.model.value.includes(s)) return "selected";
|
|
754
|
-
if (r.value.model.value.includes(
|
|
753
|
+
if (r.value.model.value.includes(me(s))) return "excluded";
|
|
755
754
|
}
|
|
756
755
|
return s === "all" && !r.value.model.value.length ? "selected" : "";
|
|
757
756
|
}, I = (s, c) => {
|
|
758
|
-
const v =
|
|
757
|
+
const v = me(s);
|
|
759
758
|
let S = r.value.model.value.filter((w) => w !== s && w !== v);
|
|
760
759
|
c === "select" && S.push(s), c === "exclude" && S.push(v), r.value.mode === "setter" && r.value.targetId !== void 0 && e.requiredForSetter && (S.length || S.push("1"), S.length === 2 && r.value.model.value.length === 1 && r.value.model.value[0] === "1" && (S = S.filter((w) => w !== "1"))), e.singleMode && !r.value.filters && (S.length || (S = r.value.model.value), S.length > 1 && (S = [S[S.length - 1]])), S.sort((w, P) => {
|
|
761
760
|
if (!e.tags) return 0;
|
|
@@ -814,13 +813,13 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
814
813
|
class: "top-select_arrow",
|
|
815
814
|
modelValue: i.value,
|
|
816
815
|
"onUpdate:modelValue": c[0] || (c[0] = (v) => i.value = v),
|
|
817
|
-
id: y(
|
|
816
|
+
id: y(m),
|
|
818
817
|
tags: a.value,
|
|
819
818
|
mode: "filter",
|
|
820
819
|
useTopButton: ""
|
|
821
820
|
}, null, 8, ["modelValue", "id", "tags"]),
|
|
822
821
|
L(he, {
|
|
823
|
-
id: y(
|
|
822
|
+
id: y(m),
|
|
824
823
|
class: Q(T.value),
|
|
825
824
|
onOpen: c[4] || (c[4] = (v) => V(v)),
|
|
826
825
|
onClose: c[5] || (c[5] = (v) => f(v)),
|
|
@@ -843,7 +842,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
843
842
|
state: u(v.id),
|
|
844
843
|
canExclude: y(r).mode === "filter" && !s.singleMode,
|
|
845
844
|
editable: s.tagsEditable,
|
|
846
|
-
disabled:
|
|
845
|
+
disabled: g.value && u(v.id) === "",
|
|
847
846
|
onUnselect: (S) => I(v.id, "unselect"),
|
|
848
847
|
onSelect: (S) => I(v.id, "select"),
|
|
849
848
|
onExclude: (S) => I(v.id, "exclude"),
|
|
@@ -948,11 +947,11 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
948
947
|
t.append(a);
|
|
949
948
|
}
|
|
950
949
|
e.forEach((a) => {
|
|
951
|
-
var d,
|
|
950
|
+
var d, m;
|
|
952
951
|
const n = ve({
|
|
953
952
|
id: H(a),
|
|
954
953
|
colorId: ((d = ae(a, l.tags)) == null ? void 0 : d.color_id) ?? "",
|
|
955
|
-
name: ((
|
|
954
|
+
name: ((m = ae(a, l.tags)) == null ? void 0 : m.name) ?? "",
|
|
956
955
|
state: H(a) === a ? "selected" : "excluded"
|
|
957
956
|
});
|
|
958
957
|
t.append(n);
|