@dxtmisha/functional-basic 1.3.7 → 1.3.9
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/CHANGELOG.md +20 -0
- package/ai-description.txt +14 -19
- package/ai-types.txt +181 -531
- package/dist/library.js +605 -550
- package/dist/src/classes/Geo.d.ts +1 -1
- package/dist/src/classes/GeoInstance.d.ts +1 -1
- package/dist/src/classes/UrlItem.d.ts +71 -0
- package/dist/src/library.d.ts +1 -0
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -98,43 +98,43 @@ function ee(e) {
|
|
|
98
98
|
return new Promise((t) => setTimeout(t, e));
|
|
99
99
|
}
|
|
100
100
|
//#endregion
|
|
101
|
-
//#region src/functions/
|
|
102
|
-
var te = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
101
|
+
//#region src/functions/isFunction.ts
|
|
103
102
|
function p(e) {
|
|
103
|
+
return e instanceof Function || typeof e == "function";
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/functions/executeFunction.ts
|
|
107
|
+
function m(e, ...t) {
|
|
108
|
+
return p(e) ? e(...t) : e;
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/functions/isNumber.ts
|
|
112
|
+
var h = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
113
|
+
function g(e) {
|
|
104
114
|
switch (typeof e) {
|
|
105
115
|
case "number": return Number.isFinite(e);
|
|
106
116
|
case "bigint": return !0;
|
|
107
|
-
case "string": return
|
|
117
|
+
case "string": return h.test(e.trim());
|
|
108
118
|
default: return !1;
|
|
109
119
|
}
|
|
110
120
|
}
|
|
111
121
|
//#endregion
|
|
112
122
|
//#region src/functions/toNumber.ts
|
|
113
|
-
var
|
|
114
|
-
function
|
|
123
|
+
var _ = /[^-+\d., ]+/g, v = /( [0-9]{3}[ ,.]|[0-9] [0-9])/, te = / /g, y = /,/g, ne = /,[0-9]{3}[,.]/, re = /[.][0-9]{3}[,.]/, ie = /[.]/g;
|
|
124
|
+
function b(e) {
|
|
115
125
|
if (typeof e == "number") return Number.isFinite(e) && e || 0;
|
|
116
126
|
if (!e) return 0;
|
|
117
|
-
let t = e.replace(
|
|
118
|
-
return t =
|
|
127
|
+
let t = e.replace(_, "");
|
|
128
|
+
return t = v.test(t) ? t.replace(te, "").replace(y, ".") : ne.test(t) ? t.replace(y, "") : re.test(t) ? t.replace(ie, "").replace(y, ".") : t.replace(y, "."), parseFloat(t) || 0;
|
|
119
129
|
}
|
|
120
130
|
//#endregion
|
|
121
131
|
//#region src/functions/isSelected.ts
|
|
122
|
-
function
|
|
123
|
-
return c(e) ? !1 : Array.isArray(t) ? t.includes(e) :
|
|
124
|
-
}
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region src/functions/isFunction.ts
|
|
127
|
-
function x(e) {
|
|
128
|
-
return e instanceof Function || typeof e == "function";
|
|
129
|
-
}
|
|
130
|
-
//#endregion
|
|
131
|
-
//#region src/functions/executeFunction.ts
|
|
132
|
-
function S(e, ...t) {
|
|
133
|
-
return x(e) ? e(...t) : e;
|
|
132
|
+
function x(e, t) {
|
|
133
|
+
return c(e) ? !1 : Array.isArray(t) ? t.includes(e) : g(e) && g(t) ? b(e) === b(t) : e === t;
|
|
134
134
|
}
|
|
135
135
|
//#endregion
|
|
136
136
|
//#region src/functions/anyToString.ts
|
|
137
|
-
function
|
|
137
|
+
function S(e, n = !0, r = !0) {
|
|
138
138
|
var a;
|
|
139
139
|
if (d(e)) return r ? e.trim() : e;
|
|
140
140
|
if (c(e)) return "";
|
|
@@ -148,49 +148,49 @@ function C(e, n = !0, r = !0) {
|
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region src/functions/isDomData.ts
|
|
151
|
-
function
|
|
151
|
+
function ae() {
|
|
152
152
|
return s() && location.href.startsWith("data:");
|
|
153
153
|
}
|
|
154
154
|
//#endregion
|
|
155
155
|
//#region src/functions/strSplit.ts
|
|
156
|
-
function
|
|
157
|
-
let r =
|
|
156
|
+
function oe(e, t, n) {
|
|
157
|
+
let r = S(e);
|
|
158
158
|
if (!n || n <= 0) return r.split(t);
|
|
159
159
|
let i = r.split(t, n), a = r.split(t);
|
|
160
160
|
return i.length === a.length ? i : (i.pop(), [...i, a.slice(n - 1).join(t)]);
|
|
161
161
|
}
|
|
162
162
|
//#endregion
|
|
163
163
|
//#region \0@oxc-project+runtime@0.130.0/helpers/typeof.js
|
|
164
|
-
function
|
|
164
|
+
function C(e) {
|
|
165
165
|
"@babel/helpers - typeof";
|
|
166
|
-
return
|
|
166
|
+
return C = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
167
167
|
return typeof e;
|
|
168
168
|
} : function(e) {
|
|
169
169
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
170
|
-
},
|
|
170
|
+
}, C(e);
|
|
171
171
|
}
|
|
172
172
|
//#endregion
|
|
173
173
|
//#region \0@oxc-project+runtime@0.130.0/helpers/toPrimitive.js
|
|
174
|
-
function
|
|
175
|
-
if (
|
|
174
|
+
function se(e, t) {
|
|
175
|
+
if (C(e) != "object" || !e) return e;
|
|
176
176
|
var n = e[Symbol.toPrimitive];
|
|
177
177
|
if (n !== void 0) {
|
|
178
178
|
var r = n.call(e, t || "default");
|
|
179
|
-
if (
|
|
179
|
+
if (C(r) != "object") return r;
|
|
180
180
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
181
181
|
}
|
|
182
182
|
return (t === "string" ? String : Number)(e);
|
|
183
183
|
}
|
|
184
184
|
//#endregion
|
|
185
185
|
//#region \0@oxc-project+runtime@0.130.0/helpers/toPropertyKey.js
|
|
186
|
-
function
|
|
187
|
-
var t =
|
|
188
|
-
return
|
|
186
|
+
function ce(e) {
|
|
187
|
+
var t = se(e, "string");
|
|
188
|
+
return C(t) == "symbol" ? t : t + "";
|
|
189
189
|
}
|
|
190
190
|
//#endregion
|
|
191
191
|
//#region \0@oxc-project+runtime@0.130.0/helpers/defineProperty.js
|
|
192
|
-
function
|
|
193
|
-
return (t =
|
|
192
|
+
function w(e, t, n) {
|
|
193
|
+
return (t = ce(t)) in e ? Object.defineProperty(e, t, {
|
|
194
194
|
value: n,
|
|
195
195
|
enumerable: !0,
|
|
196
196
|
configurable: !0,
|
|
@@ -199,9 +199,9 @@ function T(e, t, n) {
|
|
|
199
199
|
}
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region src/classes/ErrorCenterHandler.ts
|
|
202
|
-
var
|
|
202
|
+
var le = class {
|
|
203
203
|
constructor(e) {
|
|
204
|
-
|
|
204
|
+
w(this, "handlers", []), e && this.addList(e);
|
|
205
205
|
}
|
|
206
206
|
has(e) {
|
|
207
207
|
return !!this.get(e);
|
|
@@ -227,9 +227,9 @@ var ce = class {
|
|
|
227
227
|
toConsole(e) {
|
|
228
228
|
return console.error(`Error Center: ${e.code}`), console.error("Error Center/message: ", e.message), console.error("Error Center/details", e.details), this;
|
|
229
229
|
}
|
|
230
|
-
},
|
|
231
|
-
constructor(e, t = new
|
|
232
|
-
|
|
230
|
+
}, ue = class {
|
|
231
|
+
constructor(e, t = new le()) {
|
|
232
|
+
w(this, "handler", void 0), w(this, "causes", []), this.handler = t, e && this.addList(e);
|
|
233
233
|
}
|
|
234
234
|
has(e, t) {
|
|
235
235
|
return !!this.get(e, t);
|
|
@@ -266,7 +266,7 @@ var ce = class {
|
|
|
266
266
|
}
|
|
267
267
|
return e;
|
|
268
268
|
}
|
|
269
|
-
},
|
|
269
|
+
}, de = [
|
|
270
270
|
{
|
|
271
271
|
group: "api",
|
|
272
272
|
code: "cacheClear",
|
|
@@ -417,7 +417,7 @@ var ce = class {
|
|
|
417
417
|
label: "Translate Error",
|
|
418
418
|
message: "An error occurred while loading translations."
|
|
419
419
|
}
|
|
420
|
-
],
|
|
420
|
+
], T = class {
|
|
421
421
|
static getItem() {
|
|
422
422
|
return this.item;
|
|
423
423
|
}
|
|
@@ -443,10 +443,10 @@ var ce = class {
|
|
|
443
443
|
this.getItem().on(e);
|
|
444
444
|
}
|
|
445
445
|
};
|
|
446
|
-
T
|
|
446
|
+
w(T, "item", new ue(de));
|
|
447
447
|
//#endregion
|
|
448
448
|
//#region src/functions/transformation.ts
|
|
449
|
-
function
|
|
449
|
+
function fe(e, t = !1) {
|
|
450
450
|
if (typeof e == "string") {
|
|
451
451
|
let r = e.trim();
|
|
452
452
|
switch (r) {
|
|
@@ -459,7 +459,7 @@ function de(e, t = !1) {
|
|
|
459
459
|
if (/^[{[]/.exec(r)) try {
|
|
460
460
|
return JSON.parse(r);
|
|
461
461
|
} catch (e) {
|
|
462
|
-
|
|
462
|
+
T.on({
|
|
463
463
|
group: "transformation",
|
|
464
464
|
code: "error",
|
|
465
465
|
details: e
|
|
@@ -474,32 +474,32 @@ function de(e, t = !1) {
|
|
|
474
474
|
}
|
|
475
475
|
//#endregion
|
|
476
476
|
//#region src/functions/encodeLiteAttribute.ts
|
|
477
|
-
var
|
|
477
|
+
var pe = {
|
|
478
478
|
"<": "<",
|
|
479
479
|
">": ">",
|
|
480
480
|
"&": "&"
|
|
481
481
|
};
|
|
482
|
-
function
|
|
482
|
+
function me(e) {
|
|
483
483
|
return String(e).replace(/[<>&]/g, (e) => {
|
|
484
484
|
var t;
|
|
485
|
-
return (t =
|
|
485
|
+
return (t = pe == null ? void 0 : pe[e]) == null ? e : t;
|
|
486
486
|
});
|
|
487
487
|
}
|
|
488
488
|
//#endregion
|
|
489
489
|
//#region src/functions/getElementSafeScript.ts
|
|
490
|
-
function
|
|
490
|
+
function he(e, t) {
|
|
491
491
|
return `<script id="${e.replace(/"/g, """)}" type="application/json">${JSON.stringify(t).replace(/<\/(script)>/gi, "<\\/$1>")}<\/script>`;
|
|
492
492
|
}
|
|
493
493
|
//#endregion
|
|
494
494
|
//#region src/functions/getHydrationData.ts
|
|
495
|
-
function
|
|
495
|
+
function ge(e, t, n = !0) {
|
|
496
496
|
if (typeof document < "u") {
|
|
497
497
|
let t = document.getElementById(e);
|
|
498
498
|
if (t) try {
|
|
499
499
|
let e = JSON.parse(t.textContent || "");
|
|
500
500
|
return n && t.remove(), e;
|
|
501
501
|
} catch (t) {
|
|
502
|
-
|
|
502
|
+
T.on({
|
|
503
503
|
group: "hydration",
|
|
504
504
|
code: "error",
|
|
505
505
|
details: {
|
|
@@ -513,7 +513,7 @@ function he(e, t, n = !0) {
|
|
|
513
513
|
}
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region src/classes/ServerStorage.ts
|
|
516
|
-
var
|
|
516
|
+
var _e = "__ui:server-storage__", ve = "__ui:server:storage:id__", E = class {
|
|
517
517
|
static init(e) {
|
|
518
518
|
return this.listener || (this.listener = e), this;
|
|
519
519
|
}
|
|
@@ -543,7 +543,7 @@ var D = "__ui:server-storage__", ge = "__ui:server:storage:id__", O = class {
|
|
|
543
543
|
e in t && delete t[e];
|
|
544
544
|
}
|
|
545
545
|
static toString() {
|
|
546
|
-
return
|
|
546
|
+
return he(ve, this.getDataForHydration());
|
|
547
547
|
}
|
|
548
548
|
static getStorage(e = !0, t) {
|
|
549
549
|
var n;
|
|
@@ -551,17 +551,17 @@ var D = "__ui:server-storage__", ge = "__ui:server:storage:id__", O = class {
|
|
|
551
551
|
let r = (n = this.listener) == null ? void 0 : n.call(this);
|
|
552
552
|
if (!r) {
|
|
553
553
|
var i;
|
|
554
|
-
return this.hideError ||
|
|
554
|
+
return this.hideError || T.on({
|
|
555
555
|
group: "storage",
|
|
556
556
|
code: "context",
|
|
557
557
|
details: { status: t }
|
|
558
558
|
}), e && !this.storage && (this.storage = {}), (i = this.storage) == null ? {} : i;
|
|
559
559
|
}
|
|
560
|
-
return
|
|
560
|
+
return _e in r || (r[_e] = {}), r[_e];
|
|
561
561
|
}
|
|
562
562
|
static getStorageDom() {
|
|
563
563
|
if (!this.storage) {
|
|
564
|
-
let e =
|
|
564
|
+
let e = ge(ve, {});
|
|
565
565
|
this.storage = {}, r(e, (e, t) => {
|
|
566
566
|
this.storage[t] = {
|
|
567
567
|
value: e,
|
|
@@ -578,16 +578,16 @@ var D = "__ui:server-storage__", ge = "__ui:server:storage:id__", O = class {
|
|
|
578
578
|
}), t;
|
|
579
579
|
}
|
|
580
580
|
};
|
|
581
|
-
|
|
581
|
+
w(E, "storage", void 0), w(E, "listener", void 0), w(E, "hideError", void 0);
|
|
582
582
|
//#endregion
|
|
583
583
|
//#region src/classes/DataStorage.ts
|
|
584
|
-
var
|
|
584
|
+
var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D = class {
|
|
585
585
|
static setPrefix(e) {
|
|
586
|
-
|
|
586
|
+
ye = e;
|
|
587
587
|
}
|
|
588
|
-
constructor(e, t = !1, n =
|
|
589
|
-
|
|
590
|
-
let r = `${t ? "session" : "storage"}#${e}`, i =
|
|
588
|
+
constructor(e, t = !1, n = T.getItem()) {
|
|
589
|
+
w(this, "name", void 0), w(this, "isSession", void 0), w(this, "errorCenter", void 0), w(this, "value", void 0), w(this, "age", void 0), this.name = e, this.isSession = t, this.errorCenter = n;
|
|
590
|
+
let r = `${t ? "session" : "storage"}#${e}`, i = be();
|
|
591
591
|
if (r in i) return i[r];
|
|
592
592
|
this.make(), i[r] = this;
|
|
593
593
|
}
|
|
@@ -596,10 +596,10 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
596
596
|
if (e !== void 0) return this.set(e);
|
|
597
597
|
}
|
|
598
598
|
set(e) {
|
|
599
|
-
if (this.value =
|
|
599
|
+
if (this.value = m(e), this.age = Date.now(), this.value === void 0) this.remove();
|
|
600
600
|
else {
|
|
601
601
|
var t;
|
|
602
|
-
(t = this.getMethod()) == null || t.setItem(this.getIndex(),
|
|
602
|
+
(t = this.getMethod()) == null || t.setItem(this.getIndex(), me(JSON.stringify({
|
|
603
603
|
value: this.value,
|
|
604
604
|
age: this.age
|
|
605
605
|
})));
|
|
@@ -617,14 +617,14 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
617
617
|
return c(e) || this.age && this.age + e * 1e3 >= Date.now();
|
|
618
618
|
}
|
|
619
619
|
getMethod() {
|
|
620
|
-
if (s() && !
|
|
620
|
+
if (s() && !ae()) {
|
|
621
621
|
var e, t;
|
|
622
622
|
let n = this.isSession ? (e = window) == null ? void 0 : e.sessionStorage : (t = window) == null ? void 0 : t.localStorage;
|
|
623
623
|
if (n) return n;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
getIndex() {
|
|
627
|
-
return `${
|
|
627
|
+
return `${ye}__${this.name}`;
|
|
628
628
|
}
|
|
629
629
|
getValue() {
|
|
630
630
|
var e, t;
|
|
@@ -643,9 +643,9 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
643
643
|
let e = this.getValue();
|
|
644
644
|
return e ? (this.value = e.value, this.age = e.age) : (this.value = void 0, this.age = void 0), this;
|
|
645
645
|
}
|
|
646
|
-
},
|
|
646
|
+
}, xe = "__ui:cookie-block__", Se = class {
|
|
647
647
|
constructor() {
|
|
648
|
-
|
|
648
|
+
w(this, "storage", new D(xe));
|
|
649
649
|
}
|
|
650
650
|
get() {
|
|
651
651
|
var e;
|
|
@@ -654,9 +654,9 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
654
654
|
set(e) {
|
|
655
655
|
this.storage.set(e);
|
|
656
656
|
}
|
|
657
|
-
},
|
|
657
|
+
}, Ce = class {
|
|
658
658
|
static getItem() {
|
|
659
|
-
return
|
|
659
|
+
return E.get("__ui:cookie-block__", () => new Se());
|
|
660
660
|
}
|
|
661
661
|
static get() {
|
|
662
662
|
return this.getItem().get();
|
|
@@ -664,7 +664,7 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
664
664
|
static set(e) {
|
|
665
665
|
this.getItem().set(e);
|
|
666
666
|
}
|
|
667
|
-
},
|
|
667
|
+
}, we = "__ui:cookie-storage__", O = class {
|
|
668
668
|
static init(e, t, n) {
|
|
669
669
|
this.getListener = e, this.getListenerRaw = t, this.setListener = n;
|
|
670
670
|
}
|
|
@@ -674,19 +674,19 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
674
674
|
static get(e, t) {
|
|
675
675
|
var n, r;
|
|
676
676
|
let i = (n = (r = this.getListener) == null ? void 0 : r.call(this, e)) == null ? this.initItems()[e] : n;
|
|
677
|
-
return i === void 0 && t !== void 0 ? this.set(e, t) :
|
|
677
|
+
return i === void 0 && t !== void 0 ? this.set(e, t) : fe(i);
|
|
678
678
|
}
|
|
679
679
|
static set(e, t, n) {
|
|
680
|
-
let r =
|
|
681
|
-
if (
|
|
682
|
-
let i =
|
|
680
|
+
let r = m(t);
|
|
681
|
+
if (Ce.get()) return r;
|
|
682
|
+
let i = S(r, !1);
|
|
683
683
|
return this.setListener ? this.setListener(e, i, this.format(e, i, n), n) : (this.initItems()[e] = i === "" ? void 0 : r, this.hasDom() && (document.cookie = this.format(e, i, n))), r;
|
|
684
684
|
}
|
|
685
685
|
static remove(e) {
|
|
686
686
|
this.set(e, "", { age: -1 });
|
|
687
687
|
}
|
|
688
688
|
static update() {
|
|
689
|
-
s() && (
|
|
689
|
+
s() && (E.remove(we), this.initItems());
|
|
690
690
|
}
|
|
691
691
|
static format(e, t, n) {
|
|
692
692
|
return [
|
|
@@ -702,18 +702,18 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
702
702
|
].filter(Boolean).join("; ");
|
|
703
703
|
}
|
|
704
704
|
static hasDom() {
|
|
705
|
-
return s() && !
|
|
705
|
+
return s() && !ae();
|
|
706
706
|
}
|
|
707
707
|
static parse(e) {
|
|
708
708
|
let t = {};
|
|
709
709
|
for (let n of e.split(";")) {
|
|
710
|
-
let [e, r] =
|
|
710
|
+
let [e, r] = oe(n.trim(), "=", 2);
|
|
711
711
|
e && l(r) && (t[e] = r);
|
|
712
712
|
}
|
|
713
713
|
return t;
|
|
714
714
|
}
|
|
715
715
|
static initItems() {
|
|
716
|
-
return
|
|
716
|
+
return E.get(we, () => {
|
|
717
717
|
var e;
|
|
718
718
|
if (this.hasDom()) return this.parse(document.cookie);
|
|
719
719
|
let t = (e = this.getListenerRaw) == null ? void 0 : e.call(this);
|
|
@@ -742,38 +742,38 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
742
742
|
return e ? "Partitioned" : void 0;
|
|
743
743
|
}
|
|
744
744
|
static toArguments(e) {
|
|
745
|
-
return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${
|
|
745
|
+
return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${S(t)}`);
|
|
746
746
|
}
|
|
747
747
|
};
|
|
748
|
-
|
|
748
|
+
w(O, "getListener", void 0), w(O, "getListenerRaw", void 0), w(O, "setListener", void 0);
|
|
749
749
|
//#endregion
|
|
750
750
|
//#region src/classes/Cookie.ts
|
|
751
|
-
var
|
|
751
|
+
var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
|
|
752
752
|
static getInstance(t) {
|
|
753
753
|
var n, r;
|
|
754
|
-
return (n = (r =
|
|
754
|
+
return (n = (r = Te()) == null ? void 0 : r[t]) == null ? new e(t) : n;
|
|
755
755
|
}
|
|
756
756
|
constructor(e) {
|
|
757
|
-
|
|
758
|
-
let t =
|
|
757
|
+
w(this, "name", void 0), w(this, "value", void 0), w(this, "options", {}), this.name = e;
|
|
758
|
+
let t = Te();
|
|
759
759
|
if (e in t) return t[e];
|
|
760
|
-
this.value =
|
|
760
|
+
this.value = O.get(this.name), t[e] = this;
|
|
761
761
|
}
|
|
762
762
|
get(e, t) {
|
|
763
763
|
return this.value === void 0 && e && this.set(e, t), this.value;
|
|
764
764
|
}
|
|
765
765
|
set(e, t) {
|
|
766
|
-
this.value =
|
|
766
|
+
this.value = m(e), Object.assign(this.options, t), this.update();
|
|
767
767
|
}
|
|
768
768
|
remove() {
|
|
769
769
|
this.set("");
|
|
770
770
|
}
|
|
771
771
|
update() {
|
|
772
|
-
|
|
772
|
+
O.set(this.name, this.value, this.options);
|
|
773
773
|
}
|
|
774
|
-
},
|
|
774
|
+
}, De = "ui-geo-code", Oe = "__ui:geo-code__", ke = class {
|
|
775
775
|
constructor() {
|
|
776
|
-
|
|
776
|
+
w(this, "storage", new D(Oe)), w(this, "location", void 0), w(this, "valueDefault", void 0), w(this, "item", void 0), w(this, "language", void 0), w(this, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
|
|
777
777
|
}
|
|
778
778
|
get() {
|
|
779
779
|
return this.item;
|
|
@@ -809,7 +809,7 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
|
|
|
809
809
|
return e && (/([A-Z]{2}-[a-z]{2})|([a-z]{2}-[A-Z]{2})/.test(e) && (n = this.getByCodeFull(e)), !n && /[a-z]{2}/.test(e) && (n = this.getByLanguage(this.toLanguage(e))), !n && /[A-Z]{2}/.test(e) && (n = this.getByCountry(this.toCountry(e)))), this.toFull((t = n) == null ? this.getList()[0] : t);
|
|
810
810
|
}
|
|
811
811
|
getByCodeFull(e) {
|
|
812
|
-
return this.getList().find((t) =>
|
|
812
|
+
return this.getList().find((t) => x(e, [`${t.language}-${t.country}`, `${t.country}-${t.language}`]));
|
|
813
813
|
}
|
|
814
814
|
getByCountry(e) {
|
|
815
815
|
return this.getList().find((t) => {
|
|
@@ -846,10 +846,10 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
|
|
|
846
846
|
this.valueDefault = e, this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
|
|
847
847
|
}
|
|
848
848
|
getCookie() {
|
|
849
|
-
return
|
|
849
|
+
return Ee.getInstance(De);
|
|
850
850
|
}
|
|
851
851
|
findLocation() {
|
|
852
|
-
return this.findLocationDom() || this.getCookie().get() || this.valueDefault || "en-GB";
|
|
852
|
+
return this.findLocationDom() || this.getCookie().get() || m(this.valueDefault) || "en-GB";
|
|
853
853
|
}
|
|
854
854
|
findLocationDom() {
|
|
855
855
|
var e;
|
|
@@ -871,9 +871,9 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
|
|
|
871
871
|
firstDay: (e == null ? void 0 : e.firstDay) || "Mo"
|
|
872
872
|
};
|
|
873
873
|
}
|
|
874
|
-
},
|
|
874
|
+
}, k = class {
|
|
875
875
|
static getObject() {
|
|
876
|
-
return
|
|
876
|
+
return E.get("__ui:geo-instance__", () => new ke());
|
|
877
877
|
}
|
|
878
878
|
static get() {
|
|
879
879
|
return this.getObject().get();
|
|
@@ -935,14 +935,14 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
|
|
|
935
935
|
};
|
|
936
936
|
//#endregion
|
|
937
937
|
//#region src/functions/isWindow.ts
|
|
938
|
-
function
|
|
938
|
+
function Ae(e) {
|
|
939
939
|
return s() && e === window;
|
|
940
940
|
}
|
|
941
941
|
//#endregion
|
|
942
942
|
//#region src/functions/getElement.ts
|
|
943
|
-
function
|
|
943
|
+
function A(e) {
|
|
944
944
|
if (!s()) return d(e) ? void 0 : e;
|
|
945
|
-
if (
|
|
945
|
+
if (Ae(e)) return document.body;
|
|
946
946
|
if (d(e)) {
|
|
947
947
|
var t;
|
|
948
948
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -951,30 +951,30 @@ function M(e) {
|
|
|
951
951
|
}
|
|
952
952
|
//#endregion
|
|
953
953
|
//#region src/functions/getElementOrWindow.ts
|
|
954
|
-
function
|
|
955
|
-
return
|
|
954
|
+
function je(e) {
|
|
955
|
+
return Ae(e) ? e : A(e);
|
|
956
956
|
}
|
|
957
957
|
//#endregion
|
|
958
958
|
//#region src/functions/isInDom.ts
|
|
959
|
-
function
|
|
959
|
+
function Me(e) {
|
|
960
960
|
var t;
|
|
961
|
-
return (e == null ? void 0 : e.isConnected) || !!((t =
|
|
961
|
+
return (e == null ? void 0 : e.isConnected) || !!((t = A(e)) != null && t.closest("html"));
|
|
962
962
|
}
|
|
963
963
|
//#endregion
|
|
964
964
|
//#region src/functions/toArray.ts
|
|
965
|
-
function
|
|
965
|
+
function j(e) {
|
|
966
966
|
return Array.isArray(e) ? e : [e];
|
|
967
967
|
}
|
|
968
968
|
//#endregion
|
|
969
969
|
//#region src/classes/EventItem.ts
|
|
970
|
-
var
|
|
970
|
+
var Ne = class {
|
|
971
971
|
constructor(e, n = ["click"], r, i, a) {
|
|
972
|
-
|
|
973
|
-
if (
|
|
972
|
+
w(this, "listener", void 0), w(this, "options", void 0), w(this, "detail", void 0), w(this, "element", void 0), w(this, "elementControl", void 0), w(this, "elementControlEdit", void 0), w(this, "type", void 0), w(this, "listenerRecent", (e) => {
|
|
973
|
+
if (Me(this.elementControl)) {
|
|
974
974
|
var n, r;
|
|
975
975
|
(n = this.listener) == null || n.call(this.element, e, this.detail), t(this.options) && (r = this.options) != null && r.once && this.stop();
|
|
976
976
|
} else this.stop();
|
|
977
|
-
}),
|
|
977
|
+
}), w(this, "activity", !1), w(this, "activityItems", []), this.listener = r, this.options = i, this.detail = a, this.element = je(e), this.elementControl = A(e), this.type = j(n);
|
|
978
978
|
}
|
|
979
979
|
isActive() {
|
|
980
980
|
return this.activity;
|
|
@@ -983,14 +983,14 @@ var je = class {
|
|
|
983
983
|
return this.element;
|
|
984
984
|
}
|
|
985
985
|
setElement(e) {
|
|
986
|
-
let t =
|
|
987
|
-
return this.elementControlEdit || (this.elementControl =
|
|
986
|
+
let t = je(e);
|
|
987
|
+
return this.elementControlEdit || (this.elementControl = A(e)), this.element = t, this.reset(), this;
|
|
988
988
|
}
|
|
989
989
|
setElementControl(e) {
|
|
990
|
-
return this.elementControl =
|
|
990
|
+
return this.elementControl = A(e), this.elementControlEdit = !c(this.elementControl), this.elementControlEdit || (this.elementControl = A(this.element)), this;
|
|
991
991
|
}
|
|
992
992
|
setType(e) {
|
|
993
|
-
return this.type =
|
|
993
|
+
return this.type = j(e), this.reset(), this;
|
|
994
994
|
}
|
|
995
995
|
setListener(e) {
|
|
996
996
|
return this.listener = e, this;
|
|
@@ -1059,9 +1059,9 @@ var je = class {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
return !1;
|
|
1061
1061
|
}
|
|
1062
|
-
},
|
|
1063
|
-
constructor(e =
|
|
1064
|
-
|
|
1062
|
+
}, Pe = "ui-loading", Fe = class {
|
|
1063
|
+
constructor(e = Pe) {
|
|
1064
|
+
w(this, "eventName", void 0), w(this, "value", 0), w(this, "event", void 0), w(this, "registrationList", []), this.eventName = e, s() && (this.event = new Ne(window, this.eventName));
|
|
1065
1065
|
}
|
|
1066
1066
|
is() {
|
|
1067
1067
|
return this.value > 0;
|
|
@@ -1077,7 +1077,7 @@ var je = class {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
registrationEvent(e, t) {
|
|
1079
1079
|
if (s()) {
|
|
1080
|
-
let n = new
|
|
1080
|
+
let n = new Ne(window, this.eventName, e).setElementControl(t).start();
|
|
1081
1081
|
this.registrationList.push({
|
|
1082
1082
|
item: n,
|
|
1083
1083
|
listener: e,
|
|
@@ -1092,7 +1092,7 @@ var je = class {
|
|
|
1092
1092
|
var e;
|
|
1093
1093
|
(e = this.event) == null || e.dispatch({ loading: this.is() });
|
|
1094
1094
|
}
|
|
1095
|
-
},
|
|
1095
|
+
}, M = class {
|
|
1096
1096
|
static is() {
|
|
1097
1097
|
return this.getItem().is();
|
|
1098
1098
|
}
|
|
@@ -1100,7 +1100,7 @@ var je = class {
|
|
|
1100
1100
|
return this.getItem().get();
|
|
1101
1101
|
}
|
|
1102
1102
|
static getItem() {
|
|
1103
|
-
return
|
|
1103
|
+
return E.get("__ui:loading-instance__", () => new Fe());
|
|
1104
1104
|
}
|
|
1105
1105
|
static show() {
|
|
1106
1106
|
this.getItem().show();
|
|
@@ -1114,7 +1114,7 @@ var je = class {
|
|
|
1114
1114
|
static unregistrationEvent(e, t) {
|
|
1115
1115
|
this.getItem().unregistrationEvent(e, t);
|
|
1116
1116
|
}
|
|
1117
|
-
},
|
|
1117
|
+
}, Ie, Le = 1440 * 60, N = class {
|
|
1118
1118
|
static init(e, t, n, r) {
|
|
1119
1119
|
this.getListener = e, this.setListener = t, this.removeListener = n, r && (this.cacheStepAgeClearOld = r, this.stepAgeClearOld = r);
|
|
1120
1120
|
}
|
|
@@ -1124,7 +1124,7 @@ var je = class {
|
|
|
1124
1124
|
static async get(e) {
|
|
1125
1125
|
let t = await this.getItemOrListener(e);
|
|
1126
1126
|
return this.clearOld().catch((e) => {
|
|
1127
|
-
|
|
1127
|
+
T.on({
|
|
1128
1128
|
group: "api",
|
|
1129
1129
|
code: "cacheClear",
|
|
1130
1130
|
details: e
|
|
@@ -1136,7 +1136,7 @@ var je = class {
|
|
|
1136
1136
|
let t = this.generateKey(e);
|
|
1137
1137
|
return await this.get(t);
|
|
1138
1138
|
}
|
|
1139
|
-
static async set(e, t, n =
|
|
1139
|
+
static async set(e, t, n = Le) {
|
|
1140
1140
|
let r = {
|
|
1141
1141
|
value: t,
|
|
1142
1142
|
age: n,
|
|
@@ -1199,12 +1199,12 @@ var je = class {
|
|
|
1199
1199
|
}
|
|
1200
1200
|
}
|
|
1201
1201
|
};
|
|
1202
|
-
|
|
1202
|
+
Ie = N, w(N, "items", void 0), w(N, "getListener", void 0), w(N, "setListener", void 0), w(N, "removeListener", void 0), w(N, "cacheStepAgeClearOld", 16384), w(N, "stepAgeClearOld", Ie.cacheStepAgeClearOld);
|
|
1203
1203
|
//#endregion
|
|
1204
1204
|
//#region src/classes/ApiStatus.ts
|
|
1205
|
-
var
|
|
1205
|
+
var P = class {
|
|
1206
1206
|
constructor() {
|
|
1207
|
-
|
|
1207
|
+
w(this, "value", void 0);
|
|
1208
1208
|
}
|
|
1209
1209
|
get() {
|
|
1210
1210
|
return this.value;
|
|
@@ -1264,15 +1264,15 @@ var Ie = class {
|
|
|
1264
1264
|
setValue(e, t) {
|
|
1265
1265
|
this.value || (this.value = {}), this.value[e] = t;
|
|
1266
1266
|
}
|
|
1267
|
-
},
|
|
1267
|
+
}, Re = [
|
|
1268
1268
|
"success",
|
|
1269
1269
|
"status",
|
|
1270
1270
|
"code",
|
|
1271
1271
|
"message",
|
|
1272
1272
|
"error"
|
|
1273
|
-
],
|
|
1273
|
+
], ze = class {
|
|
1274
1274
|
constructor(e, t, n, r) {
|
|
1275
|
-
|
|
1275
|
+
w(this, "apiFetch", void 0), w(this, "query", void 0), w(this, "end", void 0), w(this, "error", void 0), w(this, "data", void 0), w(this, "dataMod", void 0), this.apiFetch = e, this.query = t, this.end = n, this.error = r;
|
|
1276
1276
|
}
|
|
1277
1277
|
async init() {
|
|
1278
1278
|
return this.data = await this.readData(), this;
|
|
@@ -1302,24 +1302,24 @@ var Ie = class {
|
|
|
1302
1302
|
}
|
|
1303
1303
|
initItem(e) {
|
|
1304
1304
|
let t = { ...e.data };
|
|
1305
|
-
return
|
|
1305
|
+
return Re.forEach((r) => {
|
|
1306
1306
|
if (r in e && !(r in t) && (t[r] = e[r], r === "error" && n(e[r]))) {
|
|
1307
1307
|
var i, a, o, s;
|
|
1308
1308
|
t.code = (i = (a = e[r]) == null ? void 0 : a.code) == null ? e.code : i, t.message = (o = (s = e[r]) == null ? void 0 : s.message) == null ? e.message : o;
|
|
1309
1309
|
}
|
|
1310
1310
|
}), t;
|
|
1311
1311
|
}
|
|
1312
|
-
},
|
|
1312
|
+
}, F = /* @__PURE__ */ function(e) {
|
|
1313
1313
|
return e.delete = "DELETE", e.get = "GET", e.post = "POST", e.put = "PUT", e.patch = "PATCH", e;
|
|
1314
|
-
}({}),
|
|
1314
|
+
}({}), Be = class {
|
|
1315
1315
|
constructor() {
|
|
1316
|
-
|
|
1316
|
+
w(this, "value", void 0);
|
|
1317
1317
|
}
|
|
1318
1318
|
is() {
|
|
1319
1319
|
return !!this.value;
|
|
1320
1320
|
}
|
|
1321
1321
|
get() {
|
|
1322
|
-
return
|
|
1322
|
+
return m(this.value);
|
|
1323
1323
|
}
|
|
1324
1324
|
request(e) {
|
|
1325
1325
|
let t = this.get();
|
|
@@ -1340,9 +1340,9 @@ var Ie = class {
|
|
|
1340
1340
|
e.has(t) || e.set(t, n);
|
|
1341
1341
|
}), this;
|
|
1342
1342
|
}
|
|
1343
|
-
},
|
|
1343
|
+
}, Ve = class {
|
|
1344
1344
|
constructor(e, t, n) {
|
|
1345
|
-
|
|
1345
|
+
w(this, "method", void 0), w(this, "response", void 0), w(this, "error", void 0), w(this, "jsonResponse", void 0), this.method = e, this.response = t, this.error = n;
|
|
1346
1346
|
}
|
|
1347
1347
|
getMethod() {
|
|
1348
1348
|
return this.method;
|
|
@@ -1359,14 +1359,14 @@ var Ie = class {
|
|
|
1359
1359
|
}
|
|
1360
1360
|
getMessage() {
|
|
1361
1361
|
var e;
|
|
1362
|
-
return
|
|
1362
|
+
return m((e = this.error) == null ? void 0 : e.message, this.getResponse());
|
|
1363
1363
|
}
|
|
1364
1364
|
getStatus() {
|
|
1365
1365
|
return this.response.status;
|
|
1366
1366
|
}
|
|
1367
|
-
},
|
|
1367
|
+
}, He = class {
|
|
1368
1368
|
constructor() {
|
|
1369
|
-
|
|
1369
|
+
w(this, "storage", []);
|
|
1370
1370
|
}
|
|
1371
1371
|
async find(e, t) {
|
|
1372
1372
|
let n = await this.getBody(t), r = this.getCode(n), i = this.getMessage(n) || t.statusText, a = this.findItem(e, t, r);
|
|
@@ -1383,7 +1383,7 @@ var Ie = class {
|
|
|
1383
1383
|
};
|
|
1384
1384
|
}
|
|
1385
1385
|
add(e, t, n) {
|
|
1386
|
-
return
|
|
1386
|
+
return j(e).forEach((e) => {
|
|
1387
1387
|
let r = e.url || t, i = e.method || n;
|
|
1388
1388
|
r && i && this.storage.push({
|
|
1389
1389
|
...e,
|
|
@@ -1418,23 +1418,23 @@ var Ie = class {
|
|
|
1418
1418
|
getMessage(e) {
|
|
1419
1419
|
return this.getDataByKey(e, "message");
|
|
1420
1420
|
}
|
|
1421
|
-
},
|
|
1421
|
+
}, Ue = class {
|
|
1422
1422
|
static getStorage() {
|
|
1423
|
-
return
|
|
1423
|
+
return E.get("__ui:api-error-storage__", () => new He());
|
|
1424
1424
|
}
|
|
1425
1425
|
static add(e, t, n) {
|
|
1426
1426
|
this.getStorage().add(e, t, n);
|
|
1427
1427
|
}
|
|
1428
1428
|
static async getItem(e, t) {
|
|
1429
|
-
return new
|
|
1429
|
+
return new Ve(e, t, await this.getStorage().find(e, t));
|
|
1430
1430
|
}
|
|
1431
|
-
},
|
|
1431
|
+
}, We = class {
|
|
1432
1432
|
constructor() {
|
|
1433
|
-
|
|
1433
|
+
w(this, "headers", {});
|
|
1434
1434
|
}
|
|
1435
1435
|
get(e, t = "application/json;charset=UTF-8") {
|
|
1436
1436
|
if (e === null) return;
|
|
1437
|
-
let r = { ...
|
|
1437
|
+
let r = { ...m(this.headers) };
|
|
1438
1438
|
if (n(e)) for (let t in e) r[t.toLowerCase()] = e[t];
|
|
1439
1439
|
return l(t) && (r["content-type"] = t), r;
|
|
1440
1440
|
}
|
|
@@ -1444,15 +1444,15 @@ var Ie = class {
|
|
|
1444
1444
|
set(e) {
|
|
1445
1445
|
return this.headers = e, this;
|
|
1446
1446
|
}
|
|
1447
|
-
},
|
|
1447
|
+
}, Ge = "__ui:api:hydration:id__", Ke = class {
|
|
1448
1448
|
constructor() {
|
|
1449
|
-
|
|
1449
|
+
w(this, "list", []);
|
|
1450
1450
|
}
|
|
1451
1451
|
initResponse(e) {
|
|
1452
1452
|
s() && e.add(this.getListByClient());
|
|
1453
1453
|
}
|
|
1454
1454
|
toClient(e, t) {
|
|
1455
|
-
let { path: n, method: r =
|
|
1455
|
+
let { path: n, method: r = F.get, request: i, global: a = r === F.get } = e;
|
|
1456
1456
|
!a || !n || s() || this.list.push({
|
|
1457
1457
|
path: n,
|
|
1458
1458
|
method: r,
|
|
@@ -1461,14 +1461,14 @@ var Ie = class {
|
|
|
1461
1461
|
});
|
|
1462
1462
|
}
|
|
1463
1463
|
toString() {
|
|
1464
|
-
return
|
|
1464
|
+
return he(Ge, this.list);
|
|
1465
1465
|
}
|
|
1466
1466
|
getListByClient() {
|
|
1467
|
-
return
|
|
1467
|
+
return ge(Ge, []);
|
|
1468
1468
|
}
|
|
1469
|
-
},
|
|
1469
|
+
}, qe = class {
|
|
1470
1470
|
constructor() {
|
|
1471
|
-
|
|
1471
|
+
w(this, "callback", void 0), w(this, "callbackEnd", void 0), w(this, "loading", !1);
|
|
1472
1472
|
}
|
|
1473
1473
|
async make(e, t) {
|
|
1474
1474
|
if (e && this.callback) return this.go(t);
|
|
@@ -1494,15 +1494,15 @@ var Ie = class {
|
|
|
1494
1494
|
};
|
|
1495
1495
|
//#endregion
|
|
1496
1496
|
//#region src/functions/executePromise.ts
|
|
1497
|
-
async function
|
|
1498
|
-
let n =
|
|
1497
|
+
async function Je(e, ...t) {
|
|
1498
|
+
let n = m(e, ...t);
|
|
1499
1499
|
return n instanceof Promise ? await n : n;
|
|
1500
1500
|
}
|
|
1501
1501
|
//#endregion
|
|
1502
1502
|
//#region src/classes/ApiResponse.ts
|
|
1503
|
-
var
|
|
1503
|
+
var Ye = "d-response-loading", Xe = class {
|
|
1504
1504
|
constructor(e) {
|
|
1505
|
-
|
|
1505
|
+
w(this, "requestDefault", void 0), w(this, "first", []), w(this, "response", []), w(this, "loading", void 0), w(this, "devMode", !1), this.requestDefault = e;
|
|
1506
1506
|
}
|
|
1507
1507
|
get(e = "", t, n, r) {
|
|
1508
1508
|
return this.response.find((i) => !this.isDisable(i) && this.isPath(i, e) && t === i.method && this.isFirst(i, r) && this.isResponse(i, n) ? (this.isDevMode(r) && console.warn(`Response type: ${i.path}`), this.first.push(i), !0) : !1);
|
|
@@ -1511,7 +1511,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1511
1511
|
return this.response.filter((e) => e.isForGlobal !== !0);
|
|
1512
1512
|
}
|
|
1513
1513
|
add(e) {
|
|
1514
|
-
return this.response.push(...
|
|
1514
|
+
return this.response.push(...j(e)), this;
|
|
1515
1515
|
}
|
|
1516
1516
|
setDevMode(e) {
|
|
1517
1517
|
return this.devMode = e, this;
|
|
@@ -1528,7 +1528,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1528
1528
|
if (t) return this.fetchAsync(t.response);
|
|
1529
1529
|
}
|
|
1530
1530
|
isDisable(e) {
|
|
1531
|
-
return !!
|
|
1531
|
+
return !!m(e == null ? void 0 : e.disable);
|
|
1532
1532
|
}
|
|
1533
1533
|
isPath(e, t) {
|
|
1534
1534
|
return t === e.path || !!(e.path instanceof RegExp && e.path.test(t));
|
|
@@ -1545,7 +1545,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1545
1545
|
}
|
|
1546
1546
|
readData(e) {
|
|
1547
1547
|
if (!s()) return;
|
|
1548
|
-
let { path: t = "", method: n =
|
|
1548
|
+
let { path: t = "", method: n = F.get, global: r = n === F.get, devMode: i = !1 } = e;
|
|
1549
1549
|
if (r || this.isDevMode(i)) {
|
|
1550
1550
|
let r = this.requestDefault.request(e.request), a = this.get(t, n, r, i);
|
|
1551
1551
|
if (a) return {
|
|
@@ -1556,9 +1556,9 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1556
1556
|
}
|
|
1557
1557
|
fetch(e, t) {
|
|
1558
1558
|
return this.startResponseLoading(), new Promise((n) => {
|
|
1559
|
-
|
|
1560
|
-
e != null && e.lag ? (
|
|
1561
|
-
this.stopResponseLoading(), n(t),
|
|
1559
|
+
Je(p(e.response) ? e.response(t) : e.response).then((t) => {
|
|
1560
|
+
e != null && e.lag ? (M.show(), setTimeout(() => {
|
|
1561
|
+
this.stopResponseLoading(), n(t), M.hide();
|
|
1562
1562
|
}, f(0, 2e3))) : (this.stopResponseLoading(), n(t));
|
|
1563
1563
|
});
|
|
1564
1564
|
});
|
|
@@ -1567,17 +1567,17 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1567
1567
|
return e.response;
|
|
1568
1568
|
}
|
|
1569
1569
|
startResponseLoading() {
|
|
1570
|
-
this.loading && clearTimeout(this.loading), s() && document.body.classList.add(
|
|
1570
|
+
this.loading && clearTimeout(this.loading), s() && document.body.classList.add(Ye);
|
|
1571
1571
|
}
|
|
1572
1572
|
stopResponseLoading() {
|
|
1573
1573
|
s() && (this.loading = setTimeout(() => {
|
|
1574
|
-
this.loading = void 0, document.body.classList.remove(
|
|
1574
|
+
this.loading = void 0, document.body.classList.remove(Ye);
|
|
1575
1575
|
}, 2400));
|
|
1576
1576
|
}
|
|
1577
|
-
},
|
|
1577
|
+
}, Ze = class {
|
|
1578
1578
|
constructor(e = "/api/", t = {}) {
|
|
1579
|
-
|
|
1580
|
-
let { headersClass: n =
|
|
1579
|
+
w(this, "url", void 0), w(this, "headers", void 0), w(this, "requestDefault", void 0), w(this, "status", void 0), w(this, "response", void 0), w(this, "preparation", void 0), w(this, "loading", void 0), w(this, "errorCenter", void 0), w(this, "hydration", void 0), w(this, "timeout", 16e3), w(this, "origin", void 0), this.url = e;
|
|
1580
|
+
let { headersClass: n = We, requestDefaultClass: r = Be, statusClass: i = P, responseClass: a = Xe, preparationClass: o = qe, loadingClass: s = M.getItem(), errorCenterClass: c = T.getItem(), hydrationClass: l = Ke } = t;
|
|
1581
1581
|
this.headers = new n(), this.requestDefault = new r(), this.status = new i(), this.response = new a(this.requestDefault), this.preparation = new o(), this.loading = s, this.errorCenter = c, this.hydration = new l(), this.hydration.initResponse(this.response);
|
|
1582
1582
|
}
|
|
1583
1583
|
isLocalhost() {
|
|
@@ -1596,14 +1596,14 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1596
1596
|
return this.origin && /^\//.test(this.url) ? `${this.origin}${this.url}` : this.url;
|
|
1597
1597
|
}
|
|
1598
1598
|
getUrl(e, t = !0) {
|
|
1599
|
-
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}",
|
|
1599
|
+
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}", k.getLocation()).replace("{country}", k.getCountry()).replace("{language}", k.getLanguage());
|
|
1600
1600
|
}
|
|
1601
|
-
getBody(e = {}, t =
|
|
1601
|
+
getBody(e = {}, t = F.get) {
|
|
1602
1602
|
if (e instanceof FormData) return e;
|
|
1603
|
-
if (t !==
|
|
1603
|
+
if (t !== F.get && l(e)) return d(e) ? e : JSON.stringify(e);
|
|
1604
1604
|
}
|
|
1605
|
-
getBodyForGet(e, t = "", n =
|
|
1606
|
-
if (n ===
|
|
1605
|
+
getBodyForGet(e, t = "", n = F.get) {
|
|
1606
|
+
if (n === F.get) {
|
|
1607
1607
|
let n = t.match(/\?/) ? "&" : "?", r = typeof e == "object" ? o(e) : e;
|
|
1608
1608
|
if (l(r)) return `${n}${r}`;
|
|
1609
1609
|
}
|
|
@@ -1639,63 +1639,63 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1639
1639
|
get(e) {
|
|
1640
1640
|
return this.request({
|
|
1641
1641
|
...e,
|
|
1642
|
-
method:
|
|
1642
|
+
method: F.get
|
|
1643
1643
|
});
|
|
1644
1644
|
}
|
|
1645
1645
|
post(e) {
|
|
1646
1646
|
return this.request({
|
|
1647
1647
|
...e,
|
|
1648
|
-
method:
|
|
1648
|
+
method: F.post
|
|
1649
1649
|
});
|
|
1650
1650
|
}
|
|
1651
1651
|
put(e) {
|
|
1652
1652
|
return this.request({
|
|
1653
1653
|
...e,
|
|
1654
|
-
method:
|
|
1654
|
+
method: F.put
|
|
1655
1655
|
});
|
|
1656
1656
|
}
|
|
1657
1657
|
patch(e) {
|
|
1658
1658
|
return this.request({
|
|
1659
1659
|
...e,
|
|
1660
|
-
method:
|
|
1660
|
+
method: F.patch
|
|
1661
1661
|
});
|
|
1662
1662
|
}
|
|
1663
1663
|
delete(e) {
|
|
1664
1664
|
return this.request({
|
|
1665
1665
|
...e,
|
|
1666
|
-
method:
|
|
1666
|
+
method: F.delete
|
|
1667
1667
|
});
|
|
1668
1668
|
}
|
|
1669
1669
|
getRetryDelay(e, t) {
|
|
1670
1670
|
return f(t, t + e * t);
|
|
1671
1671
|
}
|
|
1672
1672
|
async fetch(e, t = 0) {
|
|
1673
|
-
let { method: n =
|
|
1674
|
-
if (
|
|
1675
|
-
let
|
|
1676
|
-
if (
|
|
1677
|
-
let
|
|
1673
|
+
let { method: n = F.get, api: r = !0, path: i = "", hideError: a = !1, hideLoading: o = !1, retry: s = 0, retryDelay: c = 64, globalPreparation: l = !0, globalEnd: u = !0, initError: d = !0, endResetLimit: f = 8 } = e, p = this.getUrl(i, r), m = await this.response.emulator(e);
|
|
1674
|
+
if (m) return m;
|
|
1675
|
+
let h = await N.getByFetch(e);
|
|
1676
|
+
if (h) return this.hydration.toClient(e, h), h;
|
|
1677
|
+
let g = new P(), _, v;
|
|
1678
1678
|
o || this.loading.show();
|
|
1679
1679
|
try {
|
|
1680
1680
|
await this.preparation.make(l, e);
|
|
1681
|
-
let { query: r, timeoutId: i } = await this.makeQuery(e,
|
|
1681
|
+
let { query: r, timeoutId: i } = await this.makeQuery(e, p);
|
|
1682
1682
|
i && clearTimeout(i);
|
|
1683
|
-
let
|
|
1684
|
-
if (
|
|
1685
|
-
var
|
|
1686
|
-
d && (
|
|
1683
|
+
let m = await this.preparation.makeEnd(u, r, e);
|
|
1684
|
+
if (g.setStatus(r.status, r.statusText), this.status.setStatus(r.status, r.statusText), !a && r.status >= 400) {
|
|
1685
|
+
var te;
|
|
1686
|
+
d && (v = await Ue.getItem(n, r)), this.makeErrorQuery((te = v) == null ? r : te);
|
|
1687
1687
|
}
|
|
1688
|
-
if (
|
|
1689
|
-
|
|
1688
|
+
if (m != null && m.reset && t < f || t < s) return await ee(this.getRetryDelay(t, c)), o || this.loading.hide(), await this.fetch(e, t + 1);
|
|
1689
|
+
_ = new ze(e, r, m, v), await _.init();
|
|
1690
1690
|
} catch (e) {
|
|
1691
|
-
throw a || this.makeError(e),
|
|
1691
|
+
throw a || this.makeError(e), g.setError(String(e)), this.status.setError(String(e)), o || this.loading.hide(), e;
|
|
1692
1692
|
}
|
|
1693
|
-
|
|
1694
|
-
let
|
|
1695
|
-
return o || this.loading.hide(), this.hydration.toClient(e,
|
|
1693
|
+
g.setLastResponse(_.getData()), this.status.setLastResponse(_.getData());
|
|
1694
|
+
let y = _.getAndStatus(g);
|
|
1695
|
+
return o || this.loading.hide(), this.hydration.toClient(e, y), await N.setByFetch(e, y), y;
|
|
1696
1696
|
}
|
|
1697
1697
|
async makeQuery(e, t) {
|
|
1698
|
-
let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i =
|
|
1698
|
+
let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i = F.get, headers: a = {}, type: o = "application/json;charset=UTF-8", init: s = {} } = e, c = r == null ? t : r, l = `${c}${this.getBodyForGet(n, c, i)}`, u = this.headers.getByRequest(e.request, a, o), d = {
|
|
1699
1699
|
...s,
|
|
1700
1700
|
method: i,
|
|
1701
1701
|
body: this.getBody(n, i)
|
|
@@ -1789,12 +1789,12 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1789
1789
|
}, n);
|
|
1790
1790
|
}
|
|
1791
1791
|
}
|
|
1792
|
-
},
|
|
1792
|
+
}, I = class {
|
|
1793
1793
|
static isLocalhost() {
|
|
1794
1794
|
return this.getItem().isLocalhost();
|
|
1795
1795
|
}
|
|
1796
1796
|
static getItem() {
|
|
1797
|
-
return
|
|
1797
|
+
return E.get("__ui:api-instance__", () => new Ze());
|
|
1798
1798
|
}
|
|
1799
1799
|
static getStatus() {
|
|
1800
1800
|
return this.getItem().getStatus();
|
|
@@ -1814,10 +1814,10 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1814
1814
|
static getUrl(e, t = !0) {
|
|
1815
1815
|
return this.getItem().getUrl(e, t);
|
|
1816
1816
|
}
|
|
1817
|
-
static getBody(e = {}, t =
|
|
1817
|
+
static getBody(e = {}, t = F.get) {
|
|
1818
1818
|
return this.getItem().getBody(e, t);
|
|
1819
1819
|
}
|
|
1820
|
-
static getBodyForGet(e, t = "", n =
|
|
1820
|
+
static getBodyForGet(e, t = "", n = F.get) {
|
|
1821
1821
|
return this.getItem().getBodyForGet(e, t, n);
|
|
1822
1822
|
}
|
|
1823
1823
|
static setHeaders(e) {
|
|
@@ -1862,16 +1862,16 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1862
1862
|
static delete(e) {
|
|
1863
1863
|
return this.getItem().delete(e);
|
|
1864
1864
|
}
|
|
1865
|
-
},
|
|
1866
|
-
constructor(e, t, n, r =
|
|
1867
|
-
if (
|
|
1865
|
+
}, Qe = class {
|
|
1866
|
+
constructor(e, t, n, r = T.getItem()) {
|
|
1867
|
+
if (w(this, "callback", void 0), w(this, "callbackError", void 0), w(this, "channel", void 0), w(this, "update", (e) => {
|
|
1868
1868
|
var t;
|
|
1869
1869
|
return (t = this.callback) == null || t.call(this, e), this;
|
|
1870
|
-
}),
|
|
1870
|
+
}), w(this, "updateError", (e) => {
|
|
1871
1871
|
var t;
|
|
1872
1872
|
return (t = this.callbackError) == null || t.call(this, e), this;
|
|
1873
1873
|
}), this.callback = t, this.callbackError = n, s()) try {
|
|
1874
|
-
this.channel = new BroadcastChannel(`${
|
|
1874
|
+
this.channel = new BroadcastChannel(`${$e()}__${e}`), this.channel.onmessage = this.update, this.channel.onmessageerror = this.updateError;
|
|
1875
1875
|
} catch (e) {
|
|
1876
1876
|
r.on({
|
|
1877
1877
|
group: "broadcast",
|
|
@@ -1897,9 +1897,9 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1897
1897
|
var e;
|
|
1898
1898
|
return (e = this.channel) == null || e.close(), this.channel = void 0, this;
|
|
1899
1899
|
}
|
|
1900
|
-
},
|
|
1900
|
+
}, $e = () => new D("__ui:broadcast-name__").get(() => `name_${f(1e6, 9999999)}`), et = class {
|
|
1901
1901
|
constructor(e) {
|
|
1902
|
-
|
|
1902
|
+
w(this, "callback", void 0), w(this, "cache", void 0), w(this, "cacheOld", void 0), w(this, "comparisons", []), this.callback = e;
|
|
1903
1903
|
}
|
|
1904
1904
|
getCache(e) {
|
|
1905
1905
|
return this.isUpdate(e) && (this.cacheOld = this.cache, this.setCache()), this.cache;
|
|
@@ -1919,9 +1919,9 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1919
1919
|
isUpdate(e) {
|
|
1920
1920
|
return this.cache === void 0 || this.comparisons.length !== e.length || this.comparisons.findIndex((t, n) => t !== e[n]) >= 0 ? (this.comparisons = [...e], !0) : !1;
|
|
1921
1921
|
}
|
|
1922
|
-
},
|
|
1922
|
+
}, tt = class {
|
|
1923
1923
|
constructor() {
|
|
1924
|
-
|
|
1924
|
+
w(this, "cache", {});
|
|
1925
1925
|
}
|
|
1926
1926
|
get(e, t, n) {
|
|
1927
1927
|
return this.getCacheItem(e, t).getCache(n == null ? [] : n);
|
|
@@ -1930,11 +1930,11 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1930
1930
|
return await this.getCacheItem(e, t).getCacheAsync(n == null ? [] : n);
|
|
1931
1931
|
}
|
|
1932
1932
|
getCacheItem(e, t) {
|
|
1933
|
-
return e in this.cache || (this.cache[e] = new
|
|
1933
|
+
return e in this.cache || (this.cache[e] = new et(t)), this.cache[e];
|
|
1934
1934
|
}
|
|
1935
|
-
},
|
|
1935
|
+
}, nt = class {
|
|
1936
1936
|
static getItem() {
|
|
1937
|
-
return
|
|
1937
|
+
return E.get("__ui:cache-static__", () => new tt());
|
|
1938
1938
|
}
|
|
1939
1939
|
static get(e, t, n) {
|
|
1940
1940
|
return this.getItem().get(e, t, n);
|
|
@@ -1945,41 +1945,41 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1945
1945
|
};
|
|
1946
1946
|
//#endregion
|
|
1947
1947
|
//#region src/functions/toDate.ts
|
|
1948
|
-
function
|
|
1948
|
+
function L(e) {
|
|
1949
1949
|
var t, n, r, i, a, o, s, l;
|
|
1950
1950
|
if (e instanceof Date) return e;
|
|
1951
1951
|
if (c(e)) return /* @__PURE__ */ new Date();
|
|
1952
1952
|
if (typeof e == "number") return new Date(e);
|
|
1953
|
-
let u = e, d =
|
|
1953
|
+
let u = e, d = k.getTimezoneFormat().trim();
|
|
1954
1954
|
e.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (e, t, n) => (u = t, d = n.trim(), e));
|
|
1955
1955
|
let f = (t = (n = (r = (i = (a = (o = (s = (l = /^\d{4}\d{2}\d{2}$/.exec(u) && `${u.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) == null ? /^\d{4}\d{2}$/.exec(u) && `${u.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00` : l) == null ? /^\d{4}\d{2}\d{2} \d{2}:\d{2}:\d{2}$/.exec(u) && u.replace(/^(\d{4})(\d{2})(\d{2}) (\d{2}):(\d{2}):(\d{2})$/, "$1-$2-$3T$4:$5:$6") : s) == null ? /^\d{4}-\d{2}-\d{2}$/.exec(u) && `${u}T00:00:00` : o) == null ? /^\d{4}-\d{2}$/.exec(u) && `${u}-01T00:00:00` : a) == null ? /^\d{4}$/.exec(u) && `${u}-01-01T00:00:00` : i) == null ? /^\d{2}:\d{2}$/.exec(u) && `2000-01-01T${u}:00` : r) == null ? /^\d{2}:\d{2}:\d{2}$/.exec(u) && `2000-01-01T${u}` : n) == null ? u.replace(" ", "T") : t;
|
|
1956
1956
|
return /* @__PURE__ */ new Date(`${f.trim()}${d}`);
|
|
1957
1957
|
}
|
|
1958
1958
|
//#endregion
|
|
1959
1959
|
//#region src/functions/getColumn.ts
|
|
1960
|
-
function
|
|
1960
|
+
function rt(e, t) {
|
|
1961
1961
|
return r(e, (e) => e == null ? void 0 : e[t], !0);
|
|
1962
1962
|
}
|
|
1963
1963
|
//#endregion
|
|
1964
1964
|
//#region src/classes/GeoIntl.ts
|
|
1965
|
-
var
|
|
1966
|
-
static isItem(e =
|
|
1967
|
-
return this.getLocation(e) in
|
|
1965
|
+
var R = class e {
|
|
1966
|
+
static isItem(e = k.getLocation()) {
|
|
1967
|
+
return this.getLocation(e) in B;
|
|
1968
1968
|
}
|
|
1969
|
-
static getLocation(e =
|
|
1970
|
-
if (e in
|
|
1971
|
-
let t =
|
|
1972
|
-
return
|
|
1969
|
+
static getLocation(e = k.getLocation()) {
|
|
1970
|
+
if (e in z) return z[e];
|
|
1971
|
+
let t = k.find(e);
|
|
1972
|
+
return z[e] = t.standard, t.standard;
|
|
1973
1973
|
}
|
|
1974
|
-
static getInstance(t =
|
|
1974
|
+
static getInstance(t = k.getLocation()) {
|
|
1975
1975
|
let n = this.getLocation(t);
|
|
1976
|
-
return n in
|
|
1976
|
+
return n in B ? B[n] : new e(t);
|
|
1977
1977
|
}
|
|
1978
|
-
constructor(e =
|
|
1979
|
-
|
|
1978
|
+
constructor(e = k.getLocation(), t = T.getItem()) {
|
|
1979
|
+
w(this, "errorCenter", void 0), w(this, "geo", void 0), this.errorCenter = t, this.geo = k.find(e);
|
|
1980
1980
|
let n = this.getLocation();
|
|
1981
|
-
if (n in
|
|
1982
|
-
|
|
1981
|
+
if (n in B) return B[n];
|
|
1982
|
+
z[e] = n, B[n] = this;
|
|
1983
1983
|
}
|
|
1984
1984
|
getLocation() {
|
|
1985
1985
|
return this.geo.standard;
|
|
@@ -2010,7 +2010,7 @@ var z = class e {
|
|
|
2010
2010
|
type: "language",
|
|
2011
2011
|
style: t
|
|
2012
2012
|
};
|
|
2013
|
-
return this.display(
|
|
2013
|
+
return this.display(k.getByCode(e).language, n);
|
|
2014
2014
|
}
|
|
2015
2015
|
countryName(e, t) {
|
|
2016
2016
|
let n = {
|
|
@@ -2040,7 +2040,7 @@ var z = class e {
|
|
|
2040
2040
|
}
|
|
2041
2041
|
number(e, t) {
|
|
2042
2042
|
var n, r;
|
|
2043
|
-
return ((n = this.numberObject(t)) == null || (r = n.format) == null ? void 0 : r.call(n,
|
|
2043
|
+
return ((n = this.numberObject(t)) == null || (r = n.format) == null ? void 0 : r.call(n, b(e))) || e.toString();
|
|
2044
2044
|
}
|
|
2045
2045
|
decimal() {
|
|
2046
2046
|
var e, t, n;
|
|
@@ -2054,7 +2054,7 @@ var z = class e {
|
|
|
2054
2054
|
}, i = e.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...e) => (r.currency = String(e[2]).toUpperCase(), String(e[1])));
|
|
2055
2055
|
if (n) {
|
|
2056
2056
|
let t = this.numberObject(r);
|
|
2057
|
-
return t ?
|
|
2057
|
+
return t ? rt(t.formatToParts(b(e)).filter((e) => ["literal", "currency"].indexOf(e.type) === -1), "value").join("") : e.toString();
|
|
2058
2058
|
} else if ("currency" in r) return this.number(typeof e == "number" ? e : i, r);
|
|
2059
2059
|
else return this.number(typeof e == "number" ? e : i, {
|
|
2060
2060
|
...r,
|
|
@@ -2077,7 +2077,7 @@ var z = class e {
|
|
|
2077
2077
|
return this.number(r, n);
|
|
2078
2078
|
}
|
|
2079
2079
|
sizeFile(e, t = "byte") {
|
|
2080
|
-
let n =
|
|
2080
|
+
let n = b(e);
|
|
2081
2081
|
if (n > 1024 && d(t)) switch (t) {
|
|
2082
2082
|
case "byte": return this.sizeFile(n / 1024, "kilobyte");
|
|
2083
2083
|
case "kilobyte": return this.sizeFile(n / 1024, "megabyte");
|
|
@@ -2094,11 +2094,11 @@ var z = class e {
|
|
|
2094
2094
|
});
|
|
2095
2095
|
}
|
|
2096
2096
|
percentBy100(e, t) {
|
|
2097
|
-
return this.percent(
|
|
2097
|
+
return this.percent(b(e) / 100, t);
|
|
2098
2098
|
}
|
|
2099
2099
|
plural(e, t, n, r) {
|
|
2100
2100
|
var i;
|
|
2101
|
-
let a =
|
|
2101
|
+
let a = b(e), o = t.split("|");
|
|
2102
2102
|
if (o.length > 1) try {
|
|
2103
2103
|
if (typeof Intl < "u") {
|
|
2104
2104
|
var s;
|
|
@@ -2135,18 +2135,18 @@ var z = class e {
|
|
|
2135
2135
|
return `${this.number(a, r)} ${(i = o == null ? void 0 : o[0]) == null ? "" : i}`.trim();
|
|
2136
2136
|
}
|
|
2137
2137
|
date(e, t, n, r) {
|
|
2138
|
-
let i =
|
|
2138
|
+
let i = L(e), a = typeof n == "string", o = this.dateOptions(t, a ? n : "short");
|
|
2139
2139
|
return r && (o.hour12 = !1), a || Object.assign(o, n), i.toLocaleString(this.getLocation(), o);
|
|
2140
2140
|
}
|
|
2141
2141
|
relative(e, t, n) {
|
|
2142
|
-
let r =
|
|
2142
|
+
let r = L(e), i = n || /* @__PURE__ */ new Date(), a = {
|
|
2143
2143
|
numeric: "auto",
|
|
2144
2144
|
...typeof t == "string" ? { style: t } : t || {}
|
|
2145
2145
|
}, o = "second", s = (r.getTime() - i.getTime()) / 1e3;
|
|
2146
2146
|
return Math.abs(s) >= 60 && (o = "minute", s /= 60, Math.abs(s) >= 60 && (o = "hour", s /= 60, Math.abs(s) >= 24 && (o = "day", s /= 24, Math.abs(s) >= 30 && (o = "month", s /= 30, Math.abs(s) >= 12 && (o = "year", s /= 12))))), this.relativeByValue(s, o, a);
|
|
2147
2147
|
}
|
|
2148
2148
|
relativeLimit(e, t, n, r, i, a, o) {
|
|
2149
|
-
let s =
|
|
2149
|
+
let s = L(e), c = n || /* @__PURE__ */ new Date(), l = new Date(c), u = new Date(c);
|
|
2150
2150
|
return l.setDate(c.getDate() - t), u.setDate(c.getDate() + t), s >= l && s <= u ? this.relative(s, r, c) : this.date(s, a, i, o);
|
|
2151
2151
|
}
|
|
2152
2152
|
relativeByValue(e, t, n) {
|
|
@@ -2155,7 +2155,7 @@ var z = class e {
|
|
|
2155
2155
|
...typeof n == "string" ? { style: n } : n || {}
|
|
2156
2156
|
};
|
|
2157
2157
|
try {
|
|
2158
|
-
if (this.hasIntl() && Intl.RelativeTimeFormat !== void 0) return new Intl.RelativeTimeFormat(this.getLocation(), r).format(Math.round(
|
|
2158
|
+
if (this.hasIntl() && Intl.RelativeTimeFormat !== void 0) return new Intl.RelativeTimeFormat(this.getLocation(), r).format(Math.round(b(e)), t);
|
|
2159
2159
|
} catch (e) {
|
|
2160
2160
|
this.errorCenter.on({
|
|
2161
2161
|
group: "intl",
|
|
@@ -2167,7 +2167,7 @@ var z = class e {
|
|
|
2167
2167
|
}
|
|
2168
2168
|
month(e, t) {
|
|
2169
2169
|
try {
|
|
2170
|
-
if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(
|
|
2170
|
+
if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(L(e));
|
|
2171
2171
|
} catch (e) {
|
|
2172
2172
|
this.errorCenter.on({
|
|
2173
2173
|
group: "intl",
|
|
@@ -2201,7 +2201,7 @@ var z = class e {
|
|
|
2201
2201
|
}
|
|
2202
2202
|
weekday(e, t) {
|
|
2203
2203
|
try {
|
|
2204
|
-
if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(
|
|
2204
|
+
if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(L(e));
|
|
2205
2205
|
} catch (e) {
|
|
2206
2206
|
this.errorCenter.on({
|
|
2207
2207
|
group: "intl",
|
|
@@ -2303,15 +2303,15 @@ var z = class e {
|
|
|
2303
2303
|
"second"
|
|
2304
2304
|
].indexOf(e) !== -1 && (n.second = "2-digit")), n;
|
|
2305
2305
|
}
|
|
2306
|
-
},
|
|
2307
|
-
constructor(e, t = "date", n =
|
|
2308
|
-
|
|
2306
|
+
}, z = {}, B = {}, it = class e {
|
|
2307
|
+
constructor(e, t = "date", n = k.getLocation()) {
|
|
2308
|
+
w(this, "type", void 0), w(this, "code", void 0), w(this, "date", void 0), w(this, "hour24", !1), w(this, "watch", void 0), this.type = t, this.code = n, this.date = L(e), isNaN(this.date.getTime()) && T.on({
|
|
2309
2309
|
group: "intl",
|
|
2310
2310
|
code: "invalid"
|
|
2311
2311
|
});
|
|
2312
2312
|
}
|
|
2313
2313
|
getIntl() {
|
|
2314
|
-
return
|
|
2314
|
+
return R.getInstance(this.code);
|
|
2315
2315
|
}
|
|
2316
2316
|
getDate() {
|
|
2317
2317
|
return this.date;
|
|
@@ -2414,7 +2414,7 @@ var z = class e {
|
|
|
2414
2414
|
].indexOf(this.type) !== -1 && (i = n.locale("time"))), `${r.join("-")}${i ? `T${i}${t ? n.getTimeZone() : ""}` : ""}`;
|
|
2415
2415
|
}
|
|
2416
2416
|
setDate(e) {
|
|
2417
|
-
return this.date =
|
|
2417
|
+
return this.date = L(e), this.update(), this;
|
|
2418
2418
|
}
|
|
2419
2419
|
setType(e) {
|
|
2420
2420
|
return this.type = e, this.update(), this;
|
|
@@ -2566,24 +2566,24 @@ var z = class e {
|
|
|
2566
2566
|
};
|
|
2567
2567
|
//#endregion
|
|
2568
2568
|
//#region src/functions/getItemByPath.ts
|
|
2569
|
-
function
|
|
2569
|
+
function V(e, n) {
|
|
2570
2570
|
var r;
|
|
2571
2571
|
if (!l(n, !0)) return;
|
|
2572
|
-
let i =
|
|
2573
|
-
return a && e != null && e[a] && t(e[a]) && i != null && i[1] ?
|
|
2572
|
+
let i = oe(n, ".", 2), a = i[0];
|
|
2573
|
+
return a && e != null && e[a] && t(e[a]) && i != null && i[1] ? V(e[a], i[1]) : (r = e == null ? void 0 : e[a]) == null ? void 0 : r;
|
|
2574
2574
|
}
|
|
2575
2575
|
//#endregion
|
|
2576
2576
|
//#region src/functions/toCamelCase.ts
|
|
2577
|
-
function
|
|
2577
|
+
function at(e) {
|
|
2578
2578
|
return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/-+([a-zA-Z0-9])/g, (...e) => `${String(e[1]).toUpperCase()}`).replace(/^([A-Z])/, (e) => `${e.toLowerCase()}`);
|
|
2579
2579
|
}
|
|
2580
2580
|
//#endregion
|
|
2581
2581
|
//#region src/types/formattersTypes.ts
|
|
2582
|
-
var
|
|
2582
|
+
var H = /* @__PURE__ */ function(e) {
|
|
2583
2583
|
return e.currency = "currency", e.date = "date", e.name = "name", e.number = "number", e.plural = "plural", e.unit = "unit", e;
|
|
2584
|
-
}({}),
|
|
2584
|
+
}({}), ot = class {
|
|
2585
2585
|
constructor(e, t) {
|
|
2586
|
-
|
|
2586
|
+
w(this, "options", void 0), w(this, "list", void 0), this.options = e, this.list = t;
|
|
2587
2587
|
}
|
|
2588
2588
|
is() {
|
|
2589
2589
|
return !!this.list;
|
|
@@ -2595,7 +2595,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2595
2595
|
return this.list ? this.isArray() ? this.list.length : 1 : 0;
|
|
2596
2596
|
}
|
|
2597
2597
|
getList() {
|
|
2598
|
-
return this.list ?
|
|
2598
|
+
return this.list ? j(this.list) : [];
|
|
2599
2599
|
}
|
|
2600
2600
|
getOptions() {
|
|
2601
2601
|
return this.options;
|
|
@@ -2613,50 +2613,50 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2613
2613
|
getFormatData(e) {
|
|
2614
2614
|
let t = {};
|
|
2615
2615
|
return r(this.options, (n, r) => {
|
|
2616
|
-
let i = `${
|
|
2616
|
+
let i = `${at(r)}Format`, a = V(e, r);
|
|
2617
2617
|
n != null && n.transformation ? l(a) ? t[i] = n.transformation(a, e, n.options) : t[i] = "" : t[i] = this.transformation(a, e, n.type, n.options);
|
|
2618
2618
|
}), t;
|
|
2619
2619
|
}
|
|
2620
2620
|
transformation(e, t, n, r) {
|
|
2621
|
-
if (l(e) || n ===
|
|
2622
|
-
case
|
|
2623
|
-
case
|
|
2624
|
-
case
|
|
2625
|
-
case
|
|
2626
|
-
case
|
|
2627
|
-
case
|
|
2621
|
+
if (l(e) || n === H.name) switch (n) {
|
|
2622
|
+
case H.currency: return this.formatCurrency(e, t, r);
|
|
2623
|
+
case H.date: return this.formatDate(e, r);
|
|
2624
|
+
case H.name: return this.formatName(t, r);
|
|
2625
|
+
case H.number: return this.formatNumber(e, r);
|
|
2626
|
+
case H.plural: return this.formatPlural(e, r);
|
|
2627
|
+
case H.unit: return this.formatUnit(e, r);
|
|
2628
2628
|
default: return String(e);
|
|
2629
2629
|
}
|
|
2630
2630
|
return "";
|
|
2631
2631
|
}
|
|
2632
2632
|
formatCurrency(e, t, n) {
|
|
2633
2633
|
var r;
|
|
2634
|
-
let i = n != null && n.currencyPropName ?
|
|
2635
|
-
return
|
|
2634
|
+
let i = n != null && n.currencyPropName ? V(t, n.currencyPropName) : t == null ? void 0 : t.currency;
|
|
2635
|
+
return R.getInstance().currency(e, (r = n == null ? void 0 : n.options) == null ? i : r, n == null ? void 0 : n.numberOnly);
|
|
2636
2636
|
}
|
|
2637
2637
|
formatDate(e, t) {
|
|
2638
|
-
return
|
|
2638
|
+
return R.getInstance().date(e, t == null ? void 0 : t.type, t == null ? void 0 : t.options, t == null ? void 0 : t.hour24);
|
|
2639
2639
|
}
|
|
2640
2640
|
formatName(e, t) {
|
|
2641
2641
|
var n, r, i;
|
|
2642
|
-
let a =
|
|
2643
|
-
return a && o ?
|
|
2642
|
+
let a = V(e, (n = t == null ? void 0 : t.lastPropName) == null ? "lastName" : n), o = V(e, (r = t == null ? void 0 : t.firstPropName) == null ? "firstName" : r), s = V(e, (i = t == null ? void 0 : t.surname) == null ? "surname" : i);
|
|
2643
|
+
return a && o ? R.getInstance().fullName(a, o, s, t == null ? void 0 : t.short) : "";
|
|
2644
2644
|
}
|
|
2645
2645
|
formatNumber(e, t) {
|
|
2646
|
-
return
|
|
2646
|
+
return R.getInstance().number(e, t == null ? void 0 : t.options);
|
|
2647
2647
|
}
|
|
2648
2648
|
formatPlural(e, t) {
|
|
2649
|
-
return t && t.words ?
|
|
2649
|
+
return t && t.words ? R.getInstance().plural(e, t == null ? void 0 : t.words, t == null ? void 0 : t.options, t == null ? void 0 : t.optionsNumber) : e;
|
|
2650
2650
|
}
|
|
2651
2651
|
formatUnit(e, t) {
|
|
2652
|
-
return t && t.unit ?
|
|
2652
|
+
return t && t.unit ? R.getInstance().unit(e, t.unit) : e;
|
|
2653
2653
|
}
|
|
2654
|
-
},
|
|
2655
|
-
constructor(e =
|
|
2656
|
-
|
|
2654
|
+
}, st = "f", ct = class e {
|
|
2655
|
+
constructor(e = k.getLocation()) {
|
|
2656
|
+
w(this, "code", void 0), this.code = e;
|
|
2657
2657
|
}
|
|
2658
2658
|
get(t = this.getCode()) {
|
|
2659
|
-
let n =
|
|
2659
|
+
let n = k.find(t);
|
|
2660
2660
|
if (n) {
|
|
2661
2661
|
var r;
|
|
2662
2662
|
let t = this.getCountry(n);
|
|
@@ -2672,7 +2672,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2672
2672
|
}
|
|
2673
2673
|
}
|
|
2674
2674
|
getCode() {
|
|
2675
|
-
return this.code ||
|
|
2675
|
+
return this.code || k.getLocation();
|
|
2676
2676
|
}
|
|
2677
2677
|
getFlag(e = this.getCode()) {
|
|
2678
2678
|
var t;
|
|
@@ -2680,7 +2680,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2680
2680
|
}
|
|
2681
2681
|
getList(e, t = !0) {
|
|
2682
2682
|
let n = r(this.getCodes(e), (e) => this.get(e));
|
|
2683
|
-
return t ? new
|
|
2683
|
+
return t ? new R().sort(n, (e, t) => [e.label, t.label]) : n;
|
|
2684
2684
|
}
|
|
2685
2685
|
getNational(t, n = !0) {
|
|
2686
2686
|
let i = r(this.getList(t, !1), (t) => {
|
|
@@ -2692,13 +2692,13 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2692
2692
|
nationalCountry: n == null ? void 0 : n.country
|
|
2693
2693
|
};
|
|
2694
2694
|
});
|
|
2695
|
-
return n ? new
|
|
2695
|
+
return n ? new R().sort(i, (e, t) => [e.label, t.label]) : i;
|
|
2696
2696
|
}
|
|
2697
2697
|
setCode(e) {
|
|
2698
2698
|
return this.code = e, this;
|
|
2699
2699
|
}
|
|
2700
2700
|
getLocation() {
|
|
2701
|
-
return new
|
|
2701
|
+
return new R(this.code);
|
|
2702
2702
|
}
|
|
2703
2703
|
getCodes(t) {
|
|
2704
2704
|
return t == null ? Object.keys(e.flags) : t;
|
|
@@ -2710,7 +2710,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2710
2710
|
return this.getLocation().countryName(e.country);
|
|
2711
2711
|
}
|
|
2712
2712
|
};
|
|
2713
|
-
|
|
2713
|
+
w(ct, "flags", {
|
|
2714
2714
|
AD: "f-ad",
|
|
2715
2715
|
AE: "f-ae",
|
|
2716
2716
|
AF: "f-af",
|
|
@@ -2955,7 +2955,7 @@ T(st, "flags", {
|
|
|
2955
2955
|
});
|
|
2956
2956
|
//#endregion
|
|
2957
2957
|
//#region src/classes/GeoPhone.ts
|
|
2958
|
-
var
|
|
2958
|
+
var lt = class {
|
|
2959
2959
|
static get(e) {
|
|
2960
2960
|
return this.getList().find((t) => e === t.value);
|
|
2961
2961
|
}
|
|
@@ -3011,11 +3011,11 @@ var ct = class {
|
|
|
3011
3011
|
return (t = (n = e.match(/\*/g)) == null ? void 0 : n.length) == null ? 0 : t;
|
|
3012
3012
|
}
|
|
3013
3013
|
static makeList() {
|
|
3014
|
-
let e = r(
|
|
3014
|
+
let e = r(k.getList(), (e) => {
|
|
3015
3015
|
if (e != null && e.phoneMask) return {
|
|
3016
3016
|
phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/g, "")) || void 0,
|
|
3017
3017
|
within: (e == null ? void 0 : e.phoneWithin) || 0,
|
|
3018
|
-
mask:
|
|
3018
|
+
mask: j(e.phoneMask),
|
|
3019
3019
|
value: e.country
|
|
3020
3020
|
};
|
|
3021
3021
|
});
|
|
@@ -3054,12 +3054,12 @@ var ct = class {
|
|
|
3054
3054
|
return e.replace(/\*/, this.getWithinSymbol(t));
|
|
3055
3055
|
}
|
|
3056
3056
|
};
|
|
3057
|
-
|
|
3057
|
+
w(lt, "list", void 0), w(lt, "map", void 0);
|
|
3058
3058
|
//#endregion
|
|
3059
3059
|
//#region src/classes/Global.ts
|
|
3060
|
-
var
|
|
3060
|
+
var ut = class {
|
|
3061
3061
|
static getItem() {
|
|
3062
|
-
return
|
|
3062
|
+
return E.get("__ui:global-instance__", () => ({}));
|
|
3063
3063
|
}
|
|
3064
3064
|
static get(e) {
|
|
3065
3065
|
var t;
|
|
@@ -3069,9 +3069,9 @@ var lt = class {
|
|
|
3069
3069
|
let t = this.getItem();
|
|
3070
3070
|
Object.keys(t).length > 0 || Object.assign(t, e);
|
|
3071
3071
|
}
|
|
3072
|
-
},
|
|
3072
|
+
}, dt = class {
|
|
3073
3073
|
constructor() {
|
|
3074
|
-
|
|
3074
|
+
w(this, "hash", void 0), w(this, "watch", {}), w(this, "block", !1), w(this, "time", void 0);
|
|
3075
3075
|
}
|
|
3076
3076
|
get(e, t) {
|
|
3077
3077
|
let n = this.getHash();
|
|
@@ -3079,7 +3079,7 @@ var lt = class {
|
|
|
3079
3079
|
}
|
|
3080
3080
|
set(e, t) {
|
|
3081
3081
|
var n;
|
|
3082
|
-
let r =
|
|
3082
|
+
let r = m(t);
|
|
3083
3083
|
return r !== ((n = this.hash) == null ? void 0 : n[e]) && (this.getHash()[e] = r, this.update()), this;
|
|
3084
3084
|
}
|
|
3085
3085
|
addWatch(e, t) {
|
|
@@ -3101,7 +3101,7 @@ var lt = class {
|
|
|
3101
3101
|
let e = {};
|
|
3102
3102
|
if (s()) {
|
|
3103
3103
|
let t = location.hash.matchAll(/([\w-]+)[:=]([^;]+)/gi);
|
|
3104
|
-
for (let n of t) e[n[1]] =
|
|
3104
|
+
for (let n of t) e[n[1]] = fe(n[2]);
|
|
3105
3105
|
}
|
|
3106
3106
|
return e;
|
|
3107
3107
|
}
|
|
@@ -3135,9 +3135,9 @@ var lt = class {
|
|
|
3135
3135
|
((r = this.hash) == null ? void 0 : r[n]) !== (e == null ? void 0 : e[n]) && t.forEach((t) => t(e[n]));
|
|
3136
3136
|
}), this;
|
|
3137
3137
|
}
|
|
3138
|
-
},
|
|
3138
|
+
}, ft = class {
|
|
3139
3139
|
static getItem() {
|
|
3140
|
-
return
|
|
3140
|
+
return E.get("__ui:hash-instance__", () => new dt());
|
|
3141
3141
|
}
|
|
3142
3142
|
static get(e, t) {
|
|
3143
3143
|
return this.getItem().get(e, t);
|
|
@@ -3154,29 +3154,29 @@ var lt = class {
|
|
|
3154
3154
|
static reload() {
|
|
3155
3155
|
this.getItem().reload();
|
|
3156
3156
|
}
|
|
3157
|
-
},
|
|
3157
|
+
}, pt = 320, mt = "--LOAD--", ht = class {
|
|
3158
3158
|
static is(e) {
|
|
3159
3159
|
return e in this.icons || this.getName(e) in this.icons;
|
|
3160
3160
|
}
|
|
3161
3161
|
static async get(e, t = "", n = 1e3 * 60 * 3) {
|
|
3162
3162
|
let r = this.getRaw(e, t);
|
|
3163
|
-
return typeof r == "string" ? r ===
|
|
3163
|
+
return typeof r == "string" ? r === mt && n > 0 ? (await this.wait(), this.get(e, t, n - pt)) : r : p(r) ? await r() : await r;
|
|
3164
3164
|
}
|
|
3165
3165
|
static getAsync(e, t = "") {
|
|
3166
3166
|
let n = this.getRaw(e, t);
|
|
3167
|
-
return typeof n == "string" && n !==
|
|
3167
|
+
return typeof n == "string" && n !== mt ? n : "";
|
|
3168
3168
|
}
|
|
3169
3169
|
static getNameList() {
|
|
3170
3170
|
return r(this.icons, (e, t) => t.replace(/^@/, ""));
|
|
3171
3171
|
}
|
|
3172
3172
|
static getUrlGlobal() {
|
|
3173
|
-
return `${
|
|
3173
|
+
return `${I.isLocalhost(), ""}${this.url}`;
|
|
3174
3174
|
}
|
|
3175
3175
|
static add(e, t) {
|
|
3176
3176
|
this.icons[this.getName(e)] = t;
|
|
3177
3177
|
}
|
|
3178
3178
|
static addLoad(e) {
|
|
3179
|
-
this.icons[this.getName(e)] =
|
|
3179
|
+
this.icons[this.getName(e)] = mt;
|
|
3180
3180
|
}
|
|
3181
3181
|
static addGlobal(e, t) {
|
|
3182
3182
|
this.icons[this.getName(e)] = `${this.getUrlGlobal()}${t}`;
|
|
@@ -3198,27 +3198,27 @@ var lt = class {
|
|
|
3198
3198
|
return (n = (r = (i = this.icons) == null ? void 0 : i[this.getName(e)]) == null ? (a = this.icons) == null ? void 0 : a[e] : r) == null ? `${e.replace(/^@/, t || this.url)}.svg` : n;
|
|
3199
3199
|
}
|
|
3200
3200
|
static wait() {
|
|
3201
|
-
return new Promise((e) => setTimeout(() => e(),
|
|
3201
|
+
return new Promise((e) => setTimeout(() => e(), pt));
|
|
3202
3202
|
}
|
|
3203
3203
|
};
|
|
3204
|
-
|
|
3204
|
+
w(ht, "icons", {}), w(ht, "url", "/icons/");
|
|
3205
3205
|
//#endregion
|
|
3206
3206
|
//#region src/functions/getElementItem.ts
|
|
3207
|
-
function
|
|
3207
|
+
function gt(e, t, n) {
|
|
3208
3208
|
var r, i;
|
|
3209
|
-
return (r = (i =
|
|
3209
|
+
return (r = (i = A(e)) == null ? void 0 : i[t]) == null ? n : r;
|
|
3210
3210
|
}
|
|
3211
3211
|
//#endregion
|
|
3212
3212
|
//#region src/functions/setElementItem.ts
|
|
3213
|
-
function
|
|
3214
|
-
let a =
|
|
3213
|
+
function _t(e, n, i) {
|
|
3214
|
+
let a = A(e);
|
|
3215
3215
|
if (a) {
|
|
3216
|
-
let e =
|
|
3216
|
+
let e = gt(a, n);
|
|
3217
3217
|
if (t(e) && t(i)) r(i, (t, n) => {
|
|
3218
|
-
e[n] =
|
|
3218
|
+
e[n] = m(t);
|
|
3219
3219
|
});
|
|
3220
3220
|
else {
|
|
3221
|
-
let e =
|
|
3221
|
+
let e = m(i);
|
|
3222
3222
|
!(n in a) && typeof e == "string" ? a.setAttribute(n.toString(), e) : a[n] = e;
|
|
3223
3223
|
}
|
|
3224
3224
|
}
|
|
@@ -3226,33 +3226,33 @@ function gt(e, n, i) {
|
|
|
3226
3226
|
}
|
|
3227
3227
|
//#endregion
|
|
3228
3228
|
//#region src/functions/createElement.ts
|
|
3229
|
-
function
|
|
3229
|
+
function U(e, t = "div", i, a) {
|
|
3230
3230
|
if (!s()) return;
|
|
3231
3231
|
let o = document.createElement(t);
|
|
3232
3232
|
return typeof i == "function" ? i(o) : n(i) && r(i, (e, t) => {
|
|
3233
|
-
|
|
3233
|
+
_t(o, t, e);
|
|
3234
3234
|
}), e == null || e.insertBefore(o, a == null ? null : a), o;
|
|
3235
3235
|
}
|
|
3236
3236
|
//#endregion
|
|
3237
3237
|
//#region src/functions/encodeAttribute.ts
|
|
3238
|
-
var
|
|
3238
|
+
var vt = {
|
|
3239
3239
|
"&": "&",
|
|
3240
3240
|
"<": "<",
|
|
3241
3241
|
">": ">",
|
|
3242
3242
|
"\"": """,
|
|
3243
3243
|
"'": "'"
|
|
3244
3244
|
};
|
|
3245
|
-
function
|
|
3245
|
+
function W(e) {
|
|
3246
3246
|
return String(e).replace(/[&<>"']/g, (e) => {
|
|
3247
3247
|
var t;
|
|
3248
|
-
return (t =
|
|
3248
|
+
return (t = vt == null ? void 0 : vt[e]) == null ? e : t;
|
|
3249
3249
|
});
|
|
3250
3250
|
}
|
|
3251
3251
|
//#endregion
|
|
3252
3252
|
//#region src/classes/MetaManager.ts
|
|
3253
|
-
var
|
|
3253
|
+
var G = class {
|
|
3254
3254
|
constructor(e, t = !1) {
|
|
3255
|
-
|
|
3255
|
+
w(this, "listMeta", void 0), w(this, "isProperty", void 0), w(this, "items", {}), this.listMeta = e, this.isProperty = t, this.update();
|
|
3256
3256
|
}
|
|
3257
3257
|
getListMeta() {
|
|
3258
3258
|
return this.listMeta;
|
|
@@ -3292,17 +3292,17 @@ var K = class {
|
|
|
3292
3292
|
let r = this.findMetaElement(e);
|
|
3293
3293
|
if (r) return r.content = n, this;
|
|
3294
3294
|
let i = { content: n };
|
|
3295
|
-
return this.isProperty ? i.property = e : i.name = e,
|
|
3295
|
+
return this.isProperty ? i.property = e : i.name = e, U(document.head, "meta", i), this;
|
|
3296
3296
|
}
|
|
3297
3297
|
toHtmlString(e) {
|
|
3298
3298
|
var t;
|
|
3299
3299
|
let n = (t = this.items[e]) == null ? "" : t;
|
|
3300
3300
|
if (e === "title") return "";
|
|
3301
|
-
let r =
|
|
3301
|
+
let r = W(n);
|
|
3302
3302
|
return r ? `<meta ${this.getAttributeName()}="${e}" content="${r}">` : "";
|
|
3303
3303
|
}
|
|
3304
3304
|
toHtmlTitle(e) {
|
|
3305
|
-
return
|
|
3305
|
+
return me(e);
|
|
3306
3306
|
}
|
|
3307
3307
|
update() {
|
|
3308
3308
|
return this.listMeta.forEach((e) => {
|
|
@@ -3310,121 +3310,121 @@ var K = class {
|
|
|
3310
3310
|
this.items[e] = (t = (n = this.findMetaElement(e)) == null ? void 0 : n.content) == null ? "" : t;
|
|
3311
3311
|
}), this;
|
|
3312
3312
|
}
|
|
3313
|
-
},
|
|
3313
|
+
}, K = /* @__PURE__ */ function(e) {
|
|
3314
3314
|
return e.title = "title", e.description = "description", e.keywords = "keywords", e.canonical = "canonical", e.robots = "robots", e.author = "author", e;
|
|
3315
|
-
}({}),
|
|
3315
|
+
}({}), yt = /* @__PURE__ */ function(e) {
|
|
3316
3316
|
return e.indexFollow = "index, follow", e.noIndexFollow = "noindex, follow", e.indexNoFollow = "index, nofollow", e.noIndexNoFollow = "noindex, nofollow", e.noArchive = "noarchive", e.noSnippet = "nosnippet", e.noImageIndex = "noimageindex", e.images = "images", e.noTranslate = "notranslate", e.noPreview = "nopreview", e.textOnly = "textonly", e.noIndexSubpages = "noindex, noarchive", e.none = "none", e;
|
|
3317
|
-
}({}),
|
|
3317
|
+
}({}), q = /* @__PURE__ */ function(e) {
|
|
3318
3318
|
return e.title = "og:title", e.type = "og:type", e.url = "og:url", e.image = "og:image", e.description = "og:description", e.locale = "og:locale", e.siteName = "og:site_name", e.localeAlternate = "og:locale:alternate", e.imageUrl = "og:image:url", e.imageSecureUrl = "og:image:secure_url", e.imageType = "og:image:type", e.imageWidth = "og:image:width", e.imageHeight = "og:image:height", e.imageAlt = "og:image:alt", e.video = "og:video", e.videoUrl = "og:video:url", e.videoSecureUrl = "og:video:secure_url", e.videoType = "og:video:type", e.videoWidth = "og:video:width", e.videoHeight = "og:video:height", e.audio = "og:audio", e.audioSecureUrl = "og:audio:secure_url", e.audioType = "og:audio:type", e.articlePublishedTime = "article:published_time", e.articleModifiedTime = "article:modified_time", e.articleExpirationTime = "article:expiration_time", e.articleAuthor = "article:author", e.articleSection = "article:section", e.articleTag = "article:tag", e.bookAuthor = "book:author", e.bookIsbn = "book:isbn", e.bookReleaseDate = "book:release_date", e.bookTag = "book:tag", e.musicDuration = "music:duration", e.musicAlbum = "music:album", e.musicAlbumDisc = "music:album:disc", e.musicAlbumTrack = "music:album:track", e.musicMusician = "music:musician", e.musicSong = "music:song", e.musicSongDisc = "music:song:disc", e.musicSongTrack = "music:song:track", e.musicReleaseDate = "music:release_date", e.musicCreator = "music:creator", e.videoActor = "video:actor", e.videoActorRole = "video:actor:role", e.videoDirector = "video:director", e.videoWriter = "video:writer", e.videoDuration = "video:duration", e.videoReleaseDate = "video:release_date", e.videoTag = "video:tag", e.videoSeries = "video:series", e.profileFirstName = "profile:first_name", e.profileLastName = "profile:last_name", e.profileUsername = "profile:username", e.profileGender = "profile:gender", e.productBrand = "product:brand", e.productAvailability = "product:availability", e.productCondition = "product:condition", e.productPriceAmount = "product:price:amount", e.productPriceCurrency = "product:price:currency", e.productRetailerItemId = "product:retailer_item_id", e.productCategory = "product:category", e.productEan = "product:ean", e.productIsbn = "product:isbn", e.productMfrPartNo = "product:mfr_part_no", e.productUpc = "product:upc", e.productWeightValue = "product:weight:value", e.productWeightUnits = "product:weight:units", e.productColor = "product:color", e.productMaterial = "product:material", e.productPattern = "product:pattern", e.productAgeGroup = "product:age_group", e.productGender = "product:gender", e;
|
|
3319
|
-
}({}), yt = /* @__PURE__ */ function(e) {
|
|
3320
|
-
return e.website = "website", e.article = "article", e.video = "video.other", e.videoTvShow = "video.tv_show", e.videoEpisode = "video.episode", e.videoMovie = "video.movie", e.musicAlbum = "music.album", e.musicPlaylist = "music.playlist", e.musicSong = "music.song", e.musicRadioStation = "music.radio_station", e.app = "app", e.product = "product", e.business = "business.business", e.place = "place", e.event = "event", e.profile = "profile", e.book = "book", e;
|
|
3321
3319
|
}({}), bt = /* @__PURE__ */ function(e) {
|
|
3322
|
-
return e.
|
|
3320
|
+
return e.website = "website", e.article = "article", e.video = "video.other", e.videoTvShow = "video.tv_show", e.videoEpisode = "video.episode", e.videoMovie = "video.movie", e.musicAlbum = "music.album", e.musicPlaylist = "music.playlist", e.musicSong = "music.song", e.musicRadioStation = "music.radio_station", e.app = "app", e.product = "product", e.business = "business.business", e.place = "place", e.event = "event", e.profile = "profile", e.book = "book", e;
|
|
3323
3321
|
}({}), xt = /* @__PURE__ */ function(e) {
|
|
3324
|
-
return e.
|
|
3322
|
+
return e.inStock = "in stock", e.outOfStock = "out of stock", e.preorder = "preorder", e.backorder = "backorder", e.discontinued = "discontinued", e.pending = "pending", e;
|
|
3325
3323
|
}({}), St = /* @__PURE__ */ function(e) {
|
|
3326
|
-
return e.
|
|
3324
|
+
return e.new = "new", e.used = "used", e.refurbished = "refurbished", e;
|
|
3327
3325
|
}({}), Ct = /* @__PURE__ */ function(e) {
|
|
3326
|
+
return e.newborn = "newborn", e.infant = "infant", e.toddler = "toddler", e.kids = "kids", e.adult = "adult", e;
|
|
3327
|
+
}({}), wt = /* @__PURE__ */ function(e) {
|
|
3328
3328
|
return e.female = "female", e.male = "male", e.unisex = "unisex", e;
|
|
3329
|
-
}({}),
|
|
3329
|
+
}({}), J = /* @__PURE__ */ function(e) {
|
|
3330
3330
|
return e.card = "twitter:card", e.site = "twitter:site", e.creator = "twitter:creator", e.url = "twitter:url", e.title = "twitter:title", e.description = "twitter:description", e.image = "twitter:image", e.imageAlt = "twitter:image:alt", e.imageSrc = "twitter:image:src", e.imageWidth = "twitter:image:width", e.imageHeight = "twitter:image:height", e.label1 = "twitter:label1", e.data1 = "twitter:data1", e.label2 = "twitter:label2", e.data2 = "twitter:data2", e.appNameIphone = "twitter:app:name:iphone", e.appIdIphone = "twitter:app:id:iphone", e.appUrlIphone = "twitter:app:url:iphone", e.appNameIpad = "twitter:app:name:ipad", e.appIdIpad = "twitter:app:id:ipad", e.appUrlIpad = "twitter:app:url:ipad", e.appNameGooglePlay = "twitter:app:name:googleplay", e.appIdGooglePlay = "twitter:app:id:googleplay", e.appUrlGooglePlay = "twitter:app:url:googleplay", e.player = "twitter:player", e.playerWidth = "twitter:player:width", e.playerHeight = "twitter:player:height", e.playerStream = "twitter:player:stream", e.playerStreamContentType = "twitter:player:stream:content_type", e;
|
|
3331
|
-
}({}),
|
|
3331
|
+
}({}), Tt = /* @__PURE__ */ function(e) {
|
|
3332
3332
|
return e.summary = "summary", e.summaryLargeImage = "summary_large_image", e.app = "app", e.player = "player", e.product = "product", e.gallery = "gallery", e.photo = "photo", e.leadGeneration = "lead_generation", e.audio = "audio", e.poll = "poll", e;
|
|
3333
|
-
}({}),
|
|
3333
|
+
}({}), Et = class extends G {
|
|
3334
3334
|
constructor() {
|
|
3335
|
-
super(Object.values(
|
|
3335
|
+
super(Object.values(q), !0);
|
|
3336
3336
|
}
|
|
3337
3337
|
getTitle() {
|
|
3338
|
-
return this.get(
|
|
3338
|
+
return this.get(q.title);
|
|
3339
3339
|
}
|
|
3340
3340
|
getType() {
|
|
3341
|
-
return this.get(
|
|
3341
|
+
return this.get(q.type);
|
|
3342
3342
|
}
|
|
3343
3343
|
getUrl() {
|
|
3344
|
-
return this.get(
|
|
3344
|
+
return this.get(q.url);
|
|
3345
3345
|
}
|
|
3346
3346
|
getImage() {
|
|
3347
|
-
return this.get(
|
|
3347
|
+
return this.get(q.image);
|
|
3348
3348
|
}
|
|
3349
3349
|
getDescription() {
|
|
3350
|
-
return this.get(
|
|
3350
|
+
return this.get(q.description);
|
|
3351
3351
|
}
|
|
3352
3352
|
getLocale() {
|
|
3353
|
-
return this.get(
|
|
3353
|
+
return this.get(q.locale);
|
|
3354
3354
|
}
|
|
3355
3355
|
getSiteName() {
|
|
3356
|
-
return this.get(
|
|
3356
|
+
return this.get(q.siteName);
|
|
3357
3357
|
}
|
|
3358
3358
|
setTitle(e) {
|
|
3359
|
-
return this.set(
|
|
3359
|
+
return this.set(q.title, e);
|
|
3360
3360
|
}
|
|
3361
3361
|
setType(e) {
|
|
3362
|
-
return this.set(
|
|
3362
|
+
return this.set(q.type, e);
|
|
3363
3363
|
}
|
|
3364
3364
|
setUrl(e) {
|
|
3365
|
-
return this.set(
|
|
3365
|
+
return this.set(q.url, e);
|
|
3366
3366
|
}
|
|
3367
3367
|
setImage(e) {
|
|
3368
|
-
return this.set(
|
|
3368
|
+
return this.set(q.image, e);
|
|
3369
3369
|
}
|
|
3370
3370
|
setDescription(e) {
|
|
3371
|
-
return this.set(
|
|
3371
|
+
return this.set(q.description, e);
|
|
3372
3372
|
}
|
|
3373
3373
|
setLocale(e) {
|
|
3374
|
-
return this.set(
|
|
3374
|
+
return this.set(q.locale, e);
|
|
3375
3375
|
}
|
|
3376
3376
|
setSiteName(e) {
|
|
3377
|
-
return this.set(
|
|
3377
|
+
return this.set(q.siteName, e);
|
|
3378
3378
|
}
|
|
3379
|
-
},
|
|
3379
|
+
}, Dt = class extends G {
|
|
3380
3380
|
constructor() {
|
|
3381
|
-
super(Object.values(
|
|
3381
|
+
super(Object.values(J));
|
|
3382
3382
|
}
|
|
3383
3383
|
getCard() {
|
|
3384
|
-
return this.get(
|
|
3384
|
+
return this.get(J.card);
|
|
3385
3385
|
}
|
|
3386
3386
|
getSite() {
|
|
3387
|
-
return this.get(
|
|
3387
|
+
return this.get(J.site);
|
|
3388
3388
|
}
|
|
3389
3389
|
getCreator() {
|
|
3390
|
-
return this.get(
|
|
3390
|
+
return this.get(J.creator);
|
|
3391
3391
|
}
|
|
3392
3392
|
getUrl() {
|
|
3393
|
-
return this.get(
|
|
3393
|
+
return this.get(J.url);
|
|
3394
3394
|
}
|
|
3395
3395
|
getTitle() {
|
|
3396
|
-
return this.get(
|
|
3396
|
+
return this.get(J.title);
|
|
3397
3397
|
}
|
|
3398
3398
|
getDescription() {
|
|
3399
|
-
return this.get(
|
|
3399
|
+
return this.get(J.description);
|
|
3400
3400
|
}
|
|
3401
3401
|
getImage() {
|
|
3402
|
-
return this.get(
|
|
3402
|
+
return this.get(J.image);
|
|
3403
3403
|
}
|
|
3404
3404
|
setCard(e) {
|
|
3405
|
-
return this.set(
|
|
3405
|
+
return this.set(J.card, e), this;
|
|
3406
3406
|
}
|
|
3407
3407
|
setSite(e) {
|
|
3408
|
-
return this.set(
|
|
3408
|
+
return this.set(J.site, e), this;
|
|
3409
3409
|
}
|
|
3410
3410
|
setCreator(e) {
|
|
3411
|
-
return this.set(
|
|
3411
|
+
return this.set(J.creator, e), this;
|
|
3412
3412
|
}
|
|
3413
3413
|
setUrl(e) {
|
|
3414
|
-
return this.set(
|
|
3414
|
+
return this.set(J.url, e), this;
|
|
3415
3415
|
}
|
|
3416
3416
|
setTitle(e) {
|
|
3417
|
-
return this.set(
|
|
3417
|
+
return this.set(J.title, e), this;
|
|
3418
3418
|
}
|
|
3419
3419
|
setDescription(e) {
|
|
3420
|
-
return this.set(
|
|
3420
|
+
return this.set(J.description, e), this;
|
|
3421
3421
|
}
|
|
3422
3422
|
setImage(e) {
|
|
3423
|
-
return this.set(
|
|
3423
|
+
return this.set(J.image, e), this;
|
|
3424
3424
|
}
|
|
3425
|
-
},
|
|
3425
|
+
}, Ot = class extends G {
|
|
3426
3426
|
constructor() {
|
|
3427
|
-
super(Object.values(
|
|
3427
|
+
super(Object.values(K)), w(this, "suffix", void 0), w(this, "og", void 0), w(this, "twitter", void 0), this.og = new Et(), this.twitter = new Dt();
|
|
3428
3428
|
}
|
|
3429
3429
|
getOg() {
|
|
3430
3430
|
return this.og;
|
|
@@ -3433,26 +3433,26 @@ var K = class {
|
|
|
3433
3433
|
return this.twitter;
|
|
3434
3434
|
}
|
|
3435
3435
|
getTitle() {
|
|
3436
|
-
let e = this.get(
|
|
3436
|
+
let e = this.get(K.title);
|
|
3437
3437
|
return !l(e) && s() && (e = document.title), e.replace(this.getSuffix(), "").trim();
|
|
3438
3438
|
}
|
|
3439
3439
|
getKeywords() {
|
|
3440
|
-
return this.get(
|
|
3440
|
+
return this.get(K.keywords);
|
|
3441
3441
|
}
|
|
3442
3442
|
getDescription() {
|
|
3443
|
-
return this.get(
|
|
3443
|
+
return this.get(K.description);
|
|
3444
3444
|
}
|
|
3445
3445
|
getImage() {
|
|
3446
3446
|
return this.og.getImage();
|
|
3447
3447
|
}
|
|
3448
3448
|
getCanonical() {
|
|
3449
|
-
return this.get(
|
|
3449
|
+
return this.get(K.canonical);
|
|
3450
3450
|
}
|
|
3451
3451
|
getRobots() {
|
|
3452
|
-
return this.get(
|
|
3452
|
+
return this.get(K.robots);
|
|
3453
3453
|
}
|
|
3454
3454
|
getAuthor() {
|
|
3455
|
-
return this.get(
|
|
3455
|
+
return this.get(K.author);
|
|
3456
3456
|
}
|
|
3457
3457
|
getSiteName() {
|
|
3458
3458
|
return this.og.getSiteName();
|
|
@@ -3462,25 +3462,25 @@ var K = class {
|
|
|
3462
3462
|
}
|
|
3463
3463
|
setTitle(e) {
|
|
3464
3464
|
let t = l(e) ? `${e}${this.getSuffix()}` : this.suffix ? this.suffix : "";
|
|
3465
|
-
return s() && (document.title = t), this.set(
|
|
3465
|
+
return s() && (document.title = t), this.set(K.title, t), this.og.setTitle(t), this.twitter.setTitle(t), this;
|
|
3466
3466
|
}
|
|
3467
3467
|
setKeywords(e) {
|
|
3468
|
-
return this.set(
|
|
3468
|
+
return this.set(K.keywords, j(e).join(", ")), this;
|
|
3469
3469
|
}
|
|
3470
3470
|
setDescription(e) {
|
|
3471
|
-
return this.set(
|
|
3471
|
+
return this.set(K.description, e), this;
|
|
3472
3472
|
}
|
|
3473
3473
|
setImage(e) {
|
|
3474
3474
|
return this.og.setImage(e), this.twitter.setImage(e), this;
|
|
3475
3475
|
}
|
|
3476
3476
|
setCanonical(e) {
|
|
3477
|
-
return this.set(
|
|
3477
|
+
return this.set(K.canonical, e), this.og.setUrl(e), this.twitter.setUrl(e), this;
|
|
3478
3478
|
}
|
|
3479
3479
|
setRobots(e) {
|
|
3480
|
-
return this.set(
|
|
3480
|
+
return this.set(K.robots, e), this;
|
|
3481
3481
|
}
|
|
3482
3482
|
setAuthor(e) {
|
|
3483
|
-
return this.set(
|
|
3483
|
+
return this.set(K.author, e), this;
|
|
3484
3484
|
}
|
|
3485
3485
|
setSiteName(e) {
|
|
3486
3486
|
return this.og.setSiteName(e), this.twitter.setSite(e), this;
|
|
@@ -3495,14 +3495,14 @@ var K = class {
|
|
|
3495
3495
|
return `${super.html()}${this.og.html()}${this.twitter.html()}`;
|
|
3496
3496
|
}
|
|
3497
3497
|
htmlTitle() {
|
|
3498
|
-
return this.toHtmlTitle(this.get(
|
|
3498
|
+
return this.toHtmlTitle(this.get(K.title));
|
|
3499
3499
|
}
|
|
3500
3500
|
getSuffix() {
|
|
3501
3501
|
return l(this.suffix) ? ` - ${this.suffix}` : "";
|
|
3502
3502
|
}
|
|
3503
|
-
},
|
|
3503
|
+
}, kt = class {
|
|
3504
3504
|
static getItem() {
|
|
3505
|
-
return
|
|
3505
|
+
return E.get("__ui:meta-instance__", () => new Ot());
|
|
3506
3506
|
}
|
|
3507
3507
|
static getOg() {
|
|
3508
3508
|
return this.getItem().getOg();
|
|
@@ -3573,9 +3573,9 @@ var K = class {
|
|
|
3573
3573
|
static htmlTitle() {
|
|
3574
3574
|
return this.getItem().htmlTitle();
|
|
3575
3575
|
}
|
|
3576
|
-
},
|
|
3576
|
+
}, At = class {
|
|
3577
3577
|
constructor(e, t = 320, n = !1) {
|
|
3578
|
-
|
|
3578
|
+
w(this, "callback", void 0), w(this, "delay", void 0), w(this, "timerId", void 0), w(this, "startTime", void 0), w(this, "remaining", void 0), w(this, "completed", !1), this.callback = e, this.delay = t, n || this.resume();
|
|
3579
3579
|
}
|
|
3580
3580
|
resume() {
|
|
3581
3581
|
if (this.timerId || this.completed) return this;
|
|
@@ -3611,7 +3611,7 @@ var K = class {
|
|
|
3611
3611
|
stop() {
|
|
3612
3612
|
return this.timerId && (clearTimeout(this.timerId), this.timerId = void 0), this;
|
|
3613
3613
|
}
|
|
3614
|
-
},
|
|
3614
|
+
}, jt = class {
|
|
3615
3615
|
static async is() {
|
|
3616
3616
|
let e = await this.get();
|
|
3617
3617
|
return e !== -1 && e <= 8;
|
|
@@ -3627,14 +3627,14 @@ var K = class {
|
|
|
3627
3627
|
return t;
|
|
3628
3628
|
}
|
|
3629
3629
|
static getStorage() {
|
|
3630
|
-
return new
|
|
3630
|
+
return new D("__ui:scrollbar__", !0);
|
|
3631
3631
|
}
|
|
3632
3632
|
static getCalculate() {
|
|
3633
3633
|
return this.calculate;
|
|
3634
3634
|
}
|
|
3635
3635
|
static createElement() {
|
|
3636
|
-
return
|
|
3637
|
-
e.style.height = "24px", e.style.overflowY = "scroll", e.style.position = "fixed", e.style.width = "100%",
|
|
3636
|
+
return U(document.body, "div", (e) => {
|
|
3637
|
+
e.style.height = "24px", e.style.overflowY = "scroll", e.style.position = "fixed", e.style.width = "100%", U(e, "div", (e) => {
|
|
3638
3638
|
e.style.height = "100px";
|
|
3639
3639
|
});
|
|
3640
3640
|
});
|
|
@@ -3649,36 +3649,36 @@ var K = class {
|
|
|
3649
3649
|
});
|
|
3650
3650
|
}
|
|
3651
3651
|
};
|
|
3652
|
-
|
|
3652
|
+
w(jt, "calculate", !1);
|
|
3653
3653
|
//#endregion
|
|
3654
3654
|
//#region src/functions/escapeExp.ts
|
|
3655
|
-
function
|
|
3655
|
+
function Y(e) {
|
|
3656
3656
|
return String(e).replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
3657
3657
|
}
|
|
3658
3658
|
//#endregion
|
|
3659
3659
|
//#region src/functions/getSeparatingSearchExp.ts
|
|
3660
|
-
function
|
|
3660
|
+
function Mt(e, t = 128) {
|
|
3661
3661
|
if (e instanceof RegExp) return e;
|
|
3662
3662
|
if (!e || e.trim().length === 0 || e.length > t) return /^/;
|
|
3663
|
-
let n = String(e).replace(/\s+/g, " ").trim().split(" ").map(
|
|
3663
|
+
let n = String(e).replace(/\s+/g, " ").trim().split(" ").map(Y).join("|");
|
|
3664
3664
|
return RegExp(`(${n})`, "ig");
|
|
3665
3665
|
}
|
|
3666
3666
|
//#endregion
|
|
3667
3667
|
//#region src/functions/addTagHighlightMatch.ts
|
|
3668
|
-
var
|
|
3669
|
-
function
|
|
3668
|
+
var Nt = `___HIGHLIGHT_START_${f(1e5, 999999)}___`, Pt = `___HIGHLIGHT_END_${f(1e5, 999999)}___`, Ft = RegExp(`${Nt}|${Pt}`, "g");
|
|
3669
|
+
function It(e, t, n = "sys-highlight-match", r = !1) {
|
|
3670
3670
|
let i = a(e);
|
|
3671
3671
|
if (l(i) && l(t)) {
|
|
3672
|
-
let e = i.replace(
|
|
3673
|
-
return r && (e =
|
|
3672
|
+
let e = i.replace(Mt(t), `${Nt}$1${Pt}`);
|
|
3673
|
+
return r && (e = W(e)), e.replace(Ft, (e) => e === Nt ? `<span class="${n}">` : "</span>");
|
|
3674
3674
|
}
|
|
3675
|
-
return r ?
|
|
3675
|
+
return r ? W(i) : i;
|
|
3676
3676
|
}
|
|
3677
3677
|
//#endregion
|
|
3678
3678
|
//#region src/classes/SearchListData.ts
|
|
3679
|
-
var
|
|
3679
|
+
var Lt = class {
|
|
3680
3680
|
constructor(e, t, n, r) {
|
|
3681
|
-
|
|
3681
|
+
w(this, "list", void 0), w(this, "columns", void 0), w(this, "item", void 0), w(this, "options", void 0), w(this, "listCache", void 0), this.list = e, this.columns = t, this.item = n, this.options = r;
|
|
3682
3682
|
}
|
|
3683
3683
|
is() {
|
|
3684
3684
|
return !!(this.list && this.columns);
|
|
@@ -3715,8 +3715,8 @@ var It = class {
|
|
|
3715
3715
|
toFormatItem(e, t) {
|
|
3716
3716
|
let n = {};
|
|
3717
3717
|
return this.columns && this.columns.forEach((r) => {
|
|
3718
|
-
let i = this.getColumnName(r), a =
|
|
3719
|
-
n[i] = l(a) && t ? this.addTag(a) :
|
|
3718
|
+
let i = this.getColumnName(r), a = V(e, r);
|
|
3719
|
+
n[i] = l(a) && t ? this.addTag(a) : S(a);
|
|
3720
3720
|
}), {
|
|
3721
3721
|
...e,
|
|
3722
3722
|
...n,
|
|
@@ -3727,7 +3727,7 @@ var It = class {
|
|
|
3727
3727
|
return e.replace(/\.([a-z0-9])/gi, (e, t) => t.toUpperCase()) + "Search";
|
|
3728
3728
|
}
|
|
3729
3729
|
addTag(e) {
|
|
3730
|
-
return
|
|
3730
|
+
return It(S(e), this.item.get(), this.options.getClassName());
|
|
3731
3731
|
}
|
|
3732
3732
|
generateCache() {
|
|
3733
3733
|
if (!this.isList()) return [];
|
|
@@ -3735,8 +3735,8 @@ var It = class {
|
|
|
3735
3735
|
for (let t of this.list) {
|
|
3736
3736
|
let n = "";
|
|
3737
3737
|
if (this.columns) for (let e of this.columns) {
|
|
3738
|
-
let r =
|
|
3739
|
-
l(r) && (n += ` ${
|
|
3738
|
+
let r = V(t, e);
|
|
3739
|
+
l(r) && (n += ` ${S(r)}`);
|
|
3740
3740
|
}
|
|
3741
3741
|
e.push({
|
|
3742
3742
|
item: t,
|
|
@@ -3751,9 +3751,9 @@ var It = class {
|
|
|
3751
3751
|
resetCache() {
|
|
3752
3752
|
this.listCache = void 0;
|
|
3753
3753
|
}
|
|
3754
|
-
},
|
|
3754
|
+
}, Rt = class {
|
|
3755
3755
|
constructor(e, t) {
|
|
3756
|
-
|
|
3756
|
+
w(this, "value", void 0), w(this, "options", void 0), this.value = e, this.options = t;
|
|
3757
3757
|
}
|
|
3758
3758
|
is() {
|
|
3759
3759
|
return !!this.value;
|
|
@@ -3771,30 +3771,30 @@ var It = class {
|
|
|
3771
3771
|
};
|
|
3772
3772
|
//#endregion
|
|
3773
3773
|
//#region src/functions/getExp.ts
|
|
3774
|
-
function
|
|
3775
|
-
let r =
|
|
3774
|
+
function zt(e, t = "ig", n = ":value") {
|
|
3775
|
+
let r = Y(e);
|
|
3776
3776
|
return new RegExp(n.replace(/:value/g, r), t);
|
|
3777
3777
|
}
|
|
3778
3778
|
//#endregion
|
|
3779
3779
|
//#region src/functions/getExactSearchExp.ts
|
|
3780
|
-
function
|
|
3781
|
-
return
|
|
3780
|
+
function Bt(e) {
|
|
3781
|
+
return zt(e, "i", "(:value)");
|
|
3782
3782
|
}
|
|
3783
3783
|
//#endregion
|
|
3784
3784
|
//#region src/functions/getSearchExp.ts
|
|
3785
|
-
function
|
|
3785
|
+
function Vt(e, t = 128) {
|
|
3786
3786
|
if (!d(e) || e.trim().length === 0 || e.length > t) return /^/;
|
|
3787
3787
|
let n = [];
|
|
3788
3788
|
return a(e).split(" ").forEach((e) => {
|
|
3789
|
-
let t =
|
|
3789
|
+
let t = Y(e).trim();
|
|
3790
3790
|
l(t) && n.push(`(?=.*?${t})`);
|
|
3791
3791
|
}), RegExp(`^${n.join("")}`, "i");
|
|
3792
3792
|
}
|
|
3793
3793
|
//#endregion
|
|
3794
3794
|
//#region src/classes/SearchListMatcher.ts
|
|
3795
|
-
var
|
|
3795
|
+
var Ht = class {
|
|
3796
3796
|
constructor(e, t) {
|
|
3797
|
-
|
|
3797
|
+
w(this, "item", void 0), w(this, "options", void 0), w(this, "matcher", void 0), this.item = e, this.options = t, this.initMatcher();
|
|
3798
3798
|
}
|
|
3799
3799
|
is() {
|
|
3800
3800
|
return !!this.matcher;
|
|
@@ -3809,11 +3809,11 @@ var Vt = class {
|
|
|
3809
3809
|
this.initMatcher();
|
|
3810
3810
|
}
|
|
3811
3811
|
initMatcher() {
|
|
3812
|
-
this.item.is() ? this.matcher = this.options.getFindExactMatch() ?
|
|
3812
|
+
this.item.is() ? this.matcher = this.options.getFindExactMatch() ? Bt(this.item.get()) : Vt(this.item.get()) : this.matcher = void 0;
|
|
3813
3813
|
}
|
|
3814
|
-
},
|
|
3814
|
+
}, Ut = class {
|
|
3815
3815
|
constructor(e) {
|
|
3816
|
-
|
|
3816
|
+
w(this, "options", void 0), this.options = e;
|
|
3817
3817
|
}
|
|
3818
3818
|
getOptions() {
|
|
3819
3819
|
return this.options || {};
|
|
@@ -3841,12 +3841,12 @@ var Vt = class {
|
|
|
3841
3841
|
setOptions(e) {
|
|
3842
3842
|
return this.options = e, this;
|
|
3843
3843
|
}
|
|
3844
|
-
},
|
|
3844
|
+
}, Wt = class {
|
|
3845
3845
|
constructor(e, t, n, r) {
|
|
3846
|
-
|
|
3846
|
+
w(this, "options", void 0), w(this, "item", void 0), w(this, "matcher", void 0), w(this, "data", void 0), w(this, "callbackToSelection", (e, t) => {
|
|
3847
3847
|
if (this.matcher.isSelection(t)) return this.data.toFormatItem(e, !0);
|
|
3848
3848
|
if (this.options.getReturnEverything()) return this.data.toFormatItem(e, !1);
|
|
3849
|
-
}),
|
|
3849
|
+
}), w(this, "callbackToNone", (e) => this.data.toFormatItem(e, !1)), this.options = new Ut(r), this.item = new Rt(n, this.options), this.matcher = new Ht(this.item, this.options), this.data = new Lt(e, t, this.item, this.options);
|
|
3850
3850
|
}
|
|
3851
3851
|
getData() {
|
|
3852
3852
|
return this.data;
|
|
@@ -3883,13 +3883,13 @@ var Vt = class {
|
|
|
3883
3883
|
let e = this.data.getList();
|
|
3884
3884
|
return e ? r(e, this.callbackToNone) : [];
|
|
3885
3885
|
}
|
|
3886
|
-
},
|
|
3886
|
+
}, Gt = () => E.get("__ui:storage-callback__", () => ({})), Kt = class e {
|
|
3887
3887
|
static getInstance(t, n = "main") {
|
|
3888
3888
|
return new e(t, n);
|
|
3889
3889
|
}
|
|
3890
3890
|
constructor(e, t = "main") {
|
|
3891
|
-
|
|
3892
|
-
let n = `${t}:${e}`, r =
|
|
3891
|
+
w(this, "name", void 0), w(this, "group", void 0), w(this, "callbacks", []), w(this, "loading", !1), this.name = e, this.group = t;
|
|
3892
|
+
let n = `${t}:${e}`, r = Gt();
|
|
3893
3893
|
if (n in r) return r[n];
|
|
3894
3894
|
r[n] = this;
|
|
3895
3895
|
}
|
|
@@ -3916,10 +3916,10 @@ var Vt = class {
|
|
|
3916
3916
|
}
|
|
3917
3917
|
async run(e) {
|
|
3918
3918
|
this.loading = !1;
|
|
3919
|
-
for (let { callback: t, isOnce: n } of this.callbacks) await
|
|
3919
|
+
for (let { callback: t, isOnce: n } of this.callbacks) await Je(t, e), n && this.removeCallback(t);
|
|
3920
3920
|
return this;
|
|
3921
3921
|
}
|
|
3922
|
-
},
|
|
3922
|
+
}, qt = [
|
|
3923
3923
|
"d",
|
|
3924
3924
|
"e",
|
|
3925
3925
|
"f",
|
|
@@ -3939,10 +3939,10 @@ var Vt = class {
|
|
|
3939
3939
|
"t",
|
|
3940
3940
|
"u",
|
|
3941
3941
|
"v"
|
|
3942
|
-
],
|
|
3942
|
+
], Jt = RegExp(`%(${qt.join("|")})`, "g"), Yt = (e, t = {}) => {
|
|
3943
3943
|
let r = String(e);
|
|
3944
|
-
return Array.isArray(t) && e.match(/%[a-z]/) && (r = r.replace(
|
|
3945
|
-
let r =
|
|
3944
|
+
return Array.isArray(t) && e.match(/%[a-z]/) && (r = r.replace(Jt, (e, n) => {
|
|
3945
|
+
let r = qt.indexOf(n);
|
|
3946
3946
|
if (r !== -1) {
|
|
3947
3947
|
var i;
|
|
3948
3948
|
return String((i = t == null ? void 0 : t[r]) == null ? "" : i);
|
|
@@ -3961,21 +3961,21 @@ var Vt = class {
|
|
|
3961
3961
|
}
|
|
3962
3962
|
return e;
|
|
3963
3963
|
})), r;
|
|
3964
|
-
},
|
|
3964
|
+
}, Xt = (e) => {
|
|
3965
3965
|
var t;
|
|
3966
|
-
return i(e) ? !0 : !!(e && n(e) && ((e == null ? void 0 : e.status) === "success" || e != null && e.success || !(e == null || (t = e.statusObject) == null) && t.status && /^2/.test(String(e.statusObject.status)) || !("status" in e) && !("success" in e) && !("statusObject" in e) && /^2/.test(String(
|
|
3967
|
-
},
|
|
3968
|
-
constructor(e, t = () =>
|
|
3969
|
-
|
|
3966
|
+
return i(e) ? !0 : !!(e && n(e) && ((e == null ? void 0 : e.status) === "success" || e != null && e.success || !(e == null || (t = e.statusObject) == null) && t.status && /^2/.test(String(e.statusObject.status)) || !("status" in e) && !("success" in e) && !("statusObject" in e) && /^2/.test(String(I.getStatus().getStatus()))));
|
|
3967
|
+
}, Zt = "global", Qt = 160, $t = class {
|
|
3968
|
+
constructor(e, t = () => k.getLanguage(), n = () => k.getLocation()) {
|
|
3969
|
+
w(this, "language", void 0), w(this, "location", void 0), w(this, "files", {}), w(this, "data", {}), this.language = t, this.location = n, e && this.add(e);
|
|
3970
3970
|
}
|
|
3971
3971
|
isFile() {
|
|
3972
3972
|
return Object.keys(this.files).length > 0 && this.getIndex() !== void 0;
|
|
3973
3973
|
}
|
|
3974
3974
|
getLocation() {
|
|
3975
|
-
return
|
|
3975
|
+
return m(this.location);
|
|
3976
3976
|
}
|
|
3977
3977
|
getLanguage() {
|
|
3978
|
-
return
|
|
3978
|
+
return m(this.language);
|
|
3979
3979
|
}
|
|
3980
3980
|
async getList() {
|
|
3981
3981
|
let e = this.getIndex();
|
|
@@ -3986,7 +3986,7 @@ var Vt = class {
|
|
|
3986
3986
|
}
|
|
3987
3987
|
add(e) {
|
|
3988
3988
|
r(e, (e, t) => {
|
|
3989
|
-
|
|
3989
|
+
p(e) && (this.files[t] = e);
|
|
3990
3990
|
});
|
|
3991
3991
|
}
|
|
3992
3992
|
getIndex() {
|
|
@@ -3994,25 +3994,25 @@ var Vt = class {
|
|
|
3994
3994
|
if (e in this.files) return e;
|
|
3995
3995
|
let t = this.getLanguage();
|
|
3996
3996
|
if (t in this.files) return t;
|
|
3997
|
-
if ("global" in this.files) return
|
|
3997
|
+
if ("global" in this.files) return Zt;
|
|
3998
3998
|
}
|
|
3999
3999
|
getByData(e) {
|
|
4000
4000
|
if (e in this.data) return this.data[e];
|
|
4001
4001
|
}
|
|
4002
4002
|
async getByFile(e) {
|
|
4003
4003
|
if (e in this.files) {
|
|
4004
|
-
let t = await
|
|
4004
|
+
let t = await m(this.files[e]);
|
|
4005
4005
|
return t && (this.data[e] = t), t;
|
|
4006
4006
|
}
|
|
4007
4007
|
}
|
|
4008
|
-
},
|
|
4009
|
-
constructor(e = "/api/translate", t = "list", n = new
|
|
4010
|
-
|
|
4008
|
+
}, en = class {
|
|
4009
|
+
constructor(e = "/api/translate", t = "list", n = new $t()) {
|
|
4010
|
+
w(this, "url", void 0), w(this, "propsName", void 0), w(this, "files", void 0), w(this, "data", {}), w(this, "cache", []), w(this, "resolveList", []), w(this, "timeout", void 0), w(this, "isReadApi", !0), this.url = e, this.propsName = t, this.files = n;
|
|
4011
4011
|
}
|
|
4012
4012
|
async get(e, t) {
|
|
4013
4013
|
var n;
|
|
4014
4014
|
let r = this.getText(e);
|
|
4015
|
-
return r ? this.replacement(r, t) : (
|
|
4015
|
+
return r ? this.replacement(r, t) : (I.isLocalhost() || await this.add(e), this.replacement((n = this.getText(e)) == null ? e : n));
|
|
4016
4016
|
}
|
|
4017
4017
|
getSync(e, t = !1, n) {
|
|
4018
4018
|
let r = this.getText(e);
|
|
@@ -4053,7 +4053,7 @@ var Vt = class {
|
|
|
4053
4053
|
});
|
|
4054
4054
|
}
|
|
4055
4055
|
async addNormalOrSync(e) {
|
|
4056
|
-
if (l(e)) if (
|
|
4056
|
+
if (l(e)) if (I.isLocalhost()) this.addSync(e);
|
|
4057
4057
|
else {
|
|
4058
4058
|
let t = Object.keys(e);
|
|
4059
4059
|
t.length > 0 && await this.add(t);
|
|
@@ -4095,16 +4095,16 @@ var Vt = class {
|
|
|
4095
4095
|
return `${this.files.getLanguage()}-${e}`;
|
|
4096
4096
|
}
|
|
4097
4097
|
getNameByGlobal(e) {
|
|
4098
|
-
return `${
|
|
4098
|
+
return `${Zt}-${e}`;
|
|
4099
4099
|
}
|
|
4100
4100
|
getNamesNone(e) {
|
|
4101
4101
|
let t = [];
|
|
4102
|
-
return
|
|
4102
|
+
return j(e).forEach((e) => {
|
|
4103
4103
|
e !== "__TRANSLATE_START__" && e !== "__TRANSLATE_END__" && !this.hasName(e) && t.push(e);
|
|
4104
4104
|
}), t;
|
|
4105
4105
|
}
|
|
4106
4106
|
async getResponse() {
|
|
4107
|
-
let e = await
|
|
4107
|
+
let e = await I.get({
|
|
4108
4108
|
api: !1,
|
|
4109
4109
|
path: this.url,
|
|
4110
4110
|
request: { [this.propsName]: this.cache },
|
|
@@ -4112,14 +4112,14 @@ var Vt = class {
|
|
|
4112
4112
|
timeout: 12e3,
|
|
4113
4113
|
global: !0
|
|
4114
4114
|
});
|
|
4115
|
-
return
|
|
4115
|
+
return Xt(e) || T.on({
|
|
4116
4116
|
group: "translate",
|
|
4117
4117
|
code: "error",
|
|
4118
4118
|
details: e
|
|
4119
4119
|
}), e == null ? {} : e;
|
|
4120
4120
|
}
|
|
4121
4121
|
replacement(e, t) {
|
|
4122
|
-
return t ?
|
|
4122
|
+
return t ? Yt(e, t) : e;
|
|
4123
4123
|
}
|
|
4124
4124
|
async make() {
|
|
4125
4125
|
let e;
|
|
@@ -4131,12 +4131,12 @@ var Vt = class {
|
|
|
4131
4131
|
this.data[this.getName(t)] = (n = e == null ? void 0 : e[t]) == null ? "" : n;
|
|
4132
4132
|
}), this.cache = [];
|
|
4133
4133
|
}
|
|
4134
|
-
},
|
|
4134
|
+
}, tn = class {
|
|
4135
4135
|
static async get(e, t) {
|
|
4136
4136
|
return this.getItem().get(e, t);
|
|
4137
4137
|
}
|
|
4138
4138
|
static getItem() {
|
|
4139
|
-
return this.item || (this.item = new
|
|
4139
|
+
return this.item || (this.item = new en()), this.item;
|
|
4140
4140
|
}
|
|
4141
4141
|
static getSync(e, t = !1, n) {
|
|
4142
4142
|
return this.getItem().getSync(e, t, n);
|
|
@@ -4175,18 +4175,73 @@ var Vt = class {
|
|
|
4175
4175
|
e.url && this.getItem().setUrl(e.url), e.propsName && this.getItem().setPropsName(e.propsName), typeof e.readApi == "boolean" && this.getItem().setReadApi(e.readApi);
|
|
4176
4176
|
}
|
|
4177
4177
|
};
|
|
4178
|
-
|
|
4178
|
+
w(tn, "item", void 0);
|
|
4179
|
+
//#endregion
|
|
4180
|
+
//#region src/classes/UrlItem.ts
|
|
4181
|
+
var nn = class e {
|
|
4182
|
+
static getInstance() {
|
|
4183
|
+
return E.get("__ui:url-item__", () => new e());
|
|
4184
|
+
}
|
|
4185
|
+
constructor(e) {
|
|
4186
|
+
w(this, "url", void 0), this.set(e);
|
|
4187
|
+
}
|
|
4188
|
+
get href() {
|
|
4189
|
+
return this.url.href;
|
|
4190
|
+
}
|
|
4191
|
+
get protocol() {
|
|
4192
|
+
return this.url.protocol;
|
|
4193
|
+
}
|
|
4194
|
+
get username() {
|
|
4195
|
+
return this.url.username;
|
|
4196
|
+
}
|
|
4197
|
+
get password() {
|
|
4198
|
+
return this.url.password;
|
|
4199
|
+
}
|
|
4200
|
+
get host() {
|
|
4201
|
+
return this.url.host;
|
|
4202
|
+
}
|
|
4203
|
+
get hostname() {
|
|
4204
|
+
return this.url.hostname;
|
|
4205
|
+
}
|
|
4206
|
+
get port() {
|
|
4207
|
+
return this.url.port;
|
|
4208
|
+
}
|
|
4209
|
+
get pathname() {
|
|
4210
|
+
return this.url.pathname;
|
|
4211
|
+
}
|
|
4212
|
+
get search() {
|
|
4213
|
+
return this.url.search;
|
|
4214
|
+
}
|
|
4215
|
+
get searchParams() {
|
|
4216
|
+
return this.url.searchParams;
|
|
4217
|
+
}
|
|
4218
|
+
get hash() {
|
|
4219
|
+
return this.url.hash;
|
|
4220
|
+
}
|
|
4221
|
+
get origin() {
|
|
4222
|
+
return this.url.origin;
|
|
4223
|
+
}
|
|
4224
|
+
set(e) {
|
|
4225
|
+
return e ? e instanceof URL ? this.url = new URL(e.href) : /^[a-z0-9+.-]+:/i.test(e) ? this.url = new URL(e) : s() ? this.url = new URL(e, window.location.origin) : this.url = new URL(e, "http://localhost") : s() ? this.url = new URL(window.location.href) : this.url = new URL("http://localhost"), this;
|
|
4226
|
+
}
|
|
4227
|
+
toString() {
|
|
4228
|
+
return this.url.toString();
|
|
4229
|
+
}
|
|
4230
|
+
toJSON() {
|
|
4231
|
+
return this.url.toJSON();
|
|
4232
|
+
}
|
|
4233
|
+
};
|
|
4179
4234
|
//#endregion
|
|
4180
4235
|
//#region src/functions/arrFill.ts
|
|
4181
|
-
function
|
|
4236
|
+
function rn(e, t) {
|
|
4182
4237
|
return Array(t).fill(e);
|
|
4183
4238
|
}
|
|
4184
4239
|
//#endregion
|
|
4185
4240
|
//#region src/functions/blobToBase64.ts
|
|
4186
|
-
var
|
|
4241
|
+
var an = () => on() !== void 0, on = () => {
|
|
4187
4242
|
var e;
|
|
4188
4243
|
return (e = globalThis) == null ? void 0 : e.Buffer;
|
|
4189
|
-
},
|
|
4244
|
+
}, sn = async (e) => new Promise((t, n) => {
|
|
4190
4245
|
if (typeof FileReader < "u") {
|
|
4191
4246
|
let r = new FileReader();
|
|
4192
4247
|
r.onloadend = () => {
|
|
@@ -4197,33 +4252,33 @@ var nn = () => rn() !== void 0, rn = () => {
|
|
|
4197
4252
|
t(r.result.replace(/^data:.*?,/, ""));
|
|
4198
4253
|
}, r.onerror = n, r.readAsDataURL(e);
|
|
4199
4254
|
} else n();
|
|
4200
|
-
}),
|
|
4255
|
+
}), cn = (e) => {
|
|
4201
4256
|
var t;
|
|
4202
4257
|
return ((t = globalThis) == null ? void 0 : t.Buffer).from(e).toString("base64");
|
|
4203
4258
|
};
|
|
4204
|
-
async function
|
|
4205
|
-
let n = s() ? await
|
|
4259
|
+
async function ln(e, t = !1) {
|
|
4260
|
+
let n = s() ? await sn(e) : an() ? cn(await e.arrayBuffer()) : void 0;
|
|
4206
4261
|
if (n) return t ? n : `data:${e.type};base64,${n}`;
|
|
4207
4262
|
}
|
|
4208
4263
|
//#endregion
|
|
4209
4264
|
//#region src/functions/capitalize.ts
|
|
4210
|
-
function
|
|
4265
|
+
function un(e, t = !1) {
|
|
4211
4266
|
let n = String(e);
|
|
4212
|
-
return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(
|
|
4267
|
+
return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(k.getLocation()) + n.slice(1) : n.charAt(0).toUpperCase() + n.slice(1) : n;
|
|
4213
4268
|
}
|
|
4214
4269
|
//#endregion
|
|
4215
4270
|
//#region src/functions/copyObject.ts
|
|
4216
|
-
function
|
|
4271
|
+
function X(e) {
|
|
4217
4272
|
return JSON.parse(JSON.stringify(e));
|
|
4218
4273
|
}
|
|
4219
4274
|
//#endregion
|
|
4220
4275
|
//#region src/functions/copyObjectLite.ts
|
|
4221
|
-
function
|
|
4276
|
+
function dn(e, t) {
|
|
4222
4277
|
return Object.assign({}, e, t);
|
|
4223
4278
|
}
|
|
4224
4279
|
//#endregion
|
|
4225
4280
|
//#region src/functions/domQuerySelector.ts
|
|
4226
|
-
function
|
|
4281
|
+
function fn(e) {
|
|
4227
4282
|
if (s()) {
|
|
4228
4283
|
var t;
|
|
4229
4284
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -4231,67 +4286,67 @@ function un(e) {
|
|
|
4231
4286
|
}
|
|
4232
4287
|
//#endregion
|
|
4233
4288
|
//#region src/functions/domQuerySelectorAll.ts
|
|
4234
|
-
function
|
|
4289
|
+
function pn(e) {
|
|
4235
4290
|
if (s()) return document.querySelectorAll(e);
|
|
4236
4291
|
}
|
|
4237
4292
|
//#endregion
|
|
4238
4293
|
//#region src/functions/getElementImage.ts
|
|
4239
|
-
function
|
|
4240
|
-
return d(e) ?
|
|
4294
|
+
function Z(e) {
|
|
4295
|
+
return d(e) ? U(void 0, "img", { src: e }) : e;
|
|
4241
4296
|
}
|
|
4242
4297
|
//#endregion
|
|
4243
4298
|
//#region src/functions/resizeImageByMax.ts
|
|
4244
|
-
function
|
|
4299
|
+
function mn(e, t = "auto") {
|
|
4245
4300
|
switch (t) {
|
|
4246
4301
|
case "auto": return e.naturalWidth >= e.naturalHeight;
|
|
4247
4302
|
case "width": return !0;
|
|
4248
4303
|
case "height": return !1;
|
|
4249
4304
|
}
|
|
4250
4305
|
}
|
|
4251
|
-
function
|
|
4252
|
-
let i =
|
|
4306
|
+
function hn(e, t, n = "auto", r) {
|
|
4307
|
+
let i = Z(e);
|
|
4253
4308
|
if (s() && i && i.naturalWidth && i.naturalHeight && (i.naturalWidth > t && (n === "auto" || n === "width") || i.naturalHeight > t && (n === "auto" || n === "height"))) {
|
|
4254
4309
|
var a;
|
|
4255
|
-
let e =
|
|
4310
|
+
let e = mn(i, n), o = (a = document.createElement("canvas")) == null ? void 0 : a.getContext("2d");
|
|
4256
4311
|
if (o) return o.canvas.width = e ? t : i.naturalWidth / i.naturalHeight * t, o.canvas.height = e ? i.naturalHeight / i.naturalWidth * t : t, o.drawImage(i, 0, 0, o.canvas.width, o.canvas.height), o.canvas.toDataURL(r);
|
|
4257
4312
|
}
|
|
4258
4313
|
}
|
|
4259
4314
|
//#endregion
|
|
4260
4315
|
//#region src/functions/ensureMaxSize.ts
|
|
4261
|
-
async function
|
|
4316
|
+
async function gn(e, t = .56, n = "image/jpeg") {
|
|
4262
4317
|
return new Promise((r) => {
|
|
4263
4318
|
if (!s()) {
|
|
4264
4319
|
r("");
|
|
4265
4320
|
return;
|
|
4266
4321
|
}
|
|
4267
|
-
let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o =
|
|
4322
|
+
let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o = Z(a);
|
|
4268
4323
|
o ? (o.onload = () => {
|
|
4269
|
-
let e =
|
|
4324
|
+
let e = hn(o, t * o.naturalWidth, "width", n);
|
|
4270
4325
|
r(e == null ? "" : e), URL.revokeObjectURL(a);
|
|
4271
4326
|
}, o.onerror = () => {
|
|
4272
4327
|
URL.revokeObjectURL(a), r("");
|
|
4273
|
-
}) :
|
|
4328
|
+
}) : ln(i).then((e) => r(String(e == null ? "" : e)));
|
|
4274
4329
|
});
|
|
4275
4330
|
}
|
|
4276
4331
|
//#endregion
|
|
4277
4332
|
//#region src/functions/eventStopPropagation.ts
|
|
4278
|
-
function
|
|
4333
|
+
function _n(e) {
|
|
4279
4334
|
e.preventDefault(), e.stopPropagation();
|
|
4280
4335
|
}
|
|
4281
4336
|
//#endregion
|
|
4282
4337
|
//#region src/functions/frame.ts
|
|
4283
|
-
function
|
|
4338
|
+
function vn(e, t, n) {
|
|
4284
4339
|
let r = () => {
|
|
4285
|
-
e(), s() && t != null && t() ?
|
|
4340
|
+
e(), s() && t != null && t() ? vn(e, t, n) : n == null || n();
|
|
4286
4341
|
};
|
|
4287
4342
|
s() ? requestAnimationFrame(r) : r();
|
|
4288
4343
|
}
|
|
4289
4344
|
//#endregion
|
|
4290
4345
|
//#region src/functions/getArrayHighlightMatch.ts
|
|
4291
|
-
function
|
|
4346
|
+
function yn(e, t) {
|
|
4292
4347
|
let n = a(e);
|
|
4293
4348
|
if (l(n) && l(t)) {
|
|
4294
|
-
let e = [], r =
|
|
4349
|
+
let e = [], r = Mt(t), i = 0, a;
|
|
4295
4350
|
for (; (a = r.exec(n)) !== null && a.index !== r.lastIndex;) a.index > i && e.push({
|
|
4296
4351
|
text: n.substring(i, a.index),
|
|
4297
4352
|
isMatch: !1
|
|
@@ -4311,8 +4366,8 @@ function vn(e, t) {
|
|
|
4311
4366
|
}
|
|
4312
4367
|
//#endregion
|
|
4313
4368
|
//#region src/functions/getAttributes.ts
|
|
4314
|
-
function
|
|
4315
|
-
let t = {}, n =
|
|
4369
|
+
function bn(e) {
|
|
4370
|
+
let t = {}, n = A(e);
|
|
4316
4371
|
if (n) for (let e of n.attributes) {
|
|
4317
4372
|
var r;
|
|
4318
4373
|
t[e.name] = (r = (e == null ? void 0 : e.value) || (e == null ? void 0 : e.textContent)) == null ? void 0 : r;
|
|
@@ -4321,12 +4376,12 @@ function yn(e) {
|
|
|
4321
4376
|
}
|
|
4322
4377
|
//#endregion
|
|
4323
4378
|
//#region src/functions/getClipboardData.ts
|
|
4324
|
-
async function
|
|
4379
|
+
async function xn(e) {
|
|
4325
4380
|
if (s()) try {
|
|
4326
4381
|
var t, n;
|
|
4327
4382
|
return (t = e == null || (n = e.clipboardData) == null ? void 0 : n.getData("text")) == null ? await navigator.clipboard.readText() || "" : t;
|
|
4328
4383
|
} catch (e) {
|
|
4329
|
-
|
|
4384
|
+
T.on({
|
|
4330
4385
|
group: "clipboard",
|
|
4331
4386
|
code: "error",
|
|
4332
4387
|
details: e
|
|
@@ -4336,35 +4391,35 @@ async function bn(e) {
|
|
|
4336
4391
|
}
|
|
4337
4392
|
//#endregion
|
|
4338
4393
|
//#region src/functions/getCurrentDate.ts
|
|
4339
|
-
function
|
|
4340
|
-
return new
|
|
4394
|
+
function Sn(e = "datetime") {
|
|
4395
|
+
return new it(void 0, e).standard();
|
|
4341
4396
|
}
|
|
4342
4397
|
//#endregion
|
|
4343
4398
|
//#region src/functions/getCurrentTime.ts
|
|
4344
|
-
function
|
|
4399
|
+
function Cn() {
|
|
4345
4400
|
return Date.now();
|
|
4346
4401
|
}
|
|
4347
4402
|
//#endregion
|
|
4348
4403
|
//#region src/functions/getElementId.ts
|
|
4349
|
-
var Q,
|
|
4404
|
+
var Q, wn = () => {
|
|
4350
4405
|
let e = Q == null ? void 0 : Q();
|
|
4351
4406
|
if (e) return String(e);
|
|
4352
|
-
let t =
|
|
4407
|
+
let t = E.get("__ui:getElementId__", () => ({ id: 1e5 }));
|
|
4353
4408
|
return `id-${t.id++}`;
|
|
4354
4409
|
};
|
|
4355
|
-
function
|
|
4410
|
+
function Tn(e, t) {
|
|
4356
4411
|
if (e) {
|
|
4357
|
-
let n =
|
|
4358
|
-
if (n) return l(n.id) || n.setAttribute("id",
|
|
4412
|
+
let n = A(e);
|
|
4413
|
+
if (n) return l(n.id) || n.setAttribute("id", wn()), t ? `#${n.id}${t}`.trim() : n.id;
|
|
4359
4414
|
}
|
|
4360
|
-
return
|
|
4415
|
+
return wn();
|
|
4361
4416
|
}
|
|
4362
|
-
function
|
|
4417
|
+
function En(e) {
|
|
4363
4418
|
Q || (Q = e);
|
|
4364
4419
|
}
|
|
4365
4420
|
//#endregion
|
|
4366
4421
|
//#region src/functions/getFirst.ts
|
|
4367
|
-
function
|
|
4422
|
+
function Dn(e) {
|
|
4368
4423
|
if (i(e)) return e == null ? void 0 : e[0];
|
|
4369
4424
|
if (t(e)) {
|
|
4370
4425
|
var n;
|
|
@@ -4374,18 +4429,18 @@ function En(e) {
|
|
|
4374
4429
|
}
|
|
4375
4430
|
//#endregion
|
|
4376
4431
|
//#region src/functions/getKey.ts
|
|
4377
|
-
function
|
|
4432
|
+
function On(e) {
|
|
4378
4433
|
var t, n, r;
|
|
4379
4434
|
return (t = (n = e == null ? void 0 : e.key) == null ? e == null ? void 0 : e.code : n) == null ? e == null || (r = e.keyCode) == null ? void 0 : r.toString() : t;
|
|
4380
4435
|
}
|
|
4381
4436
|
//#endregion
|
|
4382
4437
|
//#region src/functions/getLength.ts
|
|
4383
|
-
function
|
|
4438
|
+
function kn(e) {
|
|
4384
4439
|
return e == null ? 0 : typeof e == "string" || Array.isArray(e) ? e.length : e instanceof Map || e instanceof Set ? e.size : t(e) ? Object.keys(e).length : 0;
|
|
4385
4440
|
}
|
|
4386
4441
|
//#endregion
|
|
4387
4442
|
//#region src/functions/getLengthOfAllArray.ts
|
|
4388
|
-
function
|
|
4443
|
+
function An(e) {
|
|
4389
4444
|
return r(e, (e) => {
|
|
4390
4445
|
var t;
|
|
4391
4446
|
return (t = e == null ? void 0 : e.length) == null ? 0 : t;
|
|
@@ -4393,41 +4448,41 @@ function kn(e) {
|
|
|
4393
4448
|
}
|
|
4394
4449
|
//#endregion
|
|
4395
4450
|
//#region src/functions/getMaxLengthAllArray.ts
|
|
4396
|
-
function
|
|
4451
|
+
function jn(e) {
|
|
4397
4452
|
if (!l(e)) return 0;
|
|
4398
|
-
let t =
|
|
4453
|
+
let t = An(e);
|
|
4399
4454
|
return t.length > 1e4 ? t.reduce((e, t) => Math.max(e, t)) : Math.max(...t);
|
|
4400
4455
|
}
|
|
4401
4456
|
//#endregion
|
|
4402
4457
|
//#region src/functions/getMinLengthAllArray.ts
|
|
4403
|
-
function
|
|
4458
|
+
function Mn(e) {
|
|
4404
4459
|
if (!l(e)) return 0;
|
|
4405
|
-
let t =
|
|
4460
|
+
let t = An(e);
|
|
4406
4461
|
return t.length > 1e4 ? t.reduce((e, t) => Math.min(e, t)) : Math.min(...t);
|
|
4407
4462
|
}
|
|
4408
4463
|
//#endregion
|
|
4409
4464
|
//#region src/functions/getMouseClientX.ts
|
|
4410
|
-
function
|
|
4465
|
+
function Nn(e) {
|
|
4411
4466
|
var t, n;
|
|
4412
4467
|
return (e == null ? void 0 : e.clientX) || (e == null || (t = e.targetTouches) == null || (t = t[0]) == null ? void 0 : t.clientX) || (e == null || (n = e.touches) == null || (n = n[0]) == null ? void 0 : n.clientX) || 0;
|
|
4413
4468
|
}
|
|
4414
4469
|
//#endregion
|
|
4415
4470
|
//#region src/functions/getMouseClientY.ts
|
|
4416
|
-
function
|
|
4471
|
+
function Pn(e) {
|
|
4417
4472
|
var t, n;
|
|
4418
4473
|
return (e == null ? void 0 : e.clientY) || (e == null || (t = e.targetTouches) == null || (t = t[0]) == null ? void 0 : t.clientY) || (e == null || (n = e.touches) == null || (n = n[0]) == null ? void 0 : n.clientY) || 0;
|
|
4419
4474
|
}
|
|
4420
4475
|
//#endregion
|
|
4421
4476
|
//#region src/functions/getMouseClient.ts
|
|
4422
|
-
function
|
|
4477
|
+
function Fn(e) {
|
|
4423
4478
|
return {
|
|
4424
|
-
x:
|
|
4425
|
-
y:
|
|
4479
|
+
x: Nn(e),
|
|
4480
|
+
y: Pn(e)
|
|
4426
4481
|
};
|
|
4427
4482
|
}
|
|
4428
4483
|
//#endregion
|
|
4429
4484
|
//#region src/functions/getObjectByKeys.ts
|
|
4430
|
-
function
|
|
4485
|
+
function In(e, t) {
|
|
4431
4486
|
let r = {};
|
|
4432
4487
|
return n(e) && t.forEach((t) => {
|
|
4433
4488
|
t in e && e[t] !== void 0 && (r[t] = e[t]);
|
|
@@ -4435,7 +4490,7 @@ function Fn(e, t) {
|
|
|
4435
4490
|
}
|
|
4436
4491
|
//#endregion
|
|
4437
4492
|
//#region src/functions/getObjectNoUndefined.ts
|
|
4438
|
-
function
|
|
4493
|
+
function Ln(e, t = void 0) {
|
|
4439
4494
|
let n = {};
|
|
4440
4495
|
return r(e, (e, r) => {
|
|
4441
4496
|
e !== t && (n[r] = e);
|
|
@@ -4443,42 +4498,42 @@ function In(e, t = void 0) {
|
|
|
4443
4498
|
}
|
|
4444
4499
|
//#endregion
|
|
4445
4500
|
//#region src/functions/getObjectOrNone.ts
|
|
4446
|
-
function
|
|
4501
|
+
function Rn(e) {
|
|
4447
4502
|
return n(e) ? e : {};
|
|
4448
4503
|
}
|
|
4449
4504
|
//#endregion
|
|
4450
4505
|
//#region src/functions/getOnlyText.ts
|
|
4451
|
-
function
|
|
4452
|
-
return
|
|
4506
|
+
function zn(e) {
|
|
4507
|
+
return S(e).replace(/[^\p{L}\p{N}\s]+/gu, "").trim();
|
|
4453
4508
|
}
|
|
4454
4509
|
//#endregion
|
|
4455
4510
|
//#region src/functions/strFill.ts
|
|
4456
|
-
function
|
|
4511
|
+
function Bn(e, t) {
|
|
4457
4512
|
return String(e).repeat(t);
|
|
4458
4513
|
}
|
|
4459
4514
|
//#endregion
|
|
4460
4515
|
//#region src/functions/getRandomText.ts
|
|
4461
|
-
function
|
|
4516
|
+
function Vn(e, t, n = "#", r = 2, i = 12) {
|
|
4462
4517
|
let a = f(e, t), o = [];
|
|
4463
|
-
for (let e = 0; e < a; e++) o.push(
|
|
4518
|
+
for (let e = 0; e < a; e++) o.push(Bn(n, f(r, i)));
|
|
4464
4519
|
return o.join(" ");
|
|
4465
4520
|
}
|
|
4466
4521
|
//#endregion
|
|
4467
4522
|
//#region src/functions/getStepPercent.ts
|
|
4468
|
-
function
|
|
4523
|
+
function Hn(e, t) {
|
|
4469
4524
|
let n = e == null ? 0 : e;
|
|
4470
4525
|
return t > n ? 100 / (t - n) : 0;
|
|
4471
4526
|
}
|
|
4472
4527
|
//#endregion
|
|
4473
4528
|
//#region src/functions/getStepValue.ts
|
|
4474
|
-
function
|
|
4529
|
+
function Un(e, t) {
|
|
4475
4530
|
let n = e == null ? 0 : e;
|
|
4476
4531
|
return t > n ? (t - n) / 100 : 0;
|
|
4477
4532
|
}
|
|
4478
4533
|
//#endregion
|
|
4479
4534
|
//#region src/functions/goScroll.ts
|
|
4480
|
-
var
|
|
4481
|
-
function
|
|
4535
|
+
var Wn = 0;
|
|
4536
|
+
function Gn(e, t, n) {
|
|
4482
4537
|
if (!s()) return;
|
|
4483
4538
|
let r = t == null ? void 0 : t.closest(e);
|
|
4484
4539
|
if (t && r && r.scrollHeight !== r.offsetHeight) {
|
|
@@ -4486,12 +4541,12 @@ function Wn(e, t, n) {
|
|
|
4486
4541
|
if (n) {
|
|
4487
4542
|
let a = n.getBoundingClientRect();
|
|
4488
4543
|
r.scrollTop = t.offsetTop - (a.top - e.top) - (a.height / 2 - i.height / 2), r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = t.offsetTop + t.offsetHeight - r.offsetHeight);
|
|
4489
|
-
} else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top -
|
|
4544
|
+
} else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top - Wn : r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = i.top - e.top + i.height - e.height + Wn);
|
|
4490
4545
|
}
|
|
4491
4546
|
}
|
|
4492
4547
|
//#endregion
|
|
4493
4548
|
//#region src/functions/goScrollSmooth.ts
|
|
4494
|
-
function
|
|
4549
|
+
function Kn(e, t, n = 0) {
|
|
4495
4550
|
if (!s()) return;
|
|
4496
4551
|
let r = (t == null ? void 0 : t.behavior) || "smooth";
|
|
4497
4552
|
if ("scrollIntoView" in e && !n) {
|
|
@@ -4513,7 +4568,7 @@ function Gn(e, t, n = 0) {
|
|
|
4513
4568
|
}
|
|
4514
4569
|
//#endregion
|
|
4515
4570
|
//#region src/functions/goScrollTo.ts
|
|
4516
|
-
function
|
|
4571
|
+
function qn(e, t, n = "smooth") {
|
|
4517
4572
|
if (!s() || !e || !t) return;
|
|
4518
4573
|
let r = e.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
4519
4574
|
e.scrollBy({
|
|
@@ -4524,16 +4579,16 @@ function Kn(e, t, n = "smooth") {
|
|
|
4524
4579
|
}
|
|
4525
4580
|
//#endregion
|
|
4526
4581
|
//#region src/functions/isShare.ts
|
|
4527
|
-
function
|
|
4582
|
+
function Jn() {
|
|
4528
4583
|
return s() && typeof navigator < "u" && !!navigator.share;
|
|
4529
4584
|
}
|
|
4530
4585
|
//#endregion
|
|
4531
4586
|
//#region src/functions/handleShare.ts
|
|
4532
|
-
async function
|
|
4533
|
-
if (
|
|
4587
|
+
async function Yn(e) {
|
|
4588
|
+
if (Jn() && navigator.canShare && navigator.canShare(e)) try {
|
|
4534
4589
|
return await navigator.share(e), !0;
|
|
4535
4590
|
} catch (e) {
|
|
4536
|
-
|
|
4591
|
+
T.on({
|
|
4537
4592
|
group: "share",
|
|
4538
4593
|
code: "error",
|
|
4539
4594
|
details: e
|
|
@@ -4543,20 +4598,20 @@ async function Jn(e) {
|
|
|
4543
4598
|
}
|
|
4544
4599
|
//#endregion
|
|
4545
4600
|
//#region src/functions/inArray.ts
|
|
4546
|
-
function
|
|
4601
|
+
function Xn(e, t) {
|
|
4547
4602
|
return e.includes(t);
|
|
4548
4603
|
}
|
|
4549
4604
|
//#endregion
|
|
4550
4605
|
//#region src/functions/initScrollbarOffset.ts
|
|
4551
|
-
async function
|
|
4606
|
+
async function Zn() {
|
|
4552
4607
|
if (s()) {
|
|
4553
|
-
let e = await
|
|
4608
|
+
let e = await jt.get();
|
|
4554
4609
|
document.body.style.setProperty("--sys-scrollbar-offset", `${e}px`);
|
|
4555
4610
|
}
|
|
4556
4611
|
}
|
|
4557
4612
|
//#endregion
|
|
4558
4613
|
//#region src/functions/intersectKey.ts
|
|
4559
|
-
function
|
|
4614
|
+
function Qn(e, n) {
|
|
4560
4615
|
let i = {};
|
|
4561
4616
|
return t(e) && t(n) && r(e, (e, t) => {
|
|
4562
4617
|
t in n && (i[t] = e);
|
|
@@ -4564,7 +4619,7 @@ function Zn(e, n) {
|
|
|
4564
4619
|
}
|
|
4565
4620
|
//#endregion
|
|
4566
4621
|
//#region src/functions/isDifferent.ts
|
|
4567
|
-
function
|
|
4622
|
+
function $n(e, t) {
|
|
4568
4623
|
let n = Object.keys(e).length !== Object.keys(t).length;
|
|
4569
4624
|
return n || r(e, (e, r) => {
|
|
4570
4625
|
e !== (t == null ? void 0 : t[r]) && (n = !0);
|
|
@@ -4572,25 +4627,25 @@ function Qn(e, t) {
|
|
|
4572
4627
|
}
|
|
4573
4628
|
//#endregion
|
|
4574
4629
|
//#region src/functions/isElementVisible.ts
|
|
4575
|
-
function
|
|
4630
|
+
function er(e) {
|
|
4576
4631
|
if (!s()) return !1;
|
|
4577
|
-
let t =
|
|
4632
|
+
let t = A(e);
|
|
4578
4633
|
if (!t || "isConnected" in t && t.isConnected === !1) return !1;
|
|
4579
4634
|
let n = window.getComputedStyle(t);
|
|
4580
4635
|
return n.display !== "none" && n.visibility !== "hidden" && n.opacity !== "0" && t.offsetWidth !== 0 && t.offsetHeight !== 0;
|
|
4581
4636
|
}
|
|
4582
4637
|
//#endregion
|
|
4583
4638
|
//#region src/functions/isInput.ts
|
|
4584
|
-
var
|
|
4639
|
+
var tr = (e) => {
|
|
4585
4640
|
if (e instanceof HTMLElement) {
|
|
4586
4641
|
let t = e.tagName.toLowerCase();
|
|
4587
4642
|
return !!(t === "input" || t === "textarea" || t === "select" || e.isContentEditable || e.getAttribute("contenteditable") === "true") && !(e != null && e.readOnly) && !(e != null && e.disabled);
|
|
4588
4643
|
}
|
|
4589
4644
|
return !1;
|
|
4590
|
-
},
|
|
4645
|
+
}, nr = (e, t) => e.code === "Space" || e.code === "Enter" || e.key === " " || e.key === "Spacebar" || e.key === "Enter" || e.keyCode === 13 || e.keyCode === 32 ? t === void 0 ? !tr(e.target) : !t : !1;
|
|
4591
4646
|
//#endregion
|
|
4592
4647
|
//#region src/functions/isFloat.ts
|
|
4593
|
-
function
|
|
4648
|
+
function rr(e) {
|
|
4594
4649
|
switch (typeof e) {
|
|
4595
4650
|
case "number": return !0;
|
|
4596
4651
|
case "string": return /^-?\d+(\.\d+)?$/.test(e);
|
|
@@ -4599,21 +4654,21 @@ function nr(e) {
|
|
|
4599
4654
|
}
|
|
4600
4655
|
//#endregion
|
|
4601
4656
|
//#region src/functions/isIntegerBetween.ts
|
|
4602
|
-
function
|
|
4657
|
+
function ir(e, t) {
|
|
4603
4658
|
let n = Math.floor(t);
|
|
4604
4659
|
return e >= n && e < n + 1;
|
|
4605
4660
|
}
|
|
4606
4661
|
//#endregion
|
|
4607
4662
|
//#region src/functions/isSelectedByList.ts
|
|
4608
|
-
function
|
|
4609
|
-
return Array.isArray(e) ? e.every((e) =>
|
|
4663
|
+
function ar(e, t) {
|
|
4664
|
+
return Array.isArray(e) ? e.every((e) => x(e, t)) : x(e, t);
|
|
4610
4665
|
}
|
|
4611
4666
|
//#endregion
|
|
4612
4667
|
//#region src/functions/isTab.ts
|
|
4613
|
-
var
|
|
4668
|
+
var or = (e) => e.key === "Tab" || e.code === "Tab" || e.keyCode === 9;
|
|
4614
4669
|
//#endregion
|
|
4615
4670
|
//#region src/functions/removeCommonPrefix.ts
|
|
4616
|
-
function
|
|
4671
|
+
function sr(e, t) {
|
|
4617
4672
|
if (e.startsWith(t)) return e.slice(t.length).trim();
|
|
4618
4673
|
let n = 0;
|
|
4619
4674
|
for (; e[n] === t[n] && n < e.length && n < t.length;) n++;
|
|
@@ -4621,36 +4676,36 @@ function or(e, t) {
|
|
|
4621
4676
|
}
|
|
4622
4677
|
//#endregion
|
|
4623
4678
|
//#region src/functions/replaceComponentName.ts
|
|
4624
|
-
var
|
|
4679
|
+
var cr = (e, t, n) => {
|
|
4625
4680
|
var r;
|
|
4626
4681
|
return e == null || (r = e.replace(RegExp(`<${t}`, "ig"), `<${n}`)) == null || (r = r.replace(RegExp(`</${t}`, "ig"), `</${n}`)) == null ? void 0 : r.trim();
|
|
4627
4682
|
};
|
|
4628
4683
|
//#endregion
|
|
4629
4684
|
//#region src/functions/uniqueArray.ts
|
|
4630
|
-
function
|
|
4685
|
+
function lr(e) {
|
|
4631
4686
|
return [...new Set(e)];
|
|
4632
4687
|
}
|
|
4633
4688
|
//#endregion
|
|
4634
4689
|
//#region src/functions/replaceRecursive.ts
|
|
4635
4690
|
function $(e, n, i = !0) {
|
|
4636
|
-
let a =
|
|
4691
|
+
let a = X(e);
|
|
4637
4692
|
return t(e) && t(n) && r(n, (n, r) => {
|
|
4638
4693
|
let o = e == null ? void 0 : e[r];
|
|
4639
|
-
t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] =
|
|
4694
|
+
t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] = X(lr([...o, ...n])) : a[r] = $(Array.isArray(o) ? { ...o } : o, n, i) : a[r] = t(n) ? X(n) : n;
|
|
4640
4695
|
}), a;
|
|
4641
4696
|
}
|
|
4642
4697
|
//#endregion
|
|
4643
4698
|
//#region src/functions/replaceTemplate.ts
|
|
4644
|
-
function
|
|
4699
|
+
function ur(e, t) {
|
|
4645
4700
|
let n = e;
|
|
4646
4701
|
return r(t, (e, t) => {
|
|
4647
|
-
n = n.replace(
|
|
4702
|
+
n = n.replace(zt(`[${t}]`), m(e));
|
|
4648
4703
|
}), n;
|
|
4649
4704
|
}
|
|
4650
4705
|
//#endregion
|
|
4651
4706
|
//#region src/functions/secondToTime.ts
|
|
4652
|
-
function
|
|
4653
|
-
let n =
|
|
4707
|
+
function dr(e, t) {
|
|
4708
|
+
let n = b(e);
|
|
4654
4709
|
if (n > 0) {
|
|
4655
4710
|
let e = String(Math.floor(n / 60)).padStart(2, "0"), r = String(n % 60).padStart(2, "0");
|
|
4656
4711
|
return t && Number(e) >= 60 ? `${String(Math.floor(Number(e) / 60)).padStart(2, "0")}:${String(Number(e) % 60).padStart(2, "0")}:${r}` : `${e}:${r}`;
|
|
@@ -4659,7 +4714,7 @@ function ur(e, t) {
|
|
|
4659
4714
|
}
|
|
4660
4715
|
//#endregion
|
|
4661
4716
|
//#region src/functions/setValues.ts
|
|
4662
|
-
function
|
|
4717
|
+
function fr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, notEmpty: o = !1 }) {
|
|
4663
4718
|
if (n) {
|
|
4664
4719
|
if (i(e)) {
|
|
4665
4720
|
let n = e.indexOf(t), i = [...e];
|
|
@@ -4671,48 +4726,48 @@ function dr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, no
|
|
|
4671
4726
|
}
|
|
4672
4727
|
//#endregion
|
|
4673
4728
|
//#region src/functions/splice.ts
|
|
4674
|
-
function
|
|
4729
|
+
function pr(e, n, i) {
|
|
4675
4730
|
if (t(e) && t(n)) {
|
|
4676
4731
|
if (i) {
|
|
4677
4732
|
let a = {}, o = !1;
|
|
4678
4733
|
return r(e, (e, r) => {
|
|
4679
|
-
!o && (i === r || i === e) ? (o = !0, a = $(a, n)) : o ? a = $(a, { [r]: e }) : a[r] = t(e) ?
|
|
4734
|
+
!o && (i === r || i === e) ? (o = !0, a = $(a, n)) : o ? a = $(a, { [r]: e }) : a[r] = t(e) ? X(e) : e;
|
|
4680
4735
|
}), o ? a : $(e, n);
|
|
4681
4736
|
}
|
|
4682
4737
|
if (t(n)) return $(e, n);
|
|
4683
4738
|
}
|
|
4684
|
-
return
|
|
4739
|
+
return X(e);
|
|
4685
4740
|
}
|
|
4686
4741
|
//#endregion
|
|
4687
4742
|
//#region src/functions/toCamelCaseFirst.ts
|
|
4688
|
-
function
|
|
4689
|
-
return
|
|
4743
|
+
function mr(e) {
|
|
4744
|
+
return at(e).replace(/^([a-z])/, (e) => `${e.toUpperCase()}`);
|
|
4690
4745
|
}
|
|
4691
4746
|
//#endregion
|
|
4692
4747
|
//#region src/functions/toKebabCase.ts
|
|
4693
|
-
function
|
|
4748
|
+
function hr(e) {
|
|
4694
4749
|
return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/^[A-Z]/, (e) => e.toLowerCase()).replace(/(?<=[\w ])[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[A-Z]/g, (e) => e.toLowerCase());
|
|
4695
4750
|
}
|
|
4696
4751
|
//#endregion
|
|
4697
4752
|
//#region src/functions/toNumberByMax.ts
|
|
4698
|
-
function
|
|
4699
|
-
let i =
|
|
4700
|
-
return t && a < i ? `${
|
|
4753
|
+
function gr(e, t, n, r) {
|
|
4754
|
+
let i = b(e), a = b(t);
|
|
4755
|
+
return t && a < i ? `${_r(a, n, r)}+` : _r(i, n, r);
|
|
4701
4756
|
}
|
|
4702
|
-
var
|
|
4757
|
+
var _r = (e, t, n) => t ? new R(n).number(e) : e;
|
|
4703
4758
|
//#endregion
|
|
4704
4759
|
//#region src/functions/toPercent.ts
|
|
4705
|
-
function
|
|
4760
|
+
function vr(e, t) {
|
|
4706
4761
|
return e === 0 ? t : 1 / e * t;
|
|
4707
4762
|
}
|
|
4708
4763
|
//#endregion
|
|
4709
4764
|
//#region src/functions/toPercentBy100.ts
|
|
4710
|
-
function
|
|
4711
|
-
return
|
|
4765
|
+
function yr(e, t) {
|
|
4766
|
+
return vr(e, t) * 100;
|
|
4712
4767
|
}
|
|
4713
4768
|
//#endregion
|
|
4714
4769
|
//#region src/functions/uint8ArrayToBase64.ts
|
|
4715
|
-
function
|
|
4770
|
+
function br(e) {
|
|
4716
4771
|
let t = "";
|
|
4717
4772
|
for (let n of e) t += String.fromCharCode(n);
|
|
4718
4773
|
if (s()) return window.btoa(t);
|
|
@@ -4724,7 +4779,7 @@ function yr(e) {
|
|
|
4724
4779
|
}
|
|
4725
4780
|
//#endregion
|
|
4726
4781
|
//#region src/functions/writeClipboardData.ts
|
|
4727
|
-
async function
|
|
4782
|
+
async function xr(e) {
|
|
4728
4783
|
if (s()) try {
|
|
4729
4784
|
await navigator.clipboard.writeText(e);
|
|
4730
4785
|
} catch (n) {
|
|
@@ -4733,4 +4788,4 @@ async function br(e) {
|
|
|
4733
4788
|
}
|
|
4734
4789
|
}
|
|
4735
4790
|
//#endregion
|
|
4736
|
-
export {
|
|
4791
|
+
export { I as Api, N as ApiCache, ze as ApiDataReturn, Be as ApiDefault, Ue as ApiError, Ve as ApiErrorItem, He as ApiErrorStorage, We as ApiHeaders, Ke as ApiHydration, Ze as ApiInstance, F as ApiMethodItem, qe as ApiPreparation, Xe as ApiResponse, P as ApiStatus, Qe as BroadcastMessage, tt as Cache, et as CacheItem, nt as CacheStatic, Ee as Cookie, Ce as CookieBlock, Se as CookieBlockInstance, O as CookieStorage, D as DataStorage, it as Datetime, T as ErrorCenter, le as ErrorCenterHandler, ue as ErrorCenterInstance, Ne as EventItem, ot as Formatters, H as FormattersType, st as GEO_FLAG_ICON_NAME, k as Geo, ct as GeoFlag, ke as GeoInstance, R as GeoIntl, lt as GeoPhone, ut as Global, ft as Hash, dt as HashInstance, ht as Icons, M as Loading, Fe as LoadingInstance, Ot as Meta, G as MetaManager, Et as MetaOg, Ct as MetaOpenGraphAge, xt as MetaOpenGraphAvailability, St as MetaOpenGraphCondition, wt as MetaOpenGraphGender, q as MetaOpenGraphTag, bt as MetaOpenGraphType, yt as MetaRobots, kt as MetaStatic, K as MetaTag, Dt as MetaTwitter, Tt as MetaTwitterCard, J as MetaTwitterTag, At as ResumableTimer, jt as ScrollbarWidth, Wt as SearchList, Lt as SearchListData, Rt as SearchListItem, Ht as SearchListMatcher, Ut as SearchListOptions, E as ServerStorage, Kt as StorageCallback, Zt as TRANSLATE_GLOBAL_PREFIX, Qt as TRANSLATE_TIME_OUT, tn as Translate, $t as TranslateFile, en as TranslateInstance, De as UI_GEO_COOKIE_KEY, nn as UrlItem, It as addTagHighlightMatch, S as anyToString, Yt as applyTemplate, rn as arrFill, ln as blobToBase64, un as capitalize, X as copyObject, dn as copyObjectLite, U as createElement, fn as domQuerySelector, pn as domQuerySelectorAll, W as encodeAttribute, me as encodeLiteAttribute, gn as ensureMaxSize, Y as escapeExp, _n as eventStopPropagation, m as executeFunction, Je as executePromise, r as forEach, vn as frame, yn as getArrayHighlightMatch, bn as getAttributes, xn as getClipboardData, rt as getColumn, Sn as getCurrentDate, Cn as getCurrentTime, A as getElement, Tn as getElementId, Z as getElementImage, gt as getElementItem, je as getElementOrWindow, he as getElementSafeScript, Bt as getExactSearchExp, zt as getExp, Dn as getFirst, ge as getHydrationData, V as getItemByPath, On as getKey, kn as getLength, An as getLengthOfAllArray, jn as getMaxLengthAllArray, Mn as getMinLengthAllArray, Fn as getMouseClient, Nn as getMouseClientX, Pn as getMouseClientY, In as getObjectByKeys, Ln as getObjectNoUndefined, Rn as getObjectOrNone, zn as getOnlyText, Vn as getRandomText, o as getRequestString, Vt as getSearchExp, Mt as getSeparatingSearchExp, Hn as getStepPercent, Un as getStepValue, Gn as goScroll, Kn as goScrollSmooth, qn as goScrollTo, Yn as handleShare, Xn as inArray, En as initGetElementId, Zn as initScrollbarOffset, Qn as intersectKey, Xt as isApiSuccess, i as isArray, $n as isDifferent, ae as isDomData, s as isDomRuntime, er as isElementVisible, nr as isEnter, l as isFilled, rr as isFloat, p as isFunction, Me as isInDom, tr as isInput, ir as isIntegerBetween, c as isNull, g as isNumber, t as isObject, n as isObjectNotArray, u as isOnLine, x as isSelected, ar as isSelectedByList, Jn as isShare, d as isString, or as isTab, Ae as isWindow, f as random, sr as removeCommonPrefix, cr as replaceComponentName, $ as replaceRecursive, ur as replaceTemplate, hn as resizeImageByMax, dr as secondToTime, _t as setElementItem, fr as setValues, ee as sleep, pr as splice, Bn as strFill, oe as strSplit, j as toArray, at as toCamelCase, mr as toCamelCaseFirst, L as toDate, hr as toKebabCase, b as toNumber, gr as toNumberByMax, vr as toPercent, yr as toPercentBy100, a as toString, fe as transformation, br as uint8ArrayToBase64, lr as uniqueArray, xr as writeClipboardData };
|