@topvisor/ui 0.0.37 → 0.0.41

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 (72) hide show
  1. package/.chunks/datepicker-7f54fd80.es.js +275 -0
  2. package/.chunks/datepicker-7f54fd80.es.js.map +1 -0
  3. package/.chunks/datepicker-858c1cb6.amd.js +234 -0
  4. package/.chunks/datepicker-858c1cb6.amd.js.map +1 -0
  5. package/.chunks/forms-7f061546.es.js +1108 -0
  6. package/.chunks/forms-7f061546.es.js.map +1 -0
  7. package/.chunks/forms-b9e5edd2.amd.js +3 -0
  8. package/.chunks/forms-b9e5edd2.amd.js.map +1 -0
  9. package/.chunks/{popup-b9517276.es.js → popup-05538243.es.js} +420 -385
  10. package/.chunks/popup-05538243.es.js.map +1 -0
  11. package/.chunks/popup-a531e9ad.amd.js +377 -0
  12. package/.chunks/popup-a531e9ad.amd.js.map +1 -0
  13. package/README.md +80 -62
  14. package/{core.css → assets/core.css} +1 -1
  15. package/assets/forms.css +1 -0
  16. package/assets/popup.css +1 -0
  17. package/common/common.amd.js +1 -1
  18. package/core/core.amd.js +1 -1
  19. package/core/core.js +1 -1
  20. package/forms/forms.amd.js +1 -1
  21. package/forms/forms.js +12 -11
  22. package/forms/helpers.amd.js +1 -1
  23. package/forms/helpers.amd.js.map +1 -1
  24. package/forms/helpers.js +1 -0
  25. package/forms/helpers.js.map +1 -1
  26. package/formsExt/formsExt.amd.js +1 -2
  27. package/formsExt/formsExt.amd.js.map +1 -1
  28. package/formsExt/formsExt.js +90 -86
  29. package/formsExt/formsExt.js.map +1 -1
  30. package/icomoon/demo-files/demo.css +161 -161
  31. package/icomoon/demo-files/demo.js +30 -30
  32. package/icomoon/demo.html +2945 -2945
  33. package/icomoon/fonts/Topvisor-2.svg +232 -232
  34. package/icomoon/style.css +647 -647
  35. package/package.json +19 -19
  36. package/popup/popup.amd.js +1 -2
  37. package/popup/popup.amd.js.map +1 -1
  38. package/popup/popup.js +74 -68
  39. package/popup/popup.js.map +1 -1
  40. package/popup/worker.amd.js +1 -1
  41. package/popup/worker.amd.js.map +1 -1
  42. package/popup/worker.js +2 -3
  43. package/popup/worker.js.map +1 -1
  44. package/tabs/tabs.amd.js +1 -2
  45. package/tabs/tabs.amd.js.map +1 -1
  46. package/tabs/tabs.js +30 -26
  47. package/tabs/tabs.js.map +1 -1
  48. package/utils/date.amd.js +1 -1
  49. package/utils/date.js +1 -1
  50. package/utils/device.amd.js +1 -1
  51. package/utils/device.js +2 -2
  52. package/utils/dom.amd.js +1 -1
  53. package/utils/dom.amd.js.map +1 -1
  54. package/utils/dom.js +3 -61
  55. package/utils/dom.js.map +1 -1
  56. package/.chunks/datepicker-6d57a408.es.js +0 -275
  57. package/.chunks/datepicker-6d57a408.es.js.map +0 -1
  58. package/.chunks/datepicker-a0840577.amd.js +0 -234
  59. package/.chunks/datepicker-a0840577.amd.js.map +0 -1
  60. package/.chunks/forms-1aa30229.amd.js +0 -3
  61. package/.chunks/forms-1aa30229.amd.js.map +0 -1
  62. package/.chunks/forms-7be951a7.es.js +0 -962
  63. package/.chunks/forms-7be951a7.es.js.map +0 -1
  64. package/.chunks/popup-604c0a49.amd.js +0 -341
  65. package/.chunks/popup-604c0a49.amd.js.map +0 -1
  66. package/.chunks/popup-b9517276.es.js.map +0 -1
  67. package/forms.css +0 -1
  68. package/popup.css +0 -1
  69. /package/{dark.css → assets/dark.css} +0 -0
  70. /package/{formsExt.css → assets/formsExt.css} +0 -0
  71. /package/{light.css → assets/light.css} +0 -0
  72. /package/{tabs.css → assets/tabs.css} +0 -0
@@ -0,0 +1,275 @@
1
+ import { watch as g, toRef as m } from "vue";
2
+ import { C as k, U as h } from "./forms-7f061546.es.js";
3
+ const b = `/* ui-datepicker */
4
+ .ui-datepicker {
5
+ --datepicker-day-color: #FFF;
6
+ --datepicker-day-color-hover: var(--color-blue-150);
7
+ --datepicker-selected-color: var(--color-blue-500);
8
+ --datepicker-selected-color-hover: var(--color-blue-550);
9
+ --datepicker-range-color: var(--color-blue-100);
10
+ --datepicker-range-color-hover: var(--color-blue-150);
11
+
12
+ user-select: none;
13
+ width: auto;
14
+ padding: 0;
15
+ }
16
+
17
+ .ui-datepicker:before,
18
+ .ui-datepicker:after {
19
+ display: none;
20
+ }
21
+
22
+ /* на странице */
23
+ .ui-datepicker-inline {
24
+ display: inline-block !important;
25
+ }
26
+
27
+ /* в popup */
28
+ .ui-datepicker:not(.ui-datepicker-inline) {
29
+ border-radius: 8px;
30
+ background: var(--content-background-color);
31
+ box-shadow: var(--top-shadow);
32
+ z-index: 10000000 !important;
33
+ padding: 8px;
34
+ }
35
+
36
+ .ui-datepicker a {
37
+ text-decoration: none !important;
38
+ }
39
+
40
+ .ui-datepicker option {
41
+ color: var(--color-text);
42
+ font-size: 14px;
43
+ }
44
+
45
+ .ui-datepicker-header {
46
+ padding: 0 !important;
47
+ margin: 0 0 18px 0;
48
+ display: flex;
49
+ align-items: center;
50
+ }
51
+
52
+ .ui-datepicker-header > * {
53
+ display: flex;
54
+ align-items: center;
55
+ justify-content: center;
56
+ }
57
+
58
+ .ui-datepicker-title {
59
+ width: 100% !important;
60
+ height: 24px;
61
+ margin: 0 !important;
62
+ }
63
+
64
+ .ui-datepicker-month,
65
+ .ui-datepicker-year {
66
+ outline: none !important;
67
+ width: auto !important;
68
+ border: none;
69
+ padding: 0;
70
+ margin: 0 6px !important;
71
+ text-align: center;
72
+ font-size: 16px !important;
73
+ }
74
+
75
+ .ui-datepicker-month {
76
+ color: var(--color-text);
77
+ }
78
+
79
+ .ui-datepicker-year {
80
+ color: var(--color-gray-300);
81
+ }
82
+
83
+ /* select.ui-datepicker-month,
84
+ select.ui-datepicker-year{ cursor: pointer; color: var(--color-blue-500); }*/
85
+ select.ui-datepicker-month,
86
+ select.ui-datepicker-year {
87
+ cursor: pointer;
88
+ }
89
+
90
+ .ui-datepicker-prev,
91
+ .ui-datepicker-next {
92
+ cursor: pointer;
93
+ width: 24px !important;
94
+ height: 24px !important;
95
+ font-size: 24px;
96
+ font-family: 'Topvisor-2';
97
+ position: static !important;
98
+ }
99
+
100
+ .ui-datepicker-prev:before {
101
+ content: '';
102
+ }
103
+
104
+ .ui-datepicker-next {
105
+ order: 1;
106
+ }
107
+
108
+ .ui-datepicker-next:before {
109
+ content: '';
110
+ }
111
+
112
+ .ui-datepicker-prev > *,
113
+ .ui-datepicker-next > * {
114
+ display: none !important;
115
+ }
116
+
117
+ .ui-datepicker thead th {
118
+ width: auto !important;
119
+ padding: 0 !important;
120
+ color: #B3BEBF;
121
+ font-size: 14px;
122
+ font-weight: 400 !important;
123
+ }
124
+
125
+ .ui-datepicker table {
126
+ margin: 0 !important;
127
+ font-size: 14px;
128
+ }
129
+
130
+ .ui-datepicker td {
131
+ background: none;
132
+ padding: 0 !important;
133
+ }
134
+
135
+ .ui-datepicker td span,
136
+ .ui-datepicker td a {
137
+ border-radius: 8px;
138
+ border: none;
139
+ min-width: 32px;
140
+ height: 32px;
141
+ padding: 0;
142
+ margin: 1px;
143
+ color: var(--color-text) !important;
144
+ line-height: 32px;
145
+ text-align: center;
146
+ position: relative;
147
+ display: block;
148
+ }
149
+
150
+ /* обычные даты */
151
+ .ui-datepicker td a {
152
+ background: var(--datepicker-day-color);
153
+ }
154
+
155
+ .ui-datepicker td a:hover {
156
+ background: var(--datepicker-day-color-hover);
157
+ }
158
+
159
+ /* текущий день */
160
+ td.ui-datepicker-today span,
161
+ td.ui-datepicker-today a {
162
+ background: none;
163
+ position: relative;
164
+ }
165
+
166
+ /* выбранные даты */
167
+ .ui-datepicker td.selected a {
168
+ background: var(--datepicker-range-color);
169
+ padding-right: 0;
170
+ padding-left: 1px;
171
+ margin-right: 1px;
172
+ margin-left: 0;
173
+ }
174
+
175
+ .ui-datepicker td.selected a:hover {
176
+ background: var(--datepicker-range-color-hover);
177
+ }
178
+
179
+ .ui-datepicker td.selected:not(.selected-start):not(:first-child):not(.first-of-month) a {
180
+ border-top-left-radius: 0;
181
+ border-bottom-left-radius: 0;
182
+ padding-left: 1px;
183
+ margin-left: 0;
184
+ }
185
+
186
+ .ui-datepicker td.selected:not(.selected-end):not(:last-child):not(.last-of-month) a {
187
+ border-top-right-radius: 0;
188
+ border-bottom-right-radius: 0;
189
+ padding-right: 1px;
190
+ margin-right: 0;
191
+ }
192
+
193
+ .ui-datepicker td.selected-start a,
194
+ .ui-datepicker td.selected-end a,
195
+ .ui-datepicker td.ui-datepicker-current-day a {
196
+ background: var(--datepicker-selected-color);
197
+ color: #FFF !important;
198
+ }
199
+
200
+ .ui-datepicker td.selected-start a:hover,
201
+ .ui-datepicker td.selected-end a:hover,
202
+ .ui-datepicker td.ui-datepicker-current-day a:hover {
203
+ background: var(--datepicker-selected-color-hover);
204
+ }
205
+
206
+ .ui-datepicker-day-marks {
207
+ line-height: normal;
208
+ position: absolute;
209
+ right: 0;
210
+ bottom: 3px;
211
+ left: 0;
212
+ display: flex;
213
+ align-items: center;
214
+ justify-content: center;
215
+ }
216
+
217
+ .ui-datepicker-day-marks > i {
218
+ border-radius: 50%;
219
+ border: 1px solid #FFF;
220
+ width: 4px;
221
+ height: 4px;
222
+ margin: 0 2px;
223
+ }
224
+
225
+ .ui-datepicker-day-marks-exists {
226
+ background: var(--color-blue-500);
227
+ }
228
+
229
+ .ui-datepicker-day-marks-update {
230
+ background: var(--color-red-500);
231
+ }
232
+
233
+ .ui-datepicker-row-break {
234
+ display: none;
235
+ }`;
236
+ k.appendStyle(b);
237
+ const o = window, x = (e) => {
238
+ var t, n;
239
+ if (!((n = (t = o == null ? void 0 : o.jQuery) == null ? void 0 : t.ui) != null && n.datepicker)) {
240
+ console.info("Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker");
241
+ return;
242
+ }
243
+ return o.jQuery.datepicker._defaults.dateFormat = k.state.dateFormat.toLowerCase().replace("m", "mm").replace("y", "yy").replace("d", "dd"), o.jQuery(e);
244
+ };
245
+ function y(e, t) {
246
+ var n;
247
+ return (n = x(e)) == null ? void 0 : n.datepicker(t);
248
+ }
249
+ let d, l, p, u;
250
+ g(m(k.state.dateFormat), () => {
251
+ var e;
252
+ d = h.dateFormat("2000-01-01"), l = ((e = d.match(/\D/)) == null ? void 0 : e[0]) ?? "-", p = d.replace(/\D+/g, "").length, u = [];
253
+ for (let t = 0; t < d.length; t++)
254
+ d[t] === l && u.push(t);
255
+ }, { immediate: !0 });
256
+ function F(e) {
257
+ let t = e.target.selectionEnd, n = e.target.value, r = n.substring(0, t).replace(/\D+/g, ""), i = n.substring(t).replace(/\D+/g, ""), c = r.length + i.length - p;
258
+ if (c > 0) {
259
+ r = r.substring(0, p);
260
+ const a = p - r.length;
261
+ i = i.substring(i.length - a);
262
+ } else
263
+ c < 0 && (e.inputType === "deleteContentForward" ? r += "0".repeat(-c) : i = "0".repeat(-c) + i);
264
+ t = r.length, n = r + i;
265
+ for (let a = 0; a < u.length; a++) {
266
+ const s = u[a];
267
+ n = n.substring(0, s) + l + n.substring(s), t >= s && t++;
268
+ }
269
+ e.inputType === "deleteContentBackward" && n[t - 1] === l && t--, n !== e.target.value && (e.target.value = n, e.target.selectionStart = t, e.target.selectionEnd = t);
270
+ }
271
+ export {
272
+ y as connectDatepicker,
273
+ F as oninput
274
+ };
275
+ //# sourceMappingURL=datepicker-7f54fd80.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datepicker-7f54fd80.es.js","sources":["../../src/components/forms/inputDate/datepicker.css?raw","../../src/components/forms/inputDate/datepicker.ts"],"sourcesContent":["export default \"/* ui-datepicker */\\n.ui-datepicker {\\n\\t--datepicker-day-color: #FFF;\\n\\t--datepicker-day-color-hover: var(--color-blue-150);\\n\\t--datepicker-selected-color: var(--color-blue-500);\\n\\t--datepicker-selected-color-hover: var(--color-blue-550);\\n\\t--datepicker-range-color: var(--color-blue-100);\\n\\t--datepicker-range-color-hover: var(--color-blue-150);\\n\\n\\tuser-select: none;\\n\\twidth: auto;\\n\\tpadding: 0;\\n}\\n\\n.ui-datepicker:before,\\n.ui-datepicker:after {\\n\\tdisplay: none;\\n}\\n\\n/* на странице */\\n.ui-datepicker-inline {\\n\\tdisplay: inline-block !important;\\n}\\n\\n/* в popup */\\n.ui-datepicker:not(.ui-datepicker-inline) {\\n\\tborder-radius: 8px;\\n\\tbackground: var(--content-background-color);\\n\\tbox-shadow: var(--top-shadow);\\n\\tz-index: 10000000 !important;\\n\\tpadding: 8px;\\n}\\n\\n.ui-datepicker a {\\n\\ttext-decoration: none !important;\\n}\\n\\n.ui-datepicker option {\\n\\tcolor: var(--color-text);\\n\\tfont-size: 14px;\\n}\\n\\n.ui-datepicker-header {\\n\\tpadding: 0 !important;\\n\\tmargin: 0 0 18px 0;\\n\\tdisplay: flex;\\n\\talign-items: center;\\n}\\n\\n.ui-datepicker-header > * {\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tjustify-content: center;\\n}\\n\\n.ui-datepicker-title {\\n\\twidth: 100% !important;\\n\\theight: 24px;\\n\\tmargin: 0 !important;\\n}\\n\\n.ui-datepicker-month,\\n.ui-datepicker-year {\\n\\toutline: none !important;\\n\\twidth: auto !important;\\n\\tborder: none;\\n\\tpadding: 0;\\n\\tmargin: 0 6px !important;\\n\\ttext-align: center;\\n\\tfont-size: 16px !important;\\n}\\n\\n.ui-datepicker-month {\\n\\tcolor: var(--color-text);\\n}\\n\\n.ui-datepicker-year {\\n\\tcolor: var(--color-gray-300);\\n}\\n\\n/*\\tselect.ui-datepicker-month,\\nselect.ui-datepicker-year{ cursor: pointer; color: var(--color-blue-500); }*/\\nselect.ui-datepicker-month,\\nselect.ui-datepicker-year {\\n\\tcursor: pointer;\\n}\\n\\n.ui-datepicker-prev,\\n.ui-datepicker-next {\\n\\tcursor: pointer;\\n\\twidth: 24px !important;\\n\\theight: 24px !important;\\n\\tfont-size: 24px;\\n\\tfont-family: 'Topvisor-2';\\n\\tposition: static !important;\\n}\\n\\n.ui-datepicker-prev:before {\\n\\tcontent: '';\\n}\\n\\n.ui-datepicker-next {\\n\\torder: 1;\\n}\\n\\n.ui-datepicker-next:before {\\n\\tcontent: '';\\n}\\n\\n.ui-datepicker-prev > *,\\n.ui-datepicker-next > * {\\n\\tdisplay: none !important;\\n}\\n\\n.ui-datepicker thead th {\\n\\twidth: auto !important;\\n\\tpadding: 0 !important;\\n\\tcolor: #B3BEBF;\\n\\tfont-size: 14px;\\n\\tfont-weight: 400 !important;\\n}\\n\\n.ui-datepicker table {\\n\\tmargin: 0 !important;\\n\\tfont-size: 14px;\\n}\\n\\n.ui-datepicker td {\\n\\tbackground: none;\\n\\tpadding: 0 !important;\\n}\\n\\n.ui-datepicker td span,\\n.ui-datepicker td a {\\n\\tborder-radius: 8px;\\n\\tborder: none;\\n\\tmin-width: 32px;\\n\\theight: 32px;\\n\\tpadding: 0;\\n\\tmargin: 1px;\\n\\tcolor: var(--color-text) !important;\\n\\tline-height: 32px;\\n\\ttext-align: center;\\n\\tposition: relative;\\n\\tdisplay: block;\\n}\\n\\n/* обычные даты */\\n.ui-datepicker td a {\\n\\tbackground: var(--datepicker-day-color);\\n}\\n\\n.ui-datepicker td a:hover {\\n\\tbackground: var(--datepicker-day-color-hover);\\n}\\n\\n/* текущий день */\\ntd.ui-datepicker-today span,\\ntd.ui-datepicker-today a {\\n\\tbackground: none;\\n\\tposition: relative;\\n}\\n\\n/* выбранные даты */\\n.ui-datepicker td.selected a {\\n\\tbackground: var(--datepicker-range-color);\\n\\tpadding-right: 0;\\n\\tpadding-left: 1px;\\n\\tmargin-right: 1px;\\n\\tmargin-left: 0;\\n}\\n\\n.ui-datepicker td.selected a:hover {\\n\\tbackground: var(--datepicker-range-color-hover);\\n}\\n\\n.ui-datepicker td.selected:not(.selected-start):not(:first-child):not(.first-of-month) a {\\n\\tborder-top-left-radius: 0;\\n\\tborder-bottom-left-radius: 0;\\n\\tpadding-left: 1px;\\n\\tmargin-left: 0;\\n}\\n\\n.ui-datepicker td.selected:not(.selected-end):not(:last-child):not(.last-of-month) a {\\n\\tborder-top-right-radius: 0;\\n\\tborder-bottom-right-radius: 0;\\n\\tpadding-right: 1px;\\n\\tmargin-right: 0;\\n}\\n\\n.ui-datepicker td.selected-start a,\\n.ui-datepicker td.selected-end a,\\n.ui-datepicker td.ui-datepicker-current-day a {\\n\\tbackground: var(--datepicker-selected-color);\\n\\tcolor: #FFF !important;\\n}\\n\\n.ui-datepicker td.selected-start a:hover,\\n.ui-datepicker td.selected-end a:hover,\\n.ui-datepicker td.ui-datepicker-current-day a:hover {\\n\\tbackground: var(--datepicker-selected-color-hover);\\n}\\n\\n.ui-datepicker-day-marks {\\n\\tline-height: normal;\\n\\tposition: absolute;\\n\\tright: 0;\\n\\tbottom: 3px;\\n\\tleft: 0;\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tjustify-content: center;\\n}\\n\\n.ui-datepicker-day-marks > i {\\n\\tborder-radius: 50%;\\n\\tborder: 1px solid #FFF;\\n\\twidth: 4px;\\n\\theight: 4px;\\n\\tmargin: 0 2px;\\n}\\n\\n.ui-datepicker-day-marks-exists {\\n\\tbackground: var(--color-blue-500);\\n}\\n\\n.ui-datepicker-day-marks-update {\\n\\tbackground: var(--color-red-500);\\n}\\n\\n.ui-datepicker-row-break {\\n\\tdisplay: none;\\n}\"","import { toRef, watch } from 'vue';\nimport Core from '@/core/core/core';\nimport UtilsDate from '@/core/utils/date';\n\nimport css from '@/components/forms/inputDate/datepicker.css?raw';\n\nCore.appendStyle(css);\n\nconst _window: any = window;\n\nconst $ = (el: HTMLInputElement) => {\n\tif (!_window?.jQuery?.ui?.datepicker) {\n\t\tconsole.info('Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker');\n\n\t\treturn;\n\t}\n\n\t_window.jQuery.datepicker._defaults.dateFormat = Core.state.dateFormat.toLowerCase().replace('m', 'mm').replace('y', 'yy').replace('d', 'dd');\n\n\treturn _window.jQuery(el);\n};\n\nexport function connectDatepicker(el: HTMLInputElement, options: any) {\n\treturn $(el)?.datepicker(options);\n}\n\nlet dateFormatted;\nlet delimiter: string;\nlet dateNumbersCount: number;\nlet delimitersIndexes: number[];\n\nwatch(toRef(Core.state.dateFormat), () => {\n\t// генерация отформатированной даты, извлечение из нее разделителей и их индексов\n\tdateFormatted = UtilsDate.dateFormat('2000-01-01');\n\tdelimiter = dateFormatted.match(/\\D/)?.[0] ?? '-';\n\tdateNumbersCount = dateFormatted.replace(/\\D+/g, '').length;\n\tdelimitersIndexes = [];\n\n\tfor (let i = 0; i < dateFormatted.length; i++) {\n\t\tif (dateFormatted[i] === delimiter) {\n\t\t\tdelimitersIndexes.push(i);\n\t\t}\n\t}\n}, { immediate: true });\n\n/**\n * Автоформат при вводе в поле с датой\n */\nexport function oninput(e: any) {\n\tlet selectionPos = e.target.selectionEnd;\n\tlet value = e.target.value;\n\n\t// разбить занчение на две половины - до и после каретки\n\t// удалить все символы, кроме цифр\n\tlet valueChunkLeft = value.substring(0, selectionPos).replace(/\\D+/g, '');\n\tlet valueChunkRight = value.substring(selectionPos).replace(/\\D+/g, '');\n\n\tlet extraNumbersCount = valueChunkLeft.length + valueChunkRight.length - dateNumbersCount;\n\tif (extraNumbersCount > 0) {\n\t\t// // количество цифр больше требуемого - удалить лишние\n\t\tvalueChunkLeft = valueChunkLeft.substring(0, dateNumbersCount);\n\n\t\tconst valueChunkRightMaxLength = dateNumbersCount - valueChunkLeft.length;\n\t\tvalueChunkRight = valueChunkRight.substring(valueChunkRight.length - valueChunkRightMaxLength);\n\t} else if (extraNumbersCount < 0) {\n\t\t// количество цифр меньше требуемого - добавить 0\n\t\tif (e.inputType === 'deleteContentForward') {\n\t\t\t// нажатие на delete - добавить к левой части для правильного позиционирования каретки\n\t\t\tvalueChunkLeft += '0'.repeat(-extraNumbersCount);\n\t\t} else {\n\t\t\tvalueChunkRight = '0'.repeat(-extraNumbersCount) + valueChunkRight;\n\t\t}\n\t}\n\n\tselectionPos = valueChunkLeft.length;\n\tvalue = valueChunkLeft + valueChunkRight;\n\n\t// вставить разделители\n\tfor (let i = 0; i < delimitersIndexes.length; i++) {\n\t\tconst delimiterIndex = delimitersIndexes[i];\n\n\t\tvalue = value.substring(0, delimiterIndex) + delimiter + value.substring(delimiterIndex);\n\n\t\t// сдвинуть каретку, если разделитель вставлен левее ее\n\t\tif (selectionPos >= delimiterIndex) {\n\t\t\tselectionPos++;\n\t\t}\n\t}\n\n\t// нажатие на backspace - если слева символ разделителя, перенести каретку за него\n\tif (e.inputType === 'deleteContentBackward' && value[selectionPos - 1] === delimiter) {\n\t\tselectionPos--;\n\t}\n\n\t// если значение изменилось - вставить его и переместить каретку\n\tif (value !== e.target.value) {\n\t\te.target.value = value;\n\t\te.target.selectionStart = selectionPos;\n\t\te.target.selectionEnd = selectionPos;\n\t}\n}"],"names":["css","Core","_window","$","el","_b","_a","connectDatepicker","options","dateFormatted","delimiter","dateNumbersCount","delimitersIndexes","watch","toRef","UtilsDate","i","oninput","selectionPos","value","valueChunkLeft","valueChunkRight","extraNumbersCount","valueChunkRightMaxLength","delimiterIndex"],"mappings":";;AAAA,MAAeA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AAId,IAAYS,EAAM,UAAUK,CAAc,GAGnFN,KAAgBM,KACnBN;AAAA,EAEF;AAGA,EAAI,EAAE,cAAc,2BAA2BC,EAAMD,IAAe,CAAC,MAAMR,KAC1EQ,KAIGC,MAAU,EAAE,OAAO,UACtB,EAAE,OAAO,QAAQA,GACjB,EAAE,OAAO,iBAAiBD,GAC1B,EAAE,OAAO,eAAeA;AAE1B;"}
@@ -0,0 +1,234 @@
1
+ define(["require","exports","vue","./forms-b9e5edd2.amd"],function(x,g,p,c){"use strict";if(typeof p>"u")var p=window.Vue;const m=`/* ui-datepicker */
2
+ .ui-datepicker {
3
+ --datepicker-day-color: #FFF;
4
+ --datepicker-day-color-hover: var(--color-blue-150);
5
+ --datepicker-selected-color: var(--color-blue-500);
6
+ --datepicker-selected-color-hover: var(--color-blue-550);
7
+ --datepicker-range-color: var(--color-blue-100);
8
+ --datepicker-range-color-hover: var(--color-blue-150);
9
+
10
+ user-select: none;
11
+ width: auto;
12
+ padding: 0;
13
+ }
14
+
15
+ .ui-datepicker:before,
16
+ .ui-datepicker:after {
17
+ display: none;
18
+ }
19
+
20
+ /* на странице */
21
+ .ui-datepicker-inline {
22
+ display: inline-block !important;
23
+ }
24
+
25
+ /* в popup */
26
+ .ui-datepicker:not(.ui-datepicker-inline) {
27
+ border-radius: 8px;
28
+ background: var(--content-background-color);
29
+ box-shadow: var(--top-shadow);
30
+ z-index: 10000000 !important;
31
+ padding: 8px;
32
+ }
33
+
34
+ .ui-datepicker a {
35
+ text-decoration: none !important;
36
+ }
37
+
38
+ .ui-datepicker option {
39
+ color: var(--color-text);
40
+ font-size: 14px;
41
+ }
42
+
43
+ .ui-datepicker-header {
44
+ padding: 0 !important;
45
+ margin: 0 0 18px 0;
46
+ display: flex;
47
+ align-items: center;
48
+ }
49
+
50
+ .ui-datepicker-header > * {
51
+ display: flex;
52
+ align-items: center;
53
+ justify-content: center;
54
+ }
55
+
56
+ .ui-datepicker-title {
57
+ width: 100% !important;
58
+ height: 24px;
59
+ margin: 0 !important;
60
+ }
61
+
62
+ .ui-datepicker-month,
63
+ .ui-datepicker-year {
64
+ outline: none !important;
65
+ width: auto !important;
66
+ border: none;
67
+ padding: 0;
68
+ margin: 0 6px !important;
69
+ text-align: center;
70
+ font-size: 16px !important;
71
+ }
72
+
73
+ .ui-datepicker-month {
74
+ color: var(--color-text);
75
+ }
76
+
77
+ .ui-datepicker-year {
78
+ color: var(--color-gray-300);
79
+ }
80
+
81
+ /* select.ui-datepicker-month,
82
+ select.ui-datepicker-year{ cursor: pointer; color: var(--color-blue-500); }*/
83
+ select.ui-datepicker-month,
84
+ select.ui-datepicker-year {
85
+ cursor: pointer;
86
+ }
87
+
88
+ .ui-datepicker-prev,
89
+ .ui-datepicker-next {
90
+ cursor: pointer;
91
+ width: 24px !important;
92
+ height: 24px !important;
93
+ font-size: 24px;
94
+ font-family: 'Topvisor-2';
95
+ position: static !important;
96
+ }
97
+
98
+ .ui-datepicker-prev:before {
99
+ content: '';
100
+ }
101
+
102
+ .ui-datepicker-next {
103
+ order: 1;
104
+ }
105
+
106
+ .ui-datepicker-next:before {
107
+ content: '';
108
+ }
109
+
110
+ .ui-datepicker-prev > *,
111
+ .ui-datepicker-next > * {
112
+ display: none !important;
113
+ }
114
+
115
+ .ui-datepicker thead th {
116
+ width: auto !important;
117
+ padding: 0 !important;
118
+ color: #B3BEBF;
119
+ font-size: 14px;
120
+ font-weight: 400 !important;
121
+ }
122
+
123
+ .ui-datepicker table {
124
+ margin: 0 !important;
125
+ font-size: 14px;
126
+ }
127
+
128
+ .ui-datepicker td {
129
+ background: none;
130
+ padding: 0 !important;
131
+ }
132
+
133
+ .ui-datepicker td span,
134
+ .ui-datepicker td a {
135
+ border-radius: 8px;
136
+ border: none;
137
+ min-width: 32px;
138
+ height: 32px;
139
+ padding: 0;
140
+ margin: 1px;
141
+ color: var(--color-text) !important;
142
+ line-height: 32px;
143
+ text-align: center;
144
+ position: relative;
145
+ display: block;
146
+ }
147
+
148
+ /* обычные даты */
149
+ .ui-datepicker td a {
150
+ background: var(--datepicker-day-color);
151
+ }
152
+
153
+ .ui-datepicker td a:hover {
154
+ background: var(--datepicker-day-color-hover);
155
+ }
156
+
157
+ /* текущий день */
158
+ td.ui-datepicker-today span,
159
+ td.ui-datepicker-today a {
160
+ background: none;
161
+ position: relative;
162
+ }
163
+
164
+ /* выбранные даты */
165
+ .ui-datepicker td.selected a {
166
+ background: var(--datepicker-range-color);
167
+ padding-right: 0;
168
+ padding-left: 1px;
169
+ margin-right: 1px;
170
+ margin-left: 0;
171
+ }
172
+
173
+ .ui-datepicker td.selected a:hover {
174
+ background: var(--datepicker-range-color-hover);
175
+ }
176
+
177
+ .ui-datepicker td.selected:not(.selected-start):not(:first-child):not(.first-of-month) a {
178
+ border-top-left-radius: 0;
179
+ border-bottom-left-radius: 0;
180
+ padding-left: 1px;
181
+ margin-left: 0;
182
+ }
183
+
184
+ .ui-datepicker td.selected:not(.selected-end):not(:last-child):not(.last-of-month) a {
185
+ border-top-right-radius: 0;
186
+ border-bottom-right-radius: 0;
187
+ padding-right: 1px;
188
+ margin-right: 0;
189
+ }
190
+
191
+ .ui-datepicker td.selected-start a,
192
+ .ui-datepicker td.selected-end a,
193
+ .ui-datepicker td.ui-datepicker-current-day a {
194
+ background: var(--datepicker-selected-color);
195
+ color: #FFF !important;
196
+ }
197
+
198
+ .ui-datepicker td.selected-start a:hover,
199
+ .ui-datepicker td.selected-end a:hover,
200
+ .ui-datepicker td.ui-datepicker-current-day a:hover {
201
+ background: var(--datepicker-selected-color-hover);
202
+ }
203
+
204
+ .ui-datepicker-day-marks {
205
+ line-height: normal;
206
+ position: absolute;
207
+ right: 0;
208
+ bottom: 3px;
209
+ left: 0;
210
+ display: flex;
211
+ align-items: center;
212
+ justify-content: center;
213
+ }
214
+
215
+ .ui-datepicker-day-marks > i {
216
+ border-radius: 50%;
217
+ border: 1px solid #FFF;
218
+ width: 4px;
219
+ height: 4px;
220
+ margin: 0 2px;
221
+ }
222
+
223
+ .ui-datepicker-day-marks-exists {
224
+ background: var(--color-blue-500);
225
+ }
226
+
227
+ .ui-datepicker-day-marks-update {
228
+ background: var(--color-red-500);
229
+ }
230
+
231
+ .ui-datepicker-row-break {
232
+ display: none;
233
+ }`;c.Core.appendStyle(m);const a=window,b=e=>{var t,n;if(!((n=(t=a==null?void 0:a.jQuery)==null?void 0:t.ui)!=null&&n.datepicker)){console.info("Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker");return}return a.jQuery.datepicker._defaults.dateFormat=c.Core.state.dateFormat.toLowerCase().replace("m","mm").replace("y","yy").replace("d","dd"),a.jQuery(e)};function v(e,t){var n;return(n=b(e))==null?void 0:n.datepicker(t)}let o,l,u,s;p.watch(p.toRef(c.Core.state.dateFormat),()=>{var e;o=c.UtilsDate.dateFormat("2000-01-01"),l=((e=o.match(/\D/))==null?void 0:e[0])??"-",u=o.replace(/\D+/g,"").length,s=[];for(let t=0;t<o.length;t++)o[t]===l&&s.push(t)},{immediate:!0});function f(e){let t=e.target.selectionEnd,n=e.target.value,r=n.substring(0,t).replace(/\D+/g,""),i=n.substring(t).replace(/\D+/g,""),k=r.length+i.length-u;if(k>0){r=r.substring(0,u);const d=u-r.length;i=i.substring(i.length-d)}else k<0&&(e.inputType==="deleteContentForward"?r+="0".repeat(-k):i="0".repeat(-k)+i);t=r.length,n=r+i;for(let d=0;d<s.length;d++){const h=s[d];n=n.substring(0,h)+l+n.substring(h),t>=h&&t++}e.inputType==="deleteContentBackward"&&n[t-1]===l&&t--,n!==e.target.value&&(e.target.value=n,e.target.selectionStart=t,e.target.selectionEnd=t)}g.connectDatepicker=v,g.oninput=f,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
234
+ //# sourceMappingURL=datepicker-858c1cb6.amd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datepicker-858c1cb6.amd.js","sources":["../../src/components/forms/inputDate/datepicker.css?raw","../../src/components/forms/inputDate/datepicker.ts"],"sourcesContent":["export default \"/* ui-datepicker */\\n.ui-datepicker {\\n\\t--datepicker-day-color: #FFF;\\n\\t--datepicker-day-color-hover: var(--color-blue-150);\\n\\t--datepicker-selected-color: var(--color-blue-500);\\n\\t--datepicker-selected-color-hover: var(--color-blue-550);\\n\\t--datepicker-range-color: var(--color-blue-100);\\n\\t--datepicker-range-color-hover: var(--color-blue-150);\\n\\n\\tuser-select: none;\\n\\twidth: auto;\\n\\tpadding: 0;\\n}\\n\\n.ui-datepicker:before,\\n.ui-datepicker:after {\\n\\tdisplay: none;\\n}\\n\\n/* на странице */\\n.ui-datepicker-inline {\\n\\tdisplay: inline-block !important;\\n}\\n\\n/* в popup */\\n.ui-datepicker:not(.ui-datepicker-inline) {\\n\\tborder-radius: 8px;\\n\\tbackground: var(--content-background-color);\\n\\tbox-shadow: var(--top-shadow);\\n\\tz-index: 10000000 !important;\\n\\tpadding: 8px;\\n}\\n\\n.ui-datepicker a {\\n\\ttext-decoration: none !important;\\n}\\n\\n.ui-datepicker option {\\n\\tcolor: var(--color-text);\\n\\tfont-size: 14px;\\n}\\n\\n.ui-datepicker-header {\\n\\tpadding: 0 !important;\\n\\tmargin: 0 0 18px 0;\\n\\tdisplay: flex;\\n\\talign-items: center;\\n}\\n\\n.ui-datepicker-header > * {\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tjustify-content: center;\\n}\\n\\n.ui-datepicker-title {\\n\\twidth: 100% !important;\\n\\theight: 24px;\\n\\tmargin: 0 !important;\\n}\\n\\n.ui-datepicker-month,\\n.ui-datepicker-year {\\n\\toutline: none !important;\\n\\twidth: auto !important;\\n\\tborder: none;\\n\\tpadding: 0;\\n\\tmargin: 0 6px !important;\\n\\ttext-align: center;\\n\\tfont-size: 16px !important;\\n}\\n\\n.ui-datepicker-month {\\n\\tcolor: var(--color-text);\\n}\\n\\n.ui-datepicker-year {\\n\\tcolor: var(--color-gray-300);\\n}\\n\\n/*\\tselect.ui-datepicker-month,\\nselect.ui-datepicker-year{ cursor: pointer; color: var(--color-blue-500); }*/\\nselect.ui-datepicker-month,\\nselect.ui-datepicker-year {\\n\\tcursor: pointer;\\n}\\n\\n.ui-datepicker-prev,\\n.ui-datepicker-next {\\n\\tcursor: pointer;\\n\\twidth: 24px !important;\\n\\theight: 24px !important;\\n\\tfont-size: 24px;\\n\\tfont-family: 'Topvisor-2';\\n\\tposition: static !important;\\n}\\n\\n.ui-datepicker-prev:before {\\n\\tcontent: '';\\n}\\n\\n.ui-datepicker-next {\\n\\torder: 1;\\n}\\n\\n.ui-datepicker-next:before {\\n\\tcontent: '';\\n}\\n\\n.ui-datepicker-prev > *,\\n.ui-datepicker-next > * {\\n\\tdisplay: none !important;\\n}\\n\\n.ui-datepicker thead th {\\n\\twidth: auto !important;\\n\\tpadding: 0 !important;\\n\\tcolor: #B3BEBF;\\n\\tfont-size: 14px;\\n\\tfont-weight: 400 !important;\\n}\\n\\n.ui-datepicker table {\\n\\tmargin: 0 !important;\\n\\tfont-size: 14px;\\n}\\n\\n.ui-datepicker td {\\n\\tbackground: none;\\n\\tpadding: 0 !important;\\n}\\n\\n.ui-datepicker td span,\\n.ui-datepicker td a {\\n\\tborder-radius: 8px;\\n\\tborder: none;\\n\\tmin-width: 32px;\\n\\theight: 32px;\\n\\tpadding: 0;\\n\\tmargin: 1px;\\n\\tcolor: var(--color-text) !important;\\n\\tline-height: 32px;\\n\\ttext-align: center;\\n\\tposition: relative;\\n\\tdisplay: block;\\n}\\n\\n/* обычные даты */\\n.ui-datepicker td a {\\n\\tbackground: var(--datepicker-day-color);\\n}\\n\\n.ui-datepicker td a:hover {\\n\\tbackground: var(--datepicker-day-color-hover);\\n}\\n\\n/* текущий день */\\ntd.ui-datepicker-today span,\\ntd.ui-datepicker-today a {\\n\\tbackground: none;\\n\\tposition: relative;\\n}\\n\\n/* выбранные даты */\\n.ui-datepicker td.selected a {\\n\\tbackground: var(--datepicker-range-color);\\n\\tpadding-right: 0;\\n\\tpadding-left: 1px;\\n\\tmargin-right: 1px;\\n\\tmargin-left: 0;\\n}\\n\\n.ui-datepicker td.selected a:hover {\\n\\tbackground: var(--datepicker-range-color-hover);\\n}\\n\\n.ui-datepicker td.selected:not(.selected-start):not(:first-child):not(.first-of-month) a {\\n\\tborder-top-left-radius: 0;\\n\\tborder-bottom-left-radius: 0;\\n\\tpadding-left: 1px;\\n\\tmargin-left: 0;\\n}\\n\\n.ui-datepicker td.selected:not(.selected-end):not(:last-child):not(.last-of-month) a {\\n\\tborder-top-right-radius: 0;\\n\\tborder-bottom-right-radius: 0;\\n\\tpadding-right: 1px;\\n\\tmargin-right: 0;\\n}\\n\\n.ui-datepicker td.selected-start a,\\n.ui-datepicker td.selected-end a,\\n.ui-datepicker td.ui-datepicker-current-day a {\\n\\tbackground: var(--datepicker-selected-color);\\n\\tcolor: #FFF !important;\\n}\\n\\n.ui-datepicker td.selected-start a:hover,\\n.ui-datepicker td.selected-end a:hover,\\n.ui-datepicker td.ui-datepicker-current-day a:hover {\\n\\tbackground: var(--datepicker-selected-color-hover);\\n}\\n\\n.ui-datepicker-day-marks {\\n\\tline-height: normal;\\n\\tposition: absolute;\\n\\tright: 0;\\n\\tbottom: 3px;\\n\\tleft: 0;\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tjustify-content: center;\\n}\\n\\n.ui-datepicker-day-marks > i {\\n\\tborder-radius: 50%;\\n\\tborder: 1px solid #FFF;\\n\\twidth: 4px;\\n\\theight: 4px;\\n\\tmargin: 0 2px;\\n}\\n\\n.ui-datepicker-day-marks-exists {\\n\\tbackground: var(--color-blue-500);\\n}\\n\\n.ui-datepicker-day-marks-update {\\n\\tbackground: var(--color-red-500);\\n}\\n\\n.ui-datepicker-row-break {\\n\\tdisplay: none;\\n}\"","import { toRef, watch } from 'vue';\nimport Core from '@/core/core/core';\nimport UtilsDate from '@/core/utils/date';\n\nimport css from '@/components/forms/inputDate/datepicker.css?raw';\n\nCore.appendStyle(css);\n\nconst _window: any = window;\n\nconst $ = (el: HTMLInputElement) => {\n\tif (!_window?.jQuery?.ui?.datepicker) {\n\t\tconsole.info('Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker');\n\n\t\treturn;\n\t}\n\n\t_window.jQuery.datepicker._defaults.dateFormat = Core.state.dateFormat.toLowerCase().replace('m', 'mm').replace('y', 'yy').replace('d', 'dd');\n\n\treturn _window.jQuery(el);\n};\n\nexport function connectDatepicker(el: HTMLInputElement, options: any) {\n\treturn $(el)?.datepicker(options);\n}\n\nlet dateFormatted;\nlet delimiter: string;\nlet dateNumbersCount: number;\nlet delimitersIndexes: number[];\n\nwatch(toRef(Core.state.dateFormat), () => {\n\t// генерация отформатированной даты, извлечение из нее разделителей и их индексов\n\tdateFormatted = UtilsDate.dateFormat('2000-01-01');\n\tdelimiter = dateFormatted.match(/\\D/)?.[0] ?? '-';\n\tdateNumbersCount = dateFormatted.replace(/\\D+/g, '').length;\n\tdelimitersIndexes = [];\n\n\tfor (let i = 0; i < dateFormatted.length; i++) {\n\t\tif (dateFormatted[i] === delimiter) {\n\t\t\tdelimitersIndexes.push(i);\n\t\t}\n\t}\n}, { immediate: true });\n\n/**\n * Автоформат при вводе в поле с датой\n */\nexport function oninput(e: any) {\n\tlet selectionPos = e.target.selectionEnd;\n\tlet value = e.target.value;\n\n\t// разбить занчение на две половины - до и после каретки\n\t// удалить все символы, кроме цифр\n\tlet valueChunkLeft = value.substring(0, selectionPos).replace(/\\D+/g, '');\n\tlet valueChunkRight = value.substring(selectionPos).replace(/\\D+/g, '');\n\n\tlet extraNumbersCount = valueChunkLeft.length + valueChunkRight.length - dateNumbersCount;\n\tif (extraNumbersCount > 0) {\n\t\t// // количество цифр больше требуемого - удалить лишние\n\t\tvalueChunkLeft = valueChunkLeft.substring(0, dateNumbersCount);\n\n\t\tconst valueChunkRightMaxLength = dateNumbersCount - valueChunkLeft.length;\n\t\tvalueChunkRight = valueChunkRight.substring(valueChunkRight.length - valueChunkRightMaxLength);\n\t} else if (extraNumbersCount < 0) {\n\t\t// количество цифр меньше требуемого - добавить 0\n\t\tif (e.inputType === 'deleteContentForward') {\n\t\t\t// нажатие на delete - добавить к левой части для правильного позиционирования каретки\n\t\t\tvalueChunkLeft += '0'.repeat(-extraNumbersCount);\n\t\t} else {\n\t\t\tvalueChunkRight = '0'.repeat(-extraNumbersCount) + valueChunkRight;\n\t\t}\n\t}\n\n\tselectionPos = valueChunkLeft.length;\n\tvalue = valueChunkLeft + valueChunkRight;\n\n\t// вставить разделители\n\tfor (let i = 0; i < delimitersIndexes.length; i++) {\n\t\tconst delimiterIndex = delimitersIndexes[i];\n\n\t\tvalue = value.substring(0, delimiterIndex) + delimiter + value.substring(delimiterIndex);\n\n\t\t// сдвинуть каретку, если разделитель вставлен левее ее\n\t\tif (selectionPos >= delimiterIndex) {\n\t\t\tselectionPos++;\n\t\t}\n\t}\n\n\t// нажатие на backspace - если слева символ разделителя, перенести каретку за него\n\tif (e.inputType === 'deleteContentBackward' && value[selectionPos - 1] === delimiter) {\n\t\tselectionPos--;\n\t}\n\n\t// если значение изменилось - вставить его и переместить каретку\n\tif (value !== e.target.value) {\n\t\te.target.value = value;\n\t\te.target.selectionStart = selectionPos;\n\t\te.target.selectionEnd = selectionPos;\n\t}\n}"],"names":["css","Core","$","el","_window","forms","connectDatepicker","options","dateFormatted","delimiter","dateNumbersCount","delimitersIndexes","watch","_a","i","valueChunkLeft","value","selectionPos","valueChunkRight","extraNumbersCount","valueChunkRightMaxLength","delimiterIndex"],"mappings":"0HAAA,MAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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