@dxtmisha/functional-basic 1.1.0 → 1.1.6
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 +81 -0
- package/ai-description.txt +1 -0
- package/ai-types.txt +1062 -951
- package/dist/classes/Api.d.ts +201 -0
- package/dist/classes/ApiCache.d.ts +152 -0
- package/dist/classes/ApiDataReturn.d.ts +76 -0
- package/dist/classes/ApiDefault.d.ts +49 -0
- package/dist/classes/ApiHeaders.d.ts +37 -0
- package/dist/classes/ApiHydration.d.ts +39 -0
- package/dist/classes/ApiInstance.d.ts +283 -0
- package/dist/classes/ApiPreparation.d.ts +58 -0
- package/dist/classes/ApiResponse.d.ts +154 -0
- package/dist/classes/ApiStatus.d.ts +130 -0
- package/dist/classes/BroadcastMessage.d.ts +75 -0
- package/dist/classes/Cache.d.ts +38 -0
- package/dist/classes/CacheItem.d.ts +62 -0
- package/dist/classes/CacheStatic.d.ts +36 -0
- package/dist/classes/Cookie.d.ts +54 -0
- package/dist/classes/CookieBlock.d.ts +30 -0
- package/dist/classes/CookieBlockInstance.d.ts +23 -0
- package/dist/classes/CookieStorage.d.ts +174 -0
- package/dist/classes/DataStorage.d.ts +107 -0
- package/dist/classes/Datetime.d.ts +570 -0
- package/dist/classes/ErrorCenter.d.ts +72 -0
- package/dist/classes/ErrorCenterHandler.d.ts +64 -0
- package/dist/classes/ErrorCenterInstance.d.ts +85 -0
- package/dist/classes/EventItem.d.ts +251 -0
- package/dist/classes/Formatters.d.ts +161 -0
- package/dist/classes/Geo.d.ts +151 -0
- package/dist/classes/GeoFlag.d.ts +98 -0
- package/dist/classes/GeoInstance.d.ts +215 -0
- package/dist/classes/GeoIntl.d.ts +304 -0
- package/dist/classes/GeoPhone.d.ts +108 -0
- package/dist/classes/Global.d.ts +29 -0
- package/dist/classes/Hash.d.ts +57 -0
- package/dist/classes/HashInstance.d.ts +95 -0
- package/dist/classes/Icons.d.ts +128 -0
- package/dist/classes/Loading.d.ts +66 -0
- package/dist/classes/LoadingInstance.d.ts +99 -0
- package/dist/classes/Meta.d.ts +186 -0
- package/dist/classes/MetaManager.d.ts +121 -0
- package/dist/classes/MetaOg.d.ts +115 -0
- package/dist/classes/MetaStatic.d.ts +179 -0
- package/dist/classes/MetaTwitter.d.ts +115 -0
- package/dist/classes/ResumableTimer.d.ts +81 -0
- package/dist/classes/ScrollbarWidth.d.ts +51 -0
- package/dist/classes/SearchList.d.ts +128 -0
- package/dist/classes/SearchListData.d.ts +143 -0
- package/dist/classes/SearchListItem.d.ts +49 -0
- package/dist/classes/SearchListMatcher.d.ts +57 -0
- package/dist/classes/SearchListOptions.d.ts +66 -0
- package/dist/classes/ServerStorage.d.ts +106 -0
- package/dist/classes/StorageCallback.d.ts +84 -0
- package/dist/classes/Translate.d.ts +119 -0
- package/dist/classes/TranslateFile.d.ts +81 -0
- package/dist/classes/TranslateInstance.d.ts +206 -0
- package/dist/functions/addTagHighlightMatch.d.ts +11 -0
- package/dist/functions/anyToString.d.ts +10 -0
- package/dist/functions/applyTemplate.d.ts +10 -0
- package/dist/functions/arrFill.d.ts +9 -0
- package/dist/functions/blobToBase64.d.ts +9 -0
- package/dist/functions/capitalize.d.ts +9 -0
- package/dist/functions/copyObject.d.ts +10 -0
- package/dist/functions/copyObjectLite.d.ts +9 -0
- package/dist/functions/createElement.d.ts +21 -0
- package/dist/functions/domQuerySelector.d.ts +8 -0
- package/dist/functions/domQuerySelectorAll.d.ts +8 -0
- package/dist/functions/encodeAttribute.d.ts +8 -0
- package/dist/functions/encodeLiteAttribute.d.ts +8 -0
- package/dist/functions/ensureMaxSize.d.ts +10 -0
- package/dist/functions/escapeExp.d.ts +7 -0
- package/dist/functions/eventStopPropagation.d.ts +7 -0
- package/dist/functions/executeFunction.d.ts +12 -0
- package/dist/functions/executePromise.d.ts +11 -0
- package/dist/functions/forEach.d.ts +14 -0
- package/dist/functions/frame.d.ts +10 -0
- package/dist/functions/getArrayHighlightMatch.d.ts +10 -0
- package/dist/functions/getAttributes.d.ts +9 -0
- package/dist/functions/getClipboardData.d.ts +9 -0
- package/dist/functions/getColumn.d.ts +10 -0
- package/dist/functions/getCurrentDate.d.ts +19 -0
- package/dist/functions/getCurrentTime.d.ts +15 -0
- package/dist/functions/getElement.d.ts +9 -0
- package/dist/functions/getElementId.d.ts +26 -0
- package/dist/functions/getElementImage.d.ts +8 -0
- package/dist/functions/getElementItem.d.ts +12 -0
- package/dist/functions/getElementOrWindow.d.ts +8 -0
- package/dist/functions/getElementSafeScript.d.ts +9 -0
- package/dist/functions/getExactSearchExp.d.ts +8 -0
- package/dist/functions/getExp.d.ts +14 -0
- package/dist/functions/getHydrationData.d.ts +10 -0
- package/dist/functions/getItemByPath.d.ts +9 -0
- package/dist/functions/getKey.d.ts +8 -0
- package/dist/functions/getLengthOfAllArray.d.ts +8 -0
- package/dist/functions/getMaxLengthAllArray.d.ts +9 -0
- package/dist/functions/getMinLengthAllArray.d.ts +8 -0
- package/dist/functions/getMouseClient.d.ts +9 -0
- package/dist/functions/getMouseClientX.d.ts +8 -0
- package/dist/functions/getMouseClientY.d.ts +8 -0
- package/dist/functions/getObjectByKeys.d.ts +8 -0
- package/dist/functions/getObjectNoUndefined.d.ts +9 -0
- package/dist/functions/getObjectOrNone.d.ts +8 -0
- package/dist/functions/getOnlyText.d.ts +8 -0
- package/dist/functions/getRandomText.d.ts +12 -0
- package/dist/functions/getRequestString.d.ts +11 -0
- package/dist/functions/getSearchExp.d.ts +12 -0
- package/dist/functions/getSeparatingSearchExp.d.ts +9 -0
- package/dist/functions/getStepPercent.d.ts +9 -0
- package/dist/functions/getStepValue.d.ts +9 -0
- package/dist/functions/goScroll.d.ts +10 -0
- package/dist/functions/goScrollSmooth.d.ts +10 -0
- package/dist/functions/goScrollTo.d.ts +10 -0
- package/dist/functions/handleShare.d.ts +10 -0
- package/dist/functions/inArray.d.ts +9 -0
- package/dist/functions/initScrollbarOffset.d.ts +7 -0
- package/dist/functions/intersectKey.d.ts +9 -0
- package/dist/functions/isApiSuccess.d.ts +9 -0
- package/dist/functions/isArray.d.ts +8 -0
- package/dist/functions/isDifferent.d.ts +10 -0
- package/dist/functions/isDomData.d.ts +7 -0
- package/dist/functions/isDomRuntime.d.ts +10 -0
- package/dist/functions/isElementVisible.d.ts +11 -0
- package/dist/functions/isEnter.d.ts +9 -0
- package/dist/functions/isFilled.d.ts +10 -0
- package/dist/functions/isFloat.d.ts +8 -0
- package/dist/functions/isFunction.d.ts +9 -0
- package/dist/functions/isInDom.d.ts +9 -0
- package/dist/functions/isInput.d.ts +8 -0
- package/dist/functions/isIntegerBetween.d.ts +9 -0
- package/dist/functions/isNull.d.ts +9 -0
- package/dist/functions/isNumber.d.ts +8 -0
- package/dist/functions/isObject.d.ts +8 -0
- package/dist/functions/isObjectNotArray.d.ts +8 -0
- package/dist/functions/isOnLine.d.ts +7 -0
- package/dist/functions/isSelected.d.ts +9 -0
- package/dist/functions/isSelectedByList.d.ts +9 -0
- package/dist/functions/isShare.d.ts +7 -0
- package/dist/functions/isString.d.ts +8 -0
- package/dist/functions/isWindow.d.ts +7 -0
- package/dist/functions/random.d.ts +9 -0
- package/dist/functions/removeCommonPrefix.d.ts +9 -0
- package/dist/functions/replaceComponentName.d.ts +9 -0
- package/dist/functions/replaceRecursive.d.ts +11 -0
- package/dist/functions/replaceTemplate.d.ts +10 -0
- package/dist/functions/resizeImageByMax.d.ts +19 -0
- package/dist/functions/secondToTime.d.ts +9 -0
- package/dist/functions/setElementItem.d.ts +11 -0
- package/dist/functions/setValues.d.ts +18 -0
- package/dist/functions/sleep.d.ts +8 -0
- package/dist/functions/splice.d.ts +13 -0
- package/dist/functions/strFill.d.ts +9 -0
- package/dist/functions/strSplit.d.ts +12 -0
- package/dist/functions/toArray.d.ts +17 -0
- package/dist/functions/toCamelCase.d.ts +8 -0
- package/dist/functions/toCamelCaseFirst.d.ts +8 -0
- package/dist/functions/toDate.d.ts +8 -0
- package/dist/functions/toKebabCase.d.ts +15 -0
- package/dist/functions/toNumber.d.ts +19 -0
- package/dist/functions/toNumberByMax.d.ts +11 -0
- package/dist/functions/toPercent.d.ts +9 -0
- package/dist/functions/toPercentBy100.d.ts +9 -0
- package/dist/functions/toString.d.ts +8 -0
- package/dist/functions/transformation.d.ts +21 -0
- package/dist/functions/uint8ArrayToBase64.d.ts +8 -0
- package/dist/functions/uniqueArray.d.ts +8 -0
- package/dist/functions/writeClipboardData.d.ts +8 -0
- package/dist/library.d.ts +171 -8722
- package/dist/library.js +416 -338
- package/dist/media/errorCauseList.d.ts +2 -0
- package/dist/types/apiTypes.d.ts +217 -0
- package/dist/types/basicTypes.d.ts +131 -0
- package/dist/types/errorCenter.d.ts +42 -0
- package/dist/types/formattersTypes.d.ts +224 -0
- package/dist/types/geoTypes.d.ts +86 -0
- package/dist/types/metaTypes.d.ts +586 -0
- package/dist/types/searchTypes.d.ts +53 -0
- package/dist/types/translateTypes.d.ts +54 -0
- package/package.json +7 -5
package/dist/library.js
CHANGED
|
@@ -80,7 +80,7 @@ function l(e, t) {
|
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/functions/isOnLine.ts
|
|
82
82
|
function u() {
|
|
83
|
-
return typeof navigator > "u" || navigator.onLine;
|
|
83
|
+
return !s() || typeof navigator > "u" || navigator.onLine;
|
|
84
84
|
}
|
|
85
85
|
//#endregion
|
|
86
86
|
//#region src/functions/isString.ts
|
|
@@ -94,94 +94,94 @@ function f(e, t) {
|
|
|
94
94
|
}
|
|
95
95
|
//#endregion
|
|
96
96
|
//#region src/functions/sleep.ts
|
|
97
|
-
function
|
|
97
|
+
function ee(e) {
|
|
98
98
|
return new Promise((t) => setTimeout(t, e));
|
|
99
99
|
}
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region src/functions/isNumber.ts
|
|
102
|
-
var
|
|
103
|
-
function
|
|
102
|
+
var p = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
103
|
+
function m(e) {
|
|
104
104
|
switch (typeof e) {
|
|
105
105
|
case "number": return Number.isFinite(e);
|
|
106
106
|
case "bigint": return !0;
|
|
107
|
-
case "string": return
|
|
107
|
+
case "string": return p.test(e.trim());
|
|
108
108
|
default: return !1;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
//#endregion
|
|
112
112
|
//#region src/functions/toNumber.ts
|
|
113
|
-
var
|
|
114
|
-
function
|
|
113
|
+
var h = /[^-+\d., ]+/g, g = /( [0-9]{3}[ ,.]|[0-9] [0-9])/, te = / /g, _ = /,/g, ne = /,[0-9]{3}[,.]/, re = /[.][0-9]{3}[,.]/, ie = /[.]/g;
|
|
114
|
+
function v(e) {
|
|
115
115
|
if (typeof e == "number") return Number.isFinite(e) && e || 0;
|
|
116
116
|
if (!e) return 0;
|
|
117
|
-
let t = e.replace(
|
|
118
|
-
return t =
|
|
117
|
+
let t = e.replace(h, "");
|
|
118
|
+
return t = g.test(t) ? t.replace(te, "").replace(_, ".") : ne.test(t) ? t.replace(_, "") : re.test(t) ? t.replace(ie, "").replace(_, ".") : t.replace(_, "."), parseFloat(t) || 0;
|
|
119
119
|
}
|
|
120
120
|
//#endregion
|
|
121
121
|
//#region src/functions/isSelected.ts
|
|
122
|
-
function
|
|
123
|
-
return c(e) ? !1 : Array.isArray(t) ? t.includes(e) :
|
|
122
|
+
function y(e, t) {
|
|
123
|
+
return c(e) ? !1 : Array.isArray(t) ? t.includes(e) : m(e) && m(t) ? v(e) === v(t) : e === t;
|
|
124
124
|
}
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region src/functions/encodeLiteAttribute.ts
|
|
127
|
-
var
|
|
127
|
+
var ae = {
|
|
128
128
|
"<": "<",
|
|
129
129
|
">": ">",
|
|
130
130
|
"&": "&"
|
|
131
131
|
};
|
|
132
|
-
function
|
|
132
|
+
function oe(e) {
|
|
133
133
|
return String(e).replace(/[<>&]/g, (e) => {
|
|
134
134
|
var t;
|
|
135
|
-
return (t =
|
|
135
|
+
return (t = ae == null ? void 0 : ae[e]) == null ? e : t;
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
//#endregion
|
|
139
139
|
//#region src/functions/isFunction.ts
|
|
140
|
-
function
|
|
140
|
+
function b(e) {
|
|
141
141
|
return e instanceof Function || typeof e == "function";
|
|
142
142
|
}
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region src/functions/executeFunction.ts
|
|
145
|
-
function
|
|
146
|
-
return
|
|
145
|
+
function x(e, ...t) {
|
|
146
|
+
return b(e) ? e(...t) : e;
|
|
147
147
|
}
|
|
148
148
|
//#endregion
|
|
149
149
|
//#region src/functions/isDomData.ts
|
|
150
|
-
function
|
|
150
|
+
function se() {
|
|
151
151
|
return s() && location.href.startsWith("data:");
|
|
152
152
|
}
|
|
153
153
|
//#endregion
|
|
154
|
-
//#region \0@oxc-project+runtime@0.
|
|
155
|
-
function
|
|
154
|
+
//#region \0@oxc-project+runtime@0.127.0/helpers/typeof.js
|
|
155
|
+
function S(e) {
|
|
156
156
|
"@babel/helpers - typeof";
|
|
157
|
-
return
|
|
157
|
+
return S = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
158
158
|
return typeof e;
|
|
159
159
|
} : function(e) {
|
|
160
160
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
161
|
-
},
|
|
161
|
+
}, S(e);
|
|
162
162
|
}
|
|
163
163
|
//#endregion
|
|
164
|
-
//#region \0@oxc-project+runtime@0.
|
|
165
|
-
function
|
|
166
|
-
if (
|
|
164
|
+
//#region \0@oxc-project+runtime@0.127.0/helpers/toPrimitive.js
|
|
165
|
+
function ce(e, t) {
|
|
166
|
+
if (S(e) != "object" || !e) return e;
|
|
167
167
|
var n = e[Symbol.toPrimitive];
|
|
168
168
|
if (n !== void 0) {
|
|
169
169
|
var r = n.call(e, t || "default");
|
|
170
|
-
if (
|
|
170
|
+
if (S(r) != "object") return r;
|
|
171
171
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
172
172
|
}
|
|
173
173
|
return (t === "string" ? String : Number)(e);
|
|
174
174
|
}
|
|
175
175
|
//#endregion
|
|
176
|
-
//#region \0@oxc-project+runtime@0.
|
|
177
|
-
function
|
|
178
|
-
var t =
|
|
179
|
-
return
|
|
176
|
+
//#region \0@oxc-project+runtime@0.127.0/helpers/toPropertyKey.js
|
|
177
|
+
function le(e) {
|
|
178
|
+
var t = ce(e, "string");
|
|
179
|
+
return S(t) == "symbol" ? t : t + "";
|
|
180
180
|
}
|
|
181
181
|
//#endregion
|
|
182
|
-
//#region \0@oxc-project+runtime@0.
|
|
183
|
-
function
|
|
184
|
-
return (t =
|
|
182
|
+
//#region \0@oxc-project+runtime@0.127.0/helpers/defineProperty.js
|
|
183
|
+
function C(e, t, n) {
|
|
184
|
+
return (t = le(t)) in e ? Object.defineProperty(e, t, {
|
|
185
185
|
value: n,
|
|
186
186
|
enumerable: !0,
|
|
187
187
|
configurable: !0,
|
|
@@ -190,9 +190,9 @@ function S(e, t, n) {
|
|
|
190
190
|
}
|
|
191
191
|
//#endregion
|
|
192
192
|
//#region src/classes/ErrorCenterHandler.ts
|
|
193
|
-
var
|
|
193
|
+
var ue = class {
|
|
194
194
|
constructor(e) {
|
|
195
|
-
|
|
195
|
+
C(this, "handlers", []), e && this.addList(e);
|
|
196
196
|
}
|
|
197
197
|
has(e) {
|
|
198
198
|
return !!this.get(e);
|
|
@@ -216,11 +216,11 @@ var de = class {
|
|
|
216
216
|
return n && n.handlers.forEach((t) => t(e)), this.toConsole(e), this;
|
|
217
217
|
}
|
|
218
218
|
toConsole(e) {
|
|
219
|
-
return console.error(`Error Center: ${e.code}`), console.error(e.message), this;
|
|
219
|
+
return console.error(`Error Center: ${e.code}`), console.error("Error Center/message: ", e.message), console.error("Error Center/details", e.details), this;
|
|
220
220
|
}
|
|
221
|
-
},
|
|
222
|
-
constructor(e, t = new
|
|
223
|
-
|
|
221
|
+
}, de = class {
|
|
222
|
+
constructor(e, t = new ue()) {
|
|
223
|
+
C(this, "causes", []), this.handler = t, e && this.addList(e);
|
|
224
224
|
}
|
|
225
225
|
has(e, t) {
|
|
226
226
|
return !!this.get(e, t);
|
|
@@ -257,7 +257,7 @@ var de = class {
|
|
|
257
257
|
}
|
|
258
258
|
return e;
|
|
259
259
|
}
|
|
260
|
-
},
|
|
260
|
+
}, fe = [
|
|
261
261
|
{
|
|
262
262
|
group: "api",
|
|
263
263
|
code: "cacheClear",
|
|
@@ -408,7 +408,7 @@ var de = class {
|
|
|
408
408
|
label: "Translate Error",
|
|
409
409
|
message: "An error occurred while loading translations."
|
|
410
410
|
}
|
|
411
|
-
],
|
|
411
|
+
], w = class {
|
|
412
412
|
static getItem() {
|
|
413
413
|
return this.item;
|
|
414
414
|
}
|
|
@@ -434,22 +434,22 @@ var de = class {
|
|
|
434
434
|
this.getItem().on(e);
|
|
435
435
|
}
|
|
436
436
|
};
|
|
437
|
-
|
|
437
|
+
C(w, "item", new de(fe));
|
|
438
438
|
//#endregion
|
|
439
439
|
//#region src/functions/getElementSafeScript.ts
|
|
440
|
-
function
|
|
440
|
+
function pe(e, t) {
|
|
441
441
|
return `<script id="${e.replace(/"/g, """)}" type="application/json">${JSON.stringify(t).replace(/<\/(script)>/gi, "<\\/$1>")}<\/script>`;
|
|
442
442
|
}
|
|
443
443
|
//#endregion
|
|
444
444
|
//#region src/functions/getHydrationData.ts
|
|
445
|
-
function
|
|
445
|
+
function me(e, t, n = !0) {
|
|
446
446
|
if (typeof document < "u") {
|
|
447
447
|
let t = document.getElementById(e);
|
|
448
448
|
if (t) try {
|
|
449
449
|
let e = JSON.parse(t.textContent || "");
|
|
450
450
|
return n && t.remove(), e;
|
|
451
451
|
} catch (t) {
|
|
452
|
-
|
|
452
|
+
w.on({
|
|
453
453
|
group: "hydration",
|
|
454
454
|
code: "error",
|
|
455
455
|
details: {
|
|
@@ -463,7 +463,7 @@ function he(e, t, n = !0) {
|
|
|
463
463
|
}
|
|
464
464
|
//#endregion
|
|
465
465
|
//#region src/classes/ServerStorage.ts
|
|
466
|
-
var
|
|
466
|
+
var he = "__ui:server-storage__", ge = "__ui:server:storage:id__", T = class {
|
|
467
467
|
static init(e) {
|
|
468
468
|
return this.listener || (this.listener = e), this;
|
|
469
469
|
}
|
|
@@ -471,15 +471,15 @@ var w = "__ui:server-storage__", ge = "__ui:server:storage:id__", T = class {
|
|
|
471
471
|
this.storage = void 0, this.listener = void 0;
|
|
472
472
|
}
|
|
473
473
|
static has(e) {
|
|
474
|
-
return e in this.getStorage();
|
|
474
|
+
return e in this.getStorage(!1, `has:${e}`);
|
|
475
475
|
}
|
|
476
476
|
static get(e, t, n = !1) {
|
|
477
|
-
let r = this.getStorage();
|
|
477
|
+
let r = this.getStorage(void 0, `get:${e}`);
|
|
478
478
|
if (e in r) return r[e].value;
|
|
479
479
|
if (t) return this.set(e, t, n);
|
|
480
480
|
}
|
|
481
481
|
static set(e, t, n = !1) {
|
|
482
|
-
let r = this.getStorage(), i = t();
|
|
482
|
+
let r = this.getStorage(void 0, `set:${e}`), i = t();
|
|
483
483
|
return r[e] = {
|
|
484
484
|
value: i,
|
|
485
485
|
hydration: n
|
|
@@ -493,20 +493,25 @@ var w = "__ui:server-storage__", ge = "__ui:server:storage:id__", T = class {
|
|
|
493
493
|
e in t && delete t[e];
|
|
494
494
|
}
|
|
495
495
|
static toString() {
|
|
496
|
-
return
|
|
496
|
+
return pe(ge, this.getDataForHydration());
|
|
497
497
|
}
|
|
498
|
-
static getStorage() {
|
|
499
|
-
var
|
|
498
|
+
static getStorage(e = !0, t) {
|
|
499
|
+
var n;
|
|
500
500
|
if (s()) return this.getStorageDom();
|
|
501
|
-
let
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
501
|
+
let r = (n = this.listener) == null ? void 0 : n.call(this);
|
|
502
|
+
if (!r) {
|
|
503
|
+
var i;
|
|
504
|
+
return this.hideError || w.on({
|
|
505
|
+
group: "storage",
|
|
506
|
+
code: "context",
|
|
507
|
+
details: { status: t }
|
|
508
|
+
}), e && !this.storage && (this.storage = {}), (i = this.storage) == null ? {} : i;
|
|
509
|
+
}
|
|
510
|
+
return he in r || (r[he] = {}), r[he];
|
|
506
511
|
}
|
|
507
512
|
static getStorageDom() {
|
|
508
513
|
if (!this.storage) {
|
|
509
|
-
let e =
|
|
514
|
+
let e = me(ge, {});
|
|
510
515
|
this.storage = {}, r(e, (e, t) => {
|
|
511
516
|
this.storage[t] = {
|
|
512
517
|
value: e,
|
|
@@ -517,21 +522,21 @@ var w = "__ui:server-storage__", ge = "__ui:server:storage:id__", T = class {
|
|
|
517
522
|
return this.storage;
|
|
518
523
|
}
|
|
519
524
|
static getDataForHydration() {
|
|
520
|
-
let e = this.getStorage(), t = {};
|
|
525
|
+
let e = this.getStorage(void 0, "hydration"), t = {};
|
|
521
526
|
return r(e, (e, n) => {
|
|
522
527
|
e.hydration && (t[n] = e.value);
|
|
523
528
|
}), t;
|
|
524
529
|
}
|
|
525
530
|
};
|
|
526
|
-
|
|
531
|
+
C(T, "storage", void 0), C(T, "listener", void 0), C(T, "hideError", void 0);
|
|
527
532
|
//#endregion
|
|
528
533
|
//#region src/classes/DataStorage.ts
|
|
529
534
|
var _e = "ui-storage", ve = () => T.get("__ui:data-storage__", () => ({})), E = class {
|
|
530
535
|
static setPrefix(e) {
|
|
531
536
|
_e = e;
|
|
532
537
|
}
|
|
533
|
-
constructor(e, t = !1, n =
|
|
534
|
-
|
|
538
|
+
constructor(e, t = !1, n = w.getItem()) {
|
|
539
|
+
C(this, "value", void 0), C(this, "age", void 0), this.name = e, this.isSession = t, this.errorCenter = n;
|
|
535
540
|
let r = `${t ? "session" : "storage"}#${e}`, i = ve();
|
|
536
541
|
if (r in i) return i[r];
|
|
537
542
|
this.make(), i[r] = this;
|
|
@@ -541,10 +546,10 @@ var _e = "ui-storage", ve = () => T.get("__ui:data-storage__", () => ({})), E =
|
|
|
541
546
|
if (e !== void 0) return this.set(e);
|
|
542
547
|
}
|
|
543
548
|
set(e) {
|
|
544
|
-
if (this.value =
|
|
549
|
+
if (this.value = x(e), this.age = Date.now(), this.value === void 0) this.remove();
|
|
545
550
|
else {
|
|
546
551
|
var t;
|
|
547
|
-
(t = this.getMethod()) == null || t.setItem(this.getIndex(),
|
|
552
|
+
(t = this.getMethod()) == null || t.setItem(this.getIndex(), oe(JSON.stringify({
|
|
548
553
|
value: this.value,
|
|
549
554
|
age: this.age
|
|
550
555
|
})));
|
|
@@ -562,7 +567,7 @@ var _e = "ui-storage", ve = () => T.get("__ui:data-storage__", () => ({})), E =
|
|
|
562
567
|
return c(e) || this.age && this.age + e * 1e3 >= Date.now();
|
|
563
568
|
}
|
|
564
569
|
getMethod() {
|
|
565
|
-
if (s() && !
|
|
570
|
+
if (s() && !se()) {
|
|
566
571
|
var e, t;
|
|
567
572
|
let n = this.isSession ? (e = window) == null ? void 0 : e.sessionStorage : (t = window) == null ? void 0 : t.localStorage;
|
|
568
573
|
if (n) return n;
|
|
@@ -590,7 +595,7 @@ var _e = "ui-storage", ve = () => T.get("__ui:data-storage__", () => ({})), E =
|
|
|
590
595
|
}
|
|
591
596
|
}, ye = "__ui:geo-code__", be = class {
|
|
592
597
|
constructor() {
|
|
593
|
-
|
|
598
|
+
C(this, "storage", new E(ye)), C(this, "location", void 0), C(this, "item", void 0), C(this, "language", void 0), C(this, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
|
|
594
599
|
}
|
|
595
600
|
get() {
|
|
596
601
|
return this.item;
|
|
@@ -626,7 +631,7 @@ var _e = "ui-storage", ve = () => T.get("__ui:data-storage__", () => ({})), E =
|
|
|
626
631
|
return e && (/([A-Z]{2}-[a-z]{2})|([a-z]{2}-[A-Z]{2})/.test(e) && (n = this.getByCodeFull(e)), !n && /[a-z]{2}/.test(e) && (n = this.getByLanguage(this.toLanguage(e))), !n && /[A-Z]{2}/.test(e) && (n = this.getByCountry(this.toCountry(e)))), this.toFull((t = n) == null ? this.getList()[0] : t);
|
|
627
632
|
}
|
|
628
633
|
getByCodeFull(e) {
|
|
629
|
-
return this.getList().find((t) =>
|
|
634
|
+
return this.getList().find((t) => y(e, [`${t.language}-${t.country}`, `${t.country}-${t.language}`]));
|
|
630
635
|
}
|
|
631
636
|
getByCountry(e) {
|
|
632
637
|
return this.getList().find((t) => {
|
|
@@ -740,14 +745,14 @@ var _e = "ui-storage", ve = () => T.get("__ui:data-storage__", () => ({})), E =
|
|
|
740
745
|
};
|
|
741
746
|
//#endregion
|
|
742
747
|
//#region src/functions/isWindow.ts
|
|
743
|
-
function
|
|
748
|
+
function O(e) {
|
|
744
749
|
return s() && e === window;
|
|
745
750
|
}
|
|
746
751
|
//#endregion
|
|
747
752
|
//#region src/functions/getElement.ts
|
|
748
|
-
function
|
|
753
|
+
function k(e) {
|
|
749
754
|
if (!s()) return d(e) ? void 0 : e;
|
|
750
|
-
if (
|
|
755
|
+
if (O(e)) return document.body;
|
|
751
756
|
if (d(e)) {
|
|
752
757
|
var t;
|
|
753
758
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -756,30 +761,30 @@ function O(e) {
|
|
|
756
761
|
}
|
|
757
762
|
//#endregion
|
|
758
763
|
//#region src/functions/getElementOrWindow.ts
|
|
759
|
-
function
|
|
760
|
-
return
|
|
764
|
+
function xe(e) {
|
|
765
|
+
return O(e) ? e : k(e);
|
|
761
766
|
}
|
|
762
767
|
//#endregion
|
|
763
768
|
//#region src/functions/isInDom.ts
|
|
764
|
-
function
|
|
769
|
+
function Se(e) {
|
|
765
770
|
var t;
|
|
766
|
-
return (e == null ? void 0 : e.isConnected) || !!((t =
|
|
771
|
+
return (e == null ? void 0 : e.isConnected) || !!((t = k(e)) != null && t.closest("html"));
|
|
767
772
|
}
|
|
768
773
|
//#endregion
|
|
769
774
|
//#region src/functions/toArray.ts
|
|
770
|
-
function
|
|
775
|
+
function A(e) {
|
|
771
776
|
return Array.isArray(e) ? e : [e];
|
|
772
777
|
}
|
|
773
778
|
//#endregion
|
|
774
779
|
//#region src/classes/EventItem.ts
|
|
775
|
-
var
|
|
780
|
+
var Ce = class {
|
|
776
781
|
constructor(e, n = ["click"], r, i, a) {
|
|
777
|
-
|
|
778
|
-
if (
|
|
782
|
+
C(this, "element", void 0), C(this, "elementControl", void 0), C(this, "elementControlEdit", void 0), C(this, "type", void 0), C(this, "listenerRecent", (e) => {
|
|
783
|
+
if (Se(this.elementControl)) {
|
|
779
784
|
var n, r;
|
|
780
785
|
(n = this.listener) == null || n.call(this.element, e, this.detail), t(this.options) && (r = this.options) != null && r.once && this.stop();
|
|
781
786
|
} else this.stop();
|
|
782
|
-
}),
|
|
787
|
+
}), C(this, "activity", !1), C(this, "activityItems", []), this.listener = r, this.options = i, this.detail = a, this.element = xe(e), this.elementControl = k(e), this.type = A(n);
|
|
783
788
|
}
|
|
784
789
|
isActive() {
|
|
785
790
|
return this.activity;
|
|
@@ -788,14 +793,14 @@ var we = class {
|
|
|
788
793
|
return this.element;
|
|
789
794
|
}
|
|
790
795
|
setElement(e) {
|
|
791
|
-
let t =
|
|
792
|
-
return this.elementControlEdit || (this.elementControl =
|
|
796
|
+
let t = xe(e);
|
|
797
|
+
return this.elementControlEdit || (this.elementControl = k(e)), this.element = t, this.reset(), this;
|
|
793
798
|
}
|
|
794
799
|
setElementControl(e) {
|
|
795
|
-
return this.elementControl =
|
|
800
|
+
return this.elementControl = k(e), this.elementControlEdit = !c(this.elementControl), this.elementControlEdit || (this.elementControl = k(this.element)), this;
|
|
796
801
|
}
|
|
797
802
|
setType(e) {
|
|
798
|
-
return this.type =
|
|
803
|
+
return this.type = A(e), this.reset(), this;
|
|
799
804
|
}
|
|
800
805
|
setListener(e) {
|
|
801
806
|
return this.listener = e, this;
|
|
@@ -864,9 +869,9 @@ var we = class {
|
|
|
864
869
|
}
|
|
865
870
|
return !1;
|
|
866
871
|
}
|
|
867
|
-
},
|
|
868
|
-
constructor(e =
|
|
869
|
-
|
|
872
|
+
}, we = "ui-loading", Te = class {
|
|
873
|
+
constructor(e = we) {
|
|
874
|
+
C(this, "value", 0), C(this, "event", void 0), C(this, "registrationList", []), this.eventName = e, s() && (this.event = new Ce(window, this.eventName));
|
|
870
875
|
}
|
|
871
876
|
is() {
|
|
872
877
|
return this.value > 0;
|
|
@@ -882,7 +887,7 @@ var we = class {
|
|
|
882
887
|
}
|
|
883
888
|
registrationEvent(e, t) {
|
|
884
889
|
if (s()) {
|
|
885
|
-
let n = new
|
|
890
|
+
let n = new Ce(window, this.eventName, e).setElementControl(t).start();
|
|
886
891
|
this.registrationList.push({
|
|
887
892
|
item: n,
|
|
888
893
|
listener: e,
|
|
@@ -897,7 +902,7 @@ var we = class {
|
|
|
897
902
|
var e;
|
|
898
903
|
(e = this.event) == null || e.dispatch({ loading: this.is() });
|
|
899
904
|
}
|
|
900
|
-
},
|
|
905
|
+
}, j = class {
|
|
901
906
|
static is() {
|
|
902
907
|
return this.getItem().is();
|
|
903
908
|
}
|
|
@@ -905,7 +910,7 @@ var we = class {
|
|
|
905
910
|
return this.getItem().get();
|
|
906
911
|
}
|
|
907
912
|
static getItem() {
|
|
908
|
-
return T.get("__ui:loading-instance__", () => new
|
|
913
|
+
return T.get("__ui:loading-instance__", () => new Te());
|
|
909
914
|
}
|
|
910
915
|
static show() {
|
|
911
916
|
this.getItem().show();
|
|
@@ -919,7 +924,7 @@ var we = class {
|
|
|
919
924
|
static unregistrationEvent(e, t) {
|
|
920
925
|
this.getItem().unregistrationEvent(e, t);
|
|
921
926
|
}
|
|
922
|
-
},
|
|
927
|
+
}, Ee, De = 1440 * 60, M = class {
|
|
923
928
|
static init(e, t, n, r) {
|
|
924
929
|
this.getListener = e, this.setListener = t, this.removeListener = n, r && (this.cacheStepAgeClearOld = r, this.stepAgeClearOld = r);
|
|
925
930
|
}
|
|
@@ -929,7 +934,7 @@ var we = class {
|
|
|
929
934
|
static async get(e) {
|
|
930
935
|
let t = await this.getItemOrListener(e);
|
|
931
936
|
return this.clearOld().catch((e) => {
|
|
932
|
-
|
|
937
|
+
w.on({
|
|
933
938
|
group: "api",
|
|
934
939
|
code: "cacheClear",
|
|
935
940
|
details: e
|
|
@@ -941,7 +946,7 @@ var we = class {
|
|
|
941
946
|
let t = this.generateKey(e);
|
|
942
947
|
return await this.get(t);
|
|
943
948
|
}
|
|
944
|
-
static async set(e, t, n =
|
|
949
|
+
static async set(e, t, n = De) {
|
|
945
950
|
let r = {
|
|
946
951
|
value: t,
|
|
947
952
|
age: n,
|
|
@@ -1004,12 +1009,12 @@ var we = class {
|
|
|
1004
1009
|
}
|
|
1005
1010
|
}
|
|
1006
1011
|
};
|
|
1007
|
-
|
|
1012
|
+
Ee = M, C(M, "items", void 0), C(M, "getListener", void 0), C(M, "setListener", void 0), C(M, "removeListener", void 0), C(M, "cacheStepAgeClearOld", 16384), C(M, "stepAgeClearOld", Ee.cacheStepAgeClearOld);
|
|
1008
1013
|
//#endregion
|
|
1009
1014
|
//#region src/classes/ApiStatus.ts
|
|
1010
|
-
var
|
|
1015
|
+
var Oe = class {
|
|
1011
1016
|
constructor() {
|
|
1012
|
-
|
|
1017
|
+
C(this, "value", void 0);
|
|
1013
1018
|
}
|
|
1014
1019
|
get() {
|
|
1015
1020
|
return this.value;
|
|
@@ -1069,14 +1074,14 @@ var ke = class {
|
|
|
1069
1074
|
setValue(e, t) {
|
|
1070
1075
|
this.value || (this.value = {}), this.value[e] = t;
|
|
1071
1076
|
}
|
|
1072
|
-
},
|
|
1077
|
+
}, ke = [
|
|
1073
1078
|
"success",
|
|
1074
1079
|
"status",
|
|
1075
1080
|
"code",
|
|
1076
1081
|
"message"
|
|
1077
|
-
],
|
|
1082
|
+
], Ae = class {
|
|
1078
1083
|
constructor(e, t, n) {
|
|
1079
|
-
|
|
1084
|
+
C(this, "data", void 0), C(this, "dataMod", void 0), this.apiFetch = e, this.query = t, this.end = n;
|
|
1080
1085
|
}
|
|
1081
1086
|
async init() {
|
|
1082
1087
|
return this.data = await this.readData(), this;
|
|
@@ -1105,15 +1110,15 @@ var ke = class {
|
|
|
1105
1110
|
}
|
|
1106
1111
|
initItem(e) {
|
|
1107
1112
|
let t = { ...e.data };
|
|
1108
|
-
return
|
|
1113
|
+
return ke.forEach((n) => {
|
|
1109
1114
|
n in e && !(n in t) && (t[n] = e[n]);
|
|
1110
1115
|
}), t;
|
|
1111
1116
|
}
|
|
1112
|
-
},
|
|
1117
|
+
}, N = /* @__PURE__ */ function(e) {
|
|
1113
1118
|
return e.delete = "DELETE", e.get = "GET", e.post = "POST", e.put = "PUT", e.patch = "PATCH", e;
|
|
1114
|
-
}({}),
|
|
1119
|
+
}({}), je = class {
|
|
1115
1120
|
constructor() {
|
|
1116
|
-
|
|
1121
|
+
C(this, "value", void 0);
|
|
1117
1122
|
}
|
|
1118
1123
|
is() {
|
|
1119
1124
|
return !!this.value;
|
|
@@ -1140,9 +1145,9 @@ var ke = class {
|
|
|
1140
1145
|
e.has(t) || e.set(t, n);
|
|
1141
1146
|
}), this;
|
|
1142
1147
|
}
|
|
1143
|
-
},
|
|
1148
|
+
}, Me = class {
|
|
1144
1149
|
constructor() {
|
|
1145
|
-
|
|
1150
|
+
C(this, "headers", {});
|
|
1146
1151
|
}
|
|
1147
1152
|
get(e, t = "application/json;charset=UTF-8") {
|
|
1148
1153
|
if (e === null) return;
|
|
@@ -1155,15 +1160,15 @@ var ke = class {
|
|
|
1155
1160
|
set(e) {
|
|
1156
1161
|
return n(e) && (this.headers = e), this;
|
|
1157
1162
|
}
|
|
1158
|
-
},
|
|
1163
|
+
}, Ne = "__ui:api:hydration:id__", Pe = class {
|
|
1159
1164
|
constructor() {
|
|
1160
|
-
|
|
1165
|
+
C(this, "list", []);
|
|
1161
1166
|
}
|
|
1162
1167
|
initResponse(e) {
|
|
1163
1168
|
s() && e.add(this.getListByClient());
|
|
1164
1169
|
}
|
|
1165
1170
|
toClient(e, t) {
|
|
1166
|
-
let { path: n, method: r =
|
|
1171
|
+
let { path: n, method: r = N.get, request: i, global: a = r === N.get } = e;
|
|
1167
1172
|
!a || !n || s() || this.list.push({
|
|
1168
1173
|
path: n,
|
|
1169
1174
|
method: r,
|
|
@@ -1172,14 +1177,14 @@ var ke = class {
|
|
|
1172
1177
|
});
|
|
1173
1178
|
}
|
|
1174
1179
|
toString() {
|
|
1175
|
-
return
|
|
1180
|
+
return pe(Ne, this.list);
|
|
1176
1181
|
}
|
|
1177
1182
|
getListByClient() {
|
|
1178
|
-
return
|
|
1183
|
+
return me(Ne, []);
|
|
1179
1184
|
}
|
|
1180
|
-
},
|
|
1185
|
+
}, Fe = class {
|
|
1181
1186
|
constructor() {
|
|
1182
|
-
|
|
1187
|
+
C(this, "callback", void 0), C(this, "callbackEnd", void 0), C(this, "loading", !1);
|
|
1183
1188
|
}
|
|
1184
1189
|
async make(e, t) {
|
|
1185
1190
|
if (e && this.callback) return this.go(t);
|
|
@@ -1205,15 +1210,15 @@ var ke = class {
|
|
|
1205
1210
|
};
|
|
1206
1211
|
//#endregion
|
|
1207
1212
|
//#region src/functions/executePromise.ts
|
|
1208
|
-
async function
|
|
1209
|
-
let n =
|
|
1213
|
+
async function Ie(e, ...t) {
|
|
1214
|
+
let n = x(e, ...t);
|
|
1210
1215
|
return n instanceof Promise ? await n : n;
|
|
1211
1216
|
}
|
|
1212
1217
|
//#endregion
|
|
1213
1218
|
//#region src/classes/ApiResponse.ts
|
|
1214
|
-
var
|
|
1219
|
+
var Le = "d-response-loading", Re = class {
|
|
1215
1220
|
constructor(e) {
|
|
1216
|
-
|
|
1221
|
+
C(this, "first", []), C(this, "response", []), C(this, "loading", void 0), C(this, "devMode", !1), this.requestDefault = e;
|
|
1217
1222
|
}
|
|
1218
1223
|
get(e = "", t, n, r) {
|
|
1219
1224
|
return this.response.find((i) => !this.isDisable(i) && this.isPath(i, e) && t === i.method && this.isFirst(i, r) && this.isResponse(i, n) ? (this.isDevMode(r) && console.warn(`Response type: ${i.path}`), this.first.push(i), !0) : !1);
|
|
@@ -1222,24 +1227,24 @@ var Re = "d-response-loading", ze = class {
|
|
|
1222
1227
|
return this.response.filter((e) => e.isForGlobal !== !0);
|
|
1223
1228
|
}
|
|
1224
1229
|
add(e) {
|
|
1225
|
-
return this.response.push(...
|
|
1230
|
+
return this.response.push(...A(e)), this;
|
|
1226
1231
|
}
|
|
1227
1232
|
setDevMode(e) {
|
|
1228
1233
|
return this.devMode = e, this;
|
|
1229
1234
|
}
|
|
1230
1235
|
async emulator(e) {
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
if (a) {
|
|
1236
|
-
let e = await this.fetch(a, r);
|
|
1237
|
-
return this.isDevMode(i) && console.warn("Response data:", t, r, e), e;
|
|
1238
|
-
}
|
|
1236
|
+
let t = this.readData(e);
|
|
1237
|
+
if (t) {
|
|
1238
|
+
let { path: n = "", devMode: r = !1 } = e, i = await this.fetch(t.response, t.request);
|
|
1239
|
+
return this.isDevMode(r) && console.warn("Response data:", n, t.request, i), i;
|
|
1239
1240
|
}
|
|
1240
1241
|
}
|
|
1242
|
+
emulatorAsync(e) {
|
|
1243
|
+
let t = this.readData(e);
|
|
1244
|
+
if (t) return this.fetchAsync(t.response);
|
|
1245
|
+
}
|
|
1241
1246
|
isDisable(e) {
|
|
1242
|
-
return !!
|
|
1247
|
+
return !!x(e == null ? void 0 : e.disable);
|
|
1243
1248
|
}
|
|
1244
1249
|
isPath(e, t) {
|
|
1245
1250
|
return t === e.path || !!(e.path instanceof RegExp && e.path.test(t));
|
|
@@ -1254,27 +1259,41 @@ var Re = "d-response-loading", ze = class {
|
|
|
1254
1259
|
let r = this.requestDefault.request(e == null ? void 0 : e.request);
|
|
1255
1260
|
return t === r || r === "*any" || l(t) && l(r) && n(t) && n(r) && !(t instanceof FormData) && !(r instanceof FormData) && Object.values(t).length === Object.values(r).length && Object.entries(r).every(([e, n]) => n === (t == null ? void 0 : t[e]) || n === "*any");
|
|
1256
1261
|
}
|
|
1262
|
+
readData(e) {
|
|
1263
|
+
if (!s()) return;
|
|
1264
|
+
let { path: t = "", method: n = N.get, global: r = n === N.get, devMode: i = !1 } = e;
|
|
1265
|
+
if (r || this.isDevMode(i)) {
|
|
1266
|
+
let r = this.requestDefault.request(e.request), a = this.get(t, n, r, i);
|
|
1267
|
+
if (a) return {
|
|
1268
|
+
response: a,
|
|
1269
|
+
request: r
|
|
1270
|
+
};
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1257
1273
|
fetch(e, t) {
|
|
1258
1274
|
return this.startResponseLoading(), new Promise((n) => {
|
|
1259
|
-
|
|
1260
|
-
e != null && e.lag ? (
|
|
1261
|
-
this.stopResponseLoading(), n(t),
|
|
1275
|
+
Ie(b(e.response) ? e.response(t) : e.response).then((t) => {
|
|
1276
|
+
e != null && e.lag ? (j.show(), setTimeout(() => {
|
|
1277
|
+
this.stopResponseLoading(), n(t), j.hide();
|
|
1262
1278
|
}, f(0, 2e3))) : (this.stopResponseLoading(), n(t));
|
|
1263
1279
|
});
|
|
1264
1280
|
});
|
|
1265
1281
|
}
|
|
1282
|
+
fetchAsync(e) {
|
|
1283
|
+
return e.response;
|
|
1284
|
+
}
|
|
1266
1285
|
startResponseLoading() {
|
|
1267
|
-
this.loading && clearTimeout(this.loading), s() && document.body.classList.add(
|
|
1286
|
+
this.loading && clearTimeout(this.loading), s() && document.body.classList.add(Le);
|
|
1268
1287
|
}
|
|
1269
1288
|
stopResponseLoading() {
|
|
1270
1289
|
s() && (this.loading = setTimeout(() => {
|
|
1271
|
-
this.loading = void 0, document.body.classList.remove(
|
|
1290
|
+
this.loading = void 0, document.body.classList.remove(Le);
|
|
1272
1291
|
}, 2400));
|
|
1273
1292
|
}
|
|
1274
|
-
},
|
|
1293
|
+
}, ze = class {
|
|
1275
1294
|
constructor(e = "/api/", t = {}) {
|
|
1276
|
-
|
|
1277
|
-
let { headersClass: n =
|
|
1295
|
+
C(this, "headers", void 0), C(this, "requestDefault", void 0), C(this, "status", void 0), C(this, "response", void 0), C(this, "preparation", void 0), C(this, "loading", void 0), C(this, "errorCenter", void 0), C(this, "hydration", void 0), C(this, "timeout", 16e3), C(this, "origin", void 0), this.url = e;
|
|
1296
|
+
let { headersClass: n = Me, requestDefaultClass: r = je, statusClass: i = Oe, responseClass: a = Re, preparationClass: o = Fe, loadingClass: s = j.getItem(), errorCenterClass: c = w.getItem(), hydrationClass: l = Pe } = t;
|
|
1278
1297
|
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);
|
|
1279
1298
|
}
|
|
1280
1299
|
isLocalhost() {
|
|
@@ -1289,15 +1308,18 @@ var Re = "d-response-loading", ze = class {
|
|
|
1289
1308
|
getHydration() {
|
|
1290
1309
|
return this.hydration;
|
|
1291
1310
|
}
|
|
1311
|
+
getOrigin() {
|
|
1312
|
+
return this.origin && /^\//.test(this.url) ? `${this.origin}${this.url}` : this.url;
|
|
1313
|
+
}
|
|
1292
1314
|
getUrl(e, t = !0) {
|
|
1293
|
-
return `${t ? this.
|
|
1315
|
+
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}", D.getLocation()).replace("{country}", D.getCountry()).replace("{language}", D.getLanguage());
|
|
1294
1316
|
}
|
|
1295
|
-
getBody(e = {}, t =
|
|
1317
|
+
getBody(e = {}, t = N.get) {
|
|
1296
1318
|
if (e instanceof FormData) return e;
|
|
1297
|
-
if (t !==
|
|
1319
|
+
if (t !== N.get && l(e)) return d(e) ? e : JSON.stringify(e);
|
|
1298
1320
|
}
|
|
1299
|
-
getBodyForGet(e, t = "", n =
|
|
1300
|
-
if (n ===
|
|
1321
|
+
getBodyForGet(e, t = "", n = N.get) {
|
|
1322
|
+
if (n === N.get) {
|
|
1301
1323
|
let n = t.match(/\?/) ? "&" : "?", r = typeof e == "object" ? o(e) : e;
|
|
1302
1324
|
if (l(r)) return `${n}${r}`;
|
|
1303
1325
|
}
|
|
@@ -1324,80 +1346,83 @@ var Re = "d-response-loading", ze = class {
|
|
|
1324
1346
|
setTimeout(e) {
|
|
1325
1347
|
return this.timeout = e, this;
|
|
1326
1348
|
}
|
|
1349
|
+
setOrigin(e) {
|
|
1350
|
+
return this.origin = e, this;
|
|
1351
|
+
}
|
|
1327
1352
|
async request(e) {
|
|
1328
1353
|
return d(e) ? await this.fetch({ path: e }) : await this.fetch(e);
|
|
1329
1354
|
}
|
|
1330
1355
|
get(e) {
|
|
1331
1356
|
return this.request({
|
|
1332
1357
|
...e,
|
|
1333
|
-
method:
|
|
1358
|
+
method: N.get
|
|
1334
1359
|
});
|
|
1335
1360
|
}
|
|
1336
1361
|
post(e) {
|
|
1337
1362
|
return this.request({
|
|
1338
1363
|
...e,
|
|
1339
|
-
method:
|
|
1364
|
+
method: N.post
|
|
1340
1365
|
});
|
|
1341
1366
|
}
|
|
1342
1367
|
put(e) {
|
|
1343
1368
|
return this.request({
|
|
1344
1369
|
...e,
|
|
1345
|
-
method:
|
|
1370
|
+
method: N.put
|
|
1346
1371
|
});
|
|
1347
1372
|
}
|
|
1348
1373
|
patch(e) {
|
|
1349
1374
|
return this.request({
|
|
1350
1375
|
...e,
|
|
1351
|
-
method:
|
|
1376
|
+
method: N.patch
|
|
1352
1377
|
});
|
|
1353
1378
|
}
|
|
1354
1379
|
delete(e) {
|
|
1355
1380
|
return this.request({
|
|
1356
1381
|
...e,
|
|
1357
|
-
method:
|
|
1382
|
+
method: N.delete
|
|
1358
1383
|
});
|
|
1359
1384
|
}
|
|
1360
1385
|
getRetryDelay(e, t) {
|
|
1361
1386
|
return f(t, t + e * t);
|
|
1362
1387
|
}
|
|
1363
1388
|
async fetch(e, t = 0) {
|
|
1364
|
-
let {
|
|
1365
|
-
if (
|
|
1366
|
-
let
|
|
1367
|
-
if (
|
|
1368
|
-
let
|
|
1369
|
-
|
|
1389
|
+
let { api: n = !0, path: r = "", hideError: i = !1, hideLoading: a = !1, retry: o = 0, retryDelay: s = 64, globalPreparation: c = !0, globalEnd: l = !0, endResetLimit: u = 8 } = e, d = this.getUrl(r, n), f = await this.response.emulator(e);
|
|
1390
|
+
if (f) return f;
|
|
1391
|
+
let p = await M.getByFetch(e);
|
|
1392
|
+
if (p) return this.hydration.toClient(e, p), p;
|
|
1393
|
+
let m = new Oe(), h;
|
|
1394
|
+
a || this.loading.show();
|
|
1370
1395
|
try {
|
|
1371
|
-
await this.preparation.make(
|
|
1372
|
-
let { query:
|
|
1373
|
-
|
|
1374
|
-
let
|
|
1375
|
-
if (
|
|
1376
|
-
|
|
1396
|
+
await this.preparation.make(c, e);
|
|
1397
|
+
let { query: n, timeoutId: r } = await this.makeQuery(e, d);
|
|
1398
|
+
r && clearTimeout(r);
|
|
1399
|
+
let f = await this.preparation.makeEnd(l, n, e);
|
|
1400
|
+
if (m.setStatus(n.status, n.statusText), this.status.setStatus(n.status, n.statusText), !i && n.status >= 400 && this.makeErrorQuery(n), f != null && f.reset && t < u || t < o) return await ee(this.getRetryDelay(t, s)), a || this.loading.hide(), await this.fetch(e, t + 1);
|
|
1401
|
+
h = new Ae(e, n, f), await h.init();
|
|
1377
1402
|
} catch (e) {
|
|
1378
|
-
throw
|
|
1403
|
+
throw i || this.makeError(e), m.setError(String(e)), this.status.setError(String(e)), a || this.loading.hide(), e;
|
|
1379
1404
|
}
|
|
1380
|
-
|
|
1381
|
-
let
|
|
1382
|
-
return
|
|
1383
|
-
}
|
|
1384
|
-
async makeQuery(e) {
|
|
1385
|
-
let
|
|
1386
|
-
...
|
|
1387
|
-
method:
|
|
1388
|
-
body: this.getBody(
|
|
1405
|
+
m.setLastResponse(h.getData()), this.status.setLastResponse(h.getData());
|
|
1406
|
+
let g = h.getAndStatus(m);
|
|
1407
|
+
return a || this.loading.hide(), this.hydration.toClient(e, g), await M.setByFetch(e, g), g;
|
|
1408
|
+
}
|
|
1409
|
+
async makeQuery(e, t) {
|
|
1410
|
+
let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i = N.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 = {
|
|
1411
|
+
...s,
|
|
1412
|
+
method: i,
|
|
1413
|
+
body: this.getBody(n, i)
|
|
1389
1414
|
};
|
|
1390
|
-
if (
|
|
1391
|
-
var
|
|
1392
|
-
|
|
1393
|
-
...
|
|
1394
|
-
...(
|
|
1415
|
+
if (u) {
|
|
1416
|
+
var f;
|
|
1417
|
+
d.headers = {
|
|
1418
|
+
...u,
|
|
1419
|
+
...(f = s.headers) == null ? {} : f
|
|
1395
1420
|
};
|
|
1396
1421
|
}
|
|
1397
|
-
let
|
|
1422
|
+
let ee = this.initController(e, d);
|
|
1398
1423
|
return {
|
|
1399
|
-
query: await fetch(
|
|
1400
|
-
timeoutId:
|
|
1424
|
+
query: await fetch(l, d),
|
|
1425
|
+
timeoutId: ee
|
|
1401
1426
|
};
|
|
1402
1427
|
}
|
|
1403
1428
|
makeError(e, t = "api") {
|
|
@@ -1475,12 +1500,12 @@ var Re = "d-response-loading", ze = class {
|
|
|
1475
1500
|
}, n);
|
|
1476
1501
|
}
|
|
1477
1502
|
}
|
|
1478
|
-
},
|
|
1503
|
+
}, P = class {
|
|
1479
1504
|
static isLocalhost() {
|
|
1480
1505
|
return this.getItem().isLocalhost();
|
|
1481
1506
|
}
|
|
1482
1507
|
static getItem() {
|
|
1483
|
-
return T.get("__ui:api-instance__", () => new
|
|
1508
|
+
return T.get("__ui:api-instance__", () => new ze());
|
|
1484
1509
|
}
|
|
1485
1510
|
static getStatus() {
|
|
1486
1511
|
return this.getItem().getStatus();
|
|
@@ -1494,13 +1519,16 @@ var Re = "d-response-loading", ze = class {
|
|
|
1494
1519
|
static getHydrationScript() {
|
|
1495
1520
|
return this.getItem().getHydrationScript();
|
|
1496
1521
|
}
|
|
1522
|
+
static getOrigin() {
|
|
1523
|
+
return this.getItem().getOrigin();
|
|
1524
|
+
}
|
|
1497
1525
|
static getUrl(e, t = !0) {
|
|
1498
1526
|
return this.getItem().getUrl(e, t);
|
|
1499
1527
|
}
|
|
1500
|
-
static getBody(e = {}, t =
|
|
1528
|
+
static getBody(e = {}, t = N.get) {
|
|
1501
1529
|
return this.getItem().getBody(e, t);
|
|
1502
1530
|
}
|
|
1503
|
-
static getBodyForGet(e, t = "", n =
|
|
1531
|
+
static getBodyForGet(e, t = "", n = N.get) {
|
|
1504
1532
|
return this.getItem().getBodyForGet(e, t, n);
|
|
1505
1533
|
}
|
|
1506
1534
|
static setHeaders(e) {
|
|
@@ -1521,8 +1549,11 @@ var Re = "d-response-loading", ze = class {
|
|
|
1521
1549
|
static setTimeout(e) {
|
|
1522
1550
|
this.getItem().setTimeout(e);
|
|
1523
1551
|
}
|
|
1552
|
+
static setOrigin(e) {
|
|
1553
|
+
this.getItem().setOrigin(e);
|
|
1554
|
+
}
|
|
1524
1555
|
static setConfig(e) {
|
|
1525
|
-
e && n(e) && (e.urlRoot && this.setUrl(e.urlRoot), e.headers && this.setHeaders(e.headers), e.requestDefault && this.setRequestDefault(e.requestDefault), e.preparation && this.setPreparation(e.preparation), e.end && this.setEnd(e.end), e.timeout && this.setTimeout(e.timeout));
|
|
1556
|
+
e && n(e) && (e.urlRoot && this.setUrl(e.urlRoot), e.headers && this.setHeaders(e.headers), e.requestDefault && this.setRequestDefault(e.requestDefault), e.preparation && this.setPreparation(e.preparation), e.end && this.setEnd(e.end), e.timeout && this.setTimeout(e.timeout), e.origin && this.setOrigin(e.origin));
|
|
1526
1557
|
}
|
|
1527
1558
|
static async request(e) {
|
|
1528
1559
|
return this.getItem().request(e);
|
|
@@ -1542,16 +1573,16 @@ var Re = "d-response-loading", ze = class {
|
|
|
1542
1573
|
static delete(e) {
|
|
1543
1574
|
return this.getItem().delete(e);
|
|
1544
1575
|
}
|
|
1545
|
-
},
|
|
1546
|
-
constructor(e, t, n, r =
|
|
1547
|
-
if (
|
|
1576
|
+
}, Be = class {
|
|
1577
|
+
constructor(e, t, n, r = w.getItem()) {
|
|
1578
|
+
if (C(this, "channel", void 0), C(this, "update", (e) => {
|
|
1548
1579
|
var t;
|
|
1549
1580
|
return (t = this.callback) == null || t.call(this, e), this;
|
|
1550
|
-
}),
|
|
1581
|
+
}), C(this, "updateError", (e) => {
|
|
1551
1582
|
var t;
|
|
1552
1583
|
return (t = this.callbackError) == null || t.call(this, e), this;
|
|
1553
1584
|
}), this.callback = t, this.callbackError = n, s()) try {
|
|
1554
|
-
this.channel = new BroadcastChannel(`${
|
|
1585
|
+
this.channel = new BroadcastChannel(`${Ve()}__${e}`), this.channel.onmessage = this.update, this.channel.onmessageerror = this.updateError;
|
|
1555
1586
|
} catch (e) {
|
|
1556
1587
|
r.on({
|
|
1557
1588
|
group: "broadcast",
|
|
@@ -1577,9 +1608,9 @@ var Re = "d-response-loading", ze = class {
|
|
|
1577
1608
|
var e;
|
|
1578
1609
|
return (e = this.channel) == null || e.close(), this.channel = void 0, this;
|
|
1579
1610
|
}
|
|
1580
|
-
},
|
|
1611
|
+
}, Ve = () => new E("__ui:broadcast-name__").get(() => `name_${f(1e6, 9999999)}`), He = class {
|
|
1581
1612
|
constructor(e) {
|
|
1582
|
-
|
|
1613
|
+
C(this, "cache", void 0), C(this, "cacheOld", void 0), C(this, "comparisons", []), this.callback = e;
|
|
1583
1614
|
}
|
|
1584
1615
|
getCache(e) {
|
|
1585
1616
|
return this.isUpdate(e) && (this.cacheOld = this.cache, this.setCache()), this.cache;
|
|
@@ -1599,9 +1630,9 @@ var Re = "d-response-loading", ze = class {
|
|
|
1599
1630
|
isUpdate(e) {
|
|
1600
1631
|
return this.cache === void 0 || this.comparisons.length !== e.length || this.comparisons.findIndex((t, n) => t !== e[n]) >= 0 ? (this.comparisons = [...e], !0) : !1;
|
|
1601
1632
|
}
|
|
1602
|
-
},
|
|
1633
|
+
}, Ue = class {
|
|
1603
1634
|
constructor() {
|
|
1604
|
-
|
|
1635
|
+
C(this, "cache", {});
|
|
1605
1636
|
}
|
|
1606
1637
|
get(e, t, n) {
|
|
1607
1638
|
return this.getCacheItem(e, t).getCache(n == null ? [] : n);
|
|
@@ -1610,11 +1641,11 @@ var Re = "d-response-loading", ze = class {
|
|
|
1610
1641
|
return await this.getCacheItem(e, t).getCacheAsync(n == null ? [] : n);
|
|
1611
1642
|
}
|
|
1612
1643
|
getCacheItem(e, t) {
|
|
1613
|
-
return e in this.cache || (this.cache[e] = new
|
|
1644
|
+
return e in this.cache || (this.cache[e] = new He(t)), this.cache[e];
|
|
1614
1645
|
}
|
|
1615
|
-
},
|
|
1646
|
+
}, We = class {
|
|
1616
1647
|
static getItem() {
|
|
1617
|
-
return T.get("__ui:cache-static__", () => new
|
|
1648
|
+
return T.get("__ui:cache-static__", () => new Ue());
|
|
1618
1649
|
}
|
|
1619
1650
|
static get(e, t, n) {
|
|
1620
1651
|
return this.getItem().get(e, t, n);
|
|
@@ -1625,7 +1656,7 @@ var Re = "d-response-loading", ze = class {
|
|
|
1625
1656
|
};
|
|
1626
1657
|
//#endregion
|
|
1627
1658
|
//#region src/functions/anyToString.ts
|
|
1628
|
-
function
|
|
1659
|
+
function F(e, n = !0, r = !0) {
|
|
1629
1660
|
var a;
|
|
1630
1661
|
if (d(e)) return r ? e.trim() : e;
|
|
1631
1662
|
if (c(e)) return "";
|
|
@@ -1639,15 +1670,15 @@ function P(e, n = !0, r = !0) {
|
|
|
1639
1670
|
}
|
|
1640
1671
|
//#endregion
|
|
1641
1672
|
//#region src/functions/strSplit.ts
|
|
1642
|
-
function
|
|
1643
|
-
let r =
|
|
1673
|
+
function Ge(e, t, n) {
|
|
1674
|
+
let r = F(e);
|
|
1644
1675
|
if (!n || n <= 0) return r.split(t);
|
|
1645
1676
|
let i = r.split(t, n), a = r.split(t);
|
|
1646
1677
|
return i.length === a.length ? i : (i.pop(), [...i, a.slice(n - 1).join(t)]);
|
|
1647
1678
|
}
|
|
1648
1679
|
//#endregion
|
|
1649
1680
|
//#region src/functions/transformation.ts
|
|
1650
|
-
function
|
|
1681
|
+
function Ke(e, t = !1) {
|
|
1651
1682
|
if (typeof e == "string") {
|
|
1652
1683
|
let r = e.trim();
|
|
1653
1684
|
switch (r) {
|
|
@@ -1660,7 +1691,7 @@ function I(e, t = !1) {
|
|
|
1660
1691
|
if (/^[{[]/.exec(r)) try {
|
|
1661
1692
|
return JSON.parse(r);
|
|
1662
1693
|
} catch (e) {
|
|
1663
|
-
|
|
1694
|
+
w.on({
|
|
1664
1695
|
group: "transformation",
|
|
1665
1696
|
code: "error",
|
|
1666
1697
|
details: e
|
|
@@ -1675,9 +1706,9 @@ function I(e, t = !1) {
|
|
|
1675
1706
|
}
|
|
1676
1707
|
//#endregion
|
|
1677
1708
|
//#region src/classes/CookieBlockInstance.ts
|
|
1678
|
-
var
|
|
1709
|
+
var qe = "__ui:cookie-block__", Je = class {
|
|
1679
1710
|
constructor() {
|
|
1680
|
-
|
|
1711
|
+
C(this, "storage", new E(qe));
|
|
1681
1712
|
}
|
|
1682
1713
|
get() {
|
|
1683
1714
|
var e;
|
|
@@ -1686,9 +1717,9 @@ var Ke = "__ui:cookie-block__", qe = class {
|
|
|
1686
1717
|
set(e) {
|
|
1687
1718
|
this.storage.set(e);
|
|
1688
1719
|
}
|
|
1689
|
-
},
|
|
1720
|
+
}, Ye = class {
|
|
1690
1721
|
static getItem() {
|
|
1691
|
-
return T.get("__ui:cookie-block__", () => new
|
|
1722
|
+
return T.get("__ui:cookie-block__", () => new Je());
|
|
1692
1723
|
}
|
|
1693
1724
|
static get() {
|
|
1694
1725
|
return this.getItem().get();
|
|
@@ -1696,87 +1727,117 @@ var Ke = "__ui:cookie-block__", qe = class {
|
|
|
1696
1727
|
static set(e) {
|
|
1697
1728
|
this.getItem().set(e);
|
|
1698
1729
|
}
|
|
1699
|
-
},
|
|
1700
|
-
static init(e, t) {
|
|
1701
|
-
this.getListener = e, this.setListener =
|
|
1730
|
+
}, Xe = "__ui:cookie-storage__", I = class {
|
|
1731
|
+
static init(e, t, n) {
|
|
1732
|
+
this.getListener = e, this.getListenerRaw = t, this.setListener = n;
|
|
1702
1733
|
}
|
|
1703
1734
|
static reset() {
|
|
1704
|
-
this.getListener = void 0, this.setListener = void 0;
|
|
1735
|
+
this.getListener = void 0, this.getListenerRaw = void 0, this.setListener = void 0;
|
|
1705
1736
|
}
|
|
1706
1737
|
static get(e, t) {
|
|
1707
|
-
|
|
1708
|
-
|
|
1738
|
+
var n, r;
|
|
1739
|
+
let i = (n = (r = this.getListener) == null ? void 0 : r.call(this, e)) == null ? this.initItems()[e] : n;
|
|
1740
|
+
return i === void 0 && t !== void 0 ? this.set(e, t) : Ke(i);
|
|
1709
1741
|
}
|
|
1710
1742
|
static set(e, t, n) {
|
|
1711
|
-
let r =
|
|
1712
|
-
if (
|
|
1713
|
-
let i =
|
|
1714
|
-
return this.setListener ? this.setListener(e, i, n) : (this.initItems()[e] = i === "" ? void 0 : r, this.hasDom() && (document.cookie =
|
|
1715
|
-
`${encodeURIComponent(e)}=${encodeURIComponent(i)}`,
|
|
1716
|
-
this.toMaxAge(i, n == null ? void 0 : n.age),
|
|
1717
|
-
this.toSameSite(n == null ? void 0 : n.sameSite),
|
|
1718
|
-
...this.toArguments(n == null ? void 0 : n.arguments)
|
|
1719
|
-
].join("; "))), r;
|
|
1743
|
+
let r = x(t);
|
|
1744
|
+
if (Ye.get()) return r;
|
|
1745
|
+
let i = F(r, !1);
|
|
1746
|
+
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;
|
|
1720
1747
|
}
|
|
1721
1748
|
static remove(e) {
|
|
1722
1749
|
this.set(e, "", { age: -1 });
|
|
1723
1750
|
}
|
|
1724
1751
|
static update() {
|
|
1725
|
-
s() && (T.remove(
|
|
1752
|
+
s() && (T.remove(Xe), this.initItems());
|
|
1753
|
+
}
|
|
1754
|
+
static format(e, t, n) {
|
|
1755
|
+
return [
|
|
1756
|
+
`${encodeURIComponent(e)}=${encodeURIComponent(t)}`,
|
|
1757
|
+
this.toMaxAge(t, n == null ? void 0 : n.age),
|
|
1758
|
+
this.toSameSite(n == null ? void 0 : n.sameSite),
|
|
1759
|
+
this.toPath(n == null ? void 0 : n.path),
|
|
1760
|
+
this.toDomain(n == null ? void 0 : n.domain),
|
|
1761
|
+
this.toSecure(n == null ? void 0 : n.secure),
|
|
1762
|
+
this.toHttpOnly(n == null ? void 0 : n.httpOnly),
|
|
1763
|
+
this.toPartitioned(n == null ? void 0 : n.partitioned),
|
|
1764
|
+
...this.toArguments(n == null ? void 0 : n.arguments)
|
|
1765
|
+
].filter(Boolean).join("; ");
|
|
1726
1766
|
}
|
|
1727
1767
|
static hasDom() {
|
|
1728
|
-
return s() && !
|
|
1768
|
+
return s() && !se();
|
|
1769
|
+
}
|
|
1770
|
+
static parse(e) {
|
|
1771
|
+
let t = {};
|
|
1772
|
+
for (let n of e.split(";")) {
|
|
1773
|
+
let [e, r] = Ge(n.trim(), "=", 2);
|
|
1774
|
+
e && l(r) && (t[e] = r);
|
|
1775
|
+
}
|
|
1776
|
+
return t;
|
|
1729
1777
|
}
|
|
1730
1778
|
static initItems() {
|
|
1731
|
-
return T.get(
|
|
1732
|
-
|
|
1733
|
-
if (this.hasDom())
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
}
|
|
1737
|
-
return e;
|
|
1779
|
+
return T.get(Xe, () => {
|
|
1780
|
+
var e;
|
|
1781
|
+
if (this.hasDom()) return this.parse(document.cookie);
|
|
1782
|
+
let t = (e = this.getListenerRaw) == null ? void 0 : e.call(this);
|
|
1783
|
+
return l(t) ? this.parse(t) : {};
|
|
1738
1784
|
});
|
|
1739
1785
|
}
|
|
1740
1786
|
static toMaxAge(e, t) {
|
|
1741
|
-
return `
|
|
1787
|
+
return `Max-Age=${encodeURIComponent(e === "" ? -1 : t == null ? 10080 * 60 : t)}`;
|
|
1742
1788
|
}
|
|
1743
1789
|
static toSameSite(e) {
|
|
1744
|
-
return `SameSite=${e == null ? "
|
|
1790
|
+
return `SameSite=${encodeURIComponent(e == null ? "Strict" : e)}`;
|
|
1791
|
+
}
|
|
1792
|
+
static toPath(e) {
|
|
1793
|
+
return `Path=${encodeURIComponent(e == null ? "/" : e)}`;
|
|
1794
|
+
}
|
|
1795
|
+
static toDomain(e) {
|
|
1796
|
+
return e ? `Domain=${encodeURIComponent(e)}` : void 0;
|
|
1797
|
+
}
|
|
1798
|
+
static toSecure(e) {
|
|
1799
|
+
return e ? "Secure" : void 0;
|
|
1800
|
+
}
|
|
1801
|
+
static toHttpOnly(e) {
|
|
1802
|
+
return e ? "HttpOnly" : void 0;
|
|
1803
|
+
}
|
|
1804
|
+
static toPartitioned(e) {
|
|
1805
|
+
return e ? "Partitioned" : void 0;
|
|
1745
1806
|
}
|
|
1746
1807
|
static toArguments(e) {
|
|
1747
|
-
return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${
|
|
1808
|
+
return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${F(t)}`);
|
|
1748
1809
|
}
|
|
1749
1810
|
};
|
|
1750
|
-
|
|
1811
|
+
C(I, "getListener", void 0), C(I, "getListenerRaw", void 0), C(I, "setListener", void 0);
|
|
1751
1812
|
//#endregion
|
|
1752
1813
|
//#region src/classes/Cookie.ts
|
|
1753
|
-
var
|
|
1814
|
+
var Ze = () => T.get("__ui:cookie-items__", () => ({})), Qe = class e {
|
|
1754
1815
|
static getInstance(t) {
|
|
1755
1816
|
var n, r;
|
|
1756
|
-
return (n = (r =
|
|
1817
|
+
return (n = (r = Ze()) == null ? void 0 : r[t]) == null ? new e(t) : n;
|
|
1757
1818
|
}
|
|
1758
1819
|
constructor(e) {
|
|
1759
|
-
|
|
1760
|
-
let t =
|
|
1820
|
+
C(this, "value", void 0), C(this, "options", {}), this.name = e;
|
|
1821
|
+
let t = Ze();
|
|
1761
1822
|
if (e in t) return t[e];
|
|
1762
|
-
this.value =
|
|
1823
|
+
this.value = I.get(this.name), t[e] = this;
|
|
1763
1824
|
}
|
|
1764
1825
|
get(e, t) {
|
|
1765
1826
|
return this.value === void 0 && e && this.set(e, t), this.value;
|
|
1766
1827
|
}
|
|
1767
1828
|
set(e, t) {
|
|
1768
|
-
this.value =
|
|
1829
|
+
this.value = x(e), Object.assign(this.options, t), this.update();
|
|
1769
1830
|
}
|
|
1770
1831
|
remove() {
|
|
1771
1832
|
this.set("");
|
|
1772
1833
|
}
|
|
1773
1834
|
update() {
|
|
1774
|
-
|
|
1835
|
+
I.set(this.name, this.value, this.options);
|
|
1775
1836
|
}
|
|
1776
1837
|
};
|
|
1777
1838
|
//#endregion
|
|
1778
1839
|
//#region src/functions/toDate.ts
|
|
1779
|
-
function
|
|
1840
|
+
function L(e) {
|
|
1780
1841
|
var t, n, r, i, a, o, s, l;
|
|
1781
1842
|
if (e instanceof Date) return e;
|
|
1782
1843
|
if (c(e)) return /* @__PURE__ */ new Date();
|
|
@@ -1788,29 +1849,29 @@ function R(e) {
|
|
|
1788
1849
|
}
|
|
1789
1850
|
//#endregion
|
|
1790
1851
|
//#region src/functions/getColumn.ts
|
|
1791
|
-
function
|
|
1852
|
+
function $e(e, t) {
|
|
1792
1853
|
return r(e, (e) => e == null ? void 0 : e[t], !0);
|
|
1793
1854
|
}
|
|
1794
1855
|
//#endregion
|
|
1795
1856
|
//#region src/classes/GeoIntl.ts
|
|
1796
|
-
var
|
|
1857
|
+
var R = class e {
|
|
1797
1858
|
static isItem(e = D.getLocation()) {
|
|
1798
|
-
return this.getLocation(e) in
|
|
1859
|
+
return this.getLocation(e) in B;
|
|
1799
1860
|
}
|
|
1800
1861
|
static getLocation(e = D.getLocation()) {
|
|
1801
|
-
if (e in
|
|
1862
|
+
if (e in z) return z[e];
|
|
1802
1863
|
let t = D.find(e);
|
|
1803
|
-
return
|
|
1864
|
+
return z[e] = t.standard, t.standard;
|
|
1804
1865
|
}
|
|
1805
1866
|
static getInstance(t = D.getLocation()) {
|
|
1806
1867
|
let n = this.getLocation(t);
|
|
1807
|
-
return n in
|
|
1868
|
+
return n in B ? B[n] : new e(t);
|
|
1808
1869
|
}
|
|
1809
|
-
constructor(e = D.getLocation(), t =
|
|
1810
|
-
|
|
1870
|
+
constructor(e = D.getLocation(), t = w.getItem()) {
|
|
1871
|
+
C(this, "geo", void 0), this.errorCenter = t, this.geo = D.find(e);
|
|
1811
1872
|
let n = this.getLocation();
|
|
1812
|
-
if (n in
|
|
1813
|
-
|
|
1873
|
+
if (n in B) return B[n];
|
|
1874
|
+
z[e] = n, B[n] = this;
|
|
1814
1875
|
}
|
|
1815
1876
|
getLocation() {
|
|
1816
1877
|
return this.geo.standard;
|
|
@@ -1871,7 +1932,7 @@ var z = class e {
|
|
|
1871
1932
|
}
|
|
1872
1933
|
number(e, t) {
|
|
1873
1934
|
var n, r;
|
|
1874
|
-
return ((n = this.numberObject(t)) == null || (r = n.format) == null ? void 0 : r.call(n,
|
|
1935
|
+
return ((n = this.numberObject(t)) == null || (r = n.format) == null ? void 0 : r.call(n, v(e))) || e.toString();
|
|
1875
1936
|
}
|
|
1876
1937
|
decimal() {
|
|
1877
1938
|
var e, t, n;
|
|
@@ -1885,7 +1946,7 @@ var z = class e {
|
|
|
1885
1946
|
}, i = e.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...e) => (r.currency = String(e[2]).toUpperCase(), String(e[1])));
|
|
1886
1947
|
if (n) {
|
|
1887
1948
|
let t = this.numberObject(r);
|
|
1888
|
-
return t ?
|
|
1949
|
+
return t ? $e(t.formatToParts(v(e)).filter((e) => ["literal", "currency"].indexOf(e.type) === -1), "value").join("") : e.toString();
|
|
1889
1950
|
} else if ("currency" in r) return this.number(typeof e == "number" ? e : i, r);
|
|
1890
1951
|
else return this.number(typeof e == "number" ? e : i, {
|
|
1891
1952
|
...r,
|
|
@@ -1908,7 +1969,7 @@ var z = class e {
|
|
|
1908
1969
|
return this.number(r, n);
|
|
1909
1970
|
}
|
|
1910
1971
|
sizeFile(e, t = "byte") {
|
|
1911
|
-
let n =
|
|
1972
|
+
let n = v(e);
|
|
1912
1973
|
if (n > 1024 && d(t)) switch (t) {
|
|
1913
1974
|
case "byte": return this.sizeFile(n / 1024, "kilobyte");
|
|
1914
1975
|
case "kilobyte": return this.sizeFile(n / 1024, "megabyte");
|
|
@@ -1925,11 +1986,11 @@ var z = class e {
|
|
|
1925
1986
|
});
|
|
1926
1987
|
}
|
|
1927
1988
|
percentBy100(e, t) {
|
|
1928
|
-
return this.percent(
|
|
1989
|
+
return this.percent(v(e) / 100, t);
|
|
1929
1990
|
}
|
|
1930
1991
|
plural(e, t, n, r) {
|
|
1931
1992
|
var i;
|
|
1932
|
-
let a =
|
|
1993
|
+
let a = v(e), o = t.split("|");
|
|
1933
1994
|
if (o.length > 1) try {
|
|
1934
1995
|
if (typeof Intl < "u") {
|
|
1935
1996
|
var s;
|
|
@@ -1966,18 +2027,18 @@ var z = class e {
|
|
|
1966
2027
|
return `${this.number(a, r)} ${(i = o == null ? void 0 : o[0]) == null ? "" : i}`.trim();
|
|
1967
2028
|
}
|
|
1968
2029
|
date(e, t, n, r) {
|
|
1969
|
-
let i =
|
|
2030
|
+
let i = L(e), a = typeof n == "string", o = this.dateOptions(t, a ? n : "short");
|
|
1970
2031
|
return r && (o.hour12 = !1), a || Object.assign(o, n), i.toLocaleString(this.getLocation(), o);
|
|
1971
2032
|
}
|
|
1972
2033
|
relative(e, t, n) {
|
|
1973
|
-
let r =
|
|
2034
|
+
let r = L(e), i = n || /* @__PURE__ */ new Date(), a = {
|
|
1974
2035
|
numeric: "auto",
|
|
1975
2036
|
...typeof t == "string" ? { style: t } : t || {}
|
|
1976
2037
|
}, o = "second", s = (r.getTime() - i.getTime()) / 1e3;
|
|
1977
2038
|
return Math.abs(s) >= 60 && (o = "minute", s /= 60, Math.abs(s) >= 60 && (o = "hour", s /= 60, Math.abs(s) >= 24 && (o = "day", s /= 24, Math.abs(s) >= 30 && (o = "month", s /= 30, Math.abs(s) >= 12 && (o = "year", s /= 12))))), this.relativeByValue(s, o, a);
|
|
1978
2039
|
}
|
|
1979
2040
|
relativeLimit(e, t, n, r, i, a, o) {
|
|
1980
|
-
let s =
|
|
2041
|
+
let s = L(e), c = n || /* @__PURE__ */ new Date(), l = new Date(c), u = new Date(c);
|
|
1981
2042
|
return l.setDate(c.getDate() - t), u.setDate(c.getDate() + t), s >= l && s <= u ? this.relative(s, r, c) : this.date(s, a, i, o);
|
|
1982
2043
|
}
|
|
1983
2044
|
relativeByValue(e, t, n) {
|
|
@@ -1986,7 +2047,7 @@ var z = class e {
|
|
|
1986
2047
|
...typeof n == "string" ? { style: n } : n || {}
|
|
1987
2048
|
};
|
|
1988
2049
|
try {
|
|
1989
|
-
if (this.hasIntl() && Intl.RelativeTimeFormat !== void 0) return new Intl.RelativeTimeFormat(this.getLocation(), r).format(Math.round(
|
|
2050
|
+
if (this.hasIntl() && Intl.RelativeTimeFormat !== void 0) return new Intl.RelativeTimeFormat(this.getLocation(), r).format(Math.round(v(e)), t);
|
|
1990
2051
|
} catch (e) {
|
|
1991
2052
|
this.errorCenter.on({
|
|
1992
2053
|
group: "intl",
|
|
@@ -1998,7 +2059,7 @@ var z = class e {
|
|
|
1998
2059
|
}
|
|
1999
2060
|
month(e, t) {
|
|
2000
2061
|
try {
|
|
2001
|
-
if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(
|
|
2062
|
+
if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(L(e));
|
|
2002
2063
|
} catch (e) {
|
|
2003
2064
|
this.errorCenter.on({
|
|
2004
2065
|
group: "intl",
|
|
@@ -2032,7 +2093,7 @@ var z = class e {
|
|
|
2032
2093
|
}
|
|
2033
2094
|
weekday(e, t) {
|
|
2034
2095
|
try {
|
|
2035
|
-
if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(
|
|
2096
|
+
if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(L(e));
|
|
2036
2097
|
} catch (e) {
|
|
2037
2098
|
this.errorCenter.on({
|
|
2038
2099
|
group: "intl",
|
|
@@ -2134,15 +2195,15 @@ var z = class e {
|
|
|
2134
2195
|
"second"
|
|
2135
2196
|
].indexOf(e) !== -1 && (n.second = "2-digit")), n;
|
|
2136
2197
|
}
|
|
2137
|
-
},
|
|
2198
|
+
}, z = {}, B = {}, et = class e {
|
|
2138
2199
|
constructor(e, t = "date", n = D.getLocation()) {
|
|
2139
|
-
|
|
2200
|
+
C(this, "date", void 0), C(this, "hour24", !1), C(this, "watch", void 0), this.type = t, this.code = n, this.date = L(e), isNaN(this.date.getTime()) && w.on({
|
|
2140
2201
|
group: "intl",
|
|
2141
2202
|
code: "invalid"
|
|
2142
2203
|
});
|
|
2143
2204
|
}
|
|
2144
2205
|
getIntl() {
|
|
2145
|
-
return
|
|
2206
|
+
return R.getInstance(this.code);
|
|
2146
2207
|
}
|
|
2147
2208
|
getDate() {
|
|
2148
2209
|
return this.date;
|
|
@@ -2245,7 +2306,7 @@ var z = class e {
|
|
|
2245
2306
|
].indexOf(this.type) !== -1 && (i = n.locale("time"))), `${r.join("-")}${i ? `T${i}${t ? n.getTimeZone() : ""}` : ""}`;
|
|
2246
2307
|
}
|
|
2247
2308
|
setDate(e) {
|
|
2248
|
-
return this.date =
|
|
2309
|
+
return this.date = L(e), this.update(), this;
|
|
2249
2310
|
}
|
|
2250
2311
|
setType(e) {
|
|
2251
2312
|
return this.type = e, this.update(), this;
|
|
@@ -2397,15 +2458,15 @@ var z = class e {
|
|
|
2397
2458
|
};
|
|
2398
2459
|
//#endregion
|
|
2399
2460
|
//#region src/functions/getItemByPath.ts
|
|
2400
|
-
function
|
|
2461
|
+
function V(e, n) {
|
|
2401
2462
|
var r;
|
|
2402
2463
|
if (!l(n, !0)) return;
|
|
2403
|
-
let i =
|
|
2404
|
-
return a && e != null && e[a] && t(e[a]) && i != null && i[1] ?
|
|
2464
|
+
let i = Ge(n, ".", 2), a = i[0];
|
|
2465
|
+
return a && e != null && e[a] && t(e[a]) && i != null && i[1] ? V(e[a], i[1]) : (r = e == null ? void 0 : e[a]) == null ? void 0 : r;
|
|
2405
2466
|
}
|
|
2406
2467
|
//#endregion
|
|
2407
2468
|
//#region src/functions/toCamelCase.ts
|
|
2408
|
-
function
|
|
2469
|
+
function H(e) {
|
|
2409
2470
|
return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/-+([a-zA-Z0-9])/g, (...e) => `${String(e[1]).toUpperCase()}`).replace(/^([A-Z])/, (e) => `${e.toLowerCase()}`);
|
|
2410
2471
|
}
|
|
2411
2472
|
//#endregion
|
|
@@ -2426,7 +2487,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2426
2487
|
return this.list ? this.isArray() ? this.list.length : 1 : 0;
|
|
2427
2488
|
}
|
|
2428
2489
|
getList() {
|
|
2429
|
-
return this.list ?
|
|
2490
|
+
return this.list ? A(this.list) : [];
|
|
2430
2491
|
}
|
|
2431
2492
|
getOptions() {
|
|
2432
2493
|
return this.options;
|
|
@@ -2444,7 +2505,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2444
2505
|
getFormatData(e) {
|
|
2445
2506
|
let t = {};
|
|
2446
2507
|
return r(this.options, (n, r) => {
|
|
2447
|
-
let i = `${
|
|
2508
|
+
let i = `${H(r)}Format`, a = V(e, r);
|
|
2448
2509
|
n != null && n.transformation ? l(a) ? t[i] = n.transformation(a, e, n.options) : t[i] = "" : t[i] = this.transformation(a, e, n.type, n.options);
|
|
2449
2510
|
}), t;
|
|
2450
2511
|
}
|
|
@@ -2462,25 +2523,25 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2462
2523
|
}
|
|
2463
2524
|
formatCurrency(e, t, n) {
|
|
2464
2525
|
var r;
|
|
2465
|
-
let i = n != null && n.currencyPropName ?
|
|
2466
|
-
return
|
|
2526
|
+
let i = n != null && n.currencyPropName ? V(t, n.currencyPropName) : t == null ? void 0 : t.currency;
|
|
2527
|
+
return R.getInstance().currency(e, (r = n == null ? void 0 : n.options) == null ? i : r, n == null ? void 0 : n.numberOnly);
|
|
2467
2528
|
}
|
|
2468
2529
|
formatDate(e, t) {
|
|
2469
|
-
return
|
|
2530
|
+
return R.getInstance().date(e, t == null ? void 0 : t.type, t == null ? void 0 : t.options, t == null ? void 0 : t.hour24);
|
|
2470
2531
|
}
|
|
2471
2532
|
formatName(e, t) {
|
|
2472
2533
|
var n, r, i;
|
|
2473
|
-
let a =
|
|
2474
|
-
return a && o ?
|
|
2534
|
+
let a = V(e, (n = t == null ? void 0 : t.lastPropName) == null ? "lastName" : n), o = V(e, (r = t == null ? void 0 : t.firstPropName) == null ? "firstName" : r), s = V(e, (i = t == null ? void 0 : t.surname) == null ? "surname" : i);
|
|
2535
|
+
return a && o ? R.getInstance().fullName(a, o, s, t == null ? void 0 : t.short) : "";
|
|
2475
2536
|
}
|
|
2476
2537
|
formatNumber(e, t) {
|
|
2477
|
-
return
|
|
2538
|
+
return R.getInstance().number(e, t == null ? void 0 : t.options);
|
|
2478
2539
|
}
|
|
2479
2540
|
formatPlural(e, t) {
|
|
2480
|
-
return t && t.words ?
|
|
2541
|
+
return t && t.words ? R.getInstance().plural(e, t == null ? void 0 : t.words, t == null ? void 0 : t.options, t == null ? void 0 : t.optionsNumber) : e;
|
|
2481
2542
|
}
|
|
2482
2543
|
formatUnit(e, t) {
|
|
2483
|
-
return t && t.unit ?
|
|
2544
|
+
return t && t.unit ? R.getInstance().unit(e, t.unit) : e;
|
|
2484
2545
|
}
|
|
2485
2546
|
}, nt = "f", rt = class e {
|
|
2486
2547
|
constructor(e = D.getLocation()) {
|
|
@@ -2523,7 +2584,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2523
2584
|
return this.code = e, this;
|
|
2524
2585
|
}
|
|
2525
2586
|
getLocation() {
|
|
2526
|
-
return new
|
|
2587
|
+
return new R(this.code);
|
|
2527
2588
|
}
|
|
2528
2589
|
getCodes(t) {
|
|
2529
2590
|
return t == null ? Object.keys(e.flags) : t;
|
|
@@ -2535,7 +2596,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2535
2596
|
return this.getLocation().countryName(e.country);
|
|
2536
2597
|
}
|
|
2537
2598
|
};
|
|
2538
|
-
|
|
2599
|
+
C(rt, "flags", {
|
|
2539
2600
|
AD: "f-ad",
|
|
2540
2601
|
AE: "f-ae",
|
|
2541
2602
|
AF: "f-af",
|
|
@@ -2836,14 +2897,15 @@ var it = class {
|
|
|
2836
2897
|
return (t = (n = e.match(/\*/g)) == null ? void 0 : n.length) == null ? 0 : t;
|
|
2837
2898
|
}
|
|
2838
2899
|
static makeList() {
|
|
2839
|
-
|
|
2900
|
+
let e = r(D.getList(), (e) => {
|
|
2840
2901
|
if (e != null && e.phoneMask) return {
|
|
2841
2902
|
phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/g, "")) || void 0,
|
|
2842
2903
|
within: (e == null ? void 0 : e.phoneWithin) || 0,
|
|
2843
|
-
mask:
|
|
2904
|
+
mask: A(e.phoneMask),
|
|
2844
2905
|
value: e.country
|
|
2845
2906
|
};
|
|
2846
|
-
})
|
|
2907
|
+
});
|
|
2908
|
+
this.list = e.sort((e, t) => e.phone - t.phone);
|
|
2847
2909
|
}
|
|
2848
2910
|
static makeMap() {
|
|
2849
2911
|
this.map = {}, this.getList().forEach((e) => {
|
|
@@ -2878,7 +2940,7 @@ var it = class {
|
|
|
2878
2940
|
return e.replace(/\*/, this.getWithinSymbol(t));
|
|
2879
2941
|
}
|
|
2880
2942
|
};
|
|
2881
|
-
|
|
2943
|
+
C(it, "list", void 0), C(it, "map", void 0);
|
|
2882
2944
|
//#endregion
|
|
2883
2945
|
//#region src/classes/Global.ts
|
|
2884
2946
|
var at = class {
|
|
@@ -2895,7 +2957,7 @@ var at = class {
|
|
|
2895
2957
|
}
|
|
2896
2958
|
}, ot = class {
|
|
2897
2959
|
constructor() {
|
|
2898
|
-
|
|
2960
|
+
C(this, "hash", void 0), C(this, "watch", {}), C(this, "block", !1), C(this, "time", void 0);
|
|
2899
2961
|
}
|
|
2900
2962
|
get(e, t) {
|
|
2901
2963
|
let n = this.getHash();
|
|
@@ -2903,7 +2965,7 @@ var at = class {
|
|
|
2903
2965
|
}
|
|
2904
2966
|
set(e, t) {
|
|
2905
2967
|
var n;
|
|
2906
|
-
let r =
|
|
2968
|
+
let r = x(t);
|
|
2907
2969
|
return r !== ((n = this.hash) == null ? void 0 : n[e]) && (this.getHash()[e] = r, this.update()), this;
|
|
2908
2970
|
}
|
|
2909
2971
|
addWatch(e, t) {
|
|
@@ -2925,7 +2987,7 @@ var at = class {
|
|
|
2925
2987
|
let e = {};
|
|
2926
2988
|
if (s()) {
|
|
2927
2989
|
let t = location.hash.matchAll(/([\w-]+)[:=]([^;]+)/gi);
|
|
2928
|
-
for (let n of t) e[n[1]] =
|
|
2990
|
+
for (let n of t) e[n[1]] = Ke(n[2]);
|
|
2929
2991
|
}
|
|
2930
2992
|
return e;
|
|
2931
2993
|
}
|
|
@@ -2983,15 +3045,18 @@ var at = class {
|
|
|
2983
3045
|
return e in this.icons || this.getName(e) in this.icons;
|
|
2984
3046
|
}
|
|
2985
3047
|
static async get(e, t = "", n = 1e3 * 60 * 3) {
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
3048
|
+
let r = this.getRaw(e, t);
|
|
3049
|
+
return typeof r == "string" ? r === lt && n > 0 ? (await this.wait(), this.get(e, t, n - ct)) : r : b(r) ? await r() : await r;
|
|
3050
|
+
}
|
|
3051
|
+
static getAsync(e, t = "") {
|
|
3052
|
+
let n = this.getRaw(e, t);
|
|
3053
|
+
return typeof n == "string" && n !== lt ? n : "";
|
|
2989
3054
|
}
|
|
2990
3055
|
static getNameList() {
|
|
2991
3056
|
return r(this.icons, (e, t) => t.replace(/^@/, ""));
|
|
2992
3057
|
}
|
|
2993
3058
|
static getUrlGlobal() {
|
|
2994
|
-
return `${
|
|
3059
|
+
return `${P.isLocalhost(), ""}${this.url}`;
|
|
2995
3060
|
}
|
|
2996
3061
|
static add(e, t) {
|
|
2997
3062
|
this.icons[this.getName(e)] = t;
|
|
@@ -3014,28 +3079,32 @@ var at = class {
|
|
|
3014
3079
|
static getName(e) {
|
|
3015
3080
|
return `@${e}`;
|
|
3016
3081
|
}
|
|
3082
|
+
static getRaw(e, t = "") {
|
|
3083
|
+
var n, r, i, a;
|
|
3084
|
+
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;
|
|
3085
|
+
}
|
|
3017
3086
|
static wait() {
|
|
3018
3087
|
return new Promise((e) => setTimeout(() => e(), ct));
|
|
3019
3088
|
}
|
|
3020
3089
|
};
|
|
3021
|
-
|
|
3090
|
+
C(ut, "icons", {}), C(ut, "url", "/icons/");
|
|
3022
3091
|
//#endregion
|
|
3023
3092
|
//#region src/functions/getElementItem.ts
|
|
3024
3093
|
function dt(e, t, n) {
|
|
3025
3094
|
var r, i;
|
|
3026
|
-
return (r = (i =
|
|
3095
|
+
return (r = (i = k(e)) == null ? void 0 : i[t]) == null ? n : r;
|
|
3027
3096
|
}
|
|
3028
3097
|
//#endregion
|
|
3029
3098
|
//#region src/functions/setElementItem.ts
|
|
3030
3099
|
function ft(e, n, i) {
|
|
3031
|
-
let a =
|
|
3100
|
+
let a = k(e);
|
|
3032
3101
|
if (a) {
|
|
3033
3102
|
let e = dt(a, n);
|
|
3034
3103
|
if (t(e) && t(i)) r(i, (t, n) => {
|
|
3035
|
-
e[n] =
|
|
3104
|
+
e[n] = x(t);
|
|
3036
3105
|
});
|
|
3037
3106
|
else {
|
|
3038
|
-
let e =
|
|
3107
|
+
let e = x(i);
|
|
3039
3108
|
!(n in a) && typeof e == "string" ? a.setAttribute(n.toString(), e) : a[n] = e;
|
|
3040
3109
|
}
|
|
3041
3110
|
}
|
|
@@ -3069,7 +3138,7 @@ function G(e) {
|
|
|
3069
3138
|
//#region src/classes/MetaManager.ts
|
|
3070
3139
|
var K = class {
|
|
3071
3140
|
constructor(e, t = !1) {
|
|
3072
|
-
|
|
3141
|
+
C(this, "items", {}), this.listMeta = e, this.isProperty = t, this.update();
|
|
3073
3142
|
}
|
|
3074
3143
|
getListMeta() {
|
|
3075
3144
|
return this.listMeta;
|
|
@@ -3085,7 +3154,7 @@ var K = class {
|
|
|
3085
3154
|
return r(this.listMeta, (e) => this.toHtmlString(e)).join("");
|
|
3086
3155
|
}
|
|
3087
3156
|
set(e, t) {
|
|
3088
|
-
return this.setItem(e, t).setMeta(e), this;
|
|
3157
|
+
return this.get(e) !== t && this.setItem(e, t).setMeta(e), this;
|
|
3089
3158
|
}
|
|
3090
3159
|
setByList(e) {
|
|
3091
3160
|
return r(e, (e, t) => this.set(t, String(e))), this;
|
|
@@ -3114,10 +3183,13 @@ var K = class {
|
|
|
3114
3183
|
toHtmlString(e) {
|
|
3115
3184
|
var t;
|
|
3116
3185
|
let n = (t = this.items[e]) == null ? "" : t;
|
|
3117
|
-
if (e === "title") return
|
|
3186
|
+
if (e === "title") return "";
|
|
3118
3187
|
let r = G(n);
|
|
3119
3188
|
return r ? `<meta ${this.getAttributeName()}="${e}" content="${r}">` : "";
|
|
3120
3189
|
}
|
|
3190
|
+
toHtmlTitle(e) {
|
|
3191
|
+
return oe(e);
|
|
3192
|
+
}
|
|
3121
3193
|
update() {
|
|
3122
3194
|
return this.listMeta.forEach((e) => {
|
|
3123
3195
|
var t, n;
|
|
@@ -3238,7 +3310,7 @@ var K = class {
|
|
|
3238
3310
|
}
|
|
3239
3311
|
}, Ct = class extends K {
|
|
3240
3312
|
constructor() {
|
|
3241
|
-
super(Object.values(q)),
|
|
3313
|
+
super(Object.values(q)), C(this, "suffix", void 0), C(this, "og", void 0), C(this, "twitter", void 0), this.og = new xt(), this.twitter = new St();
|
|
3242
3314
|
}
|
|
3243
3315
|
getOg() {
|
|
3244
3316
|
return this.og;
|
|
@@ -3279,7 +3351,7 @@ var K = class {
|
|
|
3279
3351
|
return s() && (document.title = t), this.set(q.title, t), this.og.setTitle(t), this.twitter.setTitle(t), this;
|
|
3280
3352
|
}
|
|
3281
3353
|
setKeywords(e) {
|
|
3282
|
-
return this.set(q.keywords,
|
|
3354
|
+
return this.set(q.keywords, A(e).join(", ")), this;
|
|
3283
3355
|
}
|
|
3284
3356
|
setDescription(e) {
|
|
3285
3357
|
return this.set(q.description, e), this;
|
|
@@ -3308,6 +3380,9 @@ var K = class {
|
|
|
3308
3380
|
html() {
|
|
3309
3381
|
return `${super.html()}${this.og.html()}${this.twitter.html()}`;
|
|
3310
3382
|
}
|
|
3383
|
+
htmlTitle() {
|
|
3384
|
+
return this.toHtmlTitle(this.get(q.title));
|
|
3385
|
+
}
|
|
3311
3386
|
getSuffix() {
|
|
3312
3387
|
return l(this.suffix) ? ` - ${this.suffix}` : "";
|
|
3313
3388
|
}
|
|
@@ -3381,9 +3456,12 @@ var K = class {
|
|
|
3381
3456
|
static html() {
|
|
3382
3457
|
return this.getItem().html();
|
|
3383
3458
|
}
|
|
3459
|
+
static htmlTitle() {
|
|
3460
|
+
return this.getItem().htmlTitle();
|
|
3461
|
+
}
|
|
3384
3462
|
}, Tt = class {
|
|
3385
3463
|
constructor(e, t = 320, n = !1) {
|
|
3386
|
-
|
|
3464
|
+
C(this, "timerId", void 0), C(this, "startTime", void 0), C(this, "remaining", void 0), C(this, "completed", !1), this.callback = e, this.delay = t, n || this.resume();
|
|
3387
3465
|
}
|
|
3388
3466
|
resume() {
|
|
3389
3467
|
if (this.timerId || this.completed) return this;
|
|
@@ -3457,7 +3535,7 @@ var K = class {
|
|
|
3457
3535
|
});
|
|
3458
3536
|
}
|
|
3459
3537
|
};
|
|
3460
|
-
|
|
3538
|
+
C(Et, "calculate", !1);
|
|
3461
3539
|
//#endregion
|
|
3462
3540
|
//#region src/functions/escapeExp.ts
|
|
3463
3541
|
function X(e) {
|
|
@@ -3486,7 +3564,7 @@ function jt(e, t, n = "sys-highlight-match", r = !1) {
|
|
|
3486
3564
|
//#region src/classes/SearchListData.ts
|
|
3487
3565
|
var Mt = class {
|
|
3488
3566
|
constructor(e, t, n, r) {
|
|
3489
|
-
|
|
3567
|
+
C(this, "listCache", void 0), this.list = e, this.columns = t, this.item = n, this.options = r;
|
|
3490
3568
|
}
|
|
3491
3569
|
is() {
|
|
3492
3570
|
return !!(this.list && this.columns);
|
|
@@ -3523,8 +3601,8 @@ var Mt = class {
|
|
|
3523
3601
|
toFormatItem(e, t) {
|
|
3524
3602
|
let n = {};
|
|
3525
3603
|
return this.columns && this.columns.forEach((r) => {
|
|
3526
|
-
let i = this.getColumnName(r), a =
|
|
3527
|
-
n[i] = l(a) && t ? this.addTag(a) :
|
|
3604
|
+
let i = this.getColumnName(r), a = V(e, r);
|
|
3605
|
+
n[i] = l(a) && t ? this.addTag(a) : F(a);
|
|
3528
3606
|
}), {
|
|
3529
3607
|
...e,
|
|
3530
3608
|
...n,
|
|
@@ -3535,7 +3613,7 @@ var Mt = class {
|
|
|
3535
3613
|
return e.replace(/\.([a-z0-9])/gi, (e, t) => t.toUpperCase()) + "Search";
|
|
3536
3614
|
}
|
|
3537
3615
|
addTag(e) {
|
|
3538
|
-
return jt(
|
|
3616
|
+
return jt(F(e), this.item.get(), this.options.getClassName());
|
|
3539
3617
|
}
|
|
3540
3618
|
generateCache() {
|
|
3541
3619
|
if (!this.isList()) return [];
|
|
@@ -3543,8 +3621,8 @@ var Mt = class {
|
|
|
3543
3621
|
for (let t of this.list) {
|
|
3544
3622
|
let n = "";
|
|
3545
3623
|
if (this.columns) for (let e of this.columns) {
|
|
3546
|
-
let r =
|
|
3547
|
-
l(r) && (n += ` ${
|
|
3624
|
+
let r = V(t, e);
|
|
3625
|
+
l(r) && (n += ` ${F(r)}`);
|
|
3548
3626
|
}
|
|
3549
3627
|
e.push({
|
|
3550
3628
|
item: t,
|
|
@@ -3602,7 +3680,7 @@ function It(e, t = 128) {
|
|
|
3602
3680
|
//#region src/classes/SearchListMatcher.ts
|
|
3603
3681
|
var Lt = class {
|
|
3604
3682
|
constructor(e, t) {
|
|
3605
|
-
|
|
3683
|
+
C(this, "matcher", void 0), this.item = e, this.options = t, this.initMatcher();
|
|
3606
3684
|
}
|
|
3607
3685
|
is() {
|
|
3608
3686
|
return !!this.matcher;
|
|
@@ -3651,10 +3729,10 @@ var Lt = class {
|
|
|
3651
3729
|
}
|
|
3652
3730
|
}, zt = class {
|
|
3653
3731
|
constructor(e, t, n, r) {
|
|
3654
|
-
|
|
3732
|
+
C(this, "options", void 0), C(this, "item", void 0), C(this, "matcher", void 0), C(this, "data", void 0), C(this, "callbackToSelection", (e, t) => {
|
|
3655
3733
|
if (this.matcher.isSelection(t)) return this.data.toFormatItem(e, !0);
|
|
3656
3734
|
if (this.options.getReturnEverything()) return this.data.toFormatItem(e, !1);
|
|
3657
|
-
}),
|
|
3735
|
+
}), C(this, "callbackToNone", (e) => this.data.toFormatItem(e, !1)), this.options = new Rt(r), this.item = new Nt(n, this.options), this.matcher = new Lt(this.item, this.options), this.data = new Mt(e, t, this.item, this.options);
|
|
3658
3736
|
}
|
|
3659
3737
|
getData() {
|
|
3660
3738
|
return this.data;
|
|
@@ -3696,7 +3774,7 @@ var Lt = class {
|
|
|
3696
3774
|
return new e(t, n);
|
|
3697
3775
|
}
|
|
3698
3776
|
constructor(e, t = "main") {
|
|
3699
|
-
|
|
3777
|
+
C(this, "callbacks", []), C(this, "loading", !1), this.name = e, this.group = t;
|
|
3700
3778
|
let n = `${t}:${e}`, r = Bt();
|
|
3701
3779
|
if (n in r) return r[n];
|
|
3702
3780
|
r[n] = this;
|
|
@@ -3724,7 +3802,7 @@ var Lt = class {
|
|
|
3724
3802
|
}
|
|
3725
3803
|
async run(e) {
|
|
3726
3804
|
this.loading = !1;
|
|
3727
|
-
for (let { callback: t, isOnce: n } of this.callbacks) await
|
|
3805
|
+
for (let { callback: t, isOnce: n } of this.callbacks) await Ie(t, e), n && this.removeCallback(t);
|
|
3728
3806
|
return this;
|
|
3729
3807
|
}
|
|
3730
3808
|
}, Ht = [
|
|
@@ -3771,19 +3849,19 @@ var Lt = class {
|
|
|
3771
3849
|
})), r;
|
|
3772
3850
|
}, Gt = (e) => {
|
|
3773
3851
|
var t;
|
|
3774
|
-
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(
|
|
3852
|
+
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(P.getStatus().getStatus()))));
|
|
3775
3853
|
}, Kt = "global", qt = 160, Jt = class {
|
|
3776
3854
|
constructor(e, t = () => D.getLanguage(), n = () => D.getLocation()) {
|
|
3777
|
-
|
|
3855
|
+
C(this, "files", {}), C(this, "data", {}), this.language = t, this.location = n, e && this.add(e);
|
|
3778
3856
|
}
|
|
3779
3857
|
isFile() {
|
|
3780
3858
|
return Object.keys(this.files).length > 0 && this.getIndex() !== void 0;
|
|
3781
3859
|
}
|
|
3782
3860
|
getLocation() {
|
|
3783
|
-
return
|
|
3861
|
+
return x(this.location);
|
|
3784
3862
|
}
|
|
3785
3863
|
getLanguage() {
|
|
3786
|
-
return
|
|
3864
|
+
return x(this.language);
|
|
3787
3865
|
}
|
|
3788
3866
|
async getList() {
|
|
3789
3867
|
let e = this.getIndex();
|
|
@@ -3794,7 +3872,7 @@ var Lt = class {
|
|
|
3794
3872
|
}
|
|
3795
3873
|
add(e) {
|
|
3796
3874
|
r(e, (e, t) => {
|
|
3797
|
-
|
|
3875
|
+
b(e) && (this.files[t] = e);
|
|
3798
3876
|
});
|
|
3799
3877
|
}
|
|
3800
3878
|
getIndex() {
|
|
@@ -3809,18 +3887,18 @@ var Lt = class {
|
|
|
3809
3887
|
}
|
|
3810
3888
|
async getByFile(e) {
|
|
3811
3889
|
if (e in this.files) {
|
|
3812
|
-
let t = await
|
|
3890
|
+
let t = await x(this.files[e]);
|
|
3813
3891
|
return t && (this.data[e] = t), t;
|
|
3814
3892
|
}
|
|
3815
3893
|
}
|
|
3816
3894
|
}, Yt = class {
|
|
3817
3895
|
constructor(e = "/api/translate", t = "list", n = new Jt()) {
|
|
3818
|
-
|
|
3896
|
+
C(this, "data", {}), C(this, "cache", []), C(this, "resolveList", []), C(this, "timeout", void 0), C(this, "isReadApi", !0), this.url = e, this.propsName = t, this.files = n;
|
|
3819
3897
|
}
|
|
3820
3898
|
async get(e, t) {
|
|
3821
3899
|
var n;
|
|
3822
3900
|
let r = this.getText(e);
|
|
3823
|
-
return r ? this.replacement(r, t) : (
|
|
3901
|
+
return r ? this.replacement(r, t) : (P.isLocalhost() || await this.add(e), this.replacement((n = this.getText(e)) == null ? e : n));
|
|
3824
3902
|
}
|
|
3825
3903
|
getSync(e, t = !1, n) {
|
|
3826
3904
|
let r = this.getText(e);
|
|
@@ -3861,7 +3939,7 @@ var Lt = class {
|
|
|
3861
3939
|
});
|
|
3862
3940
|
}
|
|
3863
3941
|
async addNormalOrSync(e) {
|
|
3864
|
-
if (l(e)) if (
|
|
3942
|
+
if (l(e)) if (P.isLocalhost()) this.addSync(e);
|
|
3865
3943
|
else {
|
|
3866
3944
|
let t = Object.keys(e);
|
|
3867
3945
|
t.length > 0 && await this.add(t);
|
|
@@ -3907,12 +3985,12 @@ var Lt = class {
|
|
|
3907
3985
|
}
|
|
3908
3986
|
getNamesNone(e) {
|
|
3909
3987
|
let t = [];
|
|
3910
|
-
return
|
|
3988
|
+
return A(e).forEach((e) => {
|
|
3911
3989
|
e !== "__TRANSLATE_START__" && e !== "__TRANSLATE_END__" && !this.hasName(e) && t.push(e);
|
|
3912
3990
|
}), t;
|
|
3913
3991
|
}
|
|
3914
3992
|
async getResponse() {
|
|
3915
|
-
let e = await
|
|
3993
|
+
let e = await P.get({
|
|
3916
3994
|
api: !1,
|
|
3917
3995
|
path: this.url,
|
|
3918
3996
|
request: { [this.propsName]: this.cache },
|
|
@@ -3920,7 +3998,7 @@ var Lt = class {
|
|
|
3920
3998
|
timeout: 12e3,
|
|
3921
3999
|
global: !0
|
|
3922
4000
|
});
|
|
3923
|
-
return Gt(e) ||
|
|
4001
|
+
return Gt(e) || w.on({
|
|
3924
4002
|
group: "translate",
|
|
3925
4003
|
code: "error",
|
|
3926
4004
|
details: e
|
|
@@ -3983,7 +4061,7 @@ var Lt = class {
|
|
|
3983
4061
|
e.url && this.getItem().setUrl(e.url), e.propsName && this.getItem().setPropsName(e.propsName), typeof e.readApi == "boolean" && this.getItem().setReadApi(e.readApi);
|
|
3984
4062
|
}
|
|
3985
4063
|
};
|
|
3986
|
-
|
|
4064
|
+
C(Xt, "item", void 0);
|
|
3987
4065
|
//#endregion
|
|
3988
4066
|
//#region src/functions/arrFill.ts
|
|
3989
4067
|
function Zt(e, t) {
|
|
@@ -4120,7 +4198,7 @@ function mn(e, t) {
|
|
|
4120
4198
|
//#endregion
|
|
4121
4199
|
//#region src/functions/getAttributes.ts
|
|
4122
4200
|
function hn(e) {
|
|
4123
|
-
let t = {}, n =
|
|
4201
|
+
let t = {}, n = k(e);
|
|
4124
4202
|
if (n) for (let e of n.attributes) {
|
|
4125
4203
|
var r;
|
|
4126
4204
|
t[e.name] = (r = (e == null ? void 0 : e.value) || (e == null ? void 0 : e.textContent)) == null ? void 0 : r;
|
|
@@ -4134,7 +4212,7 @@ async function gn(e) {
|
|
|
4134
4212
|
var t, n;
|
|
4135
4213
|
return (t = e == null || (n = e.clipboardData) == null ? void 0 : n.getData("text")) == null ? await navigator.clipboard.readText() || "" : t;
|
|
4136
4214
|
} catch (e) {
|
|
4137
|
-
|
|
4215
|
+
w.on({
|
|
4138
4216
|
group: "clipboard",
|
|
4139
4217
|
code: "error",
|
|
4140
4218
|
details: e
|
|
@@ -4145,7 +4223,7 @@ async function gn(e) {
|
|
|
4145
4223
|
//#endregion
|
|
4146
4224
|
//#region src/functions/getCurrentDate.ts
|
|
4147
4225
|
function _n(e = "datetime") {
|
|
4148
|
-
return new
|
|
4226
|
+
return new et(void 0, e).standard();
|
|
4149
4227
|
}
|
|
4150
4228
|
//#endregion
|
|
4151
4229
|
//#region src/functions/getCurrentTime.ts
|
|
@@ -4156,13 +4234,13 @@ function vn() {
|
|
|
4156
4234
|
//#region src/functions/getElementId.ts
|
|
4157
4235
|
var Q, yn = () => {
|
|
4158
4236
|
let e = Q == null ? void 0 : Q();
|
|
4159
|
-
if (e) return
|
|
4237
|
+
if (e) return String(e);
|
|
4160
4238
|
let t = T.get("__ui:getElementId__", () => ({ id: 1e5 }));
|
|
4161
4239
|
return `id-${t.id++}`;
|
|
4162
4240
|
};
|
|
4163
4241
|
function bn(e, t) {
|
|
4164
4242
|
if (e) {
|
|
4165
|
-
let n =
|
|
4243
|
+
let n = k(e);
|
|
4166
4244
|
if (n) return l(n.id) || n.setAttribute("id", yn()), t ? `#${n.id}${t}`.trim() : n.id;
|
|
4167
4245
|
}
|
|
4168
4246
|
return yn();
|
|
@@ -4242,7 +4320,7 @@ function jn(e) {
|
|
|
4242
4320
|
//#endregion
|
|
4243
4321
|
//#region src/functions/getOnlyText.ts
|
|
4244
4322
|
function Mn(e) {
|
|
4245
|
-
return
|
|
4323
|
+
return F(e).replace(/[^\p{L}\p{N}\s]+/gu, "").trim();
|
|
4246
4324
|
}
|
|
4247
4325
|
//#endregion
|
|
4248
4326
|
//#region src/functions/strFill.ts
|
|
@@ -4326,7 +4404,7 @@ async function Hn(e) {
|
|
|
4326
4404
|
if (Vn() && navigator.canShare && navigator.canShare(e)) try {
|
|
4327
4405
|
return await navigator.share(e), !0;
|
|
4328
4406
|
} catch (e) {
|
|
4329
|
-
|
|
4407
|
+
w.on({
|
|
4330
4408
|
group: "share",
|
|
4331
4409
|
code: "error",
|
|
4332
4410
|
details: e
|
|
@@ -4367,7 +4445,7 @@ function Kn(e, t) {
|
|
|
4367
4445
|
//#region src/functions/isElementVisible.ts
|
|
4368
4446
|
function qn(e) {
|
|
4369
4447
|
if (!s()) return !1;
|
|
4370
|
-
let t =
|
|
4448
|
+
let t = k(e);
|
|
4371
4449
|
if (!t || "isConnected" in t && t.isConnected === !1) return !1;
|
|
4372
4450
|
let n = window.getComputedStyle(t);
|
|
4373
4451
|
return n.display !== "none" && n.visibility !== "hidden" && n.opacity !== "0" && t.offsetWidth !== 0 && t.offsetHeight !== 0;
|
|
@@ -4399,7 +4477,7 @@ function Zn(e, t) {
|
|
|
4399
4477
|
//#endregion
|
|
4400
4478
|
//#region src/functions/isSelectedByList.ts
|
|
4401
4479
|
function Qn(e, t) {
|
|
4402
|
-
return Array.isArray(e) ? e.every((e) =>
|
|
4480
|
+
return Array.isArray(e) ? e.every((e) => y(e, t)) : y(e, t);
|
|
4403
4481
|
}
|
|
4404
4482
|
//#endregion
|
|
4405
4483
|
//#region src/functions/removeCommonPrefix.ts
|
|
@@ -4434,13 +4512,13 @@ function $(e, n, i = !0) {
|
|
|
4434
4512
|
function nr(e, t) {
|
|
4435
4513
|
let n = e;
|
|
4436
4514
|
return r(t, (e, t) => {
|
|
4437
|
-
n = n.replace(Pt(`[${t}]`),
|
|
4515
|
+
n = n.replace(Pt(`[${t}]`), x(e));
|
|
4438
4516
|
}), n;
|
|
4439
4517
|
}
|
|
4440
4518
|
//#endregion
|
|
4441
4519
|
//#region src/functions/secondToTime.ts
|
|
4442
4520
|
function rr(e, t) {
|
|
4443
|
-
let n =
|
|
4521
|
+
let n = v(e);
|
|
4444
4522
|
if (n > 0) {
|
|
4445
4523
|
let e = String(Math.floor(n / 60)).padStart(2, "0"), r = String(n % 60).padStart(2, "0");
|
|
4446
4524
|
return t && Number(e) >= 60 ? `${String(Math.floor(Number(e) / 60)).padStart(2, "0")}:${String(Number(e) % 60).padStart(2, "0")}:${r}` : `${e}:${r}`;
|
|
@@ -4476,7 +4554,7 @@ function ar(e, n, i) {
|
|
|
4476
4554
|
//#endregion
|
|
4477
4555
|
//#region src/functions/toCamelCaseFirst.ts
|
|
4478
4556
|
function or(e) {
|
|
4479
|
-
return
|
|
4557
|
+
return H(e).replace(/^([a-z])/, (e) => `${e.toUpperCase()}`);
|
|
4480
4558
|
}
|
|
4481
4559
|
//#endregion
|
|
4482
4560
|
//#region src/functions/toKebabCase.ts
|
|
@@ -4486,10 +4564,10 @@ function sr(e) {
|
|
|
4486
4564
|
//#endregion
|
|
4487
4565
|
//#region src/functions/toNumberByMax.ts
|
|
4488
4566
|
function cr(e, t, n, r) {
|
|
4489
|
-
let i =
|
|
4567
|
+
let i = v(e), a = v(t);
|
|
4490
4568
|
return t && a < i ? `${lr(a, n, r)}+` : lr(i, n, r);
|
|
4491
4569
|
}
|
|
4492
|
-
var lr = (e, t, n) => t ? new
|
|
4570
|
+
var lr = (e, t, n) => t ? new R(n).number(e) : e;
|
|
4493
4571
|
//#endregion
|
|
4494
4572
|
//#region src/functions/toPercent.ts
|
|
4495
4573
|
function ur(e, t) {
|
|
@@ -4523,4 +4601,4 @@ async function pr(e) {
|
|
|
4523
4601
|
}
|
|
4524
4602
|
}
|
|
4525
4603
|
//#endregion
|
|
4526
|
-
export {
|
|
4604
|
+
export { P as Api, M as ApiCache, Ae as ApiDataReturn, je as ApiDefault, Me as ApiHeaders, Pe as ApiHydration, ze as ApiInstance, N as ApiMethodItem, Fe as ApiPreparation, Re as ApiResponse, Oe as ApiStatus, Be as BroadcastMessage, Ue as Cache, He as CacheItem, We as CacheStatic, Qe as Cookie, Ye as CookieBlock, Je as CookieBlockInstance, I as CookieStorage, E as DataStorage, et as Datetime, w as ErrorCenter, ue as ErrorCenterHandler, de as ErrorCenterInstance, Ce as EventItem, tt as Formatters, U as FormattersType, nt as GEO_FLAG_ICON_NAME, D as Geo, rt as GeoFlag, be as GeoInstance, R as GeoIntl, it as GeoPhone, at as Global, st as Hash, ot as HashInstance, ut as Icons, j as Loading, Te as LoadingInstance, Ct as Meta, K as MetaManager, xt as MetaOg, vt as MetaOpenGraphAge, gt as MetaOpenGraphAvailability, _t as MetaOpenGraphCondition, yt as MetaOpenGraphGender, J as MetaOpenGraphTag, ht as MetaOpenGraphType, mt as MetaRobots, wt as MetaStatic, q as MetaTag, St as MetaTwitter, bt as MetaTwitterCard, Y as MetaTwitterTag, Tt as ResumableTimer, Et as ScrollbarWidth, zt as SearchList, Mt as SearchListData, Nt as SearchListItem, Lt as SearchListMatcher, Rt as SearchListOptions, T as ServerStorage, Vt as StorageCallback, Kt as TRANSLATE_GLOBAL_PREFIX, qt as TRANSLATE_TIME_OUT, Xt as Translate, Jt as TranslateFile, Yt as TranslateInstance, jt as addTagHighlightMatch, F as anyToString, Wt as applyTemplate, Zt as arrFill, nn as blobToBase64, rn as capitalize, Z as copyObject, an as copyObjectLite, W as createElement, on as domQuerySelector, sn as domQuerySelectorAll, G as encodeAttribute, oe as encodeLiteAttribute, dn as ensureMaxSize, X as escapeExp, fn as eventStopPropagation, x as executeFunction, Ie as executePromise, r as forEach, pn as frame, mn as getArrayHighlightMatch, hn as getAttributes, gn as getClipboardData, $e as getColumn, _n as getCurrentDate, vn as getCurrentTime, k as getElement, bn as getElementId, cn as getElementImage, dt as getElementItem, xe as getElementOrWindow, pe as getElementSafeScript, Ft as getExactSearchExp, Pt as getExp, me as getHydrationData, V as getItemByPath, Sn as getKey, Cn as getLengthOfAllArray, wn as getMaxLengthAllArray, Tn as getMinLengthAllArray, On as getMouseClient, En as getMouseClientX, Dn as getMouseClientY, kn as getObjectByKeys, An as getObjectNoUndefined, jn as getObjectOrNone, Mn as getOnlyText, Pn as getRandomText, o as getRequestString, It as getSearchExp, Dt as getSeparatingSearchExp, Fn as getStepPercent, In as getStepValue, Rn as goScroll, zn as goScrollSmooth, Bn as goScrollTo, Hn as handleShare, Un as inArray, xn as initGetElementId, Wn as initScrollbarOffset, Gn as intersectKey, Gt as isApiSuccess, i as isArray, Kn as isDifferent, se as isDomData, s as isDomRuntime, qn as isElementVisible, Yn as isEnter, l as isFilled, Xn as isFloat, b as isFunction, Se as isInDom, Jn as isInput, Zn as isIntegerBetween, c as isNull, m as isNumber, t as isObject, n as isObjectNotArray, u as isOnLine, y as isSelected, Qn as isSelectedByList, Vn as isShare, d as isString, O as isWindow, f as random, $n as removeCommonPrefix, er as replaceComponentName, $ as replaceRecursive, nr as replaceTemplate, un as resizeImageByMax, rr as secondToTime, ft as setElementItem, ir as setValues, ee as sleep, ar as splice, Nn as strFill, Ge as strSplit, A as toArray, H as toCamelCase, or as toCamelCaseFirst, L as toDate, sr as toKebabCase, v as toNumber, cr as toNumberByMax, ur as toPercent, dr as toPercentBy100, a as toString, Ke as transformation, fr as uint8ArrayToBase64, tr as uniqueArray, pr as writeClipboardData };
|