@dxtmisha/functional 1.1.0 → 1.2.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/dist/classes/BroadcastMessage.d.ts +36 -0
- package/dist/library.d.ts +1 -0
- package/dist/library.js +323 -277
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A class to handle BroadcastChannel messaging.
|
|
3
|
+
*
|
|
4
|
+
* Класс для работы с сообщениями BroadcastChannel.
|
|
5
|
+
*/
|
|
6
|
+
export declare class BroadcastMessage<Message = any> {
|
|
7
|
+
protected callback?: ((event: MessageEvent<Message>) => void) | undefined;
|
|
8
|
+
protected channel?: BroadcastChannel;
|
|
9
|
+
/**
|
|
10
|
+
* Constructor
|
|
11
|
+
* @param name channel name/ название канала
|
|
12
|
+
* @param callback callback on message received/ колбэк на получение сообщения
|
|
13
|
+
*/
|
|
14
|
+
constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined);
|
|
15
|
+
/**
|
|
16
|
+
* Send a message to the channel.
|
|
17
|
+
*
|
|
18
|
+
* Отправить сообщение в канал.
|
|
19
|
+
* @param message message to send/ сообщение для отправки
|
|
20
|
+
*/
|
|
21
|
+
post(message: Message): this;
|
|
22
|
+
/**
|
|
23
|
+
* Set the callback function to be called when a message is received.
|
|
24
|
+
*
|
|
25
|
+
* Установить функцию колбэка, которая будет вызвана при получении сообщения.
|
|
26
|
+
* @param callback callback function/ функция колбэка
|
|
27
|
+
*/
|
|
28
|
+
setCallback(callback: (event: MessageEvent<Message>) => void): this;
|
|
29
|
+
/**
|
|
30
|
+
* Update state on message received.
|
|
31
|
+
*
|
|
32
|
+
* Обновление состояния при получении сообщения.
|
|
33
|
+
* @param event message event/ событие сообщения
|
|
34
|
+
*/
|
|
35
|
+
protected readonly update: (event: MessageEvent<Message>) => this;
|
|
36
|
+
}
|
package/dist/library.d.ts
CHANGED
package/dist/library.js
CHANGED
|
@@ -1,10 +1,64 @@
|
|
|
1
1
|
var Bt = Object.defineProperty;
|
|
2
2
|
var Tt = (i, t, e) => t in i ? Bt(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
3
|
var k = (i, t, e) => Tt(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { i as d,
|
|
5
|
-
import { o as
|
|
6
|
-
import { h as
|
|
7
|
-
|
|
4
|
+
import { D as Y, i as d, r as O, e as A, a as W, b as Ft, G as p, f, t as b, c as ot, d as T, g as Et, h as K, j as m, k as L, A as H, l as g, E as xt, m as F, L as ft, n as E } from "./Icons-Bp74_rUm.js";
|
|
5
|
+
import { o as Ns, I as Is, p as Bs, q as Ts, s as Fs, u as Es, v as xs, w as Rs } from "./Icons-Bp74_rUm.js";
|
|
6
|
+
import { ref as $, watch as y, h as Rt, computed as c, toRefs as Ot, useAttrs as Wt, useSlots as Pt, isRef as ct, triggerRef as jt, shallowRef as P, onUnmounted as it, inject as Ht, provide as Gt, watchEffect as zt } from "vue";
|
|
7
|
+
function Ut(i, t, e) {
|
|
8
|
+
if (i in _)
|
|
9
|
+
return _[i];
|
|
10
|
+
const s = new Y(i), n = $(s.get(t, e));
|
|
11
|
+
return y(n, (a) => s.set(a)), d() && window.addEventListener("storage", () => {
|
|
12
|
+
s.update(), n.value = s.get();
|
|
13
|
+
}), _[i] = n, n;
|
|
14
|
+
}
|
|
15
|
+
const _ = {};
|
|
16
|
+
class Zt {
|
|
17
|
+
/**
|
|
18
|
+
* Constructor
|
|
19
|
+
* @param name channel name/ название канала
|
|
20
|
+
* @param callback callback on message received/ колбэк на получение сообщения
|
|
21
|
+
*/
|
|
22
|
+
constructor(t, e) {
|
|
23
|
+
if (this.callback = e, d())
|
|
24
|
+
try {
|
|
25
|
+
this.channel = new BroadcastChannel(`${Yt()}__${t}`), this.channel.onmessage = this.update;
|
|
26
|
+
} catch (s) {
|
|
27
|
+
console.error(`BroadcastMessage ${t}:`, s);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
channel;
|
|
31
|
+
/**
|
|
32
|
+
* Send a message to the channel.
|
|
33
|
+
*
|
|
34
|
+
* Отправить сообщение в канал.
|
|
35
|
+
* @param message message to send/ сообщение для отправки
|
|
36
|
+
*/
|
|
37
|
+
post(t) {
|
|
38
|
+
return this.channel?.postMessage(t), this;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Set the callback function to be called when a message is received.
|
|
42
|
+
*
|
|
43
|
+
* Установить функцию колбэка, которая будет вызвана при получении сообщения.
|
|
44
|
+
* @param callback callback function/ функция колбэка
|
|
45
|
+
*/
|
|
46
|
+
setCallback(t) {
|
|
47
|
+
return this.callback = t, this;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Update state on message received.
|
|
51
|
+
*
|
|
52
|
+
* Обновление состояния при получении сообщения.
|
|
53
|
+
* @param event message event/ событие сообщения
|
|
54
|
+
*/
|
|
55
|
+
update = (t) => (this.callback?.(t), this);
|
|
56
|
+
}
|
|
57
|
+
const Yt = () => Ut(
|
|
58
|
+
"__broadcast-name",
|
|
59
|
+
() => `name_${O(1e6, 9999999)}`
|
|
60
|
+
);
|
|
61
|
+
class Kt {
|
|
8
62
|
/**
|
|
9
63
|
* Constructor
|
|
10
64
|
* @param callback function for the cache/ функция для кэша
|
|
@@ -67,7 +121,7 @@ class Ut {
|
|
|
67
121
|
return this.cache === void 0 || this.comparisons.length !== t.length || this.comparisons.findIndex((e, s) => e !== t[s]) >= 0 ? (this.comparisons = [...t], !0) : !1;
|
|
68
122
|
}
|
|
69
123
|
}
|
|
70
|
-
class
|
|
124
|
+
class Vt {
|
|
71
125
|
cache = {};
|
|
72
126
|
/**
|
|
73
127
|
* Getting data for the cache, and if there is no cache, it performs a function to save the cache.
|
|
@@ -99,7 +153,7 @@ class Zt {
|
|
|
99
153
|
* @param callback function for the cache/ функция для кэша
|
|
100
154
|
*/
|
|
101
155
|
getCacheItem(t, e) {
|
|
102
|
-
return t in this.cache || (this.cache[t] = new
|
|
156
|
+
return t in this.cache || (this.cache[t] = new Kt(e)), this.cache[t];
|
|
103
157
|
}
|
|
104
158
|
}
|
|
105
159
|
const Z = class Z {
|
|
@@ -115,9 +169,9 @@ const Z = class Z {
|
|
|
115
169
|
return this.cache.get(t, e, s);
|
|
116
170
|
}
|
|
117
171
|
};
|
|
118
|
-
k(Z, "cache"), Z.cache = new
|
|
172
|
+
k(Z, "cache"), Z.cache = new Vt();
|
|
119
173
|
let dt = Z;
|
|
120
|
-
function
|
|
174
|
+
function wt(i, t = !1) {
|
|
121
175
|
if (typeof i == "string") {
|
|
122
176
|
const e = i.trim();
|
|
123
177
|
switch (e) {
|
|
@@ -148,9 +202,9 @@ function St(i, t = !1) {
|
|
|
148
202
|
}
|
|
149
203
|
return i;
|
|
150
204
|
}
|
|
151
|
-
const
|
|
152
|
-
class
|
|
153
|
-
static storage = new Y(
|
|
205
|
+
const qt = "cookie-block";
|
|
206
|
+
class _t {
|
|
207
|
+
static storage = new Y(qt);
|
|
154
208
|
/**
|
|
155
209
|
* Obtaining status.
|
|
156
210
|
*
|
|
@@ -171,9 +225,9 @@ class Kt {
|
|
|
171
225
|
}
|
|
172
226
|
const mt = {}, lt = class lt {
|
|
173
227
|
constructor(t) {
|
|
174
|
-
if (this.name = t, t in
|
|
175
|
-
return
|
|
176
|
-
this.value = mt?.[t],
|
|
228
|
+
if (this.name = t, t in J)
|
|
229
|
+
return J[t];
|
|
230
|
+
this.value = mt?.[t], J[t] = this;
|
|
177
231
|
}
|
|
178
232
|
value;
|
|
179
233
|
options = {};
|
|
@@ -219,7 +273,7 @@ const mt = {}, lt = class lt {
|
|
|
219
273
|
* Обновление данных cookie.
|
|
220
274
|
*/
|
|
221
275
|
update() {
|
|
222
|
-
if (d() && !
|
|
276
|
+
if (d() && !_t.get()) {
|
|
223
277
|
const t = String(this.value ?? "");
|
|
224
278
|
document.cookie = [
|
|
225
279
|
`${encodeURIComponent(this.name)}=${encodeURIComponent(t)}`,
|
|
@@ -237,14 +291,14 @@ const mt = {}, lt = class lt {
|
|
|
237
291
|
static updateData() {
|
|
238
292
|
for (const t of document.cookie.split(";")) {
|
|
239
293
|
const [e, s] = t.trim().split("=");
|
|
240
|
-
e &&
|
|
294
|
+
e && W(s) && (mt[e] = wt(s));
|
|
241
295
|
}
|
|
242
296
|
}
|
|
243
297
|
};
|
|
244
298
|
d() && lt.updateData();
|
|
245
299
|
let rt = lt;
|
|
246
|
-
const
|
|
247
|
-
function
|
|
300
|
+
const J = {};
|
|
301
|
+
function w(i) {
|
|
248
302
|
if (i instanceof Date)
|
|
249
303
|
return i;
|
|
250
304
|
if (Ft(i))
|
|
@@ -279,9 +333,9 @@ class I {
|
|
|
279
333
|
constructor(t = p.getLocation()) {
|
|
280
334
|
this.geo = p.find(t);
|
|
281
335
|
const e = this.getLocation();
|
|
282
|
-
if (e in
|
|
283
|
-
return
|
|
284
|
-
|
|
336
|
+
if (e in Q)
|
|
337
|
+
return Q[e];
|
|
338
|
+
Q[e] = this;
|
|
285
339
|
}
|
|
286
340
|
/**
|
|
287
341
|
* Returns country code and language.
|
|
@@ -558,7 +612,7 @@ class I {
|
|
|
558
612
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
559
613
|
*/
|
|
560
614
|
date(t, e, s, n) {
|
|
561
|
-
const a =
|
|
615
|
+
const a = w(t), o = typeof s == "string", u = this.dateOptions(e, o ? s : "short");
|
|
562
616
|
return n && (u.hour12 = !1), o || Object.assign(u, s), a.toLocaleString(this.getLocation(), u);
|
|
563
617
|
}
|
|
564
618
|
/**
|
|
@@ -571,7 +625,7 @@ class I {
|
|
|
571
625
|
* @param todayValue current day/ текущий день
|
|
572
626
|
*/
|
|
573
627
|
relative(t, e, s) {
|
|
574
|
-
const n =
|
|
628
|
+
const n = w(t), a = s || /* @__PURE__ */ new Date(), o = {
|
|
575
629
|
numeric: "auto",
|
|
576
630
|
...typeof e == "string" ? { style: e } : e || {}
|
|
577
631
|
};
|
|
@@ -597,8 +651,8 @@ class I {
|
|
|
597
651
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
598
652
|
*/
|
|
599
653
|
relativeLimit(t, e, s, n, a, o, u) {
|
|
600
|
-
const h =
|
|
601
|
-
return
|
|
654
|
+
const h = w(t), l = s || /* @__PURE__ */ new Date(), C = new Date(l), D = new Date(l);
|
|
655
|
+
return C.setDate(l.getDate() - e), D.setDate(l.getDate() + e), h >= C && h <= D ? this.relative(
|
|
602
656
|
h,
|
|
603
657
|
n,
|
|
604
658
|
l
|
|
@@ -637,7 +691,7 @@ class I {
|
|
|
637
691
|
month(t, e) {
|
|
638
692
|
try {
|
|
639
693
|
if (d())
|
|
640
|
-
return Intl.DateTimeFormat(this.getLocation(), { month: e || "long" }).format(
|
|
694
|
+
return Intl.DateTimeFormat(this.getLocation(), { month: e || "long" }).format(w(t));
|
|
641
695
|
} catch (s) {
|
|
642
696
|
console.error("month: ", s);
|
|
643
697
|
}
|
|
@@ -678,7 +732,7 @@ class I {
|
|
|
678
732
|
weekday(t, e) {
|
|
679
733
|
try {
|
|
680
734
|
if (d())
|
|
681
|
-
return Intl.DateTimeFormat(this.getLocation(), { weekday: e || "long" }).format(
|
|
735
|
+
return Intl.DateTimeFormat(this.getLocation(), { weekday: e || "long" }).format(w(t));
|
|
682
736
|
} catch (s) {
|
|
683
737
|
console.error("weekday: ", s);
|
|
684
738
|
}
|
|
@@ -760,7 +814,7 @@ class I {
|
|
|
760
814
|
return ["full", "datetime", "date", void 0, "year-month", "year"].indexOf(t) !== -1 && (s.year = "numeric"), ["full", "datetime", "date", void 0, "year-month", "month", "day-month"].indexOf(t) !== -1 && (s.month = e), ["full", "datetime", "date", void 0, "day", "day-month"].indexOf(t) !== -1 && (s.day = "2-digit"), t !== void 0 && (["full", "datetime", "time", "hour-minute", "hour"].indexOf(t) !== -1 && (s.hour = "2-digit"), ["full", "datetime", "time", "hour-minute", "minute"].indexOf(t) !== -1 && (s.minute = "2-digit"), ["full", "time", "second"].indexOf(t) !== -1 && (s.second = "2-digit")), s;
|
|
761
815
|
}
|
|
762
816
|
}
|
|
763
|
-
const
|
|
817
|
+
const Q = {};
|
|
764
818
|
class ut {
|
|
765
819
|
/**
|
|
766
820
|
* Constructor
|
|
@@ -769,7 +823,7 @@ class ut {
|
|
|
769
823
|
* @param code country and language code/ код страны и языка
|
|
770
824
|
*/
|
|
771
825
|
constructor(t, e = "date", s = p.getLocation()) {
|
|
772
|
-
this.type = e, this.code = s, this.date =
|
|
826
|
+
this.type = e, this.code = s, this.date = w(t);
|
|
773
827
|
}
|
|
774
828
|
date;
|
|
775
829
|
hour24 = !1;
|
|
@@ -1004,7 +1058,7 @@ class ut {
|
|
|
1004
1058
|
* целочисленное значение, представляющее число
|
|
1005
1059
|
*/
|
|
1006
1060
|
setDate(t) {
|
|
1007
|
-
return this.date =
|
|
1061
|
+
return this.date = w(t), this.update(), this;
|
|
1008
1062
|
}
|
|
1009
1063
|
/**
|
|
1010
1064
|
* Change the type of data output.
|
|
@@ -1412,7 +1466,7 @@ class ut {
|
|
|
1412
1466
|
}
|
|
1413
1467
|
}
|
|
1414
1468
|
const r = "@flag";
|
|
1415
|
-
class
|
|
1469
|
+
class x {
|
|
1416
1470
|
/**
|
|
1417
1471
|
* Constructor
|
|
1418
1472
|
* @param code country and language code/ код страны и языка
|
|
@@ -1677,7 +1731,7 @@ class R {
|
|
|
1677
1731
|
language: this.getLanguage(e),
|
|
1678
1732
|
country: s,
|
|
1679
1733
|
standard: e.standard,
|
|
1680
|
-
icon:
|
|
1734
|
+
icon: x.flags?.[e.country],
|
|
1681
1735
|
label: s,
|
|
1682
1736
|
value: e.country
|
|
1683
1737
|
};
|
|
@@ -1709,7 +1763,7 @@ class R {
|
|
|
1709
1763
|
*/
|
|
1710
1764
|
getNational(t) {
|
|
1711
1765
|
return f(this.getList(t), (e) => {
|
|
1712
|
-
const s = new
|
|
1766
|
+
const s = new x(e.standard).get(e.standard);
|
|
1713
1767
|
return {
|
|
1714
1768
|
...e,
|
|
1715
1769
|
description: s?.country,
|
|
@@ -1742,7 +1796,7 @@ class R {
|
|
|
1742
1796
|
* @param codes country code/ код страны
|
|
1743
1797
|
*/
|
|
1744
1798
|
getCodes(t) {
|
|
1745
|
-
return t ?? Object.keys(
|
|
1799
|
+
return t ?? Object.keys(x.flags);
|
|
1746
1800
|
}
|
|
1747
1801
|
/**
|
|
1748
1802
|
* Getting the name of the language.
|
|
@@ -1823,7 +1877,7 @@ const N = class N {
|
|
|
1823
1877
|
* @param masks a mask to transform a phone number/ маска для преобразования номер телефон
|
|
1824
1878
|
*/
|
|
1825
1879
|
static toMask(t, e) {
|
|
1826
|
-
if (
|
|
1880
|
+
if (W(t) && Array.isArray(e) && e.length > 0) {
|
|
1827
1881
|
const s = this.removeZero(t), n = s.length;
|
|
1828
1882
|
for (const a of e)
|
|
1829
1883
|
if (this.getUnnecessaryLength(a) === n)
|
|
@@ -1941,7 +1995,7 @@ const N = class N {
|
|
|
1941
1995
|
};
|
|
1942
1996
|
k(N, "list", []), k(N, "map", {}), N.makeList(), N.makeMap();
|
|
1943
1997
|
let yt = N, j;
|
|
1944
|
-
class
|
|
1998
|
+
class Ce {
|
|
1945
1999
|
/**
|
|
1946
2000
|
* Returns the value by its name.
|
|
1947
2001
|
*
|
|
@@ -2013,7 +2067,7 @@ const M = class M {
|
|
|
2013
2067
|
const t = {};
|
|
2014
2068
|
return location.hash.replace(
|
|
2015
2069
|
/([\w-]+)[:=]([^;]+)/ig,
|
|
2016
|
-
(...e) => (t[String(e[1])] =
|
|
2070
|
+
(...e) => (t[String(e[1])] = wt(e[2]), "")
|
|
2017
2071
|
), t;
|
|
2018
2072
|
}
|
|
2019
2073
|
/**
|
|
@@ -2039,14 +2093,14 @@ const M = class M {
|
|
|
2039
2093
|
}
|
|
2040
2094
|
};
|
|
2041
2095
|
k(M, "hash", {}), k(M, "watch", {}), k(M, "block", !1), d() && (M.reload(), addEventListener("hashchange", () => M.reload()));
|
|
2042
|
-
let
|
|
2043
|
-
function
|
|
2096
|
+
let R = M;
|
|
2097
|
+
function Jt(i, t, e) {
|
|
2044
2098
|
return K(i)?.[t] ?? e;
|
|
2045
2099
|
}
|
|
2046
|
-
function
|
|
2100
|
+
function Qt(i, t, e) {
|
|
2047
2101
|
const s = K(i);
|
|
2048
2102
|
if (s) {
|
|
2049
|
-
const n =
|
|
2103
|
+
const n = Jt(s, t);
|
|
2050
2104
|
if (m(n) && m(e))
|
|
2051
2105
|
f(e, (a, o) => {
|
|
2052
2106
|
n[o] = A(a);
|
|
@@ -2063,10 +2117,10 @@ function pt(i, t = "div", e, s) {
|
|
|
2063
2117
|
return;
|
|
2064
2118
|
const n = document.createElement(t);
|
|
2065
2119
|
return typeof e == "function" ? e(n) : L(e) && f(e, (a, o) => {
|
|
2066
|
-
|
|
2120
|
+
Qt(n, o, a);
|
|
2067
2121
|
}), i?.insertBefore(n, s ?? null), n;
|
|
2068
2122
|
}
|
|
2069
|
-
class
|
|
2123
|
+
class St {
|
|
2070
2124
|
static storage = new Y("scrollbar", !0);
|
|
2071
2125
|
static calculate = !1;
|
|
2072
2126
|
/**
|
|
@@ -2118,7 +2172,7 @@ class wt {
|
|
|
2118
2172
|
});
|
|
2119
2173
|
}
|
|
2120
2174
|
}
|
|
2121
|
-
const
|
|
2175
|
+
const Xt = [
|
|
2122
2176
|
"d",
|
|
2123
2177
|
"e",
|
|
2124
2178
|
"f",
|
|
@@ -2138,12 +2192,12 @@ const _t = [
|
|
|
2138
2192
|
"t",
|
|
2139
2193
|
"u",
|
|
2140
2194
|
"v"
|
|
2141
|
-
],
|
|
2195
|
+
], te = (i, t = {}) => {
|
|
2142
2196
|
let e = String(i);
|
|
2143
2197
|
if (i.match(/%[a-z]/)) {
|
|
2144
2198
|
let s = 0;
|
|
2145
2199
|
f(t, (n) => {
|
|
2146
|
-
e = e.replace(new RegExp(`%${
|
|
2200
|
+
e = e.replace(new RegExp(`%${Xt[s++]}`, "g"), String(n));
|
|
2147
2201
|
});
|
|
2148
2202
|
}
|
|
2149
2203
|
return L(t) && f(t, (s, n) => {
|
|
@@ -2242,7 +2296,7 @@ class z {
|
|
|
2242
2296
|
*/
|
|
2243
2297
|
static addSync(t) {
|
|
2244
2298
|
f(t, (e, s) => {
|
|
2245
|
-
ot(e) &&
|
|
2299
|
+
ot(e) && W(e) && (this.data[this.getName(s)] = e);
|
|
2246
2300
|
});
|
|
2247
2301
|
}
|
|
2248
2302
|
/**
|
|
@@ -2252,7 +2306,7 @@ class z {
|
|
|
2252
2306
|
* @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
|
|
2253
2307
|
*/
|
|
2254
2308
|
static async addNormalOrSync(t) {
|
|
2255
|
-
if (
|
|
2309
|
+
if (W(t))
|
|
2256
2310
|
if (H.isLocalhost())
|
|
2257
2311
|
this.addSync(t);
|
|
2258
2312
|
else {
|
|
@@ -2317,7 +2371,7 @@ class z {
|
|
|
2317
2371
|
* @param replacement values for replacement/ значения для замены
|
|
2318
2372
|
*/
|
|
2319
2373
|
static replacement(t, e) {
|
|
2320
|
-
return e ?
|
|
2374
|
+
return e ? te(t, e) : t;
|
|
2321
2375
|
}
|
|
2322
2376
|
/**
|
|
2323
2377
|
* Adding translation data from the server.
|
|
@@ -2334,7 +2388,7 @@ class z {
|
|
|
2334
2388
|
function ht(i) {
|
|
2335
2389
|
return Array.isArray(i);
|
|
2336
2390
|
}
|
|
2337
|
-
class
|
|
2391
|
+
class ee {
|
|
2338
2392
|
/**
|
|
2339
2393
|
* Constructor
|
|
2340
2394
|
* @param props base data/ базовые данные
|
|
@@ -2383,7 +2437,7 @@ class Qt {
|
|
|
2383
2437
|
return this.cache?.[t] !== this.props?.[t];
|
|
2384
2438
|
}
|
|
2385
2439
|
}
|
|
2386
|
-
class
|
|
2440
|
+
class se {
|
|
2387
2441
|
/**
|
|
2388
2442
|
* Constructor
|
|
2389
2443
|
* @param props base data/ базовые данные
|
|
@@ -2392,7 +2446,7 @@ class Xt {
|
|
|
2392
2446
|
* @param changed base data/ данный для слежения
|
|
2393
2447
|
*/
|
|
2394
2448
|
constructor(t, e, s) {
|
|
2395
|
-
this.props = t, this.callback = e, this.changed = new
|
|
2449
|
+
this.props = t, this.callback = e, this.changed = new ee(t, s);
|
|
2396
2450
|
}
|
|
2397
2451
|
event = {};
|
|
2398
2452
|
changed;
|
|
@@ -2442,7 +2496,7 @@ class Xt {
|
|
|
2442
2496
|
this.callback && this.callback(this.event);
|
|
2443
2497
|
}
|
|
2444
2498
|
}
|
|
2445
|
-
class De extends
|
|
2499
|
+
class De extends se {
|
|
2446
2500
|
/**
|
|
2447
2501
|
* Calls the callback function.
|
|
2448
2502
|
*
|
|
@@ -2462,16 +2516,16 @@ class De extends Xt {
|
|
|
2462
2516
|
(t || this.changed.isChanged()) && (await this.initEvent(), this.makeCallbackItem(), this.changed.update());
|
|
2463
2517
|
}
|
|
2464
2518
|
}
|
|
2465
|
-
function
|
|
2519
|
+
function ie(i) {
|
|
2466
2520
|
return i && "class" in i && typeof i.class == "string" ? i.class : void 0;
|
|
2467
2521
|
}
|
|
2468
|
-
function
|
|
2469
|
-
const s =
|
|
2522
|
+
function re(i, t, e) {
|
|
2523
|
+
const s = ie(t);
|
|
2470
2524
|
return e && s ? `${e}.${s}` : e || s || i;
|
|
2471
2525
|
}
|
|
2472
|
-
function
|
|
2473
|
-
const n =
|
|
2474
|
-
return
|
|
2526
|
+
function ne(i, t, e, s) {
|
|
2527
|
+
const n = re(i, t, s);
|
|
2528
|
+
return Rt(i, { key: n, ...t }, e);
|
|
2475
2529
|
}
|
|
2476
2530
|
function at(i, t) {
|
|
2477
2531
|
const e = i?.class, s = t?.class, n = i?.style, a = t?.style, o = {
|
|
@@ -2480,7 +2534,7 @@ function at(i, t) {
|
|
|
2480
2534
|
};
|
|
2481
2535
|
return e && s && (o.class = [], e && o.class.push(e), s && o.class.push(s)), n && a && (o.style = [], n && o.style.push(n), a && o.style.push(a)), o;
|
|
2482
2536
|
}
|
|
2483
|
-
function
|
|
2537
|
+
function ae(...i) {
|
|
2484
2538
|
let t = {};
|
|
2485
2539
|
return i.forEach((e) => {
|
|
2486
2540
|
e && (t = at(t, e));
|
|
@@ -2527,7 +2581,7 @@ class Lt {
|
|
|
2527
2581
|
t in this.caching || (this.caching[t] = c(() => this.computeModification(t)));
|
|
2528
2582
|
const s = this.caching[t];
|
|
2529
2583
|
if (s)
|
|
2530
|
-
return e ?
|
|
2584
|
+
return e ? ae(s.value, e) : s.value;
|
|
2531
2585
|
}
|
|
2532
2586
|
return e;
|
|
2533
2587
|
}
|
|
@@ -2561,7 +2615,7 @@ class Lt {
|
|
|
2561
2615
|
renderOne(t, e, s, n) {
|
|
2562
2616
|
if (this.is(t)) {
|
|
2563
2617
|
const a = n ?? t;
|
|
2564
|
-
return
|
|
2618
|
+
return ne(
|
|
2565
2619
|
this.get(t),
|
|
2566
2620
|
this.getModification(a, e),
|
|
2567
2621
|
s,
|
|
@@ -2600,12 +2654,12 @@ class Lt {
|
|
|
2600
2654
|
return {};
|
|
2601
2655
|
}
|
|
2602
2656
|
}
|
|
2603
|
-
class
|
|
2657
|
+
class ke extends Lt {
|
|
2604
2658
|
}
|
|
2605
|
-
function
|
|
2659
|
+
function Ct(i) {
|
|
2606
2660
|
return i.toString().trim().replace(/[^\w- ]+/g, "").replace(/ +/g, "-").replace(new RegExp("(?<=[A-Z])([A-Z])", "g"), (t) => `${t.toLowerCase()}`).replace(/-+([a-zA-Z0-9])/g, (...t) => `${String(t[1]).toUpperCase()}`).replace(/^([A-Z])/, (t) => `${t.toLowerCase()}`);
|
|
2607
2661
|
}
|
|
2608
|
-
class
|
|
2662
|
+
class Me {
|
|
2609
2663
|
/**
|
|
2610
2664
|
* Constructor
|
|
2611
2665
|
* @param name class name/ название класса
|
|
@@ -2744,7 +2798,7 @@ class ke {
|
|
|
2744
2798
|
* @param name component name for transformation/ название компонента для преобразования
|
|
2745
2799
|
*/
|
|
2746
2800
|
initName(t) {
|
|
2747
|
-
return f(t.split(".", 2), (e) =>
|
|
2801
|
+
return f(t.split(".", 2), (e) => Ct(e));
|
|
2748
2802
|
}
|
|
2749
2803
|
/**
|
|
2750
2804
|
* Updating data about the class.
|
|
@@ -2778,10 +2832,10 @@ class ke {
|
|
|
2778
2832
|
} : e ?? {};
|
|
2779
2833
|
}
|
|
2780
2834
|
}
|
|
2781
|
-
function
|
|
2835
|
+
function S(i) {
|
|
2782
2836
|
return ct(i) ? i : $(i);
|
|
2783
2837
|
}
|
|
2784
|
-
class
|
|
2838
|
+
class Ae {
|
|
2785
2839
|
item;
|
|
2786
2840
|
type;
|
|
2787
2841
|
code;
|
|
@@ -2800,12 +2854,12 @@ class Me {
|
|
|
2800
2854
|
* @param code country and language code. код страны и языка
|
|
2801
2855
|
*/
|
|
2802
2856
|
constructor(t, e = "date", s = p.getLocation()) {
|
|
2803
|
-
this.item =
|
|
2857
|
+
this.item = S(t), this.type = S(e), this.code = S(s), this.date = $(w(this.item.value)), this.datetime = new ut(
|
|
2804
2858
|
this.date.value,
|
|
2805
2859
|
this.type.value,
|
|
2806
2860
|
this.code.value
|
|
2807
2861
|
), y(this.item, (n) => {
|
|
2808
|
-
this.date.value =
|
|
2862
|
+
this.date.value = w(n);
|
|
2809
2863
|
}), y(this.type, (n) => this.datetime.setType(n)), y(this.code, (n) => this.datetime.setCode(n)), y(this.date, (n) => this.datetime.setDate(n)), this.datetime.setWatch(() => jt(this.date));
|
|
2810
2864
|
}
|
|
2811
2865
|
/**
|
|
@@ -2926,7 +2980,7 @@ class Me {
|
|
|
2926
2980
|
return c(() => this.date.value && this.datetime.standard(t));
|
|
2927
2981
|
}
|
|
2928
2982
|
}
|
|
2929
|
-
class
|
|
2983
|
+
class Ne extends xt {
|
|
2930
2984
|
/**
|
|
2931
2985
|
* Classes Constructor
|
|
2932
2986
|
* @param elementSelector element/ элемент
|
|
@@ -2940,7 +2994,7 @@ class Ae extends Rt {
|
|
|
2940
2994
|
* значение, связанное с событием
|
|
2941
2995
|
*/
|
|
2942
2996
|
constructor(t, e, s = ["click"], n, a, o) {
|
|
2943
|
-
const u =
|
|
2997
|
+
const u = S(t), h = S(e);
|
|
2944
2998
|
super(
|
|
2945
2999
|
u.value,
|
|
2946
3000
|
s,
|
|
@@ -2950,7 +3004,7 @@ class Ae extends Rt {
|
|
|
2950
3004
|
), h.value && this.setElementControl(h.value), y(u, (l) => this.setElement(l)), y(h, (l) => this.setElementControl(l));
|
|
2951
3005
|
}
|
|
2952
3006
|
}
|
|
2953
|
-
class
|
|
3007
|
+
class Ie {
|
|
2954
3008
|
code;
|
|
2955
3009
|
flag;
|
|
2956
3010
|
/**
|
|
@@ -2958,7 +3012,7 @@ class Ne {
|
|
|
2958
3012
|
* @param code country and language code/ код страны и языка
|
|
2959
3013
|
*/
|
|
2960
3014
|
constructor(t = p.getLocation()) {
|
|
2961
|
-
this.code =
|
|
3015
|
+
this.code = S(t), this.flag = new x(this.code.value), y(this.code, (e) => this.flag.setCode(e));
|
|
2962
3016
|
}
|
|
2963
3017
|
/**
|
|
2964
3018
|
* Obtaining a reactive object with the country code.
|
|
@@ -3005,7 +3059,7 @@ class Ne {
|
|
|
3005
3059
|
return c(() => this.flag.getNational(t));
|
|
3006
3060
|
}
|
|
3007
3061
|
}
|
|
3008
|
-
class
|
|
3062
|
+
class Dt {
|
|
3009
3063
|
static item = P(p.get());
|
|
3010
3064
|
static country = c(() => this.item.value.country);
|
|
3011
3065
|
static language = c(() => this.item.value.language);
|
|
@@ -3062,7 +3116,7 @@ class Ct {
|
|
|
3062
3116
|
p.set(t, !0), this.item.value = p.getItem();
|
|
3063
3117
|
}
|
|
3064
3118
|
}
|
|
3065
|
-
class
|
|
3119
|
+
class oe {
|
|
3066
3120
|
location;
|
|
3067
3121
|
intl;
|
|
3068
3122
|
/**
|
|
@@ -3071,7 +3125,7 @@ class re {
|
|
|
3071
3125
|
* код страны, полный вид язык-страна или один из них
|
|
3072
3126
|
*/
|
|
3073
3127
|
constructor(t) {
|
|
3074
|
-
this.location =
|
|
3128
|
+
this.location = S(t), this.intl = c(() => new I(this.location.value ?? Dt.getLanguage().value));
|
|
3075
3129
|
}
|
|
3076
3130
|
/**
|
|
3077
3131
|
* The consistent translation of language, region and script display names.
|
|
@@ -3630,7 +3684,7 @@ class Mt {
|
|
|
3630
3684
|
};
|
|
3631
3685
|
}
|
|
3632
3686
|
}
|
|
3633
|
-
class
|
|
3687
|
+
class Be {
|
|
3634
3688
|
static router;
|
|
3635
3689
|
/**
|
|
3636
3690
|
* Get router instance.
|
|
@@ -3668,7 +3722,7 @@ class Ie {
|
|
|
3668
3722
|
this.router || this.set(t);
|
|
3669
3723
|
}
|
|
3670
3724
|
}
|
|
3671
|
-
class
|
|
3725
|
+
class Te {
|
|
3672
3726
|
/**
|
|
3673
3727
|
* Reactive item.
|
|
3674
3728
|
*
|
|
@@ -3679,7 +3733,7 @@ class Be {
|
|
|
3679
3733
|
* Constructor
|
|
3680
3734
|
*/
|
|
3681
3735
|
constructor() {
|
|
3682
|
-
|
|
3736
|
+
St.is().then((t) => {
|
|
3683
3737
|
this.item.value = t;
|
|
3684
3738
|
});
|
|
3685
3739
|
}
|
|
@@ -3690,13 +3744,13 @@ class Be {
|
|
|
3690
3744
|
*/
|
|
3691
3745
|
is = c(() => this.item.value !== void 0);
|
|
3692
3746
|
}
|
|
3693
|
-
const
|
|
3747
|
+
const ce = (i) => typeof i == "string" ? { method: i } : i || {};
|
|
3694
3748
|
let U;
|
|
3695
|
-
function
|
|
3696
|
-
const o = $(), u =
|
|
3697
|
-
let
|
|
3749
|
+
function Fe(i, t, e = !0, s, n, a) {
|
|
3750
|
+
const o = $(), u = S(ce(t)), h = $(!1), l = $(!1);
|
|
3751
|
+
let C = !0, D = 0;
|
|
3698
3752
|
const V = async () => {
|
|
3699
|
-
if (
|
|
3753
|
+
if (C)
|
|
3700
3754
|
return;
|
|
3701
3755
|
const v = g(i);
|
|
3702
3756
|
if ((!s || s.value) && v) {
|
|
@@ -3716,8 +3770,8 @@ function Te(i, t, e = !0, s, n, a) {
|
|
|
3716
3770
|
};
|
|
3717
3771
|
return {
|
|
3718
3772
|
get data() {
|
|
3719
|
-
return
|
|
3720
|
-
|
|
3773
|
+
return C && (C = !1, V().then()), It(), a && (D++, it(() => {
|
|
3774
|
+
D--, D < 1 && (console.warn("useApiRef: unmounted"), o.value = void 0, C = !0, D = 0);
|
|
3721
3775
|
})), o;
|
|
3722
3776
|
},
|
|
3723
3777
|
get isStarting() {
|
|
@@ -3730,35 +3784,26 @@ function Te(i, t, e = !0, s, n, a) {
|
|
|
3730
3784
|
reset: V
|
|
3731
3785
|
};
|
|
3732
3786
|
}
|
|
3733
|
-
const
|
|
3787
|
+
const Ee = (i) => {
|
|
3734
3788
|
U || (U = i);
|
|
3735
3789
|
};
|
|
3736
|
-
function
|
|
3737
|
-
|
|
3738
|
-
return Q[i];
|
|
3739
|
-
const s = new Y(i), n = $(s.get(t, e));
|
|
3740
|
-
return y(n, (a) => s.set(a)), d() && window.addEventListener("storage", () => {
|
|
3741
|
-
s.update(), n.value = s.get();
|
|
3742
|
-
}), Q[i] = n, n;
|
|
3743
|
-
}
|
|
3744
|
-
const Q = {};
|
|
3745
|
-
function oe(i, t) {
|
|
3746
|
-
const e = `broadcast__${ce()}__${i}`;
|
|
3790
|
+
function ue(i, t) {
|
|
3791
|
+
const e = `broadcast--${i}`;
|
|
3747
3792
|
if (e in X)
|
|
3748
3793
|
return X[e];
|
|
3749
|
-
const s =
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3794
|
+
const s = $(A(t)), n = new Zt(
|
|
3795
|
+
e,
|
|
3796
|
+
(a) => {
|
|
3797
|
+
s.value !== a.data.message && (s.value = a.data.message);
|
|
3798
|
+
}
|
|
3799
|
+
);
|
|
3800
|
+
return y(s, (a) => n.post({ message: a })), X[e] = s, s;
|
|
3753
3801
|
}
|
|
3754
|
-
const X = {}
|
|
3755
|
-
|
|
3756
|
-
() => `name_${W(1e6, 9999999)}`
|
|
3757
|
-
);
|
|
3758
|
-
function Ee(i, t, e) {
|
|
3802
|
+
const X = {};
|
|
3803
|
+
function xe(i, t, e) {
|
|
3759
3804
|
if (i in tt)
|
|
3760
3805
|
return tt[i];
|
|
3761
|
-
const s = new rt(i), n =
|
|
3806
|
+
const s = new rt(i), n = ue(
|
|
3762
3807
|
`__cookie:${i}`,
|
|
3763
3808
|
s.get(t, e)
|
|
3764
3809
|
);
|
|
@@ -3768,23 +3813,23 @@ function Ee(i, t, e) {
|
|
|
3768
3813
|
}
|
|
3769
3814
|
const tt = {};
|
|
3770
3815
|
function Re() {
|
|
3771
|
-
return new
|
|
3816
|
+
return new oe();
|
|
3772
3817
|
}
|
|
3773
|
-
function
|
|
3818
|
+
function Oe(i, t) {
|
|
3774
3819
|
if (i in et)
|
|
3775
3820
|
return et[i];
|
|
3776
|
-
const e = P(
|
|
3777
|
-
return y(e, (s) =>
|
|
3821
|
+
const e = P(R.get(i, t));
|
|
3822
|
+
return y(e, (s) => R.set(i, s)), R.addWatch(i, (s) => {
|
|
3778
3823
|
e.value = s;
|
|
3779
3824
|
}), et[i] = e, e;
|
|
3780
3825
|
}
|
|
3781
3826
|
const et = {};
|
|
3782
|
-
let $t =
|
|
3827
|
+
let $t = O(1e5, 9e5);
|
|
3783
3828
|
function G(i, t) {
|
|
3784
3829
|
const e = K(i);
|
|
3785
|
-
return e ? (
|
|
3830
|
+
return e ? (W(e.id) || e.setAttribute("id", `id-${$t++}`), t ? `#${e.id}${t}`.trim() : e.id) : `id-${$t++}`;
|
|
3786
3831
|
}
|
|
3787
|
-
const
|
|
3832
|
+
const We = () => {
|
|
3788
3833
|
const i = {}, t = "IntersectionObserver" in window ? new IntersectionObserver(
|
|
3789
3834
|
(s) => {
|
|
3790
3835
|
s.forEach((n) => {
|
|
@@ -3839,24 +3884,24 @@ const Oe = () => {
|
|
|
3839
3884
|
disconnectLazy: () => t?.disconnect()
|
|
3840
3885
|
};
|
|
3841
3886
|
};
|
|
3842
|
-
function
|
|
3887
|
+
function Pe() {
|
|
3843
3888
|
const i = P(ft.is());
|
|
3844
3889
|
return ft.registrationEvent(({ detail: t }) => {
|
|
3845
3890
|
i.value = t.loading;
|
|
3846
3891
|
}), i;
|
|
3847
3892
|
}
|
|
3848
|
-
function
|
|
3893
|
+
function je(i, t) {
|
|
3849
3894
|
if (i in st)
|
|
3850
3895
|
return st[i];
|
|
3851
3896
|
const e = new Y(i, !0), s = $(e.get(t));
|
|
3852
3897
|
return y(s, (n) => e.set(n)), st[i] = s, s;
|
|
3853
3898
|
}
|
|
3854
3899
|
const st = {};
|
|
3855
|
-
function
|
|
3900
|
+
function he(i) {
|
|
3856
3901
|
const t = P(z.getListSync(i, !0)), e = async () => {
|
|
3857
3902
|
t.value = { ...await z.getList(i) };
|
|
3858
3903
|
};
|
|
3859
|
-
y(
|
|
3904
|
+
y(Dt.getLanguage(), e);
|
|
3860
3905
|
for (const s in t.value)
|
|
3861
3906
|
if (t.value[s] === s || t.value[s] === " ") {
|
|
3862
3907
|
e().then();
|
|
@@ -3864,28 +3909,28 @@ function ue(i) {
|
|
|
3864
3909
|
}
|
|
3865
3910
|
return t;
|
|
3866
3911
|
}
|
|
3867
|
-
const
|
|
3868
|
-
function
|
|
3912
|
+
const He = (i) => he(i);
|
|
3913
|
+
function Ge(i) {
|
|
3869
3914
|
return ot(i) ? i.trim() : ht(i) && i.findIndex((t) => m(t)) === -1 ? i.join(",") : m(i) ? JSON.stringify(i) : i === !0 ? "1" : i === !1 ? "0" : i?.toString() ?? "";
|
|
3870
3915
|
}
|
|
3871
|
-
function
|
|
3916
|
+
function le(i, t) {
|
|
3872
3917
|
return Array(t).fill(i);
|
|
3873
3918
|
}
|
|
3874
|
-
function
|
|
3919
|
+
function ze(i) {
|
|
3875
3920
|
if (d())
|
|
3876
3921
|
return document.querySelector(i) ?? void 0;
|
|
3877
3922
|
}
|
|
3878
|
-
function
|
|
3923
|
+
function Ue(i) {
|
|
3879
3924
|
if (d())
|
|
3880
3925
|
return document.querySelectorAll(i);
|
|
3881
3926
|
}
|
|
3882
|
-
function
|
|
3927
|
+
function Ze(i) {
|
|
3883
3928
|
i.preventDefault(), i.stopPropagation();
|
|
3884
3929
|
}
|
|
3885
|
-
const At = [],
|
|
3886
|
-
function
|
|
3930
|
+
const At = [], ge = O(1e5, 999999);
|
|
3931
|
+
function Ye(i, t = !0, e = !1, s = !0) {
|
|
3887
3932
|
let n;
|
|
3888
|
-
const a = `__execute_use${
|
|
3933
|
+
const a = `__execute_use${ge}::${G()}`, o = (...u) => {
|
|
3889
3934
|
if (!e && s) {
|
|
3890
3935
|
const h = Ht(a, void 0);
|
|
3891
3936
|
if (h)
|
|
@@ -3903,87 +3948,87 @@ function Ze(i, t = !0, e = !1, s = !0) {
|
|
|
3903
3948
|
};
|
|
3904
3949
|
return e && At.push(o), o;
|
|
3905
3950
|
}
|
|
3906
|
-
function
|
|
3951
|
+
function Ke() {
|
|
3907
3952
|
At.forEach((i) => i());
|
|
3908
3953
|
}
|
|
3909
|
-
function
|
|
3954
|
+
function fe(i, t, e) {
|
|
3910
3955
|
const s = () => {
|
|
3911
|
-
i(), t?.() ?
|
|
3956
|
+
i(), t?.() ? fe(i, t, e) : e?.();
|
|
3912
3957
|
};
|
|
3913
3958
|
d() ? requestAnimationFrame(s) : s();
|
|
3914
3959
|
}
|
|
3915
|
-
function
|
|
3960
|
+
function Ve(i) {
|
|
3916
3961
|
const t = {}, e = K(i);
|
|
3917
3962
|
if (e)
|
|
3918
3963
|
for (const s of e.attributes)
|
|
3919
3964
|
t[s.name] = (s?.value || s?.textContent) ?? void 0;
|
|
3920
3965
|
return t;
|
|
3921
3966
|
}
|
|
3922
|
-
async function
|
|
3967
|
+
async function qe(i) {
|
|
3923
3968
|
return i?.clipboardData?.getData("text") ?? (await navigator.clipboard.readText() || "");
|
|
3924
3969
|
}
|
|
3925
|
-
function
|
|
3970
|
+
function de(i, t) {
|
|
3926
3971
|
const e = t.split(".", 2), s = e[0];
|
|
3927
|
-
return s && i?.[s] && L(i[s]) && e?.[1] ?
|
|
3972
|
+
return s && i?.[s] && L(i[s]) && e?.[1] ? de(i[s], e[1]) : (s && i?.[s]) ?? "";
|
|
3928
3973
|
}
|
|
3929
|
-
function
|
|
3974
|
+
function _e(i) {
|
|
3930
3975
|
return i?.key ?? i?.code ?? i?.keyCode?.toString();
|
|
3931
3976
|
}
|
|
3932
3977
|
function Nt(i) {
|
|
3933
3978
|
return f(i, (t) => t.length);
|
|
3934
3979
|
}
|
|
3935
|
-
function
|
|
3980
|
+
function Je(i) {
|
|
3936
3981
|
return Math.max(...Nt(i));
|
|
3937
3982
|
}
|
|
3938
|
-
function
|
|
3983
|
+
function Qe(i) {
|
|
3939
3984
|
return Math.min(...Nt(i));
|
|
3940
3985
|
}
|
|
3941
|
-
function
|
|
3986
|
+
function me(i) {
|
|
3942
3987
|
return i?.clientX || i?.targetTouches?.[0]?.clientX || i?.touches?.[0]?.clientX || 0;
|
|
3943
3988
|
}
|
|
3944
|
-
function
|
|
3989
|
+
function ye(i) {
|
|
3945
3990
|
return i?.clientY || i?.targetTouches?.[0]?.clientY || i?.touches?.[0]?.clientY || 0;
|
|
3946
3991
|
}
|
|
3947
|
-
function
|
|
3992
|
+
function Xe(i) {
|
|
3948
3993
|
return {
|
|
3949
|
-
x:
|
|
3950
|
-
y:
|
|
3994
|
+
x: me(i),
|
|
3995
|
+
y: ye(i)
|
|
3951
3996
|
};
|
|
3952
3997
|
}
|
|
3953
|
-
function
|
|
3998
|
+
function ts(i, t) {
|
|
3954
3999
|
const e = {};
|
|
3955
4000
|
return t.forEach((s) => {
|
|
3956
4001
|
s in i && i[s] !== void 0 && (e[s] = i[s]);
|
|
3957
4002
|
}), e;
|
|
3958
4003
|
}
|
|
3959
|
-
function
|
|
4004
|
+
function es(i, t = void 0) {
|
|
3960
4005
|
const e = {};
|
|
3961
4006
|
return f(i, (s, n) => {
|
|
3962
4007
|
s !== t && (e[n] = s);
|
|
3963
4008
|
}), e;
|
|
3964
4009
|
}
|
|
3965
|
-
function
|
|
4010
|
+
function ss(i) {
|
|
3966
4011
|
return L(i) ? i : {};
|
|
3967
4012
|
}
|
|
3968
|
-
function
|
|
3969
|
-
return
|
|
4013
|
+
function pe(i, t) {
|
|
4014
|
+
return le(i, t).join("");
|
|
3970
4015
|
}
|
|
3971
|
-
function
|
|
3972
|
-
const a =
|
|
4016
|
+
function is(i, t, e = "#", s = 2, n = 12) {
|
|
4017
|
+
const a = O(i, t), o = [];
|
|
3973
4018
|
for (let u = 0; u < a; u++)
|
|
3974
|
-
o.push(
|
|
4019
|
+
o.push(pe(e, O(s, n)));
|
|
3975
4020
|
return o.join(" ");
|
|
3976
4021
|
}
|
|
3977
|
-
function
|
|
4022
|
+
function rs(i, t) {
|
|
3978
4023
|
const e = i ?? 0;
|
|
3979
4024
|
return t > e ? 100 / (t - e) : 0;
|
|
3980
4025
|
}
|
|
3981
|
-
function
|
|
4026
|
+
function ns(i, t) {
|
|
3982
4027
|
const e = i ?? 0;
|
|
3983
4028
|
return t > e ? (t - e) / 100 : 0;
|
|
3984
4029
|
}
|
|
3985
4030
|
const vt = 0;
|
|
3986
|
-
function
|
|
4031
|
+
function as(i, t, e) {
|
|
3987
4032
|
const s = t?.closest(i);
|
|
3988
4033
|
if (t && s && s.scrollHeight !== s.offsetHeight)
|
|
3989
4034
|
if (e) {
|
|
@@ -3991,28 +4036,28 @@ function ns(i, t, e) {
|
|
|
3991
4036
|
s.scrollTop = t.offsetTop - (n.top - a.top) - (n.height / 2 - o.height / 2), s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight);
|
|
3992
4037
|
} else s.scrollTop > t.offsetTop ? s.scrollTop = t.offsetTop - vt : s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight + vt);
|
|
3993
4038
|
}
|
|
3994
|
-
function
|
|
4039
|
+
function os(i, t) {
|
|
3995
4040
|
return i.indexOf(t) !== -1;
|
|
3996
4041
|
}
|
|
3997
|
-
async function
|
|
4042
|
+
async function cs() {
|
|
3998
4043
|
if (d()) {
|
|
3999
|
-
const i = await
|
|
4044
|
+
const i = await St.get();
|
|
4000
4045
|
document.body.style.setProperty("--sys-scrollbar-offset", `${i}px`);
|
|
4001
4046
|
}
|
|
4002
4047
|
}
|
|
4003
|
-
function
|
|
4048
|
+
function us(i, t) {
|
|
4004
4049
|
const e = {};
|
|
4005
4050
|
return m(i) && m(t) && f(i, (s, n) => {
|
|
4006
4051
|
n in t && (e[n] = s);
|
|
4007
4052
|
}), e;
|
|
4008
4053
|
}
|
|
4009
|
-
function
|
|
4054
|
+
function hs(i, t) {
|
|
4010
4055
|
let e = Object.keys(i).length !== Object.keys(t).length;
|
|
4011
4056
|
return e || f(i, (s, n) => {
|
|
4012
4057
|
s !== t?.[n] && (e = !0);
|
|
4013
4058
|
}), e;
|
|
4014
4059
|
}
|
|
4015
|
-
function
|
|
4060
|
+
function ls(i) {
|
|
4016
4061
|
switch (typeof i) {
|
|
4017
4062
|
case "number":
|
|
4018
4063
|
return !0;
|
|
@@ -4022,21 +4067,21 @@ function hs(i) {
|
|
|
4022
4067
|
return !1;
|
|
4023
4068
|
}
|
|
4024
4069
|
}
|
|
4025
|
-
function
|
|
4070
|
+
function gs(i, t) {
|
|
4026
4071
|
const e = Math.floor(t);
|
|
4027
4072
|
return i >= e && i < e + 1;
|
|
4028
4073
|
}
|
|
4029
|
-
function
|
|
4074
|
+
function fs(i, t) {
|
|
4030
4075
|
return Array.isArray(i) ? i.every((e) => F(e, t)) : F(i, t);
|
|
4031
4076
|
}
|
|
4032
|
-
function
|
|
4077
|
+
function $e(i, t = {}, e = "value", s = !1) {
|
|
4033
4078
|
const n = typeof t == "string", a = n ? t : e, o = n ? {} : t;
|
|
4034
4079
|
return i ? i && L(i) && (a in i || s) ? at(o, i) : at(o, { [a]: i }) : n ? {} : { ...o };
|
|
4035
4080
|
}
|
|
4036
|
-
function
|
|
4037
|
-
return c(() =>
|
|
4081
|
+
function ds(i, t = {}, e = "value") {
|
|
4082
|
+
return c(() => $e(g(i), g(t), e));
|
|
4038
4083
|
}
|
|
4039
|
-
const
|
|
4084
|
+
const ms = (i, t) => {
|
|
4040
4085
|
const e = $();
|
|
4041
4086
|
let s = !0;
|
|
4042
4087
|
const n = () => {
|
|
@@ -4047,14 +4092,14 @@ const ds = (i, t) => {
|
|
|
4047
4092
|
};
|
|
4048
4093
|
return c(() => (n(), e.value));
|
|
4049
4094
|
};
|
|
4050
|
-
function
|
|
4095
|
+
function ys(i, t) {
|
|
4051
4096
|
i.value !== t && (i.value = t);
|
|
4052
4097
|
}
|
|
4053
|
-
function
|
|
4098
|
+
function ps(i) {
|
|
4054
4099
|
let t;
|
|
4055
4100
|
return c(() => (t || (t = i()), t.value));
|
|
4056
4101
|
}
|
|
4057
|
-
function
|
|
4102
|
+
function ve(i) {
|
|
4058
4103
|
return [...new Set(i)];
|
|
4059
4104
|
}
|
|
4060
4105
|
function B(i, t, e = !0) {
|
|
@@ -4063,7 +4108,7 @@ function B(i, t, e = !0) {
|
|
|
4063
4108
|
t,
|
|
4064
4109
|
(n, a) => {
|
|
4065
4110
|
const o = i?.[a];
|
|
4066
|
-
m(o) && m(n) ? e && Array.isArray(o) && Array.isArray(n) ? s[a] = E(
|
|
4111
|
+
m(o) && m(n) ? e && Array.isArray(o) && Array.isArray(n) ? s[a] = E(ve([...o, ...n])) : s[a] = B(
|
|
4067
4112
|
Array.isArray(o) ? { ...o } : o,
|
|
4068
4113
|
n,
|
|
4069
4114
|
e
|
|
@@ -4071,13 +4116,13 @@ function B(i, t, e = !0) {
|
|
|
4071
4116
|
}
|
|
4072
4117
|
), s;
|
|
4073
4118
|
}
|
|
4074
|
-
function
|
|
4119
|
+
function $s(i, t) {
|
|
4075
4120
|
let e = i;
|
|
4076
4121
|
return f(t, (s, n) => {
|
|
4077
4122
|
e = e.replace(kt(`[${n}]`), A(s));
|
|
4078
4123
|
}), e;
|
|
4079
4124
|
}
|
|
4080
|
-
function
|
|
4125
|
+
function vs(i) {
|
|
4081
4126
|
const t = b(i);
|
|
4082
4127
|
if (t > 0) {
|
|
4083
4128
|
const e = String(Math.floor(t / 60)).padStart(2, "0"), s = String(t % 60).padStart(2, "0");
|
|
@@ -4085,7 +4130,7 @@ function $s(i) {
|
|
|
4085
4130
|
}
|
|
4086
4131
|
return "00:00";
|
|
4087
4132
|
}
|
|
4088
|
-
function
|
|
4133
|
+
function bs(i, t, {
|
|
4089
4134
|
multiple: e = !1,
|
|
4090
4135
|
maxlength: s = 0,
|
|
4091
4136
|
alwaysChange: n = !0,
|
|
@@ -4100,7 +4145,7 @@ function vs(i, t, {
|
|
|
4100
4145
|
}
|
|
4101
4146
|
return n || i !== t ? t : i;
|
|
4102
4147
|
}
|
|
4103
|
-
function
|
|
4148
|
+
function ws(i, t, e) {
|
|
4104
4149
|
if (m(i) && m(t)) {
|
|
4105
4150
|
if (e) {
|
|
4106
4151
|
let s = {}, n = !1;
|
|
@@ -4114,23 +4159,23 @@ function bs(i, t, e) {
|
|
|
4114
4159
|
return E(i);
|
|
4115
4160
|
}
|
|
4116
4161
|
function Ss(i) {
|
|
4117
|
-
return
|
|
4162
|
+
return Ct(i).replace(/^([a-z])/, (t) => `${t.toUpperCase()}`);
|
|
4118
4163
|
}
|
|
4119
|
-
function
|
|
4164
|
+
function Ls(i) {
|
|
4120
4165
|
return i.toString().trim().replace(/[^\w- ]+/g, "").replace(/ +/g, "-").replace(new RegExp("(?<=[A-Z])([A-Z])", "g"), (t) => `${t.toLowerCase()}`).replace(/^[A-Z]/, (t) => t.toLowerCase()).replace(new RegExp("(?<=[\\w ])[A-Z]", "g"), (t) => `-${t.toLowerCase()}`).replace(/[A-Z]/g, (t) => t.toLowerCase());
|
|
4121
4166
|
}
|
|
4122
|
-
function
|
|
4167
|
+
function Cs(i, t, e, s) {
|
|
4123
4168
|
const n = b(i), a = b(t);
|
|
4124
4169
|
return t && a < n ? `${bt(a, e, s)}+` : bt(n, e, s);
|
|
4125
4170
|
}
|
|
4126
4171
|
const bt = (i, t, e) => t ? new I(e).number(i) : i;
|
|
4127
|
-
function
|
|
4172
|
+
function be(i, t) {
|
|
4128
4173
|
return 1 / i * t;
|
|
4129
4174
|
}
|
|
4130
4175
|
function Ds(i, t) {
|
|
4131
|
-
return
|
|
4176
|
+
return be(i, t) * 100;
|
|
4132
4177
|
}
|
|
4133
|
-
async function
|
|
4178
|
+
async function ks(i) {
|
|
4134
4179
|
if (d())
|
|
4135
4180
|
try {
|
|
4136
4181
|
await navigator.clipboard.writeText(i);
|
|
@@ -4140,139 +4185,140 @@ async function Cs(i) {
|
|
|
4140
4185
|
}
|
|
4141
4186
|
export {
|
|
4142
4187
|
H as Api,
|
|
4143
|
-
|
|
4144
|
-
Zt as
|
|
4145
|
-
|
|
4188
|
+
Ns as ApiMethodItem,
|
|
4189
|
+
Zt as BroadcastMessage,
|
|
4190
|
+
Vt as Cache,
|
|
4191
|
+
Kt as CacheItem,
|
|
4146
4192
|
dt as CacheStatic,
|
|
4147
4193
|
rt as Cookie,
|
|
4148
|
-
|
|
4194
|
+
_t as CookieBlock,
|
|
4149
4195
|
Y as DataStorage,
|
|
4150
4196
|
ut as Datetime,
|
|
4151
|
-
|
|
4152
|
-
|
|
4197
|
+
Ae as DatetimeRef,
|
|
4198
|
+
se as DesignAbstract,
|
|
4153
4199
|
De as DesignAsyncAbstract,
|
|
4154
|
-
|
|
4155
|
-
|
|
4200
|
+
ee as DesignChanged,
|
|
4201
|
+
ke as DesignComp,
|
|
4156
4202
|
Lt as DesignComponents,
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4203
|
+
Me as DesignConstructorAbstract,
|
|
4204
|
+
xt as EventItem,
|
|
4205
|
+
Ne as EventRef,
|
|
4160
4206
|
r as GEO_FLAG_ICON_NAME,
|
|
4161
4207
|
p as Geo,
|
|
4162
|
-
|
|
4163
|
-
|
|
4208
|
+
x as GeoFlag,
|
|
4209
|
+
Ie as GeoFlagRef,
|
|
4164
4210
|
I as GeoIntl,
|
|
4165
|
-
|
|
4211
|
+
oe as GeoIntlRef,
|
|
4166
4212
|
yt as GeoPhone,
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4213
|
+
Dt as GeoRef,
|
|
4214
|
+
Ce as Global,
|
|
4215
|
+
R as Hash,
|
|
4216
|
+
Is as Icons,
|
|
4171
4217
|
Mt as ListDataRef,
|
|
4172
4218
|
ft as Loading,
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4219
|
+
Be as RouterItemRef,
|
|
4220
|
+
St as ScrollbarWidth,
|
|
4221
|
+
Te as ScrollbarWidthRef,
|
|
4176
4222
|
z as Translate,
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4223
|
+
Ge as anyToString,
|
|
4224
|
+
te as applyTemplate,
|
|
4225
|
+
le as arrFill,
|
|
4180
4226
|
E as copyObject,
|
|
4181
4227
|
pt as createElement,
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4228
|
+
ze as domQuerySelector,
|
|
4229
|
+
Ue as domQuerySelectorAll,
|
|
4230
|
+
Ze as eventStopPropagation,
|
|
4185
4231
|
A as executeFunction,
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4232
|
+
Bs as executePromise,
|
|
4233
|
+
Ye as executeUse,
|
|
4234
|
+
Ke as executeUseGlobalInit,
|
|
4189
4235
|
f as forEach,
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4236
|
+
fe as frame,
|
|
4237
|
+
Ve as getAttributes,
|
|
4238
|
+
$e as getBind,
|
|
4239
|
+
ds as getBindRef,
|
|
4240
|
+
ie as getClassName,
|
|
4241
|
+
qe as getClipboardData,
|
|
4196
4242
|
nt as getColumn,
|
|
4197
|
-
|
|
4243
|
+
ms as getComputedAsync,
|
|
4198
4244
|
K as getElement,
|
|
4199
4245
|
G as getElementId,
|
|
4200
|
-
|
|
4201
|
-
|
|
4246
|
+
Jt as getElementItem,
|
|
4247
|
+
Ts as getElementOrWindow,
|
|
4202
4248
|
kt as getExp,
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4249
|
+
re as getIndexForRender,
|
|
4250
|
+
de as getItemByPath,
|
|
4251
|
+
_e as getKey,
|
|
4206
4252
|
Nt as getLengthOfAllArray,
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4253
|
+
Je as getMaxLengthAllArray,
|
|
4254
|
+
Qe as getMinLengthAllArray,
|
|
4255
|
+
Xe as getMouseClient,
|
|
4256
|
+
me as getMouseClientX,
|
|
4257
|
+
ye as getMouseClientY,
|
|
4258
|
+
ts as getObjectByKeys,
|
|
4259
|
+
es as getObjectNoUndefined,
|
|
4260
|
+
ss as getObjectOrNone,
|
|
4261
|
+
is as getRandomText,
|
|
4216
4262
|
g as getRef,
|
|
4217
4263
|
Et as getRequestString,
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4264
|
+
rs as getStepPercent,
|
|
4265
|
+
ns as getStepValue,
|
|
4266
|
+
as as goScroll,
|
|
4267
|
+
os as inArray,
|
|
4268
|
+
cs as initScrollbarOffset,
|
|
4269
|
+
us as intersectKey,
|
|
4224
4270
|
ht as isArray,
|
|
4225
|
-
|
|
4271
|
+
hs as isDifferent,
|
|
4226
4272
|
d as isDomRuntime,
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4273
|
+
W as isFilled,
|
|
4274
|
+
ls as isFloat,
|
|
4275
|
+
Fs as isFunction,
|
|
4276
|
+
Es as isInDom,
|
|
4277
|
+
gs as isIntegerBetween,
|
|
4232
4278
|
Ft as isNull,
|
|
4233
|
-
|
|
4279
|
+
xs as isNumber,
|
|
4234
4280
|
m as isObject,
|
|
4235
4281
|
L as isObjectNotArray,
|
|
4236
4282
|
F as isSelected,
|
|
4237
|
-
|
|
4283
|
+
fs as isSelectedByList,
|
|
4238
4284
|
ot as isString,
|
|
4239
4285
|
Rs as isWindow,
|
|
4240
|
-
|
|
4241
|
-
|
|
4286
|
+
O as random,
|
|
4287
|
+
ne as render,
|
|
4242
4288
|
B as replaceRecursive,
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4289
|
+
$s as replaceTemplate,
|
|
4290
|
+
vs as secondToTime,
|
|
4291
|
+
Ee as setApiRefGlobalConditions,
|
|
4292
|
+
Qt as setElementItem,
|
|
4293
|
+
ys as setRef,
|
|
4294
|
+
bs as setValues,
|
|
4295
|
+
ws as splice,
|
|
4296
|
+
pe as strFill,
|
|
4297
|
+
He as t,
|
|
4252
4298
|
T as toArray,
|
|
4253
4299
|
at as toBind,
|
|
4254
|
-
|
|
4255
|
-
|
|
4300
|
+
ae as toBinds,
|
|
4301
|
+
Ct as toCamelCase,
|
|
4256
4302
|
Ss as toCamelCaseFirst,
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4303
|
+
ps as toComputed,
|
|
4304
|
+
w as toDate,
|
|
4305
|
+
Ls as toKebabCase,
|
|
4260
4306
|
b as toNumber,
|
|
4261
|
-
|
|
4262
|
-
|
|
4307
|
+
Cs as toNumberByMax,
|
|
4308
|
+
be as toPercent,
|
|
4263
4309
|
Ds as toPercentBy100,
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4310
|
+
S as toRefItem,
|
|
4311
|
+
wt as transformation,
|
|
4312
|
+
ve as uniqueArray,
|
|
4313
|
+
Fe as useApiRef,
|
|
4314
|
+
ue as useBroadcastValueRef,
|
|
4315
|
+
xe as useCookieRef,
|
|
4270
4316
|
Re as useGeoIntlRef,
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4317
|
+
Oe as useHashRef,
|
|
4318
|
+
We as useLazyRef,
|
|
4319
|
+
Pe as useLoadingRef,
|
|
4320
|
+
je as useSessionRef,
|
|
4321
|
+
Ut as useStorageRef,
|
|
4322
|
+
he as useTranslateRef,
|
|
4323
|
+
ks as writeClipboardData
|
|
4278
4324
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/functional",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Comprehensive functional utilities library for DXT UI - classes, composables, functions and types for modern web development",
|
|
7
7
|
"keywords": [
|