sculp-js 1.19.2 → 1.19.3
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/dist/cjs/array.cjs +1 -1
- package/dist/cjs/async.cjs +1 -1
- package/dist/cjs/base64.cjs +157 -71
- package/dist/cjs/clipboard.cjs +1 -1
- package/dist/cjs/cloneDeep.cjs +1 -1
- package/dist/cjs/cookie.cjs +1 -1
- package/dist/cjs/date.cjs +1 -1
- package/dist/cjs/dom.cjs +1 -1
- package/dist/cjs/download.cjs +1 -1
- package/dist/cjs/file.cjs +1 -1
- package/dist/cjs/func.cjs +1 -1
- package/dist/cjs/index.cjs +10 -1
- package/dist/cjs/isEqual.cjs +1 -1
- package/dist/cjs/math.cjs +1 -1
- package/dist/cjs/number.cjs +1 -1
- package/dist/cjs/object.cjs +1 -1
- package/dist/cjs/path.cjs +1 -1
- package/dist/cjs/qs.cjs +1 -1
- package/dist/cjs/random.cjs +1 -1
- package/dist/cjs/string.cjs +1 -1
- package/dist/cjs/tooltip.cjs +1 -1
- package/dist/cjs/tree.cjs +1 -1
- package/dist/cjs/type.cjs +71 -3
- package/dist/cjs/unicodeToolkit.cjs +1 -1
- package/dist/cjs/unique.cjs +1 -1
- package/dist/cjs/url.cjs +1 -1
- package/dist/cjs/validator.cjs +1 -1
- package/dist/cjs/variable.cjs +1 -1
- package/dist/cjs/watermark.cjs +1 -1
- package/dist/esm/array.mjs +1 -1
- package/dist/esm/async.mjs +1 -1
- package/dist/esm/base64.mjs +157 -71
- package/dist/esm/clipboard.mjs +1 -1
- package/dist/esm/cloneDeep.mjs +1 -1
- package/dist/esm/cookie.mjs +1 -1
- package/dist/esm/date.mjs +1 -1
- package/dist/esm/dom.mjs +1 -1
- package/dist/esm/download.mjs +1 -1
- package/dist/esm/file.mjs +1 -1
- package/dist/esm/func.mjs +1 -1
- package/dist/esm/index.mjs +10 -1
- package/dist/esm/isEqual.mjs +1 -1
- package/dist/esm/math.mjs +1 -1
- package/dist/esm/number.mjs +1 -1
- package/dist/esm/object.mjs +1 -1
- package/dist/esm/path.mjs +1 -1
- package/dist/esm/qs.mjs +1 -1
- package/dist/esm/random.mjs +1 -1
- package/dist/esm/string.mjs +1 -1
- package/dist/esm/tooltip.mjs +1 -1
- package/dist/esm/tree.mjs +1 -1
- package/dist/esm/type.mjs +71 -3
- package/dist/esm/unicodeToolkit.mjs +1 -1
- package/dist/esm/unique.mjs +1 -1
- package/dist/esm/url.mjs +1 -1
- package/dist/esm/validator.mjs +1 -1
- package/dist/esm/variable.mjs +1 -1
- package/dist/esm/watermark.mjs +1 -1
- package/dist/types/base64.d.ts +6 -6
- package/dist/types/type.d.ts +86 -3
- package/dist/umd/index.min.js +2 -2
- package/package.json +1 -1
package/dist/types/base64.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 字符串编码成Base64
|
|
2
|
+
* 字符串编码成 Base64(适用于任何环境,包括小程序)
|
|
3
3
|
* @param {string} string
|
|
4
4
|
* @returns {string}
|
|
5
5
|
*/
|
|
6
6
|
export declare function weBtoa(string: string): string;
|
|
7
7
|
/**
|
|
8
|
-
* Base64
|
|
8
|
+
* Base64 解码为原始字符串(适用于任何环境,包括小程序)
|
|
9
9
|
* @param {string} string
|
|
10
10
|
* @returns {string}
|
|
11
11
|
*/
|
|
12
12
|
export declare function weAtob(string: string): string;
|
|
13
13
|
/**
|
|
14
|
-
* 将base64编码的字符串转换为原始字符串,包括对中文内容的处理(高性能,且支持Web、Node、小程序等任意平台)
|
|
15
|
-
* @param base64 base64编码的字符串
|
|
14
|
+
* 将 base64 编码的字符串转换为原始字符串,包括对中文内容的处理 (高性能,且支持 Web、Node、小程序等任意平台)
|
|
15
|
+
* @param base64 base64 编码的字符串
|
|
16
16
|
* @returns 原始字符串,包括中文内容
|
|
17
17
|
*/
|
|
18
18
|
export declare function b64decode(base64: string): string;
|
|
19
19
|
/**
|
|
20
|
-
* 将原始字符串,包括中文内容,转换为base64编码的字符串(高性能,且支持Web、Node、小程序等任意平台)
|
|
20
|
+
* 将原始字符串,包括中文内容,转换为 base64 编码的字符串 (高性能,且支持 Web、Node、小程序等任意平台)
|
|
21
21
|
* @param rawStr 原始字符串,包括中文内容
|
|
22
|
-
* @returns base64编码的字符串
|
|
22
|
+
* @returns base64 编码的字符串
|
|
23
23
|
*/
|
|
24
24
|
export declare function b64encode(rawStr: string): string;
|
|
25
25
|
declare const _default: {
|
package/dist/types/type.d.ts
CHANGED
|
@@ -52,16 +52,75 @@ export declare function objectHas<T extends AnyObject>(obj: T, key: keyof T): bo
|
|
|
52
52
|
* @returns {boolean}
|
|
53
53
|
*/
|
|
54
54
|
export declare function arrayLike(any: unknown): boolean;
|
|
55
|
+
declare const TYPE_TAGS: readonly ["Null", "Undefined", "Symbol", "Boolean", "Number", "String", "BigInt", "Function", "AsyncFunction", "Object", "Array", "Arguments", "Date", "RegExp", "Error", "Promise", "Map", "Set", "ArrayBuffer", "DataView", "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array", "BigInt64Array", "BigUint64Array"];
|
|
55
56
|
/**
|
|
56
|
-
*
|
|
57
|
+
* 类型标签类型
|
|
58
|
+
*/
|
|
59
|
+
export type TypeTag = (typeof TYPE_TAGS)[number];
|
|
60
|
+
/**
|
|
61
|
+
* 类型标签到 TypeScript 类型的映射
|
|
62
|
+
*/
|
|
63
|
+
export interface TypeMapping {
|
|
64
|
+
Null: null;
|
|
65
|
+
Undefined: undefined;
|
|
66
|
+
Symbol: symbol;
|
|
67
|
+
Boolean: boolean;
|
|
68
|
+
Number: number;
|
|
69
|
+
String: string;
|
|
70
|
+
BigInt: bigint;
|
|
71
|
+
Function: Function;
|
|
72
|
+
AsyncFunction: Function;
|
|
73
|
+
Object: Record<string, unknown>;
|
|
74
|
+
Array: unknown[];
|
|
75
|
+
Arguments: IArguments;
|
|
76
|
+
Date: Date;
|
|
77
|
+
RegExp: RegExp;
|
|
78
|
+
Error: Error;
|
|
79
|
+
Promise: Promise<unknown>;
|
|
80
|
+
Map: Map<unknown, unknown>;
|
|
81
|
+
Set: Set<unknown>;
|
|
82
|
+
ArrayBuffer: ArrayBuffer;
|
|
83
|
+
DataView: DataView;
|
|
84
|
+
Int8Array: Int8Array;
|
|
85
|
+
Uint8Array: Uint8Array;
|
|
86
|
+
Uint8ClampedArray: Uint8ClampedArray;
|
|
87
|
+
Int16Array: Int16Array;
|
|
88
|
+
Uint16Array: Uint16Array;
|
|
89
|
+
Int32Array: Int32Array;
|
|
90
|
+
Uint32Array: Uint32Array;
|
|
91
|
+
Float32Array: Float32Array;
|
|
92
|
+
Float64Array: Float64Array;
|
|
93
|
+
BigInt64Array: BigInt64Array;
|
|
94
|
+
BigUint64Array: BigUint64Array;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 判断任意值的数据类型,检查非对象时不如 typeof、instanceof 的性能高
|
|
57
98
|
*
|
|
58
99
|
* 当检查类对象时是不可靠的,对象可以通过定义 Symbol.toStringTag 属性来更改检查结果
|
|
59
100
|
*
|
|
60
101
|
* 详见:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/toString
|
|
61
102
|
* @param {unknown} any
|
|
62
|
-
* @returns
|
|
103
|
+
* @returns {TypeTag} 类型标签字符串
|
|
104
|
+
*/
|
|
105
|
+
export declare function typeIs(any: unknown): TypeTag;
|
|
106
|
+
/**
|
|
107
|
+
* 判断值是否为指定类型(带类型守卫)
|
|
108
|
+
* @param {unknown} value - 要检查的值
|
|
109
|
+
* @param {TypeTag} type - 期望的类型
|
|
110
|
+
* @returns {boolean} 如果值是指定类型则返回 true
|
|
111
|
+
* @example
|
|
112
|
+
* is(value, 'String')
|
|
113
|
+
* is(value, 'Array')
|
|
114
|
+
* is(value, 'Date')
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* // 使用类型守卫
|
|
118
|
+
* if (is(value, 'String')) {
|
|
119
|
+
* // value 在这里被推断为 string 类型
|
|
120
|
+
* console.log(value.toUpperCase());
|
|
121
|
+
* }
|
|
63
122
|
*/
|
|
64
|
-
export declare function
|
|
123
|
+
export declare function is<T extends TypeTag>(value: unknown, type: T): value is TypeMapping[T];
|
|
65
124
|
export declare const isString: (any: unknown) => any is string;
|
|
66
125
|
export declare const isBoolean: (any: unknown) => any is boolean;
|
|
67
126
|
export declare const isSymbol: (any: unknown) => any is symbol;
|
|
@@ -84,6 +143,19 @@ export declare const isNaN: (any: unknown) => any is number;
|
|
|
84
143
|
export declare const isDate: (any: unknown) => any is Date;
|
|
85
144
|
export declare const isError: (any: unknown) => any is Error;
|
|
86
145
|
export declare const isRegExp: (any: unknown) => any is RegExp;
|
|
146
|
+
export declare const isPromise: (any: unknown) => any is Promise<unknown>;
|
|
147
|
+
export declare const isMap: (any: unknown) => any is Map<unknown, unknown>;
|
|
148
|
+
export declare const isSet: (any: unknown) => any is Set<unknown>;
|
|
149
|
+
/**
|
|
150
|
+
* 判断是否为 TypedArray
|
|
151
|
+
* @param {unknown} any
|
|
152
|
+
* @returns {boolean}
|
|
153
|
+
*/
|
|
154
|
+
export declare const isTypedArray: (any: unknown) => boolean;
|
|
155
|
+
export declare const isDataView: (any: unknown) => any is DataView;
|
|
156
|
+
export declare const isArrayBuffer: (any: unknown) => any is ArrayBuffer;
|
|
157
|
+
export declare const isArguments: (any: unknown) => any is IArguments;
|
|
158
|
+
export declare const isAsyncFunction: (any: unknown) => any is Function;
|
|
87
159
|
/**
|
|
88
160
|
* 判断一个字符串是否为有效的 JSON, 若有效则返回有效的JSON对象,否则false
|
|
89
161
|
* @param {string} str
|
|
@@ -126,6 +198,9 @@ export declare function isEmpty(value: any): boolean;
|
|
|
126
198
|
export declare function isNodeList(value: any): boolean;
|
|
127
199
|
declare const _default: {
|
|
128
200
|
typeIs: typeof typeIs;
|
|
201
|
+
is: typeof is;
|
|
202
|
+
TypeMapping: TypeMapping;
|
|
203
|
+
TypeTag: "ArrayBuffer" | "Int8Array" | "Uint8Array" | "Uint8ClampedArray" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float32Array" | "Float64Array" | "BigInt" | "BigInt64Array" | "BigUint64Array" | "Null" | "Undefined" | "Symbol" | "Boolean" | "Number" | "String" | "Function" | "AsyncFunction" | "Object" | "Array" | "Arguments" | "Date" | "RegExp" | "Error" | "Promise" | "Map" | "Set" | "DataView";
|
|
129
204
|
objectHas: typeof objectHas;
|
|
130
205
|
arrayLike: typeof arrayLike;
|
|
131
206
|
isString: (any: unknown) => any is string;
|
|
@@ -145,6 +220,14 @@ declare const _default: {
|
|
|
145
220
|
isDate: (any: unknown) => any is Date;
|
|
146
221
|
isError: (any: unknown) => any is Error;
|
|
147
222
|
isRegExp: (any: unknown) => any is RegExp;
|
|
223
|
+
isPromise: (any: unknown) => any is Promise<unknown>;
|
|
224
|
+
isMap: (any: unknown) => any is Map<unknown, unknown>;
|
|
225
|
+
isSet: (any: unknown) => any is Set<unknown>;
|
|
226
|
+
isTypedArray: (any: unknown) => boolean;
|
|
227
|
+
isDataView: (any: unknown) => any is DataView;
|
|
228
|
+
isArrayBuffer: (any: unknown) => any is ArrayBuffer;
|
|
229
|
+
isArguments: (any: unknown) => any is IArguments;
|
|
230
|
+
isAsyncFunction: (any: unknown) => any is Function;
|
|
148
231
|
isJsonString: typeof isJsonString;
|
|
149
232
|
isEmpty: typeof isEmpty;
|
|
150
233
|
isNodeList: typeof isNodeList;
|
package/dist/umd/index.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sculp-js v1.19.
|
|
2
|
+
* sculp-js v1.19.3
|
|
3
3
|
* (c) 2023-present chandq
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).sculpJs={})}(this,(function(e){"use strict";function t(e,t,n=!1){if(n)for(let n=e.length-1;n>=0;n--){const r=t(e[n],n,e);if(!1===r)break}else for(let n=0,r=e.length;n<r;n++){const r=t(e[n],n,e);if(!1===r)break}e=null}async function n(e,t,n=!1){if(n)for(let n=e.length-1;n>=0&&!1!==await t(e[n],n);n--);else for(let n=0,r=e.length;n<r&&!1!==await t(e[n],n);n++);}function r(e,t,n){if(t===n||t+1===n)return;const[r]=e.splice(t,1),o=n<t?n:n-1;e.splice(o,0,r)}function o(e,n){const r=[],o=n;return t(e,((e,t)=>{o(e,t)&&r.push(t)})),r.forEach(((t,n)=>{e.splice(t-n,1)})),e}function i(e,t,n){const r=e=>{if(n)return n(e);if("string"==typeof e||"number"==typeof e||"symbol"==typeof e)return e;throw new Error("diffArray: getKey is required when item is not a primitive value")},o=new Map,i=new Map;for(const t of e)o.set(r(t),t);for(const e of t)i.set(r(e),e);const s=[],a=[];for(const[e,t]of i)o.has(e)||s.push(t);for(const[e,t]of o)i.has(e)||a.push(t);return{added:s,removed:a}}var s={arrayEach:t,arrayEachAsync:n,arrayInsertBefore:r,arrayRemove:o,diffArray:i},a=Object.freeze({__proto__:null,arrayEach:t,arrayEachAsync:n,arrayInsertBefore:r,arrayRemove:o,default:s,diffArray:i});const{toString:l,hasOwnProperty:c}=Object.prototype;function u(e,t){return c.call(e,t)}function d(e){return!!_(e)||(!!p(e)||!!A(e)&&u(e,"length"))}function f(e){return l.call(e).slice(8,-1)}const p=e=>"string"==typeof e,h=e=>"boolean"==typeof e,g=e=>"symbol"==typeof e,m=e=>"bigint"==typeof e,b=e=>"number"==typeof e&&!Number.isNaN(e),y=e=>void 0===e,w=e=>null===e,S=e=>null===e||"object"!=typeof e;function E(e){return y(e)||w(e)}const A=e=>"Object"===f(e),_=e=>Array.isArray(e),x=e=>"function"==typeof e,v=e=>Number.isNaN(e),F=e=>"Date"===f(e),j=e=>"Error"===f(e),C=e=>"RegExp"===f(e);function T(e){try{const t=JSON.parse(e);return"object"==typeof t&&null!==t&&t}catch(e){return!1}}function R(e){if(E(e)||Number.isNaN(e))return!0;const t=f(e);return d(e)||"Arguments"===t?!e.length:"Set"===t||"Map"===t?!e.size:!Object.keys(e).length}function N(e){return!y(NodeList)&&NodeList.prototype.isPrototypeOf(e)}var O={typeIs:f,objectHas:u,arrayLike:d,isString:p,isBoolean:h,isSymbol:g,isBigInt:m,isNumber:b,isUndefined:y,isNull:w,isPrimitive:S,isNullOrUnDef:E,isNullish:E,isObject:A,isArray:_,isFunction:x,isNaN:v,isDate:F,isError:j,isRegExp:C,isJsonString:T,isEmpty:R,isNodeList:N},P=Object.freeze({__proto__:null,arrayLike:d,default:O,isArray:_,isBigInt:m,isBoolean:h,isDate:F,isEmpty:R,isError:j,isFunction:x,isJsonString:T,isNaN:v,isNodeList:N,isNull:w,isNullOrUnDef:E,isNullish:E,isNumber:b,isObject:A,isPrimitive:S,isRegExp:C,isString:p,isSymbol:g,isUndefined:y,objectHas:u,typeIs:f});const I=f,$=e=>{if(!A(e))return!1;const t=Object.getPrototypeOf(e);return!t||t===Object.prototype};function D(e,t){for(const n in e)if(u(e,n)&&!1===t(e[n],n))break;e=null}async function L(e,t){for(const n in e)if(u(e,n)&&!1===await t(e[n],n))break}function M(e,t){const n={};for(const r in e)u(e,r)&&(n[r]=t(e[r],r));return e=null,n}function U(e,t){const n={};return D(e,((e,r)=>{t.includes(r)&&(n[r]=e)})),e=null,n}function k(e,t){const n={};return D(e,((e,r)=>{t.includes(r)||(n[r]=e)})),e=null,n}const z=(e,t,n)=>{if(y(n))return t;if(I(t)!==I(n))return _(n)?z(e,[],n):A(n)?z(e,{},n):n;if($(n)){const r=e.get(n);return r||(e.set(n,t),D(n,((n,r)=>{t[r]=z(e,t[r],n)})),t)}if(_(n)){const r=e.get(n);return r||(e.set(n,t),n.forEach(((n,r)=>{t[r]=z(e,t[r],n)})),t)}return n};function B(e,...t){const n=new Map;for(let r=0,o=t.length;r<o;r++){const o=t[r];e=z(n,e,o)}return n.clear(),e}function H(e,t,n){const r=n||((e,t,n)=>void 0===e[n]);return D(t,((n,o)=>{r(e,t,o)&&(e[o]=n)})),e}function G(e,t,n=!1){const r=(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split(".");let o=e,i=0;for(let e=r.length;i<e-1;++i){const e=r[i];if(b(Number(e))&&Array.isArray(o))o=o[e];else{if(!A(o)||!u(o,e)){if(o=void 0,n)throw new Error("[Object] objectGet path 路径不正确");break}o=o[e]}}return{p:o,k:o?r[i]:void 0,v:o?o[r[i]]:void 0}}var q={isPlainObject:$,objectEach:D,objectEachAsync:L,objectMap:M,objectPick:U,objectOmit:k,objectAssign:B,objectMerge:B,objectFill:H,objectGet:G},W=Object.freeze({__proto__:null,default:q,isPlainObject:$,objectAssign:B,objectEach:D,objectEachAsync:L,objectFill:H,objectGet:G,objectMap:M,objectMerge:B,objectOmit:k,objectPick:U});function V(e,t){let n=e;t&&(n=e.replace(/^./,(e=>e.toUpperCase())));return n.replace(/[\s_-](.)/g,((e,t)=>t.toUpperCase()))}function X(e,t="-"){return e.replace(/^./,(e=>e.toLowerCase())).replace(/[A-Z]/g,(e=>`${t}${e.toLowerCase()}`))}const Y="0123456789",K="abcdefghijklmnopqrstuvwxyz",J="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Z=/%[%sdo]/g;function Q(e,...t){let n=0;return[e.replace(Z,(e=>{const r=t[n++];switch(e){case"%%":return n--,"%";default:case"%s":return String(r);case"%d":return String(Number(r));case"%o":return JSON.stringify(r)}})),...t.splice(n).map(String)].join(" ")}const ee=/\${(.*?)}/g,te=(e,t)=>e.replace(ee,((e,n)=>((e,t)=>{try{return new Function(`with(arguments[0]){if(arguments[0].${e} === undefined)throw "";return String(arguments[0].${e})}`)(t)}catch(t){throw new SyntaxError(`无法执行表达式:${e}`)}})(n,t))),ne=e=>{const t={"&":"&","<":"<",">":">",'"':"""};return e.replace(/[&<>"]/g,(e=>t[e]))},re=(e,t=" ")=>new Array(e).fill(t).join("");function oe(e=location.search){const t={};return Array.from(e.matchAll(/[&?]?([^=&]+)=?([^=&]*)/g)).forEach(((e,n)=>{t[e[1]]?"string"==typeof t[e[1]]?t[e[1]]=[t[e[1]],e[2]]:t[e[1]].push(e[2]):t[e[1]]=e[2]})),t}var ie={stringCamelCase:V,stringKebabCase:X,STRING_ARABIC_NUMERALS:Y,STRING_LOWERCASE_ALPHA:K,STRING_UPPERCASE_ALPHA:J,stringFormat:Q,stringAssign:te,stringEscapeHtml:ne,stringFill:re,parseQueryParams:oe},se=Object.freeze({__proto__:null,STRING_ARABIC_NUMERALS:Y,STRING_LOWERCASE_ALPHA:K,STRING_UPPERCASE_ALPHA:J,default:ie,parseQueryParams:oe,stringAssign:te,stringCamelCase:V,stringEscapeHtml:ne,stringFill:re,stringFormat:Q,stringKebabCase:X});function ae(e,t){if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList.contains(t)}const le=(e,t)=>{e.split(/\s+/g).forEach(t)};function ce(e,t){le(t,(t=>e.classList.add(t)))}function ue(e,t){le(t,(t=>e.classList.remove(t)))}const de=(e,t,n)=>{A(t)?D(t,((t,n)=>{de(e,n,t)})):e.style.setProperty(X(t),n)};function fe(e,t){return getComputedStyle(e).getPropertyValue(t)}function pe(e,t,n=!0){const r=getComputedStyle(e).getPropertyValue(t)??"";return n?Number(r.replace(/([0-9]*)(.*)/g,"$1")):r}function he(e,t=14,n=!0){let r=0;if(console.assert(p(e),`${e} 不是有效的字符串`),p(e)&&e.length>0){const o="getStrWidth1494304949567";let i=document.querySelector(`#${o}`);if(!i){const n=document.createElement("span");n.id=o,n.style.fontSize=t+"px",n.style.whiteSpace="nowrap",n.style.visibility="hidden",n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",n.textContent=e,document.body.appendChild(n),i=n}i.textContent=e,r=i.offsetWidth,n&&i.remove()}return r}function ge(e){let t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){const n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();const n=window.getSelection(),r=document.createRange();r.selectNodeContents(e),n.removeAllRanges(),n.addRange(r),t=n.toString()}return t}var me={hasClass:ae,addClass:ce,removeClass:ue,setStyle:de,getStyle:fe,getComputedCssVal:pe,getStrWidthPx:he,select:ge},be=Object.freeze({__proto__:null,addClass:ce,default:me,getComputedCssVal:pe,getStrWidthPx:he,getStyle:fe,hasClass:ae,removeClass:ue,select:ge,setStyle:de});function ye(e,t){const{successCallback:n,failCallback:r}=E(t)?{}:t;navigator.clipboard?navigator.clipboard.writeText(e).then((()=>{x(n)&&n()})).catch((n=>{we(e,t)})):we(e,t)}function we(e,t){const{successCallback:n,failCallback:r,container:o=document.body}=E(t)?{}:t;let i=function(e){const t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";const r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top=`${r}px`,n.setAttribute("readonly",""),n.value=e,n}(e);o.appendChild(i),ge(i);try{document.execCommand("copy")&&x(n)&&n()}catch(e){x(r)&&r(e)}finally{o.removeChild(i),i=null,window.getSelection()?.removeAllRanges()}}var Se={copyText:ye,fallbackCopyText:we},Ee=Object.freeze({__proto__:null,copyText:ye,default:Se,fallbackCopyText:we});function Ae(e){const{cookie:t}=document;if(!t)return"";const n=t.split(";");for(let t=0;t<n.length;t++){const r=n[t],[o,i=""]=r.split("=");if(o===e)return decodeURIComponent(i)}return""}function _e(e,t,n){const r=[],o="expires";if(r.push([e,encodeURIComponent(t)]),b(n)){const e=new Date;e.setTime(e.getTime()+n),r.push([o,e.toUTCString()])}else F(n)&&r.push([o,n.toUTCString()]);r.push(["path","/"]),document.cookie=r.map((e=>{const[t,n]=e;return`${t}=${n}`})).join(";")}const xe=e=>_e(e,"",-1);var ve={cookieSet:_e,cookieGet:Ae,cookieDel:xe},Fe=Object.freeze({__proto__:null,cookieDel:xe,cookieGet:Ae,cookieSet:_e,default:ve});const je=e=>F(e)&&!v(e.getTime()),Ce=e=>{if(!p(e))return;const t=e.replace(/-/g,"/");return new Date(t)},Te=e=>{if(!p(e))return;const t=/([+-])(\d\d)(\d\d)$/,n=t.exec(e);if(!n)return;const r=e.replace(t,"Z"),o=new Date(r);if(!je(o))return;const[,i,s,a]=n,l=parseInt(s,10),c=parseInt(a,10),u=(e,t)=>"+"===i?e-t:e+t;return o.setHours(u(o.getHours(),l)),o.setMinutes(u(o.getMinutes(),c)),o};function Re(e){const t=new Date(e);if(je(t))return t;const n=Ce(e);if(je(n))return n;const r=Te(e);if(je(r))return r;throw new SyntaxError(`${e.toString()} 不是一个合法的日期描述`)}function Ne(e){const t=Re(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)}function Oe(e){const t=Ne(e);return t.setDate(t.getDate()+1),Re(t.getTime()-1)}function Pe(e,t="YYYY-MM-DD HH:mm:ss"){const n=Re(e);let r,o=t;const i={"Y+":`${n.getFullYear()}`,"y+":`${n.getFullYear()}`,"M+":`${n.getMonth()+1}`,"D+":`${n.getDate()}`,"d+":`${n.getDate()}`,"H+":`${n.getHours()}`,"m+":`${n.getMinutes()}`,"s+":`${n.getSeconds()}`,"S+":`${n.getMilliseconds()}`,"w+":["周日","周一","周二","周三","周四","周五","周六"][n.getDay()]};for(const e in i)r=new RegExp("("+e+")").exec(o),r&&(o=o.replace(r[1],1===r[1].length?i[e]:i[e].padStart(r[1].length,"0")));return o}function Ie(e,t={}){const{format:n,returnDate:r=!1,years:o=0,months:i=0,weeks:s=0,days:a=0,hours:l=0,minutes:c=0,seconds:u=0,milliseconds:d=0}=t,f=Re(e),p=new Date(f),h=f.getDate(),g=h===new Date(f.getFullYear(),f.getMonth()+1,0).getDate();if(p.setFullYear(p.getFullYear()+o),0!==i){const e=p.getMonth()+i,t=new Date(p.getFullYear(),e+1,0).getDate();p.setDate(1),p.setMonth(e),g||h>t?p.setDate(t):p.setDate(h)}if(0===a&&0===s||p.setDate(p.getDate()+a+7*s),p.setHours(p.getHours()+l),p.setMinutes(p.getMinutes()+c),p.setSeconds(p.getSeconds()+u),p.setMilliseconds(p.getMilliseconds()+d),r)return p;if(n)return Pe(p,n);const m=p.getFullYear(),b=String(p.getMonth()+1).padStart(2,"0"),y=String(p.getDate()).padStart(2,"0"),w=String(p.getHours()).padStart(2,"0"),S=String(p.getMinutes()).padStart(2,"0"),E=String(p.getSeconds()).padStart(2,"0");if(t.hasOwnProperty("hours")||t.hasOwnProperty("minutes")||t.hasOwnProperty("seconds")||t.hasOwnProperty("milliseconds")){if(t.hasOwnProperty("milliseconds")){return`${m}-${b}-${y} ${w}:${S}:${E}.${String(p.getMilliseconds()).padStart(3,"0")}`}return t.hasOwnProperty("seconds")?`${m}-${b}-${y} ${w}:${S}:${E}`:`${m}-${b}-${y} ${w}:${S}`}return`${m}-${b}-${y}`}var $e={isValidDate:je,dateParse:Re,dateToStart:Ne,dateToEnd:Oe,formatDate:Pe,adjustDate:Ie,calculateDate:Ie},De=Object.freeze({__proto__:null,adjustDate:Ie,dateParse:Re,dateToEnd:Oe,dateToStart:Ne,default:$e,formatDate:Pe,isValidDate:je});const Le=e=>{const t=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/").replace(/\.{3,}/g,"..").replace(/\/\.\//g,"/").split("/").map((e=>e.trim())),n=e=>".."===e,r=[];let o=!1;const i=e=>{r.push(e)};return t.forEach((e=>{const t=(e=>"."===e)(e),s=n(e);return o?t?void 0:s?(()=>{if(0===r.length)return;const e=r[r.length-1];n(e)?r.push(".."):r.pop()})():void i(e):(i(e),void(o=!t&&!s))})),r.join("/")},Me=(e,...t)=>Le([e,...t].join("/"));var Ue={pathJoin:Me,pathNormalize:Le},ke=Object.freeze({__proto__:null,default:Ue,pathJoin:Me,pathNormalize:Le});function ze(e){const t=new URLSearchParams(e),n={};for(const[e,r]of t.entries())y(n[e])?n[e]=r:_(n[e])||(n[e]=t.getAll(e));return n}const Be=e=>p(e)?e:b(e)?String(e):h(e)?e?"true":"false":F(e)?e.toISOString():null;function He(e,t=Be){const n=new URLSearchParams;return D(e,((e,r)=>{if(_(e))e.forEach((e=>{const o=t(e);null!==o&&n.append(r.toString(),o)}));else{const o=t(e);if(null===o)return;n.set(r.toString(),o)}})),n.toString()}var Ge={qsParse:ze,qsStringify:He},qe=Object.freeze({__proto__:null,default:Ge,qsParse:ze,qsStringify:He});const We=(e,t=!0)=>{let n=null;x(URL)&&t?n=new URL(e):(n=document.createElement("a"),n.href=e);const{protocol:r,username:o,password:i,host:s,port:a,hostname:l,hash:c,search:u,pathname:d}=n,f=Me("/",d),p=o&&i?`${o}:${i}`:"",h=u.replace(/^\?/,"");return n=null,{protocol:r,auth:p,username:o,password:i,host:s,port:a,hostname:l,hash:c,search:u,searchParams:ze(h),query:h,pathname:f,path:`${f}${u}`,href:e}},Ve=e=>{const{protocol:t,auth:n,host:r,pathname:o,searchParams:i,hash:s}=e,a=n?`${n}@`:"",l=He(i),c=l?`?${l}`:"";let u=s.replace(/^#/,"");return u=u?"#"+u:"",`${t}//${a}${r}${o}${c}${u}`},Xe=(e,t)=>{const n=We(e);return Object.assign(n.searchParams,t),Ve(n)},Ye=(e,t)=>{const n=We(e);return t.forEach((e=>delete n.searchParams[e])),Ve(n)};var Ke={urlParse:We,urlStringify:Ve,urlSetParams:Xe,urlDelParams:Ye},Je=Object.freeze({__proto__:null,default:Ke,urlDelParams:Ye,urlParse:We,urlSetParams:Xe,urlStringify:Ve});function Ze(e,t){window.open(t?Xe(e,t):e)}function Qe(e,t,n){let r=document.createElement("a");r.download=t,r.style.display="none",r.href=e,document.body.appendChild(r),r.click(),setTimeout((()=>{document.body.removeChild(r),r=null,x(n)&&n()}))}function et(e,t,n){const r=URL.createObjectURL(e);Qe(r,t),setTimeout((()=>{URL.revokeObjectURL(r),x(n)&&n()}))}function tt(e,t,n){const{successCode:r=200,successCallback:o,failCallback:i}=E(n)?{successCode:200,successCallback:void 0,failCallback:void 0}:n,s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="blob",s.onload=function(){if(s.status===r)et(s.response,t,o);else if(x(i)){const e=s.status,t=s.getResponseHeader("Content-Type");if(p(t)&&t.includes("application/json")){const t=new FileReader;t.onload=()=>{i({status:e,response:t.result})},t.readAsText(s.response)}else i(s)}},s.onerror=e=>{x(i)&&i({status:0,code:"ERROR_CONNECTION_REFUSED"})},s.send()}function nt(e,t,n,r){if(n=n.replace(`.${t}`,"")+`.${t}`,"json"===t){et(new Blob([JSON.stringify(e,null,4)]),n)}else{if(!r||!r.length)throw new Error("未传入表头数据");if(!Array.isArray(e))throw new Error("data error! expected array!");const o=r.join(",")+"\n";let i="";e.forEach((e=>{i+=Object.values(e).join(",\t")+",\n"}));Qe("data:"+{csv:"text/csv",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}[t]+";charset=utf-8,\ufeff"+encodeURIComponent(o+i),n)}}var rt={downloadURL:Ze,downloadHref:Qe,downloadBlob:et,crossOriginDownload:tt,downloadData:nt},ot=Object.freeze({__proto__:null,crossOriginDownload:tt,default:rt,downloadBlob:et,downloadData:nt,downloadHref:Qe,downloadURL:Ze});function it(e=1){return new Promise((t=>setTimeout(t,e)))}function st(e,t,n=1/0){return new Promise(((r,o)=>{const i=e[Symbol.iterator](),s=Math.min(e.length,n),a=[];let l,c=0,u=0;const d=()=>{if(l)return o(l);const n=i.next();if(n.done)return void(c===e.length&&r(a));const s=u++;t(n.value,s,e).then((e=>{c++,a[s]=e,d()})).catch((e=>{l=e,d()}))};for(let e=0;e<s;e++)d()}))}function at(e,t){return e.then((e=>[null,e])).catch((e=>{if(t){return[Object.assign({},e,t),void 0]}return[e,void 0]}))}var lt={wait:it,asyncMap:st,safeAwait:at},ct=Object.freeze({__proto__:null,asyncMap:st,default:lt,safeAwait:at,wait:it});function ut(){return!!document.createElement("canvas").getContext}function dt(e,t){let n=document.createElement("input");n.setAttribute("id",String(Date.now())),n.setAttribute("type","file"),n.setAttribute("style","visibility:hidden"),n.setAttribute("accept",e),document.body.appendChild(n),n.click(),n.onchange=e=>{t(e.target.files),setTimeout((()=>{document.body.removeChild(n),n=null}))}}function ft({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r}){let o=n,i=r;return(n>e||r>t)&&(n/r>e/t?(o=e,i=Math.round(e*(r/n))):(i=t,o=Math.round(t*(n/r)))),{width:o,height:i}}function pt(e,t={mime:"image/jpeg",minFileSizeKB:50}){if(!(e instanceof File||e instanceof FileList))throw new Error(`${e} require be File or FileList`);if(!ut())throw new Error("Current runtime environment not support Canvas");const{quality:n,mime:r="image/jpeg",maxSize:o,minFileSizeKB:i=50}=A(t)?t:{};let s,a=n;if(n)a=n;else if(e instanceof File){const t=+parseInt((e.size/1024).toFixed(2));a=t<i?1:t<1024?.85:t<5120?.8:.75}return b(o)&&(s=o>=1200?o:1200),e instanceof FileList?Promise.all(Array.from(e).map((e=>pt(e,{maxSize:s,mime:r,quality:a})))):e instanceof File?new Promise((t=>{const n=[...e.name.split(".").slice(0,-1),{"image/webp":"webp","image/jpeg":"jpg","image/png":"png"}[r]].join("."),o=+parseInt((e.size/1024).toFixed(2));if(o<i)t({file:e});else{const i=new FileReader;i.onload=({target:{result:i}})=>{const l=new Image;l.onload=()=>{const c=document.createElement("canvas"),u=c.getContext("2d"),d=l.width,f=l.height,{width:p,height:h}=function({sizeKB:e,maxSize:t,originWidth:n,originHeight:r}){let o=n,i=r;if(b(t)){const{width:e,height:s}=ft({maxWidth:t,maxHeight:t,originWidth:n,originHeight:r});o=e,i=s}else if(e<500){const e=1200,t=1200,{width:s,height:a}=ft({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}else if(e<5120){const e=1400,t=1400,{width:s,height:a}=ft({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}else if(e<10240){const e=1600,t=1600,{width:s,height:a}=ft({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}else if(10240<=e){const e=n>15e3?8192:n>1e4?4096:2048,t=r>15e3?8192:r>1e4?4096:2048,{width:s,height:a}=ft({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}return{width:o,height:i}}({sizeKB:o,maxSize:s,originWidth:d,originHeight:f});c.width=p,c.height=h,u.clearRect(0,0,p,h),u.drawImage(l,0,0,p,h);const g=c.toDataURL(r,a),m=atob(g.split(",")[1]);let y=m.length;const w=new Uint8Array(new ArrayBuffer(y));for(;y--;)w[y]=m.charCodeAt(y);const S=new File([w],n,{type:r});t({file:S,bufferArray:w,origin:e,beforeSrc:i,afterSrc:g,beforeKB:o,afterKB:Number((S.size/1024).toFixed(2))})},l.src=i},i.readAsDataURL(e)}})):Promise.resolve(null)}var ht={supportCanvas:ut,chooseLocalFile:dt,compressImg:pt},gt=Object.freeze({__proto__:null,chooseLocalFile:dt,compressImg:pt,default:ht,supportCanvas:ut});function mt(e="请勿外传",t){const{rootContainer:n=document.body,width:r="300px",height:o="150px",textAlign:i="center",textBaseline:s="middle",font:a="20px PingFangSC-Medium,PingFang SC",fillStyle:l="rgba(189, 177, 167, .3)",rotate:c=-20,zIndex:u=2147483647,watermarkId:d="__wm"}=E(t)?{}:t,f=p(n)?document.querySelector(n):n;if(!f)throw new Error(`${n} is not valid Html Element or element selector`);const h=document.createElement("canvas");h.setAttribute("width",r),h.setAttribute("height",o);const g=h.getContext("2d");g.textAlign=i,g.textBaseline=s,g.font=a,g.fillStyle=l,g.rotate(Math.PI/180*c),g.fillText(e,parseFloat(r)/4,parseFloat(o)/2);const m=h.toDataURL(),b=document.querySelector(`#${d}`),y=b||document.createElement("div"),w=`opacity: 1 !important; display: block !important; visibility: visible !important; position:absolute; left:0; top:0; width:100%; height:100%; z-index:${u}; pointer-events:none; background-repeat:repeat; background-image:url('${m}')`;y.setAttribute("style",w),y.setAttribute("id",d),y.classList.add("nav-height"),b||(f.style.position="relative",f.appendChild(y));const S=window.MutationObserver||window.WebKitMutationObserver;if(S){let n=new S((function(){let r=document.querySelector(`#${d}`);if(r){const{opacity:o,zIndex:i,display:s,visibility:a}=(e=>{const t=getComputedStyle(e);return{opacity:t.getPropertyValue("opacity"),zIndex:t.getPropertyValue("z-index"),display:t.getPropertyValue("display"),visibility:t.getPropertyValue("visibility")}})(r);(r&&r.getAttribute("style")!==w||!r||"1"!==o||"2147483647"!==i||"block"!==s||"visible"!==a)&&(n.disconnect(),n=null,f.removeChild(r),r=null,mt(e,t))}else n.disconnect(),n=null,mt(e,t)}));n.observe(f,{attributes:!0,subtree:!0,childList:!0})}}var bt={genCanvasWM:mt},yt=Object.freeze({__proto__:null,default:bt,genCanvasWM:mt});const wt=(e,t)=>{let n,r=!1;const o=function(...o){r||(clearTimeout(n),n=setTimeout((()=>{e.call(this,...o)}),t))};return o.cancel=()=>{clearTimeout(n),r=!0},o},St=(e,t,n)=>{let r,o=!1,i=0;const s=function(...s){if(o)return;const a=Date.now(),l=()=>{i=a,e.call(this,...s)};if(0===i)return n?l():void(i=a);i+t-a>0?(clearTimeout(r),r=setTimeout((()=>l()),t)):l()};return s.cancel=()=>{clearTimeout(r),o=!0},s},Et=e=>{let t,n=!1;return function(...r){return n||(n=!0,t=e.call(this,...r)),t}};function At(e,t){if("undefined"!=typeof globalThis)globalThis[e]=t;else if("undefined"!=typeof window)window[e]=t;else if("undefined"!=typeof global)global[e]=t;else{if("undefined"==typeof self)throw new SyntaxError("当前环境下无法设置全局属性");self[e]=t}}function _t(e){return"undefined"!=typeof globalThis?globalThis[e]:"undefined"!=typeof window?window[e]:"undefined"!=typeof global?global[e]:"undefined"!=typeof self?self[e]:void 0}var xt={debounce:wt,throttle:St,once:Et,getGlobal:_t,setGlobal:At},vt=Object.freeze({__proto__:null,debounce:wt,default:xt,getGlobal:_t,once:Et,setGlobal:At,throttle:St});const Ft=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),jt=`${Y}${J}${K}`,Ct=(e,t)=>{let n=0,r=jt;p(t)?(n=e,r=t):b(e)?n=e:p(e)&&(r=e);let o=Math.max(n,1),i="";const s=r.length-1;if(s<2)throw new Error("字符串池长度不能少于 2");for(;o--;){i+=r[Ft(0,s)]}return i};function Tt(){if("undefined"==typeof URL||!URL.createObjectURL||"undefined"==typeof Blob){const e="0123456789abcdef",t="xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx";let n="";for(let r=0;r<t.length;r++){const o=Ft(0,15);n+="-"==t[r]||"4"==t[r]?t[r]:e[o]}return n}return/[^/]+$/.exec(URL.createObjectURL(new Blob).slice())[0]}var Rt={STRING_POOL:jt,randomNumber:Ft,randomString:Ct,randomUuid:Tt},Nt=Object.freeze({__proto__:null,STRING_POOL:jt,default:Rt,randomNumber:Ft,randomString:Ct,randomUuid:Tt});const Ot=`${Y}${J}${K}`,Pt="undefined"!=typeof BigInt,It=()=>_t("JSBI"),$t=e=>Pt?BigInt(e):It().BigInt(e);function Dt(e,t=Ot){if(t.length<2)throw new Error("进制池长度不能少于 2");if(!Pt)throw new Error('需要安装 jsbi 模块并将 JSBI 设置为全局变量:\nimport JSBI from "jsbi"; window.JSBI = JSBI;');let n=$t(e);const r=[],{length:o}=t,i=$t(o),s=()=>{const e=Number(((e,t)=>Pt?e%t:It().remainder(e,t))(n,i));n=((e,t)=>Pt?e/t:It().divide(e,t))(n,i),r.unshift(t[e]),n>0&&s()};return s(),r.join("")}const Lt=(e,t,n={ratio:1e3,decimals:0,separator:" "})=>{const{ratio:r=1e3,decimals:o=0,separator:i=" "}=n,{length:s}=t;if(0===s)throw new Error("At least one unit is required");let a=Number(e),l=0;for(;a>=r&&l<s-1;)a/=r,l++;const c=a.toFixed(o),u=t[l];return String(c)+i+u};function Mt(e,t={decimals:0,si:!1,separator:" "}){const{decimals:n=0,si:r=!1,separator:o=" ",baseUnit:i,maxUnit:s}=t;let a=r?["B","kB","MB","GB","TB","PB","EB","ZB","YB"]:["Byte","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];if(!E(i)){const e=a.findIndex((e=>e===i));-1!==e&&(a=a.slice(e))}if(!E(s)){const e=a.findIndex((e=>e===s));-1!==e&&a.splice(e+1)}return Lt(e,a,{ratio:r?1e3:1024,decimals:n,separator:o})}function Ut(e,t){if(E(t))return parseInt(String(e)).toLocaleString();let n=0;return t>0&&(n=t),Number(Number(e).toFixed(n)).toLocaleString("en-US")}var kt={HEX_POOL:Ot,numberToHex:Dt,numberAbbr:Lt,humanFileSize:Mt,formatNumber:Ut,formatMoney:Ut},zt=Object.freeze({__proto__:null,HEX_POOL:Ot,default:kt,formatMoney:Ut,formatNumber:Ut,humanFileSize:Mt,numberAbbr:Lt,numberToHex:Dt});let Bt=0,Ht=0;const Gt=(e=18)=>{const t=Date.now();e=Math.max(e,18),t!==Ht&&(Ht=t,Bt=0);const n=`${t}`;let r="";const o=e-5-13;if(o>0){r=`${Ft(10**(o-1),10**o-1)}`}const i=((e,t=2)=>String(e).padStart(t,"0"))(Bt,5);return Bt++,`${n}${r}${i}`},qt=e=>e[Ft(0,e.length-1)],Wt=(e,t)=>{let n=0,r=Ot;p(t)?(n=e,r=t):b(e)?n=e:p(e)&&(r=e);let o=Dt(Gt(),r),i=n-o.length;if(i<=0)return o;for(;i--;)o+=qt(r);return o};var Vt={UNIQUE_NUMBER_SAFE_LENGTH:18,uniqueNumber:Gt,uniqueString:Wt},Xt=Object.freeze({__proto__:null,UNIQUE_NUMBER_SAFE_LENGTH:18,default:Vt,uniqueNumber:Gt,uniqueString:Wt});function Yt(e,t,n){let r=250,o=13;const i=e.children[0];he(t,12)<230?(i.style.maxWidth=he(t,12)+20+50+"px",r=n.clientX+(he(t,12)+50)-document.body.offsetWidth):(i.style.maxWidth="250px",r=n.clientX+230-document.body.offsetWidth),i.innerHTML=t,r>0&&(o-=r),e.style.top=n.clientY+23+"px",e.style.left=n.clientX+o+"px",e.style.maxWidth="250px";const s=e.getBoundingClientRect().top+i.offsetHeight-document.body.offsetHeight;s>0&&(e.style.top=n.clientY-s+"px")}const Kt={handleMouseEnter:function({rootContainer:e="#root",title:t,event:n,bgColor:r="#000",color:o="#fff"}){try{const i=p(e)?document.querySelector(e):e;if(!i)throw new Error(`${e} is not valid Html Element or element selector`);let s=null;const a="style-tooltip-inner1494304949567";if(!document.querySelector(`#${a}`)){const e=document.createElement("style");e.type="text/css",e.id=a,e.innerHTML=`\n .tooltip-inner1494304949567 {\n max-width: 250px;\n padding: 3px 8px;\n color: ${o};\n text-decoration: none;\n border-radius: 4px;\n text-align: left;\n background-color: ${r};\n }\n `,document.querySelector("head").appendChild(e)}if(s=document.querySelector("#customTitle1494304949567"),s)Yt(s,t,n);else{const e=document.createElement("div");e.id="customTitle1494304949567",e.style.cssText="z-index: 99999999; visibility: hidden; position: absolute;",e.innerHTML='<div class="tooltip-inner1494304949567" style="word-wrap: break-word; max-width: 44px;">皮肤</div>',i.appendChild(e),s=document.querySelector("#customTitle1494304949567"),t&&(Yt(s,t,n),s.style.visibility="visible")}}catch(e){console.error(e.message)}},handleMouseLeave:function(e="#root"){const t=p(e)?document.querySelector(e):e;let n=document.querySelector("#customTitle1494304949567");t&&n&&(t.removeChild(n),n=null)}};var Jt={tooltipEvent:Kt},Zt=Object.freeze({__proto__:null,default:Jt,tooltipEvent:Kt});const Qt={keyField:"key",childField:"children",pidField:"pid"},en={childField:"children",nameField:"name",removeEmptyChild:!1,ignoreCase:!0};function tn(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const{childField:r="children",reverse:o=!1,breadthFirst:i=!1,isDomNode:s=!1}=A(n)?n:{};let a=!1;const l=[],c=(n,o,u=0)=>{for(let d=n.length-1;d>=0&&!a;d--){const f=n[d];if(i)l.push({item:f,index:d,array:n,tree:e,parent:o,level:u});else{const i=t(f,d,n,e,o,u);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?N(f[r]):Array.isArray(f[r]))&&c(f[r],f,u+1)}}if(i)for(;l.length>0&&!a;){const e=l.shift(),{item:n,index:o,array:i,tree:u,parent:d,level:f}=e,p=t(n,o,i,u,d,f);if(!1===p){a=!0;break}!0!==p&&(n&&(s?N(n[r]):Array.isArray(n[r]))&&c(n[r],n,f+1))}},u=(n,o,c=0)=>{for(let d=0,f=n.length;d<f&&!a;d++){const f=n[d];if(i)l.push({item:f,index:d,array:n,tree:e,parent:o,level:c});else{const i=t(f,d,n,e,o,c);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?N(f[r]):Array.isArray(f[r]))&&u(f[r],f,c+1)}}if(i)for(;l.length>0&&!a;){const e=l.shift();if(!e)break;const{item:n,index:o,array:i,tree:c,parent:d,level:f}=e,p=t(n,o,i,c,d,f);if(!1===p){a=!0;break}!0!==p&&(n&&(s?N(n[r]):Array.isArray(n[r]))&&u(n[r],n,f+1))}};o?c(e,null,0):u(e,null,0),e=null}function nn(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){let r=null;return tn(e,((...e)=>{if(t(...e))return r=e[0],!1}),n),r}function rn(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const r=[];return tn(e,((...e)=>{t(...e)&&r.push(e[0])}),n),r}function on(e,t,n={childField:"children",reverse:!1}){const{childField:r="children",reverse:o=!1}=A(n)?n:{};let i=!1;const s=[],a=(n,s,l,c=0)=>{if(o)for(let o=n.length-1;o>=0&&!i;o--){const u=n[o],d=t(u,o,n,e,s,c);if(!1===d){i=!0;break}!0!==d&&(l.push(k(d,[r])),u&&Array.isArray(u[r])?(l[l.length-1][r]=[],a(u[r],u,l[l.length-1][r],c+1)):delete d[r])}else for(let o=0;o<n.length&&!i;o++){const u=n[o],d=t(u,o,n,e,s,c);if(!1===d){i=!0;break}!0!==d&&(l.push(k(d,[r])),u&&Array.isArray(u[r])?(l[l.length-1][r]=[],a(u[r],u,l[l.length-1][r],c+1)):delete d[r])}};return a(e,null,s),e=null,s}function sn(e,t,n={childField:"children",keyField:"id"}){const{childField:r="children",keyField:o="id"}=A(n)?n:{},i=(e,t,n)=>e.reduce(((e,s)=>{const a=s[r];return[...e,t?{...s,parentId:t,parent:n}:s,...a&&a.length?i(a,s[o],s):[]]}),[]);return(e=>{let n=e.find((e=>e[o]===t));const{parent:r,parentId:i,...s}=n;let a=[t],l=[s];for(;n&&n.parentId;)a=[n.parentId,...a],l=[n.parent,...l],n=e.find((e=>e[o]===n.parentId));return[a,l]})(i(e))}function an(e,t=Qt){const{keyField:n="key",childField:r="children",pidField:o="pid"}=A(t)?t:{},i=[],s={};for(let t=0,r=e.length;t<r;t++){const r=e[t];s[r[n]]=r}for(let t=0,n=e.length;t<n;t++){const n=e[t],a=s[n[o]];a?(a[r]||(a[r]=[])).push(n):i.push(n)}return e=null,i}function ln(e,t=Qt){const{keyField:n="key",childField:r="children",pidField:o="pid"}=A(t)?t:{};let i=[];for(let s=0,a=e.length;s<a;s++){const a=e[s],l={...a,[r]:[]};if(u(l,r)&&delete l[r],i.push(l),a[r]){const e=a[r].map((e=>({...e,[o]:a[n]||e.pid})));i=i.concat(ln(e,t))}}return i}function cn(e,t,n=en){if(!u(t,"filter")&&!t.keyword)return e;const r=[];for(let o=0,i=e.length;o<i;o++){const i=e[o],s=i[n.childField]&&i[n.childField].length>0?cn(i[n.childField]||[],t,n):[];if((u(t,"filter")?t.filter(i):n.ignoreCase?i[n.nameField].toLowerCase().includes(t.keyword.toLowerCase()):i[n.nameField].includes(t.keyword))||s.length>0)if(i[n.childField])if(s.length>0)r.push({...i,[n.childField]:s});else if(n.removeEmptyChild){const{[n.childField]:e,...t}=i;r.push(t)}else r.push({...i,[n.childField]:[]});else{const{[n.childField]:e,...t}=i;r.push(t)}}return r}var un={forEachDeep:tn,findDeep:nn,filterDeep:rn,mapDeep:on,searchTreeById:sn,formatTree:an,flatTree:ln,fuzzySearchTree:cn},dn=Object.freeze({__proto__:null,default:un,filterDeep:rn,findDeep:nn,flatTree:ln,forEachDeep:tn,formatTree:an,fuzzySearchTree:cn,mapDeep:on,searchTreeById:sn});const fn=(e,t)=>{let n=0;const r=e.toString(),o=t.toString();return void 0!==r.split(".")[1]&&(n+=r.split(".")[1].length),void 0!==o.split(".")[1]&&(n+=o.split(".")[1].length),Number(r.replace(".",""))*Number(o.replace(".",""))/Math.pow(10,n)},pn=(e,t)=>{let n=0,r=0,o=0;try{n=e.toString().split(".")[1].length}catch(e){n=0}try{r=t.toString().split(".")[1].length}catch(e){r=0}return o=10**Math.max(n,r),(fn(e,o)+fn(t,o))/o},hn=(e,t)=>pn(e,-t),gn=(e,t)=>{let n=0,r=0,o=0,i=0;return void 0!==e.toString().split(".")[1]&&(n=e.toString().split(".")[1].length),void 0!==t.toString().split(".")[1]&&(r=t.toString().split(".")[1].length),o=Number(e.toString().replace(".","")),i=Number(t.toString().replace(".","")),o/i*Math.pow(10,r-n)};function mn(e,t=15){return+parseFloat(Number(e).toPrecision(t))}var bn={add:pn,subtract:hn,multiply:fn,divide:gn,strip:mn},yn=Object.freeze({__proto__:null,add:pn,default:bn,divide:gn,multiply:fn,strip:mn,subtract:hn});const wn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Sn=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;function En(e){let t,n,r,o,i="",s=0;const a=(e=String(e)).length,l=a%3;for(;s<a;){if((n=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(o=e.charCodeAt(s++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");t=n<<16|r<<8|o,i+=wn.charAt(t>>18&63)+wn.charAt(t>>12&63)+wn.charAt(t>>6&63)+wn.charAt(63&t)}return l?i.slice(0,l-3)+"===".substring(l):i}function An(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Sn.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");let t,n,r,o="",i=0;for(const s=(e+="==".slice(2-(3&e.length))).length;i<s;)t=wn.indexOf(e.charAt(i++))<<18|wn.indexOf(e.charAt(i++))<<12|(n=wn.indexOf(e.charAt(i++)))<<6|(r=wn.indexOf(e.charAt(i++))),o+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}function _n(e){const t=E(_t("atob"))?An(e):_t("atob")(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return E(_t("TextDecoder"))?function(e){const t=String.fromCharCode.apply(null,e);return decodeURIComponent(t)}(r):new(_t("TextDecoder"))("utf-8").decode(r)}function xn(e){const t=E(_t("TextEncoder"))?function(e){const t=encodeURIComponent(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}(e):(new(_t("TextEncoder"))).encode(e);let n="";const r=t.length;for(let e=0;e<r;e++)n+=String.fromCharCode(t[e]);return E(_t("btoa"))?En(n):_t("btoa")(n)}var vn={weBtoa:En,weAtob:An,b64decode:_n,b64encode:xn},Fn=Object.freeze({__proto__:null,b64decode:_n,b64encode:xn,default:vn,weAtob:An,weBtoa:En});const jn=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,Cn=e=>jn.test(e),Tn=/^(?:(?:\+|00)86)?1\d{10}$/,Rn=e=>Tn.test(e),Nn=/^(1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5]|7[1]|8[1-2]|9[1])\d{4}(18|19|20)\d{2}[01]\d[0123]\d{4}[\dxX]$/,On=e=>{if(!Nn.test(e))return!1;const t=Number(e.slice(6,10)),n=Number(e.slice(10,12)),r=Number(e.slice(12,14)),o=new Date(t,n-1,r);if(!(o.getFullYear()===t&&o.getMonth()+1===n&&o.getDate()===r))return!1;const i=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];let s=0;for(let t=0;t<17;t++)s+=Number(e.slice(t,t+1))*i[t];return["1","0","X","9","8","7","6","5","4","3","2"][s%11]===e.slice(-1)},Pn=/^(https?|ftp):\/\/([^\s/$.?#].[^\s]*)$/i,In=/^https?:\/\/([^\s/$.?#].[^\s]*)$/i,$n=(e,t=!1)=>(t?Pn:In).test(e),Dn=/^(?:(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/,Ln=/^(([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,7}:|([\da-fA-F]{1,4}:){1,6}:[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,5}(:[\da-fA-F]{1,4}){1,2}|([\da-fA-F]{1,4}:){1,4}(:[\da-fA-F]{1,4}){1,3}|([\da-fA-F]{1,4}:){1,3}(:[\da-fA-F]{1,4}){1,4}|([\da-fA-F]{1,4}:){1,2}(:[\da-fA-F]{1,4}){1,5}|[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,6})|:((:[\da-fA-F]{1,4}){1,7}|:)|fe80:(:[\da-fA-F]{0,4}){0,4}%[\da-zA-Z]+|::(ffff(:0{1,4})?:)?((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d)|([\da-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d))$/i,Mn=e=>Dn.test(e),Un=e=>Ln.test(e),kn=/^(-?[1-9]\d*|0)$/,zn=e=>kn.test(e),Bn=/^-?([1-9]\d*|0)\.\d*[1-9]$/,Hn=e=>Bn.test(e),Gn=e=>zn(e)||Hn(e),qn=/^\d+$/,Wn=e=>qn.test(e);var Vn={EMAIL_REGEX:jn,HTTP_URL_REGEX:In,IPV4_REGEX:Dn,IPV6_REGEX:Ln,PHONE_REGEX:Tn,URL_REGEX:Pn,isDigit:Wn,isEmail:Cn,isFloat:Hn,isIdNo:On,isInteger:zn,isIpV4:Mn,isIpV6:Un,isNumerical:Gn,isPhone:Rn,isUrl:$n},Xn=Object.freeze({__proto__:null,EMAIL_REGEX:jn,HTTP_URL_REGEX:In,IPV4_REGEX:Dn,IPV6_REGEX:Ln,PHONE_REGEX:Tn,URL_REGEX:Pn,default:Vn,isDigit:Wn,isEmail:Cn,isFloat:Hn,isIdNo:On,isInteger:zn,isIpV4:Mn,isIpV6:Un,isNumerical:Gn,isPhone:Rn,isUrl:$n});function Yn(e){return[...new Set(e.trim().split(""))].join("")}function Kn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jn(e,t){return new RegExp(`${Kn(e.trim())}\\s*([^${Kn(Yn(e))}${Kn(Yn(t))}\\s]*)\\s*${t.trim()}`,"g")}function Zn(e,t="{",n="}"){return Array.from(e.matchAll(Jn(t,n))).map((e=>E(e)?void 0:e[1]))}function Qn(e,t,n="{",r="}"){return e.replace(new RegExp(Jn(n,r)),(function(e,n){return u(t,n)?t[n]:e}))}function er(e,t={}){const n=Object.keys(t),r=n.map((e=>t[e]));try{return new Function(...n,`return (() => { ${e} })()`)(...r)}catch(e){throw new Error(`代码执行失败: ${e.message}`)}}var tr={escapeRegExp:Kn,executeInScope:er,parseVarFromString:Zn,replaceVarFromString:Qn,uniqueSymbol:Yn},nr=Object.freeze({__proto__:null,default:tr,escapeRegExp:Kn,executeInScope:er,parseVarFromString:Zn,replaceVarFromString:Qn,uniqueSymbol:Yn});function rr(e,t=new WeakMap){if(null===e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);if(e instanceof ArrayBuffer){const n=new ArrayBuffer(e.byteLength);return new Uint8Array(n).set(new Uint8Array(e)),t.set(e,n),n}if(ArrayBuffer.isView(e)){return new(0,e.constructor)(rr(e.buffer,t),e.byteOffset,e.length)}if(e instanceof Date){const n=new Date(e.getTime());return t.set(e,n),n}if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,t.set(e,n),n}if(e instanceof Map){const n=new Map;return t.set(e,n),e.forEach(((e,r)=>{n.set(rr(r,t),rr(e,t))})),n}if(e instanceof Set){const n=new Set;return t.set(e,n),e.forEach((e=>{n.add(rr(e,t))})),n}if(Array.isArray(e)){const n=new Array(e.length);t.set(e,n);for(let r=0,o=e.length;r<o;r++)r in e&&(n[r]=rr(e[r],t));const r=Object.getOwnPropertyDescriptors(e);for(const e of Reflect.ownKeys(r))Object.defineProperty(n,e,{...r[e],value:rr(r[e].value,t)});return n}const n=Object.create(Object.getPrototypeOf(e));t.set(e,n);const r=Object.getOwnPropertyDescriptors(e);for(const e of Reflect.ownKeys(r)){const o=r[e];"value"in o?o.value=rr(o.value,t):(o.get&&(o.get=rr(o.get,t)),o.set&&(o.set=rr(o.set,t))),Object.defineProperty(n,e,o)}return n}var or={cloneDeep:rr},ir=Object.freeze({__proto__:null,cloneDeep:rr,default:or});const sr={MAP:"[object Map]",SET:"[object Set]",DATE:"[object Date]",REGEXP:"[object RegExp]",SYMBOL:"[object Symbol]",ARRAY_BUFFER:"[object ArrayBuffer]",DATA_VIEW:"[object DataView]",ARGUMENTS:"[object Arguments]"},{toString:ar,hasOwnProperty:lr}=Object.prototype,cr=e=>ar.call(e);function ur(e,t){return dr(e,t)}function dr(e,t,n=void 0){if(e===t)return!0;if(e!=e&&t!=t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e.constructor!==t.constructor)return!1;if(n||(n=new WeakMap),n.has(e))return n.get(e)===t;n.set(e,t);const r=cr(e);if(r!==cr(t))return!1;let o=!1;switch(r){case sr.DATE:o=+e==+t;break;case sr.REGEXP:o=""+e==""+t;break;case sr.SYMBOL:o=Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t);break;case sr.ARRAY_BUFFER:o=fr(e,t);break;case sr.DATA_VIEW:s=t,o=(i=e).byteLength===s.byteLength&&i.byteOffset===s.byteOffset&&fr(i.buffer,s.buffer);break;case sr.MAP:o=function(e,t,n){if(e.size!==t.size)return!1;for(const[r,o]of e){const e=t.get(r);if(void 0===e&&!t.has(r))return!1;if(!dr(o,e,n))return!1}return!0}(e,t,n);break;case sr.SET:o=function(e,t,n){if(e.size!==t.size)return!1;for(const r of e){if(t.has(r))continue;let e=!1;for(const o of t)if(dr(r,o,n)){e=!0;break}if(!e)return!1}return!0}(e,t,n);break;case sr.ARGUMENTS:default:o=Array.isArray(e)||ArrayBuffer.isView(e)?function(e,t,n){const r=e.length;if(r!==t.length)return!1;let o=r;for(;o--;)if(!dr(e[o],t[o],n))return!1;return!0}(e,t,n):function(e,t,n){const r=Reflect.ownKeys(e),o=Reflect.ownKeys(t);if(r.length!==o.length)return!1;for(let o=0;o<r.length;o++){const i=r[o];if(!lr.call(t,i)||!dr(e[i],t[i],n))return!1}return!0}(e,t,n)}var i,s;return o}function fr(e,t){if(e.byteLength!==t.byteLength)return!1;const n=new Uint8Array(e),r=new Uint8Array(t);let o=e.byteLength;for(;o--;)if(n[o]!==r[o])return!1;return!0}var pr={isEqual:ur},hr=Object.freeze({__proto__:null,default:pr,isEqual:ur});class gr{static encode(e,t="unicode",n=!1){const r=[];for(const o of e){const e=o.codePointAt(0);"html"===t&&this.ENTITY_MAP[o]?r.push(this.ENTITY_MAP[o]):!n&&e>=32&&e<=126?r.push(o):"unicode"===t?e>65535?r.push(`\\u{${e.toString(16).toUpperCase()}}`):r.push(`\\u${e.toString(16).toUpperCase().padStart(4,"0")}`):r.push(`&#${e};`)}return r.join("")}static decode(e,t=!1){if(!e)return"";let n=e.replace(/\\u(?:\{([0-9a-fA-F]+)\}|([0-9a-fA-F]{4}))/g,((e,t,n)=>String.fromCodePoint(parseInt(t||n,16)))).replace(/&#(x?)([0-9a-fA-F]+);/g,((e,t,n)=>String.fromCodePoint(parseInt(n,t?16:10)))).replace(/&[a-z0-9]+;/gi,(e=>this.NAMED_ENTITIES[e]||e));return t&&(n=n.replace(/\u00A0/g," ")),n}}gr.ENTITY_MAP={"&":"&","<":"<",">":">",'"':""","'":"'"},gr.NAMED_ENTITIES={""":'"',"&":"&","<":"<",">":">"," ":" ","©":"©","™":"™","®":"®"};var mr={UnicodeToolkit:gr},br={...a,...Ee,...Fe,...De,...be,...ot,...W,...ke,...qe,...se,...P,...Je,...ct,...gt,...yt,...vt,...Nt,...zt,...Xt,...Zt,...dn,...yn,...Fn,...Xn,...nr,...ir,...hr,...Object.freeze({__proto__:null,UnicodeToolkit:gr,default:mr})};e.EMAIL_REGEX=jn,e.HEX_POOL=Ot,e.HTTP_URL_REGEX=In,e.IPV4_REGEX=Dn,e.IPV6_REGEX=Ln,e.PHONE_REGEX=Tn,e.STRING_ARABIC_NUMERALS=Y,e.STRING_LOWERCASE_ALPHA=K,e.STRING_POOL=jt,e.STRING_UPPERCASE_ALPHA=J,e.UNIQUE_NUMBER_SAFE_LENGTH=18,e.URL_REGEX=Pn,e.UnicodeToolkit=gr,e.add=pn,e.addClass=ce,e.adjustDate=Ie,e.arrayEach=t,e.arrayEachAsync=n,e.arrayInsertBefore=r,e.arrayLike=d,e.arrayRemove=o,e.asyncMap=st,e.b64decode=_n,e.b64encode=xn,e.chooseLocalFile=dt,e.cloneDeep=rr,e.compressImg=pt,e.cookieDel=xe,e.cookieGet=Ae,e.cookieSet=_e,e.copyText=ye,e.crossOriginDownload=tt,e.dateParse=Re,e.dateToEnd=Oe,e.dateToStart=Ne,e.debounce=wt,e.default=br,e.diffArray=i,e.divide=gn,e.downloadBlob=et,e.downloadData=nt,e.downloadHref=Qe,e.downloadURL=Ze,e.escapeRegExp=Kn,e.executeInScope=er,e.fallbackCopyText=we,e.filterDeep=rn,e.findDeep=nn,e.flatTree=ln,e.forEachDeep=tn,e.formatDate=Pe,e.formatMoney=Ut,e.formatNumber=Ut,e.formatTree=an,e.fuzzySearchTree=cn,e.genCanvasWM=mt,e.getComputedCssVal=pe,e.getGlobal=_t,e.getStrWidthPx=he,e.getStyle=fe,e.hasClass=ae,e.humanFileSize=Mt,e.isArray=_,e.isBigInt=m,e.isBoolean=h,e.isDate=F,e.isDigit=Wn,e.isEmail=Cn,e.isEmpty=R,e.isEqual=ur,e.isError=j,e.isFloat=Hn,e.isFunction=x,e.isIdNo=On,e.isInteger=zn,e.isIpV4=Mn,e.isIpV6=Un,e.isJsonString=T,e.isNaN=v,e.isNodeList=N,e.isNull=w,e.isNullOrUnDef=E,e.isNullish=E,e.isNumber=b,e.isNumerical=Gn,e.isObject=A,e.isPhone=Rn,e.isPlainObject=$,e.isPrimitive=S,e.isRegExp=C,e.isString=p,e.isSymbol=g,e.isUndefined=y,e.isUrl=$n,e.isValidDate=je,e.mapDeep=on,e.multiply=fn,e.numberAbbr=Lt,e.numberToHex=Dt,e.objectAssign=B,e.objectEach=D,e.objectEachAsync=L,e.objectFill=H,e.objectGet=G,e.objectHas=u,e.objectMap=M,e.objectMerge=B,e.objectOmit=k,e.objectPick=U,e.once=Et,e.parseQueryParams=oe,e.parseVarFromString=Zn,e.pathJoin=Me,e.pathNormalize=Le,e.qsParse=ze,e.qsStringify=He,e.randomNumber=Ft,e.randomString=Ct,e.randomUuid=Tt,e.removeClass=ue,e.replaceVarFromString=Qn,e.safeAwait=at,e.searchTreeById=sn,e.select=ge,e.setGlobal=At,e.setStyle=de,e.stringAssign=te,e.stringCamelCase=V,e.stringEscapeHtml=ne,e.stringFill=re,e.stringFormat=Q,e.stringKebabCase=X,e.strip=mn,e.subtract=hn,e.supportCanvas=ut,e.throttle=St,e.tooltipEvent=Kt,e.typeIs=f,e.uniqueNumber=Gt,e.uniqueString=Wt,e.uniqueSymbol=Yn,e.urlDelParams=Ye,e.urlParse=We,e.urlSetParams=Xe,e.urlStringify=Ve,e.wait=it,e.weAtob=An,e.weBtoa=En,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).sculpJs={})}(this,(function(e){"use strict";function t(e,t,r=!1){if(r)for(let r=e.length-1;r>=0;r--){const n=t(e[r],r,e);if(!1===n)break}else for(let r=0,n=e.length;r<n;r++){const n=t(e[r],r,e);if(!1===n)break}e=null}async function r(e,t,r=!1){if(r)for(let r=e.length-1;r>=0&&!1!==await t(e[r],r);r--);else for(let r=0,n=e.length;r<n&&!1!==await t(e[r],r);r++);}function n(e,t,r){if(t===r||t+1===r)return;const[n]=e.splice(t,1),o=r<t?r:r-1;e.splice(o,0,n)}function o(e,r){const n=[],o=r;return t(e,((e,t)=>{o(e,t)&&n.push(t)})),n.forEach(((t,r)=>{e.splice(t-r,1)})),e}function i(e,t,r){const n=e=>{if(r)return r(e);if("string"==typeof e||"number"==typeof e||"symbol"==typeof e)return e;throw new Error("diffArray: getKey is required when item is not a primitive value")},o=new Map,i=new Map;for(const t of e)o.set(n(t),t);for(const e of t)i.set(n(e),e);const s=[],a=[];for(const[e,t]of i)o.has(e)||s.push(t);for(const[e,t]of o)i.has(e)||a.push(t);return{added:s,removed:a}}var s={arrayEach:t,arrayEachAsync:r,arrayInsertBefore:n,arrayRemove:o,diffArray:i},a=Object.freeze({__proto__:null,arrayEach:t,arrayEachAsync:r,arrayInsertBefore:n,arrayRemove:o,default:s,diffArray:i});const{toString:l,hasOwnProperty:c}=Object.prototype;function u(e,t){return c.call(e,t)}function d(e){return!!x(e)||(!!h(e)||!!_(e)&&u(e,"length"))}function f(e){return l.call(e).slice(8,-1)}function p(e,t){return f(e)===t}const h=e=>"string"==typeof e,g=e=>"boolean"==typeof e,m=e=>"symbol"==typeof e,y=e=>"bigint"==typeof e,b=e=>"number"==typeof e&&!Number.isNaN(e),A=e=>void 0===e,S=e=>null===e,w=e=>null===e||"object"!=typeof e;function E(e){return A(e)||S(e)}const _=e=>"Object"===f(e),x=e=>Array.isArray(e),v=e=>"function"==typeof e,C=e=>Number.isNaN(e),F=e=>"Date"===f(e),T=e=>"Error"===f(e),j=e=>"RegExp"===f(e),N=e=>"Promise"===f(e),R=e=>"Map"===f(e),O=e=>"Set"===f(e),P=e=>{const t=f(e);return"Int8Array"===t||"Uint8Array"===t||"Uint8ClampedArray"===t||"Int16Array"===t||"Uint16Array"===t||"Int32Array"===t||"Uint32Array"===t||"Float32Array"===t||"Float64Array"===t||"BigInt64Array"===t||"BigUint64Array"===t},I=e=>"DataView"===f(e),D=e=>"ArrayBuffer"===f(e),$=e=>"Arguments"===f(e),M=e=>"AsyncFunction"===f(e);function L(e){try{const t=JSON.parse(e);return"object"==typeof t&&null!==t&&t}catch(e){return!1}}function U(e){if(E(e)||Number.isNaN(e))return!0;const t=f(e);return d(e)||"Arguments"===t?!e.length:"Set"===t||"Map"===t?!e.size:!Object.keys(e).length}function k(e){return!A(NodeList)&&NodeList.prototype.isPrototypeOf(e)}var B={typeIs:f,is:p,TypeMapping:void 0,TypeTag:void 0,objectHas:u,arrayLike:d,isString:h,isBoolean:g,isSymbol:m,isBigInt:y,isNumber:b,isUndefined:A,isNull:S,isPrimitive:w,isNullOrUnDef:E,isNullish:E,isObject:_,isArray:x,isFunction:v,isNaN:C,isDate:F,isError:T,isRegExp:j,isPromise:N,isMap:R,isSet:O,isTypedArray:P,isDataView:I,isArrayBuffer:D,isArguments:$,isAsyncFunction:M,isJsonString:L,isEmpty:U,isNodeList:k},z=Object.freeze({__proto__:null,arrayLike:d,default:B,is:p,isArguments:$,isArray:x,isArrayBuffer:D,isAsyncFunction:M,isBigInt:y,isBoolean:g,isDataView:I,isDate:F,isEmpty:U,isError:T,isFunction:v,isJsonString:L,isMap:R,isNaN:C,isNodeList:k,isNull:S,isNullOrUnDef:E,isNullish:E,isNumber:b,isObject:_,isPrimitive:w,isPromise:N,isRegExp:j,isSet:O,isString:h,isSymbol:m,isTypedArray:P,isUndefined:A,objectHas:u,typeIs:f});const H=f,G=e=>{if(!_(e))return!1;const t=Object.getPrototypeOf(e);return!t||t===Object.prototype};function q(e,t){for(const r in e)if(u(e,r)&&!1===t(e[r],r))break;e=null}async function V(e,t){for(const r in e)if(u(e,r)&&!1===await t(e[r],r))break}function W(e,t){const r={};for(const n in e)u(e,n)&&(r[n]=t(e[n],n));return e=null,r}function X(e,t){const r={};return q(e,((e,n)=>{t.includes(n)&&(r[n]=e)})),e=null,r}function Y(e,t){const r={};return q(e,((e,n)=>{t.includes(n)||(r[n]=e)})),e=null,r}const K=(e,t,r)=>{if(A(r))return t;if(H(t)!==H(r))return x(r)?K(e,[],r):_(r)?K(e,{},r):r;if(G(r)){const n=e.get(r);return n||(e.set(r,t),q(r,((r,n)=>{t[n]=K(e,t[n],r)})),t)}if(x(r)){const n=e.get(r);return n||(e.set(r,t),r.forEach(((r,n)=>{t[n]=K(e,t[n],r)})),t)}return r};function J(e,...t){const r=new Map;for(let n=0,o=t.length;n<o;n++){const o=t[n];e=K(r,e,o)}return r.clear(),e}function Z(e,t,r){const n=r||((e,t,r)=>void 0===e[r]);return q(t,((r,o)=>{n(e,t,o)&&(e[o]=r)})),e}function Q(e,t,r=!1){const n=(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split(".");let o=e,i=0;for(let e=n.length;i<e-1;++i){const e=n[i];if(b(Number(e))&&Array.isArray(o))o=o[e];else{if(!_(o)||!u(o,e)){if(o=void 0,r)throw new Error("[Object] objectGet path 路径不正确");break}o=o[e]}}return{p:o,k:o?n[i]:void 0,v:o?o[n[i]]:void 0}}var ee={isPlainObject:G,objectEach:q,objectEachAsync:V,objectMap:W,objectPick:X,objectOmit:Y,objectAssign:J,objectMerge:J,objectFill:Z,objectGet:Q},te=Object.freeze({__proto__:null,default:ee,isPlainObject:G,objectAssign:J,objectEach:q,objectEachAsync:V,objectFill:Z,objectGet:Q,objectMap:W,objectMerge:J,objectOmit:Y,objectPick:X});function re(e,t){let r=e;t&&(r=e.replace(/^./,(e=>e.toUpperCase())));return r.replace(/[\s_-](.)/g,((e,t)=>t.toUpperCase()))}function ne(e,t="-"){return e.replace(/^./,(e=>e.toLowerCase())).replace(/[A-Z]/g,(e=>`${t}${e.toLowerCase()}`))}const oe="0123456789",ie="abcdefghijklmnopqrstuvwxyz",se="ABCDEFGHIJKLMNOPQRSTUVWXYZ",ae=/%[%sdo]/g;function le(e,...t){let r=0;return[e.replace(ae,(e=>{const n=t[r++];switch(e){case"%%":return r--,"%";default:case"%s":return String(n);case"%d":return String(Number(n));case"%o":return JSON.stringify(n)}})),...t.splice(r).map(String)].join(" ")}const ce=/\${(.*?)}/g,ue=(e,t)=>e.replace(ce,((e,r)=>((e,t)=>{try{return new Function(`with(arguments[0]){if(arguments[0].${e} === undefined)throw "";return String(arguments[0].${e})}`)(t)}catch(t){throw new SyntaxError(`无法执行表达式:${e}`)}})(r,t))),de=e=>{const t={"&":"&","<":"<",">":">",'"':"""};return e.replace(/[&<>"]/g,(e=>t[e]))},fe=(e,t=" ")=>new Array(e).fill(t).join("");function pe(e=location.search){const t={};return Array.from(e.matchAll(/[&?]?([^=&]+)=?([^=&]*)/g)).forEach(((e,r)=>{t[e[1]]?"string"==typeof t[e[1]]?t[e[1]]=[t[e[1]],e[2]]:t[e[1]].push(e[2]):t[e[1]]=e[2]})),t}var he={stringCamelCase:re,stringKebabCase:ne,STRING_ARABIC_NUMERALS:oe,STRING_LOWERCASE_ALPHA:ie,STRING_UPPERCASE_ALPHA:se,stringFormat:le,stringAssign:ue,stringEscapeHtml:de,stringFill:fe,parseQueryParams:pe},ge=Object.freeze({__proto__:null,STRING_ARABIC_NUMERALS:oe,STRING_LOWERCASE_ALPHA:ie,STRING_UPPERCASE_ALPHA:se,default:he,parseQueryParams:pe,stringAssign:ue,stringCamelCase:re,stringEscapeHtml:de,stringFill:fe,stringFormat:le,stringKebabCase:ne});function me(e,t){if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList.contains(t)}const ye=(e,t)=>{e.split(/\s+/g).forEach(t)};function be(e,t){ye(t,(t=>e.classList.add(t)))}function Ae(e,t){ye(t,(t=>e.classList.remove(t)))}const Se=(e,t,r)=>{_(t)?q(t,((t,r)=>{Se(e,r,t)})):e.style.setProperty(ne(t),r)};function we(e,t){return getComputedStyle(e).getPropertyValue(t)}function Ee(e,t,r=!0){const n=getComputedStyle(e).getPropertyValue(t)??"";return r?Number(n.replace(/([0-9]*)(.*)/g,"$1")):n}function _e(e,t=14,r=!0){let n=0;if(console.assert(h(e),`${e} 不是有效的字符串`),h(e)&&e.length>0){const o="getStrWidth1494304949567";let i=document.querySelector(`#${o}`);if(!i){const r=document.createElement("span");r.id=o,r.style.fontSize=t+"px",r.style.whiteSpace="nowrap",r.style.visibility="hidden",r.style.position="absolute",r.style.top="-9999px",r.style.left="-9999px",r.textContent=e,document.body.appendChild(r),i=r}i.textContent=e,n=i.offsetWidth,r&&i.remove()}return n}function xe(e){let t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){const r=e.hasAttribute("readonly");r||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),r||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();const r=window.getSelection(),n=document.createRange();n.selectNodeContents(e),r.removeAllRanges(),r.addRange(n),t=r.toString()}return t}var ve={hasClass:me,addClass:be,removeClass:Ae,setStyle:Se,getStyle:we,getComputedCssVal:Ee,getStrWidthPx:_e,select:xe},Ce=Object.freeze({__proto__:null,addClass:be,default:ve,getComputedCssVal:Ee,getStrWidthPx:_e,getStyle:we,hasClass:me,removeClass:Ae,select:xe,setStyle:Se});function Fe(e,t){const{successCallback:r,failCallback:n}=E(t)?{}:t;navigator.clipboard?navigator.clipboard.writeText(e).then((()=>{v(r)&&r()})).catch((r=>{Te(e,t)})):Te(e,t)}function Te(e,t){const{successCallback:r,failCallback:n,container:o=document.body}=E(t)?{}:t;let i=function(e){const t="rtl"===document.documentElement.getAttribute("dir"),r=document.createElement("textarea");r.style.fontSize="12pt",r.style.border="0",r.style.padding="0",r.style.margin="0",r.style.position="absolute",r.style[t?"right":"left"]="-9999px";const n=window.pageYOffset||document.documentElement.scrollTop;return r.style.top=`${n}px`,r.setAttribute("readonly",""),r.value=e,r}(e);o.appendChild(i),xe(i);try{document.execCommand("copy")&&v(r)&&r()}catch(e){v(n)&&n(e)}finally{o.removeChild(i),i=null,window.getSelection()?.removeAllRanges()}}var je={copyText:Fe,fallbackCopyText:Te},Ne=Object.freeze({__proto__:null,copyText:Fe,default:je,fallbackCopyText:Te});function Re(e){const{cookie:t}=document;if(!t)return"";const r=t.split(";");for(let t=0;t<r.length;t++){const n=r[t],[o,i=""]=n.split("=");if(o===e)return decodeURIComponent(i)}return""}function Oe(e,t,r){const n=[],o="expires";if(n.push([e,encodeURIComponent(t)]),b(r)){const e=new Date;e.setTime(e.getTime()+r),n.push([o,e.toUTCString()])}else F(r)&&n.push([o,r.toUTCString()]);n.push(["path","/"]),document.cookie=n.map((e=>{const[t,r]=e;return`${t}=${r}`})).join(";")}const Pe=e=>Oe(e,"",-1);var Ie={cookieSet:Oe,cookieGet:Re,cookieDel:Pe},De=Object.freeze({__proto__:null,cookieDel:Pe,cookieGet:Re,cookieSet:Oe,default:Ie});const $e=e=>F(e)&&!C(e.getTime()),Me=e=>{if(!h(e))return;const t=e.replace(/-/g,"/");return new Date(t)},Le=e=>{if(!h(e))return;const t=/([+-])(\d\d)(\d\d)$/,r=t.exec(e);if(!r)return;const n=e.replace(t,"Z"),o=new Date(n);if(!$e(o))return;const[,i,s,a]=r,l=parseInt(s,10),c=parseInt(a,10),u=(e,t)=>"+"===i?e-t:e+t;return o.setHours(u(o.getHours(),l)),o.setMinutes(u(o.getMinutes(),c)),o};function Ue(e){const t=new Date(e);if($e(t))return t;const r=Me(e);if($e(r))return r;const n=Le(e);if($e(n))return n;throw new SyntaxError(`${e.toString()} 不是一个合法的日期描述`)}function ke(e){const t=Ue(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)}function Be(e){const t=ke(e);return t.setDate(t.getDate()+1),Ue(t.getTime()-1)}function ze(e,t="YYYY-MM-DD HH:mm:ss"){const r=Ue(e);let n,o=t;const i={"Y+":`${r.getFullYear()}`,"y+":`${r.getFullYear()}`,"M+":`${r.getMonth()+1}`,"D+":`${r.getDate()}`,"d+":`${r.getDate()}`,"H+":`${r.getHours()}`,"m+":`${r.getMinutes()}`,"s+":`${r.getSeconds()}`,"S+":`${r.getMilliseconds()}`,"w+":["周日","周一","周二","周三","周四","周五","周六"][r.getDay()]};for(const e in i)n=new RegExp("("+e+")").exec(o),n&&(o=o.replace(n[1],1===n[1].length?i[e]:i[e].padStart(n[1].length,"0")));return o}function He(e,t={}){const{format:r,returnDate:n=!1,years:o=0,months:i=0,weeks:s=0,days:a=0,hours:l=0,minutes:c=0,seconds:u=0,milliseconds:d=0}=t,f=Ue(e),p=new Date(f),h=f.getDate(),g=h===new Date(f.getFullYear(),f.getMonth()+1,0).getDate();if(p.setFullYear(p.getFullYear()+o),0!==i){const e=p.getMonth()+i,t=new Date(p.getFullYear(),e+1,0).getDate();p.setDate(1),p.setMonth(e),g||h>t?p.setDate(t):p.setDate(h)}if(0===a&&0===s||p.setDate(p.getDate()+a+7*s),p.setHours(p.getHours()+l),p.setMinutes(p.getMinutes()+c),p.setSeconds(p.getSeconds()+u),p.setMilliseconds(p.getMilliseconds()+d),n)return p;if(r)return ze(p,r);const m=p.getFullYear(),y=String(p.getMonth()+1).padStart(2,"0"),b=String(p.getDate()).padStart(2,"0"),A=String(p.getHours()).padStart(2,"0"),S=String(p.getMinutes()).padStart(2,"0"),w=String(p.getSeconds()).padStart(2,"0");if(t.hasOwnProperty("hours")||t.hasOwnProperty("minutes")||t.hasOwnProperty("seconds")||t.hasOwnProperty("milliseconds")){if(t.hasOwnProperty("milliseconds")){return`${m}-${y}-${b} ${A}:${S}:${w}.${String(p.getMilliseconds()).padStart(3,"0")}`}return t.hasOwnProperty("seconds")?`${m}-${y}-${b} ${A}:${S}:${w}`:`${m}-${y}-${b} ${A}:${S}`}return`${m}-${y}-${b}`}var Ge={isValidDate:$e,dateParse:Ue,dateToStart:ke,dateToEnd:Be,formatDate:ze,adjustDate:He,calculateDate:He},qe=Object.freeze({__proto__:null,adjustDate:He,dateParse:Ue,dateToEnd:Be,dateToStart:ke,default:Ge,formatDate:ze,isValidDate:$e});const Ve=e=>{const t=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/").replace(/\.{3,}/g,"..").replace(/\/\.\//g,"/").split("/").map((e=>e.trim())),r=e=>".."===e,n=[];let o=!1;const i=e=>{n.push(e)};return t.forEach((e=>{const t=(e=>"."===e)(e),s=r(e);return o?t?void 0:s?(()=>{if(0===n.length)return;const e=n[n.length-1];r(e)?n.push(".."):n.pop()})():void i(e):(i(e),void(o=!t&&!s))})),n.join("/")},We=(e,...t)=>Ve([e,...t].join("/"));var Xe={pathJoin:We,pathNormalize:Ve},Ye=Object.freeze({__proto__:null,default:Xe,pathJoin:We,pathNormalize:Ve});function Ke(e){const t=new URLSearchParams(e),r={};for(const[e,n]of t.entries())A(r[e])?r[e]=n:x(r[e])||(r[e]=t.getAll(e));return r}const Je=e=>h(e)?e:b(e)?String(e):g(e)?e?"true":"false":F(e)?e.toISOString():null;function Ze(e,t=Je){const r=new URLSearchParams;return q(e,((e,n)=>{if(x(e))e.forEach((e=>{const o=t(e);null!==o&&r.append(n.toString(),o)}));else{const o=t(e);if(null===o)return;r.set(n.toString(),o)}})),r.toString()}var Qe={qsParse:Ke,qsStringify:Ze},et=Object.freeze({__proto__:null,default:Qe,qsParse:Ke,qsStringify:Ze});const tt=(e,t=!0)=>{let r=null;v(URL)&&t?r=new URL(e):(r=document.createElement("a"),r.href=e);const{protocol:n,username:o,password:i,host:s,port:a,hostname:l,hash:c,search:u,pathname:d}=r,f=We("/",d),p=o&&i?`${o}:${i}`:"",h=u.replace(/^\?/,"");return r=null,{protocol:n,auth:p,username:o,password:i,host:s,port:a,hostname:l,hash:c,search:u,searchParams:Ke(h),query:h,pathname:f,path:`${f}${u}`,href:e}},rt=e=>{const{protocol:t,auth:r,host:n,pathname:o,searchParams:i,hash:s}=e,a=r?`${r}@`:"",l=Ze(i),c=l?`?${l}`:"";let u=s.replace(/^#/,"");return u=u?"#"+u:"",`${t}//${a}${n}${o}${c}${u}`},nt=(e,t)=>{const r=tt(e);return Object.assign(r.searchParams,t),rt(r)},ot=(e,t)=>{const r=tt(e);return t.forEach((e=>delete r.searchParams[e])),rt(r)};var it={urlParse:tt,urlStringify:rt,urlSetParams:nt,urlDelParams:ot},st=Object.freeze({__proto__:null,default:it,urlDelParams:ot,urlParse:tt,urlSetParams:nt,urlStringify:rt});function at(e,t){window.open(t?nt(e,t):e)}function lt(e,t,r){let n=document.createElement("a");n.download=t,n.style.display="none",n.href=e,document.body.appendChild(n),n.click(),setTimeout((()=>{document.body.removeChild(n),n=null,v(r)&&r()}))}function ct(e,t,r){const n=URL.createObjectURL(e);lt(n,t),setTimeout((()=>{URL.revokeObjectURL(n),v(r)&&r()}))}function ut(e,t,r){const{successCode:n=200,successCallback:o,failCallback:i}=E(r)?{successCode:200,successCallback:void 0,failCallback:void 0}:r,s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="blob",s.onload=function(){if(s.status===n)ct(s.response,t,o);else if(v(i)){const e=s.status,t=s.getResponseHeader("Content-Type");if(h(t)&&t.includes("application/json")){const t=new FileReader;t.onload=()=>{i({status:e,response:t.result})},t.readAsText(s.response)}else i(s)}},s.onerror=e=>{v(i)&&i({status:0,code:"ERROR_CONNECTION_REFUSED"})},s.send()}function dt(e,t,r,n){if(r=r.replace(`.${t}`,"")+`.${t}`,"json"===t){ct(new Blob([JSON.stringify(e,null,4)]),r)}else{if(!n||!n.length)throw new Error("未传入表头数据");if(!Array.isArray(e))throw new Error("data error! expected array!");const o=n.join(",")+"\n";let i="";e.forEach((e=>{i+=Object.values(e).join(",\t")+",\n"}));lt("data:"+{csv:"text/csv",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}[t]+";charset=utf-8,\ufeff"+encodeURIComponent(o+i),r)}}var ft={downloadURL:at,downloadHref:lt,downloadBlob:ct,crossOriginDownload:ut,downloadData:dt},pt=Object.freeze({__proto__:null,crossOriginDownload:ut,default:ft,downloadBlob:ct,downloadData:dt,downloadHref:lt,downloadURL:at});function ht(e=1){return new Promise((t=>setTimeout(t,e)))}function gt(e,t,r=1/0){return new Promise(((n,o)=>{const i=e[Symbol.iterator](),s=Math.min(e.length,r),a=[];let l,c=0,u=0;const d=()=>{if(l)return o(l);const r=i.next();if(r.done)return void(c===e.length&&n(a));const s=u++;t(r.value,s,e).then((e=>{c++,a[s]=e,d()})).catch((e=>{l=e,d()}))};for(let e=0;e<s;e++)d()}))}function mt(e,t){return e.then((e=>[null,e])).catch((e=>{if(t){return[Object.assign({},e,t),void 0]}return[e,void 0]}))}var yt={wait:ht,asyncMap:gt,safeAwait:mt},bt=Object.freeze({__proto__:null,asyncMap:gt,default:yt,safeAwait:mt,wait:ht});function At(){return!!document.createElement("canvas").getContext}function St(e,t){let r=document.createElement("input");r.setAttribute("id",String(Date.now())),r.setAttribute("type","file"),r.setAttribute("style","visibility:hidden"),r.setAttribute("accept",e),document.body.appendChild(r),r.click(),r.onchange=e=>{t(e.target.files),setTimeout((()=>{document.body.removeChild(r),r=null}))}}function wt({maxWidth:e,maxHeight:t,originWidth:r,originHeight:n}){let o=r,i=n;return(r>e||n>t)&&(r/n>e/t?(o=e,i=Math.round(e*(n/r))):(i=t,o=Math.round(t*(r/n)))),{width:o,height:i}}function Et(e,t={mime:"image/jpeg",minFileSizeKB:50}){if(!(e instanceof File||e instanceof FileList))throw new Error(`${e} require be File or FileList`);if(!At())throw new Error("Current runtime environment not support Canvas");const{quality:r,mime:n="image/jpeg",maxSize:o,minFileSizeKB:i=50}=_(t)?t:{};let s,a=r;if(r)a=r;else if(e instanceof File){const t=+parseInt((e.size/1024).toFixed(2));a=t<i?1:t<1024?.85:t<5120?.8:.75}return b(o)&&(s=o>=1200?o:1200),e instanceof FileList?Promise.all(Array.from(e).map((e=>Et(e,{maxSize:s,mime:n,quality:a})))):e instanceof File?new Promise((t=>{const r=[...e.name.split(".").slice(0,-1),{"image/webp":"webp","image/jpeg":"jpg","image/png":"png"}[n]].join("."),o=+parseInt((e.size/1024).toFixed(2));if(o<i)t({file:e});else{const i=new FileReader;i.onload=({target:{result:i}})=>{const l=new Image;l.onload=()=>{const c=document.createElement("canvas"),u=c.getContext("2d"),d=l.width,f=l.height,{width:p,height:h}=function({sizeKB:e,maxSize:t,originWidth:r,originHeight:n}){let o=r,i=n;if(b(t)){const{width:e,height:s}=wt({maxWidth:t,maxHeight:t,originWidth:r,originHeight:n});o=e,i=s}else if(e<500){const e=1200,t=1200,{width:s,height:a}=wt({maxWidth:e,maxHeight:t,originWidth:r,originHeight:n});o=s,i=a}else if(e<5120){const e=1400,t=1400,{width:s,height:a}=wt({maxWidth:e,maxHeight:t,originWidth:r,originHeight:n});o=s,i=a}else if(e<10240){const e=1600,t=1600,{width:s,height:a}=wt({maxWidth:e,maxHeight:t,originWidth:r,originHeight:n});o=s,i=a}else if(10240<=e){const e=r>15e3?8192:r>1e4?4096:2048,t=n>15e3?8192:n>1e4?4096:2048,{width:s,height:a}=wt({maxWidth:e,maxHeight:t,originWidth:r,originHeight:n});o=s,i=a}return{width:o,height:i}}({sizeKB:o,maxSize:s,originWidth:d,originHeight:f});c.width=p,c.height=h,u.clearRect(0,0,p,h),u.drawImage(l,0,0,p,h);const g=c.toDataURL(n,a),m=atob(g.split(",")[1]);let y=m.length;const A=new Uint8Array(new ArrayBuffer(y));for(;y--;)A[y]=m.charCodeAt(y);const S=new File([A],r,{type:n});t({file:S,bufferArray:A,origin:e,beforeSrc:i,afterSrc:g,beforeKB:o,afterKB:Number((S.size/1024).toFixed(2))})},l.src=i},i.readAsDataURL(e)}})):Promise.resolve(null)}var _t={supportCanvas:At,chooseLocalFile:St,compressImg:Et},xt=Object.freeze({__proto__:null,chooseLocalFile:St,compressImg:Et,default:_t,supportCanvas:At});function vt(e="请勿外传",t){const{rootContainer:r=document.body,width:n="300px",height:o="150px",textAlign:i="center",textBaseline:s="middle",font:a="20px PingFangSC-Medium,PingFang SC",fillStyle:l="rgba(189, 177, 167, .3)",rotate:c=-20,zIndex:u=2147483647,watermarkId:d="__wm"}=E(t)?{}:t,f=h(r)?document.querySelector(r):r;if(!f)throw new Error(`${r} is not valid Html Element or element selector`);const p=document.createElement("canvas");p.setAttribute("width",n),p.setAttribute("height",o);const g=p.getContext("2d");g.textAlign=i,g.textBaseline=s,g.font=a,g.fillStyle=l,g.rotate(Math.PI/180*c),g.fillText(e,parseFloat(n)/4,parseFloat(o)/2);const m=p.toDataURL(),y=document.querySelector(`#${d}`),b=y||document.createElement("div"),A=`opacity: 1 !important; display: block !important; visibility: visible !important; position:absolute; left:0; top:0; width:100%; height:100%; z-index:${u}; pointer-events:none; background-repeat:repeat; background-image:url('${m}')`;b.setAttribute("style",A),b.setAttribute("id",d),b.classList.add("nav-height"),y||(f.style.position="relative",f.appendChild(b));const S=window.MutationObserver||window.WebKitMutationObserver;if(S){let r=new S((function(){let n=document.querySelector(`#${d}`);if(n){const{opacity:o,zIndex:i,display:s,visibility:a}=(e=>{const t=getComputedStyle(e);return{opacity:t.getPropertyValue("opacity"),zIndex:t.getPropertyValue("z-index"),display:t.getPropertyValue("display"),visibility:t.getPropertyValue("visibility")}})(n);(n&&n.getAttribute("style")!==A||!n||"1"!==o||"2147483647"!==i||"block"!==s||"visible"!==a)&&(r.disconnect(),r=null,f.removeChild(n),n=null,vt(e,t))}else r.disconnect(),r=null,vt(e,t)}));r.observe(f,{attributes:!0,subtree:!0,childList:!0})}}var Ct={genCanvasWM:vt},Ft=Object.freeze({__proto__:null,default:Ct,genCanvasWM:vt});const Tt=(e,t)=>{let r,n=!1;const o=function(...o){n||(clearTimeout(r),r=setTimeout((()=>{e.call(this,...o)}),t))};return o.cancel=()=>{clearTimeout(r),n=!0},o},jt=(e,t,r)=>{let n,o=!1,i=0;const s=function(...s){if(o)return;const a=Date.now(),l=()=>{i=a,e.call(this,...s)};if(0===i)return r?l():void(i=a);i+t-a>0?(clearTimeout(n),n=setTimeout((()=>l()),t)):l()};return s.cancel=()=>{clearTimeout(n),o=!0},s},Nt=e=>{let t,r=!1;return function(...n){return r||(r=!0,t=e.call(this,...n)),t}};function Rt(e,t){if("undefined"!=typeof globalThis)globalThis[e]=t;else if("undefined"!=typeof window)window[e]=t;else if("undefined"!=typeof global)global[e]=t;else{if("undefined"==typeof self)throw new SyntaxError("当前环境下无法设置全局属性");self[e]=t}}function Ot(e){return"undefined"!=typeof globalThis?globalThis[e]:"undefined"!=typeof window?window[e]:"undefined"!=typeof global?global[e]:"undefined"!=typeof self?self[e]:void 0}var Pt={debounce:Tt,throttle:jt,once:Nt,getGlobal:Ot,setGlobal:Rt},It=Object.freeze({__proto__:null,debounce:Tt,default:Pt,getGlobal:Ot,once:Nt,setGlobal:Rt,throttle:jt});const Dt=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),$t=`${oe}${se}${ie}`,Mt=(e,t)=>{let r=0,n=$t;h(t)?(r=e,n=t):b(e)?r=e:h(e)&&(n=e);let o=Math.max(r,1),i="";const s=n.length-1;if(s<2)throw new Error("字符串池长度不能少于 2");for(;o--;){i+=n[Dt(0,s)]}return i};function Lt(){if("undefined"==typeof URL||!URL.createObjectURL||"undefined"==typeof Blob){const e="0123456789abcdef",t="xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx";let r="";for(let n=0;n<t.length;n++){const o=Dt(0,15);r+="-"==t[n]||"4"==t[n]?t[n]:e[o]}return r}return/[^/]+$/.exec(URL.createObjectURL(new Blob).slice())[0]}var Ut={STRING_POOL:$t,randomNumber:Dt,randomString:Mt,randomUuid:Lt},kt=Object.freeze({__proto__:null,STRING_POOL:$t,default:Ut,randomNumber:Dt,randomString:Mt,randomUuid:Lt});const Bt=`${oe}${se}${ie}`,zt="undefined"!=typeof BigInt,Ht=()=>Ot("JSBI"),Gt=e=>zt?BigInt(e):Ht().BigInt(e);function qt(e,t=Bt){if(t.length<2)throw new Error("进制池长度不能少于 2");if(!zt)throw new Error('需要安装 jsbi 模块并将 JSBI 设置为全局变量:\nimport JSBI from "jsbi"; window.JSBI = JSBI;');let r=Gt(e);const n=[],{length:o}=t,i=Gt(o),s=()=>{const e=Number(((e,t)=>zt?e%t:Ht().remainder(e,t))(r,i));r=((e,t)=>zt?e/t:Ht().divide(e,t))(r,i),n.unshift(t[e]),r>0&&s()};return s(),n.join("")}const Vt=(e,t,r={ratio:1e3,decimals:0,separator:" "})=>{const{ratio:n=1e3,decimals:o=0,separator:i=" "}=r,{length:s}=t;if(0===s)throw new Error("At least one unit is required");let a=Number(e),l=0;for(;a>=n&&l<s-1;)a/=n,l++;const c=a.toFixed(o),u=t[l];return String(c)+i+u};function Wt(e,t={decimals:0,si:!1,separator:" "}){const{decimals:r=0,si:n=!1,separator:o=" ",baseUnit:i,maxUnit:s}=t;let a=n?["B","kB","MB","GB","TB","PB","EB","ZB","YB"]:["Byte","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];if(!E(i)){const e=a.findIndex((e=>e===i));-1!==e&&(a=a.slice(e))}if(!E(s)){const e=a.findIndex((e=>e===s));-1!==e&&a.splice(e+1)}return Vt(e,a,{ratio:n?1e3:1024,decimals:r,separator:o})}function Xt(e,t){if(E(t))return parseInt(String(e)).toLocaleString();let r=0;return t>0&&(r=t),Number(Number(e).toFixed(r)).toLocaleString("en-US")}var Yt={HEX_POOL:Bt,numberToHex:qt,numberAbbr:Vt,humanFileSize:Wt,formatNumber:Xt,formatMoney:Xt},Kt=Object.freeze({__proto__:null,HEX_POOL:Bt,default:Yt,formatMoney:Xt,formatNumber:Xt,humanFileSize:Wt,numberAbbr:Vt,numberToHex:qt});let Jt=0,Zt=0;const Qt=(e=18)=>{const t=Date.now();e=Math.max(e,18),t!==Zt&&(Zt=t,Jt=0);const r=`${t}`;let n="";const o=e-5-13;if(o>0){n=`${Dt(10**(o-1),10**o-1)}`}const i=((e,t=2)=>String(e).padStart(t,"0"))(Jt,5);return Jt++,`${r}${n}${i}`},er=e=>e[Dt(0,e.length-1)],tr=(e,t)=>{let r=0,n=Bt;h(t)?(r=e,n=t):b(e)?r=e:h(e)&&(n=e);let o=qt(Qt(),n),i=r-o.length;if(i<=0)return o;for(;i--;)o+=er(n);return o};var rr={UNIQUE_NUMBER_SAFE_LENGTH:18,uniqueNumber:Qt,uniqueString:tr},nr=Object.freeze({__proto__:null,UNIQUE_NUMBER_SAFE_LENGTH:18,default:rr,uniqueNumber:Qt,uniqueString:tr});function or(e,t,r){let n=250,o=13;const i=e.children[0];_e(t,12)<230?(i.style.maxWidth=_e(t,12)+20+50+"px",n=r.clientX+(_e(t,12)+50)-document.body.offsetWidth):(i.style.maxWidth="250px",n=r.clientX+230-document.body.offsetWidth),i.innerHTML=t,n>0&&(o-=n),e.style.top=r.clientY+23+"px",e.style.left=r.clientX+o+"px",e.style.maxWidth="250px";const s=e.getBoundingClientRect().top+i.offsetHeight-document.body.offsetHeight;s>0&&(e.style.top=r.clientY-s+"px")}const ir={handleMouseEnter:function({rootContainer:e="#root",title:t,event:r,bgColor:n="#000",color:o="#fff"}){try{const i=h(e)?document.querySelector(e):e;if(!i)throw new Error(`${e} is not valid Html Element or element selector`);let s=null;const a="style-tooltip-inner1494304949567";if(!document.querySelector(`#${a}`)){const e=document.createElement("style");e.type="text/css",e.id=a,e.innerHTML=`\n .tooltip-inner1494304949567 {\n max-width: 250px;\n padding: 3px 8px;\n color: ${o};\n text-decoration: none;\n border-radius: 4px;\n text-align: left;\n background-color: ${n};\n }\n `,document.querySelector("head").appendChild(e)}if(s=document.querySelector("#customTitle1494304949567"),s)or(s,t,r);else{const e=document.createElement("div");e.id="customTitle1494304949567",e.style.cssText="z-index: 99999999; visibility: hidden; position: absolute;",e.innerHTML='<div class="tooltip-inner1494304949567" style="word-wrap: break-word; max-width: 44px;">皮肤</div>',i.appendChild(e),s=document.querySelector("#customTitle1494304949567"),t&&(or(s,t,r),s.style.visibility="visible")}}catch(e){console.error(e.message)}},handleMouseLeave:function(e="#root"){const t=h(e)?document.querySelector(e):e;let r=document.querySelector("#customTitle1494304949567");t&&r&&(t.removeChild(r),r=null)}};var sr={tooltipEvent:ir},ar=Object.freeze({__proto__:null,default:sr,tooltipEvent:ir});const lr={keyField:"key",childField:"children",pidField:"pid"},cr={childField:"children",nameField:"name",removeEmptyChild:!1,ignoreCase:!0};function ur(e,t,r={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const{childField:n="children",reverse:o=!1,breadthFirst:i=!1,isDomNode:s=!1}=_(r)?r:{};let a=!1;const l=[],c=(r,o,u=0)=>{for(let d=r.length-1;d>=0&&!a;d--){const f=r[d];if(i)l.push({item:f,index:d,array:r,tree:e,parent:o,level:u});else{const i=t(f,d,r,e,o,u);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?k(f[n]):Array.isArray(f[n]))&&c(f[n],f,u+1)}}if(i)for(;l.length>0&&!a;){const e=l.shift(),{item:r,index:o,array:i,tree:u,parent:d,level:f}=e,p=t(r,o,i,u,d,f);if(!1===p){a=!0;break}!0!==p&&(r&&(s?k(r[n]):Array.isArray(r[n]))&&c(r[n],r,f+1))}},u=(r,o,c=0)=>{for(let d=0,f=r.length;d<f&&!a;d++){const f=r[d];if(i)l.push({item:f,index:d,array:r,tree:e,parent:o,level:c});else{const i=t(f,d,r,e,o,c);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?k(f[n]):Array.isArray(f[n]))&&u(f[n],f,c+1)}}if(i)for(;l.length>0&&!a;){const e=l.shift();if(!e)break;const{item:r,index:o,array:i,tree:c,parent:d,level:f}=e,p=t(r,o,i,c,d,f);if(!1===p){a=!0;break}!0!==p&&(r&&(s?k(r[n]):Array.isArray(r[n]))&&u(r[n],r,f+1))}};o?c(e,null,0):u(e,null,0),e=null}function dr(e,t,r={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){let n=null;return ur(e,((...e)=>{if(t(...e))return n=e[0],!1}),r),n}function fr(e,t,r={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const n=[];return ur(e,((...e)=>{t(...e)&&n.push(e[0])}),r),n}function pr(e,t,r={childField:"children",reverse:!1}){const{childField:n="children",reverse:o=!1}=_(r)?r:{};let i=!1;const s=[],a=(r,s,l,c=0)=>{if(o)for(let o=r.length-1;o>=0&&!i;o--){const u=r[o],d=t(u,o,r,e,s,c);if(!1===d){i=!0;break}!0!==d&&(l.push(Y(d,[n])),u&&Array.isArray(u[n])?(l[l.length-1][n]=[],a(u[n],u,l[l.length-1][n],c+1)):delete d[n])}else for(let o=0;o<r.length&&!i;o++){const u=r[o],d=t(u,o,r,e,s,c);if(!1===d){i=!0;break}!0!==d&&(l.push(Y(d,[n])),u&&Array.isArray(u[n])?(l[l.length-1][n]=[],a(u[n],u,l[l.length-1][n],c+1)):delete d[n])}};return a(e,null,s),e=null,s}function hr(e,t,r={childField:"children",keyField:"id"}){const{childField:n="children",keyField:o="id"}=_(r)?r:{},i=(e,t,r)=>e.reduce(((e,s)=>{const a=s[n];return[...e,t?{...s,parentId:t,parent:r}:s,...a&&a.length?i(a,s[o],s):[]]}),[]);return(e=>{let r=e.find((e=>e[o]===t));const{parent:n,parentId:i,...s}=r;let a=[t],l=[s];for(;r&&r.parentId;)a=[r.parentId,...a],l=[r.parent,...l],r=e.find((e=>e[o]===r.parentId));return[a,l]})(i(e))}function gr(e,t=lr){const{keyField:r="key",childField:n="children",pidField:o="pid"}=_(t)?t:{},i=[],s={};for(let t=0,n=e.length;t<n;t++){const n=e[t];s[n[r]]=n}for(let t=0,r=e.length;t<r;t++){const r=e[t],a=s[r[o]];a?(a[n]||(a[n]=[])).push(r):i.push(r)}return e=null,i}function mr(e,t=lr){const{keyField:r="key",childField:n="children",pidField:o="pid"}=_(t)?t:{};let i=[];for(let s=0,a=e.length;s<a;s++){const a=e[s],l={...a,[n]:[]};if(u(l,n)&&delete l[n],i.push(l),a[n]){const e=a[n].map((e=>({...e,[o]:a[r]||e.pid})));i=i.concat(mr(e,t))}}return i}function yr(e,t,r=cr){if(!u(t,"filter")&&!t.keyword)return e;const n=[];for(let o=0,i=e.length;o<i;o++){const i=e[o],s=i[r.childField]&&i[r.childField].length>0?yr(i[r.childField]||[],t,r):[];if((u(t,"filter")?t.filter(i):r.ignoreCase?i[r.nameField].toLowerCase().includes(t.keyword.toLowerCase()):i[r.nameField].includes(t.keyword))||s.length>0)if(i[r.childField])if(s.length>0)n.push({...i,[r.childField]:s});else if(r.removeEmptyChild){const{[r.childField]:e,...t}=i;n.push(t)}else n.push({...i,[r.childField]:[]});else{const{[r.childField]:e,...t}=i;n.push(t)}}return n}var br={forEachDeep:ur,findDeep:dr,filterDeep:fr,mapDeep:pr,searchTreeById:hr,formatTree:gr,flatTree:mr,fuzzySearchTree:yr},Ar=Object.freeze({__proto__:null,default:br,filterDeep:fr,findDeep:dr,flatTree:mr,forEachDeep:ur,formatTree:gr,fuzzySearchTree:yr,mapDeep:pr,searchTreeById:hr});const Sr=(e,t)=>{let r=0;const n=e.toString(),o=t.toString();return void 0!==n.split(".")[1]&&(r+=n.split(".")[1].length),void 0!==o.split(".")[1]&&(r+=o.split(".")[1].length),Number(n.replace(".",""))*Number(o.replace(".",""))/Math.pow(10,r)},wr=(e,t)=>{let r=0,n=0,o=0;try{r=e.toString().split(".")[1].length}catch(e){r=0}try{n=t.toString().split(".")[1].length}catch(e){n=0}return o=10**Math.max(r,n),(Sr(e,o)+Sr(t,o))/o},Er=(e,t)=>wr(e,-t),_r=(e,t)=>{let r=0,n=0,o=0,i=0;return void 0!==e.toString().split(".")[1]&&(r=e.toString().split(".")[1].length),void 0!==t.toString().split(".")[1]&&(n=t.toString().split(".")[1].length),o=Number(e.toString().replace(".","")),i=Number(t.toString().replace(".","")),o/i*Math.pow(10,n-r)};function xr(e,t=15){return+parseFloat(Number(e).toPrecision(t))}var vr={add:wr,subtract:Er,multiply:Sr,divide:_r,strip:xr},Cr=Object.freeze({__proto__:null,add:wr,default:vr,divide:_r,multiply:Sr,strip:xr,subtract:Er});const Fr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Tr=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;function jr(e){const t=e.length;let r="",n=0;for(;n<t-2;n+=3){const t=e.charCodeAt(n)<<16|e.charCodeAt(n+1)<<8|e.charCodeAt(n+2);r+=Fr.charAt(t>>18)+Fr.charAt(t>>12&63)+Fr.charAt(t>>6&63)+Fr.charAt(63&t)}const o=t-n;if(1===o){const t=e.charCodeAt(n);r+=Fr.charAt(t>>2)+Fr.charAt(t<<4&63)+"=="}else if(2===o){const t=e.charCodeAt(n)<<8|e.charCodeAt(n+1);r+=Fr.charAt(t>>10)+Fr.charAt(t>>4&63)+Fr.charAt(t<<2&63)+"="}return r}function Nr(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Tr.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");const t=e.length,r=e.endsWith("==")?2:e.endsWith("=")?1:0,n=new Array(.75*t-r);let o=0;for(let i=0;i<t;i+=4){const s=Fr.indexOf(e.charAt(i))<<18|Fr.indexOf(e.charAt(i+1))<<12|(63&Fr.indexOf(e.charAt(i+2)))<<6|63&Fr.indexOf(e.charAt(i+3));n[o++]=String.fromCharCode(s>>16&255),(i+2<t-r||r<2)&&(n[o++]=String.fromCharCode(s>>8&255)),(i+3<t-r||r<1)&&(n[o++]=String.fromCharCode(255&s))}return n.join("")}function Rr(e){const t=(e=String(e)).length;for(let r=0;r<t;r++)if(e.charCodeAt(r)>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");return jr(e)}function Or(e){return Nr(e)}function Pr(e){if(!E(Ot("atob"))&&!E(Ot("TextDecoder")))try{const t=Ot("atob")(e),r=t.length,n=new Uint8Array(r);for(let e=0;e<r;e++)n[e]=t.charCodeAt(e);return new(Ot("TextDecoder"))("utf-8").decode(n)}catch(e){}const t=Nr(e),r=t.length,n=new Uint8Array(r);for(let e=0;e<r;e++)n[e]=t.charCodeAt(e);return function(e){const t=e.length;let r="",n=0;for(;n<t;){const t=e[n++];if(t<128)r+=String.fromCharCode(t);else if(t<224){const o=63&e[n++];r+=String.fromCharCode((31&t)<<6|o)}else if(t<240){const o=63&e[n++],i=63&e[n++];r+=String.fromCharCode((15&t)<<12|o<<6|i)}else{let o=(7&t)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++];o-=65536,r+=String.fromCharCode(55296+(o>>10&1023),56320+(1023&o))}}return r}(n)}function Ir(e){if(!E(Ot("btoa"))&&!E(Ot("TextEncoder")))try{const t=(new(Ot("TextEncoder"))).encode(e);let r="";const n=t.length;for(let e=0;e<n;e++)r+=String.fromCharCode(t[e]);return Ot("btoa")(r)}catch(e){}const t=function(e){const t=e.length,r=new Uint8Array(3*t);let n=0;for(let o=0;o<t;o++){let t=e.charCodeAt(o);t<128?r[n++]=t:t<2048?(r[n++]=192|t>>6,r[n++]=128|63&t):t<55296||t>=57344?(r[n++]=224|t>>12,r[n++]=128|t>>6&63,r[n++]=128|63&t):(o++,t=65536+((1023&t)<<10|1023&e.charCodeAt(o)),r[n++]=240|t>>18,r[n++]=128|t>>12&63,r[n++]=128|t>>6&63,r[n++]=128|63&t)}return r.subarray(0,n)}(e);let r="";const n=t.length;for(let e=0;e<n;e++)r+=String.fromCharCode(t[e]);return jr(r)}var Dr={weBtoa:Rr,weAtob:Or,b64decode:Pr,b64encode:Ir},$r=Object.freeze({__proto__:null,b64decode:Pr,b64encode:Ir,default:Dr,weAtob:Or,weBtoa:Rr});const Mr=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,Lr=e=>Mr.test(e),Ur=/^(?:(?:\+|00)86)?1\d{10}$/,kr=e=>Ur.test(e),Br=/^(1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5]|7[1]|8[1-2]|9[1])\d{4}(18|19|20)\d{2}[01]\d[0123]\d{4}[\dxX]$/,zr=e=>{if(!Br.test(e))return!1;const t=Number(e.slice(6,10)),r=Number(e.slice(10,12)),n=Number(e.slice(12,14)),o=new Date(t,r-1,n);if(!(o.getFullYear()===t&&o.getMonth()+1===r&&o.getDate()===n))return!1;const i=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];let s=0;for(let t=0;t<17;t++)s+=Number(e.slice(t,t+1))*i[t];return["1","0","X","9","8","7","6","5","4","3","2"][s%11]===e.slice(-1)},Hr=/^(https?|ftp):\/\/([^\s/$.?#].[^\s]*)$/i,Gr=/^https?:\/\/([^\s/$.?#].[^\s]*)$/i,qr=(e,t=!1)=>(t?Hr:Gr).test(e),Vr=/^(?:(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/,Wr=/^(([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,7}:|([\da-fA-F]{1,4}:){1,6}:[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,5}(:[\da-fA-F]{1,4}){1,2}|([\da-fA-F]{1,4}:){1,4}(:[\da-fA-F]{1,4}){1,3}|([\da-fA-F]{1,4}:){1,3}(:[\da-fA-F]{1,4}){1,4}|([\da-fA-F]{1,4}:){1,2}(:[\da-fA-F]{1,4}){1,5}|[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,6})|:((:[\da-fA-F]{1,4}){1,7}|:)|fe80:(:[\da-fA-F]{0,4}){0,4}%[\da-zA-Z]+|::(ffff(:0{1,4})?:)?((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d)|([\da-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d))$/i,Xr=e=>Vr.test(e),Yr=e=>Wr.test(e),Kr=/^(-?[1-9]\d*|0)$/,Jr=e=>Kr.test(e),Zr=/^-?([1-9]\d*|0)\.\d*[1-9]$/,Qr=e=>Zr.test(e),en=e=>Jr(e)||Qr(e),tn=/^\d+$/,rn=e=>tn.test(e);var nn={EMAIL_REGEX:Mr,HTTP_URL_REGEX:Gr,IPV4_REGEX:Vr,IPV6_REGEX:Wr,PHONE_REGEX:Ur,URL_REGEX:Hr,isDigit:rn,isEmail:Lr,isFloat:Qr,isIdNo:zr,isInteger:Jr,isIpV4:Xr,isIpV6:Yr,isNumerical:en,isPhone:kr,isUrl:qr},on=Object.freeze({__proto__:null,EMAIL_REGEX:Mr,HTTP_URL_REGEX:Gr,IPV4_REGEX:Vr,IPV6_REGEX:Wr,PHONE_REGEX:Ur,URL_REGEX:Hr,default:nn,isDigit:rn,isEmail:Lr,isFloat:Qr,isIdNo:zr,isInteger:Jr,isIpV4:Xr,isIpV6:Yr,isNumerical:en,isPhone:kr,isUrl:qr});function sn(e){return[...new Set(e.trim().split(""))].join("")}function an(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ln(e,t){return new RegExp(`${an(e.trim())}\\s*([^${an(sn(e))}${an(sn(t))}\\s]*)\\s*${t.trim()}`,"g")}function cn(e,t="{",r="}"){return Array.from(e.matchAll(ln(t,r))).map((e=>E(e)?void 0:e[1]))}function un(e,t,r="{",n="}"){return e.replace(new RegExp(ln(r,n)),(function(e,r){return u(t,r)?t[r]:e}))}function dn(e,t={}){const r=Object.keys(t),n=r.map((e=>t[e]));try{return new Function(...r,`return (() => { ${e} })()`)(...n)}catch(e){throw new Error(`代码执行失败: ${e.message}`)}}var fn={escapeRegExp:an,executeInScope:dn,parseVarFromString:cn,replaceVarFromString:un,uniqueSymbol:sn},pn=Object.freeze({__proto__:null,default:fn,escapeRegExp:an,executeInScope:dn,parseVarFromString:cn,replaceVarFromString:un,uniqueSymbol:sn});function hn(e,t=new WeakMap){if(null===e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);if(e instanceof ArrayBuffer){const r=new ArrayBuffer(e.byteLength);return new Uint8Array(r).set(new Uint8Array(e)),t.set(e,r),r}if(ArrayBuffer.isView(e)){return new(0,e.constructor)(hn(e.buffer,t),e.byteOffset,e.length)}if(e instanceof Date){const r=new Date(e.getTime());return t.set(e,r),r}if(e instanceof RegExp){const r=new RegExp(e.source,e.flags);return r.lastIndex=e.lastIndex,t.set(e,r),r}if(e instanceof Map){const r=new Map;return t.set(e,r),e.forEach(((e,n)=>{r.set(hn(n,t),hn(e,t))})),r}if(e instanceof Set){const r=new Set;return t.set(e,r),e.forEach((e=>{r.add(hn(e,t))})),r}if(Array.isArray(e)){const r=new Array(e.length);t.set(e,r);for(let n=0,o=e.length;n<o;n++)n in e&&(r[n]=hn(e[n],t));const n=Object.getOwnPropertyDescriptors(e);for(const e of Reflect.ownKeys(n))Object.defineProperty(r,e,{...n[e],value:hn(n[e].value,t)});return r}const r=Object.create(Object.getPrototypeOf(e));t.set(e,r);const n=Object.getOwnPropertyDescriptors(e);for(const e of Reflect.ownKeys(n)){const o=n[e];"value"in o?o.value=hn(o.value,t):(o.get&&(o.get=hn(o.get,t)),o.set&&(o.set=hn(o.set,t))),Object.defineProperty(r,e,o)}return r}var gn={cloneDeep:hn},mn=Object.freeze({__proto__:null,cloneDeep:hn,default:gn});const yn={MAP:"[object Map]",SET:"[object Set]",DATE:"[object Date]",REGEXP:"[object RegExp]",SYMBOL:"[object Symbol]",ARRAY_BUFFER:"[object ArrayBuffer]",DATA_VIEW:"[object DataView]",ARGUMENTS:"[object Arguments]"},{toString:bn,hasOwnProperty:An}=Object.prototype,Sn=e=>bn.call(e);function wn(e,t){return En(e,t)}function En(e,t,r=void 0){if(e===t)return!0;if(e!=e&&t!=t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e.constructor!==t.constructor)return!1;if(r||(r=new WeakMap),r.has(e))return r.get(e)===t;r.set(e,t);const n=Sn(e);if(n!==Sn(t))return!1;let o=!1;switch(n){case yn.DATE:o=+e==+t;break;case yn.REGEXP:o=""+e==""+t;break;case yn.SYMBOL:o=Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t);break;case yn.ARRAY_BUFFER:o=_n(e,t);break;case yn.DATA_VIEW:s=t,o=(i=e).byteLength===s.byteLength&&i.byteOffset===s.byteOffset&&_n(i.buffer,s.buffer);break;case yn.MAP:o=function(e,t,r){if(e.size!==t.size)return!1;for(const[n,o]of e){const e=t.get(n);if(void 0===e&&!t.has(n))return!1;if(!En(o,e,r))return!1}return!0}(e,t,r);break;case yn.SET:o=function(e,t,r){if(e.size!==t.size)return!1;for(const n of e){if(t.has(n))continue;let e=!1;for(const o of t)if(En(n,o,r)){e=!0;break}if(!e)return!1}return!0}(e,t,r);break;case yn.ARGUMENTS:default:o=Array.isArray(e)||ArrayBuffer.isView(e)?function(e,t,r){const n=e.length;if(n!==t.length)return!1;let o=n;for(;o--;)if(!En(e[o],t[o],r))return!1;return!0}(e,t,r):function(e,t,r){const n=Reflect.ownKeys(e),o=Reflect.ownKeys(t);if(n.length!==o.length)return!1;for(let o=0;o<n.length;o++){const i=n[o];if(!An.call(t,i)||!En(e[i],t[i],r))return!1}return!0}(e,t,r)}var i,s;return o}function _n(e,t){if(e.byteLength!==t.byteLength)return!1;const r=new Uint8Array(e),n=new Uint8Array(t);let o=e.byteLength;for(;o--;)if(r[o]!==n[o])return!1;return!0}var xn={isEqual:wn},vn=Object.freeze({__proto__:null,default:xn,isEqual:wn});class Cn{static encode(e,t="unicode",r=!1){const n=[];for(const o of e){const e=o.codePointAt(0);"html"===t&&this.ENTITY_MAP[o]?n.push(this.ENTITY_MAP[o]):!r&&e>=32&&e<=126?n.push(o):"unicode"===t?e>65535?n.push(`\\u{${e.toString(16).toUpperCase()}}`):n.push(`\\u${e.toString(16).toUpperCase().padStart(4,"0")}`):n.push(`&#${e};`)}return n.join("")}static decode(e,t=!1){if(!e)return"";let r=e.replace(/\\u(?:\{([0-9a-fA-F]+)\}|([0-9a-fA-F]{4}))/g,((e,t,r)=>String.fromCodePoint(parseInt(t||r,16)))).replace(/&#(x?)([0-9a-fA-F]+);/g,((e,t,r)=>String.fromCodePoint(parseInt(r,t?16:10)))).replace(/&[a-z0-9]+;/gi,(e=>this.NAMED_ENTITIES[e]||e));return t&&(r=r.replace(/\u00A0/g," ")),r}}Cn.ENTITY_MAP={"&":"&","<":"<",">":">",'"':""","'":"'"},Cn.NAMED_ENTITIES={""":'"',"&":"&","<":"<",">":">"," ":" ","©":"©","™":"™","®":"®"};var Fn={UnicodeToolkit:Cn},Tn={...a,...Ne,...De,...qe,...Ce,...pt,...te,...Ye,...et,...ge,...z,...st,...bt,...xt,...Ft,...It,...kt,...Kt,...nr,...ar,...Ar,...Cr,...$r,...on,...pn,...mn,...vn,...Object.freeze({__proto__:null,UnicodeToolkit:Cn,default:Fn})};e.EMAIL_REGEX=Mr,e.HEX_POOL=Bt,e.HTTP_URL_REGEX=Gr,e.IPV4_REGEX=Vr,e.IPV6_REGEX=Wr,e.PHONE_REGEX=Ur,e.STRING_ARABIC_NUMERALS=oe,e.STRING_LOWERCASE_ALPHA=ie,e.STRING_POOL=$t,e.STRING_UPPERCASE_ALPHA=se,e.UNIQUE_NUMBER_SAFE_LENGTH=18,e.URL_REGEX=Hr,e.UnicodeToolkit=Cn,e.add=wr,e.addClass=be,e.adjustDate=He,e.arrayEach=t,e.arrayEachAsync=r,e.arrayInsertBefore=n,e.arrayLike=d,e.arrayRemove=o,e.asyncMap=gt,e.b64decode=Pr,e.b64encode=Ir,e.chooseLocalFile=St,e.cloneDeep=hn,e.compressImg=Et,e.cookieDel=Pe,e.cookieGet=Re,e.cookieSet=Oe,e.copyText=Fe,e.crossOriginDownload=ut,e.dateParse=Ue,e.dateToEnd=Be,e.dateToStart=ke,e.debounce=Tt,e.default=Tn,e.diffArray=i,e.divide=_r,e.downloadBlob=ct,e.downloadData=dt,e.downloadHref=lt,e.downloadURL=at,e.escapeRegExp=an,e.executeInScope=dn,e.fallbackCopyText=Te,e.filterDeep=fr,e.findDeep=dr,e.flatTree=mr,e.forEachDeep=ur,e.formatDate=ze,e.formatMoney=Xt,e.formatNumber=Xt,e.formatTree=gr,e.fuzzySearchTree=yr,e.genCanvasWM=vt,e.getComputedCssVal=Ee,e.getGlobal=Ot,e.getStrWidthPx=_e,e.getStyle=we,e.hasClass=me,e.humanFileSize=Wt,e.is=p,e.isArguments=$,e.isArray=x,e.isArrayBuffer=D,e.isAsyncFunction=M,e.isBigInt=y,e.isBoolean=g,e.isDataView=I,e.isDate=F,e.isDigit=rn,e.isEmail=Lr,e.isEmpty=U,e.isEqual=wn,e.isError=T,e.isFloat=Qr,e.isFunction=v,e.isIdNo=zr,e.isInteger=Jr,e.isIpV4=Xr,e.isIpV6=Yr,e.isJsonString=L,e.isMap=R,e.isNaN=C,e.isNodeList=k,e.isNull=S,e.isNullOrUnDef=E,e.isNullish=E,e.isNumber=b,e.isNumerical=en,e.isObject=_,e.isPhone=kr,e.isPlainObject=G,e.isPrimitive=w,e.isPromise=N,e.isRegExp=j,e.isSet=O,e.isString=h,e.isSymbol=m,e.isTypedArray=P,e.isUndefined=A,e.isUrl=qr,e.isValidDate=$e,e.mapDeep=pr,e.multiply=Sr,e.numberAbbr=Vt,e.numberToHex=qt,e.objectAssign=J,e.objectEach=q,e.objectEachAsync=V,e.objectFill=Z,e.objectGet=Q,e.objectHas=u,e.objectMap=W,e.objectMerge=J,e.objectOmit=Y,e.objectPick=X,e.once=Nt,e.parseQueryParams=pe,e.parseVarFromString=cn,e.pathJoin=We,e.pathNormalize=Ve,e.qsParse=Ke,e.qsStringify=Ze,e.randomNumber=Dt,e.randomString=Mt,e.randomUuid=Lt,e.removeClass=Ae,e.replaceVarFromString=un,e.safeAwait=mt,e.searchTreeById=hr,e.select=xe,e.setGlobal=Rt,e.setStyle=Se,e.stringAssign=ue,e.stringCamelCase=re,e.stringEscapeHtml=de,e.stringFill=fe,e.stringFormat=le,e.stringKebabCase=ne,e.strip=xr,e.subtract=Er,e.supportCanvas=At,e.throttle=jt,e.tooltipEvent=ir,e.typeIs=f,e.uniqueNumber=Qt,e.uniqueString=tr,e.uniqueSymbol=sn,e.urlDelParams=ot,e.urlParse=tt,e.urlSetParams=nt,e.urlStringify=rt,e.wait=ht,e.weAtob=Or,e.weBtoa=Rr,Object.defineProperty(e,"__esModule",{value:!0})}));
|