@huyooo/ui 0.11.2 → 0.11.6
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/AuthkitAppSetting-CjQiWZab.js +1914 -0
- package/dist/{Clipboard---tG2Zxz.js → Clipboard-ChMNfcO5.js} +1 -1
- package/dist/{Contact-BEUbBGiB.js → Contact-Yqmjh47e.js} +8 -7
- package/dist/{CustomTable-CVZ4mFzi.js → CustomTable-BUkwlbzN.js} +3 -2
- package/dist/{FeedbackItem-CN041vTm.js → FeedbackItem-DHp_C0pN.js} +3 -3
- package/dist/FeedbackModal-Dzl0Alp7.js +1050 -0
- package/dist/LandingPageFAQ-CZJXvor9.js +80 -0
- package/dist/LandingPageLinkGroup-DDNRivMt.js +521 -0
- package/dist/LandingPageSectionHeader-D_74W4My.js +69 -0
- package/dist/{LandingPageSectionTabs-B6ZVxR47.js → LandingPageSectionTabs-Ce3_Rc2L.js} +354 -426
- package/dist/MessageHandle-BcRjYeVi.js +924 -0
- package/dist/MessageList-Bo6YCfRO.js +233 -0
- package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-F6neJUg3.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BOtgTje-.js} +2 -2
- package/dist/PaySubscriptions-BsU0XmXf.js +515 -0
- package/dist/PricingPlans-BfVy4xU0.js +210 -0
- package/dist/ReferrerReferees-CHSoGrE1.js +106 -0
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-D_-oMTOo.js → Upload.vue_vue_type_script_setup_true_lang-CDWyo3RL.js} +1 -1
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-B4tD8pIE.js +508 -0
- package/dist/WidthContainer-BzS-A143.js +693 -0
- package/dist/{apiClients-9b4zNZ2S.js → apiClients-KFp-rs-C.js} +79 -73
- package/dist/authkit.d.ts +7 -0
- package/dist/authkit.js +52 -45
- package/dist/common/globalConfig.d.ts +4 -2
- package/dist/common/userMenuModal.d.ts +1 -0
- package/dist/common.js +2 -2
- package/dist/components/Authkit/AppSetting/AuthkitOAuthBinding.vue.d.ts +31 -0
- package/dist/components/Authkit/AppSetting/AuthkitPhoneBinding.vue.d.ts +14 -0
- package/dist/components/Authkit/AppSetting/AuthkitPhoneVerify.vue.d.ts +66 -0
- package/dist/components/Authkit/Auth/AuthkitBindPhone.vue.d.ts +27 -0
- package/dist/components/Authkit/Auth/AuthkitEmailUpdate.vue.d.ts +11 -1
- package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +2 -2
- package/dist/components/Authkit/Auth/AuthkitOauthItem.vue.d.ts +1 -1
- package/dist/components/Authkit/Auth/AuthkitPasswordAuth.vue.d.ts +11 -1
- package/dist/components/Authkit/Auth/AuthkitPhonePasswordUpdateAndVerify.vue.d.ts +68 -0
- package/dist/components/Authkit/Auth/AuthkitSignInEmailCode.vue.d.ts +68 -0
- package/dist/components/Authkit/Auth/AuthkitSwitchSignUpOrResetPassword.vue.d.ts +15 -3
- package/dist/components/Authkit/AuthkitOAuthCallbackProvider.vue.d.ts +11 -0
- package/dist/components/Authkit/AuthkitProvider.vue.d.ts +45 -0
- package/dist/components/Feedback/FeedbackBubbleEnd.vue.d.ts +9 -0
- package/dist/components/Feedback/FeedbackBubbleStart.vue.d.ts +11 -6
- package/dist/components/LandingPage/LandingPageSections.vue.d.ts +1 -1
- package/dist/components/Pay/PaySubscriptions.vue.d.ts +2 -1
- package/dist/components/Pay/PricingFAQ.vue.d.ts +17 -0
- package/dist/components/Pay/PricingPlans.vue.d.ts +12 -0
- package/dist/components/UserMenu/UserMenuModals.vue.d.ts +2 -2
- package/dist/components/UserMenu/parts/UserSubscriptionBaseInformation.vue.d.ts +8 -0
- package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +26 -0
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +21 -9
- package/dist/composables/Authkit/useEnsureAuthenticated.d.ts +26 -0
- package/dist/composables/Authkit/useOauth.d.ts +4 -1
- package/dist/composables/Billing/useBillingPlans.d.ts +201 -0
- package/dist/composables/Billing/useBillingSubscriptionSummary.d.ts +280 -0
- package/dist/composables/Billing/useSubscriptionCheckout.d.ts +12 -0
- package/dist/composables/UserMenu/useUserMenu.d.ts +5 -1
- package/dist/composables.d.ts +2 -0
- package/dist/composables.js +25 -22
- package/dist/feedback.js +3 -3
- package/dist/index-D3Kp6R4z.js +4 -0
- package/dist/landingPage.js +42 -40
- package/dist/main.d.ts +1 -0
- package/dist/main.js +677 -631
- package/dist/message.js +19 -18
- package/dist/pay.d.ts +5 -0
- package/dist/pay.js +9 -2
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/api/auth.generated.d.ts +103 -39
- package/dist/types/api/billing.generated.d.ts +61 -28
- package/dist/types/api.d.ts +1 -1
- package/dist/types/app.d.ts +14 -0
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-494yLvsu.js → useAuthkitAppsAuthPageInfo-B9_VzVkQ.js} +20 -7
- package/dist/{useAuthkitCreateAndUpdate-DyRtFxZS.js → useAuthkitCreateAndUpdate-DomftQMK.js} +1 -1
- package/dist/useAuthkitUsersProfile-D4h6OOdR.js +201 -0
- package/dist/{useDownloads-DaeIY0E9.js → useDownloads-CzC3gLUV.js} +1 -1
- package/dist/useEnsureAuthenticated-C_Ss0e9n.js +2247 -0
- package/dist/{useLegalLinks-CPbWqlu6.js → useLegalLinks-OGVbqXVy.js} +2 -2
- package/dist/{useMessageNotifications-Dg5q-C_o.js → useMessageNotifications-DeHFJFcX.js} +1 -1
- package/dist/{useSEO-CXX9dcBx.js → useSEO--jTDDkXk.js} +2 -2
- package/dist/useSubscriptionCheckout-CQ6wHuLI.js +345 -0
- package/dist/{useTableHandle-Cjq4gcC0.js → useTableHandle-jw0P7-2a.js} +1 -1
- package/dist/{useUploadCos-DiJmmbRf.js → useUploadCos-keDKcs0j.js} +501 -515
- package/dist/useUserMenu-ClPBlvaM.js +44 -0
- package/dist/user.js +12 -13
- package/dist/utils/apiMiddlewares.d.ts +6 -0
- package/dist/utils/legacyApi.d.ts +18 -0
- package/package.json +1 -1
- package/dist/AuthkitAppSetting-BCrLMpLg.js +0 -1322
- package/dist/AuthkitSignInPhone-DmCQ2fWs.js +0 -1721
- package/dist/FeedbackModal-aI28o-w5.js +0 -1053
- package/dist/LandingPageSectionHeader-Cs1x8i3q.js +0 -584
- package/dist/MessageHandle-BV1nKlxs.js +0 -1147
- package/dist/PaySubscriptions-B3gI1Eme.js +0 -408
- package/dist/ReferrerReferees-DJzPo7X5.js +0 -106
- package/dist/UserAccountMenu-CJ9KKVYa.js +0 -371
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-ClAXNSgl.js +0 -81
- package/dist/WidthContainer-BG10rumn.js +0 -669
- package/dist/useAuthkitUsersProfile-lGlQP54m.js +0 -186
- package/dist/useUserMenu-B3HKZKJ4.js +0 -43
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { o as
|
|
3
|
-
var
|
|
4
|
-
(function(
|
|
1
|
+
import { c as Ft, g as Ut } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
2
|
+
import { o as mt } from "./apiClients-KFp-rs-C.js";
|
|
3
|
+
var Pt = { exports: {} };
|
|
4
|
+
(function(je, ot) {
|
|
5
5
|
(function(se, E) {
|
|
6
|
-
|
|
7
|
-
})(
|
|
6
|
+
je.exports = E();
|
|
7
|
+
})(Ft, function() {
|
|
8
8
|
return (
|
|
9
9
|
/******/
|
|
10
10
|
function(H) {
|
|
@@ -89,7 +89,7 @@ var At = { exports: {} };
|
|
|
89
89
|
var P = U.Base64, N = "2.1.9", j = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", L = function(r) {
|
|
90
90
|
for (var a = {}, v = 0, I = r.length; v < I; v++) a[r.charAt(v)] = v;
|
|
91
91
|
return a;
|
|
92
|
-
}(j), s = String.fromCharCode,
|
|
92
|
+
}(j), s = String.fromCharCode, k = function(a) {
|
|
93
93
|
if (a.length < 2) {
|
|
94
94
|
var v = a.charCodeAt(0);
|
|
95
95
|
return v < 128 ? a : v < 2048 ? s(192 | v >>> 6) + s(128 | v & 63) : s(224 | v >>> 12 & 15) + s(128 | v >>> 6 & 63) + s(128 | v & 63);
|
|
@@ -97,8 +97,8 @@ var At = { exports: {} };
|
|
|
97
97
|
var v = 65536 + (a.charCodeAt(0) - 55296) * 1024 + (a.charCodeAt(1) - 56320);
|
|
98
98
|
return s(240 | v >>> 18 & 7) + s(128 | v >>> 12 & 63) + s(128 | v >>> 6 & 63) + s(128 | v & 63);
|
|
99
99
|
}
|
|
100
|
-
}, d = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,
|
|
101
|
-
return a.replace(d,
|
|
100
|
+
}, d = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, C = function(a) {
|
|
101
|
+
return a.replace(d, k);
|
|
102
102
|
}, f = function(a) {
|
|
103
103
|
var v = [0, 2, 1][a.length % 3], I = a.charCodeAt(0) << 16 | (a.length > 1 ? a.charCodeAt(1) : 0) << 8 | (a.length > 2 ? a.charCodeAt(2) : 0), T = [j.charAt(I >>> 18), j.charAt(I >>> 12 & 63), v >= 2 ? "=" : j.charAt(I >>> 6 & 63), v >= 1 ? "=" : j.charAt(I & 63)];
|
|
104
104
|
return T.join("");
|
|
@@ -107,7 +107,7 @@ var At = { exports: {} };
|
|
|
107
107
|
} : function(r) {
|
|
108
108
|
return r.replace(/[\s\S]{1,3}/g, f);
|
|
109
109
|
}, m = function(r) {
|
|
110
|
-
return y(
|
|
110
|
+
return y(C(r));
|
|
111
111
|
}, B = function(a, v) {
|
|
112
112
|
return v ? m(String(a)).replace(/[+\/]/g, function(I) {
|
|
113
113
|
return I == "+" ? "-" : "_";
|
|
@@ -148,7 +148,7 @@ var At = { exports: {} };
|
|
|
148
148
|
btoa: y,
|
|
149
149
|
fromBase64: i,
|
|
150
150
|
toBase64: B,
|
|
151
|
-
utob:
|
|
151
|
+
utob: C,
|
|
152
152
|
encode: B,
|
|
153
153
|
encodeURI: w,
|
|
154
154
|
btou: D,
|
|
@@ -173,8 +173,8 @@ var At = { exports: {} };
|
|
|
173
173
|
/*! @babel/runtime/helpers/typeof */
|
|
174
174
|
"./node_modules/@babel/runtime/helpers/typeof.js"
|
|
175
175
|
), N = N || function(j, L) {
|
|
176
|
-
var s = {},
|
|
177
|
-
},
|
|
176
|
+
var s = {}, k = s.lib = {}, d = function() {
|
|
177
|
+
}, C = k.Base = {
|
|
178
178
|
extend: function(g) {
|
|
179
179
|
d.prototype = this;
|
|
180
180
|
var l = new d();
|
|
@@ -195,7 +195,7 @@ var At = { exports: {} };
|
|
|
195
195
|
clone: function() {
|
|
196
196
|
return this.init.prototype.extend(this);
|
|
197
197
|
}
|
|
198
|
-
}, f =
|
|
198
|
+
}, f = k.WordArray = C.extend({
|
|
199
199
|
init: function(g, l) {
|
|
200
200
|
g = this.words = g || [], this.sigBytes = l != L ? l : 4 * g.length;
|
|
201
201
|
},
|
|
@@ -214,7 +214,7 @@ var At = { exports: {} };
|
|
|
214
214
|
g[l >>> 2] &= 4294967295 << 32 - 8 * (l % 4), g.length = j.ceil(l / 4);
|
|
215
215
|
},
|
|
216
216
|
clone: function() {
|
|
217
|
-
var g =
|
|
217
|
+
var g = C.clone.call(this);
|
|
218
218
|
return g.words = this.words.slice(0), g;
|
|
219
219
|
},
|
|
220
220
|
random: function(g) {
|
|
@@ -257,7 +257,7 @@ var At = { exports: {} };
|
|
|
257
257
|
parse: function(g) {
|
|
258
258
|
return B.parse(unescape(encodeURIComponent(g)));
|
|
259
259
|
}
|
|
260
|
-
}, F =
|
|
260
|
+
}, F = k.BufferedBlockAlgorithm = C.extend({
|
|
261
261
|
reset: function() {
|
|
262
262
|
this._data = new f.init(), this._nDataBytes = 0;
|
|
263
263
|
},
|
|
@@ -273,13 +273,13 @@ var At = { exports: {} };
|
|
|
273
273
|
return new f.init(r, i);
|
|
274
274
|
},
|
|
275
275
|
clone: function() {
|
|
276
|
-
var g =
|
|
276
|
+
var g = C.clone.call(this);
|
|
277
277
|
return g._data = this._data.clone(), g;
|
|
278
278
|
},
|
|
279
279
|
_minBufferSize: 0
|
|
280
280
|
});
|
|
281
|
-
|
|
282
|
-
cfg:
|
|
281
|
+
k.Hasher = F.extend({
|
|
282
|
+
cfg: C.extend(),
|
|
283
283
|
init: function(g) {
|
|
284
284
|
this.cfg = this.cfg.extend(g), this.reset();
|
|
285
285
|
},
|
|
@@ -308,18 +308,18 @@ var At = { exports: {} };
|
|
|
308
308
|
return s;
|
|
309
309
|
}(Math);
|
|
310
310
|
(function() {
|
|
311
|
-
var j = N, d = j.lib, L = d.WordArray, s = d.Hasher,
|
|
311
|
+
var j = N, d = j.lib, L = d.WordArray, s = d.Hasher, k = [], d = j.algo.SHA1 = s.extend({
|
|
312
312
|
_doReset: function() {
|
|
313
313
|
this._hash = new L.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
314
314
|
},
|
|
315
315
|
_doProcessBlock: function(f, y) {
|
|
316
316
|
for (var m = this._hash.words, B = m[0], w = m[1], F = m[2], z = m[3], D = m[4], g = 0; 80 > g; g++) {
|
|
317
|
-
if (16 > g)
|
|
317
|
+
if (16 > g) k[g] = f[y + g] | 0;
|
|
318
318
|
else {
|
|
319
|
-
var l =
|
|
320
|
-
|
|
319
|
+
var l = k[g - 3] ^ k[g - 8] ^ k[g - 14] ^ k[g - 16];
|
|
320
|
+
k[g] = l << 1 | l >>> 31;
|
|
321
321
|
}
|
|
322
|
-
l = (B << 5 | B >>> 27) + D +
|
|
322
|
+
l = (B << 5 | B >>> 27) + D + k[g], l = 20 > g ? l + ((w & F | ~w & z) + 1518500249) : 40 > g ? l + ((w ^ F ^ z) + 1859775393) : 60 > g ? l + ((w & F | w & z | F & z) - 1894007588) : l + ((w ^ F ^ z) - 899497514), D = z, z = F, F = w << 30 | w >>> 2, w = B, B = l;
|
|
323
323
|
}
|
|
324
324
|
m[0] = m[0] + B | 0, m[1] = m[1] + w | 0, m[2] = m[2] + F | 0, m[3] = m[3] + z | 0, m[4] = m[4] + D | 0;
|
|
325
325
|
},
|
|
@@ -336,28 +336,28 @@ var At = { exports: {} };
|
|
|
336
336
|
})(), function() {
|
|
337
337
|
var j = N, L = j.enc.Utf8;
|
|
338
338
|
j.algo.HMAC = j.lib.Base.extend({
|
|
339
|
-
init: function(
|
|
340
|
-
|
|
341
|
-
var
|
|
342
|
-
d.sigBytes > f && (d =
|
|
343
|
-
for (var y = this._oKey = d.clone(), m = this._iKey = d.clone(), B = y.words, w = m.words, F = 0; F <
|
|
339
|
+
init: function(k, d) {
|
|
340
|
+
k = this._hasher = new k.init(), typeof d == "string" && (d = L.parse(d));
|
|
341
|
+
var C = k.blockSize, f = 4 * C;
|
|
342
|
+
d.sigBytes > f && (d = k.finalize(d)), d.clamp();
|
|
343
|
+
for (var y = this._oKey = d.clone(), m = this._iKey = d.clone(), B = y.words, w = m.words, F = 0; F < C; F++) B[F] ^= 1549556828, w[F] ^= 909522486;
|
|
344
344
|
y.sigBytes = m.sigBytes = f, this.reset();
|
|
345
345
|
},
|
|
346
346
|
reset: function() {
|
|
347
|
-
var
|
|
348
|
-
|
|
347
|
+
var k = this._hasher;
|
|
348
|
+
k.reset(), k.update(this._iKey);
|
|
349
349
|
},
|
|
350
|
-
update: function(
|
|
351
|
-
return this._hasher.update(
|
|
350
|
+
update: function(k) {
|
|
351
|
+
return this._hasher.update(k), this;
|
|
352
352
|
},
|
|
353
|
-
finalize: function(
|
|
353
|
+
finalize: function(k) {
|
|
354
354
|
var d = this._hasher;
|
|
355
|
-
return
|
|
355
|
+
return k = d.finalize(k), d.reset(), d.finalize(this._oKey.clone().concat(k));
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
358
|
}(), function() {
|
|
359
|
-
var j = N, L = j.lib, s = L.WordArray,
|
|
360
|
-
|
|
359
|
+
var j = N, L = j.lib, s = L.WordArray, k = j.enc;
|
|
360
|
+
k.Base64 = {
|
|
361
361
|
/**
|
|
362
362
|
* Converts a word array to a Base64 string.
|
|
363
363
|
*
|
|
@@ -371,9 +371,9 @@ var At = { exports: {} };
|
|
|
371
371
|
*
|
|
372
372
|
* var base64String = CryptoJS.enc.Base64.stringify(wordArray);
|
|
373
373
|
*/
|
|
374
|
-
stringify: function(
|
|
375
|
-
var f =
|
|
376
|
-
|
|
374
|
+
stringify: function(C) {
|
|
375
|
+
var f = C.words, y = C.sigBytes, m = this._map;
|
|
376
|
+
C.clamp();
|
|
377
377
|
for (var B = [], w = 0; w < y; w += 3)
|
|
378
378
|
for (var F = f[w >>> 2] >>> 24 - w % 4 * 8 & 255, z = f[w + 1 >>> 2] >>> 24 - (w + 1) % 4 * 8 & 255, D = f[w + 2 >>> 2] >>> 24 - (w + 2) % 4 * 8 & 255, g = F << 16 | z << 8 | D, l = 0; l < 4 && w + l * 0.75 < y; l++)
|
|
379
379
|
B.push(m.charAt(g >>> 6 * (3 - l) & 63));
|
|
@@ -396,15 +396,15 @@ var At = { exports: {} };
|
|
|
396
396
|
*
|
|
397
397
|
* var wordArray = CryptoJS.enc.Base64.parse(base64String);
|
|
398
398
|
*/
|
|
399
|
-
parse: function(
|
|
400
|
-
var f =
|
|
399
|
+
parse: function(C) {
|
|
400
|
+
var f = C.length, y = this._map, m = y.charAt(64);
|
|
401
401
|
if (m) {
|
|
402
|
-
var B =
|
|
402
|
+
var B = C.indexOf(m);
|
|
403
403
|
B != -1 && (f = B);
|
|
404
404
|
}
|
|
405
405
|
for (var w = [], F = 0, z = 0; z < f; z++)
|
|
406
406
|
if (z % 4) {
|
|
407
|
-
var D = y.indexOf(
|
|
407
|
+
var D = y.indexOf(C.charAt(z - 1)) << z % 4 * 2, g = y.indexOf(C.charAt(z)) >>> 6 - z % 4 * 2;
|
|
408
408
|
w[F >>> 2] |= (D | g) << 24 - F % 4 * 8, F++;
|
|
409
409
|
}
|
|
410
410
|
return s.create(w, F);
|
|
@@ -436,17 +436,17 @@ var At = { exports: {} };
|
|
|
436
436
|
L.JS_MD5_NO_WINDOW && (j = !1);
|
|
437
437
|
var s = !j && (typeof self > "u" ? "undefined" : N(self)) === "object";
|
|
438
438
|
s && (L = self);
|
|
439
|
-
var
|
|
439
|
+
var k = !L.JS_MD5_NO_COMMON_JS && N(U) === "object" && U.exports, d = E(
|
|
440
440
|
/*! !webpack amd options */
|
|
441
441
|
"./node_modules/webpack/buildin/amd-options.js"
|
|
442
|
-
),
|
|
443
|
-
if (
|
|
442
|
+
), C = !L.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer < "u", f = "0123456789abcdef".split(""), y = [128, 32768, 8388608, -2147483648], m = [0, 8, 16, 24], B = ["hex", "array", "digest", "buffer", "arrayBuffer", "base64"], w = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), F = [], z;
|
|
443
|
+
if (C) {
|
|
444
444
|
var D = new ArrayBuffer(68);
|
|
445
445
|
z = new Uint8Array(D), F = new Uint32Array(D);
|
|
446
446
|
}
|
|
447
447
|
(L.JS_MD5_NO_NODE_JS || !Array.isArray) && (Array.isArray = function(o) {
|
|
448
448
|
return Object.prototype.toString.call(o) === "[object Array]";
|
|
449
|
-
}),
|
|
449
|
+
}), C && (L.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView) && (ArrayBuffer.isView = function(o) {
|
|
450
450
|
return N(o) === "object" && o.buffer && o.buffer.constructor === ArrayBuffer;
|
|
451
451
|
});
|
|
452
452
|
var g = function(t) {
|
|
@@ -469,7 +469,7 @@ var At = { exports: {} };
|
|
|
469
469
|
function x(o) {
|
|
470
470
|
if (o)
|
|
471
471
|
F[0] = F[16] = F[1] = F[2] = F[3] = F[4] = F[5] = F[6] = F[7] = F[8] = F[9] = F[10] = F[11] = F[12] = F[13] = F[14] = F[15] = 0, this.blocks = F, this.buffer8 = z;
|
|
472
|
-
else if (
|
|
472
|
+
else if (C) {
|
|
473
473
|
var t = new ArrayBuffer(68);
|
|
474
474
|
this.buffer8 = new Uint8Array(t), this.blocks = new Uint32Array(t);
|
|
475
475
|
} else
|
|
@@ -479,7 +479,7 @@ var At = { exports: {} };
|
|
|
479
479
|
x.prototype.update = function(o, t) {
|
|
480
480
|
if (!this.finalized) {
|
|
481
481
|
for (var r, a = 0, v, I = o.length, T = this.blocks, M = this.buffer8; a < I; ) {
|
|
482
|
-
if (this.hashed && (this.hashed = !1, T[0] = T[16], T[16] = T[1] = T[2] = T[3] = T[4] = T[5] = T[6] = T[7] = T[8] = T[9] = T[10] = T[11] = T[12] = T[13] = T[14] = T[15] = 0),
|
|
482
|
+
if (this.hashed && (this.hashed = !1, T[0] = T[16], T[16] = T[1] = T[2] = T[3] = T[4] = T[5] = T[6] = T[7] = T[8] = T[9] = T[10] = T[11] = T[12] = T[13] = T[14] = T[15] = 0), C)
|
|
483
483
|
for (v = this.start; a < I && v < 64; ++a)
|
|
484
484
|
r = o.charCodeAt(a), t || r < 128 ? M[v++] = r : r < 2048 ? (M[v++] = 192 | r >> 6, M[v++] = 128 | r & 63) : r < 55296 || r >= 57344 ? (M[v++] = 224 | r >> 12, M[v++] = 128 | r >> 6 & 63, M[v++] = 128 | r & 63) : (r = 65536 + ((r & 1023) << 10 | o.charCodeAt(++a) & 1023), M[v++] = 240 | r >> 18, M[v++] = 128 | r >> 12 & 63, M[v++] = 128 | r >> 6 & 63, M[v++] = 128 | r & 63);
|
|
485
485
|
else
|
|
@@ -517,7 +517,7 @@ var At = { exports: {} };
|
|
|
517
517
|
return o = v[I], a += w[o >>> 2] + w[o << 4 & 63] + "==", a;
|
|
518
518
|
};
|
|
519
519
|
var i = l();
|
|
520
|
-
|
|
520
|
+
k ? U.exports = i : (L.md5 = i, d && (P = (function() {
|
|
521
521
|
return i;
|
|
522
522
|
}).call(i, E, i, U), P !== void 0 && (U.exports = P)));
|
|
523
523
|
})();
|
|
@@ -549,15 +549,15 @@ var At = { exports: {} };
|
|
|
549
549
|
default:
|
|
550
550
|
return "";
|
|
551
551
|
}
|
|
552
|
-
}, N = function(d,
|
|
553
|
-
return
|
|
552
|
+
}, N = function(d, C, f, y) {
|
|
553
|
+
return C = C || "&", f = f || "=", d === null && (d = void 0), U(d) === "object" ? Object.keys(d).map(function(m) {
|
|
554
554
|
var B = encodeURIComponent(P(m)) + f;
|
|
555
555
|
return Array.isArray(d[m]) ? d[m].map(function(w) {
|
|
556
556
|
return B + encodeURIComponent(P(w));
|
|
557
|
-
}).join(
|
|
558
|
-
}).filter(Boolean).join(
|
|
559
|
-
}, j = function(d,
|
|
560
|
-
var y = {}, m =
|
|
557
|
+
}).join(C) : B + encodeURIComponent(P(d[m]));
|
|
558
|
+
}).filter(Boolean).join(C) : "";
|
|
559
|
+
}, j = function(d, C, f) {
|
|
560
|
+
var y = {}, m = C.getAllResponseHeaders();
|
|
561
561
|
return m && m.length > 0 && m.trim().split(`
|
|
562
562
|
`).forEach(function(B) {
|
|
563
563
|
if (B) {
|
|
@@ -566,14 +566,14 @@ var At = { exports: {} };
|
|
|
566
566
|
}
|
|
567
567
|
}), {
|
|
568
568
|
error: d,
|
|
569
|
-
statusCode:
|
|
570
|
-
statusMessage:
|
|
569
|
+
statusCode: C.status,
|
|
570
|
+
statusMessage: C.statusText,
|
|
571
571
|
headers: y,
|
|
572
572
|
body: f
|
|
573
573
|
};
|
|
574
|
-
}, L = function(d,
|
|
575
|
-
return !
|
|
576
|
-
}, s = function(d,
|
|
574
|
+
}, L = function(d, C) {
|
|
575
|
+
return !C && C === "text" ? d.responseText : d.response;
|
|
576
|
+
}, s = function(d, C) {
|
|
577
577
|
var f = (d.method || "GET").toUpperCase(), y = d.url;
|
|
578
578
|
if (d.qs) {
|
|
579
579
|
var m = N(d.qs);
|
|
@@ -589,16 +589,16 @@ var At = { exports: {} };
|
|
|
589
589
|
F.hasOwnProperty(z) && z.toLowerCase() !== "content-length" && z.toLowerCase() !== "user-agent" && z.toLowerCase() !== "origin" && z.toLowerCase() !== "host" && B.setRequestHeader(z, F[z]);
|
|
590
590
|
return d.onProgress && B.upload && (B.upload.onprogress = d.onProgress), d.onDownloadProgress && (B.onprogress = d.onDownloadProgress), d.timeout && (B.timeout = d.timeout), B.ontimeout = function(D) {
|
|
591
591
|
var g = new Error("timeout");
|
|
592
|
-
|
|
592
|
+
C(j(g, B));
|
|
593
593
|
}, B.onload = function() {
|
|
594
|
-
|
|
594
|
+
C(j(null, B, L(B, d.dataType)));
|
|
595
595
|
}, B.onerror = function(D) {
|
|
596
596
|
var g = L(B, d.dataType);
|
|
597
597
|
if (g)
|
|
598
|
-
|
|
598
|
+
C(j(null, B, g));
|
|
599
599
|
else {
|
|
600
600
|
var l = B.statusText;
|
|
601
|
-
!l && B.status === 0 && (l = new Error("CORS blocked or network error")),
|
|
601
|
+
!l && B.status === 0 && (l = new Error("CORS blocked or network error")), C(j(l, B, g));
|
|
602
602
|
}
|
|
603
603
|
}, B.send(d.body || ""), B;
|
|
604
604
|
};
|
|
@@ -633,8 +633,8 @@ var At = { exports: {} };
|
|
|
633
633
|
);
|
|
634
634
|
function P(j, L) {
|
|
635
635
|
for (var s = 0; s < L.length; s++) {
|
|
636
|
-
var
|
|
637
|
-
|
|
636
|
+
var k = L[s];
|
|
637
|
+
k.enumerable = k.enumerable || !1, k.configurable = !0, "value" in k && (k.writable = !0), Object.defineProperty(j, U(k.key), k);
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
640
|
function N(j, L, s) {
|
|
@@ -785,34 +785,34 @@ var At = { exports: {} };
|
|
|
785
785
|
/*! no static exports found */
|
|
786
786
|
/***/
|
|
787
787
|
function(H, se, E) {
|
|
788
|
-
const U = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", P = U + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040", N = "[" + U + "][" + P + "]*", j = new RegExp("^" + N + "$"), L = function(
|
|
789
|
-
const
|
|
790
|
-
let f = d.exec(
|
|
788
|
+
const U = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", P = U + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040", N = "[" + U + "][" + P + "]*", j = new RegExp("^" + N + "$"), L = function(k, d) {
|
|
789
|
+
const C = [];
|
|
790
|
+
let f = d.exec(k);
|
|
791
791
|
for (; f; ) {
|
|
792
792
|
const y = [];
|
|
793
793
|
y.startIndex = d.lastIndex - f[0].length;
|
|
794
794
|
const m = f.length;
|
|
795
795
|
for (let B = 0; B < m; B++)
|
|
796
796
|
y.push(f[B]);
|
|
797
|
-
|
|
797
|
+
C.push(y), f = d.exec(k);
|
|
798
798
|
}
|
|
799
|
-
return
|
|
800
|
-
}, s = function(
|
|
801
|
-
const d = j.exec(
|
|
799
|
+
return C;
|
|
800
|
+
}, s = function(k) {
|
|
801
|
+
const d = j.exec(k);
|
|
802
802
|
return !(d === null || typeof d > "u");
|
|
803
803
|
};
|
|
804
|
-
se.isExist = function(
|
|
805
|
-
return typeof
|
|
806
|
-
}, se.isEmptyObject = function(
|
|
807
|
-
return Object.keys(
|
|
808
|
-
}, se.merge = function(
|
|
804
|
+
se.isExist = function(k) {
|
|
805
|
+
return typeof k < "u";
|
|
806
|
+
}, se.isEmptyObject = function(k) {
|
|
807
|
+
return Object.keys(k).length === 0;
|
|
808
|
+
}, se.merge = function(k, d, C) {
|
|
809
809
|
if (d) {
|
|
810
810
|
const f = Object.keys(d), y = f.length;
|
|
811
811
|
for (let m = 0; m < y; m++)
|
|
812
|
-
|
|
812
|
+
C === "strict" ? k[f[m]] = [d[f[m]]] : k[f[m]] = d[f[m]];
|
|
813
813
|
}
|
|
814
|
-
}, se.getValue = function(
|
|
815
|
-
return se.isExist(
|
|
814
|
+
}, se.getValue = function(k) {
|
|
815
|
+
return se.isExist(k) ? k : "";
|
|
816
816
|
}, se.isName = s, se.getAllMatches = L, se.nameRegexp = N;
|
|
817
817
|
}
|
|
818
818
|
),
|
|
@@ -969,11 +969,11 @@ var At = { exports: {} };
|
|
|
969
969
|
}
|
|
970
970
|
return l;
|
|
971
971
|
}
|
|
972
|
-
const s = '"',
|
|
972
|
+
const s = '"', k = "'";
|
|
973
973
|
function d(g, l) {
|
|
974
974
|
let x = "", i = "", o = !1;
|
|
975
975
|
for (; l < g.length; l++) {
|
|
976
|
-
if (g[l] === s || g[l] ===
|
|
976
|
+
if (g[l] === s || g[l] === k)
|
|
977
977
|
i === "" ? i = g[l] : i !== g[l] || (i = "");
|
|
978
978
|
else if (g[l] === ">" && i === "") {
|
|
979
979
|
o = !0;
|
|
@@ -987,9 +987,9 @@ var At = { exports: {} };
|
|
|
987
987
|
tagClosed: o
|
|
988
988
|
};
|
|
989
989
|
}
|
|
990
|
-
const
|
|
990
|
+
const C = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
|
|
991
991
|
function f(g, l) {
|
|
992
|
-
const x = U.getAllMatches(g,
|
|
992
|
+
const x = U.getAllMatches(g, C), i = {};
|
|
993
993
|
for (let o = 0; o < x.length; o++) {
|
|
994
994
|
if (x[o][1].length === 0)
|
|
995
995
|
return B("InvalidAttr", "Attribute '" + x[o][2] + "' has no space in starting.", D(x[o]));
|
|
@@ -1081,11 +1081,11 @@ var At = { exports: {} };
|
|
|
1081
1081
|
suppressEmptyNode: !1,
|
|
1082
1082
|
suppressUnpairedNode: !0,
|
|
1083
1083
|
suppressBooleanAttributes: !0,
|
|
1084
|
-
tagValueProcessor: function(d,
|
|
1085
|
-
return
|
|
1084
|
+
tagValueProcessor: function(d, C) {
|
|
1085
|
+
return C;
|
|
1086
1086
|
},
|
|
1087
|
-
attributeValueProcessor: function(d,
|
|
1088
|
-
return
|
|
1087
|
+
attributeValueProcessor: function(d, C) {
|
|
1088
|
+
return C;
|
|
1089
1089
|
},
|
|
1090
1090
|
preserveOrder: !1,
|
|
1091
1091
|
commentPropName: !1,
|
|
@@ -1122,7 +1122,7 @@ var At = { exports: {} };
|
|
|
1122
1122
|
function j(d) {
|
|
1123
1123
|
this.options = Object.assign({}, N, d), this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
|
|
1124
1124
|
return !1;
|
|
1125
|
-
} : (this.ignoreAttributesFn = P(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute =
|
|
1125
|
+
} : (this.ignoreAttributesFn = P(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = k), this.processTextOrObjNode = L, this.options.format ? (this.indentate = s, this.tagEndChar = `>
|
|
1126
1126
|
`, this.newLine = `
|
|
1127
1127
|
`) : (this.indentate = function() {
|
|
1128
1128
|
return "";
|
|
@@ -1132,7 +1132,7 @@ var At = { exports: {} };
|
|
|
1132
1132
|
return this.options.preserveOrder ? U(d, this.options) : (Array.isArray(d) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (d = {
|
|
1133
1133
|
[this.options.arrayNodeName]: d
|
|
1134
1134
|
}), this.j2x(d, 0, []).val);
|
|
1135
|
-
}, j.prototype.j2x = function(d,
|
|
1135
|
+
}, j.prototype.j2x = function(d, C, f) {
|
|
1136
1136
|
let y = "", m = "";
|
|
1137
1137
|
const B = f.join(".");
|
|
1138
1138
|
for (let w in d)
|
|
@@ -1140,9 +1140,9 @@ var At = { exports: {} };
|
|
|
1140
1140
|
if (typeof d[w] > "u")
|
|
1141
1141
|
this.isAttribute(w) && (m += "");
|
|
1142
1142
|
else if (d[w] === null)
|
|
1143
|
-
this.isAttribute(w) ? m += "" : w[0] === "?" ? m += this.indentate(
|
|
1143
|
+
this.isAttribute(w) ? m += "" : w[0] === "?" ? m += this.indentate(C) + "<" + w + "?" + this.tagEndChar : m += this.indentate(C) + "<" + w + "/" + this.tagEndChar;
|
|
1144
1144
|
else if (d[w] instanceof Date)
|
|
1145
|
-
m += this.buildTextValNode(d[w], w, "",
|
|
1145
|
+
m += this.buildTextValNode(d[w], w, "", C);
|
|
1146
1146
|
else if (typeof d[w] != "object") {
|
|
1147
1147
|
const F = this.isAttribute(w);
|
|
1148
1148
|
if (F && !this.ignoreAttributesFn(F, B))
|
|
@@ -1152,69 +1152,69 @@ var At = { exports: {} };
|
|
|
1152
1152
|
let z = this.options.tagValueProcessor(w, "" + d[w]);
|
|
1153
1153
|
m += this.replaceEntitiesValue(z);
|
|
1154
1154
|
} else
|
|
1155
|
-
m += this.buildTextValNode(d[w], w, "",
|
|
1155
|
+
m += this.buildTextValNode(d[w], w, "", C);
|
|
1156
1156
|
} else if (Array.isArray(d[w])) {
|
|
1157
1157
|
const F = d[w].length;
|
|
1158
1158
|
let z = "", D = "";
|
|
1159
1159
|
for (let g = 0; g < F; g++) {
|
|
1160
1160
|
const l = d[w][g];
|
|
1161
1161
|
if (!(typeof l > "u")) if (l === null)
|
|
1162
|
-
w[0] === "?" ? m += this.indentate(
|
|
1162
|
+
w[0] === "?" ? m += this.indentate(C) + "<" + w + "?" + this.tagEndChar : m += this.indentate(C) + "<" + w + "/" + this.tagEndChar;
|
|
1163
1163
|
else if (typeof l == "object")
|
|
1164
1164
|
if (this.options.oneListGroup) {
|
|
1165
|
-
const x = this.j2x(l,
|
|
1165
|
+
const x = this.j2x(l, C + 1, f.concat(w));
|
|
1166
1166
|
z += x.val, this.options.attributesGroupName && l.hasOwnProperty(this.options.attributesGroupName) && (D += x.attrStr);
|
|
1167
1167
|
} else
|
|
1168
|
-
z += this.processTextOrObjNode(l, w,
|
|
1168
|
+
z += this.processTextOrObjNode(l, w, C, f);
|
|
1169
1169
|
else if (this.options.oneListGroup) {
|
|
1170
1170
|
let x = this.options.tagValueProcessor(w, l);
|
|
1171
1171
|
x = this.replaceEntitiesValue(x), z += x;
|
|
1172
1172
|
} else
|
|
1173
|
-
z += this.buildTextValNode(l, w, "",
|
|
1173
|
+
z += this.buildTextValNode(l, w, "", C);
|
|
1174
1174
|
}
|
|
1175
|
-
this.options.oneListGroup && (z = this.buildObjectNode(z, w, D,
|
|
1175
|
+
this.options.oneListGroup && (z = this.buildObjectNode(z, w, D, C)), m += z;
|
|
1176
1176
|
} else if (this.options.attributesGroupName && w === this.options.attributesGroupName) {
|
|
1177
1177
|
const F = Object.keys(d[w]), z = F.length;
|
|
1178
1178
|
for (let D = 0; D < z; D++)
|
|
1179
1179
|
y += this.buildAttrPairStr(F[D], "" + d[w][F[D]]);
|
|
1180
1180
|
} else
|
|
1181
|
-
m += this.processTextOrObjNode(d[w], w,
|
|
1181
|
+
m += this.processTextOrObjNode(d[w], w, C, f);
|
|
1182
1182
|
return {
|
|
1183
1183
|
attrStr: y,
|
|
1184
1184
|
val: m
|
|
1185
1185
|
};
|
|
1186
|
-
}, j.prototype.buildAttrPairStr = function(d,
|
|
1187
|
-
return
|
|
1186
|
+
}, j.prototype.buildAttrPairStr = function(d, C) {
|
|
1187
|
+
return C = this.options.attributeValueProcessor(d, "" + C), C = this.replaceEntitiesValue(C), this.options.suppressBooleanAttributes && C === "true" ? " " + d : " " + d + '="' + C + '"';
|
|
1188
1188
|
};
|
|
1189
|
-
function L(d,
|
|
1190
|
-
const m = this.j2x(d, f + 1, y.concat(
|
|
1191
|
-
return d[this.options.textNodeName] !== void 0 && Object.keys(d).length === 1 ? this.buildTextValNode(d[this.options.textNodeName],
|
|
1189
|
+
function L(d, C, f, y) {
|
|
1190
|
+
const m = this.j2x(d, f + 1, y.concat(C));
|
|
1191
|
+
return d[this.options.textNodeName] !== void 0 && Object.keys(d).length === 1 ? this.buildTextValNode(d[this.options.textNodeName], C, m.attrStr, f) : this.buildObjectNode(m.val, C, m.attrStr, f);
|
|
1192
1192
|
}
|
|
1193
|
-
j.prototype.buildObjectNode = function(d,
|
|
1193
|
+
j.prototype.buildObjectNode = function(d, C, f, y) {
|
|
1194
1194
|
if (d === "")
|
|
1195
|
-
return
|
|
1195
|
+
return C[0] === "?" ? this.indentate(y) + "<" + C + f + "?" + this.tagEndChar : this.indentate(y) + "<" + C + f + this.closeTag(C) + this.tagEndChar;
|
|
1196
1196
|
{
|
|
1197
|
-
let m = "</" +
|
|
1198
|
-
return
|
|
1197
|
+
let m = "</" + C + this.tagEndChar, B = "";
|
|
1198
|
+
return C[0] === "?" && (B = "?", m = ""), (f || f === "") && d.indexOf("<") === -1 ? this.indentate(y) + "<" + C + f + B + ">" + d + m : this.options.commentPropName !== !1 && C === this.options.commentPropName && B.length === 0 ? this.indentate(y) + `<!--${d}-->` + this.newLine : this.indentate(y) + "<" + C + f + B + this.tagEndChar + d + this.indentate(y) + m;
|
|
1199
1199
|
}
|
|
1200
1200
|
}, j.prototype.closeTag = function(d) {
|
|
1201
|
-
let
|
|
1202
|
-
return this.options.unpairedTags.indexOf(d) !== -1 ? this.options.suppressUnpairedNode || (
|
|
1203
|
-
}, j.prototype.buildTextValNode = function(d,
|
|
1204
|
-
if (this.options.cdataPropName !== !1 &&
|
|
1201
|
+
let C = "";
|
|
1202
|
+
return this.options.unpairedTags.indexOf(d) !== -1 ? this.options.suppressUnpairedNode || (C = "/") : this.options.suppressEmptyNode ? C = "/" : C = `></${d}`, C;
|
|
1203
|
+
}, j.prototype.buildTextValNode = function(d, C, f, y) {
|
|
1204
|
+
if (this.options.cdataPropName !== !1 && C === this.options.cdataPropName)
|
|
1205
1205
|
return this.indentate(y) + `<![CDATA[${d}]]>` + this.newLine;
|
|
1206
|
-
if (this.options.commentPropName !== !1 &&
|
|
1206
|
+
if (this.options.commentPropName !== !1 && C === this.options.commentPropName)
|
|
1207
1207
|
return this.indentate(y) + `<!--${d}-->` + this.newLine;
|
|
1208
|
-
if (
|
|
1209
|
-
return this.indentate(y) + "<" +
|
|
1208
|
+
if (C[0] === "?")
|
|
1209
|
+
return this.indentate(y) + "<" + C + f + "?" + this.tagEndChar;
|
|
1210
1210
|
{
|
|
1211
|
-
let m = this.options.tagValueProcessor(
|
|
1212
|
-
return m = this.replaceEntitiesValue(m), m === "" ? this.indentate(y) + "<" +
|
|
1211
|
+
let m = this.options.tagValueProcessor(C, d);
|
|
1212
|
+
return m = this.replaceEntitiesValue(m), m === "" ? this.indentate(y) + "<" + C + f + this.closeTag(C) + this.tagEndChar : this.indentate(y) + "<" + C + f + ">" + m + "</" + C + this.tagEndChar;
|
|
1213
1213
|
}
|
|
1214
1214
|
}, j.prototype.replaceEntitiesValue = function(d) {
|
|
1215
1215
|
if (d && d.length > 0 && this.options.processEntities)
|
|
1216
|
-
for (let
|
|
1217
|
-
const f = this.options.entities[
|
|
1216
|
+
for (let C = 0; C < this.options.entities.length; C++) {
|
|
1217
|
+
const f = this.options.entities[C];
|
|
1218
1218
|
d = d.replace(f.regex, f.val);
|
|
1219
1219
|
}
|
|
1220
1220
|
return d;
|
|
@@ -1222,7 +1222,7 @@ var At = { exports: {} };
|
|
|
1222
1222
|
function s(d) {
|
|
1223
1223
|
return this.options.indentBy.repeat(d);
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function k(d) {
|
|
1226
1226
|
return d.startsWith(this.options.attributeNamePrefix) && d !== this.options.textNodeName ? d.substr(this.attrPrefixLen) : !1;
|
|
1227
1227
|
}
|
|
1228
1228
|
H.exports = j;
|
|
@@ -1238,17 +1238,17 @@ var At = { exports: {} };
|
|
|
1238
1238
|
function(H, se) {
|
|
1239
1239
|
const E = `
|
|
1240
1240
|
`;
|
|
1241
|
-
function U(
|
|
1242
|
-
let
|
|
1243
|
-
return d.format && d.indentBy.length > 0 && (
|
|
1241
|
+
function U(k, d) {
|
|
1242
|
+
let C = "";
|
|
1243
|
+
return d.format && d.indentBy.length > 0 && (C = E), P(k, d, "", C);
|
|
1244
1244
|
}
|
|
1245
|
-
function P(
|
|
1245
|
+
function P(k, d, C, f) {
|
|
1246
1246
|
let y = "", m = !1;
|
|
1247
|
-
for (let B = 0; B <
|
|
1248
|
-
const w =
|
|
1247
|
+
for (let B = 0; B < k.length; B++) {
|
|
1248
|
+
const w = k[B], F = N(w);
|
|
1249
1249
|
if (F === void 0) continue;
|
|
1250
1250
|
let z = "";
|
|
1251
|
-
if (
|
|
1251
|
+
if (C.length === 0 ? z = F : z = `${C}.${F}`, F === d.textNodeName) {
|
|
1252
1252
|
let i = w[F];
|
|
1253
1253
|
L(z, d) || (i = d.tagValueProcessor(F, i), i = s(i, d)), m && (y += f), y += i, m = !1;
|
|
1254
1254
|
continue;
|
|
@@ -1271,38 +1271,38 @@ var At = { exports: {} };
|
|
|
1271
1271
|
}
|
|
1272
1272
|
return y;
|
|
1273
1273
|
}
|
|
1274
|
-
function N(
|
|
1275
|
-
const d = Object.keys(
|
|
1276
|
-
for (let
|
|
1277
|
-
const f = d[
|
|
1278
|
-
if (
|
|
1274
|
+
function N(k) {
|
|
1275
|
+
const d = Object.keys(k);
|
|
1276
|
+
for (let C = 0; C < d.length; C++) {
|
|
1277
|
+
const f = d[C];
|
|
1278
|
+
if (k.hasOwnProperty(f) && f !== ":@")
|
|
1279
1279
|
return f;
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
|
-
function j(
|
|
1283
|
-
let
|
|
1284
|
-
if (
|
|
1285
|
-
for (let f in
|
|
1286
|
-
if (!
|
|
1287
|
-
let y = d.attributeValueProcessor(f,
|
|
1288
|
-
y = s(y, d), y === !0 && d.suppressBooleanAttributes ?
|
|
1282
|
+
function j(k, d) {
|
|
1283
|
+
let C = "";
|
|
1284
|
+
if (k && !d.ignoreAttributes)
|
|
1285
|
+
for (let f in k) {
|
|
1286
|
+
if (!k.hasOwnProperty(f)) continue;
|
|
1287
|
+
let y = d.attributeValueProcessor(f, k[f]);
|
|
1288
|
+
y = s(y, d), y === !0 && d.suppressBooleanAttributes ? C += ` ${f.substr(d.attributeNamePrefix.length)}` : C += ` ${f.substr(d.attributeNamePrefix.length)}="${y}"`;
|
|
1289
1289
|
}
|
|
1290
|
-
return
|
|
1290
|
+
return C;
|
|
1291
1291
|
}
|
|
1292
|
-
function L(
|
|
1293
|
-
|
|
1294
|
-
let
|
|
1292
|
+
function L(k, d) {
|
|
1293
|
+
k = k.substr(0, k.length - d.textNodeName.length - 1);
|
|
1294
|
+
let C = k.substr(k.lastIndexOf(".") + 1);
|
|
1295
1295
|
for (let f in d.stopNodes)
|
|
1296
|
-
if (d.stopNodes[f] ===
|
|
1296
|
+
if (d.stopNodes[f] === k || d.stopNodes[f] === "*." + C) return !0;
|
|
1297
1297
|
return !1;
|
|
1298
1298
|
}
|
|
1299
|
-
function s(
|
|
1300
|
-
if (
|
|
1301
|
-
for (let
|
|
1302
|
-
const f = d.entities[
|
|
1303
|
-
|
|
1299
|
+
function s(k, d) {
|
|
1300
|
+
if (k && k.length > 0 && d.processEntities)
|
|
1301
|
+
for (let C = 0; C < d.entities.length; C++) {
|
|
1302
|
+
const f = d.entities[C];
|
|
1303
|
+
k = k.replace(f.regex, f.val);
|
|
1304
1304
|
}
|
|
1305
|
-
return
|
|
1305
|
+
return k;
|
|
1306
1306
|
}
|
|
1307
1307
|
H.exports = U;
|
|
1308
1308
|
}
|
|
@@ -1327,12 +1327,12 @@ var At = { exports: {} };
|
|
|
1327
1327
|
for (; y < f.length; y++)
|
|
1328
1328
|
if (f[y] === "<" && !F) {
|
|
1329
1329
|
if (w && L(f, y))
|
|
1330
|
-
y += 7, [entityName, val, y] = N(f, y + 1), val.indexOf("&") === -1 && (m[
|
|
1330
|
+
y += 7, [entityName, val, y] = N(f, y + 1), val.indexOf("&") === -1 && (m[C(entityName)] = {
|
|
1331
1331
|
regx: RegExp(`&${entityName};`, "g"),
|
|
1332
1332
|
val
|
|
1333
1333
|
});
|
|
1334
1334
|
else if (w && s(f, y)) y += 8;
|
|
1335
|
-
else if (w &&
|
|
1335
|
+
else if (w && k(f, y)) y += 8;
|
|
1336
1336
|
else if (w && d(f, y)) y += 9;
|
|
1337
1337
|
else if (j) F = !0;
|
|
1338
1338
|
else throw new Error("Invalid DOCTYPE");
|
|
@@ -1370,13 +1370,13 @@ var At = { exports: {} };
|
|
|
1370
1370
|
function s(f, y) {
|
|
1371
1371
|
return f[y + 1] === "!" && f[y + 2] === "E" && f[y + 3] === "L" && f[y + 4] === "E" && f[y + 5] === "M" && f[y + 6] === "E" && f[y + 7] === "N" && f[y + 8] === "T";
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1373
|
+
function k(f, y) {
|
|
1374
1374
|
return f[y + 1] === "!" && f[y + 2] === "A" && f[y + 3] === "T" && f[y + 4] === "T" && f[y + 5] === "L" && f[y + 6] === "I" && f[y + 7] === "S" && f[y + 8] === "T";
|
|
1375
1375
|
}
|
|
1376
1376
|
function d(f, y) {
|
|
1377
1377
|
return f[y + 1] === "!" && f[y + 2] === "N" && f[y + 3] === "O" && f[y + 4] === "T" && f[y + 5] === "A" && f[y + 6] === "T" && f[y + 7] === "I" && f[y + 8] === "O" && f[y + 9] === "N";
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1379
|
+
function C(f) {
|
|
1380
1380
|
if (U.isName(f)) return f;
|
|
1381
1381
|
throw new Error(`Invalid entity name ${f}`);
|
|
1382
1382
|
}
|
|
@@ -1532,10 +1532,10 @@ var At = { exports: {} };
|
|
|
1532
1532
|
regex: /&#x([0-9a-fA-F]{1,6});/g,
|
|
1533
1533
|
val: (r, a) => String.fromCharCode(Number.parseInt(a, 16))
|
|
1534
1534
|
}
|
|
1535
|
-
}, this.addExternalEntities =
|
|
1535
|
+
}, this.addExternalEntities = k, this.parseXml = m, this.parseTextData = d, this.resolveNameSpace = C, this.buildAttributesMap = y, this.isItStopNode = z, this.replaceEntitiesValue = w, this.readStopNodeData = x, this.saveTextToParentTag = F, this.addChild = B, this.ignoreAttributesFn = L(this.options.ignoreAttributes);
|
|
1536
1536
|
}
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function k(o) {
|
|
1539
1539
|
const t = Object.keys(o);
|
|
1540
1540
|
for (let r = 0; r < t.length; r++) {
|
|
1541
1541
|
const a = t[r];
|
|
@@ -1552,7 +1552,7 @@ var At = { exports: {} };
|
|
|
1552
1552
|
return M == null ? o : typeof M != typeof o || M !== o ? M : this.options.trimValues ? i(o, this.options.parseTagValue, this.options.numberParseOptions) : o.trim() === o ? i(o, this.options.parseTagValue, this.options.numberParseOptions) : o;
|
|
1553
1553
|
}
|
|
1554
1554
|
}
|
|
1555
|
-
function
|
|
1555
|
+
function C(o) {
|
|
1556
1556
|
if (this.options.removeNSPrefix) {
|
|
1557
1557
|
const t = o.split(":"), r = o.charAt(0) === "/" ? "/" : "";
|
|
1558
1558
|
if (t[0] === "xmlns")
|
|
@@ -1810,28 +1810,28 @@ var At = { exports: {} };
|
|
|
1810
1810
|
"./node_modules/fast-xml-parser/src/validator.js"
|
|
1811
1811
|
);
|
|
1812
1812
|
class L {
|
|
1813
|
-
constructor(
|
|
1814
|
-
this.externalEntities = {}, this.options = U(
|
|
1813
|
+
constructor(k) {
|
|
1814
|
+
this.externalEntities = {}, this.options = U(k);
|
|
1815
1815
|
}
|
|
1816
1816
|
/**
|
|
1817
1817
|
* Parse XML dats to JS object
|
|
1818
1818
|
* @param {string|Buffer} xmlData
|
|
1819
1819
|
* @param {boolean|Object} validationOption
|
|
1820
1820
|
*/
|
|
1821
|
-
parse(
|
|
1822
|
-
if (typeof
|
|
1823
|
-
|
|
1821
|
+
parse(k, d) {
|
|
1822
|
+
if (typeof k != "string") if (k.toString)
|
|
1823
|
+
k = k.toString();
|
|
1824
1824
|
else
|
|
1825
1825
|
throw new Error("XML data is accepted in String or Bytes[] form.");
|
|
1826
1826
|
if (d) {
|
|
1827
1827
|
d === !0 && (d = {});
|
|
1828
|
-
const y = j.validate(
|
|
1828
|
+
const y = j.validate(k, d);
|
|
1829
1829
|
if (y !== !0)
|
|
1830
1830
|
throw Error(`${y.err.msg}:${y.err.line}:${y.err.col}`);
|
|
1831
1831
|
}
|
|
1832
|
-
const
|
|
1833
|
-
|
|
1834
|
-
const f =
|
|
1832
|
+
const C = new P(this.options);
|
|
1833
|
+
C.addExternalEntities(this.externalEntities);
|
|
1834
|
+
const f = C.parseXml(k);
|
|
1835
1835
|
return this.options.preserveOrder || f === void 0 ? f : N(f, this.options);
|
|
1836
1836
|
}
|
|
1837
1837
|
/**
|
|
@@ -1839,14 +1839,14 @@ var At = { exports: {} };
|
|
|
1839
1839
|
* @param {string} key
|
|
1840
1840
|
* @param {string} value
|
|
1841
1841
|
*/
|
|
1842
|
-
addEntity(
|
|
1842
|
+
addEntity(k, d) {
|
|
1843
1843
|
if (d.indexOf("&") !== -1)
|
|
1844
1844
|
throw new Error("Entity value can't have '&'");
|
|
1845
|
-
if (
|
|
1845
|
+
if (k.indexOf("&") !== -1 || k.indexOf(";") !== -1)
|
|
1846
1846
|
throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");
|
|
1847
1847
|
if (d === "&")
|
|
1848
1848
|
throw new Error("An entity with value '&' is not permitted");
|
|
1849
|
-
this.externalEntities[
|
|
1849
|
+
this.externalEntities[k] = d;
|
|
1850
1850
|
}
|
|
1851
1851
|
}
|
|
1852
1852
|
H.exports = L;
|
|
@@ -1860,50 +1860,50 @@ var At = { exports: {} };
|
|
|
1860
1860
|
/*! no static exports found */
|
|
1861
1861
|
/***/
|
|
1862
1862
|
function(H, se, E) {
|
|
1863
|
-
function U(s,
|
|
1864
|
-
return P(s,
|
|
1863
|
+
function U(s, k) {
|
|
1864
|
+
return P(s, k);
|
|
1865
1865
|
}
|
|
1866
|
-
function P(s,
|
|
1867
|
-
let
|
|
1866
|
+
function P(s, k, d) {
|
|
1867
|
+
let C;
|
|
1868
1868
|
const f = {};
|
|
1869
1869
|
for (let y = 0; y < s.length; y++) {
|
|
1870
1870
|
const m = s[y], B = N(m);
|
|
1871
1871
|
let w = "";
|
|
1872
|
-
if (d === void 0 ? w = B : w = d + "." + B, B ===
|
|
1873
|
-
|
|
1872
|
+
if (d === void 0 ? w = B : w = d + "." + B, B === k.textNodeName)
|
|
1873
|
+
C === void 0 ? C = m[B] : C += "" + m[B];
|
|
1874
1874
|
else {
|
|
1875
1875
|
if (B === void 0)
|
|
1876
1876
|
continue;
|
|
1877
1877
|
if (m[B]) {
|
|
1878
|
-
let F = P(m[B],
|
|
1879
|
-
const z = L(F,
|
|
1880
|
-
m[":@"] ? j(F, m[":@"], w,
|
|
1878
|
+
let F = P(m[B], k, w);
|
|
1879
|
+
const z = L(F, k);
|
|
1880
|
+
m[":@"] ? j(F, m[":@"], w, k) : Object.keys(F).length === 1 && F[k.textNodeName] !== void 0 && !k.alwaysCreateTextNode ? F = F[k.textNodeName] : Object.keys(F).length === 0 && (k.alwaysCreateTextNode ? F[k.textNodeName] = "" : F = ""), f[B] !== void 0 && f.hasOwnProperty(B) ? (Array.isArray(f[B]) || (f[B] = [f[B]]), f[B].push(F)) : k.isArray(B, w, z) ? f[B] = [F] : f[B] = F;
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
1883
|
}
|
|
1884
|
-
return typeof
|
|
1884
|
+
return typeof C == "string" ? C.length > 0 && (f[k.textNodeName] = C) : C !== void 0 && (f[k.textNodeName] = C), f;
|
|
1885
1885
|
}
|
|
1886
1886
|
function N(s) {
|
|
1887
|
-
const
|
|
1888
|
-
for (let d = 0; d <
|
|
1889
|
-
const
|
|
1890
|
-
if (
|
|
1887
|
+
const k = Object.keys(s);
|
|
1888
|
+
for (let d = 0; d < k.length; d++) {
|
|
1889
|
+
const C = k[d];
|
|
1890
|
+
if (C !== ":@") return C;
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
1893
|
-
function j(s,
|
|
1894
|
-
if (
|
|
1895
|
-
const f = Object.keys(
|
|
1893
|
+
function j(s, k, d, C) {
|
|
1894
|
+
if (k) {
|
|
1895
|
+
const f = Object.keys(k), y = f.length;
|
|
1896
1896
|
for (let m = 0; m < y; m++) {
|
|
1897
1897
|
const B = f[m];
|
|
1898
|
-
|
|
1898
|
+
C.isArray(B, d + "." + B, !0, !0) ? s[B] = [k[B]] : s[B] = k[B];
|
|
1899
1899
|
}
|
|
1900
1900
|
}
|
|
1901
1901
|
}
|
|
1902
|
-
function L(s,
|
|
1902
|
+
function L(s, k) {
|
|
1903
1903
|
const {
|
|
1904
1904
|
textNodeName: d
|
|
1905
|
-
} =
|
|
1906
|
-
return !!(
|
|
1905
|
+
} = k, C = Object.keys(s).length;
|
|
1906
|
+
return !!(C === 0 || C === 1 && (s[d] || typeof s[d] == "boolean" || s[d] === 0));
|
|
1907
1907
|
}
|
|
1908
1908
|
se.prettify = U;
|
|
1909
1909
|
}
|
|
@@ -1994,20 +1994,20 @@ var At = { exports: {} };
|
|
|
1994
1994
|
}
|
|
1995
1995
|
}
|
|
1996
1996
|
}
|
|
1997
|
-
var
|
|
1997
|
+
var k = [], d = !1, C, f = -1;
|
|
1998
1998
|
function y() {
|
|
1999
|
-
!d || !
|
|
1999
|
+
!d || !C || (d = !1, C.length ? k = C.concat(k) : f = -1, k.length && m());
|
|
2000
2000
|
}
|
|
2001
2001
|
function m() {
|
|
2002
2002
|
if (!d) {
|
|
2003
2003
|
var F = L(y);
|
|
2004
2004
|
d = !0;
|
|
2005
|
-
for (var z =
|
|
2006
|
-
for (
|
|
2007
|
-
|
|
2008
|
-
f = -1, z =
|
|
2005
|
+
for (var z = k.length; z; ) {
|
|
2006
|
+
for (C = k, k = []; ++f < z; )
|
|
2007
|
+
C && C[f].run();
|
|
2008
|
+
f = -1, z = k.length;
|
|
2009
2009
|
}
|
|
2010
|
-
|
|
2010
|
+
C = null, d = !1, s(F);
|
|
2011
2011
|
}
|
|
2012
2012
|
}
|
|
2013
2013
|
E.nextTick = function(F) {
|
|
@@ -2015,7 +2015,7 @@ var At = { exports: {} };
|
|
|
2015
2015
|
if (arguments.length > 1)
|
|
2016
2016
|
for (var D = 1; D < arguments.length; D++)
|
|
2017
2017
|
z[D - 1] = arguments[D];
|
|
2018
|
-
|
|
2018
|
+
k.push(new B(F, z)), k.length === 1 && !d && L(m);
|
|
2019
2019
|
};
|
|
2020
2020
|
function B(F, z) {
|
|
2021
2021
|
this.fun = F, this.array = z;
|
|
@@ -2054,33 +2054,33 @@ var At = { exports: {} };
|
|
|
2054
2054
|
eNotation: !0
|
|
2055
2055
|
//skipLike: /regex/
|
|
2056
2056
|
};
|
|
2057
|
-
function N(s,
|
|
2058
|
-
if (
|
|
2057
|
+
function N(s, k = {}) {
|
|
2058
|
+
if (k = Object.assign({}, P, k), !s || typeof s != "string") return s;
|
|
2059
2059
|
let d = s.trim();
|
|
2060
|
-
if (
|
|
2060
|
+
if (k.skipLike !== void 0 && k.skipLike.test(d)) return s;
|
|
2061
2061
|
if (s === "0") return 0;
|
|
2062
|
-
if (
|
|
2062
|
+
if (k.hex && E.test(d))
|
|
2063
2063
|
return L(d, 16);
|
|
2064
2064
|
if (d.search(/[eE]/) !== -1) {
|
|
2065
|
-
const
|
|
2066
|
-
if (
|
|
2067
|
-
if (
|
|
2068
|
-
d = (
|
|
2069
|
-
else if (!(
|
|
2070
|
-
return
|
|
2065
|
+
const C = d.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);
|
|
2066
|
+
if (C) {
|
|
2067
|
+
if (k.leadingZeros)
|
|
2068
|
+
d = (C[1] || "") + C[3];
|
|
2069
|
+
else if (!(C[2] === "0" && C[3][0] === ".")) return s;
|
|
2070
|
+
return k.eNotation ? Number(d) : s;
|
|
2071
2071
|
} else
|
|
2072
2072
|
return s;
|
|
2073
2073
|
} else {
|
|
2074
|
-
const
|
|
2075
|
-
if (
|
|
2076
|
-
const f =
|
|
2077
|
-
let m = j(
|
|
2078
|
-
if (!
|
|
2079
|
-
if (!
|
|
2080
|
-
if (
|
|
2074
|
+
const C = U.exec(d);
|
|
2075
|
+
if (C) {
|
|
2076
|
+
const f = C[1], y = C[2];
|
|
2077
|
+
let m = j(C[3]);
|
|
2078
|
+
if (!k.leadingZeros && y.length > 0 && f && d[2] !== ".") return s;
|
|
2079
|
+
if (!k.leadingZeros && y.length > 0 && !f && d[1] !== ".") return s;
|
|
2080
|
+
if (k.leadingZeros && y === s) return 0;
|
|
2081
2081
|
{
|
|
2082
2082
|
const B = Number(d), w = "" + B;
|
|
2083
|
-
return w.search(/[eE]/) !== -1 ?
|
|
2083
|
+
return w.search(/[eE]/) !== -1 ? k.eNotation ? B : s : d.indexOf(".") !== -1 ? w === "0" && m === "" || w === m || f && w === "-" + m ? B : s : y ? m === w || f + m === w ? B : s : d === w || d === f + w ? B : s;
|
|
2084
2084
|
}
|
|
2085
2085
|
} else
|
|
2086
2086
|
return s;
|
|
@@ -2089,10 +2089,10 @@ var At = { exports: {} };
|
|
|
2089
2089
|
function j(s) {
|
|
2090
2090
|
return s && s.indexOf(".") !== -1 && (s = s.replace(/0+$/, ""), s === "." ? s = "0" : s[0] === "." ? s = "0" + s : s[s.length - 1] === "." && (s = s.substr(0, s.length - 1))), s;
|
|
2091
2091
|
}
|
|
2092
|
-
function L(s,
|
|
2093
|
-
if (parseInt) return parseInt(s,
|
|
2094
|
-
if (Number.parseInt) return Number.parseInt(s,
|
|
2095
|
-
if (window && window.parseInt) return window.parseInt(s,
|
|
2092
|
+
function L(s, k) {
|
|
2093
|
+
if (parseInt) return parseInt(s, k);
|
|
2094
|
+
if (Number.parseInt) return Number.parseInt(s, k);
|
|
2095
|
+
if (window && window.parseInt) return window.parseInt(s, k);
|
|
2096
2096
|
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
|
2097
2097
|
}
|
|
2098
2098
|
H.exports = N;
|
|
@@ -2173,7 +2173,7 @@ var At = { exports: {} };
|
|
|
2173
2173
|
/*! ./tracker */
|
|
2174
2174
|
"./src/tracker.js"
|
|
2175
2175
|
);
|
|
2176
|
-
function
|
|
2176
|
+
function k(i, o) {
|
|
2177
2177
|
var t = this, r = new j(), a = i.TaskId, v = i.Bucket, I = i.Region, T = i.Key, M = i.Body, K = i.ChunkSize || i.SliceSize || t.options.ChunkSize, J = i.AsyncLimit, Q = i.StorageClass, ee = i.ServerSideEncryption, te, Ce, ce = i.onHashProgress, re = i.tracker;
|
|
2178
2178
|
re && re.setParams({
|
|
2179
2179
|
chunkSize: K
|
|
@@ -2479,7 +2479,7 @@ var At = { exports: {} };
|
|
|
2479
2479
|
};
|
|
2480
2480
|
le(0);
|
|
2481
2481
|
}), re.on("get_remote_upload_id_list", function() {
|
|
2482
|
-
|
|
2482
|
+
C.call(T, {
|
|
2483
2483
|
Bucket: r,
|
|
2484
2484
|
Region: a,
|
|
2485
2485
|
Key: v,
|
|
@@ -2504,7 +2504,7 @@ var At = { exports: {} };
|
|
|
2504
2504
|
});
|
|
2505
2505
|
}), re.emit("get_remote_upload_id_list");
|
|
2506
2506
|
}
|
|
2507
|
-
function
|
|
2507
|
+
function C(i, o) {
|
|
2508
2508
|
var t = this, r = [], a = {
|
|
2509
2509
|
Bucket: i.Bucket,
|
|
2510
2510
|
Region: i.Region,
|
|
@@ -2672,7 +2672,7 @@ var At = { exports: {} };
|
|
|
2672
2672
|
AbortArray: J
|
|
2673
2673
|
}, o);
|
|
2674
2674
|
}), I === "bucket")
|
|
2675
|
-
|
|
2675
|
+
C.call(M, {
|
|
2676
2676
|
Bucket: t,
|
|
2677
2677
|
Region: r,
|
|
2678
2678
|
calledBySdk: "abortUploadTask"
|
|
@@ -2682,7 +2682,7 @@ var At = { exports: {} };
|
|
|
2682
2682
|
});
|
|
2683
2683
|
else if (I === "file") {
|
|
2684
2684
|
if (!a) return o(L.error(new Error("abort_upload_task_no_key")));
|
|
2685
|
-
|
|
2685
|
+
C.call(M, {
|
|
2686
2686
|
Bucket: t,
|
|
2687
2687
|
Region: r,
|
|
2688
2688
|
Key: a,
|
|
@@ -2884,7 +2884,7 @@ var At = { exports: {} };
|
|
|
2884
2884
|
});
|
|
2885
2885
|
N.eachLimit(he, Ce, function(ve, be) {
|
|
2886
2886
|
var Se = ve.PartNumber, Oe = ve.CopySourceRange, qe = ve.end - ve.start;
|
|
2887
|
-
N.retry(ce, function(
|
|
2887
|
+
N.retry(ce, function(Ke) {
|
|
2888
2888
|
l.call(r, {
|
|
2889
2889
|
Bucket: a,
|
|
2890
2890
|
Region: v,
|
|
@@ -2895,13 +2895,13 @@ var At = { exports: {} };
|
|
|
2895
2895
|
CopySourceRange: Oe,
|
|
2896
2896
|
tracker: i.tracker,
|
|
2897
2897
|
calledBySdk: "sliceCopyFile"
|
|
2898
|
-
},
|
|
2899
|
-
}, function(
|
|
2900
|
-
if (
|
|
2898
|
+
}, Ke);
|
|
2899
|
+
}, function(Ke, $e) {
|
|
2900
|
+
if (Ke) return be(Ke);
|
|
2901
2901
|
Z += qe, Y({
|
|
2902
2902
|
loaded: Z,
|
|
2903
2903
|
total: G
|
|
2904
|
-
}), ve.ETag = $e.ETag, be(
|
|
2904
|
+
}), ve.ETag = $e.ETag, be(Ke || null, $e);
|
|
2905
2905
|
});
|
|
2906
2906
|
}, function(ve) {
|
|
2907
2907
|
if (ve)
|
|
@@ -2937,18 +2937,18 @@ var At = { exports: {} };
|
|
|
2937
2937
|
UploadId: Oe,
|
|
2938
2938
|
tracker: i.tracker,
|
|
2939
2939
|
calledBySdk: "sliceCopyFile"
|
|
2940
|
-
}, function(qe,
|
|
2940
|
+
}, function(qe, Ke) {
|
|
2941
2941
|
if (qe)
|
|
2942
2942
|
P.removeUploadId(Oe), ve(Se + 1);
|
|
2943
2943
|
else {
|
|
2944
2944
|
if (P.using[Oe]) return ve(Se + 1);
|
|
2945
2945
|
var $e = {}, Xe = 0;
|
|
2946
|
-
L.each(
|
|
2947
|
-
var We = parseInt(
|
|
2948
|
-
$e[
|
|
2949
|
-
}), L.each(i.PartList, function(
|
|
2950
|
-
var We = $e[
|
|
2951
|
-
We && (
|
|
2946
|
+
L.each(Ke.PartList, function(_e) {
|
|
2947
|
+
var We = parseInt(_e.Size), rt = Xe + We - 1;
|
|
2948
|
+
$e[_e.PartNumber + "|" + Xe + "|" + rt] = _e.ETag, Xe += We;
|
|
2949
|
+
}), L.each(i.PartList, function(_e) {
|
|
2950
|
+
var We = $e[_e.PartNumber + "|" + _e.start + "|" + _e.end];
|
|
2951
|
+
We && (_e.ETag = We, _e.Uploaded = !0);
|
|
2952
2952
|
}), t.emit("get_copy_data_finish", {
|
|
2953
2953
|
UploadId: Oe,
|
|
2954
2954
|
PartList: i.PartList
|
|
@@ -2963,13 +2963,13 @@ var At = { exports: {} };
|
|
|
2963
2963
|
;
|
|
2964
2964
|
i.ChunkSize = te = Math.max(te, he), re = Math.ceil(G / te);
|
|
2965
2965
|
for (var be = [], Se = 1; Se <= re; Se++) {
|
|
2966
|
-
var Oe = (Se - 1) * te, qe = Se * te < G ? Se * te - 1 : G - 1,
|
|
2966
|
+
var Oe = (Se - 1) * te, qe = Se * te < G ? Se * te - 1 : G - 1, Ke = {
|
|
2967
2967
|
PartNumber: Se,
|
|
2968
2968
|
start: Oe,
|
|
2969
2969
|
end: qe,
|
|
2970
2970
|
CopySourceRange: "bytes=" + Oe + "-" + qe
|
|
2971
2971
|
};
|
|
2972
|
-
be.push(
|
|
2972
|
+
be.push(Ke);
|
|
2973
2973
|
}
|
|
2974
2974
|
i.PartList = be;
|
|
2975
2975
|
}(), i.Headers["x-cos-metadata-directive"] === "Replaced" ? ne = i.Headers : ne = de, ne["x-cos-storage-class"] = i.Headers["x-cos-storage-class"] || de["x-cos-storage-class"], ne = L.clearKey(ne), de["x-cos-storage-class"] === "ARCHIVE" || de["x-cos-storage-class"] === "DEEP_ARCHIVE") {
|
|
@@ -3048,7 +3048,7 @@ var At = { exports: {} };
|
|
|
3048
3048
|
});
|
|
3049
3049
|
}
|
|
3050
3050
|
var x = {
|
|
3051
|
-
sliceUploadFile:
|
|
3051
|
+
sliceUploadFile: k,
|
|
3052
3052
|
abortUploadTask: w,
|
|
3053
3053
|
uploadFile: z,
|
|
3054
3054
|
uploadFiles: D,
|
|
@@ -3069,27 +3069,27 @@ var At = { exports: {} };
|
|
|
3069
3069
|
/*! no static exports found */
|
|
3070
3070
|
/***/
|
|
3071
3071
|
function(H, se) {
|
|
3072
|
-
var E = function(j, L, s,
|
|
3073
|
-
if (
|
|
3072
|
+
var E = function(j, L, s, k) {
|
|
3073
|
+
if (k = k || function() {
|
|
3074
3074
|
}, !j.length || L <= 0)
|
|
3075
|
-
return
|
|
3076
|
-
var d = 0,
|
|
3075
|
+
return k();
|
|
3076
|
+
var d = 0, C = 0, f = 0;
|
|
3077
3077
|
(function y() {
|
|
3078
3078
|
if (d >= j.length)
|
|
3079
|
-
return
|
|
3080
|
-
for (; f < L &&
|
|
3081
|
-
|
|
3082
|
-
m ? (
|
|
3083
|
-
}) : (d += 1, f -= 1, d >= j.length ?
|
|
3079
|
+
return k();
|
|
3080
|
+
for (; f < L && C < j.length; )
|
|
3081
|
+
C += 1, f += 1, s(j[C - 1], function(m) {
|
|
3082
|
+
m ? (k(m), k = function() {
|
|
3083
|
+
}) : (d += 1, f -= 1, d >= j.length ? k() : y());
|
|
3084
3084
|
});
|
|
3085
3085
|
})();
|
|
3086
3086
|
}, U = function(j, L, s) {
|
|
3087
|
-
var
|
|
3087
|
+
var k = function(C) {
|
|
3088
3088
|
L(function(f, y) {
|
|
3089
|
-
f &&
|
|
3089
|
+
f && C < j ? k(C + 1) : s(f, y);
|
|
3090
3090
|
});
|
|
3091
3091
|
};
|
|
3092
|
-
j < 1 ? s() :
|
|
3092
|
+
j < 1 ? s() : k(1);
|
|
3093
3093
|
}, P = {
|
|
3094
3094
|
eachLimit: E,
|
|
3095
3095
|
retry: U
|
|
@@ -3140,7 +3140,7 @@ var At = { exports: {} };
|
|
|
3140
3140
|
/*! ./util */
|
|
3141
3141
|
"./src/util.js"
|
|
3142
3142
|
);
|
|
3143
|
-
function
|
|
3143
|
+
function k(e, c) {
|
|
3144
3144
|
var n = this.options.Protocol || (s.isBrowser && (typeof location > "u" ? "undefined" : P(location)) === "object" && location.protocol === "http:" ? "http:" : "https:"), u = this.options.ServiceDomain, p = e.AppId || this.options.appId, h = e.Region;
|
|
3145
3145
|
u ? (u = u.replace(/\{\{AppId\}\}/gi, p || "").replace(/\{\{Region\}\}/gi, h || "").replace(/\{\{.*?\}\}/gi, ""), /^[a-zA-Z]+:\/\//.test(u) || (u = n + "//" + u), u.slice(-1) === "/" && (u = u.slice(0, -1))) : h ? u = n + "//cos." + h + ".myqcloud.com" : u = n + "//service.cos.myqcloud.com";
|
|
3146
3146
|
var S = "", b = h ? "cos." + h + ".myqcloud.com" : "service.cos.myqcloud.com", _ = u.replace(/^https?:\/\/([^/]+)(\/.*)?$/, "$1");
|
|
@@ -3198,7 +3198,7 @@ var At = { exports: {} };
|
|
|
3198
3198
|
});
|
|
3199
3199
|
});
|
|
3200
3200
|
}
|
|
3201
|
-
function
|
|
3201
|
+
function C(e, c) {
|
|
3202
3202
|
X.call(this, {
|
|
3203
3203
|
Action: "name/cos:HeadBucket",
|
|
3204
3204
|
Bucket: e.Bucket,
|
|
@@ -4294,7 +4294,7 @@ var At = { exports: {} };
|
|
|
4294
4294
|
});
|
|
4295
4295
|
});
|
|
4296
4296
|
}
|
|
4297
|
-
function
|
|
4297
|
+
function Ke(e, c) {
|
|
4298
4298
|
X.call(this, {
|
|
4299
4299
|
Action: "name/cos:GetBucketAccelerate",
|
|
4300
4300
|
method: "GET",
|
|
@@ -4363,7 +4363,7 @@ var At = { exports: {} };
|
|
|
4363
4363
|
}, c(n, u);
|
|
4364
4364
|
});
|
|
4365
4365
|
}
|
|
4366
|
-
function
|
|
4366
|
+
function _e(e, c) {
|
|
4367
4367
|
X.call(this, {
|
|
4368
4368
|
Action: "name/cos:DeleteBucketReplication",
|
|
4369
4369
|
method: "DELETE",
|
|
@@ -4406,7 +4406,7 @@ var At = { exports: {} };
|
|
|
4406
4406
|
u.ETag = s.attr(u.headers, "etag", ""), c(null, u);
|
|
4407
4407
|
});
|
|
4408
4408
|
}
|
|
4409
|
-
function
|
|
4409
|
+
function rt(e, c) {
|
|
4410
4410
|
var n = {};
|
|
4411
4411
|
n.prefix = e.Prefix || "", n.delimiter = e.Delimiter, n["key-marker"] = e.KeyMarker, n["version-id-marker"] = e.VersionIdMarker, n["max-keys"] = e.MaxKeys, n["encoding-type"] = e.EncodingType, X.call(this, {
|
|
4412
4412
|
Action: "name/cos:GetBucketObjectVersions",
|
|
@@ -4433,7 +4433,7 @@ var At = { exports: {} };
|
|
|
4433
4433
|
}), c(null, _);
|
|
4434
4434
|
});
|
|
4435
4435
|
}
|
|
4436
|
-
function
|
|
4436
|
+
function ct(e, c) {
|
|
4437
4437
|
var n = this;
|
|
4438
4438
|
if (n.logger.info({
|
|
4439
4439
|
cate: "PROCESS",
|
|
@@ -4482,7 +4482,7 @@ var At = { exports: {} };
|
|
|
4482
4482
|
});
|
|
4483
4483
|
});
|
|
4484
4484
|
}
|
|
4485
|
-
function
|
|
4485
|
+
function lt(e, c) {
|
|
4486
4486
|
var n = this, u = e.ContentLength, p = s.throttleOnProgress.call(n, u, e.onProgress);
|
|
4487
4487
|
n.logger.info({
|
|
4488
4488
|
cate: "PROCESS",
|
|
@@ -4548,7 +4548,7 @@ var At = { exports: {} };
|
|
|
4548
4548
|
});
|
|
4549
4549
|
}, e.onHashProgress);
|
|
4550
4550
|
}
|
|
4551
|
-
function
|
|
4551
|
+
function dt(e, c) {
|
|
4552
4552
|
X.call(this, {
|
|
4553
4553
|
Action: "name/cos:DeleteObject",
|
|
4554
4554
|
method: "DELETE",
|
|
@@ -4573,7 +4573,7 @@ var At = { exports: {} };
|
|
|
4573
4573
|
});
|
|
4574
4574
|
});
|
|
4575
4575
|
}
|
|
4576
|
-
function
|
|
4576
|
+
function ft(e, c) {
|
|
4577
4577
|
var n = {};
|
|
4578
4578
|
e.VersionId && (n.versionId = e.VersionId), X.call(this, {
|
|
4579
4579
|
Action: "name/cos:GetObjectACL",
|
|
@@ -4598,7 +4598,7 @@ var At = { exports: {} };
|
|
|
4598
4598
|
}), c(null, _);
|
|
4599
4599
|
});
|
|
4600
4600
|
}
|
|
4601
|
-
function
|
|
4601
|
+
function gt(e, c) {
|
|
4602
4602
|
var n = e.Headers, u = "";
|
|
4603
4603
|
if (e.AccessControlPolicy) {
|
|
4604
4604
|
var p = s.clone(e.AccessControlPolicy || {}), h = p.Grants || p.Grant;
|
|
@@ -4628,7 +4628,7 @@ var At = { exports: {} };
|
|
|
4628
4628
|
});
|
|
4629
4629
|
});
|
|
4630
4630
|
}
|
|
4631
|
-
function
|
|
4631
|
+
function ht(e, c) {
|
|
4632
4632
|
var n = e.Headers;
|
|
4633
4633
|
n.Origin = e.Origin, n["Access-Control-Request-Method"] = e.AccessControlRequestMethod, n["Access-Control-Request-Headers"] = e.AccessControlRequestHeaders, X.call(this, {
|
|
4634
4634
|
Action: "name/cos:OptionsObject",
|
|
@@ -4656,7 +4656,7 @@ var At = { exports: {} };
|
|
|
4656
4656
|
});
|
|
4657
4657
|
});
|
|
4658
4658
|
}
|
|
4659
|
-
function
|
|
4659
|
+
function pt(e, c) {
|
|
4660
4660
|
var n = this, u = e.Headers;
|
|
4661
4661
|
!u["Cache-Control"] && !u["cache-control"] && (u["Cache-Control"] = "");
|
|
4662
4662
|
var p = e.CopySource || "", h = s.getSourceParams.call(this, p);
|
|
@@ -4702,7 +4702,7 @@ var At = { exports: {} };
|
|
|
4702
4702
|
}), c(null, ke);
|
|
4703
4703
|
});
|
|
4704
4704
|
}
|
|
4705
|
-
function
|
|
4705
|
+
function Ne(e, c) {
|
|
4706
4706
|
var n = e.CopySource || "", u = s.getSourceParams.call(this, n);
|
|
4707
4707
|
if (!u) {
|
|
4708
4708
|
c(s.error(new Error("CopySource format error")));
|
|
@@ -5079,12 +5079,12 @@ var At = { exports: {} };
|
|
|
5079
5079
|
};
|
|
5080
5080
|
delete me.ReturnBodyResult;
|
|
5081
5081
|
}
|
|
5082
|
-
var
|
|
5082
|
+
var Le = s.extend(me, {
|
|
5083
5083
|
Location: $,
|
|
5084
5084
|
statusCode: ke.statusCode,
|
|
5085
5085
|
headers: ke.headers
|
|
5086
5086
|
});
|
|
5087
|
-
c(null,
|
|
5087
|
+
c(null, Le);
|
|
5088
5088
|
});
|
|
5089
5089
|
}
|
|
5090
5090
|
function Re(e, c) {
|
|
@@ -5182,7 +5182,7 @@ var At = { exports: {} };
|
|
|
5182
5182
|
u && u.body && (u.Body = u.body, delete u.body), c(n, u);
|
|
5183
5183
|
});
|
|
5184
5184
|
}
|
|
5185
|
-
function
|
|
5185
|
+
function He(e, c) {
|
|
5186
5186
|
var n = e.Headers;
|
|
5187
5187
|
!n["Cache-Control"] && !n["cache-control"] && (n["Cache-Control"] = ""), !n["Content-Type"] && !n["content-type"] && (n["Content-Type"] = e.Body && e.Body.type || ""), X.call(this, {
|
|
5188
5188
|
Action: "name/cos:AppendObject",
|
|
@@ -5238,7 +5238,7 @@ var At = { exports: {} };
|
|
|
5238
5238
|
Region: e.Region,
|
|
5239
5239
|
UseAccelerate: e.UseAccelerate,
|
|
5240
5240
|
Url: p
|
|
5241
|
-
}), _ =
|
|
5241
|
+
}), _ = it.call(this, {
|
|
5242
5242
|
Action: (e.Method || "").toUpperCase() === "PUT" ? "name/cos:PutObject" : "name/cos:GetObject",
|
|
5243
5243
|
Bucket: e.Bucket || "",
|
|
5244
5244
|
Region: e.Region || "",
|
|
@@ -5257,7 +5257,7 @@ var At = { exports: {} };
|
|
|
5257
5257
|
return;
|
|
5258
5258
|
}
|
|
5259
5259
|
var ke = function(we) {
|
|
5260
|
-
var Ue = we.match(/q-url-param-list.*?(?=&)/g)[0],
|
|
5260
|
+
var Ue = we.match(/q-url-param-list.*?(?=&)/g)[0], Le = "q-url-param-list=" + encodeURIComponent(Ue.replace(/q-url-param-list=/, "")).toLowerCase(), Me = new RegExp(Ue, "g"), Qe = we.replace(Me, Le);
|
|
5261
5261
|
return Qe;
|
|
5262
5262
|
}, $ = p;
|
|
5263
5263
|
$ += "?" + (ie.Authorization.indexOf("q-signature") > -1 ? ke(ie.Authorization) : "sign=" + encodeURIComponent(ie.Authorization)), ie.SecurityToken && ($ += "&x-cos-security-token=" + ie.SecurityToken), ie.ClientIP && ($ += "&clientIP=" + ie.ClientIP), ie.ClientUA && ($ += "&clientUA=" + ie.ClientUA), ie.Token && ($ += "&token=" + ie.Token), h && ($ += "&" + h), setTimeout(function() {
|
|
@@ -5326,7 +5326,7 @@ var At = { exports: {} };
|
|
|
5326
5326
|
}), h = p.replace(/^https?:\/\/([^/]+)(\/.*)?$/, "$1");
|
|
5327
5327
|
return h;
|
|
5328
5328
|
};
|
|
5329
|
-
function
|
|
5329
|
+
function it(e, c) {
|
|
5330
5330
|
var n = s.clone(e.Headers), u = "";
|
|
5331
5331
|
s.each(n, function(Be, pe) {
|
|
5332
5332
|
(Be === "" || ["content-type", "cache-control", "expires"].indexOf(pe.toLowerCase()) > -1) && delete n[pe], pe.toLowerCase() === "host" && (u = Be);
|
|
@@ -5347,7 +5347,7 @@ var At = { exports: {} };
|
|
|
5347
5347
|
prefix: Ue
|
|
5348
5348
|
}];
|
|
5349
5349
|
}
|
|
5350
|
-
var
|
|
5350
|
+
var Le = s.md5(JSON.stringify(me));
|
|
5351
5351
|
b._StsCache = b._StsCache || [], function() {
|
|
5352
5352
|
var Be, pe;
|
|
5353
5353
|
for (Be = b._StsCache.length - 1; Be >= 0; Be--) {
|
|
@@ -5357,13 +5357,13 @@ var At = { exports: {} };
|
|
|
5357
5357
|
b._StsCache.splice(Be, 1);
|
|
5358
5358
|
continue;
|
|
5359
5359
|
}
|
|
5360
|
-
if (!pe.ScopeLimit || pe.ScopeLimit && pe.ScopeKey ===
|
|
5360
|
+
if (!pe.ScopeLimit || pe.ScopeLimit && pe.ScopeKey === Le) {
|
|
5361
5361
|
$ = pe;
|
|
5362
5362
|
break;
|
|
5363
5363
|
}
|
|
5364
5364
|
}
|
|
5365
5365
|
}();
|
|
5366
|
-
var
|
|
5366
|
+
var Me = function() {
|
|
5367
5367
|
var pe = "";
|
|
5368
5368
|
$.StartTime && e.Expires ? pe = $.StartTime + ";" + ($.StartTime + e.Expires * 1) : $.StartTime && $.ExpiredTime && (pe = $.StartTime + ";" + $.ExpiredTime);
|
|
5369
5369
|
var Ee = s.getAuth({
|
|
@@ -5412,7 +5412,7 @@ var At = { exports: {} };
|
|
|
5412
5412
|
return !1;
|
|
5413
5413
|
};
|
|
5414
5414
|
if ($.ExpiredTime && $.ExpiredTime - s.getSkewTime(b.options.SystemClockOffset) / 1e3 > 60)
|
|
5415
|
-
|
|
5415
|
+
Me();
|
|
5416
5416
|
else if (b.options.getAuthorization)
|
|
5417
5417
|
b.options.getAuthorization.call(b, {
|
|
5418
5418
|
Bucket: _,
|
|
@@ -5431,17 +5431,17 @@ var At = { exports: {} };
|
|
|
5431
5431
|
});
|
|
5432
5432
|
var pe = Qe(Be);
|
|
5433
5433
|
if (pe) return S(pe);
|
|
5434
|
-
Be.Authorization ? S(null, Be) : ($ = Be || {}, $.Scope = me, $.ScopeKey =
|
|
5434
|
+
Be.Authorization ? S(null, Be) : ($ = Be || {}, $.Scope = me, $.ScopeKey = Le, b._StsCache.push($), Me());
|
|
5435
5435
|
});
|
|
5436
5436
|
else if (b.options.getSTS)
|
|
5437
5437
|
b.options.getSTS.call(b, {
|
|
5438
5438
|
Bucket: _,
|
|
5439
5439
|
Region: ae
|
|
5440
5440
|
}, function(Be) {
|
|
5441
|
-
$ = Be || {}, $.Scope = me, $.ScopeKey =
|
|
5441
|
+
$ = Be || {}, $.Scope = me, $.ScopeKey = Le, $.TmpSecretId || ($.TmpSecretId = $.SecretId), $.TmpSecretKey || ($.TmpSecretKey = $.SecretKey);
|
|
5442
5442
|
var pe = Qe($);
|
|
5443
5443
|
if (pe) return S(pe);
|
|
5444
|
-
b._StsCache.push($),
|
|
5444
|
+
b._StsCache.push($), Me();
|
|
5445
5445
|
});
|
|
5446
5446
|
else
|
|
5447
5447
|
return function() {
|
|
@@ -5478,7 +5478,7 @@ var At = { exports: {} };
|
|
|
5478
5478
|
}();
|
|
5479
5479
|
return "";
|
|
5480
5480
|
}
|
|
5481
|
-
function
|
|
5481
|
+
function vt(e) {
|
|
5482
5482
|
var c = this, n = !1, u = !1, p = !1, h = e.headers && (e.headers.date || e.headers.Date) || e.error && e.error.ServerTime;
|
|
5483
5483
|
try {
|
|
5484
5484
|
var S = e.error.Code, b = e.error.Message;
|
|
@@ -5495,7 +5495,7 @@ var At = { exports: {} };
|
|
|
5495
5495
|
networkError: p
|
|
5496
5496
|
};
|
|
5497
5497
|
}
|
|
5498
|
-
function
|
|
5498
|
+
function yt(e) {
|
|
5499
5499
|
var c = e.requestUrl, n = e.clientCalcSign, u = e.networkError;
|
|
5500
5500
|
if (!this.options.AutoSwitchHost || !c || !n || !u) return !1;
|
|
5501
5501
|
var p = /^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/, h = /^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/, S = p.test(c) && !h.test(c);
|
|
@@ -5525,7 +5525,7 @@ var At = { exports: {} };
|
|
|
5525
5525
|
cate: "PROCESS",
|
|
5526
5526
|
tag: "base",
|
|
5527
5527
|
msg: "开始计算签名, opt=".concat(JSON.stringify(ke))
|
|
5528
|
-
}),
|
|
5528
|
+
}), it.call(n, {
|
|
5529
5529
|
Bucket: e.Bucket || "",
|
|
5530
5530
|
Region: e.Region || "",
|
|
5531
5531
|
Method: e.method,
|
|
@@ -5558,25 +5558,25 @@ var At = { exports: {} };
|
|
|
5558
5558
|
cate: "PROCESS",
|
|
5559
5559
|
tag: "base",
|
|
5560
5560
|
msg: "准备发起请求"
|
|
5561
|
-
}),
|
|
5561
|
+
}), Ct.call(n, e, function(we, Ue) {
|
|
5562
5562
|
S && S.setParams({
|
|
5563
5563
|
httpEndTime: (/* @__PURE__ */ new Date()).getTime()
|
|
5564
5564
|
});
|
|
5565
|
-
var
|
|
5565
|
+
var Le = !1, Me = !1;
|
|
5566
5566
|
if (we) {
|
|
5567
|
-
var Qe =
|
|
5568
|
-
|
|
5567
|
+
var Qe = vt.call(n, we);
|
|
5568
|
+
Le = Qe.canRetry || ie !== n.options.SystemClockOffset, Me = Qe.networkError, n.logger.error({
|
|
5569
5569
|
cate: "PROCESS",
|
|
5570
5570
|
tag: "network",
|
|
5571
|
-
msg: "请求失败, err=".concat(JSON.stringify(we), ", canRetry=").concat(
|
|
5571
|
+
msg: "请求失败, err=".concat(JSON.stringify(we), ", canRetry=").concat(Le, ", networkError=").concat(Me, ", tryTimes=").concat(ae)
|
|
5572
5572
|
});
|
|
5573
5573
|
}
|
|
5574
|
-
if (we && ae < 4 &&
|
|
5574
|
+
if (we && ae < 4 && Le) {
|
|
5575
5575
|
e.headers && (delete e.headers.Authorization, delete e.headers.token, delete e.headers.clientIP, delete e.headers.clientUA, e.headers["x-cos-security-token"] && delete e.headers["x-cos-security-token"], e.headers["x-ci-security-token"] && delete e.headers["x-ci-security-token"]);
|
|
5576
|
-
var Be =
|
|
5576
|
+
var Be = yt.call(n, {
|
|
5577
5577
|
requestUrl: (we == null ? void 0 : we.url) || "",
|
|
5578
5578
|
clientCalcSign: me.SignFrom === "client",
|
|
5579
|
-
networkError:
|
|
5579
|
+
networkError: Me
|
|
5580
5580
|
});
|
|
5581
5581
|
e.SwitchHost = Be, e.headers["x-cos-sdk-retry"] = !0, n.logger.info({
|
|
5582
5582
|
cate: "PROCESS",
|
|
@@ -5594,7 +5594,7 @@ var At = { exports: {} };
|
|
|
5594
5594
|
};
|
|
5595
5595
|
b(1);
|
|
5596
5596
|
}
|
|
5597
|
-
function
|
|
5597
|
+
function Ct(e, c) {
|
|
5598
5598
|
var n = this, u = e.TaskId;
|
|
5599
5599
|
if (!(u && !n._isRunningTask(u))) {
|
|
5600
5600
|
var p = e.Bucket, h = e.Region, S = e.Key, b = e.method || "GET", _ = e.Url || e.url, ae = e.body, ie = e.rawBody;
|
|
@@ -5634,19 +5634,19 @@ var At = { exports: {} };
|
|
|
5634
5634
|
tag: "network",
|
|
5635
5635
|
msg: "[Request] ".concat(Ue, ", requestOpt=").concat(JSON.stringify($))
|
|
5636
5636
|
}), n.emit("before-send", $);
|
|
5637
|
-
var
|
|
5637
|
+
var Le = $.url.includes("accelerate."), Me = $.qs ? Object.keys($.qs).map(function(xe) {
|
|
5638
5638
|
return "".concat(xe, "=").concat($.qs[xe]);
|
|
5639
|
-
}).join("&") : "", Qe =
|
|
5639
|
+
}).join("&") : "", Qe = Me ? $.url + "?" + Me : $.url;
|
|
5640
5640
|
if (e.tracker) {
|
|
5641
5641
|
var Be;
|
|
5642
5642
|
e.tracker.setParams({
|
|
5643
5643
|
url: Qe,
|
|
5644
5644
|
httpMethod: $.method,
|
|
5645
|
-
accelerate:
|
|
5645
|
+
accelerate: Le,
|
|
5646
5646
|
httpSize: ((Be = $.body) === null || Be === void 0 ? void 0 : Be.size) || 0
|
|
5647
5647
|
}), e.tracker.parent && !e.tracker.parent.params.url && e.tracker.parent.setParams({
|
|
5648
5648
|
url: ke,
|
|
5649
|
-
accelerate:
|
|
5649
|
+
accelerate: Le
|
|
5650
5650
|
});
|
|
5651
5651
|
}
|
|
5652
5652
|
var pe = (n.options.Request || L)($, function(xe) {
|
|
@@ -5660,15 +5660,15 @@ var At = { exports: {} };
|
|
|
5660
5660
|
body: xe && xe.body
|
|
5661
5661
|
};
|
|
5662
5662
|
n.emit("after-receive", De);
|
|
5663
|
-
var
|
|
5663
|
+
var kt = De.error, st = De.body, Je = {
|
|
5664
5664
|
statusCode: De.statusCode,
|
|
5665
5665
|
statusMessage: De.statusMessage,
|
|
5666
5666
|
headers: De.headers
|
|
5667
|
-
},
|
|
5667
|
+
}, wt = kt ? "[error]" : "[success]";
|
|
5668
5668
|
n.logger.info({
|
|
5669
5669
|
cate: "PROCESS",
|
|
5670
5670
|
tag: "network",
|
|
5671
|
-
msg: "[Response] ".concat(Ue, ", ").concat(
|
|
5671
|
+
msg: "[Response] ".concat(Ue, ", ").concat(wt, ", response=").concat(JSON.stringify(Je))
|
|
5672
5672
|
});
|
|
5673
5673
|
var Rt, Ye = function(et, Fe) {
|
|
5674
5674
|
if (u && n.off("inner-kill-task", Ee), !Rt) {
|
|
@@ -5678,27 +5678,27 @@ var At = { exports: {} };
|
|
|
5678
5678
|
$.url && (nt.url = $.url), $.method && (nt.method = $.method), et = s.extend(et || {}, nt), c(et, null);
|
|
5679
5679
|
else {
|
|
5680
5680
|
if (e.Action === "name/cos:PutObject") {
|
|
5681
|
-
var
|
|
5681
|
+
var xt = {};
|
|
5682
5682
|
for (var Et in e.headers) {
|
|
5683
|
-
var
|
|
5684
|
-
|
|
5683
|
+
var It = Et.toLowerCase();
|
|
5684
|
+
xt[It] = e.headers[Et];
|
|
5685
5685
|
}
|
|
5686
|
-
|
|
5686
|
+
xt["x-cos-callback"] ? Fe.Error ? (Fe.CallbackError = s.clone(Fe.Error), delete Fe.Error) : Fe.CallbackBody = s.clone(Fe) : xt["x-cos-return-body"] && (Fe.Error ? (Fe.ReturnError = s.clone(Fe.Error), delete Fe.Error) : Fe.ReturnBody = s.clone(Fe));
|
|
5687
5687
|
}
|
|
5688
5688
|
Fe = s.extend(Fe || {}, nt), c(null, Fe);
|
|
5689
5689
|
}
|
|
5690
5690
|
pe = null;
|
|
5691
5691
|
}
|
|
5692
5692
|
};
|
|
5693
|
-
if (
|
|
5694
|
-
var
|
|
5693
|
+
if (kt) return Ye(s.error(kt));
|
|
5694
|
+
var ut = Je.statusCode, Bt = Math.floor(ut / 100) === 2;
|
|
5695
5695
|
if (ie) {
|
|
5696
5696
|
if (Bt)
|
|
5697
5697
|
return Ye(null, {
|
|
5698
|
-
body:
|
|
5698
|
+
body: st
|
|
5699
5699
|
});
|
|
5700
|
-
if (
|
|
5701
|
-
s.readAsBinaryString(
|
|
5700
|
+
if (st instanceof Blob) {
|
|
5701
|
+
s.readAsBinaryString(st, function(bt) {
|
|
5702
5702
|
var et = s.parseResBody(bt), Fe = et.Error || et;
|
|
5703
5703
|
return Ye(s.error(new Error(Fe.Message || "response body error"), {
|
|
5704
5704
|
code: Fe.Code,
|
|
@@ -5708,13 +5708,13 @@ var At = { exports: {} };
|
|
|
5708
5708
|
return;
|
|
5709
5709
|
}
|
|
5710
5710
|
}
|
|
5711
|
-
var
|
|
5712
|
-
Bt ? Ye(null,
|
|
5713
|
-
code:
|
|
5714
|
-
error:
|
|
5715
|
-
})) :
|
|
5716
|
-
code: "" +
|
|
5717
|
-
})) :
|
|
5711
|
+
var St = s.parseResBody(st), at = St.Error || St;
|
|
5712
|
+
Bt ? Ye(null, St) : at ? Ye(s.error(new Error(at.Message), {
|
|
5713
|
+
code: at.Code,
|
|
5714
|
+
error: at
|
|
5715
|
+
})) : ut ? Ye(s.error(new Error(Je.statusMessage), {
|
|
5716
|
+
code: "" + ut
|
|
5717
|
+
})) : ut && Ye(s.error(new Error("statusCode error")));
|
|
5718
5718
|
}
|
|
5719
5719
|
}), Ee = function(De) {
|
|
5720
5720
|
De.TaskId === u && (pe && pe.abort && pe.abort(), n.off("inner-kill-task", Ee));
|
|
@@ -5724,10 +5724,10 @@ var At = { exports: {} };
|
|
|
5724
5724
|
}
|
|
5725
5725
|
var Tt = {
|
|
5726
5726
|
// Bucket 相关方法
|
|
5727
|
-
getService:
|
|
5727
|
+
getService: k,
|
|
5728
5728
|
// Bucket
|
|
5729
5729
|
putBucket: d,
|
|
5730
|
-
headBucket:
|
|
5730
|
+
headBucket: C,
|
|
5731
5731
|
// Bucket
|
|
5732
5732
|
getBucket: f,
|
|
5733
5733
|
deleteBucket: y,
|
|
@@ -5784,29 +5784,29 @@ var At = { exports: {} };
|
|
|
5784
5784
|
listBucketInventory: Se,
|
|
5785
5785
|
deleteBucketInventory: Oe,
|
|
5786
5786
|
putBucketAccelerate: qe,
|
|
5787
|
-
getBucketAccelerate:
|
|
5787
|
+
getBucketAccelerate: Ke,
|
|
5788
5788
|
putBucketEncryption: $e,
|
|
5789
5789
|
getBucketEncryption: Xe,
|
|
5790
|
-
deleteBucketEncryption:
|
|
5790
|
+
deleteBucketEncryption: _e,
|
|
5791
5791
|
// Object 相关方法
|
|
5792
|
-
getObject:
|
|
5792
|
+
getObject: ct,
|
|
5793
5793
|
headObject: We,
|
|
5794
|
-
listObjectVersions:
|
|
5795
|
-
putObject:
|
|
5796
|
-
deleteObject:
|
|
5797
|
-
getObjectAcl:
|
|
5798
|
-
putObjectAcl:
|
|
5799
|
-
optionsObject:
|
|
5800
|
-
putObjectCopy:
|
|
5794
|
+
listObjectVersions: rt,
|
|
5795
|
+
putObject: lt,
|
|
5796
|
+
deleteObject: dt,
|
|
5797
|
+
getObjectAcl: ft,
|
|
5798
|
+
putObjectAcl: gt,
|
|
5799
|
+
optionsObject: ht,
|
|
5800
|
+
putObjectCopy: pt,
|
|
5801
5801
|
deleteMultipleObject: V,
|
|
5802
5802
|
restoreObject: R,
|
|
5803
5803
|
putObjectTagging: A,
|
|
5804
5804
|
getObjectTagging: O,
|
|
5805
5805
|
deleteObjectTagging: q,
|
|
5806
5806
|
selectObjectContent: W,
|
|
5807
|
-
appendObject:
|
|
5807
|
+
appendObject: He,
|
|
5808
5808
|
// 分块上传相关方法
|
|
5809
|
-
uploadPartCopy:
|
|
5809
|
+
uploadPartCopy: Ne,
|
|
5810
5810
|
multipartInit: oe,
|
|
5811
5811
|
multipartUpload: fe,
|
|
5812
5812
|
multipartComplete: ye,
|
|
@@ -5818,7 +5818,7 @@ var At = { exports: {} };
|
|
|
5818
5818
|
getObjectUrl: Ve,
|
|
5819
5819
|
getAuth: Ze
|
|
5820
5820
|
};
|
|
5821
|
-
function
|
|
5821
|
+
function Ot(e, c, n) {
|
|
5822
5822
|
s.each(["Cors", "Acl"], function(u) {
|
|
5823
5823
|
if (e.slice(-u.length) === u) {
|
|
5824
5824
|
var p = e.slice(0, -u.length) + u.toUpperCase(), h = s.apiWrapper(e, c), S = !1;
|
|
@@ -5830,7 +5830,7 @@ var At = { exports: {} };
|
|
|
5830
5830
|
}
|
|
5831
5831
|
H.exports.init = function(e, c) {
|
|
5832
5832
|
c.transferToTaskMethod(Tt, "putObject"), s.each(Tt, function(n, u) {
|
|
5833
|
-
e.prototype[u] = s.apiWrapper(u, n),
|
|
5833
|
+
e.prototype[u] = s.apiWrapper(u, n), Ot(u, n, e.prototype);
|
|
5834
5834
|
});
|
|
5835
5835
|
};
|
|
5836
5836
|
}
|
|
@@ -5861,7 +5861,7 @@ var At = { exports: {} };
|
|
|
5861
5861
|
), s = E(
|
|
5862
5862
|
/*! ./logger */
|
|
5863
5863
|
"./src/logger.js"
|
|
5864
|
-
),
|
|
5864
|
+
), k = E(
|
|
5865
5865
|
/*! ../package.json */
|
|
5866
5866
|
"./package.json"
|
|
5867
5867
|
), d = {
|
|
@@ -5930,7 +5930,7 @@ var At = { exports: {} };
|
|
|
5930
5930
|
// 日志上报到 cls 组件
|
|
5931
5931
|
LogExtras: {}
|
|
5932
5932
|
// 日志上报时,附带的额外信息,例如:{deviceID: '', userID: ''}
|
|
5933
|
-
},
|
|
5933
|
+
}, C = function(y) {
|
|
5934
5934
|
var m, B, w = this;
|
|
5935
5935
|
if (this.options = U.extend(U.clone(d), y || {}), this.options.FileParallelLimit = Math.max(1, this.options.FileParallelLimit), this.options.ChunkParallelLimit = Math.max(1, this.options.ChunkParallelLimit), this.options.ChunkRetryTimes = Math.max(0, this.options.ChunkRetryTimes), this.options.ChunkSize = Math.max(1024 * 1024, this.options.ChunkSize), this.options.CopyChunkParallelLimit = Math.max(1, this.options.CopyChunkParallelLimit), this.options.CopyChunkSize = Math.max(1024 * 1024, this.options.CopyChunkSize), this.options.CopySliceSize = Math.max(0, this.options.CopySliceSize), this.options.MaxPartNumber = Math.max(1024, Math.min(1e4, this.options.MaxPartNumber)), this.options.Timeout = Math.max(0, this.options.Timeout), this.options.EnableReporter = this.options.BeaconReporter || this.options.ClsReporter, this.options.AppId && console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000").'), this.options.SecretId && this.options.SecretId.indexOf(" ") > -1 && (console.error("error: SecretId格式错误,请检查"), console.error("error: SecretId format is incorrect. Please check")), this.options.SecretKey && this.options.SecretKey.indexOf(" ") > -1 && (console.error("error: SecretKey格式错误,请检查"), console.error("error: SecretKey format is incorrect. Please check")), U.isNode() && (console.log("Tip: Next.js、Nuxt.js 等服务端渲染技术可正常使用JavaScript SDK,请忽略下方 nodejs 环境警告"), console.warn("warning: cos-js-sdk-v5 不支持 nodejs 环境使用,请改用 cos-nodejs-sdk-v5,参考文档: https://cloud.tencent.com/document/product/436/8629"), console.warn("warning: cos-js-sdk-v5 does not support nodejs environment. Please use cos-nodejs-sdk-v5 instead. See: https://cloud.tencent.com/document/product/436/8629")), this.options.ForcePathStyle)
|
|
5936
5936
|
throw console.warn("cos-js-sdk-v5不再支持使用path-style,仅支持使用virtual-hosted-style,参考文档:https://cloud.tencent.com/document/product/436/96243"), new Error("ForcePathStyle is not supported");
|
|
@@ -5944,12 +5944,12 @@ var At = { exports: {} };
|
|
|
5944
5944
|
w.emit("log-message", F);
|
|
5945
5945
|
}));
|
|
5946
5946
|
};
|
|
5947
|
-
j.init(
|
|
5947
|
+
j.init(C, N), L.init(C, N), C.util = {
|
|
5948
5948
|
md5: U.md5,
|
|
5949
5949
|
xml2json: U.xml2json,
|
|
5950
5950
|
json2xml: U.json2xml,
|
|
5951
5951
|
encodeBase64: U.encodeBase64
|
|
5952
|
-
},
|
|
5952
|
+
}, C.getAuthorization = U.getAuth, C.version = k.version, H.exports = C;
|
|
5953
5953
|
}
|
|
5954
5954
|
),
|
|
5955
5955
|
/***/
|
|
@@ -5961,19 +5961,19 @@ var At = { exports: {} };
|
|
|
5961
5961
|
/***/
|
|
5962
5962
|
function(H, se) {
|
|
5963
5963
|
var E = function(N) {
|
|
5964
|
-
var j = {}, L = function(
|
|
5965
|
-
return !j[
|
|
5964
|
+
var j = {}, L = function(k) {
|
|
5965
|
+
return !j[k] && (j[k] = []), j[k];
|
|
5966
5966
|
};
|
|
5967
|
-
N.on = function(s,
|
|
5968
|
-
s === "task-list-update" && console.warn('warning: Event "' + s + '" has been deprecated. Please use "list-update" instead.'), L(s).push(
|
|
5969
|
-
}, N.off = function(s,
|
|
5970
|
-
for (var d = L(s),
|
|
5971
|
-
|
|
5972
|
-
}, N.emit = function(s,
|
|
5967
|
+
N.on = function(s, k) {
|
|
5968
|
+
s === "task-list-update" && console.warn('warning: Event "' + s + '" has been deprecated. Please use "list-update" instead.'), L(s).push(k);
|
|
5969
|
+
}, N.off = function(s, k) {
|
|
5970
|
+
for (var d = L(s), C = d.length - 1; C >= 0; C--)
|
|
5971
|
+
k === d[C] && d.splice(C, 1);
|
|
5972
|
+
}, N.emit = function(s, k) {
|
|
5973
5973
|
for (var d = L(s).map(function(f) {
|
|
5974
5974
|
return f;
|
|
5975
|
-
}),
|
|
5976
|
-
d[
|
|
5975
|
+
}), C = 0; C < d.length; C++)
|
|
5976
|
+
d[C](k);
|
|
5977
5977
|
};
|
|
5978
5978
|
}, U = function() {
|
|
5979
5979
|
E(this);
|
|
@@ -6001,10 +6001,10 @@ var At = { exports: {} };
|
|
|
6001
6001
|
), j = E(
|
|
6002
6002
|
/*! ../package.json */
|
|
6003
6003
|
"./package.json"
|
|
6004
|
-
), L = j.version, s = ["VERBOSE", "DEBUG", "INFO", "WARN", "ERROR"],
|
|
6005
|
-
function d(
|
|
6004
|
+
), L = j.version, s = ["VERBOSE", "DEBUG", "INFO", "WARN", "ERROR"], k = /* @__PURE__ */ function() {
|
|
6005
|
+
function d(C) {
|
|
6006
6006
|
var f;
|
|
6007
|
-
U(this, d), N(this, "level", "VERBOSE"), N(this, "clsLogger", null), N(this, "logExtras", {}), this.enableLog = (f =
|
|
6007
|
+
U(this, d), N(this, "level", "VERBOSE"), N(this, "clsLogger", null), N(this, "logExtras", {}), this.enableLog = (f = C.enableLog) !== null && f !== void 0 ? f : !1, this.level = C.level || "VERBOSE", s.includes(this.level) || (this.level = "VERBOSE"), this.enableLogcat = C.enableLogcat, this.clsLogger = C.clsLogger, this.logExtras = C.logExtras;
|
|
6008
6008
|
}
|
|
6009
6009
|
return P(d, [{
|
|
6010
6010
|
key: "info",
|
|
@@ -6066,7 +6066,7 @@ var At = { exports: {} };
|
|
|
6066
6066
|
}
|
|
6067
6067
|
}]);
|
|
6068
6068
|
}();
|
|
6069
|
-
H.exports =
|
|
6069
|
+
H.exports = k;
|
|
6070
6070
|
}
|
|
6071
6071
|
),
|
|
6072
6072
|
/***/
|
|
@@ -6086,7 +6086,7 @@ var At = { exports: {} };
|
|
|
6086
6086
|
} catch {
|
|
6087
6087
|
}
|
|
6088
6088
|
m || (m = []), j = m;
|
|
6089
|
-
},
|
|
6089
|
+
}, k = function() {
|
|
6090
6090
|
try {
|
|
6091
6091
|
j.length ? localStorage.setItem(P, JSON.stringify(j)) : localStorage.removeItem(P);
|
|
6092
6092
|
} catch {
|
|
@@ -6098,11 +6098,11 @@ var At = { exports: {} };
|
|
|
6098
6098
|
var F = j[w][2];
|
|
6099
6099
|
(!F || F + N < B) && (j.splice(w, 1), m = !0);
|
|
6100
6100
|
}
|
|
6101
|
-
m &&
|
|
6101
|
+
m && k();
|
|
6102
6102
|
}
|
|
6103
|
-
},
|
|
6103
|
+
}, C = function() {
|
|
6104
6104
|
L || (L = setTimeout(function() {
|
|
6105
|
-
|
|
6105
|
+
k(), L = null;
|
|
6106
6106
|
}, 400));
|
|
6107
6107
|
}, f = {
|
|
6108
6108
|
using: {},
|
|
@@ -6138,7 +6138,7 @@ var At = { exports: {} };
|
|
|
6138
6138
|
var z = j[F];
|
|
6139
6139
|
z[0] === m && z[1] === B && j.splice(F, 1);
|
|
6140
6140
|
}
|
|
6141
|
-
j.unshift([m, B, Math.round(Date.now() / 1e3)]), j.length > w && j.splice(w),
|
|
6141
|
+
j.unshift([m, B, Math.round(Date.now() / 1e3)]), j.length > w && j.splice(w), C();
|
|
6142
6142
|
}
|
|
6143
6143
|
},
|
|
6144
6144
|
// UploadId 已用完,移除掉
|
|
@@ -6146,7 +6146,7 @@ var At = { exports: {} };
|
|
|
6146
6146
|
d.call(this), delete f.using[m];
|
|
6147
6147
|
for (var B = j.length - 1; B >= 0; B--)
|
|
6148
6148
|
j[B][1] === m && j.splice(B, 1);
|
|
6149
|
-
|
|
6149
|
+
C();
|
|
6150
6150
|
}
|
|
6151
6151
|
};
|
|
6152
6152
|
H.exports = f;
|
|
@@ -6166,12 +6166,12 @@ var At = { exports: {} };
|
|
|
6166
6166
|
), P = E(
|
|
6167
6167
|
/*! ./util */
|
|
6168
6168
|
"./src/util.js"
|
|
6169
|
-
), N = {}, j = function(
|
|
6170
|
-
N[d] =
|
|
6171
|
-
|
|
6169
|
+
), N = {}, j = function(k, d) {
|
|
6170
|
+
N[d] = k[d], k[d] = function(C, f) {
|
|
6171
|
+
C.SkipTask ? N[d].call(this, C, f) : this._addTask(d, C, f);
|
|
6172
6172
|
};
|
|
6173
|
-
}, L = function(
|
|
6174
|
-
var d = [],
|
|
6173
|
+
}, L = function(k) {
|
|
6174
|
+
var d = [], C = {}, f = 0, y = 0, m = function(l) {
|
|
6175
6175
|
var x = {
|
|
6176
6176
|
id: l.id,
|
|
6177
6177
|
Bucket: l.Bucket,
|
|
@@ -6189,9 +6189,9 @@ var At = { exports: {} };
|
|
|
6189
6189
|
return l.FilePath && (x.FilePath = l.FilePath), l._custom && (x._custom = l._custom), x;
|
|
6190
6190
|
}, B = /* @__PURE__ */ function() {
|
|
6191
6191
|
var g, l = function() {
|
|
6192
|
-
g = 0,
|
|
6192
|
+
g = 0, k.emit("task-list-update", {
|
|
6193
6193
|
list: P.map(d, m)
|
|
6194
|
-
}),
|
|
6194
|
+
}), k.emit("list-update", {
|
|
6195
6195
|
list: P.map(d, m)
|
|
6196
6196
|
});
|
|
6197
6197
|
};
|
|
@@ -6199,33 +6199,33 @@ var At = { exports: {} };
|
|
|
6199
6199
|
g || (g = setTimeout(l));
|
|
6200
6200
|
};
|
|
6201
6201
|
}(), w = function() {
|
|
6202
|
-
if (!(d.length <=
|
|
6202
|
+
if (!(d.length <= k.options.UploadQueueSize)) {
|
|
6203
6203
|
for (var l = 0; l < y && // 小于当前操作的 index 才清理
|
|
6204
6204
|
l < d.length && // 大于队列才清理
|
|
6205
|
-
d.length >
|
|
6205
|
+
d.length > k.options.UploadQueueSize; ) {
|
|
6206
6206
|
var x = d[l].state === "waiting" || d[l].state === "checking" || d[l].state === "uploading";
|
|
6207
|
-
!d[l] || !x ? (
|
|
6207
|
+
!d[l] || !x ? (C[d[l].id] && delete C[d[l].id], d.splice(l, 1), y--) : l++;
|
|
6208
6208
|
}
|
|
6209
6209
|
B();
|
|
6210
6210
|
}
|
|
6211
6211
|
}, F = function() {
|
|
6212
|
-
if (!(f >=
|
|
6212
|
+
if (!(f >= k.options.FileParallelLimit)) {
|
|
6213
6213
|
for (; d[y] && d[y].state !== "waiting"; ) y++;
|
|
6214
6214
|
if (!(y >= d.length)) {
|
|
6215
6215
|
var l = d[y];
|
|
6216
6216
|
y++, f++, l.state = "checking", l.params.onTaskStart && l.params.onTaskStart(m(l)), !l.params.UploadData && (l.params.UploadData = {});
|
|
6217
6217
|
var x = P.formatParams(l.api, l.params);
|
|
6218
|
-
N[l.api].call(
|
|
6219
|
-
|
|
6218
|
+
N[l.api].call(k, x, function(i, o) {
|
|
6219
|
+
k._isRunningTask(l.id) && ((l.state === "checking" || l.state === "uploading") && (l.state = i ? "error" : "success", i && (l.error = i), f--, B(), F(), l.callback && l.callback(i, o), l.state === "success" && (l.params && (delete l.params.UploadData, delete l.params.Body, delete l.params), delete l.callback)), w());
|
|
6220
6220
|
}), B(), setTimeout(F);
|
|
6221
6221
|
}
|
|
6222
6222
|
}
|
|
6223
6223
|
}, z = function(l, x) {
|
|
6224
|
-
var i =
|
|
6224
|
+
var i = C[l];
|
|
6225
6225
|
if (i) {
|
|
6226
6226
|
var o = i && i.state === "waiting", t = i && (i.state === "checking" || i.state === "uploading");
|
|
6227
6227
|
if (x === "canceled" && i.state !== "canceled" || x === "paused" && o || x === "paused" && t) {
|
|
6228
|
-
i.state = x,
|
|
6228
|
+
i.state = x, k.emit("inner-kill-task", {
|
|
6229
6229
|
TaskId: l,
|
|
6230
6230
|
toState: x
|
|
6231
6231
|
});
|
|
@@ -6238,13 +6238,13 @@ var At = { exports: {} };
|
|
|
6238
6238
|
w();
|
|
6239
6239
|
}
|
|
6240
6240
|
};
|
|
6241
|
-
|
|
6241
|
+
k._addTasks = function(g) {
|
|
6242
6242
|
P.each(g, function(l) {
|
|
6243
|
-
|
|
6243
|
+
k._addTask(l.api, l.params, l.callback, !0);
|
|
6244
6244
|
}), B();
|
|
6245
6245
|
};
|
|
6246
6246
|
var D = !0;
|
|
6247
|
-
|
|
6247
|
+
k._addTask = function(g, l, x, i) {
|
|
6248
6248
|
l = P.formatParams(g, l);
|
|
6249
6249
|
var o = P.uuid();
|
|
6250
6250
|
l.TaskId = o, l.onTaskReady && l.onTaskReady(o), l.TaskReady && (l.TaskReady(o), D && console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'), D = !1);
|
|
@@ -6270,28 +6270,28 @@ var At = { exports: {} };
|
|
|
6270
6270
|
_custom: l._custom
|
|
6271
6271
|
}, r = l.onHashProgress;
|
|
6272
6272
|
l.onHashProgress = function(v) {
|
|
6273
|
-
|
|
6273
|
+
k._isRunningTask(t.id) && (t.hashPercent = v.percent, r && r(v), B());
|
|
6274
6274
|
};
|
|
6275
6275
|
var a = l.onProgress;
|
|
6276
6276
|
return l.onProgress = function(v) {
|
|
6277
|
-
|
|
6277
|
+
k._isRunningTask(t.id) && (t.state === "checking" && (t.state = "uploading"), t.loaded = v.loaded, t.speed = v.speed, t.percent = v.percent, a && a(v), B());
|
|
6278
6278
|
}, P.getFileSize(g, l, function(v, I) {
|
|
6279
6279
|
if (v) return x(P.error(v));
|
|
6280
|
-
|
|
6280
|
+
C[o] = t, d.push(t), t.size = I, !i && B(), F(), w();
|
|
6281
6281
|
}), o;
|
|
6282
|
-
},
|
|
6283
|
-
var l =
|
|
6282
|
+
}, k._isRunningTask = function(g) {
|
|
6283
|
+
var l = C[g];
|
|
6284
6284
|
return !!(l && (l.state === "checking" || l.state === "uploading"));
|
|
6285
|
-
},
|
|
6285
|
+
}, k.getTaskList = function() {
|
|
6286
6286
|
return P.map(d, m);
|
|
6287
|
-
},
|
|
6287
|
+
}, k.cancelTask = function(g) {
|
|
6288
6288
|
z(g, "canceled");
|
|
6289
|
-
},
|
|
6289
|
+
}, k.pauseTask = function(g) {
|
|
6290
6290
|
z(g, "paused");
|
|
6291
|
-
},
|
|
6292
|
-
var l =
|
|
6291
|
+
}, k.restartTask = function(g) {
|
|
6292
|
+
var l = C[g];
|
|
6293
6293
|
l && (l.state === "paused" || l.state === "error") && (l.state = "waiting", B(), y = Math.min(y, l.index), F());
|
|
6294
|
-
},
|
|
6294
|
+
}, k.isUploadRunning = function() {
|
|
6295
6295
|
return f || y < d.length;
|
|
6296
6296
|
};
|
|
6297
6297
|
};
|
|
@@ -6340,7 +6340,7 @@ var At = { exports: {} };
|
|
|
6340
6340
|
});
|
|
6341
6341
|
}
|
|
6342
6342
|
return L;
|
|
6343
|
-
},
|
|
6343
|
+
}, k = function(x) {
|
|
6344
6344
|
return !x || x < 0 ? 0 : (x / 1e3).toFixed(3);
|
|
6345
6345
|
}, d = {
|
|
6346
6346
|
// 生成uid 每个链路对应唯一一条uid
|
|
@@ -6382,7 +6382,7 @@ var At = { exports: {} };
|
|
|
6382
6382
|
return !!((typeof navigator > "u" ? "undefined" : N(navigator)) === "object" && navigator.userAgent.match(x));
|
|
6383
6383
|
},
|
|
6384
6384
|
isOtherMobile: function() {
|
|
6385
|
-
return
|
|
6385
|
+
return C && !isAndroid && !isIOS;
|
|
6386
6386
|
},
|
|
6387
6387
|
getUA: function() {
|
|
6388
6388
|
if ((typeof navigator > "u" ? "undefined" : N(navigator)) !== "object")
|
|
@@ -6390,7 +6390,7 @@ var At = { exports: {} };
|
|
|
6390
6390
|
var x = navigator.userAgent;
|
|
6391
6391
|
return x;
|
|
6392
6392
|
}
|
|
6393
|
-
},
|
|
6393
|
+
}, C = d.isMobile(), f = d.isAndroid() ? "android" : d.isIOS ? "ios" : "other_mobile", y = d.getOsType(), m = C ? f : y, B = d.getUA(), w = d.getProtocol(), F = function(x) {
|
|
6394
6394
|
return ["putObject", "sliceUploadFile", "uploadFile", "uploadFiles"].includes(x) ? "UploadTask" : x === "getObject" ? "DownloadTask" : ["putObjectCopy", "sliceCopyFile"].includes(x) ? "CopyTask" : x;
|
|
6395
6395
|
};
|
|
6396
6396
|
function z(l) {
|
|
@@ -6492,11 +6492,11 @@ var At = { exports: {} };
|
|
|
6492
6492
|
});
|
|
6493
6493
|
} else {
|
|
6494
6494
|
var le = M - this.params.startTime, de = this.params.httpEndTime - this.params.httpStartTime, ne = this.params.httpSize / 1024 / (de / 1e3), ue = this.params.md5EndTime - this.params.md5StartTime, ge = this.params.signEndTime - this.params.signStartTime;
|
|
6495
|
-
this.parent && (this.parent.addParamValue("httpTookTime",
|
|
6496
|
-
httpFullTime:
|
|
6497
|
-
httpMd5:
|
|
6498
|
-
httpSign:
|
|
6499
|
-
httpTookTime:
|
|
6495
|
+
this.parent && (this.parent.addParamValue("httpTookTime", k(de)), this.parent.addParamValue("httpFullTime", k(le)), this.parent.addParamValue("httpMd5", k(ue)), this.parent.addParamValue("httpSign", k(ge)), ["multipartUpload", "uploadPartCopy", "putObjectCopy"].includes(this.params.requestName) && this.parent.addParamValue("partTime", k(de))), Object.assign(this.params, {
|
|
6496
|
+
httpFullTime: k(le),
|
|
6497
|
+
httpMd5: k(ue),
|
|
6498
|
+
httpSign: k(ge),
|
|
6499
|
+
httpTookTime: k(de),
|
|
6500
6500
|
httpSpeed: ne < 0 ? 0 : ne.toFixed(3)
|
|
6501
6501
|
});
|
|
6502
6502
|
}
|
|
@@ -6655,13 +6655,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6655
6655
|
var s = E(
|
|
6656
6656
|
/*! ../lib/md5 */
|
|
6657
6657
|
"./lib/md5.js"
|
|
6658
|
-
),
|
|
6658
|
+
), k = E(
|
|
6659
6659
|
/*! ../lib/crypto */
|
|
6660
6660
|
"./lib/crypto.js"
|
|
6661
6661
|
), d = E(
|
|
6662
6662
|
/*! fast-xml-parser */
|
|
6663
6663
|
"./node_modules/fast-xml-parser/src/fxp.js"
|
|
6664
|
-
),
|
|
6664
|
+
), C = d.XMLParser, f = d.XMLBuilder, y = new C({
|
|
6665
6665
|
ignoreDeclaration: !0,
|
|
6666
6666
|
// 忽略 XML 声明
|
|
6667
6667
|
ignoreAttributes: !0,
|
|
@@ -6721,12 +6721,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6721
6721
|
var Ae = R.ForceSignHost !== !1;
|
|
6722
6722
|
if (!fe.Host && !fe.host && R.Bucket && R.Region && Ae && (fe.Host = R.Bucket + ".cos." + R.Region + ".myqcloud.com"), !A) throw new Error("missing param SecretId");
|
|
6723
6723
|
if (!O) throw new Error("missing param SecretKey");
|
|
6724
|
-
var Ie = Math.round(Xe(R.SystemClockOffset) / 1e3) - 1, Pe = Ie,
|
|
6725
|
-
|
|
6726
|
-
var Ze = "sha1", Ve = A, Te = q || Ie + ";" + Pe, Ge = q || Ie + ";" + Pe, ze = x(fe, !0).join(";").toLowerCase(), tt = x(oe, !0).join(";").toLowerCase(),
|
|
6727
|
-
`),
|
|
6728
|
-
`), X =
|
|
6729
|
-
return
|
|
6724
|
+
var Ie = Math.round(Xe(R.SystemClockOffset) / 1e3) - 1, Pe = Ie, He = R.Expires || R.expires;
|
|
6725
|
+
He === void 0 ? Pe += 900 : Pe += He * 1 || 0;
|
|
6726
|
+
var Ze = "sha1", Ve = A, Te = q || Ie + ";" + Pe, Ge = q || Ie + ";" + Pe, ze = x(fe, !0).join(";").toLowerCase(), tt = x(oe, !0).join(";").toLowerCase(), it = k.HmacSHA1(Ge, O).toString(), vt = [W, Re, Ne.obj2str(oe, !0), Ne.obj2str(fe, !0), ""].join(`
|
|
6727
|
+
`), yt = ["sha1", Te, k.SHA1(vt).toString(), ""].join(`
|
|
6728
|
+
`), X = k.HmacSHA1(yt, it).toString(), Ct = ["q-sign-algorithm=" + Ze, "q-ak=" + Ve, "q-sign-time=" + Te, "q-key-time=" + Ge, "q-header-list=" + ze, "q-url-param-list=" + tt, "q-signature=" + X].join("&");
|
|
6729
|
+
return Ct;
|
|
6730
6730
|
}, a = function(R, A, O) {
|
|
6731
6731
|
var q = A / 8, W = R.slice(O, O + q);
|
|
6732
6732
|
return new Uint8Array(W).reverse(), new {
|
|
@@ -6745,13 +6745,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6745
6745
|
}; R.byteLength; ) {
|
|
6746
6746
|
var W = a(R, 32, 0), oe = a(R, 32, 4), fe = W - oe - 16, ye = 0, Re;
|
|
6747
6747
|
for (R = R.slice(12); ye < oe; ) {
|
|
6748
|
-
var Ae = a(R, 8, ye), Ie = v(R, ye + 1, ye + 1 + Ae), Pe = a(R, 16, ye + Ae + 2),
|
|
6749
|
-
A[Ie] =
|
|
6748
|
+
var Ae = a(R, 8, ye), Ie = v(R, ye + 1, ye + 1 + Ae), Pe = a(R, 16, ye + Ae + 2), He = v(R, ye + Ae + 4, ye + Ae + 4 + Pe);
|
|
6749
|
+
A[Ie] = He, ye += Ae + 4 + Pe;
|
|
6750
6750
|
}
|
|
6751
6751
|
if (A[":event-type"] === "Records")
|
|
6752
6752
|
Re = v(R, ye, ye + fe, !0), q.records.push(Re);
|
|
6753
6753
|
else if (A[":event-type"] === "Stats")
|
|
6754
|
-
Re = v(R, ye, ye + fe, !0), q.stats =
|
|
6754
|
+
Re = v(R, ye, ye + fe, !0), q.stats = Ne.xml2json(Re).Stats;
|
|
6755
6755
|
else if (A[":event-type"] === "error") {
|
|
6756
6756
|
var Ze = A[":error-code"], Ve = A[":error-message"], Te = new Error(Ve);
|
|
6757
6757
|
Te.message = Ve, Te.name = Te.code = Ze, q.error = Te;
|
|
@@ -6812,7 +6812,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6812
6812
|
} else
|
|
6813
6813
|
W(oe);
|
|
6814
6814
|
}, te = function(R, A, O, q) {
|
|
6815
|
-
O = O || M, R ? typeof A == "string" ? O(
|
|
6815
|
+
O = O || M, R ? typeof A == "string" ? O(Ne.md5(A, !0)) : Blob && A instanceof Blob ? Ne.getFileMd5(A, function(W, oe) {
|
|
6816
6816
|
O(oe);
|
|
6817
6817
|
}, q) : O() : O();
|
|
6818
6818
|
}, Ce = 1024 * 1024, ce = function(R, A, O) {
|
|
@@ -6823,9 +6823,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6823
6823
|
return;
|
|
6824
6824
|
}
|
|
6825
6825
|
var Ie = Math.min(q, Re + Ce);
|
|
6826
|
-
|
|
6827
|
-
J(Pe, function(
|
|
6828
|
-
Pe = null, oe = oe.update(
|
|
6826
|
+
Ne.fileSlice(R, Re, Ie, !1, function(Pe) {
|
|
6827
|
+
J(Pe, function(He) {
|
|
6828
|
+
Pe = null, oe = oe.update(He, !0), W += He.length, He = null, O && O({
|
|
6829
6829
|
loaded: W,
|
|
6830
6830
|
total: q,
|
|
6831
6831
|
percent: Math.round(W / q * 1e4) / 1e4
|
|
@@ -6956,7 +6956,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6956
6956
|
"x-cos-callback-var": "CallbackVar",
|
|
6957
6957
|
"x-cos-return-body": "ReturnBody"
|
|
6958
6958
|
};
|
|
6959
|
-
|
|
6959
|
+
Ne.each(q, function(W, oe) {
|
|
6960
6960
|
A[W] !== void 0 && (O[oe] = A[W]);
|
|
6961
6961
|
}), A.Headers = K(O);
|
|
6962
6962
|
}
|
|
@@ -7027,19 +7027,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7027
7027
|
}
|
|
7028
7028
|
!W.options.UseRawKey && O.Key && O.Key.substr(0, 1) === "/" && (O.Key = O.Key.substr(1));
|
|
7029
7029
|
}
|
|
7030
|
-
}, Pe = Ie(),
|
|
7031
|
-
if (typeof Promise == "function" && !
|
|
7030
|
+
}, Pe = Ie(), He = ["getAuth", "getObjectUrl"].includes(R);
|
|
7031
|
+
if (typeof Promise == "function" && !He && !q)
|
|
7032
7032
|
return new Promise(function(Ve, Te) {
|
|
7033
7033
|
if (q = function(ze, tt) {
|
|
7034
7034
|
ze ? Te(ze) : Ve(tt);
|
|
7035
|
-
}, Pe) return Ae(
|
|
7035
|
+
}, Pe) return Ae(Ne.error(new Error(Pe)));
|
|
7036
7036
|
A.call(W, O, Ae);
|
|
7037
7037
|
});
|
|
7038
|
-
if (Pe) return Ae(
|
|
7038
|
+
if (Pe) return Ae(Ne.error(new Error(Pe)));
|
|
7039
7039
|
var Ze = A.call(W, O, Ae);
|
|
7040
|
-
if (
|
|
7040
|
+
if (He) return Ze;
|
|
7041
7041
|
};
|
|
7042
|
-
},
|
|
7042
|
+
}, Ke = function(R, A) {
|
|
7043
7043
|
var O = this, q = 0, W = 0, oe = Date.now(), fe, ye;
|
|
7044
7044
|
function Re() {
|
|
7045
7045
|
if (ye = 0, A && typeof A == "function") {
|
|
@@ -7072,13 +7072,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7072
7072
|
}) : A.Body instanceof ArrayBuffer && (A.Body = new Blob([A.Body])), A.Body && (A.Body instanceof Blob || A.Body.toString() === "[object File]" || A.Body.toString() === "[object Blob]"))
|
|
7073
7073
|
q = A.Body.size;
|
|
7074
7074
|
else {
|
|
7075
|
-
O(
|
|
7075
|
+
O(Ne.error(new Error("params body format error, Only allow File|Blob|String.")));
|
|
7076
7076
|
return;
|
|
7077
7077
|
}
|
|
7078
7078
|
A.ContentLength = q, O(null, q);
|
|
7079
7079
|
}, Xe = function(R) {
|
|
7080
7080
|
return Date.now() + (R || 0);
|
|
7081
|
-
},
|
|
7081
|
+
}, _e = function(R, A) {
|
|
7082
7082
|
var O = R;
|
|
7083
7083
|
return R.message = R.message || null, typeof A == "string" ? (R.error = A, R.message = A) : P(A) === "object" && A !== null && (G(R, A), (A.code || A.name) && (R.code = A.code || A.name), A.message && (R.message = A.message), A.stack && (R.stack = A.stack)), typeof Object.defineProperty == "function" && (Object.defineProperty(R, "name", {
|
|
7084
7084
|
writable: !0,
|
|
@@ -7088,23 +7088,23 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7088
7088
|
})), R.name = A && A.name || R.name || R.code || "Error", R.code || (R.code = R.name), R.error || (R.error = re(O)), R;
|
|
7089
7089
|
}, We = function() {
|
|
7090
7090
|
return (typeof globalThis > "u" ? "undefined" : P(globalThis)) === "object" && (globalThis.constructor.name === "DedicatedWorkerGlobalScope" || globalThis.FileReaderSync);
|
|
7091
|
-
},
|
|
7091
|
+
}, rt = function() {
|
|
7092
7092
|
return (typeof window > "u" ? "undefined" : P(window)) !== "object" && (typeof U > "u" ? "undefined" : P(U)) === "object" && !0 && !We();
|
|
7093
|
-
},
|
|
7093
|
+
}, ct = function(R) {
|
|
7094
7094
|
return /^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(R);
|
|
7095
|
-
},
|
|
7095
|
+
}, lt = function() {
|
|
7096
7096
|
if ((typeof navigator > "u" ? "undefined" : P(navigator)) !== "object")
|
|
7097
7097
|
return !1;
|
|
7098
7098
|
var V = navigator.userAgent, R = !!V.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
|
7099
7099
|
return R;
|
|
7100
|
-
}(),
|
|
7100
|
+
}(), dt = function() {
|
|
7101
7101
|
return (typeof navigator > "u" ? "undefined" : P(navigator)) !== "object" ? !1 : /\sQQ/i.test(navigator.userAgent);
|
|
7102
|
-
}(),
|
|
7102
|
+
}(), ft = function(R, A) {
|
|
7103
7103
|
var O = B.encode(R);
|
|
7104
7104
|
return A && (O = O.replaceAll("+", "-").replaceAll("/", "_").replaceAll("=", "")), O;
|
|
7105
|
-
},
|
|
7105
|
+
}, gt = function(R) {
|
|
7106
7106
|
return R ? B.decode(R) : "";
|
|
7107
|
-
},
|
|
7107
|
+
}, ht = function(R) {
|
|
7108
7108
|
var A = R.split("/"), O = [], q = N(A), W;
|
|
7109
7109
|
try {
|
|
7110
7110
|
for (q.s(); !(W = q.n()).done; ) {
|
|
@@ -7117,12 +7117,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7117
7117
|
q.f();
|
|
7118
7118
|
}
|
|
7119
7119
|
return "/" + O.join("/");
|
|
7120
|
-
},
|
|
7120
|
+
}, pt = function(R) {
|
|
7121
7121
|
var A;
|
|
7122
7122
|
if (R && typeof R == "string") {
|
|
7123
7123
|
var O = R.trim(), q = O.indexOf("<") === 0, W = O.indexOf("{") === 0;
|
|
7124
7124
|
if (q)
|
|
7125
|
-
A =
|
|
7125
|
+
A = Ne.xml2json(R) || {};
|
|
7126
7126
|
else if (W)
|
|
7127
7127
|
try {
|
|
7128
7128
|
var oe = R.replace(/\n/g, " "), fe = JSON.parse(oe);
|
|
@@ -7135,7 +7135,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7135
7135
|
} else
|
|
7136
7136
|
A = R || {};
|
|
7137
7137
|
return A;
|
|
7138
|
-
},
|
|
7138
|
+
}, Ne = {
|
|
7139
7139
|
noop: M,
|
|
7140
7140
|
formatParams: Oe,
|
|
7141
7141
|
apiWrapper: qe,
|
|
@@ -7158,25 +7158,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7158
7158
|
attr: Z,
|
|
7159
7159
|
uuid: be,
|
|
7160
7160
|
camSafeUrlEncode: l,
|
|
7161
|
-
throttleOnProgress:
|
|
7161
|
+
throttleOnProgress: Ke,
|
|
7162
7162
|
getFileSize: $e,
|
|
7163
7163
|
getSkewTime: Xe,
|
|
7164
|
-
error:
|
|
7164
|
+
error: _e,
|
|
7165
7165
|
obj2str: i,
|
|
7166
7166
|
getAuth: r,
|
|
7167
7167
|
parseSelectPayload: I,
|
|
7168
7168
|
getSourceParams: T,
|
|
7169
7169
|
isBrowser: !0,
|
|
7170
|
-
isNode:
|
|
7171
|
-
isCIHost:
|
|
7172
|
-
isIOS_QQ:
|
|
7173
|
-
encodeBase64:
|
|
7174
|
-
decodeBase64:
|
|
7175
|
-
simplifyPath:
|
|
7170
|
+
isNode: rt,
|
|
7171
|
+
isCIHost: ct,
|
|
7172
|
+
isIOS_QQ: lt && dt,
|
|
7173
|
+
encodeBase64: ft,
|
|
7174
|
+
decodeBase64: gt,
|
|
7175
|
+
simplifyPath: ht,
|
|
7176
7176
|
readAsBinaryString: J,
|
|
7177
|
-
parseResBody:
|
|
7177
|
+
parseResBody: pt
|
|
7178
7178
|
};
|
|
7179
|
-
H.exports =
|
|
7179
|
+
H.exports = Ne;
|
|
7180
7180
|
}).call(this, E(
|
|
7181
7181
|
/*! ./../node_modules/process/browser.js */
|
|
7182
7182
|
"./node_modules/process/browser.js"
|
|
@@ -7187,9 +7187,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7187
7187
|
})
|
|
7188
7188
|
);
|
|
7189
7189
|
});
|
|
7190
|
-
})(
|
|
7191
|
-
var
|
|
7192
|
-
const
|
|
7190
|
+
})(Pt);
|
|
7191
|
+
var jt = Pt.exports;
|
|
7192
|
+
const Nt = /* @__PURE__ */ Ut(jt), Lt = {
|
|
7193
7193
|
// 图片
|
|
7194
7194
|
jpg: "image/jpeg",
|
|
7195
7195
|
jpeg: "image/jpeg",
|
|
@@ -7315,17 +7315,26 @@ const jt = /* @__PURE__ */ Ft(Ut), Nt = {
|
|
|
7315
7315
|
log: "text/plain",
|
|
7316
7316
|
plist: "application/x-plist"
|
|
7317
7317
|
};
|
|
7318
|
-
function
|
|
7318
|
+
function Mt(je, ot) {
|
|
7319
7319
|
var se;
|
|
7320
|
-
const H = (se =
|
|
7321
|
-
return H &&
|
|
7320
|
+
const H = (se = je.split(".").pop()) == null ? void 0 : se.toLowerCase();
|
|
7321
|
+
return H && Lt[H] || "application/octet-stream";
|
|
7322
|
+
}
|
|
7323
|
+
function Kt(je) {
|
|
7324
|
+
return je.type && je.type !== "application/octet-stream" && je.type !== "" ? je.type : Mt(je.name);
|
|
7322
7325
|
}
|
|
7323
|
-
function
|
|
7324
|
-
|
|
7326
|
+
function At(je, ot, H) {
|
|
7327
|
+
je && je({
|
|
7328
|
+
code: "501",
|
|
7329
|
+
message: ot,
|
|
7330
|
+
error: "",
|
|
7331
|
+
url: H,
|
|
7332
|
+
method: "post"
|
|
7333
|
+
});
|
|
7325
7334
|
}
|
|
7326
|
-
function
|
|
7327
|
-
let
|
|
7328
|
-
async function
|
|
7335
|
+
function zt() {
|
|
7336
|
+
let je;
|
|
7337
|
+
async function ot({
|
|
7329
7338
|
file: H,
|
|
7330
7339
|
onProgress: se,
|
|
7331
7340
|
onFileFinish: E,
|
|
@@ -7336,96 +7345,73 @@ function Ht() {
|
|
|
7336
7345
|
name: N,
|
|
7337
7346
|
size: j,
|
|
7338
7347
|
webkitRelativePath: L
|
|
7339
|
-
} = H, s =
|
|
7348
|
+
} = H, s = Kt(H), d = (await mt.files.getKeyAndCredentials.post({
|
|
7340
7349
|
filename: N,
|
|
7341
7350
|
// 传原始文件名,服务端会生成完整路径
|
|
7342
7351
|
bucketId: P,
|
|
7343
7352
|
size: j,
|
|
7344
7353
|
type: s
|
|
7345
|
-
});
|
|
7346
|
-
if (!
|
|
7347
|
-
U
|
|
7348
|
-
code: "501",
|
|
7349
|
-
message: "获取上传凭证失败",
|
|
7350
|
-
error: "",
|
|
7351
|
-
url: "/files/getKeyAndCredentials",
|
|
7352
|
-
method: "post"
|
|
7353
|
-
});
|
|
7354
|
-
return;
|
|
7355
|
-
}
|
|
7356
|
-
const d = C.data.Key, k = await at.files.create.post({
|
|
7357
|
-
bucketId: P,
|
|
7358
|
-
filename: d,
|
|
7359
|
-
// 使用服务端返回的 Key
|
|
7360
|
-
name: N,
|
|
7361
|
-
size: j,
|
|
7362
|
-
type: s,
|
|
7363
|
-
webkitRelativePath: L
|
|
7364
|
-
});
|
|
7365
|
-
if (!k.data) {
|
|
7366
|
-
U && U({
|
|
7367
|
-
code: "501",
|
|
7368
|
-
message: "新建记录失败",
|
|
7369
|
-
error: "",
|
|
7370
|
-
url: "/files/create",
|
|
7371
|
-
method: "post"
|
|
7372
|
-
});
|
|
7354
|
+
})).data;
|
|
7355
|
+
if (!d) {
|
|
7356
|
+
At(U, "获取上传凭证失败", "/files/getKeyAndCredentials");
|
|
7373
7357
|
return;
|
|
7374
7358
|
}
|
|
7375
|
-
const
|
|
7376
|
-
|
|
7377
|
-
async getAuthorization(
|
|
7378
|
-
|
|
7379
|
-
TmpSecretId:
|
|
7380
|
-
TmpSecretKey:
|
|
7381
|
-
SecurityToken:
|
|
7382
|
-
StartTime:
|
|
7383
|
-
ExpiredTime:
|
|
7359
|
+
const C = d.Key;
|
|
7360
|
+
je = new Nt({
|
|
7361
|
+
async getAuthorization(f, y) {
|
|
7362
|
+
y({
|
|
7363
|
+
TmpSecretId: d.TmpSecretId,
|
|
7364
|
+
TmpSecretKey: d.TmpSecretKey,
|
|
7365
|
+
SecurityToken: d.SessionToken,
|
|
7366
|
+
StartTime: d.StartTime,
|
|
7367
|
+
ExpiredTime: d.ExpiredTime,
|
|
7384
7368
|
ScopeLimit: !0
|
|
7385
7369
|
});
|
|
7386
7370
|
}
|
|
7387
|
-
}),
|
|
7388
|
-
Bucket:
|
|
7371
|
+
}), je.uploadFile({
|
|
7372
|
+
Bucket: d.Bucket,
|
|
7389
7373
|
// 使用服务端返回的 Bucket
|
|
7390
|
-
Region:
|
|
7374
|
+
Region: d.Region,
|
|
7391
7375
|
// 使用服务端返回的 Region
|
|
7392
|
-
Key:
|
|
7376
|
+
Key: C,
|
|
7393
7377
|
// 使用服务端返回的 Key
|
|
7394
7378
|
Body: H,
|
|
7395
7379
|
SliceSize: 1024 * 1024 * 5,
|
|
7396
|
-
onProgress(
|
|
7397
|
-
se && se(
|
|
7380
|
+
onProgress(f) {
|
|
7381
|
+
se && se(f);
|
|
7398
7382
|
},
|
|
7399
|
-
onFileFinish(y, m
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7383
|
+
async onFileFinish(f, y, m) {
|
|
7384
|
+
if (f) {
|
|
7385
|
+
E && E(f, y, m);
|
|
7386
|
+
return;
|
|
7387
|
+
}
|
|
7388
|
+
const B = await mt.files.create.post({
|
|
7389
|
+
bucketId: P,
|
|
7390
|
+
filename: C,
|
|
7391
|
+
name: N,
|
|
7392
|
+
size: j,
|
|
7393
|
+
type: s,
|
|
7394
|
+
webkitRelativePath: L
|
|
7403
7395
|
});
|
|
7396
|
+
if (!B.data) {
|
|
7397
|
+
At(U, "新建记录失败", "/files/create");
|
|
7398
|
+
return;
|
|
7399
|
+
}
|
|
7400
|
+
await mt.files.update.post({
|
|
7401
|
+
id: B.data.id,
|
|
7402
|
+
status: "success"
|
|
7403
|
+
}), E && E(f, y, m);
|
|
7404
7404
|
},
|
|
7405
|
-
onTaskReady: (
|
|
7405
|
+
onTaskReady: (f) => {
|
|
7406
7406
|
}
|
|
7407
|
-
}, (
|
|
7408
|
-
|
|
7409
|
-
const {
|
|
7410
|
-
error: m
|
|
7411
|
-
} = await at.files.update.post({
|
|
7412
|
-
id: f,
|
|
7413
|
-
status: "fail"
|
|
7414
|
-
});
|
|
7415
|
-
m && U && U({
|
|
7416
|
-
code: "501",
|
|
7417
|
-
message: "更新进度失败",
|
|
7418
|
-
error: "",
|
|
7419
|
-
url: "/files/update",
|
|
7420
|
-
method: "post"
|
|
7421
|
-
});
|
|
7422
|
-
})(), U && U(y));
|
|
7407
|
+
}, (f) => {
|
|
7408
|
+
f && (console.error("文件上传失败:", f), U && U(f));
|
|
7423
7409
|
});
|
|
7424
7410
|
}
|
|
7425
7411
|
return {
|
|
7426
|
-
uploadFile:
|
|
7412
|
+
uploadFile: ot
|
|
7427
7413
|
};
|
|
7428
7414
|
}
|
|
7429
7415
|
export {
|
|
7430
|
-
|
|
7416
|
+
zt as u
|
|
7431
7417
|
};
|