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