nhanh-pure-function 2.0.6 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Animate/index.d.ts +45 -0
- package/dist/Animate/type.d.ts +0 -0
- package/dist/Blob/index.d.ts +10 -0
- package/dist/Blob/type.d.ts +0 -0
- package/dist/Browser/index.d.ts +52 -0
- package/dist/Browser/type.d.ts +0 -0
- package/dist/{User → Element}/index.d.ts +11 -20
- package/dist/File/index.d.ts +19 -0
- package/dist/File/type.d.ts +0 -0
- package/dist/Format/index.d.ts +75 -0
- package/dist/Format/type.d.ts +0 -0
- package/dist/Math/index.d.ts +24 -76
- package/dist/Math/type.d.ts +0 -4
- package/dist/Utility/index.d.ts +23 -227
- package/dist/Valid/index.d.ts +131 -0
- package/dist/Valid/type.d.ts +4 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.es.js +808 -705
- package/package.json +1 -1
- /package/dist/{User → Element}/type.d.ts +0 -0
package/dist/Utility/index.d.ts
CHANGED
|
@@ -1,97 +1,22 @@
|
|
|
1
|
-
import { FileType, WindowTarget } from '../Constant';
|
|
2
|
-
/**
|
|
3
|
-
* 非null | undefined判断
|
|
4
|
-
* @param value any
|
|
5
|
-
* @returns boolean
|
|
6
|
-
*/
|
|
7
|
-
export declare function _NotNull(value: any): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* 是正常对象吗
|
|
10
|
-
* @param {} value
|
|
11
|
-
* @returns boolean
|
|
12
|
-
*/
|
|
13
|
-
export declare function _IsObject(value: any): boolean;
|
|
14
1
|
/**
|
|
15
2
|
* 寻找空闲时机执行传入方法
|
|
16
3
|
* @param callback 需执行的方法
|
|
17
4
|
*/
|
|
18
|
-
export declare function
|
|
5
|
+
export declare function _Utility_ExecuteWhenIdle(callback: Function): void;
|
|
19
6
|
/**
|
|
20
7
|
* 等待条件满足
|
|
21
8
|
* @param conditionChecker 条件检查器
|
|
22
9
|
* @param timeoutMillis 超时毫秒数
|
|
23
10
|
* @returns Promise<unknown>
|
|
24
11
|
*/
|
|
25
|
-
export declare function
|
|
26
|
-
/**
|
|
27
|
-
* 排除子串
|
|
28
|
-
* @param inputString 需裁剪字符串
|
|
29
|
-
* @param substringToDelete 被裁减字符串
|
|
30
|
-
* @param delimiter 分隔符
|
|
31
|
-
* @returns 裁减后的字符串
|
|
32
|
-
*/
|
|
33
|
-
export declare function _ExcludeSubstring(inputString: string, substringToDelete: string, delimiter?: string): string;
|
|
34
|
-
/**
|
|
35
|
-
* 首字母大写
|
|
36
|
-
* @param str
|
|
37
|
-
* @returns string
|
|
38
|
-
*/
|
|
39
|
-
export declare function _CapitalizeFirstLetter(string: string): string;
|
|
12
|
+
export declare function _Utility_WaitForCondition(conditionChecker: () => boolean, timeoutMillis: number): Promise<"完成" | "超时">;
|
|
40
13
|
/**
|
|
41
14
|
* 合并对象 注意: 本函数会直接操作 A
|
|
42
15
|
* @param {Object | Array} A
|
|
43
16
|
* @param {Object | Array} B
|
|
44
17
|
* @returns (A & B) | A | B | undefined
|
|
45
18
|
*/
|
|
46
|
-
export declare function
|
|
47
|
-
/**
|
|
48
|
-
* 时间戳转换字符串
|
|
49
|
-
* @param {Number | Date} time 时间戳或Date对象
|
|
50
|
-
* @param {String} template 完整模板 --> YYYY MM DD hh mm ss ms
|
|
51
|
-
* @param {Boolean} pad 补0
|
|
52
|
-
*/
|
|
53
|
-
export declare function _TimeTransition(time: number | Date, template?: string, pad?: boolean): string;
|
|
54
|
-
/**
|
|
55
|
-
* 读取文件
|
|
56
|
-
* @param src 文件地址
|
|
57
|
-
* @returns 文件的字符串内容
|
|
58
|
-
*/
|
|
59
|
-
export declare function _ReadFile(src: string): Promise<string>;
|
|
60
|
-
/**
|
|
61
|
-
* 从给定的href中提取名称部分
|
|
62
|
-
* 该函数旨在处理URL字符串,并返回URL路径的最后一部分,去除查询参数
|
|
63
|
-
*
|
|
64
|
-
* @param {string} href - 待处理的URL字符串
|
|
65
|
-
* @param {string} [defaultName="file"] - 默认的文件名,当无法提取时使用
|
|
66
|
-
* @returns {string} URL路径的最后一部分,不包括查询参数
|
|
67
|
-
*/
|
|
68
|
-
export declare function _GetHrefName(href: string, defaultName?: string): string;
|
|
69
|
-
/**
|
|
70
|
-
* 下载文件
|
|
71
|
-
* @param {string} href - 文件路径
|
|
72
|
-
* @param {string} [fileName] - 导出文件名
|
|
73
|
-
*/
|
|
74
|
-
export declare function _DownloadFile(href: string, fileName?: string): Promise<unknown>;
|
|
75
|
-
/**
|
|
76
|
-
* 获取帧率
|
|
77
|
-
* @param {(fps , frameTime)=>void} callback callback( 帧率 , 每帧时间 )
|
|
78
|
-
* @param {Number} referenceNode 参考节点数量
|
|
79
|
-
*/
|
|
80
|
-
export declare function _GetFrameRate(callback: (fps: number, frameTime: number) => void, referenceNode?: number): void;
|
|
81
|
-
/**
|
|
82
|
-
* 驼峰命名
|
|
83
|
-
* @param {字符串} str
|
|
84
|
-
* @param {是否删除分割字符} isRemoveDelimiter
|
|
85
|
-
* @returns 'wq1wqw-qw2qw' -> 'wq1Wqw-Qw2Qw' / 'wqWqwQwQw'
|
|
86
|
-
*/
|
|
87
|
-
export declare function _ConvertToCamelCase(str: string, isRemoveDelimiter?: boolean): string;
|
|
88
|
-
/**
|
|
89
|
-
* 创建文件并下载
|
|
90
|
-
* @param {BlobPart[]} content 文件内容
|
|
91
|
-
* @param {string} fileName 文件名称
|
|
92
|
-
* @param {BlobPropertyBag} options Blob 配置
|
|
93
|
-
*/
|
|
94
|
-
export declare function _CreateAndDownloadFile(content: BlobPart[], fileName: string, options?: BlobPropertyBag): void;
|
|
19
|
+
export declare function _Utility_MergeObjects<T, T1>(A: T, B: T1, visitedObjects?: [any, any][], outTime?: number): (T & T1) | T | T1 | undefined;
|
|
95
20
|
/**
|
|
96
21
|
* 生成一个UUID(通用唯一标识符)字符串
|
|
97
22
|
* 可以选择性地在UUID前面添加前缀
|
|
@@ -99,32 +24,21 @@ export declare function _CreateAndDownloadFile(content: BlobPart[], fileName: st
|
|
|
99
24
|
* @param {string} prefix - 可选参数,要添加到UUID前面的前缀
|
|
100
25
|
* @returns {string} 一个带有可选前缀的UUID字符串
|
|
101
26
|
*/
|
|
102
|
-
export declare function
|
|
27
|
+
export declare function _Utility_GenerateUUID(prefix?: string): string;
|
|
103
28
|
/**
|
|
104
29
|
* 防抖
|
|
105
30
|
* @param {Function} fn
|
|
106
31
|
* @param {number} delay
|
|
107
32
|
* @returns {Function}
|
|
108
33
|
*/
|
|
109
|
-
export declare function
|
|
34
|
+
export declare function _Utility_Debounce<T extends (...args: any[]) => void>(fn: T, delay: number): (...args: Parameters<T>) => void;
|
|
110
35
|
/**
|
|
111
36
|
* 节流
|
|
112
37
|
* @param {Function} fn
|
|
113
38
|
* @param {number} delay
|
|
114
39
|
* @returns {Function}
|
|
115
40
|
*/
|
|
116
|
-
export declare function
|
|
117
|
-
/**
|
|
118
|
-
* 数据类型
|
|
119
|
-
* @param {any} value
|
|
120
|
-
* @returns string
|
|
121
|
-
*/
|
|
122
|
-
export declare function _DataType(value: any): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "array" | "null";
|
|
123
|
-
/**
|
|
124
|
-
* 复制到剪贴板
|
|
125
|
-
* @param {string} text
|
|
126
|
-
*/
|
|
127
|
-
export declare function _CopyToClipboard(text: string): Promise<void>;
|
|
41
|
+
export declare function _Utility_Throttle<T extends (...args: any[]) => void>(fn: T, delay: number): (...args: Parameters<T>) => void;
|
|
128
42
|
/**
|
|
129
43
|
* 根据路径初始化目标对象
|
|
130
44
|
* 如果路径中某个属性不存在,则会创建该属性及其所有父属性
|
|
@@ -132,9 +46,10 @@ export declare function _CopyToClipboard(text: string): Promise<void>;
|
|
|
132
46
|
*
|
|
133
47
|
* @param {Object} model - 要初始化的模型对象
|
|
134
48
|
* @param {string} path - 属性路径,使用英文句点分隔
|
|
135
|
-
* @
|
|
49
|
+
* @param {any} initValue - 初始值
|
|
50
|
+
* @returns {any} 路径的最后一个属性对应的值或 initValue
|
|
136
51
|
*/
|
|
137
|
-
export declare function
|
|
52
|
+
export declare function _Utility_InitTargetByPath(model: any, path: string, initValue?: any): any;
|
|
138
53
|
/**
|
|
139
54
|
* 根据路径获取目标对象
|
|
140
55
|
* 该函数用于在给定的模型中,通过路径字符串来获取深层嵌套的目标对象如果路径中的某一部分不存在,则会创建一个新的对象(除非已经是路径的最后一部分)
|
|
@@ -143,7 +58,7 @@ export declare function _InitTargetByPath(model: any, path: string): any;
|
|
|
143
58
|
* @param {string} path - 用点分隔的路径字符串,表示要访问的对象属性路径
|
|
144
59
|
* @returns {Object|undefined} - 返回目标对象,如果路径不存在则返回undefined
|
|
145
60
|
*/
|
|
146
|
-
export declare function
|
|
61
|
+
export declare function _Utility_GetTargetByPath(model: any, path: string): any;
|
|
147
62
|
/**
|
|
148
63
|
* 根据路径更新目标值
|
|
149
64
|
*
|
|
@@ -155,85 +70,7 @@ export declare function _GetTargetByPath(model: any, path: string): any;
|
|
|
155
70
|
* @param {*} value - 要设置的新值
|
|
156
71
|
* @returns {*} - 返回更新后的模型对象中的值
|
|
157
72
|
*/
|
|
158
|
-
export declare function
|
|
159
|
-
/**
|
|
160
|
-
* 使用 XMLHttpRequest 检查指定 URL 的连接状态
|
|
161
|
-
*
|
|
162
|
-
* 此函数通过发送一个 HEAD 请求来检查给定 URL 是否可访问 HEAD 请求仅请求文档头部信息,
|
|
163
|
-
* 而不是整个页面,因此比 GET 或 POST 请求更快此方法常用于检查 URL 是否有效,以及服务器的响应时间等
|
|
164
|
-
*
|
|
165
|
-
* @param {string} url - 需要检查连接的 URL 地址
|
|
166
|
-
* @returns {Promise} - 返回一个 Promise 对象,该对象在连接成功时解析,在连接失败时拒绝
|
|
167
|
-
*/
|
|
168
|
-
export declare function _CheckConnectionWithXHR(url: string): Promise<unknown>;
|
|
169
|
-
/**
|
|
170
|
-
* 判断给定URL是否指向一个安全上下文
|
|
171
|
-
*
|
|
172
|
-
* 安全上下文是指通过一系列安全协议访问的资源,这些协议提供了数据的加密传输和身份验证
|
|
173
|
-
* 本函数通过检查URL的协议前缀来判断是否属于安全上下文
|
|
174
|
-
*
|
|
175
|
-
* @param {string} url - 待检查的URL字符串
|
|
176
|
-
* @returns {boolean} - 如果URL指向安全上下文,则返回true;否则返回false
|
|
177
|
-
*/
|
|
178
|
-
export declare function _IsSecureContext(url: string): boolean;
|
|
179
|
-
/**
|
|
180
|
-
* 文件类型检查器类
|
|
181
|
-
* 用于检查文件URL的类型
|
|
182
|
-
*/
|
|
183
|
-
export declare class _FileTypeChecker {
|
|
184
|
-
private static cachedEntries;
|
|
185
|
-
constructor();
|
|
186
|
-
/**
|
|
187
|
-
* 检查给定URL的文件类型
|
|
188
|
-
* @param {string} url - 文件的URL
|
|
189
|
-
* @param {string} [type] - 可选参数,指定要检查的文件类型
|
|
190
|
-
* @returns {string} - 如果URL与指定类型或任何已知类型匹配,则返回文件类型,否则返回"unknown"
|
|
191
|
-
*/
|
|
192
|
-
static check(url: string): FileType | "unknown";
|
|
193
|
-
static check(url: string, type: FileType): boolean;
|
|
194
|
-
/**
|
|
195
|
-
* 静态方法,用于解析地址信息
|
|
196
|
-
* 该方法接受一个URL字符串,将其解析为一个包含地址详情的对象数组
|
|
197
|
-
* 主要用于批量处理以逗号分隔的URL列表,为每个URL生成相应的名称和类型
|
|
198
|
-
*
|
|
199
|
-
* @param {string} url - 以逗号分隔的URL字符串,每个URL代表一个资源的位置
|
|
200
|
-
* @returns {Array} - 包含每个URL及其相关信息(名称和类型)的对象数组
|
|
201
|
-
*/
|
|
202
|
-
static parseAddresses(url: string): {
|
|
203
|
-
url: string;
|
|
204
|
-
name: string;
|
|
205
|
-
type: "audio" | "code" | "script" | "video" | "image" | "ppt" | "word" | "excel" | "pdf" | "text" | "archive" | "font" | "database" | "markup" | "configuration" | "logs" | "unknown";
|
|
206
|
-
}[];
|
|
207
|
-
/**
|
|
208
|
-
* 检查 MIME 类型是否与指定的模式匹配
|
|
209
|
-
* @param {string} type - 要检查的 MIME 类型(如 "image/png")
|
|
210
|
-
* @param {string} [accept] - 可接受的 MIME 类型模式(如 "image/*, text/plain")
|
|
211
|
-
* @returns {boolean} - 如果类型匹配,则返回 true,否则返回 false
|
|
212
|
-
*/
|
|
213
|
-
static matchesMimeType(type: string, accept?: string): boolean;
|
|
214
|
-
/**
|
|
215
|
-
* 类型标准化函数
|
|
216
|
-
* 该函数旨在将文件类型或MIME类型字符串转换为标准格式
|
|
217
|
-
* 主要处理三种情况:带扩展名的字符串、简写格式的类型以及已标准格式的类型
|
|
218
|
-
*
|
|
219
|
-
* @param {string} type - 文件类型或MIME类型字符串
|
|
220
|
-
* @returns {string} 标准化的MIME类型字符串,如果无法识别则返回原始输入
|
|
221
|
-
*/
|
|
222
|
-
static _normalizeType(type: string): string;
|
|
223
|
-
/**
|
|
224
|
-
* 检查URL是否具有任何指定的文件扩展名
|
|
225
|
-
* @param {string} url - 文件的URL
|
|
226
|
-
* @param {string[]} validExtensions - 有效文件扩展名的数组
|
|
227
|
-
* @returns {boolean} - 如果URL具有任何指定的文件扩展名,则返回true,否则返回false
|
|
228
|
-
*/
|
|
229
|
-
static _checkExtension(url: string, validExtensions: string[]): boolean;
|
|
230
|
-
/**
|
|
231
|
-
* 检测文件URL的类型
|
|
232
|
-
* @param {string} url - 文件的URL
|
|
233
|
-
* @returns {string} - 如果URL与任何已知类型匹配,则返回文件类型,否则返回"unknown"
|
|
234
|
-
*/
|
|
235
|
-
static _detectFileType(url: string): "audio" | "code" | "script" | "video" | "image" | "ppt" | "word" | "excel" | "pdf" | "text" | "archive" | "font" | "database" | "markup" | "configuration" | "logs" | "unknown";
|
|
236
|
-
}
|
|
73
|
+
export declare function _Utility_SetTargetByPath(model: any, path: string, value: any): any;
|
|
237
74
|
/**
|
|
238
75
|
* 旋转列表函数
|
|
239
76
|
*
|
|
@@ -243,68 +80,27 @@ export declare class _FileTypeChecker {
|
|
|
243
80
|
* @param list T[] - 需要旋转的列表,列表元素类型为泛型T
|
|
244
81
|
* @returns T[][] - 返回一个二维数组,每个内部数组代表原列表的一种旋转形式
|
|
245
82
|
*/
|
|
246
|
-
export declare function
|
|
83
|
+
export declare function _Utility_RotateList<T>(list: T[]): T[][];
|
|
247
84
|
/**
|
|
248
85
|
* 克隆给定值的函数
|
|
249
86
|
* 该函数尝试使用window.structuredClone方法进行深克隆,如果失败则使用自定义方法
|
|
250
87
|
* @param {any} val - 需要克隆的值
|
|
251
88
|
* @returns {any} - 克隆后的值
|
|
252
89
|
*/
|
|
253
|
-
export declare function
|
|
254
|
-
/**
|
|
255
|
-
* 管理通过键值对打开的窗口
|
|
256
|
-
*/
|
|
257
|
-
export declare class _KeyedWindowManager {
|
|
258
|
-
private static keys;
|
|
259
|
-
/** 请使用静态方法 */
|
|
260
|
-
private constructor();
|
|
261
|
-
/** 添加已有窗口 */
|
|
262
|
-
static add(key: string, win: Window): void;
|
|
263
|
-
/**
|
|
264
|
-
* 根据键打开或聚焦窗口
|
|
265
|
-
* @param key 窗口的唯一键
|
|
266
|
-
* @param url 要打开的URL
|
|
267
|
-
* @param target 窗口的目标
|
|
268
|
-
* @param windowFeatures 新窗口的特性
|
|
269
|
-
* @returns 返回已打开或新打开的窗口
|
|
270
|
-
*/
|
|
271
|
-
static open(key: string, url?: string | URL, target?: WindowTarget, windowFeatures?: string): Window | undefined;
|
|
272
|
-
/**
|
|
273
|
-
* 检查指定键的窗口是否打开
|
|
274
|
-
* @param key 窗口的唯一键
|
|
275
|
-
* @returns 如果窗口打开则返回true,否则返回false
|
|
276
|
-
*/
|
|
277
|
-
static isOpen(key: string): boolean;
|
|
278
|
-
/**
|
|
279
|
-
* 获取与指定键关联的窗口
|
|
280
|
-
* @param key 窗口的唯一键
|
|
281
|
-
* @returns 返回对应的窗口,如果窗口已关闭则返回undefined
|
|
282
|
-
*/
|
|
283
|
-
static getWindow(key: string): Window | undefined;
|
|
284
|
-
/**
|
|
285
|
-
* 关闭与指定键关联的窗口
|
|
286
|
-
* @param key 窗口的唯一键
|
|
287
|
-
*/
|
|
288
|
-
static close(key: string): void;
|
|
289
|
-
/**
|
|
290
|
-
* 关闭所有打开的窗口并清空Map
|
|
291
|
-
*/
|
|
292
|
-
static closeAll(): void;
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* 将不同格式的数据转换为图像 URL
|
|
296
|
-
* 此函数支持多种类型的数据输入,包括字符串(Base64/Data URL)、ArrayBuffer、Uint8Array和File,
|
|
297
|
-
* 并尝试将这些数据转换为指定MIME类型的图像URL
|
|
298
|
-
*
|
|
299
|
-
* @param data - 输入数据,可以是字符串(Base64/Data URL)、ArrayBuffer、Uint8Array或File实例
|
|
300
|
-
* @param mimeType - 期望的图像MIME类型,默认为'image/png'
|
|
301
|
-
* @returns 成功时返回图像的URL,失败时返回null
|
|
302
|
-
*/
|
|
303
|
-
export declare function _Danger_ConvertDataToImageUrl(data: string | ArrayBuffer | Uint8Array | File, mimeType?: string): string | null;
|
|
90
|
+
export declare function _Utility_Clone<T>(val: T): T | undefined;
|
|
304
91
|
/**
|
|
305
92
|
* 函数装饰器,用于测量并记录另一个函数的执行时间
|
|
306
93
|
* @param func 要测量执行时间的函数
|
|
307
94
|
* @param level 耗时与颜色对应的数组,用于在控制台中着色显示
|
|
308
95
|
* @param maxHistory 保留的最大历史记录数,默认为30
|
|
309
96
|
*/
|
|
310
|
-
export declare function
|
|
97
|
+
export declare function _Utility_TimeConsumption(func: Function, level: [number, string][], maxHistory?: number): void | ((...args: any[]) => any);
|
|
98
|
+
/**
|
|
99
|
+
* 暂停执行指定毫秒数的操作
|
|
100
|
+
* 此函数通过 busy-wait(忙等待)的方式实现,它会持续执行一些无用的操作以消耗时间
|
|
101
|
+
* 这种方法虽然简单,但会占用CPU资源,因此不推荐在实际应用中使用
|
|
102
|
+
*
|
|
103
|
+
* @param ms 暂停的毫秒数
|
|
104
|
+
* @returns 实际暂停的毫秒数
|
|
105
|
+
*/
|
|
106
|
+
export declare function _Utility_Sleep(ms: number): number;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { FileType } from '../Constant';
|
|
2
|
+
import { Point } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* 是正常对象吗
|
|
5
|
+
* @param {} value
|
|
6
|
+
* @returns boolean
|
|
7
|
+
*/
|
|
8
|
+
export declare function _Valid_IsObject(value: any): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* 检查单个一维数组参数是否合法(元素为有限数字)
|
|
11
|
+
* @param arr - 待检查的数组
|
|
12
|
+
* @param minLength - 数组最小长度 (默认2)
|
|
13
|
+
* @returns 参数合法返回 true,否则返回 false
|
|
14
|
+
*/
|
|
15
|
+
export declare function _Valid_IsNumberArray(arr: unknown, minLength?: number): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 检查二维数组结构是否合法(每个元素都是有效的一维数组)
|
|
18
|
+
* @param arr - 待检查的二维数组
|
|
19
|
+
* @param minLength - 外层数组最小长度 (默认1)
|
|
20
|
+
* @param innerMinLength - 内层数组最小长度 (默认2)
|
|
21
|
+
* @returns 所有元素都合法返回 true,否则返回 false
|
|
22
|
+
*/
|
|
23
|
+
export declare function _Valid_Is2DNumberArray(arr: unknown, minLength?: number, innerMinLength?: number): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 误差范围
|
|
26
|
+
* @param value 需要判断的数字
|
|
27
|
+
* @param target 目标数字
|
|
28
|
+
* @param errorMargin 正负误差范围
|
|
29
|
+
* @returns 是否在误差内
|
|
30
|
+
*/
|
|
31
|
+
export declare function _Valid_IsInMargin(value: number, target: number, errorMargin: number): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 判断点是否在多边形内
|
|
34
|
+
* @param point - 待检测的点,包含 x 和 y 坐标
|
|
35
|
+
* @param polygon - 多边形的点集,数组形式,每个点包含 x 和 y 坐标
|
|
36
|
+
* @returns boolean - 点是否在多边形内
|
|
37
|
+
*/
|
|
38
|
+
export declare function _Valid_IsPointInPolygon(point: Point, polygon: Point[]): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* 判断无限延伸的直线是否与矩形区域相交
|
|
41
|
+
* @param rectCorner1 矩形对角顶点1 [x, y]
|
|
42
|
+
* @param rectCorner2 矩形对角顶点2 [x, y]
|
|
43
|
+
* @param linePointA 直线上一点A [x, y]
|
|
44
|
+
* @param linePointB 直线上一点B [x, y]
|
|
45
|
+
* @returns 直线是否与矩形相交
|
|
46
|
+
*/
|
|
47
|
+
export declare function _Valid_DoesInfiniteLineIntersectRectangle(rectCorner1: [number, number], rectCorner2: [number, number], linePointA: [number, number], linePointB: [number, number]): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 数据类型
|
|
50
|
+
* @param {any} value
|
|
51
|
+
* @returns string
|
|
52
|
+
*/
|
|
53
|
+
export declare function _Valid_DataType(value: any): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "array" | "null";
|
|
54
|
+
/**
|
|
55
|
+
* 判断给定URL是否指向一个安全上下文
|
|
56
|
+
*
|
|
57
|
+
* 安全上下文是指通过一系列安全协议访问的资源,这些协议提供了数据的加密传输和身份验证
|
|
58
|
+
* 本函数通过检查URL的协议前缀来判断是否属于安全上下文
|
|
59
|
+
*
|
|
60
|
+
* @param {string} url - 待检查的URL字符串
|
|
61
|
+
* @returns {boolean} - 如果URL指向安全上下文,则返回true;否则返回false
|
|
62
|
+
*/
|
|
63
|
+
export declare function _Valid_IsSecureContext(url: string): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 使用 XMLHttpRequest 检查指定 URL 的连接状态
|
|
66
|
+
*
|
|
67
|
+
* 此函数通过发送一个 HEAD 请求来检查给定 URL 是否可访问 HEAD 请求仅请求文档头部信息,
|
|
68
|
+
* 而不是整个页面,因此比 GET 或 POST 请求更快此方法常用于检查 URL 是否有效,以及服务器的响应时间等
|
|
69
|
+
*
|
|
70
|
+
* @param {string} url - 需要检查连接的 URL 地址
|
|
71
|
+
* @returns {Promise} - 返回一个 Promise 对象,该对象在连接成功时解析,在连接失败时拒绝
|
|
72
|
+
*/
|
|
73
|
+
export declare function _Valid_CheckConnectionWithXHR(url: string): Promise<unknown>;
|
|
74
|
+
/**
|
|
75
|
+
* 文件类型检查器类
|
|
76
|
+
* 用于检查文件URL的类型
|
|
77
|
+
*/
|
|
78
|
+
export declare class _Valid_FileTypeChecker {
|
|
79
|
+
private static cachedEntries;
|
|
80
|
+
constructor();
|
|
81
|
+
/**
|
|
82
|
+
* 检查给定URL的文件类型
|
|
83
|
+
* @param {string} url - 文件的URL
|
|
84
|
+
* @param {string} [type] - 可选参数,指定要检查的文件类型
|
|
85
|
+
* @returns {string} - 如果URL与指定类型或任何已知类型匹配,则返回文件类型,否则返回"unknown"
|
|
86
|
+
*/
|
|
87
|
+
static check(url: string): FileType | "unknown";
|
|
88
|
+
static check(url: string, type: FileType): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* 静态方法,用于解析地址信息
|
|
91
|
+
* 该方法接受一个URL字符串,将其解析为一个包含地址详情的对象数组
|
|
92
|
+
* 主要用于批量处理以逗号分隔的URL列表,为每个URL生成相应的名称和类型
|
|
93
|
+
*
|
|
94
|
+
* @param {string} url - 以逗号分隔的URL字符串,每个URL代表一个资源的位置
|
|
95
|
+
* @returns {Array} - 包含每个URL及其相关信息(名称和类型)的对象数组
|
|
96
|
+
*/
|
|
97
|
+
static parseAddresses(url: string): {
|
|
98
|
+
url: string;
|
|
99
|
+
name: string;
|
|
100
|
+
type: "audio" | "code" | "script" | "video" | "image" | "ppt" | "word" | "excel" | "pdf" | "text" | "archive" | "font" | "database" | "markup" | "configuration" | "logs" | "unknown";
|
|
101
|
+
}[];
|
|
102
|
+
/**
|
|
103
|
+
* 检查 MIME 类型是否与指定的模式匹配
|
|
104
|
+
* @param {string} type - 要检查的 MIME 类型(如 "image/png")
|
|
105
|
+
* @param {string} [accept] - 可接受的 MIME 类型模式(如 "image/*, text/plain")
|
|
106
|
+
* @returns {boolean} - 如果类型匹配,则返回 true,否则返回 false
|
|
107
|
+
*/
|
|
108
|
+
static matchesMimeType(type: string, accept?: string): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* 类型标准化函数
|
|
111
|
+
* 该函数旨在将文件类型或MIME类型字符串转换为标准格式
|
|
112
|
+
* 主要处理三种情况:带扩展名的字符串、简写格式的类型以及已标准格式的类型
|
|
113
|
+
*
|
|
114
|
+
* @param {string} type - 文件类型或MIME类型字符串
|
|
115
|
+
* @returns {string} 标准化的MIME类型字符串,如果无法识别则返回原始输入
|
|
116
|
+
*/
|
|
117
|
+
static _normalizeType(type: string): string;
|
|
118
|
+
/**
|
|
119
|
+
* 检查URL是否具有任何指定的文件扩展名
|
|
120
|
+
* @param {string} url - 文件的URL
|
|
121
|
+
* @param {string[]} validExtensions - 有效文件扩展名的数组
|
|
122
|
+
* @returns {boolean} - 如果URL具有任何指定的文件扩展名,则返回true,否则返回false
|
|
123
|
+
*/
|
|
124
|
+
static _checkExtension(url: string, validExtensions: string[]): boolean;
|
|
125
|
+
/**
|
|
126
|
+
* 检测文件URL的类型
|
|
127
|
+
* @param {string} url - 文件的URL
|
|
128
|
+
* @returns {string} - 如果URL与任何已知类型匹配,则返回文件类型,否则返回"unknown"
|
|
129
|
+
*/
|
|
130
|
+
static _detectFileType(url: string): "audio" | "code" | "script" | "video" | "image" | "ppt" | "word" | "excel" | "pdf" | "text" | "archive" | "font" | "database" | "markup" | "configuration" | "logs" | "unknown";
|
|
131
|
+
}
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".nhanh-pure-function{--nhanh: 2233}.no-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}")),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
|
|
2
|
-
"use strict";var ie=Object.defineProperty;var V=n=>{throw TypeError(n)};var se=(n,t,e)=>t in n?ie(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var y=(n,t,e)=>se(n,typeof t!="symbol"?t+"":t,e),Z=(n,t,e)=>t.has(n)||V("Cannot "+e);var c=(n,t,e)=>(Z(n,t,"read from private field"),e?e.call(n):t.get(n)),f=(n,t,e)=>t.has(n)?V("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),m=(n,t,e,o)=>(Z(n,t,"write to private field"),o?o.call(n,e):t.set(n,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce={".mp3":"audio/mpeg",".mp4":"video/mp4",".m4a":"audio/mp4",".aac":"audio/aac",".ogg":"audio/ogg",".wav":"audio/wav",".flac":"audio/flac",".opus":"audio/opus",".webm":"video/webm",".avi":"video/x-msvideo",".mov":"video/quicktime",".wmv":"video/x-ms-wmv",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".bmp":"image/bmp",".tiff":"image/tiff",".ico":"image/vnd.microsoft.icon",".svg":"image/svg+xml",".webp":"image/webp",".heif":"image/heif",".heic":"image/heic",".json":"application/json",".xml":"application/xml",".html":"text/html",".htm":"text/html",".css":"text/css",".js":"application/javascript",".ts":"application/typescript",".csv":"text/csv",".tsv":"text/tab-separated-values",".txt":"text/plain",".md":"text/markdown",".rtf":"application/rtf",".pdf":"application/pdf",".zip":"application/zip",".rar":"application/x-rar-compressed",".tar":"application/x-tar",".gz":"application/gzip",".7z":"application/x-7z-compressed",".exe":"application/x-msdownload",".apk":"application/vnd.android.package-archive",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".odt":"application/vnd.oasis.opendocument.text",".ods":"application/vnd.oasis.opendocument.spreadsheet",".odp":"application/vnd.oasis.opendocument.presentation",".jsonld":"application/ld+json",".yaml":"application/x-yaml",".yml":"application/x-yaml",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject",".map":"application/json"},H={image:[".jpg",".jpeg",".png",".gif",".bmp",".webp",".tiff",".svg",".heif",".heic",".ico",".raw",".jfif",".avif",".png8",".indd",".eps",".ai"],ppt:[".ppt",".pptx",".odp"],word:[".doc",".docx",".odt",".rtf"],excel:[".xls",".xlsx",".ods",".csv",".tsv"],pdf:[".pdf"],text:[".txt",".csv",".md",".json",".yaml",".yml",".log",".ini",".rtf"],audio:[".mp3",".wav",".ogg",".flac",".aac",".wma",".m4a",".alac",".ape",".opus",".amr",".ra",".mid",".midi",".aiff",".pcm",".au",".wavpack",".spx"],video:[".mp4",".avi",".mkv",".mov",".wmv",".flv",".webm",".mpg",".mpeg",".3gp",".vob",".ogv",".m4v",".ts",".rm",".rmvb",".m2ts",".divx",".xvid",".swf",".f4v"],archive:[".zip",".rar",".tar",".gz",".bz2",".xz",".7z",".tar.gz",".tar.bz2",".tar.xz",".tar.lz",".tar.lzma",".cab",".iso",".dmg",".tgz",".apk",".gz2",".tar.zst"],code:[".js",".ts",".py",".java",".cpp",".c",".html",".css",".scss",".less",".sass",".php",".rb",".go",".swift",".rs",".kt",".scala",".lua",".pl",".m",".h",".xml",".json",".yaml",".yml",".toml",".vue",".ejs",".handlebars",".jinja",".dart"],font:[".woff",".woff2",".ttf",".otf",".eot",".svg",".ttc",".fnt",".fon",".otc"],database:[".sql",".sqlite",".db",".mdb",".accdb",".jsonld",".xml",".csv"],markup:[".html",".htm",".xhtml",".xml",".json",".yaml",".yml"],configuration:[".ini",".conf",".cfg",".env",".properties",".json",".toml"],logs:[".log",".err",".trace",".out"],script:[".bash",".sh",".zsh",".bat",".ps1",".vbs",".cmd",".sed",".awk",".php"]},K=["","万","亿","兆","京","垓","秭","穰","沟","涧","正","载","极"];function ae(n){return n!=null}function le(n){return!(n===null||typeof n!="object"||Array.isArray(n))}function ue(n){if(typeof n!="function")return console.error("非函数:",n);const t=function(e){e.didTimeout||e.timeRemaining()<=0?requestIdleCallback(t):n()};requestIdleCallback(t)}function me(n,t){const e=+new Date;return new Promise((o,r)=>{const i=()=>{if(+new Date-e>=t)return r("超时");if(n())return o("完成");requestIdleCallback(i)};i()})}function de(n,t,e=","){const o=new RegExp(`(^|${e})${t}(${e}|$)`,"g");return n.replace(o,function(r,i,s){return i===s?e:""})}function fe(n){return n.charAt(0).toUpperCase()+n.slice(1)}function N(n,t,e=[],o=+new Date){if(o<+new Date-50){console.error("_MergeObjects 合并异常:疑似死循环");return}const r=X(n),i=X(t);if(r!=i)return t;if(r=="object"||r=="array"){if(e.some(([s,a])=>s==n&&a==t))return n;if(e.push([n,t]),r=="object"){for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)){const a=t[s],l=n[s],u=N(l,a,e,o);n[s]=u}return n}else if(r=="array")return t.forEach((s,a)=>{const l=s,u=n[a],d=N(u,l,e,o);n[a]=d}),n}else return t}function he(n,t="YYYY-MM-DD hh:mm:ss",e=!0){const o=new Date(n);if(isNaN(o.getTime()))return console.error("Invalid date"),"";const r={YYYY:i=>i.getFullYear(),MM:i=>i.getMonth()+1,DD:i=>i.getDate(),hh:i=>i.getHours(),mm:i=>i.getMinutes(),ss:i=>i.getSeconds(),ms:i=>i.getMilliseconds()};return t.replace(/YYYY|MM|DD|hh|mm|ss|ms/g,i=>{const s=r[i](o);return e?String(s).padStart(2,"0"):String(s)})}function pe(n){return new Promise((t,e)=>{fetch(n).then(o=>t(o.text())).catch(o=>{console.error("Error fetching :",o),e(o)})})}function q(n,t="file"){if(!n||(n=String(n).trim(),n===""))return t;const e=n.split("/");return e[e.length-1].split("?")[0]}function ge(n,t){return new Promise((e,o)=>{try{t=t||q(n,"downloaded_file"),fetch(n).then(r=>(r.ok||o(`文件下载失败,状态码: ${r.status}`),r.blob())).then(r=>{const i=URL.createObjectURL(r),s=document.createElement("a");s.href=i,s.download=decodeURIComponent(t),document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(i),e(r)}).catch(o)}catch(r){o(r)}})}function we(n,t=10){let e=0,o=t;function r(){if(o>0)o--,requestAnimationFrame(r);else{const s=(+new Date-e)/t,a=1e3/s;n(Number(a.toFixed(2)),Number(s.toFixed(2)))}}requestAnimationFrame(()=>{e=+new Date,r()})}function xe(n,t){return n=n.replace(/([^a-zA-Z][a-z])/g,e=>e.toUpperCase()),t?n.replace(/[^a-zA-Z]+/g,""):n}function ve(n,t,e){if(!e){let s=t.replace(/^[^.]+./,"");s=s==t?"text/plain":"application/"+s,e={type:s}}const o=new Blob(n,e),r=URL.createObjectURL(o),i=document.createElement("a");i.href=r,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}function be(n=""){return n+"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function J(n,t){let e;return function(...o){clearTimeout(e),e=setTimeout(()=>{n(...o),e=void 0},t)}}function ye(n,t){let e=-1/0;return function(...o){const r=performance.now();if(r-e>t){e=r;try{n(...o)}catch(i){console.error("Throttled function execution failed:",i)}}}}function X(n){return Array.isArray(n)?"array":n===null?"null":typeof n}function _e(n){const t=()=>Promise.resolve(),e=a=>(console.error(a),Promise.reject(a));function o(){return navigator.clipboard.writeText(n).then(t).catch(e)}function r(){const a=document.createElement("div");a.innerText=n,document.body.appendChild(a);const l=document.createRange();l.selectNodeContents(a);const u=window.getSelection();let d=!1;return u&&(u.removeAllRanges(),u.addRange(l),d=document.execCommand("copy")),document.body.removeChild(a),d?Promise.resolve():Promise.reject()}function i(){const a=document.createElement("textarea");a.value=n,document.body.appendChild(a),a.select(),a.setSelectionRange(0,n.length);let l=!1;return document.activeElement===a&&(l=document.execCommand("Copy",!0)),document.body.removeChild(a),l?Promise.resolve():Promise.reject()}function s(){return r().then(t).catch(()=>{i().then(t).catch(()=>e("复制方式尽皆失效"))})}return navigator.clipboard?o().catch(s):s()}function Ce(n,t){const e=t.split(".");return e.reduce((o,r,i)=>(r in o||(i===e.length-1?o[r]=void 0:o[r]={}),o[r]),n)}function Ee(n,t){const e=t.split(".");return e.reduce((o,r,i)=>o.hasOwnProperty(r)?o[r]:o[r]=i==e.length-1?void 0:{},n)}function Me(n,t,e){const o=t.split(".");return o.reduce((r,i,s)=>(s===o.length-1&&(r[i]=e),r[i]),n)}function Fe(n){return new Promise((t,e)=>{if(typeof n!="string"||n.trim()===""||!n.includes("://")){e(new Error("Invalid URL: Must be a non-empty string"));return}try{new XMLHttpRequest().open("HEAD",n,!0)}catch(i){e(new Error(`Invalid URL format: ${i.message}`));return}const o=new XMLHttpRequest;o.open("HEAD",n,!0);const r=i=>{e(new Error(`Request failed: ${i.type}`))};o.onreadystatechange=function(){o.readyState===XMLHttpRequest.DONE&&(o.status===0?e(new Error("Network error or CORS blocked")):o.status>=200&&o.status<300?t(!0):e(new Error(`HTTP Error: ${o.status}`)))},o.onerror=r,o.onabort=r,o.ontimeout=r;try{o.send()}catch(i){e(new Error(`Request send failed: ${i.message}`))}})}function Te(n){return["https:","wss:","ftps:","sftp:","smpts:","smtp+tls:","imap+tls:","pop3+tls:","rdp:","vpn:"].some(e=>n.startsWith(e))}const E=class E{constructor(){if(new.target===E)throw new Error("请直接使用静态方法,而不是实例化此类")}static check(t,e){if(!t||typeof t!="string")return console.error("Invalid URL provided"),e?!1:"unknown";const o=q(t).toLowerCase();if(e){if(!H.hasOwnProperty(e))return console.error(`Unknown file type: ${e}`),"unknown";const r=H[e];return E._checkExtension(o,r)}return E._detectFileType(o)}static parseAddresses(t){return!t||typeof t!="string"?(console.error("Invalid URL provided"),[]):t.split(",").map(e=>{const o=q(e),r=this.check(e);return{url:e,name:o,type:r}})}static matchesMimeType(t,e){if(!e)return!0;if(typeof t!="string"||typeof e!="string")return!1;const o=E._normalizeType(t),r=e.split(",").map(a=>E._normalizeType(a.trim())),[i,s="*"]=o.split("/");return r.some(a=>{const[l,u="*"]=a.split("/");return(l==="*"||i==="*"||l===i)&&(u==="*"||s==="*"||u===s)})}static _normalizeType(t){return t.startsWith(".")&&!t.includes("/")?ce[t.toLowerCase()]||t:t.includes("/")?t:`${t}/*`}static _checkExtension(t,e){return e.some(o=>t.endsWith(o))}static _detectFileType(t){for(const[e,o]of E.cachedEntries)if(o.some(r=>t.endsWith(r)))return e;return"unknown"}};y(E,"cachedEntries",Object.entries(H));let G=E;function Le(n){return n.map((t,e)=>n.slice(e).concat(n.slice(0,e)))}function Pe(n){const t=window.structuredClone,e=o=>o===null||typeof o!="object"?o:N(Array.isArray(o)?[]:{},o);try{return t?t(n):e(n)}catch(o){return console.error("structuredClone error:",o),t&&e(n)}}class Q{constructor(){}static add(t,e){this.keys.set(t,e)}static open(t,e,o,r){const i=this.keys.get(t);if(i&&!i.closed)return i.focus(),i;{const s=window.open(e,o,r);if(s)return this.keys.set(t,s),s;console.error("window.open failed: 可能是浏览器阻止了弹出窗口"),this.keys.delete(t)}}static isOpen(t){const e=this.keys.get(t);return e!=null&&e.closed&&this.keys.delete(t),this.keys.has(t)}static getWindow(t){if(this.isOpen(t))return this.keys.get(t)}static close(t){const e=this.keys.get(t);e&&(e.close(),this.keys.delete(t))}static closeAll(){this.keys.forEach((t,e)=>t.close()),this.keys.clear()}}y(Q,"keys",new Map);function Re(n,t="image/png"){try{let e,o=t;if(n instanceof File)return URL.createObjectURL(n);if(typeof n=="string"){let i=n;const s=i.match(/^data:([^;]*)(;base64)?,(.*)$/i);if(s){if(!s[2])throw new Error("无效的数据 URL:缺少 base64 编码声明");if(o=s[1]||o,i=s[3],!i)throw new Error("数据 URL 包含空有效负载")}i=i.replace(/[^A-Za-z0-9+/=]/g,"");const a=atob(i);e=new Uint8Array(a.length);for(let l=0;l<a.length;l++)e[l]=a.charCodeAt(l)}else if(n instanceof ArrayBuffer)e=new Uint8Array(n);else if(n instanceof Uint8Array)e=n;else throw new Error("不支持的数据类型。应为 Base64 字符串、ArrayBuffer 或 Uint8Array");const r=new Blob([e],{type:o});return URL.createObjectURL(r)}catch(e){return console.error("数据到 ImageURL 的转换失败:",e.message,e.stack||"没有可用的堆栈跟踪"),null}}function Ie(n,t,e=30){if(typeof n!="function")throw new Error("The first argument must be a function.");if(!Array.isArray(t))throw new Error("The second argument must be an array.");let o=[],r=0;const i=(s,a)=>{for(const[l,u]of a)if(s>=l)return u;return"black"};return function(...s){const a=performance.now(),l=n(...s),u=performance.now()-a;o.push(u),o.length>e&&o.shift(),r=o.reduce((F,W)=>F+W,0)/o.length||0;const d=i(u,t),p=i(r,t);return console.log(`%c单次耗时:${u.toFixed(2)}ms
|
|
3
|
-
%c平均耗时(${o.length}次):${r.toFixed(2)}ms`,`color: ${d}; padding: 2px 0;`,`color: ${p}; padding: 2px 0;`),l}}function je(n){const t=J(n,100);let e=0,o=0;return function(r){const i=r.target;if(!i||!(i instanceof Element))return;const{scrollTop:s,scrollHeight:a,clientHeight:l,scrollLeft:u,scrollWidth:d,clientWidth:p}=i;function F(){if(e==s)return;const Y=e>s;if(e=s,Y)return;a-s-l<=1&&t("vertical")}function W(){if(o==u)return;const Y=o>u;if(o=u,Y)return;d-u-p<=1&&t("horizontal")}F(),W()}}function De(n,t,e){const{isClickAllowed:o,uiLibrary:r=["naiveUI","ElementPlus","Element"]}=e||{},i=function(l){const u=[];for(const d in l)Object.hasOwnProperty.call(l,d)&&r.includes(d)&&u.push(...l[d]);return u}({naiveUI:[".v-binder-follower-container",".n-image-preview-container",".n-modal-container"],ElementPlus:[".el-popper"],Element:[".el-popper"]});function s(){t(),document.removeEventListener("mousedown",a)}function a(l){if(o){const p=o(l);if(p)return;if(p===!1)return s()}const u=l.target;if(!(u instanceof Element)||!u.isConnected)return;n.concat(i).some(p=>!!(u!=null&&u.closest(p)))||s()}requestAnimationFrame(()=>document.addEventListener("mousedown",a))}var w,T,L,D,k,_,C,M,A;class ke{constructor(){f(this,w);f(this,T,!1);f(this,L,{});f(this,D,0);f(this,k,0);f(this,_,0);f(this,C,0);f(this,M);f(this,A)}init(t,e){m(this,w,t),m(this,M,e==null?void 0:e.limit),m(this,A,e==null?void 0:e.dragDom),m(this,L,{mousedown:this.mousedown.bind(this),mousemove:this.mousemove.bind(this),mouseup:this.mouseup.bind(this)}),this.bindOrUnbindEvent("bind")}finish(){this.bindOrUnbindEvent("unbind")}bindOrUnbindEvent(t){const e=t==="bind"?"addEventListener":"removeEventListener";if(!c(this,w))return console.error("No DOM");c(this,w)[e]("mousedown",c(this,L).mousedown),document[e]("mousemove",c(this,L).mousemove),document[e]("mouseup",c(this,L).mouseup)}alterLocation(){if(!c(this,w))return console.error("No DOM");c(this,M)&&(m(this,_,Math.min(c(this,_),c(this,M).max.top)),m(this,_,Math.max(c(this,_),c(this,M).min.top)),m(this,C,Math.min(c(this,C),c(this,M).max.left)),m(this,C,Math.max(c(this,C),c(this,M).min.left))),c(this,w).style.setProperty("--top",c(this,_)+"px"),c(this,w).style.setProperty("--left",c(this,C)+"px")}mousedown(t){if(!c(this,w))return console.error("No DOM");if(c(this,A)&&t.target!=c(this,A))return;document.body.classList.add("no-select"),m(this,T,!0);const e=c(this,w).getBoundingClientRect(),{pageX:o,pageY:r}=t;m(this,D,o),m(this,k,r),m(this,_,e.y),m(this,C,e.x)}mousemove(t){const{pageX:e,pageY:o}=t;c(this,T)&&(m(this,_,c(this,_)+(o-c(this,k))),m(this,C,c(this,C)+(e-c(this,D))),m(this,D,e),m(this,k,o),this.alterLocation())}mouseup(){c(this,T)&&(m(this,T,!1),document.body.classList.remove("no-select"))}}w=new WeakMap,T=new WeakMap,L=new WeakMap,D=new WeakMap,k=new WeakMap,_=new WeakMap,C=new WeakMap,M=new WeakMap,A=new WeakMap;var x,P,R,S,U,v,b,g,O,z;class Ae{constructor(){f(this,x);f(this,P,!1);f(this,R,{});f(this,S,0);f(this,U,0);f(this,v,0);f(this,b,0);f(this,g);f(this,O);f(this,z)}init(t,e={}){m(this,x,t),m(this,g,e.limit),m(this,O,e.update_move),m(this,z,e.update_up),m(this,R,{mousedown:this.mousedown.bind(this),mousemove:this.mousemove.bind(this),mouseup:this.mouseup.bind(this)}),this.bindOrUnbindEvent("bind")}finish(){this.bindOrUnbindEvent("unbind")}bindOrUnbindEvent(t){const e=t==="bind"?"addEventListener":"removeEventListener";if(!c(this,x))return console.error("No DOM");c(this,x)[e]("mousedown",c(this,R).mousedown),document[e]("mousemove",c(this,R).mousemove),document[e]("mouseup",c(this,R).mouseup)}updateValue(){const t={top:c(this,v),left:c(this,b),percentage:{top:0,left:0}};if(c(this,g)){const e=o=>c(this,g)?(t[o]-c(this,g).min[o])/(c(this,g).max[o]-c(this,g).min[o]):0;t.percentage={top:e("top")||0,left:e("left")||0}}return t}alterLocation(){if(!c(this,x))return console.error("No DOM");c(this,g)&&(m(this,v,Math.min(c(this,v),c(this,g).max.top)),m(this,v,Math.max(c(this,v),c(this,g).min.top)),m(this,b,Math.min(c(this,b),c(this,g).max.left)),m(this,b,Math.max(c(this,b),c(this,g).min.left))),c(this,O)&&c(this,O).call(this,this.updateValue()),c(this,x).style.setProperty("--top",c(this,v)+"px"),c(this,x).style.setProperty("--left",c(this,b)+"px")}mousedown(t){if(!c(this,x))return console.error("No DOM");document.body.classList.add("no-select"),m(this,P,!0);const e=c(this,x).getBoundingClientRect();m(this,U,e.y),m(this,S,e.x);const{pageX:o,pageY:r}=t;m(this,v,r-c(this,U)),m(this,b,o-c(this,S)),this.alterLocation()}mousemove(t){const{pageX:e,pageY:o}=t;c(this,P)&&(m(this,v,o-c(this,U)),m(this,b,e-c(this,S)),this.alterLocation())}mouseup(){c(this,P)&&(m(this,P,!1),document.body.classList.remove("no-select"),c(this,z)&&c(this,z).call(this,this.updateValue()))}}x=new WeakMap,P=new WeakMap,R=new WeakMap,S=new WeakMap,U=new WeakMap,v=new WeakMap,b=new WeakMap,g=new WeakMap,O=new WeakMap,z=new WeakMap;function ee(n){const t=n||document.documentElement;if(n){if(n.requestFullscreen)return n.requestFullscreen();if(t.mozRequestFullScreen)return t.mozRequestFullScreen();if(t.webkitRequestFullscreen)return t.webkitRequestFullscreen();if(t.msRequestFullscreen)return t.msRequestFullscreen()}else return Promise.reject("No DOM");return Promise.reject("No Fullscreen API")}function te(){const n=document;return document.exitFullscreen?document.exitFullscreen():n.mozCancelFullScreen?n.mozCancelFullScreen():n.webkitExitFullscreen?n.webkitExitFullscreen():n.msExitFullscreen?n.msExitFullscreen():Promise.reject("No ExitFullscreen API")}function ne(n){n=n||document.documentElement;const t=document,e=document.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement;return n==e}function Se(n){return function(){ne(n)?te():ee(n)}}function Ue(n,t){if(typeof n=="number")return n;if(/px/.test(n))return Number(n.replace(/px/,""))||0;const e=document.createElement("div");e.style.width=n,t=t||document.body,t.appendChild(e);const o=e.getBoundingClientRect().width;return t.removeChild(e),o}function Oe(n,t){if(!n)return;let e,o;if(typeof t=="string"){const i=document.querySelector(t);if(!i)return;const s=i.getBoundingClientRect();e=s.width,o=s.height}else if(Array.isArray(t))e=t[0],o=t[1];else{const i=t.getBoundingClientRect();e=i.width,o=i.height}const r=e/o;return r>n?[n*o,o]:r<n?[e,e/n]:[e,o]}function ze(n,t=5e3){return new Promise((e,o)=>{const r=new Image;r.src=n;const i=setTimeout(()=>{o(new Error("图片加载超时")),r.onload=null,r.onerror=null},t);r.onload=()=>{clearTimeout(i);const s=r.naturalWidth,a=r.naturalHeight,l=s/a;e([r,l])},r.onerror=()=>{clearTimeout(i),o(new Error("图片加载失败"))},r.crossOrigin="Anonymous"})}function Ne(n){const t=Date.now();let e=performance.now();for(;Date.now()-t<n;){e=Math.sin(e)*1e6,(e>1e6||e<-1e6)&&(e=0);try{const o=e.toString().substring(0,8);history.replaceState(null,"",`#${o}`)}catch{}}return Date.now()-t}const qe=Math.PI/2,$=Math.PI/180,B=6378137,$e=85.05112878;function Be(n,t){const e=Math.max(Math.min(n,180),-180),o=Math.max(Math.min(t,$e),-85.05112878),r=e*$*B,i=o*$,s=Math.log(Math.tan(Math.PI/4+i/2))*B;return[r,s]}function We(n,t){const e=n/B/$,o=(2*Math.atan(Math.exp(t/B))-qe)/$;return[e,o]}function Ye(n,t,e){const[o,r]=n,[i,s]=t,[a,l]=e,u=(a-i)**2+(l-s)**2;if(u===0)return Math.sqrt((o-i)**2+(r-s)**2);let d=((o-i)*(a-i)+(r-s)*(l-s))/u;return d=Math.max(0,Math.min(1,d)),Math.sqrt((o-(i+d*(a-i)))**2+(r-(s+d*(l-s)))**2)}function oe(n){return Array.isArray(n)&&typeof n[0]=="number"&&typeof n[1]=="number"&&isFinite(n[0])&&isFinite(n[1])}function He(n){return Array.isArray(n)&&n.every(t=>oe(t))}function Xe(n,t,e=2){return!Number.isFinite(n)||!Number.isFinite(t)||!Number.isFinite(e)?(console.error("所有参数必须是有限的数字"),""):t===0?(console.error("分母不能为零"),""):e<0?(console.error("小数位数不能为负数"),""):(n/t*100).toFixed(e)+"%"}function Ge(n,t,e){return Math.abs(n-t)<=e}function Ve(n,t=500){let e,o=!0;function r(i){if(!o)return;e||(e=i);let s=Math.min((i-e)/t,1);n(s),i-e<t&&requestAnimationFrame(r)}return requestAnimationFrame(r),()=>o=!1}function Ze(n){const e=n.toString().split("."),o=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,",");return e.length>1?o+"."+e[1]:o}function Ke(n,t){const e={join:!0,suffix:"",decimalPlaces:2},{join:o,suffix:r,decimalPlaces:i}={...e,...t||{}},s=Number(n);if(isNaN(s))return o?`0${r}`:[0,r];const a=Math.abs(s),l=s>=0,u=Math.max(0,Math.floor(Math.log10(a)/4)),d=Math.pow(1e4,u),p=a/d,F=(l?1:-1)*parseFloat(p.toFixed(Math.max(0,i)));return o?`${F}${K[u]}${r}`:[F,K[u]+r]}function Je(n,t){let e=!1;const{x:o,y:r}=n,i=t.length;for(let s=0,a=i-1;s<i;a=s++){const l=t[s].x,u=t[s].y,d=t[a].x,p=t[a].y;u>r!=p>r&&o<(d-l)*(r-u)/(p-u)+l&&(e=!e)}return e}function Qe(n){const t=["B","KB","MB","GB","TB","PB"];let e=0;for(;n>1024;)n/=1024,e++;return`${Math.round(n*100)/100} ${t[e]}`}function et(n,t,e,o){return Math.sqrt(Math.pow(e-n,2)+Math.pow(o-t,2))}function tt(n,t,e,o){const r=(n+e)/2,i=(t+o)/2;return{x:r,y:i}}class j{constructor(t,e){y(this,"resolve");y(this,"reject");this.resolve=t,this.reject=e}run(t){var e,o;return t instanceof Promise?t.then(r=>{var i;return(i=this.resolve)==null||i.call(this),r}).catch(r=>{var i;return(i=this.reject)==null||i.call(this),Promise.reject(r)}):t?(e=this.resolve)==null||e.call(this):(o=this.reject)==null||o.call(this),t}}class nt extends j{constructor(t){super(),this.resolve=t}warning(...t){const e=()=>{var o,r;return(r=(o=I.tips).warning)==null?void 0:r.call(o,...t)};return new j(this.resolve,e)}error(...t){const e=()=>{var o,r;return(r=(o=I.tips).error)==null?void 0:r.call(o,...t)};return new j(this.resolve,e)}}class ot extends j{constructor(t){super(),this.reject=t}info(...t){const e=()=>{var o,r;return(r=(o=I.tips).info)==null?void 0:r.call(o,...t)};return new j(e,this.reject)}success(...t){const e=()=>{var o,r;return(r=(o=I.tips).success)==null?void 0:r.call(o,...t)};return new j(e,this.reject)}}const h=class h{constructor(){if(new.target===h)throw new Error("请直接使用静态方法,而不是实例化此类")}static register(t,e){if(typeof e!="function")return console.error("TipHandler must be a function");h.tips[t]=e}static resolveTip(t){return function(...e){const o=()=>{var r,i;return(i=(r=h.tips)[t])==null?void 0:i.call(r,...e)};return new nt(o)}}static rejectTip(t){return function(...e){const o=()=>{var r,i;return(i=(r=h.tips)[t])==null?void 0:i.call(r,...e)};return new ot(o)}}};y(h,"tips",{info:void 0,success:void 0,warning:void 0,error:void 0}),y(h,"info",h.resolveTip("info")),y(h,"success",h.resolveTip("success")),y(h,"warning",h.rejectTip("warning")),y(h,"error",h.rejectTip("error"));let I=h;exports._AreAllArraysValid=He;exports._CalculateCanvasSize=Oe;exports._CalculateDistance2D=et;exports._CapitalizeFirstLetter=fe;exports._CheckConnectionWithXHR=Fe;exports._Clone=Pe;exports._CloseOnOutsideClick=De;exports._ConvertToCamelCase=xe;exports._ConvertToPercentage=Xe;exports._CopyToClipboard=_e;exports._CreateAndDownloadFile=ve;exports._Danger_ConvertDataToImageUrl=Re;exports._DataType=X;exports._Debounce=J;exports._DownloadFile=ge;exports._Drag=ke;exports._EnterFullscreen=ee;exports._ExcludeSubstring=de;exports._ExecuteWhenIdle=ue;exports._ExitFullscreen=te;exports._FileTypeChecker=G;exports._FormatFileSize=Qe;exports._FormatNumber=Ze;exports._FormatNumberWithUnit=Ke;exports._Fullscreen=Se;exports._GenerateUUID=be;exports._GetFrameRate=we;exports._GetHrefName=q;exports._GetMidpoint=tt;exports._GetOtherSizeInPixels=Ue;exports._GetTargetByPath=Ee;exports._InitTargetByPath=Ce;exports._IsFullscreen=ne;exports._IsObject=le;exports._IsPointInPolygon=Je;exports._IsSecureContext=Te;exports._IsSingleArrayValid=oe;exports._IsWithinErrorMargin=Ge;exports._KeyedWindowManager=Q;exports._LngLatToPlane=Be;exports._LoadImage=ze;exports._LocalDrag=Ae;exports._MergeObjects=N;exports._NotNull=ae;exports._PlaneToLngLat=We;exports._PointToLineDistance=Ye;exports._ReadFile=pe;exports._RotateList=Le;exports._Schedule=Ve;exports._ScrollEndListener=je;exports._Sleep=Ne;exports._Throttle=ye;exports._TimeConsumption=Ie;exports._TimeTransition=he;exports._Tip=I;exports._UpdateTargetByPath=Me;exports._WaitForCondition=me;
|
|
2
|
+
"use strict";var ft=Object.defineProperty;var nt=n=>{throw TypeError(n)};var dt=(n,t,e)=>t in n?ft(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var F=(n,t,e)=>dt(n,typeof t!="symbol"?t+"":t,e),it=(n,t,e)=>t.has(n)||nt("Cannot "+e);var a=(n,t,e)=>(it(n,t,"read from private field"),e?e.call(n):t.get(n)),h=(n,t,e)=>t.has(n)?nt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),f=(n,t,e,i)=>(it(n,t,"write to private field"),i?i.call(n,e):t.set(n,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function ht(n,t=500){let e,i=!0;function r(o){if(!i)return;e||(e=o);let s=Math.min((o-e)/t,1);n(s),o-e<t&&requestAnimationFrame(r)}return requestAnimationFrame(r),()=>i=!1}function pt(n,t,e,i,r=2){let o=n,s=!1,c=1,u=n,l=t,m=e;const d=()=>{const y=(l-u)/m;return Number(y.toFixed(r))};let _=d();const x=y=>Math.min(Math.max(y,u),l),E=y=>Number(y.toFixed(r)),U=(y,W,H)=>{const I=[];return y>=W&&I.push("最小值必须小于最大值"),H<=0?I.push("分段数必须为正数"):d()==0&&I.push("数值精度过低,致使动画步长为 0"),I},k=(y,W,H)=>{const I=U(y,W,H);return I.length>0?(console.error(`参数更新失败: ${I.join("; ")}`),!1):(u=y,l=W,m=H,_=d(),o=x(o),!0)},V=()=>{s&&(c=o>=l?-1:o<=u?1:c,o=x(o+_*c),i(E(o)),requestAnimationFrame(V))};return{play(y=o){if(o=x(y),U(u,l,m).length)return console.error("配置参数错误",this.getParams());s||(s=!0,V())},pause(){s=!1},getCurrent:()=>E(o),isPlaying:()=>s,updateParams:k,getParams:()=>({min:u,max:l,steps:m,precision:r,stepSize:_})}}function _t(n,t,e,i,r=2){if(e<=0)return console.error("动画步数 必须为正数");const o=d=>Number(d.toFixed(r)),s=t-n,c=o(Math.abs(s)/e);if(c===0)return console.error("数值精度过低,致使动画步长为 0");const u=Math.sign(s);let l=n;const m=()=>{l=o(l+c*u),(u>0?l<t:l>t)?(i(l),requestAnimationFrame(m)):i(t)};m()}function gt(n,t="image/png"){try{let e,i=t;if(n instanceof File)return URL.createObjectURL(n);if(typeof n=="string"){let o=n;const s=o.match(/^data:([^;]*)(;base64)?,(.*)$/i);if(s){if(!s[2])return console.error("无效的数据 URL:缺少 base64 编码声明");if(i=s[1]||i,o=s[3],!o)return console.error("数据 URL 包含空有效负载")}o=o.replace(/[^A-Za-z0-9+/=]/g,"");const c=atob(o);e=new Uint8Array(c.length);for(let u=0;u<c.length;u++)e[u]=c.charCodeAt(u)}else if(n instanceof ArrayBuffer)e=new Uint8Array(n);else if(n instanceof Uint8Array)e=n;else return console.error("不支持的数据类型。应为 Base64 字符串、ArrayBuffer 或 Uint8Array");const r=new Blob([e],{type:i});return URL.createObjectURL(r)}catch(e){return console.error("数据到 ImageURL 的转换失败:",e.message,e.stack||"没有可用的堆栈跟踪"),null}}function yt(n,t=10){let e=0,i=t;function r(){if(i>0)i--,requestAnimationFrame(r);else{const s=(+new Date-e)/t,c=1e3/s;n(Number(c.toFixed(2)),Number(s.toFixed(2)))}}requestAnimationFrame(()=>{e=+new Date,r()})}function xt(n){const t=()=>Promise.resolve(),e=c=>(console.error(c),Promise.reject(c));function i(){return navigator.clipboard.writeText(n).then(t).catch(e)}function r(){const c=document.createElement("div");c.innerText=n,document.body.appendChild(c);const u=document.createRange();u.selectNodeContents(c);const l=window.getSelection();let m=!1;return l&&(l.removeAllRanges(),l.addRange(u),m=document.execCommand("copy")),document.body.removeChild(c),m?Promise.resolve():Promise.reject()}function o(){const c=document.createElement("textarea");c.value=n,document.body.appendChild(c),c.select(),c.setSelectionRange(0,n.length);let u=!1;return document.activeElement===c&&(u=document.execCommand("Copy",!0)),document.body.removeChild(c),u?Promise.resolve():Promise.reject()}function s(){return r().then(t).catch(()=>{o().then(t).catch(()=>e("复制方式尽皆失效"))})}return navigator.clipboard?i().catch(s):s()}class ot{constructor(){}static add(t,e){this.keys.set(t,e)}static open(t,e,i,r){const o=this.keys.get(t);if(o&&!o.closed)return o.focus(),o;{const s=window.open(e,i,r);if(s)return this.keys.set(t,s),s;console.error("window.open failed: 可能是浏览器阻止了弹出窗口"),this.keys.delete(t)}}static isOpen(t){const e=this.keys.get(t);return e!=null&&e.closed&&this.keys.delete(t),this.keys.has(t)}static getWindow(t){if(this.isOpen(t))return this.keys.get(t)}static close(t){const e=this.keys.get(t);e&&(e.close(),this.keys.delete(t))}static closeAll(){this.keys.forEach((t,e)=>t.close()),this.keys.clear()}}F(ot,"keys",new Map);const wt={".mp3":"audio/mpeg",".mp4":"video/mp4",".m4a":"audio/mp4",".aac":"audio/aac",".ogg":"audio/ogg",".wav":"audio/wav",".flac":"audio/flac",".opus":"audio/opus",".webm":"video/webm",".avi":"video/x-msvideo",".mov":"video/quicktime",".wmv":"video/x-ms-wmv",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".bmp":"image/bmp",".tiff":"image/tiff",".ico":"image/vnd.microsoft.icon",".svg":"image/svg+xml",".webp":"image/webp",".heif":"image/heif",".heic":"image/heic",".json":"application/json",".xml":"application/xml",".html":"text/html",".htm":"text/html",".css":"text/css",".js":"application/javascript",".ts":"application/typescript",".csv":"text/csv",".tsv":"text/tab-separated-values",".txt":"text/plain",".md":"text/markdown",".rtf":"application/rtf",".pdf":"application/pdf",".zip":"application/zip",".rar":"application/x-rar-compressed",".tar":"application/x-tar",".gz":"application/gzip",".7z":"application/x-7z-compressed",".exe":"application/x-msdownload",".apk":"application/vnd.android.package-archive",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".odt":"application/vnd.oasis.opendocument.text",".ods":"application/vnd.oasis.opendocument.spreadsheet",".odp":"application/vnd.oasis.opendocument.presentation",".jsonld":"application/ld+json",".yaml":"application/x-yaml",".yml":"application/x-yaml",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject",".map":"application/json"},Q={image:[".jpg",".jpeg",".png",".gif",".bmp",".webp",".tiff",".svg",".heif",".heic",".ico",".raw",".jfif",".avif",".png8",".indd",".eps",".ai"],ppt:[".ppt",".pptx",".odp"],word:[".doc",".docx",".odt",".rtf"],excel:[".xls",".xlsx",".ods",".csv",".tsv"],pdf:[".pdf"],text:[".txt",".csv",".md",".json",".yaml",".yml",".log",".ini",".rtf"],audio:[".mp3",".wav",".ogg",".flac",".aac",".wma",".m4a",".alac",".ape",".opus",".amr",".ra",".mid",".midi",".aiff",".pcm",".au",".wavpack",".spx"],video:[".mp4",".avi",".mkv",".mov",".wmv",".flv",".webm",".mpg",".mpeg",".3gp",".vob",".ogv",".m4v",".ts",".rm",".rmvb",".m2ts",".divx",".xvid",".swf",".f4v"],archive:[".zip",".rar",".tar",".gz",".bz2",".xz",".7z",".tar.gz",".tar.bz2",".tar.xz",".tar.lz",".tar.lzma",".cab",".iso",".dmg",".tgz",".apk",".gz2",".tar.zst"],code:[".js",".ts",".py",".java",".cpp",".c",".html",".css",".scss",".less",".sass",".php",".rb",".go",".swift",".rs",".kt",".scala",".lua",".pl",".m",".h",".xml",".json",".yaml",".yml",".toml",".vue",".ejs",".handlebars",".jinja",".dart"],font:[".woff",".woff2",".ttf",".otf",".eot",".svg",".ttc",".fnt",".fon",".otc"],database:[".sql",".sqlite",".db",".mdb",".accdb",".jsonld",".xml",".csv"],markup:[".html",".htm",".xhtml",".xml",".json",".yaml",".yml"],configuration:[".ini",".conf",".cfg",".env",".properties",".json",".toml"],logs:[".log",".err",".trace",".out"],script:[".bash",".sh",".zsh",".bat",".ps1",".vbs",".cmd",".sed",".awk",".php"]},rt=["","万","亿","兆","京","垓","秭","穰","沟","涧","正","载","极"];function bt(n){return n.charAt(0).toUpperCase()+n.slice(1)}function vt(n,t,e=2){return!Number.isFinite(n)||!Number.isFinite(t)||!Number.isFinite(e)?(console.error("所有参数必须是有限的数字"),""):t===0?(console.error("分母不能为零"),""):e<0?(console.error("小数位数不能为负数"),""):(n/t*100).toFixed(e)+"%"}function Mt(n){const e=n.toString().split("."),i=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,",");return e.length>1?i+"."+e[1]:i}function Et(n,t){const e={join:!0,suffix:"",decimalPlaces:2},{join:i,suffix:r,decimalPlaces:o}={...e,...t||{}},s=Number(n);if(isNaN(s))return i?`0${r}`:[0,r];const c=Math.abs(s),u=s>=0,l=Math.max(0,Math.floor(Math.log10(c)/4)),m=Math.pow(1e4,l),d=c/m,_=(u?1:-1)*parseFloat(d.toFixed(Math.max(0,o)));return i?`${_}${rt[l]}${r}`:[_,rt[l]+r]}function Ft(n){const t=["B","KB","MB","GB","TB","PB"];let e=0;for(;n>1024;)n/=1024,e++;return`${Math.round(n*100)/100} ${t[e]}`}function Ct(n,t="YYYY-MM-DD hh:mm:ss",e=!0){const i=new Date(n);if(isNaN(i.getTime()))return console.error("Invalid date"),"";const r={YYYY:o=>o.getFullYear(),MM:o=>o.getMonth()+1,DD:o=>o.getDate(),hh:o=>o.getHours(),mm:o=>o.getMinutes(),ss:o=>o.getSeconds(),ms:o=>o.getMilliseconds()};return t.replace(/YYYY|MM|DD|hh|mm|ss|ms/g,o=>{const s=r[o](i);return e?String(s).padStart(2,"0"):String(s)})}function G(n,t="file"){if(!n||(n=String(n).trim(),n===""))return t;const e=n.split("/");return e[e.length-1].split("?")[0]}function Tt(n,t){return n=n.replace(/([^a-zA-Z][a-z])/g,e=>e.toUpperCase()),t?n.replace(/[^a-zA-Z]+/g,""):n}function Ut(n,t,e=","){const i=new RegExp(`(^|${e})${t}(${e}|$)`,"g");return n.replace(i,function(r,o,s){return o===s?e:""})}function Lt(n){return!(n===null||typeof n!="object"||Array.isArray(n))}function st(n,t=2){if(Array.isArray(n)&&n.length>=t){for(let i=0;i<n.length;i++)if(typeof n[i]!="number"||!Number.isFinite(n[i]))return!1}else return!1;return!0}function Pt(n,t=1,e=2){if(Array.isArray(n)&&n.length>=t){for(let r=0;r<n.length;r++)if(!st(n[r],e))return!1}else return!1;return!0}function It(n,t,e){return Math.abs(n-t)<=e}function St(n,t){let e=!1;const{x:i,y:r}=n,o=t.length;for(let s=0,c=o-1;s<o;c=s++){const u=t[s].x,l=t[s].y,m=t[c].x,d=t[c].y;l>r!=d>r&&i<(m-u)*(r-l)/(d-l)+u&&(e=!e)}return e}function At(n,t,e,i){const r=Math.min(n[0],t[0]),o=Math.max(n[0],t[0]),s=Math.min(n[1],t[1]),c=Math.max(n[1],t[1]),u=[[r,s],[o,s],[o,c],[r,c]],l=i[1]-e[1],m=e[0]-i[0],d=i[0]*e[1]-e[0]*i[1];if(l===0&&m===0){const[U,k]=e;return U>=r&&U<=o&&k>=s&&k<=c}const _=1e-10;let x=!1,E=!1;for(const[U,k]of u){const V=l*U+m*k+d;if(Math.abs(V)<_||(V>_?x=!0:E=!0,x&&E))return!0}return x&&E}function tt(n){return Array.isArray(n)?"array":n===null?"null":typeof n}function Rt(n){return["https:","wss:","ftps:","sftp:","smpts:","smtp+tls:","imap+tls:","pop3+tls:","rdp:","vpn:"].some(e=>n.startsWith(e))}function Dt(n){return new Promise((t,e)=>{if(typeof n!="string"||n.trim()===""||!n.includes("://")){e(new Error("Invalid URL: Must be a non-empty string"));return}try{new XMLHttpRequest().open("HEAD",n,!0)}catch(o){e(new Error(`Invalid URL format: ${o.message}`));return}const i=new XMLHttpRequest;i.open("HEAD",n,!0);const r=o=>{e(new Error(`Request failed: ${o.type}`))};i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&(i.status===0?e(new Error("Network error or CORS blocked")):i.status>=200&&i.status<300?t(!0):e(new Error(`HTTP Error: ${i.status}`)))},i.onerror=r,i.onabort=r,i.ontimeout=r;try{i.send()}catch(o){e(new Error(`Request send failed: ${o.message}`))}})}const L=class L{constructor(){if(new.target===L)throw new Error("请直接使用静态方法,而不是实例化此类")}static check(t,e){if(!t||typeof t!="string")return console.error("Invalid URL provided"),e?!1:"unknown";const i=G(t).toLowerCase();if(e){if(!Q.hasOwnProperty(e))return console.error(`Unknown file type: ${e}`),"unknown";const r=Q[e];return L._checkExtension(i,r)}return L._detectFileType(i)}static parseAddresses(t){return!t||typeof t!="string"?(console.error("Invalid URL provided"),[]):t.split(",").map(e=>{const i=G(e),r=this.check(e);return{url:e,name:i,type:r}})}static matchesMimeType(t,e){if(!e)return!0;if(typeof t!="string"||typeof e!="string")return!1;const i=L._normalizeType(t),r=e.split(",").map(c=>L._normalizeType(c.trim())),[o,s="*"]=i.split("/");return r.some(c=>{const[u,l="*"]=c.split("/");return(u==="*"||o==="*"||u===o)&&(l==="*"||s==="*"||l===s)})}static _normalizeType(t){return t.startsWith(".")&&!t.includes("/")?wt[t.toLowerCase()]||t:t.includes("/")?t:`${t}/*`}static _checkExtension(t,e){return e.some(i=>t.endsWith(i))}static _detectFileType(t){for(const[e,i]of L.cachedEntries)if(i.some(r=>t.endsWith(r)))return e;return"unknown"}};F(L,"cachedEntries",Object.entries(Q));let et=L;function jt(n){if(typeof n!="function")return console.error("非函数:",n);const t=function(e){e.didTimeout||e.timeRemaining()<=0?requestIdleCallback(t):n()};requestIdleCallback(t)}function kt(n,t){const e=+new Date;return new Promise((i,r)=>{const o=()=>{if(+new Date-e>=t)return r("超时");if(n())return i("完成");requestIdleCallback(o)};o()})}function Z(n,t,e=[],i=+new Date){if(i<+new Date-50){console.error("_MergeObjects 合并异常:疑似死循环");return}const r=tt(n),o=tt(t);if(r!=o)return t;if(r=="object"||r=="array"){if(e.some(([s,c])=>s==n&&c==t))return n;if(e.push([n,t]),r=="object"){for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)){const c=t[s],u=n[s],l=Z(u,c,e,i);n[s]=l}return n}else if(r=="array")return t.forEach((s,c)=>{const u=s,l=n[c],m=Z(l,u,e,i);n[c]=m}),n}else return t}function Ot(n=""){return n+"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function ct(n,t){let e;return function(...i){clearTimeout(e),e=setTimeout(()=>{n(...i),e=void 0},t)}}function zt(n,t){let e=-1/0;return function(...i){const r=performance.now();if(r-e>t){e=r;try{n(...i)}catch(o){console.error("Throttled function execution failed:",o)}}}}function Nt(n,t,e){if(!n||!t)return n;const i=t.split(".");return i.reduce((r,o,s)=>r.hasOwnProperty(o)?r[o]:s===i.length-1?r[o]=e:r[o]={},n)}function qt(n,t){if(!n||!t)return n;const e=t.split(".");return e.reduce((i,r,o)=>i.hasOwnProperty(r)?i[r]:o==e.length-1?void 0:{},n)}function Bt(n,t,e){if(!n||!t)return n;const i=t.split(".");return i.reduce((r,o,s)=>(s===i.length-1&&(r[o]=e),r.hasOwnProperty(o)?r[o]:r[o]={}),n)}function Yt(n){return n.map((t,e)=>n.slice(e).concat(n.slice(0,e)))}function $t(n){const t=window.structuredClone,e=i=>i===null||typeof i!="object"?i:Z(Array.isArray(i)?[]:{},i);try{return t?t(n):e(n)}catch(i){return console.error("structuredClone error:",i),t&&e(n)}}function Xt(n,t,e=30){if(typeof n!="function")return console.error("第一个参数必须是一个函数。");if(!Array.isArray(t))return console.error("第二个参数必须是一个数组。");let i=[],r=0;const o=(s,c)=>{for(const[u,l]of c)if(s>=u)return l;return"black"};return function(...s){const c=performance.now(),u=n(...s),l=performance.now()-c;i.push(l),i.length>e&&i.shift(),r=i.reduce((_,x)=>_+x,0)/i.length||0;const m=o(l,t),d=o(r,t);return console.log(`%c单次耗时:${l.toFixed(2)}ms
|
|
3
|
+
%c平均耗时(${i.length}次):${r.toFixed(2)}ms`,`color: ${m}; padding: 2px 0;`,`color: ${d}; padding: 2px 0;`),u}}function Vt(n){const t=Date.now();let e=performance.now();for(;Date.now()-t<n;){e=Math.sin(e)*1e6,(e>1e6||e<-1e6)&&(e=0);try{const i=e.toString().substring(0,8);history.replaceState(null,"",`#${i}`)}catch{}}return Date.now()-t}function Wt(n){const t=ct(n,100);let e=0,i=0;return function(r){const o=r.target;if(!o||!(o instanceof Element))return;const{scrollTop:s,scrollHeight:c,clientHeight:u,scrollLeft:l,scrollWidth:m,clientWidth:d}=o;function _(){if(e==s)return;const E=e>s;if(e=s,E)return;c-s-u<=1&&t("vertical")}function x(){if(i==l)return;const E=i>l;if(i=l,E)return;m-l-d<=1&&t("horizontal")}_(),x()}}function Ht(n,t,e){const{isClickAllowed:i,uiLibrary:r=["naiveUI","ElementPlus","Element"]}=e||{},o=function(u){const l=[];for(const m in u)Object.hasOwnProperty.call(u,m)&&r.includes(m)&&l.push(...u[m]);return l}({naiveUI:[".v-binder-follower-container",".n-image-preview-container",".n-modal-container"],ElementPlus:[".el-popper"],Element:[".el-popper"]});function s(){t(),document.removeEventListener("mousedown",c)}function c(u){if(i){const d=i(u);if(d)return;if(d===!1)return s()}const l=u.target;if(!(l instanceof Element)||!l.isConnected)return;n.concat(o).some(d=>!!(l!=null&&l.closest(d)))||s()}requestAnimationFrame(()=>document.addEventListener("mousedown",c))}var w,S,A,z,N,C,T,P,q;class Gt{constructor(){h(this,w);h(this,S,!1);h(this,A,{});h(this,z,0);h(this,N,0);h(this,C,0);h(this,T,0);h(this,P);h(this,q)}init(t,e){f(this,w,t),f(this,P,e==null?void 0:e.limit),f(this,q,e==null?void 0:e.dragDom),f(this,A,{mousedown:this.mousedown.bind(this),mousemove:this.mousemove.bind(this),mouseup:this.mouseup.bind(this)}),this.bindOrUnbindEvent("bind")}finish(){this.bindOrUnbindEvent("unbind")}bindOrUnbindEvent(t){const e=t==="bind"?"addEventListener":"removeEventListener";if(!a(this,w))return console.error("No DOM");a(this,w)[e]("mousedown",a(this,A).mousedown),document[e]("mousemove",a(this,A).mousemove),document[e]("mouseup",a(this,A).mouseup)}alterLocation(){if(!a(this,w))return console.error("No DOM");a(this,P)&&(f(this,C,Math.min(a(this,C),a(this,P).max.top)),f(this,C,Math.max(a(this,C),a(this,P).min.top)),f(this,T,Math.min(a(this,T),a(this,P).max.left)),f(this,T,Math.max(a(this,T),a(this,P).min.left))),a(this,w).style.setProperty("--top",a(this,C)+"px"),a(this,w).style.setProperty("--left",a(this,T)+"px")}mousedown(t){if(!a(this,w))return console.error("No DOM");if(a(this,q)&&t.target!=a(this,q))return;document.body.classList.add("no-select"),f(this,S,!0);const e=a(this,w).getBoundingClientRect(),{pageX:i,pageY:r}=t;f(this,z,i),f(this,N,r),f(this,C,e.y),f(this,T,e.x)}mousemove(t){const{pageX:e,pageY:i}=t;a(this,S)&&(f(this,C,a(this,C)+(i-a(this,N))),f(this,T,a(this,T)+(e-a(this,z))),f(this,z,e),f(this,N,i),this.alterLocation())}mouseup(){a(this,S)&&(f(this,S,!1),document.body.classList.remove("no-select"))}}w=new WeakMap,S=new WeakMap,A=new WeakMap,z=new WeakMap,N=new WeakMap,C=new WeakMap,T=new WeakMap,P=new WeakMap,q=new WeakMap;var b,R,D,B,Y,v,M,g,$,X;class Zt{constructor(){h(this,b);h(this,R,!1);h(this,D,{});h(this,B,0);h(this,Y,0);h(this,v,0);h(this,M,0);h(this,g);h(this,$);h(this,X)}init(t,e={}){f(this,b,t),f(this,g,e.limit),f(this,$,e.update_move),f(this,X,e.update_up),f(this,D,{mousedown:this.mousedown.bind(this),mousemove:this.mousemove.bind(this),mouseup:this.mouseup.bind(this)}),this.bindOrUnbindEvent("bind")}finish(){this.bindOrUnbindEvent("unbind")}bindOrUnbindEvent(t){const e=t==="bind"?"addEventListener":"removeEventListener";if(!a(this,b))return console.error("No DOM");a(this,b)[e]("mousedown",a(this,D).mousedown),document[e]("mousemove",a(this,D).mousemove),document[e]("mouseup",a(this,D).mouseup)}updateValue(){const t={top:a(this,v),left:a(this,M),percentage:{top:0,left:0}};if(a(this,g)){const e=i=>a(this,g)?(t[i]-a(this,g).min[i])/(a(this,g).max[i]-a(this,g).min[i]):0;t.percentage={top:e("top")||0,left:e("left")||0}}return t}alterLocation(){if(!a(this,b))return console.error("No DOM");a(this,g)&&(f(this,v,Math.min(a(this,v),a(this,g).max.top)),f(this,v,Math.max(a(this,v),a(this,g).min.top)),f(this,M,Math.min(a(this,M),a(this,g).max.left)),f(this,M,Math.max(a(this,M),a(this,g).min.left))),a(this,$)&&a(this,$).call(this,this.updateValue()),a(this,b).style.setProperty("--top",a(this,v)+"px"),a(this,b).style.setProperty("--left",a(this,M)+"px")}mousedown(t){if(!a(this,b))return console.error("No DOM");document.body.classList.add("no-select"),f(this,R,!0);const e=a(this,b).getBoundingClientRect();f(this,Y,e.y),f(this,B,e.x);const{pageX:i,pageY:r}=t;f(this,v,r-a(this,Y)),f(this,M,i-a(this,B)),this.alterLocation()}mousemove(t){const{pageX:e,pageY:i}=t;a(this,R)&&(f(this,v,i-a(this,Y)),f(this,M,e-a(this,B)),this.alterLocation())}mouseup(){a(this,R)&&(f(this,R,!1),document.body.classList.remove("no-select"),a(this,X)&&a(this,X).call(this,this.updateValue()))}}b=new WeakMap,R=new WeakMap,D=new WeakMap,B=new WeakMap,Y=new WeakMap,v=new WeakMap,M=new WeakMap,g=new WeakMap,$=new WeakMap,X=new WeakMap;function at(n){const t=n||document.documentElement;return t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():Promise.reject("No Fullscreen API")}function lt(){const n=document;return document.exitFullscreen?document.exitFullscreen():n.mozCancelFullScreen?n.mozCancelFullScreen():n.webkitExitFullscreen?n.webkitExitFullscreen():n.msExitFullscreen?n.msExitFullscreen():Promise.reject("No ExitFullscreen API")}function ut(n){const t=document,e=document.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement;return n?n==e:document.documentElement==e||screen.width==window.innerWidth&&screen.height==window.innerHeight}function Kt(n){return function(){ut(n)?lt():at(n)}}function Jt(n,t){if(typeof n=="number")return n;if(/px/.test(n))return Number(n.replace(/px/,""))||0;const e=document.createElement("div");e.style.width=n,t=t||document.body,t.appendChild(e);const i=e.getBoundingClientRect().width;return t.removeChild(e),i}function Qt(n,t){if(!n)return;let e,i;if(typeof t=="string"){const o=document.querySelector(t);if(!o)return;const s=o.getBoundingClientRect();e=s.width,i=s.height}else if(Array.isArray(t))e=t[0],i=t[1];else{const o=t.getBoundingClientRect();e=o.width,i=o.height}const r=e/i;return r>n?[n*i,i]:r<n?[e,e/n]:[e,i]}function te(n,t=5e3){return new Promise((e,i)=>{const r=new Image;r.src=n;const o=setTimeout(()=>{i(new Error("图片加载超时")),r.onload=null,r.onerror=null},t);r.onload=()=>{clearTimeout(o);const s=r.naturalWidth,c=r.naturalHeight,u=s/c;e([r,u])},r.onerror=()=>{clearTimeout(o),i(new Error("图片加载失败"))},r.crossOrigin="Anonymous"})}function ee(n){return new Promise((t,e)=>{fetch(n).then(i=>t(i.text())).catch(i=>{console.error("Error fetching :",i),e(i)})})}function mt(n,t){return new Promise((e,i)=>{try{t=t||G(n,"downloaded_file"),fetch(n).then(r=>(r.ok||i(`文件下载失败,状态码: ${r.status}`),r.blob())).then(r=>{const o=URL.createObjectURL(r),s=document.createElement("a");s.href=o,s.download=decodeURIComponent(t),document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(o),e(r)}).catch(i)}catch(r){i(r)}})}function ne(n,t,e){if(!e){let o=t.replace(/^[^.]+./,"");o=o==t?"text/plain":"application/"+o,e={type:o}}const i=new Blob(n,e),r=URL.createObjectURL(i);mt(r,t)}const ie=Math.PI/2,K=Math.PI/180,J=6378137,re=85.05112878;function oe(n,t){const e=Math.max(Math.min(n,180),-180),i=Math.max(Math.min(t,re),-85.05112878),r=e*K*J,o=i*K,s=Math.log(Math.tan(Math.PI/4+o/2))*J;return[r,s]}function se(n,t){const e=n/J/K,i=(2*Math.atan(Math.exp(t/J))-ie)/K;return[e,i]}function ce(n,t,e){const[i,r]=n,[o,s]=t,[c,u]=e,l=(c-o)**2+(u-s)**2;if(l===0)return Math.sqrt((i-o)**2+(r-s)**2);let m=((i-o)*(c-o)+(r-s)*(u-s))/l;return m=Math.max(0,Math.min(1,m)),Math.sqrt((i-(o+m*(c-o)))**2+(r-(s+m*(u-s)))**2)}function ae(n,t,e,i,r,o=1,s=1){const c=n+e*Math.cos(i)*o,u=t+e*Math.sin(i)*s,l=n+e*Math.cos(r)*o,m=t+e*Math.sin(r)*s;return[[c,u],[l,m]]}function le(n,t,e,i){return Math.sqrt(Math.pow(e-n,2)+Math.pow(i-t,2))}function ue(n,t,e,i){const r=(n+e)/2,o=(t+i)/2;return{x:r,y:o}}function me(n,t,e,i){const[r,o]=n,[s,c]=t;let u=1/0;if(s!==0){const l=s>0?(e-r)/s:-r/s;l>0&&(u=Math.min(u,l))}if(c!==0){const l=c>0?(i-o)/c:-o/c;l>0&&(u=Math.min(u,l))}return u===1/0?n:[r+s*u,o+c*u]}class O{constructor(t,e){F(this,"resolve");F(this,"reject");this.resolve=t,this.reject=e}run(t){var e,i;return t instanceof Promise?t.then(r=>{var o;return(o=this.resolve)==null||o.call(this),r}).catch(r=>{var o;return(o=this.reject)==null||o.call(this),Promise.reject(r)}):t?(e=this.resolve)==null||e.call(this):(i=this.reject)==null||i.call(this),t}}class fe extends O{constructor(t){super(),this.resolve=t}warning(...t){const e=()=>{var i,r;return(r=(i=j.tips).warning)==null?void 0:r.call(i,...t)};return new O(this.resolve,e)}error(...t){const e=()=>{var i,r;return(r=(i=j.tips).error)==null?void 0:r.call(i,...t)};return new O(this.resolve,e)}}class de extends O{constructor(t){super(),this.reject=t}info(...t){const e=()=>{var i,r;return(r=(i=j.tips).info)==null?void 0:r.call(i,...t)};return new O(e,this.reject)}success(...t){const e=()=>{var i,r;return(r=(i=j.tips).success)==null?void 0:r.call(i,...t)};return new O(e,this.reject)}}const p=class p{constructor(){if(new.target===p)throw new Error("请直接使用静态方法,而不是实例化此类")}static register(t,e){if(typeof e!="function")return console.error("TipHandler must be a function");p.tips[t]=e}static resolveTip(t){return function(...e){const i=()=>{var r,o;return(o=(r=p.tips)[t])==null?void 0:o.call(r,...e)};return new fe(i)}}static rejectTip(t){return function(...e){const i=()=>{var r,o;return(o=(r=p.tips)[t])==null?void 0:o.call(r,...e)};return new de(i)}}};F(p,"tips",{info:void 0,success:void 0,warning:void 0,error:void 0}),F(p,"info",p.resolveTip("info")),F(p,"success",p.resolveTip("success")),F(p,"warning",p.rejectTip("warning")),F(p,"error",p.rejectTip("error"));let j=p;exports._Animate_CreateOscillator=pt;exports._Animate_NumericTransition=_t;exports._Animate_Schedule=ht;exports._Blob_ConvertDataToImageUrl=gt;exports._Browser_CopyToClipboard=xt;exports._Browser_GetFrameRate=yt;exports._Browser_KeyedWindowManager=ot;exports._Element_CalculateCanvasSize=Qt;exports._Element_CloseOnOutsideClick=Ht;exports._Element_Drag=Gt;exports._Element_EnterFullscreen=at;exports._Element_ExitFullscreen=lt;exports._Element_Fullscreen=Kt;exports._Element_GetOtherSizeInPixels=Jt;exports._Element_IsFullscreen=ut;exports._Element_LoadImage=te;exports._Element_LocalDrag=Zt;exports._Element_ScrollEndListener=Wt;exports._File_CreateAndDownload=ne;exports._File_Download=mt;exports._File_Read=ee;exports._Format_CamelCase=Tt;exports._Format_CapitalizeFirstLetter=bt;exports._Format_ExcludeSubstring=Ut;exports._Format_FileSize=Ft;exports._Format_HrefName=G;exports._Format_NumberWithCommas=Mt;exports._Format_NumberWithUnit=Et;exports._Format_Percentage=vt;exports._Format_Timestamp=Ct;exports._Math_CalculateDistance2D=le;exports._Math_GetArcPoints=ae;exports._Math_GetBoundaryIntersection=me;exports._Math_GetMidpoint=ue;exports._Math_LngLatToPlane=oe;exports._Math_PlaneToLngLat=se;exports._Math_PointToLineDistance=ce;exports._Tip=j;exports._Utility_Clone=$t;exports._Utility_Debounce=ct;exports._Utility_ExecuteWhenIdle=jt;exports._Utility_GenerateUUID=Ot;exports._Utility_GetTargetByPath=qt;exports._Utility_InitTargetByPath=Nt;exports._Utility_MergeObjects=Z;exports._Utility_RotateList=Yt;exports._Utility_SetTargetByPath=Bt;exports._Utility_Sleep=Vt;exports._Utility_Throttle=zt;exports._Utility_TimeConsumption=Xt;exports._Utility_WaitForCondition=kt;exports._Valid_CheckConnectionWithXHR=Dt;exports._Valid_DataType=tt;exports._Valid_DoesInfiniteLineIntersectRectangle=At;exports._Valid_FileTypeChecker=et;exports._Valid_Is2DNumberArray=Pt;exports._Valid_IsInMargin=It;exports._Valid_IsNumberArray=st;exports._Valid_IsObject=Lt;exports._Valid_IsPointInPolygon=St;exports._Valid_IsSecureContext=Rt;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './Animate';
|
|
2
|
+
export * from './Blob';
|
|
3
|
+
export * from './Browser';
|
|
4
|
+
export * from './Element';
|
|
5
|
+
export * from './File';
|
|
6
|
+
export * from './Format';
|
|
3
7
|
export * from './Math';
|
|
8
|
+
export * from './Utility';
|
|
9
|
+
export * from './Valid';
|
|
4
10
|
type TipHandler = ((...args: any[]) => void) | undefined;
|
|
5
11
|
type TipType = "info" | "success" | "warning" | "error";
|
|
6
12
|
declare class TipFlow {
|