@gsc-basic/utils 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
- # @gsc-basic/utils
2
-
3
- > Utils for GSC Basic Team
4
-
5
- ## 说明
6
-
7
- 常用的前端工具、方法,可作为lodash-es、radash、xe-utils的拓展补充
8
-
9
- 文档参考: [JavaScript utils](https://gsc-open.lenovo.com/zh_CN/gsc_basic/vue/basic-utils.html)
10
-
11
- ## Author & License
12
-
13
- This package is maintained by Lenovo SSG BASD. It is distributed under the LicenseRef-Proprietary license; see LICENSE for details.
1
+ # @gsc-basic/utils
2
+
3
+ > Utils for GSC Basic Team
4
+
5
+ ## 说明
6
+
7
+ 常用的前端工具、方法,可作为lodash-es、radash、xe-utils的拓展补充
8
+
9
+ 文档参考: [JavaScript utils](https://gsc-basic.lenovo.com/gsc-docs/zh_CN/gsc_basic/vue/basic-utils.html)
10
+
11
+ ## Author & License
12
+
13
+ This package is maintained by Lenovo SSG BASD. It is distributed under the LicenseRef-Proprietary license; see LICENSE for details.
package/dist/index.d.ts CHANGED
@@ -1,8 +1,10 @@
1
- import { mode, pad } from 'crypto-js';
2
- export { default as ResizeObserver } from 'resize-observer-polyfill';
3
- export { pathToRegexp, compile as regexpToPath } from 'path-to-regexp';
4
- export { titleCase } from 'title-case';
5
1
 
2
+ import { titleCase } from "title-case";
3
+ import { compile as regexpToPath, pathToRegexp } from "path-to-regexp";
4
+ import ResizeObserver from "resize-observer-polyfill";
5
+ import { mode, pad } from "crypto-js";
6
+
7
+ //#region src/core/string.d.ts
6
8
  declare function pascalCase(value: string): string;
7
9
  /**
8
10
  * 在大多数情况下使用 lodash 的 `kebabCase`,
@@ -11,13 +13,14 @@ declare function pascalCase(value: string): string;
11
13
  * @returns 转换后的 kebab-case 字符串
12
14
  */
13
15
  declare function safeKebabCase(value?: string | null): string;
14
-
16
+ //#endregion
17
+ //#region src/core/common.d.ts
15
18
  declare const withInstall: (component: any, alias: string) => any;
16
19
  declare function getRawRoute(route: any): any;
17
20
  declare function openWindow(url: string, opt?: {
18
- target?: string;
19
- noopener?: boolean;
20
- noreferrer?: boolean;
21
+ target?: string;
22
+ noopener?: boolean;
23
+ noreferrer?: boolean;
21
24
  }): void;
22
25
  /**
23
26
  * 递归合并两个对象。
@@ -43,17 +46,18 @@ declare function deepMerge(source: any, target: any, mergeArrays?: string): any;
43
46
  * ==>www.baidu.com?a=3&b=4&c=1,2
44
47
  */
45
48
  declare function setObjToUrlParams(baseUrl: string, obj: {
46
- [x: string]: any;
49
+ [x: string]: any;
47
50
  }): string;
48
51
  declare function unsetAllProperty(params: object): void;
49
52
  declare function createSearchReg(key: string): RegExp;
50
53
  declare function getActualWidthOfChars(text?: string, options?: {
51
- size?: number;
52
- family?: string;
54
+ size?: number;
55
+ family?: string;
53
56
  }): number;
54
-
57
+ //#endregion
58
+ //#region src/core/bem.d.ts
55
59
  type Mod = string | {
56
- [key: string]: any;
60
+ [key: string]: any;
57
61
  };
58
62
  type Mods = Mod | Mod[];
59
63
  type BEM = ReturnType<typeof createBEM>;
@@ -68,61 +72,66 @@ type BEM = ReturnType<typeof createBEM>;
68
72
  declare function buildBEM(name: string): (el?: Mods, mods?: Mods) => string;
69
73
  declare function createBEM(name: string, prefixCls?: string): ((el?: Mods, mods?: Mods) => string)[];
70
74
  declare function createNamespace(name: string, prefixCls?: string): readonly [string, (el?: Mods, mods?: Mods) => string];
71
-
75
+ //#endregion
76
+ //#region src/core/cipher.d.ts
72
77
  interface Encryption {
73
- encryptByAES: (plainText: string) => string;
74
- decryptByAES: (cipherText: string) => string;
78
+ encryptByAES: (plainText: string) => string;
79
+ decryptByAES: (cipherText: string) => string;
75
80
  }
76
81
  interface EncryptionParams {
77
- key: string;
78
- iv: string;
82
+ key: string;
83
+ iv: string;
79
84
  }
80
85
  declare class AesEncryption implements Encryption {
81
- private readonly key;
82
- private readonly iv;
83
- constructor({ key, iv }: EncryptionParams);
84
- get getOptions(): {
85
- mode: typeof mode.CTR;
86
- padding: typeof pad.Pkcs7;
87
- iv: CryptoJS.lib.WordArray;
88
- };
89
- encryptByAES(cipherText: string): string;
90
- decryptByAES(cipherText: string): string;
86
+ private readonly key;
87
+ private readonly iv;
88
+ constructor({
89
+ key,
90
+ iv
91
+ }: EncryptionParams);
92
+ get getOptions(): {
93
+ mode: typeof mode.CTR;
94
+ padding: typeof pad.Pkcs7;
95
+ iv: CryptoJS.lib.WordArray;
96
+ };
97
+ encryptByAES(cipherText: string): string;
98
+ decryptByAES(cipherText: string): string;
91
99
  }
92
100
  declare function encryptByBase64(cipherText: string): string;
93
101
  declare function decodeByBase64(cipherText: string): string;
94
102
  declare function encryptByMd5(password: string): string;
95
-
103
+ //#endregion
104
+ //#region src/core/domUtils.d.ts
96
105
  interface ViewportOffsetResult {
97
- /**
98
- * 元素左边距离 body 左边的距离(和 getBoundingClientRect 的 left 一样)
99
- */
100
- left: number;
101
- /**
102
- * 元素顶边距离 body 顶边的距离(和 getBoundingClientRect 的 top 一样)
103
- */
104
- top: number;
105
- /**
106
- * 元素右边距离 body 右边的距离
107
- */
108
- right: number;
109
- /**
110
- * 元素底边距离 body 底边的距离
111
- */
112
- bottom: number;
113
- /**
114
- * 内容宽度 + 计算后的 right
115
- */
116
- rightIncludeBody: number;
117
- /**
118
- * 内容高度 + 计算后的 bottom
119
- */
120
- bottomIncludeBody: number;
106
+ /**
107
+ * 元素左边距离 body 左边的距离(和 getBoundingClientRect 的 left 一样)
108
+ */
109
+ left: number;
110
+ /**
111
+ * 元素顶边距离 body 顶边的距离(和 getBoundingClientRect 的 top 一样)
112
+ */
113
+ top: number;
114
+ /**
115
+ * 元素右边距离 body 右边的距离
116
+ */
117
+ right: number;
118
+ /**
119
+ * 元素底边距离 body 底边的距离
120
+ */
121
+ bottom: number;
122
+ /**
123
+ * 内容宽度 + 计算后的 right
124
+ */
125
+ rightIncludeBody: number;
126
+ /**
127
+ * 内容高度 + 计算后的 bottom
128
+ */
129
+ bottomIncludeBody: number;
121
130
  }
122
131
  declare function getBoundingClientRect(element: Element): DOMRect | number;
123
132
  declare function hasClass(el: HTMLElement, cls: string): boolean;
124
133
  declare function setCssVar(prop: string, val: string, dom: HTMLElement): {
125
- prop: string;
134
+ prop: string;
126
135
  };
127
136
  declare function addClass(el: HTMLElement, cls: string): void;
128
137
  declare function removeClass(el: HTMLElement, cls: string): void;
@@ -139,19 +148,21 @@ declare function getViewportOffset(element: HTMLElement): ViewportOffsetResult |
139
148
  declare function hackCss(attr: string, value: any): any;
140
149
  type EventTarget = Element | HTMLElement | Document | Window;
141
150
  type EventListenerOrEventListenerObject = (evt: Event) => void | {
142
- handleEvent: (evt: Event) => void;
151
+ handleEvent: (evt: Event) => void;
143
152
  };
144
153
  declare function on(element: EventTarget, event: string, handler: EventListenerOrEventListenerObject): void;
145
154
  declare function off(element: EventTarget, event: string, handler: EventListenerOrEventListenerObject): void;
146
155
  declare function useRafThrottle(fn: () => any): (...args: any[]) => void;
147
-
156
+ //#endregion
157
+ //#region src/core/event.d.ts
148
158
  declare function addResizeListener(element: any, fn: () => any): void;
149
159
  declare function removeResizeListener(element: any, fn: () => any): void;
150
160
  declare function triggerWindowResize(): void;
151
161
  declare function addLocationListener(fn: () => void, options?: AddEventListenerOptions): {
152
- removeListener: () => void;
162
+ removeListener: () => void;
153
163
  };
154
-
164
+ //#endregion
165
+ //#region src/core/file.d.ts
155
166
  /**
156
167
  * @description: base64 to blob
157
168
  */
@@ -190,12 +201,17 @@ declare function downloadByData(data: BlobPart, filename: string, mime?: string,
190
201
  * Download file according to file address
191
202
  * @param {*} sUrl
192
203
  */
193
- declare function downloadByUrl({ url, target, fileName }: {
194
- url: string;
195
- target?: TargetContext;
196
- fileName?: string;
204
+ declare function downloadByUrl({
205
+ url,
206
+ target,
207
+ fileName
208
+ }: {
209
+ url: string;
210
+ target?: TargetContext;
211
+ fileName?: string;
197
212
  }): boolean;
198
-
213
+ //#endregion
214
+ //#region src/core/is.d.ts
199
215
  declare function is(val: unknown, type: string): boolean;
200
216
  declare function isObject(val: any): boolean;
201
217
  declare function isUrl(path: string): boolean;
@@ -213,9 +229,10 @@ declare const isSupportNativeEllipsis: boolean;
213
229
  declare const isSupportResizeObserver: boolean;
214
230
  declare const isChineseText: (text: string) => boolean;
215
231
  declare const enableTransitions: () => boolean;
216
-
232
+ //#endregion
233
+ //#region src/core/jsxHelper.d.ts
217
234
  interface InternalSlots {
218
- [name: string]: any;
235
+ [name: string]: any;
219
236
  }
220
237
  /**
221
238
  * @description: Get slot to prevent empty error
@@ -227,12 +244,16 @@ declare function getSlot(slots: Readonly<InternalSlots>, slot?: string, data?: a
227
244
  * @param excludeKeys
228
245
  */
229
246
  declare function extendSlots(slots: Readonly<InternalSlots>, excludeKeys?: string[]): any;
230
-
231
- declare function loadScript(src: string, { type }?: {
232
- type?: string | undefined;
247
+ //#endregion
248
+ //#region src/core/loadScript.d.ts
249
+ declare function loadScript(src: string, {
250
+ type
251
+ }?: {
252
+ type?: string | undefined;
233
253
  }): Promise<unknown>;
234
254
  declare function unloadScript(src: string): Promise<void>;
235
-
255
+ //#endregion
256
+ //#region src/core/matcher.d.ts
236
257
  /**
237
258
  * 简单的通配符匹配工具, 可在换行符之间匹配 ==> foo*r will match foo\nbar.
238
259
  * 如有更复杂的需求可参考 https://github.com/micromatch/micromatch
@@ -263,8 +284,8 @@ declare function unloadScript(src: string): Promise<void>;
263
284
  * isMatch('unicorn', ['tri*', 'UNI*'], {caseSensitive: true}); //=> false
264
285
  */
265
286
  interface MatcherOptions {
266
- caseSensitive?: boolean;
267
- allPatterns?: boolean;
287
+ caseSensitive?: boolean;
288
+ allPatterns?: boolean;
268
289
  }
269
290
  /**
270
291
  * 接受inputs和patterns
@@ -277,35 +298,37 @@ interface MatcherOptions {
277
298
  declare function matcher(inputs: string | string[], patterns: string | string[], options?: MatcherOptions): string[];
278
299
  declare function isMatch(inputs: string | string[], patterns: string | string[], options?: MatcherOptions): boolean;
279
300
  declare function escapeStringRegexp(value: string): string;
280
-
301
+ //#endregion
302
+ //#region src/core/regexp.d.ts
281
303
  declare const regexpMap: {
282
- mobile: RegExp;
283
- tel: RegExp;
284
- numAndLetter: RegExp;
285
- password: RegExp;
286
- email: RegExp;
287
- postalCode: RegExp;
288
- identityCard: RegExp;
289
- ip: RegExp;
290
- url: RegExp;
291
- httpsUrl: RegExp;
292
- domain: RegExp;
293
- plateNumber: RegExp;
294
- md5: RegExp;
295
- base64: RegExp;
296
- uuid: RegExp;
297
- version: RegExp;
298
- videoUrl: RegExp;
299
- imageUrl: RegExp;
300
- chinese: RegExp;
301
- itcode: RegExp;
302
- numeric: RegExp;
304
+ mobile: RegExp;
305
+ tel: RegExp;
306
+ numAndLetter: RegExp;
307
+ password: RegExp;
308
+ email: RegExp;
309
+ postalCode: RegExp;
310
+ identityCard: RegExp;
311
+ ip: RegExp;
312
+ url: RegExp;
313
+ httpsUrl: RegExp;
314
+ domain: RegExp;
315
+ plateNumber: RegExp;
316
+ md5: RegExp;
317
+ base64: RegExp;
318
+ uuid: RegExp;
319
+ version: RegExp;
320
+ videoUrl: RegExp;
321
+ imageUrl: RegExp;
322
+ chinese: RegExp;
323
+ itcode: RegExp;
324
+ numeric: RegExp;
303
325
  };
304
-
326
+ //#endregion
327
+ //#region src/core/treeHelper.d.ts
305
328
  interface TreeHelperConfig {
306
- id: string;
307
- children: string;
308
- pid: string;
329
+ id: string;
330
+ children: string;
331
+ pid: string;
309
332
  }
310
333
  declare function findNode<T = any>(tree: any, func: Fn, config?: Partial<TreeHelperConfig>): T | null;
311
334
  declare function findNodeAll<T = any>(tree: any, func: Fn, config?: Partial<TreeHelperConfig>): T[];
@@ -314,17 +337,23 @@ declare function findPathAll(tree: any, func: Fn, config?: Partial<TreeHelperCon
314
337
  declare function filter<T = any>(tree: T[], func: (n: T) => boolean, config?: Partial<TreeHelperConfig>): T[];
315
338
  declare function forEach<T = any>(tree: T[], func: (n: T) => any, config?: Partial<TreeHelperConfig>): void;
316
339
  declare function treeMap<T = any>(treeData: T[], opt: {
317
- children?: string;
318
- conversion: Fn;
340
+ children?: string;
341
+ conversion: Fn;
319
342
  }): T[];
320
- declare function treeMapEach(data: any, { children, conversion }: {
321
- children?: string;
322
- conversion: Fn;
343
+ declare function treeMapEach(data: any, {
344
+ children,
345
+ conversion
346
+ }: {
347
+ children?: string;
348
+ conversion: Fn;
323
349
  }): any;
324
-
325
- declare function buildUUID({ native }?: {
326
- native?: boolean | undefined;
350
+ //#endregion
351
+ //#region src/core/uuid.d.ts
352
+ declare function buildUUID({
353
+ native
354
+ }?: {
355
+ native?: boolean | undefined;
327
356
  }): string;
328
357
  declare function buildShortUUID(prefix?: string): string;
329
-
330
- export { AesEncryption, type BEM, addClass, addLocationListener, addResizeListener, buildBEM, buildShortUUID, buildUUID, createBEM, createNamespace, createSearchReg, dataURLtoBlob, decodeByBase64, deepMerge, off as domOffEvent, on as domOnEvent, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadPercent, enableTransitions, encryptByBase64, encryptByMd5, escapeStringRegexp, extendSlots, filter as filterTree, findNode, findNodeAll, findPath, findPathAll, forEach as forEachTree, getActualWidthOfChars, getBoundingClientRect, getRawRoute, getSlot, getViewportOffset, hackCss, hasClass, is, isBrowser, isChineseText, isChrome, isClient, isIterableArray, isMatch, isNumeric, isObject, isPositiveInteger, isSafari, isServer, isSupportNativeEllipsis, isSupportResizeObserver, isUrl, loadScript, matcher, openWindow, pascalCase, regexpMap, removeClass, removeResizeListener, safeKebabCase, setCssVar, setObjToUrlParams, treeMap, treeMapEach, triggerWindowResize, unloadScript, unsetAllProperty, urlToBase64, useRafThrottle, withInstall };
358
+ //#endregion
359
+ export { AesEncryption, type BEM, ResizeObserver, addClass, addLocationListener, addResizeListener, buildBEM, buildShortUUID, buildUUID, createBEM, createNamespace, createSearchReg, dataURLtoBlob, decodeByBase64, deepMerge, off as domOffEvent, on as domOnEvent, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadPercent, enableTransitions, encryptByBase64, encryptByMd5, escapeStringRegexp, extendSlots, filter as filterTree, findNode, findNodeAll, findPath, findPathAll, forEach as forEachTree, getActualWidthOfChars, getBoundingClientRect, getRawRoute, getSlot, getViewportOffset, hackCss, hasClass, is, isBrowser, isChineseText, isChrome, isClient, isIterableArray, isMatch, isNumeric, isObject, isPositiveInteger, isSafari, isServer, isSupportNativeEllipsis, isSupportResizeObserver, isUrl, loadScript, matcher, openWindow, pascalCase, pathToRegexp, regexpMap, regexpToPath, removeClass, removeResizeListener, safeKebabCase, setCssVar, setObjToUrlParams, titleCase, treeMap, treeMapEach, triggerWindowResize, unloadScript, unsetAllProperty, urlToBase64, useRafThrottle, withInstall };
package/dist/index.js CHANGED
@@ -7,8 +7,8 @@ You shall not disclose such Confidential Information and shall use it only in
7
7
  accordance with the terms of the license agreement.
8
8
 
9
9
  --- Build Info ---
10
- Version: 1.2.10
11
- Build Time: 2026/2/11 18:34:10
12
- Build Commit: 9b4b89872743098216d14081433fa57d7fa73fd3
10
+ Version: 1.3.1
11
+ Build Time: 2026/4/13 15:18:33
12
+ Build Commit: 04740b9dd2160a9c71862ec24fca672f9a114a52
13
13
  */
14
- var ht=Object.create;var de=Object.defineProperty,vt=Object.defineProperties,gt=Object.getOwnPropertyDescriptor,yt=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols,xt=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable;var fe=(e,t,r)=>t in e?de(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,W=(e,t)=>{for(var r in t||(t={}))ue.call(t,r)&&fe(e,r,t[r]);if(Z)for(var r of Z(t))ze.call(t,r)&&fe(e,r,t[r]);return e},U=(e,t)=>vt(e,yt(t));var le=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Te=(e,t)=>{var r={};for(var n in e)ue.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Z)for(var n of Z(e))t.indexOf(n)<0&&ze.call(e,n)&&(r[n]=e[n]);return r};var H=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var _t=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of mt(t))!ue.call(e,a)&&a!==r&&de(e,a,{get:()=>t[a],enumerable:!(n=gt(t,a))||n.enumerable});return e};var j=(e,t,r)=>(r=e!=null?ht(xt(e)):{},_t(t||!e||!e.__esModule?de(r,"default",{value:e,enumerable:!0}):r,e));var pe=(e,t,r)=>fe(e,typeof t!="symbol"?t+"":t,r);var N=H((G,Pe)=>{"use strict";(function(e,t){typeof G=="object"?Pe.exports=G=t():typeof define=="function"&&define.amd?define([],t):e.CryptoJS=t()})(G,function(){var e=e||(function(t,r){var n;if(typeof window!="undefined"&&window.crypto&&(n=window.crypto),typeof self!="undefined"&&self.crypto&&(n=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window!="undefined"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global!="undefined"&&global.crypto&&(n=global.crypto),!n&&typeof le=="function")try{n=le("crypto")}catch(i){}var a=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch(i){}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch(i){}}throw new Error("Native crypto module could not be used to get secure random number.")},c=Object.create||(function(){function i(){}return function(s){var m;return i.prototype=s,m=new i,i.prototype=null,m}})(),d={},o=d.lib={},b=o.Base=(function(){return{extend:function(i){var s=c(this);return i&&s.mixIn(i),(!s.hasOwnProperty("init")||this.init===s.init)&&(s.init=function(){s.$super.init.apply(this,arguments)}),s.init.prototype=s,s.$super=this,s},create:function(){var i=this.extend();return i.init.apply(i,arguments),i},init:function(){},mixIn:function(i){for(var s in i)i.hasOwnProperty(s)&&(this[s]=i[s]);i.hasOwnProperty("toString")&&(this.toString=i.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),y=o.WordArray=b.extend({init:function(i,s){i=this.words=i||[],s!=r?this.sigBytes=s:this.sigBytes=i.length*4},toString:function(i){return(i||B).stringify(this)},concat:function(i){var s=this.words,m=i.words,x=this.sigBytes,k=i.sigBytes;if(this.clamp(),x%4)for(var z=0;z<k;z++){var $=m[z>>>2]>>>24-z%4*8&255;s[x+z>>>2]|=$<<24-(x+z)%4*8}else for(var A=0;A<k;A+=4)s[x+A>>>2]=m[A>>>2];return this.sigBytes+=k,this},clamp:function(){var i=this.words,s=this.sigBytes;i[s>>>2]&=4294967295<<32-s%4*8,i.length=t.ceil(s/4)},clone:function(){var i=b.clone.call(this);return i.words=this.words.slice(0),i},random:function(i){for(var s=[],m=0;m<i;m+=4)s.push(a());return new y.init(s,i)}}),u=d.enc={},B=u.Hex={stringify:function(i){for(var s=i.words,m=i.sigBytes,x=[],k=0;k<m;k++){var z=s[k>>>2]>>>24-k%4*8&255;x.push((z>>>4).toString(16)),x.push((z&15).toString(16))}return x.join("")},parse:function(i){for(var s=i.length,m=[],x=0;x<s;x+=2)m[x>>>3]|=parseInt(i.substr(x,2),16)<<24-x%8*4;return new y.init(m,s/2)}},w=u.Latin1={stringify:function(i){for(var s=i.words,m=i.sigBytes,x=[],k=0;k<m;k++){var z=s[k>>>2]>>>24-k%4*8&255;x.push(String.fromCharCode(z))}return x.join("")},parse:function(i){for(var s=i.length,m=[],x=0;x<s;x++)m[x>>>2]|=(i.charCodeAt(x)&255)<<24-x%4*8;return new y.init(m,s)}},C=u.Utf8={stringify:function(i){try{return decodeURIComponent(escape(w.stringify(i)))}catch(s){throw new Error("Malformed UTF-8 data")}},parse:function(i){return w.parse(unescape(encodeURIComponent(i)))}},E=o.BufferedBlockAlgorithm=b.extend({reset:function(){this._data=new y.init,this._nDataBytes=0},_append:function(i){typeof i=="string"&&(i=C.parse(i)),this._data.concat(i),this._nDataBytes+=i.sigBytes},_process:function(i){var s,m=this._data,x=m.words,k=m.sigBytes,z=this.blockSize,$=z*4,A=k/$;i?A=t.ceil(A):A=t.max((A|0)-this._minBufferSize,0);var F=A*z,P=t.min(F*4,k);if(F){for(var f=0;f<F;f+=z)this._doProcessBlock(x,f);s=x.splice(0,F),m.sigBytes-=P}return new y.init(s,P)},clone:function(){var i=b.clone.call(this);return i._data=this._data.clone(),i},_minBufferSize:0}),D=o.Hasher=E.extend({cfg:b.extend(),init:function(i){this.cfg=this.cfg.extend(i),this.reset()},reset:function(){E.reset.call(this),this._doReset()},update:function(i){return this._append(i),this._process(),this},finalize:function(i){i&&this._append(i);var s=this._doFinalize();return s},blockSize:512/32,_createHelper:function(i){return function(s,m){return new i.init(m).finalize(s)}},_createHmacHelper:function(i){return function(s,m){return new L.HMAC.init(i,m).finalize(s)}}}),L=d.algo={};return d})(Math);return e})});var we=H((Y,Oe)=>{"use strict";(function(e,t){typeof Y=="object"?Oe.exports=Y=t(N()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Y,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,a=t.enc,c=a.Base64={stringify:function(o){var b=o.words,y=o.sigBytes,u=this._map;o.clamp();for(var B=[],w=0;w<y;w+=3)for(var C=b[w>>>2]>>>24-w%4*8&255,E=b[w+1>>>2]>>>24-(w+1)%4*8&255,D=b[w+2>>>2]>>>24-(w+2)%4*8&255,L=C<<16|E<<8|D,i=0;i<4&&w+i*.75<y;i++)B.push(u.charAt(L>>>6*(3-i)&63));var s=u.charAt(64);if(s)for(;B.length%4;)B.push(s);return B.join("")},parse:function(o){var b=o.length,y=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var B=0;B<y.length;B++)u[y.charCodeAt(B)]=B}var w=y.charAt(64);if(w){var C=o.indexOf(w);C!==-1&&(b=C)}return d(o,b,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function d(o,b,y){for(var u=[],B=0,w=0;w<b;w++)if(w%4){var C=y[o.charCodeAt(w-1)]<<w%4*2,E=y[o.charCodeAt(w)]>>>6-w%4*2,D=C|E;u[B>>>2]|=D<<24-B%4*8,B++}return n.create(u,B)}})(),e.enc.Base64})});var Ce=H((Q,Me)=>{"use strict";(function(e,t){typeof Q=="object"?Me.exports=Q=t(N()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Q,function(e){return(function(t){var r=e,n=r.lib,a=n.WordArray,c=n.Hasher,d=r.algo,o=[];(function(){for(var C=0;C<64;C++)o[C]=t.abs(t.sin(C+1))*4294967296|0})();var b=d.MD5=c.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(C,E){for(var D=0;D<16;D++){var L=E+D,i=C[L];C[L]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var s=this._hash.words,m=C[E+0],x=C[E+1],k=C[E+2],z=C[E+3],$=C[E+4],A=C[E+5],F=C[E+6],P=C[E+7],f=C[E+8],_=C[E+9],S=C[E+10],p=C[E+11],T=C[E+12],R=C[E+13],O=C[E+14],M=C[E+15],l=s[0],h=s[1],v=s[2],g=s[3];l=y(l,h,v,g,m,7,o[0]),g=y(g,l,h,v,x,12,o[1]),v=y(v,g,l,h,k,17,o[2]),h=y(h,v,g,l,z,22,o[3]),l=y(l,h,v,g,$,7,o[4]),g=y(g,l,h,v,A,12,o[5]),v=y(v,g,l,h,F,17,o[6]),h=y(h,v,g,l,P,22,o[7]),l=y(l,h,v,g,f,7,o[8]),g=y(g,l,h,v,_,12,o[9]),v=y(v,g,l,h,S,17,o[10]),h=y(h,v,g,l,p,22,o[11]),l=y(l,h,v,g,T,7,o[12]),g=y(g,l,h,v,R,12,o[13]),v=y(v,g,l,h,O,17,o[14]),h=y(h,v,g,l,M,22,o[15]),l=u(l,h,v,g,x,5,o[16]),g=u(g,l,h,v,F,9,o[17]),v=u(v,g,l,h,p,14,o[18]),h=u(h,v,g,l,m,20,o[19]),l=u(l,h,v,g,A,5,o[20]),g=u(g,l,h,v,S,9,o[21]),v=u(v,g,l,h,M,14,o[22]),h=u(h,v,g,l,$,20,o[23]),l=u(l,h,v,g,_,5,o[24]),g=u(g,l,h,v,O,9,o[25]),v=u(v,g,l,h,z,14,o[26]),h=u(h,v,g,l,f,20,o[27]),l=u(l,h,v,g,R,5,o[28]),g=u(g,l,h,v,k,9,o[29]),v=u(v,g,l,h,P,14,o[30]),h=u(h,v,g,l,T,20,o[31]),l=B(l,h,v,g,A,4,o[32]),g=B(g,l,h,v,f,11,o[33]),v=B(v,g,l,h,p,16,o[34]),h=B(h,v,g,l,O,23,o[35]),l=B(l,h,v,g,x,4,o[36]),g=B(g,l,h,v,$,11,o[37]),v=B(v,g,l,h,P,16,o[38]),h=B(h,v,g,l,S,23,o[39]),l=B(l,h,v,g,R,4,o[40]),g=B(g,l,h,v,m,11,o[41]),v=B(v,g,l,h,z,16,o[42]),h=B(h,v,g,l,F,23,o[43]),l=B(l,h,v,g,_,4,o[44]),g=B(g,l,h,v,T,11,o[45]),v=B(v,g,l,h,M,16,o[46]),h=B(h,v,g,l,k,23,o[47]),l=w(l,h,v,g,m,6,o[48]),g=w(g,l,h,v,P,10,o[49]),v=w(v,g,l,h,O,15,o[50]),h=w(h,v,g,l,A,21,o[51]),l=w(l,h,v,g,T,6,o[52]),g=w(g,l,h,v,z,10,o[53]),v=w(v,g,l,h,S,15,o[54]),h=w(h,v,g,l,x,21,o[55]),l=w(l,h,v,g,f,6,o[56]),g=w(g,l,h,v,M,10,o[57]),v=w(v,g,l,h,F,15,o[58]),h=w(h,v,g,l,R,21,o[59]),l=w(l,h,v,g,$,6,o[60]),g=w(g,l,h,v,p,10,o[61]),v=w(v,g,l,h,k,15,o[62]),h=w(h,v,g,l,_,21,o[63]),s[0]=s[0]+l|0,s[1]=s[1]+h|0,s[2]=s[2]+v|0,s[3]=s[3]+g|0},_doFinalize:function(){var C=this._data,E=C.words,D=this._nDataBytes*8,L=C.sigBytes*8;E[L>>>5]|=128<<24-L%32;var i=t.floor(D/4294967296),s=D;E[(L+64>>>9<<4)+15]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,E[(L+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,C.sigBytes=(E.length+1)*4,this._process();for(var m=this._hash,x=m.words,k=0;k<4;k++){var z=x[k];x[k]=(z<<8|z>>>24)&16711935|(z<<24|z>>>8)&4278255360}return m},clone:function(){var C=c.clone.call(this);return C._hash=this._hash.clone(),C}});function y(C,E,D,L,i,s,m){var x=C+(E&D|~E&L)+i+m;return(x<<s|x>>>32-s)+E}function u(C,E,D,L,i,s,m){var x=C+(E&L|D&~L)+i+m;return(x<<s|x>>>32-s)+E}function B(C,E,D,L,i,s,m){var x=C+(E^D^L)+i+m;return(x<<s|x>>>32-s)+E}function w(C,E,D,L,i,s,m){var x=C+(D^(E|~L))+i+m;return(x<<s|x>>>32-s)+E}r.MD5=c._createHelper(b),r.HmacMD5=c._createHmacHelper(b)})(Math),e.MD5})});var Ne=H((X,He)=>{"use strict";(function(e,t){typeof X=="object"?He.exports=X=t(N()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(X,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,a=r.Hasher,c=t.algo,d=[],o=c.SHA1=a.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(b,y){for(var u=this._hash.words,B=u[0],w=u[1],C=u[2],E=u[3],D=u[4],L=0;L<80;L++){if(L<16)d[L]=b[y+L]|0;else{var i=d[L-3]^d[L-8]^d[L-14]^d[L-16];d[L]=i<<1|i>>>31}var s=(B<<5|B>>>27)+D+d[L];L<20?s+=(w&C|~w&E)+1518500249:L<40?s+=(w^C^E)+1859775393:L<60?s+=(w&C|w&E|C&E)-1894007588:s+=(w^C^E)-899497514,D=E,E=C,C=w<<30|w>>>2,w=B,B=s}u[0]=u[0]+B|0,u[1]=u[1]+w|0,u[2]=u[2]+C|0,u[3]=u[3]+E|0,u[4]=u[4]+D|0},_doFinalize:function(){var b=this._data,y=b.words,u=this._nDataBytes*8,B=b.sigBytes*8;return y[B>>>5]|=128<<24-B%32,y[(B+64>>>9<<4)+14]=Math.floor(u/4294967296),y[(B+64>>>9<<4)+15]=u,b.sigBytes=y.length*4,this._process(),this._hash},clone:function(){var b=a.clone.call(this);return b._hash=this._hash.clone(),b}});t.SHA1=a._createHelper(o),t.HmacSHA1=a._createHmacHelper(o)})(),e.SHA1})});var Ie=H((ee,We)=>{"use strict";(function(e,t){typeof ee=="object"?We.exports=ee=t(N()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(ee,function(e){(function(){var t=e,r=t.lib,n=r.Base,a=t.enc,c=a.Utf8,d=t.algo,o=d.HMAC=n.extend({init:function(b,y){b=this._hasher=new b.init,typeof y=="string"&&(y=c.parse(y));var u=b.blockSize,B=u*4;y.sigBytes>B&&(y=b.finalize(y)),y.clamp();for(var w=this._oKey=y.clone(),C=this._iKey=y.clone(),E=w.words,D=C.words,L=0;L<u;L++)E[L]^=1549556828,D[L]^=909522486;w.sigBytes=C.sigBytes=B,this.reset()},reset:function(){var b=this._hasher;b.reset(),b.update(this._iKey)},update:function(b){return this._hasher.update(b),this},finalize:function(b){var y=this._hasher,u=y.finalize(b);y.reset();var B=y.finalize(this._oKey.clone().concat(u));return B}})})()})});var Be=H((te,Ue)=>{"use strict";(function(e,t,r){typeof te=="object"?Ue.exports=te=t(N(),Ne(),Ie()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],t):t(e.CryptoJS)})(te,function(e){return(function(){var t=e,r=t.lib,n=r.Base,a=r.WordArray,c=t.algo,d=c.MD5,o=c.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:d,iterations:1}),init:function(b){this.cfg=this.cfg.extend(b)},compute:function(b,y){for(var u,B=this.cfg,w=B.hasher.create(),C=a.create(),E=C.words,D=B.keySize,L=B.iterations;E.length<D;){u&&w.update(u),u=w.update(b).finalize(y),w.reset();for(var i=1;i<L;i++)u=w.finalize(u),w.reset();C.concat(u)}return C.sigBytes=D*4,C}});t.EvpKDF=function(b,y,u){return o.create(u).compute(b,y)}})(),e.EvpKDF})});var ne=H((re,je)=>{"use strict";(function(e,t,r){typeof re=="object"?je.exports=re=t(N(),Be()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],t):t(e.CryptoJS)})(re,function(e){e.lib.Cipher||(function(t){var r=e,n=r.lib,a=n.Base,c=n.WordArray,d=n.BufferedBlockAlgorithm,o=r.enc,b=o.Utf8,y=o.Base64,u=r.algo,B=u.EvpKDF,w=n.Cipher=d.extend({cfg:a.extend(),createEncryptor:function(f,_){return this.create(this._ENC_XFORM_MODE,f,_)},createDecryptor:function(f,_){return this.create(this._DEC_XFORM_MODE,f,_)},init:function(f,_,S){this.cfg=this.cfg.extend(S),this._xformMode=f,this._key=_,this.reset()},reset:function(){d.reset.call(this),this._doReset()},process:function(f){return this._append(f),this._process()},finalize:function(f){f&&this._append(f);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function f(_){return typeof _=="string"?P:$}return function(_){return{encrypt:function(S,p,T){return f(p).encrypt(_,S,p,T)},decrypt:function(S,p,T){return f(p).decrypt(_,S,p,T)}}}})()}),C=n.StreamCipher=w.extend({_doFinalize:function(){var f=this._process(!0);return f},blockSize:1}),E=r.mode={},D=n.BlockCipherMode=a.extend({createEncryptor:function(f,_){return this.Encryptor.create(f,_)},createDecryptor:function(f,_){return this.Decryptor.create(f,_)},init:function(f,_){this._cipher=f,this._iv=_}}),L=E.CBC=(function(){var f=D.extend();f.Encryptor=f.extend({processBlock:function(S,p){var T=this._cipher,R=T.blockSize;_.call(this,S,p,R),T.encryptBlock(S,p),this._prevBlock=S.slice(p,p+R)}}),f.Decryptor=f.extend({processBlock:function(S,p){var T=this._cipher,R=T.blockSize,O=S.slice(p,p+R);T.decryptBlock(S,p),_.call(this,S,p,R),this._prevBlock=O}});function _(S,p,T){var R,O=this._iv;O?(R=O,this._iv=t):R=this._prevBlock;for(var M=0;M<T;M++)S[p+M]^=R[M]}return f})(),i=r.pad={},s=i.Pkcs7={pad:function(f,_){for(var S=_*4,p=S-f.sigBytes%S,T=p<<24|p<<16|p<<8|p,R=[],O=0;O<p;O+=4)R.push(T);var M=c.create(R,p);f.concat(M)},unpad:function(f){var _=f.words[f.sigBytes-1>>>2]&255;f.sigBytes-=_}},m=n.BlockCipher=w.extend({cfg:w.cfg.extend({mode:L,padding:s}),reset:function(){var f;w.reset.call(this);var _=this.cfg,S=_.iv,p=_.mode;this._xformMode==this._ENC_XFORM_MODE?f=p.createEncryptor:(f=p.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==f?this._mode.init(this,S&&S.words):(this._mode=f.call(p,this,S&&S.words),this._mode.__creator=f)},_doProcessBlock:function(f,_){this._mode.processBlock(f,_)},_doFinalize:function(){var f,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),f=this._process(!0)):(f=this._process(!0),_.unpad(f)),f},blockSize:128/32}),x=n.CipherParams=a.extend({init:function(f){this.mixIn(f)},toString:function(f){return(f||this.formatter).stringify(this)}}),k=r.format={},z=k.OpenSSL={stringify:function(f){var _,S=f.ciphertext,p=f.salt;return p?_=c.create([1398893684,1701076831]).concat(p).concat(S):_=S,_.toString(y)},parse:function(f){var _,S=y.parse(f),p=S.words;return p[0]==1398893684&&p[1]==1701076831&&(_=c.create(p.slice(2,4)),p.splice(0,4),S.sigBytes-=16),x.create({ciphertext:S,salt:_})}},$=n.SerializableCipher=a.extend({cfg:a.extend({format:z}),encrypt:function(f,_,S,p){p=this.cfg.extend(p);var T=f.createEncryptor(S,p),R=T.finalize(_),O=T.cfg;return x.create({ciphertext:R,key:S,iv:O.iv,algorithm:f,mode:O.mode,padding:O.padding,blockSize:f.blockSize,formatter:p.format})},decrypt:function(f,_,S,p){p=this.cfg.extend(p),_=this._parse(_,p.format);var T=f.createDecryptor(S,p).finalize(_.ciphertext);return T},_parse:function(f,_){return typeof f=="string"?_.parse(f,this):f}}),A=r.kdf={},F=A.OpenSSL={execute:function(f,_,S,p,T){if(p||(p=c.random(64/8)),T)var R=B.create({keySize:_+S,hasher:T}).compute(f,p);else var R=B.create({keySize:_+S}).compute(f,p);var O=c.create(R.words.slice(_),S*4);return R.sigBytes=_*4,x.create({key:R,iv:O,salt:p})}},P=n.PasswordBasedCipher=$.extend({cfg:$.cfg.extend({kdf:F}),encrypt:function(f,_,S,p){p=this.cfg.extend(p);var T=p.kdf.execute(S,f.keySize,f.ivSize,p.salt,p.hasher);p.iv=T.iv;var R=$.encrypt.call(this,f,_,T.key,p);return R.mixIn(T),R},decrypt:function(f,_,S,p){p=this.cfg.extend(p),_=this._parse(_,p.format);var T=p.kdf.execute(S,f.keySize,f.ivSize,_.salt,p.hasher);p.iv=T.iv;var R=$.decrypt.call(this,f,_,T.key,p);return R}})})()})});var Ke=H((ie,qe)=>{"use strict";(function(e,t,r){typeof ie=="object"?qe.exports=ie=t(N(),we(),Ce(),Be(),ne()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(ie,function(e){return(function(){var t=e,r=t.lib,n=r.BlockCipher,a=t.algo,c=[],d=[],o=[],b=[],y=[],u=[],B=[],w=[],C=[],E=[];(function(){for(var i=[],s=0;s<256;s++)s<128?i[s]=s<<1:i[s]=s<<1^283;for(var m=0,x=0,s=0;s<256;s++){var k=x^x<<1^x<<2^x<<3^x<<4;k=k>>>8^k&255^99,c[m]=k,d[k]=m;var z=i[m],$=i[z],A=i[$],F=i[k]*257^k*16843008;o[m]=F<<24|F>>>8,b[m]=F<<16|F>>>16,y[m]=F<<8|F>>>24,u[m]=F;var F=A*16843009^$*65537^z*257^m*16843008;B[k]=F<<24|F>>>8,w[k]=F<<16|F>>>16,C[k]=F<<8|F>>>24,E[k]=F,m?(m=z^i[i[i[A^z]]],x^=i[i[x]]):m=x=1}})();var D=[0,1,2,4,8,16,32,64,128,27,54],L=a.AES=n.extend({_doReset:function(){var i;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var s=this._keyPriorReset=this._key,m=s.words,x=s.sigBytes/4,k=this._nRounds=x+6,z=(k+1)*4,$=this._keySchedule=[],A=0;A<z;A++)A<x?$[A]=m[A]:(i=$[A-1],A%x?x>6&&A%x==4&&(i=c[i>>>24]<<24|c[i>>>16&255]<<16|c[i>>>8&255]<<8|c[i&255]):(i=i<<8|i>>>24,i=c[i>>>24]<<24|c[i>>>16&255]<<16|c[i>>>8&255]<<8|c[i&255],i^=D[A/x|0]<<24),$[A]=$[A-x]^i);for(var F=this._invKeySchedule=[],P=0;P<z;P++){var A=z-P;if(P%4)var i=$[A];else var i=$[A-4];P<4||A<=4?F[P]=i:F[P]=B[c[i>>>24]]^w[c[i>>>16&255]]^C[c[i>>>8&255]]^E[c[i&255]]}}},encryptBlock:function(i,s){this._doCryptBlock(i,s,this._keySchedule,o,b,y,u,c)},decryptBlock:function(i,s){var m=i[s+1];i[s+1]=i[s+3],i[s+3]=m,this._doCryptBlock(i,s,this._invKeySchedule,B,w,C,E,d);var m=i[s+1];i[s+1]=i[s+3],i[s+3]=m},_doCryptBlock:function(i,s,m,x,k,z,$,A){for(var F=this._nRounds,P=i[s]^m[0],f=i[s+1]^m[1],_=i[s+2]^m[2],S=i[s+3]^m[3],p=4,T=1;T<F;T++){var R=x[P>>>24]^k[f>>>16&255]^z[_>>>8&255]^$[S&255]^m[p++],O=x[f>>>24]^k[_>>>16&255]^z[S>>>8&255]^$[P&255]^m[p++],M=x[_>>>24]^k[S>>>16&255]^z[P>>>8&255]^$[f&255]^m[p++],l=x[S>>>24]^k[P>>>16&255]^z[f>>>8&255]^$[_&255]^m[p++];P=R,f=O,_=M,S=l}var R=(A[P>>>24]<<24|A[f>>>16&255]<<16|A[_>>>8&255]<<8|A[S&255])^m[p++],O=(A[f>>>24]<<24|A[_>>>16&255]<<16|A[S>>>8&255]<<8|A[P&255])^m[p++],M=(A[_>>>24]<<24|A[S>>>16&255]<<16|A[P>>>8&255]<<8|A[f&255])^m[p++],l=(A[S>>>24]<<24|A[P>>>16&255]<<16|A[f>>>8&255]<<8|A[_&255])^m[p++];i[s]=R,i[s+1]=O,i[s+2]=M,i[s+3]=l},keySize:256/32});t.AES=n._createHelper(L)})(),e.AES})});var Je=H((oe,Ze)=>{"use strict";(function(e,t){typeof oe=="object"?Ze.exports=oe=t(N()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(oe,function(e){return e.enc.Utf8})});var Ge=H((se,Ve)=>{"use strict";(function(e,t,r){typeof se=="object"?Ve.exports=se=t(N(),ne()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(se,function(e){return e.pad.Pkcs7})});var Qe=H((ae,Ye)=>{"use strict";(function(e,t,r){typeof ae=="object"?Ye.exports=ae=t(N(),ne()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(ae,function(e){return e.mode.CTR=(function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(n,a){var c=this._cipher,d=c.blockSize,o=this._iv,b=this._counter;o&&(b=this._counter=o.slice(0),this._iv=void 0);var y=b.slice(0);c.encryptBlock(y,0),b[d-1]=b[d-1]+1|0;for(var u=0;u<d;u++)n[a+u]^=y[u]}});return t.Decryptor=r,t})(),e.mode.CTR})});import{titleCase as bt}from"title-case";import{camelCase as wt,kebabCase as Ct,upperFirst as Bt}from"lodash-es";function Et(e){return Bt(wt(e))}function St(e){if(!e)return"";let t=Ct(e),r=e.replace(/[^A-Z0-9]/gi,"");if(r.length===t.replace(/-/g,"").length){let n=0,a="";for(let c=0;c<t.length;c+=1){let d=t[c];if(d==="-"){let o=t[c-1],b=t[c+1],y=r[n],u=y&&y.toUpperCase()===y&&y.toLowerCase()!==y,B=c+1===t.length-1;if(o&&b&&/[a-z0-9]/.test(o)&&/[a-z0-9]/.test(b)&&(!/\d/.test(o)&&/\d/.test(b)||/\d/.test(o)&&!/\d/.test(b)&&!u||/\d/.test(o)&&!/\d/.test(b)&&u&&B))continue;a+=d}else a+=d,n+=1}t=a}return t}import{isPlainObject as Ot,mergeWith as Mt,isArray as Re,isEqual as Fe,intersectionWith as Ht,unionWith as Nt}from"lodash-es";import{pathToRegexp as At,compile as Lt}from"path-to-regexp";var K={mobile:/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,tel:/^(?:(?:\d{3}-)?\d{8}|(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,numAndLetter:/^[A-Z0-9]+$/i,password:/^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S+$/,email:/^[A-Z0-9._%+-\u4E00-\u9FA5]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,postalCode:/^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/,identityCard:/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}[\dX]$/i,ip:/^((\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])(?::(?:\d|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$/,url:/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-][^!@#$%^&*?.\s]{0,64}\.)+[a-z]{2,6}\/?/,httpsUrl:/^https:\/\//,domain:/^([0-9a-z-]+\.)+([a-z]{2,})$/i,plateNumber:/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/,md5:/^[a-f0-9]{32}$/i,base64:/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([\w!$&',()*+;=\-.~:@/?%\s]*?)\s*$/i,uuid:/^[a-f\d]{4}(?:[a-f\d]{4}-){4}[a-f\d]{12}$/i,version:/^\d+(?:\.\d+){2}$/,videoUrl:/^https?:\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/i,imageUrl:/^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i,chinese:/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/,itcode:/^[a-z]+\d*$/i,numeric:/^\d+$/};var kt=Object.prototype.toString;function De(e,t){return kt.call(e)===`[object ${t}]`}function J(e){return e!==null&&De(e,"Object")}function zt(e){return K.url.test(e)}function he(e){return Array.isArray(e)&&e.length>0}function Tt(e){return Number.isInteger(e)&&e>=0}function Dt(e){return K.numeric.test(e)}var V=typeof window=="undefined",ve=!V,ge=ve&&window.navigator.userAgent.toLowerCase().includes("chrome"),ye=ve&&window.navigator.userAgent.toLowerCase().includes("safari"),me=typeof window!="undefined"&&typeof document!="undefined",Rt=me&&"webkitLineClamp"in document.body.style,Ft=me&&typeof ResizeObserver!="undefined",$t=e=>K.chinese.test(e),Pt=()=>"startViewTransition"in document&&window.matchMedia("(prefers-reduced-motion: no-preference)").matches;var Wt=(e,t)=>{let r=e;return r.install=n=>{n.component(r.name||r.displayName,e),t&&(n.config.globalProperties[t]=e)},e};function It(e){if(!e)return e;let n=e,{matched:t}=n,r=Te(n,["matched"]);return U(W({},r),{matched:t?t.map(a=>({meta:a.meta,name:a.name,path:a.path})):void 0})}function xe(e,t={}){let{target:r="__blank",noopener:n=!0,noreferrer:a=!0}=t||{},c=[];n&&c.push("noopener=yes"),a&&c.push("noreferrer=yes"),window.open(e,r,c.join(","))}function $e(e,t,r="replace"){return t?e?Mt(e,t,(n,a)=>{if(Re(a)&&Re(n))switch(r){case"union":return Nt(n,a,Fe);case"intersection":return Ht(n,a,Fe);case"concat":return n.concat(a);case"replace":return a;default:throw new Error(`Unknown merge array strategy: ${r}`)}if(J(a)&&J(n))return $e(n,a,r)}):t:e}function Ut(e,t){if(!he(Object.keys(t)))return e;let r="";for(let n in t){let a=t[n];Array.isArray(a)?r+=`${n}=${encodeURIComponent(a.join(","))}&`:r+=`${n}=${encodeURIComponent(a)}&`}return r=r.replace(/&$/,""),/\?$/.test(e)?e+r:e.replace(/\/?$/,"?")+r}function jt(e){Ot(e)&&Object.keys(e).forEach(t=>{Reflect.deleteProperty(e,t)})}function qt(e){return["$","(",")","*","+",".","[","]","?","\\","^","{","}","|"].includes(e)?`\\${e}`:e}function Kt(e){let r=["",...[...e].map(n=>qt(n)),""].join(".*");return new RegExp(r,"i")}function Zt(e="",t={}){let{size:r=14,family:n=getComputedStyle(document.documentElement).getPropertyValue("--vxe-font-family")||"sans-serif"}=t,c=document.createElement("canvas").getContext("2d");c.font=`${r}px ${n}`;let d=c.measureText(e),o=Math.abs(d.actualBoundingBoxLeft)+Math.abs(d.actualBoundingBoxRight);return Math.ceil(Math.max(d.width,o))}function _e(e,t){return t?typeof t=="string"?` ${e}--${t}`:Array.isArray(t)?t.reduce((r,n)=>r+_e(e,n),""):Object.keys(t).reduce((r,n)=>r+(t[n]?_e(e,n):""),""):""}function be(e){return(t,r)=>(t&&typeof t!="string"&&(r=t,t=""),t=t?`${e}__${t}`:e,`${t}${_e(t,r)}`)}function Jt(e,t=""){return[be(`${t}-${e}`)]}function Vt(e,t=""){let r=`${t}-${e}`;return[r,be(r)]}var ce=j(Ke(),1),I=j(Je(),1),Xe=j(Ge(),1),et=j(Qe(),1),tt=j(Ce(),1),Se=j(we(),1);var Ee=class{constructor({key:t,iv:r}){pe(this,"key");pe(this,"iv");this.key=(0,I.parse)(t),this.iv=(0,I.parse)(r)}get getOptions(){return{mode:et.default,padding:Xe.default,iv:this.iv}}encryptByAES(t){return(0,ce.encrypt)(t,this.key,this.getOptions).toString()}decryptByAES(t){return(0,ce.decrypt)(t,this.key,this.getOptions).toString(I.default)}};function Gt(e){return I.default.parse(e).toString(Se.default)}function Yt(e){return Se.default.parse(e).toString(I.default)}function Qt(e){return(0,tt.default)(e).toString()}import{upperFirst as Xt}from"lodash-es";var er=()=>document.documentElement;function rt(e){return!e||!e.getBoundingClientRect?0:e.getBoundingClientRect()}function tr(e){return(e||"").replace(/^\s+|\s+$/g,"")}function Ae(e,t){if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):` ${e.className} `.includes(` ${t} `)}function rr(e,t,r){return r||(r=er()),r.style.setProperty(e,t),{prop:t}}function nr(e,t){if(!e)return;let r=e.className,n=(t||"").split(" ");for(let a=0,c=n.length;a<c;a++){let d=n[a];d&&(e.classList?e.classList.add(d):Ae(e,d)||(r+=` ${d}`))}e.classList||(e.className=r)}function ir(e,t){if(!e||!t)return;let r=t.split(" "),n=` ${e.className} `;for(let a=0,c=r.length;a<c;a++){let d=r[a];d&&(e.classList?e.classList.remove(d):Ae(e,d)&&(n=n.replace(` ${d} `," ")))}e.classList||(e.className=tr(n))}function or(e){let t=document.documentElement,r=t.scrollLeft,n=t.scrollTop,a=t.clientLeft,c=t.clientTop,d=window.scrollX,o=window.scrollY,b=rt(e);if(!b)return{};let{left:y,top:u,width:B,height:w}=b,C=(d||r)-(a||0),E=(o||n)-(c||0),D=y+d,L=u+o,i=D-C,s=L-E,m=window.document.documentElement.clientWidth,x=window.document.documentElement.clientHeight;return{left:i,top:s,right:m-B-i,bottom:x-w-s,rightIncludeBody:m-i,bottomIncludeBody:x-s}}function sr(e,t){let r=["webkit","Moz","ms","OT"],n={};return r.forEach(a=>{n[`${a}${Xt(e)}`]=t}),U(W({},n),{[e]:t})}function ar(e,t,r){e&&t&&r&&e.addEventListener(t,r,!1)}function cr(e,t,r){e&&t&&r&&e.removeEventListener(t,r,!1)}function fr(e){let t=!1;return function(...r){t||(t=!0,window.requestAnimationFrame(()=>{e.apply(this,r),t=!1}))}}import nt from"resize-observer-polyfill";function dr(e){for(let t of e){let r=t.target.__resizeListeners__||[];r.length&&r.forEach(n=>{n()})}}function ur(e,t){V||(e.__resizeListeners__||(e.__resizeListeners__=[],e.__ro__=new nt(dr),e.__ro__.observe(e)),e.__resizeListeners__.push(t))}function lr(e,t){!e||!e.__resizeListeners__||(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.__ro__.disconnect(),e.__ro__=null,e.__resizeListeners__=null))}function pr(){let e=new Event("resize",{bubbles:!0,cancelable:!0});window.dispatchEvent(e)}function hr(e,t={}){function r(n){let a=window.history[n];return function(...c){let d=new Event(n);return d.arguments=c,window.dispatchEvent(d),a.apply(this,c)}}return window.history.pushState=r("pushState"),window.history.replaceState=r("replaceState"),window.addEventListener("popstate",e,t),window.addEventListener("hashchange",e,t),window.addEventListener("replaceState",e,t),window.addEventListener("pushState",e,t),{removeListener:()=>{window.removeEventListener("popstate",e,t),window.removeEventListener("hashchange",e,t),window.removeEventListener("replaceState",e,t),window.removeEventListener("pushState",e,t)}}}import{round as vr,isNil as gr}from"lodash-es";function it(e){let t=e.split(","),n=t[0].match(/:(.*?);/)[1],a=window.atob(t[1]),c=a.length,d=new Uint8Array(c);for(;c--;)d[c]=a.charCodeAt(c);return new Blob([d],{type:n})}function ot(e,t){return new Promise((r,n)=>{let a=document.createElement("CANVAS"),c=a==null?void 0:a.getContext("2d"),d=new Image;d.crossOrigin="",d.onload=function(){if(!a||!c)return n();a.height=d.height,a.width=d.width,c.drawImage(d,0,0);let o=a.toDataURL(t||"image/png");a=null,r(o)},d.src=e})}function yr(e){let{loaded:t,total:r}=e;if(r<=0||gr(r))return 0;let n=t/r;return vr((n>1?1:n)*100)}function mr(e,t,r,n){ot(e).then(a=>{st(a,t,r,n)})}function st(e,t,r,n){let a=it(e);at(a,t,r,n)}function at(e,t,r,n){let a=typeof n!="undefined"?[n,e]:[e],c=new Blob(a,{type:r||"application/octet-stream"}),d=window.URL.createObjectURL(c),o=document.createElement("a");o.style.display="none",o.href=d,o.setAttribute("download",t),typeof o.download=="undefined"&&o.setAttribute("target","_blank"),document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(d)}function xr({url:e,target:t="_blank",fileName:r}){if(/iP/.test(window.navigator.userAgent))return!1;if(ge||ye){let n=document.createElement("a");return n.href=e,n.download=r||e.substring(e.lastIndexOf("/")+1,e.length),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n),!0}return e.includes("?")||(e+="?download"),xe(e,{target:t}),!0}import{isFunction as _r}from"lodash-es";function ct(e,t="default",r){if(!e||!Reflect.has(e,t)||!_r(e[t]))return null;let n=e[t];return n?n(r):null}function br(e,t=[]){let r=Object.keys(e),n={};return r.forEach(a=>{if(t.includes(a))return null;n[a]=c=>ct(e,a,c)}),n}function wr(e,{type:t="text/javascript"}={}){return new Promise((r,n)=>{let a=!1,c=document.querySelector(`script[src="${e}"]`);if(!c)c=document.createElement("script"),c.type=t,c.async=!0,c.src=e,a=!0;else if(c.hasAttribute("data-loaded")){r({el:c});return}c.addEventListener("error",n),c.addEventListener("abort",n),c.addEventListener("load",()=>{c.setAttribute("data-loaded","true"),r({el:c})}),a&&document.head.appendChild(c)})}function Cr(e){return new Promise((t,r)=>{let n=document.querySelector(`script[src="${e}"]`);if(!n){r();return}document.head.removeChild(n),t()})}function Br(e,t,r){return ut(e,t,r,!1)}function Er(e,t,r){return ut(e,t,r,!0).length>0}function dt(e){return typeof e!="string"?e:e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Le=new Map;function ft(e,t){if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(r=>{if(typeof r!="string"){if(typeof r=="undefined")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})}function Sr(e,t){t=W({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(Le.has(r))return Le.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=dt(e).replace(/\\\*/g,"[\\s\\S]*");let a=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return a.negated=n,Le.set(r,a),a}function ut(e,t,r,n){if(e=ft(e,"inputs"),t=ft(t,"patterns"),t.length===0)return[];let a=t.map(o=>Sr(o,r)),{allPatterns:c}=r||{},d=[];for(let o of e){let b,y=a.map(()=>!1);for(let[u,B]of a.entries())if(B.test(o)&&(y[u]=!0,b=!B.negated,!b))break;if(!(b===!1||b===void 0&&a.some(u=>!u.negated)||c&&y.some((u,B)=>!u&&!a[B].negated))&&(d.push(o),n))break}return d}var Ar={id:"id",children:"children",pid:"pid"},q=e=>Object.assign({},Ar,e);function Lr(e,t,r={}){r=q(r);let{children:n}=r,a=[...e];for(let c of a){if(t(c))return c;c[n]&&a.push(...c[n])}return null}function kr(e,t,r={}){r=q(r);let{children:n}=r,a=[...e],c=[];for(let d of a)t(d)&&c.push(d),d[n]&&a.push(...d[n]);return c}function zr(e,t,r={}){r=q(r);let n=[],a=[...e],c=new Set,{children:d}=r;for(;a.length;){let o=a[0];if(c.has(o))n.pop(),a.shift();else if(c.add(o),o[d]&&a.unshift(...o[d]),n.push(o),t(o))return n}return null}function Tr(e,t,r={}){r=q(r);let n=[],a=[...e],c=[],d=new Set,{children:o}=r;for(;a.length;){let b=a[0];d.has(b)?(n.pop(),a.shift()):(d.add(b),b[o]&&a.unshift(...b[o]),n.push(b),t(b)&&c.push([...n]))}return c}function Dr(e,t,r={}){r=q(r);let n=r.children;function a(c){return c.map(d=>W({},d)).filter(d=>(d[n]=d[n]&&a(d[n]),t(d)||d[n]&&d[n].length))}return a(e)}function Rr(e,t,r={}){r=q(r);let n=[...e],{children:a}=r;for(let c=0;c<n.length;c++){if(t(n[c]))return;a&&n[c][a]&&n.splice(c+1,0,...n[c][a])}}function Fr(e,t){return e.map(r=>ke(r,t))}function ke(e,{children:t="children",conversion:r}){let n=Array.isArray(e[t])&&e[t].length>0,a=r(e)||{};return n?U(W({},a),{[t]:e[t].map(c=>ke(c,{children:t,conversion:r}))}):W({},a)}import{v4 as lt}from"uuid";function $r({native:e=!0}={}){var t,r,n;return e?(n=(r=(t=window.crypto)==null?void 0:t.randomUUID)==null?void 0:r.call(t))!=null?n:lt():lt()}var pt=0;function Pr(e=""){let t=Date.now(),r=Math.floor(Math.random()*1e9);return pt++,`${e}_${r}${pt}${String(t)}`}export{Ee as AesEncryption,nt as ResizeObserver,nr as addClass,hr as addLocationListener,ur as addResizeListener,be as buildBEM,Pr as buildShortUUID,$r as buildUUID,Jt as createBEM,Vt as createNamespace,Kt as createSearchReg,it as dataURLtoBlob,Yt as decodeByBase64,$e as deepMerge,cr as domOffEvent,ar as domOnEvent,st as downloadByBase64,at as downloadByData,mr as downloadByOnlineUrl,xr as downloadByUrl,yr as downloadPercent,Pt as enableTransitions,Gt as encryptByBase64,Qt as encryptByMd5,dt as escapeStringRegexp,br as extendSlots,Dr as filterTree,Lr as findNode,kr as findNodeAll,zr as findPath,Tr as findPathAll,Rr as forEachTree,Zt as getActualWidthOfChars,rt as getBoundingClientRect,It as getRawRoute,ct as getSlot,or as getViewportOffset,sr as hackCss,Ae as hasClass,De as is,me as isBrowser,$t as isChineseText,ge as isChrome,ve as isClient,he as isIterableArray,Er as isMatch,Dt as isNumeric,J as isObject,Tt as isPositiveInteger,ye as isSafari,V as isServer,Rt as isSupportNativeEllipsis,Ft as isSupportResizeObserver,zt as isUrl,wr as loadScript,Br as matcher,xe as openWindow,Et as pascalCase,At as pathToRegexp,K as regexpMap,Lt as regexpToPath,ir as removeClass,lr as removeResizeListener,St as safeKebabCase,rr as setCssVar,Ut as setObjToUrlParams,bt as titleCase,Fr as treeMap,ke as treeMapEach,pr as triggerWindowResize,Cr as unloadScript,jt as unsetAllProperty,ot as urlToBase64,fr as useRafThrottle,Wt as withInstall};
14
+ import{titleCase as e}from"title-case";import{camelCase as t,intersectionWith as n,isArray as r,isEqual as i,isFunction as a,isNil as o,isPlainObject as s,kebabCase as c,mergeWith as l,round as u,unionWith as d,upperFirst as f}from"lodash-es";import{compile as p,pathToRegexp as m}from"path-to-regexp";import{decrypt as h,encrypt as g}from"crypto-js/aes.js";import _,{parse as v}from"crypto-js/enc-utf8.js";import y from"crypto-js/pad-pkcs7.js";import b from"crypto-js/mode-ctr.js";import ee from"crypto-js/md5.js";import x from"crypto-js/enc-base64.js";import S from"resize-observer-polyfill";import{v4 as C}from"uuid";function te(e){return f(t(e))}function ne(e){if(!e)return``;let t=c(e),n=e.replace(/[^A-Z0-9]/gi,``);if(n.length===t.replace(/-/g,``).length){let e=0,r=``;for(let i=0;i<t.length;i+=1){let a=t[i];if(a===`-`){let o=t[i-1],s=t[i+1],c=n[e],l=c&&c.toUpperCase()===c&&c.toLowerCase()!==c,u=i+1===t.length-1;if(o&&s&&/[a-z0-9]/.test(o)&&/[a-z0-9]/.test(s)&&(!/\d/.test(o)&&/\d/.test(s)||/\d/.test(o)&&!/\d/.test(s)&&!l||/\d/.test(o)&&!/\d/.test(s)&&l&&u))continue;r+=a}else r+=a,e+=1}t=r}return t}const w={mobile:/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,tel:/^(?:(?:\d{3}-)?\d{8}|(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,numAndLetter:/^[A-Z0-9]+$/i,password:/^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S+$/,email:/^[A-Z0-9._%+-\u4E00-\u9FA5]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,postalCode:/^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/,identityCard:/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}[\dX]$/i,ip:/^((\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])(?::(?:\d|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$/,url:/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-][^!@#$%^&*?.\s]{0,64}\.)+[a-z]{2,6}\/?/,httpsUrl:/^https:\/\//,domain:/^([0-9a-z-]+\.)+([a-z]{2,})$/i,plateNumber:/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/,md5:/^[a-f0-9]{32}$/i,base64:/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([\w!$&',()*+;=\-.~:@/?%\s]*?)\s*$/i,uuid:/^[a-f\d]{4}(?:[a-f\d]{4}-){4}[a-f\d]{12}$/i,version:/^\d+(?:\.\d+){2}$/,videoUrl:/^https?:\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/i,imageUrl:/^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i,chinese:/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/,itcode:/^[a-z]+\d*$/i,numeric:/^\d+$/},re=Object.prototype.toString;function T(e,t){return re.call(e)===`[object ${t}]`}function E(e){return e!==null&&T(e,`Object`)}function ie(e){return w.url.test(e)}function D(e){return Array.isArray(e)&&e.length>0}function ae(e){return Number.isInteger(e)&&e>=0}function oe(e){return w.numeric.test(e)}const O=typeof window>`u`,k=!O,A=k&&window.navigator.userAgent.toLowerCase().includes(`chrome`),j=k&&window.navigator.userAgent.toLowerCase().includes(`safari`),M=typeof window<`u`&&typeof document<`u`,se=M&&`webkitLineClamp`in document.body.style,ce=M&&typeof ResizeObserver<`u`,le=e=>w.chinese.test(e),ue=()=>`startViewTransition`in document&&window.matchMedia(`(prefers-reduced-motion: no-preference)`).matches;function de(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function fe(e,t){if(e==null)return{};var n,r,i=de(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function N(e){"@babel/helpers - typeof";return N=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},N(e)}function pe(e,t){if(N(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(N(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function me(e){var t=pe(e,`string`);return N(t)==`symbol`?t:t+``}function P(e,t,n){return(t=me(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?F(Object(n),!0).forEach(function(t){P(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const he=[`matched`],ge=(e,t)=>{let n=e;return n.install=r=>{r.component(n.name||n.displayName,e),t&&(r.config.globalProperties[t]=e)},e};function _e(e){if(!e)return e;let{matched:t}=e;return I(I({},fe(e,he)),{},{matched:t?t.map(e=>({meta:e.meta,name:e.name,path:e.path})):void 0})}function L(e,t={}){let{target:n=`__blank`,noopener:r=!0,noreferrer:i=!0}=t||{},a=[];r&&a.push(`noopener=yes`),i&&a.push(`noreferrer=yes`),window.open(e,n,a.join(`,`))}function R(e,t,a=`replace`){return t?e?l(e,t,(e,t)=>{if(r(t)&&r(e))switch(a){case`union`:return d(e,t,i);case`intersection`:return n(e,t,i);case`concat`:return e.concat(t);case`replace`:return t;default:throw Error(`Unknown merge array strategy: ${a}`)}if(E(t)&&E(e))return R(e,t,a)}):t:e}function ve(e,t){if(!D(Object.keys(t)))return e;let n=``;for(let e in t){let r=t[e];Array.isArray(r)?n+=`${e}=${encodeURIComponent(r.join(`,`))}&`:n+=`${e}=${encodeURIComponent(r)}&`}return n=n.replace(/&$/,``),/\?$/.test(e)?e+n:e.replace(/\/?$/,`?`)+n}function ye(e){s(e)&&Object.keys(e).forEach(t=>{Reflect.deleteProperty(e,t)})}function be(e){return[`$`,`(`,`)`,`*`,`+`,`.`,`[`,`]`,`?`,`\\`,`^`,`{`,`}`,`|`].includes(e)?`\\${e}`:e}function xe(e){let t=[``,...[...e].map(e=>be(e)),``].join(`.*`);return new RegExp(t,`i`)}function Se(e=``,t={}){let{size:n=14,family:r=getComputedStyle(document.documentElement).getPropertyValue(`--vxe-font-family`)||`sans-serif`}=t,i=document.createElement(`canvas`).getContext(`2d`);i.font=`${n}px ${r}`;let a=i.measureText(e),o=Math.abs(a.actualBoundingBoxLeft)+Math.abs(a.actualBoundingBoxRight);return Math.ceil(Math.max(a.width,o))}function z(e,t){return t?typeof t==`string`?` ${e}--${t}`:Array.isArray(t)?t.reduce((t,n)=>t+z(e,n),``):Object.keys(t).reduce((n,r)=>n+(t[r]?z(e,r):``),``):``}function B(e){return(t,n)=>(t&&typeof t!=`string`&&(n=t,t=``),t=t?`${e}__${t}`:e,`${t}${z(t,n)}`)}function Ce(e,t=``){return[B(`${t}-${e}`)]}function we(e,t=``){let n=`${t}-${e}`;return[n,B(n)]}var Te=class{constructor({key:e,iv:t}){P(this,`key`,void 0),P(this,`iv`,void 0),this.key=v(e),this.iv=v(t)}get getOptions(){return{mode:b,padding:y,iv:this.iv}}encryptByAES(e){return g(e,this.key,this.getOptions).toString()}decryptByAES(e){return h(e,this.key,this.getOptions).toString(_)}};function Ee(e){return _.parse(e).toString(x)}function De(e){return x.parse(e).toString(_)}function Oe(e){return ee(e).toString()}const ke=()=>document.documentElement;function V(e){return!e||!e.getBoundingClientRect?0:e.getBoundingClientRect()}function Ae(e){return(e||``).replace(/^\s+|\s+$/g,``)}function H(e,t){if(!e||!t)return!1;if(t.includes(` `))throw Error(`className should not contain space.`);return e.classList?e.classList.contains(t):` ${e.className} `.includes(` ${t} `)}function je(e,t,n){return n||(n=ke()),n.style.setProperty(e,t),{prop:t}}function Me(e,t){if(!e)return;let n=e.className,r=(t||``).split(` `);for(let t=0,i=r.length;t<i;t++){let i=r[t];i&&(e.classList?e.classList.add(i):H(e,i)||(n+=` ${i}`))}e.classList||(e.className=n)}function Ne(e,t){if(!e||!t)return;let n=t.split(` `),r=` ${e.className} `;for(let t=0,i=n.length;t<i;t++){let i=n[t];i&&(e.classList?e.classList.remove(i):H(e,i)&&(r=r.replace(` ${i} `,` `)))}e.classList||(e.className=Ae(r))}function Pe(e){let t=document.documentElement,n=t.scrollLeft,r=t.scrollTop,i=t.clientLeft,a=t.clientTop,o=window.scrollX,s=window.scrollY,c=V(e);if(!c)return{};let{left:l,top:u,width:d,height:f}=c,p=(o||n)-(i||0),m=(s||r)-(a||0),h=l+o,g=u+s,_=h-p,v=g-m,y=window.document.documentElement.clientWidth,b=window.document.documentElement.clientHeight;return{left:_,top:v,right:y-d-_,bottom:b-f-v,rightIncludeBody:y-_,bottomIncludeBody:b-v}}function Fe(e,t){let n=[`webkit`,`Moz`,`ms`,`OT`],r={};return n.forEach(n=>{r[`${n}${f(e)}`]=t}),I(I({},r),{},{[e]:t})}function Ie(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}function Le(e,t,n){e&&t&&n&&e.removeEventListener(t,n,!1)}function Re(e){let t=!1;return function(...n){t||(t=!0,window.requestAnimationFrame(()=>{e.apply(this,n),t=!1}))}}function ze(e){for(let t of e){let e=t.target.__resizeListeners__||[];e.length&&e.forEach(e=>{e()})}}function Be(e,t){O||(e.__resizeListeners__||(e.__resizeListeners__=[],e.__ro__=new S(ze),e.__ro__.observe(e)),e.__resizeListeners__.push(t))}function Ve(e,t){!e||!e.__resizeListeners__||(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.__ro__.disconnect(),e.__ro__=null,e.__resizeListeners__=null))}function He(){let e=new Event(`resize`,{bubbles:!0,cancelable:!0});window.dispatchEvent(e)}function Ue(e,t={}){function n(e){let t=window.history[e];return function(...n){let r=new Event(e);return r.arguments=n,window.dispatchEvent(r),t.apply(this,n)}}return window.history.pushState=n(`pushState`),window.history.replaceState=n(`replaceState`),window.addEventListener(`popstate`,e,t),window.addEventListener(`hashchange`,e,t),window.addEventListener(`replaceState`,e,t),window.addEventListener(`pushState`,e,t),{removeListener:()=>{window.removeEventListener(`popstate`,e,t),window.removeEventListener(`hashchange`,e,t),window.removeEventListener(`replaceState`,e,t),window.removeEventListener(`pushState`,e,t)}}}function U(e){let t=e.split(`,`),n=t[0].match(/:(.*?);/)[1],r=window.atob(t[1]),i=r.length,a=new Uint8Array(i);for(;i--;)a[i]=r.charCodeAt(i);return new Blob([a],{type:n})}function W(e,t){return new Promise((n,r)=>{let i=document.createElement(`CANVAS`),a=i==null?void 0:i.getContext(`2d`),o=new Image;o.crossOrigin=``,o.onload=function(){if(!i||!a)return r();i.height=o.height,i.width=o.width,a.drawImage(o,0,0);let e=i.toDataURL(t||`image/png`);i=null,n(e)},o.src=e})}function We(e){let{loaded:t,total:n}=e;if(n<=0||o(n))return 0;let r=t/n;return u((r>1?1:r)*100)}function Ge(e,t,n,r){W(e).then(e=>{G(e,t,n,r)})}function G(e,t,n,r){K(U(e),t,n,r)}function K(e,t,n,r){let i=new Blob(r===void 0?[e]:[r,e],{type:n||`application/octet-stream`}),a=window.URL.createObjectURL(i),o=document.createElement(`a`);o.style.display=`none`,o.href=a,o.setAttribute(`download`,t),o.download===void 0&&o.setAttribute(`target`,`_blank`),document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(a)}function Ke({url:e,target:t=`_blank`,fileName:n}){if(/iP/.test(window.navigator.userAgent))return!1;if(A||j){let t=document.createElement(`a`);return t.href=e,t.download=n||e.substring(e.lastIndexOf(`/`)+1,e.length),t.style.display=`none`,document.body.appendChild(t),t.click(),document.body.removeChild(t),!0}return e.includes(`?`)||(e+=`?download`),L(e,{target:t}),!0}function q(e,t=`default`,n){if(!e||!Reflect.has(e,t)||!a(e[t]))return null;let r=e[t];return r?r(n):null}function qe(e,t=[]){let n=Object.keys(e),r={};return n.forEach(n=>{if(t.includes(n))return null;r[n]=t=>q(e,n,t)}),r}function Je(e,{type:t=`text/javascript`}={}){return new Promise((n,r)=>{let i=!1,a=document.querySelector(`script[src="${e}"]`);if(!a)a=document.createElement(`script`),a.type=t,a.async=!0,a.src=e,i=!0;else if(a.hasAttribute(`data-loaded`)){n({el:a});return}a.addEventListener(`error`,r),a.addEventListener(`abort`,r),a.addEventListener(`load`,()=>{a.setAttribute(`data-loaded`,`true`),n({el:a})}),i&&document.head.appendChild(a)})}function Ye(e){return new Promise((t,n)=>{let r=document.querySelector(`script[src="${e}"]`);if(!r){n();return}document.head.removeChild(r),t()})}function Xe(e,t,n){return Z(e,t,n,!1)}function Ze(e,t,n){return Z(e,t,n,!0).length>0}function J(e){return typeof e==`string`?e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`):e}const Y=new Map;function X(e,t){if(!Array.isArray(e))switch(typeof e){case`string`:e=[e];break;case`undefined`:e=[];break;default:throw TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(e=>{if(typeof e!=`string`){if(e===void 0)return!1;throw TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof e}' in the array`)}return!0})}function Qe(e,t){t=I({caseSensitive:!1},t);let n=e+JSON.stringify(t);if(Y.has(n))return Y.get(n);let r=e[0]===`!`;r&&(e=e.slice(1)),e=J(e).replace(/\\\*/g,`[\\s\\S]*`);let i=RegExp(`^${e}$`,t.caseSensitive?``:`i`);return i.negated=r,Y.set(n,i),i}function Z(e,t,n,r){if(e=X(e,`inputs`),t=X(t,`patterns`),t.length===0)return[];let i=t.map(e=>Qe(e,n)),{allPatterns:a}=n||{},o=[];for(let t of e){let e,n=i.map(()=>!1);for(let[r,a]of i.entries())if(a.test(t)&&(n[r]=!0,e=!a.negated,!e))break;if(!(e===!1||e===void 0&&i.some(e=>!e.negated)||a&&n.some((e,t)=>!e&&!i[t].negated))&&(o.push(t),r))break}return o}const $e={id:`id`,children:`children`,pid:`pid`},Q=e=>Object.assign({},$e,e);function et(e,t,n={}){n=Q(n);let{children:r}=n,i=[...e];for(let e of i){if(t(e))return e;e[r]&&i.push(...e[r])}return null}function tt(e,t,n={}){n=Q(n);let{children:r}=n,i=[...e],a=[];for(let e of i)t(e)&&a.push(e),e[r]&&i.push(...e[r]);return a}function nt(e,t,n={}){n=Q(n);let r=[],i=[...e],a=new Set,{children:o}=n;for(;i.length;){let e=i[0];if(a.has(e))r.pop(),i.shift();else if(a.add(e),e[o]&&i.unshift(...e[o]),r.push(e),t(e))return r}return null}function rt(e,t,n={}){n=Q(n);let r=[],i=[...e],a=[],o=new Set,{children:s}=n;for(;i.length;){let e=i[0];o.has(e)?(r.pop(),i.shift()):(o.add(e),e[s]&&i.unshift(...e[s]),r.push(e),t(e)&&a.push([...r]))}return a}function it(e,t,n={}){n=Q(n);let r=n.children;function i(e){return e.map(e=>I({},e)).filter(e=>(e[r]=e[r]&&i(e[r]),t(e)||e[r]&&e[r].length))}return i(e)}function at(e,t,n={}){n=Q(n);let r=[...e],{children:i}=n;for(let e=0;e<r.length;e++){if(t(r[e]))return;i&&r[e][i]&&r.splice(e+1,0,...r[e][i])}}function ot(e,t){return e.map(e=>$(e,t))}function $(e,{children:t=`children`,conversion:n}){let r=Array.isArray(e[t])&&e[t].length>0,i=n(e)||{};return r?I(I({},i),{},{[t]:e[t].map(e=>$(e,{children:t,conversion:n}))}):I({},i)}function st({native:e=!0}={}){var t,n,r;return e?(t=(n=window.crypto)==null||(r=n.randomUUID)==null?void 0:r.call(n))==null?C():t:C()}let ct=0;function lt(e=``){let t=Date.now(),n=Math.floor(Math.random()*1e9);return ct++,`${e}_${n}${ct}${String(t)}`}export{Te as AesEncryption,S as ResizeObserver,Me as addClass,Ue as addLocationListener,Be as addResizeListener,B as buildBEM,lt as buildShortUUID,st as buildUUID,Ce as createBEM,we as createNamespace,xe as createSearchReg,U as dataURLtoBlob,De as decodeByBase64,R as deepMerge,Le as domOffEvent,Ie as domOnEvent,G as downloadByBase64,K as downloadByData,Ge as downloadByOnlineUrl,Ke as downloadByUrl,We as downloadPercent,ue as enableTransitions,Ee as encryptByBase64,Oe as encryptByMd5,J as escapeStringRegexp,qe as extendSlots,it as filterTree,et as findNode,tt as findNodeAll,nt as findPath,rt as findPathAll,at as forEachTree,Se as getActualWidthOfChars,V as getBoundingClientRect,_e as getRawRoute,q as getSlot,Pe as getViewportOffset,Fe as hackCss,H as hasClass,T as is,M as isBrowser,le as isChineseText,A as isChrome,k as isClient,D as isIterableArray,Ze as isMatch,oe as isNumeric,E as isObject,ae as isPositiveInteger,j as isSafari,O as isServer,se as isSupportNativeEllipsis,ce as isSupportResizeObserver,ie as isUrl,Je as loadScript,Xe as matcher,L as openWindow,te as pascalCase,m as pathToRegexp,w as regexpMap,p as regexpToPath,Ne as removeClass,Ve as removeResizeListener,ne as safeKebabCase,je as setCssVar,ve as setObjToUrlParams,e as titleCase,ot as treeMap,$ as treeMapEach,He as triggerWindowResize,Ye as unloadScript,ye as unsetAllProperty,W as urlToBase64,Re as useRafThrottle,ge as withInstall};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gsc-basic/utils",
3
3
  "type": "module",
4
- "version": "1.3.0",
4
+ "version": "1.3.2",
5
5
  "description": "Web Dev Utils for GSC Basic Team",
6
6
  "author": "Lenovo SSG BASD <-GSC_Scaffolding_Support@lenovo.com>",
7
7
  "license": "LicenseRef-Proprietary",
@@ -20,8 +20,7 @@
20
20
  ],
21
21
  "exports": {
22
22
  ".": {
23
- "import": "./dist/index.js",
24
- "require": "./dist/index.cjs"
23
+ "import": "./dist/index.js"
25
24
  }
26
25
  },
27
26
  "main": "./dist/index.js",
@@ -30,21 +29,21 @@
30
29
  "./dist"
31
30
  ],
32
31
  "peerDependencies": {
33
- "lodash-es": "^4.17.23"
32
+ "lodash-es": "^4.18.1"
34
33
  },
35
34
  "dependencies": {
36
- "path-to-regexp": "^8.3.0",
35
+ "crypto-js": "^4.2.0",
36
+ "path-to-regexp": "^8.4.2",
37
37
  "resize-observer-polyfill": "^1.5.1",
38
38
  "title-case": "^4.3.2",
39
39
  "uuid": "^13.0.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/crypto-js": "^4.2.2",
43
- "crypto-js": "^4.2.0",
44
- "lodash-es": "^4.17.23"
43
+ "lodash-es": "^4.18.1"
45
44
  },
46
45
  "scripts": {
47
- "build": "tsup",
46
+ "build": "tsdown",
48
47
  "outdated": "pnpm outdated",
49
48
  "clean": "rimraf ./dist"
50
49
  }
package/dist/index.cjs DELETED
@@ -1,14 +0,0 @@
1
- /*!
2
- Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
3
- @license Proprietary
4
-
5
- This software is the confidential and proprietary property of Lenovo SSG BASD.
6
- You shall not disclose such Confidential Information and shall use it only in
7
- accordance with the terms of the license agreement.
8
-
9
- --- Build Info ---
10
- Version: 1.2.10
11
- Build Time: 2026/2/11 18:34:10
12
- Build Commit: 9b4b89872743098216d14081433fa57d7fa73fd3
13
- */
14
- "use strict";var hr=Object.create;var G=Object.defineProperty,vr=Object.defineProperties,gr=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,mr=Object.getOwnPropertyNames,X=Object.getOwnPropertySymbols,xr=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable;var Ee=(e,t,r)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I=(e,t)=>{for(var r in t||(t={}))Se.call(t,r)&&Ee(e,r,t[r]);if(X)for(var r of X(t))qe.call(t,r)&&Ee(e,r,t[r]);return e},q=(e,t)=>vr(e,yr(t));var Ke=(e,t)=>{var r={};for(var n in e)Se.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&X)for(var n of X(e))t.indexOf(n)<0&&qe.call(e,n)&&(r[n]=e[n]);return r};var N=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),_r=(e,t)=>{for(var r in t)G(e,r,{get:t[r],enumerable:!0})},Ze=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of mr(t))!Se.call(e,a)&&a!==r&&G(e,a,{get:()=>t[a],enumerable:!(n=gr(t,a))||n.enumerable});return e};var U=(e,t,r)=>(r=e!=null?hr(xr(e)):{},Ze(t||!e||!e.__esModule?G(r,"default",{value:e,enumerable:!0}):r,e)),br=e=>Ze(G({},"__esModule",{value:!0}),e);var Ae=(e,t,r)=>Ee(e,typeof t!="symbol"?t+"":t,r);var W=N((ae,ut)=>{"use strict";(function(e,t){typeof ae=="object"?ut.exports=ae=t():typeof define=="function"&&define.amd?define([],t):e.CryptoJS=t()})(ae,function(){var e=e||(function(t,r){var n;if(typeof window!="undefined"&&window.crypto&&(n=window.crypto),typeof self!="undefined"&&self.crypto&&(n=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window!="undefined"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global!="undefined"&&global.crypto&&(n=global.crypto),!n&&typeof require=="function")try{n=require("crypto")}catch(i){}var a=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch(i){}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch(i){}}throw new Error("Native crypto module could not be used to get secure random number.")},c=Object.create||(function(){function i(){}return function(s){var m;return i.prototype=s,m=new i,i.prototype=null,m}})(),d={},o=d.lib={},b=o.Base=(function(){return{extend:function(i){var s=c(this);return i&&s.mixIn(i),(!s.hasOwnProperty("init")||this.init===s.init)&&(s.init=function(){s.$super.init.apply(this,arguments)}),s.init.prototype=s,s.$super=this,s},create:function(){var i=this.extend();return i.init.apply(i,arguments),i},init:function(){},mixIn:function(i){for(var s in i)i.hasOwnProperty(s)&&(this[s]=i[s]);i.hasOwnProperty("toString")&&(this.toString=i.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),y=o.WordArray=b.extend({init:function(i,s){i=this.words=i||[],s!=r?this.sigBytes=s:this.sigBytes=i.length*4},toString:function(i){return(i||B).stringify(this)},concat:function(i){var s=this.words,m=i.words,x=this.sigBytes,k=i.sigBytes;if(this.clamp(),x%4)for(var z=0;z<k;z++){var $=m[z>>>2]>>>24-z%4*8&255;s[x+z>>>2]|=$<<24-(x+z)%4*8}else for(var A=0;A<k;A+=4)s[x+A>>>2]=m[A>>>2];return this.sigBytes+=k,this},clamp:function(){var i=this.words,s=this.sigBytes;i[s>>>2]&=4294967295<<32-s%4*8,i.length=t.ceil(s/4)},clone:function(){var i=b.clone.call(this);return i.words=this.words.slice(0),i},random:function(i){for(var s=[],m=0;m<i;m+=4)s.push(a());return new y.init(s,i)}}),u=d.enc={},B=u.Hex={stringify:function(i){for(var s=i.words,m=i.sigBytes,x=[],k=0;k<m;k++){var z=s[k>>>2]>>>24-k%4*8&255;x.push((z>>>4).toString(16)),x.push((z&15).toString(16))}return x.join("")},parse:function(i){for(var s=i.length,m=[],x=0;x<s;x+=2)m[x>>>3]|=parseInt(i.substr(x,2),16)<<24-x%8*4;return new y.init(m,s/2)}},w=u.Latin1={stringify:function(i){for(var s=i.words,m=i.sigBytes,x=[],k=0;k<m;k++){var z=s[k>>>2]>>>24-k%4*8&255;x.push(String.fromCharCode(z))}return x.join("")},parse:function(i){for(var s=i.length,m=[],x=0;x<s;x++)m[x>>>2]|=(i.charCodeAt(x)&255)<<24-x%4*8;return new y.init(m,s)}},C=u.Utf8={stringify:function(i){try{return decodeURIComponent(escape(w.stringify(i)))}catch(s){throw new Error("Malformed UTF-8 data")}},parse:function(i){return w.parse(unescape(encodeURIComponent(i)))}},E=o.BufferedBlockAlgorithm=b.extend({reset:function(){this._data=new y.init,this._nDataBytes=0},_append:function(i){typeof i=="string"&&(i=C.parse(i)),this._data.concat(i),this._nDataBytes+=i.sigBytes},_process:function(i){var s,m=this._data,x=m.words,k=m.sigBytes,z=this.blockSize,$=z*4,A=k/$;i?A=t.ceil(A):A=t.max((A|0)-this._minBufferSize,0);var F=A*z,P=t.min(F*4,k);if(F){for(var f=0;f<F;f+=z)this._doProcessBlock(x,f);s=x.splice(0,F),m.sigBytes-=P}return new y.init(s,P)},clone:function(){var i=b.clone.call(this);return i._data=this._data.clone(),i},_minBufferSize:0}),D=o.Hasher=E.extend({cfg:b.extend(),init:function(i){this.cfg=this.cfg.extend(i),this.reset()},reset:function(){E.reset.call(this),this._doReset()},update:function(i){return this._append(i),this._process(),this},finalize:function(i){i&&this._append(i);var s=this._doFinalize();return s},blockSize:512/32,_createHelper:function(i){return function(s,m){return new i.init(m).finalize(s)}},_createHmacHelper:function(i){return function(s,m){return new L.HMAC.init(i,m).finalize(s)}}}),L=d.algo={};return d})(Math);return e})});var De=N((ce,lt)=>{"use strict";(function(e,t){typeof ce=="object"?lt.exports=ce=t(W()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(ce,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,a=t.enc,c=a.Base64={stringify:function(o){var b=o.words,y=o.sigBytes,u=this._map;o.clamp();for(var B=[],w=0;w<y;w+=3)for(var C=b[w>>>2]>>>24-w%4*8&255,E=b[w+1>>>2]>>>24-(w+1)%4*8&255,D=b[w+2>>>2]>>>24-(w+2)%4*8&255,L=C<<16|E<<8|D,i=0;i<4&&w+i*.75<y;i++)B.push(u.charAt(L>>>6*(3-i)&63));var s=u.charAt(64);if(s)for(;B.length%4;)B.push(s);return B.join("")},parse:function(o){var b=o.length,y=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var B=0;B<y.length;B++)u[y.charCodeAt(B)]=B}var w=y.charAt(64);if(w){var C=o.indexOf(w);C!==-1&&(b=C)}return d(o,b,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function d(o,b,y){for(var u=[],B=0,w=0;w<b;w++)if(w%4){var C=y[o.charCodeAt(w-1)]<<w%4*2,E=y[o.charCodeAt(w)]>>>6-w%4*2,D=C|E;u[B>>>2]|=D<<24-B%4*8,B++}return n.create(u,B)}})(),e.enc.Base64})});var Re=N((fe,pt)=>{"use strict";(function(e,t){typeof fe=="object"?pt.exports=fe=t(W()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(fe,function(e){return(function(t){var r=e,n=r.lib,a=n.WordArray,c=n.Hasher,d=r.algo,o=[];(function(){for(var C=0;C<64;C++)o[C]=t.abs(t.sin(C+1))*4294967296|0})();var b=d.MD5=c.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(C,E){for(var D=0;D<16;D++){var L=E+D,i=C[L];C[L]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var s=this._hash.words,m=C[E+0],x=C[E+1],k=C[E+2],z=C[E+3],$=C[E+4],A=C[E+5],F=C[E+6],P=C[E+7],f=C[E+8],_=C[E+9],S=C[E+10],p=C[E+11],T=C[E+12],R=C[E+13],O=C[E+14],M=C[E+15],l=s[0],h=s[1],v=s[2],g=s[3];l=y(l,h,v,g,m,7,o[0]),g=y(g,l,h,v,x,12,o[1]),v=y(v,g,l,h,k,17,o[2]),h=y(h,v,g,l,z,22,o[3]),l=y(l,h,v,g,$,7,o[4]),g=y(g,l,h,v,A,12,o[5]),v=y(v,g,l,h,F,17,o[6]),h=y(h,v,g,l,P,22,o[7]),l=y(l,h,v,g,f,7,o[8]),g=y(g,l,h,v,_,12,o[9]),v=y(v,g,l,h,S,17,o[10]),h=y(h,v,g,l,p,22,o[11]),l=y(l,h,v,g,T,7,o[12]),g=y(g,l,h,v,R,12,o[13]),v=y(v,g,l,h,O,17,o[14]),h=y(h,v,g,l,M,22,o[15]),l=u(l,h,v,g,x,5,o[16]),g=u(g,l,h,v,F,9,o[17]),v=u(v,g,l,h,p,14,o[18]),h=u(h,v,g,l,m,20,o[19]),l=u(l,h,v,g,A,5,o[20]),g=u(g,l,h,v,S,9,o[21]),v=u(v,g,l,h,M,14,o[22]),h=u(h,v,g,l,$,20,o[23]),l=u(l,h,v,g,_,5,o[24]),g=u(g,l,h,v,O,9,o[25]),v=u(v,g,l,h,z,14,o[26]),h=u(h,v,g,l,f,20,o[27]),l=u(l,h,v,g,R,5,o[28]),g=u(g,l,h,v,k,9,o[29]),v=u(v,g,l,h,P,14,o[30]),h=u(h,v,g,l,T,20,o[31]),l=B(l,h,v,g,A,4,o[32]),g=B(g,l,h,v,f,11,o[33]),v=B(v,g,l,h,p,16,o[34]),h=B(h,v,g,l,O,23,o[35]),l=B(l,h,v,g,x,4,o[36]),g=B(g,l,h,v,$,11,o[37]),v=B(v,g,l,h,P,16,o[38]),h=B(h,v,g,l,S,23,o[39]),l=B(l,h,v,g,R,4,o[40]),g=B(g,l,h,v,m,11,o[41]),v=B(v,g,l,h,z,16,o[42]),h=B(h,v,g,l,F,23,o[43]),l=B(l,h,v,g,_,4,o[44]),g=B(g,l,h,v,T,11,o[45]),v=B(v,g,l,h,M,16,o[46]),h=B(h,v,g,l,k,23,o[47]),l=w(l,h,v,g,m,6,o[48]),g=w(g,l,h,v,P,10,o[49]),v=w(v,g,l,h,O,15,o[50]),h=w(h,v,g,l,A,21,o[51]),l=w(l,h,v,g,T,6,o[52]),g=w(g,l,h,v,z,10,o[53]),v=w(v,g,l,h,S,15,o[54]),h=w(h,v,g,l,x,21,o[55]),l=w(l,h,v,g,f,6,o[56]),g=w(g,l,h,v,M,10,o[57]),v=w(v,g,l,h,F,15,o[58]),h=w(h,v,g,l,R,21,o[59]),l=w(l,h,v,g,$,6,o[60]),g=w(g,l,h,v,p,10,o[61]),v=w(v,g,l,h,k,15,o[62]),h=w(h,v,g,l,_,21,o[63]),s[0]=s[0]+l|0,s[1]=s[1]+h|0,s[2]=s[2]+v|0,s[3]=s[3]+g|0},_doFinalize:function(){var C=this._data,E=C.words,D=this._nDataBytes*8,L=C.sigBytes*8;E[L>>>5]|=128<<24-L%32;var i=t.floor(D/4294967296),s=D;E[(L+64>>>9<<4)+15]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,E[(L+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,C.sigBytes=(E.length+1)*4,this._process();for(var m=this._hash,x=m.words,k=0;k<4;k++){var z=x[k];x[k]=(z<<8|z>>>24)&16711935|(z<<24|z>>>8)&4278255360}return m},clone:function(){var C=c.clone.call(this);return C._hash=this._hash.clone(),C}});function y(C,E,D,L,i,s,m){var x=C+(E&D|~E&L)+i+m;return(x<<s|x>>>32-s)+E}function u(C,E,D,L,i,s,m){var x=C+(E&L|D&~L)+i+m;return(x<<s|x>>>32-s)+E}function B(C,E,D,L,i,s,m){var x=C+(E^D^L)+i+m;return(x<<s|x>>>32-s)+E}function w(C,E,D,L,i,s,m){var x=C+(D^(E|~L))+i+m;return(x<<s|x>>>32-s)+E}r.MD5=c._createHelper(b),r.HmacMD5=c._createHmacHelper(b)})(Math),e.MD5})});var vt=N((de,ht)=>{"use strict";(function(e,t){typeof de=="object"?ht.exports=de=t(W()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(de,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,a=r.Hasher,c=t.algo,d=[],o=c.SHA1=a.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(b,y){for(var u=this._hash.words,B=u[0],w=u[1],C=u[2],E=u[3],D=u[4],L=0;L<80;L++){if(L<16)d[L]=b[y+L]|0;else{var i=d[L-3]^d[L-8]^d[L-14]^d[L-16];d[L]=i<<1|i>>>31}var s=(B<<5|B>>>27)+D+d[L];L<20?s+=(w&C|~w&E)+1518500249:L<40?s+=(w^C^E)+1859775393:L<60?s+=(w&C|w&E|C&E)-1894007588:s+=(w^C^E)-899497514,D=E,E=C,C=w<<30|w>>>2,w=B,B=s}u[0]=u[0]+B|0,u[1]=u[1]+w|0,u[2]=u[2]+C|0,u[3]=u[3]+E|0,u[4]=u[4]+D|0},_doFinalize:function(){var b=this._data,y=b.words,u=this._nDataBytes*8,B=b.sigBytes*8;return y[B>>>5]|=128<<24-B%32,y[(B+64>>>9<<4)+14]=Math.floor(u/4294967296),y[(B+64>>>9<<4)+15]=u,b.sigBytes=y.length*4,this._process(),this._hash},clone:function(){var b=a.clone.call(this);return b._hash=this._hash.clone(),b}});t.SHA1=a._createHelper(o),t.HmacSHA1=a._createHmacHelper(o)})(),e.SHA1})});var yt=N((ue,gt)=>{"use strict";(function(e,t){typeof ue=="object"?gt.exports=ue=t(W()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(ue,function(e){(function(){var t=e,r=t.lib,n=r.Base,a=t.enc,c=a.Utf8,d=t.algo,o=d.HMAC=n.extend({init:function(b,y){b=this._hasher=new b.init,typeof y=="string"&&(y=c.parse(y));var u=b.blockSize,B=u*4;y.sigBytes>B&&(y=b.finalize(y)),y.clamp();for(var w=this._oKey=y.clone(),C=this._iKey=y.clone(),E=w.words,D=C.words,L=0;L<u;L++)E[L]^=1549556828,D[L]^=909522486;w.sigBytes=C.sigBytes=B,this.reset()},reset:function(){var b=this._hasher;b.reset(),b.update(this._iKey)},update:function(b){return this._hasher.update(b),this},finalize:function(b){var y=this._hasher,u=y.finalize(b);y.reset();var B=y.finalize(this._oKey.clone().concat(u));return B}})})()})});var Fe=N((le,mt)=>{"use strict";(function(e,t,r){typeof le=="object"?mt.exports=le=t(W(),vt(),yt()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],t):t(e.CryptoJS)})(le,function(e){return(function(){var t=e,r=t.lib,n=r.Base,a=r.WordArray,c=t.algo,d=c.MD5,o=c.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:d,iterations:1}),init:function(b){this.cfg=this.cfg.extend(b)},compute:function(b,y){for(var u,B=this.cfg,w=B.hasher.create(),C=a.create(),E=C.words,D=B.keySize,L=B.iterations;E.length<D;){u&&w.update(u),u=w.update(b).finalize(y),w.reset();for(var i=1;i<L;i++)u=w.finalize(u),w.reset();C.concat(u)}return C.sigBytes=D*4,C}});t.EvpKDF=function(b,y,u){return o.create(u).compute(b,y)}})(),e.EvpKDF})});var he=N((pe,xt)=>{"use strict";(function(e,t,r){typeof pe=="object"?xt.exports=pe=t(W(),Fe()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],t):t(e.CryptoJS)})(pe,function(e){e.lib.Cipher||(function(t){var r=e,n=r.lib,a=n.Base,c=n.WordArray,d=n.BufferedBlockAlgorithm,o=r.enc,b=o.Utf8,y=o.Base64,u=r.algo,B=u.EvpKDF,w=n.Cipher=d.extend({cfg:a.extend(),createEncryptor:function(f,_){return this.create(this._ENC_XFORM_MODE,f,_)},createDecryptor:function(f,_){return this.create(this._DEC_XFORM_MODE,f,_)},init:function(f,_,S){this.cfg=this.cfg.extend(S),this._xformMode=f,this._key=_,this.reset()},reset:function(){d.reset.call(this),this._doReset()},process:function(f){return this._append(f),this._process()},finalize:function(f){f&&this._append(f);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function f(_){return typeof _=="string"?P:$}return function(_){return{encrypt:function(S,p,T){return f(p).encrypt(_,S,p,T)},decrypt:function(S,p,T){return f(p).decrypt(_,S,p,T)}}}})()}),C=n.StreamCipher=w.extend({_doFinalize:function(){var f=this._process(!0);return f},blockSize:1}),E=r.mode={},D=n.BlockCipherMode=a.extend({createEncryptor:function(f,_){return this.Encryptor.create(f,_)},createDecryptor:function(f,_){return this.Decryptor.create(f,_)},init:function(f,_){this._cipher=f,this._iv=_}}),L=E.CBC=(function(){var f=D.extend();f.Encryptor=f.extend({processBlock:function(S,p){var T=this._cipher,R=T.blockSize;_.call(this,S,p,R),T.encryptBlock(S,p),this._prevBlock=S.slice(p,p+R)}}),f.Decryptor=f.extend({processBlock:function(S,p){var T=this._cipher,R=T.blockSize,O=S.slice(p,p+R);T.decryptBlock(S,p),_.call(this,S,p,R),this._prevBlock=O}});function _(S,p,T){var R,O=this._iv;O?(R=O,this._iv=t):R=this._prevBlock;for(var M=0;M<T;M++)S[p+M]^=R[M]}return f})(),i=r.pad={},s=i.Pkcs7={pad:function(f,_){for(var S=_*4,p=S-f.sigBytes%S,T=p<<24|p<<16|p<<8|p,R=[],O=0;O<p;O+=4)R.push(T);var M=c.create(R,p);f.concat(M)},unpad:function(f){var _=f.words[f.sigBytes-1>>>2]&255;f.sigBytes-=_}},m=n.BlockCipher=w.extend({cfg:w.cfg.extend({mode:L,padding:s}),reset:function(){var f;w.reset.call(this);var _=this.cfg,S=_.iv,p=_.mode;this._xformMode==this._ENC_XFORM_MODE?f=p.createEncryptor:(f=p.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==f?this._mode.init(this,S&&S.words):(this._mode=f.call(p,this,S&&S.words),this._mode.__creator=f)},_doProcessBlock:function(f,_){this._mode.processBlock(f,_)},_doFinalize:function(){var f,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),f=this._process(!0)):(f=this._process(!0),_.unpad(f)),f},blockSize:128/32}),x=n.CipherParams=a.extend({init:function(f){this.mixIn(f)},toString:function(f){return(f||this.formatter).stringify(this)}}),k=r.format={},z=k.OpenSSL={stringify:function(f){var _,S=f.ciphertext,p=f.salt;return p?_=c.create([1398893684,1701076831]).concat(p).concat(S):_=S,_.toString(y)},parse:function(f){var _,S=y.parse(f),p=S.words;return p[0]==1398893684&&p[1]==1701076831&&(_=c.create(p.slice(2,4)),p.splice(0,4),S.sigBytes-=16),x.create({ciphertext:S,salt:_})}},$=n.SerializableCipher=a.extend({cfg:a.extend({format:z}),encrypt:function(f,_,S,p){p=this.cfg.extend(p);var T=f.createEncryptor(S,p),R=T.finalize(_),O=T.cfg;return x.create({ciphertext:R,key:S,iv:O.iv,algorithm:f,mode:O.mode,padding:O.padding,blockSize:f.blockSize,formatter:p.format})},decrypt:function(f,_,S,p){p=this.cfg.extend(p),_=this._parse(_,p.format);var T=f.createDecryptor(S,p).finalize(_.ciphertext);return T},_parse:function(f,_){return typeof f=="string"?_.parse(f,this):f}}),A=r.kdf={},F=A.OpenSSL={execute:function(f,_,S,p,T){if(p||(p=c.random(64/8)),T)var R=B.create({keySize:_+S,hasher:T}).compute(f,p);else var R=B.create({keySize:_+S}).compute(f,p);var O=c.create(R.words.slice(_),S*4);return R.sigBytes=_*4,x.create({key:R,iv:O,salt:p})}},P=n.PasswordBasedCipher=$.extend({cfg:$.cfg.extend({kdf:F}),encrypt:function(f,_,S,p){p=this.cfg.extend(p);var T=p.kdf.execute(S,f.keySize,f.ivSize,p.salt,p.hasher);p.iv=T.iv;var R=$.encrypt.call(this,f,_,T.key,p);return R.mixIn(T),R},decrypt:function(f,_,S,p){p=this.cfg.extend(p),_=this._parse(_,p.format);var T=p.kdf.execute(S,f.keySize,f.ivSize,_.salt,p.hasher);p.iv=T.iv;var R=$.decrypt.call(this,f,_,T.key,p);return R}})})()})});var bt=N((ve,_t)=>{"use strict";(function(e,t,r){typeof ve=="object"?_t.exports=ve=t(W(),De(),Re(),Fe(),he()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(ve,function(e){return(function(){var t=e,r=t.lib,n=r.BlockCipher,a=t.algo,c=[],d=[],o=[],b=[],y=[],u=[],B=[],w=[],C=[],E=[];(function(){for(var i=[],s=0;s<256;s++)s<128?i[s]=s<<1:i[s]=s<<1^283;for(var m=0,x=0,s=0;s<256;s++){var k=x^x<<1^x<<2^x<<3^x<<4;k=k>>>8^k&255^99,c[m]=k,d[k]=m;var z=i[m],$=i[z],A=i[$],F=i[k]*257^k*16843008;o[m]=F<<24|F>>>8,b[m]=F<<16|F>>>16,y[m]=F<<8|F>>>24,u[m]=F;var F=A*16843009^$*65537^z*257^m*16843008;B[k]=F<<24|F>>>8,w[k]=F<<16|F>>>16,C[k]=F<<8|F>>>24,E[k]=F,m?(m=z^i[i[i[A^z]]],x^=i[i[x]]):m=x=1}})();var D=[0,1,2,4,8,16,32,64,128,27,54],L=a.AES=n.extend({_doReset:function(){var i;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var s=this._keyPriorReset=this._key,m=s.words,x=s.sigBytes/4,k=this._nRounds=x+6,z=(k+1)*4,$=this._keySchedule=[],A=0;A<z;A++)A<x?$[A]=m[A]:(i=$[A-1],A%x?x>6&&A%x==4&&(i=c[i>>>24]<<24|c[i>>>16&255]<<16|c[i>>>8&255]<<8|c[i&255]):(i=i<<8|i>>>24,i=c[i>>>24]<<24|c[i>>>16&255]<<16|c[i>>>8&255]<<8|c[i&255],i^=D[A/x|0]<<24),$[A]=$[A-x]^i);for(var F=this._invKeySchedule=[],P=0;P<z;P++){var A=z-P;if(P%4)var i=$[A];else var i=$[A-4];P<4||A<=4?F[P]=i:F[P]=B[c[i>>>24]]^w[c[i>>>16&255]]^C[c[i>>>8&255]]^E[c[i&255]]}}},encryptBlock:function(i,s){this._doCryptBlock(i,s,this._keySchedule,o,b,y,u,c)},decryptBlock:function(i,s){var m=i[s+1];i[s+1]=i[s+3],i[s+3]=m,this._doCryptBlock(i,s,this._invKeySchedule,B,w,C,E,d);var m=i[s+1];i[s+1]=i[s+3],i[s+3]=m},_doCryptBlock:function(i,s,m,x,k,z,$,A){for(var F=this._nRounds,P=i[s]^m[0],f=i[s+1]^m[1],_=i[s+2]^m[2],S=i[s+3]^m[3],p=4,T=1;T<F;T++){var R=x[P>>>24]^k[f>>>16&255]^z[_>>>8&255]^$[S&255]^m[p++],O=x[f>>>24]^k[_>>>16&255]^z[S>>>8&255]^$[P&255]^m[p++],M=x[_>>>24]^k[S>>>16&255]^z[P>>>8&255]^$[f&255]^m[p++],l=x[S>>>24]^k[P>>>16&255]^z[f>>>8&255]^$[_&255]^m[p++];P=R,f=O,_=M,S=l}var R=(A[P>>>24]<<24|A[f>>>16&255]<<16|A[_>>>8&255]<<8|A[S&255])^m[p++],O=(A[f>>>24]<<24|A[_>>>16&255]<<16|A[S>>>8&255]<<8|A[P&255])^m[p++],M=(A[_>>>24]<<24|A[S>>>16&255]<<16|A[P>>>8&255]<<8|A[f&255])^m[p++],l=(A[S>>>24]<<24|A[P>>>16&255]<<16|A[f>>>8&255]<<8|A[_&255])^m[p++];i[s]=R,i[s+1]=O,i[s+2]=M,i[s+3]=l},keySize:256/32});t.AES=n._createHelper(L)})(),e.AES})});var Ct=N((ge,wt)=>{"use strict";(function(e,t){typeof ge=="object"?wt.exports=ge=t(W()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(ge,function(e){return e.enc.Utf8})});var Et=N((ye,Bt)=>{"use strict";(function(e,t,r){typeof ye=="object"?Bt.exports=ye=t(W(),he()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(ye,function(e){return e.pad.Pkcs7})});var At=N((me,St)=>{"use strict";(function(e,t,r){typeof me=="object"?St.exports=me=t(W(),he()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(me,function(e){return e.mode.CTR=(function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(n,a){var c=this._cipher,d=c.blockSize,o=this._iv,b=this._counter;o&&(b=this._counter=o.slice(0),this._iv=void 0);var y=b.slice(0);c.encryptBlock(y,0),b[d-1]=b[d-1]+1|0;for(var u=0;u<d;u++)n[a+u]^=y[u]}});return t.Decryptor=r,t})(),e.mode.CTR})});var kr={};_r(kr,{AesEncryption:()=>xe,ResizeObserver:()=>we.default,addClass:()=>Pt,addLocationListener:()=>Kt,addResizeListener:()=>Ut,buildBEM:()=>se,buildShortUUID:()=>pr,buildUUID:()=>lr,createBEM:()=>ft,createNamespace:()=>dt,createSearchReg:()=>at,dataURLtoBlob:()=>Oe,decodeByBase64:()=>Dt,deepMerge:()=>ze,domOffEvent:()=>Wt,domOnEvent:()=>Nt,downloadByBase64:()=>He,downloadByData:()=>Ne,downloadByOnlineUrl:()=>Jt,downloadByUrl:()=>Vt,downloadPercent:()=>Zt,enableTransitions:()=>rt,encryptByBase64:()=>Tt,encryptByMd5:()=>Rt,escapeStringRegexp:()=>Ue,extendSlots:()=>Yt,filterTree:()=>cr,findNode:()=>ir,findNodeAll:()=>or,findPath:()=>sr,findPathAll:()=>ar,forEachTree:()=>fr,getActualWidthOfChars:()=>ct,getBoundingClientRect:()=>Pe,getRawRoute:()=>it,getSlot:()=>We,getViewportOffset:()=>Mt,hackCss:()=>Ht,hasClass:()=>be,is:()=>ke,isBrowser:()=>ie,isChineseText:()=>tt,isChrome:()=>re,isClient:()=>te,isIterableArray:()=>ee,isMatch:()=>rr,isNumeric:()=>Qe,isObject:()=>Y,isPositiveInteger:()=>Ye,isSafari:()=>ne,isServer:()=>Q,isSupportNativeEllipsis:()=>Xe,isSupportResizeObserver:()=>et,isUrl:()=>Ge,loadScript:()=>Qt,matcher:()=>tr,openWindow:()=>oe,pascalCase:()=>Je,pathToRegexp:()=>J.pathToRegexp,regexpMap:()=>Z,regexpToPath:()=>J.compile,removeClass:()=>Ot,removeResizeListener:()=>jt,safeKebabCase:()=>Ve,setCssVar:()=>$t,setObjToUrlParams:()=>ot,titleCase:()=>Le.titleCase,treeMap:()=>dr,treeMapEach:()=>Be,triggerWindowResize:()=>qt,unloadScript:()=>Xt,unsetAllProperty:()=>st,urlToBase64:()=>Me,useRafThrottle:()=>It,withInstall:()=>nt});module.exports=br(kr);var Le=require("title-case"),K=require("lodash-es");function Je(e){return(0,K.upperFirst)((0,K.camelCase)(e))}function Ve(e){if(!e)return"";let t=(0,K.kebabCase)(e),r=e.replace(/[^A-Z0-9]/gi,"");if(r.length===t.replace(/-/g,"").length){let n=0,a="";for(let c=0;c<t.length;c+=1){let d=t[c];if(d==="-"){let o=t[c-1],b=t[c+1],y=r[n],u=y&&y.toUpperCase()===y&&y.toLowerCase()!==y,B=c+1===t.length-1;if(o&&b&&/[a-z0-9]/.test(o)&&/[a-z0-9]/.test(b)&&(!/\d/.test(o)&&/\d/.test(b)||/\d/.test(o)&&!/\d/.test(b)&&!u||/\d/.test(o)&&!/\d/.test(b)&&u&&B))continue;a+=d}else a+=d,n+=1}t=a}return t}var H=require("lodash-es");var J=require("path-to-regexp"),Z={mobile:/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,tel:/^(?:(?:\d{3}-)?\d{8}|(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,numAndLetter:/^[A-Z0-9]+$/i,password:/^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S+$/,email:/^[A-Z0-9._%+-\u4E00-\u9FA5]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,postalCode:/^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/,identityCard:/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}[\dX]$/i,ip:/^((\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])(?::(?:\d|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$/,url:/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-][^!@#$%^&*?.\s]{0,64}\.)+[a-z]{2,6}\/?/,httpsUrl:/^https:\/\//,domain:/^([0-9a-z-]+\.)+([a-z]{2,})$/i,plateNumber:/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/,md5:/^[a-f0-9]{32}$/i,base64:/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([\w!$&',()*+;=\-.~:@/?%\s]*?)\s*$/i,uuid:/^[a-f\d]{4}(?:[a-f\d]{4}-){4}[a-f\d]{12}$/i,version:/^\d+(?:\.\d+){2}$/,videoUrl:/^https?:\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/i,imageUrl:/^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i,chinese:/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/,itcode:/^[a-z]+\d*$/i,numeric:/^\d+$/};var wr=Object.prototype.toString;function ke(e,t){return wr.call(e)===`[object ${t}]`}function Y(e){return e!==null&&ke(e,"Object")}function Ge(e){return Z.url.test(e)}function ee(e){return Array.isArray(e)&&e.length>0}function Ye(e){return Number.isInteger(e)&&e>=0}function Qe(e){return Z.numeric.test(e)}var Q=typeof window=="undefined",te=!Q,re=te&&window.navigator.userAgent.toLowerCase().includes("chrome"),ne=te&&window.navigator.userAgent.toLowerCase().includes("safari"),ie=typeof window!="undefined"&&typeof document!="undefined",Xe=ie&&"webkitLineClamp"in document.body.style,et=ie&&typeof ResizeObserver!="undefined",tt=e=>Z.chinese.test(e),rt=()=>"startViewTransition"in document&&window.matchMedia("(prefers-reduced-motion: no-preference)").matches;var nt=(e,t)=>{let r=e;return r.install=n=>{n.component(r.name||r.displayName,e),t&&(n.config.globalProperties[t]=e)},e};function it(e){if(!e)return e;let n=e,{matched:t}=n,r=Ke(n,["matched"]);return q(I({},r),{matched:t?t.map(a=>({meta:a.meta,name:a.name,path:a.path})):void 0})}function oe(e,t={}){let{target:r="__blank",noopener:n=!0,noreferrer:a=!0}=t||{},c=[];n&&c.push("noopener=yes"),a&&c.push("noreferrer=yes"),window.open(e,r,c.join(","))}function ze(e,t,r="replace"){return t?e?(0,H.mergeWith)(e,t,(n,a)=>{if((0,H.isArray)(a)&&(0,H.isArray)(n))switch(r){case"union":return(0,H.unionWith)(n,a,H.isEqual);case"intersection":return(0,H.intersectionWith)(n,a,H.isEqual);case"concat":return n.concat(a);case"replace":return a;default:throw new Error(`Unknown merge array strategy: ${r}`)}if(Y(a)&&Y(n))return ze(n,a,r)}):t:e}function ot(e,t){if(!ee(Object.keys(t)))return e;let r="";for(let n in t){let a=t[n];Array.isArray(a)?r+=`${n}=${encodeURIComponent(a.join(","))}&`:r+=`${n}=${encodeURIComponent(a)}&`}return r=r.replace(/&$/,""),/\?$/.test(e)?e+r:e.replace(/\/?$/,"?")+r}function st(e){(0,H.isPlainObject)(e)&&Object.keys(e).forEach(t=>{Reflect.deleteProperty(e,t)})}function Cr(e){return["$","(",")","*","+",".","[","]","?","\\","^","{","}","|"].includes(e)?`\\${e}`:e}function at(e){let r=["",...[...e].map(n=>Cr(n)),""].join(".*");return new RegExp(r,"i")}function ct(e="",t={}){let{size:r=14,family:n=getComputedStyle(document.documentElement).getPropertyValue("--vxe-font-family")||"sans-serif"}=t,c=document.createElement("canvas").getContext("2d");c.font=`${r}px ${n}`;let d=c.measureText(e),o=Math.abs(d.actualBoundingBoxLeft)+Math.abs(d.actualBoundingBoxRight);return Math.ceil(Math.max(d.width,o))}function Te(e,t){return t?typeof t=="string"?` ${e}--${t}`:Array.isArray(t)?t.reduce((r,n)=>r+Te(e,n),""):Object.keys(t).reduce((r,n)=>r+(t[n]?Te(e,n):""),""):""}function se(e){return(t,r)=>(t&&typeof t!="string"&&(r=t,t=""),t=t?`${e}__${t}`:e,`${t}${Te(t,r)}`)}function ft(e,t=""){return[se(`${t}-${e}`)]}function dt(e,t=""){let r=`${t}-${e}`;return[r,se(r)]}var _e=U(bt(),1),j=U(Ct(),1),Lt=U(Et(),1),kt=U(At(),1),zt=U(Re(),1),$e=U(De(),1);var xe=class{constructor({key:t,iv:r}){Ae(this,"key");Ae(this,"iv");this.key=(0,j.parse)(t),this.iv=(0,j.parse)(r)}get getOptions(){return{mode:kt.default,padding:Lt.default,iv:this.iv}}encryptByAES(t){return(0,_e.encrypt)(t,this.key,this.getOptions).toString()}decryptByAES(t){return(0,_e.decrypt)(t,this.key,this.getOptions).toString(j.default)}};function Tt(e){return j.default.parse(e).toString($e.default)}function Dt(e){return $e.default.parse(e).toString(j.default)}function Rt(e){return(0,zt.default)(e).toString()}var Ft=require("lodash-es");var Br=()=>document.documentElement;function Pe(e){return!e||!e.getBoundingClientRect?0:e.getBoundingClientRect()}function Er(e){return(e||"").replace(/^\s+|\s+$/g,"")}function be(e,t){if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):` ${e.className} `.includes(` ${t} `)}function $t(e,t,r){return r||(r=Br()),r.style.setProperty(e,t),{prop:t}}function Pt(e,t){if(!e)return;let r=e.className,n=(t||"").split(" ");for(let a=0,c=n.length;a<c;a++){let d=n[a];d&&(e.classList?e.classList.add(d):be(e,d)||(r+=` ${d}`))}e.classList||(e.className=r)}function Ot(e,t){if(!e||!t)return;let r=t.split(" "),n=` ${e.className} `;for(let a=0,c=r.length;a<c;a++){let d=r[a];d&&(e.classList?e.classList.remove(d):be(e,d)&&(n=n.replace(` ${d} `," ")))}e.classList||(e.className=Er(n))}function Mt(e){let t=document.documentElement,r=t.scrollLeft,n=t.scrollTop,a=t.clientLeft,c=t.clientTop,d=window.scrollX,o=window.scrollY,b=Pe(e);if(!b)return{};let{left:y,top:u,width:B,height:w}=b,C=(d||r)-(a||0),E=(o||n)-(c||0),D=y+d,L=u+o,i=D-C,s=L-E,m=window.document.documentElement.clientWidth,x=window.document.documentElement.clientHeight;return{left:i,top:s,right:m-B-i,bottom:x-w-s,rightIncludeBody:m-i,bottomIncludeBody:x-s}}function Ht(e,t){let r=["webkit","Moz","ms","OT"],n={};return r.forEach(a=>{n[`${a}${(0,Ft.upperFirst)(e)}`]=t}),q(I({},n),{[e]:t})}function Nt(e,t,r){e&&t&&r&&e.addEventListener(t,r,!1)}function Wt(e,t,r){e&&t&&r&&e.removeEventListener(t,r,!1)}function It(e){let t=!1;return function(...r){t||(t=!0,window.requestAnimationFrame(()=>{e.apply(this,r),t=!1}))}}var we=U(require("resize-observer-polyfill"),1);function Sr(e){for(let t of e){let r=t.target.__resizeListeners__||[];r.length&&r.forEach(n=>{n()})}}function Ut(e,t){Q||(e.__resizeListeners__||(e.__resizeListeners__=[],e.__ro__=new we.default(Sr),e.__ro__.observe(e)),e.__resizeListeners__.push(t))}function jt(e,t){!e||!e.__resizeListeners__||(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.__ro__.disconnect(),e.__ro__=null,e.__resizeListeners__=null))}function qt(){let e=new Event("resize",{bubbles:!0,cancelable:!0});window.dispatchEvent(e)}function Kt(e,t={}){function r(n){let a=window.history[n];return function(...c){let d=new Event(n);return d.arguments=c,window.dispatchEvent(d),a.apply(this,c)}}return window.history.pushState=r("pushState"),window.history.replaceState=r("replaceState"),window.addEventListener("popstate",e,t),window.addEventListener("hashchange",e,t),window.addEventListener("replaceState",e,t),window.addEventListener("pushState",e,t),{removeListener:()=>{window.removeEventListener("popstate",e,t),window.removeEventListener("hashchange",e,t),window.removeEventListener("replaceState",e,t),window.removeEventListener("pushState",e,t)}}}var Ce=require("lodash-es");function Oe(e){let t=e.split(","),n=t[0].match(/:(.*?);/)[1],a=window.atob(t[1]),c=a.length,d=new Uint8Array(c);for(;c--;)d[c]=a.charCodeAt(c);return new Blob([d],{type:n})}function Me(e,t){return new Promise((r,n)=>{let a=document.createElement("CANVAS"),c=a==null?void 0:a.getContext("2d"),d=new Image;d.crossOrigin="",d.onload=function(){if(!a||!c)return n();a.height=d.height,a.width=d.width,c.drawImage(d,0,0);let o=a.toDataURL(t||"image/png");a=null,r(o)},d.src=e})}function Zt(e){let{loaded:t,total:r}=e;if(r<=0||(0,Ce.isNil)(r))return 0;let n=t/r;return(0,Ce.round)((n>1?1:n)*100)}function Jt(e,t,r,n){Me(e).then(a=>{He(a,t,r,n)})}function He(e,t,r,n){let a=Oe(e);Ne(a,t,r,n)}function Ne(e,t,r,n){let a=typeof n!="undefined"?[n,e]:[e],c=new Blob(a,{type:r||"application/octet-stream"}),d=window.URL.createObjectURL(c),o=document.createElement("a");o.style.display="none",o.href=d,o.setAttribute("download",t),typeof o.download=="undefined"&&o.setAttribute("target","_blank"),document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(d)}function Vt({url:e,target:t="_blank",fileName:r}){if(/iP/.test(window.navigator.userAgent))return!1;if(re||ne){let n=document.createElement("a");return n.href=e,n.download=r||e.substring(e.lastIndexOf("/")+1,e.length),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n),!0}return e.includes("?")||(e+="?download"),oe(e,{target:t}),!0}var Gt=require("lodash-es");function We(e,t="default",r){if(!e||!Reflect.has(e,t)||!(0,Gt.isFunction)(e[t]))return null;let n=e[t];return n?n(r):null}function Yt(e,t=[]){let r=Object.keys(e),n={};return r.forEach(a=>{if(t.includes(a))return null;n[a]=c=>We(e,a,c)}),n}function Qt(e,{type:t="text/javascript"}={}){return new Promise((r,n)=>{let a=!1,c=document.querySelector(`script[src="${e}"]`);if(!c)c=document.createElement("script"),c.type=t,c.async=!0,c.src=e,a=!0;else if(c.hasAttribute("data-loaded")){r({el:c});return}c.addEventListener("error",n),c.addEventListener("abort",n),c.addEventListener("load",()=>{c.setAttribute("data-loaded","true"),r({el:c})}),a&&document.head.appendChild(c)})}function Xt(e){return new Promise((t,r)=>{let n=document.querySelector(`script[src="${e}"]`);if(!n){r();return}document.head.removeChild(n),t()})}function tr(e,t,r){return nr(e,t,r,!1)}function rr(e,t,r){return nr(e,t,r,!0).length>0}function Ue(e){return typeof e!="string"?e:e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Ie=new Map;function er(e,t){if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(r=>{if(typeof r!="string"){if(typeof r=="undefined")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})}function Ar(e,t){t=I({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(Ie.has(r))return Ie.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=Ue(e).replace(/\\\*/g,"[\\s\\S]*");let a=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return a.negated=n,Ie.set(r,a),a}function nr(e,t,r,n){if(e=er(e,"inputs"),t=er(t,"patterns"),t.length===0)return[];let a=t.map(o=>Ar(o,r)),{allPatterns:c}=r||{},d=[];for(let o of e){let b,y=a.map(()=>!1);for(let[u,B]of a.entries())if(B.test(o)&&(y[u]=!0,b=!B.negated,!b))break;if(!(b===!1||b===void 0&&a.some(u=>!u.negated)||c&&y.some((u,B)=>!u&&!a[B].negated))&&(d.push(o),n))break}return d}var Lr={id:"id",children:"children",pid:"pid"},V=e=>Object.assign({},Lr,e);function ir(e,t,r={}){r=V(r);let{children:n}=r,a=[...e];for(let c of a){if(t(c))return c;c[n]&&a.push(...c[n])}return null}function or(e,t,r={}){r=V(r);let{children:n}=r,a=[...e],c=[];for(let d of a)t(d)&&c.push(d),d[n]&&a.push(...d[n]);return c}function sr(e,t,r={}){r=V(r);let n=[],a=[...e],c=new Set,{children:d}=r;for(;a.length;){let o=a[0];if(c.has(o))n.pop(),a.shift();else if(c.add(o),o[d]&&a.unshift(...o[d]),n.push(o),t(o))return n}return null}function ar(e,t,r={}){r=V(r);let n=[],a=[...e],c=[],d=new Set,{children:o}=r;for(;a.length;){let b=a[0];d.has(b)?(n.pop(),a.shift()):(d.add(b),b[o]&&a.unshift(...b[o]),n.push(b),t(b)&&c.push([...n]))}return c}function cr(e,t,r={}){r=V(r);let n=r.children;function a(c){return c.map(d=>I({},d)).filter(d=>(d[n]=d[n]&&a(d[n]),t(d)||d[n]&&d[n].length))}return a(e)}function fr(e,t,r={}){r=V(r);let n=[...e],{children:a}=r;for(let c=0;c<n.length;c++){if(t(n[c]))return;a&&n[c][a]&&n.splice(c+1,0,...n[c][a])}}function dr(e,t){return e.map(r=>Be(r,t))}function Be(e,{children:t="children",conversion:r}){let n=Array.isArray(e[t])&&e[t].length>0,a=r(e)||{};return n?q(I({},a),{[t]:e[t].map(c=>Be(c,{children:t,conversion:r}))}):I({},a)}var je=require("uuid");function lr({native:e=!0}={}){var t,r,n;return e?(n=(r=(t=window.crypto)==null?void 0:t.randomUUID)==null?void 0:r.call(t))!=null?n:(0,je.v4)():(0,je.v4)()}var ur=0;function pr(e=""){let t=Date.now(),r=Math.floor(Math.random()*1e9);return ur++,`${e}_${r}${ur}${String(t)}`}0&&(module.exports={AesEncryption,ResizeObserver,addClass,addLocationListener,addResizeListener,buildBEM,buildShortUUID,buildUUID,createBEM,createNamespace,createSearchReg,dataURLtoBlob,decodeByBase64,deepMerge,domOffEvent,domOnEvent,downloadByBase64,downloadByData,downloadByOnlineUrl,downloadByUrl,downloadPercent,enableTransitions,encryptByBase64,encryptByMd5,escapeStringRegexp,extendSlots,filterTree,findNode,findNodeAll,findPath,findPathAll,forEachTree,getActualWidthOfChars,getBoundingClientRect,getRawRoute,getSlot,getViewportOffset,hackCss,hasClass,is,isBrowser,isChineseText,isChrome,isClient,isIterableArray,isMatch,isNumeric,isObject,isPositiveInteger,isSafari,isServer,isSupportNativeEllipsis,isSupportResizeObserver,isUrl,loadScript,matcher,openWindow,pascalCase,pathToRegexp,regexpMap,regexpToPath,removeClass,removeResizeListener,safeKebabCase,setCssVar,setObjToUrlParams,titleCase,treeMap,treeMapEach,triggerWindowResize,unloadScript,unsetAllProperty,urlToBase64,useRafThrottle,withInstall});
package/dist/index.d.cts DELETED
@@ -1,330 +0,0 @@
1
- import { mode, pad } from 'crypto-js';
2
- export { default as ResizeObserver } from 'resize-observer-polyfill';
3
- export { pathToRegexp, compile as regexpToPath } from 'path-to-regexp';
4
- export { titleCase } from 'title-case';
5
-
6
- declare function pascalCase(value: string): string;
7
- /**
8
- * 在大多数情况下使用 lodash 的 `kebabCase`,
9
- * 但对包含数字的连续字母数字片段(例如 i18n、v2)保留为整体,避免被拆分为 i-18-n。
10
- * @param value 输入字符串
11
- * @returns 转换后的 kebab-case 字符串
12
- */
13
- declare function safeKebabCase(value?: string | null): string;
14
-
15
- declare const withInstall: (component: any, alias: string) => any;
16
- declare function getRawRoute(route: any): any;
17
- declare function openWindow(url: string, opt?: {
18
- target?: string;
19
- noopener?: boolean;
20
- noreferrer?: boolean;
21
- }): void;
22
- /**
23
- * 递归合并两个对象。
24
- *
25
- * @param source 要合并的源对象。
26
- * @param target 目标对象,合并后结果存放于此。
27
- * @param mergeArrays 如何合并数组。默认为replace。
28
- * - "union": 对数组执行并集操作。
29
- * - "intersection": 对数组执行交集操作。
30
- * - "concat": 连接数组。
31
- * - "replace": 用目标数组替换源数组。
32
- * @returns 合并后的对象。
33
- */
34
- declare function deepMerge(source: any, target: any, mergeArrays?: string): any;
35
- /**
36
- * Add the object as a parameter to the URL
37
- * @param baseUrl url
38
- * @param obj
39
- * @returns {string}
40
- * eg:
41
- * let obj = {a: '3', b: '4', c: ['1','2']}
42
- * setObjToUrlParams('www.baidu.com', obj)
43
- * ==>www.baidu.com?a=3&b=4&c=1,2
44
- */
45
- declare function setObjToUrlParams(baseUrl: string, obj: {
46
- [x: string]: any;
47
- }): string;
48
- declare function unsetAllProperty(params: object): void;
49
- declare function createSearchReg(key: string): RegExp;
50
- declare function getActualWidthOfChars(text?: string, options?: {
51
- size?: number;
52
- family?: string;
53
- }): number;
54
-
55
- type Mod = string | {
56
- [key: string]: any;
57
- };
58
- type Mods = Mod | Mod[];
59
- type BEM = ReturnType<typeof createBEM>;
60
- /**
61
- * bem helper
62
- * b() // 'button'
63
- * b('text') // 'button__text'
64
- * b({ disabled }) // 'button button--disabled'
65
- * b('text', { disabled }) // 'button__text button__text--disabled'
66
- * b(['disabled', 'primary']) // 'button button--disabled button--primary'
67
- */
68
- declare function buildBEM(name: string): (el?: Mods, mods?: Mods) => string;
69
- declare function createBEM(name: string, prefixCls?: string): ((el?: Mods, mods?: Mods) => string)[];
70
- declare function createNamespace(name: string, prefixCls?: string): readonly [string, (el?: Mods, mods?: Mods) => string];
71
-
72
- interface Encryption {
73
- encryptByAES: (plainText: string) => string;
74
- decryptByAES: (cipherText: string) => string;
75
- }
76
- interface EncryptionParams {
77
- key: string;
78
- iv: string;
79
- }
80
- declare class AesEncryption implements Encryption {
81
- private readonly key;
82
- private readonly iv;
83
- constructor({ key, iv }: EncryptionParams);
84
- get getOptions(): {
85
- mode: typeof mode.CTR;
86
- padding: typeof pad.Pkcs7;
87
- iv: CryptoJS.lib.WordArray;
88
- };
89
- encryptByAES(cipherText: string): string;
90
- decryptByAES(cipherText: string): string;
91
- }
92
- declare function encryptByBase64(cipherText: string): string;
93
- declare function decodeByBase64(cipherText: string): string;
94
- declare function encryptByMd5(password: string): string;
95
-
96
- interface ViewportOffsetResult {
97
- /**
98
- * 元素左边距离 body 左边的距离(和 getBoundingClientRect 的 left 一样)
99
- */
100
- left: number;
101
- /**
102
- * 元素顶边距离 body 顶边的距离(和 getBoundingClientRect 的 top 一样)
103
- */
104
- top: number;
105
- /**
106
- * 元素右边距离 body 右边的距离
107
- */
108
- right: number;
109
- /**
110
- * 元素底边距离 body 底边的距离
111
- */
112
- bottom: number;
113
- /**
114
- * 内容宽度 + 计算后的 right
115
- */
116
- rightIncludeBody: number;
117
- /**
118
- * 内容高度 + 计算后的 bottom
119
- */
120
- bottomIncludeBody: number;
121
- }
122
- declare function getBoundingClientRect(element: Element): DOMRect | number;
123
- declare function hasClass(el: HTMLElement, cls: string): boolean;
124
- declare function setCssVar(prop: string, val: string, dom: HTMLElement): {
125
- prop: string;
126
- };
127
- declare function addClass(el: HTMLElement, cls: string): void;
128
- declare function removeClass(el: HTMLElement, cls: string): void;
129
- /**
130
- * 获取当前元素的左上偏移
131
- * left:最左边的元素到文档左边的距离
132
- * top:元素顶部到文档顶部的距离
133
- * right:元素最右边到文档右边的距离
134
- * bottom:元素底部到文档底部的距离
135
- * rightIncludeBody:文档最左边的元素到右边的距离
136
- * bottomIncludeBody:元素底部到文档底部的距离
137
- */
138
- declare function getViewportOffset(element: HTMLElement): ViewportOffsetResult | Record<string, number>;
139
- declare function hackCss(attr: string, value: any): any;
140
- type EventTarget = Element | HTMLElement | Document | Window;
141
- type EventListenerOrEventListenerObject = (evt: Event) => void | {
142
- handleEvent: (evt: Event) => void;
143
- };
144
- declare function on(element: EventTarget, event: string, handler: EventListenerOrEventListenerObject): void;
145
- declare function off(element: EventTarget, event: string, handler: EventListenerOrEventListenerObject): void;
146
- declare function useRafThrottle(fn: () => any): (...args: any[]) => void;
147
-
148
- declare function addResizeListener(element: any, fn: () => any): void;
149
- declare function removeResizeListener(element: any, fn: () => any): void;
150
- declare function triggerWindowResize(): void;
151
- declare function addLocationListener(fn: () => void, options?: AddEventListenerOptions): {
152
- removeListener: () => void;
153
- };
154
-
155
- /**
156
- * @description: base64 to blob
157
- */
158
- declare function dataURLtoBlob(base64Buf: string): Blob;
159
- /**
160
- * img url to base64
161
- * @param url
162
- */
163
- declare function urlToBase64(url: string, mineType?: string): Promise<string>;
164
- declare function downloadPercent(event: ProgressEvent): number;
165
- /**
166
- * Download online pictures
167
- * @param url
168
- * @param filename
169
- * @param mime
170
- * @param bom
171
- */
172
- declare function downloadByOnlineUrl(url: string, filename: string, mime?: string, bom?: BlobPart): void;
173
- /**
174
- * Download file based on base64
175
- * @param buf
176
- * @param filename
177
- * @param mime
178
- * @param bom
179
- */
180
- declare function downloadByBase64(buf: string, filename: string, mime?: string, bom?: BlobPart): void;
181
- /**
182
- * Download according to the background interface file stream
183
- * @param {*} data
184
- * @param {*} filename
185
- * @param {*} mime
186
- * @param {*} bom
187
- */
188
- declare function downloadByData(data: BlobPart, filename: string, mime?: string, bom?: BlobPart): void;
189
- /**
190
- * Download file according to file address
191
- * @param {*} sUrl
192
- */
193
- declare function downloadByUrl({ url, target, fileName }: {
194
- url: string;
195
- target?: TargetContext;
196
- fileName?: string;
197
- }): boolean;
198
-
199
- declare function is(val: unknown, type: string): boolean;
200
- declare function isObject(val: any): boolean;
201
- declare function isUrl(path: string): boolean;
202
- declare function isIterableArray(val: any): boolean;
203
- declare function isPositiveInteger(num: any): boolean;
204
- declare function isNumeric(str: string): boolean;
205
- declare const isServer: boolean;
206
- declare const isClient: boolean;
207
- declare const isChrome: boolean;
208
- declare const isSafari: boolean;
209
- declare const isBrowser: boolean;
210
- /** Whether the environment support -webkit-line-clamp. */
211
- declare const isSupportNativeEllipsis: boolean;
212
- /** Whether the environment support ResizeObserver. */
213
- declare const isSupportResizeObserver: boolean;
214
- declare const isChineseText: (text: string) => boolean;
215
- declare const enableTransitions: () => boolean;
216
-
217
- interface InternalSlots {
218
- [name: string]: any;
219
- }
220
- /**
221
- * @description: Get slot to prevent empty error
222
- */
223
- declare function getSlot(slots: Readonly<InternalSlots>, slot?: string, data?: any): any;
224
- /**
225
- * extends slots
226
- * @param slots
227
- * @param excludeKeys
228
- */
229
- declare function extendSlots(slots: Readonly<InternalSlots>, excludeKeys?: string[]): any;
230
-
231
- declare function loadScript(src: string, { type }?: {
232
- type?: string | undefined;
233
- }): Promise<unknown>;
234
- declare function unloadScript(src: string): Promise<void>;
235
-
236
- /**
237
- * 简单的通配符匹配工具, 可在换行符之间匹配 ==> foo*r will match foo\nbar.
238
- * 如有更复杂的需求可参考 https://github.com/micromatch/micromatch
239
- * https://github.com/sindresorhus/matcher
240
- * matcher(['foo', 'bar', 'moo'], ['*oo', '!foo']); //=> ['moo']
241
- * matcher(['foo', 'bar', 'moo'], ['!*oo']); //=> ['bar']
242
- * matcher('moo', ['']); //=> []
243
- * matcher('moo', []); //=> []
244
- * matcher([''], ['']); //=> ['']
245
- * matcher(['foo', 'for', 'bar'], ['f*', 'b*', '!x*'], {allPatterns: true}); //=> ['foo', 'for', 'bar']
246
- * matcher(['foo', 'for', 'bar'], ['f*'], {allPatterns: true}); //=> []
247
- *
248
- * isMatch('unicorn', 'uni*'); //=> true
249
- * isMatch('unicorn', '*corn'); //=> true
250
- * isMatch('unicorn', 'un*rn'); //=> true
251
- * isMatch('rainbow', '!unicorn'); //=> true
252
- * isMatch('foo bar baz', 'foo b* b*'); //=> true
253
- * isMatch('unicorn', 'uni\\*'); //=> false
254
- * isMatch(['foo', 'bar'], 'f*'); //=> true
255
- * isMatch(['foo', 'bar'], ['a*', 'b*']); //=> true
256
- * isMatch('unicorn', ['']); //=> false
257
- * isMatch('unicorn', []); //=> false
258
- * isMatch([], 'bar'); //=> false
259
- * isMatch([], []); //=> false
260
- * isMatch('', ''); //=> true
261
- * isMatch('UNICORN', 'UNI*', {caseSensitive: true}); //=> true
262
- * isMatch('UNICORN', 'unicorn', {caseSensitive: true}); //=> false
263
- * isMatch('unicorn', ['tri*', 'UNI*'], {caseSensitive: true}); //=> false
264
- */
265
- interface MatcherOptions {
266
- caseSensitive?: boolean;
267
- allPatterns?: boolean;
268
- }
269
- /**
270
- * 接受inputs和patterns
271
- * @param {string | string[]} inputs 待匹配的字符串或字符串数组
272
- * @param {string | string[]} patterns 使用 * 作为通配符,! 作为否定
273
- * @param {boolean} options.caseSensitive 不区分大小写,谨慎使用,一般情况都是需要区分大小的
274
- * @param {boolean} options.allPatterns 所有否定的模式不匹配,而任何正常模式至少匹配一次;否则,将视为不匹配条件
275
- * @returns an array of inputs filtered based on the patterns.
276
- */
277
- declare function matcher(inputs: string | string[], patterns: string | string[], options?: MatcherOptions): string[];
278
- declare function isMatch(inputs: string | string[], patterns: string | string[], options?: MatcherOptions): boolean;
279
- declare function escapeStringRegexp(value: string): string;
280
-
281
- declare const regexpMap: {
282
- mobile: RegExp;
283
- tel: RegExp;
284
- numAndLetter: RegExp;
285
- password: RegExp;
286
- email: RegExp;
287
- postalCode: RegExp;
288
- identityCard: RegExp;
289
- ip: RegExp;
290
- url: RegExp;
291
- httpsUrl: RegExp;
292
- domain: RegExp;
293
- plateNumber: RegExp;
294
- md5: RegExp;
295
- base64: RegExp;
296
- uuid: RegExp;
297
- version: RegExp;
298
- videoUrl: RegExp;
299
- imageUrl: RegExp;
300
- chinese: RegExp;
301
- itcode: RegExp;
302
- numeric: RegExp;
303
- };
304
-
305
- interface TreeHelperConfig {
306
- id: string;
307
- children: string;
308
- pid: string;
309
- }
310
- declare function findNode<T = any>(tree: any, func: Fn, config?: Partial<TreeHelperConfig>): T | null;
311
- declare function findNodeAll<T = any>(tree: any, func: Fn, config?: Partial<TreeHelperConfig>): T[];
312
- declare function findPath<T = any>(tree: any, func: Fn, config?: Partial<TreeHelperConfig>): T | T[] | null;
313
- declare function findPathAll(tree: any, func: Fn, config?: Partial<TreeHelperConfig>): any[][];
314
- declare function filter<T = any>(tree: T[], func: (n: T) => boolean, config?: Partial<TreeHelperConfig>): T[];
315
- declare function forEach<T = any>(tree: T[], func: (n: T) => any, config?: Partial<TreeHelperConfig>): void;
316
- declare function treeMap<T = any>(treeData: T[], opt: {
317
- children?: string;
318
- conversion: Fn;
319
- }): T[];
320
- declare function treeMapEach(data: any, { children, conversion }: {
321
- children?: string;
322
- conversion: Fn;
323
- }): any;
324
-
325
- declare function buildUUID({ native }?: {
326
- native?: boolean | undefined;
327
- }): string;
328
- declare function buildShortUUID(prefix?: string): string;
329
-
330
- export { AesEncryption, type BEM, addClass, addLocationListener, addResizeListener, buildBEM, buildShortUUID, buildUUID, createBEM, createNamespace, createSearchReg, dataURLtoBlob, decodeByBase64, deepMerge, off as domOffEvent, on as domOnEvent, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadPercent, enableTransitions, encryptByBase64, encryptByMd5, escapeStringRegexp, extendSlots, filter as filterTree, findNode, findNodeAll, findPath, findPathAll, forEach as forEachTree, getActualWidthOfChars, getBoundingClientRect, getRawRoute, getSlot, getViewportOffset, hackCss, hasClass, is, isBrowser, isChineseText, isChrome, isClient, isIterableArray, isMatch, isNumeric, isObject, isPositiveInteger, isSafari, isServer, isSupportNativeEllipsis, isSupportResizeObserver, isUrl, loadScript, matcher, openWindow, pascalCase, regexpMap, removeClass, removeResizeListener, safeKebabCase, setCssVar, setObjToUrlParams, treeMap, treeMapEach, triggerWindowResize, unloadScript, unsetAllProperty, urlToBase64, useRafThrottle, withInstall };