@huyooo/ui 2.0.6 → 2.0.8
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-D_94iUEG.js → AuthkitAppSetting-eXw1JiyT.js} +787 -752
- package/dist/{Contact-CBGSJC2q.js → Contact-C5T90358.js} +2 -2
- package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-CnvQjQFT.js → FeedbackModal.vue_vue_type_script_setup_true_lang-B3CA1z6v.js} +2 -2
- package/dist/LegalDocViewer-Dxl4FngI.js +2481 -0
- package/dist/{PaySubscriptions-BSkcUqHk.js → PaySubscriptions-Bv6LQ_Pf.js} +1 -1
- package/dist/{PricingPlans-CyFvgf18.js → PricingPlans-CQaXgOIR.js} +3 -3
- package/dist/{ReferrerReferees-BU9IEQgz.js → ReferrerReferees-D4VEC8QJ.js} +1 -1
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-oa6LJgCY.js → Upload.vue_vue_type_script_setup_true_lang-CgZQOZYt.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DqgwJ7r3.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BdibAudA.js} +204 -181
- package/dist/{WidthContainer-BIRNIRX5.js → WidthContainer-AZl-9MdF.js} +6 -6
- package/dist/authkit.d.ts +1 -0
- package/dist/authkit.js +51 -50
- package/dist/common/globalConfig.d.ts +0 -5
- package/dist/common.js +1 -1
- package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +1 -3
- package/dist/components/UserMenu/parts/UserMenuAuthPlaceholder.vue.d.ts +7 -0
- package/dist/composables/Authkit/oauthCallback.d.ts +14 -0
- package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +2 -0
- package/dist/composables/Authkit/useOAuthCallbackHandler.d.ts +11 -0
- package/dist/composables/Authkit/useOauth.d.ts +3 -3
- package/dist/composables.js +8 -8
- package/dist/feedback.js +1 -1
- package/dist/{fetchAuthPageAboutUs-CP5a7jIo.js → fetchAuthPageAboutUs-DV7ArpNZ.js} +1 -1
- package/dist/main.js +194 -193
- package/dist/pay.js +3 -3
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/{runtime-qs4IasEB.js → runtime-Dp7MgwhI.js} +115 -116
- package/dist/style.css +1 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAuth-BPTZUSkM.js → useAuthkitAuth-cHrJMM8E.js} +48 -47
- package/dist/useAuthkitUsersProfile-CTd6PP-a.js +50 -0
- package/dist/{useEnsureAuthenticated-CncOvj2H.js → useEnsureAuthenticated-C8qS8DLL.js} +1 -1
- package/dist/{useLegalDocs-BZlntAI7.js → useLegalDocs-C4qk5CTb.js} +1 -1
- package/dist/{usePageSEO-DwhbUUjW.js → usePageSEO-Dl6_kBWP.js} +1 -1
- package/dist/{useRoutePermission-BrQX7NTq.js → useRoutePermission-B_g-WmDZ.js} +50 -42
- package/dist/{useSubscriptionCheckout-BDDCRxSs.js → useSubscriptionCheckout-CYU2Ke0y.js} +1 -1
- package/dist/user.js +1 -1
- package/package.json +1 -1
- package/dist/LegalDocViewer-DeDXQX3X.js +0 -2492
- package/dist/useAuthkitUsersProfile-CW_exa7E.js +0 -39
|
@@ -2,15 +2,15 @@ import { ref as Nt, inject as Mt } from "vue";
|
|
|
2
2
|
import { i as Kt } from "./apiClients-Ctcq8NZs.js";
|
|
3
3
|
import { c as _t, g as Ht } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
4
4
|
const zt = Nt(void 0);
|
|
5
|
-
function Vt(
|
|
5
|
+
function Vt(Q) {
|
|
6
6
|
var Pe, _;
|
|
7
|
-
return
|
|
7
|
+
return Q === "system" ? typeof window < "u" && ((_ = (Pe = window.matchMedia) == null ? void 0 : Pe.call(window, "(prefers-color-scheme: dark)")) != null && _.matches) ? "dark" : "light" : Q;
|
|
8
8
|
}
|
|
9
|
-
function Dt(
|
|
10
|
-
typeof document > "u" || (
|
|
9
|
+
function Dt(Q) {
|
|
10
|
+
typeof document > "u" || (Q === "dark" ? (document.body.setAttribute("arco-theme", "dark"), document.body.classList.add("dark")) : (document.body.removeAttribute("arco-theme"), document.body.classList.remove("dark")));
|
|
11
11
|
}
|
|
12
|
-
function qt(
|
|
13
|
-
zt.value =
|
|
12
|
+
function qt(Q) {
|
|
13
|
+
zt.value = Q, Dt(Vt(Q));
|
|
14
14
|
}
|
|
15
15
|
const it = {
|
|
16
16
|
avatarBucketId: "68350c206888f565dc7d09e9",
|
|
@@ -19,25 +19,24 @@ const it = {
|
|
|
19
19
|
region: "ap-beijing",
|
|
20
20
|
web3formsAccessKey: "72604aac-d55e-4df0-9bcf-31b2206b3753"
|
|
21
21
|
};
|
|
22
|
-
function Gt(
|
|
23
|
-
return
|
|
24
|
-
appId:
|
|
25
|
-
authPrefixUrl:
|
|
26
|
-
onesPrefixUrl:
|
|
27
|
-
billingPrefixUrl:
|
|
28
|
-
logPrefixUrl:
|
|
29
|
-
aiPrefixUrl:
|
|
30
|
-
webhookPrefixUrl:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
getAccessToken: W.getAccessToken
|
|
22
|
+
function Gt(Q) {
|
|
23
|
+
return Q.theme !== void 0 && qt(Q.theme), Object.freeze({
|
|
24
|
+
appId: Q.appId,
|
|
25
|
+
authPrefixUrl: Q.endpoints.auth,
|
|
26
|
+
onesPrefixUrl: Q.endpoints.ones,
|
|
27
|
+
billingPrefixUrl: Q.endpoints.billing,
|
|
28
|
+
logPrefixUrl: Q.endpoints.log,
|
|
29
|
+
aiPrefixUrl: Q.endpoints.ai,
|
|
30
|
+
webhookPrefixUrl: Q.endpoints.webhook,
|
|
31
|
+
pricingUrl: Q.pricingUrl || "/Pricing",
|
|
32
|
+
openPricing: Q.openPricing,
|
|
33
|
+
avatarBucketId: Q.avatarBucketId ?? it.avatarBucketId,
|
|
34
|
+
feedbackBucketId: Q.feedbackBucketId ?? it.feedbackBucketId,
|
|
35
|
+
bucket: Q.bucket ?? it.bucket,
|
|
36
|
+
region: Q.region ?? it.region,
|
|
37
|
+
web3formsAccessKey: Q.web3formsAccessKey ?? it.web3formsAccessKey,
|
|
38
|
+
legalDocsMode: Q.legalDocsMode ?? "builtin",
|
|
39
|
+
getAccessToken: Q.getAccessToken
|
|
41
40
|
});
|
|
42
41
|
}
|
|
43
42
|
const $t = {
|
|
@@ -166,18 +165,18 @@ const $t = {
|
|
|
166
165
|
log: "text/plain",
|
|
167
166
|
plist: "application/x-plist"
|
|
168
167
|
};
|
|
169
|
-
function Wt(
|
|
168
|
+
function Wt(Q, Pe) {
|
|
170
169
|
var J;
|
|
171
|
-
const _ = (J =
|
|
170
|
+
const _ = (J = Q.split(".").pop()) == null ? void 0 : J.toLowerCase();
|
|
172
171
|
return _ && $t[_] || "application/octet-stream";
|
|
173
172
|
}
|
|
174
|
-
function Qt(
|
|
175
|
-
return
|
|
173
|
+
function Qt(Q) {
|
|
174
|
+
return Q.type && Q.type !== "application/octet-stream" && Q.type !== "" ? Q.type : Wt(Q.name);
|
|
176
175
|
}
|
|
177
176
|
var wt = { exports: {} };
|
|
178
|
-
(function(
|
|
177
|
+
(function(Q, Pe) {
|
|
179
178
|
(function(J, E) {
|
|
180
|
-
|
|
179
|
+
Q.exports = E();
|
|
181
180
|
})(_t, function() {
|
|
182
181
|
return (
|
|
183
182
|
/******/
|
|
@@ -5070,7 +5069,7 @@ var wt = { exports: {} };
|
|
|
5070
5069
|
});
|
|
5071
5070
|
});
|
|
5072
5071
|
}
|
|
5073
|
-
function
|
|
5072
|
+
function W(e, c) {
|
|
5074
5073
|
var n = e.SelectType;
|
|
5075
5074
|
if (!n) return c(s.error(new Error("missing param SelectType")));
|
|
5076
5075
|
var u = e.SelectRequest || {}, p = s.json2xml({
|
|
@@ -5977,7 +5976,7 @@ var wt = { exports: {} };
|
|
|
5977
5976
|
putObjectTagging: P,
|
|
5978
5977
|
getObjectTagging: O,
|
|
5979
5978
|
deleteObjectTagging: q,
|
|
5980
|
-
selectObjectContent:
|
|
5979
|
+
selectObjectContent: W,
|
|
5981
5980
|
appendObject: ze,
|
|
5982
5981
|
// 分块上传相关方法
|
|
5983
5982
|
uploadPartCopy: Ne,
|
|
@@ -6793,7 +6792,7 @@ var wt = { exports: {} };
|
|
|
6793
6792
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
6794
6793
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
6795
6794
|
}
|
|
6796
|
-
var
|
|
6795
|
+
var W, ie = !0, ge = !1;
|
|
6797
6796
|
return {
|
|
6798
6797
|
s: function() {
|
|
6799
6798
|
P = P.call(V);
|
|
@@ -6803,13 +6802,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6803
6802
|
return ie = Be.done, Be;
|
|
6804
6803
|
},
|
|
6805
6804
|
e: function(Be) {
|
|
6806
|
-
ge = !0,
|
|
6805
|
+
ge = !0, W = Be;
|
|
6807
6806
|
},
|
|
6808
6807
|
f: function() {
|
|
6809
6808
|
try {
|
|
6810
6809
|
ie || P.return == null || P.return();
|
|
6811
6810
|
} finally {
|
|
6812
|
-
if (ge) throw
|
|
6811
|
+
if (ge) throw W;
|
|
6813
6812
|
}
|
|
6814
6813
|
}
|
|
6815
6814
|
};
|
|
@@ -6872,14 +6871,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6872
6871
|
var P = [];
|
|
6873
6872
|
for (var O in V)
|
|
6874
6873
|
V.hasOwnProperty(O) && P.push(R ? l(O).toLowerCase() : O);
|
|
6875
|
-
return P.sort(function(q,
|
|
6876
|
-
return q = q.toLowerCase(),
|
|
6874
|
+
return P.sort(function(q, W) {
|
|
6875
|
+
return q = q.toLowerCase(), W = W.toLowerCase(), q === W ? 0 : q > W ? 1 : -1;
|
|
6877
6876
|
});
|
|
6878
6877
|
}
|
|
6879
6878
|
var i = function(R, P) {
|
|
6880
|
-
var O, q,
|
|
6879
|
+
var O, q, W, ie = [], ge = x(R);
|
|
6881
6880
|
for (O = 0; O < ge.length; O++)
|
|
6882
|
-
q = ge[O],
|
|
6881
|
+
q = ge[O], W = R[q] === void 0 || R[q] === null ? "" : "" + R[q], q = P ? l(q).toLowerCase() : l(q), W = l(W) || "", ie.push(q + "=" + W);
|
|
6883
6882
|
return ie.join("&");
|
|
6884
6883
|
}, o = ["cache-control", "content-disposition", "content-encoding", "content-length", "content-md5", "expect", "expires", "host", "if-match", "if-modified-since", "if-none-match", "if-unmodified-since", "origin", "range", "transfer-encoding", "pic-operations"], t = function(R) {
|
|
6885
6884
|
var P = {};
|
|
@@ -6890,34 +6889,34 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6890
6889
|
return P;
|
|
6891
6890
|
}, r = function(R) {
|
|
6892
6891
|
R = R || {};
|
|
6893
|
-
var P = R.SecretId, O = R.SecretKey, q = R.KeyTime,
|
|
6892
|
+
var P = R.SecretId, O = R.SecretKey, q = R.KeyTime, W = (R.method || R.Method || "get").toLowerCase(), ie = se(R.Query || R.params || {}), ge = t(se(R.Headers || R.headers || {})), Ce = R.Key || "", Be;
|
|
6894
6893
|
R.UseRawKey ? Be = R.Pathname || R.pathname || "/" + Ce : (Be = R.Pathname || R.pathname || Ce, Be.indexOf("/") !== 0 && (Be = "/" + Be));
|
|
6895
6894
|
var Oe = R.ForceSignHost !== !1;
|
|
6896
6895
|
if (!ge.Host && !ge.host && R.Bucket && R.Region && Oe && (ge.Host = R.Bucket + ".cos." + R.Region + ".myqcloud.com"), !P) throw new Error("missing param SecretId");
|
|
6897
6896
|
if (!O) throw new Error("missing param SecretKey");
|
|
6898
6897
|
var Ue = Math.round(Ze(R.SystemClockOffset) / 1e3) - 1, we = Ue, ze = R.Expires || R.expires;
|
|
6899
6898
|
ze === void 0 ? we += 900 : we += ze * 1 || 0;
|
|
6900
|
-
var Ye = "sha1", De = P, Re = q || Ue + ";" + we, $e = q || Ue + ";" + we, Ve = x(ge, !0).join(";").toLowerCase(), nt = x(ie, !0).join(";").toLowerCase(), st = k.HmacSHA1($e, O).toString(), Ct = [
|
|
6899
|
+
var Ye = "sha1", De = P, Re = q || Ue + ";" + we, $e = q || Ue + ";" + we, Ve = x(ge, !0).join(";").toLowerCase(), nt = x(ie, !0).join(";").toLowerCase(), st = k.HmacSHA1($e, O).toString(), Ct = [W, Be, Ne.obj2str(ie, !0), Ne.obj2str(ge, !0), ""].join(`
|
|
6901
6900
|
`), kt = ["sha1", Re, k.SHA1(Ct).toString(), ""].join(`
|
|
6902
6901
|
`), Y = k.HmacSHA1(kt, st).toString(), St = ["q-sign-algorithm=" + Ye, "q-ak=" + De, "q-sign-time=" + Re, "q-key-time=" + $e, "q-header-list=" + Ve, "q-url-param-list=" + nt, "q-signature=" + Y].join("&");
|
|
6903
6902
|
return St;
|
|
6904
6903
|
}, a = function(R, P, O) {
|
|
6905
|
-
var q = P / 8,
|
|
6906
|
-
return new Uint8Array(
|
|
6904
|
+
var q = P / 8, W = R.slice(O, O + q);
|
|
6905
|
+
return new Uint8Array(W).reverse(), new {
|
|
6907
6906
|
8: Uint8Array,
|
|
6908
6907
|
16: Uint16Array,
|
|
6909
6908
|
32: Uint32Array
|
|
6910
|
-
}[P](
|
|
6909
|
+
}[P](W)[0];
|
|
6911
6910
|
}, y = function(R, P, O, q) {
|
|
6912
|
-
var
|
|
6913
|
-
return new Uint8Array(
|
|
6911
|
+
var W = R.slice(P, O), ie = "";
|
|
6912
|
+
return new Uint8Array(W).forEach(function(ge) {
|
|
6914
6913
|
ie += String.fromCharCode(ge);
|
|
6915
6914
|
}), q && (ie = decodeURIComponent(escape(ie))), ie;
|
|
6916
6915
|
}, I = function(R) {
|
|
6917
6916
|
for (var P = {}, O = y(R), q = {
|
|
6918
6917
|
records: []
|
|
6919
6918
|
}; R.byteLength; ) {
|
|
6920
|
-
var
|
|
6919
|
+
var W = a(R, 32, 0), ie = a(R, 32, 4), ge = W - ie - 16, Ce = 0, Be;
|
|
6921
6920
|
for (R = R.slice(12); Ce < ie; ) {
|
|
6922
6921
|
var Oe = a(R, 8, Ce), Ue = y(R, Ce + 1, Ce + 1 + Oe), we = a(R, 16, Ce + Oe + 2), ze = y(R, Ce + Oe + 4, Ce + Oe + 4 + we);
|
|
6923
6922
|
P[Ue] = ze, Ce += Oe + 4 + we;
|
|
@@ -6966,31 +6965,31 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6966
6965
|
}, X = function() {
|
|
6967
6966
|
var V = function(O, q) {
|
|
6968
6967
|
O = O.split("."), q = q.split(".");
|
|
6969
|
-
for (var
|
|
6970
|
-
if (O[
|
|
6971
|
-
return parseInt(O[
|
|
6968
|
+
for (var W = 0; W < q.length; W++)
|
|
6969
|
+
if (O[W] !== q[W])
|
|
6970
|
+
return parseInt(O[W]) > parseInt(q[W]) ? 1 : -1;
|
|
6972
6971
|
return 0;
|
|
6973
6972
|
}, R = function(O) {
|
|
6974
6973
|
if (!O) return !1;
|
|
6975
|
-
var q = (O.match(/Chrome\/([.\d]+)/) || [])[1],
|
|
6974
|
+
var q = (O.match(/Chrome\/([.\d]+)/) || [])[1], W = (O.match(/QBCore\/([.\d]+)/) || [])[1], ie = (O.match(/QQBrowser\/([.\d]+)/) || [])[1], ge = q && V(q, "53.0.2785.116") < 0 && W && V(W, "3.53.991.400") < 0 && ie && V(ie, "9.0.2524.400") <= 0 || !1;
|
|
6976
6975
|
return ge;
|
|
6977
6976
|
};
|
|
6978
6977
|
return R(typeof navigator < "u" && navigator.userAgent);
|
|
6979
|
-
}(), ne = function(R, P, O, q,
|
|
6978
|
+
}(), ne = function(R, P, O, q, W) {
|
|
6980
6979
|
var ie;
|
|
6981
6980
|
if (R.slice ? ie = R.slice(P, O) : R.mozSlice ? ie = R.mozSlice(P, O) : R.webkitSlice && (ie = R.webkitSlice(P, O)), q && X) {
|
|
6982
6981
|
var ge = new FileReader();
|
|
6983
6982
|
ge.onload = function(Ce) {
|
|
6984
|
-
ie = null,
|
|
6983
|
+
ie = null, W(new Blob([ge.result]));
|
|
6985
6984
|
}, ge.readAsArrayBuffer(ie);
|
|
6986
6985
|
} else
|
|
6987
|
-
|
|
6986
|
+
W(ie);
|
|
6988
6987
|
}, oe = function(R, P, O, q) {
|
|
6989
|
-
O = O || M, R ? typeof P == "string" ? O(Ne.md5(P, !0)) : Blob && P instanceof Blob ? Ne.getFileMd5(P, function(
|
|
6988
|
+
O = O || M, R ? typeof P == "string" ? O(Ne.md5(P, !0)) : Blob && P instanceof Blob ? Ne.getFileMd5(P, function(W, ie) {
|
|
6990
6989
|
O(ie);
|
|
6991
6990
|
}, q) : O() : O();
|
|
6992
6991
|
}, ke = 1024 * 1024, le = function(R, P, O) {
|
|
6993
|
-
var q = R.size,
|
|
6992
|
+
var q = R.size, W = 0, ie = s.getCtx(), ge = function(Be) {
|
|
6994
6993
|
if (Be >= q) {
|
|
6995
6994
|
var Oe = ie.digest("hex");
|
|
6996
6995
|
P(null, Oe);
|
|
@@ -6999,10 +6998,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6999
6998
|
var Ue = Math.min(q, Be + ke);
|
|
7000
6999
|
Ne.fileSlice(R, Be, Ue, !1, function(we) {
|
|
7001
7000
|
Z(we, function(ze) {
|
|
7002
|
-
we = null, ie = ie.update(ze, !0),
|
|
7003
|
-
loaded:
|
|
7001
|
+
we = null, ie = ie.update(ze, !0), W += ze.length, ze = null, O && O({
|
|
7002
|
+
loaded: W,
|
|
7004
7003
|
total: q,
|
|
7005
|
-
percent: Math.round(
|
|
7004
|
+
percent: Math.round(W / q * 1e4) / 1e4
|
|
7006
7005
|
}), ge(Be + ke);
|
|
7007
7006
|
});
|
|
7008
7007
|
});
|
|
@@ -7056,24 +7055,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7056
7055
|
return O;
|
|
7057
7056
|
}
|
|
7058
7057
|
var ve = function(R) {
|
|
7059
|
-
var P, O, q,
|
|
7058
|
+
var P, O, q, W = "";
|
|
7060
7059
|
for (P = 0, O = R.length / 2; P < O; P++)
|
|
7061
|
-
q = parseInt(R[P * 2] + R[P * 2 + 1], 16),
|
|
7062
|
-
return btoa(
|
|
7060
|
+
q = parseInt(R[P * 2] + R[P * 2 + 1], 16), W += String.fromCharCode(q);
|
|
7061
|
+
return btoa(W);
|
|
7063
7062
|
}, Ee = function() {
|
|
7064
7063
|
var R = function() {
|
|
7065
7064
|
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
7066
7065
|
};
|
|
7067
7066
|
return R() + R() + "-" + R() + "-" + R() + "-" + R() + "-" + R() + R() + R();
|
|
7068
7067
|
}, xe = function(R, P) {
|
|
7069
|
-
var O = P.Bucket, q = P.Region,
|
|
7068
|
+
var O = P.Bucket, q = P.Region, W = P.Key, ie = this.options.Domain, ge = !ie || typeof ie == "string" && ie.indexOf("{Bucket}") > -1, Ce = !ie || typeof ie == "string" && ie.indexOf("{Region}") > -1;
|
|
7070
7069
|
if (R.indexOf("Bucket") > -1 || R === "deleteMultipleObject" || R === "multipartList" || R === "listObjectVersions") {
|
|
7071
7070
|
if (ge && !O) return "Bucket";
|
|
7072
7071
|
if (Ce && !q) return "Region";
|
|
7073
7072
|
} else if (R.indexOf("Object") > -1 || R.indexOf("multipart") > -1 || R === "sliceUploadFile" || R === "abortUploadTask" || R === "uploadFile") {
|
|
7074
7073
|
if (ge && !O) return "Bucket";
|
|
7075
7074
|
if (Ce && !q) return "Region";
|
|
7076
|
-
if (!
|
|
7075
|
+
if (!W) return "Key";
|
|
7077
7076
|
}
|
|
7078
7077
|
return !1;
|
|
7079
7078
|
}, Ie = function(R, P) {
|
|
@@ -7081,8 +7080,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7081
7080
|
var O = P.Headers || {};
|
|
7082
7081
|
if (P && A(P) === "object") {
|
|
7083
7082
|
(function() {
|
|
7084
|
-
for (var
|
|
7085
|
-
P.hasOwnProperty(
|
|
7083
|
+
for (var W in P)
|
|
7084
|
+
P.hasOwnProperty(W) && W.indexOf("x-cos-") > -1 && (O[W] = P[W]);
|
|
7086
7085
|
})();
|
|
7087
7086
|
var q = {
|
|
7088
7087
|
// params headers
|
|
@@ -7130,18 +7129,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7130
7129
|
"x-cos-callback-var": "CallbackVar",
|
|
7131
7130
|
"x-cos-return-body": "ReturnBody"
|
|
7132
7131
|
};
|
|
7133
|
-
Ne.each(q, function(
|
|
7134
|
-
P[
|
|
7132
|
+
Ne.each(q, function(W, ie) {
|
|
7133
|
+
P[W] !== void 0 && (O[ie] = P[W]);
|
|
7135
7134
|
}), P.Headers = K(O);
|
|
7136
7135
|
}
|
|
7137
7136
|
}
|
|
7138
7137
|
return P;
|
|
7139
7138
|
}, Ge = function(R, P) {
|
|
7140
7139
|
return function(O, q) {
|
|
7141
|
-
var
|
|
7140
|
+
var W = this;
|
|
7142
7141
|
typeof O == "function" && (q = O, O = {}), O = Ie(R, O);
|
|
7143
7142
|
var ie;
|
|
7144
|
-
if (
|
|
7143
|
+
if (W.options.EnableReporter)
|
|
7145
7144
|
if (O.calledBySdk === "sliceUploadFile" || O.calledBySdk === "sliceCopyFile")
|
|
7146
7145
|
ie = O.tracker && O.tracker.generateSubTracker({
|
|
7147
7146
|
apiName: R
|
|
@@ -7151,10 +7150,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7151
7150
|
else {
|
|
7152
7151
|
var ge = 0;
|
|
7153
7152
|
O.Body && (ge = typeof O.Body == "string" ? O.Body.length : O.Body.size || O.Body.byteLength || 0);
|
|
7154
|
-
var Ce =
|
|
7153
|
+
var Ce = W.options.UseAccelerate || typeof W.options.Domain == "string" && W.options.Domain.includes("accelerate.");
|
|
7155
7154
|
ie = new w({
|
|
7156
|
-
Beacon:
|
|
7157
|
-
clsReporter:
|
|
7155
|
+
Beacon: W.options.BeaconReporter,
|
|
7156
|
+
clsReporter: W.options.ClsReporter,
|
|
7158
7157
|
bucket: O.Bucket,
|
|
7159
7158
|
region: O.Region,
|
|
7160
7159
|
apiName: R,
|
|
@@ -7162,9 +7161,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7162
7161
|
accelerate: Ce,
|
|
7163
7162
|
fileKey: O.Key,
|
|
7164
7163
|
fileSize: ge,
|
|
7165
|
-
deepTracker:
|
|
7166
|
-
customId:
|
|
7167
|
-
delay:
|
|
7164
|
+
deepTracker: W.options.DeepTracker,
|
|
7165
|
+
customId: W.options.CustomId,
|
|
7166
|
+
delay: W.options.TrackerDelay
|
|
7168
7167
|
});
|
|
7169
7168
|
}
|
|
7170
7169
|
O.tracker = ie;
|
|
@@ -7174,11 +7173,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7174
7173
|
ie && ie.report(Re, $e), q && q(Be(Re), Be($e));
|
|
7175
7174
|
}, Ue = function() {
|
|
7176
7175
|
if (R !== "getService" && R !== "abortUploadTask") {
|
|
7177
|
-
var Re = xe.call(
|
|
7176
|
+
var Re = xe.call(W, R, O);
|
|
7178
7177
|
if (Re)
|
|
7179
7178
|
return "missing param " + Re;
|
|
7180
7179
|
if (O.Region) {
|
|
7181
|
-
if (
|
|
7180
|
+
if (W.options.CompatibilityMode) {
|
|
7182
7181
|
if (!/^([a-z\d-.]+)$/.test(O.Region))
|
|
7183
7182
|
return "Region format error.";
|
|
7184
7183
|
} else {
|
|
@@ -7187,19 +7186,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7187
7186
|
if (!/^([a-z\d-]+)$/.test(O.Region))
|
|
7188
7187
|
return "Region format error.";
|
|
7189
7188
|
}
|
|
7190
|
-
!
|
|
7189
|
+
!W.options.CompatibilityMode && O.Region.indexOf("-") === -1 && O.Region !== "yfb" && O.Region !== "default" && O.Region !== "accelerate" && console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224");
|
|
7191
7190
|
}
|
|
7192
7191
|
if (O.Bucket) {
|
|
7193
7192
|
if (!/^([a-z\d-]+)-(\d+)$/.test(O.Bucket))
|
|
7194
7193
|
if (O.AppId)
|
|
7195
7194
|
O.Bucket = O.Bucket + "-" + O.AppId;
|
|
7196
|
-
else if (
|
|
7197
|
-
O.Bucket = O.Bucket + "-" +
|
|
7195
|
+
else if (W.options.AppId)
|
|
7196
|
+
O.Bucket = O.Bucket + "-" + W.options.AppId;
|
|
7198
7197
|
else
|
|
7199
7198
|
return 'Bucket should format as "test-1250000000".';
|
|
7200
7199
|
O.AppId && (console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'), delete O.AppId);
|
|
7201
7200
|
}
|
|
7202
|
-
!
|
|
7201
|
+
!W.options.UseRawKey && O.Key && O.Key.substr(0, 1) === "/" && (O.Key = O.Key.substr(1));
|
|
7203
7202
|
}
|
|
7204
7203
|
}, we = Ue(), ze = ["getAuth", "getObjectUrl"].includes(R);
|
|
7205
7204
|
if (typeof Promise == "function" && !ze && !q)
|
|
@@ -7207,22 +7206,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7207
7206
|
if (q = function(Ve, nt) {
|
|
7208
7207
|
Ve ? Re(Ve) : De(nt);
|
|
7209
7208
|
}, we) return Oe(Ne.error(new Error(we)));
|
|
7210
|
-
P.call(
|
|
7209
|
+
P.call(W, O, Oe);
|
|
7211
7210
|
});
|
|
7212
7211
|
if (we) return Oe(Ne.error(new Error(we)));
|
|
7213
|
-
var Ye = P.call(
|
|
7212
|
+
var Ye = P.call(W, O, Oe);
|
|
7214
7213
|
if (ze) return Ye;
|
|
7215
7214
|
};
|
|
7216
7215
|
}, _e = function(R, P) {
|
|
7217
|
-
var O = this, q = 0,
|
|
7216
|
+
var O = this, q = 0, W = 0, ie = Date.now(), ge, Ce;
|
|
7218
7217
|
function Be() {
|
|
7219
7218
|
if (Ce = 0, P && typeof P == "function") {
|
|
7220
7219
|
ge = Date.now();
|
|
7221
|
-
var Oe = Math.max(0, Math.round((
|
|
7222
|
-
|
|
7220
|
+
var Oe = Math.max(0, Math.round((W - q) / ((ge - ie) / 1e3) * 100) / 100) || 0, Ue;
|
|
7221
|
+
W === 0 && R === 0 ? Ue = 1 : Ue = Math.floor(W / R * 100) / 100 || 0, ie = ge, q = W;
|
|
7223
7222
|
try {
|
|
7224
7223
|
P({
|
|
7225
|
-
loaded:
|
|
7224
|
+
loaded: W,
|
|
7226
7225
|
total: R,
|
|
7227
7226
|
speed: Oe,
|
|
7228
7227
|
percent: Ue
|
|
@@ -7232,7 +7231,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7232
7231
|
}
|
|
7233
7232
|
}
|
|
7234
7233
|
return function(Oe, Ue) {
|
|
7235
|
-
if (Oe && (
|
|
7234
|
+
if (Oe && (W = Oe.loaded, R = Oe.total), Ue)
|
|
7236
7235
|
clearTimeout(Ce), Be();
|
|
7237
7236
|
else {
|
|
7238
7237
|
if (Ce) return;
|
|
@@ -7279,10 +7278,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7279
7278
|
}, pt = function(R) {
|
|
7280
7279
|
return R ? B.decode(R) : "";
|
|
7281
7280
|
}, yt = function(R) {
|
|
7282
|
-
var P = R.split("/"), O = [], q = j(P),
|
|
7281
|
+
var P = R.split("/"), O = [], q = j(P), W;
|
|
7283
7282
|
try {
|
|
7284
|
-
for (q.s(); !(
|
|
7285
|
-
var ie =
|
|
7283
|
+
for (q.s(); !(W = q.n()).done; ) {
|
|
7284
|
+
var ie = W.value;
|
|
7286
7285
|
ie === ".." ? O.length && O.pop() : ie.length && ie !== "." && O.push(ie);
|
|
7287
7286
|
}
|
|
7288
7287
|
} catch (ge) {
|
|
@@ -7294,10 +7293,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7294
7293
|
}, vt = function(R) {
|
|
7295
7294
|
var P;
|
|
7296
7295
|
if (R && typeof R == "string") {
|
|
7297
|
-
var O = R.trim(), q = O.indexOf("<") === 0,
|
|
7296
|
+
var O = R.trim(), q = O.indexOf("<") === 0, W = O.indexOf("{") === 0;
|
|
7298
7297
|
if (q)
|
|
7299
7298
|
P = Ne.xml2json(R) || {};
|
|
7300
|
-
else if (
|
|
7299
|
+
else if (W)
|
|
7301
7300
|
try {
|
|
7302
7301
|
var ie = R.replace(/\n/g, " "), ge = JSON.parse(ie);
|
|
7303
7302
|
Object.prototype.toString.call(ge) === "[object Object]" ? P = ge : P = R;
|
|
@@ -7365,7 +7364,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7365
7364
|
var Jt = wt.exports;
|
|
7366
7365
|
const Xt = /* @__PURE__ */ Ht(Jt), Zt = 5 * 1024 * 1024;
|
|
7367
7366
|
function Yt() {
|
|
7368
|
-
async function
|
|
7367
|
+
async function Q(Pe) {
|
|
7369
7368
|
var A, j;
|
|
7370
7369
|
let _ = null;
|
|
7371
7370
|
const J = () => {
|
|
@@ -7403,34 +7402,34 @@ function Yt() {
|
|
|
7403
7402
|
}
|
|
7404
7403
|
}
|
|
7405
7404
|
return {
|
|
7406
|
-
upload:
|
|
7405
|
+
upload: Q
|
|
7407
7406
|
};
|
|
7408
7407
|
}
|
|
7409
|
-
function en(
|
|
7410
|
-
return !!
|
|
7408
|
+
function en(Q) {
|
|
7409
|
+
return !!Q && typeof Q == "object" && "Key" in Q && typeof Q.Key == "string" && "Bucket" in Q && typeof Q.Bucket == "string" && "Region" in Q && typeof Q.Region == "string" && "TmpSecretId" in Q && typeof Q.TmpSecretId == "string" && "TmpSecretKey" in Q && typeof Q.TmpSecretKey == "string" && "SessionToken" in Q && typeof Q.SessionToken == "string" && "StartTime" in Q && typeof Q.StartTime == "number" && "ExpiredTime" in Q && typeof Q.ExpiredTime == "number";
|
|
7411
7410
|
}
|
|
7412
|
-
function tn(
|
|
7413
|
-
return
|
|
7411
|
+
function tn(Q) {
|
|
7412
|
+
return Q && typeof Q == "object" && "id" in Q ? String(Q.id) : "";
|
|
7414
7413
|
}
|
|
7415
|
-
function Rt(
|
|
7416
|
-
return
|
|
7414
|
+
function Rt(Q, Pe) {
|
|
7415
|
+
return Q && typeof Q == "object" && "message" in Q && typeof Q.message == "string" ? new Error(Q.message) : new Error(Pe);
|
|
7417
7416
|
}
|
|
7418
7417
|
function It() {
|
|
7419
7418
|
return new DOMException("上传已取消", "AbortError");
|
|
7420
7419
|
}
|
|
7421
|
-
function Bt(
|
|
7422
|
-
if (
|
|
7420
|
+
function Bt(Q) {
|
|
7421
|
+
if (Q != null && Q.aborted)
|
|
7423
7422
|
throw It();
|
|
7424
7423
|
}
|
|
7425
|
-
function nn(
|
|
7426
|
-
return
|
|
7424
|
+
function nn(Q) {
|
|
7425
|
+
return Q instanceof Error ? Q : new Error("上传失败");
|
|
7427
7426
|
}
|
|
7428
|
-
function on(
|
|
7427
|
+
function on(Q, Pe = Yt()) {
|
|
7429
7428
|
async function _(J) {
|
|
7430
7429
|
var E;
|
|
7431
7430
|
try {
|
|
7432
7431
|
Bt(J.signal);
|
|
7433
|
-
const U = Qt(J.file), A = await
|
|
7432
|
+
const U = Qt(J.file), A = await Q.ones.files.getKeyAndCredentials.post({
|
|
7434
7433
|
filename: J.file.name,
|
|
7435
7434
|
bucketId: J.bucketId,
|
|
7436
7435
|
size: J.file.size,
|
|
@@ -7458,7 +7457,7 @@ function on(W, Pe = Yt()) {
|
|
|
7458
7457
|
},
|
|
7459
7458
|
signal: J.signal
|
|
7460
7459
|
}), Bt(J.signal);
|
|
7461
|
-
const L = await
|
|
7460
|
+
const L = await Q.ones.files.create.post({
|
|
7462
7461
|
bucketId: J.bucketId,
|
|
7463
7462
|
filename: j.Key,
|
|
7464
7463
|
name: J.file.name,
|
|
@@ -7468,7 +7467,7 @@ function on(W, Pe = Yt()) {
|
|
|
7468
7467
|
}), N = tn(L.data);
|
|
7469
7468
|
if (L.error || !N)
|
|
7470
7469
|
throw Rt(L.error, "登记上传文件失败");
|
|
7471
|
-
const s = await
|
|
7470
|
+
const s = await Q.ones.files.update.post({
|
|
7472
7471
|
id: N,
|
|
7473
7472
|
status: "success"
|
|
7474
7473
|
});
|
|
@@ -7494,10 +7493,10 @@ function on(W, Pe = Yt()) {
|
|
|
7494
7493
|
}
|
|
7495
7494
|
const Ft = Symbol("huyooo-runtime");
|
|
7496
7495
|
let lt = null;
|
|
7497
|
-
function an(
|
|
7496
|
+
function an(Q) {
|
|
7498
7497
|
if (lt)
|
|
7499
7498
|
throw new Error("Huyooo UI Runtime 已初始化,不能重复创建");
|
|
7500
|
-
const Pe = Gt(
|
|
7499
|
+
const Pe = Gt(Q), _ = Kt(Pe), J = on(_), E = {
|
|
7501
7500
|
config: Pe,
|
|
7502
7501
|
api: _,
|
|
7503
7502
|
upload: J
|
|
@@ -7515,10 +7514,10 @@ function cn() {
|
|
|
7515
7514
|
return lt;
|
|
7516
7515
|
}
|
|
7517
7516
|
function ln() {
|
|
7518
|
-
const
|
|
7519
|
-
if (!
|
|
7517
|
+
const Q = Mt(Ft);
|
|
7518
|
+
if (!Q)
|
|
7520
7519
|
throw new Error("当前 Vue 应用未安装 createHuyoooUI(config)");
|
|
7521
|
-
return
|
|
7520
|
+
return Q;
|
|
7522
7521
|
}
|
|
7523
7522
|
export {
|
|
7524
7523
|
Ft as H,
|