lyb-js 1.1.12 → 1.2.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/Base/LibJsGetDataType/index.js +1 -1
- package/dist/Base/LibJsPromiseTimeout/index.js +9 -10
- package/dist/Browser/LibJsColorConsole/index.d.ts +1 -1
- package/dist/Browser/LibJsColorConsole/index.js +12 -25
- package/dist/Browser/LibJsIsMobile/index.js +2 -2
- package/dist/Browser/LibJsIsPad/index.js +8 -8
- package/dist/Browser/LibJsObjToUrlParams/index.js +2 -5
- package/dist/Browser/LibJsPathParams/index.js +5 -5
- package/dist/Browser/LibJsSetTitleIcon/index.js +3 -3
- package/dist/Browser/LibJsTagTitleTip/index.js +5 -5
- package/dist/Data/LibJsChunkArray/index.js +3 -3
- package/dist/Data/LibJsDeepJSONParse/index.js +4 -4
- package/dist/Data/LibJsGroupArrayByKey/index.js +2 -3
- package/dist/Data/LibJsMatchEmail/index.js +4 -4
- package/dist/Data/LibJsShuffleArray/index.js +5 -15
- package/dist/Data/LibJsStepArray/index.js +3 -3
- package/dist/Data/LibReverseArrayFromIndex/index.js +3 -12
- package/dist/File/LibJsDownloadImageLink/index.js +5 -5
- package/dist/File/LibJsImageOptimizer/index.js +36 -36
- package/dist/File/LibJsSaveJson/index.js +4 -4
- package/dist/Formatter/LibJsFormatterByte/index.js +6 -6
- package/dist/Formatter/LibJsMaskPhoneNumber/index.js +2 -2
- package/dist/Formatter/LibJsNumComma/index.js +3 -4
- package/dist/Formatter/LibJsNumberUnit/index.js +9 -15
- package/dist/Formatter/LibJsSecondsFormatterChinese/index.js +15 -15
- package/dist/Math/LibJsCalculateExpression/index.js +17 -19
- package/dist/Math/LibJsConvertAngle/index.js +1 -1
- package/dist/Math/LibJsCoordsAngle/index.js +5 -5
- package/dist/Math/LibJsCoordsDistance/index.js +4 -4
- package/dist/Math/LibJsDecimal/index.js +7 -8
- package/dist/Misc/LibJsRegFormValidate/index.js +6 -6
- package/dist/Misc/LibJsRetryRequest/index.js +6 -7
- package/dist/Misc/LibNumerStepper/index.js +17 -21
- package/dist/Random/LibJsProbabilityResult/index.js +1 -3
- package/dist/Random/LibJsRandom/index.js +1 -2
- package/dist/Random/LibJsRandomColor/index.js +5 -6
- package/dist/Random/LibJsUniqueRandomNumbers/index.js +5 -6
- package/dist/Time/LibJsSameTimeCheck/index.d.ts +1 -1
- package/dist/Time/LibJsSameTimeCheck/index.js +3 -3
- package/dist/Time/LibJsTimeAgo/index.js +7 -8
- package/dist/Time/LibJsTimeGreeting/index.js +3 -4
- package/dist/index.js +2 -1
- package/dist/libJs.d.ts +2 -2
- package/dist/libJs.js +48 -48
- package/package.json +3 -3
- package/umd/lyb.js +2 -2
package/dist/libJs.js
CHANGED
|
@@ -38,73 +38,73 @@ import { libJsTimeAgo } from "./Time/LibJsTimeAgo";
|
|
|
38
38
|
import { libJsTimeGreeting } from "./Time/LibJsTimeGreeting";
|
|
39
39
|
import { libNumerStepper } from "./Misc/LibNumerStepper";
|
|
40
40
|
/** @description 基础方法 */
|
|
41
|
-
export
|
|
41
|
+
export const Base = {
|
|
42
42
|
/**
|
|
43
43
|
* @description 返回数据类型
|
|
44
44
|
* @param v 需要判断类型的数据
|
|
45
45
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsColorConsole-有色打印
|
|
46
46
|
*/
|
|
47
|
-
libJsGetDataType
|
|
47
|
+
libJsGetDataType,
|
|
48
48
|
/**
|
|
49
49
|
* @description 延时执行,切换到其他页面会暂停
|
|
50
50
|
* @param delay 延时毫秒数
|
|
51
51
|
* @param fn 延时执行函数
|
|
52
52
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsPromiseTimeout-延时执行
|
|
53
53
|
*/
|
|
54
|
-
libJsPromiseTimeout
|
|
54
|
+
libJsPromiseTimeout,
|
|
55
55
|
};
|
|
56
56
|
/** @description 浏览器相关方法 */
|
|
57
|
-
export
|
|
57
|
+
export const Browser = {
|
|
58
58
|
/** @description console颜色打印
|
|
59
59
|
* @param title 标题
|
|
60
60
|
* @param color 颜色
|
|
61
61
|
* @param logs 信息
|
|
62
62
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsColorConsole-有色打印
|
|
63
63
|
*/
|
|
64
|
-
libJsColorConsole
|
|
64
|
+
libJsColorConsole,
|
|
65
65
|
/** @description 判断是否为移动设备
|
|
66
66
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsIsMobile-判断手机
|
|
67
67
|
*/
|
|
68
|
-
libJsIsMobile
|
|
68
|
+
libJsIsMobile,
|
|
69
69
|
/** @description 判断是否为平板
|
|
70
70
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsIsPad-判断平板
|
|
71
71
|
*/
|
|
72
|
-
libJsIsPad
|
|
72
|
+
libJsIsPad,
|
|
73
73
|
/** @description 获取浏览器地址栏参数
|
|
74
74
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsPathParams-地址栏参数
|
|
75
75
|
*/
|
|
76
|
-
libJsPathParams
|
|
76
|
+
libJsPathParams,
|
|
77
77
|
/** @description 动态设置网站标题及图标
|
|
78
78
|
* @param title 网站标题
|
|
79
79
|
* @param url 网站图标地址
|
|
80
80
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsSetTitleIcon-网站标题图标
|
|
81
81
|
*/
|
|
82
|
-
libJsSetTitleIcon
|
|
82
|
+
libJsSetTitleIcon,
|
|
83
83
|
/** @description 网站标题交互,当从当前网页切换到其他网页,网站标题自动切换
|
|
84
84
|
* @param backTitle 从其他网页返回时显示的标题
|
|
85
85
|
* @param leaveTitle 从当前网页离开时显示的标题
|
|
86
86
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsTagTitleTip-网站标题交互
|
|
87
87
|
*/
|
|
88
|
-
libJsTagTitleTip
|
|
88
|
+
libJsTagTitleTip,
|
|
89
89
|
/** @description 对象转为url参数
|
|
90
90
|
* @param params 对象参数
|
|
91
91
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsObjToUrlParams-对象转Url参数
|
|
92
92
|
*/
|
|
93
|
-
libJsObjToUrlParams
|
|
93
|
+
libJsObjToUrlParams,
|
|
94
94
|
};
|
|
95
95
|
/** @description 数据相关方法 */
|
|
96
|
-
export
|
|
96
|
+
export const Data = {
|
|
97
97
|
/**
|
|
98
98
|
* @description 将数组拆分成指定数组元素数量的多个数组
|
|
99
99
|
* @param arr 需要拆分的数组
|
|
100
100
|
* @param chunkSize 每个数组的元素数量
|
|
101
101
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsChunkArray-数组拆分
|
|
102
102
|
*/
|
|
103
|
-
libJsChunkArray
|
|
103
|
+
libJsChunkArray,
|
|
104
104
|
/** @description 递归将JSON字符串深度解析为对象
|
|
105
105
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsDeepJSONParse-深度解析JSON
|
|
106
106
|
*/
|
|
107
|
-
libJsDeepJSONParse
|
|
107
|
+
libJsDeepJSONParse,
|
|
108
108
|
/**
|
|
109
109
|
* @description 分类汇总,将数组对象按照指定键值整理成一个以键值为键名的对象
|
|
110
110
|
* @param arr 要分组的数组
|
|
@@ -112,7 +112,7 @@ export var Data = {
|
|
|
112
112
|
* @returns 分组后的对象
|
|
113
113
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsGroupArrayByKey-分类汇总
|
|
114
114
|
*/
|
|
115
|
-
libJsGroupArrayByKey
|
|
115
|
+
libJsGroupArrayByKey,
|
|
116
116
|
/**
|
|
117
117
|
* @description 匹配电子邮件,可用于实时输入时,自动补全常用邮箱后缀
|
|
118
118
|
* @param str 要匹配的字符串
|
|
@@ -120,121 +120,121 @@ export var Data = {
|
|
|
120
120
|
* @returns 匹配结果数组
|
|
121
121
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsMatchEmail-匹配E-Mail
|
|
122
122
|
*/
|
|
123
|
-
libJsMatchEmail
|
|
123
|
+
libJsMatchEmail,
|
|
124
124
|
/** @description 数组乱序
|
|
125
125
|
* @param arr 需要乱序的数组
|
|
126
126
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsShuffleArray-数组乱序
|
|
127
127
|
*/
|
|
128
|
-
libJsShuffleArray
|
|
128
|
+
libJsShuffleArray,
|
|
129
129
|
/** @description 数组元素整体步数移动
|
|
130
130
|
* @param arr 移动的数组
|
|
131
131
|
* @param step 负数为向后移动,正数为向前移动
|
|
132
132
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsStepArray-数组偏移
|
|
133
133
|
*/
|
|
134
|
-
libJsStepArray
|
|
134
|
+
libJsStepArray,
|
|
135
135
|
/** @description 翻转指定索引后面的数组
|
|
136
136
|
* @param arr 数组
|
|
137
137
|
* @param index 开始索引
|
|
138
138
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibReverseArrayFromIndex-数组定位翻转
|
|
139
139
|
*/
|
|
140
|
-
libReverseArrayFromIndex
|
|
140
|
+
libReverseArrayFromIndex,
|
|
141
141
|
};
|
|
142
142
|
/** @description 文件相关方法 */
|
|
143
|
-
export
|
|
143
|
+
export const File = {
|
|
144
144
|
/** @description 下载图片链接
|
|
145
145
|
* @param link 图片链接
|
|
146
146
|
* @param name 图片名称
|
|
147
147
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsDownloadImageLink-图片下载
|
|
148
148
|
*/
|
|
149
|
-
libJsDownloadImageLink
|
|
149
|
+
libJsDownloadImageLink,
|
|
150
150
|
/** @description 图片压缩
|
|
151
151
|
* @param obj 压缩参数
|
|
152
152
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsImageOptimizer-图片压缩
|
|
153
153
|
*/
|
|
154
|
-
libJsImageOptimizer
|
|
154
|
+
libJsImageOptimizer,
|
|
155
155
|
/**
|
|
156
156
|
* @description 保存文件到本地
|
|
157
157
|
* @param data 要保存的数据
|
|
158
158
|
* @param name 文件名
|
|
159
159
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsSaveJson-保存文件
|
|
160
160
|
*/
|
|
161
|
-
libJsSaveJson
|
|
161
|
+
libJsSaveJson,
|
|
162
162
|
};
|
|
163
163
|
/** @description 格式化相关方法 */
|
|
164
|
-
export
|
|
164
|
+
export const Formatter = {
|
|
165
165
|
/**
|
|
166
166
|
* @description 格式化字节大小
|
|
167
167
|
* @param bytes 字节数
|
|
168
168
|
* @returns ['大小', '单位', '大小及单位']
|
|
169
169
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsFormatterByte-字节格式化
|
|
170
170
|
*/
|
|
171
|
-
libJsFormatterByte
|
|
171
|
+
libJsFormatterByte,
|
|
172
172
|
/**
|
|
173
173
|
* @description 隐藏手机号码中间的四位数字
|
|
174
174
|
* @param mobile 需要处理的手机号码
|
|
175
175
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsMaskPhoneNumber-隐藏手机号码
|
|
176
176
|
*/
|
|
177
|
-
libJsMaskPhoneNumber
|
|
177
|
+
libJsMaskPhoneNumber,
|
|
178
178
|
/**
|
|
179
179
|
* @description 数字每三位添加逗号
|
|
180
180
|
* @param num 需要格式化的数字
|
|
181
181
|
* @param reserve 保留小数位数
|
|
182
182
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNumComma-数字逗号
|
|
183
183
|
*/
|
|
184
|
-
libJsNumComma
|
|
184
|
+
libJsNumComma,
|
|
185
185
|
/** @description 将大于1000的数字使用k为单位
|
|
186
186
|
* @param num 数字
|
|
187
187
|
* @param units 单位组,key为单位,value为格式化阈值
|
|
188
188
|
* @returns [数字, 单位]
|
|
189
189
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNumberUnit-数字单位
|
|
190
190
|
*/
|
|
191
|
-
libJsNumberUnit
|
|
191
|
+
libJsNumberUnit,
|
|
192
192
|
/**
|
|
193
193
|
* @description 将秒数格式化为中文时间描述,支持扩展到年和月
|
|
194
194
|
* @param seconds 秒数
|
|
195
195
|
* @returns 格式化后的中文时间
|
|
196
196
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsSecondsFormatterChinese-中文时间
|
|
197
197
|
*/
|
|
198
|
-
libJsSecondsFormatterChinese
|
|
198
|
+
libJsSecondsFormatterChinese,
|
|
199
199
|
};
|
|
200
200
|
/** @description 数学相关方法 */
|
|
201
|
-
export
|
|
201
|
+
export const Math = {
|
|
202
202
|
/** @description 计算表达式字符串
|
|
203
203
|
* @param expression 表达式字符串
|
|
204
204
|
* @param point 小数点精度
|
|
205
205
|
* @returns 计算结果
|
|
206
206
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsCalculateExpression-表达式字符串
|
|
207
207
|
*/
|
|
208
|
-
libJsCalculateExpression
|
|
208
|
+
libJsCalculateExpression,
|
|
209
209
|
/**
|
|
210
210
|
* @description 角度和弧度互相转换
|
|
211
211
|
* @param value 角度值或弧度值
|
|
212
212
|
* @param type 角度类型或弧度类型
|
|
213
213
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsConvertAngle-角弧度互转
|
|
214
214
|
*/
|
|
215
|
-
libJsConvertAngle
|
|
215
|
+
libJsConvertAngle,
|
|
216
216
|
/** @description 计算两点角度
|
|
217
217
|
* @param coord1 起点坐标
|
|
218
218
|
* @param coord2 终点坐标
|
|
219
219
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsCoordsAngle-两点角度
|
|
220
220
|
*/
|
|
221
|
-
libJsCoordsAngle
|
|
221
|
+
libJsCoordsAngle,
|
|
222
222
|
/** @description 计算两点距离
|
|
223
223
|
* @param coord1 起点坐标
|
|
224
224
|
* @param coord2 终点坐标
|
|
225
225
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsCoordsDistance-两点距离
|
|
226
226
|
*/
|
|
227
|
-
libJsCoordsDistance
|
|
227
|
+
libJsCoordsDistance,
|
|
228
228
|
/** @description 计算两个数的运算结果,并保留指定位数的小数
|
|
229
229
|
* @param num1 第一个数
|
|
230
230
|
* @param num2 第二个数
|
|
231
231
|
* @param operator 运算符,支持加减乘除
|
|
232
232
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsDecimal-高精度计算
|
|
233
233
|
*/
|
|
234
|
-
libJsDecimal
|
|
234
|
+
libJsDecimal,
|
|
235
235
|
};
|
|
236
236
|
/** @description 杂项相关方法 */
|
|
237
|
-
export
|
|
237
|
+
export const Misc = {
|
|
238
238
|
/**
|
|
239
239
|
* @description 表单验证函数
|
|
240
240
|
* @param form 表单数据对象
|
|
@@ -242,7 +242,7 @@ export var Misc = {
|
|
|
242
242
|
* @returns 验证结果数组,包含未通过验证的项
|
|
243
243
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsRegFormValidate-表单验证
|
|
244
244
|
*/
|
|
245
|
-
libJsRegFormValidate
|
|
245
|
+
libJsRegFormValidate,
|
|
246
246
|
/** @description 请求失败重连
|
|
247
247
|
* @param promiseFn 请求函数
|
|
248
248
|
* @param maxRetries 最大重试次数
|
|
@@ -250,41 +250,41 @@ export var Misc = {
|
|
|
250
250
|
* @param params 请求参数
|
|
251
251
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsRetryRequest-请求重连
|
|
252
252
|
*/
|
|
253
|
-
libJsRetryRequest
|
|
253
|
+
libJsRetryRequest,
|
|
254
254
|
/** @description 数字步进器
|
|
255
255
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibNumerStepper-数字步进器
|
|
256
256
|
*/
|
|
257
|
-
libNumerStepper
|
|
257
|
+
libNumerStepper,
|
|
258
258
|
};
|
|
259
259
|
/** @description 随机相关方法 */
|
|
260
|
-
export
|
|
260
|
+
export const Random = {
|
|
261
261
|
/** @description 百分比概率结果
|
|
262
262
|
* @param probability 触发概率,百分比,0-100
|
|
263
263
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsProbabilityResult-概率触发
|
|
264
264
|
*/
|
|
265
|
-
libJsProbabilityResult
|
|
265
|
+
libJsProbabilityResult,
|
|
266
266
|
/** @description 随机数
|
|
267
267
|
* @param min 最小值
|
|
268
268
|
* @param max 最大值
|
|
269
269
|
* @param num 保留小数位数
|
|
270
270
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsRandom-随机数
|
|
271
271
|
*/
|
|
272
|
-
libJsRandom
|
|
272
|
+
libJsRandom,
|
|
273
273
|
/** @description 随机 RGBA 颜色
|
|
274
274
|
* @param alpha 透明度
|
|
275
275
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsRandomColor-随机色
|
|
276
276
|
*/
|
|
277
|
-
libJsRandomColor
|
|
277
|
+
libJsRandomColor,
|
|
278
278
|
/** @description 随机生成n个指定范围的随机数数组
|
|
279
279
|
* @param min 最小值
|
|
280
280
|
* @param max 最大值
|
|
281
281
|
* @param count 数组长度
|
|
282
282
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsUniqueRandomNumbers-随机数数组
|
|
283
283
|
*/
|
|
284
|
-
libJsUniqueRandomNumbers
|
|
284
|
+
libJsUniqueRandomNumbers,
|
|
285
285
|
};
|
|
286
286
|
/** @description 时间相关方法 */
|
|
287
|
-
export
|
|
287
|
+
export const Time = {
|
|
288
288
|
/**
|
|
289
289
|
* @description 传入时间戳与当前时间判断是否为同一天或同一周
|
|
290
290
|
* @param timestamp 毫秒时间戳
|
|
@@ -292,16 +292,16 @@ export var Time = {
|
|
|
292
292
|
* @returns 0-同一单位时间 1-新单位时间 -1时间戳大于当前时间
|
|
293
293
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsSameTimeCheck-时间比对
|
|
294
294
|
*/
|
|
295
|
-
libJsSameTimeCheck
|
|
295
|
+
libJsSameTimeCheck,
|
|
296
296
|
/** @description 时间差计算
|
|
297
297
|
* @param timestamp 毫秒时间戳
|
|
298
298
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsTimeAgo-中文时间差
|
|
299
299
|
*/
|
|
300
|
-
libJsTimeAgo
|
|
300
|
+
libJsTimeAgo,
|
|
301
301
|
/**
|
|
302
302
|
* @description 根据当前时间返回问候语
|
|
303
303
|
* @param greet 自定义问候语对象
|
|
304
304
|
* @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsTimeGreeting-时间问候
|
|
305
305
|
*/
|
|
306
|
-
libJsTimeGreeting
|
|
306
|
+
libJsTimeGreeting,
|
|
307
307
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lyb-js",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "自用JS方法库",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "
|
|
10
|
+
"build": "vite build & tsc"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
"./*": "./dist/*"
|
|
@@ -41,4 +41,4 @@
|
|
|
41
41
|
"decimal.js": "^10.4.3",
|
|
42
42
|
"vite": "^4.5.5"
|
|
43
43
|
}
|
|
44
|
-
}
|
|
44
|
+
}
|
package/umd/lyb.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(ge){typeof define=="function"&&define.amd?define(ge):ge()})(function(){"use strict";const ge=e=>Object.prototype.toString.call(e).substring(8).replace(/]/g,"").toLowerCase(),Ke=(e=1,t)=>{let n,i=e,r=Date.now(),s=!1;return new Promise(o=>{const u=()=>{document.hidden?(s=!0,clearTimeout(n),i-=Date.now()-r):s&&(s=!1,r=Date.now(),a(o))},a=c=>{n=setTimeout(()=>{t==null||t(),c(),document.removeEventListener("visibilitychange",u)},i)};document.addEventListener("visibilitychange",u),a(o)})},Qe=(e,t,n=[]
|
|
2
|
-
${u.label}:`,u.value]);console.log(`%c${s()}-${e}`,`color: #fff;background: ${r[t]}; font-size:14px;border-radius:5px;padding:0.25em;margin:0.5em 0`,...o.flat(1/0))}else console.log(`%c${s()}-${e}`,`color: #fff;background: ${r[t]}; font-size:14px;border-radius:5px;padding:0.25em;margin:0.5em 0`,n)},et=()=>{const e=navigator.userAgent.toLowerCase();return/mobile|android|iphone|ipod/.test(e)},tt=()=>{const e=navigator.userAgent.toLowerCase(),t=Math.max(window.screen.width,window.screen.height),n=Math.min(window.screen.width,window.screen.height),i=t/n,r=/ipad|tablet|playbook|silk/.test(e)&&!/mobile/.test(e),s=t>=768&&t<=1366,o=i>=1.3&&i<=1.6;return r||s&&o},nt=()=>{const t=location.href.split("?")[1];return t?t.split("&").reduce((i,r)=>{const[s,o]=r.split(/=(.+)/);return i[s]=o,i},{})||{}:{}},it=(e,t)=>{document.title=e;const n=document.createElement("link");n.setAttribute("rel","icon"),n.setAttribute("href",t),(document.head||document.getElementsByTagName("head")[0]).appendChild(n)},rt=(e,t)=>{let n="",i;window.addEventListener("visibilitychange",()=>{if(clearTimeout(i),document.hidden){document.title!==e&&(n=document.title),document.title=t;return}document.title=e,i=setTimeout(()=>{document.title=n},1e3)})},st=e=>Object.entries(e).map(([t,n])=>`${t}=${n}`).join("&"),ot=(e,t)=>{const n=[];for(let i=0;i<e.length;i+=t)n.push(e.slice(i,i+t));return n},we=e=>{if(typeof e=="string")try{const t=JSON.parse(e);return we(t)}catch{return e}return Array.isArray(e)?e.map(t=>we(t)):e!==null&&typeof e=="object"?Object.keys(e).reduce((t,n)=>(t[n]=we(e[n]),t),{}):e},ut=(e=[],t)=>t?e.reduce((n,i)=>(n[i[t]]||(n[i[t]]=[]),n[i[t]].push(i),n),{}):{},ct=(e,t)=>e.includes("@")?t.filter(n=>n.includes(e.slice(e.indexOf("@")))).map(n=>(e.includes("@")?e.split("@")[0]:e)+n):t.map(n=>e+n),at=e=>{const t=[...e];for(let n=t.length-1;n>0;n--){const i=Math.floor(Math.random()*(n+1));[t[n],t[i]]=[t[i],t[n]]}return t},ft=(e,t)=>{const n=e.length;if(n===0||t%n===0)return e;const i=(t%n+n)%n;return e.slice(-i).concat(e.slice(0,-i))},lt=(e,t)=>{if(t<0||t>=e.length)throw new Error("Index out of bounds");const n=e.slice(t+1).reverse();return[...e.slice(0,t+1),...n]},ht=(e,t)=>{fetch(e).then(n=>n.blob()).then(n=>{const i=document.createElement("a"),r=window.URL.createObjectURL(n);i.href=r,i.download=t,i.click()})},dt=e=>{const t=document.createElement("canvas");t.classList.add("imageOptimizer"),document.body.appendChild(t);const n=e.file;if(!n)return;const i=n.name,r=i.split(".").pop().toLowerCase(),s=e.ratio||1,o=e.maxSize||1024,u=e.width||1e4,a=n.type;function c(h,p){const w=h.split(","),M=w[0].match(/:(.*?);/)[1],P=window.atob(w[1]),A=P.length,H=new Uint8Array(A);for(let O=0;O<A;O++)H[O]=P.charCodeAt(O);return new File([H],p,{type:M})}function f(h){const p=new FormData;return p.append("file",h),p}const l=new FileReader;l.readAsDataURL(n),l.onload=h=>{const p=h.target.result;if(h.total/1024>o){const w=new Image;w.src=p,w.onload=()=>{const M=t.getContext("2d"),P=u/w.width;P<1?(t.width=w.width*P,t.height=w.height*P,M.drawImage(w,0,0,w.width*P,w.height*P)):(t.width=w.width,t.height=w.height,M.drawImage(w,0,0,w.width,w.height));const A=t.toDataURL(a,s),H=`${i.split(".")[0]}.${r}`,O=c(A,H);e.success(f(O),O,A),t.remove()},w.onerror=e.fail}else{const w=`${i.split(".")[0]}.${r}`,M=c(p,w);e.success(f(M),M,p),t.remove()}},l.onerror=e.fail},mt=(e,t)=>{const n=window.URL||window.webkitURL,i=new Blob([t]),r=document.createElement("a");r.href=n.createObjectURL(i),r.download=e,r.click(),n.revokeObjectURL(r.href)};var Le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fe={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(Le,function(){var n=1e3,i=6e4,r=36e5,s="millisecond",o="second",u="minute",a="hour",c="day",f="week",l="month",h="quarter",p="year",w="date",M="Invalid Date",P=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,H={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var g=["th","st","nd","rd"],m=N%100;return"["+N+(g[(m-20)%10]||g[m]||g[0])+"]"}},O=function(N,g,m){var D=String(N);return!D||D.length>=g?N:""+Array(g+1-D.length).join(m)+N},q={s:O,z:function(N){var g=-N.utcOffset(),m=Math.abs(g),D=Math.floor(m/60),$=m%60;return(g<=0?"+":"-")+O(D,2,"0")+":"+O($,2,"0")},m:function N(g,m){if(g.date()<m.date())return-N(m,g);var D=12*(m.year()-g.year())+(m.month()-g.month()),$=g.clone().add(D,l),C=m-$<0,I=g.clone().add(D+(C?-1:1),l);return+(-(D+(m-$)/(C?$-I:I-$))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:l,y:p,w:f,d:c,D:w,h:a,m:u,s:o,ms:s,Q:h}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},X="en",T={};T[X]=H;var E="$isDayjsObject",v=function(N){return N instanceof R||!(!N||!N[E])},L=function N(g,m,D){var $;if(!g)return X;if(typeof g=="string"){var C=g.toLowerCase();T[C]&&($=C),m&&(T[C]=m,$=C);var I=g.split("-");if(!$&&I.length>1)return N(I[0])}else{var J=g.name;T[J]=g,$=J}return!D&&$&&(X=$),$||!D&&X},y=function(N,g){if(v(N))return N.clone();var m=typeof g=="object"?g:{};return m.date=N,m.args=arguments,new R(m)},b=q;b.l=L,b.i=v,b.w=function(N,g){return y(N,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var R=function(){function N(m){this.$L=L(m.locale,null,!0),this.parse(m),this.$x=this.$x||m.x||{},this[E]=!0}var g=N.prototype;return g.parse=function(m){this.$d=function(D){var $=D.date,C=D.utc;if($===null)return new Date(NaN);if(b.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var I=$.match(P);if(I){var J=I[2]-1||0,B=(I[7]||"0").substring(0,3);return C?new Date(Date.UTC(I[1],J,I[3]||1,I[4]||0,I[5]||0,I[6]||0,B)):new Date(I[1],J,I[3]||1,I[4]||0,I[5]||0,I[6]||0,B)}}return new Date($)}(m),this.init()},g.init=function(){var m=this.$d;this.$y=m.getFullYear(),this.$M=m.getMonth(),this.$D=m.getDate(),this.$W=m.getDay(),this.$H=m.getHours(),this.$m=m.getMinutes(),this.$s=m.getSeconds(),this.$ms=m.getMilliseconds()},g.$utils=function(){return b},g.isValid=function(){return this.$d.toString()!==M},g.isSame=function(m,D){var $=y(m);return this.startOf(D)<=$&&$<=this.endOf(D)},g.isAfter=function(m,D){return y(m)<this.startOf(D)},g.isBefore=function(m,D){return this.endOf(D)<y(m)},g.$g=function(m,D,$){return b.u(m)?this[D]:this.set($,m)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(m,D){var $=this,C=!!b.u(D)||D,I=b.p(m),J=function(ae,G){var ue=b.w($.$u?Date.UTC($.$y,G,ae):new Date($.$y,G,ae),$);return C?ue:ue.endOf(c)},B=function(ae,G){return b.w($.toDate()[ae].apply($.toDate("s"),(C?[0,0,0,0]:[23,59,59,999]).slice(G)),$)},Z=this.$W,V=this.$M,x=this.$D,he="set"+(this.$u?"UTC":"");switch(I){case p:return C?J(1,0):J(31,11);case l:return C?J(1,V):J(0,V+1);case f:var ce=this.$locale().weekStart||0,me=(Z<ce?Z+7:Z)-ce;return J(C?x-me:x+(6-me),V);case c:case w:return B(he+"Hours",0);case a:return B(he+"Minutes",1);case u:return B(he+"Seconds",2);case o:return B(he+"Milliseconds",3);default:return this.clone()}},g.endOf=function(m){return this.startOf(m,!1)},g.$set=function(m,D){var $,C=b.p(m),I="set"+(this.$u?"UTC":""),J=($={},$[c]=I+"Date",$[w]=I+"Date",$[l]=I+"Month",$[p]=I+"FullYear",$[a]=I+"Hours",$[u]=I+"Minutes",$[o]=I+"Seconds",$[s]=I+"Milliseconds",$)[C],B=C===c?this.$D+(D-this.$W):D;if(C===l||C===p){var Z=this.clone().set(w,1);Z.$d[J](B),Z.init(),this.$d=Z.set(w,Math.min(this.$D,Z.daysInMonth())).$d}else J&&this.$d[J](B);return this.init(),this},g.set=function(m,D){return this.clone().$set(m,D)},g.get=function(m){return this[b.p(m)]()},g.add=function(m,D){var $,C=this;m=Number(m);var I=b.p(D),J=function(V){var x=y(C);return b.w(x.date(x.date()+Math.round(V*m)),C)};if(I===l)return this.set(l,this.$M+m);if(I===p)return this.set(p,this.$y+m);if(I===c)return J(1);if(I===f)return J(7);var B=($={},$[u]=i,$[a]=r,$[o]=n,$)[I]||1,Z=this.$d.getTime()+m*B;return b.w(Z,this)},g.subtract=function(m,D){return this.add(-1*m,D)},g.format=function(m){var D=this,$=this.$locale();if(!this.isValid())return $.invalidDate||M;var C=m||"YYYY-MM-DDTHH:mm:ssZ",I=b.z(this),J=this.$H,B=this.$m,Z=this.$M,V=$.weekdays,x=$.months,he=$.meridiem,ce=function(G,ue,pe,ke){return G&&(G[ue]||G(D,C))||pe[ue].slice(0,ke)},me=function(G){return b.s(J%12||12,G,"0")},ae=he||function(G,ue,pe){var ke=G<12?"AM":"PM";return pe?ke.toLowerCase():ke};return C.replace(A,function(G,ue){return ue||function(pe){switch(pe){case"YY":return String(D.$y).slice(-2);case"YYYY":return b.s(D.$y,4,"0");case"M":return Z+1;case"MM":return b.s(Z+1,2,"0");case"MMM":return ce($.monthsShort,Z,x,3);case"MMMM":return ce(x,Z);case"D":return D.$D;case"DD":return b.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return ce($.weekdaysMin,D.$W,V,2);case"ddd":return ce($.weekdaysShort,D.$W,V,3);case"dddd":return V[D.$W];case"H":return String(J);case"HH":return b.s(J,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return ae(J,B,!0);case"A":return ae(J,B,!1);case"m":return String(B);case"mm":return b.s(B,2,"0");case"s":return String(D.$s);case"ss":return b.s(D.$s,2,"0");case"SSS":return b.s(D.$ms,3,"0");case"Z":return I}return null}(G)||I.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(m,D,$){var C,I=this,J=b.p(D),B=y(m),Z=(B.utcOffset()-this.utcOffset())*i,V=this-B,x=function(){return b.m(I,B)};switch(J){case p:C=x()/12;break;case l:C=x();break;case h:C=x()/3;break;case f:C=(V-Z)/6048e5;break;case c:C=(V-Z)/864e5;break;case a:C=V/r;break;case u:C=V/i;break;case o:C=V/n;break;default:C=V}return $?C:b.a(C)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return T[this.$L]},g.locale=function(m,D){if(!m)return this.$L;var $=this.clone(),C=L(m,D,!0);return C&&($.$L=C),$},g.clone=function(){return b.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},N}(),U=R.prototype;return y.prototype=U,[["$ms",s],["$s",o],["$m",u],["$H",a],["$W",c],["$M",l],["$y",p],["$D",w]].forEach(function(N){U[N[1]]=function(g){return this.$g(g,N[0],N[1])}}),y.extend=function(N,g){return N.$i||(N(g,R,y),N.$i=!0),y},y.locale=L,y.isDayjs=v,y.unix=function(N){return y(1e3*N)},y.en=T[X],y.Ls=T,y.p={},y})})(Fe);var pt=Fe.exports;const ve=Pe(pt);var Je={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(Le,function(){var n,i,r=1e3,s=6e4,o=36e5,u=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=31536e6,f=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:c,months:f,days:u,hours:o,minutes:s,seconds:r,milliseconds:1,weeks:6048e5},p=function(T){return T instanceof q},w=function(T,E,v){return new q(T,v,E.$l)},M=function(T){return i.p(T)+"s"},P=function(T){return T<0},A=function(T){return P(T)?Math.ceil(T):Math.floor(T)},H=function(T){return Math.abs(T)},O=function(T,E){return T?P(T)?{negative:!0,format:""+H(T)+E}:{negative:!1,format:""+T+E}:{negative:!1,format:""}},q=function(){function T(v,L,y){var b=this;if(this.$d={},this.$l=y,v===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return w(v*h[M(L)],this);if(typeof v=="number")return this.$ms=v,this.parseFromMilliseconds(),this;if(typeof v=="object")return Object.keys(v).forEach(function(N){b.$d[M(N)]=v[N]}),this.calMilliseconds(),this;if(typeof v=="string"){var R=v.match(l);if(R){var U=R.slice(2).map(function(N){return N!=null?Number(N):0});return this.$d.years=U[0],this.$d.months=U[1],this.$d.weeks=U[2],this.$d.days=U[3],this.$d.hours=U[4],this.$d.minutes=U[5],this.$d.seconds=U[6],this.calMilliseconds(),this}}return this}var E=T.prototype;return E.calMilliseconds=function(){var v=this;this.$ms=Object.keys(this.$d).reduce(function(L,y){return L+(v.$d[y]||0)*h[y]},0)},E.parseFromMilliseconds=function(){var v=this.$ms;this.$d.years=A(v/c),v%=c,this.$d.months=A(v/f),v%=f,this.$d.days=A(v/u),v%=u,this.$d.hours=A(v/o),v%=o,this.$d.minutes=A(v/s),v%=s,this.$d.seconds=A(v/r),v%=r,this.$d.milliseconds=v},E.toISOString=function(){var v=O(this.$d.years,"Y"),L=O(this.$d.months,"M"),y=+this.$d.days||0;this.$d.weeks&&(y+=7*this.$d.weeks);var b=O(y,"D"),R=O(this.$d.hours,"H"),U=O(this.$d.minutes,"M"),N=this.$d.seconds||0;this.$d.milliseconds&&(N+=this.$d.milliseconds/1e3,N=Math.round(1e3*N)/1e3);var g=O(N,"S"),m=v.negative||L.negative||b.negative||R.negative||U.negative||g.negative,D=R.format||U.format||g.format?"T":"",$=(m?"-":"")+"P"+v.format+L.format+b.format+D+R.format+U.format+g.format;return $==="P"||$==="-P"?"P0D":$},E.toJSON=function(){return this.toISOString()},E.format=function(v){var L=v||"YYYY-MM-DDTHH:mm:ss",y={Y:this.$d.years,YY:i.s(this.$d.years,2,"0"),YYYY:i.s(this.$d.years,4,"0"),M:this.$d.months,MM:i.s(this.$d.months,2,"0"),D:this.$d.days,DD:i.s(this.$d.days,2,"0"),H:this.$d.hours,HH:i.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:i.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:i.s(this.$d.seconds,2,"0"),SSS:i.s(this.$d.milliseconds,3,"0")};return L.replace(a,function(b,R){return R||String(y[b])})},E.as=function(v){return this.$ms/h[M(v)]},E.get=function(v){var L=this.$ms,y=M(v);return y==="milliseconds"?L%=1e3:L=y==="weeks"?A(L/h[y]):this.$d[y],L||0},E.add=function(v,L,y){var b;return b=L?v*h[M(L)]:p(v)?v.$ms:w(v,this).$ms,w(this.$ms+b*(y?-1:1),this)},E.subtract=function(v,L){return this.add(v,L,!0)},E.locale=function(v){var L=this.clone();return L.$l=v,L},E.clone=function(){return w(this.$ms,this)},E.humanize=function(v){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!v)},E.valueOf=function(){return this.asMilliseconds()},E.milliseconds=function(){return this.get("milliseconds")},E.asMilliseconds=function(){return this.as("milliseconds")},E.seconds=function(){return this.get("seconds")},E.asSeconds=function(){return this.as("seconds")},E.minutes=function(){return this.get("minutes")},E.asMinutes=function(){return this.as("minutes")},E.hours=function(){return this.get("hours")},E.asHours=function(){return this.as("hours")},E.days=function(){return this.get("days")},E.asDays=function(){return this.as("days")},E.weeks=function(){return this.get("weeks")},E.asWeeks=function(){return this.as("weeks")},E.months=function(){return this.get("months")},E.asMonths=function(){return this.as("months")},E.years=function(){return this.get("years")},E.asYears=function(){return this.as("years")},T}(),X=function(T,E,v){return T.add(E.years()*v,"y").add(E.months()*v,"M").add(E.days()*v,"d").add(E.hours()*v,"h").add(E.minutes()*v,"m").add(E.seconds()*v,"s").add(E.milliseconds()*v,"ms")};return function(T,E,v){n=v,i=v().$utils(),v.duration=function(b,R){var U=v.locale();return w(b,{$l:U},R)},v.isDuration=p;var L=E.prototype.add,y=E.prototype.subtract;E.prototype.add=function(b,R){return p(b)?X(this,b,1):L.bind(this)(b,R)},E.prototype.subtract=function(b,R){return p(b)?X(this,b,-1):y.bind(this)(b,R)}}})})(Je);var gt=Je.exports;const wt=Pe(gt);ve.extend(wt);const vt=e=>{const t=ve.duration(e,"seconds"),n=Math.floor(t.asYears()),i=Math.floor(t.asMonths()%12),r=Math.floor(t.asDays()%30),s=t.hours(),o=t.minutes(),u=t.seconds(),a=[];return n>0&&a.push(`${n}年`),i>0&&a.push(`${i}月`),r>0&&a.push(`${r}天`),s>0&&a.push(`${s}小时`),o>0&&a.push(`${o}分`),(a.length===0||u>0)&&a.push(`${u}秒`),a.join("")},$t=e=>{if(e<=0)return[0,"B","0 B"];const t=1024,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.min(Math.floor(Math.log(e)/Math.log(t)),n.length-1),r=(e/t**i).toFixed(2);return[r,n[i],`${r} ${n[i]}`]},Mt=e=>e.toString().replace(/^(\d{3})\d{4}(\d{4})$/,"$1****$2"),_e=(e,t=2)=>{const n=e.toFixed(t).toString(),i=n.indexOf(".")>-1?/(\d)(?=(\d{3})+\.)/g:/(\d)(?=(?:\d{3})+$)/g;return n.replace(i,"$1,")};/*!
|
|
1
|
+
(function(ge){typeof define=="function"&&define.amd?define(ge):ge()})(function(){"use strict";const ge=e=>Object.prototype.toString.call(e).substring(8).replace(/]/g,"").toLowerCase(),Ke=(e=1,t)=>{let n,i=e,r=Date.now(),s=!1;return new Promise(o=>{const u=()=>{document.hidden?(s=!0,clearTimeout(n),i-=Date.now()-r):s&&(s=!1,r=Date.now(),a(o))},a=c=>{n=setTimeout(()=>{t==null||t(),c(),document.removeEventListener("visibilitychange",u)},i)};document.addEventListener("visibilitychange",u),a(o)})},Qe=(e,t,n=[])=>{const i={red:"#c0392b",orange:"#d35400",yellow:"#f1c40f",green:"#27ae60",blue:"#2980b9",purple:"#be2edd"},r=()=>{const s=new Date,o=String(s.getHours()).padStart(2,"0"),u=String(s.getMinutes()).padStart(2,"0"),a=String(s.getSeconds()).padStart(2,"0");return`[${o}:${u}:${a}]`};if(Array.isArray(n)){const s=n.map(o=>[`
|
|
2
|
+
${o.label}:`,o.value]);console.log(`%c${r()}-${e}`,`color: #fff;background: ${i[t]}; font-size:14px;border-radius:5px;padding:0.25em;margin:0.5em 0`,...s.flat(1/0))}else console.log(`%c${r()}-${e}`,`color: #fff;background: ${i[t]}; font-size:14px;border-radius:5px;padding:0.25em;margin:0.5em 0`,n)},et=()=>{const e=navigator.userAgent.toLowerCase();return/mobile|android|iphone|ipod/.test(e)},tt=()=>{const e=navigator.userAgent.toLowerCase(),t=Math.max(window.screen.width,window.screen.height),n=Math.min(window.screen.width,window.screen.height),i=t/n,r=/ipad|tablet|playbook|silk/.test(e)&&!/mobile/.test(e),s=t>=768&&t<=1366,o=i>=1.3&&i<=1.6;return r||s&&o},nt=()=>{const t=location.href.split("?")[1];return t?t.split("&").reduce((i,r)=>{const[s,o]=r.split(/=(.+)/);return i[s]=o,i},{})||{}:{}},it=(e,t)=>{document.title=e;const n=document.createElement("link");n.setAttribute("rel","icon"),n.setAttribute("href",t),(document.head||document.getElementsByTagName("head")[0]).appendChild(n)},rt=(e,t)=>{let n="",i;window.addEventListener("visibilitychange",()=>{if(clearTimeout(i),document.hidden){document.title!==e&&(n=document.title),document.title=t;return}document.title=e,i=setTimeout(()=>{document.title=n},1e3)})},st=e=>Object.entries(e).map(([t,n])=>`${t}=${n}`).join("&"),ot=(e,t)=>{const n=[];for(let i=0;i<e.length;i+=t)n.push(e.slice(i,i+t));return n},we=e=>{if(typeof e=="string")try{const t=JSON.parse(e);return we(t)}catch{return e}return Array.isArray(e)?e.map(t=>we(t)):e!==null&&typeof e=="object"?Object.keys(e).reduce((t,n)=>(t[n]=we(e[n]),t),{}):e},ut=(e=[],t)=>t?e.reduce((n,i)=>(n[i[t]]||(n[i[t]]=[]),n[i[t]].push(i),n),{}):{},ct=(e,t)=>e.includes("@")?t.filter(n=>n.includes(e.slice(e.indexOf("@")))).map(n=>(e.includes("@")?e.split("@")[0]:e)+n):t.map(n=>e+n),at=e=>{const t=[...e];for(let n=t.length-1;n>0;n--){const i=Math.floor(Math.random()*(n+1));[t[n],t[i]]=[t[i],t[n]]}return t},ft=(e,t)=>{const n=e.length;if(n===0||t%n===0)return e;const i=(t%n+n)%n;return e.slice(-i).concat(e.slice(0,-i))},lt=(e,t)=>{if(t<0||t>=e.length)throw new Error("Index out of bounds");const n=e.slice(t+1).reverse();return[...e.slice(0,t+1),...n]},ht=(e,t)=>{fetch(e).then(n=>n.blob()).then(n=>{const i=document.createElement("a"),r=window.URL.createObjectURL(n);i.href=r,i.download=t,i.click()})},dt=e=>{const t=document.createElement("canvas");t.classList.add("imageOptimizer"),document.body.appendChild(t);const n=e.file;if(!n)return;const i=n.name,r=i.split(".").pop().toLowerCase(),s=e.ratio||1,o=e.maxSize||1024,u=e.width||1e4,a=n.type;function c(h,p){const w=h.split(","),M=w[0].match(/:(.*?);/)[1],P=window.atob(w[1]),A=P.length,H=new Uint8Array(A);for(let O=0;O<A;O++)H[O]=P.charCodeAt(O);return new File([H],p,{type:M})}function f(h){const p=new FormData;return p.append("file",h),p}const l=new FileReader;l.readAsDataURL(n),l.onload=h=>{const p=h.target.result;if(h.total/1024>o){const w=new Image;w.src=p,w.onload=()=>{const M=t.getContext("2d"),P=u/w.width;P<1?(t.width=w.width*P,t.height=w.height*P,M.drawImage(w,0,0,w.width*P,w.height*P)):(t.width=w.width,t.height=w.height,M.drawImage(w,0,0,w.width,w.height));const A=t.toDataURL(a,s),H=`${i.split(".")[0]}.${r}`,O=c(A,H);e.success(f(O),O,A),t.remove()},w.onerror=e.fail}else{const w=`${i.split(".")[0]}.${r}`,M=c(p,w);e.success(f(M),M,p),t.remove()}},l.onerror=e.fail},mt=(e,t)=>{const n=window.URL||window.webkitURL,i=new Blob([t]),r=document.createElement("a");r.href=n.createObjectURL(i),r.download=e,r.click(),n.revokeObjectURL(r.href)};var Le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fe={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(Le,function(){var n=1e3,i=6e4,r=36e5,s="millisecond",o="second",u="minute",a="hour",c="day",f="week",l="month",h="quarter",p="year",w="date",M="Invalid Date",P=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,H={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var g=["th","st","nd","rd"],m=N%100;return"["+N+(g[(m-20)%10]||g[m]||g[0])+"]"}},O=function(N,g,m){var D=String(N);return!D||D.length>=g?N:""+Array(g+1-D.length).join(m)+N},q={s:O,z:function(N){var g=-N.utcOffset(),m=Math.abs(g),D=Math.floor(m/60),$=m%60;return(g<=0?"+":"-")+O(D,2,"0")+":"+O($,2,"0")},m:function N(g,m){if(g.date()<m.date())return-N(m,g);var D=12*(m.year()-g.year())+(m.month()-g.month()),$=g.clone().add(D,l),C=m-$<0,I=g.clone().add(D+(C?-1:1),l);return+(-(D+(m-$)/(C?$-I:I-$))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:l,y:p,w:f,d:c,D:w,h:a,m:u,s:o,ms:s,Q:h}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},X="en",T={};T[X]=H;var E="$isDayjsObject",v=function(N){return N instanceof R||!(!N||!N[E])},L=function N(g,m,D){var $;if(!g)return X;if(typeof g=="string"){var C=g.toLowerCase();T[C]&&($=C),m&&(T[C]=m,$=C);var I=g.split("-");if(!$&&I.length>1)return N(I[0])}else{var J=g.name;T[J]=g,$=J}return!D&&$&&(X=$),$||!D&&X},y=function(N,g){if(v(N))return N.clone();var m=typeof g=="object"?g:{};return m.date=N,m.args=arguments,new R(m)},b=q;b.l=L,b.i=v,b.w=function(N,g){return y(N,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var R=function(){function N(m){this.$L=L(m.locale,null,!0),this.parse(m),this.$x=this.$x||m.x||{},this[E]=!0}var g=N.prototype;return g.parse=function(m){this.$d=function(D){var $=D.date,C=D.utc;if($===null)return new Date(NaN);if(b.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var I=$.match(P);if(I){var J=I[2]-1||0,B=(I[7]||"0").substring(0,3);return C?new Date(Date.UTC(I[1],J,I[3]||1,I[4]||0,I[5]||0,I[6]||0,B)):new Date(I[1],J,I[3]||1,I[4]||0,I[5]||0,I[6]||0,B)}}return new Date($)}(m),this.init()},g.init=function(){var m=this.$d;this.$y=m.getFullYear(),this.$M=m.getMonth(),this.$D=m.getDate(),this.$W=m.getDay(),this.$H=m.getHours(),this.$m=m.getMinutes(),this.$s=m.getSeconds(),this.$ms=m.getMilliseconds()},g.$utils=function(){return b},g.isValid=function(){return this.$d.toString()!==M},g.isSame=function(m,D){var $=y(m);return this.startOf(D)<=$&&$<=this.endOf(D)},g.isAfter=function(m,D){return y(m)<this.startOf(D)},g.isBefore=function(m,D){return this.endOf(D)<y(m)},g.$g=function(m,D,$){return b.u(m)?this[D]:this.set($,m)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(m,D){var $=this,C=!!b.u(D)||D,I=b.p(m),J=function(ae,G){var ue=b.w($.$u?Date.UTC($.$y,G,ae):new Date($.$y,G,ae),$);return C?ue:ue.endOf(c)},B=function(ae,G){return b.w($.toDate()[ae].apply($.toDate("s"),(C?[0,0,0,0]:[23,59,59,999]).slice(G)),$)},Z=this.$W,V=this.$M,x=this.$D,he="set"+(this.$u?"UTC":"");switch(I){case p:return C?J(1,0):J(31,11);case l:return C?J(1,V):J(0,V+1);case f:var ce=this.$locale().weekStart||0,me=(Z<ce?Z+7:Z)-ce;return J(C?x-me:x+(6-me),V);case c:case w:return B(he+"Hours",0);case a:return B(he+"Minutes",1);case u:return B(he+"Seconds",2);case o:return B(he+"Milliseconds",3);default:return this.clone()}},g.endOf=function(m){return this.startOf(m,!1)},g.$set=function(m,D){var $,C=b.p(m),I="set"+(this.$u?"UTC":""),J=($={},$[c]=I+"Date",$[w]=I+"Date",$[l]=I+"Month",$[p]=I+"FullYear",$[a]=I+"Hours",$[u]=I+"Minutes",$[o]=I+"Seconds",$[s]=I+"Milliseconds",$)[C],B=C===c?this.$D+(D-this.$W):D;if(C===l||C===p){var Z=this.clone().set(w,1);Z.$d[J](B),Z.init(),this.$d=Z.set(w,Math.min(this.$D,Z.daysInMonth())).$d}else J&&this.$d[J](B);return this.init(),this},g.set=function(m,D){return this.clone().$set(m,D)},g.get=function(m){return this[b.p(m)]()},g.add=function(m,D){var $,C=this;m=Number(m);var I=b.p(D),J=function(V){var x=y(C);return b.w(x.date(x.date()+Math.round(V*m)),C)};if(I===l)return this.set(l,this.$M+m);if(I===p)return this.set(p,this.$y+m);if(I===c)return J(1);if(I===f)return J(7);var B=($={},$[u]=i,$[a]=r,$[o]=n,$)[I]||1,Z=this.$d.getTime()+m*B;return b.w(Z,this)},g.subtract=function(m,D){return this.add(-1*m,D)},g.format=function(m){var D=this,$=this.$locale();if(!this.isValid())return $.invalidDate||M;var C=m||"YYYY-MM-DDTHH:mm:ssZ",I=b.z(this),J=this.$H,B=this.$m,Z=this.$M,V=$.weekdays,x=$.months,he=$.meridiem,ce=function(G,ue,pe,ke){return G&&(G[ue]||G(D,C))||pe[ue].slice(0,ke)},me=function(G){return b.s(J%12||12,G,"0")},ae=he||function(G,ue,pe){var ke=G<12?"AM":"PM";return pe?ke.toLowerCase():ke};return C.replace(A,function(G,ue){return ue||function(pe){switch(pe){case"YY":return String(D.$y).slice(-2);case"YYYY":return b.s(D.$y,4,"0");case"M":return Z+1;case"MM":return b.s(Z+1,2,"0");case"MMM":return ce($.monthsShort,Z,x,3);case"MMMM":return ce(x,Z);case"D":return D.$D;case"DD":return b.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return ce($.weekdaysMin,D.$W,V,2);case"ddd":return ce($.weekdaysShort,D.$W,V,3);case"dddd":return V[D.$W];case"H":return String(J);case"HH":return b.s(J,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return ae(J,B,!0);case"A":return ae(J,B,!1);case"m":return String(B);case"mm":return b.s(B,2,"0");case"s":return String(D.$s);case"ss":return b.s(D.$s,2,"0");case"SSS":return b.s(D.$ms,3,"0");case"Z":return I}return null}(G)||I.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(m,D,$){var C,I=this,J=b.p(D),B=y(m),Z=(B.utcOffset()-this.utcOffset())*i,V=this-B,x=function(){return b.m(I,B)};switch(J){case p:C=x()/12;break;case l:C=x();break;case h:C=x()/3;break;case f:C=(V-Z)/6048e5;break;case c:C=(V-Z)/864e5;break;case a:C=V/r;break;case u:C=V/i;break;case o:C=V/n;break;default:C=V}return $?C:b.a(C)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return T[this.$L]},g.locale=function(m,D){if(!m)return this.$L;var $=this.clone(),C=L(m,D,!0);return C&&($.$L=C),$},g.clone=function(){return b.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},N}(),U=R.prototype;return y.prototype=U,[["$ms",s],["$s",o],["$m",u],["$H",a],["$W",c],["$M",l],["$y",p],["$D",w]].forEach(function(N){U[N[1]]=function(g){return this.$g(g,N[0],N[1])}}),y.extend=function(N,g){return N.$i||(N(g,R,y),N.$i=!0),y},y.locale=L,y.isDayjs=v,y.unix=function(N){return y(1e3*N)},y.en=T[X],y.Ls=T,y.p={},y})})(Fe);var pt=Fe.exports;const ve=Pe(pt);var Je={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(Le,function(){var n,i,r=1e3,s=6e4,o=36e5,u=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=31536e6,f=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:c,months:f,days:u,hours:o,minutes:s,seconds:r,milliseconds:1,weeks:6048e5},p=function(T){return T instanceof q},w=function(T,E,v){return new q(T,v,E.$l)},M=function(T){return i.p(T)+"s"},P=function(T){return T<0},A=function(T){return P(T)?Math.ceil(T):Math.floor(T)},H=function(T){return Math.abs(T)},O=function(T,E){return T?P(T)?{negative:!0,format:""+H(T)+E}:{negative:!1,format:""+T+E}:{negative:!1,format:""}},q=function(){function T(v,L,y){var b=this;if(this.$d={},this.$l=y,v===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return w(v*h[M(L)],this);if(typeof v=="number")return this.$ms=v,this.parseFromMilliseconds(),this;if(typeof v=="object")return Object.keys(v).forEach(function(N){b.$d[M(N)]=v[N]}),this.calMilliseconds(),this;if(typeof v=="string"){var R=v.match(l);if(R){var U=R.slice(2).map(function(N){return N!=null?Number(N):0});return this.$d.years=U[0],this.$d.months=U[1],this.$d.weeks=U[2],this.$d.days=U[3],this.$d.hours=U[4],this.$d.minutes=U[5],this.$d.seconds=U[6],this.calMilliseconds(),this}}return this}var E=T.prototype;return E.calMilliseconds=function(){var v=this;this.$ms=Object.keys(this.$d).reduce(function(L,y){return L+(v.$d[y]||0)*h[y]},0)},E.parseFromMilliseconds=function(){var v=this.$ms;this.$d.years=A(v/c),v%=c,this.$d.months=A(v/f),v%=f,this.$d.days=A(v/u),v%=u,this.$d.hours=A(v/o),v%=o,this.$d.minutes=A(v/s),v%=s,this.$d.seconds=A(v/r),v%=r,this.$d.milliseconds=v},E.toISOString=function(){var v=O(this.$d.years,"Y"),L=O(this.$d.months,"M"),y=+this.$d.days||0;this.$d.weeks&&(y+=7*this.$d.weeks);var b=O(y,"D"),R=O(this.$d.hours,"H"),U=O(this.$d.minutes,"M"),N=this.$d.seconds||0;this.$d.milliseconds&&(N+=this.$d.milliseconds/1e3,N=Math.round(1e3*N)/1e3);var g=O(N,"S"),m=v.negative||L.negative||b.negative||R.negative||U.negative||g.negative,D=R.format||U.format||g.format?"T":"",$=(m?"-":"")+"P"+v.format+L.format+b.format+D+R.format+U.format+g.format;return $==="P"||$==="-P"?"P0D":$},E.toJSON=function(){return this.toISOString()},E.format=function(v){var L=v||"YYYY-MM-DDTHH:mm:ss",y={Y:this.$d.years,YY:i.s(this.$d.years,2,"0"),YYYY:i.s(this.$d.years,4,"0"),M:this.$d.months,MM:i.s(this.$d.months,2,"0"),D:this.$d.days,DD:i.s(this.$d.days,2,"0"),H:this.$d.hours,HH:i.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:i.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:i.s(this.$d.seconds,2,"0"),SSS:i.s(this.$d.milliseconds,3,"0")};return L.replace(a,function(b,R){return R||String(y[b])})},E.as=function(v){return this.$ms/h[M(v)]},E.get=function(v){var L=this.$ms,y=M(v);return y==="milliseconds"?L%=1e3:L=y==="weeks"?A(L/h[y]):this.$d[y],L||0},E.add=function(v,L,y){var b;return b=L?v*h[M(L)]:p(v)?v.$ms:w(v,this).$ms,w(this.$ms+b*(y?-1:1),this)},E.subtract=function(v,L){return this.add(v,L,!0)},E.locale=function(v){var L=this.clone();return L.$l=v,L},E.clone=function(){return w(this.$ms,this)},E.humanize=function(v){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!v)},E.valueOf=function(){return this.asMilliseconds()},E.milliseconds=function(){return this.get("milliseconds")},E.asMilliseconds=function(){return this.as("milliseconds")},E.seconds=function(){return this.get("seconds")},E.asSeconds=function(){return this.as("seconds")},E.minutes=function(){return this.get("minutes")},E.asMinutes=function(){return this.as("minutes")},E.hours=function(){return this.get("hours")},E.asHours=function(){return this.as("hours")},E.days=function(){return this.get("days")},E.asDays=function(){return this.as("days")},E.weeks=function(){return this.get("weeks")},E.asWeeks=function(){return this.as("weeks")},E.months=function(){return this.get("months")},E.asMonths=function(){return this.as("months")},E.years=function(){return this.get("years")},E.asYears=function(){return this.as("years")},T}(),X=function(T,E,v){return T.add(E.years()*v,"y").add(E.months()*v,"M").add(E.days()*v,"d").add(E.hours()*v,"h").add(E.minutes()*v,"m").add(E.seconds()*v,"s").add(E.milliseconds()*v,"ms")};return function(T,E,v){n=v,i=v().$utils(),v.duration=function(b,R){var U=v.locale();return w(b,{$l:U},R)},v.isDuration=p;var L=E.prototype.add,y=E.prototype.subtract;E.prototype.add=function(b,R){return p(b)?X(this,b,1):L.bind(this)(b,R)},E.prototype.subtract=function(b,R){return p(b)?X(this,b,-1):y.bind(this)(b,R)}}})})(Je);var gt=Je.exports;const wt=Pe(gt);ve.extend(wt);const vt=e=>{const t=ve.duration(e,"seconds"),n=Math.floor(t.asYears()),i=Math.floor(t.asMonths()%12),r=Math.floor(t.asDays()%30),s=t.hours(),o=t.minutes(),u=t.seconds(),a=[];return n>0&&a.push(`${n}年`),i>0&&a.push(`${i}月`),r>0&&a.push(`${r}天`),s>0&&a.push(`${s}小时`),o>0&&a.push(`${o}分`),(a.length===0||u>0)&&a.push(`${u}秒`),a.join("")},$t=e=>{if(e<=0)return[0,"B","0 B"];const t=1024,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.min(Math.floor(Math.log(e)/Math.log(t)),n.length-1),r=(e/t**i).toFixed(2);return[r,n[i],`${r} ${n[i]}`]},Mt=e=>e.toString().replace(/^(\d{3})\d{4}(\d{4})$/,"$1****$2"),_e=(e,t=2)=>{const n=e.toFixed(t).toString(),i=n.indexOf(".")>-1?/(\d)(?=(\d{3})+\.)/g:/(\d)(?=(?:\d{3})+$)/g;return n.replace(i,"$1,")};/*!
|
|
3
3
|
* decimal.js v10.4.3
|
|
4
4
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
5
5
|
* https://github.com/MikeMcl/decimal.js
|