@dxtmisha/functional-basic 1.3.13 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/ai-description.md +25 -0
- package/ai-doc.md +341 -0
- package/{ai-types.txt → ai-types.md} +630 -134
- package/dist/library.js +440 -358
- package/dist/src/classes/Geo.d.ts +14 -0
- package/dist/src/classes/GeoInstance.d.ts +16 -1
- package/dist/src/classes/HashInstance.d.ts +8 -74
- package/dist/src/classes/Query.d.ts +57 -0
- package/dist/src/classes/QueryInstance.d.ts +29 -0
- package/dist/src/classes/UrlInstanceAbstract.d.ts +94 -0
- package/dist/src/classes/UrlItem.d.ts +48 -0
- package/dist/src/library.d.ts +3 -0
- package/dist/src/types/geoTypes.d.ts +6 -0
- package/package.json +4 -4
- package/ai-description.txt +0 -18
- package/ai-doc.txt +0 -54
package/dist/library.js
CHANGED
|
@@ -450,7 +450,7 @@ var le = class {
|
|
|
450
450
|
w(T, "item", new ue(de));
|
|
451
451
|
//#endregion
|
|
452
452
|
//#region src/functions/transformation.ts
|
|
453
|
-
function
|
|
453
|
+
function E(e, t = !1) {
|
|
454
454
|
if (typeof e == "string") {
|
|
455
455
|
let r = e.trim();
|
|
456
456
|
switch (r) {
|
|
@@ -478,25 +478,25 @@ function fe(e, t = !1) {
|
|
|
478
478
|
}
|
|
479
479
|
//#endregion
|
|
480
480
|
//#region src/functions/encodeLiteAttribute.ts
|
|
481
|
-
var
|
|
481
|
+
var fe = {
|
|
482
482
|
"<": "<",
|
|
483
483
|
">": ">",
|
|
484
484
|
"&": "&"
|
|
485
485
|
};
|
|
486
|
-
function
|
|
486
|
+
function pe(e) {
|
|
487
487
|
return String(e).replace(/[<>&]/g, (e) => {
|
|
488
488
|
var t;
|
|
489
|
-
return (t =
|
|
489
|
+
return (t = fe == null ? void 0 : fe[e]) == null ? e : t;
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
492
|
//#endregion
|
|
493
493
|
//#region src/functions/getElementSafeScript.ts
|
|
494
|
-
function
|
|
494
|
+
function me(e, t) {
|
|
495
495
|
return `<script id="${e.replace(/"/g, """)}" type="application/json">${JSON.stringify(t).replace(/<\/(script)>/gi, "<\\/$1>")}<\/script>`;
|
|
496
496
|
}
|
|
497
497
|
//#endregion
|
|
498
498
|
//#region src/functions/getHydrationData.ts
|
|
499
|
-
function
|
|
499
|
+
function he(e, t, n = !0) {
|
|
500
500
|
if (typeof document < "u") {
|
|
501
501
|
let t = document.getElementById(e);
|
|
502
502
|
if (t) try {
|
|
@@ -517,7 +517,7 @@ function ge(e, t, n = !0) {
|
|
|
517
517
|
}
|
|
518
518
|
//#endregion
|
|
519
519
|
//#region src/classes/ServerStorage.ts
|
|
520
|
-
var
|
|
520
|
+
var ge = "__ui:server-storage__", _e = "__ui:server:storage:id__", D = class {
|
|
521
521
|
static init(e) {
|
|
522
522
|
return this.listener || (this.listener = e), this;
|
|
523
523
|
}
|
|
@@ -547,7 +547,7 @@ var _e = "__ui:server-storage__", ve = "__ui:server:storage:id__", E = class {
|
|
|
547
547
|
e in t && delete t[e];
|
|
548
548
|
}
|
|
549
549
|
static toString() {
|
|
550
|
-
return
|
|
550
|
+
return me(_e, this.getDataForHydration());
|
|
551
551
|
}
|
|
552
552
|
static getStorage(e = !0, t) {
|
|
553
553
|
var n;
|
|
@@ -561,11 +561,11 @@ var _e = "__ui:server-storage__", ve = "__ui:server:storage:id__", E = class {
|
|
|
561
561
|
details: { status: t }
|
|
562
562
|
}), e && !this.storage && (this.storage = {}), (i = this.storage) == null ? {} : i;
|
|
563
563
|
}
|
|
564
|
-
return
|
|
564
|
+
return ge in r || (r[ge] = {}), r[ge];
|
|
565
565
|
}
|
|
566
566
|
static getStorageDom() {
|
|
567
567
|
if (!this.storage) {
|
|
568
|
-
let e =
|
|
568
|
+
let e = he(_e, {});
|
|
569
569
|
this.storage = {}, r(e, (e, t) => {
|
|
570
570
|
this.storage[t] = {
|
|
571
571
|
value: e,
|
|
@@ -582,16 +582,16 @@ var _e = "__ui:server-storage__", ve = "__ui:server:storage:id__", E = class {
|
|
|
582
582
|
}), t;
|
|
583
583
|
}
|
|
584
584
|
};
|
|
585
|
-
w(
|
|
585
|
+
w(D, "storage", void 0), w(D, "listener", void 0), w(D, "hideError", void 0);
|
|
586
586
|
//#endregion
|
|
587
587
|
//#region src/classes/DataStorage.ts
|
|
588
|
-
var
|
|
588
|
+
var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O = class {
|
|
589
589
|
static setPrefix(e) {
|
|
590
|
-
|
|
590
|
+
ve = e;
|
|
591
591
|
}
|
|
592
592
|
constructor(e, t = !1, n = T.getItem()) {
|
|
593
593
|
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;
|
|
594
|
-
let r = `${t ? "session" : "storage"}#${e}`, i =
|
|
594
|
+
let r = `${t ? "session" : "storage"}#${e}`, i = ye();
|
|
595
595
|
if (r in i) return i[r];
|
|
596
596
|
this.make(), i[r] = this;
|
|
597
597
|
}
|
|
@@ -603,7 +603,7 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
|
|
|
603
603
|
if (this.value = m(e), this.age = Date.now(), this.value === void 0) this.remove();
|
|
604
604
|
else {
|
|
605
605
|
var t;
|
|
606
|
-
(t = this.getMethod()) == null || t.setItem(this.getIndex(),
|
|
606
|
+
(t = this.getMethod()) == null || t.setItem(this.getIndex(), pe(JSON.stringify({
|
|
607
607
|
value: this.value,
|
|
608
608
|
age: this.age
|
|
609
609
|
})));
|
|
@@ -628,7 +628,7 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
|
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
getIndex() {
|
|
631
|
-
return `${
|
|
631
|
+
return `${ve}__${this.name}`;
|
|
632
632
|
}
|
|
633
633
|
getValue() {
|
|
634
634
|
var e, t;
|
|
@@ -647,9 +647,9 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
|
|
|
647
647
|
let e = this.getValue();
|
|
648
648
|
return e ? (this.value = e.value, this.age = e.age) : (this.value = void 0, this.age = void 0), this;
|
|
649
649
|
}
|
|
650
|
-
},
|
|
650
|
+
}, be = "__ui:cookie-block__", xe = class {
|
|
651
651
|
constructor() {
|
|
652
|
-
w(this, "storage", new
|
|
652
|
+
w(this, "storage", new O(be));
|
|
653
653
|
}
|
|
654
654
|
get() {
|
|
655
655
|
var e;
|
|
@@ -658,9 +658,9 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
|
|
|
658
658
|
set(e) {
|
|
659
659
|
this.storage.set(e);
|
|
660
660
|
}
|
|
661
|
-
},
|
|
661
|
+
}, Se = class {
|
|
662
662
|
static getItem() {
|
|
663
|
-
return
|
|
663
|
+
return D.get("__ui:cookie-block__", () => new xe());
|
|
664
664
|
}
|
|
665
665
|
static get() {
|
|
666
666
|
return this.getItem().get();
|
|
@@ -668,7 +668,7 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
|
|
|
668
668
|
static set(e) {
|
|
669
669
|
this.getItem().set(e);
|
|
670
670
|
}
|
|
671
|
-
},
|
|
671
|
+
}, Ce = "__ui:cookie-storage__", k = class {
|
|
672
672
|
static init(e, t, n) {
|
|
673
673
|
this.getListener = e, this.getListenerRaw = t, this.setListener = n;
|
|
674
674
|
}
|
|
@@ -678,11 +678,11 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
|
|
|
678
678
|
static get(e, t) {
|
|
679
679
|
var n, r;
|
|
680
680
|
let i = (n = (r = this.getListener) == null ? void 0 : r.call(this, e)) == null ? this.initItems()[e] : n;
|
|
681
|
-
return i === void 0 && t !== void 0 ? this.set(e, t) :
|
|
681
|
+
return i === void 0 && t !== void 0 ? this.set(e, t) : E(i);
|
|
682
682
|
}
|
|
683
683
|
static set(e, t, n) {
|
|
684
684
|
let r = m(t);
|
|
685
|
-
if (
|
|
685
|
+
if (Se.get()) return r;
|
|
686
686
|
let i = S(r, !1);
|
|
687
687
|
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;
|
|
688
688
|
}
|
|
@@ -690,7 +690,7 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
|
|
|
690
690
|
this.set(e, "", { age: -1 });
|
|
691
691
|
}
|
|
692
692
|
static update() {
|
|
693
|
-
s() && (
|
|
693
|
+
s() && (D.remove(Ce), this.initItems());
|
|
694
694
|
}
|
|
695
695
|
static format(e, t, n) {
|
|
696
696
|
return [
|
|
@@ -717,7 +717,7 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
|
|
|
717
717
|
return t;
|
|
718
718
|
}
|
|
719
719
|
static initItems() {
|
|
720
|
-
return
|
|
720
|
+
return D.get(Ce, () => {
|
|
721
721
|
var e;
|
|
722
722
|
if (this.hasDom()) return this.parse(document.cookie);
|
|
723
723
|
let t = (e = this.getListenerRaw) == null ? void 0 : e.call(this);
|
|
@@ -749,19 +749,19 @@ var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D =
|
|
|
749
749
|
return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${S(t)}`);
|
|
750
750
|
}
|
|
751
751
|
};
|
|
752
|
-
w(
|
|
752
|
+
w(k, "getListener", void 0), w(k, "getListenerRaw", void 0), w(k, "setListener", void 0);
|
|
753
753
|
//#endregion
|
|
754
754
|
//#region src/classes/Cookie.ts
|
|
755
|
-
var
|
|
755
|
+
var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
756
756
|
static getInstance(t) {
|
|
757
757
|
var n, r;
|
|
758
|
-
return (n = (r =
|
|
758
|
+
return (n = (r = we()) == null ? void 0 : r[t]) == null ? new e(t) : n;
|
|
759
759
|
}
|
|
760
760
|
constructor(e) {
|
|
761
761
|
w(this, "name", void 0), w(this, "value", void 0), w(this, "options", {}), this.name = e;
|
|
762
|
-
let t =
|
|
762
|
+
let t = we();
|
|
763
763
|
if (e in t) return t[e];
|
|
764
|
-
this.value =
|
|
764
|
+
this.value = k.get(this.name), t[e] = this;
|
|
765
765
|
}
|
|
766
766
|
get(e, t) {
|
|
767
767
|
return this.value === void 0 && e && this.set(e, t), this.value;
|
|
@@ -773,11 +773,11 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
|
|
|
773
773
|
this.set("");
|
|
774
774
|
}
|
|
775
775
|
update() {
|
|
776
|
-
|
|
776
|
+
k.set(this.name, this.value, this.options);
|
|
777
777
|
}
|
|
778
|
-
},
|
|
778
|
+
}, Ee = "ui-geo-code", De = "__ui:geo-code__", Oe = class {
|
|
779
779
|
constructor() {
|
|
780
|
-
w(this, "storage", new
|
|
780
|
+
w(this, "storage", new O(De)), 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);
|
|
781
781
|
}
|
|
782
782
|
get() {
|
|
783
783
|
return this.item;
|
|
@@ -797,12 +797,14 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
|
|
|
797
797
|
getLocation() {
|
|
798
798
|
return this.location;
|
|
799
799
|
}
|
|
800
|
+
getLocationCountry() {
|
|
801
|
+
return this.toCountry(this.getLocation());
|
|
802
|
+
}
|
|
803
|
+
getLocationLanguage() {
|
|
804
|
+
return this.toLanguage(this.getLocation());
|
|
805
|
+
}
|
|
800
806
|
getItem() {
|
|
801
|
-
return
|
|
802
|
-
...this.item,
|
|
803
|
-
language: this.language,
|
|
804
|
-
standard: `${this.language}-${this.item.country}`
|
|
805
|
-
};
|
|
807
|
+
return this.item;
|
|
806
808
|
}
|
|
807
809
|
getList() {
|
|
808
810
|
return e;
|
|
@@ -810,7 +812,7 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
|
|
|
810
812
|
getByCode(e) {
|
|
811
813
|
var t;
|
|
812
814
|
let n;
|
|
813
|
-
return e && (/([A-Z]{2}-[a-z]{2})|([a-z]{2}-[A-Z]{2})/.test(e) && (n = this.getByCodeFull(e)), !n && /[
|
|
815
|
+
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.getByCountry(this.toCountry(e))), !n && /[a-z]{2}/.test(e) && (n = this.getByLanguage(this.toLanguage(e)))), this.toFull((t = n) == null ? this.getList()[0] : t, e);
|
|
814
816
|
}
|
|
815
817
|
getByCodeFull(e) {
|
|
816
818
|
return this.getList().find((t) => x(e, [`${t.language}-${t.country}`, `${t.country}-${t.language}`]));
|
|
@@ -837,7 +839,12 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
|
|
|
837
839
|
find(e) {
|
|
838
840
|
return this.getByCode(e);
|
|
839
841
|
}
|
|
840
|
-
toStandard(e) {
|
|
842
|
+
toStandard(e, t) {
|
|
843
|
+
if (t) {
|
|
844
|
+
var n;
|
|
845
|
+
let r = (n = this.getByLanguage(t)) == null ? void 0 : n.language;
|
|
846
|
+
if (r) return `${r}-${e.country}`;
|
|
847
|
+
}
|
|
841
848
|
return `${e.language}-${e.country}`;
|
|
842
849
|
}
|
|
843
850
|
set(e, t) {
|
|
@@ -850,10 +857,10 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
|
|
|
850
857
|
this.valueDefault = e, this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
|
|
851
858
|
}
|
|
852
859
|
getCookie() {
|
|
853
|
-
return
|
|
860
|
+
return Te.getInstance(Ee);
|
|
854
861
|
}
|
|
855
862
|
findLocation() {
|
|
856
|
-
return this.
|
|
863
|
+
return this.getCookie().get() || this.findLocationDom() || m(this.valueDefault) || "en-GB";
|
|
857
864
|
}
|
|
858
865
|
findLocationDom() {
|
|
859
866
|
var e;
|
|
@@ -868,16 +875,20 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
|
|
|
868
875
|
toLanguage(e) {
|
|
869
876
|
return e.replace(/[^a-z]+/g, "");
|
|
870
877
|
}
|
|
871
|
-
toFull(e) {
|
|
878
|
+
toFull(e, t) {
|
|
879
|
+
let n = t && this.toLanguage(t) || e.language, r = this.toStandard(e, n);
|
|
872
880
|
return {
|
|
873
881
|
...e,
|
|
874
|
-
standard:
|
|
875
|
-
firstDay: (e == null ? void 0 : e.firstDay) || "Mo"
|
|
882
|
+
standard: r,
|
|
883
|
+
firstDay: (e == null ? void 0 : e.firstDay) || "Mo",
|
|
884
|
+
location: t == null ? r : t,
|
|
885
|
+
locationCountry: t && this.toCountry(t) || e.country,
|
|
886
|
+
locationLanguage: n
|
|
876
887
|
};
|
|
877
888
|
}
|
|
878
|
-
},
|
|
889
|
+
}, A = class {
|
|
879
890
|
static getObject() {
|
|
880
|
-
return
|
|
891
|
+
return D.get("__ui:geo-instance__", () => new Oe());
|
|
881
892
|
}
|
|
882
893
|
static get() {
|
|
883
894
|
return this.getObject().get();
|
|
@@ -897,6 +908,12 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
|
|
|
897
908
|
static getLocation() {
|
|
898
909
|
return this.getObject().getLocation();
|
|
899
910
|
}
|
|
911
|
+
static getLocationCountry() {
|
|
912
|
+
return this.getObject().getLocationCountry();
|
|
913
|
+
}
|
|
914
|
+
static getLocationLanguage() {
|
|
915
|
+
return this.getObject().getLocationLanguage();
|
|
916
|
+
}
|
|
900
917
|
static getItem() {
|
|
901
918
|
return this.getObject().getItem();
|
|
902
919
|
}
|
|
@@ -939,14 +956,14 @@ var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
|
|
|
939
956
|
};
|
|
940
957
|
//#endregion
|
|
941
958
|
//#region src/functions/isWindow.ts
|
|
942
|
-
function
|
|
959
|
+
function ke(e) {
|
|
943
960
|
return s() && e === window;
|
|
944
961
|
}
|
|
945
962
|
//#endregion
|
|
946
963
|
//#region src/functions/getElement.ts
|
|
947
|
-
function
|
|
964
|
+
function j(e) {
|
|
948
965
|
if (!s()) return d(e) ? void 0 : e;
|
|
949
|
-
if (
|
|
966
|
+
if (ke(e)) return document.body;
|
|
950
967
|
if (d(e)) {
|
|
951
968
|
var t;
|
|
952
969
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -955,30 +972,30 @@ function A(e) {
|
|
|
955
972
|
}
|
|
956
973
|
//#endregion
|
|
957
974
|
//#region src/functions/getElementOrWindow.ts
|
|
958
|
-
function
|
|
959
|
-
return
|
|
975
|
+
function Ae(e) {
|
|
976
|
+
return ke(e) ? e : j(e);
|
|
960
977
|
}
|
|
961
978
|
//#endregion
|
|
962
979
|
//#region src/functions/isInDom.ts
|
|
963
|
-
function
|
|
980
|
+
function je(e) {
|
|
964
981
|
var t;
|
|
965
|
-
return (e == null ? void 0 : e.isConnected) || !!((t =
|
|
982
|
+
return (e == null ? void 0 : e.isConnected) || !!((t = j(e)) != null && t.closest("html"));
|
|
966
983
|
}
|
|
967
984
|
//#endregion
|
|
968
985
|
//#region src/functions/toArray.ts
|
|
969
|
-
function
|
|
986
|
+
function M(e) {
|
|
970
987
|
return Array.isArray(e) ? e : [e];
|
|
971
988
|
}
|
|
972
989
|
//#endregion
|
|
973
990
|
//#region src/classes/EventItem.ts
|
|
974
|
-
var
|
|
991
|
+
var Me = class {
|
|
975
992
|
constructor(e, n = ["click"], r, i, a) {
|
|
976
993
|
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) => {
|
|
977
|
-
if (
|
|
994
|
+
if (je(this.elementControl)) {
|
|
978
995
|
var n, r;
|
|
979
996
|
(n = this.listener) == null || n.call(this.element, e, this.detail), t(this.options) && (r = this.options) != null && r.once && this.stop();
|
|
980
997
|
} else this.stop();
|
|
981
|
-
}), w(this, "activity", !1), w(this, "activityItems", []), this.listener = r, this.options = i, this.detail = a, this.element =
|
|
998
|
+
}), w(this, "activity", !1), w(this, "activityItems", []), this.listener = r, this.options = i, this.detail = a, this.element = Ae(e), this.elementControl = j(e), this.type = M(n);
|
|
982
999
|
}
|
|
983
1000
|
isActive() {
|
|
984
1001
|
return this.activity;
|
|
@@ -987,14 +1004,14 @@ var Ne = class {
|
|
|
987
1004
|
return this.element;
|
|
988
1005
|
}
|
|
989
1006
|
setElement(e) {
|
|
990
|
-
let t =
|
|
991
|
-
return this.elementControlEdit || (this.elementControl =
|
|
1007
|
+
let t = Ae(e);
|
|
1008
|
+
return this.elementControlEdit || (this.elementControl = j(e)), this.element = t, this.reset(), this;
|
|
992
1009
|
}
|
|
993
1010
|
setElementControl(e) {
|
|
994
|
-
return this.elementControl =
|
|
1011
|
+
return this.elementControl = j(e), this.elementControlEdit = !c(this.elementControl), this.elementControlEdit || (this.elementControl = j(this.element)), this;
|
|
995
1012
|
}
|
|
996
1013
|
setType(e) {
|
|
997
|
-
return this.type =
|
|
1014
|
+
return this.type = M(e), this.reset(), this;
|
|
998
1015
|
}
|
|
999
1016
|
setListener(e) {
|
|
1000
1017
|
return this.listener = e, this;
|
|
@@ -1063,9 +1080,9 @@ var Ne = class {
|
|
|
1063
1080
|
}
|
|
1064
1081
|
return !1;
|
|
1065
1082
|
}
|
|
1066
|
-
},
|
|
1067
|
-
constructor(e =
|
|
1068
|
-
w(this, "eventName", void 0), w(this, "value", 0), w(this, "event", void 0), w(this, "registrationList", []), this.eventName = e, s() && (this.event = new
|
|
1083
|
+
}, Ne = "ui-loading", Pe = class {
|
|
1084
|
+
constructor(e = Ne) {
|
|
1085
|
+
w(this, "eventName", void 0), w(this, "value", 0), w(this, "event", void 0), w(this, "registrationList", []), this.eventName = e, s() && (this.event = new Me(window, this.eventName));
|
|
1069
1086
|
}
|
|
1070
1087
|
is() {
|
|
1071
1088
|
return this.value > 0;
|
|
@@ -1081,7 +1098,7 @@ var Ne = class {
|
|
|
1081
1098
|
}
|
|
1082
1099
|
registrationEvent(e, t) {
|
|
1083
1100
|
if (s()) {
|
|
1084
|
-
let n = new
|
|
1101
|
+
let n = new Me(window, this.eventName, e).setElementControl(t).start();
|
|
1085
1102
|
this.registrationList.push({
|
|
1086
1103
|
item: n,
|
|
1087
1104
|
listener: e,
|
|
@@ -1096,7 +1113,7 @@ var Ne = class {
|
|
|
1096
1113
|
var e;
|
|
1097
1114
|
(e = this.event) == null || e.dispatch({ loading: this.is() });
|
|
1098
1115
|
}
|
|
1099
|
-
},
|
|
1116
|
+
}, N = class {
|
|
1100
1117
|
static is() {
|
|
1101
1118
|
return this.getItem().is();
|
|
1102
1119
|
}
|
|
@@ -1104,7 +1121,7 @@ var Ne = class {
|
|
|
1104
1121
|
return this.getItem().get();
|
|
1105
1122
|
}
|
|
1106
1123
|
static getItem() {
|
|
1107
|
-
return
|
|
1124
|
+
return D.get("__ui:loading-instance__", () => new Pe());
|
|
1108
1125
|
}
|
|
1109
1126
|
static show() {
|
|
1110
1127
|
this.getItem().show();
|
|
@@ -1118,7 +1135,7 @@ var Ne = class {
|
|
|
1118
1135
|
static unregistrationEvent(e, t) {
|
|
1119
1136
|
this.getItem().unregistrationEvent(e, t);
|
|
1120
1137
|
}
|
|
1121
|
-
},
|
|
1138
|
+
}, Fe, Ie = 1440 * 60, P = class {
|
|
1122
1139
|
static init(e, t, n, r) {
|
|
1123
1140
|
this.getListener = e, this.setListener = t, this.removeListener = n, r && (this.cacheStepAgeClearOld = r, this.stepAgeClearOld = r);
|
|
1124
1141
|
}
|
|
@@ -1140,7 +1157,7 @@ var Ne = class {
|
|
|
1140
1157
|
let t = this.generateKey(e);
|
|
1141
1158
|
return await this.get(t);
|
|
1142
1159
|
}
|
|
1143
|
-
static async set(e, t, n =
|
|
1160
|
+
static async set(e, t, n = Ie) {
|
|
1144
1161
|
let r = {
|
|
1145
1162
|
value: t,
|
|
1146
1163
|
age: n,
|
|
@@ -1203,10 +1220,10 @@ var Ne = class {
|
|
|
1203
1220
|
}
|
|
1204
1221
|
}
|
|
1205
1222
|
};
|
|
1206
|
-
|
|
1223
|
+
Fe = P, w(P, "items", void 0), w(P, "getListener", void 0), w(P, "setListener", void 0), w(P, "removeListener", void 0), w(P, "cacheStepAgeClearOld", 16384), w(P, "stepAgeClearOld", Fe.cacheStepAgeClearOld);
|
|
1207
1224
|
//#endregion
|
|
1208
1225
|
//#region src/classes/ApiStatus.ts
|
|
1209
|
-
var
|
|
1226
|
+
var Le = class {
|
|
1210
1227
|
constructor() {
|
|
1211
1228
|
w(this, "value", void 0);
|
|
1212
1229
|
}
|
|
@@ -1387,7 +1404,7 @@ var P = class {
|
|
|
1387
1404
|
};
|
|
1388
1405
|
}
|
|
1389
1406
|
add(e, t, n) {
|
|
1390
|
-
return
|
|
1407
|
+
return M(e).forEach((e) => {
|
|
1391
1408
|
let r = e.url || t, i = e.method || n;
|
|
1392
1409
|
r && i && this.storage.push({
|
|
1393
1410
|
...e,
|
|
@@ -1424,7 +1441,7 @@ var P = class {
|
|
|
1424
1441
|
}
|
|
1425
1442
|
}, Ue = class {
|
|
1426
1443
|
static getStorage() {
|
|
1427
|
-
return
|
|
1444
|
+
return D.get("__ui:api-error-storage__", () => new He());
|
|
1428
1445
|
}
|
|
1429
1446
|
static add(e, t, n) {
|
|
1430
1447
|
this.getStorage().add(e, t, n);
|
|
@@ -1465,10 +1482,10 @@ var P = class {
|
|
|
1465
1482
|
});
|
|
1466
1483
|
}
|
|
1467
1484
|
toString() {
|
|
1468
|
-
return
|
|
1485
|
+
return me(Ge, this.list);
|
|
1469
1486
|
}
|
|
1470
1487
|
getListByClient() {
|
|
1471
|
-
return
|
|
1488
|
+
return he(Ge, []);
|
|
1472
1489
|
}
|
|
1473
1490
|
}, qe = class {
|
|
1474
1491
|
constructor() {
|
|
@@ -1515,7 +1532,7 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1515
1532
|
return this.response.filter((e) => e.isForGlobal !== !0);
|
|
1516
1533
|
}
|
|
1517
1534
|
add(e) {
|
|
1518
|
-
return this.response.push(...
|
|
1535
|
+
return this.response.push(...M(e)), this;
|
|
1519
1536
|
}
|
|
1520
1537
|
setDevMode(e) {
|
|
1521
1538
|
return this.devMode = e, this;
|
|
@@ -1561,8 +1578,8 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1561
1578
|
fetch(e, t) {
|
|
1562
1579
|
return this.startResponseLoading(), new Promise((n) => {
|
|
1563
1580
|
Je(p(e.response) ? e.response(t) : e.response).then((t) => {
|
|
1564
|
-
e != null && e.lag ? (
|
|
1565
|
-
this.stopResponseLoading(), n(t),
|
|
1581
|
+
e != null && e.lag ? (N.show(), setTimeout(() => {
|
|
1582
|
+
this.stopResponseLoading(), n(t), N.hide();
|
|
1566
1583
|
}, f(0, 2e3))) : (this.stopResponseLoading(), n(t));
|
|
1567
1584
|
});
|
|
1568
1585
|
});
|
|
@@ -1581,7 +1598,7 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1581
1598
|
}, Ze = class {
|
|
1582
1599
|
constructor(e = "/api/", t = {}) {
|
|
1583
1600
|
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;
|
|
1584
|
-
let { headersClass: n = We, requestDefaultClass: r = Be, statusClass: i =
|
|
1601
|
+
let { headersClass: n = We, requestDefaultClass: r = Be, statusClass: i = Le, responseClass: a = Xe, preparationClass: o = qe, loadingClass: s = N.getItem(), errorCenterClass: c = T.getItem(), hydrationClass: l = Ke } = t;
|
|
1585
1602
|
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);
|
|
1586
1603
|
}
|
|
1587
1604
|
isLocalhost() {
|
|
@@ -1600,7 +1617,7 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1600
1617
|
return this.origin && /^\//.test(this.url) ? `${this.origin}${this.url}` : this.url;
|
|
1601
1618
|
}
|
|
1602
1619
|
getUrl(e, t = !0) {
|
|
1603
|
-
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}",
|
|
1620
|
+
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}", A.getLocation()).replace("{country}", A.getCountry()).replace("{language}", A.getLanguage());
|
|
1604
1621
|
}
|
|
1605
1622
|
getBody(e = {}, t = F.get) {
|
|
1606
1623
|
if (e instanceof FormData) return e;
|
|
@@ -1676,9 +1693,9 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1676
1693
|
async fetch(e, t = 0) {
|
|
1677
1694
|
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);
|
|
1678
1695
|
if (m) return m;
|
|
1679
|
-
let h = await
|
|
1696
|
+
let h = await P.getByFetch(e);
|
|
1680
1697
|
if (h) return this.hydration.toClient(e, h), h;
|
|
1681
|
-
let g = new
|
|
1698
|
+
let g = new Le(), _, v;
|
|
1682
1699
|
o || this.loading.show();
|
|
1683
1700
|
try {
|
|
1684
1701
|
await this.preparation.make(l, e);
|
|
@@ -1696,7 +1713,7 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1696
1713
|
}
|
|
1697
1714
|
g.setLastResponse(_.getData()), this.status.setLastResponse(_.getData());
|
|
1698
1715
|
let y = _.getAndStatus(g);
|
|
1699
|
-
return o || this.loading.hide(), this.hydration.toClient(e, y), await
|
|
1716
|
+
return o || this.loading.hide(), this.hydration.toClient(e, y), await P.setByFetch(e, y), y;
|
|
1700
1717
|
}
|
|
1701
1718
|
async makeQuery(e, t) {
|
|
1702
1719
|
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 = {
|
|
@@ -1798,7 +1815,7 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1798
1815
|
return this.getItem().isLocalhost();
|
|
1799
1816
|
}
|
|
1800
1817
|
static getItem() {
|
|
1801
|
-
return
|
|
1818
|
+
return D.get("__ui:api-instance__", () => new Ze());
|
|
1802
1819
|
}
|
|
1803
1820
|
static getStatus() {
|
|
1804
1821
|
return this.getItem().getStatus();
|
|
@@ -1901,7 +1918,7 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1901
1918
|
var e;
|
|
1902
1919
|
return (e = this.channel) == null || e.close(), this.channel = void 0, this;
|
|
1903
1920
|
}
|
|
1904
|
-
}, $e = () => new
|
|
1921
|
+
}, $e = () => new O("__ui:broadcast-name__").get(() => `name_${f(1e6, 9999999)}`), et = class {
|
|
1905
1922
|
constructor(e) {
|
|
1906
1923
|
w(this, "callback", void 0), w(this, "cache", void 0), w(this, "cacheOld", void 0), w(this, "comparisons", []), this.callback = e;
|
|
1907
1924
|
}
|
|
@@ -1938,7 +1955,7 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1938
1955
|
}
|
|
1939
1956
|
}, nt = class {
|
|
1940
1957
|
static getItem() {
|
|
1941
|
-
return
|
|
1958
|
+
return D.get("__ui:cache-static__", () => new tt());
|
|
1942
1959
|
}
|
|
1943
1960
|
static get(e, t, n) {
|
|
1944
1961
|
return this.getItem().get(e, t, n);
|
|
@@ -1954,7 +1971,7 @@ function L(e) {
|
|
|
1954
1971
|
if (e instanceof Date) return e;
|
|
1955
1972
|
if (c(e)) return /* @__PURE__ */ new Date();
|
|
1956
1973
|
if (typeof e == "number") return new Date(e);
|
|
1957
|
-
let u = e, d =
|
|
1974
|
+
let u = e, d = A.getTimezoneFormat().trim();
|
|
1958
1975
|
e.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (e, t, n) => (u = t, d = n.trim(), e));
|
|
1959
1976
|
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;
|
|
1960
1977
|
return /* @__PURE__ */ new Date(`${f.trim()}${d}`);
|
|
@@ -1967,20 +1984,20 @@ function rt(e, t) {
|
|
|
1967
1984
|
//#endregion
|
|
1968
1985
|
//#region src/classes/GeoIntl.ts
|
|
1969
1986
|
var R = class e {
|
|
1970
|
-
static isItem(e =
|
|
1987
|
+
static isItem(e = A.getLocation()) {
|
|
1971
1988
|
return this.getLocation(e) in B;
|
|
1972
1989
|
}
|
|
1973
|
-
static getLocation(e =
|
|
1990
|
+
static getLocation(e = A.getLocation()) {
|
|
1974
1991
|
if (e in z) return z[e];
|
|
1975
|
-
let t =
|
|
1992
|
+
let t = A.find(e);
|
|
1976
1993
|
return z[e] = t.standard, t.standard;
|
|
1977
1994
|
}
|
|
1978
|
-
static getInstance(t =
|
|
1995
|
+
static getInstance(t = A.getLocation()) {
|
|
1979
1996
|
let n = this.getLocation(t);
|
|
1980
1997
|
return n in B ? B[n] : new e(t);
|
|
1981
1998
|
}
|
|
1982
|
-
constructor(e =
|
|
1983
|
-
w(this, "errorCenter", void 0), w(this, "geo", void 0), this.errorCenter = t, this.geo =
|
|
1999
|
+
constructor(e = A.getLocation(), t = T.getItem()) {
|
|
2000
|
+
w(this, "errorCenter", void 0), w(this, "geo", void 0), this.errorCenter = t, this.geo = A.find(e);
|
|
1984
2001
|
let n = this.getLocation();
|
|
1985
2002
|
if (n in B) return B[n];
|
|
1986
2003
|
z[e] = n, B[n] = this;
|
|
@@ -2014,7 +2031,7 @@ var R = class e {
|
|
|
2014
2031
|
type: "language",
|
|
2015
2032
|
style: t
|
|
2016
2033
|
};
|
|
2017
|
-
return this.display(
|
|
2034
|
+
return this.display(A.getByCode(e).language, n);
|
|
2018
2035
|
}
|
|
2019
2036
|
countryName(e, t) {
|
|
2020
2037
|
let n = {
|
|
@@ -2308,7 +2325,7 @@ var R = class e {
|
|
|
2308
2325
|
].indexOf(e) !== -1 && (n.second = "2-digit")), n;
|
|
2309
2326
|
}
|
|
2310
2327
|
}, z = {}, B = {}, it = class e {
|
|
2311
|
-
constructor(e, t = "date", n =
|
|
2328
|
+
constructor(e, t = "date", n = A.getLocation()) {
|
|
2312
2329
|
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({
|
|
2313
2330
|
group: "intl",
|
|
2314
2331
|
code: "invalid"
|
|
@@ -2599,7 +2616,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2599
2616
|
return this.list ? this.isArray() ? this.list.length : 1 : 0;
|
|
2600
2617
|
}
|
|
2601
2618
|
getList() {
|
|
2602
|
-
return this.list ?
|
|
2619
|
+
return this.list ? M(this.list) : [];
|
|
2603
2620
|
}
|
|
2604
2621
|
getOptions() {
|
|
2605
2622
|
return this.options;
|
|
@@ -2656,11 +2673,11 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2656
2673
|
return t && t.unit ? R.getInstance().unit(e, t.unit) : e;
|
|
2657
2674
|
}
|
|
2658
2675
|
}, st = "f", ct = class e {
|
|
2659
|
-
constructor(e =
|
|
2676
|
+
constructor(e = A.getLocation()) {
|
|
2660
2677
|
w(this, "code", void 0), this.code = e;
|
|
2661
2678
|
}
|
|
2662
2679
|
get(t = this.getCode()) {
|
|
2663
|
-
let n =
|
|
2680
|
+
let n = A.find(t);
|
|
2664
2681
|
if (n) {
|
|
2665
2682
|
var r;
|
|
2666
2683
|
let t = this.getCountry(n);
|
|
@@ -2676,7 +2693,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2676
2693
|
}
|
|
2677
2694
|
}
|
|
2678
2695
|
getCode() {
|
|
2679
|
-
return this.code ||
|
|
2696
|
+
return this.code || A.getLocation();
|
|
2680
2697
|
}
|
|
2681
2698
|
getFlag(e = this.getCode()) {
|
|
2682
2699
|
var t;
|
|
@@ -3015,11 +3032,11 @@ var lt = class {
|
|
|
3015
3032
|
return (t = (n = e.match(/\*/g)) == null ? void 0 : n.length) == null ? 0 : t;
|
|
3016
3033
|
}
|
|
3017
3034
|
static makeList() {
|
|
3018
|
-
let e = r(
|
|
3035
|
+
let e = r(A.getList(), (e) => {
|
|
3019
3036
|
if (e != null && e.phoneMask) return {
|
|
3020
3037
|
phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/g, "")) || void 0,
|
|
3021
3038
|
within: (e == null ? void 0 : e.phoneWithin) || 0,
|
|
3022
|
-
mask:
|
|
3039
|
+
mask: M(e.phoneMask),
|
|
3023
3040
|
value: e.country
|
|
3024
3041
|
};
|
|
3025
3042
|
});
|
|
@@ -3063,7 +3080,7 @@ w(lt, "list", void 0), w(lt, "map", void 0);
|
|
|
3063
3080
|
//#region src/classes/Global.ts
|
|
3064
3081
|
var ut = class {
|
|
3065
3082
|
static getItem() {
|
|
3066
|
-
return
|
|
3083
|
+
return D.get("__ui:global-instance__", () => ({}));
|
|
3067
3084
|
}
|
|
3068
3085
|
static get(e) {
|
|
3069
3086
|
var t;
|
|
@@ -3075,16 +3092,16 @@ var ut = class {
|
|
|
3075
3092
|
}
|
|
3076
3093
|
}, dt = class {
|
|
3077
3094
|
constructor() {
|
|
3078
|
-
w(this, "
|
|
3095
|
+
w(this, "data", void 0), w(this, "watch", {}), w(this, "block", !1), w(this, "time", void 0);
|
|
3079
3096
|
}
|
|
3080
3097
|
get(e, t) {
|
|
3081
|
-
let n = this.
|
|
3098
|
+
let n = this.getData();
|
|
3082
3099
|
return !(e in n) && t && this.set(e, t), n[e];
|
|
3083
3100
|
}
|
|
3084
3101
|
set(e, t) {
|
|
3085
3102
|
var n;
|
|
3086
3103
|
let r = m(t);
|
|
3087
|
-
return r !== ((n = this.
|
|
3104
|
+
return r !== ((n = this.data) == null ? void 0 : n[e]) && (this.getData()[e] = r, this.update()), this;
|
|
3088
3105
|
}
|
|
3089
3106
|
addWatch(e, t) {
|
|
3090
3107
|
if (e in this.watch) {
|
|
@@ -3101,29 +3118,36 @@ var ut = class {
|
|
|
3101
3118
|
reload() {
|
|
3102
3119
|
return this.block ? setTimeout(() => this.reload(), 32) : this.initData(), this;
|
|
3103
3120
|
}
|
|
3121
|
+
getData() {
|
|
3122
|
+
return this.data || this.init(), this.data;
|
|
3123
|
+
}
|
|
3124
|
+
initData() {
|
|
3125
|
+
let e = this.getLocation();
|
|
3126
|
+
return this.makeWatch(e), this.data = e, this;
|
|
3127
|
+
}
|
|
3128
|
+
makeWatch(e) {
|
|
3129
|
+
return r(this.watch, (t, n) => {
|
|
3130
|
+
var r;
|
|
3131
|
+
((r = this.data) == null ? void 0 : r[n]) !== (e == null ? void 0 : e[n]) && t.forEach((t) => t(e[n]));
|
|
3132
|
+
}), this;
|
|
3133
|
+
}
|
|
3134
|
+
}, ft = class extends dt {
|
|
3135
|
+
init() {
|
|
3136
|
+
return this.initData(), s() && addEventListener("hashchange", () => this.reload()), this;
|
|
3137
|
+
}
|
|
3104
3138
|
getLocation() {
|
|
3105
3139
|
let e = {};
|
|
3106
3140
|
if (s()) {
|
|
3107
3141
|
let t = location.hash.matchAll(/([\w-]+)[:=]([^;]+)/gi);
|
|
3108
|
-
for (let n of t) e[n[1]] =
|
|
3142
|
+
for (let n of t) e[n[1]] = E(n[2]);
|
|
3109
3143
|
}
|
|
3110
3144
|
return e;
|
|
3111
3145
|
}
|
|
3112
|
-
getHash() {
|
|
3113
|
-
return this.hash || this.init(), this.hash;
|
|
3114
|
-
}
|
|
3115
|
-
init() {
|
|
3116
|
-
return this.initData(), s() && addEventListener("hashchange", () => this.reload()), this;
|
|
3117
|
-
}
|
|
3118
|
-
initData() {
|
|
3119
|
-
let e = this.getLocation();
|
|
3120
|
-
return this.makeWatch(e), this.hash = e, this;
|
|
3121
|
-
}
|
|
3122
3146
|
update() {
|
|
3123
3147
|
if (s()) {
|
|
3124
3148
|
clearTimeout(this.time), this.block = !0;
|
|
3125
3149
|
try {
|
|
3126
|
-
let e = this.
|
|
3150
|
+
let e = this.getData();
|
|
3127
3151
|
history.replaceState(null, "", `#${o(e, "=", ";")}`);
|
|
3128
3152
|
} finally {
|
|
3129
3153
|
this.time = setTimeout(() => {
|
|
@@ -3133,15 +3157,9 @@ var ut = class {
|
|
|
3133
3157
|
}
|
|
3134
3158
|
return this;
|
|
3135
3159
|
}
|
|
3136
|
-
|
|
3137
|
-
return r(this.watch, (t, n) => {
|
|
3138
|
-
var r;
|
|
3139
|
-
((r = this.hash) == null ? void 0 : r[n]) !== (e == null ? void 0 : e[n]) && t.forEach((t) => t(e[n]));
|
|
3140
|
-
}), this;
|
|
3141
|
-
}
|
|
3142
|
-
}, ft = class {
|
|
3160
|
+
}, pt = class {
|
|
3143
3161
|
static getItem() {
|
|
3144
|
-
return
|
|
3162
|
+
return D.get("__ui:hash-instance__", () => new ft());
|
|
3145
3163
|
}
|
|
3146
3164
|
static get(e, t) {
|
|
3147
3165
|
return this.getItem().get(e, t);
|
|
@@ -3158,17 +3176,17 @@ var ut = class {
|
|
|
3158
3176
|
static reload() {
|
|
3159
3177
|
this.getItem().reload();
|
|
3160
3178
|
}
|
|
3161
|
-
},
|
|
3179
|
+
}, mt = 320, ht = "--LOAD--", gt = class {
|
|
3162
3180
|
static is(e) {
|
|
3163
3181
|
return e in this.icons || this.getName(e) in this.icons;
|
|
3164
3182
|
}
|
|
3165
3183
|
static async get(e, t = "", n = 1e3 * 60 * 3) {
|
|
3166
3184
|
let r = this.getRaw(e, t);
|
|
3167
|
-
return typeof r == "string" ? r ===
|
|
3185
|
+
return typeof r == "string" ? r === ht && n > 0 ? (await this.wait(), this.get(e, t, n - mt)) : r : p(r) ? await r() : await r;
|
|
3168
3186
|
}
|
|
3169
3187
|
static getAsync(e, t = "") {
|
|
3170
3188
|
let n = this.getRaw(e, t);
|
|
3171
|
-
return typeof n == "string" && n !==
|
|
3189
|
+
return typeof n == "string" && n !== ht ? n : "";
|
|
3172
3190
|
}
|
|
3173
3191
|
static getNameList() {
|
|
3174
3192
|
return r(this.icons, (e, t) => t.replace(/^@/, ""));
|
|
@@ -3180,7 +3198,7 @@ var ut = class {
|
|
|
3180
3198
|
this.icons[this.getName(e)] = t;
|
|
3181
3199
|
}
|
|
3182
3200
|
static addLoad(e) {
|
|
3183
|
-
this.icons[this.getName(e)] =
|
|
3201
|
+
this.icons[this.getName(e)] = ht;
|
|
3184
3202
|
}
|
|
3185
3203
|
static addGlobal(e, t) {
|
|
3186
3204
|
this.icons[this.getName(e)] = `${this.getUrlGlobal()}${t}`;
|
|
@@ -3202,22 +3220,22 @@ var ut = class {
|
|
|
3202
3220
|
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;
|
|
3203
3221
|
}
|
|
3204
3222
|
static wait() {
|
|
3205
|
-
return new Promise((e) => setTimeout(() => e(),
|
|
3223
|
+
return new Promise((e) => setTimeout(() => e(), mt));
|
|
3206
3224
|
}
|
|
3207
3225
|
};
|
|
3208
|
-
w(
|
|
3226
|
+
w(gt, "icons", {}), w(gt, "url", "/icons/");
|
|
3209
3227
|
//#endregion
|
|
3210
3228
|
//#region src/functions/getElementItem.ts
|
|
3211
|
-
function
|
|
3229
|
+
function _t(e, t, n) {
|
|
3212
3230
|
var r, i;
|
|
3213
|
-
return (r = (i =
|
|
3231
|
+
return (r = (i = j(e)) == null ? void 0 : i[t]) == null ? n : r;
|
|
3214
3232
|
}
|
|
3215
3233
|
//#endregion
|
|
3216
3234
|
//#region src/functions/setElementItem.ts
|
|
3217
|
-
function
|
|
3218
|
-
let a =
|
|
3235
|
+
function vt(e, n, i) {
|
|
3236
|
+
let a = j(e);
|
|
3219
3237
|
if (a) {
|
|
3220
|
-
let e =
|
|
3238
|
+
let e = _t(a, n);
|
|
3221
3239
|
if (t(e) && t(i)) r(i, (t, n) => {
|
|
3222
3240
|
e[n] = m(t);
|
|
3223
3241
|
});
|
|
@@ -3234,12 +3252,12 @@ function U(e, t = "div", i, a) {
|
|
|
3234
3252
|
if (!s()) return;
|
|
3235
3253
|
let o = document.createElement(t);
|
|
3236
3254
|
return typeof i == "function" ? i(o) : n(i) && r(i, (e, t) => {
|
|
3237
|
-
|
|
3255
|
+
vt(o, t, e);
|
|
3238
3256
|
}), e == null || e.insertBefore(o, a == null ? null : a), o;
|
|
3239
3257
|
}
|
|
3240
3258
|
//#endregion
|
|
3241
3259
|
//#region src/functions/encodeAttribute.ts
|
|
3242
|
-
var
|
|
3260
|
+
var yt = {
|
|
3243
3261
|
"&": "&",
|
|
3244
3262
|
"<": "<",
|
|
3245
3263
|
">": ">",
|
|
@@ -3249,7 +3267,7 @@ var vt = {
|
|
|
3249
3267
|
function W(e) {
|
|
3250
3268
|
return String(e).replace(/[&<>"']/g, (e) => {
|
|
3251
3269
|
var t;
|
|
3252
|
-
return (t =
|
|
3270
|
+
return (t = yt == null ? void 0 : yt[e]) == null ? e : t;
|
|
3253
3271
|
});
|
|
3254
3272
|
}
|
|
3255
3273
|
//#endregion
|
|
@@ -3306,7 +3324,7 @@ var G = class {
|
|
|
3306
3324
|
return r ? `<meta ${this.getAttributeName()}="${e}" content="${r}">` : "";
|
|
3307
3325
|
}
|
|
3308
3326
|
toHtmlTitle(e) {
|
|
3309
|
-
return
|
|
3327
|
+
return pe(e);
|
|
3310
3328
|
}
|
|
3311
3329
|
update() {
|
|
3312
3330
|
return this.listMeta.forEach((e) => {
|
|
@@ -3316,25 +3334,25 @@ var G = class {
|
|
|
3316
3334
|
}
|
|
3317
3335
|
}, K = /* @__PURE__ */ function(e) {
|
|
3318
3336
|
return e.title = "title", e.description = "description", e.keywords = "keywords", e.canonical = "canonical", e.robots = "robots", e.author = "author", e;
|
|
3319
|
-
}({}),
|
|
3337
|
+
}({}), bt = /* @__PURE__ */ function(e) {
|
|
3320
3338
|
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;
|
|
3321
3339
|
}({}), q = /* @__PURE__ */ function(e) {
|
|
3322
3340
|
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;
|
|
3323
|
-
}({}), bt = /* @__PURE__ */ function(e) {
|
|
3324
|
-
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;
|
|
3325
3341
|
}({}), xt = /* @__PURE__ */ function(e) {
|
|
3326
|
-
return e.
|
|
3342
|
+
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;
|
|
3327
3343
|
}({}), St = /* @__PURE__ */ function(e) {
|
|
3328
|
-
return e.
|
|
3344
|
+
return e.inStock = "in stock", e.outOfStock = "out of stock", e.preorder = "preorder", e.backorder = "backorder", e.discontinued = "discontinued", e.pending = "pending", e;
|
|
3329
3345
|
}({}), Ct = /* @__PURE__ */ function(e) {
|
|
3330
|
-
return e.
|
|
3346
|
+
return e.new = "new", e.used = "used", e.refurbished = "refurbished", e;
|
|
3331
3347
|
}({}), wt = /* @__PURE__ */ function(e) {
|
|
3348
|
+
return e.newborn = "newborn", e.infant = "infant", e.toddler = "toddler", e.kids = "kids", e.adult = "adult", e;
|
|
3349
|
+
}({}), Tt = /* @__PURE__ */ function(e) {
|
|
3332
3350
|
return e.female = "female", e.male = "male", e.unisex = "unisex", e;
|
|
3333
3351
|
}({}), J = /* @__PURE__ */ function(e) {
|
|
3334
3352
|
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;
|
|
3335
|
-
}({}),
|
|
3353
|
+
}({}), Et = /* @__PURE__ */ function(e) {
|
|
3336
3354
|
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;
|
|
3337
|
-
}({}),
|
|
3355
|
+
}({}), Dt = class extends G {
|
|
3338
3356
|
constructor() {
|
|
3339
3357
|
super(Object.values(q), !0);
|
|
3340
3358
|
}
|
|
@@ -3380,7 +3398,7 @@ var G = class {
|
|
|
3380
3398
|
setSiteName(e) {
|
|
3381
3399
|
return this.set(q.siteName, e);
|
|
3382
3400
|
}
|
|
3383
|
-
},
|
|
3401
|
+
}, Ot = class extends G {
|
|
3384
3402
|
constructor() {
|
|
3385
3403
|
super(Object.values(J));
|
|
3386
3404
|
}
|
|
@@ -3426,9 +3444,9 @@ var G = class {
|
|
|
3426
3444
|
setImage(e) {
|
|
3427
3445
|
return this.set(J.image, e), this;
|
|
3428
3446
|
}
|
|
3429
|
-
},
|
|
3447
|
+
}, kt = class extends G {
|
|
3430
3448
|
constructor() {
|
|
3431
|
-
super(Object.values(K)), w(this, "suffix", void 0), w(this, "og", void 0), w(this, "twitter", void 0), this.og = new
|
|
3449
|
+
super(Object.values(K)), w(this, "suffix", void 0), w(this, "og", void 0), w(this, "twitter", void 0), this.og = new Dt(), this.twitter = new Ot();
|
|
3432
3450
|
}
|
|
3433
3451
|
getOg() {
|
|
3434
3452
|
return this.og;
|
|
@@ -3469,7 +3487,7 @@ var G = class {
|
|
|
3469
3487
|
return s() && (document.title = t), this.set(K.title, t), this.og.setTitle(t), this.twitter.setTitle(t), this;
|
|
3470
3488
|
}
|
|
3471
3489
|
setKeywords(e) {
|
|
3472
|
-
return this.set(K.keywords,
|
|
3490
|
+
return this.set(K.keywords, M(e).join(", ")), this;
|
|
3473
3491
|
}
|
|
3474
3492
|
setDescription(e) {
|
|
3475
3493
|
return this.set(K.description, e), this;
|
|
@@ -3504,9 +3522,9 @@ var G = class {
|
|
|
3504
3522
|
getSuffix() {
|
|
3505
3523
|
return l(this.suffix) ? ` - ${this.suffix}` : "";
|
|
3506
3524
|
}
|
|
3507
|
-
},
|
|
3525
|
+
}, At = class {
|
|
3508
3526
|
static getItem() {
|
|
3509
|
-
return
|
|
3527
|
+
return D.get("__ui:meta-instance__", () => new kt());
|
|
3510
3528
|
}
|
|
3511
3529
|
static getOg() {
|
|
3512
3530
|
return this.getItem().getOg();
|
|
@@ -3577,7 +3595,126 @@ var G = class {
|
|
|
3577
3595
|
static htmlTitle() {
|
|
3578
3596
|
return this.getItem().htmlTitle();
|
|
3579
3597
|
}
|
|
3580
|
-
},
|
|
3598
|
+
}, Y = class e {
|
|
3599
|
+
static getInstance() {
|
|
3600
|
+
return D.get("__ui:url-item__", () => new e());
|
|
3601
|
+
}
|
|
3602
|
+
constructor(e) {
|
|
3603
|
+
w(this, "url", void 0), this.set(e);
|
|
3604
|
+
}
|
|
3605
|
+
get href() {
|
|
3606
|
+
return this.url.href;
|
|
3607
|
+
}
|
|
3608
|
+
get protocol() {
|
|
3609
|
+
return this.url.protocol;
|
|
3610
|
+
}
|
|
3611
|
+
get username() {
|
|
3612
|
+
return this.url.username;
|
|
3613
|
+
}
|
|
3614
|
+
get password() {
|
|
3615
|
+
return this.url.password;
|
|
3616
|
+
}
|
|
3617
|
+
get host() {
|
|
3618
|
+
return this.url.host;
|
|
3619
|
+
}
|
|
3620
|
+
get hostname() {
|
|
3621
|
+
return this.url.hostname;
|
|
3622
|
+
}
|
|
3623
|
+
get port() {
|
|
3624
|
+
return this.url.port;
|
|
3625
|
+
}
|
|
3626
|
+
get pathname() {
|
|
3627
|
+
return this.url.pathname;
|
|
3628
|
+
}
|
|
3629
|
+
get search() {
|
|
3630
|
+
return this.url.search;
|
|
3631
|
+
}
|
|
3632
|
+
get searchParams() {
|
|
3633
|
+
return this.url.searchParams;
|
|
3634
|
+
}
|
|
3635
|
+
get hash() {
|
|
3636
|
+
return this.url.hash;
|
|
3637
|
+
}
|
|
3638
|
+
get origin() {
|
|
3639
|
+
return this.url.origin;
|
|
3640
|
+
}
|
|
3641
|
+
hasParam(e) {
|
|
3642
|
+
return this.url.searchParams.has(e);
|
|
3643
|
+
}
|
|
3644
|
+
getParam(e) {
|
|
3645
|
+
var t;
|
|
3646
|
+
return (t = this.url.searchParams.get(e)) == null ? void 0 : t;
|
|
3647
|
+
}
|
|
3648
|
+
getParams() {
|
|
3649
|
+
let e = {};
|
|
3650
|
+
return this.url.searchParams.forEach((t, n) => {
|
|
3651
|
+
e[n] = E(t);
|
|
3652
|
+
}), e;
|
|
3653
|
+
}
|
|
3654
|
+
set(e) {
|
|
3655
|
+
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;
|
|
3656
|
+
}
|
|
3657
|
+
setParam(e, t) {
|
|
3658
|
+
return this.url.searchParams.set(e, t), this;
|
|
3659
|
+
}
|
|
3660
|
+
setParams(e) {
|
|
3661
|
+
return Array.from(this.url.searchParams.keys()).forEach((e) => this.deleteParam(e)), r(e, (e, t) => {
|
|
3662
|
+
l(e) && this.setParam(t, String(e));
|
|
3663
|
+
}), this;
|
|
3664
|
+
}
|
|
3665
|
+
deleteParam(e) {
|
|
3666
|
+
return this.url.searchParams.delete(e), this;
|
|
3667
|
+
}
|
|
3668
|
+
toString() {
|
|
3669
|
+
return this.url.toString();
|
|
3670
|
+
}
|
|
3671
|
+
toJSON() {
|
|
3672
|
+
return this.url.toJSON();
|
|
3673
|
+
}
|
|
3674
|
+
}, jt = class extends dt {
|
|
3675
|
+
init() {
|
|
3676
|
+
return s() && addEventListener("popstate", () => {
|
|
3677
|
+
Y.getInstance().set(), this.reload();
|
|
3678
|
+
}), this.initData(), this;
|
|
3679
|
+
}
|
|
3680
|
+
getLocation() {
|
|
3681
|
+
return s() && Y.getInstance().set(), Y.getInstance().getParams();
|
|
3682
|
+
}
|
|
3683
|
+
update() {
|
|
3684
|
+
let e = this.getData(), t = Y.getInstance();
|
|
3685
|
+
if (t.setParams(e), s()) {
|
|
3686
|
+
clearTimeout(this.time), this.block = !0;
|
|
3687
|
+
try {
|
|
3688
|
+
let e = t.search, n = `${location.pathname}${e}${location.hash}`;
|
|
3689
|
+
history.replaceState(null, "", n);
|
|
3690
|
+
} finally {
|
|
3691
|
+
this.time = setTimeout(() => {
|
|
3692
|
+
this.block = !1;
|
|
3693
|
+
}, 120);
|
|
3694
|
+
}
|
|
3695
|
+
}
|
|
3696
|
+
return this;
|
|
3697
|
+
}
|
|
3698
|
+
}, Mt = class {
|
|
3699
|
+
static getItem() {
|
|
3700
|
+
return D.get("__ui:query-instance__", () => new jt());
|
|
3701
|
+
}
|
|
3702
|
+
static get(e, t) {
|
|
3703
|
+
return this.getItem().get(e, t);
|
|
3704
|
+
}
|
|
3705
|
+
static set(e, t) {
|
|
3706
|
+
this.getItem().set(e, t);
|
|
3707
|
+
}
|
|
3708
|
+
static addWatch(e, t) {
|
|
3709
|
+
this.getItem().addWatch(e, t);
|
|
3710
|
+
}
|
|
3711
|
+
static removeWatch(e, t) {
|
|
3712
|
+
this.getItem().removeWatch(e, t);
|
|
3713
|
+
}
|
|
3714
|
+
static reload() {
|
|
3715
|
+
this.getItem().reload();
|
|
3716
|
+
}
|
|
3717
|
+
}, Nt = class {
|
|
3581
3718
|
constructor(e, t = 320, n = !1) {
|
|
3582
3719
|
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();
|
|
3583
3720
|
}
|
|
@@ -3615,7 +3752,7 @@ var G = class {
|
|
|
3615
3752
|
stop() {
|
|
3616
3753
|
return this.timerId && (clearTimeout(this.timerId), this.timerId = void 0), this;
|
|
3617
3754
|
}
|
|
3618
|
-
},
|
|
3755
|
+
}, Pt = class {
|
|
3619
3756
|
static async is() {
|
|
3620
3757
|
let e = await this.get();
|
|
3621
3758
|
return e !== -1 && e <= 8;
|
|
@@ -3631,7 +3768,7 @@ var G = class {
|
|
|
3631
3768
|
return t;
|
|
3632
3769
|
}
|
|
3633
3770
|
static getStorage() {
|
|
3634
|
-
return new
|
|
3771
|
+
return new O("__ui:scrollbar__", !0);
|
|
3635
3772
|
}
|
|
3636
3773
|
static getCalculate() {
|
|
3637
3774
|
return this.calculate;
|
|
@@ -3653,34 +3790,34 @@ var G = class {
|
|
|
3653
3790
|
});
|
|
3654
3791
|
}
|
|
3655
3792
|
};
|
|
3656
|
-
w(
|
|
3793
|
+
w(Pt, "calculate", !1);
|
|
3657
3794
|
//#endregion
|
|
3658
3795
|
//#region src/functions/escapeExp.ts
|
|
3659
|
-
function
|
|
3796
|
+
function X(e) {
|
|
3660
3797
|
return String(e).replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
3661
3798
|
}
|
|
3662
3799
|
//#endregion
|
|
3663
3800
|
//#region src/functions/getSeparatingSearchExp.ts
|
|
3664
|
-
function
|
|
3801
|
+
function Ft(e, t = 128) {
|
|
3665
3802
|
if (e instanceof RegExp) return e;
|
|
3666
3803
|
if (!e || e.trim().length === 0 || e.length > t) return /^/;
|
|
3667
|
-
let n = String(e).replace(/\s+/g, " ").trim().split(" ").map(
|
|
3804
|
+
let n = String(e).replace(/\s+/g, " ").trim().split(" ").map(X).join("|");
|
|
3668
3805
|
return RegExp(`(${n})`, "ig");
|
|
3669
3806
|
}
|
|
3670
3807
|
//#endregion
|
|
3671
3808
|
//#region src/functions/addTagHighlightMatch.ts
|
|
3672
|
-
var
|
|
3673
|
-
function
|
|
3809
|
+
var It = `___HIGHLIGHT_START_${f(1e5, 999999)}___`, Lt = `___HIGHLIGHT_END_${f(1e5, 999999)}___`, Rt = RegExp(`${It}|${Lt}`, "g");
|
|
3810
|
+
function zt(e, t, n = "sys-highlight-match", r = !1) {
|
|
3674
3811
|
let i = a(e);
|
|
3675
3812
|
if (l(i) && l(t)) {
|
|
3676
|
-
let e = i.replace(
|
|
3677
|
-
return r && (e = W(e)), e.replace(
|
|
3813
|
+
let e = i.replace(Ft(t), `${It}$1${Lt}`);
|
|
3814
|
+
return r && (e = W(e)), e.replace(Rt, (e) => e === It ? `<span class="${n}">` : "</span>");
|
|
3678
3815
|
}
|
|
3679
3816
|
return r ? W(i) : i;
|
|
3680
3817
|
}
|
|
3681
3818
|
//#endregion
|
|
3682
3819
|
//#region src/classes/SearchListData.ts
|
|
3683
|
-
var
|
|
3820
|
+
var Bt = class {
|
|
3684
3821
|
constructor(e, t, n, r) {
|
|
3685
3822
|
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;
|
|
3686
3823
|
}
|
|
@@ -3731,7 +3868,7 @@ var Lt = class {
|
|
|
3731
3868
|
return e.replace(/\.([a-z0-9])/gi, (e, t) => t.toUpperCase()) + "Search";
|
|
3732
3869
|
}
|
|
3733
3870
|
addTag(e) {
|
|
3734
|
-
return
|
|
3871
|
+
return zt(S(e), this.item.get(), this.options.getClassName());
|
|
3735
3872
|
}
|
|
3736
3873
|
generateCache() {
|
|
3737
3874
|
if (!this.isList()) return [];
|
|
@@ -3755,7 +3892,7 @@ var Lt = class {
|
|
|
3755
3892
|
resetCache() {
|
|
3756
3893
|
this.listCache = void 0;
|
|
3757
3894
|
}
|
|
3758
|
-
},
|
|
3895
|
+
}, Vt = class {
|
|
3759
3896
|
constructor(e, t) {
|
|
3760
3897
|
w(this, "value", void 0), w(this, "options", void 0), this.value = e, this.options = t;
|
|
3761
3898
|
}
|
|
@@ -3775,28 +3912,28 @@ var Lt = class {
|
|
|
3775
3912
|
};
|
|
3776
3913
|
//#endregion
|
|
3777
3914
|
//#region src/functions/getExp.ts
|
|
3778
|
-
function
|
|
3779
|
-
let r =
|
|
3915
|
+
function Ht(e, t = "ig", n = ":value") {
|
|
3916
|
+
let r = X(e);
|
|
3780
3917
|
return new RegExp(n.replace(/:value/g, r), t);
|
|
3781
3918
|
}
|
|
3782
3919
|
//#endregion
|
|
3783
3920
|
//#region src/functions/getExactSearchExp.ts
|
|
3784
|
-
function
|
|
3785
|
-
return
|
|
3921
|
+
function Ut(e) {
|
|
3922
|
+
return Ht(e, "i", "(:value)");
|
|
3786
3923
|
}
|
|
3787
3924
|
//#endregion
|
|
3788
3925
|
//#region src/functions/getSearchExp.ts
|
|
3789
|
-
function
|
|
3926
|
+
function Wt(e, t = 128) {
|
|
3790
3927
|
if (!d(e) || e.trim().length === 0 || e.length > t) return /^/;
|
|
3791
3928
|
let n = [];
|
|
3792
3929
|
return a(e).split(" ").forEach((e) => {
|
|
3793
|
-
let t =
|
|
3930
|
+
let t = X(e).trim();
|
|
3794
3931
|
l(t) && n.push(`(?=.*?${t})`);
|
|
3795
3932
|
}), RegExp(`^${n.join("")}`, "i");
|
|
3796
3933
|
}
|
|
3797
3934
|
//#endregion
|
|
3798
3935
|
//#region src/classes/SearchListMatcher.ts
|
|
3799
|
-
var
|
|
3936
|
+
var Gt = class {
|
|
3800
3937
|
constructor(e, t) {
|
|
3801
3938
|
w(this, "item", void 0), w(this, "options", void 0), w(this, "matcher", void 0), this.item = e, this.options = t, this.initMatcher();
|
|
3802
3939
|
}
|
|
@@ -3813,9 +3950,9 @@ var Ht = class {
|
|
|
3813
3950
|
this.initMatcher();
|
|
3814
3951
|
}
|
|
3815
3952
|
initMatcher() {
|
|
3816
|
-
this.item.is() ? this.matcher = this.options.getFindExactMatch() ?
|
|
3953
|
+
this.item.is() ? this.matcher = this.options.getFindExactMatch() ? Ut(this.item.get()) : Wt(this.item.get()) : this.matcher = void 0;
|
|
3817
3954
|
}
|
|
3818
|
-
},
|
|
3955
|
+
}, Kt = class {
|
|
3819
3956
|
constructor(e) {
|
|
3820
3957
|
w(this, "options", void 0), this.options = e;
|
|
3821
3958
|
}
|
|
@@ -3845,12 +3982,12 @@ var Ht = class {
|
|
|
3845
3982
|
setOptions(e) {
|
|
3846
3983
|
return this.options = e, this;
|
|
3847
3984
|
}
|
|
3848
|
-
},
|
|
3985
|
+
}, qt = class {
|
|
3849
3986
|
constructor(e, t, n, r) {
|
|
3850
3987
|
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) => {
|
|
3851
3988
|
if (this.matcher.isSelection(t)) return this.data.toFormatItem(e, !0);
|
|
3852
3989
|
if (this.options.getReturnEverything()) return this.data.toFormatItem(e, !1);
|
|
3853
|
-
}), w(this, "callbackToNone", (e) => this.data.toFormatItem(e, !1)), this.options = new
|
|
3990
|
+
}), w(this, "callbackToNone", (e) => this.data.toFormatItem(e, !1)), this.options = new Kt(r), this.item = new Vt(n, this.options), this.matcher = new Gt(this.item, this.options), this.data = new Bt(e, t, this.item, this.options);
|
|
3854
3991
|
}
|
|
3855
3992
|
getData() {
|
|
3856
3993
|
return this.data;
|
|
@@ -3887,13 +4024,13 @@ var Ht = class {
|
|
|
3887
4024
|
let e = this.data.getList();
|
|
3888
4025
|
return e ? r(e, this.callbackToNone) : [];
|
|
3889
4026
|
}
|
|
3890
|
-
},
|
|
4027
|
+
}, Jt = () => D.get("__ui:storage-callback__", () => ({})), Yt = class e {
|
|
3891
4028
|
static getInstance(t, n = "main") {
|
|
3892
4029
|
return new e(t, n);
|
|
3893
4030
|
}
|
|
3894
4031
|
constructor(e, t = "main") {
|
|
3895
4032
|
w(this, "name", void 0), w(this, "group", void 0), w(this, "callbacks", []), w(this, "loading", !1), this.name = e, this.group = t;
|
|
3896
|
-
let n = `${t}:${e}`, r =
|
|
4033
|
+
let n = `${t}:${e}`, r = Jt();
|
|
3897
4034
|
if (n in r) return r[n];
|
|
3898
4035
|
r[n] = this;
|
|
3899
4036
|
}
|
|
@@ -3923,7 +4060,7 @@ var Ht = class {
|
|
|
3923
4060
|
for (let { callback: t, isOnce: n } of this.callbacks) await Je(t, e), n && this.removeCallback(t);
|
|
3924
4061
|
return this;
|
|
3925
4062
|
}
|
|
3926
|
-
},
|
|
4063
|
+
}, Xt = [
|
|
3927
4064
|
"d",
|
|
3928
4065
|
"e",
|
|
3929
4066
|
"f",
|
|
@@ -3943,10 +4080,10 @@ var Ht = class {
|
|
|
3943
4080
|
"t",
|
|
3944
4081
|
"u",
|
|
3945
4082
|
"v"
|
|
3946
|
-
],
|
|
4083
|
+
], Zt = RegExp(`%(${Xt.join("|")})`, "g"), Qt = (e, t = {}) => {
|
|
3947
4084
|
let r = String(e);
|
|
3948
|
-
return Array.isArray(t) && e.match(/%[a-z]/) && (r = r.replace(
|
|
3949
|
-
let r =
|
|
4085
|
+
return Array.isArray(t) && e.match(/%[a-z]/) && (r = r.replace(Zt, (e, n) => {
|
|
4086
|
+
let r = Xt.indexOf(n);
|
|
3950
4087
|
if (r !== -1) {
|
|
3951
4088
|
var i;
|
|
3952
4089
|
return String((i = t == null ? void 0 : t[r]) == null ? "" : i);
|
|
@@ -3965,11 +4102,11 @@ var Ht = class {
|
|
|
3965
4102
|
}
|
|
3966
4103
|
return e;
|
|
3967
4104
|
})), r;
|
|
3968
|
-
},
|
|
4105
|
+
}, $t = (e) => {
|
|
3969
4106
|
var t;
|
|
3970
4107
|
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()))));
|
|
3971
|
-
},
|
|
3972
|
-
constructor(e, t = () =>
|
|
4108
|
+
}, en = "global", tn = 160, nn = class {
|
|
4109
|
+
constructor(e, t = () => A.getLanguage(), n = () => A.getLocation()) {
|
|
3973
4110
|
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);
|
|
3974
4111
|
}
|
|
3975
4112
|
isFile() {
|
|
@@ -3998,7 +4135,7 @@ var Ht = class {
|
|
|
3998
4135
|
if (e in this.files) return e;
|
|
3999
4136
|
let t = this.getLanguage();
|
|
4000
4137
|
if (t in this.files) return t;
|
|
4001
|
-
if ("global" in this.files) return
|
|
4138
|
+
if ("global" in this.files) return en;
|
|
4002
4139
|
}
|
|
4003
4140
|
getByData(e) {
|
|
4004
4141
|
if (e in this.data) return this.data[e];
|
|
@@ -4009,8 +4146,8 @@ var Ht = class {
|
|
|
4009
4146
|
return t && (this.data[e] = t), t;
|
|
4010
4147
|
}
|
|
4011
4148
|
}
|
|
4012
|
-
},
|
|
4013
|
-
constructor(e = "/api/translate", t = "list", n = new
|
|
4149
|
+
}, rn = class {
|
|
4150
|
+
constructor(e = "/api/translate", t = "list", n = new nn()) {
|
|
4014
4151
|
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;
|
|
4015
4152
|
}
|
|
4016
4153
|
async get(e, t) {
|
|
@@ -4099,11 +4236,11 @@ var Ht = class {
|
|
|
4099
4236
|
return `${this.files.getLanguage()}-${e}`;
|
|
4100
4237
|
}
|
|
4101
4238
|
getNameByGlobal(e) {
|
|
4102
|
-
return `${
|
|
4239
|
+
return `${en}-${e}`;
|
|
4103
4240
|
}
|
|
4104
4241
|
getNamesNone(e) {
|
|
4105
4242
|
let t = [];
|
|
4106
|
-
return
|
|
4243
|
+
return M(e).forEach((e) => {
|
|
4107
4244
|
e !== "__TRANSLATE_START__" && e !== "__TRANSLATE_END__" && !this.hasName(e) && t.push(e);
|
|
4108
4245
|
}), t;
|
|
4109
4246
|
}
|
|
@@ -4116,14 +4253,14 @@ var Ht = class {
|
|
|
4116
4253
|
timeout: 12e3,
|
|
4117
4254
|
global: !0
|
|
4118
4255
|
});
|
|
4119
|
-
return
|
|
4256
|
+
return $t(e) || T.on({
|
|
4120
4257
|
group: "translate",
|
|
4121
4258
|
code: "error",
|
|
4122
4259
|
details: e
|
|
4123
4260
|
}), e == null ? {} : e;
|
|
4124
4261
|
}
|
|
4125
4262
|
replacement(e, t) {
|
|
4126
|
-
return t ?
|
|
4263
|
+
return t ? Qt(e, t) : e;
|
|
4127
4264
|
}
|
|
4128
4265
|
async make() {
|
|
4129
4266
|
let e;
|
|
@@ -4135,12 +4272,12 @@ var Ht = class {
|
|
|
4135
4272
|
this.data[this.getName(t)] = (n = e == null ? void 0 : e[t]) == null ? "" : n;
|
|
4136
4273
|
}), this.cache = [];
|
|
4137
4274
|
}
|
|
4138
|
-
},
|
|
4275
|
+
}, an = class {
|
|
4139
4276
|
static async get(e, t) {
|
|
4140
4277
|
return this.getItem().get(e, t);
|
|
4141
4278
|
}
|
|
4142
4279
|
static getItem() {
|
|
4143
|
-
return this.item || (this.item = new
|
|
4280
|
+
return this.item || (this.item = new rn()), this.item;
|
|
4144
4281
|
}
|
|
4145
4282
|
static getSync(e, t = !1, n) {
|
|
4146
4283
|
return this.getItem().getSync(e, t, n);
|
|
@@ -4179,73 +4316,18 @@ var Ht = class {
|
|
|
4179
4316
|
e.url && this.getItem().setUrl(e.url), e.propsName && this.getItem().setPropsName(e.propsName), typeof e.readApi == "boolean" && this.getItem().setReadApi(e.readApi);
|
|
4180
4317
|
}
|
|
4181
4318
|
};
|
|
4182
|
-
w(
|
|
4183
|
-
//#endregion
|
|
4184
|
-
//#region src/classes/UrlItem.ts
|
|
4185
|
-
var nn = class e {
|
|
4186
|
-
static getInstance() {
|
|
4187
|
-
return E.get("__ui:url-item__", () => new e());
|
|
4188
|
-
}
|
|
4189
|
-
constructor(e) {
|
|
4190
|
-
w(this, "url", void 0), this.set(e);
|
|
4191
|
-
}
|
|
4192
|
-
get href() {
|
|
4193
|
-
return this.url.href;
|
|
4194
|
-
}
|
|
4195
|
-
get protocol() {
|
|
4196
|
-
return this.url.protocol;
|
|
4197
|
-
}
|
|
4198
|
-
get username() {
|
|
4199
|
-
return this.url.username;
|
|
4200
|
-
}
|
|
4201
|
-
get password() {
|
|
4202
|
-
return this.url.password;
|
|
4203
|
-
}
|
|
4204
|
-
get host() {
|
|
4205
|
-
return this.url.host;
|
|
4206
|
-
}
|
|
4207
|
-
get hostname() {
|
|
4208
|
-
return this.url.hostname;
|
|
4209
|
-
}
|
|
4210
|
-
get port() {
|
|
4211
|
-
return this.url.port;
|
|
4212
|
-
}
|
|
4213
|
-
get pathname() {
|
|
4214
|
-
return this.url.pathname;
|
|
4215
|
-
}
|
|
4216
|
-
get search() {
|
|
4217
|
-
return this.url.search;
|
|
4218
|
-
}
|
|
4219
|
-
get searchParams() {
|
|
4220
|
-
return this.url.searchParams;
|
|
4221
|
-
}
|
|
4222
|
-
get hash() {
|
|
4223
|
-
return this.url.hash;
|
|
4224
|
-
}
|
|
4225
|
-
get origin() {
|
|
4226
|
-
return this.url.origin;
|
|
4227
|
-
}
|
|
4228
|
-
set(e) {
|
|
4229
|
-
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;
|
|
4230
|
-
}
|
|
4231
|
-
toString() {
|
|
4232
|
-
return this.url.toString();
|
|
4233
|
-
}
|
|
4234
|
-
toJSON() {
|
|
4235
|
-
return this.url.toJSON();
|
|
4236
|
-
}
|
|
4237
|
-
};
|
|
4319
|
+
w(an, "item", void 0);
|
|
4238
4320
|
//#endregion
|
|
4239
4321
|
//#region src/functions/arrFill.ts
|
|
4240
|
-
function
|
|
4322
|
+
function on(e, t) {
|
|
4241
4323
|
return Array(t).fill(e);
|
|
4242
4324
|
}
|
|
4243
4325
|
//#endregion
|
|
4244
4326
|
//#region src/functions/blobToBase64.ts
|
|
4245
|
-
var
|
|
4327
|
+
var sn = () => cn() !== void 0, cn = () => {
|
|
4246
4328
|
var e;
|
|
4247
4329
|
return (e = globalThis) == null ? void 0 : e.Buffer;
|
|
4248
|
-
},
|
|
4330
|
+
}, ln = async (e) => new Promise((t, n) => {
|
|
4249
4331
|
if (typeof FileReader < "u") {
|
|
4250
4332
|
let r = new FileReader();
|
|
4251
4333
|
r.onloadend = () => {
|
|
@@ -4256,33 +4338,33 @@ var an = () => on() !== void 0, on = () => {
|
|
|
4256
4338
|
t(r.result.replace(/^data:.*?,/, ""));
|
|
4257
4339
|
}, r.onerror = n, r.readAsDataURL(e);
|
|
4258
4340
|
} else n();
|
|
4259
|
-
}),
|
|
4341
|
+
}), un = (e) => {
|
|
4260
4342
|
var t;
|
|
4261
4343
|
return ((t = globalThis) == null ? void 0 : t.Buffer).from(e).toString("base64");
|
|
4262
4344
|
};
|
|
4263
|
-
async function
|
|
4264
|
-
let n = s() ? await
|
|
4345
|
+
async function dn(e, t = !1) {
|
|
4346
|
+
let n = s() ? await ln(e) : sn() ? un(await e.arrayBuffer()) : void 0;
|
|
4265
4347
|
if (n) return t ? n : `data:${e.type};base64,${n}`;
|
|
4266
4348
|
}
|
|
4267
4349
|
//#endregion
|
|
4268
4350
|
//#region src/functions/capitalize.ts
|
|
4269
|
-
function
|
|
4351
|
+
function fn(e, t = !1) {
|
|
4270
4352
|
let n = String(e);
|
|
4271
|
-
return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(
|
|
4353
|
+
return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(A.getLocation()) + n.slice(1) : n.charAt(0).toUpperCase() + n.slice(1) : n;
|
|
4272
4354
|
}
|
|
4273
4355
|
//#endregion
|
|
4274
4356
|
//#region src/functions/copyObject.ts
|
|
4275
|
-
function
|
|
4357
|
+
function Z(e) {
|
|
4276
4358
|
return JSON.parse(JSON.stringify(e));
|
|
4277
4359
|
}
|
|
4278
4360
|
//#endregion
|
|
4279
4361
|
//#region src/functions/copyObjectLite.ts
|
|
4280
|
-
function
|
|
4362
|
+
function pn(e, t) {
|
|
4281
4363
|
return Object.assign({}, e, t);
|
|
4282
4364
|
}
|
|
4283
4365
|
//#endregion
|
|
4284
4366
|
//#region src/functions/domQuerySelector.ts
|
|
4285
|
-
function
|
|
4367
|
+
function mn(e) {
|
|
4286
4368
|
if (s()) {
|
|
4287
4369
|
var t;
|
|
4288
4370
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -4290,67 +4372,67 @@ function fn(e) {
|
|
|
4290
4372
|
}
|
|
4291
4373
|
//#endregion
|
|
4292
4374
|
//#region src/functions/domQuerySelectorAll.ts
|
|
4293
|
-
function
|
|
4375
|
+
function hn(e) {
|
|
4294
4376
|
if (s()) return document.querySelectorAll(e);
|
|
4295
4377
|
}
|
|
4296
4378
|
//#endregion
|
|
4297
4379
|
//#region src/functions/getElementImage.ts
|
|
4298
|
-
function
|
|
4380
|
+
function gn(e) {
|
|
4299
4381
|
return d(e) ? U(void 0, "img", { src: e }) : e;
|
|
4300
4382
|
}
|
|
4301
4383
|
//#endregion
|
|
4302
4384
|
//#region src/functions/resizeImageByMax.ts
|
|
4303
|
-
function
|
|
4385
|
+
function _n(e, t = "auto") {
|
|
4304
4386
|
switch (t) {
|
|
4305
4387
|
case "auto": return e.naturalWidth >= e.naturalHeight;
|
|
4306
4388
|
case "width": return !0;
|
|
4307
4389
|
case "height": return !1;
|
|
4308
4390
|
}
|
|
4309
4391
|
}
|
|
4310
|
-
function
|
|
4311
|
-
let i =
|
|
4392
|
+
function vn(e, t, n = "auto", r) {
|
|
4393
|
+
let i = gn(e);
|
|
4312
4394
|
if (s() && i && i.naturalWidth && i.naturalHeight && (i.naturalWidth > t && (n === "auto" || n === "width") || i.naturalHeight > t && (n === "auto" || n === "height"))) {
|
|
4313
4395
|
var a;
|
|
4314
|
-
let e =
|
|
4396
|
+
let e = _n(i, n), o = (a = document.createElement("canvas")) == null ? void 0 : a.getContext("2d");
|
|
4315
4397
|
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);
|
|
4316
4398
|
}
|
|
4317
4399
|
}
|
|
4318
4400
|
//#endregion
|
|
4319
4401
|
//#region src/functions/ensureMaxSize.ts
|
|
4320
|
-
async function
|
|
4402
|
+
async function yn(e, t = .56, n = "image/jpeg") {
|
|
4321
4403
|
return new Promise((r) => {
|
|
4322
4404
|
if (!s()) {
|
|
4323
4405
|
r("");
|
|
4324
4406
|
return;
|
|
4325
4407
|
}
|
|
4326
|
-
let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o =
|
|
4408
|
+
let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o = gn(a);
|
|
4327
4409
|
o ? (o.onload = () => {
|
|
4328
|
-
let e =
|
|
4410
|
+
let e = vn(o, t * o.naturalWidth, "width", n);
|
|
4329
4411
|
r(e == null ? "" : e), URL.revokeObjectURL(a);
|
|
4330
4412
|
}, o.onerror = () => {
|
|
4331
4413
|
URL.revokeObjectURL(a), r("");
|
|
4332
|
-
}) :
|
|
4414
|
+
}) : dn(i).then((e) => r(String(e == null ? "" : e)));
|
|
4333
4415
|
});
|
|
4334
4416
|
}
|
|
4335
4417
|
//#endregion
|
|
4336
4418
|
//#region src/functions/eventStopPropagation.ts
|
|
4337
|
-
function
|
|
4419
|
+
function bn(e) {
|
|
4338
4420
|
e.preventDefault(), e.stopPropagation();
|
|
4339
4421
|
}
|
|
4340
4422
|
//#endregion
|
|
4341
4423
|
//#region src/functions/frame.ts
|
|
4342
|
-
function
|
|
4424
|
+
function xn(e, t, n) {
|
|
4343
4425
|
let r = () => {
|
|
4344
|
-
e(), s() && t != null && t() ?
|
|
4426
|
+
e(), s() && t != null && t() ? xn(e, t, n) : n == null || n();
|
|
4345
4427
|
};
|
|
4346
4428
|
s() ? requestAnimationFrame(r) : r();
|
|
4347
4429
|
}
|
|
4348
4430
|
//#endregion
|
|
4349
4431
|
//#region src/functions/getArrayHighlightMatch.ts
|
|
4350
|
-
function
|
|
4432
|
+
function Sn(e, t) {
|
|
4351
4433
|
let n = a(e);
|
|
4352
4434
|
if (l(n) && l(t)) {
|
|
4353
|
-
let e = [], r =
|
|
4435
|
+
let e = [], r = Ft(t), i = 0, a;
|
|
4354
4436
|
for (; (a = r.exec(n)) !== null && a.index !== r.lastIndex;) a.index > i && e.push({
|
|
4355
4437
|
text: n.substring(i, a.index),
|
|
4356
4438
|
isMatch: !1
|
|
@@ -4370,8 +4452,8 @@ function yn(e, t) {
|
|
|
4370
4452
|
}
|
|
4371
4453
|
//#endregion
|
|
4372
4454
|
//#region src/functions/getAttributes.ts
|
|
4373
|
-
function
|
|
4374
|
-
let t = {}, n =
|
|
4455
|
+
function Cn(e) {
|
|
4456
|
+
let t = {}, n = j(e);
|
|
4375
4457
|
if (n) for (let e of n.attributes) {
|
|
4376
4458
|
var r;
|
|
4377
4459
|
t[e.name] = (r = (e == null ? void 0 : e.value) || (e == null ? void 0 : e.textContent)) == null ? void 0 : r;
|
|
@@ -4380,7 +4462,7 @@ function bn(e) {
|
|
|
4380
4462
|
}
|
|
4381
4463
|
//#endregion
|
|
4382
4464
|
//#region src/functions/getClipboardData.ts
|
|
4383
|
-
async function
|
|
4465
|
+
async function wn(e) {
|
|
4384
4466
|
if (s()) try {
|
|
4385
4467
|
var t, n;
|
|
4386
4468
|
return (t = e == null || (n = e.clipboardData) == null ? void 0 : n.getData("text")) == null ? await navigator.clipboard.readText() || "" : t;
|
|
@@ -4395,35 +4477,35 @@ async function xn(e) {
|
|
|
4395
4477
|
}
|
|
4396
4478
|
//#endregion
|
|
4397
4479
|
//#region src/functions/getCurrentDate.ts
|
|
4398
|
-
function
|
|
4480
|
+
function Tn(e = "datetime") {
|
|
4399
4481
|
return new it(void 0, e).standard();
|
|
4400
4482
|
}
|
|
4401
4483
|
//#endregion
|
|
4402
4484
|
//#region src/functions/getCurrentTime.ts
|
|
4403
|
-
function
|
|
4485
|
+
function En() {
|
|
4404
4486
|
return Date.now();
|
|
4405
4487
|
}
|
|
4406
4488
|
//#endregion
|
|
4407
4489
|
//#region src/functions/getElementId.ts
|
|
4408
|
-
var Q,
|
|
4490
|
+
var Q, Dn = () => {
|
|
4409
4491
|
let e = Q == null ? void 0 : Q();
|
|
4410
4492
|
if (e) return String(e);
|
|
4411
|
-
let t =
|
|
4493
|
+
let t = D.get("__ui:getElementId__", () => ({ id: 1e5 }));
|
|
4412
4494
|
return `id-${t.id++}`;
|
|
4413
4495
|
};
|
|
4414
|
-
function
|
|
4496
|
+
function On(e, t) {
|
|
4415
4497
|
if (e) {
|
|
4416
|
-
let n =
|
|
4417
|
-
if (n) return l(n.id) || n.setAttribute("id",
|
|
4498
|
+
let n = j(e);
|
|
4499
|
+
if (n) return l(n.id) || n.setAttribute("id", Dn()), t ? `#${n.id}${t}`.trim() : n.id;
|
|
4418
4500
|
}
|
|
4419
|
-
return
|
|
4501
|
+
return Dn();
|
|
4420
4502
|
}
|
|
4421
|
-
function
|
|
4503
|
+
function kn(e) {
|
|
4422
4504
|
Q || (Q = e);
|
|
4423
4505
|
}
|
|
4424
4506
|
//#endregion
|
|
4425
4507
|
//#region src/functions/getFirst.ts
|
|
4426
|
-
function
|
|
4508
|
+
function An(e) {
|
|
4427
4509
|
if (i(e)) return e == null ? void 0 : e[0];
|
|
4428
4510
|
if (t(e)) {
|
|
4429
4511
|
var n;
|
|
@@ -4433,18 +4515,18 @@ function Dn(e) {
|
|
|
4433
4515
|
}
|
|
4434
4516
|
//#endregion
|
|
4435
4517
|
//#region src/functions/getKey.ts
|
|
4436
|
-
function
|
|
4518
|
+
function jn(e) {
|
|
4437
4519
|
var t, n, r;
|
|
4438
4520
|
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;
|
|
4439
4521
|
}
|
|
4440
4522
|
//#endregion
|
|
4441
4523
|
//#region src/functions/getLength.ts
|
|
4442
|
-
function
|
|
4524
|
+
function Mn(e) {
|
|
4443
4525
|
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;
|
|
4444
4526
|
}
|
|
4445
4527
|
//#endregion
|
|
4446
4528
|
//#region src/functions/getLengthOfAllArray.ts
|
|
4447
|
-
function
|
|
4529
|
+
function Nn(e) {
|
|
4448
4530
|
return r(e, (e) => {
|
|
4449
4531
|
var t;
|
|
4450
4532
|
return (t = e == null ? void 0 : e.length) == null ? 0 : t;
|
|
@@ -4452,41 +4534,41 @@ function An(e) {
|
|
|
4452
4534
|
}
|
|
4453
4535
|
//#endregion
|
|
4454
4536
|
//#region src/functions/getMaxLengthAllArray.ts
|
|
4455
|
-
function
|
|
4537
|
+
function Pn(e) {
|
|
4456
4538
|
if (!l(e)) return 0;
|
|
4457
|
-
let t =
|
|
4539
|
+
let t = Nn(e);
|
|
4458
4540
|
return t.length > 1e4 ? t.reduce((e, t) => Math.max(e, t)) : Math.max(...t);
|
|
4459
4541
|
}
|
|
4460
4542
|
//#endregion
|
|
4461
4543
|
//#region src/functions/getMinLengthAllArray.ts
|
|
4462
|
-
function
|
|
4544
|
+
function Fn(e) {
|
|
4463
4545
|
if (!l(e)) return 0;
|
|
4464
|
-
let t =
|
|
4546
|
+
let t = Nn(e);
|
|
4465
4547
|
return t.length > 1e4 ? t.reduce((e, t) => Math.min(e, t)) : Math.min(...t);
|
|
4466
4548
|
}
|
|
4467
4549
|
//#endregion
|
|
4468
4550
|
//#region src/functions/getMouseClientX.ts
|
|
4469
|
-
function
|
|
4551
|
+
function In(e) {
|
|
4470
4552
|
var t, n;
|
|
4471
4553
|
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;
|
|
4472
4554
|
}
|
|
4473
4555
|
//#endregion
|
|
4474
4556
|
//#region src/functions/getMouseClientY.ts
|
|
4475
|
-
function
|
|
4557
|
+
function Ln(e) {
|
|
4476
4558
|
var t, n;
|
|
4477
4559
|
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;
|
|
4478
4560
|
}
|
|
4479
4561
|
//#endregion
|
|
4480
4562
|
//#region src/functions/getMouseClient.ts
|
|
4481
|
-
function
|
|
4563
|
+
function Rn(e) {
|
|
4482
4564
|
return {
|
|
4483
|
-
x:
|
|
4484
|
-
y:
|
|
4565
|
+
x: In(e),
|
|
4566
|
+
y: Ln(e)
|
|
4485
4567
|
};
|
|
4486
4568
|
}
|
|
4487
4569
|
//#endregion
|
|
4488
4570
|
//#region src/functions/getObjectByKeys.ts
|
|
4489
|
-
function
|
|
4571
|
+
function zn(e, t) {
|
|
4490
4572
|
let r = {};
|
|
4491
4573
|
return n(e) && t.forEach((t) => {
|
|
4492
4574
|
t in e && e[t] !== void 0 && (r[t] = e[t]);
|
|
@@ -4494,7 +4576,7 @@ function In(e, t) {
|
|
|
4494
4576
|
}
|
|
4495
4577
|
//#endregion
|
|
4496
4578
|
//#region src/functions/getObjectNoUndefined.ts
|
|
4497
|
-
function
|
|
4579
|
+
function Bn(e, t = void 0) {
|
|
4498
4580
|
let n = {};
|
|
4499
4581
|
return r(e, (e, r) => {
|
|
4500
4582
|
e !== t && (n[r] = e);
|
|
@@ -4502,42 +4584,42 @@ function Ln(e, t = void 0) {
|
|
|
4502
4584
|
}
|
|
4503
4585
|
//#endregion
|
|
4504
4586
|
//#region src/functions/getObjectOrNone.ts
|
|
4505
|
-
function
|
|
4587
|
+
function Vn(e) {
|
|
4506
4588
|
return n(e) ? e : {};
|
|
4507
4589
|
}
|
|
4508
4590
|
//#endregion
|
|
4509
4591
|
//#region src/functions/getOnlyText.ts
|
|
4510
|
-
function
|
|
4592
|
+
function Hn(e) {
|
|
4511
4593
|
return S(e).replace(/[^\p{L}\p{N}\s]+/gu, "").trim();
|
|
4512
4594
|
}
|
|
4513
4595
|
//#endregion
|
|
4514
4596
|
//#region src/functions/strFill.ts
|
|
4515
|
-
function
|
|
4597
|
+
function Un(e, t) {
|
|
4516
4598
|
return String(e).repeat(t);
|
|
4517
4599
|
}
|
|
4518
4600
|
//#endregion
|
|
4519
4601
|
//#region src/functions/getRandomText.ts
|
|
4520
|
-
function
|
|
4602
|
+
function Wn(e, t, n = "#", r = 2, i = 12) {
|
|
4521
4603
|
let a = f(e, t), o = [];
|
|
4522
|
-
for (let e = 0; e < a; e++) o.push(
|
|
4604
|
+
for (let e = 0; e < a; e++) o.push(Un(n, f(r, i)));
|
|
4523
4605
|
return o.join(" ");
|
|
4524
4606
|
}
|
|
4525
4607
|
//#endregion
|
|
4526
4608
|
//#region src/functions/getStepPercent.ts
|
|
4527
|
-
function
|
|
4609
|
+
function Gn(e, t) {
|
|
4528
4610
|
let n = e == null ? 0 : e;
|
|
4529
4611
|
return t > n ? 100 / (t - n) : 0;
|
|
4530
4612
|
}
|
|
4531
4613
|
//#endregion
|
|
4532
4614
|
//#region src/functions/getStepValue.ts
|
|
4533
|
-
function
|
|
4615
|
+
function Kn(e, t) {
|
|
4534
4616
|
let n = e == null ? 0 : e;
|
|
4535
4617
|
return t > n ? (t - n) / 100 : 0;
|
|
4536
4618
|
}
|
|
4537
4619
|
//#endregion
|
|
4538
4620
|
//#region src/functions/goScroll.ts
|
|
4539
|
-
var
|
|
4540
|
-
function
|
|
4621
|
+
var qn = 0;
|
|
4622
|
+
function Jn(e, t, n) {
|
|
4541
4623
|
if (!s()) return;
|
|
4542
4624
|
let r = t == null ? void 0 : t.closest(e);
|
|
4543
4625
|
if (t && r && r.scrollHeight !== r.offsetHeight) {
|
|
@@ -4545,12 +4627,12 @@ function Gn(e, t, n) {
|
|
|
4545
4627
|
if (n) {
|
|
4546
4628
|
let a = n.getBoundingClientRect();
|
|
4547
4629
|
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);
|
|
4548
|
-
} else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top -
|
|
4630
|
+
} else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top - qn : r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = i.top - e.top + i.height - e.height + qn);
|
|
4549
4631
|
}
|
|
4550
4632
|
}
|
|
4551
4633
|
//#endregion
|
|
4552
4634
|
//#region src/functions/goScrollSmooth.ts
|
|
4553
|
-
function
|
|
4635
|
+
function Yn(e, t, n = 0) {
|
|
4554
4636
|
if (!s()) return;
|
|
4555
4637
|
let r = (t == null ? void 0 : t.behavior) || "smooth";
|
|
4556
4638
|
if ("scrollIntoView" in e && !n) {
|
|
@@ -4572,7 +4654,7 @@ function Kn(e, t, n = 0) {
|
|
|
4572
4654
|
}
|
|
4573
4655
|
//#endregion
|
|
4574
4656
|
//#region src/functions/goScrollTo.ts
|
|
4575
|
-
function
|
|
4657
|
+
function Xn(e, t, n = "smooth") {
|
|
4576
4658
|
if (!s() || !e || !t) return;
|
|
4577
4659
|
let r = e.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
4578
4660
|
e.scrollBy({
|
|
@@ -4583,13 +4665,13 @@ function qn(e, t, n = "smooth") {
|
|
|
4583
4665
|
}
|
|
4584
4666
|
//#endregion
|
|
4585
4667
|
//#region src/functions/isShare.ts
|
|
4586
|
-
function
|
|
4668
|
+
function Zn() {
|
|
4587
4669
|
return s() && typeof navigator < "u" && !!navigator.share;
|
|
4588
4670
|
}
|
|
4589
4671
|
//#endregion
|
|
4590
4672
|
//#region src/functions/handleShare.ts
|
|
4591
|
-
async function
|
|
4592
|
-
if (
|
|
4673
|
+
async function Qn(e) {
|
|
4674
|
+
if (Zn() && navigator.canShare && navigator.canShare(e)) try {
|
|
4593
4675
|
return await navigator.share(e), !0;
|
|
4594
4676
|
} catch (e) {
|
|
4595
4677
|
T.on({
|
|
@@ -4602,20 +4684,20 @@ async function Yn(e) {
|
|
|
4602
4684
|
}
|
|
4603
4685
|
//#endregion
|
|
4604
4686
|
//#region src/functions/inArray.ts
|
|
4605
|
-
function
|
|
4687
|
+
function $n(e, t) {
|
|
4606
4688
|
return e.includes(t);
|
|
4607
4689
|
}
|
|
4608
4690
|
//#endregion
|
|
4609
4691
|
//#region src/functions/initScrollbarOffset.ts
|
|
4610
|
-
async function
|
|
4692
|
+
async function er() {
|
|
4611
4693
|
if (s()) {
|
|
4612
|
-
let e = await
|
|
4694
|
+
let e = await Pt.get();
|
|
4613
4695
|
document.body.style.setProperty("--sys-scrollbar-offset", `${e}px`);
|
|
4614
4696
|
}
|
|
4615
4697
|
}
|
|
4616
4698
|
//#endregion
|
|
4617
4699
|
//#region src/functions/intersectKey.ts
|
|
4618
|
-
function
|
|
4700
|
+
function tr(e, n) {
|
|
4619
4701
|
let i = {};
|
|
4620
4702
|
return t(e) && t(n) && r(e, (e, t) => {
|
|
4621
4703
|
t in n && (i[t] = e);
|
|
@@ -4623,7 +4705,7 @@ function Qn(e, n) {
|
|
|
4623
4705
|
}
|
|
4624
4706
|
//#endregion
|
|
4625
4707
|
//#region src/functions/isDifferent.ts
|
|
4626
|
-
function
|
|
4708
|
+
function nr(e, t) {
|
|
4627
4709
|
let n = Object.keys(e).length !== Object.keys(t).length;
|
|
4628
4710
|
return n || r(e, (e, r) => {
|
|
4629
4711
|
e !== (t == null ? void 0 : t[r]) && (n = !0);
|
|
@@ -4631,25 +4713,25 @@ function $n(e, t) {
|
|
|
4631
4713
|
}
|
|
4632
4714
|
//#endregion
|
|
4633
4715
|
//#region src/functions/isElementVisible.ts
|
|
4634
|
-
function
|
|
4716
|
+
function rr(e) {
|
|
4635
4717
|
if (!s()) return !1;
|
|
4636
|
-
let t =
|
|
4718
|
+
let t = j(e);
|
|
4637
4719
|
if (!t || "isConnected" in t && t.isConnected === !1) return !1;
|
|
4638
4720
|
let n = window.getComputedStyle(t);
|
|
4639
4721
|
return n.display !== "none" && n.visibility !== "hidden" && n.opacity !== "0" && t.offsetWidth !== 0 && t.offsetHeight !== 0;
|
|
4640
4722
|
}
|
|
4641
4723
|
//#endregion
|
|
4642
4724
|
//#region src/functions/isInput.ts
|
|
4643
|
-
var
|
|
4725
|
+
var ir = (e) => {
|
|
4644
4726
|
if (e instanceof HTMLElement) {
|
|
4645
4727
|
let t = e.tagName.toLowerCase();
|
|
4646
4728
|
return !!(t === "input" || t === "textarea" || t === "select" || e.isContentEditable || e.getAttribute("contenteditable") === "true") && !(e != null && e.readOnly) && !(e != null && e.disabled);
|
|
4647
4729
|
}
|
|
4648
4730
|
return !1;
|
|
4649
|
-
},
|
|
4731
|
+
}, ar = (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 ? !ir(e.target) : !t : !1;
|
|
4650
4732
|
//#endregion
|
|
4651
4733
|
//#region src/functions/isFloat.ts
|
|
4652
|
-
function
|
|
4734
|
+
function or(e) {
|
|
4653
4735
|
switch (typeof e) {
|
|
4654
4736
|
case "number": return !0;
|
|
4655
4737
|
case "string": return /^-?\d+(\.\d+)?$/.test(e);
|
|
@@ -4658,21 +4740,21 @@ function rr(e) {
|
|
|
4658
4740
|
}
|
|
4659
4741
|
//#endregion
|
|
4660
4742
|
//#region src/functions/isIntegerBetween.ts
|
|
4661
|
-
function
|
|
4743
|
+
function sr(e, t) {
|
|
4662
4744
|
let n = Math.floor(t);
|
|
4663
4745
|
return e >= n && e < n + 1;
|
|
4664
4746
|
}
|
|
4665
4747
|
//#endregion
|
|
4666
4748
|
//#region src/functions/isSelectedByList.ts
|
|
4667
|
-
function
|
|
4749
|
+
function cr(e, t) {
|
|
4668
4750
|
return Array.isArray(e) ? e.every((e) => x(e, t)) : x(e, t);
|
|
4669
4751
|
}
|
|
4670
4752
|
//#endregion
|
|
4671
4753
|
//#region src/functions/isTab.ts
|
|
4672
|
-
var
|
|
4754
|
+
var lr = (e) => e.key === "Tab" || e.code === "Tab" || e.keyCode === 9;
|
|
4673
4755
|
//#endregion
|
|
4674
4756
|
//#region src/functions/removeCommonPrefix.ts
|
|
4675
|
-
function
|
|
4757
|
+
function ur(e, t) {
|
|
4676
4758
|
if (e.startsWith(t)) return e.slice(t.length).trim();
|
|
4677
4759
|
let n = 0;
|
|
4678
4760
|
for (; e[n] === t[n] && n < e.length && n < t.length;) n++;
|
|
@@ -4680,35 +4762,35 @@ function sr(e, t) {
|
|
|
4680
4762
|
}
|
|
4681
4763
|
//#endregion
|
|
4682
4764
|
//#region src/functions/replaceComponentName.ts
|
|
4683
|
-
var
|
|
4765
|
+
var dr = (e, t, n) => {
|
|
4684
4766
|
var r;
|
|
4685
4767
|
return e == null || (r = e.replace(RegExp(`<${t}`, "ig"), `<${n}`)) == null || (r = r.replace(RegExp(`</${t}`, "ig"), `</${n}`)) == null ? void 0 : r.trim();
|
|
4686
4768
|
};
|
|
4687
4769
|
//#endregion
|
|
4688
4770
|
//#region src/functions/uniqueArray.ts
|
|
4689
|
-
function
|
|
4771
|
+
function fr(e) {
|
|
4690
4772
|
return [...new Set(e)];
|
|
4691
4773
|
}
|
|
4692
4774
|
//#endregion
|
|
4693
4775
|
//#region src/functions/replaceRecursive.ts
|
|
4694
4776
|
function $(e, n, i = !0) {
|
|
4695
|
-
let a =
|
|
4777
|
+
let a = Z(e);
|
|
4696
4778
|
return t(e) && t(n) && r(n, (n, r) => {
|
|
4697
4779
|
let o = e == null ? void 0 : e[r];
|
|
4698
|
-
t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] =
|
|
4780
|
+
t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] = Z(fr([...o, ...n])) : a[r] = $(Array.isArray(o) ? { ...o } : o, n, i) : a[r] = t(n) ? Z(n) : n;
|
|
4699
4781
|
}), a;
|
|
4700
4782
|
}
|
|
4701
4783
|
//#endregion
|
|
4702
4784
|
//#region src/functions/replaceTemplate.ts
|
|
4703
|
-
function
|
|
4785
|
+
function pr(e, t) {
|
|
4704
4786
|
let n = e;
|
|
4705
4787
|
return r(t, (e, t) => {
|
|
4706
|
-
n = n.replace(
|
|
4788
|
+
n = n.replace(Ht(`[${t}]`), m(e));
|
|
4707
4789
|
}), n;
|
|
4708
4790
|
}
|
|
4709
4791
|
//#endregion
|
|
4710
4792
|
//#region src/functions/secondToTime.ts
|
|
4711
|
-
function
|
|
4793
|
+
function mr(e, t) {
|
|
4712
4794
|
let n = b(e);
|
|
4713
4795
|
if (n > 0) {
|
|
4714
4796
|
let e = String(Math.floor(n / 60)).padStart(2, "0"), r = String(n % 60).padStart(2, "0");
|
|
@@ -4718,7 +4800,7 @@ function dr(e, t) {
|
|
|
4718
4800
|
}
|
|
4719
4801
|
//#endregion
|
|
4720
4802
|
//#region src/functions/setValues.ts
|
|
4721
|
-
function
|
|
4803
|
+
function hr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, notEmpty: o = !1 }) {
|
|
4722
4804
|
if (n) {
|
|
4723
4805
|
if (i(e)) {
|
|
4724
4806
|
let n = e.indexOf(t), i = [...e];
|
|
@@ -4730,48 +4812,48 @@ function fr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, no
|
|
|
4730
4812
|
}
|
|
4731
4813
|
//#endregion
|
|
4732
4814
|
//#region src/functions/splice.ts
|
|
4733
|
-
function
|
|
4815
|
+
function gr(e, n, i) {
|
|
4734
4816
|
if (t(e) && t(n)) {
|
|
4735
4817
|
if (i) {
|
|
4736
4818
|
let a = {}, o = !1;
|
|
4737
4819
|
return r(e, (e, r) => {
|
|
4738
|
-
!o && (i === r || i === e) ? (o = !0, a = $(a, n)) : o ? a = $(a, { [r]: e }) : a[r] = t(e) ?
|
|
4820
|
+
!o && (i === r || i === e) ? (o = !0, a = $(a, n)) : o ? a = $(a, { [r]: e }) : a[r] = t(e) ? Z(e) : e;
|
|
4739
4821
|
}), o ? a : $(e, n);
|
|
4740
4822
|
}
|
|
4741
4823
|
if (t(n)) return $(e, n);
|
|
4742
4824
|
}
|
|
4743
|
-
return
|
|
4825
|
+
return Z(e);
|
|
4744
4826
|
}
|
|
4745
4827
|
//#endregion
|
|
4746
4828
|
//#region src/functions/toCamelCaseFirst.ts
|
|
4747
|
-
function
|
|
4829
|
+
function _r(e) {
|
|
4748
4830
|
return at(e).replace(/^([a-z])/, (e) => `${e.toUpperCase()}`);
|
|
4749
4831
|
}
|
|
4750
4832
|
//#endregion
|
|
4751
4833
|
//#region src/functions/toKebabCase.ts
|
|
4752
|
-
function
|
|
4834
|
+
function vr(e) {
|
|
4753
4835
|
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());
|
|
4754
4836
|
}
|
|
4755
4837
|
//#endregion
|
|
4756
4838
|
//#region src/functions/toNumberByMax.ts
|
|
4757
|
-
function
|
|
4839
|
+
function yr(e, t, n, r) {
|
|
4758
4840
|
let i = b(e), a = b(t);
|
|
4759
|
-
return t && a < i ? `${
|
|
4841
|
+
return t && a < i ? `${br(a, n, r)}+` : br(i, n, r);
|
|
4760
4842
|
}
|
|
4761
|
-
var
|
|
4843
|
+
var br = (e, t, n) => t ? new R(n).number(e) : e;
|
|
4762
4844
|
//#endregion
|
|
4763
4845
|
//#region src/functions/toPercent.ts
|
|
4764
|
-
function
|
|
4846
|
+
function xr(e, t) {
|
|
4765
4847
|
return e === 0 ? t : 1 / e * t;
|
|
4766
4848
|
}
|
|
4767
4849
|
//#endregion
|
|
4768
4850
|
//#region src/functions/toPercentBy100.ts
|
|
4769
|
-
function
|
|
4770
|
-
return
|
|
4851
|
+
function Sr(e, t) {
|
|
4852
|
+
return xr(e, t) * 100;
|
|
4771
4853
|
}
|
|
4772
4854
|
//#endregion
|
|
4773
4855
|
//#region src/functions/uint8ArrayToBase64.ts
|
|
4774
|
-
function
|
|
4856
|
+
function Cr(e) {
|
|
4775
4857
|
let t = "";
|
|
4776
4858
|
for (let n of e) t += String.fromCharCode(n);
|
|
4777
4859
|
if (s()) return window.btoa(t);
|
|
@@ -4783,7 +4865,7 @@ function br(e) {
|
|
|
4783
4865
|
}
|
|
4784
4866
|
//#endregion
|
|
4785
4867
|
//#region src/functions/writeClipboardData.ts
|
|
4786
|
-
async function
|
|
4868
|
+
async function wr(e) {
|
|
4787
4869
|
if (s()) try {
|
|
4788
4870
|
await navigator.clipboard.writeText(e);
|
|
4789
4871
|
} catch (n) {
|
|
@@ -4792,4 +4874,4 @@ async function xr(e) {
|
|
|
4792
4874
|
}
|
|
4793
4875
|
}
|
|
4794
4876
|
//#endregion
|
|
4795
|
-
export { I as Api,
|
|
4877
|
+
export { I as Api, P 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, Le as ApiStatus, Qe as BroadcastMessage, tt as Cache, et as CacheItem, nt as CacheStatic, Te as Cookie, Se as CookieBlock, xe as CookieBlockInstance, k as CookieStorage, O as DataStorage, it as Datetime, T as ErrorCenter, le as ErrorCenterHandler, ue as ErrorCenterInstance, Me as EventItem, ot as Formatters, H as FormattersType, st as GEO_FLAG_ICON_NAME, A as Geo, ct as GeoFlag, Oe as GeoInstance, R as GeoIntl, lt as GeoPhone, ut as Global, pt as Hash, ft as HashInstance, gt as Icons, N as Loading, Pe as LoadingInstance, kt as Meta, G as MetaManager, Dt as MetaOg, wt as MetaOpenGraphAge, St as MetaOpenGraphAvailability, Ct as MetaOpenGraphCondition, Tt as MetaOpenGraphGender, q as MetaOpenGraphTag, xt as MetaOpenGraphType, bt as MetaRobots, At as MetaStatic, K as MetaTag, Ot as MetaTwitter, Et as MetaTwitterCard, J as MetaTwitterTag, Mt as Query, jt as QueryInstance, Nt as ResumableTimer, Pt as ScrollbarWidth, qt as SearchList, Bt as SearchListData, Vt as SearchListItem, Gt as SearchListMatcher, Kt as SearchListOptions, D as ServerStorage, Yt as StorageCallback, en as TRANSLATE_GLOBAL_PREFIX, tn as TRANSLATE_TIME_OUT, an as Translate, nn as TranslateFile, rn as TranslateInstance, Ee as UI_GEO_COOKIE_KEY, dt as UrlInstanceAbstract, Y as UrlItem, zt as addTagHighlightMatch, S as anyToString, Qt as applyTemplate, on as arrFill, dn as blobToBase64, fn as capitalize, Z as copyObject, pn as copyObjectLite, U as createElement, mn as domQuerySelector, hn as domQuerySelectorAll, W as encodeAttribute, pe as encodeLiteAttribute, yn as ensureMaxSize, X as escapeExp, bn as eventStopPropagation, m as executeFunction, Je as executePromise, r as forEach, xn as frame, Sn as getArrayHighlightMatch, Cn as getAttributes, wn as getClipboardData, rt as getColumn, Tn as getCurrentDate, En as getCurrentTime, j as getElement, On as getElementId, gn as getElementImage, _t as getElementItem, Ae as getElementOrWindow, me as getElementSafeScript, Ut as getExactSearchExp, Ht as getExp, An as getFirst, he as getHydrationData, V as getItemByPath, jn as getKey, Mn as getLength, Nn as getLengthOfAllArray, Pn as getMaxLengthAllArray, Fn as getMinLengthAllArray, Rn as getMouseClient, In as getMouseClientX, Ln as getMouseClientY, zn as getObjectByKeys, Bn as getObjectNoUndefined, Vn as getObjectOrNone, Hn as getOnlyText, Wn as getRandomText, o as getRequestString, Wt as getSearchExp, Ft as getSeparatingSearchExp, Gn as getStepPercent, Kn as getStepValue, Jn as goScroll, Yn as goScrollSmooth, Xn as goScrollTo, Qn as handleShare, $n as inArray, kn as initGetElementId, er as initScrollbarOffset, tr as intersectKey, $t as isApiSuccess, i as isArray, nr as isDifferent, ae as isDomData, s as isDomRuntime, rr as isElementVisible, ar as isEnter, l as isFilled, or as isFloat, p as isFunction, je as isInDom, ir as isInput, sr as isIntegerBetween, c as isNull, g as isNumber, t as isObject, n as isObjectNotArray, u as isOnLine, x as isSelected, cr as isSelectedByList, Zn as isShare, d as isString, lr as isTab, ke as isWindow, f as random, ur as removeCommonPrefix, dr as replaceComponentName, $ as replaceRecursive, pr as replaceTemplate, vn as resizeImageByMax, mr as secondToTime, vt as setElementItem, hr as setValues, ee as sleep, gr as splice, Un as strFill, oe as strSplit, M as toArray, at as toCamelCase, _r as toCamelCaseFirst, L as toDate, vr as toKebabCase, b as toNumber, yr as toNumberByMax, xr as toPercent, Sr as toPercentBy100, a as toString, E as transformation, Cr as uint8ArrayToBase64, fr as uniqueArray, wr as writeClipboardData };
|