mazey 4.13.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -6
- package/README.zh-CN.md +1028 -193
- package/lib/global.d.ts +5 -9
- package/lib/index.cjs.js +2 -2
- package/lib/index.d.ts +96 -42
- package/lib/index.esm.js +2 -2
- package/lib/mazey.min.js +2 -2
- package/lib/typing.d.ts +2 -2
- package/package.json +22 -11
- package/scripts/README.md +0 -38
- package/scripts/build-helper.js +0 -76
- package/scripts/change-package-name.js +0 -15
- package/scripts/dev.js +0 -7
- package/scripts/git-helper.js +0 -164
- package/scripts/release.js +0 -9
- package/scripts/rollup.config.mjs +0 -139
package/lib/index.d.ts
CHANGED
|
@@ -143,7 +143,7 @@ type SingleValueUrlParams = {
|
|
|
143
143
|
|
|
144
144
|
type ThrottleFunc<T extends (...args: any[]) => any> = (...args: Parameters<T>) => ReturnType<T> | null;
|
|
145
145
|
|
|
146
|
-
type DebounceFunc<T extends (...args: any[]) => any> = (...args: Parameters<T>) => ReturnType<T
|
|
146
|
+
type DebounceFunc<T extends (...args: any[]) => any> = (...args: Parameters<T>) => ReturnType<T> | null;
|
|
147
147
|
|
|
148
148
|
interface IsNumberOptions {
|
|
149
149
|
isNaNAsNumber?: boolean;
|
|
@@ -170,7 +170,7 @@ interface RepeatUntilOptions {
|
|
|
170
170
|
args?: Array<any>;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
type LoadScriptReturns = Promise<
|
|
173
|
+
type LoadScriptReturns = Promise<string>;
|
|
174
174
|
|
|
175
175
|
type SimpleType = string | number | boolean | null | undefined;
|
|
176
176
|
|
|
@@ -203,6 +203,9 @@ interface OnURLChangeOptions {
|
|
|
203
203
|
/**
|
|
204
204
|
* Copy/Clone Object deeply.
|
|
205
205
|
*
|
|
206
|
+
* Custom class instances are copied as plain objects containing their own
|
|
207
|
+
* properties. Unsupported native instances are preserved by reference.
|
|
208
|
+
*
|
|
206
209
|
* Usage:
|
|
207
210
|
*
|
|
208
211
|
* ```javascript
|
|
@@ -578,7 +581,7 @@ declare function floatToPercent(num: number, fixSize?: number): string;
|
|
|
578
581
|
*
|
|
579
582
|
* @category Util
|
|
580
583
|
*/
|
|
581
|
-
declare function floatFixed(num: string, size?: number): string;
|
|
584
|
+
declare function floatFixed(num: number | string, size?: number): string;
|
|
582
585
|
/**
|
|
583
586
|
* EN: Throttle, used to limit the frequency of function execution over time.
|
|
584
587
|
*
|
|
@@ -621,37 +624,56 @@ declare function throttle<T extends (...args: MazeyFnParams) => MazeyFnReturn>(f
|
|
|
621
624
|
*/
|
|
622
625
|
declare function debounce<T extends (...args: MazeyFnParams) => MazeyFnReturn>(func: T, wait: number, immediate?: boolean): DebounceFunc<T>;
|
|
623
626
|
/**
|
|
624
|
-
*
|
|
627
|
+
* Calculate the interval between two dates or timestamps.
|
|
625
628
|
*
|
|
626
|
-
*
|
|
629
|
+
* The default `d` type returns the number of whole days. The `text` type
|
|
630
|
+
* returns an English duration using days, hours, minutes, and seconds while
|
|
631
|
+
* omitting zero-valued units. A zero interval returns `"0 seconds"`. Any other
|
|
632
|
+
* type returns the number of whole seconds. Negative intervals and invalid
|
|
633
|
+
* dates return an empty string.
|
|
627
634
|
*
|
|
628
635
|
* Usage:
|
|
629
636
|
*
|
|
630
637
|
* ```javascript
|
|
631
|
-
* import {
|
|
638
|
+
* import { getDateDifference } from "mazey";
|
|
632
639
|
*
|
|
633
|
-
* const
|
|
634
|
-
* const
|
|
635
|
-
* const
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
640
|
+
* const days = getDateDifference(0, 90061000);
|
|
641
|
+
* const text = getDateDifference(0, 90061000, { type: "text" });
|
|
642
|
+
* const compactText = getDateDifference(0, 90060000, { type: "text" });
|
|
643
|
+
* const dateStringDays = getDateDifference(
|
|
644
|
+
* "2020-03-28 00:09:27",
|
|
645
|
+
* "2023-04-18 10:54:00"
|
|
646
|
+
* );
|
|
647
|
+
* console.log(days);
|
|
648
|
+
* console.log(text);
|
|
649
|
+
* console.log(compactText);
|
|
650
|
+
* console.log(dateStringDays);
|
|
639
651
|
* ```
|
|
640
652
|
*
|
|
641
653
|
* Output:
|
|
642
654
|
*
|
|
643
655
|
* ```text
|
|
656
|
+
* 1
|
|
657
|
+
* 1 day 1 hour 1 minute 1 second
|
|
658
|
+
* 1 day 1 hour 1 minute
|
|
644
659
|
* 1116
|
|
645
|
-
* 1116 天 10 时 44 分 33 秒
|
|
646
|
-
* 1116 天 10 时 44 分 33 秒
|
|
647
660
|
* ```
|
|
648
661
|
*
|
|
649
|
-
* @param
|
|
650
|
-
* @param
|
|
651
|
-
* @param
|
|
652
|
-
* @returns
|
|
662
|
+
* @param start Start date or timestamp.
|
|
663
|
+
* @param end End date or timestamp.
|
|
664
|
+
* @param options Formatting options. Use `d` for whole days or `text` for an English duration.
|
|
665
|
+
* @returns Whole days, whole seconds, an English duration, or an empty string for a negative or invalid interval.
|
|
666
|
+
* @remarks Strings in `YYYY-MM-DD HH:mm:ss` format are normalized and parsed as local time. Other date strings use the runtime's native `Date` parser; use timestamps or ISO strings with an explicit timezone when parsing must be portable.
|
|
653
667
|
* @category Util
|
|
654
668
|
*/
|
|
669
|
+
declare function getDateDifference(start?: number | string | Date, end?: number | string | Date, options?: {
|
|
670
|
+
type?: string;
|
|
671
|
+
}): number | string;
|
|
672
|
+
/**
|
|
673
|
+
* Alias of `getDateDifference`.
|
|
674
|
+
*
|
|
675
|
+
* @hidden
|
|
676
|
+
*/
|
|
655
677
|
declare function getFriendlyInterval(start?: number | string | Date, end?: number | string | Date, options?: {
|
|
656
678
|
type?: string;
|
|
657
679
|
}): number | string;
|
|
@@ -704,8 +726,7 @@ declare function formatDurationFromMs(durationMs: number): string;
|
|
|
704
726
|
* ```
|
|
705
727
|
*
|
|
706
728
|
* @param {*} num 被判断的值
|
|
707
|
-
* @param
|
|
708
|
-
* @param {boolean} options.isInfinityAsNumber 是否 无限 算数字(默认不算)
|
|
729
|
+
* @param options Controls whether `NaN`, `Infinity`, or other non-finite values count as numbers.
|
|
709
730
|
* @returns {boolean} true 是数字
|
|
710
731
|
* @category Util
|
|
711
732
|
*/
|
|
@@ -728,13 +749,13 @@ declare function isNumber(num: unknown, options?: IsNumberOptions): boolean;
|
|
|
728
749
|
* @param {function} fn 等待被执行的未知是否有效的函数
|
|
729
750
|
* @category Util
|
|
730
751
|
*/
|
|
731
|
-
declare function invokeFn(fn: MazeyFunction, ...params: Parameters<MazeyFunction>): ReturnType<MazeyFunction> | null;
|
|
752
|
+
declare function invokeFn(fn: MazeyFunction | null | undefined, ...params: Parameters<MazeyFunction>): ReturnType<MazeyFunction> | null;
|
|
732
753
|
/**
|
|
733
754
|
* Alias of `invokeFn`.
|
|
734
755
|
*
|
|
735
756
|
* @hidden
|
|
736
757
|
*/
|
|
737
|
-
declare function doFn(fn: MazeyFunction, ...params: Parameters<MazeyFunction>): ReturnType<MazeyFunction> | null;
|
|
758
|
+
declare function doFn(fn: MazeyFunction | null | undefined, ...params: Parameters<MazeyFunction>): ReturnType<MazeyFunction> | null;
|
|
738
759
|
/**
|
|
739
760
|
* Verify the validity of a non-empty array.
|
|
740
761
|
*
|
|
@@ -1099,7 +1120,7 @@ declare function unsanitize(str: string): string;
|
|
|
1099
1120
|
* @returns {string} 返回截取后的字符串
|
|
1100
1121
|
* @category Util
|
|
1101
1122
|
*/
|
|
1102
|
-
declare function cutZHString(str: string, len: number, options?: {
|
|
1123
|
+
declare function cutZHString(str: string | null | undefined, len: number, options?: {
|
|
1103
1124
|
hasDot?: boolean;
|
|
1104
1125
|
dotText?: string;
|
|
1105
1126
|
}): string;
|
|
@@ -1126,13 +1147,13 @@ declare function cutZHString(str: string, len: number, options?: {
|
|
|
1126
1147
|
* @returns {string} 返回截取后的字符串
|
|
1127
1148
|
* @hidden
|
|
1128
1149
|
*/
|
|
1129
|
-
declare function truncateZHString(str: string, len: number, hasDot?: boolean): string;
|
|
1150
|
+
declare function truncateZHString(str: string | null | undefined, len: number, hasDot?: boolean): string;
|
|
1130
1151
|
/**
|
|
1131
1152
|
* Alias of `truncateZHString`.
|
|
1132
1153
|
*
|
|
1133
1154
|
* @hidden
|
|
1134
1155
|
*/
|
|
1135
|
-
declare function cutCHSString(str: string, len: number, hasDot?: boolean): string;
|
|
1156
|
+
declare function cutCHSString(str: string | null | undefined, len: number, hasDot?: boolean): string;
|
|
1136
1157
|
/**
|
|
1137
1158
|
* Verify the validity of axios response.
|
|
1138
1159
|
*
|
|
@@ -1141,7 +1162,7 @@ declare function cutCHSString(str: string, len: number, hasDot?: boolean): strin
|
|
|
1141
1162
|
* @category Util
|
|
1142
1163
|
* @hidden
|
|
1143
1164
|
*/
|
|
1144
|
-
declare function zAxiosIsValidRes(res: ZResResponse | undefined, options?: ZResIsValidResOptions): boolean;
|
|
1165
|
+
declare function zAxiosIsValidRes(res: ZResResponse | undefined, options?: ZResIsValidResOptions | null): boolean;
|
|
1145
1166
|
/**
|
|
1146
1167
|
* Determine the validity of the data.
|
|
1147
1168
|
*
|
|
@@ -1226,6 +1247,42 @@ declare function getFileSize(size: number): string;
|
|
|
1226
1247
|
* @category Util
|
|
1227
1248
|
*/
|
|
1228
1249
|
declare function genHashCode(str: string): number;
|
|
1250
|
+
/**
|
|
1251
|
+
* Check whether an unknown value represents a valid date.
|
|
1252
|
+
*
|
|
1253
|
+
* Valid inputs include `Date` instances, finite millisecond timestamps,
|
|
1254
|
+
* structured local date strings, and ISO 8601 strings with `Z` or a numeric
|
|
1255
|
+
* timezone offset. Structured strings are parsed into numeric components and
|
|
1256
|
+
* validated strictly, so invalid calendar dates are not normalized.
|
|
1257
|
+
*
|
|
1258
|
+
* Supported string forms are `YYYY-MM-DD`, `YYYY-MM-DD HH:mm[:ss]`,
|
|
1259
|
+
* `YYYY-MM-DDTHH:mm[:ss]`, and the same `T`-separated date-time with `Z` or
|
|
1260
|
+
* a `+HH:mm`/`-HH:mm` offset. Zoned strings may include 1-3 millisecond digits.
|
|
1261
|
+
*
|
|
1262
|
+
* Usage:
|
|
1263
|
+
*
|
|
1264
|
+
* ```javascript
|
|
1265
|
+
* import { isValidDate } from "mazey";
|
|
1266
|
+
*
|
|
1267
|
+
* const ret1 = isValidDate(1577877720000);
|
|
1268
|
+
* const ret2 = isValidDate("2020-01-01 11:22");
|
|
1269
|
+
* const ret3 = isValidDate("2020-02-30");
|
|
1270
|
+
* const ret4 = isValidDate(new Date("invalid"));
|
|
1271
|
+
*
|
|
1272
|
+
* console.log(ret1, ret2, ret3, ret4);
|
|
1273
|
+
* ```
|
|
1274
|
+
*
|
|
1275
|
+
* Output:
|
|
1276
|
+
*
|
|
1277
|
+
* ```text
|
|
1278
|
+
* true true false false
|
|
1279
|
+
* ```
|
|
1280
|
+
*
|
|
1281
|
+
* @param value A `Date`, millisecond timestamp, or supported structured date string.
|
|
1282
|
+
* @returns Whether the value represents a valid date.
|
|
1283
|
+
* @category Util
|
|
1284
|
+
*/
|
|
1285
|
+
declare function isValidDate(value: unknown): boolean;
|
|
1229
1286
|
/**
|
|
1230
1287
|
* Return the formatted date string in the given format.
|
|
1231
1288
|
*
|
|
@@ -1256,11 +1313,12 @@ declare function genHashCode(str: string): number;
|
|
|
1256
1313
|
* @param {MazeyDate} dateIns Original Date
|
|
1257
1314
|
* @param {string} format Format String
|
|
1258
1315
|
* @returns {string} Return the formatted date string.
|
|
1316
|
+
* @throws {RangeError} If `dateIns` is not a valid date.
|
|
1259
1317
|
* @category Util
|
|
1260
1318
|
*/
|
|
1261
1319
|
declare function formatDate(dateIns?: MazeyDate, format?: string): string;
|
|
1262
1320
|
/**
|
|
1263
|
-
* Generate a Calendar Versioning string from a date.
|
|
1321
|
+
* Generate a local-time Calendar Versioning string from a date.
|
|
1264
1322
|
*
|
|
1265
1323
|
* The conceptual format is `yyyy.MMdd.HHmmss`. Leading zeroes are removed
|
|
1266
1324
|
* from each segment to keep numeric Semantic Versioning identifiers valid.
|
|
@@ -1282,6 +1340,7 @@ declare function formatDate(dateIns?: MazeyDate, format?: string): string;
|
|
|
1282
1340
|
*
|
|
1283
1341
|
* @param {MazeyDate} dateIns Original date. Defaults to the current date.
|
|
1284
1342
|
* @returns {string} Return the generated calendar version.
|
|
1343
|
+
* @throws {RangeError} If `dateIns` is not a valid date.
|
|
1285
1344
|
* @category Util
|
|
1286
1345
|
*/
|
|
1287
1346
|
declare function generateCalendarVersion(dateIns?: MazeyDate): string;
|
|
@@ -1391,11 +1450,7 @@ declare function getCurrentVersion(): string;
|
|
|
1391
1450
|
* ```
|
|
1392
1451
|
*
|
|
1393
1452
|
* @param callback The callback function to fire.
|
|
1394
|
-
* @param options
|
|
1395
|
-
* @param options.interval The interval between each firing of the callback function, in milliseconds. Defaults to 1000.
|
|
1396
|
-
* @param options.times The maximum number of times to fire the callback function. Defaults to 10.
|
|
1397
|
-
* @param options.context The context to use when calling the callback function. Defaults to null.
|
|
1398
|
-
* @param options.args An array of arguments to pass to the callback function.
|
|
1453
|
+
* @param options Controls the interval, maximum invocation count, callback context, and callback arguments.
|
|
1399
1454
|
* @param condition A function that takes the result of the callback function as its argument and returns a boolean value indicating whether the condition has been met. Defaults to a function that always returns true.
|
|
1400
1455
|
* @category Util
|
|
1401
1456
|
*/
|
|
@@ -2214,7 +2269,7 @@ declare function fireEvent(type: string, params?: MazeyObject): void;
|
|
|
2214
2269
|
*
|
|
2215
2270
|
* @hidden
|
|
2216
2271
|
*/
|
|
2217
|
-
declare function invokeEvent(type: string): void;
|
|
2272
|
+
declare function invokeEvent(type: string, params?: MazeyObject): void;
|
|
2218
2273
|
/**
|
|
2219
2274
|
* Remove event.
|
|
2220
2275
|
*
|
|
@@ -2230,7 +2285,7 @@ declare function invokeEvent(type: string): void;
|
|
|
2230
2285
|
* @param fn
|
|
2231
2286
|
* @category Event
|
|
2232
2287
|
*/
|
|
2233
|
-
declare function removeEvent(type: string, fn
|
|
2288
|
+
declare function removeEvent(type: string, fn?: MazeyFn): void;
|
|
2234
2289
|
|
|
2235
2290
|
/**
|
|
2236
2291
|
* EN: Handle Storage (Keep fit for JSON, it can transfer format automatically).
|
|
@@ -2503,7 +2558,7 @@ declare function delCookie(name: string): void;
|
|
|
2503
2558
|
*/
|
|
2504
2559
|
declare function loadCSS(url: string, options?: {
|
|
2505
2560
|
id?: string;
|
|
2506
|
-
}): Promise<
|
|
2561
|
+
}): Promise<string>;
|
|
2507
2562
|
/**
|
|
2508
2563
|
* EN: Load a JavaScript file from the server and execute it.
|
|
2509
2564
|
*
|
|
@@ -2590,7 +2645,7 @@ declare function loadScript(url: string, options?: {
|
|
|
2590
2645
|
* @returns {Promise<string>} document is loaded? "complete" "load" / "timeout"
|
|
2591
2646
|
* @category Load
|
|
2592
2647
|
*/
|
|
2593
|
-
declare function windowLoaded(timeout?: number): Promise<string
|
|
2648
|
+
declare function windowLoaded(timeout?: number): Promise<string>;
|
|
2594
2649
|
/**
|
|
2595
2650
|
* Load an image from the given URL.
|
|
2596
2651
|
*
|
|
@@ -2815,7 +2870,6 @@ declare function getTTFB(): Promise<number>;
|
|
|
2815
2870
|
* @remarks
|
|
2816
2871
|
* This function uses the [`PerformanceNavigationTiming`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming) API to get page load time data.
|
|
2817
2872
|
* The `PerformanceNavigationTiming` API provides more accurate and detailed information about page load time than the deprecated [`PerformanceTiming`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceTiming) API.
|
|
2818
|
-
* If you are using an older browser that does not support `PerformanceNavigationTiming`, you can still use the `PerformanceTiming` API by using the previous version of this library ([`v3.9.7`](https://github.com/chengchuu/mazey/releases/tag/v3.9.7)).
|
|
2819
2873
|
*
|
|
2820
2874
|
* Usage:
|
|
2821
2875
|
*
|
|
@@ -2857,7 +2911,7 @@ declare function getTTFB(): Promise<number>;
|
|
|
2857
2911
|
* @returns {Promise<object>} 加载数据
|
|
2858
2912
|
* @category Perf
|
|
2859
2913
|
*/
|
|
2860
|
-
declare function getPerformance(camelCase?: boolean): Promise<WebPerformance
|
|
2914
|
+
declare function getPerformance(camelCase?: boolean): Promise<WebPerformance>;
|
|
2861
2915
|
|
|
2862
2916
|
/**
|
|
2863
2917
|
* Detect whether the current browser document provides the minimum
|
|
@@ -2886,7 +2940,7 @@ declare function getPerformance(camelCase?: boolean): Promise<WebPerformance | E
|
|
|
2886
2940
|
* true
|
|
2887
2941
|
* ```
|
|
2888
2942
|
*
|
|
2889
|
-
* @
|
|
2943
|
+
* @remarks Browser only.
|
|
2890
2944
|
* @returns Whether the detectable minimum PWA prerequisites are satisfied.
|
|
2891
2945
|
* @category Browser Information
|
|
2892
2946
|
*/
|
|
@@ -2933,7 +2987,7 @@ declare function isSafePWAEnv(): boolean;
|
|
|
2933
2987
|
* const isMobileQQ = ["android", "ios"].includes(system) && ["qq_browser", "qq_app"].includes(shell);
|
|
2934
2988
|
* ```
|
|
2935
2989
|
*
|
|
2936
|
-
* @
|
|
2990
|
+
* @remarks Browser only.
|
|
2937
2991
|
* @returns Browser information
|
|
2938
2992
|
* @category Browser Information
|
|
2939
2993
|
*/
|
|
@@ -2958,7 +3012,7 @@ declare function getBrowserInfo(): BrowserInfo;
|
|
|
2958
3012
|
* ["windows", "desktop", "webkit", "chrome"]
|
|
2959
3013
|
* ```
|
|
2960
3014
|
*
|
|
2961
|
-
* @
|
|
3015
|
+
* @remarks Browser only.
|
|
2962
3016
|
* @param {string} prefix
|
|
2963
3017
|
* @returns {array} Browser attributes
|
|
2964
3018
|
* @category Browser Information
|
|
@@ -3063,4 +3117,4 @@ declare const mazeyCon: Console;
|
|
|
3063
3117
|
*/
|
|
3064
3118
|
declare const timeCon: Console;
|
|
3065
3119
|
|
|
3066
|
-
export { addClass, addEvent, addStyle, calLongestCommonSubsequence, calLongestCommonSubstring, camelCase2Underscore, camelCaseToKebabCase, cancelBubble, clearHTML, clearHtml, convert10To26, convertCamelToKebab, convertCamelToUnder, convertHttpToHttps, convertKebabToCamel, convertObjectToQuery, convertToHtmlBreaks, convertUnderToCamel, cutCHSString, cutZHString, debounce, deepCopy, deepCopyObject, deepFreeze, delCookie, doFn, fireEvent, floatFixed, floatToPercent, formatDate, formatDurationFromMs, genBrowserAttrs, genCustomConsole, genHashCode, genRndNumString, genStyleString, genUniqueNumString, generateCalendarVersion, generateRndNum, generateUniqueNum, getAllQueryParams, getBrowserInfo, getCLS, getCookie, getCurrentVersion, getDefineListeners, getDomain, getFCP, getFID, getFP, getFileSize, getFriendlyInterval, getHashQueryParam, getLCP, getLocalStorage, getPageMeta, getPerformance, getQueryParam, getScriptQueryParam, getSessionStorage, getTTFB, getUrlFileType, getUrlHost, getUrlParam, getUrlPath, hasClass, inRate, invokeEvent, invokeFn, isArray, isBool, isBoolean, isBrowser, isFunction, isHit, isJSONString, isJsonString, isNonEmptyArray, isNonEmptyObject, isNumber, isPureObject, isSafePWAEnv, isString, isSupportWebp, isSupportedEntryType, isUdfOrNul, isValidData, isValidEmail, isValidHttpUrl, isValidPhoneNumber, isValidUrl, loadCSS, loadImage, loadScript, loadScriptIfUndefined, longestComSubsequence, longestComSubstring, mNow, mTrim, mazeyCon, newLine, onURLChange, removeClass, removeCookie, removeEvent, removeHTML, removeHtml, repeatUntilConditionMet, replaceHttp, sanitizeInput, setClass, setCookie, setImgSizeBySrc, setImgWidHeiBySrc, setLocalStorage, setSessionStorage, sleep, throttle, timeCon, truncateZHString, unsanitize, unsanitizeInput, updateQueryParam, waitTime, windowLoaded, zAxiosIsValidRes };
|
|
3120
|
+
export { addClass, addEvent, addStyle, calLongestCommonSubsequence, calLongestCommonSubstring, camelCase2Underscore, camelCaseToKebabCase, cancelBubble, clearHTML, clearHtml, convert10To26, convertCamelToKebab, convertCamelToUnder, convertHttpToHttps, convertKebabToCamel, convertObjectToQuery, convertToHtmlBreaks, convertUnderToCamel, cutCHSString, cutZHString, debounce, deepCopy, deepCopyObject, deepFreeze, delCookie, doFn, fireEvent, floatFixed, floatToPercent, formatDate, formatDurationFromMs, genBrowserAttrs, genCustomConsole, genHashCode, genRndNumString, genStyleString, genUniqueNumString, generateCalendarVersion, generateRndNum, generateUniqueNum, getAllQueryParams, getBrowserInfo, getCLS, getCookie, getCurrentVersion, getDateDifference, getDefineListeners, getDomain, getFCP, getFID, getFP, getFileSize, getFriendlyInterval, getHashQueryParam, getLCP, getLocalStorage, getPageMeta, getPerformance, getQueryParam, getScriptQueryParam, getSessionStorage, getTTFB, getUrlFileType, getUrlHost, getUrlParam, getUrlPath, hasClass, inRate, invokeEvent, invokeFn, isArray, isBool, isBoolean, isBrowser, isFunction, isHit, isJSONString, isJsonString, isNonEmptyArray, isNonEmptyObject, isNumber, isPureObject, isSafePWAEnv, isString, isSupportWebp, isSupportedEntryType, isUdfOrNul, isValidData, isValidDate, isValidEmail, isValidHttpUrl, isValidPhoneNumber, isValidUrl, loadCSS, loadImage, loadScript, loadScriptIfUndefined, longestComSubsequence, longestComSubstring, mNow, mTrim, mazeyCon, newLine, onURLChange, removeClass, removeCookie, removeEvent, removeHTML, removeHtml, repeatUntilConditionMet, replaceHttp, sanitizeInput, setClass, setCookie, setImgSizeBySrc, setImgWidHeiBySrc, setLocalStorage, setSessionStorage, sleep, throttle, timeCon, truncateZHString, unsanitize, unsanitizeInput, updateQueryParam, waitTime, windowLoaded, zAxiosIsValidRes };
|
package/lib/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Mazey
|
|
2
|
+
* Mazey v5.0.0 https://github.com/chengchuu/mazey
|
|
3
3
|
* (c) 2018-2026 Cheng
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}function n(n){return function(t){if(Array.isArray(t))return e(t)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||t(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,c,"next",e)}function c(e){r(a,o,i,u,c,"throw",e)}u(void 0)})}}function i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,n)||t(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}function c(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f,l={exports:{}},p={exports:{}};(f=p).exports=function(e,t){this.v=e,this.k=t},f.exports.__esModule=!0,f.exports.default=f.exports;var d=p.exports,v={exports:{}},h={exports:{}};!function(e){function t(n,r,o,i){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,o){function i(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(h);var g=h.exports;!function(e){var t=g;function n(){var r,o,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.toStringTag||"@@toStringTag";function c(e,n,i,a){var u=n&&n.prototype instanceof f?n:f,c=Object.create(u.prototype);return t(c,"_invoke",function(e,t,n){var i,a,u,c=0,f=n||[],l=!1,p={p:0,n:0,v:r,a:d,f:d.bind(r,4),d:function(e,t){return i=e,a=0,u=r,p.n=t,s}};function d(e,t){for(a=e,u=t,o=0;!l&&c&&!n&&o<f.length;o++){var n,i=f[o],d=p.p,v=i[2];e>3?(n=v===t)&&(u=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=r):i[0]<=d&&((n=e<2&&d<i[1])?(a=0,p.v=t,p.n=i[1]):d<v&&(n=e<3||i[0]>t||t>v)&&(i[4]=e,i[5]=t,p.n=v,a=0))}if(n||e>1)return s;throw l=!0,t}return function(n,f,v){if(c>1)throw TypeError("Generator is already running");for(l&&1===f&&d(f,v),a=f,u=v;(o=a<2?r:u)||!l;){i||(a?a<3?(a>1&&(p.n=-1),d(a,u)):p.n=u:p.v=u);try{if(c=2,i){if(a||(n="next"),o=i[n]){if(!(o=o.call(i,u)))throw TypeError("iterator result is not an object");if(!o.done)return o;u=o.value,a<2&&(a=0)}else 1===a&&(o=i.return)&&o.call(i),a<2&&(u=TypeError("The iterator does not provide a '"+n+"' method"),a=1);i=r}else if((o=(l=p.n<0)?u:e.call(t,p))!==s)break}catch(e){i=r,a=1,u=e}finally{c=1}}return{value:o,done:l}}}(e,i,a),!0),c}var s={};function f(){}function l(){}function p(){}o=Object.getPrototypeOf;var d=[][a]?o(o([][a]())):(t(o={},a,function(){return this}),o),v=p.prototype=f.prototype=Object.create(d);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,t(e,u,"GeneratorFunction")),e.prototype=Object.create(v),e}return l.prototype=p,t(v,"constructor",p),t(p,"constructor",l),l.displayName="GeneratorFunction",t(p,u,"GeneratorFunction"),t(v),t(v,u,"Generator"),t(v,a,function(){return this}),t(v,"toString",function(){return"[object Generator]"}),(e.exports=n=function(){return{w:c,m:h}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(v);var m=v.exports,y={exports:{}},w={exports:{}},b={exports:{}};!function(e){var t=d,n=g;e.exports=function e(r,o){function i(e,n,a,u){try{var c=r[e](n),s=c.value;return s instanceof t?o.resolve(s.v).then(function(e){i("next",e,a,u)},function(e){i("throw",e,a,u)}):o.resolve(s).then(function(e){c.value=e,a(c)},function(e){return i("throw",e,a,u)})}catch(e){u(e)}}var a;this.next||(n(e.prototype),n(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),n(this,"_invoke",function(e,t,n){function r(){return new o(function(t,r){i(e,n,t,r)})}return a=a?a.then(r,r):r()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports}(b);var x=b.exports;!function(e){var t=m,n=x;e.exports=function(e,r,o,i,a){return new n(t().w(e,r,o,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports}(w);var O=w.exports;!function(e){var t=O;e.exports=function(e,n,r,o,i){var a=t(e,n,r,o,i);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports}(y);var S=y.exports,_={exports:{}};!function(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports}(_);var E=_.exports,j={exports:{}},A={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(A);var P=A.exports;!function(e){var t=P.default;e.exports=function(e){if(null!=e){var n=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(t(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports}(j);var T=j.exports;!function(e){var t=d,n=m,r=S,o=O,i=x,a=E,u=T;function c(){var s=n(),f=s.m(c),l=(Object.getPrototypeOf?Object.getPrototypeOf(f):f.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function v(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,d[e],t)},delegateYield:function(e,o,i){return t.resultName=o,n(r.d,u(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=c=function(){return{wrap:function(e,t,n,r){return s.w(v(e),t,n,r&&r.reverse())},isGeneratorFunction:p,mark:s.m,awrap:function(e,n){return new t(e,n)},AsyncIterator:i,async:function(e,t,n,i,a){return(p(t)?o:r)(v(e),t,n,i,a)},keys:a,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports}(l);var k=(0,l.exports)(),M=k;try{regeneratorRuntime=k}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=k:Function("r","regeneratorRuntime = r")(k)}var N=s(M);function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function D(e){if("object"!=typeof e)return e;var t=["string","number","boolean","undefined"];return Object.values(e).every(function(e){return t.includes(typeof e)})?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e):JSON.parse(JSON.stringify(e))}function C(e){return!e||"object"!=typeof e||Object.isFrozen(e)?e:(Object.values(e).forEach(C),Object.freeze(e))}function z(e){return D(e)}function F(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===t[0]?t.substring(1):t}function I(e){var t=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return t.endsWith("-")?t.slice(0,-1):t}function L(e){return F(e)}function U(e){var t=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===t[0]?t.substring(1):t}function B(e){return e.replace(/_([a-z])/g,function(e,t){return t.toUpperCase()})}function q(e){return U(e)}function Z(e){for(var t=(e=e.replace(/^\s+/,"")).length-1,n=/\s/;n.test(e.charAt(t));)t--;return e.slice(0,t+1)}function $(e){try{if("object"==typeof JSON.parse(e))return!0}catch(e){}return!1}function W(e){return $(e)}function G(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,t="";e--;)t+=Math.floor(10*Math.random());return t}function V(){return G(arguments.length>0&&void 0!==arguments[0]?arguments[0]:5)}function J(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[H(),V(e||3)];return t[0]+t[1]}function Y(){return J(arguments.length>0&&void 0!==arguments[0]?arguments[0]:3)}function H(){return Date.now?Date.now():(new Date).getTime()}function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n="";return n=t?(100*e).toFixed(t):String(Math.floor(100*e)),"".concat(n,"%")}function Q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(e).toFixed(t)}function X(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=Object.assign({},n);var r=null,o=null,i=null,a=null,u=0,c=function(){u=!1===n.leading?0:H(),i=null,a=e.apply(this,o),i||(r=o=null)};return function(){var s=H();u||!1!==n.leading||(u=s);var f=t-(s-u);r=this;for(var l=arguments.length,p=new Array(l),d=0;d<l;d++)p[d]=arguments[d];return o=p,f<=0||f>t?(i&&(clearTimeout(i),i=null),u=s,a=e.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(c.bind(r),f)),a}}function ee(e,t,n){var r=null,o=null,i=null,a=null,u=null,c=function(){var s=H()-i;s<t&&s>=0?o=setTimeout(c,t-s):(o=null,n||(u=e.apply(r,a),o||(r=a=null)))};return function(){r=this;for(var s=arguments.length,f=new Array(s),l=0;l<s;l++)f[l]=arguments[l];a=f,i=H();var p=n&&!o;return o||(o=setTimeout(c,t)),p&&(u=e.apply(r,a),r=a=null),u}}var te={type:"d"};function ne(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:te,r=(n=Object.assign(te,n)).type,o=decodeURIComponent;ie(e)||(e=new Date(e).getTime()),ie(t)||(t=new Date(t).getTime());var a=Number(t)-Number(e),u="",c=i(new Array(4).fill(0),4),s=c[0],f=(c[1],c[2],c[3]),l=o("%20%E5%A4%A9%20"),p=o("%20%E6%97%B6%20"),d=o("%20%E5%88%86%20"),v=o("%20%E7%A7%92");if(a>=0)switch(s=Math.floor(a/1e3/60/60/24),Math.floor(a/1e3/60/60),Math.floor(a/1e3/60),f=Math.floor(a/1e3),r){case"d":u=s;break;case"text":u=(s=Math.floor(a/1e3/60/60/24))+l+Math.floor(a/1e3/60/60%24)+p+Math.floor(a/1e3/60%60)+d+(f=Math.floor(a/1e3%60))+v;break;default:u=f}return u}function re(e,t){var n=Math.round(10*e)/10,r=1===n?t:"".concat(t,"s");return"".concat(n," ").concat(r)}function oe(e){var t=(Number.isFinite(e)?Math.max(e,0):0)/1e3;return t>=86400?re(t/24/60/60,"day"):t>=3600?re(t/60/60,"hour"):t>=60?re(t/60,"minute"):re(t,"second")}function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isNaNAsNumber,r=void 0!==n&&n,o=t.isInfinityAsNumber,i=void 0!==o&&o,a=t.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!r&&isNaN(e)))}function ae(e){var t=null;if(e&&"function"==typeof e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t=e.apply(void 0,r)}return t}function ue(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return ae.apply(void 0,[e].concat(n))}function ce(e){var t=!1;return Array.isArray(e)&&e.length&&(t=!0),t}function se(e){var t=Boolean(e),n="object"==typeof e,r="[object Object]"===Object.prototype.toString.call(e);return t&&n&&r}function fe(e){return"function"==typeof e}function le(e){return"string"==typeof e}function pe(e){return"boolean"==typeof e}function de(e){return pe(e)}function ve(e){return null==e}function he(e){return"[object Array]"===Object.prototype.toString.call(e)}function ge(e){return!!se(e)&&0!==Object.keys(e).length}function me(e){if(!e)return"";var t=new RegExp("\\n","g");return e.replace(t,"<br />")}function ye(e){return me(e)}function we(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).removeNewLine,n=void 0!==t&&t,r="";return e&&(r=e.replace(/<\/?.+?>/g,""),n&&(r=r.replace(/[\r\n]/g,""))),r}function be(e){return we(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function xe(e){return we(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function Oe(e){return we(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function Se(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,function(e){return t[e]})}function _e(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&|<|>|"|'|/)/g,function(e){return t[e]})}function Ee(e){return _e(e)}function je(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{hasDot:!1,dotText:"..."};if(n=Object.assign({hasDot:!1,dotText:"..."},n),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",u=e.replace(i,"**").length,c=0;c<u&&(null!=(a=e.charAt(c).toString()).match(i)?r+=2:r++,!(r>t));c++)o+=a;return n.hasDot&&u>t&&(o+=n.dotText),o}return""}function Ae(e,t){return je(e,t,{hasDot:arguments.length>2&&void 0!==arguments[2]&&arguments[2]})}function Pe(e,t){return Ae(e,t,arguments.length>2&&void 0!==arguments[2]&&arguments[2])}function Te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{validStatusRange:[200,300],validCode:[0]},n=Object.assign({validStatusRange:[200,300],validCode:[0]},t),r=n.validStatusRange,o=n.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i}function ke(e,t,n){var r=!1;return"object"!=typeof e||t.reduce(function(e,t){return void 0===e[t]?Object.create(null):e=e[t]},e)===n&&(r=!0),r}function Me(e){var t=function(e){return String(Math.ceil(e))};if(!e||e<0)return"";var n=1024;return e<n?e+" B":e<Math.pow(n,2)?t(e/n)+" KB":e<Math.pow(n,3)?t(e/Math.pow(n,2))+" MB":e<Math.pow(n,4)?t(e/Math.pow(n,3))+" G":t(e/Math.pow(n,4))+" T"}function Ne(e){var t,n=0;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n}function Re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd";e||(e=new Date);var n=new Date(e),r=n.getHours(),o={yyyy:n.getFullYear(),MM:n.getMonth()+1,dd:n.getDate()<10?"0"+n.getDate():n.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),ss:n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds(),a:r<12?"AM":"PM"},i=t||"yyyy-MM-dd";return Object.keys(o).forEach(function(e){var t=o[e];"MM"===e&&Number(t)<=9&&(t="0".concat(t)),i=i.replace(e,String(t))}),i}function De(e){return Re(void 0===e?new Date:new Date(e instanceof Date?e.getTime():e),"yyyy.MMdd.HHmmss").split(".").map(function(e){return String(Number(e))}).join(".")}function Ce(e){return/^1\d{10}$/.test(e)}function ze(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function Fe(e){for(var t="";e>0;){var n=e%26;0===n&&(n=26),t=String.fromCharCode(n+96)+t,e=(e-n)/26}return t}function Ie(){return"v4"}function Le(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return!0===e},r=t.interval,i=void 0===r?1e3:r,a=t.times,u=void 0===a?10:a,c=t.context,s=t.args,f=0,l=function(){setTimeout(o(N.mark(function t(){var r;return N.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.apply(c,s);case 1:if(r=t.sent,!(n(r)||++f>=u)){t.next=2;break}return t.abrupt("return");case 2:l();case 3:case"end":return t.stop()}},t)})),i)};"function"!=typeof e&&console.error("Expected a function."),("number"!=typeof i||i<0)&&console.error("Expected a non-negative number for interval."),("number"!=typeof u||u<0)&&console.error("Expected a non-negative number for times."),l()}function Ue(e){return Be.apply(this,arguments)}function Be(){return(Be=o(N.mark(function e(t){return N.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e){setTimeout(function(){e(t)},t)}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function qe(e){return Ze.apply(this,arguments)}function Ze(){return(Ze=o(N.mark(function e(t){return N.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ue(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}var $e="";function We(){if($e)return"browser"===$e;var e="undefined"!=typeof window;return e&&($e="browser"),e}function Ge(e,t){for(var r=e.length,o=t.length,i=D(new Array(r).fill(new Array(o).fill(0))),a=0;a<r;++a)for(var u=0;u<o;++u)if(e[a]===t[u]){var c=0;a>0&&u>0&&(c=i[a-1][u-1]),i[a][u]=c+1}var s=Array.prototype.concat.apply([],i);return Math.max.apply(Math,n(s))}function Ve(e,t){return Ge(e,t)}function Je(e,t){for(var r=e.length,o=t.length,i=D(new Array(r).fill(new Array(o).fill(0))),a=0;a<r;++a)for(var u=0;u<o;++u)if(e[a]===t[u]){var c=0;a>0&&u>0&&(c=i[a-1][u-1]),i[a][u]=c+1}else{var s=0,f=0;u>0&&(s=i[a][u-1]),a>0&&(f=i[a-1][u]),i[a][u]=Math.max(s,f)}var l=Array.prototype.concat.apply([],i);return Math.max.apply(Math,n(l))}function Ye(e,t){return Je(e,t)}function He(e){return Math.random()<e}function Ke(e){return He(e)}function Qe(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=location.search.substring(1).match(t);return null!==n?decodeURIComponent(n[2]):""}function Xe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";""===e&&(e=location.search);var t={};return e.replace(/\??(\w+)=([^&]*)&?/g,function(e,n,r){return void 0===t[n]&&(t[n]=decodeURIComponent(r)),""}),t}function et(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null;if(e.includes("#")){r=new URL(e).searchParams.getAll(t)}else{var o={};e.replace(/\??(\w+)=([^&]*)&?/g,function(e,t,n){return void 0!==o[t]?o[t].push(n):o[t]=[n],""}),r=o[t]||[]}return n.returnArray?r:r.length?r[0]:null}function tt(e,t,n){if(e.includes("#")){var r=new URL(e);return r.searchParams.set(t,n),r.toString()}var o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),i=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+n+"$2"):e+i+t+"="+n}function nt(e){var t=location.hash.split("?");if(1===t.length)return"";var n=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=t[1].match(n);return r?r[2]:""}function rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["hostname"];if(lt(e)){var n=new window.URL(e);return t.reduce(function(e,t){return e+=n[t]},"")}var r=document.createElement("a");return r.href=e,t.reduce(function(e,t){return e+=r[t]},"")}function ot(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b()!@:%_+.~#?&//=]*)$/.test(e)}function it(e){var t=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/;return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{strict:!0}).strict||(t=/^(https?:)?\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/),t.test(e)}function at(e){var t="";if("string"!=typeof e||""==e)return t;var n=/\.[^/?#]+$/.exec(e);return n?(n[0].length>1&&(t=n[0].substring(1)),t):t}function ut(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";t||(t=".js");for(var n=new RegExp("[?&]".concat(e,"=([^&]*)")),r=document.querySelectorAll('script[src*="'.concat(t,'"]')),o=0;o<r.length;o++){var i=r[o].getAttribute("src");if(i&&-1!==i.indexOf(t)){var a=i.match(n);if(a)return decodeURIComponent(a[1])}}return""}function ct(e){if(e&&0===Object.keys(e).length)return"";var t="?";for(var n in e)t+="".concat(n,"=").concat(e[n],"&");return t.slice(0,-1)}function st(e){return e.replace(/^http:/,"https:")}function ft(e){return st(e)}function lt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=window.URL;if(!t)return!1;if(!t.canParse)return!1;if("function"!=typeof t.canParse)return!1;try{var n=new t("b","http://a");return n.pathname="c d","http://a/c%20d"===n.href&&Boolean(n.searchParams)&&t.canParse(e)}catch(e){return!1}}function pt(e){var t="";(!it(e)&&it(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),lt(e))&&(t=new URL(e).host);return t}function dt(e){var t="";(!it(e)&&it(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),lt(e))&&(t=new URL(e).pathname);return t}function vt(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fireOnInit,n=void 0===t||t,r=history,o=location.href,i=[],a=function(t){var n=location.href;if(n!==o||"load"===t){var r=o;o=n,e({url:n,oldUrl:r,trigger:t})}},u=function(){return a("popstate")},c=function(){return a("hashchange")};window.addEventListener("popstate",u),window.addEventListener("hashchange",c),i.push(function(){return window.removeEventListener("popstate",u)}),i.push(function(){return window.removeEventListener("hashchange",c)}),r.__mazeyUrlChangePatched__||(r.__mazeyUrlChangePatched__=!0,r.__mazeyUrlChangeSubscribers__=new Set,r.__mazeyRawPushState__=history.pushState.bind(history),r.__mazeyRawReplaceState__=history.replaceState.bind(history),history.pushState=function(){r.__mazeyRawPushState__.apply(r,arguments),r.__mazeyUrlChangeSubscribers__.forEach(function(e){return e("pushState")})},history.replaceState=function(){r.__mazeyRawReplaceState__.apply(r,arguments),r.__mazeyUrlChangeSubscribers__.forEach(function(e){return e("replaceState")})});var s=function(e){return a(e)};return r.__mazeyUrlChangeSubscribers__.add(s),i.push(function(){return r.__mazeyUrlChangeSubscribers__.delete(s)}),n&&a("load"),function(){i.forEach(function(e){return e()})}}function ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ht(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ht(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var mt={enabled:!0,isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",isStringifyObject:!1,logFn:function(){},errorFn:function(){}};function yt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gt({},mt),r=Object.assign(gt({},mt),t),o=r.enabled,i=r.isClosed,a=r.showWrap,u=r.showDate,c=r.locales,s=r.isStringifyObject,f=r.logFn,l=r.errorFn,p=o;!0===i&&(wt.warn("The options.isClosed is deprecated. Please use options.enabled instead."),p=!1);var d=Object.create(null),v=function(){return(new Date).toLocaleDateString(c,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach(function(t){d[t]=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];if(p){var c,d,h=e,g=e;if("string"==typeof e&&e.length>=2){var m=e.length;h=":"===e[m-1]?e.substring(0,m-1):e}if(a&&console.log("--- ".concat(h," - begin ---")),u&&(g=e?"".concat(v()," ").concat(e):"".concat(v())),s&&(o=o.map(function(e){return se(e)?JSON.stringify(e):e})),e||u)(c=console)[t].apply(c,[g].concat(n(o)));else(d=console)[t].apply(d,n(o));"log"===t&&f(),"error"===t&&l(),a&&console.log("--- ".concat(h," - end ---"))}}}),d}var wt=yt("[Mazey]"),bt=yt("",{showDate:!0,locales:"zh-CN",isStringifyObject:!0});function xt(e,t){if(!e)return wt.error("The element is not exist."),!1;for(var n=e.className.split(/\s+/),r=0;r<n.length;r++)if(n[r]===t)return!0;return!1}function Ot(e,t){if(e)if(Array.isArray(t))t.forEach(function(t){e.classList.add(t)});else{for(var n=e.className,r=n.split(/\s+/),o=0;o<r.length;o++)if(r[o]===t)return;var i,a="";""!==n&&(a=" "),i=n+a+t,e.className=i}else wt.error("The element is not exist.")}function St(e,t){Ot(e,t)}function _t(e,t){var n;e?(n=(n=(n=(n=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+t+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=n):wt.error("The element is not exist.")}function Et(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:""};if(!e)return!1;var n=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return t.id?(o="".concat(t.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",t.id),i.innerHTML=e,n.appendChild(i),document.head.appendChild(n))):(i.innerHTML=e,n.appendChild(i),document.head.appendChild(n)),!0}function jt(){var e=window.jQuery||window.$;if(e){var t=e("img");return!(!t||!t.length)&&(t.each(function(){var t=e(this);if(t){var n=t.attr("src");if(n&&"string"==typeof n&&n.length){var r=n.match(/width=([0-9]+[a-z%]*)/),o=n.match(/height=([0-9]+[a-z%]*)/);r&&ce(r)&&r[1]&&t.width(r[1]),o&&ce(o)&&o[1]&&t.height(o[1])}}}),!0)}var n=document.getElementsByTagName("img");return n.length>0&&(Array.from(n).forEach(function(e){var t=e;if(t){var n=t.getAttribute("src");if(n&&"string"==typeof n&&n.length){var r=n.match(/width=([0-9]+[a-z%]*)/),o=n.match(/height=([0-9]+[a-z%]*)/);r&&ce(r)&&r[1]&&(t.style.width=r[1]),o&&ce(o)&&o[1]&&(t.style.height=o[1])}}}),!0)}function At(){return jt()}function Pt(e,t){var n="";return t&&t.length>0&&(n=t.join(";")+";"),"".concat(e,"{").concat(n,"}")}function Tt(e){var t;return document.querySelector&&(null===(t=document.querySelector('meta[name="'.concat(e,'"]')))||void 0===t?void 0:t.getAttribute("content"))||""}function kt(e){var t=e||window.event;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Mt(){var e=window.MAZEY_DEFINE_LISTENERS;return"object"!=typeof e&&(e={},window.MAZEY_DEFINE_LISTENERS=e),e}function Nt(e,t){var n=Mt();void 0===n[e]&&(n[e]=[]),"function"==typeof t&&n[e].push(t)}function Rt(e,t){var n=Mt()[e];if(n instanceof Array)for(var r=0,o=n.length;r<o;r++)"function"==typeof n[r]&&(void 0===t?n[r]():n[r](t))}function Dt(e){Rt(e)}function Ct(e,t){var n=Mt(),r=n[e];if("string"==typeof e&&r instanceof Array)if("function"==typeof t){for(var o=0,i=r.length;o<i;o++)if(r[o]===t){n[e].splice(o,1);break}}else delete n[e]}function zt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e&&sessionStorage.setItem(e,JSON.stringify(t))}function Ft(e){var t=null;if(e){var n=sessionStorage.getItem(e);n&&(t=JSON.parse(n))}return t}function It(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e&&localStorage.setItem(e,JSON.stringify(t))}function Lt(e){var t=null;if(e){var n=localStorage.getItem(e);n&&(t=JSON.parse(n))}return t}function Ut(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""}function Bt(e,t,n,r){var o,i;if(n){var a=new Date;a.setTime(a.getTime()+24*n*60*60*1e3),i="; expires="+a.toUTCString()}else i="";var u=location.host;1===u.split(".").length?document.cookie=e+"="+t+i+"; path=/":((o=u.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+t+i+"; path=/; domain="+r,null!==Ut(e)&&Ut(e)===t||(r=r||"."+u,document.cookie=e+"="+t+i+"; path=/; domain="+r))}function qt(e){for(var t=document.cookie.split(";"),n=0;n<t.length;n++){var r=t[n].trim();if(r.startsWith("".concat(e,"="))){var o=r.split("=")[0],i=new Date;return i.setTime(i.getTime()-1),document.cookie="".concat(o,"=;expires=").concat(i.toUTCString()),!0}}return!1}function Zt(e){qt(e)}function $t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$t(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gt(e){var t,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:""}).id,r=function(){},o=new Promise(function(e,n){t=e,r=n}),i=function(){t("loaded")},a=document.createElement("link");a||r(new Error("Not support create link element"));var u="onload"in a,c=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(a.rel="stylesheet",a.type="text/css",a.href=e,void 0!==n&&(a.id=n),document.getElementsByTagName("head")[0].appendChild(a),c||!u)return setTimeout(function(){f(a,i,0)},1),o;function s(){a&&(a.onload=a.onerror=a.onreadystatechange=null),a=null,i()}function f(e,t,n){if(e){var r,o=e.sheet;if((n+=1)>3e5)return r=!0,e&&(e=null),void t();if(c)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){var i=e;if(!i.name)return;"NS_ERROR_DOM_SECURITY_ERR"===i.name&&(r=!0)}setTimeout(function(){r?t():f(e,t,n)},20)}}return u?(a.onload=s,a.onerror=function(){s()}):a.onreadystatechange=function(){a&&/loaded|complete/.test(a.readyState)&&s()},o}var Vt={id:"",callback:function(){},timeout:5e3,isDefer:!1,isAsync:!1,isCrossOrigin:!1,attributes:null,cssUrl:""};function Jt(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wt({},Vt),o=Object.assign(Wt({},Vt),r),i=o.id,a=o.callback,u=o.timeout,c=o.isDefer,s=o.isAsync,f=o.isCrossOrigin,l=o.attributes,p=o.cssUrl,d=document.createElement("script");if(d||Promise.reject("Not support create script element"),p){var v=function(e,t){if(!t)return"";if(it(t))return t;var n=e.split("/");n.pop();var r=n.join("/");return"".concat(r,"/").concat(t)}(e,p);v&&Gt(v).catch(function(e){console.error("Failed to load CSS from ".concat(v,": ").concat(null==e?void 0:e.message))})}var h=document.getElementsByTagName("script")[0];return d.type="text/javascript",c&&(d.defer=!0),s&&(d.async=!0),f&&(d.crossOrigin="anonymous"),i&&(d.id=i),l&&Object.keys(l).forEach(function(e){d.setAttribute(e,l[e])}),d.readyState?d.onreadystatechange=function(){"loaded"!==d.readyState&&"complete"!==d.readyState||(d.onreadystatechange=null,ue(a),ue(t,"loaded"))}:d.onload=function(){ue(a),ue(t,"loaded")},d.src=e,h&&h.parentNode.insertBefore(d,h),new Promise(function(e,r){t=e,n=r,u&&setTimeout(n.bind(null,"timeout"),u)})}function Yt(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4,n=function(){},r=new Promise(function(t,r){n=t,e=r});return"complete"===document.readyState?n("complete"):window.addEventListener("load",function(){return n("load")}),setTimeout(function(){return e(Error("timeout"))},t),r}function Ht(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e})}function Kt(e,t){return window[e]?Promise.resolve("defined"):Jt(t)}function Qt(e){var t=[],n=window.PerformanceObserver;return!!n&&(ce(n.supportedEntryTypes)&&(t=n.supportedEntryTypes),t.includes(e))}function Xt(){return en.apply(this,arguments)}function en(){return(en=o(N.mark(function e(){return N.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Qt("paint")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"first-contentful-paint"===e.name});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function tn(){return nn.apply(this,arguments)}function nn(){return(nn=o(N.mark(function e(){return N.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Qt("paint")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"first-paint"===e.name});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function rn(){return on.apply(this,arguments)}function on(){return(on=o(N.mark(function e(){return N.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Qt("largest-contentful-paint")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"largest-contentful-paint"===e.entryType});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"largest-contentful-paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function an(){return un.apply(this,arguments)}function un(){return(un=o(N.mark(function e(){return N.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Qt("first-input")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"first-input"===e.entryType});if(r){t.disconnect();var o=r.processingStart;e(o?Math.round(r.processingStart-r.startTime):0)}});t.observe({type:"first-input",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function cn(){return sn.apply(this,arguments)}function sn(){return(sn=o(N.mark(function e(){return N.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Qt("layout-shift")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().reduce(function(e,t){var n=0;return ie(t.value)&&(n=t.value),e+n},0);t.disconnect(),e(r)});t.observe({type:"layout-shift",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function fn(){return ln.apply(this,arguments)}function ln(){return(ln=o(N.mark(function e(){var t,n;return N.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Qt("navigation")){e.next=1;break}return e.abrupt("return",0);case 1:if(window.performance&&window.performance.getEntriesByType){e.next=2;break}return e.abrupt("return",0);case 2:if(t=performance.getEntriesByType("navigation")[0],n=0,t){e.next=3;break}return e.abrupt("return",0);case 3:return n=t.responseStart-t.requestStart,e.abrupt("return",Math.round(n));case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function pn(){return dn.apply(this,arguments)}function dn(){return dn=o(N.mark(function e(){var t,n,r,o,a,u,c,s,f,l,p,d,v,h,g,m,y,w,b,x,O,S,_,E,j,A,P,T,k,M,R,D,C,z,F,I,L,U,B,Z,$,W,G,V=arguments;return N.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(G=function(e,t){var n=0;return t&&(n=e-t),n},W=function(){var e="";return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e},$=function(){var e="",t=window.navigator;if(t.connection&&t.connection.effectiveType)switch(t.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e},Z=function(){var e,t=navigator.userAgent.toLowerCase(),n=t.match(/(ipad)/i)&&"ipad",r=t.match(/iphone os/i)&&"iphone os",o=t.match(/midp/i)&&"midp",i=t.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=t.match(/ucweb/i)&&"ucweb",u=t.match(/android/i)&&"android",c=t.match(/windows ce/i)&&"windows ce",s=t.match(/windows mobile/i)&&"windows mobile";return(e=n||r||o||i||a||u||c||s?r||o||i||a||u||c||s?"phone":n?"ipad":void 0:"pc")||(e=""),e},B=function(){var e="",t=navigator.userAgent,n=t.indexOf("Android")>-1||t.indexOf("Linux")>-1,r=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(n&&(e=(i.match(/\d+\.\d+/g)||[])[0]),r&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e},U=function(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"},L=function(){var e={source:k,os:U(),osVersion:B(),deviceType:Z(),network:$(),screenDirection:W(),unloadTime:f-l,redirectTime:p-d,dnsTime:v-h,tcpTime:g-m,sslTime:G(g,y),responseTime:w-b,downloadTime:x-w,firstPaintTime:F,firstContentfulPaintTime:I,domReadyTime:O-D,onloadTime:S-D,whiteTime:w-D,renderTime:_-D,decodedBodySize:A,encodedBodySize:P};Object.keys(e).forEach(function(t){ie(e[t])&&(e[t]<0?e[t]=0:e[t]=Math.round(e[t]))}),ie(e.whiteTime)&&e.whiteTime>e.onloadTime&&(e.whiteTime=0);var n={};t||Object.keys(e).forEach(function(t){n[q(t)]=e[t]}),Object.keys(n).length?r(n):r(e)},t=V.length>0&&void 0!==V[0]&&V[0],Qt("navigation")){e.next=1;break}return e.abrupt("return",Promise.reject(new Error("navigation is not supported")));case 1:if((n=window.performance)&&"function"==typeof n.getEntries&&"function"==typeof n.getEntriesByType){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("performance is not supported")));case 2:if(o=new Promise(function(e){r=e}),a=null,ce(u=n.getEntriesByType("navigation"))&&(a=u[0]),c=new Array(19).fill(0),s=i(c,19),f=s[0],l=s[1],p=s[2],d=s[3],v=s[4],h=s[5],g=s[6],m=s[7],y=s[8],w=s[9],b=s[10],x=s[11],O=s[12],S=s[13],_=s[14],E=s[15],j=s[16],A=s[17],P=s[18],T=n.timing,k="",!a){e.next=3;break}k="PerformanceNavigationTiming",A=(M=a).decodedBodySize,P=M.encodedBodySize,f=(R=a).unloadEventEnd,l=R.unloadEventStart,p=R.redirectEnd,d=R.redirectStart,v=R.domainLookupEnd,h=R.domainLookupStart,g=R.connectEnd,m=R.connectStart,y=R.secureConnectionStart,w=R.responseStart,b=R.requestStart,x=R.responseEnd,O=R.domContentLoadedEventStart,S=R.loadEventStart,_=R.loadEventEnd,E=R.startTime,j=R.fetchStart,e.next=5;break;case 3:if(!T){e.next=4;break}k="PerformanceTiming",f=T.unloadEventEnd,l=T.unloadEventStart,p=T.redirectEnd,d=T.redirectStart,v=T.domainLookupEnd,h=T.domainLookupStart,g=T.connectEnd,m=T.connectStart,y=T.secureConnectionStart,w=T.responseStart,b=T.requestStart,x=T.responseEnd,O=T.domContentLoadedEventStart,S=T.loadEventStart,_=T.loadEventEnd,E=T.navigationStart,j=T.fetchStart,e.next=5;break;case 4:return e.abrupt("return",Promise.reject(new Error("NavigationTiming and Timing are not supported")));case 5:if(D=0,!ie(E)){e.next=6;break}D=E,e.next=8;break;case 6:if(!ie(j)){e.next=7;break}D=j,e.next=8;break;case 7:return e.abrupt("return",Promise.reject(new Error("startTime, navigationStart or fetchStart are required")));case 8:return e.next=9,Promise.all([tn(),Xt()]);case 9:return C=e.sent,z=i(C,2),F=z[0],I=z[1],ie(_)&&_>0?L():window.addEventListener("load",function(){window.setTimeout(function(){L()},0)}),e.abrupt("return",o);case 10:case"end":return e.stop()}},e)})),dn.apply(this,arguments)}function vn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vn(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gn(){var e;if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof navigator)return!1;var t=document.querySelector('link[rel~="manifest"][href]'),n=null==t||null===(e=t.getAttribute("href"))||void 0===e?void 0:e.trim();return!0===window.isSecureContext&&"serviceWorker"in navigator&&Boolean(n)}function mn(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var e={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:"",colorScheme:""};try{var t=navigator.userAgent.toLowerCase();if(!t)return e;var n=function(e){return e.test(t)},r=function(e){var n="",r=t.match(e);return r&&ce(r)&&(n=(n=(n=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),n},o="",i="";n(/windows|win32|win64|wow32|wow64/g)?o="windows":n(/macintosh|macintel/g)?o="macos":n(/x11/g)?o="linux":n(/android|adr/g)?o="android":n(/ios|iphone|ipad|ipod|iwatch/g)&&(o="ios",n(/ipad/g)?i="ipad":n(/iphone/g)?i="iphone":n(/iwatch/g)?i="iwatch":n(/ipod/g)&&(i="ipod")),e=hn(hn({},e),{},{system:o,appleType:i});var a="";"windows"===o?n(/windows nt 5.0|windows 2000/g)?a="2000":n(/windows nt 5.1|windows xp/g)?a="xp":n(/windows nt 5.2|windows 2003/g)?a="2003":n(/windows nt 6.0|windows vista/g)?a="vista":n(/windows nt 6.1|windows 7/g)?a="7":n(/windows nt 6.2|windows 8/g)?a="8":n(/windows nt 6.3|windows 8.1/g)?a="8.1":n(/windows nt 10.0|windows 10/g)&&(a="10"):"macos"===o?a=r(/os x [\d._]+/g):"android"===o?a=r(/android [\d._]+/g):"ios"===o&&(a=r(/os [\d._]+/g)),e=hn(hn({},e),{},{systemVs:a});var u="";"windows"===o||"macos"===o||"linux"===o?u="desktop":("android"===o||"ios"===o||n(/mobile/g))&&(u="mobile"),e=hn(hn({},e),{},{platform:u});var c="",s="";n(/applewebkit/g)?(c="webkit",n(/edge/g)?s="edge":n(/opr/g)?s="opera":n(/chrome/g)?s="chrome":n(/safari/g)&&(s="safari")):n(/gecko/g)&&n(/firefox/g)?(c="gecko",s="firefox"):n(/presto/g)?(c="presto",s="opera"):n(/trident|compatible|msie/g)&&(c="trident",s="iexplore"),e=hn(hn({},e),{},{engine:c,supporter:s});var f="";"webkit"===c?f=r(/applewebkit\/[\d._]+/g):"gecko"===c?f=r(/gecko\/[\d._]+/g):"presto"===c?f=r(/presto\/[\d._]+/g):"trident"===c&&(f=r(/trident\/[\d._]+/g)),e=hn(hn({},e),{},{engineVs:f});var l="";"chrome"===s?l=r(/chrome\/[\d._]+/g):"safari"===s?l=r(/version\/[\d._]+/g):"firefox"===s?l=r(/firefox\/[\d._]+/g):"opera"===s?l=r(/opr\/[\d._]+/g):"iexplore"===s?l=r(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===s&&(l=r(/edge\/[\d._]+/g)),e=hn(hn({},e),{},{supporterVs:l});var p="",d="";n(/micromessenger/g)?(p="wechat",d=r(/micromessenger\/[\d._]+/g)):n(/qqbrowser/g)?(p="qq_browser",d=r(/qqbrowser\/[\d._]+/g)):n(/\sqq/g)?p="qq_app":n(/ucbrowser/g)?(p="uc",d=r(/ucbrowser\/[\d._]+/g)):n(/qihu 360se/g)?p="360":n(/2345explorer/g)?(p="2345",d=r(/2345explorer\/[\d._]+/g)):n(/metasr/g)?p="sougou":n(/lbbrowser/g)?p="liebao":n(/maxthon/g)?(p="maxthon",d=r(/maxthon\/[\d._]+/g)):n(/biliapp/g)&&(p="bilibili"),e=hn(hn({},e),{},{shell:p,shellVs:d});var v="";if(window.matchMedia){var h=window.matchMedia("(prefers-color-scheme: dark)"),g=window.matchMedia("(prefers-color-scheme: light)");h.matches?v="dark":g.matches&&(v="light")}return e=hn(hn({},e),{},{colorScheme:v}),window.MAZEY_BROWSER_INFO=e,e}catch(t){return wt.warn(t),e}}function yn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n=mn(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach(function(o){var i=n[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(t)),r.push("".concat(a).concat(i))}}),r}var wn="";function bn(){if(wn)return Promise.resolve("webp"===wn);return new Promise(function(e){var t=new Image;t.onload=function(){var n=t.width>0&&t.height>0;wn=n?"webp":"no-webp",e(n)},t.onerror=function(){wn="no-webp",e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="})}export{Ot as addClass,Nt as addEvent,Et as addStyle,Ye as calLongestCommonSubsequence,Ve as calLongestCommonSubstring,q as camelCase2Underscore,L as camelCaseToKebabCase,kt as cancelBubble,xe as clearHTML,Oe as clearHtml,Fe as convert10To26,F as convertCamelToKebab,U as convertCamelToUnder,st as convertHttpToHttps,I as convertKebabToCamel,ct as convertObjectToQuery,me as convertToHtmlBreaks,B as convertUnderToCamel,Pe as cutCHSString,je as cutZHString,ee as debounce,D as deepCopy,z as deepCopyObject,C as deepFreeze,Zt as delCookie,ue as doFn,Rt as fireEvent,Q as floatFixed,K as floatToPercent,Re as formatDate,oe as formatDurationFromMs,yn as genBrowserAttrs,yt as genCustomConsole,Ne as genHashCode,G as genRndNumString,Pt as genStyleString,J as genUniqueNumString,De as generateCalendarVersion,V as generateRndNum,Y as generateUniqueNum,Xe as getAllQueryParams,mn as getBrowserInfo,cn as getCLS,Ut as getCookie,Ie as getCurrentVersion,Mt as getDefineListeners,rt as getDomain,Xt as getFCP,an as getFID,tn as getFP,Me as getFileSize,ne as getFriendlyInterval,nt as getHashQueryParam,rn as getLCP,Lt as getLocalStorage,Tt as getPageMeta,pn as getPerformance,Qe as getQueryParam,ut as getScriptQueryParam,Ft as getSessionStorage,fn as getTTFB,at as getUrlFileType,pt as getUrlHost,et as getUrlParam,dt as getUrlPath,xt as hasClass,Ke as inRate,Dt as invokeEvent,ae as invokeFn,he as isArray,pe as isBool,de as isBoolean,We as isBrowser,fe as isFunction,He as isHit,$ as isJSONString,W as isJsonString,ce as isNonEmptyArray,ge as isNonEmptyObject,ie as isNumber,se as isPureObject,gn as isSafePWAEnv,le as isString,bn as isSupportWebp,Qt as isSupportedEntryType,ve as isUdfOrNul,ke as isValidData,ze as isValidEmail,it as isValidHttpUrl,Ce as isValidPhoneNumber,ot as isValidUrl,Gt as loadCSS,Ht as loadImage,Jt as loadScript,Kt as loadScriptIfUndefined,Je as longestComSubsequence,Ge as longestComSubstring,H as mNow,Z as mTrim,wt as mazeyCon,ye as newLine,vt as onURLChange,_t as removeClass,qt as removeCookie,Ct as removeEvent,we as removeHTML,be as removeHtml,Le as repeatUntilConditionMet,ft as replaceHttp,Se as sanitizeInput,St as setClass,Bt as setCookie,jt as setImgSizeBySrc,At as setImgWidHeiBySrc,It as setLocalStorage,zt as setSessionStorage,qe as sleep,X as throttle,bt as timeCon,Ae as truncateZHString,Ee as unsanitize,_e as unsanitizeInput,tt as updateQueryParam,Ue as waitTime,Yt as windowLoaded,Te as zAxiosIsValidRes};
|
|
6
|
+
function e(e,t){var n=e.length,r=t.length;if(0===n||0===r)return 0;for(var o=Array.from({length:n},function(){return new Array(r).fill(0)}),i=0,a=0;a<n;++a)for(var u=0;u<r;++u)if(e[a]===t[u]){var c=0;a>0&&u>0&&(c=o[a-1][u-1]),o[a][u]=c+1,i=Math.max(i,o[a][u])}return i}function t(t,n){return e(t,n)}function n(e,t){var n=e.length,r=t.length;if(0===n||0===r)return 0;for(var o=Array.from({length:n},function(){return new Array(r).fill(0)}),i=0;i<n;++i)for(var a=0;a<r;++a)if(e[i]===t[a]){var u=0;i>0&&a>0&&(u=o[i-1][a-1]),o[i][a]=u+1}else{var c=0,s=0;a>0&&(c=o[i][a-1]),i>0&&(s=o[i-1][a]),o[i][a]=Math.max(c,s)}return o[n-1][r-1]}function r(e,t){return n(e,t)}function o(e){return Math.random()<e}function i(e){return o(e)}function a(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function u(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function u(e){a(i,r,o,u,c,"next",e)}function c(e){a(i,r,o,u,c,"throw",e)}u(void 0)})}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var d,p={exports:{}},v={exports:{}};(d=v).exports=function(e,t){this.v=e,this.k=t},d.exports.__esModule=!0,d.exports.default=d.exports;var h=v.exports,g={exports:{}},y={exports:{}};!function(e){function t(n,r,o,i){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,o){function i(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(y);var m=y.exports;!function(e){var t=m;function n(){var r,o,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.toStringTag||"@@toStringTag";function c(e,n,i,a){var u=n&&n.prototype instanceof f?n:f,c=Object.create(u.prototype);return t(c,"_invoke",function(e,t,n){var i,a,u,c=0,f=n||[],l=!1,d={p:0,n:0,v:r,a:p,f:p.bind(r,4),d:function(e,t){return i=e,a=0,u=r,d.n=t,s}};function p(e,t){for(a=e,u=t,o=0;!l&&c&&!n&&o<f.length;o++){var n,i=f[o],p=d.p,v=i[2];e>3?(n=v===t)&&(u=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=r):i[0]<=p&&((n=e<2&&p<i[1])?(a=0,d.v=t,d.n=i[1]):p<v&&(n=e<3||i[0]>t||t>v)&&(i[4]=e,i[5]=t,d.n=v,a=0))}if(n||e>1)return s;throw l=!0,t}return function(n,f,v){if(c>1)throw TypeError("Generator is already running");for(l&&1===f&&p(f,v),a=f,u=v;(o=a<2?r:u)||!l;){i||(a?a<3?(a>1&&(d.n=-1),p(a,u)):d.n=u:d.v=u);try{if(c=2,i){if(a||(n="next"),o=i[n]){if(!(o=o.call(i,u)))throw TypeError("iterator result is not an object");if(!o.done)return o;u=o.value,a<2&&(a=0)}else 1===a&&(o=i.return)&&o.call(i),a<2&&(u=TypeError("The iterator does not provide a '"+n+"' method"),a=1);i=r}else if((o=(l=d.n<0)?u:e.call(t,d))!==s)break}catch(e){i=r,a=1,u=e}finally{c=1}}return{value:o,done:l}}}(e,i,a),!0),c}var s={};function f(){}function l(){}function d(){}o=Object.getPrototypeOf;var p=[][a]?o(o([][a]())):(t(o={},a,function(){return this}),o),v=d.prototype=f.prototype=Object.create(p);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,t(e,u,"GeneratorFunction")),e.prototype=Object.create(v),e}return l.prototype=d,t(v,"constructor",d),t(d,"constructor",l),l.displayName="GeneratorFunction",t(d,u,"GeneratorFunction"),t(v),t(v,u,"Generator"),t(v,a,function(){return this}),t(v,"toString",function(){return"[object Generator]"}),(e.exports=n=function(){return{w:c,m:h}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(g);var w=g.exports,b={exports:{}},x={exports:{}},S={exports:{}};!function(e){var t=h,n=m;e.exports=function e(r,o){function i(e,n,a,u){try{var c=r[e](n),s=c.value;return s instanceof t?o.resolve(s.v).then(function(e){i("next",e,a,u)},function(e){i("throw",e,a,u)}):o.resolve(s).then(function(e){c.value=e,a(c)},function(e){return i("throw",e,a,u)})}catch(e){u(e)}}var a;this.next||(n(e.prototype),n(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),n(this,"_invoke",function(e,t,n){function r(){return new o(function(t,r){i(e,n,t,r)})}return a=a?a.then(r,r):r()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports}(S);var O=S.exports;!function(e){var t=w,n=O;e.exports=function(e,r,o,i,a){return new n(t().w(e,r,o,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports}(x);var E=x.exports;!function(e){var t=E;e.exports=function(e,n,r,o,i){var a=t(e,n,r,o,i);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports}(b);var _=b.exports,j={exports:{}};!function(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports}(j);var A=j.exports,T={exports:{}},M={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(M);var k=M.exports;!function(e){var t=k.default;e.exports=function(e){if(null!=e){var n=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(t(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports}(T);var P=T.exports;!function(e){var t=h,n=w,r=_,o=E,i=O,a=A,u=P;function c(){var s=n(),f=s.m(c),l=(Object.getPrototypeOf?Object.getPrototypeOf(f):f.__proto__).constructor;function d(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))}var p={throw:1,return:2,break:3,continue:3};function v(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,p[e],t)},delegateYield:function(e,o,i){return t.resultName=o,n(r.d,u(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=c=function(){return{wrap:function(e,t,n,r){return s.w(v(e),t,n,r&&r.reverse())},isGeneratorFunction:d,mark:s.m,awrap:function(e,n){return new t(e,n)},AsyncIterator:i,async:function(e,t,n,i,a){return(d(t)?o:r)(v(e),t,n,i,a)},keys:a,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports}(p);var N=(0,p.exports)(),C=N;try{regeneratorRuntime=N}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=N:Function("r","regeneratorRuntime = r")(N)}var D=l(C);function R(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return U(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var F=Function.prototype.toString.call(Object);function L(e,t,n){var r,o=null===(r=Object.getOwnPropertyDescriptor(t,n))||void 0===r?void 0:r.get;if(!o)return!1;try{return o.call(e),!0}catch(e){return!1}}function I(e){return null===e||"object"!=typeof e?e:B(e,function(){if("undefined"!=typeof WeakMap)return new WeakMap;var e=[],t=[];return{get:function(n){var r=e.indexOf(n);return-1===r?void 0:t[r]},set:function(n,r){e.push(n),t.push(r)}}}())}function B(e,t){if(null===e||"object"!=typeof e)return e;var n=e,r=t.get(n);if(void 0!==r)return r;var o=function(e){try{return Date.prototype.getTime.call(e)}catch(e){return null}}(n);if(null!==o){var i=new Date(o);return t.set(n,i),i}var a=function(e){var t,n=null===(t=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))||void 0===t?void 0:t.get;if(!n)return null;try{return n.call(e)}catch(e){return null}}(n);if(null!==a){var u=e,c=new RegExp(a,function(e){if("string"==typeof e.flags)return e.flags;var t=e,n="";return t.hasIndices&&(n+="d"),e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.dotAll&&(n+="s"),e.unicode&&(n+="u"),t.unicodeSets&&(n+="v"),e.sticky&&(n+="y"),n}(u));return c.lastIndex=u.lastIndex,t.set(n,c),c}if("undefined"!=typeof ArrayBuffer&&L(n,ArrayBuffer.prototype,"byteLength")){var s=ArrayBuffer.prototype.slice.call(e,0);return t.set(n,s),s}if("undefined"!=typeof SharedArrayBuffer&&L(n,SharedArrayBuffer.prototype,"byteLength")){var f=SharedArrayBuffer.prototype.slice.call(e,0);return t.set(n,f),f}if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)){var l=B(e.buffer,t),d="undefined"!=typeof DataView&&L(n,DataView.prototype,"byteLength")?new DataView(l,e.byteOffset,e.byteLength):new e.constructor(l,e.byteOffset,e.length);return t.set(n,d),d}if("undefined"!=typeof Map&&L(n,Map.prototype,"size")){var p=new Map;return t.set(n,p),Map.prototype.forEach.call(e,function(e,n){p.set(B(n,t),B(e,t))}),p}if("undefined"!=typeof Set&&L(n,Set.prototype,"size")){var v=new Set;return t.set(n,v),Set.prototype.forEach.call(e,function(e){v.add(B(e,t))}),v}var h=Array.isArray(e),g=Object.getPrototypeOf(e),y=function(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.prototype.hasOwnProperty.call(t,"constructor")?t.constructor:null;return"function"==typeof n&&Function.prototype.toString.call(n)===F}(n),m=!h&&!y&&function(e){var t=Object.getPrototypeOf(e),n=null==t?void 0:t.constructor;return"function"==typeof n&&-1===Function.prototype.toString.call(n).indexOf("[native code]")}(n);if(!h&&!y&&!m)return t.set(n,e),e;var w=h?new Array(e.length):Object.create(m?Object.prototype:g);return t.set(n,w),function(e){var t=Object.getOwnPropertyNames(e);return"function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t}(n).forEach(function(e){if(!h||"length"!==e){var r=Object.getOwnPropertyDescriptor(n,e);r&&("value"in r&&(r.value=B(r.value,t)),Object.defineProperty(w,e,r))}}),w}function z(e){return!e||"object"!=typeof e||Object.isFrozen(e)||(Object.freeze(e),Object.values(e).forEach(z)),e}function $(e){return I(e)}function q(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===t[0]?t.substring(1):t}function Z(e){var t=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return t.endsWith("-")?t.slice(0,-1):t}function V(e){return q(e)}function W(e){var t=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===t[0]?t.substring(1):t}function Y(e){return e.replace(/_([a-z])/g,function(e,t){return t.toUpperCase()})}function H(e){return W(e)}function G(e){for(var t=(e=e.replace(/^\s+/,"")).length-1,n=/\s/;n.test(e.charAt(t));)t--;return e.slice(0,t+1)}function J(e){if("string"!=typeof e)return!1;try{return JSON.parse(e),!0}catch(e){}return!1}function K(e){return J(e)}function Q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;if(!Number.isFinite(e)||e<=0)return"";e=Math.floor(e);for(var t="";e--;)t+=Math.floor(10*Math.random());return t}function X(){return Q(arguments.length>0&&void 0!==arguments[0]?arguments[0]:5)}function ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[ne(),X(e||3)];return t[0]+t[1]}function te(){return ee(arguments.length>0&&void 0!==arguments[0]?arguments[0]:3)}function ne(){return Date.now?Date.now():(new Date).getTime()}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n="";return n=t?(100*e).toFixed(t):String(Math.floor(100*e)),"".concat(n,"%")}function oe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(String(e)).toFixed(t)}function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=Object.assign({},n);var r=null,o=null,i=null,a=null,u=0,c=function(){u=!1===n.leading?0:ne(),i=null,a=e.apply(this,o),i||(r=o=null)};return function(){var s=ne();u||!1!==n.leading||(u=s);var f=t-(s-u);r=this;for(var l=arguments.length,d=new Array(l),p=0;p<l;p++)d[p]=arguments[p];return o=d,f<=0||f>t?(i&&(clearTimeout(i),i=null),u=s,a=e.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(c.bind(r),f)),a}}function ae(e,t,n){var r=null,o=null,i=null,a=null,u=null,c=function(){var s=ne()-i;s<t&&s>=0?o=setTimeout(c,t-s):(o=null,n||(u=e.apply(r,a),o||(r=a=null)))};return function(){r=this;for(var s=arguments.length,f=new Array(s),l=0;l<s;l++)f[l]=arguments[l];a=f,i=ne();var d=n&&!o;return o||(o=setTimeout(c,t)),d&&(u=e.apply(r,a),r=a=null),u}}var ue={type:"d"};function ce(e){return"string"==typeof e&&/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?e.replace(" ","T"):e}function se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ue,r=(n=Object.assign({},ue,n)).type;pe(e)||(e=new Date(ce(e)).getTime()),pe(t)||(t=new Date(ce(t)).getTime());var o=Number(t)-Number(e),i="",a=f(new Array(4).fill(0),4),u=a[0],c=(a[1],a[2],a[3]);if(o>=0)switch(u=Math.floor(o/1e3/60/60/24),Math.floor(o/1e3/60/60),Math.floor(o/1e3/60),c=Math.floor(o/1e3),r){case"d":i=u;break;case"text":i=[{value:u=Math.floor(o/1e3/60/60/24),unit:"day"},{value:Math.floor(o/1e3/60/60%24),unit:"hour"},{value:Math.floor(o/1e3/60%60),unit:"minute"},{value:c=Math.floor(o/1e3%60),unit:"second"}].filter(function(e){return e.value>0}).map(function(e){return le(e.value,e.unit)}).join(" ")||le(0,"second");break;default:i=c}return i}function fe(){return se(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:ue)}function le(e,t){var n=Math.round(10*e)/10,r=1===n?t:"".concat(t,"s");return"".concat(n," ").concat(r)}function de(e){var t=(Number.isFinite(e)?Math.max(e,0):0)/1e3;return t>=86400?le(t/24/60/60,"day"):t>=3600?le(t/60/60,"hour"):t>=60?le(t/60,"minute"):le(t,"second")}function pe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isNaNAsNumber,r=void 0!==n&&n,o=t.isInfinityAsNumber,i=void 0!==o&&o,a=t.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!r&&isNaN(e)))}function ve(e){var t=null;if(e&&"function"==typeof e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t=e.apply(void 0,r)}return t}function he(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return ve.apply(void 0,[e].concat(n))}function ge(e){var t=!1;return Array.isArray(e)&&e.length&&(t=!0),t}function ye(e){var t=Boolean(e),n="object"==typeof e,r="[object Object]"===Object.prototype.toString.call(e);return t&&n&&r}function me(e){return"function"==typeof e}function we(e){return"string"==typeof e}function be(e){return"boolean"==typeof e}function xe(e){return be(e)}function Se(e){return null==e}function Oe(e){return"[object Array]"===Object.prototype.toString.call(e)}function Ee(e){return!!ye(e)&&0!==Object.keys(e).length}function _e(e){if(!e)return"";var t=new RegExp("\\n","g");return e.replace(t,"<br />")}function je(e){return _e(e)}function Ae(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).removeNewLine,n=void 0!==t&&t,r="";return e&&(r=e.replace(/<\/?.+?>/g,""),n&&(r=r.replace(/[\r\n]/g,""))),r}function Te(e){return Ae(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function Me(e){return Ae(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function ke(e){return Ae(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function Pe(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,function(e){return t[e]})}function Ne(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&|<|>|"|'|/)/g,function(e){return t[e]})}function Ce(e){return Ne(e)}function De(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{hasDot:!1,dotText:"..."};if(n=Object.assign({hasDot:!1,dotText:"..."},n),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",u=e.replace(i,"**").length,c=0;c<u&&(null!=(a=e.charAt(c).toString()).match(i)?r+=2:r++,!(r>t));c++)o+=a;return n.hasDot&&u>t&&(o+=n.dotText),o}return""}function Re(e,t){return De(e,t,{hasDot:arguments.length>2&&void 0!==arguments[2]&&arguments[2]})}function Ue(e,t){return Re(e,t,arguments.length>2&&void 0!==arguments[2]&&arguments[2])}function Fe(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{validStatusRange:[200,300],validCode:[0]})||{},n=t.validStatusRange,r=void 0===n?[200,300]:n,o=t.validCode,i=void 0===o?[0]:o;2!==r.length&&console.error("valid validStatusRange is required");var a=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var u=e.data;u&&i.includes(u.code)&&(a=!0)}return a}function Le(e,t,n){if(null===e||"object"!=typeof e)return!1;var r,o=e,i=R(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(null===o||"object"!=typeof o&&"function"!=typeof o||!Object.prototype.hasOwnProperty.call(o,a))return!1;o=o[a]}}catch(e){i.e(e)}finally{i.f()}return o===n}function Ie(e){var t=function(e){return String(Math.ceil(e))};if(!Number.isFinite(e)||e<=0)return"";var n=1024;return e<n?e+" B":e<Math.pow(n,2)?t(e/n)+" KB":e<Math.pow(n,3)?t(e/Math.pow(n,2))+" MB":e<Math.pow(n,4)?t(e/Math.pow(n,3))+" G":t(e/Math.pow(n,4))+" T"}function Be(e){var t,n=0;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n}var ze=/^(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2})(?::(\d{2}))?)?$/,$e=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;function qe(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=new Date(0);return u?(c.setUTCFullYear(e,t-1,n),c.setUTCHours(r,o,i,a),Number.isFinite(c.getTime())&&c.getUTCFullYear()===e&&c.getUTCMonth()===t-1&&c.getUTCDate()===n&&c.getUTCHours()===r&&c.getUTCMinutes()===o&&c.getUTCSeconds()===i&&c.getUTCMilliseconds()===a):(c.setFullYear(e,t-1,n),c.setHours(r,o,i,a),Number.isFinite(c.getTime())&&c.getFullYear()===e&&c.getMonth()===t-1&&c.getDate()===n&&c.getHours()===r&&c.getMinutes()===o&&c.getSeconds()===i&&c.getMilliseconds()===a)}function Ze(e){if("number"==typeof e)return Number.isFinite(e)&&Number.isFinite(new Date(e).getTime());if("object"==typeof e&&null!==e)try{return Number.isFinite(Date.prototype.getTime.call(e))}catch(e){return!1}if("string"!=typeof e)return!1;var t=e.trim();if(!t)return!1;var n=ze.exec(t);if(n){var r=f(n.slice(1),6),o=r[0],i=r[1],a=r[2],u=r[3],c=void 0===u?"0":u,s=r[4],l=void 0===s?"0":s,d=r[5],p=void 0===d?"0":d;return qe(Number(o),Number(i),Number(a),Number(c),Number(l),Number(p))}var v=$e.exec(t);if(!v)return!1;var h=f(v.slice(1),8),g=h[0],y=h[1],m=h[2],w=h[3],b=h[4],x=h[5],S=void 0===x?"0":x,O=h[6],E=void 0===O?"":O,_=h[7],j=Number("".concat(E,"00").slice(0,3));if(!qe(Number(g),Number(y),Number(m),Number(w),Number(b),Number(S),j,!0))return!1;if("Z"===_)return!0;var A=Number(_.slice(1,3)),T=Number(_.slice(4,6));return A<=23&&T<=59}function Ve(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd";void 0===e&&(e=new Date);var n=new Date(e);if(!Number.isFinite(n.getTime()))throw new RangeError("Invalid date");var r=n.getHours(),o={yyyy:n.getFullYear(),MM:n.getMonth()+1,dd:n.getDate()<10?"0"+n.getDate():n.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),ss:n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds(),a:r<12?"AM":"PM"},i=t||"yyyy-MM-dd";return Object.keys(o).forEach(function(e){var t=o[e];"MM"===e&&Number(t)<=9&&(t="0".concat(t)),i=i.split(e).join(String(t))}),i}function We(e){return Ve(void 0===e?new Date:new Date(e instanceof Date?e.getTime():e),"yyyy.MMdd.HHmmss").split(".").map(function(e){return String(Number(e))}).join(".")}function Ye(e){return/^1\d{10}$/.test(e)}function He(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function Ge(e){if(!Number.isFinite(e)||e<=0)return"";e=Math.floor(e);for(var t="";e>0;){var n=e%26;0===n&&(n=26),t=String.fromCharCode(n+96)+t,e=(e-n)/26}return t}function Je(){return"v4"}function Ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return!0===e},r=t.interval,o=void 0===r?1e3:r,i=t.times,a=void 0===i?10:i,c=t.context,s=t.args;if("function"==typeof e){if(!Number.isFinite(o)||o<0)console.error("Expected a non-negative number for interval.");else if(!Number.isFinite(a)||a<0)console.error("Expected a non-negative number for times.");else if(0!==a){var f=0,l=function(){setTimeout(u(D.mark(function t(){var r;return D.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.apply(c,s);case 1:if(r=t.sent,!(n(r)||++f>=a)){t.next=2;break}return t.abrupt("return");case 2:l();case 3:case"end":return t.stop()}},t)})),o)};l()}}else console.error("Expected a function.")}function Qe(e){return Xe.apply(this,arguments)}function Xe(){return(Xe=u(D.mark(function e(t){return D.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e){setTimeout(function(){e(t)},t)}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function et(e){return tt.apply(this,arguments)}function tt(){return(tt=u(D.mark(function e(t){return D.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Qe(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}var nt="";function rt(){if(nt)return"browser"===nt;var e="undefined"!=typeof window;return e&&(nt="browser"),e}function ot(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function it(e){var t=e.indexOf("#"),n=-1===t?e:e.slice(0,t),r=n.indexOf("?"),o=/^(?:[a-z][a-z\d+.-]*:)?\/\//i.test(n)||"/"===n.charAt(0),i=-1===r?o?"":n:n.slice(r+1);return i?i.split("&").reduce(function(e,t){if(!t||-1===t.indexOf("="))return e;var n=t.indexOf("=");return e.push([ot(t.slice(0,n)),ot(t.slice(n+1))]),e},[]):[]}function at(e,t){return it(e).filter(function(e){return f(e,1)[0]===t}).map(function(e){return f(e,2)[1]})}function ut(e){return at(location.search,e)[0]||""}function ct(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";""===e&&(e=location.search);var t={};return it(e).forEach(function(e){var n=f(e,2),r=n[0],o=n[1];Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{configurable:!0,enumerable:!0,value:o,writable:!0})}),t}function st(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=at(e,t);return n.returnArray?r:r.length?r[0]:null}function ft(e,t,n){var r=e.indexOf("#"),o=-1===r?"":e.slice(r),i=-1===r?e:e.slice(0,r),a=i.indexOf("?"),u=-1===a?i:i.slice(0,a),c=-1===a?"":i.slice(a+1),s=encodeURIComponent(t),f=encodeURIComponent(n),l=!1,d=(c?c.split("&").filter(Boolean):[]).reduce(function(e,n){var r=n.indexOf("=");return ot(-1===r?n:n.slice(0,r))===t?l||(e.push("".concat(s,"=").concat(f)),l=!0):e.push(n),e},[]);return l||d.push("".concat(s,"=").concat(f)),"".concat(u,"?").concat(d.join("&")).concat(o)}function lt(e){var t=location.hash.split("?");return 1===t.length?"":at("?".concat(t.slice(1).join("?")),e)[0]||""}function dt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["hostname"];if(_t(e)){var n=new window.URL(e);return t.reduce(function(e,t){return e+=n[t]},"")}var r=document.createElement("a");return r.href=e,t.reduce(function(e,t){return e+=r[t]},"")}function pt(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b()!@:%_+.~#?&//=]*)$/.test(e)}function vt(e){return void 0===e||Number(e)<=65535}function ht(e){var t=e.split(".");return 4===t.length&&t.every(function(e){return/^\d{1,3}$/.test(e)&&(1===e.length||"0"!==e.charAt(0))&&Number(e)<=255})}function gt(e){var t=e.split("::");if(t.length>2)return!1;var n=2===t.length,r=[];t.forEach(function(e){e&&(r=r.concat(e.split(":")))});for(var o=0,i=0;i<r.length;i++){var a=r[i];if(-1!==a.indexOf(".")){if(i!==r.length-1||!ht(a))return!1;o+=2}else{if(!/^[0-9a-f]{1,4}$/i.test(a))return!1;o+=1}}return n?o<8:8===o}function yt(e){var t=e.match(/^\[([0-9a-f:.]+)\]$/i);if(t)return gt(t[1]);if("."===e.charAt(e.length-1)&&(e=e.slice(0,-1)),ht(e))return!0;var n=e.split(".");return!(n.length<2||n.some(function(e){return!e||!/^[a-z\d-]+$/i.test(e)||"-"===e.charAt(0)||"-"===e.charAt(e.length-1)}))&&!/^\d+$/.test(n[n.length-1])}function mt(e){var t=e.match(/^https?:\/\/([^/?#]+)(?:[/?#][^\s<>"`]*)?$/i);if(!t||-1!==t[1].indexOf("@"))return!1;var n=t[1],r=n.match(/^\[([0-9a-f:.]+)\](?::(\d*))?$/i);if(r)return gt(r[1])&&vt(r[2]);var o=n.match(/^([^:]+)(?::(\d*))?$/);return!(!o||!vt(o[2]))&&yt(o[1])}function wt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{strict:!0};if("string"!=typeof e||!e||e.trim()!==e)return!1;var n=/^https?:\/\/[^/\\]/i.test(e),r=/^\/\/[^/\\]/.test(e);if(!n&&(t.strict||!r))return!1;var o=r?"http:".concat(e):e;if(!mt(o))return!1;if("function"!=typeof URL)return!0;try{var i=new URL(o);return("http:"===i.protocol||"https:"===i.protocol)&&yt(i.hostname)&&!i.username&&!i.password}catch(e){try{return new URL("http://example.com"),!1}catch(e){return mt(o)}}}function bt(e){var t="";if("string"!=typeof e||""==e)return t;var n=e.split(/[?#]/,1)[0],r=/\.[^/]+$/.exec(n);return r?(r[0].length>1&&(t=r[0].substring(1)),t):t}function xt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";t||(t=".js");for(var n=document.querySelectorAll("script[src]"),r=0;r<n.length;r++){var o=n[r].getAttribute("src");if(o&&-1!==o.indexOf(t)){var i=at(o,e)[0];if(void 0!==i)return i}}return""}function St(e){return e&&0===Object.keys(e).length?"":"?".concat(Object.keys(e).map(function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))}).join("&"))}function Ot(e){return e.replace(/^http:/,"https:")}function Et(e){return Ot(e)}function _t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=window.URL;if("function"!=typeof t)return!1;try{var n=new t(e);return Boolean(n.href)}catch(e){return!1}}function jt(e){var t="";(!wt(e)&&wt(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),_t(e))&&(t=new URL(e).host);return t}function At(e){var t="";(!wt(e)&&wt(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),_t(e))&&(t=new URL(e).pathname);return t}function Tt(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fireOnInit,n=void 0===t||t,r=history,o=location.href,i=[],a=function(t){var n=location.href;if(n!==o||"load"===t){var r=o;o=n,e({url:n,oldUrl:r,trigger:t})}},u=function(){return a("popstate")},c=function(){return a("hashchange")};window.addEventListener("popstate",u),window.addEventListener("hashchange",c),i.push(function(){return window.removeEventListener("popstate",u)}),i.push(function(){return window.removeEventListener("hashchange",c)}),r.__mazeyUrlChangePatched__||(r.__mazeyUrlChangePatched__=!0,r.__mazeyUrlChangeSubscribers__=new Set,r.__mazeyRawPushState__=history.pushState.bind(history),r.__mazeyRawReplaceState__=history.replaceState.bind(history),history.pushState=function(){r.__mazeyRawPushState__.apply(r,arguments),r.__mazeyUrlChangeSubscribers__.forEach(function(e){return e("pushState")})},history.replaceState=function(){r.__mazeyRawReplaceState__.apply(r,arguments),r.__mazeyUrlChangeSubscribers__.forEach(function(e){return e("replaceState")})});var s=function(e){return a(e)};return r.__mazeyUrlChangeSubscribers__.add(s),i.push(function(){return r.__mazeyUrlChangeSubscribers__.delete(s)}),n&&a("load"),function(){i.forEach(function(e){return e()})}}function Mt(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kt(e){return kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(e)}function Pt(e){var t=function(e,t){if("object"!=kt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==kt(t)?t:t+""}function Nt(e,t,n){return(t=Pt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach(function(t){Nt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Rt={enabled:!0,isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",isStringifyObject:!1,logFn:function(){},errorFn:function(){}};function Ut(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Dt({},Rt),n=Object.assign(Dt({},Rt),t),r=n.enabled,o=n.isClosed,i=n.showWrap,a=n.showDate,u=n.locales,c=n.isStringifyObject,s=n.logFn,f=n.errorFn,l=r;!0===o&&(Ft.warn("The options.isClosed is deprecated. Please use options.enabled instead."),l=!1);var d=Object.create(null),p=function(){return(new Date).toLocaleDateString(u,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach(function(t){d[t]=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(l){var u,d,v=e,h=e;if("string"==typeof e&&e.length>=2){var g=e.length;v=":"===e[g-1]?e.substring(0,g-1):e}if(i&&console.log("--- ".concat(v," - begin ---")),a&&(h=e?"".concat(p()," ").concat(e):"".concat(p())),c&&(r=r.map(function(e){return ye(e)?JSON.stringify(e):e})),e||a)(u=console)[t].apply(u,[h].concat(Mt(r)));else(d=console)[t].apply(d,Mt(r));"log"===t&&s(),"error"===t&&f(),i&&console.log("--- ".concat(v," - end ---"))}}}),d}var Ft=Ut("[Mazey]"),Lt=Ut("",{showDate:!0,locales:"zh-CN",isStringifyObject:!0});function It(e,t){if(!e)return Ft.error("The element is not exist."),!1;for(var n=e.className.split(/\s+/),r=0;r<n.length;r++)if(n[r]===t)return!0;return!1}function Bt(e,t){if(e){if(Array.isArray(t))t.forEach(function(t){t&&e.classList.add(t)});else if(t){for(var n=e.className,r=n.split(/\s+/),o=0;o<r.length;o++)if(r[o]===t)return;var i,a="";""!==n&&(a=" "),i=n+a+t,e.className=i}}else Ft.error("The element is not exist.")}function zt(e,t){Bt(e,t)}function $t(e,t){var n;e?(n=(n=(n=(n=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+t+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=n):Ft.error("The element is not exist.")}function qt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:""};if(!e)return!1;var n=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return t.id?(o="".concat(t.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",t.id),i.innerHTML=e,n.appendChild(i),document.head.appendChild(n))):(i.innerHTML=e,n.appendChild(i),document.head.appendChild(n)),!0}function Zt(){var e=window.jQuery||window.$;if(e){var t=e("img");return!(!t||!t.length)&&(t.each(function(){var t=e(this);if(t){var n=t.attr("src");if(n&&"string"==typeof n&&n.length){var r=n.match(/[?&]width=([0-9]+[a-z%]*)/),o=n.match(/[?&]height=([0-9]+[a-z%]*)/);r&&ge(r)&&r[1]&&t.width(r[1]),o&&ge(o)&&o[1]&&t.height(o[1])}}}),!0)}var n=document.getElementsByTagName("img");return n.length>0&&(Array.from(n).forEach(function(e){var t=e;if(t){var n=t.getAttribute("src");if(n&&"string"==typeof n&&n.length){var r=n.match(/[?&]width=([0-9]+[a-z%]*)/),o=n.match(/[?&]height=([0-9]+[a-z%]*)/);r&&ge(r)&&r[1]&&(t.style.width=r[1]),o&&ge(o)&&o[1]&&(t.style.height=o[1])}}}),!0)}function Vt(){return Zt()}function Wt(e,t){var n="";return t&&t.length>0&&(n=t.join(";")+";"),"".concat(e,"{").concat(n,"}")}function Yt(e){for(var t=document.getElementsByTagName("meta"),n=0;n<t.length;n++)if(t[n].getAttribute("name")===e)return t[n].getAttribute("content")||"";return""}function Ht(e){var t=e||window.event;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Gt(){var e=window.MAZEY_DEFINE_LISTENERS;if(e&&"object"==typeof e)return e;var t=Object.create(null);return window.MAZEY_DEFINE_LISTENERS=t,t}function Jt(e,t){var n=Gt();Array.isArray(n[e])||Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:[],writable:!0}),"function"==typeof t&&n[e].push(t)}function Kt(e,t){var n=Gt()[e];if(Array.isArray(n))for(var r=n.slice(),o=0,i=r.length;o<i;o++)"function"==typeof r[o]&&(void 0===t?r[o]():r[o](t))}function Qt(e,t){Kt(e,t)}function Xt(e,t){var n=Gt(),r=n[e];if("string"==typeof e&&Array.isArray(r))if("function"==typeof t){for(var o=0,i=r.length;o<i;o++)if(r[o]===t){n[e].splice(o,1);break}}else delete n[e]}function en(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var n=JSON.stringify(t);sessionStorage.setItem(e,void 0===n?"null":n)}}function tn(e){var t=null;if(e){var n=sessionStorage.getItem(e);if(n)try{t=JSON.parse(n)}catch(e){t=n}}return t}function nn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var n=JSON.stringify(t);localStorage.setItem(e,void 0===n?"null":n)}}function rn(e){var t=null;if(e){var n=localStorage.getItem(e);if(n)try{t=JSON.parse(n)}catch(e){t=n}}return t}var on="__mazey_cookie_name_encoded__-",an="__mazey_cookie_value_encoded__-";function un(e){return"".concat(an).concat(encodeURIComponent(e))}function cn(e){var t=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(e),n=0===e.indexOf(on)||0===e.indexOf(an);return t&&!n?e:function(e){return"".concat(on).concat(encodeURIComponent(e))}(e)}function sn(e){var t=cn(e);return t!==e?[t,e]:[e]}function fn(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){var o=n[r].trim();if(0===o.indexOf(t))return o.substring(t.length)}}function ln(e){for(var t=sn(e),n="1"===fn(un(e)),r=0;r<t.length;r++){var o=fn(t[r]);if(void 0!==o){if(n)try{return decodeURIComponent(o)}catch(e){return o}return o}}return""}function dn(e,t,n,r){var o;if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),o="; expires="+i.toUTCString()}else o="";var a=function(e){for(var t=!0,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(!(33===r||r>=35&&r<=43||r>=45&&r<=58||r>=60&&r<=91||r>=93&&r<=126)){t=!1;break}}return{isEncoded:!t,value:t?e:encodeURIComponent(e)}}(t),u=cn(e),c=a.isEncoded?"1":"",s=a.isEncoded?o:"; expires=Thu, 01 Jan 1970 00:00:00 GMT",f=["".concat(u,"=").concat(a.value).concat(o,"; path=/"),"".concat(un(e),"=").concat(c).concat(s,"; path=/")],l=function(e){var t=e?"; domain=".concat(e):"";f.forEach(function(e){document.cookie="".concat(e).concat(t)})},d=location.hostname;if(r)l(r);else if(-1===d.indexOf("."))l();else{var p=d.split(".");p.shift(),l("."+p.join(".")),ln(e)!==t&&l(".".concat(d))}}function pn(e){var t=sn(e),n=t.concat(un(e)),r=new Date;r.setTime(r.getTime()-1);var o=t.some(function(e){return void 0!==fn(e)});return n.forEach(function(e,t){n.indexOf(e)===t&&void 0!==fn(e)&&["".concat(e,"=; expires=").concat(r.toUTCString()),"".concat(e,"=; expires=").concat(r.toUTCString(),"; path=/")].forEach(function(e){document.cookie=e;var t=location.hostname;if(-1!==t.indexOf("."))for(var n=t.split("."),r=0;r<n.length;r++)document.cookie="".concat(e,"; domain=.").concat(n.slice(r).join("."))})}),o&&n.every(function(e){return void 0===fn(e)})}function vn(e){pn(e)}function hn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hn(Object(n),!0).forEach(function(t){Nt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yn(e){var t,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:""}).id,r=function(){},o=new Promise(function(e,n){t=e,r=n}),i=function(){f(),t("loaded")},a=document.createElement("link");a||r(new Error("Not support create link element"));var u="onload"in a,c=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(a.rel="stylesheet",a.type="text/css",a.href=e,void 0!==n&&(a.id=n),document.getElementsByTagName("head")[0].appendChild(a),c||!u)return setTimeout(function(){l(a,i,0)},1),o;function s(){i()}function f(){a&&(a.onload=a.onerror=a.onreadystatechange=null),a=null}function l(e,t,n){if(e){var r,o=e.sheet;if((n+=1)>3e5)return r=!0,e&&(e=null),void t();if(c)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(r=!0)}setTimeout(function(){r?t():l(e,t,n)},20)}}return u?(a.onload=s,a.onerror=function(){f(),r(new Error("Failed to load CSS: ".concat(e)))}):a.onreadystatechange=function(){a&&/loaded|complete/.test(a.readyState)&&s()},o}var mn={id:"",callback:function(){},timeout:5e3,isDefer:!1,isAsync:!1,isCrossOrigin:!1,attributes:null,cssUrl:""};function wn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gn({},mn),n=Object.assign(gn({},mn),t),r=n.id,o=n.callback,i=n.timeout,a=n.isDefer,u=n.isAsync,c=n.isCrossOrigin,s=n.attributes,f=n.cssUrl;if(f){var l=function(e,t){if(!t)return"";if(wt(t))return t;try{var n=new URL(e,location.href);return new URL(t,n).href}catch(n){var r=e.split("/");return r.pop(),"".concat(r.join("/"),"/").concat(t)}}(e,f);l&&yn(l).catch(function(e){console.error("Failed to load CSS from ".concat(l,": ").concat(null==e?void 0:e.message))})}return new Promise(function(t,n){var f=document.createElement("script"),l=!1,d=null,p=function(){f.onload=null,f.onerror=null,f.onreadystatechange=null,null!==d&&(clearTimeout(d),d=null)},v=function(){if(!l){l=!0,p();try{he(o),t("loaded")}catch(e){n(e)}}},h=function(e){l||(l=!0,p(),n(e))};f.type="text/javascript",f.defer=Boolean(a),f.async=Boolean(u),c&&(f.crossOrigin="anonymous"),r&&(f.id=r),s&&Object.keys(s).forEach(function(e){f.setAttribute(e,s[e])}),f.readyState?f.onreadystatechange=function(){"loaded"!==f.readyState&&"complete"!==f.readyState||v()}:f.onload=v,f.onerror=function(){return h(new Error("Failed to load script: ".concat(e)))},f.src=e,i&&(d=setTimeout(function(){return h(new Error("timeout"))},i));var g=document.getElementsByTagName("script")[0];null!=g&&g.parentNode?g.parentNode.insertBefore(f,g):(document.head||document.body||document.documentElement).appendChild(f)})}function bn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return new Promise(function(t,n){var r=null,o=function(){window.removeEventListener("load",i),null!==r&&(clearTimeout(r),r=null)},i=function(){o(),t("load")};"complete"!==document.readyState?(window.addEventListener("load",i),r=setTimeout(function(){o(),n(new Error("timeout"))},e)):t("complete")})}function xn(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e})}function Sn(e,t){var n;if(window[e])return Promise.resolve("defined");var r=On.get(e),o=null===(n=r)||void 0===n?void 0:n.get(t);if(o)return o;r||(r=new Map,On.set(e,r));var i=function(){var n,o;null===(n=r)||void 0===n||n.delete(t),0===(null===(o=r)||void 0===o?void 0:o.size)&&On.delete(e)},a=wn(t).then(function(e){return i(),e},function(e){throw i(),e});return r.set(t,a),a}var On=new Map;function En(e){if("undefined"==typeof window)return!1;var t=[],n=window.PerformanceObserver;return!!n&&(ge(n.supportedEntryTypes)&&(t=n.supportedEntryTypes),t.includes(e))}function _n(){return jn.apply(this,arguments)}function jn(){return(jn=u(D.mark(function e(){return D.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(En("paint")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"first-contentful-paint"===e.name});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function An(){return Tn.apply(this,arguments)}function Tn(){return(Tn=u(D.mark(function e(){return D.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(En("paint")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"first-paint"===e.name});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Mn(){return kn.apply(this,arguments)}function kn(){return(kn=u(D.mark(function e(){return D.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(En("largest-contentful-paint")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"largest-contentful-paint"===e.entryType});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"largest-contentful-paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Pn(){return Nn.apply(this,arguments)}function Nn(){return(Nn=u(D.mark(function e(){return D.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(En("first-input")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"first-input"===e.entryType});if(r){t.disconnect();var o=r.processingStart;e(o?Math.round(r.processingStart-r.startTime):0)}});t.observe({type:"first-input",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Cn(){return Dn.apply(this,arguments)}function Dn(){return(Dn=u(D.mark(function e(){return D.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(En("layout-shift")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(n){var r=n.getEntries().reduce(function(e,t){var n=0;return pe(t.value)&&(n=t.value),e+n},0);t.disconnect(),e(r)});t.observe({type:"layout-shift",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Rn(){return Un.apply(this,arguments)}function Un(){return(Un=u(D.mark(function e(){var t,n;return D.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(En("navigation")){e.next=1;break}return e.abrupt("return",0);case 1:if(window.performance&&window.performance.getEntriesByType){e.next=2;break}return e.abrupt("return",0);case 2:if(t=window.performance.getEntriesByType("navigation")[0],n=0,t){e.next=3;break}return e.abrupt("return",0);case 3:return n=t.responseStart-t.requestStart,e.abrupt("return",Math.round(n));case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Fn(){return Ln.apply(this,arguments)}function Ln(){return Ln=u(D.mark(function e(){var t,n,r,o,i,a,u,c,s,l,d,p,v,h,g,y,m,w,b,x,S,O,E,_,j,A,T,M,k,P,N,C,R,U,F,L,I,B,z,$,q,Z,V,W=arguments;return D.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(V=function(e,t){var n=0;return t&&(n=e-t),n},Z=function(){var e="";return window.screen&&window.screen.orientation&&"number"==typeof window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e},q=function(){var e="",t=window.navigator;if(t.connection&&t.connection.effectiveType)switch(t.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e},$=function(){var e,t=navigator.userAgent.toLowerCase(),n=t.match(/(ipad)/i)&&"ipad",r=t.match(/iphone os/i)&&"iphone os",o=t.match(/midp/i)&&"midp",i=t.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=t.match(/ucweb/i)&&"ucweb",u=t.match(/android/i)&&"android",c=t.match(/windows ce/i)&&"windows ce",s=t.match(/windows mobile/i)&&"windows mobile";return(e=n||r||o||i||a||u||c||s?r||o||i||a||u||c||s?"phone":n?"ipad":void 0:"pc")||(e=""),e},z=function(){var e="",t=navigator.userAgent,n=t.indexOf("Android")>-1,r=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(n&&(e=(i.match(/\d+\.\d+/g)||[])[0]),r&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e},B=function(){return navigator.userAgent.indexOf("Android")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"},I=function(){if(i){var e=i;A=e.decodedBodySize,T=e.encodedBodySize;var n=i;s=n.unloadEventEnd,l=n.unloadEventStart,d=n.redirectEnd,p=n.redirectStart,v=n.domainLookupEnd,h=n.domainLookupStart,g=n.connectEnd,y=n.connectStart,m=n.secureConnectionStart,w=n.responseStart,b=n.requestStart,x=n.responseEnd,S=n.domContentLoadedEventStart,O=n.loadEventStart,E=n.loadEventEnd,_=n.startTime,j=n.fetchStart}else M&&(s=M.unloadEventEnd,l=M.unloadEventStart,d=M.redirectEnd,p=M.redirectStart,v=M.domainLookupEnd,h=M.domainLookupStart,g=M.connectEnd,y=M.connectStart,m=M.secureConnectionStart,w=M.responseStart,b=M.requestStart,x=M.responseEnd,S=M.domContentLoadedEventStart,O=M.loadEventStart,E=M.loadEventEnd,_=M.navigationStart,j=M.fetchStart);pe(_)?C=_:pe(j)&&(C=j);var o={source:k,os:B(),osVersion:z(),deviceType:$(),network:q(),screenDirection:Z(),unloadTime:s-l,redirectTime:d-p,dnsTime:v-h,tcpTime:g-y,sslTime:V(g,m),responseTime:w-b,downloadTime:x-w,firstPaintTime:F,firstContentfulPaintTime:L,domReadyTime:S-C,onloadTime:O-C,whiteTime:w-C,renderTime:E-C,decodedBodySize:A,encodedBodySize:T};Object.keys(o).forEach(function(e){pe(o[e])&&(o[e]<0?o[e]=0:o[e]=Math.round(o[e]))}),pe(o.whiteTime)&&o.whiteTime>o.onloadTime&&(o.whiteTime=0);var a={};t||Object.keys(o).forEach(function(e){a[H(e)]=o[e]}),Object.keys(a).length?r(a):r(o)},t=W.length>0&&void 0!==W[0]&&W[0],En("navigation")){e.next=1;break}return e.abrupt("return",Promise.reject(new Error("navigation is not supported")));case 1:if((n=window.performance)&&"function"==typeof n.getEntries&&"function"==typeof n.getEntriesByType){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("performance is not supported")));case 2:if(o=new Promise(function(e){r=e}),i=null,ge(a=n.getEntriesByType("navigation"))&&(i=a[0]),u=new Array(19).fill(0),c=f(u,19),s=c[0],l=c[1],d=c[2],p=c[3],v=c[4],h=c[5],g=c[6],y=c[7],m=c[8],w=c[9],b=c[10],x=c[11],S=c[12],O=c[13],E=c[14],_=c[15],j=c[16],A=c[17],T=c[18],M=n.timing,k="",!i){e.next=3;break}k="PerformanceNavigationTiming",A=(P=i).decodedBodySize,T=P.encodedBodySize,s=(N=i).unloadEventEnd,l=N.unloadEventStart,d=N.redirectEnd,p=N.redirectStart,v=N.domainLookupEnd,h=N.domainLookupStart,g=N.connectEnd,y=N.connectStart,m=N.secureConnectionStart,w=N.responseStart,b=N.requestStart,x=N.responseEnd,S=N.domContentLoadedEventStart,O=N.loadEventStart,E=N.loadEventEnd,_=N.startTime,j=N.fetchStart,e.next=5;break;case 3:if(!M){e.next=4;break}k="PerformanceTiming",s=M.unloadEventEnd,l=M.unloadEventStart,d=M.redirectEnd,p=M.redirectStart,v=M.domainLookupEnd,h=M.domainLookupStart,g=M.connectEnd,y=M.connectStart,m=M.secureConnectionStart,w=M.responseStart,b=M.requestStart,x=M.responseEnd,S=M.domContentLoadedEventStart,O=M.loadEventStart,E=M.loadEventEnd,_=M.navigationStart,j=M.fetchStart,e.next=5;break;case 4:return e.abrupt("return",Promise.reject(new Error("NavigationTiming and Timing are not supported")));case 5:if(C=0,!pe(_)){e.next=6;break}C=_,e.next=8;break;case 6:if(!pe(j)){e.next=7;break}C=j,e.next=8;break;case 7:return e.abrupt("return",Promise.reject(new Error("startTime, navigationStart or fetchStart are required")));case 8:return e.next=9,Promise.all([An(),_n()]);case 9:return R=e.sent,U=f(R,2),F=U[0],L=U[1],pe(E)&&E>0?I():"complete"===document.readyState?window.setTimeout(I,0):window.addEventListener("load",function e(){window.removeEventListener("load",e),window.setTimeout(function(){I()},0)}),e.abrupt("return",o);case 10:case"end":return e.stop()}},e)})),Ln.apply(this,arguments)}function In(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?In(Object(n),!0).forEach(function(t){Nt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):In(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zn(){var e;if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof navigator)return!1;var t=document.querySelector('link[rel~="manifest"][href]'),n=null==t||null===(e=t.getAttribute("href"))||void 0===e?void 0:e.trim();return!0===window.isSecureContext&&"serviceWorker"in navigator&&Boolean(n)}function $n(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var e={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:"",colorScheme:""};try{var t=navigator.userAgent.toLowerCase();if(!t)return e;var n=function(e){return e.test(t)},r=function(e){var n="",r=t.match(e);return r&&ge(r)&&(n=(n=(n=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),n},o="",i="";n(/windows|win32|win64|wow32|wow64/g)?o="windows":n(/macintosh|macintel/g)?o="macos":n(/x11/g)?o="linux":n(/android|adr/g)?o="android":n(/ios|iphone|ipad|ipod|iwatch/g)&&(o="ios",n(/ipad/g)?i="ipad":n(/iphone/g)?i="iphone":n(/iwatch/g)?i="iwatch":n(/ipod/g)&&(i="ipod")),e=Bn(Bn({},e),{},{system:o,appleType:i});var a="";"windows"===o?n(/windows nt 5.0|windows 2000/g)?a="2000":n(/windows nt 5.1|windows xp/g)?a="xp":n(/windows nt 5.2|windows 2003/g)?a="2003":n(/windows nt 6.0|windows vista/g)?a="vista":n(/windows nt 6.1|windows 7/g)?a="7":n(/windows nt 6.2|windows 8/g)?a="8":n(/windows nt 6.3|windows 8.1/g)?a="8.1":n(/windows nt 10.0|windows 10/g)&&(a="10"):"macos"===o?a=r(/os x [\d._]+/g):"android"===o?a=r(/android [\d._]+/g):"ios"===o&&(a=r(/os [\d._]+/g)),e=Bn(Bn({},e),{},{systemVs:a});var u="";"windows"===o||"macos"===o||"linux"===o?u="desktop":("android"===o||"ios"===o||n(/mobile/g))&&(u="mobile"),e=Bn(Bn({},e),{},{platform:u});var c="",s="";n(/applewebkit/g)?(c="webkit",n(/edg(?:a|ios)?\//g)||n(/edge\//g)?s="edge":n(/opr/g)?s="opera":n(/chrome/g)?s="chrome":n(/safari/g)&&(s="safari")):n(/gecko/g)&&n(/firefox/g)?(c="gecko",s="firefox"):n(/presto/g)?(c="presto",s="opera"):n(/trident|compatible|msie/g)&&(c="trident",s="iexplore"),e=Bn(Bn({},e),{},{engine:c,supporter:s});var f="";"webkit"===c?f=r(/applewebkit\/[\d._]+/g):"gecko"===c?f=r(/gecko\/[\d._]+/g):"presto"===c?f=r(/presto\/[\d._]+/g):"trident"===c&&(f=r(/trident\/[\d._]+/g)),e=Bn(Bn({},e),{},{engineVs:f});var l="";"chrome"===s?l=r(/chrome\/[\d._]+/g):"safari"===s?l=r(/version\/[\d._]+/g):"firefox"===s?l=r(/firefox\/[\d._]+/g):"opera"===s?l=r(/opr\/[\d._]+/g):"iexplore"===s?l=r(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===s&&(l=r(/(?:edge|edg|edga|edgios)\/[\d._]+/g)),e=Bn(Bn({},e),{},{supporterVs:l});var d="",p="";n(/micromessenger/g)?(d="wechat",p=r(/micromessenger\/[\d._]+/g)):n(/qqbrowser/g)?(d="qq_browser",p=r(/qqbrowser\/[\d._]+/g)):n(/\sqq/g)?d="qq_app":n(/ucbrowser/g)?(d="uc",p=r(/ucbrowser\/[\d._]+/g)):n(/qihu 360se/g)?d="360":n(/2345explorer/g)?(d="2345",p=r(/2345explorer\/[\d._]+/g)):n(/metasr/g)?d="sougou":n(/lbbrowser/g)?d="liebao":n(/maxthon/g)?(d="maxthon",p=r(/maxthon\/[\d._]+/g)):n(/biliapp/g)&&(d="bilibili"),e=Bn(Bn({},e),{},{shell:d,shellVs:p});var v="";if(window.matchMedia){var h=window.matchMedia("(prefers-color-scheme: dark)"),g=window.matchMedia("(prefers-color-scheme: light)");h.matches?v="dark":g.matches&&(v="light")}return e=Bn(Bn({},e),{},{colorScheme:v}),window.MAZEY_BROWSER_INFO=e,e}catch(t){return Ft.warn(t),e}}function qn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n=$n(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach(function(o){var i=n[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(t)),r.push("".concat(a).concat(i))}}),r}var Zn="";function Vn(){if(Zn)return Promise.resolve("webp"===Zn);return new Promise(function(e){var t=new Image;t.onload=function(){var n=t.width>0&&t.height>0;Zn=n?"webp":"no-webp",e(n)},t.onerror=function(){Zn="no-webp",e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="})}export{Bt as addClass,Jt as addEvent,qt as addStyle,r as calLongestCommonSubsequence,t as calLongestCommonSubstring,H as camelCase2Underscore,V as camelCaseToKebabCase,Ht as cancelBubble,Me as clearHTML,ke as clearHtml,Ge as convert10To26,q as convertCamelToKebab,W as convertCamelToUnder,Ot as convertHttpToHttps,Z as convertKebabToCamel,St as convertObjectToQuery,_e as convertToHtmlBreaks,Y as convertUnderToCamel,Ue as cutCHSString,De as cutZHString,ae as debounce,I as deepCopy,$ as deepCopyObject,z as deepFreeze,vn as delCookie,he as doFn,Kt as fireEvent,oe as floatFixed,re as floatToPercent,Ve as formatDate,de as formatDurationFromMs,qn as genBrowserAttrs,Ut as genCustomConsole,Be as genHashCode,Q as genRndNumString,Wt as genStyleString,ee as genUniqueNumString,We as generateCalendarVersion,X as generateRndNum,te as generateUniqueNum,ct as getAllQueryParams,$n as getBrowserInfo,Cn as getCLS,ln as getCookie,Je as getCurrentVersion,se as getDateDifference,Gt as getDefineListeners,dt as getDomain,_n as getFCP,Pn as getFID,An as getFP,Ie as getFileSize,fe as getFriendlyInterval,lt as getHashQueryParam,Mn as getLCP,rn as getLocalStorage,Yt as getPageMeta,Fn as getPerformance,ut as getQueryParam,xt as getScriptQueryParam,tn as getSessionStorage,Rn as getTTFB,bt as getUrlFileType,jt as getUrlHost,st as getUrlParam,At as getUrlPath,It as hasClass,i as inRate,Qt as invokeEvent,ve as invokeFn,Oe as isArray,be as isBool,xe as isBoolean,rt as isBrowser,me as isFunction,o as isHit,J as isJSONString,K as isJsonString,ge as isNonEmptyArray,Ee as isNonEmptyObject,pe as isNumber,ye as isPureObject,zn as isSafePWAEnv,we as isString,Vn as isSupportWebp,En as isSupportedEntryType,Se as isUdfOrNul,Le as isValidData,Ze as isValidDate,He as isValidEmail,wt as isValidHttpUrl,Ye as isValidPhoneNumber,pt as isValidUrl,yn as loadCSS,xn as loadImage,wn as loadScript,Sn as loadScriptIfUndefined,n as longestComSubsequence,e as longestComSubstring,ne as mNow,G as mTrim,Ft as mazeyCon,je as newLine,Tt as onURLChange,$t as removeClass,pn as removeCookie,Xt as removeEvent,Ae as removeHTML,Te as removeHtml,Ke as repeatUntilConditionMet,Et as replaceHttp,Pe as sanitizeInput,zt as setClass,dn as setCookie,Zt as setImgSizeBySrc,Vt as setImgWidHeiBySrc,nn as setLocalStorage,en as setSessionStorage,et as sleep,ie as throttle,Lt as timeCon,Re as truncateZHString,Ce as unsanitize,Ne as unsanitizeInput,ft as updateQueryParam,Qe as waitTime,bn as windowLoaded,Fe as zAxiosIsValidRes};
|