@topvisor/ui 1.5.10-hotkeys.4 → 1.5.10-hotkeys.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/.chunks/{app-BpyVfZtN.es.amd.js → app-qGtdp_Vh.es.amd.js} +2 -2
  2. package/.chunks/app-qGtdp_Vh.es.amd.js.map +1 -0
  3. package/.chunks/{app-BpyVfZtN.es.js → app-qGtdp_Vh.es.js} +12 -6
  4. package/.chunks/app-qGtdp_Vh.es.js.map +1 -0
  5. package/.chunks/{datepicker-CpnGeB5y.es.amd.js → datepicker-MlbIM78m.es.amd.js} +2 -2
  6. package/.chunks/{datepicker-CpnGeB5y.es.amd.js.map → datepicker-MlbIM78m.es.amd.js.map} +1 -1
  7. package/.chunks/{datepicker-CpnGeB5y.es.js → datepicker-MlbIM78m.es.js} +2 -2
  8. package/.chunks/{datepicker-CpnGeB5y.es.js.map → datepicker-MlbIM78m.es.js.map} +1 -1
  9. package/.chunks/dialog-C_1nmPXN.es.amd.js +2 -0
  10. package/.chunks/dialog-C_1nmPXN.es.amd.js.map +1 -0
  11. package/.chunks/{dialog-DZLTpHen.es.js → dialog-C_1nmPXN.es.js} +45 -30
  12. package/.chunks/dialog-C_1nmPXN.es.js.map +1 -0
  13. package/.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.amd.js +2 -0
  14. package/.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.amd.js.map +1 -0
  15. package/.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.js +165 -0
  16. package/.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.js.map +1 -0
  17. package/.chunks/forms-dosApNxi.es.amd.js +2 -0
  18. package/.chunks/forms-dosApNxi.es.amd.js.map +1 -0
  19. package/.chunks/{forms-CjJD60m3.es.js → forms-dosApNxi.es.js} +138 -133
  20. package/.chunks/forms-dosApNxi.es.js.map +1 -0
  21. package/.chunks/formsExt-D7XsRleI.es.amd.js +2 -0
  22. package/.chunks/formsExt-D7XsRleI.es.amd.js.map +1 -0
  23. package/.chunks/{formsExt-CbccziSy.es.js → formsExt-D7XsRleI.es.js} +13 -17
  24. package/.chunks/formsExt-D7XsRleI.es.js.map +1 -0
  25. package/.chunks/{notice-BSVUBQ4B.es.amd.js → notice-8nwvAJQm.es.amd.js} +2 -2
  26. package/.chunks/{notice-BSVUBQ4B.es.amd.js.map → notice-8nwvAJQm.es.amd.js.map} +1 -1
  27. package/.chunks/{notice-BSVUBQ4B.es.js → notice-8nwvAJQm.es.js} +2 -2
  28. package/.chunks/{notice-BSVUBQ4B.es.js.map → notice-8nwvAJQm.es.js.map} +1 -1
  29. package/.chunks/{popup-BoCCkzOM.es.amd.js → popup-Bn5Wm8WI.es.amd.js} +2 -2
  30. package/.chunks/{popup-BoCCkzOM.es.amd.js.map → popup-Bn5Wm8WI.es.amd.js.map} +1 -1
  31. package/.chunks/{popup-BoCCkzOM.es.js → popup-Bn5Wm8WI.es.js} +3 -3
  32. package/.chunks/{popup-BoCCkzOM.es.js.map → popup-Bn5Wm8WI.es.js.map} +1 -1
  33. package/.chunks/{popup-q1PRZblX.es.amd.js → popup-cAqd6Dj3.es.amd.js} +2 -2
  34. package/.chunks/{popup-q1PRZblX.es.amd.js.map → popup-cAqd6Dj3.es.amd.js.map} +1 -1
  35. package/.chunks/{popup-q1PRZblX.es.js → popup-cAqd6Dj3.es.js} +3 -3
  36. package/.chunks/{popup-q1PRZblX.es.js.map → popup-cAqd6Dj3.es.js.map} +1 -1
  37. package/.chunks/{utils-B8-plt84.es.amd.js → utils-D46Z7je_.es.amd.js} +2 -2
  38. package/.chunks/{utils-B8-plt84.es.amd.js.map → utils-D46Z7je_.es.amd.js.map} +1 -1
  39. package/.chunks/{utils-B8-plt84.es.js → utils-D46Z7je_.es.js} +4 -4
  40. package/.chunks/{utils-B8-plt84.es.js.map → utils-D46Z7je_.es.js.map} +1 -1
  41. package/.chunks/utils-mBJcBhkk.es.amd.js +2 -0
  42. package/.chunks/utils-mBJcBhkk.es.amd.js.map +1 -0
  43. package/.chunks/{utils-CUvjkXu8.es.js → utils-mBJcBhkk.es.js} +3 -4
  44. package/.chunks/utils-mBJcBhkk.es.js.map +1 -0
  45. package/.chunks/worker-BfCrg4RI.es.amd.js +2 -0
  46. package/.chunks/worker-BfCrg4RI.es.amd.js.map +1 -0
  47. package/.chunks/{worker-F-Y1IEi2.es.js → worker-BfCrg4RI.es.js} +4 -4
  48. package/.chunks/worker-BfCrg4RI.es.js.map +1 -0
  49. package/assets/forms.css +1 -1
  50. package/assets/formsExt.css +1 -1
  51. package/autoload-css-manifest.amd.json +4 -4
  52. package/autoload-css-manifest.json +4 -4
  53. package/charts/charts.amd.js +1 -1
  54. package/charts/charts.amd.js.map +1 -1
  55. package/charts/charts.js +1 -1
  56. package/core/app.amd.js +1 -1
  57. package/core/app.amd.js.map +1 -1
  58. package/core/app.js +3 -3
  59. package/dialog/dialog.amd.js +1 -1
  60. package/dialog/dialog.amd.js.map +1 -1
  61. package/dialog/dialog.js +2 -2
  62. package/forms/forms.amd.js +1 -1
  63. package/forms/forms.amd.js.map +1 -1
  64. package/forms/forms.js +1 -1
  65. package/formsExt/formsExt.amd.js +1 -1
  66. package/formsExt/formsExt.amd.js.map +1 -1
  67. package/formsExt/formsExt.js +1 -1
  68. package/icomoon/Topvisor icons.json +284 -261
  69. package/icomoon/demo.html +15 -1
  70. package/icomoon/fonts/Topvisor-2.eot +0 -0
  71. package/icomoon/fonts/Topvisor-2.svg +3 -1
  72. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  73. package/icomoon/fonts/Topvisor-2.woff +0 -0
  74. package/icomoon/selection.json +1 -1
  75. package/icomoon/style.css +8 -5
  76. package/layout/layout.amd.js +1 -1
  77. package/layout/layout.amd.js.map +1 -1
  78. package/layout/layout.js +1 -1
  79. package/package.json +1 -1
  80. package/popup/popup.amd.js +1 -1
  81. package/popup/popup.amd.js.map +1 -1
  82. package/popup/popup.js +1 -1
  83. package/popup/worker.amd.js +1 -1
  84. package/popup/worker.amd.js.map +1 -1
  85. package/popup/worker.js +1 -1
  86. package/project/project.amd.js +1 -1
  87. package/project/project.amd.js.map +1 -1
  88. package/project/project.js +397 -381
  89. package/project/project.js.map +1 -1
  90. package/schedule/schedule.amd.js +1 -1
  91. package/schedule/schedule.amd.js.map +1 -1
  92. package/schedule/schedule.js +2 -2
  93. package/src/components/dialog/dialog/page/types.d.ts +10 -0
  94. package/src/components/formsExt/selector2/composables/useAPI.d.ts +1 -199
  95. package/src/components/project/projectSelector/cache.d.ts +2 -2
  96. package/src/components/project/projectSelector/utils.d.ts +13 -7
  97. package/src/components/project/regionSelector/dialog_regionSelectorRegions/types.d.ts +2 -4
  98. package/src/core/core/core.d.ts +17 -0
  99. package/src/core/core/options.d.ts +4 -0
  100. package/src/core/plugins/core.d.ts +1 -1
  101. package/src/core/utils/searchers.d.ts +15 -0
  102. package/src/core/utils/string.d.ts +7 -2
  103. package/tabsView/tabsView.amd.js +1 -1
  104. package/tabsView/tabsView.amd.js.map +1 -1
  105. package/tabsView/tabsView.js +2 -2
  106. package/utils/clipboard.amd.js +1 -1
  107. package/utils/clipboard.amd.js.map +1 -1
  108. package/utils/clipboard.js +1 -1
  109. package/utils/date.amd.js +1 -1
  110. package/utils/date.amd.js.map +1 -1
  111. package/utils/date.js +1 -1
  112. package/utils/device.amd.js +1 -1
  113. package/utils/device.amd.js.map +1 -1
  114. package/utils/device.js +1 -1
  115. package/utils/lodash.amd.js +1 -1
  116. package/utils/lodash.amd.js.map +1 -1
  117. package/utils/lodash.js +1 -1
  118. package/utils/price.amd.js +1 -1
  119. package/utils/price.amd.js.map +1 -1
  120. package/utils/price.js +1 -1
  121. package/utils/searchers.amd.js +1 -1
  122. package/utils/searchers.amd.js.map +1 -1
  123. package/utils/searchers.js +24 -7
  124. package/utils/searchers.js.map +1 -1
  125. package/utils/string.amd.js +2 -1
  126. package/utils/string.amd.js.map +1 -1
  127. package/utils/string.js +9 -2
  128. package/utils/string.js.map +1 -1
  129. package/.chunks/app-BpyVfZtN.es.amd.js.map +0 -1
  130. package/.chunks/app-BpyVfZtN.es.js.map +0 -1
  131. package/.chunks/dialog-DZLTpHen.es.amd.js +0 -2
  132. package/.chunks/dialog-DZLTpHen.es.amd.js.map +0 -1
  133. package/.chunks/dialog-DZLTpHen.es.js.map +0 -1
  134. package/.chunks/dialog_regionSelectorRegions-Nob9K60s.es.amd.js +0 -2
  135. package/.chunks/dialog_regionSelectorRegions-Nob9K60s.es.amd.js.map +0 -1
  136. package/.chunks/dialog_regionSelectorRegions-Nob9K60s.es.js +0 -169
  137. package/.chunks/dialog_regionSelectorRegions-Nob9K60s.es.js.map +0 -1
  138. package/.chunks/forms-CjJD60m3.es.amd.js +0 -2
  139. package/.chunks/forms-CjJD60m3.es.amd.js.map +0 -1
  140. package/.chunks/forms-CjJD60m3.es.js.map +0 -1
  141. package/.chunks/formsExt-CbccziSy.es.amd.js +0 -2
  142. package/.chunks/formsExt-CbccziSy.es.amd.js.map +0 -1
  143. package/.chunks/formsExt-CbccziSy.es.js.map +0 -1
  144. package/.chunks/utils-CUvjkXu8.es.amd.js +0 -2
  145. package/.chunks/utils-CUvjkXu8.es.amd.js.map +0 -1
  146. package/.chunks/utils-CUvjkXu8.es.js.map +0 -1
  147. package/.chunks/worker-F-Y1IEi2.es.amd.js +0 -2
  148. package/.chunks/worker-F-Y1IEi2.es.amd.js.map +0 -1
  149. package/.chunks/worker-F-Y1IEi2.es.js.map +0 -1
  150. package/src/components/dialog/dialog/stories/dialog_example/pages/utils.d.ts +0 -7
  151. package/src/components/project/groupSelector/stories/mocks/folders.d.ts +0 -4
  152. package/src/components/project/groupSelector/stories/mocks/groups.d.ts +0 -6
  153. package/src/components/project/groupSelector/stories/mocks/index.d.ts +0 -8
  154. package/src/components/project/groupSelector/stories/play/apiEditorMulti.d.ts +0 -2
  155. package/src/components/project/projectSelector/stories/mocks/index.d.ts +0 -5
  156. package/src/components/project/projectSelector/stories/mocks/projects.d.ts +0 -3
  157. package/src/components/schedule/schedule/stories/play/play.d.ts +0 -5
@@ -6,22 +6,22 @@
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, n as o } from "../.chunks/forms-CjJD60m3.es.js";
9
+ import { E as n, O as r, P as i, h as a, n as o } from "../.chunks/forms-dosApNxi.es.js";
10
10
  import { storage as s } from "../utils/dom.js";
11
- import { t as c } from "../.chunks/worker-F-Y1IEi2.es.js";
12
- import "../.chunks/app-BpyVfZtN.es.js";
13
- import { t as l } from "../.chunks/utils-CUvjkXu8.es.js";
11
+ import { t as c } from "../.chunks/worker-BfCrg4RI.es.js";
12
+ import "../.chunks/app-qGtdp_Vh.es.js";
13
+ import { t as l } from "../.chunks/utils-mBJcBhkk.es.js";
14
14
  import { validUrl as u } from "../utils/check.js";
15
15
  import { ellipsis as d } from "../utils/string.js";
16
- import { getDeviceGIcon as f, getLangLabel as p, getSearcherGIcon as m } from "../utils/searchers.js";
17
- import { invertKeyboardLayout as h } from "../utils/keyboard.js";
18
- import { c as g, n as _, o as v, r as ee, s as y } from "../.chunks/popup-q1PRZblX.es.js";
19
- import { c as b, d as x, f as S, p as C } from "../.chunks/formsExt-CbccziSy.es.js";
20
- import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createSlots as A, createTextVNode as j, createVNode as M, defineComponent as N, isRef as te, mergeModels as P, mergeProps as ne, nextTick as re, normalizeClass as F, onMounted as ie, openBlock as I, reactive as ae, ref as L, renderList as R, renderSlot as oe, resolveComponent as se, resolveDirective as ce, resolveDynamicComponent as le, shallowRef as ue, toDisplayString as z, toValue as de, unref as B, useId as fe, useModel as V, watch as H, withCtx as U, withDirectives as pe, withKeys as me, withModifiers as W } from "vue";
16
+ import { genRegionLabelData as f, getSearcherGIcon as p } from "../utils/searchers.js";
17
+ import { invertKeyboardLayout as m } from "../utils/keyboard.js";
18
+ import { c as h, n as ee, o as g, r as _, s as v } from "../.chunks/popup-cAqd6Dj3.es.js";
19
+ import { c as y, d as b, f as x, p as S } from "../.chunks/formsExt-D7XsRleI.es.js";
20
+ import { Fragment as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createSlots as te, createTextVNode as k, createVNode as A, defineComponent as j, isRef as ne, mergeModels as M, mergeProps as re, nextTick as ie, normalizeClass as N, onMounted as ae, openBlock as P, reactive as oe, ref as F, renderList as I, 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";
21
21
  //#region src/components/project/competitorSelector/competitorSelector.vue?vue&type=script&setup=true&lang.ts
22
- var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _e = /* @__PURE__ */ N({
22
+ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, ve = /* @__PURE__ */ j({
23
23
  __name: "competitorSelector",
24
- props: /*@__PURE__*/ P({
24
+ props: /*@__PURE__*/ M({
25
25
  modelValue: {},
26
26
  items: {},
27
27
  showSelectAllItem: {
@@ -35,7 +35,7 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
35
35
  }),
36
36
  emits: ["update:modelValue"],
37
37
  setup(e) {
38
- let t = e, i = V(e, "modelValue"), o = T(() => {
38
+ let t = e, i = z(e, "modelValue"), o = w(() => {
39
39
  if (t.showSelectAllItem) return {
40
40
  icon: t.selectAllItemIcon,
41
41
  title: n().Common.Select_all,
@@ -43,23 +43,23 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
43
43
  content: ""
44
44
  };
45
45
  });
46
- return (t, n) => (I(), O("div", he, [B(r).state.isMobile ? (I(), E(y, { key: 0 }, {
47
- opener: U(() => [M(a, {
46
+ return (t, n) => (P(), D("div", ge, [R(r).state.isMobile ? (P(), T(v, { key: 0 }, {
47
+ opener: V(() => [A(a, {
48
48
  class: "top-competitorSelector_opener",
49
49
  color: "theme",
50
50
  icon: "",
51
51
  icon2: ""
52
52
  }, {
53
- default: U(() => [j(z(e.items.find((e) => e.value === i.value?.[0])?.content), 1)]),
53
+ default: V(() => [k(L(e.items.find((e) => e.value === i.value?.[0])?.content), 1)]),
54
54
  _: 1
55
55
  })]),
56
- contentList: U(() => [(I(!0), O(w, null, R(e.items, (e) => (I(), E(v, {
57
- class: F({ "top-active": i.value?.includes(e.value) }),
56
+ contentList: V(() => [(P(!0), D(C, null, I(e.items, (e) => (P(), T(g, {
57
+ class: N({ "top-active": i.value?.includes(e.value) }),
58
58
  "data-top-icon": e.icon,
59
59
  title: e.title,
60
60
  onClick: () => i.value = [e.value]
61
61
  }, {
62
- default: U(() => [k("span", ge, z(e.content), 1)]),
62
+ default: V(() => [O("span", _e, L(e.content), 1)]),
63
63
  _: 2
64
64
  }, 1032, [
65
65
  "class",
@@ -68,7 +68,7 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
68
68
  "onClick"
69
69
  ]))), 256))]),
70
70
  _: 1
71
- })) : (I(), E(C, {
71
+ })) : (P(), T(S, {
72
72
  key: 1,
73
73
  modelValue: i.value,
74
74
  "onUpdate:modelValue": n[0] ||= (e) => i.value = e,
@@ -83,12 +83,12 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
83
83
  "selectAllItem"
84
84
  ]))]));
85
85
  }
86
- }), ve = (e, t) => T(() => de(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
86
+ }), ye = (e, t) => w(() => fe(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
87
87
  value: e.id,
88
88
  title: e.url + ` [${e.id}]`,
89
- icon: e.id === de(t) ? "" : "",
89
+ icon: e.id === fe(t) ? "" : "",
90
90
  content: e.name
91
- }))), ye = {
91
+ }))), be = {
92
92
  0: "Yandex",
93
93
  1: "Google",
94
94
  4: "YouTube",
@@ -99,27 +99,27 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
99
99
  20: "Yandex.com",
100
100
  21: "Yandex.com.tr",
101
101
  22: "YandexLive"
102
- }, be = {
102
+ }, xe = {
103
103
  alt: "",
104
104
  key: -2,
105
105
  name: "--",
106
106
  index: -2
107
- }, xe = {
107
+ }, Se = {
108
108
  key: -2,
109
109
  name: "--",
110
- regions: [be],
111
- regionByIndex: /* @__PURE__ */ new Map([[-2, be]])
112
- }, G = {
110
+ regions: [xe],
111
+ regionByIndex: /* @__PURE__ */ new Map([[-2, xe]])
112
+ }, U = {
113
113
  alt: "",
114
114
  key: -2,
115
115
  name: "Autoselect",
116
116
  index: -2
117
- }, Se = {
117
+ }, Ce = {
118
118
  key: -2,
119
119
  name: "Autoselect",
120
- regions: [G],
121
- regionByIndex: /* @__PURE__ */ new Map([[-2, G]])
122
- }, Ce = {
120
+ regions: [U],
121
+ regionByIndex: /* @__PURE__ */ new Map([[-2, U]])
122
+ }, we = {
123
123
  alt: "",
124
124
  countryCode: "00",
125
125
  depth: 1,
@@ -128,38 +128,38 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
128
128
  index: -1,
129
129
  lang: "ru",
130
130
  name: "Without region"
131
- }, we = () => (G.name = n().Common.Autoselect, G), Te = () => (we(), Se.name = n().Common.Autoselect, console.log(Se), Se), Ee = () => (Ce.name = n().Keywords.Without_region, Ce), De = [
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
132
  4,
133
133
  8,
134
134
  9
135
- ], Oe = (e, t, n = []) => {
136
- let r = Ae(e, !1, n), i;
135
+ ], ke = (e, t, n = []) => {
136
+ let r = je(e, !1, n), i;
137
137
  return r.forEach((n) => {
138
138
  if ((t.searcher_key === void 0 || t.searcher_key == n.key) && n.regions && (n.regions.forEach((r) => {
139
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
140
  }), i)) return !1;
141
141
  }), i;
142
- }, ke = l(() => import("../.chunks/dialog_regionSelectorRegions-Nob9K60s.es.js")), Ae = (e = "", t = !1, n = []) => {
142
+ }, Ae = l(() => import("../.chunks/dialog_regionSelectorRegions-BPUDeHdW.es.js")), je = (e = "", t = !1, n = []) => {
143
143
  let r;
144
- return r = e === "volume" || e === "cost_forecast" ? je(n) : e === "project_relevant_url" ? Me(n) : Ne(n, !0), t && r.set(-2, Te()), r.size || r.set(-2, xe), r;
145
- }, je = (e) => {
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
146
  e = e.filter((e) => r.state.forceSearchersKeysForKeywordsStats.includes(e.key));
147
- let t = Ne(e, !1);
147
+ let t = Pe(e, !1);
148
148
  return r.state.forceSearchersKeysForKeywordsStats.forEach((e) => {
149
149
  if (t.has(e)) return;
150
150
  let n = {
151
151
  key: e,
152
- name: ye[e],
152
+ name: be[e],
153
153
  regions: [],
154
154
  regionByIndex: /* @__PURE__ */ new Map()
155
155
  };
156
156
  t.set(n.key, n);
157
157
  }), r.state.showGlobalRegionForKeywordsStats && t.forEach((e) => {
158
158
  if (!e.regionByIndex) return;
159
- let t = { ...Ee() };
159
+ let t = { ...De() };
160
160
  e.regionByIndex.set(t.index, t);
161
161
  }), t;
162
- }, Me = (e) => (e = e.filter((e) => !De.includes(e.key)), Ne(e, !1)), Ne = (e, t) => {
162
+ }, Ne = (e) => (e = e.filter((e) => !Oe.includes(e.key)), Pe(e, !1)), Pe = (e, t) => {
163
163
  let n = /* @__PURE__ */ new Map();
164
164
  return e.forEach((e) => {
165
165
  if (t && !e.enabled) return;
@@ -170,18 +170,18 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
170
170
  r.regionByIndex.set(n.index, n);
171
171
  }), r.regionByIndex.size, (!e.regions || r.regionByIndex.size) && n.set(r.key, r);
172
172
  }), n;
173
- }, Pe = (e, t) => {
173
+ }, Fe = (e, t) => {
174
174
  let r = n();
175
175
  return {
176
- searcherKey: L(t.value.keys().next().value ?? -2),
177
- optionBySearcherKey: T(() => {
176
+ searcherKey: F(t.value.keys().next().value ?? -2),
177
+ optionBySearcherKey: w(() => {
178
178
  let n = /* @__PURE__ */ new Map();
179
179
  if (t.value.forEach((t) => {
180
180
  let r = {
181
181
  value: t.key,
182
182
  title: t.name
183
183
  };
184
- e.addSearcherIcon && (r.icon = m(t.key)), n.set(t.key, r);
184
+ e.addSearcherIcon && (r.icon = p(t.key)), n.set(t.key, r);
185
185
  }), e.addCompare && !n.has(-2)) {
186
186
  let e = {
187
187
  value: "",
@@ -198,36 +198,33 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
198
198
  return n;
199
199
  })
200
200
  };
201
- }, Fe = (e, t) => {
202
- let r = n(), i = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), a = L(-2);
201
+ }, Ie = (e, t) => {
202
+ let r = n(), i = w(() => e.forMode === "volume" || e.forMode === "cost_forecast"), a = F(-2);
203
203
  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
- let o = T(() => {
204
+ let o = w(() => {
205
205
  let e = /* @__PURE__ */ new Map();
206
- return t.value.regionByIndex?.forEach((n) => {
207
- let a = n.name;
206
+ return t.value.regionByIndex?.forEach((t) => {
208
207
  if (i.value) {
209
- let t = {
210
- value: n.key,
211
- title: a
208
+ let n = {
209
+ value: t.key,
210
+ title: t.name
212
211
  };
213
- e.has(n.key) || e.set(n.key, t);
212
+ e.has(t.key) || e.set(t.key, n);
214
213
  return;
215
214
  }
216
- let o = p(t.value.key || 0, n.lang ?? ""), s = "";
217
- if (n.device !== void 0 && (s = r.Common["Device_" + n.device]), o && (s += s ? `, ${o}` : o), n.alt) {
218
- let e = n.alt.toUpperCase();
219
- s += s ? `, ${e}` : e;
220
- }
221
- s &&= ` (${s})`;
222
- let c = {
223
- value: n.index,
224
- title: a + s,
225
- icon: n.device === void 0 ? void 0 : f(n.device)
215
+ let n = f(t), r = [];
216
+ n.deviceLabel && r.push(n.deviceLabel), n.langLabel && r.push(n.langLabel), n.altLabel && r.push(n.altLabel);
217
+ let a = r.join(", ");
218
+ a &&= ` (${a})`;
219
+ let o = {
220
+ value: t.index,
221
+ title: t.name + a,
222
+ icon: n.deviceTopIcon
226
223
  };
227
- e.set(n.index, c);
224
+ e.set(t.index, o);
228
225
  }), e;
229
226
  });
230
- return H(o, (t, n) => {
227
+ return B(o, (t, n) => {
231
228
  if (e.onlySearcher || a.value !== void 0 && t.get(a.value)) return;
232
229
  let i = t.keys().next().value;
233
230
  if (a.value === -2 || i === -2) {
@@ -250,8 +247,8 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
250
247
  regionIndex: a,
251
248
  optionByRegionIndex: o
252
249
  };
253
- }, Ie = (e, t, n) => {
254
- let r = L([]), i = () => {
250
+ }, Le = (e, t, n) => {
251
+ let r = F([]), i = () => {
255
252
  if (e.onlySearcher && t.value) {
256
253
  r.value = Array.from(t.value.keys());
257
254
  return;
@@ -265,19 +262,19 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
265
262
  }, a = () => {
266
263
  r.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(r.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
267
264
  };
268
- return H(r, () => {
265
+ return B(r, () => {
269
266
  a();
270
267
  }), e.addCompare && i(), { regionsIndexes: r };
271
- }, Le = (e) => {
272
- let t = T(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = T(() => Ae(e.forMode, e.autoRegion, e.searchers)), r = T(() => n.value.get(a.searcherKey.value) || xe), i = T(() => {
268
+ }, Re = (e) => {
269
+ let t = w(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = w(() => je(e.forMode, e.autoRegion, e.searchers)), r = w(() => n.value.get(a.searcherKey.value) || Se), i = w(() => {
273
270
  let e = /* @__PURE__ */ new Set();
274
271
  return n.value.forEach((t) => {
275
272
  t.regionByIndex.forEach((t) => {
276
273
  t.index !== -2 && e.add(t.index);
277
274
  });
278
275
  }), e;
279
- }), a = Pe(e, n), o = Fe(e, r), s = Ie(e, n, i);
280
- H(n, () => {
276
+ }), a = Fe(e, n), o = Ie(e, r), s = Le(e, n, i);
277
+ B(n, () => {
281
278
  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;
282
279
  let t = n.value.keys().next().value;
283
280
  n.value.forEach((r) => {
@@ -300,7 +297,7 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
300
297
  let n = o.regionIndex.value;
301
298
  if (t.value && e.forMode) {
302
299
  let t = o.regionIndex.value;
303
- n = Oe(e.forMode, {
300
+ n = ke(e.forMode, {
304
301
  searcher_key: c(),
305
302
  key: t
306
303
  }, e.searchers)?.index;
@@ -322,9 +319,9 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
322
319
  if (e !== void 0) return u()?.regionByIndex?.get(e);
323
320
  }
324
321
  };
325
- }, Re = /* @__PURE__ */ N({
322
+ }, ze = /* @__PURE__ */ j({
326
323
  __name: "regionSelector",
327
- props: /*@__PURE__*/ P({
324
+ props: /*@__PURE__*/ M({
328
325
  projectId: {},
329
326
  searchers: { default: () => [] },
330
327
  modelValue: {},
@@ -353,19 +350,19 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
353
350
  }),
354
351
  emits: ["update:modelValue", "update:modelValueSingle"],
355
352
  setup(e, { expose: t }) {
356
- let n = e, r = T(() => n.forMode === "volume" || n.forMode === "cost_forecast"), i = V(e, "modelValue"), s = V(e, "modelValueSingle"), { selectSearcher: c, selectRegion: l, compare: u, searcherByKey: d, allRegionsIndexes: f, getSearcher: p, getRegion: m } = Le(n), h = () => {
353
+ let n = e, r = w(() => n.forMode === "volume" || n.forMode === "cost_forecast"), i = z(e, "modelValue"), s = z(e, "modelValueSingle"), { selectSearcher: c, selectRegion: l, compare: u, searcherByKey: d, allRegionsIndexes: f, getSearcher: p, getRegion: m } = Re(n), h = () => {
357
354
  let e = [];
358
355
  d.value.forEach((t) => {
359
356
  (n.forMode === "project_relevant_url" || t.enabled) && t.regions.forEach((t) => {
360
357
  (n.forMode === "project_relevant_url" || t.enabled) && t.index !== -1 && e.push(t);
361
358
  });
362
- }), ke.open("regions", {
359
+ }), Ae.open("regions", {
363
360
  regions: e,
364
361
  regionsIndexes: u.regionsIndexes.value,
365
362
  "@update:regionsIndexes": (e) => u.regionsIndexes.value = e
366
363
  });
367
364
  };
368
- return H([
365
+ return B([
369
366
  l.regionIndex,
370
367
  c.searcherKey,
371
368
  u.regionsIndexes
@@ -375,9 +372,9 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
375
372
  i.value = [...u.regionsIndexes.value];
376
373
  } else n.onlySearcher ? (i.value = [c.searcherKey.value], c.searcherKey.value === -2 && !n.autoRegion && (i.value.length = 0)) : (i.value = [l.regionIndex.value], l.regionIndex.value === -2 && !n.autoRegion && (i.value.length = 0));
377
374
  !n.onlySearcher && !f.value.size && (c.searcherKey.value = -2);
378
- }), s.value && H(s, () => {
375
+ }), s.value && B(s, () => {
379
376
  s.value && (i.value = [s.value]);
380
- }, { immediate: !0 }), H(i, () => {
377
+ }, { immediate: !0 }), B(i, () => {
381
378
  if (i.value[0] && (s.value = i.value[0]), n.onlySearcher) {
382
379
  if (!i.value.length || i.value.length === 1 && !d.value.has(i.value[0]) || i.value.length === 1 && i.value[0] === -2 && !n.autoRegion) {
383
380
  let e = d.value.keys().next().value;
@@ -430,14 +427,14 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
430
427
  }, { immediate: !0 }), t({
431
428
  getSearcher: p,
432
429
  getRegion: m
433
- }), (t, n) => (I(), O("div", { class: F({
430
+ }), (t, n) => (P(), D("div", { class: N({
434
431
  "top-regionSelector": !0,
435
432
  "top-regionSelector-onlySearcher": e.onlySearcher
436
433
  }) }, [
437
- M(o, {
438
- options: B(c).optionBySearcherKey.value,
439
- modelValue: B(c).searcherKey.value,
440
- "onUpdate:modelValue": n[0] ||= (e) => B(c).searcherKey.value = e,
434
+ A(o, {
435
+ options: R(c).optionBySearcherKey.value,
436
+ modelValue: R(c).searcherKey.value,
437
+ "onUpdate:modelValue": n[0] ||= (e) => R(c).searcherKey.value = e,
441
438
  name: "searcher_key",
442
439
  addChanger: e.addChanger
443
440
  }, null, 8, [
@@ -445,12 +442,12 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
445
442
  "modelValue",
446
443
  "addChanger"
447
444
  ]),
448
- !e.onlySearcher && B(c).searcherKey.value !== B(-1) ? (I(), E(o, {
445
+ !e.onlySearcher && R(c).searcherKey.value !== R(-1) ? (P(), T(o, {
449
446
  key: 0,
450
447
  class: "top-select-region",
451
- options: B(l).optionByRegionIndex.value,
452
- modelValue: B(l).regionIndex.value,
453
- "onUpdate:modelValue": n[1] ||= (e) => B(l).regionIndex.value = e,
448
+ options: R(l).optionByRegionIndex.value,
449
+ modelValue: R(l).regionIndex.value,
450
+ "onUpdate:modelValue": n[1] ||= (e) => R(l).regionIndex.value = e,
454
451
  name: r.value ? "region_key" : "region_index",
455
452
  addChanger: e.addChanger,
456
453
  "data-top-icon": e.addRegionIcon ? "" : void 0
@@ -460,31 +457,31 @@ var he = { class: "top-competitorSelector" }, ge = { class: "top-ellipsis1" }, _
460
457
  "name",
461
458
  "addChanger",
462
459
  "data-top-icon"
463
- ])) : D("", !0),
464
- e.addCompare && !e.onlySearcher && B(c).searcherKey.value === B(-1) ? (I(), E(a, {
460
+ ])) : E("", !0),
461
+ e.addCompare && !e.onlySearcher && R(c).searcherKey.value === R(-1) ? (P(), T(a, {
465
462
  key: 1,
466
463
  name: "compare",
467
464
  onClick: h,
468
- "data-count-compare-regions-indexes": B(u).regionsIndexes.value.length
465
+ "data-count-compare-regions-indexes": R(u).regionsIndexes.value.length
469
466
  }, {
470
- default: U(() => [j(z(t.$i18n.Common.Selected_regions), 1)]),
467
+ default: V(() => [k(L(t.$i18n.Common.Selected_regions), 1)]),
471
468
  _: 1
472
- }, 8, ["data-count-compare-regions-indexes"])) : D("", !0)
469
+ }, 8, ["data-count-compare-regions-indexes"])) : E("", !0)
473
470
  ], 2));
474
471
  }
475
- }), K = {
472
+ }), W = {
476
473
  id: 0,
477
474
  name: "/",
478
475
  path: "/"
479
476
  };
480
- function ze(e) {
477
+ function Be(e) {
481
478
  return e ? n()?.Common.All_folders : "/ (" + n()?.Keywords.Root_folder + ")";
482
479
  }
483
- var Be = (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) => {
484
- a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = ze(t));
480
+ var Ve = (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) => {
481
+ a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Be(t));
485
482
  let o = i > 1 ? "-".repeat(i - 1) + " " : "";
486
- o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Be(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);
487
- }), n), Ve = (e, t) => e.gen(`/get/${t}/folders/`, [
483
+ o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Ve(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);
484
+ }), n), He = (e, t) => e.gen(`/get/${t}/folders/`, [
488
485
  "id",
489
486
  "parent_id",
490
487
  "name",
@@ -495,9 +492,9 @@ var Be = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
495
492
  });
496
493
  //#endregion
497
494
  //#region src/core/utils/composables/useWatch.ts
498
- function He(e, t, n) {
495
+ function Ue(e, t, n) {
499
496
  let r = Object.keys(e), i = r.map((t) => e[t]);
500
- return H(i, (e, n, i) => {
497
+ return B(i, (e, n, i) => {
501
498
  let a = {};
502
499
  e.forEach((e, t) => {
503
500
  if (!Object.is(e, n[t])) {
@@ -512,9 +509,9 @@ function He(e, t, n) {
512
509
  }
513
510
  //#endregion
514
511
  //#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
515
- var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
512
+ var We = ["innerHTML"], Ge = /* @__PURE__ */ j({
516
513
  __name: "folders",
517
- props: /*@__PURE__*/ P({
514
+ props: /*@__PURE__*/ M({
518
515
  folderId: {},
519
516
  folder: {},
520
517
  folders: {},
@@ -530,20 +527,20 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
530
527
  }, {
531
528
  folderId: { required: !0 },
532
529
  folderIdModifiers: {},
533
- folder: { default: K },
530
+ folder: { default: W },
534
531
  folderModifiers: {}
535
532
  }),
536
533
  emits: ["update:folderId", "update:folder"],
537
534
  setup(e) {
538
- let t = e, n = V(e, "folderId"), r = V(e, "folder"), i = t.client && !t.folders ? Ve(t.client, t.service) : void 0, a = L(null);
539
- H(() => t.projectId, () => {
535
+ let t = e, n = z(e, "folderId"), r = z(e, "folder"), i = t.client && !t.folders ? He(t.client, t.service) : void 0, a = F(null);
536
+ B(() => t.projectId, () => {
540
537
  i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
541
538
  }, { immediate: !0 });
542
- let o = T(() => Be(t.folders ?? { root: [K] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
539
+ let o = w(() => Ve(t.folders ?? { root: [W] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
543
540
  ...e[0],
544
- name: ze(!0)
541
+ name: Be(!0)
545
542
  }), e);
546
- return He({
543
+ return Ue({
547
544
  modelFolder: r,
548
545
  modelFolderId: n
549
546
  }, async (e) => {
@@ -553,21 +550,21 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
553
550
  return;
554
551
  }
555
552
  let i = o.value.get(t.folderId);
556
- i ||= K, r.value = i, n.value = i.id;
557
- }, { immediate: !0 }), (t, n) => (I(), E(b, {
553
+ i ||= W, r.value = i, n.value = i.id;
554
+ }, { immediate: !0 }), (t, n) => (P(), T(y, {
558
555
  class: "top-groupSelector_folder",
559
556
  modelValue: r.value,
560
557
  "onUpdate:modelValue": n[0] ||= (e) => r.value = e,
561
558
  items: e.folders ? [...o.value.values()] : void 0,
562
559
  "search-type": "inline",
563
560
  icon: e.addIcon ? "" : void 0,
564
- api: e.folders ? void 0 : B(i),
565
- apiSetSearchParams: (...e) => B(x)(...e, "name"),
561
+ api: e.folders ? void 0 : R(i),
562
+ apiSetSearchParams: (...e) => R(b)(...e, "name"),
566
563
  prepareItemsBeforeRender: s,
567
564
  addChanger: e.addChanger,
568
565
  useCache: ""
569
566
  }, {
570
- item: U(({ item: e }) => [k("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ue)]),
567
+ item: V(({ item: e }) => [O("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, We)]),
571
568
  _: 1
572
569
  }, 8, [
573
570
  "modelValue",
@@ -578,17 +575,17 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
578
575
  "addChanger"
579
576
  ]));
580
577
  }
581
- }), q = {
578
+ }), G = {
582
579
  id: -1,
583
580
  name: "--",
584
- folder_id: K.id,
585
- folder_path: K.path
586
- }, J = {
581
+ folder_id: W.id,
582
+ folder_path: W.path
583
+ }, K = {
587
584
  id: 0,
588
585
  name: "All groups",
589
- folder_id: K.id,
590
- folder_path: K.path
591
- }, Y = () => (J.name = n()?.Common.All_groups, J), Ge = () => (J.name = n()?.Keywords.Choose_group, J), Ke = (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), qe = (e, t) => e.gen(`/get/${t}/groups/`, [
586
+ folder_id: W.id,
587
+ folder_path: W.path
588
+ }, q = () => (K.name = n()?.Common.All_groups, K), Ke = () => (K.name = n()?.Keywords.Choose_group, K), qe = (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), Je = (e, t) => e.gen(`/get/${t}/groups/`, [
592
589
  "id",
593
590
  "name",
594
591
  "folder_id",
@@ -596,12 +593,12 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
596
593
  ]).changeParams({
597
594
  folder_id_depth: !0,
598
595
  limit: 100
599
- }), Je = (e, t) => e.gen(`/add/${t}/groups/`), Ye = (e, t) => e.gen(`/del/${t}/groups/`), Xe = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Ze = { class: "top-groupSelector_groupItem top-ellipsis1" }, Qe = {
596
+ }), Ye = (e, t) => e.gen(`/add/${t}/groups/`), Xe = (e, t) => e.gen(`/del/${t}/groups/`), Ze = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Qe = { class: "top-groupSelector_groupItem top-ellipsis1" }, $e = {
600
597
  key: 0,
601
598
  class: "top-comment"
602
- }, $e = ["innerHTML"], et = ["innerHTML"], tt = ["innerHTML"], nt = /* @__PURE__ */ N({
599
+ }, et = ["innerHTML"], tt = ["innerHTML"], nt = ["innerHTML"], rt = /* @__PURE__ */ j({
603
600
  __name: "groups",
604
- props: /*@__PURE__*/ P({
601
+ props: /*@__PURE__*/ M({
605
602
  groupId: {},
606
603
  group: {},
607
604
  projectId: {},
@@ -632,14 +629,14 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
632
629
  group: { required: !0 },
633
630
  groupModifiers: {}
634
631
  }),
635
- emits: /*@__PURE__*/ P([
632
+ emits: /*@__PURE__*/ M([
636
633
  "addGroup",
637
634
  "editGroup",
638
635
  "delGroup"
639
636
  ], ["update:groupId", "update:group"]),
640
637
  setup(e, { expose: n, emit: r }) {
641
- let i = e, a = r, o = V(e, "groupId"), s = V(e, "group"), c = i.client && !i.groups ? qe(i.client, i.service) : void 0, l = i.client ? Je(i.client, i.service) : void 0, u = i.client ? Ye(i.client, i.service) : void 0, d = i.client ? Xe(i.client, i.service) : void 0, f = L(null), p = T(() => {
642
- if (i.groups !== void 0) return Ke(i.groups, i.on, i.folder);
638
+ let i = e, a = r, o = z(e, "groupId"), s = z(e, "group"), c = i.client && !i.groups ? Je(i.client, i.service) : void 0, l = i.client ? Ye(i.client, i.service) : void 0, u = i.client ? Xe(i.client, i.service) : void 0, d = i.client ? Ze(i.client, i.service) : void 0, f = F(null), p = w(() => {
639
+ if (i.groups !== void 0) return qe(i.groups, i.on, i.folder);
643
640
  }), m = t("folder_id", "EQUALS", [i.folder?.id ?? 0]);
644
641
  c?.changeParams({
645
642
  project_id: i.projectId,
@@ -651,16 +648,16 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
651
648
  }, g = (e = !1) => {
652
649
  f.value?.resetCache(e);
653
650
  };
654
- He({
651
+ Ue({
655
652
  projectId: () => i.projectId,
656
653
  folderId: () => i.folder?.id,
657
654
  canSelectAll: () => i.canSelectAll
658
655
  }, (e) => {
659
656
  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) {
660
657
  let e;
661
- i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e = ae(Y()))), (i.autoselect === "placeholder" || !e) && (e = Ge()), h(e);
658
+ i.autoselect === "first" && (e = p.value?.[0], i.canSelectAll && (e = oe(q()))), (i.autoselect === "placeholder" || !e) && (e = Ke()), h(e);
662
659
  }
663
- }, { immediate: !0 }), He({
660
+ }, { immediate: !0 }), Ue({
664
661
  modelGroup: s,
665
662
  modelGroupId: o
666
663
  }, async (e) => {
@@ -672,14 +669,14 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
672
669
  if (!(i.canAdd && o.value === null)) {
673
670
  if (i.groups) {
674
671
  let e = p.value?.find((e) => e.id === o.value);
675
- if (!e && i.canSelectAll && (e = Y()), e) h(e);
672
+ if (!e && i.canSelectAll && (e = q()), e) h(e);
676
673
  else {
677
674
  let e = p.value?.[0];
678
- e && !o.value ? h(e) : h(q);
675
+ e && !o.value ? h(e) : h(G);
679
676
  }
680
677
  }
681
678
  if (i.client && !i.groups && (o.value || o.value === 0 && !i.canSelectAll)) {
682
- let e = qe(i.client, i.service).changeParams({
679
+ let e = Je(i.client, i.service).changeParams({
683
680
  project_id: i.projectId,
684
681
  id: o.value,
685
682
  filters: [m]
@@ -687,7 +684,7 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
687
684
  e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + i.projectId });
688
685
  let t = await e.call();
689
686
  if (!t.errors?.length && !t.result) return;
690
- !t.errors && t.result[0] ? h(t.result[0]) : h(q);
687
+ !t.errors && t.result[0] ? h(t.result[0]) : h(G);
691
688
  }
692
689
  }
693
690
  }
@@ -697,7 +694,7 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
697
694
  let t = s.value, n = await l.changeParams({
698
695
  project_id: i.projectId,
699
696
  names: [e.name],
700
- to_id: i.folder?.id ?? K.id,
697
+ to_id: i.folder?.id ?? W.id,
701
698
  to_type: "in_folder_last"
702
699
  }).call();
703
700
  if (n.result) {
@@ -705,7 +702,7 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
705
702
  h(e), a("addGroup", e);
706
703
  } else h(t);
707
704
  f.value?.resetCache(!0);
708
- }, y = async (e, t) => {
705
+ }, x = async (e, t) => {
709
706
  d && ((await d.changeParams({
710
707
  project_id: i.projectId,
711
708
  id: e.id,
@@ -718,9 +715,9 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
718
715
  u && ((await u.changeParams({
719
716
  project_id: i.projectId,
720
717
  id: e.id
721
- }).call()).errors || (s.value.id === e.id && h(i.canSelectAll ? Y() : q), a("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
718
+ }).call()).errors || (s.value.id === e.id && h(i.canSelectAll ? q() : G), a("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
722
719
  };
723
- return n({ resetCacheGroups: g }), (t, n) => (I(), E(b, {
720
+ return n({ resetCacheGroups: g }), (t, n) => (P(), T(y, {
724
721
  ref_key: "refSelector",
725
722
  ref: f,
726
723
  class: "top-groupSelector_group",
@@ -729,51 +726,51 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
729
726
  items: p.value ?? e.groups,
730
727
  searchType: "inline",
731
728
  icon: e.addIcon ? "" : void 0,
732
- api: e.groups ? void 0 : B(c),
733
- apiSetSearchParams: (...e) => B(x)(...e, "name"),
729
+ api: e.groups ? void 0 : R(c),
730
+ apiSetSearchParams: (...e) => R(b)(...e, "name"),
734
731
  appendSearchToResult: !!e.canAdd,
735
- useAllItem: e.canSelectAll ? B(Y)().name : !1,
732
+ useAllItem: e.canSelectAll ? R(q)().name : !1,
736
733
  addChanger: e.addChanger,
737
734
  useCache: "",
738
735
  onAppendItem: v
739
- }, A({
740
- item: U(({ item: n }) => [k("div", Ze, [
741
- n.id === B(null) ? (I(), O("div", Qe, z(t.$i18n.Common.Add) + ": ", 1)) : D("", !0),
742
- k("span", {
736
+ }, te({
737
+ item: V(({ item: n }) => [O("div", Qe, [
738
+ n.id === R(null) ? (P(), D("div", $e, L(t.$i18n.Common.Add) + ": ", 1)) : E("", !0),
739
+ O("span", {
743
740
  class: "top-groupSelector_groupItemName top-ellipsis1",
744
741
  innerHTML: n.name
745
- }, null, 8, $e),
746
- n.folder_path && e.showPath ? (I(), O("span", {
742
+ }, null, 8, et),
743
+ n.folder_path && e.showPath ? (P(), D("span", {
747
744
  key: 1,
748
745
  class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
749
746
  innerHTML: n.folder_path
750
- }, null, 8, et)) : D("", !0)
747
+ }, null, 8, tt)) : E("", !0)
751
748
  ])]),
752
749
  _: 2
753
750
  }, [e.canEditAndDel && e.client ? {
754
751
  name: "actions",
755
- fn: U(({ item: r }) => [r.id ? (I(), O(w, { key: 0 }, [M(_, {
752
+ fn: V(({ item: r }) => [r.id ? (P(), D(C, { key: 0 }, [A(ee, {
756
753
  submitText: t.$i18n.Common.Save,
757
754
  defaultValue: r.name,
758
755
  inputProps: { addCleaner: !1 },
759
- onSubmit: (e) => y(r, e)
756
+ onSubmit: (e) => x(r, e)
760
757
  }, {
761
- opener: U(() => [...n[1] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
762
- default: U(() => [...n[2] ||= []]),
758
+ opener: V(() => [...n[1] ||= [O("div", { "data-top-icon": "" }, null, -1)]]),
759
+ default: V(() => [...n[2] ||= []]),
763
760
  _: 1
764
761
  }, 8, [
765
762
  "submitText",
766
763
  "defaultValue",
767
764
  "onSubmit"
768
- ]), M(ee, {
765
+ ]), A(_, {
769
766
  isWarning: "",
770
767
  submitText: t.$i18n.Common.Delete,
771
768
  onSubmit: (e) => S(r)
772
769
  }, {
773
- opener: U(() => [...n[3] ||= [k("div", { "data-top-icon": "" }, null, -1)]]),
774
- default: U(() => [k("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n.Aitracker.Delete_group_warning }, null, 8, tt)]),
770
+ opener: V(() => [...n[3] ||= [O("div", { "data-top-icon": "" }, null, -1)]]),
771
+ default: V(() => [O("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n.Aitracker.Delete_group_warning }, null, 8, nt)]),
775
772
  _: 1
776
- }, 8, ["submitText", "onSubmit"])], 64)) : D("", !0)]),
773
+ }, 8, ["submitText", "onSubmit"])], 64)) : E("", !0)]),
777
774
  key: "0"
778
775
  } : void 0]), 1032, [
779
776
  "modelValue",
@@ -786,9 +783,9 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
786
783
  "addChanger"
787
784
  ]));
788
785
  }
789
- }), rt = { class: "top-groupSelector" }, it = /* @__PURE__ */ N({
786
+ }), it = { class: "top-groupSelector" }, at = /* @__PURE__ */ j({
790
787
  __name: "groupSelector",
791
- props: /*@__PURE__*/ P({
788
+ props: /*@__PURE__*/ M({
792
789
  folderId: {},
793
790
  folder: {},
794
791
  groupId: {},
@@ -833,20 +830,20 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
833
830
  folderModifiers: {},
834
831
  groupId: { required: !0 },
835
832
  groupIdModifiers: {},
836
- group: { default: q },
833
+ group: { default: G },
837
834
  groupModifiers: {}
838
835
  }),
839
- emits: /*@__PURE__*/ P(["update:groups"], [
836
+ emits: /*@__PURE__*/ M(["update:groups"], [
840
837
  "update:folderId",
841
838
  "update:folder",
842
839
  "update:groupId",
843
840
  "update:group"
844
841
  ]),
845
842
  setup(e, { expose: t, emit: n }) {
846
- let r = e, i = L(null), a = V(e, "folderId"), o = V(e, "folder"), s = V(e, "groupId"), c = V(e, "group"), l = n;
847
- o.value = Be(r.folders ?? { root: [K] }, r.canSelectAllGroups).get(a.value);
843
+ let r = e, i = F(null), a = z(e, "folderId"), o = z(e, "folder"), s = z(e, "groupId"), c = z(e, "group"), l = n;
844
+ o.value = Ve(r.folders ?? { root: [W] }, r.canSelectAllGroups).get(a.value);
848
845
  let u = r.groups?.find((e) => e.id === s.value);
849
- s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = Y()), (r.autoselect === "placeholder" || !u) && (u = Ge()), u ??= q, c.value = u;
846
+ s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = q()), (r.autoselect === "placeholder" || !u) && (u = Ke()), u ??= G, c.value = u;
850
847
  let d = (e) => {
851
848
  let t;
852
849
  r.groups && e && (t = [...r.groups, e]), l("update:groups", t);
@@ -872,7 +869,7 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
872
869
  };
873
870
  return t({ resetCacheGroups: (e = !1) => {
874
871
  i.value?.resetCacheGroups(e);
875
- } }), (t, n) => (I(), O("div", rt, [e.showFolders ? (I(), E(We, {
872
+ } }), (t, n) => (P(), D("div", it, [e.showFolders ? (P(), T(Ge, {
876
873
  key: 0,
877
874
  folderId: a.value,
878
875
  "onUpdate:folderId": n[0] ||= (e) => a.value = e,
@@ -895,7 +892,7 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
895
892
  "addIcon",
896
893
  "client",
897
894
  "service"
898
- ])) : D("", !0), e.showGroups ? (I(), E(nt, {
895
+ ])) : E("", !0), e.showGroups ? (P(), T(rt, {
899
896
  key: 1,
900
897
  ref_key: "componentGroupsRef",
901
898
  ref: i,
@@ -935,42 +932,46 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
935
932
  "addIcon",
936
933
  "client",
937
934
  "service"
938
- ])) : D("", !0)]));
935
+ ])) : E("", !0)]));
939
936
  }
940
- }), at = (e) => ({
937
+ }), ot = (e) => ({
941
938
  id: null,
942
939
  name: e,
943
940
  listItemProps: {
944
941
  type: "title",
945
942
  class: "top-projectSelector_item"
946
943
  }
947
- }), ot = (e) => {
948
- let t = [], r = {
949
- scheduledUpdate: at(n().Projects.Scheduled_update),
950
- manualUpdate: at(n().Projects.Manual_update),
951
- guestProjects: at(n().Projects.Guest_projects)
952
- }, i = {
944
+ }), st = {
945
+ scheduledUpdate: !1,
946
+ manualUpdate: !1,
947
+ guestProjects: !1
948
+ }, ct = (e, t) => {
949
+ let r = [], i = {
950
+ scheduledUpdate: ot(n().Projects.Scheduled_update),
951
+ manualUpdate: ot(n().Projects.Manual_update),
952
+ guestProjects: ot(n().Projects.Guest_projects)
953
+ }, a = t ? {
953
954
  scheduledUpdate: !1,
954
955
  manualUpdate: !1,
955
956
  guestProjects: !1
956
- };
957
- for (let n of e) !i.scheduledUpdate && n.right?.startsWith("1") && n.on > 0 && (t.push(r.scheduledUpdate), i.scheduledUpdate = !0), !i.manualUpdate && n.right?.startsWith("1") && n.on === 0 && (t.push(r.manualUpdate), i.manualUpdate = !0), !i.guestProjects && n.right?.startsWith("0") && n.on >= 0 && (t.push(r.guestProjects), i.guestProjects = !0), t.push(n);
958
- return t;
959
- }, st = (e) => ({
957
+ } : st;
958
+ 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);
959
+ return r;
960
+ }, lt = (e) => ({
960
961
  ...e,
961
- externalLink: pt(e.url ?? ""),
962
+ externalLink: ht(e.url ?? ""),
962
963
  listItemProps: {
963
964
  class: "top-projectSelector_item",
964
965
  attrs: { title: e.name }
965
966
  }
966
- }), ct = (e) => !e || e.length === 0 ? [] : ot(e.map(st)), lt = (e) => {
967
+ }), ut = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(st).forEach((e) => st[e] = !1), ct(e.map(lt), n)), dt = (e) => {
967
968
  e = e.replace(/#.*/, "");
968
969
  let t = location.hash;
969
970
  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;
970
- }, ut = (e) => {
971
- location.href = dt(e);
972
- }, dt = (e) => {
973
- let t = ft(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
971
+ }, ft = (e) => {
972
+ location.href = pt(e);
973
+ }, pt = (e) => {
974
+ let t = mt(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
974
975
  n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
975
976
  "watcher",
976
977
  "indexing",
@@ -980,17 +981,17 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
980
981
  "adwords"
981
982
  ].includes(n[4]) && (i = n[4] + "/");
982
983
  let a = "https://" + t + "/" + r + e + "/" + i;
983
- return a = lt(a), a;
984
- }, ft = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, pt = (e) => {
984
+ return a = dt(a), a;
985
+ }, mt = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, ht = (e) => {
985
986
  let t = e.startsWith("http") ? e : "https://" + e;
986
987
  return t = t.replace(/"/g, "%22"), t;
987
- }, mt = (e, n) => {
988
+ }, gt = (e, n) => {
988
989
  let r = e.params.filters ?? [];
989
990
  r = r.filter((e) => e.name !== "GEN_SEARCH_STRING()");
990
- let i = h(n), a = n.replace(/([[^$.|?*+()])/g, "\\$1"), o = i.replace(/([[^$.|?*+()])/g, "\\$1");
991
+ let i = m(n), a = n.replace(/([[^$.|?*+()])/g, "\\$1"), o = i.replace(/([[^$.|?*+()])/g, "\\$1");
991
992
  n && r.push(t("GEN_SEARCH_STRING()", "REGEXP", [`(${a}|${o})`])), e.changeParams({ filters: r });
992
- }, ht = (n) => {
993
- let i = n.gen("/get/projects_2/projects/", [
993
+ }, _t = (n, i = !0) => {
994
+ let a = n.gen("/get/projects_2/projects/", [
994
995
  "id",
995
996
  "user_id",
996
997
  "name",
@@ -998,7 +999,7 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
998
999
  "on",
999
1000
  "right"
1000
1001
  ]);
1001
- return i.changeParams({
1002
+ return a.changeParams({
1002
1003
  filters: [t("on", "GREATER_THAN_EQUALS", [0])],
1003
1004
  orders: [
1004
1005
  e("user_id", "DESC", [r.state.userId]),
@@ -1007,12 +1008,46 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1007
1008
  e("ord", "ASC"),
1008
1009
  e("id", "DESC")
1009
1010
  ]
1010
- }), i.options.loadingShowSpinner = !1, i;
1011
- }, gt = (e) => e.gen("/add/projects_2/projects/"), _t = { class: "top-ellipsis1" }, vt = /* @__PURE__ */ N({
1011
+ }), a.options.loadingShowSpinner = !1, i && (a.options.onApiLoaded = (e, t, n) => {
1012
+ let r = t.data.filters.length > 1, i = t.data.offset === 0, a = t.data.offset === void 0 || i && !r, o = r;
1013
+ e.result = ut(e.result, a, o), n?.(e, t);
1014
+ }), a;
1015
+ }, vt = (e) => {
1016
+ let t = () => ({
1017
+ userId: r.state.userId,
1018
+ projectsIds: [],
1019
+ nextOffset: 0,
1020
+ isLoading: !1,
1021
+ needFind: !0
1022
+ }), n = t(), i = (e, t) => {
1023
+ let r = n.projectsIds.indexOf(e);
1024
+ if (r === -1) return;
1025
+ if (r === 0 && t) {
1026
+ n.needFind = !1;
1027
+ return;
1028
+ }
1029
+ let i = t ? -1 : 1;
1030
+ return n.projectsIds[r + i];
1031
+ };
1032
+ return { getNextProjectId: async (a, o = !1) => {
1033
+ if (n.isLoading) return;
1034
+ n.userId !== r.state.userId && (n = t());
1035
+ let s = _t(e, !1);
1036
+ s.changeParams({ limit: 1e3 });
1037
+ let c;
1038
+ for (n.isLoading = !0, n.needFind = !0; c = i(a, o), n.needFind && !c && n.nextOffset !== null;) {
1039
+ s.changeParams({ offset: n.nextOffset });
1040
+ let e = await s.call();
1041
+ if (e.errors) break;
1042
+ n.nextOffset = e.nextOffset ?? null, n.projectsIds.push(...e.result.map((e) => e.id));
1043
+ }
1044
+ return n.isLoading = !1, c;
1045
+ } };
1046
+ }, yt = (e) => e.gen("/add/projects_2/projects/"), bt = { class: "top-ellipsis1" }, xt = /* @__PURE__ */ j({
1012
1047
  __name: "submenu",
1013
1048
  props: { id: {} },
1014
1049
  setup(e) {
1015
- let t = e, i = n(), a = ft(), o = (e) => {
1050
+ let t = e, i = n(), a = mt(), o = (e) => {
1016
1051
  let t = [
1017
1052
  {
1018
1053
  href: `https://${a}/project/keywords/${e.id}/`,
@@ -1089,60 +1124,60 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1089
1124
  ].filter((e) => !Object.entries(r.state.closedByMod).some(([t, n]) => n && e.href.includes(`/${t}/`)));
1090
1125
  return e.right.includes("0") ? t.filter((t) => e.right[t.right] === "1") : t;
1091
1126
  };
1092
- return (e, n) => (I(), E(B(y), {
1127
+ return (e, n) => (P(), T(R(v), {
1093
1128
  id: t.id,
1094
1129
  class: "top-projectSelectorSubmenu",
1095
1130
  notch: !1,
1096
1131
  pos: "2"
1097
1132
  }, {
1098
- contentList: U(({ data: t }) => [t ? (I(), O(w, { key: 0 }, [(I(!0), O(w, null, R(o(t.projectItem), (t) => (I(), E(B(v), {
1133
+ contentList: V(({ data: t }) => [t ? (P(), D(C, { key: 0 }, [(P(!0), D(C, null, I(o(t.projectItem), (t) => (P(), T(R(g), {
1099
1134
  href: t.href,
1100
1135
  title: t.title,
1101
1136
  "data-top-icon": t.icon,
1102
1137
  "data-right": t.right
1103
1138
  }, {
1104
- default: U(() => [j(z(e.$core.state.isMobile ? t.title : ""), 1)]),
1139
+ default: V(() => [k(L(e.$core.state.isMobile ? t.title : ""), 1)]),
1105
1140
  _: 2
1106
1141
  }, 1032, [
1107
1142
  "href",
1108
1143
  "title",
1109
1144
  "data-top-icon",
1110
1145
  "data-right"
1111
- ]))), 256)), M(B(v), {
1146
+ ]))), 256)), A(R(g), {
1112
1147
  href: t.projectItem.externalLink,
1113
1148
  title: t.projectItem.externalLink,
1114
1149
  class: "top-ellipsis",
1115
1150
  "data-top-icon": "",
1116
1151
  target: "_blank"
1117
1152
  }, {
1118
- default: U(() => [k("span", _t, z(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
1153
+ default: V(() => [O("span", bt, L(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
1119
1154
  _: 2
1120
- }, 1032, ["href", "title"])], 64)) : D("", !0)]),
1155
+ }, 1032, ["href", "title"])], 64)) : E("", !0)]),
1121
1156
  _: 1
1122
1157
  }, 8, ["id"]));
1123
1158
  }
1124
- }), X = "ui_project_selector_total", yt = 864e5, bt = L(null), Z = ue(), xt = (e) => {
1125
- localStorage.setItem(X + ":" + r.state.userId, JSON.stringify({
1159
+ }), J = "ui_project_selector_total", St = 864e5, Y = F(null), X = de(), Ct = (e) => {
1160
+ localStorage.setItem(J + ":" + r.state.userId, JSON.stringify({
1126
1161
  projectsTotal: e,
1127
- expiresAt: Date.now() + yt
1162
+ expiresAt: Date.now() + St
1128
1163
  }));
1129
- }, St = () => {
1130
- let e = localStorage.getItem(X + ":" + r.state.userId);
1164
+ }, wt = () => {
1165
+ let e = localStorage.getItem(J + ":" + r.state.userId);
1131
1166
  if (!e) return;
1132
1167
  let { projectsTotal: t, expiresAt: n } = JSON.parse(e);
1133
1168
  if (Date.now() > n) {
1134
- localStorage.removeItem(X + ":" + r.state.userId);
1169
+ localStorage.removeItem(J + ":" + r.state.userId);
1135
1170
  return;
1136
1171
  }
1137
1172
  return t;
1138
- }, Ct = () => {
1139
- bt.value = null, Z.value = void 0, localStorage.removeItem(X + ":" + r.state.userId), S("/get/projects_2/projects/");
1140
- }, wt = { class: "top-projectSelector_itemText" }, Tt = { class: "top-comment" }, Et = {
1173
+ }, Tt = () => {
1174
+ Y.value = null, X.value = void 0, localStorage.removeItem(J + ":" + r.state.userId), x("/get/projects_2/projects/");
1175
+ }, Et = { class: "top-projectSelector_itemText" }, Dt = { class: "top-comment" }, Ot = {
1141
1176
  key: 0,
1142
1177
  class: "top-comment"
1143
- }, Dt = ["href"], Ot = 1e3, kt = /* @__PURE__ */ N({
1178
+ }, kt = ["href"], At = 1e3, jt = /* @__PURE__ */ j({
1144
1179
  __name: "projectSelector",
1145
- props: /*@__PURE__*/ P({
1180
+ props: /*@__PURE__*/ M({
1146
1181
  modelValue: {},
1147
1182
  client: {},
1148
1183
  menuMode: { type: Boolean },
@@ -1163,86 +1198,69 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1163
1198
  }),
1164
1199
  emits: ["update:modelValue"],
1165
1200
  setup(e, { expose: t }) {
1166
- let i = n(), a = e, o = V(e, "modelValue"), s = ht(a.client), c = gt(a.client), l = L(St()), f = L(null), p = fe(), m = !1, h = T(() => a.placeholder ?? i.Projects.Select_project), _ = T(() => Z.value ? ct(a.excludeProjectId ? Z.value.filter((e) => e.id !== a.excludeProjectId) : Z.value) : void 0), v = (e) => typeof e.id == "number" && "on" in e && "right" in e, ee = (e) => {
1167
- let t = e.filter(v), n = e.filter((e) => !v(e));
1168
- return [...ct(t), ...n];
1169
- }, y = (e = !1) => {
1170
- let t = Z.value && S.value === "static" ? Z.value : f.value?.getLoadedItems();
1171
- if (!t) return null;
1172
- let n = t.findIndex((e) => e.id === o.value.id);
1173
- return n === -1 ? null : n === 0 && e ? !1 : t[n + (e ? -1 : 1)]?.id ?? null;
1174
- }, x = async (e = !1) => {
1175
- if (!f.value || m) return;
1176
- if (S.value || await P(), S.value === "static" && !await A()) {
1177
- m = !1;
1178
- return;
1179
- }
1180
- let t = y(e);
1181
- if (S.value === "api") {
1182
- for (m = !0; f.value.getNextOffset() !== null && t === null && await f.value.loadItems(f.value.getNextOffset() !== void 0);) t = y(e);
1183
- m = !1;
1184
- }
1185
- t && ut(t);
1186
- }, S = T(() => {
1187
- if (l.value || l.value === 0) return l.value < Ot ? "static" : "api";
1188
- }), C = async () => {
1189
- bt.value ||= s.call();
1190
- let e = await bt.value;
1191
- return bt.value = null, e;
1192
- }, A = async () => {
1193
- if (Z.value) return !0;
1194
- let e = await C();
1195
- return !e.errors && (Z.value = e.result, !0);
1196
- }, N = async (e) => {
1201
+ let i = n(), a = e, o = z(e, "modelValue"), s = _t(a.client), c = yt(a.client), l = F(wt()), f = F(null), p = pe(), m = w(() => a.placeholder ?? i.Projects.Select_project), ee = w(() => !X.value || !a.excludeProjectId ? X.value : X.value.filter((e) => e.id !== a.excludeProjectId)), { getNextProjectId: g } = vt(a.client), _ = async (e = !1) => {
1202
+ let t = o.value.id;
1203
+ if (!t) return;
1204
+ let n = await g(t, e);
1205
+ n && ft(n);
1206
+ }, v = w(() => {
1207
+ if (l.value || l.value === 0) return l.value < At ? "static" : "api";
1208
+ }), b = async () => {
1209
+ Y.value ||= s.call();
1210
+ let e = await Y.value;
1211
+ return Y.value = null, e;
1212
+ }, x = async (e) => {
1197
1213
  let t = await c.changeParams({
1198
1214
  url: e.name,
1199
1215
  name: e.name
1200
1216
  }).call();
1201
1217
  if (!t.errors) {
1202
- if (Z.value && S.value === "static") {
1203
- let n = {
1218
+ if (X.value && v.value === "static") {
1219
+ let n = lt({
1204
1220
  id: t.result,
1205
1221
  user_id: r.state.userId,
1206
1222
  name: e.name,
1207
1223
  url: e.name,
1208
1224
  on: 0,
1209
1225
  right: "11111111111111111111"
1210
- }, i = Z.value.findIndex((e) => e.on === 0);
1211
- Z.value = [
1212
- ...Z.value.slice(0, i),
1226
+ }), i = X.value.findIndex((e) => e.on === 0);
1227
+ X.value = [
1228
+ ...X.value.slice(0, i),
1213
1229
  n,
1214
- ...Z.value.slice(i)
1215
- ], l.value && (l.value += 1, xt(l.value));
1230
+ ...X.value.slice(i)
1231
+ ], l.value && (l.value += 1, Ct(l.value));
1216
1232
  }
1217
- S.value === "api" && f.value?.resetCache(!0);
1233
+ v.value === "api" && f.value?.resetCache(!0);
1218
1234
  }
1235
+ }, S = async () => {
1236
+ if (X.value || v.value === "api") return;
1237
+ let e = await b();
1238
+ e.errors || (X.value = e.result);
1219
1239
  }, te = async () => {
1220
- S.value === "static" && await A();
1221
- }, P = async () => {
1222
1240
  if (l.value) {
1223
1241
  let e = f.value?.popupOpenerRef?.$el;
1224
- e && e.addEventListener("pointerenter", () => te(), { once: !0 });
1242
+ e && e.addEventListener("pointerenter", () => S(), { once: !0 });
1225
1243
  } else {
1226
- s.changeParams({ limit: Ot });
1227
- let e = await C();
1244
+ s.changeParams({ limit: At });
1245
+ let e = await b();
1228
1246
  if (e.errors) return;
1229
- delete s.params.limit, l.value = e.total ?? void 0, !Z.value && S.value !== "api" && (Z.value = e.result), l.value && xt(l.value);
1247
+ delete s.params.limit, l.value = e.total ?? void 0, !X.value && v.value !== "api" && (X.value = e.result), l.value && Ct(l.value);
1230
1248
  }
1231
1249
  };
1232
- return t({ goToNextProject: x }), ie(async () => {
1233
- await P();
1250
+ return t({ goToNextProject: _ }), ae(async () => {
1251
+ await te();
1234
1252
  }), (t, n) => {
1235
- let r = se("TopButton");
1236
- return I(), O(w, null, [(I(), E(b, {
1237
- key: S.value ?? "dummy",
1253
+ let r = ce("TopButton");
1254
+ return P(), D(C, null, [(P(), T(y, {
1255
+ key: v.value ?? "dummy",
1238
1256
  ref_key: "refSelector",
1239
1257
  ref: f,
1240
1258
  class: "top-projectSelector",
1241
1259
  modelValue: o.value,
1242
- "onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? B(ut)(t.id) : o.value = t,
1243
- items: _.value,
1260
+ "onUpdate:modelValue": n[1] ||= (t) => e.menuMode ? R(ft)(t.id) : o.value = t,
1261
+ items: ee.value,
1244
1262
  itemsChunkSize: 100,
1245
- itemsIsLoading: S.value === "static" && B(Z) === void 0,
1263
+ itemsIsLoading: v.value === "static" && R(X) === void 0,
1246
1264
  title: t.$i18n.Projects.Search_projects,
1247
1265
  modificator: e.modificator,
1248
1266
  searchFields: [
@@ -1250,53 +1268,52 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1250
1268
  "name",
1251
1269
  "url"
1252
1270
  ],
1253
- placeholder: h.value,
1271
+ placeholder: m.value,
1254
1272
  hasCloserBtn: "",
1255
- api: S.value === "api" ? B(s) : void 0,
1256
- apiSetSearchParams: S.value === "api" ? (...e) => B(mt)(...e) : void 0,
1273
+ api: v.value === "api" ? R(s) : void 0,
1274
+ apiSetSearchParams: v.value === "api" ? (...e) => R(gt)(...e) : void 0,
1257
1275
  useCache: "",
1258
1276
  appendSearchToResult: "",
1259
1277
  appendSearchAllowDuplicate: "",
1260
- appendSearchToResultCond: B(u),
1278
+ appendSearchToResultCond: R(u),
1261
1279
  appendWithoutSelect: "",
1262
1280
  buttonProps: {
1263
1281
  ...e.buttonProps,
1264
- isProgress: !S.value,
1265
- disabled: !S.value
1282
+ isProgress: !v.value,
1283
+ disabled: !v.value
1266
1284
  },
1267
1285
  openerShortcut: e.openerShortcut,
1268
- prepareItemsBeforeRender: S.value === "api" ? ee : void 0,
1269
- onAppendItem: N,
1270
- onOpen: te
1286
+ onAppendItem: x,
1287
+ onOpen: S
1271
1288
  }, {
1272
- item: U(({ item: i }) => [k("div", wt, [i.id ? (I(), O(w, { key: 0 }, [j(z(B(d)(i.name, 20)) + " ", 1), k("span", Tt, " id " + z(i.id), 1)], 64)) : (I(), O(w, { key: 1 }, [i.listItemProps?.type ? D("", !0) : (I(), O("div", Et, z(t.$i18n.Projects.Add_project) + ": ", 1)), j(" " + z(i.name), 1)], 64))]), i.id ? (I(), O(w, { key: 0 }, [
1273
- e.menuMode ? (I(), O("a", {
1289
+ item: V(({ item: i }) => [O("div", Et, [i.id ? (P(), D(C, { key: 0 }, [k(L(R(d)(i.name, 20)) + " ", 1), O("span", Dt, " id " + L(i.id), 1)], 64)) : (P(), D(C, { key: 1 }, [i.listItemProps?.type ? E("", !0) : (P(), D("div", Ot, L(t.$i18n.Projects.Add_project) + ": ", 1)), k(" " + L(i.name), 1)], 64))]), i.id ? (P(), D(C, { key: 0 }, [
1290
+ e.menuMode ? (P(), D("a", {
1274
1291
  key: 0,
1275
1292
  class: "top-projectSelector_itemLink",
1276
- href: B(dt)(i.id)
1277
- }, null, 8, Dt)) : D("", !0),
1278
- t.$core.state.isMobile ? D("", !0) : (I(), E(r, {
1293
+ href: R(pt)(i.id)
1294
+ }, null, 8, kt)) : E("", !0),
1295
+ t.$core.state.isMobile ? E("", !0) : (P(), T(r, {
1279
1296
  key: 1,
1280
1297
  href: i.externalLink,
1281
1298
  "data-top-icon": "",
1282
1299
  color: "theme",
1283
1300
  target: "_blank",
1284
- onClick: n[0] ||= W(() => {}, ["stop"])
1301
+ onClick: n[0] ||= H(() => {}, ["stop"])
1285
1302
  }, null, 8, ["href"])),
1286
- M(g, {
1287
- id: B(p),
1303
+ A(h, {
1304
+ id: R(p),
1288
1305
  pos: "2",
1289
1306
  notch: !1,
1290
1307
  data: { projectItem: i }
1291
1308
  }, {
1292
- default: U(() => [M(r, {
1309
+ default: V(() => [A(r, {
1293
1310
  class: "top-popup_listMore",
1294
1311
  "data-top-icon": "",
1295
1312
  color: "theme"
1296
1313
  })]),
1297
1314
  _: 1
1298
1315
  }, 8, ["id", "data"])
1299
- ], 64)) : D("", !0)]),
1316
+ ], 64)) : E("", !0)]),
1300
1317
  _: 1
1301
1318
  }, 8, [
1302
1319
  "modelValue",
@@ -1309,45 +1326,44 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1309
1326
  "apiSetSearchParams",
1310
1327
  "appendSearchToResultCond",
1311
1328
  "buttonProps",
1312
- "openerShortcut",
1313
- "prepareItemsBeforeRender"
1314
- ])), M(vt, { id: B(p) }, null, 8, ["id"])], 64);
1329
+ "openerShortcut"
1330
+ ])), A(xt, { id: R(p) }, null, 8, ["id"])], 64);
1315
1331
  };
1316
1332
  }
1317
- }), At = (e) => "-" + e, Q = (e) => e[0] === "-" ? e.substring(1) : e, jt = (e, t) => {
1318
- e = Q(e);
1333
+ }), Mt = (e) => "-" + e, Z = (e) => e[0] === "-" ? e.substring(1) : e, Nt = (e, t) => {
1334
+ e = Z(e);
1319
1335
  let n = t.find((t) => t.id === e);
1320
1336
  if (n) return n;
1321
- }, Mt = (e, t, n) => {
1337
+ }, Pt = (e, t, n) => {
1322
1338
  t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
1323
1339
  let r = c.genElPopupOpener("div", t);
1324
1340
  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) => {
1325
1341
  t.preventDefault(), t.stopPropagation(), r.onclick = null;
1326
- let i = L(e.modelValue), a = {
1342
+ let i = F(e.modelValue), a = {
1327
1343
  model: i,
1328
1344
  mode: e.mode,
1329
1345
  targetId: e.targetId,
1330
1346
  filters: e.filters,
1331
1347
  payload: e.payload
1332
1348
  };
1333
- s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, te(e.modelValue) || H(i, () => {
1334
- e.modelValue = i.value, Pt(r, e, n);
1349
+ s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, ne(e.modelValue) || B(i, () => {
1350
+ e.modelValue = i.value, It(r, e, n);
1335
1351
  }), r.click();
1336
- }, te(e.modelValue) ? H(e.modelValue, () => Pt(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1352
+ }, ne(e.modelValue) ? B(e.modelValue, () => It(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1337
1353
  e.modelValue = t;
1338
1354
  let i = s(r, "topTagSelectorTarget");
1339
- i && (i.model.value = t), Pt(r, e, n);
1340
- }), Pt(r, e, n), r;
1341
- }, Nt = (e, t) => {
1355
+ i && (i.model.value = t), It(r, e, n);
1356
+ }), It(r, e, n), r;
1357
+ }, Ft = (e, t) => {
1342
1358
  s(e, "topTagSelectorRender")?.(t);
1343
- }, Pt = (e, t, r) => {
1344
- let i = B(t.modelValue);
1359
+ }, It = (e, t, r) => {
1360
+ let i = R(t.modelValue);
1345
1361
  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) {
1346
1362
  e.innerHTML = `<div>${r}</div>`;
1347
1363
  return;
1348
1364
  }
1349
1365
  if (e.innerHTML = "", !i.length && t.mode === "filter") {
1350
- let t = Ft({
1366
+ let t = Lt({
1351
1367
  id: "all",
1352
1368
  colorId: "",
1353
1369
  name: n().Common?.All_tags ?? "",
@@ -1356,18 +1372,18 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1356
1372
  e.append(t);
1357
1373
  }
1358
1374
  i.forEach((n) => {
1359
- let r = Ft({
1360
- id: Q(n),
1361
- colorId: jt(n, t.tags)?.color_id ?? "",
1362
- name: jt(n, t.tags)?.name ?? "",
1363
- state: Q(n) === n ? "selected" : "excluded"
1375
+ let r = Lt({
1376
+ id: Z(n),
1377
+ colorId: Nt(n, t.tags)?.color_id ?? "",
1378
+ name: Nt(n, t.tags)?.name ?? "",
1379
+ state: Z(n) === n ? "selected" : "excluded"
1364
1380
  });
1365
1381
  e.append(r);
1366
1382
  });
1367
- }, Ft = (e) => {
1383
+ }, Lt = (e) => {
1368
1384
  let t = document.createElement("div");
1369
1385
  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;
1370
- }, It = [
1386
+ }, Rt = [
1371
1387
  {
1372
1388
  id: "1",
1373
1389
  name: "Without Tag",
@@ -1418,11 +1434,11 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1418
1434
  name: "Turquoise",
1419
1435
  color_id: "10"
1420
1436
  }
1421
- ], Lt = [
1437
+ ], zt = [
1422
1438
  "data-tag_id",
1423
1439
  "data-tag_color_id",
1424
1440
  "title"
1425
- ], Rt = /* @__PURE__ */ N({
1441
+ ], Q = /* @__PURE__ */ j({
1426
1442
  __name: "tagIcon",
1427
1443
  props: {
1428
1444
  id: {},
@@ -1431,8 +1447,8 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1431
1447
  state: {}
1432
1448
  },
1433
1449
  setup(e) {
1434
- return (t, n) => (I(), O("div", {
1435
- class: F({
1450
+ return (t, n) => (P(), D("div", {
1451
+ class: N({
1436
1452
  "top-tagSelector_tagIcon": !0,
1437
1453
  "top-tagSelector-active": !!e.state,
1438
1454
  "top-tagSelector-excluded": e.state === "excluded"
@@ -1440,11 +1456,11 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1440
1456
  "data-tag_id": e.id,
1441
1457
  "data-tag_color_id": e.colorId,
1442
1458
  title: e.name
1443
- }, null, 10, Lt));
1459
+ }, null, 10, zt));
1444
1460
  }
1445
- }), zt = ["contenteditable", "onKeydown"], Bt = /* @__PURE__ */ N({
1461
+ }), Bt = ["contenteditable", "onKeydown"], Vt = /* @__PURE__ */ j({
1446
1462
  __name: "tagPopupListItem",
1447
- props: /*@__PURE__*/ P({
1463
+ props: /*@__PURE__*/ M({
1448
1464
  editable: { type: Boolean },
1449
1465
  disabled: { type: Boolean },
1450
1466
  canExclude: { type: Boolean },
@@ -1456,18 +1472,18 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1456
1472
  name: { required: !0 },
1457
1473
  nameModifiers: {}
1458
1474
  }),
1459
- emits: /*@__PURE__*/ P([
1475
+ emits: /*@__PURE__*/ M([
1460
1476
  "update:name",
1461
1477
  "unselect",
1462
1478
  "exclude",
1463
1479
  "select"
1464
1480
  ], ["update:name"]),
1465
1481
  setup(e, { emit: t }) {
1466
- let n = e, r = t, i = V(e, "name"), a = L(null), o = T(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
1482
+ let n = e, r = t, i = z(e, "name"), a = F(null), o = w(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
1467
1483
  contenteditable: s.value,
1468
1484
  onpaste: (e) => e.preventDefault()
1469
- }), s = L(!1), c = async () => {
1470
- s.value = !0, await re(), a.value?.focus();
1485
+ }), s = F(!1), c = async () => {
1486
+ s.value = !0, await ie(), a.value?.focus();
1471
1487
  }, l = () => {
1472
1488
  let e = a.value?.innerText;
1473
1489
  if (!e) return u();
@@ -1479,8 +1495,8 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1479
1495
  let t = "selected";
1480
1496
  n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
1481
1497
  };
1482
- return (t, n) => (I(), E(v, {
1483
- class: F({
1498
+ return (t, n) => (P(), T(g, {
1499
+ class: N({
1484
1500
  "top-tagSelector_tagListItem": !0,
1485
1501
  "top-tagSelector_tagListItem-inEdit": s.value,
1486
1502
  "top-tagSelector_tagListItem-disabled": e.disabled,
@@ -1488,10 +1504,10 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1488
1504
  "top-tagSelector-active": !!e.state,
1489
1505
  "top-tagSelector-excluded": e.state === "excluded"
1490
1506
  }),
1491
- onClick: W(d, ["stop"])
1507
+ onClick: H(d, ["stop"])
1492
1508
  }, {
1493
- default: U(() => [
1494
- M(Rt, {
1509
+ default: V(() => [
1510
+ A(Q, {
1495
1511
  id: e.id,
1496
1512
  name: i.value,
1497
1513
  colorId: e.colorId,
@@ -1502,31 +1518,31 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1502
1518
  "colorId",
1503
1519
  "state"
1504
1520
  ]),
1505
- k("span", ne({
1521
+ O("span", re({
1506
1522
  ref_key: "elName",
1507
1523
  ref: a,
1508
1524
  class: "top-tagSelector_tagListItemName",
1509
1525
  contenteditable: s.value ? "plaintext-only" : !1
1510
- }, o.value, { onKeydown: [me(W(l, ["stop"]), ["enter"]), me(W(u, ["stop"]), ["esc"])] }), z(i.value), 17, zt),
1511
- e.editable ? (I(), O(w, { key: 0 }, [s.value ? (I(), O("span", {
1526
+ }, o.value, { onKeydown: [he(H(l, ["stop"]), ["enter"]), he(H(u, ["stop"]), ["esc"])] }), L(i.value), 17, Bt),
1527
+ e.editable ? (P(), D(C, { key: 0 }, [s.value ? (P(), D("span", {
1512
1528
  key: 1,
1513
1529
  "data-top-icon": "",
1514
1530
  class: "top-tagSelector_edit",
1515
- onClick: W(l, ["stop"])
1516
- })) : (I(), O("span", {
1531
+ onClick: H(l, ["stop"])
1532
+ })) : (P(), D("span", {
1517
1533
  key: 0,
1518
1534
  "data-top-icon": "",
1519
1535
  class: "top-tagSelector_edit",
1520
1536
  onClick: c
1521
- }))], 64)) : D("", !0)
1537
+ }))], 64)) : E("", !0)
1522
1538
  ]),
1523
1539
  _: 1
1524
1540
  }, 8, ["class"]));
1525
1541
  }
1526
- }), Vt = { key: 1 }, Ht = /* @__PURE__ */ N({
1542
+ }), Ht = { key: 1 }, Ut = /* @__PURE__ */ j({
1527
1543
  inheritAttrs: !1,
1528
1544
  __name: "popupOpener",
1529
- props: /*@__PURE__*/ P({
1545
+ props: /*@__PURE__*/ M({
1530
1546
  modelValue: {},
1531
1547
  id: {},
1532
1548
  tags: {},
@@ -1542,7 +1558,7 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1542
1558
  }),
1543
1559
  emits: ["update:modelValue"],
1544
1560
  setup(e, { attrs: t }) {
1545
- let n = e, r = V(e, "modelValue"), i = n.useTopButton ? a : "div", o = n.useTopButton ? "html" : "default", s = {
1561
+ let n = e, r = z(e, "modelValue"), i = n.useTopButton ? a : "div", o = n.useTopButton ? "html" : "default", s = {
1546
1562
  model: r,
1547
1563
  mode: n.mode,
1548
1564
  targetId: n.targetId,
@@ -1550,9 +1566,9 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1550
1566
  payload: n.payload
1551
1567
  };
1552
1568
  return (a, c) => {
1553
- let l = ce("top-data");
1554
- return I(), E(g, { id: e.id }, {
1555
- default: U(() => [pe((I(), E(le(B(i)), ne({
1569
+ let l = le("top-data");
1570
+ return P(), T(h, { id: e.id }, {
1571
+ default: V(() => [me((P(), T(ue(R(i)), re({
1556
1572
  class: {
1557
1573
  "top-tagSelector": !0,
1558
1574
  "top-tagSelector-useTopButton": n.useTopButton,
@@ -1567,17 +1583,17 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1567
1583
  color: "theme",
1568
1584
  styling: e.styling
1569
1585
  }, t), {
1570
- [B(o)]: U(() => [!r.value.length && e.mode === "filter" ? (I(), E(Rt, {
1586
+ [R(o)]: V(() => [!r.value.length && e.mode === "filter" ? (P(), T(Q, {
1571
1587
  key: 0,
1572
1588
  id: "all",
1573
1589
  colorId: "",
1574
1590
  name: a.$i18n.Common.All_tags ?? "",
1575
1591
  state: ""
1576
- }, null, 8, ["name"])) : D("", !0), e.mode === "setter" && e.filters ? (I(), O("div", Vt, [oe(a.$slots, "default")])) : (I(!0), O(w, { key: 2 }, R(r.value, (t) => (I(), E(Rt, {
1577
- id: B(Q)(t),
1578
- colorId: B(jt)(t, e.tags)?.color_id ?? "",
1579
- name: B(jt)(t, e.tags)?.name ?? "",
1580
- state: B(Q)(t) === t ? "selected" : "excluded"
1592
+ }, null, 8, ["name"])) : E("", !0), e.mode === "setter" && e.filters ? (P(), D("div", Ht, [se(a.$slots, "default")])) : (P(!0), D(C, { key: 2 }, I(r.value, (t) => (P(), T(Q, {
1593
+ id: R(Z)(t),
1594
+ colorId: R(Nt)(t, e.tags)?.color_id ?? "",
1595
+ name: R(Nt)(t, e.tags)?.name ?? "",
1596
+ state: R(Z)(t) === t ? "selected" : "excluded"
1581
1597
  }, null, 8, [
1582
1598
  "id",
1583
1599
  "colorId",
@@ -1594,9 +1610,9 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1594
1610
  }, 8, ["id"]);
1595
1611
  };
1596
1612
  }
1597
- }), Ut = /* @__PURE__ */ N({
1613
+ }), Wt = /* @__PURE__ */ j({
1598
1614
  __name: "tagSelector",
1599
- props: /*@__PURE__*/ P({
1615
+ props: /*@__PURE__*/ M({
1600
1616
  modelValue: {},
1601
1617
  tags: {},
1602
1618
  tagsEditable: { type: Boolean },
@@ -1617,20 +1633,20 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1617
1633
  }, {
1618
1634
  modelValue: { required: !0 },
1619
1635
  modelModifiers: {},
1620
- tags: { default: ae(It) },
1636
+ tags: { default: oe(Rt) },
1621
1637
  tagsModifiers: {}
1622
1638
  }),
1623
- emits: /*@__PURE__*/ P([
1639
+ emits: /*@__PURE__*/ M([
1624
1640
  "selector",
1625
1641
  "setter",
1626
1642
  "tagsChanged"
1627
1643
  ], ["update:modelValue", "update:tags"]),
1628
1644
  setup(e, { emit: t }) {
1629
- let c = n(), l = e, u = V(e, "modelValue"), d = V(e, "tags"), f = t, p = i((e, t) => {
1645
+ let c = n(), l = e, u = z(e, "modelValue"), d = z(e, "tags"), f = t, p = i((e, t) => {
1630
1646
  f(e, t);
1631
1647
  }, l.emitDelay);
1632
1648
  l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
1633
- let m = l.id ?? "top-popup-id-" + Math.random(), h = L("add"), g = () => {
1649
+ let m = l.id ?? "top-popup-id-" + Math.random(), h = F("add"), ee = () => {
1634
1650
  let e = " " + c.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
1635
1651
  return t.set("add", {
1636
1652
  value: "add",
@@ -1642,35 +1658,35 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1642
1658
  value: "delete",
1643
1659
  title: c.Common.Delete + e
1644
1660
  }), t;
1645
- }, _ = ue({
1661
+ }, _ = de({
1646
1662
  model: u,
1647
1663
  mode: "filter",
1648
1664
  targetId: void 0,
1649
1665
  filters: void 0,
1650
1666
  payload: void 0
1651
1667
  });
1652
- H(u, () => {
1668
+ B(u, () => {
1653
1669
  p("selector", u.value);
1654
1670
  });
1655
- let ee = T(() => {
1671
+ let y = w(() => {
1656
1672
  if (_.value.mode === "setter" && l.maxTagsForSetter && !_.value.filters) return _.value.model.value.length >= l.maxTagsForSetter;
1657
1673
  }), b = (e) => {
1658
1674
  if (e !== "all") {
1659
1675
  if (_.value.model.value.includes(e)) return "selected";
1660
- if (_.value.model.value.includes(At(e))) return "excluded";
1676
+ if (_.value.model.value.includes(Mt(e))) return "excluded";
1661
1677
  }
1662
1678
  return e === "all" && !_.value.model.value.length ? "selected" : "";
1663
1679
  }, x = (e, t) => {
1664
- let n = At(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
1680
+ let n = Mt(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
1665
1681
  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", {
1666
1682
  tagsIds: r,
1667
1683
  targetId: _.value.targetId,
1668
1684
  payload: _.value.payload
1669
1685
  });
1670
- }, S = T(() => {
1686
+ }, S = w(() => {
1671
1687
  let e = "top-tagSelector_popup";
1672
1688
  return _.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), _.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
1673
- }), C = () => {
1689
+ }), O = () => {
1674
1690
  let e = prompt("", "New tag");
1675
1691
  if (!e || e === "New tag") return;
1676
1692
  let t = d.value.length + 1;
@@ -1679,7 +1695,7 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1679
1695
  name: e,
1680
1696
  color_id: String((t - 1) % 10 + 1)
1681
1697
  }), f("tagsChanged", d.value);
1682
- }, k = (e) => {
1698
+ }, j = (e) => {
1683
1699
  if (_.value = s(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1684
1700
  if (_.value.filters && (h.value = "add", _.value.model.value = []), !r.$?.ui.sortable) {
1685
1701
  console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
@@ -1699,13 +1715,13 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1699
1715
  }), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
1700
1716
  }
1701
1717
  });
1702
- }, N = (e) => {
1718
+ }, ne = (e) => {
1703
1719
  r.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
1704
1720
  };
1705
- return (t, n) => (I(), O(w, null, [M(Ht, {
1721
+ return (t, n) => (P(), D(C, null, [A(Ut, {
1706
1722
  modelValue: u.value,
1707
1723
  "onUpdate:modelValue": n[0] ||= (e) => u.value = e,
1708
- id: B(m),
1724
+ id: R(m),
1709
1725
  tags: d.value,
1710
1726
  styling: e.styling,
1711
1727
  mode: "filter",
@@ -1716,23 +1732,23 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1716
1732
  "tags",
1717
1733
  "styling",
1718
1734
  "useTopButton"
1719
- ]), M(y, {
1720
- id: B(m),
1721
- class: F(S.value),
1722
- onOpen: n[4] ||= (e) => k(e),
1723
- onClose: n[5] ||= (e) => N(e),
1735
+ ]), A(v, {
1736
+ id: R(m),
1737
+ class: N(S.value),
1738
+ onOpen: n[4] ||= (e) => j(e),
1739
+ onClose: n[5] ||= (e) => ne(e),
1724
1740
  "transition-duration": 50
1725
- }, A({
1726
- contentList: U(() => [
1727
- _.value.mode === "filter" && !e.singleMode ? (I(), E(Bt, {
1741
+ }, te({
1742
+ contentList: V(() => [
1743
+ _.value.mode === "filter" && !e.singleMode ? (P(), T(Vt, {
1728
1744
  key: 0,
1729
1745
  id: "all",
1730
1746
  colorId: "",
1731
1747
  name: t.$i18n.Common.All_tags ?? "",
1732
1748
  state: _.value.model.value.length ? "" : "selected",
1733
1749
  onSelect: n[3] ||= (e) => _.value.model.value = []
1734
- }, null, 8, ["name", "state"])) : D("", !0),
1735
- (I(!0), O(w, null, R(d.value, (t) => (I(), E(Bt, {
1750
+ }, null, 8, ["name", "state"])) : E("", !0),
1751
+ (P(!0), D(C, null, I(d.value, (t) => (P(), T(Vt, {
1736
1752
  key: t.id,
1737
1753
  id: t.id,
1738
1754
  colorId: t.color_id,
@@ -1740,12 +1756,12 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1740
1756
  state: b(t.id),
1741
1757
  canExclude: _.value.mode === "filter" && !e.singleMode,
1742
1758
  editable: e.tagsEditable,
1743
- disabled: ee.value && b(t.id) === "",
1759
+ disabled: y.value && b(t.id) === "",
1744
1760
  onUnselect: (e) => x(t.id, "unselect"),
1745
1761
  onSelect: (e) => x(t.id, "select"),
1746
1762
  onExclude: (e) => x(t.id, "exclude"),
1747
1763
  "onUpdate:name": (e) => {
1748
- t.name = e, B(p)("tagsChanged", d.value);
1764
+ t.name = e, R(p)("tagsChanged", d.value);
1749
1765
  }
1750
1766
  }, null, 8, [
1751
1767
  "id",
@@ -1760,36 +1776,36 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1760
1776
  "onExclude",
1761
1777
  "onUpdate:name"
1762
1778
  ]))), 128)),
1763
- e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (I(), E(v, {
1779
+ e.tagsEditable && d.value.length < e.tagsMax && d.value.length < 20 ? (P(), T(g, {
1764
1780
  key: 1,
1765
1781
  "data-top-icon": "",
1766
- onClick: W(C, ["stop"])
1782
+ onClick: H(O, ["stop"])
1767
1783
  }, {
1768
- default: U(() => [j(z(t.$i18n.Common.Add), 1)]),
1784
+ default: V(() => [k(L(t.$i18n.Common.Add), 1)]),
1769
1785
  _: 1
1770
- })) : D("", !0)
1786
+ })) : E("", !0)
1771
1787
  ]),
1772
1788
  _: 2
1773
1789
  }, [_.value.mode === "setter" && _.value.filters ? {
1774
1790
  name: "header",
1775
- fn: U(() => [M(o, {
1791
+ fn: V(() => [A(o, {
1776
1792
  modelValue: h.value,
1777
1793
  "onUpdate:modelValue": n[1] ||= (e) => h.value = e,
1778
- options: g()
1794
+ options: ee()
1779
1795
  }, null, 8, ["modelValue", "options"])]),
1780
1796
  key: "0"
1781
1797
  } : void 0, _.value.mode === "setter" && _.value.filters ? {
1782
1798
  name: "footer",
1783
- fn: U(() => [M(a, { color: "theme" }, {
1784
- default: U(() => [j(z(t.$i18n.Common.Cancel), 1)]),
1799
+ fn: V(() => [A(a, { color: "theme" }, {
1800
+ default: V(() => [k(L(t.$i18n.Common.Cancel), 1)]),
1785
1801
  _: 1
1786
- }), M(a, { onClick: n[2] ||= (e) => B(p)("setter", {
1802
+ }), A(a, { onClick: n[2] ||= (e) => R(p)("setter", {
1787
1803
  tagsIds: _.value.model.value,
1788
1804
  filters: _.value.filters,
1789
1805
  filtersAction: h.value,
1790
1806
  payload: _.value.payload
1791
1807
  }) }, {
1792
- default: U(() => [j(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)]),
1808
+ default: V(() => [k(L(h.value === "add" ? t.$i18n.Common.Add : "") + " " + L(h.value === "replace" ? t.$i18n.Common.Replace : "") + " " + L(h.value === "delete" ? t.$i18n.Common.Delete : ""), 1)]),
1793
1809
  _: 1
1794
1810
  })]),
1795
1811
  key: "1"
@@ -1797,6 +1813,6 @@ var Ue = ["innerHTML"], We = /* @__PURE__ */ N({
1797
1813
  }
1798
1814
  });
1799
1815
  //#endregion
1800
- export { _e as TopCompetitorSelector, it as TopGroupSelector, kt as TopProjectSelector, Re as TopRegionSelector, Ut as TopTagSelector, Ht as TopTagSelectorPopupOpener, Rt as TopTagSelectorTagIcon, ke as dialogRegionSelector, Oe as findRegion, Mt as genElTopTagSelectorPopupOpener, Ae as genSearcherByKey, Nt as renderElTopTagSelectorPopupOpener, Ct as topProjectSelectorClearCache, ve as useItemsFromCompetitors };
1816
+ export { ve as TopCompetitorSelector, at as TopGroupSelector, jt as TopProjectSelector, ze as TopRegionSelector, Wt as TopTagSelector, Ut as TopTagSelectorPopupOpener, Q as TopTagSelectorTagIcon, Ae as dialogRegionSelector, ke as findRegion, Pt as genElTopTagSelectorPopupOpener, je as genSearcherByKey, Ft as renderElTopTagSelectorPopupOpener, Tt as topProjectSelectorClearCache, ye as useItemsFromCompetitors };
1801
1817
 
1802
1818
  //# sourceMappingURL=project.js.map