minutool 1.0.10 → 1.0.12

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/minutool.js CHANGED
@@ -1,49 +1,49 @@
1
- const $t = (t, e) => {
1
+ const zt = (t, e) => {
2
2
  let n = [];
3
3
  for (let i in t)
4
4
  n.push(t[i][e]);
5
5
  return n;
6
- }, Bt = (t, e) => {
6
+ }, Wt = (t, e) => {
7
7
  for (let n in t)
8
8
  if (t[n] === e)
9
9
  return n;
10
10
  return null;
11
- }, qt = (t, e) => {
11
+ }, Jt = (t, e) => {
12
12
  let n = /* @__PURE__ */ new Map();
13
- return t.filter((i) => {
14
- let r = e ? e(i) : i;
15
- if (!n.has(r))
16
- return n.set(r, !0), !0;
13
+ return t.filter((i, o) => {
14
+ let a = e ? e(i, o) : i;
15
+ if (!n.has(a))
16
+ return n.set(a, !0), !0;
17
17
  });
18
- }, Yt = (t, e, n) => {
18
+ }, Kt = (t, e, n) => {
19
19
  if (!t || !t.length)
20
20
  return t;
21
21
  let i = {};
22
- if (t.forEach((l) => {
23
- let p = l[e];
24
- i[p] || (i[p] = []), i[p].push(l);
22
+ if (t.forEach((a) => {
23
+ let p = a[e];
24
+ i[p] || (i[p] = []), i[p].push(a);
25
25
  }), !n)
26
26
  return i;
27
- let r = {};
28
- for (let l in i)
29
- r[l] = i[l][0];
30
- return r;
31
- }, jt = (t) => Object.keys(t).sort().reduce(
27
+ let o = {};
28
+ for (let a in i)
29
+ o[a] = i[a][0];
30
+ return o;
31
+ }, Vt = (t) => Object.keys(t).sort().reduce(
32
32
  function(e, n) {
33
33
  return e[n] = t[n], e;
34
34
  },
35
35
  {}
36
- ), Gt = (t, e) => {
36
+ ), Qt = (t, e) => {
37
37
  let n = t.length;
38
38
  if (e < 1 || !n)
39
39
  return [];
40
40
  if (e > n)
41
41
  return [t];
42
- let i = [], r = Math.floor(n / e), l = n % e;
43
- for (let p = 1; p <= r; p++)
42
+ let i = [], o = Math.floor(n / e), a = n % e;
43
+ for (let p = 1; p <= o; p++)
44
44
  i.push(t.splice(0, e));
45
- return l && i.push(t.splice(0, l)), i;
46
- }, zt = (t) => {
45
+ return a && i.push(t.splice(0, a)), i;
46
+ }, Zt = (t) => {
47
47
  let e = -1;
48
48
  for (let n = t.length - 1; n >= 0; n--)
49
49
  if (t[n]) {
@@ -52,15 +52,15 @@ const $t = (t, e) => {
52
52
  }
53
53
  return t.slice(0, e + 1);
54
54
  };
55
- function et(t) {
55
+ function ot(t) {
56
56
  return t && t.charAt(0).toUpperCase() + t.slice(1);
57
57
  }
58
- const Wt = (t, e = 0) => {
58
+ const Xt = (t, e = 0) => {
59
59
  if (!t || typeof t != "string")
60
60
  return e;
61
61
  const n = parseFloat(t);
62
62
  return isNaN(n) ? e : n;
63
- }, Jt = (t) => (t + "").replace(/\\(.?)/g, function(e, n) {
63
+ }, te = (t) => (t + "").replace(/\\(.?)/g, function(e, n) {
64
64
  switch (n) {
65
65
  case "\\":
66
66
  return "\\";
@@ -71,34 +71,34 @@ const Wt = (t, e = 0) => {
71
71
  default:
72
72
  return n;
73
73
  }
74
- }), Kt = (t, e, n = "...") => {
74
+ }), ee = (t, e, n = "...") => {
75
75
  let i = /[^\x00-\xff]/g;
76
76
  if (t.replace(i, "mm").length <= e)
77
77
  return t;
78
- let r = Math.floor(e / 2);
79
- for (let l = r; l < t.length; l++)
80
- if (t.substr(0, l).replace(i, "mm").length >= e)
81
- return t.substr(0, l) + n;
78
+ let o = Math.floor(e / 2);
79
+ for (let a = o; a < t.length; a++)
80
+ if (t.substr(0, a).replace(i, "mm").length >= e)
81
+ return t.substr(0, a) + n;
82
82
  return t;
83
- }, Vt = (t, e) => {
83
+ }, ne = (t, e) => {
84
84
  const n = Object.keys(e), i = Object.values(e);
85
85
  return new Function(...n, `return \`${t}\`;`)(...i);
86
86
  };
87
- function Qt(t) {
87
+ function ie(t) {
88
88
  return t.replace(/[-_](.)/g, (e, n) => n.toUpperCase());
89
89
  }
90
- function Zt(t) {
90
+ function oe(t) {
91
91
  return t.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
92
92
  }
93
- function Xt(t, e, n = "...") {
93
+ function re(t, e, n = "...") {
94
94
  return t.length <= e ? t : t.slice(0, e) + n;
95
95
  }
96
- const _ = (t) => (t + "").replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, "\\$1"), nt = (t) => {
97
- let e = "", n = 0, i = 0, r = 0, l = 0;
96
+ const N = (t) => (t + "").replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, "\\$1"), rt = (t) => {
97
+ let e = "", n = 0, i = 0, o = 0, a = 0;
98
98
  for (; n < t.length; )
99
- i = t.charCodeAt(n), i < 128 ? (e += String.fromCharCode(i), n++) : i > 191 && i < 224 ? (r = t.charCodeAt(n + 1), e += String.fromCharCode((i & 31) << 6 | r & 63), n += 2) : (r = t.charCodeAt(n + 1), l = t.charCodeAt(n + 2), e += String.fromCharCode((i & 15) << 12 | (r & 63) << 6 | l & 63), n += 3);
99
+ i = t.charCodeAt(n), i < 128 ? (e += String.fromCharCode(i), n++) : i > 191 && i < 224 ? (o = t.charCodeAt(n + 1), e += String.fromCharCode((i & 31) << 6 | o & 63), n += 2) : (o = t.charCodeAt(n + 1), a = t.charCodeAt(n + 2), e += String.fromCharCode((i & 15) << 12 | (o & 63) << 6 | a & 63), n += 3);
100
100
  return e;
101
- }, $ = (t) => {
101
+ }, Y = (t) => {
102
102
  t = t.replace(/\r\n/g, "n");
103
103
  let e = "";
104
104
  for (let n = 0; n < t.length; n++) {
@@ -106,144 +106,144 @@ const _ = (t) => (t + "").replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,
106
106
  i < 128 ? e += String.fromCharCode(i) : i > 127 && i < 2048 ? (e += String.fromCharCode(i >> 6 | 192), e += String.fromCharCode(i & 63 | 128)) : (e += String.fromCharCode(i >> 12 | 224), e += String.fromCharCode(i >> 6 & 63 | 128), e += String.fromCharCode(i & 63 | 128));
107
107
  }
108
108
  return e;
109
- }, te = (t) => {
109
+ }, ae = (t) => {
110
110
  let e = 0, n = t.length, i = -1;
111
- for (let r = 0; r < n; r++)
112
- i = t.charCodeAt(r), i >= 0 && i <= 128 ? e += 1 : e += 3;
111
+ for (let o = 0; o < n; o++)
112
+ i = t.charCodeAt(o), i >= 0 && i <= 128 ? e += 1 : e += 3;
113
113
  return e;
114
- }, it = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890", rt = (t = 6, e = it) => {
114
+ }, at = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890", lt = (t = 6, e = at) => {
115
115
  let n = "";
116
116
  for (let i = 0; i < t; i++) {
117
- let r = Math.round(Math.random() * (e.length - 1));
118
- n += e.substring(r, r + 1);
117
+ let o = Math.round(Math.random() * (e.length - 1));
118
+ n += e.substring(o, o + 1);
119
119
  }
120
120
  return n;
121
- }, ee = (t = 1, e = 8) => {
121
+ }, le = (t = 1, e = 8) => {
122
122
  let n = [];
123
- const i = "bcdfghjklmnpqrstvwxyz", r = "aeiou";
123
+ const i = "bcdfghjklmnpqrstvwxyz", o = "aeiou";
124
124
  for (; t-- > 0; ) {
125
- let l = "";
125
+ let a = "";
126
126
  for (let p = 0; p < e; p = p + 3)
127
- l += i[Math.floor(Math.random() * i.length)], l += r[Math.floor(Math.random() * r.length)], l += i[Math.floor(Math.random() * i.length)];
128
- n.push(l);
127
+ a += i[Math.floor(Math.random() * i.length)], a += o[Math.floor(Math.random() * o.length)], a += i[Math.floor(Math.random() * i.length)];
128
+ n.push(a);
129
129
  }
130
130
  return n;
131
- }, ne = (t, e = !1) => {
131
+ }, se = (t, e = !1) => {
132
132
  let n = [];
133
- return t.replace(/[-_\s+]/g, " ").split(" ").forEach((i, r) => {
134
- n.push(r === 0 && !e ? i : et(i));
133
+ return t.replace(/[-_\s+]/g, " ").split(" ").forEach((i, o) => {
134
+ n.push(o === 0 && !e ? i : ot(i));
135
135
  }), n.join("");
136
- }, R = 0, k = 1, ot = 2, ie = (t, e = "", n = R) => {
136
+ }, L = 0, H = 1, st = 2, ce = (t, e = "", n = L) => {
137
137
  if (e.length) {
138
- let i = new RegExp("^[" + _(e) + "]+"), r = new RegExp("[" + _(e) + "]+$");
139
- return n === k ? t.replace(i, "") : n === ot ? t.replace(r, "") : t.replace(i, "").replace(r, "");
138
+ let i = new RegExp("^[" + N(e) + "]+"), o = new RegExp("[" + N(e) + "]+$");
139
+ return n === H ? t.replace(i, "") : n === st ? t.replace(o, "") : t.replace(i, "").replace(o, "");
140
140
  } else
141
- return n === R ? t.trim() : n === k ? t.trimStart() : t.trimEnd();
142
- }, re = (t, e) => {
141
+ return n === L ? t.trim() : n === H ? t.trimStart() : t.trimEnd();
142
+ }, pe = (t, e) => {
143
143
  let n = [];
144
144
  for (let i = 0; i < t.length; i += e)
145
145
  n.push(t.slice(i, i + e));
146
146
  return n;
147
- }, oe = (t) => /[\u4e00-\u9fa5]/.test(t), h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", ae = (t) => {
148
- let e = "", n, i, r, l, p, o, s, a = 0;
149
- for (t = t.replace(/\+\+[++^A-Za-z0-9+/=]/g, ""); a < t.length; )
150
- l = h.indexOf(t.charAt(a++)), p = h.indexOf(t.charAt(a++)), o = h.indexOf(t.charAt(a++)), s = h.indexOf(t.charAt(a++)), n = l << 2 | p >> 4, i = (p & 15) << 4 | o >> 2, r = (o & 3) << 6 | s, e = e + String.fromCharCode(n), o !== 64 && (e = e + String.fromCharCode(i)), s !== 64 && (e = e + String.fromCharCode(r));
151
- return e = nt(e), e;
152
- }, le = (t) => $(t).replace("+", "-").replace("/", "_"), se = (t) => {
153
- let e = "", n, i, r, l, p, o, s, a = 0;
154
- for (t = $(t); a < t.length; )
155
- n = t.charCodeAt(a++), i = t.charCodeAt(a++), r = t.charCodeAt(a++), l = n >> 2, p = (n & 3) << 4 | i >> 4, o = (i & 15) << 2 | r >> 6, s = r & 63, isNaN(i) ? o = s = 64 : isNaN(r) && (s = 64), e = e + h.charAt(l) + h.charAt(p) + h.charAt(o) + h.charAt(s);
147
+ }, ue = (t) => /[\u4e00-\u9fa5]/.test(t), h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", fe = (t) => {
148
+ let e = "", n, i, o, a, p, r, s, l = 0;
149
+ for (t = t.replace(/\+\+[++^A-Za-z0-9+/=]/g, ""); l < t.length; )
150
+ a = h.indexOf(t.charAt(l++)), p = h.indexOf(t.charAt(l++)), r = h.indexOf(t.charAt(l++)), s = h.indexOf(t.charAt(l++)), n = a << 2 | p >> 4, i = (p & 15) << 4 | r >> 2, o = (r & 3) << 6 | s, e = e + String.fromCharCode(n), r !== 64 && (e = e + String.fromCharCode(i)), s !== 64 && (e = e + String.fromCharCode(o));
151
+ return e = rt(e), e;
152
+ }, de = (t) => Y(t).replace("+", "-").replace("/", "_"), me = (t) => {
153
+ let e = "", n, i, o, a, p, r, s, l = 0;
154
+ for (t = Y(t); l < t.length; )
155
+ n = t.charCodeAt(l++), i = t.charCodeAt(l++), o = t.charCodeAt(l++), a = n >> 2, p = (n & 3) << 4 | i >> 4, r = (i & 15) << 2 | o >> 6, s = o & 63, isNaN(i) ? r = s = 64 : isNaN(o) && (s = 64), e = e + h.charAt(a) + h.charAt(p) + h.charAt(r) + h.charAt(s);
156
156
  return e;
157
- }, at = async (t) => await lt(t), lt = (t) => new Promise((e, n) => {
157
+ }, ct = async (t) => await pt(t), pt = (t) => new Promise((e, n) => {
158
158
  const i = new FileReader();
159
- i.readAsDataURL(t), i.onload = () => e(i.result), i.onerror = (r) => n(r);
160
- }), st = (t) => {
159
+ i.readAsDataURL(t), i.onload = () => e(i.result), i.onerror = (o) => n(o);
160
+ }), ut = (t) => {
161
161
  if (t.requestFullscreen)
162
162
  return t.requestFullscreen();
163
163
  if (t.webkitRequestFullScreen)
164
164
  return t.webkitRequestFullScreen();
165
165
  throw t.mozRequestFullScreen && t.mozRequestFullScreen(), t.msRequestFullScreen && t.msRequestFullScreen(), "Browser no allow full screen";
166
- }, ct = () => document.exitFullscreen(), ce = (t) => new Promise((e, n) => {
167
- pt() ? ct().then(e).catch(n) : st(t).then(e).catch(n);
168
- }), pt = () => !!document.fullscreenElement, pe = (t) => {
166
+ }, ft = () => document.exitFullscreen(), he = (t) => new Promise((e, n) => {
167
+ dt() ? ft().then(e).catch(n) : ut(t).then(e).catch(n);
168
+ }), dt = () => !!document.fullscreenElement, ge = (t) => {
169
169
  const e = navigator.language || navigator.userLanguage;
170
170
  if (t.includes(e))
171
171
  return e;
172
- const n = e.split("-")[0], i = t.find((r) => r.startsWith(n));
172
+ const n = e.split("-")[0], i = t.find((o) => o.startsWith(n));
173
173
  return i || t[0];
174
- }, ue = () => navigator.userAgent.toLowerCase().indexOf("firefox") > -1, fe = (t, e, n, i = "/", r) => {
175
- let l = "";
174
+ }, xe = () => navigator.userAgent.toLowerCase().indexOf("firefox") > -1, we = (t, e, n, i = "/", o) => {
175
+ let a = "";
176
176
  if (n) {
177
- let o = /* @__PURE__ */ new Date();
178
- o.setTime(Date.now() + n * 24 * 60 * 60 * 1e3), l = "; expires=" + o.toUTCString();
177
+ let r = /* @__PURE__ */ new Date();
178
+ r.setTime(Date.now() + n * 24 * 60 * 60 * 1e3), a = "; expires=" + r.toUTCString();
179
179
  }
180
- let p = t + "=" + (e || "") + l + "; path=" + i;
181
- r && (p += "; domain=" + r), document.cookie = p;
182
- }, me = (t) => {
180
+ let p = t + "=" + (e || "") + a + "; path=" + i;
181
+ o && (p += "; domain=" + o), document.cookie = p;
182
+ }, ve = (t) => {
183
183
  let e = t + "=", n = document.cookie.split(";");
184
184
  for (let i = 0; i < n.length; i++) {
185
- let r = n[i];
186
- for (; r.charAt(0) === " "; ) r = r.substring(1, r.length);
187
- if (r.indexOf(e) === 0) return r.substring(e.length, r.length);
185
+ let o = n[i];
186
+ for (; o.charAt(0) === " "; ) o = o.substring(1, o.length);
187
+ if (o.indexOf(e) === 0) return o.substring(e.length, o.length);
188
188
  }
189
189
  return null;
190
190
  }, S = (t, e = "/", n) => {
191
191
  let i = t + "=; Path=" + e + "; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
192
192
  n && (i += " Domain=" + n + ";"), document.cookie = i;
193
- }, de = (t, e) => {
193
+ }, ye = (t, e) => {
194
194
  const n = (e || (location == null ? void 0 : location.hostname)).split(".");
195
195
  for (; n.length > 1; )
196
196
  S(t, "/", n.join(".")), S(t, "/", "." + n.join(".")), n.shift();
197
197
  S(t);
198
198
  };
199
- let ut = 0;
200
- const ft = (t = "") => "guid_" + (t || rt(6)) + ++ut, he = (t, e) => {
201
- let n, i, r = 0;
199
+ let mt = 0;
200
+ const ht = (t = "") => "guid_" + (t || lt(6)) + ++mt, Ee = (t, e) => {
201
+ let n, i, o = 0;
202
202
  return function() {
203
- let l = +/* @__PURE__ */ new Date();
204
- n = this, i = arguments, l - r > e && (t.apply(n, i), r = l);
203
+ let a = +/* @__PURE__ */ new Date();
204
+ n = this, i = arguments, a - o > e && (t.apply(n, i), o = a);
205
205
  };
206
- }, ge = (t, e) => {
207
- let n, i, r = 0, l = !1;
206
+ }, be = (t, e) => {
207
+ let n, i, o = 0, a = !1;
208
208
  return function() {
209
- if (l)
209
+ if (a)
210
210
  return;
211
211
  let p = +/* @__PURE__ */ new Date();
212
212
  n = this, i = arguments;
213
- let o = e - (p - r);
214
- o <= 0 ? (t.apply(n, i), r = p) : (l = !0, setTimeout(() => {
215
- t.apply(n, i), l = !1, r = p;
216
- }, o));
213
+ let r = e - (p - o);
214
+ r <= 0 ? (t.apply(n, i), o = p) : (a = !0, setTimeout(() => {
215
+ t.apply(n, i), a = !1, o = p;
216
+ }, r));
217
217
  };
218
- }, xe = (t, e) => {
218
+ }, Te = (t, e) => {
219
219
  let n;
220
220
  return function() {
221
- let i = this, r = arguments;
221
+ let i = this, o = arguments;
222
222
  clearTimeout(n), n = setTimeout(function() {
223
- t.apply(i, r);
223
+ t.apply(i, o);
224
224
  }, e);
225
225
  };
226
- }, we = (t) => t && typeof t == "object" && t.then && typeof t.then == "function", ve = (t) => {
226
+ }, Ae = (t) => t && typeof t == "object" && t.then && typeof t.then == "function", Me = (t) => {
227
227
  let e = !1;
228
228
  try {
229
229
  JSON.parse(t), e = !0;
230
230
  } catch {
231
231
  }
232
232
  return e;
233
- }, ye = (t) => t && typeof t == "object" && !Array.isArray(t), be = (t) => t ? Object.prototype.toString.call(t) === "[object Function]" || typeof t == "function" || t instanceof Function : !1, mt = (t) => typeof t != "string" || t.trim() === "" ? !1 : /^(https?:\/\/|\/\/|\/|\.\.?\/*)/i.test(t), Ee = (t) => {
233
+ }, Se = (t) => t && typeof t == "object" && !Array.isArray(t), _e = (t) => t ? Object.prototype.toString.call(t) === "[object Function]" || typeof t == "function" || t instanceof Function : !1, gt = (t) => typeof t != "string" || t.trim() === "" ? !1 : /^(https?:\/\/|\/\/|\/|\.\.?\/*)/i.test(t), Ce = (t) => {
234
234
  let e = !1;
235
235
  try {
236
236
  JSON.parse(t), e = !0;
237
237
  } catch {
238
238
  }
239
239
  return e;
240
- }, Ae = () => {
240
+ }, Ne = () => {
241
241
  let t = new Error().stack;
242
242
  console.log(t);
243
- }, Te = (1 + Math.sqrt(5)) / 2 - 1, B = 96, Me = (t, e = B) => t / 25.4 * e, Se = (t) => Math.round(t * 56.6929), Ce = (t) => t * 2.83464566929, _e = (t) => t / 2.83464566929, Ne = (t, e = B) => 25.4 * t / e, Oe = (t, e, n) => Math.min(Math.max(t, e), n), g = (t, e, n, i = !0) => i ? t >= e && t <= n : t > e && t < n, De = (t, e) => Math.floor(Math.random() * (e + 1 - t)) + t, Re = (t, e = 2) => {
243
+ }, Oe = (1 + Math.sqrt(5)) / 2 - 1, j = 96, De = (t, e = j) => t / 25.4 * e, Re = (t) => Math.round(t * 56.6929), ke = (t) => t * 2.83464566929, Ie = (t) => t / 2.83464566929, Le = (t, e = j) => 25.4 * t / e, He = (t, e, n) => Math.min(Math.max(t, e), n), g = (t, e, n, i = !0) => i ? t >= e && t <= n : t > e && t < n, Fe = (t, e) => Math.floor(Math.random() * (e + 1 - t)) + t, Pe = (t, e = 2) => {
244
244
  let n = Math.pow(10, e);
245
245
  return Math.round(t * n) / n;
246
- }, ke = (...t) => {
246
+ }, Ue = (...t) => {
247
247
  let e = 0;
248
248
  return t.forEach((n) => {
249
249
  if (typeof n == "number" && !isNaN(n)) {
@@ -251,43 +251,43 @@ const ft = (t = "") => "guid_" + (t || rt(6)) + ++ut, he = (t, e) => {
251
251
  i && (e = Math.max(e, i.length));
252
252
  }
253
253
  }), e;
254
- }, Ie = (t) => (t = Math.abs(Number(t)), t === 0 ? 1 : Math.floor(Math.log10(t)) + 1), Le = (t) => {
255
- E(t).style.display = "none";
256
- }, He = (t) => {
257
- E(t).style.display = "";
258
- }, Fe = (t) => {
259
- let e = E(t);
254
+ }, $e = (t) => (t = Math.abs(Number(t)), t === 0 ? 1 : Math.floor(Math.log10(t)) + 1), Be = (t) => {
255
+ b(t).style.display = "none";
256
+ }, qe = (t) => {
257
+ b(t).style.display = "";
258
+ }, Ye = (t) => {
259
+ let e = b(t);
260
260
  return e && e.parentNode && e.parentNode.removeChild(e);
261
- }, C = "disabled", dt = (t, e = "") => q(t, e, !1), ht = (t, e = "") => q(t, e, !0), q = (t, e = "", n = null) => {
262
- let i = E(t), r = n === null ? !i.classList.contains(C) : !n;
263
- r && xt(`.${C} {pointer-event:none !important;}`, "__element_lock_style__"), i.classList.toggle(C, r), i[r ? "setAttribute" : "removeAttribute"]("disabled", "disabled"), i[r ? "setAttribute" : "removeAttribute"]("data-disabled", "disabled"), e && i.classList.toggle(e, r);
264
- }, Pe = (t, e, n) => {
265
- t = E(t);
261
+ }, _ = "disabled", xt = (t, e = "") => G(t, e, !1), wt = (t, e = "") => G(t, e, !0), G = (t, e = "", n = null) => {
262
+ let i = b(t), o = n === null ? !i.classList.contains(_) : !n;
263
+ o && yt(`.${_} {pointer-event:none !important;}`, "__element_lock_style__"), i.classList.toggle(_, o), i[o ? "setAttribute" : "removeAttribute"]("disabled", "disabled"), i[o ? "setAttribute" : "removeAttribute"]("data-disabled", "disabled"), e && i.classList.toggle(e, o);
264
+ }, je = (t, e, n) => {
265
+ t = b(t);
266
266
  let i = !1;
267
267
  t.addEventListener("mouseenter", () => {
268
268
  i || (i = !0, e && e());
269
269
  }), t.addEventListener("mouseleave", () => {
270
270
  i && (i = !1, n && n());
271
271
  });
272
- }, Ue = (t, e) => {
273
- dt(t), e(() => {
274
- ht(t);
272
+ }, Ge = (t, e) => {
273
+ xt(t), e(() => {
274
+ wt(t);
275
275
  });
276
- }, $e = (t) => t.parentNode ? Array.prototype.indexOf.call(t.parentNode.children, t) : -1, Y = (t, e = document) => {
276
+ }, ze = (t) => t.parentNode ? Array.prototype.indexOf.call(t.parentNode.children, t) : -1, z = (t, e = document) => {
277
277
  if (typeof t == "string")
278
278
  return t = t.trim(), t.indexOf(":scope") !== 0 && (t = ":scope " + t), Array.from(e.querySelectorAll(t));
279
279
  if (Array.isArray(t)) {
280
280
  let n = [];
281
281
  return t.forEach((i) => {
282
- n.push(...Y(i));
282
+ n.push(...z(i));
283
283
  }), n;
284
284
  } else return NodeList.prototype.isPrototypeOf(t) || HTMLCollection.prototype.isPrototypeOf(t) ? Array.from(t) : t instanceof HTMLElement ? [t] : t;
285
- }, E = (t, e = document) => typeof t == "string" ? e.querySelector(t) : t, Be = (t) => {
285
+ }, b = (t, e = document) => typeof t == "string" ? e.querySelector(t) : t, We = (t) => {
286
286
  let e = document.getElementsByTagName("*"), n = [];
287
287
  for (n = []; t && t.nodeType === 1; t = t.parentNode)
288
288
  if (t.hasAttribute("id")) {
289
289
  let i = 0;
290
- for (let r = 0; r < e.length && (e[r].hasAttribute("id") && e[r].id === t.id && i++, !(i > 1)); r++)
290
+ for (let o = 0; o < e.length && (e[o].hasAttribute("id") && e[o].id === t.id && i++, !(i > 1)); o++)
291
291
  ;
292
292
  if (i === 1)
293
293
  return n.unshift('id("' + t.getAttribute("id") + '")'), n.join("/");
@@ -295,38 +295,38 @@ const ft = (t = "") => "guid_" + (t || rt(6)) + ++ut, he = (t, e) => {
295
295
  } else if (t.hasAttribute("class"))
296
296
  n.unshift(t.localName.toLowerCase() + '[@class="' + t.getAttribute("class") + '"]');
297
297
  else {
298
- let i, r;
299
- for (i = 1, r = t.previousSibling; r; r = r.previousSibling)
300
- r.localName === t.localName && i++;
298
+ let i, o;
299
+ for (i = 1, o = t.previousSibling; o; o = o.previousSibling)
300
+ o.localName === t.localName && i++;
301
301
  n.unshift(t.localName.toLowerCase() + "[" + i + "]");
302
302
  }
303
303
  return n.length ? "/" + n.join("/") : null;
304
- }, qe = (t, e, n = !0) => {
305
- const i = "ON_DOM_TREE_CHANGE_BIND_" + ft();
306
- let r = () => {
307
- Y(`input:not([${i}]), textarea:not([${i}]), select:not([${i}])`, t).forEach((l) => {
308
- l.setAttribute(i, "1"), l.addEventListener("change", e);
304
+ }, Je = (t, e, n = !0) => {
305
+ const i = "ON_DOM_TREE_CHANGE_BIND_" + ht();
306
+ let o = () => {
307
+ z(`input:not([${i}]), textarea:not([${i}]), select:not([${i}])`, t).forEach((a) => {
308
+ a.setAttribute(i, "1"), a.addEventListener("change", e);
309
309
  });
310
310
  };
311
- gt(
311
+ vt(
312
312
  t,
313
313
  { attributes: !0, subtree: !0, childList: !0 },
314
314
  () => {
315
- n && r(), e();
315
+ n && o(), e();
316
316
  },
317
317
  10
318
- ), n && r();
319
- }, gt = (t, e, n, i = 10) => {
320
- let r = 0, l = !1, p = new MutationObserver(() => {
321
- if (l)
318
+ ), n && o();
319
+ }, vt = (t, e, n, i = 10) => {
320
+ let o = 0, a = !1, p = new MutationObserver(() => {
321
+ if (a)
322
322
  return;
323
- let o = i - (Date.now() - r);
324
- o > 0 ? (l = !0, setTimeout(() => {
325
- l = !1, r = Date.now(), n(p);
326
- }, o)) : (r = Date.now(), n(p));
323
+ let r = i - (Date.now() - o);
324
+ r > 0 ? (a = !0, setTimeout(() => {
325
+ a = !1, o = Date.now(), n(p);
326
+ }, r)) : (o = Date.now(), n(p));
327
327
  });
328
328
  p.observe(t, e);
329
- }, Ye = (t, e = {
329
+ }, Ke = (t, e = {
330
330
  left: 0,
331
331
  top: 0,
332
332
  width: window.innerWidth,
@@ -334,53 +334,53 @@ const ft = (t = "") => "guid_" + (t || rt(6)) + ++ut, he = (t, e) => {
334
334
  }) => {
335
335
  let n = { left: t.left, top: t.top };
336
336
  return t.width > e.width || t.height > e.height || (t.width + t.left > e.width + e.left && (n.left = t.left - (t.width + t.left - (e.width + e.left))), t.height + t.top > e.height + e.top && (n.top = t.top - (t.height + t.top - (e.height + e.top))), t.left < e.left && (n.left = e.left), t.top < e.top && (n.top = e.top)), n;
337
- }, je = (t, e) => t.left <= e.left ? t.left + t.width >= e.left && (g(e.top, t.top, t.top + t.height) || g(e.top + e.height, t.top, t.top + t.height) || e.top >= t.top && e.height >= t.height) : e.left + e.width >= t.left && (g(t.top, e.top, e.top + e.height) || g(t.top + t.height, e.top, e.top + e.height) || t.top >= e.top && t.height >= e.height), Ge = (t) => t ? !!(t.tabIndex >= 0 || t instanceof HTMLAnchorElement && t.href || t instanceof HTMLButtonElement && !t.disabled || t instanceof HTMLInputElement && !t.disabled || t instanceof HTMLTextAreaElement && !t.disabled) : !1;
337
+ }, Ve = (t, e) => t.left <= e.left ? t.left + t.width >= e.left && (g(e.top, t.top, t.top + t.height) || g(e.top + e.height, t.top, t.top + t.height) || e.top >= t.top && e.height >= t.height) : e.left + e.width >= t.left && (g(t.top, e.top, e.top + e.height) || g(t.top + t.height, e.top, e.top + e.height) || t.top >= e.top && t.height >= e.height), Qe = (t) => t ? !!(t.tabIndex >= 0 || t instanceof HTMLAnchorElement && t.href || t instanceof HTMLButtonElement && !t.disabled || t instanceof HTMLInputElement && !t.disabled || t instanceof HTMLTextAreaElement && !t.disabled) : !1;
338
338
  let x = {};
339
- const ze = (t, e = !1) => (!e && t in x || (x[t] = new Promise((n, i) => {
340
- let r = document.createElement("link");
341
- r.rel = "stylesheet", r.href = t, r.onload = () => {
339
+ const Ze = (t, e = !1) => (!e && t in x || (x[t] = new Promise((n, i) => {
340
+ let o = document.createElement("link");
341
+ o.rel = "stylesheet", o.href = t, o.onload = () => {
342
342
  n();
343
- }, r.onerror = () => {
343
+ }, o.onerror = () => {
344
344
  i();
345
- }, document.head.append(r);
346
- })), x[t]), We = (t, e = !1) => (!e && t in x || (x[t] = new Promise((n, i) => {
347
- let r = document.createElement("script");
348
- r.src = t, r.onload = () => {
345
+ }, document.head.append(o);
346
+ })), x[t]), Xe = (t, e = !1) => (!e && t in x || (x[t] = new Promise((n, i) => {
347
+ let o = document.createElement("script");
348
+ o.src = t, o.onload = () => {
349
349
  n();
350
- }, r.onerror = () => {
350
+ }, o.onerror = () => {
351
351
  i();
352
- }, document.head.append(r);
353
- })), x[t]), Je = (t) => {
354
- let e = t.style.visibility, n = t.style.display, i, r;
355
- return t.style.visibility = "hidden", t.style.display = "block", i = t.clientWidth, r = t.clientHeight, t.style.visibility = e, t.style.display = n, { width: i, height: r };
356
- }, xt = (t, e = "", n = document) => {
352
+ }, document.head.append(o);
353
+ })), x[t]), tn = (t) => {
354
+ let e = t.style.visibility, n = t.style.display, i, o;
355
+ return t.style.visibility = "hidden", t.style.display = "block", i = t.clientWidth, o = t.clientHeight, t.style.visibility = e, t.style.display = n, { width: i, height: o };
356
+ }, yt = (t, e = "", n = document) => {
357
357
  if (e && n.querySelector(`#${e}`))
358
358
  return n.querySelector(`#${e}`);
359
359
  let i = n.createElement("style");
360
360
  return n.head.appendChild(i), i.innerHTML = t, e && (i.id = e), i;
361
- }, Ke = (t, e) => g(t.top, e.top, e.top + e.height) && g(t.left, e.left, e.left + e.width) && //左上角
362
- g(t.top + t.height, e.top, e.top + e.height) && g(t.left + t.width, e.left, e.left + e.width), Ve = (t) => Math.pow(10, -t), Qe = (t, e) => {
361
+ }, en = (t, e) => g(t.top, e.top, e.top + e.height) && g(t.left, e.left, e.left + e.width) && //左上角
362
+ g(t.top + t.height, e.top, e.top + e.height) && g(t.left + t.width, e.left, e.left + e.width), nn = (t) => Math.pow(10, -t), on = (t, e) => {
363
363
  try {
364
364
  return new URL(t, e).href;
365
365
  } catch {
366
366
  return t;
367
367
  }
368
- }, Ze = (t, e = null) => {
368
+ }, rn = (t, e = null) => {
369
369
  let n = document.createElement("template");
370
370
  t = t.trim(), n.innerHTML = t;
371
371
  let i = [];
372
- return e ? n.content.childNodes.forEach((r) => {
373
- i.push(e.appendChild(r));
372
+ return e ? n.content.childNodes.forEach((o) => {
373
+ i.push(e.appendChild(o));
374
374
  }) : i = Array.from(n.content.childNodes), i.length === 1 ? i[0] : i;
375
- }, wt = (t, e = !1) => {
375
+ }, Et = (t, e = !1) => {
376
376
  if (!t)
377
377
  throw new Error("el is null");
378
378
  const n = t.getBoundingClientRect();
379
379
  if (e && !n.height) {
380
- const i = t.style.visibility, r = t.style.display;
380
+ const i = t.style.visibility, o = t.style.display;
381
381
  t.style.visibility = "hidden", t.style.display = "block";
382
- const l = wt(t);
383
- return t.style.visibility = i, t.style.display = r, l;
382
+ const a = Et(t);
383
+ return t.style.visibility = i, t.style.display = o, a;
384
384
  }
385
385
  return {
386
386
  top: n.top,
@@ -390,37 +390,53 @@ g(t.top + t.height, e.top, e.top + e.height) && g(t.left + t.width, e.left, e.le
390
390
  width: n.width,
391
391
  height: n.height
392
392
  };
393
- }, Xe = (t) => {
393
+ }, an = (t) => {
394
394
  let e = {};
395
395
  for (let n in t) {
396
396
  const i = t[n];
397
397
  i != null && (e[`--${n}`] = `${i}`);
398
398
  }
399
399
  return e;
400
- }, tn = (t) => t.replace(/[\\/:*?"<>|]/g, "_").replace(/[\0-\x1F]/g, "_").replace(/\s+/g, " ").replace(/^\.+/, "").replace(/\.+$/, "").trim(), I = (t) => new Promise((e, n) => {
400
+ }, R = new EventTarget(), bt = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map();
401
+ let Tt = 0;
402
+ const At = "__MINUTOOL_SYM_EVENT__";
403
+ function k(t) {
404
+ if (!C.has(t)) {
405
+ const e = `${At}${++Tt}`;
406
+ C.set(t, e), bt.set(e, t);
407
+ }
408
+ return C.get(t);
409
+ }
410
+ const ln = (t, e) => {
411
+ R.addEventListener(typeof t == "symbol" ? k(t) : t, e);
412
+ }, sn = (t, e) => {
413
+ R.removeEventListener(typeof t == "symbol" ? k(t) : t, e);
414
+ }, cn = (t, e = null) => {
415
+ R.dispatchEvent(new CustomEvent(typeof t == "symbol" ? k(t) : t, { detail: e }));
416
+ }, pn = (t) => t.replace(/[\\/:*?"<>|]/g, "_").replace(/[\0-\x1F]/g, "_").replace(/\s+/g, " ").replace(/^\.+/, "").replace(/\.+$/, "").trim(), F = (t) => new Promise((e, n) => {
401
417
  const i = new FileReader();
402
- i.onload = () => e(i.result), i.onerror = (r) => n(r), i.readAsDataURL(t);
403
- }), L = {}, H = (t, e = null) => e !== null ? (L[t] = e, null) : L[t] || null, en = async (t) => {
418
+ i.onload = () => e(i.result), i.onerror = (o) => n(o), i.readAsDataURL(t);
419
+ }), P = {}, U = (t, e = null) => e !== null ? (P[t] = e, null) : P[t] || null, un = async (t) => {
404
420
  if (!t)
405
421
  return null;
406
422
  if (typeof t == "string" && t.startsWith("data:"))
407
423
  return t;
408
424
  try {
409
- if (typeof t == "string" && mt(t)) {
425
+ if (typeof t == "string" && gt(t)) {
410
426
  const e = await fetch(t);
411
427
  if (!e.ok)
412
428
  throw new Error(`Fetch failed: ${e.status}`);
413
429
  const n = await e.blob();
414
- return await I(n);
430
+ return await F(n);
415
431
  }
416
- return t instanceof Blob ? await I(t) : null;
432
+ return t instanceof Blob ? await F(t) : null;
417
433
  } catch (e) {
418
434
  return console.warn("file2Base64DataURL failed:", e), null;
419
435
  }
420
- }, nn = (t, e) => {
436
+ }, fn = (t, e) => {
421
437
  const n = document.createElement("a");
422
438
  n.rel = "noopener noreferrer", n.href = t, n.download = e, document.body.appendChild(n), n.click(), document.body.removeChild(n);
423
- }, j = [
439
+ }, W = [
424
440
  "ADDRESS",
425
441
  "ARTICLE",
426
442
  "ASIDE",
@@ -455,7 +471,7 @@ g(t.top + t.height, e.top, e.top + e.height) && g(t.left + t.width, e.left, e.le
455
471
  "TFOOT",
456
472
  "UL",
457
473
  "VIDEO"
458
- ], rn = [
474
+ ], dn = [
459
475
  "A",
460
476
  "ABBR",
461
477
  "ACRONYM",
@@ -488,12 +504,12 @@ g(t.top + t.height, e.top, e.top + e.height) && g(t.left + t.width, e.left, e.le
488
504
  "TT",
489
505
  "U",
490
506
  "VAR"
491
- ].concat(...j), on = ["AREA", "BASE", "BR", "COL", "EMBED", "HR", "IMG", "INPUT", "LINK", "META", "PARAM", "SOURCE", "TRACK", "WBR"], vt = ["STYLE", "COMMENT", "SELECT", "OPTION", "SCRIPT", "TITLE", "HEAD", "BUTTON", "META", "LINK", "PARAM", "SOURCE"], an = (t) => (vt.forEach((n) => {
507
+ ].concat(...W), mn = ["AREA", "BASE", "BR", "COL", "EMBED", "HR", "IMG", "INPUT", "LINK", "META", "PARAM", "SOURCE", "TRACK", "WBR"], Mt = ["STYLE", "COMMENT", "SELECT", "OPTION", "SCRIPT", "TITLE", "HEAD", "BUTTON", "META", "LINK", "PARAM", "SOURCE"], hn = (t) => (Mt.forEach((n) => {
492
508
  t = t.replace(new RegExp(n, "ig"), "");
493
- }), t = t.replace(/[\r|\n]/g, ""), t = t.replace(/<(\w+)([^>]*)>/g, function(n, i, r) {
494
- return j.includes(i.toUpperCase()) ? `
509
+ }), t = t.replace(/[\r|\n]/g, ""), t = t.replace(/<(\w+)([^>]*)>/g, function(n, i, o) {
510
+ return W.includes(i.toUpperCase()) ? `
495
511
  ` : "";
496
- }), t = t.replace(/<\/(\w+)([^>]*)>/g, function(n, i, r) {
512
+ }), t = t.replace(/<\/(\w+)([^>]*)>/g, function(n, i, o) {
497
513
  return "";
498
514
  }), t = t.replace(/<[^>]+>/g, ""), [
499
515
  [/&nbsp;/gi, " "],
@@ -505,23 +521,23 @@ g(t.top + t.height, e.top, e.top + e.height) && g(t.left + t.width, e.left, e.le
505
521
  t = t.replace(n, i);
506
522
  }), t = t.replace(/&#(\d+);/, function(n, i) {
507
523
  return String.fromCharCode(parseInt(i));
508
- }), t = t.replace(/&amp;/gi, "&"), t = t.trim(), t), ln = (t) => yt(t, 0, !1).replace(/\n/g, "<br/>"), sn = (t) => window.CSS && CSS.escape ? CSS.escape(t) : t.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, "\\$&"), cn = (t) => {
524
+ }), t = t.replace(/&amp;/gi, "&"), t = t.trim(), t), gn = (t) => St(t, 0, !1).replace(/\n/g, "<br/>"), xn = (t) => window.CSS && CSS.escape ? CSS.escape(t) : t.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, "\\$&"), wn = (t) => {
509
525
  let e = t.split(";");
510
526
  return e.pop(), e.map((n) => String.fromCharCode(n[2] === "x" ? parseInt(n.slice(3), 16) : parseInt(n.slice(2)))).join("");
511
527
  };
512
528
  let y;
513
- const pn = (t) => (y || (y = document.createElement("div")), t = t.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim, ""), t = t.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim, ""), y.innerHTML = t, t = y.textContent || "", y.textContent = "", t), un = (t) => {
529
+ const vn = (t) => (y || (y = document.createElement("div")), t = t.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim, ""), t = t.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim, ""), y.innerHTML = t, t = y.textContent || "", y.textContent = "", t), yn = (t) => {
514
530
  let e = "";
515
531
  for (let n in t) {
516
532
  let i = t[n] === null ? "" : t[n];
517
- e += `<input type="hidden" name="${F(n)}" value="${F(i)}"/>`;
533
+ e += `<input type="hidden" name="${$(n)}" value="${$(i)}"/>`;
518
534
  }
519
535
  return e;
520
- }, yt = (t, e = 2, n = !0) => {
536
+ }, St = (t, e = 2, n = !0) => {
521
537
  let i = String(t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
522
538
  return n && (i = i.replace(/[\r\n]/g, "<br/>")), e && (i = i.replace(/\t/g, "&nbsp;".repeat(e))), i = i.replace(/\s/g, "&nbsp;"), i;
523
- }, fn = (t) => String(t).replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/<br.*>/, `
524
- `), mn = (t) => {
539
+ }, En = (t) => String(t).replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/<br.*>/, `
540
+ `), bn = (t) => {
525
541
  if (!t)
526
542
  return "";
527
543
  let e = t;
@@ -529,21 +545,21 @@ const pn = (t) => (y || (y = document.createElement("div")), t = t.replace(/<scr
529
545
  const i = n.trim().split(`
530
546
  `);
531
547
  if (i.length < 2) return n;
532
- let r = "<table>";
533
- return i.forEach((l, p) => {
534
- const o = l.split("|").slice(1, -1);
535
- if (/^\s*-+\s*$/.test(o[0])) return;
548
+ let o = "<table>";
549
+ return i.forEach((a, p) => {
550
+ const r = a.split("|").slice(1, -1);
551
+ if (/^\s*-+\s*$/.test(r[0])) return;
536
552
  const s = p === 0 ? "th" : "td";
537
- r += "<tr>", o.forEach((a) => {
538
- r += `<${s}>${a.trim()}</${s}>`;
539
- }), r += "</tr>";
540
- }), r += "</table>", r;
553
+ o += "<tr>", r.forEach((l) => {
554
+ o += `<${s}>${l.trim()}</${s}>`;
555
+ }), o += "</tr>";
556
+ }), o += "</table>", o;
541
557
  }), e = e.replace(/^\s*-\s+(.*)/gim, "<li>$1</li>"), e = e.replace(/(<li>.*<\/li>)/gims, "<ul>$1</ul>"), e = e.replace(/\n/g, "<br />"), e.trim();
542
- }, F = (t, e = "") => (e = e ? "&#13;" : `
543
- `, ("" + t).replace(/&/g, "&amp;").replace(/'/g, "&apos;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\r\n/g, e).replace(/[\r\n]/g, e)), dn = (t, e) => {
558
+ }, $ = (t, e = "") => (e = e ? "&#13;" : `
559
+ `, ("" + t).replace(/&/g, "&amp;").replace(/'/g, "&apos;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\r\n/g, e).replace(/[\r\n]/g, e)), Tn = (t, e) => {
544
560
  let n = t.split("");
545
561
  return e = e || 0, n.map((i) => `&#${e ? "x" + i.charCodeAt(0).toString(16) : i.charCodeAt(0)};`).join("");
546
- }, hn = (t, e, n = '<span class="matched">%s</span>') => e ? t.replace(new RegExp(_(e), "ig"), (i) => n.replace("%s", i)) : t, gn = (t) => {
562
+ }, An = (t, e, n = '<span class="matched">%s</span>') => e ? t.replace(new RegExp(N(e), "ig"), (i) => n.replace("%s", i)) : t, Mn = (t) => {
547
563
  if (!t.src)
548
564
  return null;
549
565
  if (t.src.indexOf("data:") === 0)
@@ -552,42 +568,42 @@ const pn = (t) => (y || (y = document.createElement("div")), t = t.replace(/<scr
552
568
  e.width = t.width, e.height = t.height;
553
569
  let n = e.getContext("2d");
554
570
  return n ? (n.drawImage(t, 0, 0, t.width, t.height), e.toDataURL("image/png")) : null;
555
- }, xn = (t, e = !1) => new Promise((n, i) => {
571
+ }, Sn = (t, e = !1) => new Promise((n, i) => {
556
572
  if (e) {
557
- const l = H(t);
558
- if (l)
559
- return n(l);
573
+ const a = U(t);
574
+ if (a)
575
+ return n(a);
560
576
  }
561
- let r = new XMLHttpRequest();
562
- r.open("GET", t, !0), r.responseType = "blob", r.onload = function() {
577
+ let o = new XMLHttpRequest();
578
+ o.open("GET", t, !0), o.responseType = "blob", o.onload = function() {
563
579
  if (this.status === 200) {
564
- let l = this.response;
565
- at(l).then((p) => {
566
- e && H(t, p), n(p);
580
+ let a = this.response;
581
+ ct(a).then((p) => {
582
+ e && U(t, p), n(p);
567
583
  }).catch((p) => {
568
584
  i(p);
569
585
  });
570
586
  }
571
- }, r.onerror = function() {
587
+ }, o.onerror = function() {
572
588
  i("Error:" + this.statusText);
573
- }, r.onabort = function() {
589
+ }, o.onabort = function() {
574
590
  i("Request abort");
575
- }, r.send();
591
+ }, o.send();
576
592
  }), w = (t, e) => {
577
593
  let n = (t & 65535) + (e & 65535);
578
594
  return (t >> 16) + (e >> 16) + (n >> 16) << 16 | n & 65535;
579
- }, bt = (t, e) => t << e | t >>> 32 - e, M = (t, e, n, i, r, l) => w(bt(w(w(e, t), w(i, l)), r), n), u = (t, e, n, i, r, l, p) => M(e & n | ~e & i, t, e, r, l, p), f = (t, e, n, i, r, l, p) => M(e & i | n & ~i, t, e, r, l, p), m = (t, e, n, i, r, l, p) => M(e ^ n ^ i, t, e, r, l, p), d = (t, e, n, i, r, l, p) => M(n ^ (e | ~i), t, e, r, l, p), T = (t, e) => {
595
+ }, _t = (t, e) => t << e | t >>> 32 - e, M = (t, e, n, i, o, a) => w(_t(w(w(e, t), w(i, a)), o), n), u = (t, e, n, i, o, a, p) => M(e & n | ~e & i, t, e, o, a, p), f = (t, e, n, i, o, a, p) => M(e & i | n & ~i, t, e, o, a, p), d = (t, e, n, i, o, a, p) => M(e ^ n ^ i, t, e, o, a, p), m = (t, e, n, i, o, a, p) => M(n ^ (e | ~i), t, e, o, a, p), A = (t, e) => {
580
596
  t[e >> 5] |= 128 << e % 32, t[(e + 64 >>> 9 << 4) + 14] = e;
581
- let n, i, r, l, p, o = 1732584193, s = -271733879, a = -1732584194, c = 271733878;
597
+ let n, i, o, a, p, r = 1732584193, s = -271733879, l = -1732584194, c = 271733878;
582
598
  for (n = 0; n < t.length; n += 16)
583
- i = o, r = s, l = a, p = c, o = u(o, s, a, c, t[n], 7, -680876936), c = u(c, o, s, a, t[n + 1], 12, -389564586), a = u(a, c, o, s, t[n + 2], 17, 606105819), s = u(s, a, c, o, t[n + 3], 22, -1044525330), o = u(o, s, a, c, t[n + 4], 7, -176418897), c = u(c, o, s, a, t[n + 5], 12, 1200080426), a = u(a, c, o, s, t[n + 6], 17, -1473231341), s = u(s, a, c, o, t[n + 7], 22, -45705983), o = u(o, s, a, c, t[n + 8], 7, 1770035416), c = u(c, o, s, a, t[n + 9], 12, -1958414417), a = u(a, c, o, s, t[n + 10], 17, -42063), s = u(s, a, c, o, t[n + 11], 22, -1990404162), o = u(o, s, a, c, t[n + 12], 7, 1804603682), c = u(c, o, s, a, t[n + 13], 12, -40341101), a = u(a, c, o, s, t[n + 14], 17, -1502002290), s = u(s, a, c, o, t[n + 15], 22, 1236535329), o = f(o, s, a, c, t[n + 1], 5, -165796510), c = f(c, o, s, a, t[n + 6], 9, -1069501632), a = f(a, c, o, s, t[n + 11], 14, 643717713), s = f(s, a, c, o, t[n], 20, -373897302), o = f(o, s, a, c, t[n + 5], 5, -701558691), c = f(c, o, s, a, t[n + 10], 9, 38016083), a = f(a, c, o, s, t[n + 15], 14, -660478335), s = f(s, a, c, o, t[n + 4], 20, -405537848), o = f(o, s, a, c, t[n + 9], 5, 568446438), c = f(c, o, s, a, t[n + 14], 9, -1019803690), a = f(a, c, o, s, t[n + 3], 14, -187363961), s = f(s, a, c, o, t[n + 8], 20, 1163531501), o = f(o, s, a, c, t[n + 13], 5, -1444681467), c = f(c, o, s, a, t[n + 2], 9, -51403784), a = f(a, c, o, s, t[n + 7], 14, 1735328473), s = f(s, a, c, o, t[n + 12], 20, -1926607734), o = m(o, s, a, c, t[n + 5], 4, -378558), c = m(c, o, s, a, t[n + 8], 11, -2022574463), a = m(a, c, o, s, t[n + 11], 16, 1839030562), s = m(s, a, c, o, t[n + 14], 23, -35309556), o = m(o, s, a, c, t[n + 1], 4, -1530992060), c = m(c, o, s, a, t[n + 4], 11, 1272893353), a = m(a, c, o, s, t[n + 7], 16, -155497632), s = m(s, a, c, o, t[n + 10], 23, -1094730640), o = m(o, s, a, c, t[n + 13], 4, 681279174), c = m(c, o, s, a, t[n], 11, -358537222), a = m(a, c, o, s, t[n + 3], 16, -722521979), s = m(s, a, c, o, t[n + 6], 23, 76029189), o = m(o, s, a, c, t[n + 9], 4, -640364487), c = m(c, o, s, a, t[n + 12], 11, -421815835), a = m(a, c, o, s, t[n + 15], 16, 530742520), s = m(s, a, c, o, t[n + 2], 23, -995338651), o = d(o, s, a, c, t[n], 6, -198630844), c = d(c, o, s, a, t[n + 7], 10, 1126891415), a = d(a, c, o, s, t[n + 14], 15, -1416354905), s = d(s, a, c, o, t[n + 5], 21, -57434055), o = d(o, s, a, c, t[n + 12], 6, 1700485571), c = d(c, o, s, a, t[n + 3], 10, -1894986606), a = d(a, c, o, s, t[n + 10], 15, -1051523), s = d(s, a, c, o, t[n + 1], 21, -2054922799), o = d(o, s, a, c, t[n + 8], 6, 1873313359), c = d(c, o, s, a, t[n + 15], 10, -30611744), a = d(a, c, o, s, t[n + 6], 15, -1560198380), s = d(s, a, c, o, t[n + 13], 21, 1309151649), o = d(o, s, a, c, t[n + 4], 6, -145523070), c = d(c, o, s, a, t[n + 11], 10, -1120210379), a = d(a, c, o, s, t[n + 2], 15, 718787259), s = d(s, a, c, o, t[n + 9], 21, -343485551), o = w(o, i), s = w(s, r), a = w(a, l), c = w(c, p);
584
- return [o, s, a, c];
585
- }, G = (t) => {
599
+ i = r, o = s, a = l, p = c, r = u(r, s, l, c, t[n], 7, -680876936), c = u(c, r, s, l, t[n + 1], 12, -389564586), l = u(l, c, r, s, t[n + 2], 17, 606105819), s = u(s, l, c, r, t[n + 3], 22, -1044525330), r = u(r, s, l, c, t[n + 4], 7, -176418897), c = u(c, r, s, l, t[n + 5], 12, 1200080426), l = u(l, c, r, s, t[n + 6], 17, -1473231341), s = u(s, l, c, r, t[n + 7], 22, -45705983), r = u(r, s, l, c, t[n + 8], 7, 1770035416), c = u(c, r, s, l, t[n + 9], 12, -1958414417), l = u(l, c, r, s, t[n + 10], 17, -42063), s = u(s, l, c, r, t[n + 11], 22, -1990404162), r = u(r, s, l, c, t[n + 12], 7, 1804603682), c = u(c, r, s, l, t[n + 13], 12, -40341101), l = u(l, c, r, s, t[n + 14], 17, -1502002290), s = u(s, l, c, r, t[n + 15], 22, 1236535329), r = f(r, s, l, c, t[n + 1], 5, -165796510), c = f(c, r, s, l, t[n + 6], 9, -1069501632), l = f(l, c, r, s, t[n + 11], 14, 643717713), s = f(s, l, c, r, t[n], 20, -373897302), r = f(r, s, l, c, t[n + 5], 5, -701558691), c = f(c, r, s, l, t[n + 10], 9, 38016083), l = f(l, c, r, s, t[n + 15], 14, -660478335), s = f(s, l, c, r, t[n + 4], 20, -405537848), r = f(r, s, l, c, t[n + 9], 5, 568446438), c = f(c, r, s, l, t[n + 14], 9, -1019803690), l = f(l, c, r, s, t[n + 3], 14, -187363961), s = f(s, l, c, r, t[n + 8], 20, 1163531501), r = f(r, s, l, c, t[n + 13], 5, -1444681467), c = f(c, r, s, l, t[n + 2], 9, -51403784), l = f(l, c, r, s, t[n + 7], 14, 1735328473), s = f(s, l, c, r, t[n + 12], 20, -1926607734), r = d(r, s, l, c, t[n + 5], 4, -378558), c = d(c, r, s, l, t[n + 8], 11, -2022574463), l = d(l, c, r, s, t[n + 11], 16, 1839030562), s = d(s, l, c, r, t[n + 14], 23, -35309556), r = d(r, s, l, c, t[n + 1], 4, -1530992060), c = d(c, r, s, l, t[n + 4], 11, 1272893353), l = d(l, c, r, s, t[n + 7], 16, -155497632), s = d(s, l, c, r, t[n + 10], 23, -1094730640), r = d(r, s, l, c, t[n + 13], 4, 681279174), c = d(c, r, s, l, t[n], 11, -358537222), l = d(l, c, r, s, t[n + 3], 16, -722521979), s = d(s, l, c, r, t[n + 6], 23, 76029189), r = d(r, s, l, c, t[n + 9], 4, -640364487), c = d(c, r, s, l, t[n + 12], 11, -421815835), l = d(l, c, r, s, t[n + 15], 16, 530742520), s = d(s, l, c, r, t[n + 2], 23, -995338651), r = m(r, s, l, c, t[n], 6, -198630844), c = m(c, r, s, l, t[n + 7], 10, 1126891415), l = m(l, c, r, s, t[n + 14], 15, -1416354905), s = m(s, l, c, r, t[n + 5], 21, -57434055), r = m(r, s, l, c, t[n + 12], 6, 1700485571), c = m(c, r, s, l, t[n + 3], 10, -1894986606), l = m(l, c, r, s, t[n + 10], 15, -1051523), s = m(s, l, c, r, t[n + 1], 21, -2054922799), r = m(r, s, l, c, t[n + 8], 6, 1873313359), c = m(c, r, s, l, t[n + 15], 10, -30611744), l = m(l, c, r, s, t[n + 6], 15, -1560198380), s = m(s, l, c, r, t[n + 13], 21, 1309151649), r = m(r, s, l, c, t[n + 4], 6, -145523070), c = m(c, r, s, l, t[n + 11], 10, -1120210379), l = m(l, c, r, s, t[n + 2], 15, 718787259), s = m(s, l, c, r, t[n + 9], 21, -343485551), r = w(r, i), s = w(s, o), l = w(l, a), c = w(c, p);
600
+ return [r, s, l, c];
601
+ }, J = (t) => {
586
602
  let e, n = "", i = t.length * 32;
587
603
  for (e = 0; e < i; e += 8)
588
604
  n += String.fromCharCode(t[e >> 5] >>> e % 32 & 255);
589
605
  return n;
590
- }, N = (t) => {
606
+ }, O = (t) => {
591
607
  let e, n = [];
592
608
  for (n[(t.length >> 2) - 1] = void 0, e = 0; e < n.length; e += 1)
593
609
  n[e] = 0;
@@ -595,17 +611,17 @@ const pn = (t) => (y || (y = document.createElement("div")), t = t.replace(/<scr
595
611
  for (e = 0; e < i; e += 8)
596
612
  n[e >> 5] |= (t.charCodeAt(e / 8) & 255) << e % 32;
597
613
  return n;
598
- }, Et = (t) => G(T(N(t), t.length * 8)), At = (t, e) => {
599
- let n, i = N(t), r = [], l = [], p;
600
- for (r[15] = l[15] = void 0, i.length > 16 && (i = T(i, t.length * 8)), n = 0; n < 16; n += 1)
601
- r[n] = i[n] ^ 909522486, l[n] = i[n] ^ 1549556828;
602
- return p = T(r.concat(N(e)), 512 + e.length * 8), G(T(l.concat(p), 640));
603
- }, z = (t) => {
604
- let e = "0123456789abcdef", n = "", i, r;
605
- for (r = 0; r < t.length; r += 1)
606
- i = t.charCodeAt(r), n += e.charAt(i >>> 4 & 15) + e.charAt(i & 15);
614
+ }, Ct = (t) => J(A(O(t), t.length * 8)), Nt = (t, e) => {
615
+ let n, i = O(t), o = [], a = [], p;
616
+ for (o[15] = a[15] = void 0, i.length > 16 && (i = A(i, t.length * 8)), n = 0; n < 16; n += 1)
617
+ o[n] = i[n] ^ 909522486, a[n] = i[n] ^ 1549556828;
618
+ return p = A(o.concat(O(e)), 512 + e.length * 8), J(A(a.concat(p), 640));
619
+ }, K = (t) => {
620
+ let e = "0123456789abcdef", n = "", i, o;
621
+ for (o = 0; o < t.length; o += 1)
622
+ i = t.charCodeAt(o), n += e.charAt(i >>> 4 & 15) + e.charAt(i & 15);
607
623
  return n;
608
- }, O = (t) => unescape(encodeURIComponent(t)), W = (t) => Et(O(t)), Tt = (t) => z(W(t)), J = (t, e) => At(O(t), O(e)), Mt = (t, e) => z(J(t, e)), wn = (t, e, n) => e ? n ? J(e, t) : Mt(e, t) : n ? W(t) : Tt(t), vn = "application/octet-stream", b = "application/json", St = "application/x-www-form-urlencoded", Ct = "multipart/form-data", yn = "text/plain", bn = "text/html", En = {
624
+ }, D = (t) => unescape(encodeURIComponent(t)), V = (t) => Ct(D(t)), Ot = (t) => K(V(t)), Q = (t, e) => Nt(D(t), D(e)), Dt = (t, e) => K(Q(t, e)), _n = (t, e, n) => e ? n ? Q(e, t) : Dt(e, t) : n ? V(t) : Ot(t), Cn = "application/octet-stream", E = "application/json", Rt = "application/x-www-form-urlencoded", kt = "multipart/form-data", Nn = "text/plain", On = "text/html", Dn = {
609
625
  323: "text/h323",
610
626
  accdb: "application/msaccess",
611
627
  accde: "application/msaccess",
@@ -902,16 +918,16 @@ const pn = (t) => (y || (y = document.createElement("div")), t = t.replace(/<scr
902
918
  xwd: "image/x-xwindowdump",
903
919
  z: "application/x-compress",
904
920
  zip: "application/x-zip-compressed"
905
- }, K = (t) => {
921
+ }, Z = (t) => {
906
922
  const e = {};
907
923
  return t.replace(/^\?/, "").split("&").forEach((n) => {
908
- const [i, r] = n.split("=");
909
- i && (e[decodeURIComponent(i)] = decodeURIComponent(r || ""));
924
+ const [i, o] = n.split("=");
925
+ i && (e[decodeURIComponent(i)] = decodeURIComponent(o || ""));
910
926
  }), e;
911
- }, _t = (t, e) => {
912
- const [n, i] = t.split("?"), l = { ...i ? K(i) : {}, ...e }, p = V(l);
927
+ }, It = (t, e) => {
928
+ const [n, i] = t.split("?"), a = { ...i ? Z(i) : {}, ...e }, p = X(a);
913
929
  return `${n}?${p}`;
914
- }, V = (t) => {
930
+ }, X = (t) => {
915
931
  if (typeof t > "u" || typeof t != "object")
916
932
  return t;
917
933
  let e = [];
@@ -924,35 +940,35 @@ const pn = (t) => (y || (y = document.createElement("div")), t = t.replace(/<scr
924
940
  }) : typeof t[n] == "object" || e.push(encodeURI(n + "=" + t[n]));
925
941
  }
926
942
  return e.join("&");
927
- }, Nt = (t, e = {}, n = 0) => {
943
+ }, Lt = (t, e = {}, n = 0) => {
928
944
  const i = new AbortController();
929
- let r = null;
930
- n && (r = setTimeout(() => i.abort(), n));
931
- const l = () => {
932
- r !== null && (clearTimeout(r), r = null);
945
+ let o = null;
946
+ n && (o = setTimeout(() => i.abort(), n));
947
+ const a = () => {
948
+ o !== null && (clearTimeout(o), o = null);
933
949
  }, p = (s) => {
934
- const a = s, c = a.then.bind(a), Z = a.catch.bind(a), X = a.finally.bind(a);
935
- return a.then = function(v, tt) {
936
- return p(c(v, tt));
937
- }, a.catch = function(v) {
938
- return p(Z(v));
939
- }, a.finally = function(v) {
940
- return p(X(v));
941
- }, a.abort = (v) => {
942
- l(), i.abort(v || "Request aborted by user");
943
- }, a;
944
- }, o = fetch(t, {
950
+ const l = s, c = l.then.bind(l), et = l.catch.bind(l), nt = l.finally.bind(l);
951
+ return l.then = function(v, it) {
952
+ return p(c(v, it));
953
+ }, l.catch = function(v) {
954
+ return p(et(v));
955
+ }, l.finally = function(v) {
956
+ return p(nt(v));
957
+ }, l.abort = (v) => {
958
+ a(), i.abort(v || "Request aborted by user");
959
+ }, l;
960
+ }, r = fetch(t, {
945
961
  ...e,
946
962
  signal: i.signal
947
- }).then((s) => (l(), s)).catch((s) => {
948
- throw l(), s;
963
+ }).then((s) => (a(), s)).catch((s) => {
964
+ throw a(), s;
949
965
  });
950
- return p(o);
951
- }, Ot = (t, e, n) => {
966
+ return p(r);
967
+ }, Ht = (t, e, n) => {
952
968
  if (e == null) return;
953
969
  const i = t.replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase();
954
970
  n.set(i, String(e));
955
- }, Dt = (t) => [
971
+ }, Ft = (t) => [
956
972
  "method",
957
973
  "headers",
958
974
  "body",
@@ -966,97 +982,97 @@ const pn = (t) => (y || (y = document.createElement("div")), t = t.replace(/<scr
966
982
  "keepalive",
967
983
  "signal",
968
984
  "window"
969
- ].includes(t), D = (t, e = null, n) => {
970
- let { timeout: i, ...r } = n;
971
- r = r || {}, r.method = r.method || "GET";
972
- const l = r.method.toUpperCase() === "GET", p = new Headers(r.headers || {});
973
- for (let o in r)
974
- Dt(o) || Ot(o, r[o], p);
975
- return l && e && (t = _t(t, typeof e == "string" ? K(e) : e), e = null), Nt(
985
+ ].includes(t), I = (t, e = null, n) => {
986
+ let { timeout: i, ...o } = n;
987
+ o = o || {}, o.method = o.method || "GET";
988
+ const a = o.method.toUpperCase() === "GET", p = new Headers(o.headers || {});
989
+ for (let r in o)
990
+ Ft(r) || Ht(r, o[r], p);
991
+ return a && e && (t = It(t, typeof e == "string" ? Z(e) : e), e = null), Lt(
976
992
  t,
977
993
  {
978
994
  headers: p,
979
- body: l ? void 0 : kt(e, p.get("content-type") || void 0),
980
- ...r
995
+ body: a ? void 0 : Ut(e, p.get("content-type") || void 0),
996
+ ...o
981
997
  },
982
998
  i
983
- ).then((o) => {
984
- if (!o.ok)
985
- throw new Error(`HTTP error! status: ${o.status}`);
986
- return o;
999
+ ).then((r) => {
1000
+ if (!r.ok)
1001
+ throw new Error(`HTTP error! status: ${r.status}`);
1002
+ return r;
987
1003
  });
988
- }, Rt = (t) => typeof t == "string" || t instanceof FormData || t instanceof URLSearchParams || t instanceof Blob || t instanceof ArrayBuffer || ArrayBuffer.isView(t), kt = (t, e) => {
989
- if (Rt(t) || typeof t != "object")
1004
+ }, Pt = (t) => typeof t == "string" || t instanceof FormData || t instanceof URLSearchParams || t instanceof Blob || t instanceof ArrayBuffer || ArrayBuffer.isView(t), Ut = (t, e) => {
1005
+ if (Pt(t) || typeof t != "object")
990
1006
  return t;
991
1007
  switch (e == null ? void 0 : e.toLowerCase()) {
992
- case b:
1008
+ case E:
993
1009
  return JSON.stringify(t);
994
- case St:
995
- case Ct:
1010
+ case Rt:
1011
+ case kt:
996
1012
  default:
997
- return V(t);
1013
+ return X(t);
998
1014
  }
999
- }, An = (t, e = null, n = {}) => D(t, e, { ...n, ContentType: b, Accept: b }).then((i) => i.json()), Tn = (t, e = null, n = {}) => D(t, e, { ...n, method: "POST", ContentType: b, Accept: b }).then((i) => i.json()), Mn = (t, e, n = null, i = {}) => {
1000
- const r = new FormData();
1001
- if (Object.keys(e).forEach((l) => {
1002
- r.append(l, e[l], e[l].name);
1015
+ }, Rn = (t, e = null, n = {}) => I(t, e, { ...n, ContentType: E, Accept: E }).then((i) => i.json()), kn = (t, e = null, n = {}) => I(t, e, { ...n, method: "POST", ContentType: E, Accept: E }).then((i) => i.json()), In = (t, e, n = null, i = {}) => {
1016
+ const o = new FormData();
1017
+ if (Object.keys(e).forEach((a) => {
1018
+ o.append(a, e[a], e[a].name);
1003
1019
  }), n)
1004
- for (let l in n)
1005
- n.hasOwnProperty(l) && r.append(l, n[l]);
1006
- return D(t, r, { ...i, method: "POST" }).then((l) => l.json());
1020
+ for (let a in n)
1021
+ n.hasOwnProperty(a) && o.append(a, n[a]);
1022
+ return I(t, o, { ...i, method: "POST" }).then((a) => a.json());
1007
1023
  };
1008
- function P(t) {
1024
+ function B(t) {
1009
1025
  if (t === null || typeof t != "object") return t;
1010
1026
  if (t instanceof Date) return new Date(t.getTime());
1011
- if (t instanceof Array) return t.map((e) => P(e));
1027
+ if (t instanceof Array) return t.map((e) => B(e));
1012
1028
  if (t instanceof Object) {
1013
1029
  const e = {};
1014
1030
  for (const n in t)
1015
- t.hasOwnProperty(n) && (e[n] = P(t[n]));
1031
+ t.hasOwnProperty(n) && (e[n] = B(t[n]));
1016
1032
  return e;
1017
1033
  }
1018
1034
  return t;
1019
1035
  }
1020
- function Sn(t) {
1036
+ function Ln(t) {
1021
1037
  return Object.keys(t).length === 0;
1022
1038
  }
1023
- const Cn = (t, e) => {
1039
+ const Hn = (t, e) => {
1024
1040
  let n = {};
1025
1041
  for (let i in t)
1026
1042
  e[i] !== void 0 ? n[e[i]] = t[i] : n[i] = t[i];
1027
1043
  return n;
1028
1044
  };
1029
- function _n(t, e, n) {
1045
+ function Fn(t, e, n) {
1030
1046
  const i = e.split(".");
1031
- let r = t;
1032
- for (const l of i) {
1033
- if (r == null)
1047
+ let o = t;
1048
+ for (const a of i) {
1049
+ if (o == null)
1034
1050
  return n;
1035
- r = r[l];
1051
+ o = o[a];
1036
1052
  }
1037
- return r !== void 0 ? r : n;
1053
+ return o !== void 0 ? o : n;
1038
1054
  }
1039
- function Nn(t, e, n) {
1040
- const i = e.split("."), r = i.pop();
1041
- let l = t;
1055
+ function Pn(t, e, n) {
1056
+ const i = e.split("."), o = i.pop();
1057
+ let a = t;
1042
1058
  for (const p of i)
1043
- (!(p in l) || typeof l[p] != "object") && (l[p] = {}), l = l[p];
1044
- l[r] = n;
1059
+ (!(p in a) || typeof a[p] != "object") && (a[p] = {}), a = a[p];
1060
+ a[o] = n;
1045
1061
  }
1046
- function It(t, ...e) {
1062
+ function $t(t, ...e) {
1047
1063
  for (const n of e)
1048
1064
  for (const i in n)
1049
1065
  if (n.hasOwnProperty(i)) {
1050
- const r = n[i], l = t[i];
1051
- r && typeof r == "object" && !Array.isArray(r) && l && typeof l == "object" && !Array.isArray(l) ? t[i] = It(l, r) : t[i] = r;
1066
+ const o = n[i], a = t[i];
1067
+ o && typeof o == "object" && !Array.isArray(o) && a && typeof a == "object" && !Array.isArray(a) ? t[i] = $t(a, o) : t[i] = o;
1052
1068
  }
1053
1069
  return t;
1054
1070
  }
1055
- const Lt = (t, e = !1) => {
1071
+ const Bt = (t, e = !1) => {
1056
1072
  for (const n in t)
1057
- t[n] === null ? delete t[n] : e && typeof t[n] == "object" && Lt(t[n], !0);
1073
+ t[n] === null ? delete t[n] : e && typeof t[n] == "object" && Bt(t[n], !0);
1058
1074
  return t;
1059
- }, On = (/* @__PURE__ */ new Date()).getFullYear(), Dn = (/* @__PURE__ */ new Date()).getMonth() + 1, Rn = (/* @__PURE__ */ new Date()).getDate(), kn = 60 * 1e3, In = 60 * 60 * 1e3, A = 24 * 60 * 60 * 1e3, Ln = 7 * A, Hn = 30 * A, Fn = 31 * A, Pn = 365 * A, Un = 366 * A, $n = 0, Bn = 1, qn = 2, Yn = 3, jn = 4, Gn = 5, zn = 6, Ht = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], Ft = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], Pt = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], Ut = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Wn = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], Jn = ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], Kn = ["日", "一", "二", "三", "四", "五", "六"], Vn = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], Qn = (t, e, n) => {
1075
+ }, Un = (/* @__PURE__ */ new Date()).getFullYear(), $n = (/* @__PURE__ */ new Date()).getMonth() + 1, Bn = (/* @__PURE__ */ new Date()).getDate(), qn = 60 * 1e3, Yn = 60 * 60 * 1e3, T = 24 * 60 * 60 * 1e3, jn = 7 * T, Gn = 30 * T, zn = 31 * T, Wn = 365 * T, Jn = 366 * T, Kn = 0, Vn = 1, Qn = 2, Zn = 3, Xn = 4, ti = 5, ei = 6, qt = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], Yt = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], jt = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], Gt = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], ni = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], ii = ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], oi = ["日", "一", "二", "三", "四", "五", "六"], ri = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], ai = (t, e, n) => {
1060
1076
  let i = () => {
1061
1077
  if (e && e(t), t-- > 0) {
1062
1078
  setTimeout(i, 1e3);
@@ -1065,21 +1081,21 @@ const Lt = (t, e = !1) => {
1065
1081
  n && n();
1066
1082
  };
1067
1083
  i();
1068
- }, Zn = (t) => {
1084
+ }, li = (t) => {
1069
1085
  if (!t || t < 10)
1070
1086
  return "刚刚";
1071
1087
  t = Math.floor(t / 1e3);
1072
1088
  const e = Math.floor(t / 3600), n = Math.floor(t % 3600 / 60), i = t % 60;
1073
- let r = "";
1074
- return e > 0 && (r += e + "小时"), (n > 0 || e > 0) && (r += n + "分钟"), r += i + "秒前", r;
1075
- }, U = {
1089
+ let o = "";
1090
+ return e > 0 && (o += e + "小时"), (n > 0 || e > 0) && (o += n + "分钟"), o += i + "秒前", o;
1091
+ }, q = {
1076
1092
  d: (t) => {
1077
1093
  let e = t.getDate();
1078
1094
  return (e < 10 ? "0" : "") + e;
1079
1095
  },
1080
- D: (t) => Ft[t.getDay()],
1096
+ D: (t) => Yt[t.getDay()],
1081
1097
  j: (t) => t.getDate(),
1082
- l: (t) => Ht[t.getDay()],
1098
+ l: (t) => qt[t.getDay()],
1083
1099
  N: (t) => {
1084
1100
  let e = t.getDay();
1085
1101
  return e === 0 ? 7 : e;
@@ -1099,16 +1115,16 @@ const Lt = (t, e = !1) => {
1099
1115
  e.setDate(e.getDate() - n + 3);
1100
1116
  let i = e.valueOf();
1101
1117
  e.setMonth(0, 1), e.getDay() !== 4 && e.setMonth(0, 1 + (4 - e.getDay() + 7) % 7);
1102
- let r = 1 + Math.ceil((i - e.getTime()) / 6048e5);
1103
- return r < 10 ? "0" + r : r;
1118
+ let o = 1 + Math.ceil((i - e.getTime()) / 6048e5);
1119
+ return o < 10 ? "0" + o : o;
1104
1120
  },
1105
1121
  // Month
1106
- F: (t) => Pt[t.getMonth()],
1122
+ F: (t) => jt[t.getMonth()],
1107
1123
  m: (t) => {
1108
1124
  let e = t.getMonth();
1109
1125
  return (e < 9 ? "0" : "") + (e + 1);
1110
1126
  },
1111
- M: (t) => Ut[t.getMonth()],
1127
+ M: (t) => Gt[t.getMonth()],
1112
1128
  n: (t) => t.getMonth() + 1,
1113
1129
  t: (t) => {
1114
1130
  let e = t.getFullYear(), n = t.getMonth() + 1;
@@ -1156,12 +1172,12 @@ const Lt = (t, e = !1) => {
1156
1172
  I: (t) => {
1157
1173
  let e = null;
1158
1174
  for (let n = 0; n < 12; ++n) {
1159
- let r = new Date(t.getFullYear(), n, 1).getTimezoneOffset();
1160
- if (e === null) e = r;
1161
- else if (r < e) {
1162
- e = r;
1175
+ let o = new Date(t.getFullYear(), n, 1).getTimezoneOffset();
1176
+ if (e === null) e = o;
1177
+ else if (o < e) {
1178
+ e = o;
1163
1179
  break;
1164
- } else if (r > e) break;
1180
+ } else if (o > e) break;
1165
1181
  }
1166
1182
  return t.getTimezoneOffset() === e ? 1 : 0;
1167
1183
  },
@@ -1179,185 +1195,188 @@ const Lt = (t, e = !1) => {
1179
1195
  },
1180
1196
  Z: (t) => -t.getTimezoneOffset() * 60,
1181
1197
  // Full Date/Time
1182
- c: (t) => Q("Y-m-d\\TH:i:sP", t),
1198
+ c: (t) => tt("Y-m-d\\TH:i:sP", t),
1183
1199
  r: (t) => t.toString(),
1184
1200
  U: (t) => Math.floor(t.getTime() / 1e3)
1185
- }, Q = function(t, e = null) {
1201
+ }, tt = function(t, e = null) {
1186
1202
  let n = null;
1187
- return typeof e == "object" && e !== null ? n = e : n = new Date(e || Date.now()), t.replace(/(\\?)(.)/g, function(i, r, l) {
1188
- return r === "" && U[l] ? String(U[l](n)) : l;
1203
+ return typeof e == "object" && e !== null ? n = e : n = new Date(e || Date.now()), t.replace(/(\\?)(.)/g, function(i, o, a) {
1204
+ return o === "" && q[a] ? String(q[a](n)) : a;
1189
1205
  });
1190
- }, Xn = (t) => Q("W", t);
1206
+ }, si = (t) => tt("W", t);
1191
1207
  export {
1192
- j as BLOCK_TAGS,
1193
- se as Base64Encode,
1194
- Rn as DATE_NOW,
1195
- Gn as DAY_FRIDAY,
1196
- Bn as DAY_MONDAY,
1197
- zn as DAY_SATURDAY,
1198
- $n as DAY_SUNDAY,
1199
- jn as DAY_THURSDAY,
1200
- qn as DAY_TUESDAY,
1201
- Yn as DAY_WEDNESDAY,
1202
- Te as GOLDEN_RATIO,
1203
- vn as MIME_BINARY_DEFAULT,
1204
- En as MIME_EXTENSION_MAP,
1205
- St as MIME_FORM,
1206
- bn as MIME_HTML,
1207
- b as MIME_JSON,
1208
- Ct as MIME_MULTIPART,
1209
- yn as MIME_TEXT,
1210
- Wn as MONTH_NAMES_CN,
1211
- Pt as MONTH_NAMES_EN,
1212
- Jn as MONTH_NAMES_SHORT_CN,
1213
- Ut as MONTH_NAMES_SHORT_EN,
1214
- Dn as MONTH_NOW,
1215
- A as ONE_DAY,
1216
- In as ONE_HOUR,
1217
- kn as ONE_MINUTE,
1218
- Hn as ONE_MONTH30,
1219
- Fn as ONE_MONTH31,
1220
- Ln as ONE_WEEK,
1221
- Pn as ONE_YEAR365,
1222
- Un as ONE_YEAR366,
1223
- rn as PAIR_TAGS,
1224
- vt as REMOVABLE_TAGS,
1225
- on as SELF_CLOSING_TAGS,
1226
- B as STAND_DPI,
1227
- R as TRIM_BOTH,
1228
- k as TRIM_LEFT,
1229
- ot as TRIM_RIGHT,
1230
- Vn as WEEK_DAY_NAMES_CN,
1231
- Ht as WEEK_DAY_NAMES_EN,
1232
- Kn as WEEK_DAY_NAMES_SHORT_CN,
1233
- Ft as WEEK_DAY_NAMES_SHORT_EN,
1234
- On as YEAR_NOW,
1235
- Nt as abortableFetch,
1236
- Gt as arrayChunk,
1237
- $t as arrayColumn,
1238
- qt as arrayDistinct,
1239
- Yt as arrayGroup,
1240
- Bt as arrayIndex,
1241
- jt as arraySortByKey,
1242
- zt as arrayTrimTail,
1243
- ae as base64Decode,
1244
- le as base64UrlSafeEncode,
1208
+ W as BLOCK_TAGS,
1209
+ me as Base64Encode,
1210
+ Bn as DATE_NOW,
1211
+ ti as DAY_FRIDAY,
1212
+ Vn as DAY_MONDAY,
1213
+ ei as DAY_SATURDAY,
1214
+ Kn as DAY_SUNDAY,
1215
+ Xn as DAY_THURSDAY,
1216
+ Qn as DAY_TUESDAY,
1217
+ Zn as DAY_WEDNESDAY,
1218
+ Oe as GOLDEN_RATIO,
1219
+ Cn as MIME_BINARY_DEFAULT,
1220
+ Dn as MIME_EXTENSION_MAP,
1221
+ Rt as MIME_FORM,
1222
+ On as MIME_HTML,
1223
+ E as MIME_JSON,
1224
+ kt as MIME_MULTIPART,
1225
+ Nn as MIME_TEXT,
1226
+ ni as MONTH_NAMES_CN,
1227
+ jt as MONTH_NAMES_EN,
1228
+ ii as MONTH_NAMES_SHORT_CN,
1229
+ Gt as MONTH_NAMES_SHORT_EN,
1230
+ $n as MONTH_NOW,
1231
+ T as ONE_DAY,
1232
+ Yn as ONE_HOUR,
1233
+ qn as ONE_MINUTE,
1234
+ Gn as ONE_MONTH30,
1235
+ zn as ONE_MONTH31,
1236
+ jn as ONE_WEEK,
1237
+ Wn as ONE_YEAR365,
1238
+ Jn as ONE_YEAR366,
1239
+ dn as PAIR_TAGS,
1240
+ Mt as REMOVABLE_TAGS,
1241
+ mn as SELF_CLOSING_TAGS,
1242
+ j as STAND_DPI,
1243
+ L as TRIM_BOTH,
1244
+ H as TRIM_LEFT,
1245
+ st as TRIM_RIGHT,
1246
+ ri as WEEK_DAY_NAMES_CN,
1247
+ qt as WEEK_DAY_NAMES_EN,
1248
+ oi as WEEK_DAY_NAMES_SHORT_CN,
1249
+ Yt as WEEK_DAY_NAMES_SHORT_EN,
1250
+ Un as YEAR_NOW,
1251
+ Lt as abortableFetch,
1252
+ Qt as arrayChunk,
1253
+ zt as arrayColumn,
1254
+ Jt as arrayDistinct,
1255
+ Kt as arrayGroup,
1256
+ Wt as arrayIndex,
1257
+ Vt as arraySortByKey,
1258
+ Zt as arrayTrimTail,
1259
+ fe as base64Decode,
1260
+ de as base64UrlSafeEncode,
1245
1261
  g as between,
1246
- at as blobToBase64,
1247
- I as blobToDataUri,
1248
- un as buildHtmlHidden,
1249
- Xe as buildStyleVars,
1250
- Qt as camelCase,
1251
- et as capitalize,
1252
- Lt as cleanNull,
1253
- Qn as countDown,
1254
- Ze as createDomByHtml,
1255
- sn as cssSelectorEscape,
1256
- Kt as cutString,
1257
- xe as debounce,
1258
- pn as decodeHTMLEntities,
1259
- P as deepClone,
1262
+ ct as blobToBase64,
1263
+ F as blobToDataUri,
1264
+ yn as buildHtmlHidden,
1265
+ an as buildStyleVars,
1266
+ ie as camelCase,
1267
+ ot as capitalize,
1268
+ Bt as cleanNull,
1269
+ ai as countDown,
1270
+ rn as createDomByHtml,
1271
+ xn as cssSelectorEscape,
1272
+ ee as cutString,
1273
+ Te as debounce,
1274
+ vn as decodeHTMLEntities,
1275
+ B as deepClone,
1260
1276
  S as deleteCookie,
1261
- de as deleteCookieAllPaths,
1262
- pe as detectLanguage,
1263
- ke as detectedPrecision,
1264
- Ie as digitCount,
1265
- dt as disabled,
1266
- nn as downloadFile,
1267
- ht as enabled,
1268
- st as enterFullScreen,
1269
- cn as entityToString,
1270
- F as escapeAttr,
1271
- yt as escapeHtml,
1272
- ct as exitFullScreen,
1273
- Vt as extract,
1274
- en as fileToBase64DataUri,
1275
- Y as findAll,
1276
- E as findOne,
1277
- Qe as fixBaseUrl,
1278
- Wt as floatVal,
1279
- Q as formatDate,
1280
- wt as getBoundingClientRect,
1281
- me as getCookie,
1282
- Je as getDomDimension,
1283
- An as getJson,
1284
- Be as getNodeXPath,
1285
- te as getUTF8StrLen,
1286
- Xn as getWeekNumber,
1287
- ft as guid,
1288
- Le as hide,
1289
- hn as highlightText,
1290
- an as html2Text,
1291
- gn as imgToBase64,
1292
- xt as insertStyleSheet,
1293
- Rt as isBodyInit,
1294
- oe as isChinese,
1295
- Sn as isEmptyObject,
1296
- ue as isFirefox,
1297
- Ge as isFocusable,
1298
- be as isFunction,
1299
- pt as isInFullScreen,
1300
- Ee as isJSON,
1301
- ve as isJson,
1302
- ye as isObject,
1303
- we as isPromise,
1304
- mt as isUrl,
1305
- Zt as kebabCase,
1306
- Ye as keepRectInContainer,
1307
- Oe as limit,
1308
- ze as loadCss,
1309
- We as loadScript,
1310
- Ue as lockElementInteraction,
1311
- mn as markdown2Html,
1312
- wn as md5,
1313
- Ce as mmToPt,
1314
- Me as mmToPx,
1315
- Se as mmToTwip,
1316
- Zn as msToHMS,
1317
- gt as mutationEffective,
1318
- $e as nodeIndex,
1319
- V as objToQuery,
1320
- _n as objectGet,
1321
- Cn as objectKeyMapping,
1322
- It as objectMerge,
1323
- Nn as objectSet,
1324
- qe as onDomTreeChange,
1325
- Pe as onHover,
1326
- Mn as postFiles,
1327
- Tn as postJson,
1328
- Ve as precisionToStep,
1329
- Ae as printStack,
1330
- _e as ptToMm,
1331
- Ne as pxToMm,
1332
- _t as queryReplace,
1333
- K as queryToObj,
1334
- De as randomInt,
1335
- rt as randomString,
1336
- ee as randomWords,
1337
- je as rectAssoc,
1338
- Ke as rectInLayout,
1339
- _ as regQuote,
1340
- Fe as remove,
1341
- D as request,
1342
- Re as round,
1343
- tn as sanitizeFileName,
1344
- fe as setCookie,
1345
- He as show,
1346
- xn as srcToBase64,
1347
- re as strChunk,
1348
- ne as strToPascalCase,
1349
- dn as stringToEntity,
1350
- Jt as stripSlashes,
1351
- ln as text2Html,
1352
- he as throttle,
1353
- ge as throttleEffect,
1354
- q as toggleDisabled,
1355
- ce as toggleFullScreen,
1356
- ie as trim,
1357
- Xt as truncate,
1358
- fn as unescapeHtml,
1359
- H as urlB64DataCache,
1360
- nt as utf8Decode,
1361
- $ as utf8Encode
1277
+ ye as deleteCookieAllPaths,
1278
+ ge as detectLanguage,
1279
+ Ue as detectedPrecision,
1280
+ $e as digitCount,
1281
+ xt as disabled,
1282
+ cn as dispatchEvent,
1283
+ fn as downloadFile,
1284
+ wt as enabled,
1285
+ ut as enterFullScreen,
1286
+ wn as entityToString,
1287
+ $ as escapeAttr,
1288
+ St as escapeHtml,
1289
+ ft as exitFullScreen,
1290
+ ne as extract,
1291
+ un as fileToBase64DataUri,
1292
+ z as findAll,
1293
+ b as findOne,
1294
+ on as fixBaseUrl,
1295
+ Xt as floatVal,
1296
+ tt as formatDate,
1297
+ Et as getBoundingClientRect,
1298
+ ve as getCookie,
1299
+ tn as getDomDimension,
1300
+ Rn as getJson,
1301
+ We as getNodeXPath,
1302
+ ae as getUTF8StrLen,
1303
+ si as getWeekNumber,
1304
+ ht as guid,
1305
+ Be as hide,
1306
+ An as highlightText,
1307
+ hn as html2Text,
1308
+ Mn as imgToBase64,
1309
+ yt as insertStyleSheet,
1310
+ Pt as isBodyInit,
1311
+ ue as isChinese,
1312
+ Ln as isEmptyObject,
1313
+ xe as isFirefox,
1314
+ Qe as isFocusable,
1315
+ _e as isFunction,
1316
+ dt as isInFullScreen,
1317
+ Ce as isJSON,
1318
+ Me as isJson,
1319
+ Se as isObject,
1320
+ Ae as isPromise,
1321
+ gt as isUrl,
1322
+ oe as kebabCase,
1323
+ Ke as keepRectInContainer,
1324
+ He as limit,
1325
+ Ze as loadCss,
1326
+ Xe as loadScript,
1327
+ Ge as lockElementInteraction,
1328
+ bn as markdown2Html,
1329
+ _n as md5,
1330
+ ke as mmToPt,
1331
+ De as mmToPx,
1332
+ Re as mmToTwip,
1333
+ li as msToHMS,
1334
+ vt as mutationEffective,
1335
+ ze as nodeIndex,
1336
+ X as objToQuery,
1337
+ Fn as objectGet,
1338
+ Hn as objectKeyMapping,
1339
+ $t as objectMerge,
1340
+ Pn as objectSet,
1341
+ sn as offEvent,
1342
+ Je as onDomTreeChange,
1343
+ ln as onEvent,
1344
+ je as onHover,
1345
+ In as postFiles,
1346
+ kn as postJson,
1347
+ nn as precisionToStep,
1348
+ Ne as printStack,
1349
+ Ie as ptToMm,
1350
+ Le as pxToMm,
1351
+ It as queryReplace,
1352
+ Z as queryToObj,
1353
+ Fe as randomInt,
1354
+ lt as randomString,
1355
+ le as randomWords,
1356
+ Ve as rectAssoc,
1357
+ en as rectInLayout,
1358
+ N as regQuote,
1359
+ Ye as remove,
1360
+ I as request,
1361
+ Pe as round,
1362
+ pn as sanitizeFileName,
1363
+ we as setCookie,
1364
+ qe as show,
1365
+ Sn as srcToBase64,
1366
+ pe as strChunk,
1367
+ se as strToPascalCase,
1368
+ Tn as stringToEntity,
1369
+ te as stripSlashes,
1370
+ gn as text2Html,
1371
+ Ee as throttle,
1372
+ be as throttleEffect,
1373
+ G as toggleDisabled,
1374
+ he as toggleFullScreen,
1375
+ ce as trim,
1376
+ re as truncate,
1377
+ En as unescapeHtml,
1378
+ U as urlB64DataCache,
1379
+ rt as utf8Decode,
1380
+ Y as utf8Encode
1362
1381
  };
1363
1382
  //# sourceMappingURL=minutool.js.map