@dxtmisha/functional 1.6.8 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -727
- package/dist/library.d.ts +732 -82
- package/dist/library.js +1112 -434
- package/package.json +12 -7
package/dist/library.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var l = (s, t, e) =>
|
|
4
|
-
import { isArray as
|
|
1
|
+
var pt = Object.defineProperty;
|
|
2
|
+
var St = (s, t, e) => t in s ? pt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var l = (s, t, e) => St(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { isArray as bt, isString as Q, isObjectNotArray as P, forEach as H, toArray as W, isObject as X, toCamelCase as It, toDate as rt, Datetime as Lt, Geo as E, EventItem as wt, GeoFlag as xt, GeoIntl as Ct, isSelected as V, getExp as kt, getColumn as at, ScrollbarWidth as Dt, ApiMethodItem as j, Api as ct, Formatters as At, SearchList as Bt, executeFunction as tt, isFunction as Mt, executePromise as et, isApiSuccess as Nt, BroadcastMessage as Ft, Cookie as Ht, Hash as U, isDomRuntime as ht, getElementId as $, Loading as ut, random as $t, Meta as Et, DataStorage as dt, Translate as lt } from "@dxtmisha/functional-basic";
|
|
5
5
|
export * from "@dxtmisha/functional-basic";
|
|
6
|
-
import { isRef as
|
|
7
|
-
class
|
|
6
|
+
import { isRef as z, h as Rt, computed as u, toRefs as Pt, useAttrs as jt, useSlots as zt, ref as g, watch as m, triggerRef as Vt, effectScope as it, shallowRef as M, getCurrentInstance as Tt, onUnmounted as Ot, inject as Wt, provide as Ut, watchEffect as gt, customRef as _t } from "vue";
|
|
7
|
+
class Gt {
|
|
8
8
|
/**
|
|
9
9
|
* Constructor
|
|
10
10
|
* @param props base data/ базовые данные
|
|
@@ -21,7 +21,7 @@ class wt {
|
|
|
21
21
|
* @param name property name/ название свойства
|
|
22
22
|
*/
|
|
23
23
|
is(t) {
|
|
24
|
-
return
|
|
24
|
+
return bt(t) ? !!t.find((e) => this.isDifferent(e)) : this.isDifferent(t);
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Checks if there are changes in the data.
|
|
@@ -54,7 +54,7 @@ class wt {
|
|
|
54
54
|
return ((e = this.cache) == null ? void 0 : e[t]) !== ((i = this.props) == null ? void 0 : i[t]);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
class
|
|
57
|
+
class Kt {
|
|
58
58
|
/**
|
|
59
59
|
* Constructor
|
|
60
60
|
* @param props base data/ базовые данные
|
|
@@ -65,7 +65,7 @@ class Dt {
|
|
|
65
65
|
constructor(t, e, i) {
|
|
66
66
|
l(this, "event", {});
|
|
67
67
|
l(this, "changed");
|
|
68
|
-
this.props = t, this.callback = e, this.changed = new
|
|
68
|
+
this.props = t, this.callback = e, this.changed = new Gt(t, i);
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
71
|
* Calls the callback function.
|
|
@@ -113,7 +113,7 @@ class Dt {
|
|
|
113
113
|
this.callback && this.callback(this.event);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
class
|
|
116
|
+
class Ie extends Kt {
|
|
117
117
|
/**
|
|
118
118
|
* Calls the callback function.
|
|
119
119
|
*
|
|
@@ -134,36 +134,39 @@ class Ut extends Dt {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
function d(s) {
|
|
137
|
-
return
|
|
137
|
+
return z(s) ? s.value : s;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Yt(s) {
|
|
140
140
|
return s && "class" in s && typeof s.class == "string" ? s.class : void 0;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
const i =
|
|
144
|
-
|
|
142
|
+
function Jt(s, t, e) {
|
|
143
|
+
const i = t == null ? void 0 : t.id, n = t == null ? void 0 : t.index, r = Yt(t);
|
|
144
|
+
let a = "";
|
|
145
|
+
if (Q(s) && (a += `.${s}`), e && (a += `.${e}`), n && Q(n) && (a += `.${n}`), r && (a += `.${r}`), i && (a += `.${i}`), a !== "")
|
|
146
|
+
return a;
|
|
145
147
|
}
|
|
146
|
-
function
|
|
148
|
+
function Qt(s, t, e, i) {
|
|
147
149
|
let n = t;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
...t
|
|
151
|
-
|
|
150
|
+
const r = t && "key" in t;
|
|
151
|
+
return (!t || !r) && (n = {
|
|
152
|
+
...t,
|
|
153
|
+
key: Jt(s, t, i)
|
|
154
|
+
}), Rt(s, n, e);
|
|
152
155
|
}
|
|
153
|
-
function
|
|
154
|
-
const e = s == null ? void 0 : s.class, i = t == null ? void 0 : t.class, n = s == null ? void 0 : s.style, r = t == null ? void 0 : t.style,
|
|
156
|
+
function Z(s, t) {
|
|
157
|
+
const e = s == null ? void 0 : s.class, i = t == null ? void 0 : t.class, n = s == null ? void 0 : s.style, r = t == null ? void 0 : t.style, a = {
|
|
155
158
|
...s,
|
|
156
159
|
...t
|
|
157
160
|
};
|
|
158
|
-
return e && i && (
|
|
161
|
+
return e && i && (a.class = [], e && a.class.push(e), i && a.class.push(i)), n && r && (a.style = [], n && a.style.push(n), r && a.style.push(r)), a;
|
|
159
162
|
}
|
|
160
|
-
function
|
|
163
|
+
function Xt(...s) {
|
|
161
164
|
let t = {};
|
|
162
165
|
return s.forEach((e) => {
|
|
163
|
-
e && (t =
|
|
166
|
+
e && (t = Z(t, e));
|
|
164
167
|
}), t;
|
|
165
168
|
}
|
|
166
|
-
class
|
|
169
|
+
class ft {
|
|
167
170
|
/**
|
|
168
171
|
* Constructor
|
|
169
172
|
* @param components list of connected components/ список подключенных компонентов
|
|
@@ -202,10 +205,10 @@ class X {
|
|
|
202
205
|
*/
|
|
203
206
|
getModification(t, e) {
|
|
204
207
|
if (t) {
|
|
205
|
-
t in this.caching || (this.caching[t] =
|
|
208
|
+
t in this.caching || (this.caching[t] = u(() => this.computeModification(t)));
|
|
206
209
|
const i = this.caching[t];
|
|
207
210
|
if (i)
|
|
208
|
-
return e ?
|
|
211
|
+
return e ? Xt(i.value, e) : i.value;
|
|
209
212
|
}
|
|
210
213
|
return e;
|
|
211
214
|
}
|
|
@@ -239,7 +242,7 @@ class X {
|
|
|
239
242
|
renderOne(t, e, i, n) {
|
|
240
243
|
if (this.is(t)) {
|
|
241
244
|
const r = n != null ? n : t;
|
|
242
|
-
return
|
|
245
|
+
return Qt(
|
|
243
246
|
this.get(t),
|
|
244
247
|
this.getModification(r, e),
|
|
245
248
|
i,
|
|
@@ -270,18 +273,18 @@ class X {
|
|
|
270
273
|
computeModification(t) {
|
|
271
274
|
var i;
|
|
272
275
|
const e = d((i = this.modification) == null ? void 0 : i[t]);
|
|
273
|
-
if (e &&
|
|
276
|
+
if (e && P(e)) {
|
|
274
277
|
const n = {};
|
|
275
|
-
return
|
|
276
|
-
n[
|
|
278
|
+
return H(e, (r, a) => {
|
|
279
|
+
n[a] = d(r);
|
|
277
280
|
}), n;
|
|
278
281
|
}
|
|
279
282
|
return {};
|
|
280
283
|
}
|
|
281
284
|
}
|
|
282
|
-
class
|
|
285
|
+
class Le extends ft {
|
|
283
286
|
}
|
|
284
|
-
class
|
|
287
|
+
class we {
|
|
285
288
|
/**
|
|
286
289
|
* Constructor
|
|
287
290
|
* @param name class name/ название класса
|
|
@@ -290,7 +293,7 @@ class Yt {
|
|
|
290
293
|
*/
|
|
291
294
|
constructor(t, e, i) {
|
|
292
295
|
l(this, "name");
|
|
293
|
-
l(this, "element",
|
|
296
|
+
l(this, "element", g());
|
|
294
297
|
l(this, "refs");
|
|
295
298
|
l(this, "components");
|
|
296
299
|
l(this, "emits");
|
|
@@ -301,10 +304,10 @@ class Yt {
|
|
|
301
304
|
l(this, "attrs");
|
|
302
305
|
l(this, "slots");
|
|
303
306
|
l(this, "dataExpose");
|
|
304
|
-
this.props = e, this.options = i, this.name = this.initName(t), this.refs = this.props ?
|
|
307
|
+
this.props = e, this.options = i, this.name = this.initName(t), this.refs = this.props ? Pt(this.props) : {}, this.components = new ft(i == null ? void 0 : i.components, i == null ? void 0 : i.compMod), this.emits = i == null ? void 0 : i.emits, this.classes = u(() => this.updateClasses()), this.styles = u(() => this.updateStyles()), this.attrs = jt(), this.slots = zt();
|
|
305
308
|
}
|
|
306
309
|
init() {
|
|
307
|
-
return this.classesSub =
|
|
310
|
+
return this.classesSub = u(() => this.initClasses()), this.stylesSub = u(() => this.initStyles()), this.dataExpose = this.initExpose(), this;
|
|
308
311
|
}
|
|
309
312
|
/**
|
|
310
313
|
* Getting the class name.
|
|
@@ -329,7 +332,7 @@ class Yt {
|
|
|
329
332
|
* @param name list of class names by levels/ список названий классов по уровням
|
|
330
333
|
*/
|
|
331
334
|
getSubClass(t) {
|
|
332
|
-
return `${this.getName()}__${
|
|
335
|
+
return `${this.getName()}__${W(t).join("__")}`;
|
|
333
336
|
}
|
|
334
337
|
/**
|
|
335
338
|
* Getting the class name for the status.
|
|
@@ -338,7 +341,7 @@ class Yt {
|
|
|
338
341
|
* @param name list of class names by levels/ список названий классов по уровням
|
|
339
342
|
*/
|
|
340
343
|
getStatusClass(t) {
|
|
341
|
-
return `${this.getName()}--${
|
|
344
|
+
return `${this.getName()}--${W(t).join("--")}`;
|
|
342
345
|
}
|
|
343
346
|
/**
|
|
344
347
|
* Getting the property name for the style.
|
|
@@ -347,7 +350,7 @@ class Yt {
|
|
|
347
350
|
* @param name list of class names by levels/ список названий классов по уровням
|
|
348
351
|
*/
|
|
349
352
|
getStyle(t) {
|
|
350
|
-
return `--${this.getName()}-sys-${
|
|
353
|
+
return `--${this.getName()}-sys-${W(t).join("-")}`;
|
|
351
354
|
}
|
|
352
355
|
/**
|
|
353
356
|
* Getting additional parameters.
|
|
@@ -366,7 +369,10 @@ class Yt {
|
|
|
366
369
|
*/
|
|
367
370
|
expose() {
|
|
368
371
|
var t;
|
|
369
|
-
return
|
|
372
|
+
return {
|
|
373
|
+
...(t = this.dataExpose) != null ? t : {},
|
|
374
|
+
elementHtml: this.element
|
|
375
|
+
};
|
|
370
376
|
}
|
|
371
377
|
/**
|
|
372
378
|
* The rendering method for the setup method.
|
|
@@ -399,7 +405,7 @@ class Yt {
|
|
|
399
405
|
* @param classes list of classes for transformation/ список классов для преобразования
|
|
400
406
|
*/
|
|
401
407
|
toClass(t) {
|
|
402
|
-
return
|
|
408
|
+
return P(t) ? t : Array.isArray(t) ? { [t.filter((i) => typeof i == "string" && i.trim() !== "").join(" ")]: !0 } : typeof t == "string" ? { [t]: !0 } : {};
|
|
403
409
|
}
|
|
404
410
|
/**
|
|
405
411
|
* Converts the class name to standard for the current component.
|
|
@@ -408,9 +414,9 @@ class Yt {
|
|
|
408
414
|
* @param classes list of classes/ список классов
|
|
409
415
|
*/
|
|
410
416
|
toClassName(t) {
|
|
411
|
-
if (
|
|
417
|
+
if (X(t)) {
|
|
412
418
|
const e = {};
|
|
413
|
-
return
|
|
419
|
+
return H(t, (i, n) => {
|
|
414
420
|
n.match(/\?\?/) ? e[n.replace(/\?\?/, this.getName())] = i : n.match(/\?/) ? e[n.replace(/\?/, this.getDesign())] = i : e[n] = i;
|
|
415
421
|
}), e;
|
|
416
422
|
}
|
|
@@ -423,7 +429,7 @@ class Yt {
|
|
|
423
429
|
* @param name component name for transformation/ название компонента для преобразования
|
|
424
430
|
*/
|
|
425
431
|
initName(t) {
|
|
426
|
-
return
|
|
432
|
+
return H(t.split(".", 2), (e) => It(e));
|
|
427
433
|
}
|
|
428
434
|
/**
|
|
429
435
|
* Updating data about the class.
|
|
@@ -431,17 +437,17 @@ class Yt {
|
|
|
431
437
|
* Обновление данных об классе.
|
|
432
438
|
*/
|
|
433
439
|
updateClasses() {
|
|
434
|
-
var i, n, r,
|
|
440
|
+
var i, n, r, a;
|
|
435
441
|
const t = (i = this.classesSub) == null ? void 0 : i.value, e = (r = (n = this.options) == null ? void 0 : n.classes) == null ? void 0 : r.value;
|
|
436
442
|
return t && e ? {
|
|
437
443
|
...t,
|
|
438
444
|
...e,
|
|
439
445
|
main: {
|
|
440
446
|
...this.toClass(t == null ? void 0 : t.main),
|
|
441
|
-
...this.toClass(e == null ? void 0 : e.main)
|
|
442
|
-
...this.toClass(
|
|
447
|
+
...this.toClass(e == null ? void 0 : e.main)
|
|
448
|
+
// ...this.toClass(this.attrs?.class)
|
|
443
449
|
}
|
|
444
|
-
} : e != null ? e : {
|
|
450
|
+
} : (a = e != null ? e : t) != null ? a : {
|
|
445
451
|
main: {}
|
|
446
452
|
};
|
|
447
453
|
}
|
|
@@ -451,43 +457,45 @@ class Yt {
|
|
|
451
457
|
* Доработка полученного списка стилей.
|
|
452
458
|
*/
|
|
453
459
|
updateStyles() {
|
|
454
|
-
var i, n, r;
|
|
460
|
+
var i, n, r, a;
|
|
455
461
|
const t = (i = this.stylesSub) == null ? void 0 : i.value, e = (r = (n = this.options) == null ? void 0 : n.styles) == null ? void 0 : r.value;
|
|
456
462
|
return t && e ? {
|
|
457
463
|
...t,
|
|
458
464
|
...e
|
|
459
|
-
} : e != null ? e : {};
|
|
465
|
+
} : (a = e != null ? e : t) != null ? a : {};
|
|
460
466
|
}
|
|
461
467
|
}
|
|
462
|
-
function
|
|
463
|
-
return
|
|
468
|
+
function A(s) {
|
|
469
|
+
return z(s) ? s : g(s);
|
|
464
470
|
}
|
|
465
|
-
class
|
|
471
|
+
class xe {
|
|
466
472
|
/**
|
|
467
473
|
* Constructor
|
|
468
474
|
* @param date date for processing. дата для обработки
|
|
469
475
|
* @param type type of date format for output. тип формата даты вывода
|
|
470
476
|
* @param code country and language code. код страны и языка
|
|
471
477
|
*/
|
|
472
|
-
constructor(t, e = "date", i =
|
|
478
|
+
constructor(t, e = "date", i = E.getLocation()) {
|
|
473
479
|
l(this, "item");
|
|
474
480
|
l(this, "type");
|
|
475
481
|
l(this, "code");
|
|
476
482
|
l(this, "date");
|
|
477
483
|
l(this, "datetime");
|
|
478
|
-
l(this, "year",
|
|
479
|
-
l(this, "month",
|
|
480
|
-
l(this, "day",
|
|
481
|
-
l(this, "hour",
|
|
482
|
-
l(this, "minute",
|
|
483
|
-
l(this, "second",
|
|
484
|
-
this.item =
|
|
484
|
+
l(this, "year", g(2e3));
|
|
485
|
+
l(this, "month", g(1));
|
|
486
|
+
l(this, "day", g(1));
|
|
487
|
+
l(this, "hour", g(1));
|
|
488
|
+
l(this, "minute", g(1));
|
|
489
|
+
l(this, "second", g(1));
|
|
490
|
+
this.item = A(t), this.type = A(e), this.code = A(i), this.date = g(rt(this.item.value)), this.datetime = new Lt(
|
|
485
491
|
this.date.value,
|
|
486
492
|
this.type.value,
|
|
487
493
|
this.code.value
|
|
488
|
-
),
|
|
489
|
-
this.date.value =
|
|
490
|
-
}),
|
|
494
|
+
), m(this.item, (n) => {
|
|
495
|
+
this.date.value = rt(n);
|
|
496
|
+
}), m(this.type, (n) => this.datetime.setType(n)), m(this.code, (n) => this.datetime.setCode(n)), m(this.date, (n) => {
|
|
497
|
+
this.datetime.setDate(n), this.updateDate();
|
|
498
|
+
}), this.datetime.setWatch(() => Vt(this.date)), this.updateDate();
|
|
491
499
|
}
|
|
492
500
|
/**
|
|
493
501
|
* Returns the basic data for the date.
|
|
@@ -519,7 +527,7 @@ class Gt {
|
|
|
519
527
|
* Возвращает формат часов.
|
|
520
528
|
*/
|
|
521
529
|
getHoursType() {
|
|
522
|
-
return
|
|
530
|
+
return u(() => this.date.value && this.datetime.getHoursType());
|
|
523
531
|
}
|
|
524
532
|
/**
|
|
525
533
|
* Returns the code of the first day of the week.
|
|
@@ -527,7 +535,7 @@ class Gt {
|
|
|
527
535
|
* Возвращает код первого дня недели.
|
|
528
536
|
*/
|
|
529
537
|
getFirstDayCode() {
|
|
530
|
-
return
|
|
538
|
+
return u(() => this.date.value && this.datetime.getFirstDayCode());
|
|
531
539
|
}
|
|
532
540
|
/**
|
|
533
541
|
* The method returns the year of the specified date according to local time.
|
|
@@ -535,7 +543,7 @@ class Gt {
|
|
|
535
543
|
* Метод возвращает год указанной даты по местному времени.
|
|
536
544
|
*/
|
|
537
545
|
getYear() {
|
|
538
|
-
return this.year;
|
|
546
|
+
return u(() => this.year.value);
|
|
539
547
|
}
|
|
540
548
|
/**
|
|
541
549
|
* The method returns the month in the specified date according to local time,
|
|
@@ -545,7 +553,7 @@ class Gt {
|
|
|
545
553
|
* месяцев начинается с нуля для первого месяца в году.
|
|
546
554
|
*/
|
|
547
555
|
getMonth() {
|
|
548
|
-
return this.month;
|
|
556
|
+
return u(() => this.month.value);
|
|
549
557
|
}
|
|
550
558
|
/**
|
|
551
559
|
* The method returns the day of the month for the specified date according to local time.
|
|
@@ -553,7 +561,7 @@ class Gt {
|
|
|
553
561
|
* Метод возвращает день месяца указанной даты по местному времени.
|
|
554
562
|
*/
|
|
555
563
|
getDay() {
|
|
556
|
-
return this.day;
|
|
564
|
+
return u(() => this.day.value);
|
|
557
565
|
}
|
|
558
566
|
/**
|
|
559
567
|
* The method returns the hour for the specified date, according to local time.
|
|
@@ -561,7 +569,7 @@ class Gt {
|
|
|
561
569
|
* Метод возвращает часы указанной даты по местному времени.
|
|
562
570
|
*/
|
|
563
571
|
getHour() {
|
|
564
|
-
return this.hour;
|
|
572
|
+
return u(() => this.hour.value);
|
|
565
573
|
}
|
|
566
574
|
/**
|
|
567
575
|
* The method returns the minutes in the specified date according to local time.
|
|
@@ -569,7 +577,7 @@ class Gt {
|
|
|
569
577
|
* Метод возвращает минуты указанной даты по местному времени.
|
|
570
578
|
*/
|
|
571
579
|
getMinute() {
|
|
572
|
-
return this.minute;
|
|
580
|
+
return u(() => this.minute.value);
|
|
573
581
|
}
|
|
574
582
|
/**
|
|
575
583
|
* The method returns the seconds in the specified date according to local time.
|
|
@@ -577,7 +585,7 @@ class Gt {
|
|
|
577
585
|
* Метод возвращает секунды указанной даты по местному времени.
|
|
578
586
|
*/
|
|
579
587
|
getSecond() {
|
|
580
|
-
return this.second;
|
|
588
|
+
return u(() => this.second.value);
|
|
581
589
|
}
|
|
582
590
|
/**
|
|
583
591
|
* Returns the last day of the week.
|
|
@@ -585,7 +593,7 @@ class Gt {
|
|
|
585
593
|
* Возвращает последний день недели.
|
|
586
594
|
*/
|
|
587
595
|
getMaxDay() {
|
|
588
|
-
return
|
|
596
|
+
return u(() => this.date.value && this.datetime.getMaxDay());
|
|
589
597
|
}
|
|
590
598
|
/**
|
|
591
599
|
* Enables language-sensitive date and time formatting.
|
|
@@ -595,7 +603,7 @@ class Gt {
|
|
|
595
603
|
* @param styleOptions the representation of the month. представление месяца
|
|
596
604
|
*/
|
|
597
605
|
locale(t = this.type.value, e) {
|
|
598
|
-
return
|
|
606
|
+
return u(() => this.date.value && this.datetime.locale(t, e));
|
|
599
607
|
}
|
|
600
608
|
/**
|
|
601
609
|
* Output of standard data.
|
|
@@ -604,10 +612,45 @@ class Gt {
|
|
|
604
612
|
* @param timeZone add time zone. добавить временную зону
|
|
605
613
|
*/
|
|
606
614
|
standard(t = !0) {
|
|
607
|
-
return
|
|
615
|
+
return u(() => this.date.value && this.datetime.standard(t));
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Updates all reactive date values.
|
|
619
|
+
*
|
|
620
|
+
* Обновляет все реактивные значения даты.
|
|
621
|
+
*/
|
|
622
|
+
updateDate() {
|
|
623
|
+
return this.year.value = this.datetime.getYear(), this.month.value = this.datetime.getMonth(), this.day.value = this.datetime.getDay(), this.hour.value = this.datetime.getHour(), this.minute.value = this.datetime.getMinute(), this.second.value = this.datetime.getSecond(), this;
|
|
608
624
|
}
|
|
609
625
|
}
|
|
610
|
-
class
|
|
626
|
+
class N {
|
|
627
|
+
/**
|
|
628
|
+
* Runs a function within the global scope.
|
|
629
|
+
*
|
|
630
|
+
* Запускает функцию в глобальной области.
|
|
631
|
+
* @param fn function/ функция
|
|
632
|
+
* @returns the return value of the function/ возвращаемое значение функции
|
|
633
|
+
*/
|
|
634
|
+
static run(t) {
|
|
635
|
+
return this.getScope().run(t);
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Gets the global effect scope instance.
|
|
639
|
+
*
|
|
640
|
+
* Получает экземпляр глобальной области действия эффекта.
|
|
641
|
+
* @returns the global effect scope instance/ экземпляр глобальной области действия эффекта
|
|
642
|
+
*/
|
|
643
|
+
static getScope() {
|
|
644
|
+
return this.scope || (this.scope = it(!0)), this.scope;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Effect scope instance.
|
|
649
|
+
*
|
|
650
|
+
* Экземпляр области действия эффекта.
|
|
651
|
+
*/
|
|
652
|
+
l(N, "scope");
|
|
653
|
+
class Ce extends wt {
|
|
611
654
|
/**
|
|
612
655
|
* Classes Constructor
|
|
613
656
|
* @param elementSelector element/ элемент
|
|
@@ -620,26 +663,26 @@ class Jt extends at {
|
|
|
620
663
|
* @param detail an event-dependent value associated with the event/ зависимое от события
|
|
621
664
|
* значение, связанное с событием
|
|
622
665
|
*/
|
|
623
|
-
constructor(t, e, i = ["click"], n, r,
|
|
624
|
-
const h =
|
|
666
|
+
constructor(t, e, i = ["click"], n, r, a) {
|
|
667
|
+
const h = A(t), c = A(e);
|
|
625
668
|
super(
|
|
626
669
|
h.value,
|
|
627
670
|
i,
|
|
628
671
|
n,
|
|
629
672
|
r,
|
|
630
|
-
|
|
631
|
-
), c.value && this.setElementControl(c.value),
|
|
673
|
+
a
|
|
674
|
+
), c.value && this.setElementControl(c.value), m(h, (o) => this.setElement(o)), m(c, (o) => this.setElementControl(o));
|
|
632
675
|
}
|
|
633
676
|
}
|
|
634
|
-
class
|
|
677
|
+
class ke {
|
|
635
678
|
/**
|
|
636
679
|
* Constructor
|
|
637
680
|
* @param code country and language code/ код страны и языка
|
|
638
681
|
*/
|
|
639
|
-
constructor(t =
|
|
682
|
+
constructor(t = E.getLocation()) {
|
|
640
683
|
l(this, "code");
|
|
641
684
|
l(this, "flag");
|
|
642
|
-
this.code =
|
|
685
|
+
this.code = A(t), this.flag = new xt(this.code.value), m(this.code, (e) => this.flag.setCode(e));
|
|
643
686
|
}
|
|
644
687
|
/**
|
|
645
688
|
* Obtaining a reactive object with the country code.
|
|
@@ -656,7 +699,7 @@ class Qt {
|
|
|
656
699
|
* @param code country code/ код страны
|
|
657
700
|
*/
|
|
658
701
|
get(t = this.code.value) {
|
|
659
|
-
return
|
|
702
|
+
return u(() => this.flag.get(t));
|
|
660
703
|
}
|
|
661
704
|
/**
|
|
662
705
|
* Getting a link to the flag.
|
|
@@ -665,7 +708,7 @@ class Qt {
|
|
|
665
708
|
* @param code country code/ код страны
|
|
666
709
|
*/
|
|
667
710
|
getFlag(t = this.code.value) {
|
|
668
|
-
return
|
|
711
|
+
return u(() => {
|
|
669
712
|
var e;
|
|
670
713
|
return (e = this.flag.get(t)) == null ? void 0 : e.icon;
|
|
671
714
|
});
|
|
@@ -677,7 +720,7 @@ class Qt {
|
|
|
677
720
|
* @param codes country code/ код страны
|
|
678
721
|
*/
|
|
679
722
|
getList(t) {
|
|
680
|
-
return
|
|
723
|
+
return u(() => this.flag.getList(t));
|
|
681
724
|
}
|
|
682
725
|
/**
|
|
683
726
|
* Getting a list of countries by an array of codes in national language.
|
|
@@ -686,64 +729,71 @@ class Qt {
|
|
|
686
729
|
* @param codes country code/ код страны.
|
|
687
730
|
*/
|
|
688
731
|
getNational(t) {
|
|
689
|
-
return
|
|
732
|
+
return u(() => this.flag.getNational(t));
|
|
690
733
|
}
|
|
691
734
|
}
|
|
692
|
-
const
|
|
735
|
+
const x = class x {
|
|
693
736
|
/**
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
737
|
+
* Information about the current country.
|
|
738
|
+
*
|
|
739
|
+
* Информация об текущей стране.
|
|
740
|
+
* @returns reactive object with full geographic information/ реактивный объект с полной географической информацией
|
|
741
|
+
*/
|
|
698
742
|
static get() {
|
|
699
743
|
return this.item;
|
|
700
744
|
}
|
|
701
745
|
/**
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
746
|
+
* Current country.
|
|
747
|
+
*
|
|
748
|
+
* Текущая страна.
|
|
749
|
+
* @returns reactive string with the current country code/ реактивная строка с кодом текущей страны
|
|
750
|
+
*/
|
|
706
751
|
static getCountry() {
|
|
707
752
|
return this.country;
|
|
708
753
|
}
|
|
709
754
|
/**
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
755
|
+
* Current language.
|
|
756
|
+
*
|
|
757
|
+
* Текущий язык.
|
|
758
|
+
* @returns reactive string with the current language code/ реактивная строка с кодом текущего языка
|
|
759
|
+
*/
|
|
714
760
|
static getLanguage() {
|
|
715
761
|
return this.language;
|
|
716
762
|
}
|
|
717
763
|
/**
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
764
|
+
* Full format according to the standard.
|
|
765
|
+
*
|
|
766
|
+
* Полный формат согласно стандарту.
|
|
767
|
+
* @returns reactive string with the full standard locale format/
|
|
768
|
+
* реактивная строка с полным форматом стандарта локали
|
|
769
|
+
*/
|
|
722
770
|
static getStandard() {
|
|
723
771
|
return this.standard;
|
|
724
772
|
}
|
|
725
773
|
/**
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
774
|
+
* Returns the first day of the week.
|
|
775
|
+
*
|
|
776
|
+
* Возвращает первый день недели.
|
|
777
|
+
* @returns reactive string representing the first day of the week/
|
|
778
|
+
* реактивная строка, представляющая первый день недели
|
|
779
|
+
*/
|
|
730
780
|
static getFirstDay() {
|
|
731
781
|
return this.firstDay;
|
|
732
782
|
}
|
|
733
783
|
/**
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
784
|
+
* Changes the data by the full code.
|
|
785
|
+
*
|
|
786
|
+
* Изменяет данные по полному коду.
|
|
787
|
+
* @param code country code, full form language-country or one of them/
|
|
788
|
+
* код страны, полный вид язык-страна или один из них
|
|
789
|
+
*/
|
|
740
790
|
static set(t) {
|
|
741
|
-
|
|
791
|
+
E.set(t, !0), this.item.value = E.getItem();
|
|
742
792
|
}
|
|
743
793
|
};
|
|
744
|
-
l(
|
|
745
|
-
let
|
|
746
|
-
class
|
|
794
|
+
l(x, "item", M(E.get())), l(x, "country", u(() => x.item.value.country)), l(x, "language", u(() => x.item.value.language)), l(x, "standard", u(() => x.item.value.standard)), l(x, "firstDay", u(() => x.item.value.firstDay));
|
|
795
|
+
let R = x;
|
|
796
|
+
class Zt {
|
|
747
797
|
/**
|
|
748
798
|
* Constructor
|
|
749
799
|
* @param code country code, full form language-country or one of them/
|
|
@@ -752,9 +802,9 @@ class Rt {
|
|
|
752
802
|
constructor(t) {
|
|
753
803
|
l(this, "location");
|
|
754
804
|
l(this, "intl");
|
|
755
|
-
this.location =
|
|
805
|
+
this.location = A(t), this.intl = u(() => {
|
|
756
806
|
var e;
|
|
757
|
-
return new
|
|
807
|
+
return new Ct((e = this.location.value) != null ? e : R.getLanguage().value);
|
|
758
808
|
});
|
|
759
809
|
}
|
|
760
810
|
/**
|
|
@@ -766,7 +816,7 @@ class Rt {
|
|
|
766
816
|
* объект с некоторыми или всеми из следующих свойств
|
|
767
817
|
*/
|
|
768
818
|
display(t, e) {
|
|
769
|
-
return
|
|
819
|
+
return u(() => this.intl.value.display(d(t), e));
|
|
770
820
|
}
|
|
771
821
|
/**
|
|
772
822
|
* Get display names of language.
|
|
@@ -776,7 +826,7 @@ class Rt {
|
|
|
776
826
|
* @param style the formatting style to use/ используемый стиль форматирования
|
|
777
827
|
*/
|
|
778
828
|
languageName(t, e) {
|
|
779
|
-
return
|
|
829
|
+
return u(() => this.intl.value.languageName(d(t), e));
|
|
780
830
|
}
|
|
781
831
|
/**
|
|
782
832
|
* Get display names of region.
|
|
@@ -786,7 +836,7 @@ class Rt {
|
|
|
786
836
|
* @param style the formatting style to use/ используемый стиль форматирования
|
|
787
837
|
*/
|
|
788
838
|
countryName(t, e) {
|
|
789
|
-
return
|
|
839
|
+
return u(() => this.intl.value.countryName(d(t), e));
|
|
790
840
|
}
|
|
791
841
|
/**
|
|
792
842
|
* In basic use without specifying a locale, a formatted string.
|
|
@@ -798,7 +848,7 @@ class Rt {
|
|
|
798
848
|
* или всеми свойствами
|
|
799
849
|
*/
|
|
800
850
|
number(t, e) {
|
|
801
|
-
return
|
|
851
|
+
return u(() => this.intl.value.number(d(t), e));
|
|
802
852
|
}
|
|
803
853
|
/**
|
|
804
854
|
* Decimal point symbol.
|
|
@@ -806,7 +856,7 @@ class Rt {
|
|
|
806
856
|
* Символ десятичной точки.
|
|
807
857
|
*/
|
|
808
858
|
decimal() {
|
|
809
|
-
return
|
|
859
|
+
return u(() => this.intl.value.decimal());
|
|
810
860
|
}
|
|
811
861
|
/**
|
|
812
862
|
* Currency formatting.
|
|
@@ -818,7 +868,7 @@ class Rt {
|
|
|
818
868
|
* @param numberOnly do not display the currency symbol/ не выводить значок валюты
|
|
819
869
|
*/
|
|
820
870
|
currency(t, e, i = !1) {
|
|
821
|
-
return
|
|
871
|
+
return u(
|
|
822
872
|
() => this.intl.value.currency(
|
|
823
873
|
d(t),
|
|
824
874
|
d(e),
|
|
@@ -826,6 +876,18 @@ class Rt {
|
|
|
826
876
|
)
|
|
827
877
|
);
|
|
828
878
|
}
|
|
879
|
+
/**
|
|
880
|
+
* Returns the currency symbol if it exists, otherwise the currency code.
|
|
881
|
+
*
|
|
882
|
+
* Возвращает символ для валюты, если он есть, или сам код валюты.
|
|
883
|
+
* @param currency the currency to use in currency formatting/
|
|
884
|
+
* валюта для использования в форматировании валюты
|
|
885
|
+
* @param currencyDisplay how to display the currency in currency formatting/
|
|
886
|
+
* как отобразить валюту в формате валюты
|
|
887
|
+
*/
|
|
888
|
+
currencySymbol(t, e = "symbol") {
|
|
889
|
+
return u(() => this.intl.value.currencySymbol(d(t), e));
|
|
890
|
+
}
|
|
829
891
|
/**
|
|
830
892
|
* Unit formatting.
|
|
831
893
|
* If the style is 'unit', a unit property must be provided.
|
|
@@ -836,7 +898,16 @@ class Rt {
|
|
|
836
898
|
* в форматировании блока
|
|
837
899
|
*/
|
|
838
900
|
unit(t, e) {
|
|
839
|
-
return
|
|
901
|
+
return u(() => this.intl.value.unit(d(t), e));
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Возвращает отформатированный размер файла
|
|
905
|
+
* @param value a number, bigint, or string, to format /<br>число для форматирования
|
|
906
|
+
* @param unitOptions the unit to use in unit formatting /<br>блок для использования
|
|
907
|
+
* в форматировании блока
|
|
908
|
+
*/
|
|
909
|
+
sizeFile(t, e = "byte") {
|
|
910
|
+
return u(() => this.intl.value.sizeFile(d(t), e));
|
|
840
911
|
}
|
|
841
912
|
/**
|
|
842
913
|
* Number as a percentage.
|
|
@@ -846,7 +917,7 @@ class Rt {
|
|
|
846
917
|
* @param options an object with some or all properties/ объект с некоторыми или всеми свойствами
|
|
847
918
|
*/
|
|
848
919
|
percent(t, e) {
|
|
849
|
-
return
|
|
920
|
+
return u(() => this.intl.value.percent(d(t), e));
|
|
850
921
|
}
|
|
851
922
|
/**
|
|
852
923
|
* Number as a percentage (unit).
|
|
@@ -857,7 +928,18 @@ class Rt {
|
|
|
857
928
|
* объект с некоторыми или всеми свойствами
|
|
858
929
|
*/
|
|
859
930
|
percentBy100(t, e) {
|
|
860
|
-
return
|
|
931
|
+
return u(() => this.intl.value.percentBy100(d(t), e));
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* Применять форматирование, учитывающее множественное число, и языковые правила, связанные с множественным числом
|
|
935
|
+
* @param value a number, bigint, or string, to format/ число для форматирования
|
|
936
|
+
* @param words list of words for formatting (in the format one|two|few|many|other|zero)/
|
|
937
|
+
* список слов для форматирования (в формате `one|two|few|many|other|zero`)
|
|
938
|
+
* @param options Property for PluralRules/ свойство для PluralRules
|
|
939
|
+
* @param optionsNumber an object with some or all properties/ объект с некоторыми или всеми свойствами
|
|
940
|
+
*/
|
|
941
|
+
plural(t, e, i, n) {
|
|
942
|
+
return u(() => this.intl.value.plural(d(t), e, i, n));
|
|
861
943
|
}
|
|
862
944
|
/**
|
|
863
945
|
* Enables language-sensitive date and time formatting.
|
|
@@ -869,7 +951,7 @@ class Rt {
|
|
|
869
951
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
870
952
|
*/
|
|
871
953
|
date(t, e, i, n) {
|
|
872
|
-
return
|
|
954
|
+
return u(() => this.intl.value.date(d(t), e, i, n));
|
|
873
955
|
}
|
|
874
956
|
/**
|
|
875
957
|
* Enables language-sensitive relative time formatting.
|
|
@@ -881,7 +963,7 @@ class Rt {
|
|
|
881
963
|
* @param todayValue current day/ текущий день
|
|
882
964
|
*/
|
|
883
965
|
relative(t, e, i) {
|
|
884
|
-
return
|
|
966
|
+
return u(() => this.intl.value.relative(d(t), e, i));
|
|
885
967
|
}
|
|
886
968
|
/**
|
|
887
969
|
* Enables language-sensitive relative time formatting
|
|
@@ -901,17 +983,26 @@ class Rt {
|
|
|
901
983
|
* @param type type of data format/ тип формата data
|
|
902
984
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
903
985
|
*/
|
|
904
|
-
relativeLimit(t, e, i, n, r,
|
|
905
|
-
return
|
|
986
|
+
relativeLimit(t, e, i, n, r, a, h) {
|
|
987
|
+
return u(() => this.intl.value.relativeLimit(
|
|
906
988
|
d(t),
|
|
907
989
|
e,
|
|
908
990
|
i,
|
|
909
991
|
n,
|
|
910
992
|
r,
|
|
911
|
-
|
|
993
|
+
a,
|
|
912
994
|
h
|
|
913
995
|
));
|
|
914
996
|
}
|
|
997
|
+
/**
|
|
998
|
+
* Возвращает отформатированное значение времени, прошедшего с момента события
|
|
999
|
+
* @param value a number, bigint, or string, to format/ число для форматирования
|
|
1000
|
+
* @param unit time unit/ единица времени
|
|
1001
|
+
* @param styleOptions additional option or formatting style/ дополнительная опция или стиль форматирования
|
|
1002
|
+
*/
|
|
1003
|
+
relativeByValue(t, e, i) {
|
|
1004
|
+
return u(() => this.intl.value.relativeByValue(d(t), e, i));
|
|
1005
|
+
}
|
|
915
1006
|
/**
|
|
916
1007
|
* Names of months.
|
|
917
1008
|
*
|
|
@@ -920,7 +1011,7 @@ class Rt {
|
|
|
920
1011
|
* @param style the representation of the month/ представление месяца
|
|
921
1012
|
*/
|
|
922
1013
|
month(t, e) {
|
|
923
|
-
return
|
|
1014
|
+
return u(() => this.intl.value.month(d(t), e));
|
|
924
1015
|
}
|
|
925
1016
|
/**
|
|
926
1017
|
* Array to list of months.
|
|
@@ -929,7 +1020,7 @@ class Rt {
|
|
|
929
1020
|
* @param style the representation of the month/ представление месяца
|
|
930
1021
|
*/
|
|
931
1022
|
months(t) {
|
|
932
|
-
return
|
|
1023
|
+
return u(() => this.intl.value.months(t));
|
|
933
1024
|
}
|
|
934
1025
|
/**
|
|
935
1026
|
* Returns names of days of the week.
|
|
@@ -939,7 +1030,7 @@ class Rt {
|
|
|
939
1030
|
* @param style the representation of the weekday/ представление о дне недели
|
|
940
1031
|
*/
|
|
941
1032
|
weekday(t, e) {
|
|
942
|
-
return
|
|
1033
|
+
return u(() => this.intl.value.weekday(d(t), e));
|
|
943
1034
|
}
|
|
944
1035
|
/**
|
|
945
1036
|
* An array of the list of names of the days of the week.
|
|
@@ -948,7 +1039,7 @@ class Rt {
|
|
|
948
1039
|
* @param style the representation of the weekday/ представление о дне недели
|
|
949
1040
|
*/
|
|
950
1041
|
weekdays(t) {
|
|
951
|
-
return
|
|
1042
|
+
return u(() => this.intl.value.weekdays(t));
|
|
952
1043
|
}
|
|
953
1044
|
/**
|
|
954
1045
|
* Time.
|
|
@@ -957,10 +1048,20 @@ class Rt {
|
|
|
957
1048
|
* @param value the date to format/ дата для форматирования
|
|
958
1049
|
*/
|
|
959
1050
|
time(t) {
|
|
960
|
-
return
|
|
1051
|
+
return u(() => this.intl.value.time(d(t)));
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* Sorts strings taking into account the characteristics of countries.
|
|
1055
|
+
*
|
|
1056
|
+
* Сортирует строки с учетом особенностей стран.
|
|
1057
|
+
* @param data an array with data/ массив с данными
|
|
1058
|
+
* @param compareFn a function for sorting/ функция для сортировки
|
|
1059
|
+
*/
|
|
1060
|
+
sort(t, e = (i, n) => [i, n]) {
|
|
1061
|
+
return u(() => this.intl.value.sort([...d(t)], e));
|
|
961
1062
|
}
|
|
962
1063
|
}
|
|
963
|
-
class
|
|
1064
|
+
class vt {
|
|
964
1065
|
/**
|
|
965
1066
|
* Creates an instance of ListData for managing list data.
|
|
966
1067
|
*
|
|
@@ -978,15 +1079,16 @@ class Z {
|
|
|
978
1079
|
* @param max Maximum number of selections / максимальное количество выделений
|
|
979
1080
|
* @param parent Parent identifier / идентификатор родителя
|
|
980
1081
|
*/
|
|
981
|
-
constructor(t, e, i, n, r,
|
|
1082
|
+
constructor(t, e, i, n, r, a, h, c, o, v = 0, p = 9999999, f) {
|
|
982
1083
|
l(this, "subList", {});
|
|
983
1084
|
/**
|
|
984
1085
|
* Returns a list for forming a list.
|
|
985
1086
|
*
|
|
986
1087
|
* Возвращает список для формирования списка.
|
|
1088
|
+
* @returns reactive list of items/ реактивный список элементов
|
|
987
1089
|
*/
|
|
988
|
-
l(this, "data",
|
|
989
|
-
() =>
|
|
1090
|
+
l(this, "data", u(
|
|
1091
|
+
() => H(
|
|
990
1092
|
d(this.list) || [],
|
|
991
1093
|
(t, e) => this.initItem(e, t)
|
|
992
1094
|
)
|
|
@@ -995,8 +1097,9 @@ class Z {
|
|
|
995
1097
|
* Returns a simplified list for quick loading.
|
|
996
1098
|
*
|
|
997
1099
|
* Возвращает упрощенный список для быстрой загрузки.
|
|
1100
|
+
* @returns simplified reactive list/ упрощенный реактивный список
|
|
998
1101
|
*/
|
|
999
|
-
l(this, "liteData",
|
|
1102
|
+
l(this, "liteData", u(() => {
|
|
1000
1103
|
if (this.isLite()) {
|
|
1001
1104
|
const t = [];
|
|
1002
1105
|
for (const e of this.data.value) {
|
|
@@ -1015,22 +1118,23 @@ class Z {
|
|
|
1015
1118
|
return this.data.value;
|
|
1016
1119
|
}));
|
|
1017
1120
|
/**
|
|
1018
|
-
* Returns a list of records with all additional data.
|
|
1121
|
+
* Returns a list of records with all additional data (focus, selection, disabled status).
|
|
1019
1122
|
*
|
|
1020
|
-
* Возвращает список записей со всеми дополнительными
|
|
1123
|
+
* Возвращает список записей со всеми дополнительными данными (фокус, выделение, статус активности).
|
|
1124
|
+
* @returns full reactive list/ полный реактивный список
|
|
1021
1125
|
*/
|
|
1022
|
-
l(this, "fullData",
|
|
1126
|
+
l(this, "fullData", u(() => {
|
|
1023
1127
|
const t = this.getFocus(), e = this.getHighlight(), i = this.getSelected();
|
|
1024
|
-
return
|
|
1128
|
+
return H(
|
|
1025
1129
|
this.data.value,
|
|
1026
1130
|
(n) => {
|
|
1027
|
-
var
|
|
1028
|
-
const r =
|
|
1131
|
+
var a, h;
|
|
1132
|
+
const r = V(n.index, i);
|
|
1029
1133
|
return {
|
|
1030
1134
|
...n,
|
|
1031
1135
|
focus: t === n.index,
|
|
1032
1136
|
highlight: e,
|
|
1033
|
-
filterMode: (
|
|
1137
|
+
filterMode: (a = this.filterMode) == null ? void 0 : a.value,
|
|
1034
1138
|
selected: r,
|
|
1035
1139
|
disabled: (h = n.disabled) != null ? h : !r && n.type === "item" && this.isSelectedMax.value
|
|
1036
1140
|
};
|
|
@@ -1038,11 +1142,12 @@ class Z {
|
|
|
1038
1142
|
);
|
|
1039
1143
|
}));
|
|
1040
1144
|
/**
|
|
1041
|
-
* Returns a map of all entries.
|
|
1145
|
+
* Returns a flat map of all entries including sublists.
|
|
1042
1146
|
*
|
|
1043
|
-
* Возвращает карту всех
|
|
1147
|
+
* Возвращает плоскую карту всех записей, включая подсписки.
|
|
1148
|
+
* @returns reactive flat list/ реактивный плоский список
|
|
1044
1149
|
*/
|
|
1045
|
-
l(this, "map",
|
|
1150
|
+
l(this, "map", u(() => {
|
|
1046
1151
|
const t = [];
|
|
1047
1152
|
return this.data.value.forEach((e) => {
|
|
1048
1153
|
switch (e.type) {
|
|
@@ -1060,29 +1165,31 @@ class Z {
|
|
|
1060
1165
|
}), t;
|
|
1061
1166
|
}));
|
|
1062
1167
|
/** Returns a list consisting only of items/ Возвращает список, состоящий только из элементов. */
|
|
1063
|
-
l(this, "mapItems",
|
|
1168
|
+
l(this, "mapItems", u(() => this.map.value.filter((t) => t.type === "item")));
|
|
1064
1169
|
/**
|
|
1065
|
-
* Returns a list consisting only of values for selection.
|
|
1170
|
+
* Returns a list consisting only of values for selection (item, group, menu).
|
|
1066
1171
|
*
|
|
1067
|
-
* Возвращает список, состоящий только из значений для
|
|
1172
|
+
* Возвращает список, состоящий только из значений для выбора (item, group, menu).
|
|
1173
|
+
* @returns reactive list/ реактивный список
|
|
1068
1174
|
*/
|
|
1069
|
-
l(this, "items",
|
|
1175
|
+
l(this, "items", u(() => this.map.value.filter(
|
|
1070
1176
|
(t) => t.type === "item" || t.type === "group" || t.type === "menu"
|
|
1071
1177
|
)));
|
|
1072
1178
|
/**
|
|
1073
1179
|
* Finds the first element that meets the search conditions.
|
|
1074
1180
|
*
|
|
1075
1181
|
* Находит первый элемент, соответствующий условиям поиска.
|
|
1182
|
+
* @returns first found index/ первый найденный индекс
|
|
1076
1183
|
*/
|
|
1077
|
-
l(this, "highlightFirstItem",
|
|
1184
|
+
l(this, "highlightFirstItem", u(() => {
|
|
1078
1185
|
const t = this.getHighlight();
|
|
1079
1186
|
if (t && t.length >= this.getHighlightLengthStart()) {
|
|
1080
|
-
const e =
|
|
1187
|
+
const e = kt(t, "i");
|
|
1081
1188
|
if (e)
|
|
1082
1189
|
return this.map.value.findIndex(
|
|
1083
1190
|
(i) => {
|
|
1084
|
-
var n, r,
|
|
1085
|
-
return ((n = i.label) == null ? void 0 : n.toString().match(e)) || ((r = i.index) == null ? void 0 : r.toString().match(e)) || ((
|
|
1191
|
+
var n, r, a;
|
|
1192
|
+
return ((n = i.label) == null ? void 0 : n.toString().match(e)) || ((r = i.index) == null ? void 0 : r.toString().match(e)) || ((a = i.search) == null ? void 0 : a.toString().match(e));
|
|
1086
1193
|
}
|
|
1087
1194
|
);
|
|
1088
1195
|
}
|
|
@@ -1092,50 +1199,67 @@ class Z {
|
|
|
1092
1199
|
* Is there a selected item.
|
|
1093
1200
|
*
|
|
1094
1201
|
* Есть ли выбранный элемент.
|
|
1202
|
+
* @returns true if selection exists/ true, если есть выбор
|
|
1095
1203
|
*/
|
|
1096
|
-
l(this, "isSelected",
|
|
1204
|
+
l(this, "isSelected", u(() => {
|
|
1097
1205
|
const t = this.getSelected();
|
|
1098
|
-
return !!t && this.mapItems.value.findIndex((e) =>
|
|
1206
|
+
return !!t && this.mapItems.value.findIndex((e) => V(e.index, t)) !== -1;
|
|
1099
1207
|
}));
|
|
1100
|
-
/**
|
|
1101
|
-
|
|
1208
|
+
/**
|
|
1209
|
+
* Is the minimum selection reached.
|
|
1210
|
+
*
|
|
1211
|
+
* Достигнуто ли минимальное выделение.
|
|
1212
|
+
* @returns true if minimum reached/ true, если минимум достигнут
|
|
1213
|
+
*/
|
|
1214
|
+
l(this, "isSelectedMin", u(() => {
|
|
1102
1215
|
const t = Number(d(this.min) || 0);
|
|
1103
|
-
return t > 0 ?
|
|
1216
|
+
return t > 0 ? this.selectedListInGroup.value.length >= t : !1;
|
|
1104
1217
|
}));
|
|
1105
|
-
/**
|
|
1106
|
-
|
|
1218
|
+
/**
|
|
1219
|
+
* Is the maximum selection reached.
|
|
1220
|
+
*
|
|
1221
|
+
* Достигнуто ли максимальное выделение.
|
|
1222
|
+
* @returns true if maximum reached/ true, если максимум достигнут
|
|
1223
|
+
*/
|
|
1224
|
+
l(this, "isSelectedMax", u(() => {
|
|
1107
1225
|
const t = Number(d(this.max) || 9999999);
|
|
1108
|
-
return t > 0 ?
|
|
1226
|
+
return t > 0 ? this.selectedListInGroup.value.length >= t : !1;
|
|
1109
1227
|
}));
|
|
1110
1228
|
/**
|
|
1111
|
-
* Returns a list of selected items on the map
|
|
1112
|
-
*
|
|
1229
|
+
* Returns a list of selected items on the map.
|
|
1230
|
+
*
|
|
1231
|
+
* Возвращает список выделенных элементов на карте.
|
|
1232
|
+
* @returns reactive list of selected items/ реактивный список выделенных элементов
|
|
1113
1233
|
*/
|
|
1114
|
-
l(this, "selectedList",
|
|
1234
|
+
l(this, "selectedList", u(() => {
|
|
1115
1235
|
const t = this.getSelected();
|
|
1116
|
-
return t && this.isSelected.value ? this.mapItems.value.filter((e) =>
|
|
1236
|
+
return t && this.isSelected.value ? this.mapItems.value.filter((e) => V(e.index, t)) : [];
|
|
1117
1237
|
}));
|
|
1118
1238
|
/**
|
|
1119
|
-
* Returns a list of selected items in the current group
|
|
1120
|
-
*
|
|
1239
|
+
* Returns a list of selected items in the current group.
|
|
1240
|
+
*
|
|
1241
|
+
* Возвращает список выделенных элементов в текущей группе.
|
|
1242
|
+
* @returns reactive list of selected items in group/ реактивный список выделенных элементов в группе
|
|
1121
1243
|
*/
|
|
1122
|
-
l(this, "selectedListInGroup",
|
|
1244
|
+
l(this, "selectedListInGroup", u(() => {
|
|
1123
1245
|
const t = this.getSelected();
|
|
1124
|
-
return t && this.isSelected.value ? this.data.value.filter((e) =>
|
|
1246
|
+
return t && this.isSelected.value ? this.data.value.filter((e) => V(e.index, t)) : [];
|
|
1125
1247
|
}));
|
|
1126
1248
|
/**
|
|
1127
|
-
* Returns a list of selected
|
|
1249
|
+
* Returns a list of selected labels on the map.
|
|
1128
1250
|
*
|
|
1129
|
-
* Возвращает список выделенных элементов на карте.
|
|
1251
|
+
* Возвращает список названий выделенных элементов на карте.
|
|
1252
|
+
* @returns reactive list of labels/ реактивный список названий
|
|
1130
1253
|
*/
|
|
1131
|
-
l(this, "selectedNames",
|
|
1254
|
+
l(this, "selectedNames", u(() => at(this.selectedList.value, "label")));
|
|
1132
1255
|
/**
|
|
1133
|
-
* Returns a list of selected
|
|
1256
|
+
* Returns a list of selected values on the map.
|
|
1134
1257
|
*
|
|
1135
1258
|
* Возвращает список значений выделенных элементов на карте.
|
|
1259
|
+
* @returns reactive list of values/ реактивный список значений
|
|
1136
1260
|
*/
|
|
1137
|
-
l(this, "selectedValues",
|
|
1138
|
-
this.list = t, this.focus = e, this.highlight = i, this.highlightLengthStart = n, this.filterMode = r, this.selected =
|
|
1261
|
+
l(this, "selectedValues", u(() => at(this.selectedList.value, "value")));
|
|
1262
|
+
this.list = t, this.focus = e, this.highlight = i, this.highlightLengthStart = n, this.filterMode = r, this.selected = a, this.keyValue = h, this.keyLabel = c, this.lite = o, this.min = v, this.max = p, this.parent = f, z(t) && m(t, () => {
|
|
1139
1263
|
this.subList = {};
|
|
1140
1264
|
});
|
|
1141
1265
|
}
|
|
@@ -1143,6 +1267,7 @@ class Z {
|
|
|
1143
1267
|
* Checks whether it is necessary to first display a simplified version.
|
|
1144
1268
|
*
|
|
1145
1269
|
* Проверяет, надо ли сначала вывести упрощенную версию.
|
|
1270
|
+
* @returns true if lite mode is active/ true, если активен облегченный режим
|
|
1146
1271
|
*/
|
|
1147
1272
|
isLite() {
|
|
1148
1273
|
var t;
|
|
@@ -1152,65 +1277,73 @@ class Z {
|
|
|
1152
1277
|
* Checks if an element is in focus.
|
|
1153
1278
|
*
|
|
1154
1279
|
* Проверяет, есть ли элемент в фокусе.
|
|
1280
|
+
* @returns true if focus exists/ true, если есть фокус
|
|
1155
1281
|
*/
|
|
1156
1282
|
isFocus() {
|
|
1157
1283
|
const t = this.getFocus();
|
|
1158
1284
|
return !!(t && this.map.value.findIndex((e) => e.index === t) !== -1);
|
|
1159
1285
|
}
|
|
1160
1286
|
/**
|
|
1161
|
-
* Checks if there is a
|
|
1287
|
+
* Checks if there is a highlighted item (search results).
|
|
1162
1288
|
*
|
|
1163
|
-
* Проверяет, есть ли
|
|
1289
|
+
* Проверяет, есть ли найденный элемент (результаты поиска).
|
|
1290
|
+
* @returns true if highlight exists/ true, если есть совпадения
|
|
1164
1291
|
*/
|
|
1165
1292
|
isHighlight() {
|
|
1166
1293
|
return this.highlightFirstItem.value !== -1;
|
|
1167
1294
|
}
|
|
1168
1295
|
/**
|
|
1169
|
-
* Checks if highlighting is active.
|
|
1296
|
+
* Checks if highlighting is active (minimum length reached).
|
|
1170
1297
|
*
|
|
1171
|
-
* Проверяет, активно ли
|
|
1298
|
+
* Проверяет, активно ли выделение (достигнута минимальная длина).
|
|
1299
|
+
* @returns true if active/ true, если активно
|
|
1172
1300
|
*/
|
|
1173
1301
|
isHighlightActive() {
|
|
1174
1302
|
var t, e;
|
|
1175
1303
|
return ((e = (t = this.getHighlight()) == null ? void 0 : t.length) != null ? e : 0) < this.getHighlightLengthStart() || this.isHighlight();
|
|
1176
1304
|
}
|
|
1177
1305
|
/**
|
|
1178
|
-
* Returns the number of records.
|
|
1306
|
+
* Returns the number of records in the current list.
|
|
1179
1307
|
*
|
|
1180
|
-
* Возвращает количество
|
|
1308
|
+
* Возвращает количество записей в текущем списке.
|
|
1309
|
+
* @returns length/ количество
|
|
1181
1310
|
*/
|
|
1182
1311
|
getLength() {
|
|
1183
1312
|
return this.data.value.length;
|
|
1184
1313
|
}
|
|
1185
1314
|
/**
|
|
1186
|
-
* Returns the number of all available records.
|
|
1315
|
+
* Returns the number of all available records in the map.
|
|
1187
1316
|
*
|
|
1188
|
-
* Возвращает количество всех доступных
|
|
1317
|
+
* Возвращает количество всех доступных записей в карте.
|
|
1318
|
+
* @returns length/ количество
|
|
1189
1319
|
*/
|
|
1190
1320
|
getLengthByMap() {
|
|
1191
1321
|
return this.map.value.length;
|
|
1192
1322
|
}
|
|
1193
1323
|
/**
|
|
1194
|
-
* Returns the number of all available records.
|
|
1324
|
+
* Returns the number of all available records (items).
|
|
1195
1325
|
*
|
|
1196
|
-
* Возвращает количество всех доступных
|
|
1326
|
+
* Возвращает количество всех доступных записей (элементы).
|
|
1327
|
+
* @returns length/ количество
|
|
1197
1328
|
*/
|
|
1198
1329
|
getLengthByItems() {
|
|
1199
1330
|
return this.items.value.length;
|
|
1200
1331
|
}
|
|
1201
1332
|
/**
|
|
1202
|
-
* Returns the
|
|
1333
|
+
* Returns the identifier in focus.
|
|
1203
1334
|
*
|
|
1204
|
-
* Возвращает
|
|
1335
|
+
* Возвращает идентификатор в фокусе.
|
|
1336
|
+
* @returns focus identifier/ идентификатор в фокусе
|
|
1205
1337
|
*/
|
|
1206
1338
|
getFocus() {
|
|
1207
1339
|
var t;
|
|
1208
1340
|
return (t = this.focus) == null ? void 0 : t.value;
|
|
1209
1341
|
}
|
|
1210
1342
|
/**
|
|
1211
|
-
* Returns the
|
|
1343
|
+
* Returns the highlight text.
|
|
1212
1344
|
*
|
|
1213
|
-
* Возвращает
|
|
1345
|
+
* Возвращает текст для выделения.
|
|
1346
|
+
* @returns text/ текст
|
|
1214
1347
|
*/
|
|
1215
1348
|
getHighlight() {
|
|
1216
1349
|
var t;
|
|
@@ -1220,15 +1353,17 @@ class Z {
|
|
|
1220
1353
|
* Returns the minimum length for highlight to start.
|
|
1221
1354
|
*
|
|
1222
1355
|
* Возвращает минимальную длину для начала выделения.
|
|
1356
|
+
* @returns length/ длина
|
|
1223
1357
|
*/
|
|
1224
1358
|
getHighlightLengthStart() {
|
|
1225
1359
|
var t, e;
|
|
1226
1360
|
return (e = (t = this.highlightLengthStart) == null ? void 0 : t.value) != null ? e : 2;
|
|
1227
1361
|
}
|
|
1228
1362
|
/**
|
|
1229
|
-
* Returns the selected
|
|
1363
|
+
* Returns the selected identifiers list.
|
|
1230
1364
|
*
|
|
1231
|
-
* Возвращает
|
|
1365
|
+
* Возвращает список выбранных идентификаторов.
|
|
1366
|
+
* @returns list/ список
|
|
1232
1367
|
*/
|
|
1233
1368
|
getSelected() {
|
|
1234
1369
|
var t;
|
|
@@ -1239,25 +1374,110 @@ class Z {
|
|
|
1239
1374
|
*
|
|
1240
1375
|
* Возвращает элемент, перемещаясь на определенное количество шагов от выбранного элемента.
|
|
1241
1376
|
* @param step number of steps/ количество шагов
|
|
1377
|
+
* @returns target item index/ индекс целевого элемента
|
|
1242
1378
|
*/
|
|
1243
1379
|
getSelectedByStep(t) {
|
|
1244
|
-
var
|
|
1245
|
-
const e = (
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1380
|
+
var i, n, r;
|
|
1381
|
+
const e = (i = this.selectedList.value) == null ? void 0 : i[0];
|
|
1382
|
+
return e ? (n = this.getItemByStep(e, t)) == null ? void 0 : n.index : (r = this.mapItems.value[0]) == null ? void 0 : r.index;
|
|
1383
|
+
}
|
|
1384
|
+
/**
|
|
1385
|
+
* Returns the next item from the selected one.
|
|
1386
|
+
*
|
|
1387
|
+
* Возвращает следующий элемент от выбранного.
|
|
1388
|
+
* @returns next item index/ индекс следующего элемента
|
|
1389
|
+
*/
|
|
1390
|
+
getSelectedNext() {
|
|
1391
|
+
return this.getSelectedByStep(1);
|
|
1392
|
+
}
|
|
1393
|
+
/**
|
|
1394
|
+
* Returns the previous item from the selected one.
|
|
1395
|
+
*
|
|
1396
|
+
* Возвращает предыдущий элемент от выбранного.
|
|
1397
|
+
* @returns previous item index/ индекс предыдущего элемента
|
|
1398
|
+
*/
|
|
1399
|
+
getSelectedPrev() {
|
|
1400
|
+
return this.getSelectedByStep(-1);
|
|
1401
|
+
}
|
|
1402
|
+
/**
|
|
1403
|
+
* Returns an item by moving a certain number of steps from the specified item.
|
|
1404
|
+
*
|
|
1405
|
+
* Возвращает элемент, перемещаясь на определенное количество шагов от указанного элемента.
|
|
1406
|
+
* @param item item/ элемент
|
|
1407
|
+
* @param step number of steps/ количество шагов
|
|
1408
|
+
* @returns target item/ целевой элемент
|
|
1409
|
+
*/
|
|
1410
|
+
getItemByStep(t, e) {
|
|
1411
|
+
const i = this.mapItems.value, n = i.findIndex((r) => r.index === t.index);
|
|
1412
|
+
if (n !== -1) {
|
|
1413
|
+
const r = n + e;
|
|
1414
|
+
if (r in i)
|
|
1415
|
+
return i[r];
|
|
1416
|
+
}
|
|
1417
|
+
if (e > 0)
|
|
1418
|
+
return i[0];
|
|
1419
|
+
if (e < 0)
|
|
1420
|
+
return i[i.length - 1];
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Returns the next item from the specified one.
|
|
1424
|
+
*
|
|
1425
|
+
* Возвращает следующий элемент от указанного.
|
|
1426
|
+
* @param item item/ элемент
|
|
1427
|
+
* @returns next item/ следующий элемент
|
|
1428
|
+
*/
|
|
1429
|
+
getItemNext(t) {
|
|
1430
|
+
return this.getItemByStep(t, 1);
|
|
1431
|
+
}
|
|
1432
|
+
/**
|
|
1433
|
+
* Returns the previous item from the specified one.
|
|
1434
|
+
*
|
|
1435
|
+
* Возвращает предыдущий элемент от указанного.
|
|
1436
|
+
* @param item item/ элемент
|
|
1437
|
+
* @returns previous item/ предыдущий элемент
|
|
1438
|
+
*/
|
|
1439
|
+
getItemPrev(t) {
|
|
1440
|
+
return this.getItemByStep(t, -1);
|
|
1441
|
+
}
|
|
1442
|
+
/**
|
|
1443
|
+
* Returns an item by moving a certain number of steps from the specified index.
|
|
1444
|
+
*
|
|
1445
|
+
* Возвращает элемент, перемещаясь на определенное количество шагов от указанного индекса.
|
|
1446
|
+
* @param index item index/ индекс элемента
|
|
1447
|
+
* @param step number of steps/ количество шагов
|
|
1448
|
+
* @returns target item/ целевой элемент
|
|
1449
|
+
*/
|
|
1450
|
+
getIndexByStep(t, e) {
|
|
1451
|
+
const i = this.getItemByIndex(t);
|
|
1452
|
+
if (i)
|
|
1453
|
+
return this.getItemByStep(i.item, e);
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Returns the next item from the specified index.
|
|
1457
|
+
*
|
|
1458
|
+
* Возвращает следующий элемент от указанного индекса.
|
|
1459
|
+
* @param index item index/ индекс элемента
|
|
1460
|
+
* @returns next item/ следующий элемент
|
|
1461
|
+
*/
|
|
1462
|
+
getIndexNext(t) {
|
|
1463
|
+
return this.getIndexByStep(t, 1);
|
|
1464
|
+
}
|
|
1465
|
+
/**
|
|
1466
|
+
* Returns the previous item from the specified index.
|
|
1467
|
+
*
|
|
1468
|
+
* Возвращает предыдущий элемент от указанного индекса.
|
|
1469
|
+
* @param index item index/ индекс элемента
|
|
1470
|
+
* @returns previous item/ предыдущий элемент
|
|
1471
|
+
*/
|
|
1472
|
+
getIndexPrev(t) {
|
|
1473
|
+
return this.getIndexByStep(t, -1);
|
|
1255
1474
|
}
|
|
1256
1475
|
/**
|
|
1257
1476
|
* Returns an item by its index.
|
|
1258
1477
|
*
|
|
1259
1478
|
* Возвращает элемент по его индексу.
|
|
1260
1479
|
* @param index item index/ индекс элемента
|
|
1480
|
+
* @returns found item details/ информация о найденном элементе
|
|
1261
1481
|
*/
|
|
1262
1482
|
getItemByIndex(t) {
|
|
1263
1483
|
const e = this.map.value.findIndex((i) => i.index === t);
|
|
@@ -1272,6 +1492,7 @@ class Z {
|
|
|
1272
1492
|
*
|
|
1273
1493
|
* Возвращает элемент по его ключу.
|
|
1274
1494
|
* @param key item key/ ключ элемента
|
|
1495
|
+
* @returns found item/ найденный элемент
|
|
1275
1496
|
*/
|
|
1276
1497
|
getItemByKey(t) {
|
|
1277
1498
|
var e;
|
|
@@ -1282,6 +1503,7 @@ class Z {
|
|
|
1282
1503
|
*
|
|
1283
1504
|
* Возвращает первый элемент с указанным родителем.
|
|
1284
1505
|
* @param parent parent identifier to search for / идентификатор родителя для поиска
|
|
1506
|
+
* @returns first item/ первый элемент
|
|
1285
1507
|
*/
|
|
1286
1508
|
getFirstItemByParent(t) {
|
|
1287
1509
|
return this.map.value.find((e) => this.isInParent(t, e));
|
|
@@ -1291,6 +1513,7 @@ class Z {
|
|
|
1291
1513
|
*
|
|
1292
1514
|
* Возвращает последний элемент с указанным родителем.
|
|
1293
1515
|
* @param parent parent identifier to search for / идентификатор родителя для поиска
|
|
1516
|
+
* @returns last item/ последний элемент
|
|
1294
1517
|
*/
|
|
1295
1518
|
getLastItemByParent(t) {
|
|
1296
1519
|
return this.map.value.filter((e) => this.isInParent(t, e)).pop();
|
|
@@ -1300,9 +1523,10 @@ class Z {
|
|
|
1300
1523
|
*
|
|
1301
1524
|
* Возвращает объект подсписка для группового элемента.
|
|
1302
1525
|
* @param item List item data/ данные элемента списка
|
|
1526
|
+
* @returns sublist instance/ экземпляр подсписка
|
|
1303
1527
|
*/
|
|
1304
1528
|
getSubList(t) {
|
|
1305
|
-
return t.index in this.subList || (this.subList[t.index] = new
|
|
1529
|
+
return t.index in this.subList || (this.subList[t.index] = new vt(
|
|
1306
1530
|
t.value,
|
|
1307
1531
|
this.focus,
|
|
1308
1532
|
this.highlight,
|
|
@@ -1346,7 +1570,7 @@ class Z {
|
|
|
1346
1570
|
* @param label item label / метка элемента
|
|
1347
1571
|
*/
|
|
1348
1572
|
getIndex(t, e, i, n) {
|
|
1349
|
-
return t && !
|
|
1573
|
+
return t && !X(t) ? t : e && !X(e) ? e : i && n;
|
|
1350
1574
|
}
|
|
1351
1575
|
/**
|
|
1352
1576
|
* Creates an object of the record element.
|
|
@@ -1356,20 +1580,20 @@ class Z {
|
|
|
1356
1580
|
* @param item selected element/ выбранный элемент
|
|
1357
1581
|
*/
|
|
1358
1582
|
initItem(t, e) {
|
|
1359
|
-
var i, n, r,
|
|
1360
|
-
if (
|
|
1361
|
-
const o = e == null ? void 0 : e[(n = (i = this.keyValue) == null ? void 0 : i.value) != null ? n : "value"],
|
|
1583
|
+
var i, n, r, a, h, c;
|
|
1584
|
+
if (P(e)) {
|
|
1585
|
+
const o = e == null ? void 0 : e[(n = (i = this.keyValue) == null ? void 0 : i.value) != null ? n : "value"], v = (h = e == null ? void 0 : e[(a = (r = this.keyLabel) == null ? void 0 : r.value) != null ? a : "label"]) != null ? h : o, p = this.getIndex(
|
|
1362
1586
|
e == null ? void 0 : e.index,
|
|
1363
1587
|
o,
|
|
1364
1588
|
t,
|
|
1365
|
-
|
|
1589
|
+
v
|
|
1366
1590
|
);
|
|
1367
1591
|
return {
|
|
1368
1592
|
...e,
|
|
1369
1593
|
parent: this.parent,
|
|
1370
|
-
index:
|
|
1594
|
+
index: p,
|
|
1371
1595
|
type: (c = e == null ? void 0 : e.type) != null ? c : "item",
|
|
1372
|
-
label:
|
|
1596
|
+
label: v,
|
|
1373
1597
|
value: o
|
|
1374
1598
|
};
|
|
1375
1599
|
}
|
|
@@ -1382,7 +1606,7 @@ class Z {
|
|
|
1382
1606
|
};
|
|
1383
1607
|
}
|
|
1384
1608
|
}
|
|
1385
|
-
class
|
|
1609
|
+
class mt {
|
|
1386
1610
|
/**
|
|
1387
1611
|
* Get router instance.
|
|
1388
1612
|
*
|
|
@@ -1453,11 +1677,11 @@ class At {
|
|
|
1453
1677
|
* @param to raw route location/ необработанное местоположение маршрута
|
|
1454
1678
|
*/
|
|
1455
1679
|
static rawToHref(t) {
|
|
1456
|
-
return
|
|
1680
|
+
return P(t) && "name" in t && Q(t == null ? void 0 : t.name) ? this.getHref(t.name) : {};
|
|
1457
1681
|
}
|
|
1458
1682
|
}
|
|
1459
|
-
l(
|
|
1460
|
-
class
|
|
1683
|
+
l(mt, "router");
|
|
1684
|
+
class De {
|
|
1461
1685
|
/**
|
|
1462
1686
|
* Constructor
|
|
1463
1687
|
*/
|
|
@@ -1467,108 +1691,459 @@ class Xt {
|
|
|
1467
1691
|
*
|
|
1468
1692
|
* Реактивный элемент.
|
|
1469
1693
|
*/
|
|
1470
|
-
l(this, "item",
|
|
1694
|
+
l(this, "item", g());
|
|
1471
1695
|
/**
|
|
1472
1696
|
* Checks whether the scroll width is defined.
|
|
1473
1697
|
*
|
|
1474
1698
|
* Проверяет, определена ли ширина скролла.
|
|
1475
1699
|
*/
|
|
1476
|
-
l(this, "is",
|
|
1477
|
-
|
|
1700
|
+
l(this, "is", u(() => this.item.value !== void 0));
|
|
1701
|
+
Dt.is().then((t) => {
|
|
1478
1702
|
this.item.value = t;
|
|
1479
1703
|
});
|
|
1480
1704
|
}
|
|
1481
1705
|
}
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1706
|
+
const yt = (s) => typeof s == "string" ? { method: s } : s || {};
|
|
1707
|
+
function O(s, t = j.post, e, i, n = !0, r) {
|
|
1708
|
+
const a = g(!1), h = A(yt(r));
|
|
1709
|
+
return {
|
|
1710
|
+
loading: a,
|
|
1711
|
+
/**
|
|
1712
|
+
* Send request.
|
|
1713
|
+
*
|
|
1714
|
+
* Отправка запроса.
|
|
1715
|
+
* @param request Request data / Данные запроса
|
|
1716
|
+
* @returns Response data / Данные ответа
|
|
1717
|
+
*/
|
|
1718
|
+
async send(c) {
|
|
1719
|
+
a.value = !0;
|
|
1720
|
+
let o;
|
|
1721
|
+
try {
|
|
1722
|
+
if (o = await ct.request({
|
|
1723
|
+
path: d(s),
|
|
1724
|
+
method: t,
|
|
1725
|
+
request: c,
|
|
1726
|
+
toData: n,
|
|
1727
|
+
...h.value
|
|
1728
|
+
}), o && (i && (o = i(o)), e)) {
|
|
1729
|
+
const v = e(o);
|
|
1730
|
+
v instanceof Promise && await v;
|
|
1731
|
+
}
|
|
1732
|
+
} catch (v) {
|
|
1733
|
+
console.error("useApiRequest: error", d(s), v);
|
|
1734
|
+
}
|
|
1735
|
+
return a.value = !1, o;
|
|
1736
|
+
}
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
function qt(s, t, e, i = !0, n) {
|
|
1740
|
+
return O(
|
|
1741
|
+
s,
|
|
1742
|
+
j.delete,
|
|
1743
|
+
t,
|
|
1744
|
+
e,
|
|
1745
|
+
i,
|
|
1746
|
+
n
|
|
1747
|
+
);
|
|
1748
|
+
}
|
|
1749
|
+
function Ae(s, t, e, i = !0, n) {
|
|
1750
|
+
return O(
|
|
1751
|
+
s,
|
|
1752
|
+
j.get,
|
|
1753
|
+
t,
|
|
1754
|
+
e,
|
|
1755
|
+
i,
|
|
1756
|
+
n
|
|
1757
|
+
);
|
|
1758
|
+
}
|
|
1759
|
+
let T;
|
|
1760
|
+
function te(s, t, e = !0, i, n, r = !0) {
|
|
1761
|
+
const a = g(), h = A(yt(t)), c = g(!1), o = g(!1);
|
|
1762
|
+
let v, p = !0, f;
|
|
1763
|
+
const L = async () => {
|
|
1764
|
+
if (p)
|
|
1489
1765
|
return;
|
|
1490
|
-
|
|
1491
|
-
|
|
1766
|
+
v && v.abort(), v = h.value.controller || new AbortController();
|
|
1767
|
+
const I = d(s);
|
|
1768
|
+
if ((!i || i.value) && I) {
|
|
1492
1769
|
c.value = !0, o.value = !0;
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
c.value
|
|
1504
|
-
});
|
|
1505
|
-
}
|
|
1770
|
+
try {
|
|
1771
|
+
const b = await ct.request({
|
|
1772
|
+
path: I,
|
|
1773
|
+
controller: v,
|
|
1774
|
+
...h.value
|
|
1775
|
+
});
|
|
1776
|
+
b && (n ? a.value = n(b) : a.value = b);
|
|
1777
|
+
} catch (b) {
|
|
1778
|
+
console.error("useApiRef: error", I, b), a.value = void 0;
|
|
1779
|
+
}
|
|
1780
|
+
c.value = !1;
|
|
1781
|
+
} else a.value !== void 0 && (a.value = void 0);
|
|
1782
|
+
}, w = () => {
|
|
1783
|
+
console.warn("useApiRef: stop", d(s)), f == null || f(), a.value = void 0, p = !0;
|
|
1784
|
+
}, y = () => {
|
|
1785
|
+
p && (p = !1, L().then(), r ? (C(), Tt() && Ot(() => w())) : N.run(() => C()));
|
|
1786
|
+
}, C = () => {
|
|
1787
|
+
const I = [];
|
|
1788
|
+
e && I.push(h), z(s) && I.push(s), i && I.push(i), T && I.push(T), I.length > 0 && (f = m(I, async () => {
|
|
1789
|
+
c.value || await L();
|
|
1790
|
+
}));
|
|
1791
|
+
}, k = u(() => (y(), a.value)), D = u(() => Array.isArray(a.value) ? a.value.length : a.value ? 1 : 0), S = u(() => a.value === void 0);
|
|
1506
1792
|
return {
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1793
|
+
/** Reactive data (Computed) / Реактивные данные (Computed) */
|
|
1794
|
+
data: k,
|
|
1795
|
+
/** Item (Ref) / Элемент (Ref) */
|
|
1796
|
+
get item() {
|
|
1797
|
+
return y(), a;
|
|
1511
1798
|
},
|
|
1512
|
-
|
|
1513
|
-
|
|
1799
|
+
/**
|
|
1800
|
+
* Returns the count of records in the list (ComputedRef) /
|
|
1801
|
+
* Возвращает количество записей в списке (ComputedRef)
|
|
1802
|
+
*/
|
|
1803
|
+
length: D,
|
|
1804
|
+
/** Start request flag (true if no data yet) / Флаг начала запроса (true если еще нет данных) */
|
|
1805
|
+
starting: S,
|
|
1806
|
+
/** Request load flag / Флаг загрузки запроса */
|
|
1807
|
+
loading: c,
|
|
1808
|
+
/** Active reading flag / Флаг активного чтения */
|
|
1809
|
+
reading: o,
|
|
1810
|
+
/**
|
|
1811
|
+
* Checks if the request is starting (true if no data yet)
|
|
1812
|
+
*
|
|
1813
|
+
* Проверяет, начинается ли запрос (true, если данных еще нет)
|
|
1814
|
+
*/
|
|
1815
|
+
isStarting() {
|
|
1816
|
+
return a.value === void 0;
|
|
1514
1817
|
},
|
|
1515
|
-
|
|
1516
|
-
|
|
1818
|
+
/**
|
|
1819
|
+
* Checks if the request is currently loading.
|
|
1820
|
+
*
|
|
1821
|
+
* Проверяет, загружается ли запрос в данный момент.
|
|
1822
|
+
*/
|
|
1823
|
+
isLoading() {
|
|
1824
|
+
return c.value;
|
|
1825
|
+
},
|
|
1826
|
+
/**
|
|
1827
|
+
* Checks if the request is currently reading.
|
|
1828
|
+
*
|
|
1829
|
+
* Проверяет, читается ли запрос в данный момент.
|
|
1830
|
+
*/
|
|
1831
|
+
isReading() {
|
|
1832
|
+
return o.value;
|
|
1517
1833
|
},
|
|
1518
|
-
|
|
1519
|
-
|
|
1834
|
+
/**
|
|
1835
|
+
* Gets the current item data.
|
|
1836
|
+
*
|
|
1837
|
+
* Получает текущие данные элемента.
|
|
1838
|
+
*/
|
|
1839
|
+
getItem() {
|
|
1840
|
+
return a.value;
|
|
1520
1841
|
},
|
|
1521
|
-
|
|
1842
|
+
/**
|
|
1843
|
+
* Manual initialization
|
|
1844
|
+
*
|
|
1845
|
+
* Ручная инициализация
|
|
1846
|
+
*/
|
|
1847
|
+
init: y,
|
|
1848
|
+
/**
|
|
1849
|
+
* Default reset
|
|
1850
|
+
*
|
|
1851
|
+
* Сброс по умолчанию
|
|
1852
|
+
*/
|
|
1853
|
+
reset: L,
|
|
1854
|
+
/**
|
|
1855
|
+
* Stop request
|
|
1856
|
+
*
|
|
1857
|
+
* Остановка запроса
|
|
1858
|
+
*/
|
|
1859
|
+
stop: w,
|
|
1860
|
+
/**
|
|
1861
|
+
* Abort request
|
|
1862
|
+
*
|
|
1863
|
+
* Отмена запроса
|
|
1864
|
+
*/
|
|
1865
|
+
abort: () => v == null ? void 0 : v.abort()
|
|
1522
1866
|
};
|
|
1523
1867
|
}
|
|
1524
|
-
const
|
|
1525
|
-
|
|
1868
|
+
const Be = (s) => {
|
|
1869
|
+
T || (T = s);
|
|
1526
1870
|
};
|
|
1527
|
-
function
|
|
1871
|
+
function ee(s, t, e, i = !0, n) {
|
|
1872
|
+
return O(
|
|
1873
|
+
s,
|
|
1874
|
+
j.post,
|
|
1875
|
+
t,
|
|
1876
|
+
e,
|
|
1877
|
+
i,
|
|
1878
|
+
n
|
|
1879
|
+
);
|
|
1880
|
+
}
|
|
1881
|
+
function ie(s, t, e, i = !0, n) {
|
|
1882
|
+
return O(
|
|
1883
|
+
s,
|
|
1884
|
+
j.put,
|
|
1885
|
+
t,
|
|
1886
|
+
e,
|
|
1887
|
+
i,
|
|
1888
|
+
n
|
|
1889
|
+
);
|
|
1890
|
+
}
|
|
1891
|
+
function se(s, t) {
|
|
1892
|
+
const e = new At(t), i = u(() => e.setList(s.value).to()), n = u(() => e.setList(s.value).length());
|
|
1893
|
+
return {
|
|
1894
|
+
/**
|
|
1895
|
+
* Formatted data list (ComputedRef) /
|
|
1896
|
+
* Отформатированный список данных (ComputedRef)
|
|
1897
|
+
*/
|
|
1898
|
+
listFormat: i,
|
|
1899
|
+
/**
|
|
1900
|
+
* Returns the count of records in the list (ComputedRef) /
|
|
1901
|
+
* Возвращает количество записей в списке (ComputedRef)
|
|
1902
|
+
*/
|
|
1903
|
+
length: n
|
|
1904
|
+
};
|
|
1905
|
+
}
|
|
1906
|
+
function ne(s, t) {
|
|
1907
|
+
const e = t != null ? t : g(""), i = g(e.value), n = g(!1);
|
|
1908
|
+
let r;
|
|
1909
|
+
return m(e, (a, h, c) => {
|
|
1910
|
+
const o = s.getOptions().getDelay();
|
|
1911
|
+
o ? (n.value = !0, r = setTimeout(() => {
|
|
1912
|
+
r = void 0, i.value = e.value, n.value = !1;
|
|
1913
|
+
}, o), c(() => {
|
|
1914
|
+
r && clearTimeout(r);
|
|
1915
|
+
})) : i.value = e.value;
|
|
1916
|
+
}), {
|
|
1917
|
+
/** Current search value / Текущее значение поиска */
|
|
1918
|
+
search: e,
|
|
1919
|
+
/** Search value with applied delay / Значение поиска с примененной задержкой */
|
|
1920
|
+
searchDelay: i,
|
|
1921
|
+
/** Loading status during delay / Статус загрузки во время задержки */
|
|
1922
|
+
loading: n
|
|
1923
|
+
};
|
|
1924
|
+
}
|
|
1925
|
+
function re(s, t, e, i) {
|
|
1926
|
+
const n = new Bt(
|
|
1927
|
+
void 0,
|
|
1928
|
+
t,
|
|
1929
|
+
void 0,
|
|
1930
|
+
i
|
|
1931
|
+
), {
|
|
1932
|
+
search: r,
|
|
1933
|
+
searchDelay: a,
|
|
1934
|
+
loading: h
|
|
1935
|
+
} = ne(n, e), c = () => {
|
|
1936
|
+
const f = d(tt(s));
|
|
1937
|
+
return f || [];
|
|
1938
|
+
}, o = u(
|
|
1939
|
+
() => n.setValue(a.value).getItem().isSearch()
|
|
1940
|
+
), v = u(() => n.setList(c()).setValue(a.value).to()), p = u(() => v.value.length);
|
|
1941
|
+
return {
|
|
1942
|
+
/**
|
|
1943
|
+
* Whether the search is currently active (minimum character limit reached)/
|
|
1944
|
+
* Активен ли поиск в данный момент (достигнут ли лимит символов)
|
|
1945
|
+
*/
|
|
1946
|
+
isSearch: o,
|
|
1947
|
+
/** Search string ref/ Ссылка на строку поиска */
|
|
1948
|
+
search: r,
|
|
1949
|
+
/**
|
|
1950
|
+
* Search loading status (if delay is used) /
|
|
1951
|
+
* Статус загрузки поиска (если используется задержка)
|
|
1952
|
+
*/
|
|
1953
|
+
loading: h,
|
|
1954
|
+
/**
|
|
1955
|
+
* Formatted list of search results with highlights /
|
|
1956
|
+
* Форматированный список результатов поиска с подсветкой совпадений
|
|
1957
|
+
*/
|
|
1958
|
+
listSearch: v,
|
|
1959
|
+
/**
|
|
1960
|
+
* Length of the search results /
|
|
1961
|
+
* Длина списка результатов поиска
|
|
1962
|
+
*/
|
|
1963
|
+
length: p
|
|
1964
|
+
};
|
|
1965
|
+
}
|
|
1966
|
+
function Me(s, t, e, i, n, r, a) {
|
|
1967
|
+
const {
|
|
1968
|
+
path: h,
|
|
1969
|
+
options: c,
|
|
1970
|
+
reactivity: o,
|
|
1971
|
+
conditions: v,
|
|
1972
|
+
transformation: p,
|
|
1973
|
+
unmounted: f,
|
|
1974
|
+
skeleton: L
|
|
1975
|
+
} = s;
|
|
1976
|
+
let w, y, C, k, D;
|
|
1977
|
+
const S = te(
|
|
1978
|
+
h,
|
|
1979
|
+
c,
|
|
1980
|
+
o,
|
|
1981
|
+
v,
|
|
1982
|
+
p,
|
|
1983
|
+
f
|
|
1984
|
+
), I = u(() => S.isStarting() && L ? L() : S.data.value);
|
|
1985
|
+
if (t && (w = se(
|
|
1986
|
+
I,
|
|
1987
|
+
t
|
|
1988
|
+
)), e) {
|
|
1989
|
+
const b = u(() => {
|
|
1990
|
+
var B;
|
|
1991
|
+
const F = (B = w == null ? void 0 : w.listFormat.value) != null ? B : S.data.value;
|
|
1992
|
+
if (Array.isArray(F))
|
|
1993
|
+
return F;
|
|
1994
|
+
});
|
|
1995
|
+
y = re(
|
|
1996
|
+
b,
|
|
1997
|
+
e.columns,
|
|
1998
|
+
e.value,
|
|
1999
|
+
e.options
|
|
2000
|
+
);
|
|
2001
|
+
}
|
|
2002
|
+
if (i || n || r) {
|
|
2003
|
+
const b = (B) => {
|
|
2004
|
+
a == null || a(), Nt(B) && S.reset();
|
|
2005
|
+
}, F = (B) => async (nt) => {
|
|
2006
|
+
Mt(B) && await et(B(nt)), b(nt);
|
|
2007
|
+
};
|
|
2008
|
+
i && (C = ee(
|
|
2009
|
+
i.path,
|
|
2010
|
+
F(i.action),
|
|
2011
|
+
i.transformation,
|
|
2012
|
+
i.toData,
|
|
2013
|
+
i.options
|
|
2014
|
+
)), n && (k = ie(
|
|
2015
|
+
n.path,
|
|
2016
|
+
F(n.action),
|
|
2017
|
+
n.transformation,
|
|
2018
|
+
n.toData,
|
|
2019
|
+
n.options
|
|
2020
|
+
)), r && (D = qt(
|
|
2021
|
+
r.path,
|
|
2022
|
+
F(r.action),
|
|
2023
|
+
r.transformation,
|
|
2024
|
+
r.toData,
|
|
2025
|
+
r.options
|
|
2026
|
+
));
|
|
2027
|
+
}
|
|
2028
|
+
return {
|
|
2029
|
+
/** List data (Computed) / Данные списка (Computed) */
|
|
2030
|
+
get list() {
|
|
2031
|
+
return y && Array.isArray(S.data.value) ? y.listSearch : w ? w.listFormat : I;
|
|
2032
|
+
},
|
|
2033
|
+
/** Raw request data (Computed) / Исходные данные запроса (Computed) */
|
|
2034
|
+
get data() {
|
|
2035
|
+
return S.data;
|
|
2036
|
+
},
|
|
2037
|
+
/** Length of the list (Computed) / Длина списка (Computed) */
|
|
2038
|
+
get length() {
|
|
2039
|
+
return y ? y.length : S.length;
|
|
2040
|
+
},
|
|
2041
|
+
/** Data length (number) / Длина исходных данных */
|
|
2042
|
+
lengthData: S.length,
|
|
2043
|
+
/** Active starting flag (true if no data yet) / Флаг начальной загрузки (true если еще нет данных) */
|
|
2044
|
+
starting: S.starting,
|
|
2045
|
+
/** Active reading flag / Флаг активного чтения */
|
|
2046
|
+
reading: S.reading,
|
|
2047
|
+
/** Request load flag / Флаг загрузки запроса */
|
|
2048
|
+
loading: S.loading,
|
|
2049
|
+
/** Loading search flag / Флаг загрузки поиска */
|
|
2050
|
+
loadingSearch: y == null ? void 0 : y.loading,
|
|
2051
|
+
/** POST request load flag / Флаг загрузки POST запроса */
|
|
2052
|
+
loadingPost: C == null ? void 0 : C.loading,
|
|
2053
|
+
/** PUT request load flag / Флаг загрузки PUT запроса */
|
|
2054
|
+
loadingPut: k == null ? void 0 : k.loading,
|
|
2055
|
+
/** DELETE request load flag / Флаг загрузки DELETE запроса */
|
|
2056
|
+
loadingDelete: D == null ? void 0 : D.loading,
|
|
2057
|
+
/** Is search active / Активен ли поиск */
|
|
2058
|
+
isSearch: y == null ? void 0 : y.isSearch,
|
|
2059
|
+
/** Search function / Функция поиска */
|
|
2060
|
+
search: y == null ? void 0 : y.search,
|
|
2061
|
+
/**
|
|
2062
|
+
* Default reset.
|
|
2063
|
+
*
|
|
2064
|
+
* Сброс по умолчанию.
|
|
2065
|
+
*/
|
|
2066
|
+
reset: S.reset,
|
|
2067
|
+
/**
|
|
2068
|
+
* Abort request.
|
|
2069
|
+
*
|
|
2070
|
+
* Отмена запроса.
|
|
2071
|
+
*/
|
|
2072
|
+
abort: S.abort,
|
|
2073
|
+
/**
|
|
2074
|
+
* Send POST request.
|
|
2075
|
+
*
|
|
2076
|
+
* Выполнить POST запрос.
|
|
2077
|
+
* @param request request data / данные запроса
|
|
2078
|
+
*/
|
|
2079
|
+
sendPost: async (b) => await (C == null ? void 0 : C.send(b)),
|
|
2080
|
+
/**
|
|
2081
|
+
* Send PUT request.
|
|
2082
|
+
*
|
|
2083
|
+
* Выполнить PUT запрос.
|
|
2084
|
+
* @param request request data / данные запроса
|
|
2085
|
+
*/
|
|
2086
|
+
sendPut: async (b) => await (k == null ? void 0 : k.send(b)),
|
|
2087
|
+
/**
|
|
2088
|
+
* Send DELETE request.
|
|
2089
|
+
*
|
|
2090
|
+
* Выполнить DELETE запрос.
|
|
2091
|
+
* @param request request data / данные запроса
|
|
2092
|
+
*/
|
|
2093
|
+
sendDelete: async (b) => await (D == null ? void 0 : D.send(b))
|
|
2094
|
+
};
|
|
2095
|
+
}
|
|
2096
|
+
function ae(s, t) {
|
|
1528
2097
|
const e = `broadcast--${s}`;
|
|
1529
|
-
if (e in
|
|
1530
|
-
return
|
|
1531
|
-
const i =
|
|
2098
|
+
if (e in _)
|
|
2099
|
+
return _[e];
|
|
2100
|
+
const i = g(tt(t)), n = new Ft(
|
|
1532
2101
|
e,
|
|
1533
2102
|
(r) => {
|
|
1534
2103
|
i.value !== r.data.message && (i.value = r.data.message);
|
|
1535
2104
|
}
|
|
1536
2105
|
);
|
|
1537
|
-
return
|
|
2106
|
+
return N.run(() => {
|
|
2107
|
+
m(i, (r) => n.post({ message: r }));
|
|
2108
|
+
}), _[e] = i, i;
|
|
1538
2109
|
}
|
|
1539
|
-
const
|
|
1540
|
-
function
|
|
1541
|
-
if (s in
|
|
1542
|
-
return
|
|
1543
|
-
const i = new
|
|
2110
|
+
const _ = {};
|
|
2111
|
+
function Ne(s, t, e) {
|
|
2112
|
+
if (s in G)
|
|
2113
|
+
return G[s];
|
|
2114
|
+
const i = new Ht(s), n = ae(
|
|
1544
2115
|
`__cookie:${s}`,
|
|
1545
2116
|
i.get(t, e)
|
|
1546
2117
|
);
|
|
1547
|
-
return
|
|
1548
|
-
|
|
1549
|
-
|
|
2118
|
+
return N.run(() => {
|
|
2119
|
+
m(n, (r) => {
|
|
2120
|
+
i.set(r, e);
|
|
2121
|
+
});
|
|
2122
|
+
}), G[s] = n, n;
|
|
1550
2123
|
}
|
|
1551
|
-
const
|
|
1552
|
-
function
|
|
1553
|
-
return new
|
|
2124
|
+
const G = {};
|
|
2125
|
+
function Fe() {
|
|
2126
|
+
return new Zt();
|
|
1554
2127
|
}
|
|
1555
|
-
function
|
|
1556
|
-
if (s in
|
|
1557
|
-
return
|
|
1558
|
-
const e =
|
|
1559
|
-
return
|
|
2128
|
+
function He(s, t) {
|
|
2129
|
+
if (s in K)
|
|
2130
|
+
return K[s];
|
|
2131
|
+
const e = M(U.get(s, t));
|
|
2132
|
+
return N.run(() => {
|
|
2133
|
+
m(e, (i) => U.set(s, i));
|
|
2134
|
+
}), U.addWatch(s, (i) => {
|
|
1560
2135
|
e.value = i;
|
|
1561
|
-
}),
|
|
2136
|
+
}), K[s] = e, e;
|
|
1562
2137
|
}
|
|
1563
|
-
const
|
|
2138
|
+
const K = {}, ue = (s = {
|
|
1564
2139
|
rootMargin: "128px 0px"
|
|
1565
2140
|
}) => {
|
|
1566
|
-
const t = {}, e =
|
|
2141
|
+
const t = {}, e = ht() && "IntersectionObserver" in window ? new IntersectionObserver(
|
|
1567
2142
|
(n) => {
|
|
1568
2143
|
n.forEach((r) => {
|
|
1569
|
-
const
|
|
1570
|
-
if (
|
|
1571
|
-
const h = t[
|
|
2144
|
+
const a = $(r.target);
|
|
2145
|
+
if (a in t) {
|
|
2146
|
+
const h = t[a];
|
|
1572
2147
|
h.status.value = r.isIntersecting, h.ratio.value = r.intersectionRatio, h.entry.value = r;
|
|
1573
2148
|
}
|
|
1574
2149
|
});
|
|
@@ -1577,8 +2152,8 @@ const $ = {}, $t = (s = {
|
|
|
1577
2152
|
) : void 0, i = (n) => {
|
|
1578
2153
|
var r;
|
|
1579
2154
|
if (n) {
|
|
1580
|
-
const
|
|
1581
|
-
|
|
2155
|
+
const a = $(n);
|
|
2156
|
+
a in t && (e == null || e.unobserve(n), (r = t[a]) == null || r.stopWatch(), delete t[a]);
|
|
1582
2157
|
}
|
|
1583
2158
|
};
|
|
1584
2159
|
return {
|
|
@@ -1590,7 +2165,7 @@ const $ = {}, $t = (s = {
|
|
|
1590
2165
|
* @param element tracked element/ отслеживаемый элемент
|
|
1591
2166
|
*/
|
|
1592
2167
|
getItem(n) {
|
|
1593
|
-
const r =
|
|
2168
|
+
const r = $(n);
|
|
1594
2169
|
return t[r];
|
|
1595
2170
|
},
|
|
1596
2171
|
/**
|
|
@@ -1600,17 +2175,17 @@ const $ = {}, $t = (s = {
|
|
|
1600
2175
|
* @param element element for tracking/ элемента для отслеживания
|
|
1601
2176
|
*/
|
|
1602
2177
|
addLazyItem(n) {
|
|
1603
|
-
const r =
|
|
2178
|
+
const r = M(!e);
|
|
1604
2179
|
if (e) {
|
|
1605
|
-
let
|
|
1606
|
-
|
|
2180
|
+
let a;
|
|
2181
|
+
a = m(n, (h, c) => {
|
|
1607
2182
|
if (c && i(c), n.value) {
|
|
1608
|
-
const o =
|
|
2183
|
+
const o = $(n.value);
|
|
1609
2184
|
t[o] = {
|
|
1610
2185
|
status: r,
|
|
1611
|
-
ratio:
|
|
1612
|
-
entry:
|
|
1613
|
-
stopWatch: () =>
|
|
2186
|
+
ratio: M(0),
|
|
2187
|
+
entry: M(void 0),
|
|
2188
|
+
stopWatch: () => a == null ? void 0 : a()
|
|
1614
2189
|
}, e.observe(n.value);
|
|
1615
2190
|
} else
|
|
1616
2191
|
i(n.value);
|
|
@@ -1631,14 +2206,14 @@ const $ = {}, $t = (s = {
|
|
|
1631
2206
|
*/
|
|
1632
2207
|
disconnectLazy: () => e == null ? void 0 : e.disconnect()
|
|
1633
2208
|
};
|
|
1634
|
-
},
|
|
1635
|
-
const t =
|
|
2209
|
+
}, ot = [], le = (s) => {
|
|
2210
|
+
const t = ot.find((i) => i.rootMargin === s);
|
|
1636
2211
|
if (t)
|
|
1637
2212
|
return t.item;
|
|
1638
|
-
const e =
|
|
1639
|
-
return
|
|
1640
|
-
},
|
|
1641
|
-
const e =
|
|
2213
|
+
const e = ue({ rootMargin: s });
|
|
2214
|
+
return ot.push({ rootMargin: s, item: e }), e;
|
|
2215
|
+
}, $e = (s, t) => {
|
|
2216
|
+
const e = le(t);
|
|
1642
2217
|
return {
|
|
1643
2218
|
/** Lazy item status/ Статус ленивого элемента */
|
|
1644
2219
|
lazyItemStatus: e.addLazyItem(s),
|
|
@@ -1652,61 +2227,88 @@ const $ = {}, $t = (s = {
|
|
|
1652
2227
|
}
|
|
1653
2228
|
};
|
|
1654
2229
|
};
|
|
1655
|
-
function
|
|
1656
|
-
const s =
|
|
1657
|
-
return
|
|
2230
|
+
function Ee() {
|
|
2231
|
+
const s = M(ut.is());
|
|
2232
|
+
return ut.registrationEvent(({ detail: t }) => {
|
|
1658
2233
|
s.value = t.loading;
|
|
1659
2234
|
}), s;
|
|
1660
2235
|
}
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
const
|
|
2236
|
+
var oe = /* @__PURE__ */ ((s) => (s.global = "global", s.provide = "provide", s.local = "local", s))(oe || {});
|
|
2237
|
+
const ce = () => `__execute_use${he}::${$()}`, he = $t(1e5, 999999), q = [], de = it();
|
|
2238
|
+
function st(s, t = "provide") {
|
|
2239
|
+
const e = ce();
|
|
2240
|
+
let i;
|
|
2241
|
+
const n = (c) => {
|
|
1665
2242
|
const o = Object.freeze(s(...c));
|
|
1666
|
-
return
|
|
2243
|
+
return {
|
|
1667
2244
|
...o,
|
|
1668
2245
|
init() {
|
|
1669
2246
|
return o;
|
|
1670
2247
|
}
|
|
2248
|
+
};
|
|
2249
|
+
}, r = (c) => {
|
|
2250
|
+
const o = Object.freeze(n(c));
|
|
2251
|
+
return Ut(e, o), o;
|
|
2252
|
+
}, a = (c) => {
|
|
2253
|
+
const o = n(c);
|
|
2254
|
+
return Object.freeze({
|
|
2255
|
+
...o,
|
|
2256
|
+
destroyExecute() {
|
|
2257
|
+
i = void 0;
|
|
2258
|
+
}
|
|
1671
2259
|
});
|
|
1672
2260
|
}, h = (...c) => {
|
|
1673
|
-
if (
|
|
1674
|
-
const o =
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
m = void 0;
|
|
1681
|
-
}), m;
|
|
1682
|
-
}
|
|
1683
|
-
} else n || (n = u(c), t && T(() => {
|
|
1684
|
-
n = void 0;
|
|
1685
|
-
}));
|
|
1686
|
-
return n;
|
|
2261
|
+
if (t === "provide") {
|
|
2262
|
+
const o = Wt(e, void 0);
|
|
2263
|
+
return o || r(c);
|
|
2264
|
+
} else i || (t === "local" ? de.run(() => {
|
|
2265
|
+
i = a(c);
|
|
2266
|
+
}) : i = a(c));
|
|
2267
|
+
return i;
|
|
1687
2268
|
};
|
|
1688
|
-
return
|
|
2269
|
+
return t === "global" && q.push(h), h;
|
|
1689
2270
|
}
|
|
1690
|
-
function
|
|
1691
|
-
|
|
2271
|
+
function ge(s) {
|
|
2272
|
+
return st(
|
|
2273
|
+
s,
|
|
2274
|
+
"global"
|
|
2275
|
+
/* global */
|
|
2276
|
+
);
|
|
1692
2277
|
}
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
2278
|
+
function Re(s) {
|
|
2279
|
+
return st(
|
|
2280
|
+
s,
|
|
2281
|
+
"provide"
|
|
2282
|
+
/* provide */
|
|
2283
|
+
);
|
|
2284
|
+
}
|
|
2285
|
+
function Pe(s) {
|
|
2286
|
+
return st(
|
|
2287
|
+
s,
|
|
2288
|
+
"local"
|
|
2289
|
+
/* local */
|
|
2290
|
+
);
|
|
2291
|
+
}
|
|
2292
|
+
function je() {
|
|
2293
|
+
q.forEach((s) => s()), q.length = 0;
|
|
2294
|
+
}
|
|
2295
|
+
const fe = ge(() => {
|
|
2296
|
+
const s = new Et(), t = g(s.getTitle()), e = g(s.getKeywords()), i = g(s.getDescription()), n = g(s.getImage()), r = g(s.getCanonical()), a = g(s.getRobots()), h = g(s.getAuthor()), c = g(s.getSiteName()), o = () => s.html();
|
|
2297
|
+
return m(t, () => {
|
|
1696
2298
|
s.setTitle(t.value);
|
|
1697
|
-
}),
|
|
2299
|
+
}), m(e, () => {
|
|
1698
2300
|
s.setKeywords(e.value);
|
|
1699
|
-
}),
|
|
2301
|
+
}), m(i, () => {
|
|
1700
2302
|
s.setDescription(i.value);
|
|
1701
|
-
}),
|
|
2303
|
+
}), m(n, () => {
|
|
1702
2304
|
s.setImage(n.value);
|
|
1703
|
-
}),
|
|
2305
|
+
}), m(r, () => {
|
|
1704
2306
|
s.setCanonical(r.value);
|
|
1705
|
-
}),
|
|
1706
|
-
s.setRobots(
|
|
1707
|
-
}),
|
|
2307
|
+
}), m(a, () => {
|
|
2308
|
+
s.setRobots(a.value);
|
|
2309
|
+
}), m(h, () => {
|
|
1708
2310
|
s.setAuthor(h.value);
|
|
1709
|
-
}),
|
|
2311
|
+
}), m(c, () => {
|
|
1710
2312
|
s.setSiteName(c.value);
|
|
1711
2313
|
}), {
|
|
1712
2314
|
meta: s,
|
|
@@ -1716,32 +2318,71 @@ const Tt = zt(() => {
|
|
|
1716
2318
|
author: h,
|
|
1717
2319
|
image: n,
|
|
1718
2320
|
canonical: r,
|
|
1719
|
-
robots:
|
|
2321
|
+
robots: a,
|
|
1720
2322
|
siteName: c,
|
|
1721
2323
|
getHtmlMeta: o
|
|
1722
2324
|
};
|
|
1723
|
-
},
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
2325
|
+
}), ze = () => fe(), Ve = (s, t, e = !0) => {
|
|
2326
|
+
var v, p;
|
|
2327
|
+
const i = z(t) ? t : g(t || ((p = (v = s.value) == null ? void 0 : v[0]) == null ? void 0 : p.value) || ""), n = () => r(i.value), r = (f) => {
|
|
2328
|
+
var L;
|
|
2329
|
+
return (L = s.value) == null ? void 0 : L.find((w) => w.value === f);
|
|
2330
|
+
}, a = (f) => {
|
|
2331
|
+
f && f !== i.value && r(f) && (i.value = f, mt.push({ name: f }));
|
|
2332
|
+
}, h = u(() => n()), c = u(() => {
|
|
2333
|
+
var f;
|
|
2334
|
+
return ((f = n()) == null ? void 0 : f.label) || "";
|
|
2335
|
+
}), o = u(() => s.value ? H(
|
|
2336
|
+
s.value,
|
|
2337
|
+
(f) => e && !("to" in f) ? {
|
|
2338
|
+
...f,
|
|
2339
|
+
to: { name: f.value }
|
|
2340
|
+
} : f
|
|
2341
|
+
) : []);
|
|
2342
|
+
return {
|
|
2343
|
+
item: h,
|
|
2344
|
+
/** Selected element / Выбранный элемент */
|
|
2345
|
+
selected: i,
|
|
2346
|
+
label: c,
|
|
2347
|
+
/** List of elements / Список элементов */
|
|
2348
|
+
list: o,
|
|
2349
|
+
to: a,
|
|
2350
|
+
/**
|
|
2351
|
+
* Transition to the main element.
|
|
2352
|
+
*
|
|
2353
|
+
* Переход к главному элементу.
|
|
2354
|
+
*/
|
|
2355
|
+
toMain() {
|
|
2356
|
+
var f, L;
|
|
2357
|
+
a((L = (f = s.value) == null ? void 0 : f[0]) == null ? void 0 : L.value);
|
|
2358
|
+
}
|
|
2359
|
+
};
|
|
2360
|
+
};
|
|
2361
|
+
function Te(s, t) {
|
|
2362
|
+
if (s in Y)
|
|
2363
|
+
return Y[s];
|
|
2364
|
+
const e = new dt(s, !0), i = g(e.get(t));
|
|
2365
|
+
return N.run(() => {
|
|
2366
|
+
m(i, (n) => e.set(n));
|
|
2367
|
+
}), Y[s] = i, i;
|
|
1729
2368
|
}
|
|
1730
|
-
const
|
|
1731
|
-
function
|
|
1732
|
-
if (s in
|
|
1733
|
-
return
|
|
1734
|
-
const i = new
|
|
1735
|
-
return
|
|
2369
|
+
const Y = {};
|
|
2370
|
+
function Oe(s, t, e) {
|
|
2371
|
+
if (s in J)
|
|
2372
|
+
return J[s];
|
|
2373
|
+
const i = new dt(s), n = g(i.get(t, e));
|
|
2374
|
+
return N.run(() => {
|
|
2375
|
+
m(n, (r) => i.set(r));
|
|
2376
|
+
}), ht() && window.addEventListener("storage", () => {
|
|
1736
2377
|
i.update(), n.value = i.get();
|
|
1737
|
-
}),
|
|
2378
|
+
}), J[s] = n, n;
|
|
1738
2379
|
}
|
|
1739
|
-
const
|
|
1740
|
-
function
|
|
1741
|
-
const t =
|
|
1742
|
-
t.value = { ...await
|
|
2380
|
+
const J = {};
|
|
2381
|
+
function ve(s) {
|
|
2382
|
+
const t = M(lt.getListSync(s, !0)), e = async () => {
|
|
2383
|
+
t.value = { ...await lt.getList(s) };
|
|
1743
2384
|
};
|
|
1744
|
-
|
|
2385
|
+
m(R.getLanguage(), e);
|
|
1745
2386
|
for (const i in t.value)
|
|
1746
2387
|
if (t.value[i] === i || t.value[i] === " ") {
|
|
1747
2388
|
e().then();
|
|
@@ -1749,95 +2390,132 @@ function Ot(s) {
|
|
|
1749
2390
|
}
|
|
1750
2391
|
return t;
|
|
1751
2392
|
}
|
|
1752
|
-
const
|
|
1753
|
-
function
|
|
1754
|
-
const
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
2393
|
+
const We = (s) => ve(s);
|
|
2394
|
+
function Ue(s, t, e) {
|
|
2395
|
+
const i = g();
|
|
2396
|
+
let n = !0;
|
|
2397
|
+
const r = () => {
|
|
2398
|
+
n && (n = !1, gt(async () => {
|
|
2399
|
+
const a = await et(s);
|
|
2400
|
+
a !== t && (i.value = a);
|
|
2401
|
+
}));
|
|
2402
|
+
};
|
|
2403
|
+
return u(() => (r(), i.value), e);
|
|
1758
2404
|
}
|
|
1759
|
-
function
|
|
2405
|
+
function _e(s, t = () => {
|
|
1760
2406
|
}, e, i) {
|
|
1761
|
-
return
|
|
2407
|
+
return u(
|
|
1762
2408
|
() => {
|
|
1763
|
-
if (
|
|
2409
|
+
if (R.get().value && (e === void 0 || e())) {
|
|
1764
2410
|
const n = s();
|
|
1765
2411
|
if (n !== void 0)
|
|
1766
2412
|
return n;
|
|
1767
2413
|
}
|
|
1768
|
-
return
|
|
2414
|
+
return tt(t);
|
|
1769
2415
|
},
|
|
1770
2416
|
i
|
|
1771
2417
|
);
|
|
1772
2418
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
return
|
|
2419
|
+
const me = it();
|
|
2420
|
+
function Ge(s) {
|
|
2421
|
+
return _t((t, e) => {
|
|
2422
|
+
const i = g();
|
|
2423
|
+
let n = !1;
|
|
2424
|
+
const r = async () => {
|
|
2425
|
+
i.value = await et(s), e();
|
|
2426
|
+
}, a = () => {
|
|
2427
|
+
n || (n = !0, me.run(() => {
|
|
2428
|
+
gt(async () => await r());
|
|
2429
|
+
}));
|
|
2430
|
+
};
|
|
2431
|
+
return {
|
|
2432
|
+
/**
|
|
2433
|
+
* Gets the computed value.
|
|
2434
|
+
*
|
|
2435
|
+
* Получает вычисляемое значение.
|
|
2436
|
+
*/
|
|
2437
|
+
get() {
|
|
2438
|
+
return a(), t(), i.value;
|
|
2439
|
+
},
|
|
2440
|
+
/**
|
|
2441
|
+
* Displays a warning that the value is read-only.
|
|
2442
|
+
*
|
|
2443
|
+
* Выводит предупреждение о том, что значение доступно только для чтения.
|
|
2444
|
+
*/
|
|
2445
|
+
set(h) {
|
|
2446
|
+
console.warn("computedEternity: value is read-only.");
|
|
2447
|
+
}
|
|
2448
|
+
};
|
|
2449
|
+
});
|
|
1776
2450
|
}
|
|
1777
|
-
function
|
|
1778
|
-
|
|
2451
|
+
function ye(s, t = {}, e = "value", i = !1) {
|
|
2452
|
+
const n = typeof t == "string", r = n ? t : e, a = n ? {} : t;
|
|
2453
|
+
return s ? s && P(s) && (r in s || i) ? Z(a, s) : Z(a, { [r]: s }) : n ? {} : { ...a };
|
|
1779
2454
|
}
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
let i = !0;
|
|
1783
|
-
const n = () => {
|
|
1784
|
-
i && (Q(async () => {
|
|
1785
|
-
const r = d(await s());
|
|
1786
|
-
r !== t && (e.value = r);
|
|
1787
|
-
}), i = !1);
|
|
1788
|
-
};
|
|
1789
|
-
return a(() => (n(), e.value));
|
|
1790
|
-
};
|
|
1791
|
-
function fe(s, t) {
|
|
1792
|
-
s.value !== t && (s.value = t);
|
|
2455
|
+
function Ke(s, t = {}, e = "value") {
|
|
2456
|
+
return u(() => ye(d(s), d(t), e));
|
|
1793
2457
|
}
|
|
1794
|
-
function
|
|
1795
|
-
|
|
1796
|
-
return a(() => (t || (t = s()), t.value));
|
|
2458
|
+
function Ye(s, t) {
|
|
2459
|
+
s.value !== t && (s.value = t);
|
|
1797
2460
|
}
|
|
1798
2461
|
export {
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
2462
|
+
xe as DatetimeRef,
|
|
2463
|
+
Kt as DesignAbstract,
|
|
2464
|
+
Ie as DesignAsyncAbstract,
|
|
2465
|
+
Gt as DesignChanged,
|
|
2466
|
+
Le as DesignComp,
|
|
2467
|
+
ft as DesignComponents,
|
|
2468
|
+
we as DesignConstructorAbstract,
|
|
2469
|
+
N as EffectScopeGlobal,
|
|
2470
|
+
Ce as EventRef,
|
|
2471
|
+
oe as ExecuteUseType,
|
|
2472
|
+
ke as GeoFlagRef,
|
|
2473
|
+
Zt as GeoIntlRef,
|
|
2474
|
+
R as GeoRef,
|
|
2475
|
+
vt as ListDataRef,
|
|
2476
|
+
mt as RouterItemRef,
|
|
2477
|
+
De as ScrollbarWidthRef,
|
|
2478
|
+
Ue as computedAsync,
|
|
2479
|
+
_e as computedByLanguage,
|
|
2480
|
+
Ge as computedEternity,
|
|
2481
|
+
st as executeUse,
|
|
2482
|
+
ge as executeUseGlobal,
|
|
2483
|
+
je as executeUseGlobalInit,
|
|
2484
|
+
Pe as executeUseLocal,
|
|
2485
|
+
Re as executeUseProvide,
|
|
2486
|
+
ye as getBind,
|
|
2487
|
+
Ke as getBindRef,
|
|
2488
|
+
Yt as getClassName,
|
|
2489
|
+
Jt as getIndexForRender,
|
|
2490
|
+
yt as getOptions,
|
|
1822
2491
|
d as getRef,
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
2492
|
+
Qt as render,
|
|
2493
|
+
Be as setApiRefGlobalConditions,
|
|
2494
|
+
Ye as setRef,
|
|
2495
|
+
We as t,
|
|
2496
|
+
Z as toBind,
|
|
2497
|
+
Xt as toBinds,
|
|
2498
|
+
A as toRefItem,
|
|
2499
|
+
qt as useApiDelete,
|
|
2500
|
+
Ae as useApiGet,
|
|
2501
|
+
Me as useApiManagementRef,
|
|
2502
|
+
ee as useApiPost,
|
|
2503
|
+
ie as useApiPut,
|
|
2504
|
+
te as useApiRef,
|
|
2505
|
+
O as useApiRequest,
|
|
2506
|
+
ae as useBroadcastValueRef,
|
|
2507
|
+
Ne as useCookieRef,
|
|
2508
|
+
se as useFormattersRef,
|
|
2509
|
+
Fe as useGeoIntlRef,
|
|
2510
|
+
He as useHashRef,
|
|
2511
|
+
$e as useLazyItemByMarginRef,
|
|
2512
|
+
ue as useLazyRef,
|
|
2513
|
+
Ee as useLoadingRef,
|
|
2514
|
+
ze as useMeta,
|
|
2515
|
+
Ve as useRouterList,
|
|
2516
|
+
re as useSearchRef,
|
|
2517
|
+
ne as useSearchValueRef,
|
|
2518
|
+
Te as useSessionRef,
|
|
2519
|
+
Oe as useStorageRef,
|
|
2520
|
+
ve as useTranslateRef
|
|
1843
2521
|
};
|