@dxtmisha/functional-basic 1.4.3 → 1.6.1
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 +17 -0
- package/ai-description.md +18 -19
- package/ai-types.md +102 -142
- package/dist/{src/classes → classes}/ErrorCenter.d.ts +7 -0
- package/dist/{src/classes → classes}/ErrorCenterHandler.d.ts +10 -0
- package/dist/{src/classes → classes}/ErrorCenterInstance.d.ts +8 -0
- package/dist/classes/GeoUnit.d.ts +207 -0
- package/dist/functions/isMetaKey.d.ts +8 -0
- package/dist/{src/library.d.ts → library.d.ts} +2 -0
- package/dist/library.js +595 -474
- package/dist/types/geoTypes.d.ts +142 -0
- package/package.json +4 -4
- package/dist/src/types/geoTypes.d.ts +0 -98
- /package/dist/{src/classes → classes}/Api.d.ts +0 -0
- /package/dist/{src/classes → classes}/ApiCache.d.ts +0 -0
- /package/dist/{src/classes → classes}/ApiDataReturn.d.ts +0 -0
- /package/dist/{src/classes → classes}/ApiDefault.d.ts +0 -0
- /package/dist/{src/classes → classes}/ApiError.d.ts +0 -0
- /package/dist/{src/classes → classes}/ApiErrorItem.d.ts +0 -0
- /package/dist/{src/classes → classes}/ApiErrorStorage.d.ts +0 -0
- /package/dist/{src/classes → classes}/ApiHeaders.d.ts +0 -0
- /package/dist/{src/classes → classes}/ApiHydration.d.ts +0 -0
- /package/dist/{src/classes → classes}/ApiInstance.d.ts +0 -0
- /package/dist/{src/classes → classes}/ApiPreparation.d.ts +0 -0
- /package/dist/{src/classes → classes}/ApiResponse.d.ts +0 -0
- /package/dist/{src/classes → classes}/ApiStatus.d.ts +0 -0
- /package/dist/{src/classes → classes}/BroadcastMessage.d.ts +0 -0
- /package/dist/{src/classes → classes}/Cache.d.ts +0 -0
- /package/dist/{src/classes → classes}/CacheItem.d.ts +0 -0
- /package/dist/{src/classes → classes}/CacheStatic.d.ts +0 -0
- /package/dist/{src/classes → classes}/Cookie.d.ts +0 -0
- /package/dist/{src/classes → classes}/CookieBlock.d.ts +0 -0
- /package/dist/{src/classes → classes}/CookieBlockInstance.d.ts +0 -0
- /package/dist/{src/classes → classes}/CookieStorage.d.ts +0 -0
- /package/dist/{src/classes → classes}/DataStorage.d.ts +0 -0
- /package/dist/{src/classes → classes}/Datetime.d.ts +0 -0
- /package/dist/{src/classes → classes}/EventItem.d.ts +0 -0
- /package/dist/{src/classes → classes}/Formatters.d.ts +0 -0
- /package/dist/{src/classes → classes}/Geo.d.ts +0 -0
- /package/dist/{src/classes → classes}/GeoFlag.d.ts +0 -0
- /package/dist/{src/classes → classes}/GeoInstance.d.ts +0 -0
- /package/dist/{src/classes → classes}/GeoIntl.d.ts +0 -0
- /package/dist/{src/classes → classes}/GeoPhone.d.ts +0 -0
- /package/dist/{src/classes → classes}/Global.d.ts +0 -0
- /package/dist/{src/classes → classes}/Hash.d.ts +0 -0
- /package/dist/{src/classes → classes}/HashInstance.d.ts +0 -0
- /package/dist/{src/classes → classes}/Icons.d.ts +0 -0
- /package/dist/{src/classes → classes}/Loading.d.ts +0 -0
- /package/dist/{src/classes → classes}/LoadingInstance.d.ts +0 -0
- /package/dist/{src/classes → classes}/Meta.d.ts +0 -0
- /package/dist/{src/classes → classes}/MetaManager.d.ts +0 -0
- /package/dist/{src/classes → classes}/MetaOg.d.ts +0 -0
- /package/dist/{src/classes → classes}/MetaStatic.d.ts +0 -0
- /package/dist/{src/classes → classes}/MetaTwitter.d.ts +0 -0
- /package/dist/{src/classes → classes}/Query.d.ts +0 -0
- /package/dist/{src/classes → classes}/QueryInstance.d.ts +0 -0
- /package/dist/{src/classes → classes}/ResumableTimer.d.ts +0 -0
- /package/dist/{src/classes → classes}/ScrollbarWidth.d.ts +0 -0
- /package/dist/{src/classes → classes}/SearchList.d.ts +0 -0
- /package/dist/{src/classes → classes}/SearchListData.d.ts +0 -0
- /package/dist/{src/classes → classes}/SearchListItem.d.ts +0 -0
- /package/dist/{src/classes → classes}/SearchListMatcher.d.ts +0 -0
- /package/dist/{src/classes → classes}/SearchListOptions.d.ts +0 -0
- /package/dist/{src/classes → classes}/ServerStorage.d.ts +0 -0
- /package/dist/{src/classes → classes}/StorageCallback.d.ts +0 -0
- /package/dist/{src/classes → classes}/Translate.d.ts +0 -0
- /package/dist/{src/classes → classes}/TranslateFile.d.ts +0 -0
- /package/dist/{src/classes → classes}/TranslateInstance.d.ts +0 -0
- /package/dist/{src/classes → classes}/UrlInstanceAbstract.d.ts +0 -0
- /package/dist/{src/classes → classes}/UrlItem.d.ts +0 -0
- /package/dist/{src/functions → functions}/addTagHighlightMatch.d.ts +0 -0
- /package/dist/{src/functions → functions}/anyToString.d.ts +0 -0
- /package/dist/{src/functions → functions}/applyTemplate.d.ts +0 -0
- /package/dist/{src/functions → functions}/arrFill.d.ts +0 -0
- /package/dist/{src/functions → functions}/blobToBase64.d.ts +0 -0
- /package/dist/{src/functions → functions}/capitalize.d.ts +0 -0
- /package/dist/{src/functions → functions}/copyObject.d.ts +0 -0
- /package/dist/{src/functions → functions}/copyObjectLite.d.ts +0 -0
- /package/dist/{src/functions → functions}/createElement.d.ts +0 -0
- /package/dist/{src/functions → functions}/domQuerySelector.d.ts +0 -0
- /package/dist/{src/functions → functions}/domQuerySelectorAll.d.ts +0 -0
- /package/dist/{src/functions → functions}/encodeAttribute.d.ts +0 -0
- /package/dist/{src/functions → functions}/encodeLiteAttribute.d.ts +0 -0
- /package/dist/{src/functions → functions}/ensureMaxSize.d.ts +0 -0
- /package/dist/{src/functions → functions}/escapeExp.d.ts +0 -0
- /package/dist/{src/functions → functions}/eventStopPropagation.d.ts +0 -0
- /package/dist/{src/functions → functions}/executeFunction.d.ts +0 -0
- /package/dist/{src/functions → functions}/executePromise.d.ts +0 -0
- /package/dist/{src/functions → functions}/forEach.d.ts +0 -0
- /package/dist/{src/functions → functions}/frame.d.ts +0 -0
- /package/dist/{src/functions → functions}/getArrayHighlightMatch.d.ts +0 -0
- /package/dist/{src/functions → functions}/getAttributes.d.ts +0 -0
- /package/dist/{src/functions → functions}/getClipboardData.d.ts +0 -0
- /package/dist/{src/functions → functions}/getColumn.d.ts +0 -0
- /package/dist/{src/functions → functions}/getCurrentDate.d.ts +0 -0
- /package/dist/{src/functions → functions}/getCurrentTime.d.ts +0 -0
- /package/dist/{src/functions → functions}/getElement.d.ts +0 -0
- /package/dist/{src/functions → functions}/getElementId.d.ts +0 -0
- /package/dist/{src/functions → functions}/getElementImage.d.ts +0 -0
- /package/dist/{src/functions → functions}/getElementItem.d.ts +0 -0
- /package/dist/{src/functions → functions}/getElementOrWindow.d.ts +0 -0
- /package/dist/{src/functions → functions}/getElementSafeScript.d.ts +0 -0
- /package/dist/{src/functions → functions}/getExactSearchExp.d.ts +0 -0
- /package/dist/{src/functions → functions}/getExp.d.ts +0 -0
- /package/dist/{src/functions → functions}/getFirst.d.ts +0 -0
- /package/dist/{src/functions → functions}/getHydrationData.d.ts +0 -0
- /package/dist/{src/functions → functions}/getItemByPath.d.ts +0 -0
- /package/dist/{src/functions → functions}/getKey.d.ts +0 -0
- /package/dist/{src/functions → functions}/getLength.d.ts +0 -0
- /package/dist/{src/functions → functions}/getLengthOfAllArray.d.ts +0 -0
- /package/dist/{src/functions → functions}/getMaxLengthAllArray.d.ts +0 -0
- /package/dist/{src/functions → functions}/getMinLengthAllArray.d.ts +0 -0
- /package/dist/{src/functions → functions}/getMouseClient.d.ts +0 -0
- /package/dist/{src/functions → functions}/getMouseClientX.d.ts +0 -0
- /package/dist/{src/functions → functions}/getMouseClientY.d.ts +0 -0
- /package/dist/{src/functions → functions}/getObjectByKeys.d.ts +0 -0
- /package/dist/{src/functions → functions}/getObjectNoUndefined.d.ts +0 -0
- /package/dist/{src/functions → functions}/getObjectOrNone.d.ts +0 -0
- /package/dist/{src/functions → functions}/getOnlyText.d.ts +0 -0
- /package/dist/{src/functions → functions}/getRandomText.d.ts +0 -0
- /package/dist/{src/functions → functions}/getRequestString.d.ts +0 -0
- /package/dist/{src/functions → functions}/getSearchExp.d.ts +0 -0
- /package/dist/{src/functions → functions}/getSeparatingSearchExp.d.ts +0 -0
- /package/dist/{src/functions → functions}/getStepPercent.d.ts +0 -0
- /package/dist/{src/functions → functions}/getStepValue.d.ts +0 -0
- /package/dist/{src/functions → functions}/goScroll.d.ts +0 -0
- /package/dist/{src/functions → functions}/goScrollSmooth.d.ts +0 -0
- /package/dist/{src/functions → functions}/goScrollTo.d.ts +0 -0
- /package/dist/{src/functions → functions}/handleShare.d.ts +0 -0
- /package/dist/{src/functions → functions}/inArray.d.ts +0 -0
- /package/dist/{src/functions → functions}/initScrollbarOffset.d.ts +0 -0
- /package/dist/{src/functions → functions}/intersectKey.d.ts +0 -0
- /package/dist/{src/functions → functions}/isApiSuccess.d.ts +0 -0
- /package/dist/{src/functions → functions}/isArray.d.ts +0 -0
- /package/dist/{src/functions → functions}/isDifferent.d.ts +0 -0
- /package/dist/{src/functions → functions}/isDomData.d.ts +0 -0
- /package/dist/{src/functions → functions}/isDomRuntime.d.ts +0 -0
- /package/dist/{src/functions → functions}/isElementVisible.d.ts +0 -0
- /package/dist/{src/functions → functions}/isEnter.d.ts +0 -0
- /package/dist/{src/functions → functions}/isFilled.d.ts +0 -0
- /package/dist/{src/functions → functions}/isFloat.d.ts +0 -0
- /package/dist/{src/functions → functions}/isFunction.d.ts +0 -0
- /package/dist/{src/functions → functions}/isInDom.d.ts +0 -0
- /package/dist/{src/functions → functions}/isInput.d.ts +0 -0
- /package/dist/{src/functions → functions}/isIntegerBetween.d.ts +0 -0
- /package/dist/{src/functions → functions}/isNull.d.ts +0 -0
- /package/dist/{src/functions → functions}/isNumber.d.ts +0 -0
- /package/dist/{src/functions → functions}/isObject.d.ts +0 -0
- /package/dist/{src/functions → functions}/isObjectNotArray.d.ts +0 -0
- /package/dist/{src/functions → functions}/isOnLine.d.ts +0 -0
- /package/dist/{src/functions → functions}/isSelected.d.ts +0 -0
- /package/dist/{src/functions → functions}/isSelectedByList.d.ts +0 -0
- /package/dist/{src/functions → functions}/isShare.d.ts +0 -0
- /package/dist/{src/functions → functions}/isString.d.ts +0 -0
- /package/dist/{src/functions → functions}/isTab.d.ts +0 -0
- /package/dist/{src/functions → functions}/isWindow.d.ts +0 -0
- /package/dist/{src/functions → functions}/random.d.ts +0 -0
- /package/dist/{src/functions → functions}/removeCommonPrefix.d.ts +0 -0
- /package/dist/{src/functions → functions}/replaceComponentName.d.ts +0 -0
- /package/dist/{src/functions → functions}/replaceRecursive.d.ts +0 -0
- /package/dist/{src/functions → functions}/replaceTemplate.d.ts +0 -0
- /package/dist/{src/functions → functions}/resizeImageByMax.d.ts +0 -0
- /package/dist/{src/functions → functions}/secondToTime.d.ts +0 -0
- /package/dist/{src/functions → functions}/setElementItem.d.ts +0 -0
- /package/dist/{src/functions → functions}/setValues.d.ts +0 -0
- /package/dist/{src/functions → functions}/sleep.d.ts +0 -0
- /package/dist/{src/functions → functions}/splice.d.ts +0 -0
- /package/dist/{src/functions → functions}/strFill.d.ts +0 -0
- /package/dist/{src/functions → functions}/strSplit.d.ts +0 -0
- /package/dist/{src/functions → functions}/toArray.d.ts +0 -0
- /package/dist/{src/functions → functions}/toCamelCase.d.ts +0 -0
- /package/dist/{src/functions → functions}/toCamelCaseFirst.d.ts +0 -0
- /package/dist/{src/functions → functions}/toDate.d.ts +0 -0
- /package/dist/{src/functions → functions}/toKebabCase.d.ts +0 -0
- /package/dist/{src/functions → functions}/toNumber.d.ts +0 -0
- /package/dist/{src/functions → functions}/toNumberByMax.d.ts +0 -0
- /package/dist/{src/functions → functions}/toPercent.d.ts +0 -0
- /package/dist/{src/functions → functions}/toPercentBy100.d.ts +0 -0
- /package/dist/{src/functions → functions}/toString.d.ts +0 -0
- /package/dist/{src/functions → functions}/transformation.d.ts +0 -0
- /package/dist/{src/functions → functions}/uint8ArrayToBase64.d.ts +0 -0
- /package/dist/{src/functions → functions}/uniqueArray.d.ts +0 -0
- /package/dist/{src/functions → functions}/writeClipboardData.d.ts +0 -0
- /package/dist/{src/media → media}/errorCauseList.d.ts +0 -0
- /package/dist/{src/types → types}/apiTypes.d.ts +0 -0
- /package/dist/{src/types → types}/basicTypes.d.ts +0 -0
- /package/dist/{src/types → types}/errorCenter.d.ts +0 -0
- /package/dist/{src/types → types}/formattersTypes.d.ts +0 -0
- /package/dist/{src/types → types}/metaTypes.d.ts +0 -0
- /package/dist/{src/types → types}/searchTypes.d.ts +0 -0
- /package/dist/{src/types → types}/translateTypes.d.ts +0 -0
package/dist/library.js
CHANGED
|
@@ -109,32 +109,32 @@ function m(e, ...t) {
|
|
|
109
109
|
}
|
|
110
110
|
//#endregion
|
|
111
111
|
//#region src/functions/isNumber.ts
|
|
112
|
-
var
|
|
113
|
-
function
|
|
112
|
+
var te = /^-?[0-9]+(\.[0-9]+)?$/;
|
|
113
|
+
function h(e) {
|
|
114
114
|
switch (typeof e) {
|
|
115
115
|
case "number": return Number.isFinite(e);
|
|
116
116
|
case "bigint": return !0;
|
|
117
|
-
case "string": return
|
|
117
|
+
case "string": return te.test(e.trim());
|
|
118
118
|
default: return !1;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
//#endregion
|
|
122
122
|
//#region src/functions/toNumber.ts
|
|
123
|
-
var
|
|
124
|
-
function
|
|
123
|
+
var g = /[^-+\d., ]+/g, _ = /( [0-9]{3}[ ,.]|[0-9] [0-9])/, ne = / /g, v = /,/g, re = /,[0-9]{3}[,.]/, ie = /[.][0-9]{3}[,.]/, ae = /[.]/g;
|
|
124
|
+
function y(e) {
|
|
125
125
|
if (typeof e == "number") return Number.isFinite(e) && e || 0;
|
|
126
126
|
if (!e) return 0;
|
|
127
|
-
let t = e.replace(
|
|
128
|
-
return t =
|
|
127
|
+
let t = e.replace(g, "");
|
|
128
|
+
return t = _.test(t) ? t.replace(ne, "").replace(v, ".") : re.test(t) ? t.replace(v, "") : ie.test(t) ? t.replace(ae, "").replace(v, ".") : t.replace(v, "."), parseFloat(t) || 0;
|
|
129
129
|
}
|
|
130
130
|
//#endregion
|
|
131
131
|
//#region src/functions/isSelected.ts
|
|
132
|
-
function
|
|
133
|
-
return c(e) ? !1 : Array.isArray(t) ? t.includes(e) :
|
|
132
|
+
function b(e, t) {
|
|
133
|
+
return c(e) ? !1 : Array.isArray(t) ? t.includes(e) : h(e) && h(t) ? y(e) === y(t) : e === t;
|
|
134
134
|
}
|
|
135
135
|
//#endregion
|
|
136
136
|
//#region src/functions/anyToString.ts
|
|
137
|
-
function
|
|
137
|
+
function x(e, n = !0, r = !0) {
|
|
138
138
|
var a;
|
|
139
139
|
if (d(e)) return r ? e.trim() : e;
|
|
140
140
|
if (c(e)) return "";
|
|
@@ -148,49 +148,49 @@ function S(e, n = !0, r = !0) {
|
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region src/functions/isDomData.ts
|
|
151
|
-
function
|
|
151
|
+
function oe() {
|
|
152
152
|
return s() && location.href.startsWith("data:");
|
|
153
153
|
}
|
|
154
154
|
//#endregion
|
|
155
155
|
//#region src/functions/strSplit.ts
|
|
156
|
-
function
|
|
157
|
-
let r =
|
|
156
|
+
function se(e, t, n) {
|
|
157
|
+
let r = x(e);
|
|
158
158
|
if (!n || n <= 0) return r.split(t);
|
|
159
159
|
let i = r.split(t, n), a = r.split(t);
|
|
160
160
|
return i.length === a.length ? i : (i.pop(), [...i, a.slice(n - 1).join(t)]);
|
|
161
161
|
}
|
|
162
162
|
//#endregion
|
|
163
|
-
//#region \0@oxc-project+runtime@0.
|
|
164
|
-
function
|
|
163
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/typeof.js
|
|
164
|
+
function S(e) {
|
|
165
165
|
"@babel/helpers - typeof";
|
|
166
|
-
return
|
|
166
|
+
return S = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
167
167
|
return typeof e;
|
|
168
168
|
} : function(e) {
|
|
169
169
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
170
|
-
},
|
|
170
|
+
}, S(e);
|
|
171
171
|
}
|
|
172
172
|
//#endregion
|
|
173
|
-
//#region \0@oxc-project+runtime@0.
|
|
174
|
-
function
|
|
175
|
-
if (
|
|
173
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/toPrimitive.js
|
|
174
|
+
function ce(e, t) {
|
|
175
|
+
if (S(e) != "object" || !e) return e;
|
|
176
176
|
var n = e[Symbol.toPrimitive];
|
|
177
177
|
if (n !== void 0) {
|
|
178
178
|
var r = n.call(e, t || "default");
|
|
179
|
-
if (
|
|
179
|
+
if (S(r) != "object") return r;
|
|
180
180
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
181
181
|
}
|
|
182
182
|
return (t === "string" ? String : Number)(e);
|
|
183
183
|
}
|
|
184
184
|
//#endregion
|
|
185
|
-
//#region \0@oxc-project+runtime@0.
|
|
186
|
-
function
|
|
187
|
-
var t =
|
|
188
|
-
return
|
|
185
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/toPropertyKey.js
|
|
186
|
+
function le(e) {
|
|
187
|
+
var t = ce(e, "string");
|
|
188
|
+
return S(t) == "symbol" ? t : t + "";
|
|
189
189
|
}
|
|
190
190
|
//#endregion
|
|
191
|
-
//#region \0@oxc-project+runtime@0.
|
|
192
|
-
function
|
|
193
|
-
return (t =
|
|
191
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/defineProperty.js
|
|
192
|
+
function C(e, t, n) {
|
|
193
|
+
return (t = le(t)) in e ? Object.defineProperty(e, t, {
|
|
194
194
|
value: n,
|
|
195
195
|
enumerable: !0,
|
|
196
196
|
configurable: !0,
|
|
@@ -199,9 +199,9 @@ function w(e, t, n) {
|
|
|
199
199
|
}
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region src/classes/ErrorCenterHandler.ts
|
|
202
|
-
var
|
|
202
|
+
var ue = class {
|
|
203
203
|
constructor(e) {
|
|
204
|
-
|
|
204
|
+
C(this, "handlers", []), C(this, "callbacks", []), e && this.addList(e);
|
|
205
205
|
}
|
|
206
206
|
has(e) {
|
|
207
207
|
return !!this.get(e);
|
|
@@ -219,10 +219,13 @@ var le = class {
|
|
|
219
219
|
addList(e) {
|
|
220
220
|
return e.forEach((e) => e.handlers.forEach((t) => this.add(e.group, t))), this;
|
|
221
221
|
}
|
|
222
|
+
addCallback(e) {
|
|
223
|
+
return this.callbacks.push(e), this;
|
|
224
|
+
}
|
|
222
225
|
on(e) {
|
|
223
226
|
var t;
|
|
224
227
|
let n = (t = this.get(e.group)) == null ? this.get(void 0) : t;
|
|
225
|
-
return n && n.handlers.forEach((t) => t(e)), this.toConsole(e), this;
|
|
228
|
+
return n && n.handlers.forEach((t) => t(e)), this.callbacks.forEach((t) => t(e)), this.toConsole(e), this;
|
|
226
229
|
}
|
|
227
230
|
toConsole(e) {
|
|
228
231
|
if (console.error(`Error Center: ${e.code}`), console.error("Error Center/message: ", e.message), console.error("Error Center/details: ", e.details), !s()) {
|
|
@@ -231,9 +234,9 @@ var le = class {
|
|
|
231
234
|
}
|
|
232
235
|
return this;
|
|
233
236
|
}
|
|
234
|
-
},
|
|
235
|
-
constructor(e, t = new
|
|
236
|
-
|
|
237
|
+
}, de = class {
|
|
238
|
+
constructor(e, t = new ue()) {
|
|
239
|
+
C(this, "handler", void 0), C(this, "causes", []), this.handler = t, e && this.addList(e);
|
|
237
240
|
}
|
|
238
241
|
has(e, t) {
|
|
239
242
|
return !!this.get(e, t);
|
|
@@ -253,6 +256,9 @@ var le = class {
|
|
|
253
256
|
addHandlerList(e) {
|
|
254
257
|
return this.handler.addList(e), this;
|
|
255
258
|
}
|
|
259
|
+
addCallback(e) {
|
|
260
|
+
return this.handler.addCallback(e), this;
|
|
261
|
+
}
|
|
256
262
|
on(e) {
|
|
257
263
|
return this.handler.on(this.assign(e)), this;
|
|
258
264
|
}
|
|
@@ -270,7 +276,7 @@ var le = class {
|
|
|
270
276
|
}
|
|
271
277
|
return e;
|
|
272
278
|
}
|
|
273
|
-
},
|
|
279
|
+
}, fe = [
|
|
274
280
|
{
|
|
275
281
|
group: "api",
|
|
276
282
|
code: "cacheClear",
|
|
@@ -421,7 +427,7 @@ var le = class {
|
|
|
421
427
|
label: "Translate Error",
|
|
422
428
|
message: "An error occurred while loading translations."
|
|
423
429
|
}
|
|
424
|
-
],
|
|
430
|
+
], w = class {
|
|
425
431
|
static getItem() {
|
|
426
432
|
return this.item;
|
|
427
433
|
}
|
|
@@ -443,14 +449,17 @@ var le = class {
|
|
|
443
449
|
static addHandlerList(e) {
|
|
444
450
|
this.getItem().addHandlerList(e);
|
|
445
451
|
}
|
|
452
|
+
static addCallback(e) {
|
|
453
|
+
this.getItem().addCallback(e);
|
|
454
|
+
}
|
|
446
455
|
static on(e) {
|
|
447
456
|
this.getItem().on(e);
|
|
448
457
|
}
|
|
449
458
|
};
|
|
450
|
-
w
|
|
459
|
+
C(w, "item", new de(fe));
|
|
451
460
|
//#endregion
|
|
452
461
|
//#region src/functions/transformation.ts
|
|
453
|
-
function
|
|
462
|
+
function T(e, t = !1) {
|
|
454
463
|
if (typeof e == "string") {
|
|
455
464
|
let r = e.trim();
|
|
456
465
|
switch (r) {
|
|
@@ -463,7 +472,7 @@ function E(e, t = !1) {
|
|
|
463
472
|
if (/^[{[]/.exec(r)) try {
|
|
464
473
|
return JSON.parse(r);
|
|
465
474
|
} catch (e) {
|
|
466
|
-
|
|
475
|
+
w.on({
|
|
467
476
|
group: "transformation",
|
|
468
477
|
code: "error",
|
|
469
478
|
details: e
|
|
@@ -478,32 +487,32 @@ function E(e, t = !1) {
|
|
|
478
487
|
}
|
|
479
488
|
//#endregion
|
|
480
489
|
//#region src/functions/encodeLiteAttribute.ts
|
|
481
|
-
var
|
|
490
|
+
var pe = {
|
|
482
491
|
"<": "<",
|
|
483
492
|
">": ">",
|
|
484
493
|
"&": "&"
|
|
485
494
|
};
|
|
486
|
-
function
|
|
495
|
+
function me(e) {
|
|
487
496
|
return String(e).replace(/[<>&]/g, (e) => {
|
|
488
497
|
var t;
|
|
489
|
-
return (t =
|
|
498
|
+
return (t = pe == null ? void 0 : pe[e]) == null ? e : t;
|
|
490
499
|
});
|
|
491
500
|
}
|
|
492
501
|
//#endregion
|
|
493
502
|
//#region src/functions/getElementSafeScript.ts
|
|
494
|
-
function
|
|
503
|
+
function he(e, t) {
|
|
495
504
|
return `<script id="${e.replace(/"/g, """)}" type="application/json">${JSON.stringify(t).replace(/<\/(script)>/gi, "<\\/$1>")}<\/script>`;
|
|
496
505
|
}
|
|
497
506
|
//#endregion
|
|
498
507
|
//#region src/functions/getHydrationData.ts
|
|
499
|
-
function
|
|
508
|
+
function ge(e, t, n = !0) {
|
|
500
509
|
if (typeof document < "u") {
|
|
501
510
|
let t = document.getElementById(e);
|
|
502
511
|
if (t) try {
|
|
503
512
|
let e = JSON.parse(t.textContent || "");
|
|
504
513
|
return n && t.remove(), e;
|
|
505
514
|
} catch (t) {
|
|
506
|
-
|
|
515
|
+
w.on({
|
|
507
516
|
group: "hydration",
|
|
508
517
|
code: "error",
|
|
509
518
|
details: {
|
|
@@ -517,7 +526,7 @@ function he(e, t, n = !0) {
|
|
|
517
526
|
}
|
|
518
527
|
//#endregion
|
|
519
528
|
//#region src/classes/ServerStorage.ts
|
|
520
|
-
var
|
|
529
|
+
var _e = "__ui:server-storage__", ve = "__ui:server:storage:id__", E = class {
|
|
521
530
|
static init(e) {
|
|
522
531
|
return this.listener || (this.listener = e), this;
|
|
523
532
|
}
|
|
@@ -547,7 +556,7 @@ var ge = "__ui:server-storage__", _e = "__ui:server:storage:id__", D = class {
|
|
|
547
556
|
e in t && delete t[e];
|
|
548
557
|
}
|
|
549
558
|
static toString() {
|
|
550
|
-
return
|
|
559
|
+
return he(ve, this.getDataForHydration());
|
|
551
560
|
}
|
|
552
561
|
static getStorage(e = !0, t) {
|
|
553
562
|
var n;
|
|
@@ -555,17 +564,17 @@ var ge = "__ui:server-storage__", _e = "__ui:server:storage:id__", D = class {
|
|
|
555
564
|
let r = (n = this.listener) == null ? void 0 : n.call(this);
|
|
556
565
|
if (!r) {
|
|
557
566
|
var i;
|
|
558
|
-
return this.hideError ||
|
|
567
|
+
return this.hideError || w.on({
|
|
559
568
|
group: "storage",
|
|
560
569
|
code: "context",
|
|
561
570
|
details: { status: t }
|
|
562
571
|
}), e && !this.storage && (this.storage = {}), (i = this.storage) == null ? {} : i;
|
|
563
572
|
}
|
|
564
|
-
return
|
|
573
|
+
return _e in r || (r[_e] = {}), r[_e];
|
|
565
574
|
}
|
|
566
575
|
static getStorageDom() {
|
|
567
576
|
if (!this.storage) {
|
|
568
|
-
let e =
|
|
577
|
+
let e = ge(ve, {});
|
|
569
578
|
this.storage = {}, r(e, (e, t) => {
|
|
570
579
|
this.storage[t] = {
|
|
571
580
|
value: e,
|
|
@@ -582,16 +591,16 @@ var ge = "__ui:server-storage__", _e = "__ui:server:storage:id__", D = class {
|
|
|
582
591
|
}), t;
|
|
583
592
|
}
|
|
584
593
|
};
|
|
585
|
-
|
|
594
|
+
C(E, "storage", void 0), C(E, "listener", void 0), C(E, "hideError", void 0);
|
|
586
595
|
//#endregion
|
|
587
596
|
//#region src/classes/DataStorage.ts
|
|
588
|
-
var
|
|
597
|
+
var ye = "ui-storage", be = () => E.get("__ui:data-storage__", () => ({})), D = class {
|
|
589
598
|
static setPrefix(e) {
|
|
590
|
-
|
|
599
|
+
ye = e;
|
|
591
600
|
}
|
|
592
|
-
constructor(e, t = !1, n =
|
|
593
|
-
|
|
594
|
-
let r = `${t ? "session" : "storage"}#${e}`, i =
|
|
601
|
+
constructor(e, t = !1, n = w.getItem()) {
|
|
602
|
+
C(this, "name", void 0), C(this, "isSession", void 0), C(this, "errorCenter", void 0), C(this, "value", void 0), C(this, "age", void 0), this.name = e, this.isSession = t, this.errorCenter = n;
|
|
603
|
+
let r = `${t ? "session" : "storage"}#${e}`, i = be();
|
|
595
604
|
if (r in i) return i[r];
|
|
596
605
|
this.make(), i[r] = this;
|
|
597
606
|
}
|
|
@@ -603,7 +612,7 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
603
612
|
if (this.value = m(e), this.age = Date.now(), this.value === void 0) this.remove();
|
|
604
613
|
else {
|
|
605
614
|
var t;
|
|
606
|
-
(t = this.getMethod()) == null || t.setItem(this.getIndex(),
|
|
615
|
+
(t = this.getMethod()) == null || t.setItem(this.getIndex(), me(JSON.stringify({
|
|
607
616
|
value: this.value,
|
|
608
617
|
age: this.age
|
|
609
618
|
})));
|
|
@@ -621,14 +630,14 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
621
630
|
return c(e) || this.age && this.age + e * 1e3 >= Date.now();
|
|
622
631
|
}
|
|
623
632
|
getMethod() {
|
|
624
|
-
if (s() && !
|
|
633
|
+
if (s() && !oe()) {
|
|
625
634
|
var e, t;
|
|
626
635
|
let n = this.isSession ? (e = window) == null ? void 0 : e.sessionStorage : (t = window) == null ? void 0 : t.localStorage;
|
|
627
636
|
if (n) return n;
|
|
628
637
|
}
|
|
629
638
|
}
|
|
630
639
|
getIndex() {
|
|
631
|
-
return `${
|
|
640
|
+
return `${ye}__${this.name}`;
|
|
632
641
|
}
|
|
633
642
|
getValue() {
|
|
634
643
|
var e, t;
|
|
@@ -647,9 +656,9 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
647
656
|
let e = this.getValue();
|
|
648
657
|
return e ? (this.value = e.value, this.age = e.age) : (this.value = void 0, this.age = void 0), this;
|
|
649
658
|
}
|
|
650
|
-
},
|
|
659
|
+
}, xe = "__ui:cookie-block__", Se = class {
|
|
651
660
|
constructor() {
|
|
652
|
-
|
|
661
|
+
C(this, "storage", new D(xe));
|
|
653
662
|
}
|
|
654
663
|
get() {
|
|
655
664
|
var e;
|
|
@@ -658,9 +667,9 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
658
667
|
set(e) {
|
|
659
668
|
this.storage.set(e);
|
|
660
669
|
}
|
|
661
|
-
},
|
|
670
|
+
}, Ce = class {
|
|
662
671
|
static getItem() {
|
|
663
|
-
return
|
|
672
|
+
return E.get("__ui:cookie-block__", () => new Se());
|
|
664
673
|
}
|
|
665
674
|
static get() {
|
|
666
675
|
return this.getItem().get();
|
|
@@ -668,7 +677,7 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
668
677
|
static set(e) {
|
|
669
678
|
this.getItem().set(e);
|
|
670
679
|
}
|
|
671
|
-
},
|
|
680
|
+
}, we = "__ui:cookie-storage__", O = class {
|
|
672
681
|
static init(e, t, n) {
|
|
673
682
|
this.getListener = e, this.getListenerRaw = t, this.setListener = n;
|
|
674
683
|
}
|
|
@@ -678,19 +687,19 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
678
687
|
static get(e, t) {
|
|
679
688
|
var n, r;
|
|
680
689
|
let i = (n = (r = this.getListener) == null ? void 0 : r.call(this, e)) == null ? this.initItems()[e] : n;
|
|
681
|
-
return i === void 0 && t !== void 0 ? this.set(e, t) :
|
|
690
|
+
return i === void 0 && t !== void 0 ? this.set(e, t) : T(i);
|
|
682
691
|
}
|
|
683
692
|
static set(e, t, n) {
|
|
684
693
|
let r = m(t);
|
|
685
|
-
if (
|
|
686
|
-
let i =
|
|
694
|
+
if (Ce.get()) return r;
|
|
695
|
+
let i = x(r, !1);
|
|
687
696
|
return this.setListener ? this.setListener(e, i, this.format(e, i, n), n) : (this.initItems()[e] = i === "" ? void 0 : r, this.hasDom() && (document.cookie = this.format(e, i, n))), r;
|
|
688
697
|
}
|
|
689
698
|
static remove(e) {
|
|
690
699
|
this.set(e, "", { age: -1 });
|
|
691
700
|
}
|
|
692
701
|
static update() {
|
|
693
|
-
s() && (
|
|
702
|
+
s() && (E.remove(we), this.initItems());
|
|
694
703
|
}
|
|
695
704
|
static format(e, t, n) {
|
|
696
705
|
return [
|
|
@@ -706,18 +715,18 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
706
715
|
].filter(Boolean).join("; ");
|
|
707
716
|
}
|
|
708
717
|
static hasDom() {
|
|
709
|
-
return s() && !
|
|
718
|
+
return s() && !oe();
|
|
710
719
|
}
|
|
711
720
|
static parse(e) {
|
|
712
721
|
let t = {};
|
|
713
722
|
for (let n of e.split(";")) {
|
|
714
|
-
let [e, r] =
|
|
723
|
+
let [e, r] = se(n.trim(), "=", 2);
|
|
715
724
|
e && l(r) && (t[e] = r);
|
|
716
725
|
}
|
|
717
726
|
return t;
|
|
718
727
|
}
|
|
719
728
|
static initItems() {
|
|
720
|
-
return
|
|
729
|
+
return E.get(we, () => {
|
|
721
730
|
var e;
|
|
722
731
|
if (this.hasDom()) return this.parse(document.cookie);
|
|
723
732
|
let t = (e = this.getListenerRaw) == null ? void 0 : e.call(this);
|
|
@@ -746,22 +755,22 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
746
755
|
return e ? "Partitioned" : void 0;
|
|
747
756
|
}
|
|
748
757
|
static toArguments(e) {
|
|
749
|
-
return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${
|
|
758
|
+
return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${x(t)}`);
|
|
750
759
|
}
|
|
751
760
|
};
|
|
752
|
-
|
|
761
|
+
C(O, "getListener", void 0), C(O, "getListenerRaw", void 0), C(O, "setListener", void 0);
|
|
753
762
|
//#endregion
|
|
754
763
|
//#region src/classes/Cookie.ts
|
|
755
|
-
var
|
|
764
|
+
var Te = () => E.get("__ui:cookie-items__", () => ({})), Ee = class e {
|
|
756
765
|
static getInstance(t) {
|
|
757
766
|
var n, r;
|
|
758
|
-
return (n = (r =
|
|
767
|
+
return (n = (r = Te()) == null ? void 0 : r[t]) == null ? new e(t) : n;
|
|
759
768
|
}
|
|
760
769
|
constructor(e) {
|
|
761
|
-
|
|
762
|
-
let t =
|
|
770
|
+
C(this, "name", void 0), C(this, "value", void 0), C(this, "options", {}), this.name = e;
|
|
771
|
+
let t = Te();
|
|
763
772
|
if (e in t) return t[e];
|
|
764
|
-
this.value =
|
|
773
|
+
this.value = O.get(this.name), t[e] = this;
|
|
765
774
|
}
|
|
766
775
|
get(e, t) {
|
|
767
776
|
return this.value === void 0 && e && this.set(e, t), this.value;
|
|
@@ -773,11 +782,11 @@ var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
|
773
782
|
this.set("");
|
|
774
783
|
}
|
|
775
784
|
update() {
|
|
776
|
-
|
|
785
|
+
O.set(this.name, this.value, this.options);
|
|
777
786
|
}
|
|
778
|
-
},
|
|
787
|
+
}, De = "ui-geo-code", Oe = "__ui:geo-code__", ke = class {
|
|
779
788
|
constructor() {
|
|
780
|
-
|
|
789
|
+
C(this, "storage", new D(Oe)), C(this, "location", void 0), C(this, "valueDefault", 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);
|
|
781
790
|
}
|
|
782
791
|
get() {
|
|
783
792
|
return this.item;
|
|
@@ -815,7 +824,7 @@ var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
|
815
824
|
return e && (/([A-Z]{2}-[a-z]{2})|([a-z]{2}-[A-Z]{2})/.test(e) && (n = this.getByCodeFull(e)), !n && /[A-Z]{2}/.test(e) && (n = this.getByCountry(this.toCountry(e))), !n && /[a-z]{2}/.test(e) && (n = this.getByLanguage(this.toLanguage(e)))), this.toFull((t = n) == null ? this.getList()[0] : t, e);
|
|
816
825
|
}
|
|
817
826
|
getByCodeFull(e) {
|
|
818
|
-
return this.getList().find((t) =>
|
|
827
|
+
return this.getList().find((t) => b(e, [`${t.language}-${t.country}`, `${t.country}-${t.language}`]));
|
|
819
828
|
}
|
|
820
829
|
getByCountry(e) {
|
|
821
830
|
return this.getList().find((t) => {
|
|
@@ -857,7 +866,7 @@ var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
|
857
866
|
this.valueDefault = e, this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
|
|
858
867
|
}
|
|
859
868
|
getCookie() {
|
|
860
|
-
return
|
|
869
|
+
return Ee.getInstance(De);
|
|
861
870
|
}
|
|
862
871
|
findLocation() {
|
|
863
872
|
return this.getCookie().get() || this.findLocationDom() || m(this.valueDefault) || "en-GB";
|
|
@@ -893,9 +902,9 @@ var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
|
893
902
|
locationLanguage: n
|
|
894
903
|
};
|
|
895
904
|
}
|
|
896
|
-
},
|
|
905
|
+
}, k = class {
|
|
897
906
|
static getObject() {
|
|
898
|
-
return
|
|
907
|
+
return E.get("__ui:geo-instance__", () => new ke());
|
|
899
908
|
}
|
|
900
909
|
static get() {
|
|
901
910
|
return this.getObject().get();
|
|
@@ -963,14 +972,14 @@ var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
|
963
972
|
};
|
|
964
973
|
//#endregion
|
|
965
974
|
//#region src/functions/isWindow.ts
|
|
966
|
-
function
|
|
975
|
+
function Ae(e) {
|
|
967
976
|
return s() && e === window;
|
|
968
977
|
}
|
|
969
978
|
//#endregion
|
|
970
979
|
//#region src/functions/getElement.ts
|
|
971
|
-
function
|
|
980
|
+
function A(e) {
|
|
972
981
|
if (!s()) return d(e) ? void 0 : e;
|
|
973
|
-
if (
|
|
982
|
+
if (Ae(e)) return document.body;
|
|
974
983
|
if (d(e)) {
|
|
975
984
|
var t;
|
|
976
985
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -979,30 +988,30 @@ function j(e) {
|
|
|
979
988
|
}
|
|
980
989
|
//#endregion
|
|
981
990
|
//#region src/functions/getElementOrWindow.ts
|
|
982
|
-
function
|
|
983
|
-
return
|
|
991
|
+
function je(e) {
|
|
992
|
+
return Ae(e) ? e : A(e);
|
|
984
993
|
}
|
|
985
994
|
//#endregion
|
|
986
995
|
//#region src/functions/isInDom.ts
|
|
987
|
-
function
|
|
996
|
+
function Me(e) {
|
|
988
997
|
var t;
|
|
989
|
-
return (e == null ? void 0 : e.isConnected) || !!((t =
|
|
998
|
+
return (e == null ? void 0 : e.isConnected) || !!((t = A(e)) != null && t.closest("html"));
|
|
990
999
|
}
|
|
991
1000
|
//#endregion
|
|
992
1001
|
//#region src/functions/toArray.ts
|
|
993
|
-
function
|
|
1002
|
+
function j(e) {
|
|
994
1003
|
return Array.isArray(e) ? e : [e];
|
|
995
1004
|
}
|
|
996
1005
|
//#endregion
|
|
997
1006
|
//#region src/classes/EventItem.ts
|
|
998
|
-
var
|
|
1007
|
+
var Ne = class {
|
|
999
1008
|
constructor(e, n = ["click"], r, i, a) {
|
|
1000
|
-
|
|
1001
|
-
if (
|
|
1009
|
+
C(this, "listener", void 0), C(this, "options", void 0), C(this, "detail", void 0), C(this, "element", void 0), C(this, "elementControl", void 0), C(this, "elementControlEdit", void 0), C(this, "type", void 0), C(this, "listenerRecent", (e) => {
|
|
1010
|
+
if (Me(this.elementControl)) {
|
|
1002
1011
|
var n, r;
|
|
1003
1012
|
(n = this.listener) == null || n.call(this.element, e, this.detail), t(this.options) && (r = this.options) != null && r.once && this.stop();
|
|
1004
1013
|
} else this.stop();
|
|
1005
|
-
}),
|
|
1014
|
+
}), C(this, "activity", !1), C(this, "activityItems", []), this.listener = r, this.options = i, this.detail = a, this.element = je(e), this.elementControl = A(e), this.type = j(n);
|
|
1006
1015
|
}
|
|
1007
1016
|
isActive() {
|
|
1008
1017
|
return this.activity;
|
|
@@ -1011,14 +1020,14 @@ var Me = class {
|
|
|
1011
1020
|
return this.element;
|
|
1012
1021
|
}
|
|
1013
1022
|
setElement(e) {
|
|
1014
|
-
let t =
|
|
1015
|
-
return this.elementControlEdit || (this.elementControl =
|
|
1023
|
+
let t = je(e);
|
|
1024
|
+
return this.elementControlEdit || (this.elementControl = A(e)), this.element = t, this.reset(), this;
|
|
1016
1025
|
}
|
|
1017
1026
|
setElementControl(e) {
|
|
1018
|
-
return this.elementControl =
|
|
1027
|
+
return this.elementControl = A(e), this.elementControlEdit = !c(this.elementControl), this.elementControlEdit || (this.elementControl = A(this.element)), this;
|
|
1019
1028
|
}
|
|
1020
1029
|
setType(e) {
|
|
1021
|
-
return this.type =
|
|
1030
|
+
return this.type = j(e), this.reset(), this;
|
|
1022
1031
|
}
|
|
1023
1032
|
setListener(e) {
|
|
1024
1033
|
return this.listener = e, this;
|
|
@@ -1087,9 +1096,9 @@ var Me = class {
|
|
|
1087
1096
|
}
|
|
1088
1097
|
return !1;
|
|
1089
1098
|
}
|
|
1090
|
-
},
|
|
1091
|
-
constructor(e =
|
|
1092
|
-
|
|
1099
|
+
}, Pe = "ui-loading", Fe = class {
|
|
1100
|
+
constructor(e = Pe) {
|
|
1101
|
+
C(this, "eventName", void 0), C(this, "value", 0), C(this, "event", void 0), C(this, "registrationList", []), this.eventName = e, s() && (this.event = new Ne(window, this.eventName));
|
|
1093
1102
|
}
|
|
1094
1103
|
is() {
|
|
1095
1104
|
return this.value > 0;
|
|
@@ -1105,7 +1114,7 @@ var Me = class {
|
|
|
1105
1114
|
}
|
|
1106
1115
|
registrationEvent(e, t) {
|
|
1107
1116
|
if (s()) {
|
|
1108
|
-
let n = new
|
|
1117
|
+
let n = new Ne(window, this.eventName, e).setElementControl(t).start();
|
|
1109
1118
|
this.registrationList.push({
|
|
1110
1119
|
item: n,
|
|
1111
1120
|
listener: e,
|
|
@@ -1120,7 +1129,7 @@ var Me = class {
|
|
|
1120
1129
|
var e;
|
|
1121
1130
|
(e = this.event) == null || e.dispatch({ loading: this.is() });
|
|
1122
1131
|
}
|
|
1123
|
-
},
|
|
1132
|
+
}, M = class {
|
|
1124
1133
|
static is() {
|
|
1125
1134
|
return this.getItem().is();
|
|
1126
1135
|
}
|
|
@@ -1128,7 +1137,7 @@ var Me = class {
|
|
|
1128
1137
|
return this.getItem().get();
|
|
1129
1138
|
}
|
|
1130
1139
|
static getItem() {
|
|
1131
|
-
return
|
|
1140
|
+
return E.get("__ui:loading-instance__", () => new Fe());
|
|
1132
1141
|
}
|
|
1133
1142
|
static show() {
|
|
1134
1143
|
this.getItem().show();
|
|
@@ -1142,7 +1151,7 @@ var Me = class {
|
|
|
1142
1151
|
static unregistrationEvent(e, t) {
|
|
1143
1152
|
this.getItem().unregistrationEvent(e, t);
|
|
1144
1153
|
}
|
|
1145
|
-
},
|
|
1154
|
+
}, Ie, Le = 1440 * 60, N = class {
|
|
1146
1155
|
static init(e, t, n, r) {
|
|
1147
1156
|
this.getListener = e, this.setListener = t, this.removeListener = n, r && (this.cacheStepAgeClearOld = r, this.stepAgeClearOld = r);
|
|
1148
1157
|
}
|
|
@@ -1152,7 +1161,7 @@ var Me = class {
|
|
|
1152
1161
|
static async get(e) {
|
|
1153
1162
|
let t = await this.getItemOrListener(e);
|
|
1154
1163
|
return this.clearOld().catch((e) => {
|
|
1155
|
-
|
|
1164
|
+
w.on({
|
|
1156
1165
|
group: "api",
|
|
1157
1166
|
code: "cacheClear",
|
|
1158
1167
|
details: e
|
|
@@ -1164,7 +1173,7 @@ var Me = class {
|
|
|
1164
1173
|
let t = this.generateKey(e);
|
|
1165
1174
|
return await this.get(t);
|
|
1166
1175
|
}
|
|
1167
|
-
static async set(e, t, n =
|
|
1176
|
+
static async set(e, t, n = Le) {
|
|
1168
1177
|
let r = {
|
|
1169
1178
|
value: t,
|
|
1170
1179
|
age: n,
|
|
@@ -1227,12 +1236,12 @@ var Me = class {
|
|
|
1227
1236
|
}
|
|
1228
1237
|
}
|
|
1229
1238
|
};
|
|
1230
|
-
|
|
1239
|
+
Ie = N, C(N, "items", void 0), C(N, "getListener", void 0), C(N, "setListener", void 0), C(N, "removeListener", void 0), C(N, "cacheStepAgeClearOld", 16384), C(N, "stepAgeClearOld", Ie.cacheStepAgeClearOld);
|
|
1231
1240
|
//#endregion
|
|
1232
1241
|
//#region src/classes/ApiStatus.ts
|
|
1233
|
-
var
|
|
1242
|
+
var Re = class {
|
|
1234
1243
|
constructor() {
|
|
1235
|
-
|
|
1244
|
+
C(this, "value", void 0);
|
|
1236
1245
|
}
|
|
1237
1246
|
get() {
|
|
1238
1247
|
return this.value;
|
|
@@ -1292,15 +1301,15 @@ var Le = class {
|
|
|
1292
1301
|
setValue(e, t) {
|
|
1293
1302
|
this.value || (this.value = {}), this.value[e] = t;
|
|
1294
1303
|
}
|
|
1295
|
-
},
|
|
1304
|
+
}, ze = [
|
|
1296
1305
|
"success",
|
|
1297
1306
|
"status",
|
|
1298
1307
|
"code",
|
|
1299
1308
|
"message",
|
|
1300
1309
|
"error"
|
|
1301
|
-
],
|
|
1310
|
+
], Be = class {
|
|
1302
1311
|
constructor(e, t, n, r) {
|
|
1303
|
-
|
|
1312
|
+
C(this, "apiFetch", void 0), C(this, "query", void 0), C(this, "end", void 0), C(this, "error", void 0), C(this, "data", void 0), C(this, "dataMod", void 0), this.apiFetch = e, this.query = t, this.end = n, this.error = r;
|
|
1304
1313
|
}
|
|
1305
1314
|
async init() {
|
|
1306
1315
|
return this.data = await this.readData(), this;
|
|
@@ -1330,18 +1339,18 @@ var Le = class {
|
|
|
1330
1339
|
}
|
|
1331
1340
|
initItem(e) {
|
|
1332
1341
|
let t = { ...e.data };
|
|
1333
|
-
return
|
|
1342
|
+
return ze.forEach((r) => {
|
|
1334
1343
|
if (r in e && !(r in t) && (t[r] = e[r], r === "error" && n(e[r]))) {
|
|
1335
1344
|
var i, a, o, s;
|
|
1336
1345
|
t.code = (i = (a = e[r]) == null ? void 0 : a.code) == null ? e.code : i, t.message = (o = (s = e[r]) == null ? void 0 : s.message) == null ? e.message : o;
|
|
1337
1346
|
}
|
|
1338
1347
|
}), t;
|
|
1339
1348
|
}
|
|
1340
|
-
},
|
|
1349
|
+
}, P = /* @__PURE__ */ function(e) {
|
|
1341
1350
|
return e.delete = "DELETE", e.get = "GET", e.post = "POST", e.put = "PUT", e.patch = "PATCH", e;
|
|
1342
|
-
}({}),
|
|
1351
|
+
}({}), Ve = class {
|
|
1343
1352
|
constructor() {
|
|
1344
|
-
|
|
1353
|
+
C(this, "value", void 0);
|
|
1345
1354
|
}
|
|
1346
1355
|
is() {
|
|
1347
1356
|
return !!this.value;
|
|
@@ -1368,9 +1377,9 @@ var Le = class {
|
|
|
1368
1377
|
e.has(t) || e.set(t, n);
|
|
1369
1378
|
}), this;
|
|
1370
1379
|
}
|
|
1371
|
-
},
|
|
1380
|
+
}, He = class {
|
|
1372
1381
|
constructor(e, t, n) {
|
|
1373
|
-
|
|
1382
|
+
C(this, "method", void 0), C(this, "response", void 0), C(this, "error", void 0), C(this, "jsonResponse", void 0), this.method = e, this.response = t, this.error = n;
|
|
1374
1383
|
}
|
|
1375
1384
|
getMethod() {
|
|
1376
1385
|
return this.method;
|
|
@@ -1392,9 +1401,9 @@ var Le = class {
|
|
|
1392
1401
|
getStatus() {
|
|
1393
1402
|
return this.response.status;
|
|
1394
1403
|
}
|
|
1395
|
-
},
|
|
1404
|
+
}, Ue = class {
|
|
1396
1405
|
constructor() {
|
|
1397
|
-
|
|
1406
|
+
C(this, "storage", []);
|
|
1398
1407
|
}
|
|
1399
1408
|
async find(e, t) {
|
|
1400
1409
|
let n = await this.getBody(t), r = this.getCode(n), i = this.getMessage(n) || t.statusText, a = this.findItem(e, t, r);
|
|
@@ -1411,7 +1420,7 @@ var Le = class {
|
|
|
1411
1420
|
};
|
|
1412
1421
|
}
|
|
1413
1422
|
add(e, t, n) {
|
|
1414
|
-
return
|
|
1423
|
+
return j(e).forEach((e) => {
|
|
1415
1424
|
let r = e.url || t, i = e.method || n;
|
|
1416
1425
|
r && i && this.storage.push({
|
|
1417
1426
|
...e,
|
|
@@ -1446,19 +1455,19 @@ var Le = class {
|
|
|
1446
1455
|
getMessage(e) {
|
|
1447
1456
|
return this.getDataByKey(e, "message");
|
|
1448
1457
|
}
|
|
1449
|
-
},
|
|
1458
|
+
}, We = class {
|
|
1450
1459
|
static getStorage() {
|
|
1451
|
-
return
|
|
1460
|
+
return E.get("__ui:api-error-storage__", () => new Ue());
|
|
1452
1461
|
}
|
|
1453
1462
|
static add(e, t, n) {
|
|
1454
1463
|
this.getStorage().add(e, t, n);
|
|
1455
1464
|
}
|
|
1456
1465
|
static async getItem(e, t) {
|
|
1457
|
-
return new
|
|
1466
|
+
return new He(e, t, await this.getStorage().find(e, t));
|
|
1458
1467
|
}
|
|
1459
|
-
},
|
|
1468
|
+
}, Ge = class {
|
|
1460
1469
|
constructor() {
|
|
1461
|
-
|
|
1470
|
+
C(this, "headers", {});
|
|
1462
1471
|
}
|
|
1463
1472
|
get(e, t = "application/json;charset=UTF-8") {
|
|
1464
1473
|
if (e === null) return;
|
|
@@ -1472,15 +1481,15 @@ var Le = class {
|
|
|
1472
1481
|
set(e) {
|
|
1473
1482
|
return this.headers = e, this;
|
|
1474
1483
|
}
|
|
1475
|
-
},
|
|
1484
|
+
}, Ke = "__ui:api:hydration:id__", qe = class {
|
|
1476
1485
|
constructor() {
|
|
1477
|
-
|
|
1486
|
+
C(this, "list", []);
|
|
1478
1487
|
}
|
|
1479
1488
|
initResponse(e) {
|
|
1480
1489
|
s() && e.add(this.getListByClient());
|
|
1481
1490
|
}
|
|
1482
1491
|
toClient(e, t) {
|
|
1483
|
-
let { path: n, method: r =
|
|
1492
|
+
let { path: n, method: r = P.get, request: i, global: a = r === P.get } = e;
|
|
1484
1493
|
!a || !n || s() || this.list.push({
|
|
1485
1494
|
path: n,
|
|
1486
1495
|
method: r,
|
|
@@ -1489,14 +1498,14 @@ var Le = class {
|
|
|
1489
1498
|
});
|
|
1490
1499
|
}
|
|
1491
1500
|
toString() {
|
|
1492
|
-
return
|
|
1501
|
+
return he(Ke, this.list);
|
|
1493
1502
|
}
|
|
1494
1503
|
getListByClient() {
|
|
1495
|
-
return
|
|
1504
|
+
return ge(Ke, []);
|
|
1496
1505
|
}
|
|
1497
|
-
},
|
|
1506
|
+
}, Je = class {
|
|
1498
1507
|
constructor() {
|
|
1499
|
-
|
|
1508
|
+
C(this, "callback", void 0), C(this, "callbackEnd", void 0), C(this, "loading", !1);
|
|
1500
1509
|
}
|
|
1501
1510
|
async make(e, t) {
|
|
1502
1511
|
if (e && this.callback) return this.go(t);
|
|
@@ -1522,15 +1531,15 @@ var Le = class {
|
|
|
1522
1531
|
};
|
|
1523
1532
|
//#endregion
|
|
1524
1533
|
//#region src/functions/executePromise.ts
|
|
1525
|
-
async function
|
|
1534
|
+
async function Ye(e, ...t) {
|
|
1526
1535
|
let n = m(e, ...t);
|
|
1527
1536
|
return n instanceof Promise ? await n : n;
|
|
1528
1537
|
}
|
|
1529
1538
|
//#endregion
|
|
1530
1539
|
//#region src/classes/ApiResponse.ts
|
|
1531
|
-
var
|
|
1540
|
+
var Xe = "d-response-loading", Ze = class {
|
|
1532
1541
|
constructor(e) {
|
|
1533
|
-
|
|
1542
|
+
C(this, "requestDefault", void 0), C(this, "first", []), C(this, "response", []), C(this, "loading", void 0), C(this, "devMode", !1), this.requestDefault = e;
|
|
1534
1543
|
}
|
|
1535
1544
|
get(e = "", t, n, r) {
|
|
1536
1545
|
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);
|
|
@@ -1539,7 +1548,7 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1539
1548
|
return this.response.filter((e) => e.isForGlobal !== !0);
|
|
1540
1549
|
}
|
|
1541
1550
|
add(e) {
|
|
1542
|
-
return this.response.push(...
|
|
1551
|
+
return this.response.push(...j(e)), this;
|
|
1543
1552
|
}
|
|
1544
1553
|
setDevMode(e) {
|
|
1545
1554
|
return this.devMode = e, this;
|
|
@@ -1573,7 +1582,7 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1573
1582
|
}
|
|
1574
1583
|
readData(e) {
|
|
1575
1584
|
if (!s()) return;
|
|
1576
|
-
let { path: t = "", method: n =
|
|
1585
|
+
let { path: t = "", method: n = P.get, global: r = n === P.get, devMode: i = !1 } = e;
|
|
1577
1586
|
if (r || this.isDevMode(i)) {
|
|
1578
1587
|
let r = this.requestDefault.request(e.request), a = this.get(t, n, r, i);
|
|
1579
1588
|
if (a) return {
|
|
@@ -1584,9 +1593,9 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1584
1593
|
}
|
|
1585
1594
|
fetch(e, t) {
|
|
1586
1595
|
return this.startResponseLoading(), new Promise((n) => {
|
|
1587
|
-
|
|
1588
|
-
e != null && e.lag ? (
|
|
1589
|
-
this.stopResponseLoading(), n(t),
|
|
1596
|
+
Ye(p(e.response) ? e.response(t) : e.response).then((t) => {
|
|
1597
|
+
e != null && e.lag ? (M.show(), setTimeout(() => {
|
|
1598
|
+
this.stopResponseLoading(), n(t), M.hide();
|
|
1590
1599
|
}, f(0, 2e3))) : (this.stopResponseLoading(), n(t));
|
|
1591
1600
|
});
|
|
1592
1601
|
});
|
|
@@ -1595,17 +1604,17 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1595
1604
|
return e.response;
|
|
1596
1605
|
}
|
|
1597
1606
|
startResponseLoading() {
|
|
1598
|
-
this.loading && clearTimeout(this.loading), s() && document.body.classList.add(
|
|
1607
|
+
this.loading && clearTimeout(this.loading), s() && document.body.classList.add(Xe);
|
|
1599
1608
|
}
|
|
1600
1609
|
stopResponseLoading() {
|
|
1601
1610
|
s() && (this.loading = setTimeout(() => {
|
|
1602
|
-
this.loading = void 0, document.body.classList.remove(
|
|
1611
|
+
this.loading = void 0, document.body.classList.remove(Xe);
|
|
1603
1612
|
}, 2400));
|
|
1604
1613
|
}
|
|
1605
|
-
},
|
|
1614
|
+
}, Qe = class {
|
|
1606
1615
|
constructor(e = "/api/", t = {}) {
|
|
1607
|
-
|
|
1608
|
-
let { headersClass: n =
|
|
1616
|
+
C(this, "url", void 0), 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), C(this, "wrapper", void 0), this.url = e;
|
|
1617
|
+
let { headersClass: n = Ge, requestDefaultClass: r = Ve, statusClass: i = Re, responseClass: a = Ze, preparationClass: o = Je, loadingClass: s = M.getItem(), errorCenterClass: c = w.getItem(), hydrationClass: l = qe, wrapper: u } = t;
|
|
1609
1618
|
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.wrapper = u, this.hydration.initResponse(this.response);
|
|
1610
1619
|
}
|
|
1611
1620
|
isLocalhost() {
|
|
@@ -1624,14 +1633,14 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1624
1633
|
return this.origin && /^\//.test(this.url) ? `${this.origin}${this.url}` : this.url;
|
|
1625
1634
|
}
|
|
1626
1635
|
getUrl(e, t = !0) {
|
|
1627
|
-
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}",
|
|
1636
|
+
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}", k.getLocation()).replace("{country}", k.getCountry()).replace("{language}", k.getLanguage());
|
|
1628
1637
|
}
|
|
1629
|
-
getBody(e = {}, t =
|
|
1638
|
+
getBody(e = {}, t = P.get) {
|
|
1630
1639
|
if (e instanceof FormData) return e;
|
|
1631
|
-
if (t !==
|
|
1640
|
+
if (t !== P.get && l(e)) return d(e) ? e : JSON.stringify(e);
|
|
1632
1641
|
}
|
|
1633
|
-
getBodyForGet(e, t = "", n =
|
|
1634
|
-
if (n ===
|
|
1642
|
+
getBodyForGet(e, t = "", n = P.get) {
|
|
1643
|
+
if (n === P.get) {
|
|
1635
1644
|
let n = t.match(/\?/) ? "&" : "?", r = typeof e == "object" ? o(e) : e;
|
|
1636
1645
|
if (l(r)) return `${n}${r}`;
|
|
1637
1646
|
}
|
|
@@ -1672,63 +1681,63 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1672
1681
|
get(e) {
|
|
1673
1682
|
return this.request({
|
|
1674
1683
|
...e,
|
|
1675
|
-
method:
|
|
1684
|
+
method: P.get
|
|
1676
1685
|
});
|
|
1677
1686
|
}
|
|
1678
1687
|
post(e) {
|
|
1679
1688
|
return this.request({
|
|
1680
1689
|
...e,
|
|
1681
|
-
method:
|
|
1690
|
+
method: P.post
|
|
1682
1691
|
});
|
|
1683
1692
|
}
|
|
1684
1693
|
put(e) {
|
|
1685
1694
|
return this.request({
|
|
1686
1695
|
...e,
|
|
1687
|
-
method:
|
|
1696
|
+
method: P.put
|
|
1688
1697
|
});
|
|
1689
1698
|
}
|
|
1690
1699
|
patch(e) {
|
|
1691
1700
|
return this.request({
|
|
1692
1701
|
...e,
|
|
1693
|
-
method:
|
|
1702
|
+
method: P.patch
|
|
1694
1703
|
});
|
|
1695
1704
|
}
|
|
1696
1705
|
delete(e) {
|
|
1697
1706
|
return this.request({
|
|
1698
1707
|
...e,
|
|
1699
|
-
method:
|
|
1708
|
+
method: P.delete
|
|
1700
1709
|
});
|
|
1701
1710
|
}
|
|
1702
1711
|
getRetryDelay(e, t) {
|
|
1703
1712
|
return f(t, t + e * t);
|
|
1704
1713
|
}
|
|
1705
1714
|
async fetch(e, t = 0) {
|
|
1706
|
-
let { method: n =
|
|
1715
|
+
let { method: n = P.get, api: r = !0, path: i = "", hideError: a = !1, hideLoading: o = !1, retry: s = 0, retryDelay: c = 64, globalPreparation: l = !0, globalEnd: u = !0, initError: d = !0, endResetLimit: f = 8 } = e, p = this.getUrl(i, r), m = await this.response.emulator(e);
|
|
1707
1716
|
if (m) return m;
|
|
1708
|
-
let
|
|
1709
|
-
if (
|
|
1710
|
-
let
|
|
1717
|
+
let te = await N.getByFetch(e);
|
|
1718
|
+
if (te) return this.hydration.toClient(e, te), te;
|
|
1719
|
+
let h = new Re(), g, _;
|
|
1711
1720
|
o || this.loading.show();
|
|
1712
1721
|
try {
|
|
1713
1722
|
await this.preparation.make(l, e);
|
|
1714
1723
|
let { query: r, timeoutId: i } = await this.makeQuery(e, p);
|
|
1715
1724
|
i && clearTimeout(i);
|
|
1716
1725
|
let m = await this.preparation.makeEnd(u, r, e);
|
|
1717
|
-
if (
|
|
1718
|
-
var
|
|
1719
|
-
d && (
|
|
1726
|
+
if (h.setStatus(r.status, r.statusText), this.status.setStatus(r.status, r.statusText), !a && r.status >= 400) {
|
|
1727
|
+
var ne;
|
|
1728
|
+
d && (_ = await We.getItem(n, r)), this.makeErrorQuery((ne = _) == null ? r : ne);
|
|
1720
1729
|
}
|
|
1721
1730
|
if (m != null && m.reset && t < f || t < s) return await ee(this.getRetryDelay(t, c)), o || this.loading.hide(), await this.fetch(e, t + 1);
|
|
1722
|
-
|
|
1731
|
+
g = new Be(e, r, m, _), await g.init();
|
|
1723
1732
|
} catch (e) {
|
|
1724
|
-
throw a || this.makeError(e),
|
|
1733
|
+
throw a || this.makeError(e), h.setError(String(e)), this.status.setError(String(e)), o || this.loading.hide(), e;
|
|
1725
1734
|
}
|
|
1726
|
-
|
|
1727
|
-
let
|
|
1728
|
-
return o || this.loading.hide(), this.hydration.toClient(e,
|
|
1735
|
+
h.setLastResponse(g.getData()), this.status.setLastResponse(g.getData());
|
|
1736
|
+
let v = g.getAndStatus(h);
|
|
1737
|
+
return o || this.loading.hide(), this.hydration.toClient(e, v), await N.setByFetch(e, v), v;
|
|
1729
1738
|
}
|
|
1730
1739
|
async makeQuery(e, t) {
|
|
1731
|
-
let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i =
|
|
1740
|
+
let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i = P.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 = {
|
|
1732
1741
|
...s,
|
|
1733
1742
|
method: i,
|
|
1734
1743
|
body: this.getBody(n, i)
|
|
@@ -1822,12 +1831,12 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1822
1831
|
}, n);
|
|
1823
1832
|
}
|
|
1824
1833
|
}
|
|
1825
|
-
},
|
|
1834
|
+
}, F = class {
|
|
1826
1835
|
static isLocalhost() {
|
|
1827
1836
|
return this.getItem().isLocalhost();
|
|
1828
1837
|
}
|
|
1829
1838
|
static getItem() {
|
|
1830
|
-
return
|
|
1839
|
+
return E.get("__ui:api-instance__", () => new Qe());
|
|
1831
1840
|
}
|
|
1832
1841
|
static getStatus() {
|
|
1833
1842
|
return this.getItem().getStatus();
|
|
@@ -1847,10 +1856,10 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1847
1856
|
static getUrl(e, t = !0) {
|
|
1848
1857
|
return this.getItem().getUrl(e, t);
|
|
1849
1858
|
}
|
|
1850
|
-
static getBody(e = {}, t =
|
|
1859
|
+
static getBody(e = {}, t = P.get) {
|
|
1851
1860
|
return this.getItem().getBody(e, t);
|
|
1852
1861
|
}
|
|
1853
|
-
static getBodyForGet(e, t = "", n =
|
|
1862
|
+
static getBodyForGet(e, t = "", n = P.get) {
|
|
1854
1863
|
return this.getItem().getBodyForGet(e, t, n);
|
|
1855
1864
|
}
|
|
1856
1865
|
static setHeaders(e) {
|
|
@@ -1898,16 +1907,16 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1898
1907
|
static delete(e) {
|
|
1899
1908
|
return this.getItem().delete(e);
|
|
1900
1909
|
}
|
|
1901
|
-
},
|
|
1902
|
-
constructor(e, t, n, r =
|
|
1903
|
-
if (
|
|
1910
|
+
}, $e = class {
|
|
1911
|
+
constructor(e, t, n, r = w.getItem()) {
|
|
1912
|
+
if (C(this, "callback", void 0), C(this, "callbackError", void 0), C(this, "channel", void 0), C(this, "update", (e) => {
|
|
1904
1913
|
var t;
|
|
1905
1914
|
return (t = this.callback) == null || t.call(this, e), this;
|
|
1906
|
-
}),
|
|
1915
|
+
}), C(this, "updateError", (e) => {
|
|
1907
1916
|
var t;
|
|
1908
1917
|
return (t = this.callbackError) == null || t.call(this, e), this;
|
|
1909
1918
|
}), this.callback = t, this.callbackError = n, s()) try {
|
|
1910
|
-
this.channel = new BroadcastChannel(`${
|
|
1919
|
+
this.channel = new BroadcastChannel(`${et()}__${e}`), this.channel.onmessage = this.update, this.channel.onmessageerror = this.updateError;
|
|
1911
1920
|
} catch (e) {
|
|
1912
1921
|
r.on({
|
|
1913
1922
|
group: "broadcast",
|
|
@@ -1933,9 +1942,9 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1933
1942
|
var e;
|
|
1934
1943
|
return (e = this.channel) == null || e.close(), this.channel = void 0, this;
|
|
1935
1944
|
}
|
|
1936
|
-
},
|
|
1945
|
+
}, et = () => new D("__ui:broadcast-name__").get(() => `name_${f(1e6, 9999999)}`), tt = class {
|
|
1937
1946
|
constructor(e) {
|
|
1938
|
-
|
|
1947
|
+
C(this, "callback", void 0), C(this, "cache", void 0), C(this, "cacheOld", void 0), C(this, "comparisons", []), this.callback = e;
|
|
1939
1948
|
}
|
|
1940
1949
|
getCache(e) {
|
|
1941
1950
|
return this.isUpdate(e) && (this.cacheOld = this.cache, this.setCache()), this.cache;
|
|
@@ -1955,9 +1964,9 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1955
1964
|
isUpdate(e) {
|
|
1956
1965
|
return this.cache === void 0 || this.comparisons.length !== e.length || this.comparisons.findIndex((t, n) => t !== e[n]) >= 0 ? (this.comparisons = [...e], !0) : !1;
|
|
1957
1966
|
}
|
|
1958
|
-
},
|
|
1967
|
+
}, nt = class {
|
|
1959
1968
|
constructor() {
|
|
1960
|
-
|
|
1969
|
+
C(this, "cache", {});
|
|
1961
1970
|
}
|
|
1962
1971
|
get(e, t, n) {
|
|
1963
1972
|
return this.getCacheItem(e, t).getCache(n == null ? [] : n);
|
|
@@ -1966,11 +1975,11 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1966
1975
|
return await this.getCacheItem(e, t).getCacheAsync(n == null ? [] : n);
|
|
1967
1976
|
}
|
|
1968
1977
|
getCacheItem(e, t) {
|
|
1969
|
-
return e in this.cache || (this.cache[e] = new
|
|
1978
|
+
return e in this.cache || (this.cache[e] = new tt(t)), this.cache[e];
|
|
1970
1979
|
}
|
|
1971
|
-
},
|
|
1980
|
+
}, rt = class {
|
|
1972
1981
|
static getItem() {
|
|
1973
|
-
return
|
|
1982
|
+
return E.get("__ui:cache-static__", () => new nt());
|
|
1974
1983
|
}
|
|
1975
1984
|
static get(e, t, n) {
|
|
1976
1985
|
return this.getItem().get(e, t, n);
|
|
@@ -1981,41 +1990,41 @@ var Ye = "d-response-loading", Xe = class {
|
|
|
1981
1990
|
};
|
|
1982
1991
|
//#endregion
|
|
1983
1992
|
//#region src/functions/toDate.ts
|
|
1984
|
-
function
|
|
1993
|
+
function I(e) {
|
|
1985
1994
|
var t, n, r, i, a, o, s, l;
|
|
1986
1995
|
if (e instanceof Date) return e;
|
|
1987
1996
|
if (c(e)) return /* @__PURE__ */ new Date();
|
|
1988
1997
|
if (typeof e == "number") return new Date(e);
|
|
1989
|
-
let u = e, d =
|
|
1998
|
+
let u = e, d = k.getTimezoneFormat().trim();
|
|
1990
1999
|
e.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (e, t, n) => (u = t, d = n.trim(), e));
|
|
1991
2000
|
let f = (t = (n = (r = (i = (a = (o = (s = (l = /^\d{4}\d{2}\d{2}$/.exec(u) && `${u.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) == null ? /^\d{4}\d{2}$/.exec(u) && `${u.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00` : l) == null ? /^\d{4}\d{2}\d{2} \d{2}:\d{2}:\d{2}$/.exec(u) && u.replace(/^(\d{4})(\d{2})(\d{2}) (\d{2}):(\d{2}):(\d{2})$/, "$1-$2-$3T$4:$5:$6") : s) == null ? /^\d{4}-\d{2}-\d{2}$/.exec(u) && `${u}T00:00:00` : o) == null ? /^\d{4}-\d{2}$/.exec(u) && `${u}-01T00:00:00` : a) == null ? /^\d{4}$/.exec(u) && `${u}-01-01T00:00:00` : i) == null ? /^\d{2}:\d{2}$/.exec(u) && `2000-01-01T${u}:00` : r) == null ? /^\d{2}:\d{2}:\d{2}$/.exec(u) && `2000-01-01T${u}` : n) == null ? u.replace(" ", "T") : t;
|
|
1992
2001
|
return /* @__PURE__ */ new Date(`${f.trim()}${d}`);
|
|
1993
2002
|
}
|
|
1994
2003
|
//#endregion
|
|
1995
2004
|
//#region src/functions/getColumn.ts
|
|
1996
|
-
function
|
|
2005
|
+
function it(e, t) {
|
|
1997
2006
|
return r(e, (e) => e == null ? void 0 : e[t], !0);
|
|
1998
2007
|
}
|
|
1999
2008
|
//#endregion
|
|
2000
2009
|
//#region src/classes/GeoIntl.ts
|
|
2001
|
-
var
|
|
2002
|
-
static isItem(e =
|
|
2003
|
-
return this.getLocation(e) in
|
|
2010
|
+
var L = class e {
|
|
2011
|
+
static isItem(e = k.getLocation()) {
|
|
2012
|
+
return this.getLocation(e) in z;
|
|
2004
2013
|
}
|
|
2005
|
-
static getLocation(e =
|
|
2006
|
-
if (e in
|
|
2007
|
-
let t =
|
|
2008
|
-
return
|
|
2014
|
+
static getLocation(e = k.getLocation()) {
|
|
2015
|
+
if (e in R) return R[e];
|
|
2016
|
+
let t = k.find(e);
|
|
2017
|
+
return R[e] = t.standard, t.standard;
|
|
2009
2018
|
}
|
|
2010
|
-
static getInstance(t =
|
|
2019
|
+
static getInstance(t = k.getLocation()) {
|
|
2011
2020
|
let n = this.getLocation(t);
|
|
2012
|
-
return n in
|
|
2021
|
+
return n in z ? z[n] : new e(t);
|
|
2013
2022
|
}
|
|
2014
|
-
constructor(e =
|
|
2015
|
-
|
|
2023
|
+
constructor(e = k.getLocation(), t = w.getItem()) {
|
|
2024
|
+
C(this, "errorCenter", void 0), C(this, "geo", void 0), this.errorCenter = t, this.geo = k.find(e);
|
|
2016
2025
|
let n = this.getLocation();
|
|
2017
|
-
if (n in
|
|
2018
|
-
|
|
2026
|
+
if (n in z) return z[n];
|
|
2027
|
+
R[e] = n, z[n] = this;
|
|
2019
2028
|
}
|
|
2020
2029
|
getLocation() {
|
|
2021
2030
|
return this.geo.standard;
|
|
@@ -2046,7 +2055,7 @@ var R = class e {
|
|
|
2046
2055
|
type: "language",
|
|
2047
2056
|
style: t
|
|
2048
2057
|
};
|
|
2049
|
-
return this.display(
|
|
2058
|
+
return this.display(k.getByCode(e).language, n);
|
|
2050
2059
|
}
|
|
2051
2060
|
countryName(e, t) {
|
|
2052
2061
|
let n = {
|
|
@@ -2076,7 +2085,7 @@ var R = class e {
|
|
|
2076
2085
|
}
|
|
2077
2086
|
number(e, t) {
|
|
2078
2087
|
var n, r;
|
|
2079
|
-
return ((n = this.numberObject(t)) == null || (r = n.format) == null ? void 0 : r.call(n,
|
|
2088
|
+
return ((n = this.numberObject(t)) == null || (r = n.format) == null ? void 0 : r.call(n, y(e))) || e.toString();
|
|
2080
2089
|
}
|
|
2081
2090
|
decimal() {
|
|
2082
2091
|
var e, t, n;
|
|
@@ -2090,7 +2099,7 @@ var R = class e {
|
|
|
2090
2099
|
}, i = e.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...e) => (r.currency = String(e[2]).toUpperCase(), String(e[1])));
|
|
2091
2100
|
if (n) {
|
|
2092
2101
|
let t = this.numberObject(r);
|
|
2093
|
-
return t ?
|
|
2102
|
+
return t ? it(t.formatToParts(y(e)).filter((e) => ["literal", "currency"].indexOf(e.type) === -1), "value").join("") : e.toString();
|
|
2094
2103
|
} else if ("currency" in r) return this.number(typeof e == "number" ? e : i, r);
|
|
2095
2104
|
else return this.number(typeof e == "number" ? e : i, {
|
|
2096
2105
|
...r,
|
|
@@ -2113,7 +2122,7 @@ var R = class e {
|
|
|
2113
2122
|
return this.number(r, n);
|
|
2114
2123
|
}
|
|
2115
2124
|
sizeFile(e, t = "byte") {
|
|
2116
|
-
let n =
|
|
2125
|
+
let n = y(e);
|
|
2117
2126
|
if (n > 1024 && d(t)) switch (t) {
|
|
2118
2127
|
case "byte": return this.sizeFile(n / 1024, "kilobyte");
|
|
2119
2128
|
case "kilobyte": return this.sizeFile(n / 1024, "megabyte");
|
|
@@ -2130,11 +2139,11 @@ var R = class e {
|
|
|
2130
2139
|
});
|
|
2131
2140
|
}
|
|
2132
2141
|
percentBy100(e, t) {
|
|
2133
|
-
return this.percent(
|
|
2142
|
+
return this.percent(y(e) / 100, t);
|
|
2134
2143
|
}
|
|
2135
2144
|
plural(e, t, n, r) {
|
|
2136
2145
|
var i;
|
|
2137
|
-
let a =
|
|
2146
|
+
let a = y(e), o = t.split("|");
|
|
2138
2147
|
if (o.length > 1) try {
|
|
2139
2148
|
if (typeof Intl < "u") {
|
|
2140
2149
|
var s;
|
|
@@ -2171,18 +2180,18 @@ var R = class e {
|
|
|
2171
2180
|
return `${this.number(a, r)} ${(i = o == null ? void 0 : o[0]) == null ? "" : i}`.trim();
|
|
2172
2181
|
}
|
|
2173
2182
|
date(e, t, n, r) {
|
|
2174
|
-
let i =
|
|
2183
|
+
let i = I(e), a = typeof n == "string", o = this.dateOptions(t, a ? n : "short");
|
|
2175
2184
|
return r && (o.hour12 = !1), a || Object.assign(o, n), i.toLocaleString(this.getLocation(), o);
|
|
2176
2185
|
}
|
|
2177
2186
|
relative(e, t, n) {
|
|
2178
|
-
let r =
|
|
2187
|
+
let r = I(e), i = n || /* @__PURE__ */ new Date(), a = {
|
|
2179
2188
|
numeric: "auto",
|
|
2180
2189
|
...typeof t == "string" ? { style: t } : t || {}
|
|
2181
2190
|
}, o = "second", s = (r.getTime() - i.getTime()) / 1e3;
|
|
2182
2191
|
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);
|
|
2183
2192
|
}
|
|
2184
2193
|
relativeLimit(e, t, n, r, i, a, o) {
|
|
2185
|
-
let s =
|
|
2194
|
+
let s = I(e), c = n || /* @__PURE__ */ new Date(), l = new Date(c), u = new Date(c);
|
|
2186
2195
|
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);
|
|
2187
2196
|
}
|
|
2188
2197
|
relativeByValue(e, t, n) {
|
|
@@ -2191,7 +2200,7 @@ var R = class e {
|
|
|
2191
2200
|
...typeof n == "string" ? { style: n } : n || {}
|
|
2192
2201
|
};
|
|
2193
2202
|
try {
|
|
2194
|
-
if (this.hasIntl() && Intl.RelativeTimeFormat !== void 0) return new Intl.RelativeTimeFormat(this.getLocation(), r).format(Math.round(
|
|
2203
|
+
if (this.hasIntl() && Intl.RelativeTimeFormat !== void 0) return new Intl.RelativeTimeFormat(this.getLocation(), r).format(Math.round(y(e)), t);
|
|
2195
2204
|
} catch (e) {
|
|
2196
2205
|
this.errorCenter.on({
|
|
2197
2206
|
group: "intl",
|
|
@@ -2203,7 +2212,7 @@ var R = class e {
|
|
|
2203
2212
|
}
|
|
2204
2213
|
month(e, t) {
|
|
2205
2214
|
try {
|
|
2206
|
-
if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(
|
|
2215
|
+
if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(I(e));
|
|
2207
2216
|
} catch (e) {
|
|
2208
2217
|
this.errorCenter.on({
|
|
2209
2218
|
group: "intl",
|
|
@@ -2237,7 +2246,7 @@ var R = class e {
|
|
|
2237
2246
|
}
|
|
2238
2247
|
weekday(e, t) {
|
|
2239
2248
|
try {
|
|
2240
|
-
if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(
|
|
2249
|
+
if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(I(e));
|
|
2241
2250
|
} catch (e) {
|
|
2242
2251
|
this.errorCenter.on({
|
|
2243
2252
|
group: "intl",
|
|
@@ -2339,15 +2348,15 @@ var R = class e {
|
|
|
2339
2348
|
"second"
|
|
2340
2349
|
].indexOf(e) !== -1 && (n.second = "2-digit")), n;
|
|
2341
2350
|
}
|
|
2342
|
-
},
|
|
2343
|
-
constructor(e, t = "date", n =
|
|
2344
|
-
|
|
2351
|
+
}, R = {}, z = {}, at = class e {
|
|
2352
|
+
constructor(e, t = "date", n = k.getLocation()) {
|
|
2353
|
+
C(this, "type", void 0), C(this, "code", void 0), C(this, "date", void 0), C(this, "hour24", !1), C(this, "watch", void 0), this.type = t, this.code = n, this.date = I(e), isNaN(this.date.getTime()) && w.on({
|
|
2345
2354
|
group: "intl",
|
|
2346
2355
|
code: "invalid"
|
|
2347
2356
|
});
|
|
2348
2357
|
}
|
|
2349
2358
|
getIntl() {
|
|
2350
|
-
return
|
|
2359
|
+
return L.getInstance(this.code);
|
|
2351
2360
|
}
|
|
2352
2361
|
getDate() {
|
|
2353
2362
|
return this.date;
|
|
@@ -2450,7 +2459,7 @@ var R = class e {
|
|
|
2450
2459
|
].indexOf(this.type) !== -1 && (i = n.locale("time"))), `${r.join("-")}${i ? `T${i}${t ? n.getTimeZone() : ""}` : ""}`;
|
|
2451
2460
|
}
|
|
2452
2461
|
setDate(e) {
|
|
2453
|
-
return this.date =
|
|
2462
|
+
return this.date = I(e), this.update(), this;
|
|
2454
2463
|
}
|
|
2455
2464
|
setType(e) {
|
|
2456
2465
|
return this.type = e, this.update(), this;
|
|
@@ -2602,24 +2611,24 @@ var R = class e {
|
|
|
2602
2611
|
};
|
|
2603
2612
|
//#endregion
|
|
2604
2613
|
//#region src/functions/getItemByPath.ts
|
|
2605
|
-
function
|
|
2614
|
+
function B(e, n) {
|
|
2606
2615
|
var r;
|
|
2607
2616
|
if (!l(n, !0)) return;
|
|
2608
|
-
let i =
|
|
2609
|
-
return a && e != null && e[a] && t(e[a]) && i != null && i[1] ?
|
|
2617
|
+
let i = se(n, ".", 2), a = i[0];
|
|
2618
|
+
return a && e != null && e[a] && t(e[a]) && i != null && i[1] ? B(e[a], i[1]) : (r = e == null ? void 0 : e[a]) == null ? void 0 : r;
|
|
2610
2619
|
}
|
|
2611
2620
|
//#endregion
|
|
2612
2621
|
//#region src/functions/toCamelCase.ts
|
|
2613
|
-
function
|
|
2622
|
+
function ot(e) {
|
|
2614
2623
|
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()}`);
|
|
2615
2624
|
}
|
|
2616
2625
|
//#endregion
|
|
2617
2626
|
//#region src/types/formattersTypes.ts
|
|
2618
|
-
var
|
|
2627
|
+
var V = /* @__PURE__ */ function(e) {
|
|
2619
2628
|
return e.currency = "currency", e.date = "date", e.name = "name", e.number = "number", e.plural = "plural", e.unit = "unit", e;
|
|
2620
|
-
}({}),
|
|
2629
|
+
}({}), st = class {
|
|
2621
2630
|
constructor(e, t) {
|
|
2622
|
-
|
|
2631
|
+
C(this, "options", void 0), C(this, "list", void 0), this.options = e, this.list = t;
|
|
2623
2632
|
}
|
|
2624
2633
|
is() {
|
|
2625
2634
|
return !!this.list;
|
|
@@ -2631,7 +2640,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2631
2640
|
return this.list ? this.isArray() ? this.list.length : 1 : 0;
|
|
2632
2641
|
}
|
|
2633
2642
|
getList() {
|
|
2634
|
-
return this.list ?
|
|
2643
|
+
return this.list ? j(this.list) : [];
|
|
2635
2644
|
}
|
|
2636
2645
|
getOptions() {
|
|
2637
2646
|
return this.options;
|
|
@@ -2649,50 +2658,50 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2649
2658
|
getFormatData(e) {
|
|
2650
2659
|
let t = {};
|
|
2651
2660
|
return r(this.options, (n, r) => {
|
|
2652
|
-
let i = `${
|
|
2661
|
+
let i = `${ot(r)}Format`, a = B(e, r);
|
|
2653
2662
|
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);
|
|
2654
2663
|
}), t;
|
|
2655
2664
|
}
|
|
2656
2665
|
transformation(e, t, n, r) {
|
|
2657
|
-
if (l(e) || n ===
|
|
2658
|
-
case
|
|
2659
|
-
case
|
|
2660
|
-
case
|
|
2661
|
-
case
|
|
2662
|
-
case
|
|
2663
|
-
case
|
|
2666
|
+
if (l(e) || n === V.name) switch (n) {
|
|
2667
|
+
case V.currency: return this.formatCurrency(e, t, r);
|
|
2668
|
+
case V.date: return this.formatDate(e, r);
|
|
2669
|
+
case V.name: return this.formatName(t, r);
|
|
2670
|
+
case V.number: return this.formatNumber(e, r);
|
|
2671
|
+
case V.plural: return this.formatPlural(e, r);
|
|
2672
|
+
case V.unit: return this.formatUnit(e, r);
|
|
2664
2673
|
default: return String(e);
|
|
2665
2674
|
}
|
|
2666
2675
|
return "";
|
|
2667
2676
|
}
|
|
2668
2677
|
formatCurrency(e, t, n) {
|
|
2669
2678
|
var r;
|
|
2670
|
-
let i = n != null && n.currencyPropName ?
|
|
2671
|
-
return
|
|
2679
|
+
let i = n != null && n.currencyPropName ? B(t, n.currencyPropName) : t == null ? void 0 : t.currency;
|
|
2680
|
+
return L.getInstance().currency(e, (r = n == null ? void 0 : n.options) == null ? i : r, n == null ? void 0 : n.numberOnly);
|
|
2672
2681
|
}
|
|
2673
2682
|
formatDate(e, t) {
|
|
2674
|
-
return
|
|
2683
|
+
return L.getInstance().date(e, t == null ? void 0 : t.type, t == null ? void 0 : t.options, t == null ? void 0 : t.hour24);
|
|
2675
2684
|
}
|
|
2676
2685
|
formatName(e, t) {
|
|
2677
2686
|
var n, r, i;
|
|
2678
|
-
let a =
|
|
2679
|
-
return a && o ?
|
|
2687
|
+
let a = B(e, (n = t == null ? void 0 : t.lastPropName) == null ? "lastName" : n), o = B(e, (r = t == null ? void 0 : t.firstPropName) == null ? "firstName" : r), s = B(e, (i = t == null ? void 0 : t.surname) == null ? "surname" : i);
|
|
2688
|
+
return a && o ? L.getInstance().fullName(a, o, s, t == null ? void 0 : t.short) : "";
|
|
2680
2689
|
}
|
|
2681
2690
|
formatNumber(e, t) {
|
|
2682
|
-
return
|
|
2691
|
+
return L.getInstance().number(e, t == null ? void 0 : t.options);
|
|
2683
2692
|
}
|
|
2684
2693
|
formatPlural(e, t) {
|
|
2685
|
-
return t && t.words ?
|
|
2694
|
+
return t && t.words ? L.getInstance().plural(e, t == null ? void 0 : t.words, t == null ? void 0 : t.options, t == null ? void 0 : t.optionsNumber) : e;
|
|
2686
2695
|
}
|
|
2687
2696
|
formatUnit(e, t) {
|
|
2688
|
-
return t && t.unit ?
|
|
2697
|
+
return t && t.unit ? L.getInstance().unit(e, t.unit) : e;
|
|
2689
2698
|
}
|
|
2690
|
-
},
|
|
2691
|
-
constructor(e =
|
|
2692
|
-
|
|
2699
|
+
}, ct = "f", lt = class e {
|
|
2700
|
+
constructor(e = k.getLocation()) {
|
|
2701
|
+
C(this, "code", void 0), this.code = e;
|
|
2693
2702
|
}
|
|
2694
2703
|
get(t = this.getCode()) {
|
|
2695
|
-
let n =
|
|
2704
|
+
let n = k.find(t);
|
|
2696
2705
|
if (n) {
|
|
2697
2706
|
var r;
|
|
2698
2707
|
let t = this.getCountry(n);
|
|
@@ -2718,7 +2727,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2718
2727
|
};
|
|
2719
2728
|
}
|
|
2720
2729
|
getCode() {
|
|
2721
|
-
return this.code ||
|
|
2730
|
+
return this.code || k.getLocation();
|
|
2722
2731
|
}
|
|
2723
2732
|
getFlag(e = this.getCode()) {
|
|
2724
2733
|
var t;
|
|
@@ -2726,14 +2735,14 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2726
2735
|
}
|
|
2727
2736
|
getList(e, t = !0) {
|
|
2728
2737
|
let n = r(this.getCodes(e), (e) => this.get(e));
|
|
2729
|
-
return t ? new
|
|
2738
|
+
return t ? new L().sort(n, (e, t) => [e.label, t.label]) : n;
|
|
2730
2739
|
}
|
|
2731
2740
|
getListLanguage(e, t = !0) {
|
|
2732
2741
|
let n = [], i = /* @__PURE__ */ new Set();
|
|
2733
2742
|
return r(this.getCodes(e), (e) => {
|
|
2734
2743
|
let t = this.getLanguage(e);
|
|
2735
2744
|
t && !i.has(t.value) && (n.push(t), i.add(t.value));
|
|
2736
|
-
}), t ? new
|
|
2745
|
+
}), t ? new L().sort(n, (e, t) => [e.label, t.label]) : n;
|
|
2737
2746
|
}
|
|
2738
2747
|
getNational(t, n = !0) {
|
|
2739
2748
|
let i = r(this.getList(t, !1), (t) => {
|
|
@@ -2745,7 +2754,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2745
2754
|
nationalCountry: n == null ? void 0 : n.country
|
|
2746
2755
|
};
|
|
2747
2756
|
});
|
|
2748
|
-
return n ? new
|
|
2757
|
+
return n ? new L().sort(i, (e, t) => [e.label, t.label]) : i;
|
|
2749
2758
|
}
|
|
2750
2759
|
getNationalLanguage(t, n = !0) {
|
|
2751
2760
|
let i = r(this.getListLanguage(t, !1), (t) => {
|
|
@@ -2757,13 +2766,13 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2757
2766
|
nationalCountry: n == null ? void 0 : n.country
|
|
2758
2767
|
};
|
|
2759
2768
|
});
|
|
2760
|
-
return n ? new
|
|
2769
|
+
return n ? new L().sort(i, (e, t) => [e.label, t.label]) : i;
|
|
2761
2770
|
}
|
|
2762
2771
|
setCode(e) {
|
|
2763
2772
|
return this.code = e, this;
|
|
2764
2773
|
}
|
|
2765
2774
|
getLocation() {
|
|
2766
|
-
return new
|
|
2775
|
+
return new L(this.code);
|
|
2767
2776
|
}
|
|
2768
2777
|
getCodes(t) {
|
|
2769
2778
|
return t == null ? Object.keys(e.flags) : t;
|
|
@@ -2775,7 +2784,7 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
2775
2784
|
return this.getLocation().countryName(e.country);
|
|
2776
2785
|
}
|
|
2777
2786
|
};
|
|
2778
|
-
|
|
2787
|
+
C(lt, "flags", {
|
|
2779
2788
|
RU: "f-ru",
|
|
2780
2789
|
FR: "f-fr",
|
|
2781
2790
|
GB: "f-gb",
|
|
@@ -3019,7 +3028,7 @@ w(ct, "flags", {
|
|
|
3019
3028
|
});
|
|
3020
3029
|
//#endregion
|
|
3021
3030
|
//#region src/classes/GeoPhone.ts
|
|
3022
|
-
var
|
|
3031
|
+
var ut = class {
|
|
3023
3032
|
static get(e) {
|
|
3024
3033
|
return this.getList().find((t) => e === t.value);
|
|
3025
3034
|
}
|
|
@@ -3075,11 +3084,11 @@ var lt = class {
|
|
|
3075
3084
|
return (t = (n = e.match(/\*/g)) == null ? void 0 : n.length) == null ? 0 : t;
|
|
3076
3085
|
}
|
|
3077
3086
|
static makeList() {
|
|
3078
|
-
let e = r(
|
|
3087
|
+
let e = r(k.getList(), (e) => {
|
|
3079
3088
|
if (e != null && e.phoneMask) return {
|
|
3080
3089
|
phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/g, "")) || void 0,
|
|
3081
3090
|
within: (e == null ? void 0 : e.phoneWithin) || 0,
|
|
3082
|
-
mask:
|
|
3091
|
+
mask: j(e.phoneMask),
|
|
3083
3092
|
value: e.country
|
|
3084
3093
|
};
|
|
3085
3094
|
});
|
|
@@ -3118,12 +3127,121 @@ var lt = class {
|
|
|
3118
3127
|
return e.replace(/\*/, this.getWithinSymbol(t));
|
|
3119
3128
|
}
|
|
3120
3129
|
};
|
|
3121
|
-
|
|
3122
|
-
//#endregion
|
|
3123
|
-
//#region src/classes/
|
|
3124
|
-
var
|
|
3130
|
+
C(ut, "list", void 0), C(ut, "map", void 0);
|
|
3131
|
+
//#endregion
|
|
3132
|
+
//#region src/classes/GeoUnit.ts
|
|
3133
|
+
var H = {}, dt = {
|
|
3134
|
+
"millimeter->inch": .03937007874,
|
|
3135
|
+
"centimeter->inch": .3937007874,
|
|
3136
|
+
"meter->foot": 3.280839895,
|
|
3137
|
+
"kilometer->mile": .621371192,
|
|
3138
|
+
"square-meter->square-foot": 10.763910417,
|
|
3139
|
+
"hectare->acre": 2.4710538147,
|
|
3140
|
+
"gram->ounce": .03527396195,
|
|
3141
|
+
"kilogram->pound": 2.2046226218,
|
|
3142
|
+
"tonne->ton": 1.1023113109,
|
|
3143
|
+
"milliliter->fluid-ounce": .0338140227,
|
|
3144
|
+
"liter->gallon": .2641720524,
|
|
3145
|
+
"kilometer-per-hour->mile-per-hour": .621371192
|
|
3146
|
+
}, ft = class e {
|
|
3147
|
+
static getInstance(t = k.getLocation()) {
|
|
3148
|
+
let n = k.find(t).standard;
|
|
3149
|
+
return n in H ? H[n] : new e(t);
|
|
3150
|
+
}
|
|
3151
|
+
constructor(e = k.getLocation()) {
|
|
3152
|
+
C(this, "geo", void 0), this.geo = k.find(e);
|
|
3153
|
+
let t = this.getLocation();
|
|
3154
|
+
if (t in H) return H[t];
|
|
3155
|
+
H[t] = this;
|
|
3156
|
+
}
|
|
3157
|
+
getLocation() {
|
|
3158
|
+
return this.geo.standard;
|
|
3159
|
+
}
|
|
3160
|
+
millimeter(e, t) {
|
|
3161
|
+
return this.formatUnit(e, "millimeter", t);
|
|
3162
|
+
}
|
|
3163
|
+
centimeter(e, t) {
|
|
3164
|
+
return this.formatUnit(e, "centimeter", t);
|
|
3165
|
+
}
|
|
3166
|
+
meter(e, t) {
|
|
3167
|
+
return this.formatUnit(e, "meter", t);
|
|
3168
|
+
}
|
|
3169
|
+
kilometer(e, t) {
|
|
3170
|
+
return this.formatUnit(e, "kilometer", t);
|
|
3171
|
+
}
|
|
3172
|
+
squareMeter(e, t) {
|
|
3173
|
+
return this.formatUnit(e, "square-meter", t);
|
|
3174
|
+
}
|
|
3175
|
+
hectare(e, t) {
|
|
3176
|
+
return this.formatUnit(e, "hectare", t);
|
|
3177
|
+
}
|
|
3178
|
+
gram(e, t) {
|
|
3179
|
+
return this.formatUnit(e, "gram", t);
|
|
3180
|
+
}
|
|
3181
|
+
kilogram(e, t) {
|
|
3182
|
+
return this.formatUnit(e, "kilogram", t);
|
|
3183
|
+
}
|
|
3184
|
+
tonne(e, t) {
|
|
3185
|
+
return this.formatUnit(e, "tonne", t);
|
|
3186
|
+
}
|
|
3187
|
+
milliliter(e, t) {
|
|
3188
|
+
return this.formatUnit(e, "milliliter", t);
|
|
3189
|
+
}
|
|
3190
|
+
liter(e, t) {
|
|
3191
|
+
return this.formatUnit(e, "liter", t);
|
|
3192
|
+
}
|
|
3193
|
+
celsius(e, t) {
|
|
3194
|
+
return this.formatUnit(e, "celsius", t);
|
|
3195
|
+
}
|
|
3196
|
+
kilometerPerHour(e, t) {
|
|
3197
|
+
return this.formatUnit(e, "kilometer-per-hour", t);
|
|
3198
|
+
}
|
|
3199
|
+
format(e, t, n) {
|
|
3200
|
+
switch (t) {
|
|
3201
|
+
case "millimeter": return this.millimeter(e, n);
|
|
3202
|
+
case "centimeter": return this.centimeter(e, n);
|
|
3203
|
+
case "meter": return this.meter(e, n);
|
|
3204
|
+
case "kilometer": return this.kilometer(e, n);
|
|
3205
|
+
case "square-meter": return this.squareMeter(e, n);
|
|
3206
|
+
case "hectare": return this.hectare(e, n);
|
|
3207
|
+
case "gram": return this.gram(e, n);
|
|
3208
|
+
case "kilogram": return this.kilogram(e, n);
|
|
3209
|
+
case "tonne": return this.tonne(e, n);
|
|
3210
|
+
case "milliliter": return this.milliliter(e, n);
|
|
3211
|
+
case "liter": return this.liter(e, n);
|
|
3212
|
+
case "celsius": return this.celsius(e, n);
|
|
3213
|
+
case "kilometer-per-hour": return this.kilometerPerHour(e, n);
|
|
3214
|
+
}
|
|
3215
|
+
return e.toString();
|
|
3216
|
+
}
|
|
3217
|
+
isCelsiusToFahrenheit(e, t) {
|
|
3218
|
+
return e === "celsius" && t === "fahrenheit";
|
|
3219
|
+
}
|
|
3220
|
+
getTargetUnit(e) {
|
|
3221
|
+
var t;
|
|
3222
|
+
return ((t = this.geo.unit) == null ? void 0 : t[e]) || e;
|
|
3223
|
+
}
|
|
3224
|
+
formatUnit(e, t, n) {
|
|
3225
|
+
let r = y(e), i = this.getTargetUnit(t), a = this.convert(r, t, i);
|
|
3226
|
+
return L.getInstance(this.getLocation()).unit(a, {
|
|
3227
|
+
unit: i,
|
|
3228
|
+
...n
|
|
3229
|
+
});
|
|
3230
|
+
}
|
|
3231
|
+
convert(e, t, n) {
|
|
3232
|
+
if (t !== n) {
|
|
3233
|
+
if (this.isCelsiusToFahrenheit(t, n)) return this.celsiusToFahrenheit(e);
|
|
3234
|
+
let r = `${t}->${n}`;
|
|
3235
|
+
if (r in dt) return e * dt[r];
|
|
3236
|
+
}
|
|
3237
|
+
return e;
|
|
3238
|
+
}
|
|
3239
|
+
celsiusToFahrenheit(e) {
|
|
3240
|
+
return e * 1.8 + 32;
|
|
3241
|
+
}
|
|
3242
|
+
}, pt = class {
|
|
3125
3243
|
static getItem() {
|
|
3126
|
-
return
|
|
3244
|
+
return E.get("__ui:global-instance__", () => ({}));
|
|
3127
3245
|
}
|
|
3128
3246
|
static get(e) {
|
|
3129
3247
|
var t;
|
|
@@ -3133,9 +3251,9 @@ var ut = class {
|
|
|
3133
3251
|
let t = this.getItem();
|
|
3134
3252
|
Object.keys(t).length > 0 || Object.assign(t, e);
|
|
3135
3253
|
}
|
|
3136
|
-
},
|
|
3254
|
+
}, mt = class {
|
|
3137
3255
|
constructor() {
|
|
3138
|
-
|
|
3256
|
+
C(this, "data", void 0), C(this, "watch", {}), C(this, "block", !1), C(this, "time", void 0);
|
|
3139
3257
|
}
|
|
3140
3258
|
get(e, t) {
|
|
3141
3259
|
let n = this.getData();
|
|
@@ -3174,7 +3292,7 @@ var ut = class {
|
|
|
3174
3292
|
((r = this.data) == null ? void 0 : r[n]) !== (e == null ? void 0 : e[n]) && t.forEach((t) => t(e[n]));
|
|
3175
3293
|
}), this;
|
|
3176
3294
|
}
|
|
3177
|
-
},
|
|
3295
|
+
}, ht = class extends mt {
|
|
3178
3296
|
init() {
|
|
3179
3297
|
return this.initData(), s() && addEventListener("hashchange", () => this.reload()), this;
|
|
3180
3298
|
}
|
|
@@ -3182,7 +3300,7 @@ var ut = class {
|
|
|
3182
3300
|
let e = {};
|
|
3183
3301
|
if (s()) {
|
|
3184
3302
|
let t = location.hash.matchAll(/([\w-]+)[:=]([^;]+)/gi);
|
|
3185
|
-
for (let n of t) e[n[1]] =
|
|
3303
|
+
for (let n of t) e[n[1]] = T(n[2]);
|
|
3186
3304
|
}
|
|
3187
3305
|
return e;
|
|
3188
3306
|
}
|
|
@@ -3200,9 +3318,9 @@ var ut = class {
|
|
|
3200
3318
|
}
|
|
3201
3319
|
return this;
|
|
3202
3320
|
}
|
|
3203
|
-
},
|
|
3321
|
+
}, gt = class {
|
|
3204
3322
|
static getItem() {
|
|
3205
|
-
return
|
|
3323
|
+
return E.get("__ui:hash-instance__", () => new ht());
|
|
3206
3324
|
}
|
|
3207
3325
|
static get(e, t) {
|
|
3208
3326
|
return this.getItem().get(e, t);
|
|
@@ -3219,29 +3337,29 @@ var ut = class {
|
|
|
3219
3337
|
static reload() {
|
|
3220
3338
|
this.getItem().reload();
|
|
3221
3339
|
}
|
|
3222
|
-
},
|
|
3340
|
+
}, _t = 320, vt = "--LOAD--", yt = class {
|
|
3223
3341
|
static is(e) {
|
|
3224
3342
|
return e in this.icons || this.getName(e) in this.icons;
|
|
3225
3343
|
}
|
|
3226
3344
|
static async get(e, t = "", n = 1e3 * 60 * 3) {
|
|
3227
3345
|
let r = this.getRaw(e, t);
|
|
3228
|
-
return typeof r == "string" ? r ===
|
|
3346
|
+
return typeof r == "string" ? r === vt && n > 0 ? (await this.wait(), this.get(e, t, n - _t)) : r : p(r) ? await r() : await r;
|
|
3229
3347
|
}
|
|
3230
3348
|
static getAsync(e, t = "") {
|
|
3231
3349
|
let n = this.getRaw(e, t);
|
|
3232
|
-
return typeof n == "string" && n !==
|
|
3350
|
+
return typeof n == "string" && n !== vt ? n : "";
|
|
3233
3351
|
}
|
|
3234
3352
|
static getNameList() {
|
|
3235
3353
|
return r(this.icons, (e, t) => t.replace(/^@/, ""));
|
|
3236
3354
|
}
|
|
3237
3355
|
static getUrlGlobal() {
|
|
3238
|
-
return `${
|
|
3356
|
+
return `${F.isLocalhost(), ""}${this.url}`;
|
|
3239
3357
|
}
|
|
3240
3358
|
static add(e, t) {
|
|
3241
3359
|
this.icons[this.getName(e)] = t;
|
|
3242
3360
|
}
|
|
3243
3361
|
static addLoad(e) {
|
|
3244
|
-
this.icons[this.getName(e)] =
|
|
3362
|
+
this.icons[this.getName(e)] = vt;
|
|
3245
3363
|
}
|
|
3246
3364
|
static addGlobal(e, t) {
|
|
3247
3365
|
this.icons[this.getName(e)] = `${this.getUrlGlobal()}${t}`;
|
|
@@ -3263,22 +3381,22 @@ var ut = class {
|
|
|
3263
3381
|
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;
|
|
3264
3382
|
}
|
|
3265
3383
|
static wait() {
|
|
3266
|
-
return new Promise((e) => setTimeout(() => e(),
|
|
3384
|
+
return new Promise((e) => setTimeout(() => e(), _t));
|
|
3267
3385
|
}
|
|
3268
3386
|
};
|
|
3269
|
-
|
|
3387
|
+
C(yt, "icons", {}), C(yt, "url", "/icons/");
|
|
3270
3388
|
//#endregion
|
|
3271
3389
|
//#region src/functions/getElementItem.ts
|
|
3272
|
-
function
|
|
3390
|
+
function bt(e, t, n) {
|
|
3273
3391
|
var r, i;
|
|
3274
|
-
return (r = (i =
|
|
3392
|
+
return (r = (i = A(e)) == null ? void 0 : i[t]) == null ? n : r;
|
|
3275
3393
|
}
|
|
3276
3394
|
//#endregion
|
|
3277
3395
|
//#region src/functions/setElementItem.ts
|
|
3278
|
-
function
|
|
3279
|
-
let a =
|
|
3396
|
+
function xt(e, n, i) {
|
|
3397
|
+
let a = A(e);
|
|
3280
3398
|
if (a) {
|
|
3281
|
-
let e =
|
|
3399
|
+
let e = bt(a, n);
|
|
3282
3400
|
if (t(e) && t(i)) r(i, (t, n) => {
|
|
3283
3401
|
e[n] = m(t);
|
|
3284
3402
|
});
|
|
@@ -3295,12 +3413,12 @@ function U(e, t = "div", i, a) {
|
|
|
3295
3413
|
if (!s()) return;
|
|
3296
3414
|
let o = document.createElement(t);
|
|
3297
3415
|
return typeof i == "function" ? i(o) : n(i) && r(i, (e, t) => {
|
|
3298
|
-
|
|
3416
|
+
xt(o, t, e);
|
|
3299
3417
|
}), e == null || e.insertBefore(o, a == null ? null : a), o;
|
|
3300
3418
|
}
|
|
3301
3419
|
//#endregion
|
|
3302
3420
|
//#region src/functions/encodeAttribute.ts
|
|
3303
|
-
var
|
|
3421
|
+
var St = {
|
|
3304
3422
|
"&": "&",
|
|
3305
3423
|
"<": "<",
|
|
3306
3424
|
">": ">",
|
|
@@ -3310,14 +3428,14 @@ var yt = {
|
|
|
3310
3428
|
function W(e) {
|
|
3311
3429
|
return String(e).replace(/[&<>"']/g, (e) => {
|
|
3312
3430
|
var t;
|
|
3313
|
-
return (t =
|
|
3431
|
+
return (t = St == null ? void 0 : St[e]) == null ? e : t;
|
|
3314
3432
|
});
|
|
3315
3433
|
}
|
|
3316
3434
|
//#endregion
|
|
3317
3435
|
//#region src/classes/MetaManager.ts
|
|
3318
3436
|
var G = class {
|
|
3319
3437
|
constructor(e, t = !1) {
|
|
3320
|
-
|
|
3438
|
+
C(this, "listMeta", void 0), C(this, "isProperty", void 0), C(this, "items", {}), this.listMeta = e, this.isProperty = t, this.update();
|
|
3321
3439
|
}
|
|
3322
3440
|
getListMeta() {
|
|
3323
3441
|
return this.listMeta;
|
|
@@ -3367,7 +3485,7 @@ var G = class {
|
|
|
3367
3485
|
return r ? `<meta ${this.getAttributeName()}="${e}" content="${r}">` : "";
|
|
3368
3486
|
}
|
|
3369
3487
|
toHtmlTitle(e) {
|
|
3370
|
-
return
|
|
3488
|
+
return me(e);
|
|
3371
3489
|
}
|
|
3372
3490
|
update() {
|
|
3373
3491
|
return this.listMeta.forEach((e) => {
|
|
@@ -3377,25 +3495,25 @@ var G = class {
|
|
|
3377
3495
|
}
|
|
3378
3496
|
}, K = /* @__PURE__ */ function(e) {
|
|
3379
3497
|
return e.title = "title", e.description = "description", e.keywords = "keywords", e.canonical = "canonical", e.robots = "robots", e.author = "author", e;
|
|
3380
|
-
}({}),
|
|
3498
|
+
}({}), Ct = /* @__PURE__ */ function(e) {
|
|
3381
3499
|
return e.indexFollow = "index, follow", e.noIndexFollow = "noindex, follow", e.indexNoFollow = "index, nofollow", e.noIndexNoFollow = "noindex, nofollow", e.noArchive = "noarchive", e.noSnippet = "nosnippet", e.noImageIndex = "noimageindex", e.images = "images", e.noTranslate = "notranslate", e.noPreview = "nopreview", e.textOnly = "textonly", e.noIndexSubpages = "noindex, noarchive", e.none = "none", e;
|
|
3382
3500
|
}({}), q = /* @__PURE__ */ function(e) {
|
|
3383
3501
|
return e.title = "og:title", e.type = "og:type", e.url = "og:url", e.image = "og:image", e.description = "og:description", e.locale = "og:locale", e.siteName = "og:site_name", e.localeAlternate = "og:locale:alternate", e.imageUrl = "og:image:url", e.imageSecureUrl = "og:image:secure_url", e.imageType = "og:image:type", e.imageWidth = "og:image:width", e.imageHeight = "og:image:height", e.imageAlt = "og:image:alt", e.video = "og:video", e.videoUrl = "og:video:url", e.videoSecureUrl = "og:video:secure_url", e.videoType = "og:video:type", e.videoWidth = "og:video:width", e.videoHeight = "og:video:height", e.audio = "og:audio", e.audioSecureUrl = "og:audio:secure_url", e.audioType = "og:audio:type", e.articlePublishedTime = "article:published_time", e.articleModifiedTime = "article:modified_time", e.articleExpirationTime = "article:expiration_time", e.articleAuthor = "article:author", e.articleSection = "article:section", e.articleTag = "article:tag", e.bookAuthor = "book:author", e.bookIsbn = "book:isbn", e.bookReleaseDate = "book:release_date", e.bookTag = "book:tag", e.musicDuration = "music:duration", e.musicAlbum = "music:album", e.musicAlbumDisc = "music:album:disc", e.musicAlbumTrack = "music:album:track", e.musicMusician = "music:musician", e.musicSong = "music:song", e.musicSongDisc = "music:song:disc", e.musicSongTrack = "music:song:track", e.musicReleaseDate = "music:release_date", e.musicCreator = "music:creator", e.videoActor = "video:actor", e.videoActorRole = "video:actor:role", e.videoDirector = "video:director", e.videoWriter = "video:writer", e.videoDuration = "video:duration", e.videoReleaseDate = "video:release_date", e.videoTag = "video:tag", e.videoSeries = "video:series", e.profileFirstName = "profile:first_name", e.profileLastName = "profile:last_name", e.profileUsername = "profile:username", e.profileGender = "profile:gender", e.productBrand = "product:brand", e.productAvailability = "product:availability", e.productCondition = "product:condition", e.productPriceAmount = "product:price:amount", e.productPriceCurrency = "product:price:currency", e.productRetailerItemId = "product:retailer_item_id", e.productCategory = "product:category", e.productEan = "product:ean", e.productIsbn = "product:isbn", e.productMfrPartNo = "product:mfr_part_no", e.productUpc = "product:upc", e.productWeightValue = "product:weight:value", e.productWeightUnits = "product:weight:units", e.productColor = "product:color", e.productMaterial = "product:material", e.productPattern = "product:pattern", e.productAgeGroup = "product:age_group", e.productGender = "product:gender", e;
|
|
3384
|
-
}({}),
|
|
3502
|
+
}({}), wt = /* @__PURE__ */ function(e) {
|
|
3385
3503
|
return e.website = "website", e.article = "article", e.video = "video.other", e.videoTvShow = "video.tv_show", e.videoEpisode = "video.episode", e.videoMovie = "video.movie", e.musicAlbum = "music.album", e.musicPlaylist = "music.playlist", e.musicSong = "music.song", e.musicRadioStation = "music.radio_station", e.app = "app", e.product = "product", e.business = "business.business", e.place = "place", e.event = "event", e.profile = "profile", e.book = "book", e;
|
|
3386
|
-
}({}),
|
|
3504
|
+
}({}), Tt = /* @__PURE__ */ function(e) {
|
|
3387
3505
|
return e.inStock = "in stock", e.outOfStock = "out of stock", e.preorder = "preorder", e.backorder = "backorder", e.discontinued = "discontinued", e.pending = "pending", e;
|
|
3388
|
-
}({}),
|
|
3506
|
+
}({}), Et = /* @__PURE__ */ function(e) {
|
|
3389
3507
|
return e.new = "new", e.used = "used", e.refurbished = "refurbished", e;
|
|
3390
|
-
}({}),
|
|
3508
|
+
}({}), Dt = /* @__PURE__ */ function(e) {
|
|
3391
3509
|
return e.newborn = "newborn", e.infant = "infant", e.toddler = "toddler", e.kids = "kids", e.adult = "adult", e;
|
|
3392
|
-
}({}),
|
|
3510
|
+
}({}), Ot = /* @__PURE__ */ function(e) {
|
|
3393
3511
|
return e.female = "female", e.male = "male", e.unisex = "unisex", e;
|
|
3394
3512
|
}({}), J = /* @__PURE__ */ function(e) {
|
|
3395
3513
|
return e.card = "twitter:card", e.site = "twitter:site", e.creator = "twitter:creator", e.url = "twitter:url", e.title = "twitter:title", e.description = "twitter:description", e.image = "twitter:image", e.imageAlt = "twitter:image:alt", e.imageSrc = "twitter:image:src", e.imageWidth = "twitter:image:width", e.imageHeight = "twitter:image:height", e.label1 = "twitter:label1", e.data1 = "twitter:data1", e.label2 = "twitter:label2", e.data2 = "twitter:data2", e.appNameIphone = "twitter:app:name:iphone", e.appIdIphone = "twitter:app:id:iphone", e.appUrlIphone = "twitter:app:url:iphone", e.appNameIpad = "twitter:app:name:ipad", e.appIdIpad = "twitter:app:id:ipad", e.appUrlIpad = "twitter:app:url:ipad", e.appNameGooglePlay = "twitter:app:name:googleplay", e.appIdGooglePlay = "twitter:app:id:googleplay", e.appUrlGooglePlay = "twitter:app:url:googleplay", e.player = "twitter:player", e.playerWidth = "twitter:player:width", e.playerHeight = "twitter:player:height", e.playerStream = "twitter:player:stream", e.playerStreamContentType = "twitter:player:stream:content_type", e;
|
|
3396
|
-
}({}),
|
|
3514
|
+
}({}), kt = /* @__PURE__ */ function(e) {
|
|
3397
3515
|
return e.summary = "summary", e.summaryLargeImage = "summary_large_image", e.app = "app", e.player = "player", e.product = "product", e.gallery = "gallery", e.photo = "photo", e.leadGeneration = "lead_generation", e.audio = "audio", e.poll = "poll", e;
|
|
3398
|
-
}({}),
|
|
3516
|
+
}({}), At = class extends G {
|
|
3399
3517
|
constructor() {
|
|
3400
3518
|
super(Object.values(q), !0);
|
|
3401
3519
|
}
|
|
@@ -3441,7 +3559,7 @@ var G = class {
|
|
|
3441
3559
|
setSiteName(e) {
|
|
3442
3560
|
return this.set(q.siteName, e);
|
|
3443
3561
|
}
|
|
3444
|
-
},
|
|
3562
|
+
}, jt = class extends G {
|
|
3445
3563
|
constructor() {
|
|
3446
3564
|
super(Object.values(J));
|
|
3447
3565
|
}
|
|
@@ -3487,9 +3605,9 @@ var G = class {
|
|
|
3487
3605
|
setImage(e) {
|
|
3488
3606
|
return this.set(J.image, e), this;
|
|
3489
3607
|
}
|
|
3490
|
-
},
|
|
3608
|
+
}, Mt = class extends G {
|
|
3491
3609
|
constructor() {
|
|
3492
|
-
super(Object.values(K)),
|
|
3610
|
+
super(Object.values(K)), C(this, "suffix", void 0), C(this, "og", void 0), C(this, "twitter", void 0), this.og = new At(), this.twitter = new jt();
|
|
3493
3611
|
}
|
|
3494
3612
|
getOg() {
|
|
3495
3613
|
return this.og;
|
|
@@ -3530,7 +3648,7 @@ var G = class {
|
|
|
3530
3648
|
return s() && (document.title = t), this.set(K.title, t), this.og.setTitle(t), this.twitter.setTitle(t), this;
|
|
3531
3649
|
}
|
|
3532
3650
|
setKeywords(e) {
|
|
3533
|
-
return this.set(K.keywords,
|
|
3651
|
+
return this.set(K.keywords, j(e).join(", ")), this;
|
|
3534
3652
|
}
|
|
3535
3653
|
setDescription(e) {
|
|
3536
3654
|
return this.set(K.description, e), this;
|
|
@@ -3565,9 +3683,9 @@ var G = class {
|
|
|
3565
3683
|
getSuffix() {
|
|
3566
3684
|
return l(this.suffix) ? ` - ${this.suffix}` : "";
|
|
3567
3685
|
}
|
|
3568
|
-
},
|
|
3686
|
+
}, Nt = class {
|
|
3569
3687
|
static getItem() {
|
|
3570
|
-
return
|
|
3688
|
+
return E.get("__ui:meta-instance__", () => new Mt());
|
|
3571
3689
|
}
|
|
3572
3690
|
static getOg() {
|
|
3573
3691
|
return this.getItem().getOg();
|
|
@@ -3640,10 +3758,10 @@ var G = class {
|
|
|
3640
3758
|
}
|
|
3641
3759
|
}, Y = class e {
|
|
3642
3760
|
static getInstance() {
|
|
3643
|
-
return
|
|
3761
|
+
return E.get("__ui:url-item__", () => new e());
|
|
3644
3762
|
}
|
|
3645
3763
|
constructor(e) {
|
|
3646
|
-
|
|
3764
|
+
C(this, "url", void 0), this.set(e);
|
|
3647
3765
|
}
|
|
3648
3766
|
get href() {
|
|
3649
3767
|
return this.url.href;
|
|
@@ -3691,7 +3809,7 @@ var G = class {
|
|
|
3691
3809
|
getParams() {
|
|
3692
3810
|
let e = {};
|
|
3693
3811
|
return this.url.searchParams.forEach((t, n) => {
|
|
3694
|
-
e[n] =
|
|
3812
|
+
e[n] = T(t);
|
|
3695
3813
|
}), e;
|
|
3696
3814
|
}
|
|
3697
3815
|
set(e) {
|
|
@@ -3714,7 +3832,7 @@ var G = class {
|
|
|
3714
3832
|
toJSON() {
|
|
3715
3833
|
return this.url.toJSON();
|
|
3716
3834
|
}
|
|
3717
|
-
},
|
|
3835
|
+
}, Pt = class extends mt {
|
|
3718
3836
|
init() {
|
|
3719
3837
|
return s() && addEventListener("popstate", () => {
|
|
3720
3838
|
Y.getInstance().set(), this.reload();
|
|
@@ -3738,9 +3856,9 @@ var G = class {
|
|
|
3738
3856
|
}
|
|
3739
3857
|
return this;
|
|
3740
3858
|
}
|
|
3741
|
-
},
|
|
3859
|
+
}, Ft = class {
|
|
3742
3860
|
static getItem() {
|
|
3743
|
-
return
|
|
3861
|
+
return E.get("__ui:query-instance__", () => new Pt());
|
|
3744
3862
|
}
|
|
3745
3863
|
static get(e, t) {
|
|
3746
3864
|
return this.getItem().get(e, t);
|
|
@@ -3757,9 +3875,9 @@ var G = class {
|
|
|
3757
3875
|
static reload() {
|
|
3758
3876
|
this.getItem().reload();
|
|
3759
3877
|
}
|
|
3760
|
-
},
|
|
3878
|
+
}, It = class {
|
|
3761
3879
|
constructor(e, t = 320, n = !1) {
|
|
3762
|
-
|
|
3880
|
+
C(this, "callback", void 0), C(this, "delay", void 0), 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();
|
|
3763
3881
|
}
|
|
3764
3882
|
resume() {
|
|
3765
3883
|
if (this.timerId || this.completed) return this;
|
|
@@ -3795,7 +3913,7 @@ var G = class {
|
|
|
3795
3913
|
stop() {
|
|
3796
3914
|
return this.timerId && (clearTimeout(this.timerId), this.timerId = void 0), this;
|
|
3797
3915
|
}
|
|
3798
|
-
},
|
|
3916
|
+
}, Lt = class {
|
|
3799
3917
|
static async is() {
|
|
3800
3918
|
let e = await this.get();
|
|
3801
3919
|
return e !== -1 && e <= 8;
|
|
@@ -3811,7 +3929,7 @@ var G = class {
|
|
|
3811
3929
|
return t;
|
|
3812
3930
|
}
|
|
3813
3931
|
static getStorage() {
|
|
3814
|
-
return new
|
|
3932
|
+
return new D("__ui:scrollbar__", !0);
|
|
3815
3933
|
}
|
|
3816
3934
|
static getCalculate() {
|
|
3817
3935
|
return this.calculate;
|
|
@@ -3833,7 +3951,7 @@ var G = class {
|
|
|
3833
3951
|
});
|
|
3834
3952
|
}
|
|
3835
3953
|
};
|
|
3836
|
-
|
|
3954
|
+
C(Lt, "calculate", !1);
|
|
3837
3955
|
//#endregion
|
|
3838
3956
|
//#region src/functions/escapeExp.ts
|
|
3839
3957
|
function X(e) {
|
|
@@ -3841,7 +3959,7 @@ function X(e) {
|
|
|
3841
3959
|
}
|
|
3842
3960
|
//#endregion
|
|
3843
3961
|
//#region src/functions/getSeparatingSearchExp.ts
|
|
3844
|
-
function
|
|
3962
|
+
function Rt(e, t = 128) {
|
|
3845
3963
|
if (e instanceof RegExp) return e;
|
|
3846
3964
|
if (!e || e.trim().length === 0 || e.length > t) return /^/;
|
|
3847
3965
|
let n = String(e).replace(/\s+/g, " ").trim().split(" ").map(X).join("|");
|
|
@@ -3849,20 +3967,20 @@ function Ft(e, t = 128) {
|
|
|
3849
3967
|
}
|
|
3850
3968
|
//#endregion
|
|
3851
3969
|
//#region src/functions/addTagHighlightMatch.ts
|
|
3852
|
-
var
|
|
3853
|
-
function
|
|
3970
|
+
var zt = `___HIGHLIGHT_START_${f(1e5, 999999)}___`, Bt = `___HIGHLIGHT_END_${f(1e5, 999999)}___`, Vt = RegExp(`${zt}|${Bt}`, "g");
|
|
3971
|
+
function Ht(e, t, n = "sys-highlight-match", r = !1) {
|
|
3854
3972
|
let i = a(e);
|
|
3855
3973
|
if (l(i) && l(t)) {
|
|
3856
|
-
let e = i.replace(
|
|
3857
|
-
return r && (e = W(e)), e.replace(
|
|
3974
|
+
let e = i.replace(Rt(t), `${zt}$1${Bt}`);
|
|
3975
|
+
return r && (e = W(e)), e.replace(Vt, (e) => e === zt ? `<span class="${n}">` : "</span>");
|
|
3858
3976
|
}
|
|
3859
3977
|
return r ? W(i) : i;
|
|
3860
3978
|
}
|
|
3861
3979
|
//#endregion
|
|
3862
3980
|
//#region src/classes/SearchListData.ts
|
|
3863
|
-
var
|
|
3981
|
+
var Ut = class {
|
|
3864
3982
|
constructor(e, t, n, r) {
|
|
3865
|
-
|
|
3983
|
+
C(this, "list", void 0), C(this, "columns", void 0), C(this, "item", void 0), C(this, "options", void 0), C(this, "listCache", void 0), this.list = e, this.columns = t, this.item = n, this.options = r;
|
|
3866
3984
|
}
|
|
3867
3985
|
is() {
|
|
3868
3986
|
return !!(this.list && this.columns);
|
|
@@ -3899,8 +4017,8 @@ var Bt = class {
|
|
|
3899
4017
|
toFormatItem(e, t) {
|
|
3900
4018
|
let n = {};
|
|
3901
4019
|
return this.columns && this.columns.forEach((r) => {
|
|
3902
|
-
let i = this.getColumnName(r), a =
|
|
3903
|
-
n[i] = l(a) && t ? this.addTag(a) :
|
|
4020
|
+
let i = this.getColumnName(r), a = B(e, r);
|
|
4021
|
+
n[i] = l(a) && t ? this.addTag(a) : x(a);
|
|
3904
4022
|
}), {
|
|
3905
4023
|
...e,
|
|
3906
4024
|
...n,
|
|
@@ -3911,7 +4029,7 @@ var Bt = class {
|
|
|
3911
4029
|
return e.replace(/\.([a-z0-9])/gi, (e, t) => t.toUpperCase()) + "Search";
|
|
3912
4030
|
}
|
|
3913
4031
|
addTag(e) {
|
|
3914
|
-
return
|
|
4032
|
+
return Ht(x(e), this.item.get(), this.options.getClassName());
|
|
3915
4033
|
}
|
|
3916
4034
|
generateCache() {
|
|
3917
4035
|
if (!this.isList()) return [];
|
|
@@ -3919,8 +4037,8 @@ var Bt = class {
|
|
|
3919
4037
|
for (let t of this.list) {
|
|
3920
4038
|
let n = "";
|
|
3921
4039
|
if (this.columns) for (let e of this.columns) {
|
|
3922
|
-
let r =
|
|
3923
|
-
l(r) && (n += ` ${
|
|
4040
|
+
let r = B(t, e);
|
|
4041
|
+
l(r) && (n += ` ${x(r)}`);
|
|
3924
4042
|
}
|
|
3925
4043
|
e.push({
|
|
3926
4044
|
item: t,
|
|
@@ -3935,9 +4053,9 @@ var Bt = class {
|
|
|
3935
4053
|
resetCache() {
|
|
3936
4054
|
this.listCache = void 0;
|
|
3937
4055
|
}
|
|
3938
|
-
},
|
|
4056
|
+
}, Wt = class {
|
|
3939
4057
|
constructor(e, t) {
|
|
3940
|
-
|
|
4058
|
+
C(this, "value", void 0), C(this, "options", void 0), this.value = e, this.options = t;
|
|
3941
4059
|
}
|
|
3942
4060
|
is() {
|
|
3943
4061
|
return !!this.value;
|
|
@@ -3955,18 +4073,18 @@ var Bt = class {
|
|
|
3955
4073
|
};
|
|
3956
4074
|
//#endregion
|
|
3957
4075
|
//#region src/functions/getExp.ts
|
|
3958
|
-
function
|
|
4076
|
+
function Gt(e, t = "ig", n = ":value") {
|
|
3959
4077
|
let r = X(e);
|
|
3960
4078
|
return new RegExp(n.replace(/:value/g, r), t);
|
|
3961
4079
|
}
|
|
3962
4080
|
//#endregion
|
|
3963
4081
|
//#region src/functions/getExactSearchExp.ts
|
|
3964
|
-
function
|
|
3965
|
-
return
|
|
4082
|
+
function Kt(e) {
|
|
4083
|
+
return Gt(e, "i", "(:value)");
|
|
3966
4084
|
}
|
|
3967
4085
|
//#endregion
|
|
3968
4086
|
//#region src/functions/getSearchExp.ts
|
|
3969
|
-
function
|
|
4087
|
+
function qt(e, t = 128) {
|
|
3970
4088
|
if (!d(e) || e.trim().length === 0 || e.length > t) return /^/;
|
|
3971
4089
|
let n = [];
|
|
3972
4090
|
return a(e).split(" ").forEach((e) => {
|
|
@@ -3976,9 +4094,9 @@ function Wt(e, t = 128) {
|
|
|
3976
4094
|
}
|
|
3977
4095
|
//#endregion
|
|
3978
4096
|
//#region src/classes/SearchListMatcher.ts
|
|
3979
|
-
var
|
|
4097
|
+
var Jt = class {
|
|
3980
4098
|
constructor(e, t) {
|
|
3981
|
-
|
|
4099
|
+
C(this, "item", void 0), C(this, "options", void 0), C(this, "matcher", void 0), this.item = e, this.options = t, this.initMatcher();
|
|
3982
4100
|
}
|
|
3983
4101
|
is() {
|
|
3984
4102
|
return !!this.matcher;
|
|
@@ -3993,11 +4111,11 @@ var Gt = class {
|
|
|
3993
4111
|
this.initMatcher();
|
|
3994
4112
|
}
|
|
3995
4113
|
initMatcher() {
|
|
3996
|
-
this.item.is() ? this.matcher = this.options.getFindExactMatch() ?
|
|
4114
|
+
this.item.is() ? this.matcher = this.options.getFindExactMatch() ? Kt(this.item.get()) : qt(this.item.get()) : this.matcher = void 0;
|
|
3997
4115
|
}
|
|
3998
|
-
},
|
|
4116
|
+
}, Yt = class {
|
|
3999
4117
|
constructor(e) {
|
|
4000
|
-
|
|
4118
|
+
C(this, "options", void 0), this.options = e;
|
|
4001
4119
|
}
|
|
4002
4120
|
getOptions() {
|
|
4003
4121
|
return this.options || {};
|
|
@@ -4025,12 +4143,12 @@ var Gt = class {
|
|
|
4025
4143
|
setOptions(e) {
|
|
4026
4144
|
return this.options = e, this;
|
|
4027
4145
|
}
|
|
4028
|
-
},
|
|
4146
|
+
}, Xt = class {
|
|
4029
4147
|
constructor(e, t, n, r) {
|
|
4030
|
-
|
|
4148
|
+
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) => {
|
|
4031
4149
|
if (this.matcher.isSelection(t)) return this.data.toFormatItem(e, !0);
|
|
4032
4150
|
if (this.options.getReturnEverything()) return this.data.toFormatItem(e, !1);
|
|
4033
|
-
}),
|
|
4151
|
+
}), C(this, "callbackToNone", (e) => this.data.toFormatItem(e, !1)), this.options = new Yt(r), this.item = new Wt(n, this.options), this.matcher = new Jt(this.item, this.options), this.data = new Ut(e, t, this.item, this.options);
|
|
4034
4152
|
}
|
|
4035
4153
|
getData() {
|
|
4036
4154
|
return this.data;
|
|
@@ -4067,13 +4185,13 @@ var Gt = class {
|
|
|
4067
4185
|
let e = this.data.getList();
|
|
4068
4186
|
return e ? r(e, this.callbackToNone) : [];
|
|
4069
4187
|
}
|
|
4070
|
-
},
|
|
4188
|
+
}, Zt = () => E.get("__ui:storage-callback__", () => ({})), Qt = class e {
|
|
4071
4189
|
static getInstance(t, n = "main") {
|
|
4072
4190
|
return new e(t, n);
|
|
4073
4191
|
}
|
|
4074
4192
|
constructor(e, t = "main") {
|
|
4075
|
-
|
|
4076
|
-
let n = `${t}:${e}`, r =
|
|
4193
|
+
C(this, "name", void 0), C(this, "group", void 0), C(this, "callbacks", []), C(this, "loading", !1), this.name = e, this.group = t;
|
|
4194
|
+
let n = `${t}:${e}`, r = Zt();
|
|
4077
4195
|
if (n in r) return r[n];
|
|
4078
4196
|
r[n] = this;
|
|
4079
4197
|
}
|
|
@@ -4100,10 +4218,10 @@ var Gt = class {
|
|
|
4100
4218
|
}
|
|
4101
4219
|
async run(e) {
|
|
4102
4220
|
this.loading = !1;
|
|
4103
|
-
for (let { callback: t, isOnce: n } of this.callbacks) await
|
|
4221
|
+
for (let { callback: t, isOnce: n } of this.callbacks) await Ye(t, e), n && this.removeCallback(t);
|
|
4104
4222
|
return this;
|
|
4105
4223
|
}
|
|
4106
|
-
},
|
|
4224
|
+
}, $t = [
|
|
4107
4225
|
"d",
|
|
4108
4226
|
"e",
|
|
4109
4227
|
"f",
|
|
@@ -4123,10 +4241,10 @@ var Gt = class {
|
|
|
4123
4241
|
"t",
|
|
4124
4242
|
"u",
|
|
4125
4243
|
"v"
|
|
4126
|
-
],
|
|
4244
|
+
], en = RegExp(`%(${$t.join("|")})`, "g"), tn = (e, t = {}) => {
|
|
4127
4245
|
let r = String(e);
|
|
4128
|
-
return Array.isArray(t) && e.match(/%[a-z]/) && (r = r.replace(
|
|
4129
|
-
let r =
|
|
4246
|
+
return Array.isArray(t) && e.match(/%[a-z]/) && (r = r.replace(en, (e, n) => {
|
|
4247
|
+
let r = $t.indexOf(n);
|
|
4130
4248
|
if (r !== -1) {
|
|
4131
4249
|
var i;
|
|
4132
4250
|
return String((i = t == null ? void 0 : t[r]) == null ? "" : i);
|
|
@@ -4145,12 +4263,12 @@ var Gt = class {
|
|
|
4145
4263
|
}
|
|
4146
4264
|
return e;
|
|
4147
4265
|
})), r;
|
|
4148
|
-
},
|
|
4266
|
+
}, nn = (e) => {
|
|
4149
4267
|
var t;
|
|
4150
|
-
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(
|
|
4151
|
-
},
|
|
4152
|
-
constructor(e, t = () =>
|
|
4153
|
-
|
|
4268
|
+
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(F.getStatus().getStatus()))));
|
|
4269
|
+
}, rn = "global", an = 160, on = class {
|
|
4270
|
+
constructor(e, t = () => k.getLanguage(), n = () => k.getLocation()) {
|
|
4271
|
+
C(this, "language", void 0), C(this, "location", void 0), C(this, "files", {}), C(this, "data", {}), this.language = t, this.location = n, e && this.add(e);
|
|
4154
4272
|
}
|
|
4155
4273
|
isFile() {
|
|
4156
4274
|
return Object.keys(this.files).length > 0 && this.getIndex() !== void 0;
|
|
@@ -4178,7 +4296,7 @@ var Gt = class {
|
|
|
4178
4296
|
if (e in this.files) return e;
|
|
4179
4297
|
let t = this.getLanguage();
|
|
4180
4298
|
if (t in this.files) return t;
|
|
4181
|
-
if ("global" in this.files) return
|
|
4299
|
+
if ("global" in this.files) return rn;
|
|
4182
4300
|
}
|
|
4183
4301
|
getByData(e) {
|
|
4184
4302
|
if (e in this.data) return this.data[e];
|
|
@@ -4189,14 +4307,14 @@ var Gt = class {
|
|
|
4189
4307
|
return t && (this.data[e] = t), t;
|
|
4190
4308
|
}
|
|
4191
4309
|
}
|
|
4192
|
-
},
|
|
4193
|
-
constructor(e = "/api/translate", t = "list", n = new
|
|
4194
|
-
|
|
4310
|
+
}, sn = class {
|
|
4311
|
+
constructor(e = "/api/translate", t = "list", n = new on()) {
|
|
4312
|
+
C(this, "url", void 0), C(this, "propsName", void 0), C(this, "files", void 0), 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;
|
|
4195
4313
|
}
|
|
4196
4314
|
async get(e, t) {
|
|
4197
4315
|
var n;
|
|
4198
4316
|
let r = this.getText(e);
|
|
4199
|
-
return r ? this.replacement(r, t) : (
|
|
4317
|
+
return r ? this.replacement(r, t) : (F.isLocalhost() || await this.add(e), this.replacement((n = this.getText(e)) == null ? e : n));
|
|
4200
4318
|
}
|
|
4201
4319
|
getSync(e, t = !1, n) {
|
|
4202
4320
|
let r = this.getText(e);
|
|
@@ -4237,7 +4355,7 @@ var Gt = class {
|
|
|
4237
4355
|
});
|
|
4238
4356
|
}
|
|
4239
4357
|
async addNormalOrSync(e) {
|
|
4240
|
-
if (l(e)) if (
|
|
4358
|
+
if (l(e)) if (F.isLocalhost()) this.addSync(e);
|
|
4241
4359
|
else {
|
|
4242
4360
|
let t = Object.keys(e);
|
|
4243
4361
|
t.length > 0 && await this.add(t);
|
|
@@ -4279,16 +4397,16 @@ var Gt = class {
|
|
|
4279
4397
|
return `${this.files.getLanguage()}-${e}`;
|
|
4280
4398
|
}
|
|
4281
4399
|
getNameByGlobal(e) {
|
|
4282
|
-
return `${
|
|
4400
|
+
return `${rn}-${e}`;
|
|
4283
4401
|
}
|
|
4284
4402
|
getNamesNone(e) {
|
|
4285
4403
|
let t = [];
|
|
4286
|
-
return
|
|
4404
|
+
return j(e).forEach((e) => {
|
|
4287
4405
|
e !== "__TRANSLATE_START__" && e !== "__TRANSLATE_END__" && !this.hasName(e) && t.push(e);
|
|
4288
4406
|
}), t;
|
|
4289
4407
|
}
|
|
4290
4408
|
async getResponse() {
|
|
4291
|
-
let e = await
|
|
4409
|
+
let e = await F.get({
|
|
4292
4410
|
api: !1,
|
|
4293
4411
|
path: this.url,
|
|
4294
4412
|
request: { [this.propsName]: this.cache },
|
|
@@ -4296,14 +4414,14 @@ var Gt = class {
|
|
|
4296
4414
|
timeout: 12e3,
|
|
4297
4415
|
global: !0
|
|
4298
4416
|
});
|
|
4299
|
-
return
|
|
4417
|
+
return nn(e) || w.on({
|
|
4300
4418
|
group: "translate",
|
|
4301
4419
|
code: "error",
|
|
4302
4420
|
details: e
|
|
4303
4421
|
}), e == null ? {} : e;
|
|
4304
4422
|
}
|
|
4305
4423
|
replacement(e, t) {
|
|
4306
|
-
return t ?
|
|
4424
|
+
return t ? tn(e, t) : e;
|
|
4307
4425
|
}
|
|
4308
4426
|
async make() {
|
|
4309
4427
|
let e;
|
|
@@ -4315,12 +4433,12 @@ var Gt = class {
|
|
|
4315
4433
|
this.data[this.getName(t)] = (n = e == null ? void 0 : e[t]) == null ? "" : n;
|
|
4316
4434
|
}), this.cache = [];
|
|
4317
4435
|
}
|
|
4318
|
-
},
|
|
4436
|
+
}, cn = class {
|
|
4319
4437
|
static async get(e, t) {
|
|
4320
4438
|
return this.getItem().get(e, t);
|
|
4321
4439
|
}
|
|
4322
4440
|
static getItem() {
|
|
4323
|
-
return this.item || (this.item = new
|
|
4441
|
+
return this.item || (this.item = new sn()), this.item;
|
|
4324
4442
|
}
|
|
4325
4443
|
static getSync(e, t = !1, n) {
|
|
4326
4444
|
return this.getItem().getSync(e, t, n);
|
|
@@ -4359,18 +4477,18 @@ var Gt = class {
|
|
|
4359
4477
|
e.url && this.getItem().setUrl(e.url), e.propsName && this.getItem().setPropsName(e.propsName), typeof e.readApi == "boolean" && this.getItem().setReadApi(e.readApi);
|
|
4360
4478
|
}
|
|
4361
4479
|
};
|
|
4362
|
-
|
|
4480
|
+
C(cn, "item", void 0);
|
|
4363
4481
|
//#endregion
|
|
4364
4482
|
//#region src/functions/arrFill.ts
|
|
4365
|
-
function
|
|
4483
|
+
function ln(e, t) {
|
|
4366
4484
|
return Array(t).fill(e);
|
|
4367
4485
|
}
|
|
4368
4486
|
//#endregion
|
|
4369
4487
|
//#region src/functions/blobToBase64.ts
|
|
4370
|
-
var
|
|
4488
|
+
var un = () => dn() !== void 0, dn = () => {
|
|
4371
4489
|
var e;
|
|
4372
4490
|
return (e = globalThis) == null ? void 0 : e.Buffer;
|
|
4373
|
-
},
|
|
4491
|
+
}, fn = async (e) => new Promise((t, n) => {
|
|
4374
4492
|
if (typeof FileReader < "u") {
|
|
4375
4493
|
let r = new FileReader();
|
|
4376
4494
|
r.onloadend = () => {
|
|
@@ -4381,19 +4499,19 @@ var sn = () => cn() !== void 0, cn = () => {
|
|
|
4381
4499
|
t(r.result.replace(/^data:.*?,/, ""));
|
|
4382
4500
|
}, r.onerror = n, r.readAsDataURL(e);
|
|
4383
4501
|
} else n();
|
|
4384
|
-
}),
|
|
4502
|
+
}), pn = (e) => {
|
|
4385
4503
|
var t;
|
|
4386
4504
|
return ((t = globalThis) == null ? void 0 : t.Buffer).from(e).toString("base64");
|
|
4387
4505
|
};
|
|
4388
|
-
async function
|
|
4389
|
-
let n = s() ? await
|
|
4506
|
+
async function mn(e, t = !1) {
|
|
4507
|
+
let n = s() ? await fn(e) : un() ? pn(await e.arrayBuffer()) : void 0;
|
|
4390
4508
|
if (n) return t ? n : `data:${e.type};base64,${n}`;
|
|
4391
4509
|
}
|
|
4392
4510
|
//#endregion
|
|
4393
4511
|
//#region src/functions/capitalize.ts
|
|
4394
|
-
function
|
|
4512
|
+
function hn(e, t = !1) {
|
|
4395
4513
|
let n = String(e);
|
|
4396
|
-
return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(
|
|
4514
|
+
return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(k.getLocation()) + n.slice(1) : n.charAt(0).toUpperCase() + n.slice(1) : n;
|
|
4397
4515
|
}
|
|
4398
4516
|
//#endregion
|
|
4399
4517
|
//#region src/functions/copyObject.ts
|
|
@@ -4402,12 +4520,12 @@ function Z(e) {
|
|
|
4402
4520
|
}
|
|
4403
4521
|
//#endregion
|
|
4404
4522
|
//#region src/functions/copyObjectLite.ts
|
|
4405
|
-
function
|
|
4523
|
+
function gn(e, t) {
|
|
4406
4524
|
return Object.assign({}, e, t);
|
|
4407
4525
|
}
|
|
4408
4526
|
//#endregion
|
|
4409
4527
|
//#region src/functions/domQuerySelector.ts
|
|
4410
|
-
function
|
|
4528
|
+
function _n(e) {
|
|
4411
4529
|
if (s()) {
|
|
4412
4530
|
var t;
|
|
4413
4531
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -4415,67 +4533,67 @@ function mn(e) {
|
|
|
4415
4533
|
}
|
|
4416
4534
|
//#endregion
|
|
4417
4535
|
//#region src/functions/domQuerySelectorAll.ts
|
|
4418
|
-
function
|
|
4536
|
+
function vn(e) {
|
|
4419
4537
|
if (s()) return document.querySelectorAll(e);
|
|
4420
4538
|
}
|
|
4421
4539
|
//#endregion
|
|
4422
4540
|
//#region src/functions/getElementImage.ts
|
|
4423
|
-
function
|
|
4541
|
+
function yn(e) {
|
|
4424
4542
|
return d(e) ? U(void 0, "img", { src: e }) : e;
|
|
4425
4543
|
}
|
|
4426
4544
|
//#endregion
|
|
4427
4545
|
//#region src/functions/resizeImageByMax.ts
|
|
4428
|
-
function
|
|
4546
|
+
function bn(e, t = "auto") {
|
|
4429
4547
|
switch (t) {
|
|
4430
4548
|
case "auto": return e.naturalWidth >= e.naturalHeight;
|
|
4431
4549
|
case "width": return !0;
|
|
4432
4550
|
case "height": return !1;
|
|
4433
4551
|
}
|
|
4434
4552
|
}
|
|
4435
|
-
function
|
|
4436
|
-
let i =
|
|
4553
|
+
function xn(e, t, n = "auto", r) {
|
|
4554
|
+
let i = yn(e);
|
|
4437
4555
|
if (s() && i && i.naturalWidth && i.naturalHeight && (i.naturalWidth > t && (n === "auto" || n === "width") || i.naturalHeight > t && (n === "auto" || n === "height"))) {
|
|
4438
4556
|
var a;
|
|
4439
|
-
let e =
|
|
4557
|
+
let e = bn(i, n), o = (a = document.createElement("canvas")) == null ? void 0 : a.getContext("2d");
|
|
4440
4558
|
if (o) return o.canvas.width = e ? t : i.naturalWidth / i.naturalHeight * t, o.canvas.height = e ? i.naturalHeight / i.naturalWidth * t : t, o.drawImage(i, 0, 0, o.canvas.width, o.canvas.height), o.canvas.toDataURL(r);
|
|
4441
4559
|
}
|
|
4442
4560
|
}
|
|
4443
4561
|
//#endregion
|
|
4444
4562
|
//#region src/functions/ensureMaxSize.ts
|
|
4445
|
-
async function
|
|
4563
|
+
async function Sn(e, t = .56, n = "image/jpeg") {
|
|
4446
4564
|
return new Promise((r) => {
|
|
4447
4565
|
if (!s()) {
|
|
4448
4566
|
r("");
|
|
4449
4567
|
return;
|
|
4450
4568
|
}
|
|
4451
|
-
let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o =
|
|
4569
|
+
let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o = yn(a);
|
|
4452
4570
|
o ? (o.onload = () => {
|
|
4453
|
-
let e =
|
|
4571
|
+
let e = xn(o, t * o.naturalWidth, "width", n);
|
|
4454
4572
|
r(e == null ? "" : e), URL.revokeObjectURL(a);
|
|
4455
4573
|
}, o.onerror = () => {
|
|
4456
4574
|
URL.revokeObjectURL(a), r("");
|
|
4457
|
-
}) :
|
|
4575
|
+
}) : mn(i).then((e) => r(String(e == null ? "" : e)));
|
|
4458
4576
|
});
|
|
4459
4577
|
}
|
|
4460
4578
|
//#endregion
|
|
4461
4579
|
//#region src/functions/eventStopPropagation.ts
|
|
4462
|
-
function
|
|
4580
|
+
function Cn(e) {
|
|
4463
4581
|
e.preventDefault(), e.stopPropagation();
|
|
4464
4582
|
}
|
|
4465
4583
|
//#endregion
|
|
4466
4584
|
//#region src/functions/frame.ts
|
|
4467
|
-
function
|
|
4585
|
+
function wn(e, t, n) {
|
|
4468
4586
|
let r = () => {
|
|
4469
|
-
e(), s() && t != null && t() ?
|
|
4587
|
+
e(), s() && t != null && t() ? wn(e, t, n) : n == null || n();
|
|
4470
4588
|
};
|
|
4471
4589
|
s() ? requestAnimationFrame(r) : r();
|
|
4472
4590
|
}
|
|
4473
4591
|
//#endregion
|
|
4474
4592
|
//#region src/functions/getArrayHighlightMatch.ts
|
|
4475
|
-
function
|
|
4593
|
+
function Tn(e, t) {
|
|
4476
4594
|
let n = a(e);
|
|
4477
4595
|
if (l(n) && l(t)) {
|
|
4478
|
-
let e = [], r =
|
|
4596
|
+
let e = [], r = Rt(t), i = 0, a;
|
|
4479
4597
|
for (; (a = r.exec(n)) !== null && a.index !== r.lastIndex;) a.index > i && e.push({
|
|
4480
4598
|
text: n.substring(i, a.index),
|
|
4481
4599
|
isMatch: !1
|
|
@@ -4495,8 +4613,8 @@ function Sn(e, t) {
|
|
|
4495
4613
|
}
|
|
4496
4614
|
//#endregion
|
|
4497
4615
|
//#region src/functions/getAttributes.ts
|
|
4498
|
-
function
|
|
4499
|
-
let t = {}, n =
|
|
4616
|
+
function En(e) {
|
|
4617
|
+
let t = {}, n = A(e);
|
|
4500
4618
|
if (n) for (let e of n.attributes) {
|
|
4501
4619
|
var r;
|
|
4502
4620
|
t[e.name] = (r = (e == null ? void 0 : e.value) || (e == null ? void 0 : e.textContent)) == null ? void 0 : r;
|
|
@@ -4505,12 +4623,12 @@ function Cn(e) {
|
|
|
4505
4623
|
}
|
|
4506
4624
|
//#endregion
|
|
4507
4625
|
//#region src/functions/getClipboardData.ts
|
|
4508
|
-
async function
|
|
4626
|
+
async function Dn(e) {
|
|
4509
4627
|
if (s()) try {
|
|
4510
4628
|
var t, n;
|
|
4511
4629
|
return (t = e == null || (n = e.clipboardData) == null ? void 0 : n.getData("text")) == null ? await navigator.clipboard.readText() || "" : t;
|
|
4512
4630
|
} catch (e) {
|
|
4513
|
-
|
|
4631
|
+
w.on({
|
|
4514
4632
|
group: "clipboard",
|
|
4515
4633
|
code: "error",
|
|
4516
4634
|
details: e
|
|
@@ -4520,35 +4638,35 @@ async function wn(e) {
|
|
|
4520
4638
|
}
|
|
4521
4639
|
//#endregion
|
|
4522
4640
|
//#region src/functions/getCurrentDate.ts
|
|
4523
|
-
function
|
|
4524
|
-
return new
|
|
4641
|
+
function On(e = "datetime") {
|
|
4642
|
+
return new at(void 0, e).standard();
|
|
4525
4643
|
}
|
|
4526
4644
|
//#endregion
|
|
4527
4645
|
//#region src/functions/getCurrentTime.ts
|
|
4528
|
-
function
|
|
4646
|
+
function kn() {
|
|
4529
4647
|
return Date.now();
|
|
4530
4648
|
}
|
|
4531
4649
|
//#endregion
|
|
4532
4650
|
//#region src/functions/getElementId.ts
|
|
4533
|
-
var Q,
|
|
4651
|
+
var Q, An = () => {
|
|
4534
4652
|
let e = Q == null ? void 0 : Q();
|
|
4535
4653
|
if (e) return String(e);
|
|
4536
|
-
let t =
|
|
4654
|
+
let t = E.get("__ui:getElementId__", () => ({ id: 1e5 }));
|
|
4537
4655
|
return `id-${t.id++}`;
|
|
4538
4656
|
};
|
|
4539
|
-
function
|
|
4657
|
+
function jn(e, t) {
|
|
4540
4658
|
if (e) {
|
|
4541
|
-
let n =
|
|
4542
|
-
if (n) return l(n.id) || n.setAttribute("id",
|
|
4659
|
+
let n = A(e);
|
|
4660
|
+
if (n) return l(n.id) || n.setAttribute("id", An()), t ? `#${n.id}${t}`.trim() : n.id;
|
|
4543
4661
|
}
|
|
4544
|
-
return
|
|
4662
|
+
return An();
|
|
4545
4663
|
}
|
|
4546
|
-
function
|
|
4664
|
+
function Mn(e) {
|
|
4547
4665
|
Q || (Q = e);
|
|
4548
4666
|
}
|
|
4549
4667
|
//#endregion
|
|
4550
4668
|
//#region src/functions/getFirst.ts
|
|
4551
|
-
function
|
|
4669
|
+
function Nn(e) {
|
|
4552
4670
|
if (i(e)) return e == null ? void 0 : e[0];
|
|
4553
4671
|
if (t(e)) {
|
|
4554
4672
|
var n;
|
|
@@ -4558,18 +4676,18 @@ function An(e) {
|
|
|
4558
4676
|
}
|
|
4559
4677
|
//#endregion
|
|
4560
4678
|
//#region src/functions/getKey.ts
|
|
4561
|
-
function
|
|
4679
|
+
function Pn(e) {
|
|
4562
4680
|
var t, n, r;
|
|
4563
4681
|
return (t = (n = e == null ? void 0 : e.key) == null ? e == null ? void 0 : e.code : n) == null ? e == null || (r = e.keyCode) == null ? void 0 : r.toString() : t;
|
|
4564
4682
|
}
|
|
4565
4683
|
//#endregion
|
|
4566
4684
|
//#region src/functions/getLength.ts
|
|
4567
|
-
function
|
|
4685
|
+
function Fn(e) {
|
|
4568
4686
|
return e == null ? 0 : typeof e == "string" || Array.isArray(e) ? e.length : e instanceof Map || e instanceof Set ? e.size : t(e) ? Object.keys(e).length : 0;
|
|
4569
4687
|
}
|
|
4570
4688
|
//#endregion
|
|
4571
4689
|
//#region src/functions/getLengthOfAllArray.ts
|
|
4572
|
-
function
|
|
4690
|
+
function In(e) {
|
|
4573
4691
|
return r(e, (e) => {
|
|
4574
4692
|
var t;
|
|
4575
4693
|
return (t = e == null ? void 0 : e.length) == null ? 0 : t;
|
|
@@ -4577,41 +4695,41 @@ function Nn(e) {
|
|
|
4577
4695
|
}
|
|
4578
4696
|
//#endregion
|
|
4579
4697
|
//#region src/functions/getMaxLengthAllArray.ts
|
|
4580
|
-
function
|
|
4698
|
+
function Ln(e) {
|
|
4581
4699
|
if (!l(e)) return 0;
|
|
4582
|
-
let t =
|
|
4700
|
+
let t = In(e);
|
|
4583
4701
|
return t.length > 1e4 ? t.reduce((e, t) => Math.max(e, t)) : Math.max(...t);
|
|
4584
4702
|
}
|
|
4585
4703
|
//#endregion
|
|
4586
4704
|
//#region src/functions/getMinLengthAllArray.ts
|
|
4587
|
-
function
|
|
4705
|
+
function Rn(e) {
|
|
4588
4706
|
if (!l(e)) return 0;
|
|
4589
|
-
let t =
|
|
4707
|
+
let t = In(e);
|
|
4590
4708
|
return t.length > 1e4 ? t.reduce((e, t) => Math.min(e, t)) : Math.min(...t);
|
|
4591
4709
|
}
|
|
4592
4710
|
//#endregion
|
|
4593
4711
|
//#region src/functions/getMouseClientX.ts
|
|
4594
|
-
function
|
|
4712
|
+
function zn(e) {
|
|
4595
4713
|
var t, n;
|
|
4596
4714
|
return (e == null ? void 0 : e.clientX) || (e == null || (t = e.targetTouches) == null || (t = t[0]) == null ? void 0 : t.clientX) || (e == null || (n = e.touches) == null || (n = n[0]) == null ? void 0 : n.clientX) || 0;
|
|
4597
4715
|
}
|
|
4598
4716
|
//#endregion
|
|
4599
4717
|
//#region src/functions/getMouseClientY.ts
|
|
4600
|
-
function
|
|
4718
|
+
function Bn(e) {
|
|
4601
4719
|
var t, n;
|
|
4602
4720
|
return (e == null ? void 0 : e.clientY) || (e == null || (t = e.targetTouches) == null || (t = t[0]) == null ? void 0 : t.clientY) || (e == null || (n = e.touches) == null || (n = n[0]) == null ? void 0 : n.clientY) || 0;
|
|
4603
4721
|
}
|
|
4604
4722
|
//#endregion
|
|
4605
4723
|
//#region src/functions/getMouseClient.ts
|
|
4606
|
-
function
|
|
4724
|
+
function Vn(e) {
|
|
4607
4725
|
return {
|
|
4608
|
-
x:
|
|
4609
|
-
y:
|
|
4726
|
+
x: zn(e),
|
|
4727
|
+
y: Bn(e)
|
|
4610
4728
|
};
|
|
4611
4729
|
}
|
|
4612
4730
|
//#endregion
|
|
4613
4731
|
//#region src/functions/getObjectByKeys.ts
|
|
4614
|
-
function
|
|
4732
|
+
function Hn(e, t) {
|
|
4615
4733
|
let r = {};
|
|
4616
4734
|
return n(e) && t.forEach((t) => {
|
|
4617
4735
|
t in e && e[t] !== void 0 && (r[t] = e[t]);
|
|
@@ -4619,7 +4737,7 @@ function zn(e, t) {
|
|
|
4619
4737
|
}
|
|
4620
4738
|
//#endregion
|
|
4621
4739
|
//#region src/functions/getObjectNoUndefined.ts
|
|
4622
|
-
function
|
|
4740
|
+
function Un(e, t = void 0) {
|
|
4623
4741
|
let n = {};
|
|
4624
4742
|
return r(e, (e, r) => {
|
|
4625
4743
|
e !== t && (n[r] = e);
|
|
@@ -4627,42 +4745,42 @@ function Bn(e, t = void 0) {
|
|
|
4627
4745
|
}
|
|
4628
4746
|
//#endregion
|
|
4629
4747
|
//#region src/functions/getObjectOrNone.ts
|
|
4630
|
-
function
|
|
4748
|
+
function Wn(e) {
|
|
4631
4749
|
return n(e) ? e : {};
|
|
4632
4750
|
}
|
|
4633
4751
|
//#endregion
|
|
4634
4752
|
//#region src/functions/getOnlyText.ts
|
|
4635
|
-
function
|
|
4636
|
-
return
|
|
4753
|
+
function Gn(e) {
|
|
4754
|
+
return x(e).replace(/[^\p{L}\p{N}\s]+/gu, "").trim();
|
|
4637
4755
|
}
|
|
4638
4756
|
//#endregion
|
|
4639
4757
|
//#region src/functions/strFill.ts
|
|
4640
|
-
function
|
|
4758
|
+
function Kn(e, t) {
|
|
4641
4759
|
return String(e).repeat(t);
|
|
4642
4760
|
}
|
|
4643
4761
|
//#endregion
|
|
4644
4762
|
//#region src/functions/getRandomText.ts
|
|
4645
|
-
function
|
|
4763
|
+
function qn(e, t, n = "#", r = 2, i = 12) {
|
|
4646
4764
|
let a = f(e, t), o = [];
|
|
4647
|
-
for (let e = 0; e < a; e++) o.push(
|
|
4765
|
+
for (let e = 0; e < a; e++) o.push(Kn(n, f(r, i)));
|
|
4648
4766
|
return o.join(" ");
|
|
4649
4767
|
}
|
|
4650
4768
|
//#endregion
|
|
4651
4769
|
//#region src/functions/getStepPercent.ts
|
|
4652
|
-
function
|
|
4770
|
+
function Jn(e, t) {
|
|
4653
4771
|
let n = e == null ? 0 : e;
|
|
4654
4772
|
return t > n ? 100 / (t - n) : 0;
|
|
4655
4773
|
}
|
|
4656
4774
|
//#endregion
|
|
4657
4775
|
//#region src/functions/getStepValue.ts
|
|
4658
|
-
function
|
|
4776
|
+
function Yn(e, t) {
|
|
4659
4777
|
let n = e == null ? 0 : e;
|
|
4660
4778
|
return t > n ? (t - n) / 100 : 0;
|
|
4661
4779
|
}
|
|
4662
4780
|
//#endregion
|
|
4663
4781
|
//#region src/functions/goScroll.ts
|
|
4664
|
-
var
|
|
4665
|
-
function
|
|
4782
|
+
var Xn = 0;
|
|
4783
|
+
function Zn(e, t, n) {
|
|
4666
4784
|
if (!s()) return;
|
|
4667
4785
|
let r = t == null ? void 0 : t.closest(e);
|
|
4668
4786
|
if (t && r && r.scrollHeight !== r.offsetHeight) {
|
|
@@ -4670,12 +4788,12 @@ function Jn(e, t, n) {
|
|
|
4670
4788
|
if (n) {
|
|
4671
4789
|
let a = n.getBoundingClientRect();
|
|
4672
4790
|
r.scrollTop = t.offsetTop - (a.top - e.top) - (a.height / 2 - i.height / 2), r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = t.offsetTop + t.offsetHeight - r.offsetHeight);
|
|
4673
|
-
} else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top -
|
|
4791
|
+
} else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top - Xn : r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = i.top - e.top + i.height - e.height + Xn);
|
|
4674
4792
|
}
|
|
4675
4793
|
}
|
|
4676
4794
|
//#endregion
|
|
4677
4795
|
//#region src/functions/goScrollSmooth.ts
|
|
4678
|
-
function
|
|
4796
|
+
function Qn(e, t, n = 0) {
|
|
4679
4797
|
if (!s()) return;
|
|
4680
4798
|
let r = (t == null ? void 0 : t.behavior) || "smooth";
|
|
4681
4799
|
if ("scrollIntoView" in e && !n) {
|
|
@@ -4697,7 +4815,7 @@ function Yn(e, t, n = 0) {
|
|
|
4697
4815
|
}
|
|
4698
4816
|
//#endregion
|
|
4699
4817
|
//#region src/functions/goScrollTo.ts
|
|
4700
|
-
function
|
|
4818
|
+
function $n(e, t, n = "smooth") {
|
|
4701
4819
|
if (!s() || !e || !t) return;
|
|
4702
4820
|
let r = e.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
4703
4821
|
e.scrollBy({
|
|
@@ -4708,16 +4826,16 @@ function Xn(e, t, n = "smooth") {
|
|
|
4708
4826
|
}
|
|
4709
4827
|
//#endregion
|
|
4710
4828
|
//#region src/functions/isShare.ts
|
|
4711
|
-
function
|
|
4829
|
+
function er() {
|
|
4712
4830
|
return s() && typeof navigator < "u" && !!navigator.share;
|
|
4713
4831
|
}
|
|
4714
4832
|
//#endregion
|
|
4715
4833
|
//#region src/functions/handleShare.ts
|
|
4716
|
-
async function
|
|
4717
|
-
if (
|
|
4834
|
+
async function tr(e) {
|
|
4835
|
+
if (er() && navigator.canShare && navigator.canShare(e)) try {
|
|
4718
4836
|
return await navigator.share(e), !0;
|
|
4719
4837
|
} catch (e) {
|
|
4720
|
-
|
|
4838
|
+
w.on({
|
|
4721
4839
|
group: "share",
|
|
4722
4840
|
code: "error",
|
|
4723
4841
|
details: e
|
|
@@ -4727,20 +4845,20 @@ async function Qn(e) {
|
|
|
4727
4845
|
}
|
|
4728
4846
|
//#endregion
|
|
4729
4847
|
//#region src/functions/inArray.ts
|
|
4730
|
-
function
|
|
4848
|
+
function nr(e, t) {
|
|
4731
4849
|
return e.includes(t);
|
|
4732
4850
|
}
|
|
4733
4851
|
//#endregion
|
|
4734
4852
|
//#region src/functions/initScrollbarOffset.ts
|
|
4735
|
-
async function
|
|
4853
|
+
async function rr() {
|
|
4736
4854
|
if (s()) {
|
|
4737
|
-
let e = await
|
|
4855
|
+
let e = await Lt.get();
|
|
4738
4856
|
document.body.style.setProperty("--sys-scrollbar-offset", `${e}px`);
|
|
4739
4857
|
}
|
|
4740
4858
|
}
|
|
4741
4859
|
//#endregion
|
|
4742
4860
|
//#region src/functions/intersectKey.ts
|
|
4743
|
-
function
|
|
4861
|
+
function ir(e, n) {
|
|
4744
4862
|
let i = {};
|
|
4745
4863
|
return t(e) && t(n) && r(e, (e, t) => {
|
|
4746
4864
|
t in n && (i[t] = e);
|
|
@@ -4748,7 +4866,7 @@ function tr(e, n) {
|
|
|
4748
4866
|
}
|
|
4749
4867
|
//#endregion
|
|
4750
4868
|
//#region src/functions/isDifferent.ts
|
|
4751
|
-
function
|
|
4869
|
+
function ar(e, t) {
|
|
4752
4870
|
let n = Object.keys(e).length !== Object.keys(t).length;
|
|
4753
4871
|
return n || r(e, (e, r) => {
|
|
4754
4872
|
e !== (t == null ? void 0 : t[r]) && (n = !0);
|
|
@@ -4756,25 +4874,25 @@ function nr(e, t) {
|
|
|
4756
4874
|
}
|
|
4757
4875
|
//#endregion
|
|
4758
4876
|
//#region src/functions/isElementVisible.ts
|
|
4759
|
-
function
|
|
4877
|
+
function or(e) {
|
|
4760
4878
|
if (!s()) return !1;
|
|
4761
|
-
let t =
|
|
4879
|
+
let t = A(e);
|
|
4762
4880
|
if (!t || "isConnected" in t && t.isConnected === !1) return !1;
|
|
4763
4881
|
let n = window.getComputedStyle(t);
|
|
4764
4882
|
return n.display !== "none" && n.visibility !== "hidden" && n.opacity !== "0" && t.offsetWidth !== 0 && t.offsetHeight !== 0;
|
|
4765
4883
|
}
|
|
4766
4884
|
//#endregion
|
|
4767
4885
|
//#region src/functions/isInput.ts
|
|
4768
|
-
var
|
|
4886
|
+
var sr = (e) => {
|
|
4769
4887
|
if (e instanceof HTMLElement) {
|
|
4770
4888
|
let t = e.tagName.toLowerCase();
|
|
4771
4889
|
return !!(t === "input" || t === "textarea" || t === "select" || e.isContentEditable || e.getAttribute("contenteditable") === "true") && !(e != null && e.readOnly) && !(e != null && e.disabled);
|
|
4772
4890
|
}
|
|
4773
4891
|
return !1;
|
|
4774
|
-
},
|
|
4892
|
+
}, cr = (e, t) => e.code === "Space" || e.code === "Enter" || e.key === " " || e.key === "Spacebar" || e.key === "Enter" || e.keyCode === 13 || e.keyCode === 32 ? t === void 0 ? !sr(e.target) : !t : !1;
|
|
4775
4893
|
//#endregion
|
|
4776
4894
|
//#region src/functions/isFloat.ts
|
|
4777
|
-
function
|
|
4895
|
+
function lr(e) {
|
|
4778
4896
|
switch (typeof e) {
|
|
4779
4897
|
case "number": return !0;
|
|
4780
4898
|
case "string": return /^-?\d+(\.\d+)?$/.test(e);
|
|
@@ -4783,21 +4901,24 @@ function or(e) {
|
|
|
4783
4901
|
}
|
|
4784
4902
|
//#endregion
|
|
4785
4903
|
//#region src/functions/isIntegerBetween.ts
|
|
4786
|
-
function
|
|
4904
|
+
function ur(e, t) {
|
|
4787
4905
|
let n = Math.floor(t);
|
|
4788
4906
|
return e >= n && e < n + 1;
|
|
4789
4907
|
}
|
|
4790
4908
|
//#endregion
|
|
4909
|
+
//#region src/functions/isMetaKey.ts
|
|
4910
|
+
var dr = (e) => !!(e.metaKey || e.altKey || e.ctrlKey);
|
|
4911
|
+
//#endregion
|
|
4791
4912
|
//#region src/functions/isSelectedByList.ts
|
|
4792
|
-
function
|
|
4793
|
-
return Array.isArray(e) ? e.every((e) =>
|
|
4913
|
+
function fr(e, t) {
|
|
4914
|
+
return Array.isArray(e) ? e.every((e) => b(e, t)) : b(e, t);
|
|
4794
4915
|
}
|
|
4795
4916
|
//#endregion
|
|
4796
4917
|
//#region src/functions/isTab.ts
|
|
4797
|
-
var
|
|
4918
|
+
var pr = (e) => e.key === "Tab" || e.code === "Tab" || e.keyCode === 9;
|
|
4798
4919
|
//#endregion
|
|
4799
4920
|
//#region src/functions/removeCommonPrefix.ts
|
|
4800
|
-
function
|
|
4921
|
+
function mr(e, t) {
|
|
4801
4922
|
if (e.startsWith(t)) return e.slice(t.length).trim();
|
|
4802
4923
|
let n = 0;
|
|
4803
4924
|
for (; e[n] === t[n] && n < e.length && n < t.length;) n++;
|
|
@@ -4805,13 +4926,13 @@ function ur(e, t) {
|
|
|
4805
4926
|
}
|
|
4806
4927
|
//#endregion
|
|
4807
4928
|
//#region src/functions/replaceComponentName.ts
|
|
4808
|
-
var
|
|
4929
|
+
var hr = (e, t, n) => {
|
|
4809
4930
|
var r;
|
|
4810
4931
|
return e == null || (r = e.replace(RegExp(`<${t}`, "ig"), `<${n}`)) == null || (r = r.replace(RegExp(`</${t}`, "ig"), `</${n}`)) == null ? void 0 : r.trim();
|
|
4811
4932
|
};
|
|
4812
4933
|
//#endregion
|
|
4813
4934
|
//#region src/functions/uniqueArray.ts
|
|
4814
|
-
function
|
|
4935
|
+
function gr(e) {
|
|
4815
4936
|
return [...new Set(e)];
|
|
4816
4937
|
}
|
|
4817
4938
|
//#endregion
|
|
@@ -4820,21 +4941,21 @@ function $(e, n, i = !0) {
|
|
|
4820
4941
|
let a = Z(e);
|
|
4821
4942
|
return t(e) && t(n) && r(n, (n, r) => {
|
|
4822
4943
|
let o = e == null ? void 0 : e[r];
|
|
4823
|
-
t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] = Z(
|
|
4944
|
+
t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] = Z(gr([...o, ...n])) : a[r] = $(Array.isArray(o) ? { ...o } : o, n, i) : a[r] = t(n) ? Z(n) : n;
|
|
4824
4945
|
}), a;
|
|
4825
4946
|
}
|
|
4826
4947
|
//#endregion
|
|
4827
4948
|
//#region src/functions/replaceTemplate.ts
|
|
4828
|
-
function
|
|
4949
|
+
function _r(e, t) {
|
|
4829
4950
|
let n = e;
|
|
4830
4951
|
return r(t, (e, t) => {
|
|
4831
|
-
n = n.replace(
|
|
4952
|
+
n = n.replace(Gt(`[${t}]`), m(e));
|
|
4832
4953
|
}), n;
|
|
4833
4954
|
}
|
|
4834
4955
|
//#endregion
|
|
4835
4956
|
//#region src/functions/secondToTime.ts
|
|
4836
|
-
function
|
|
4837
|
-
let n =
|
|
4957
|
+
function vr(e, t) {
|
|
4958
|
+
let n = y(e);
|
|
4838
4959
|
if (n > 0) {
|
|
4839
4960
|
let e = String(Math.floor(n / 60)).padStart(2, "0"), r = String(n % 60).padStart(2, "0");
|
|
4840
4961
|
return t && Number(e) >= 60 ? `${String(Math.floor(Number(e) / 60)).padStart(2, "0")}:${String(Number(e) % 60).padStart(2, "0")}:${r}` : `${e}:${r}`;
|
|
@@ -4843,7 +4964,7 @@ function mr(e, t) {
|
|
|
4843
4964
|
}
|
|
4844
4965
|
//#endregion
|
|
4845
4966
|
//#region src/functions/setValues.ts
|
|
4846
|
-
function
|
|
4967
|
+
function yr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, notEmpty: o = !1 }) {
|
|
4847
4968
|
if (n) {
|
|
4848
4969
|
if (i(e)) {
|
|
4849
4970
|
let n = e.indexOf(t), i = [...e];
|
|
@@ -4855,7 +4976,7 @@ function hr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, no
|
|
|
4855
4976
|
}
|
|
4856
4977
|
//#endregion
|
|
4857
4978
|
//#region src/functions/splice.ts
|
|
4858
|
-
function
|
|
4979
|
+
function br(e, n, i) {
|
|
4859
4980
|
if (t(e) && t(n)) {
|
|
4860
4981
|
if (i) {
|
|
4861
4982
|
let a = {}, o = !1;
|
|
@@ -4869,34 +4990,34 @@ function gr(e, n, i) {
|
|
|
4869
4990
|
}
|
|
4870
4991
|
//#endregion
|
|
4871
4992
|
//#region src/functions/toCamelCaseFirst.ts
|
|
4872
|
-
function
|
|
4873
|
-
return
|
|
4993
|
+
function xr(e) {
|
|
4994
|
+
return ot(e).replace(/^([a-z])/, (e) => `${e.toUpperCase()}`);
|
|
4874
4995
|
}
|
|
4875
4996
|
//#endregion
|
|
4876
4997
|
//#region src/functions/toKebabCase.ts
|
|
4877
|
-
function
|
|
4998
|
+
function Sr(e) {
|
|
4878
4999
|
return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/^[A-Z]/, (e) => e.toLowerCase()).replace(/(?<=[\w ])[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[A-Z]/g, (e) => e.toLowerCase());
|
|
4879
5000
|
}
|
|
4880
5001
|
//#endregion
|
|
4881
5002
|
//#region src/functions/toNumberByMax.ts
|
|
4882
|
-
function
|
|
4883
|
-
let i =
|
|
4884
|
-
return t && a < i ? `${
|
|
5003
|
+
function Cr(e, t, n, r) {
|
|
5004
|
+
let i = y(e), a = y(t);
|
|
5005
|
+
return t && a < i ? `${wr(a, n, r)}+` : wr(i, n, r);
|
|
4885
5006
|
}
|
|
4886
|
-
var
|
|
5007
|
+
var wr = (e, t, n) => t ? new L(n).number(e) : e;
|
|
4887
5008
|
//#endregion
|
|
4888
5009
|
//#region src/functions/toPercent.ts
|
|
4889
|
-
function
|
|
5010
|
+
function Tr(e, t) {
|
|
4890
5011
|
return e === 0 ? t : 1 / e * t;
|
|
4891
5012
|
}
|
|
4892
5013
|
//#endregion
|
|
4893
5014
|
//#region src/functions/toPercentBy100.ts
|
|
4894
|
-
function
|
|
4895
|
-
return
|
|
5015
|
+
function Er(e, t) {
|
|
5016
|
+
return Tr(e, t) * 100;
|
|
4896
5017
|
}
|
|
4897
5018
|
//#endregion
|
|
4898
5019
|
//#region src/functions/uint8ArrayToBase64.ts
|
|
4899
|
-
function
|
|
5020
|
+
function Dr(e) {
|
|
4900
5021
|
let t = "";
|
|
4901
5022
|
for (let n of e) t += String.fromCharCode(n);
|
|
4902
5023
|
if (s()) return window.btoa(t);
|
|
@@ -4908,7 +5029,7 @@ function Cr(e) {
|
|
|
4908
5029
|
}
|
|
4909
5030
|
//#endregion
|
|
4910
5031
|
//#region src/functions/writeClipboardData.ts
|
|
4911
|
-
async function
|
|
5032
|
+
async function Or(e) {
|
|
4912
5033
|
if (s()) try {
|
|
4913
5034
|
await navigator.clipboard.writeText(e);
|
|
4914
5035
|
} catch (n) {
|
|
@@ -4917,4 +5038,4 @@ async function wr(e) {
|
|
|
4917
5038
|
}
|
|
4918
5039
|
}
|
|
4919
5040
|
//#endregion
|
|
4920
|
-
export {
|
|
5041
|
+
export { F as Api, N as ApiCache, Be as ApiDataReturn, Ve as ApiDefault, We as ApiError, He as ApiErrorItem, Ue as ApiErrorStorage, Ge as ApiHeaders, qe as ApiHydration, Qe as ApiInstance, P as ApiMethodItem, Je as ApiPreparation, Ze as ApiResponse, Re as ApiStatus, $e as BroadcastMessage, nt as Cache, tt as CacheItem, rt as CacheStatic, Ee as Cookie, Ce as CookieBlock, Se as CookieBlockInstance, O as CookieStorage, D as DataStorage, at as Datetime, w as ErrorCenter, ue as ErrorCenterHandler, de as ErrorCenterInstance, Ne as EventItem, st as Formatters, V as FormattersType, ct as GEO_FLAG_ICON_NAME, k as Geo, lt as GeoFlag, ke as GeoInstance, L as GeoIntl, ut as GeoPhone, ft as GeoUnit, pt as Global, gt as Hash, ht as HashInstance, yt as Icons, M as Loading, Fe as LoadingInstance, Mt as Meta, G as MetaManager, At as MetaOg, Dt as MetaOpenGraphAge, Tt as MetaOpenGraphAvailability, Et as MetaOpenGraphCondition, Ot as MetaOpenGraphGender, q as MetaOpenGraphTag, wt as MetaOpenGraphType, Ct as MetaRobots, Nt as MetaStatic, K as MetaTag, jt as MetaTwitter, kt as MetaTwitterCard, J as MetaTwitterTag, Ft as Query, Pt as QueryInstance, It as ResumableTimer, Lt as ScrollbarWidth, Xt as SearchList, Ut as SearchListData, Wt as SearchListItem, Jt as SearchListMatcher, Yt as SearchListOptions, E as ServerStorage, Qt as StorageCallback, rn as TRANSLATE_GLOBAL_PREFIX, an as TRANSLATE_TIME_OUT, cn as Translate, on as TranslateFile, sn as TranslateInstance, De as UI_GEO_COOKIE_KEY, mt as UrlInstanceAbstract, Y as UrlItem, Ht as addTagHighlightMatch, x as anyToString, tn as applyTemplate, ln as arrFill, mn as blobToBase64, hn as capitalize, Z as copyObject, gn as copyObjectLite, U as createElement, _n as domQuerySelector, vn as domQuerySelectorAll, W as encodeAttribute, me as encodeLiteAttribute, Sn as ensureMaxSize, X as escapeExp, Cn as eventStopPropagation, m as executeFunction, Ye as executePromise, r as forEach, wn as frame, Tn as getArrayHighlightMatch, En as getAttributes, Dn as getClipboardData, it as getColumn, On as getCurrentDate, kn as getCurrentTime, A as getElement, jn as getElementId, yn as getElementImage, bt as getElementItem, je as getElementOrWindow, he as getElementSafeScript, Kt as getExactSearchExp, Gt as getExp, Nn as getFirst, ge as getHydrationData, B as getItemByPath, Pn as getKey, Fn as getLength, In as getLengthOfAllArray, Ln as getMaxLengthAllArray, Rn as getMinLengthAllArray, Vn as getMouseClient, zn as getMouseClientX, Bn as getMouseClientY, Hn as getObjectByKeys, Un as getObjectNoUndefined, Wn as getObjectOrNone, Gn as getOnlyText, qn as getRandomText, o as getRequestString, qt as getSearchExp, Rt as getSeparatingSearchExp, Jn as getStepPercent, Yn as getStepValue, Zn as goScroll, Qn as goScrollSmooth, $n as goScrollTo, tr as handleShare, nr as inArray, Mn as initGetElementId, rr as initScrollbarOffset, ir as intersectKey, nn as isApiSuccess, i as isArray, ar as isDifferent, oe as isDomData, s as isDomRuntime, or as isElementVisible, cr as isEnter, l as isFilled, lr as isFloat, p as isFunction, Me as isInDom, sr as isInput, ur as isIntegerBetween, dr as isMetaKey, c as isNull, h as isNumber, t as isObject, n as isObjectNotArray, u as isOnLine, b as isSelected, fr as isSelectedByList, er as isShare, d as isString, pr as isTab, Ae as isWindow, f as random, mr as removeCommonPrefix, hr as replaceComponentName, $ as replaceRecursive, _r as replaceTemplate, xn as resizeImageByMax, vr as secondToTime, xt as setElementItem, yr as setValues, ee as sleep, br as splice, Kn as strFill, se as strSplit, j as toArray, ot as toCamelCase, xr as toCamelCaseFirst, I as toDate, Sr as toKebabCase, y as toNumber, Cr as toNumberByMax, Tr as toPercent, Er as toPercentBy100, a as toString, T as transformation, Dr as uint8ArrayToBase64, gr as uniqueArray, Or as writeClipboardData };
|