@huyooo/ui 2.2.4 → 3.0.0

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.
Files changed (45) hide show
  1. package/dist/{AuthkitAppSetting-ZopA9Gjq.js → AuthkitAppSetting-DhLRYlL_.js} +97 -91
  2. package/dist/{Contact-BdBQ_FA4.js → Contact-CNLjyOCR.js} +3 -3
  3. package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-C7vaGD4R.js → FeedbackModal.vue_vue_type_script_setup_true_lang-BXqxUXuu.js} +2 -2
  4. package/dist/{LegalDocViewer-wbdoeWU9.js → LegalDocViewer-DkVW9tCh.js} +622 -625
  5. package/dist/{PaySubscriptions-OZ6OFeQJ.js → PaySubscriptions-tJSQUmhE.js} +1 -1
  6. package/dist/{PricingPlans-Wf4QkUIz.js → PricingPlans-BhcDv8uk.js} +3 -3
  7. package/dist/{ReferrerReferees-DNE-htF1.js → ReferrerReferees-QTZnOCJB.js} +1 -1
  8. package/dist/{Upload.vue_vue_type_script_setup_true_lang-DtciAodp.js → Upload.vue_vue_type_script_setup_true_lang-CZjNlns_.js} +1 -1
  9. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-ELHt9JGf.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BQgy_CeZ.js} +5 -5
  10. package/dist/WidthContainer-BEeYYOat.js +688 -0
  11. package/dist/authkit.js +8 -8
  12. package/dist/common/globalConfig.d.ts +5 -0
  13. package/dist/common.js +1 -1
  14. package/dist/components/SvgIcon.vue.d.ts +1 -1
  15. package/dist/composables/Authkit/oauthCallback.d.ts +1 -1
  16. package/dist/composables/Authkit/resolveRoutePermission.d.ts +10 -1
  17. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +2 -0
  18. package/dist/composables/Authkit/useAuthkitAuth.d.ts +14 -3
  19. package/dist/composables/Authkit/useRoutePermission.d.ts +12 -1
  20. package/dist/composables.d.ts +1 -0
  21. package/dist/composables.js +49 -44
  22. package/dist/feedback.js +1 -1
  23. package/dist/{fetchAuthPageAboutUs-D5w21LkF.js → fetchAuthPageAboutUs--dArFYk6.js} +2 -2
  24. package/dist/main.js +284 -279
  25. package/dist/pay.js +3 -3
  26. package/dist/privateCom.js +1 -1
  27. package/dist/referrer.js +1 -1
  28. package/dist/{runtime-B_xhJ3i8.js → runtime-CDEl4QQl.js} +129 -128
  29. package/dist/style.css +1 -1
  30. package/dist/types/api/auth.generated.d.ts +23 -0
  31. package/dist/types/app.d.ts +4 -0
  32. package/dist/upload.js +2 -2
  33. package/dist/{useAuthkitAppsAuthPageInfo-KHO1mJvF.js → useAuthkitAppsAuthPageInfo-mv7hOnhi.js} +1 -1
  34. package/dist/useAuthkitAuth-CO61XogP.js +295 -0
  35. package/dist/{useAuthkitUsersProfile-BvldvaRx.js → useAuthkitUsersProfile-CF7t2Y7T.js} +1 -1
  36. package/dist/{useEnsureAuthenticated-BdXJDqVv.js → useEnsureAuthenticated-Q7EHguY4.js} +1 -1
  37. package/dist/{useLegalDocs-BCWvu1ft.js → useLegalDocs-DUbab5R9.js} +2 -2
  38. package/dist/{usePageSEO-D7eyLr8d.js → usePageSEO-D8CocvOJ.js} +1 -1
  39. package/dist/useRoutePermission-Bvn-J8bp.js +249 -0
  40. package/dist/{useSubscriptionCheckout-BHI3y7Cx.js → useSubscriptionCheckout-Bic8vKgm.js} +1 -1
  41. package/dist/user.js +1 -1
  42. package/package.json +1 -1
  43. package/dist/WidthContainer-PjmYnZwk.js +0 -706
  44. package/dist/useAuthkitAuth-C0fVP17l.js +0 -273
  45. package/dist/useRoutePermission-BuKMkOTK.js +0 -247
@@ -2,15 +2,15 @@ import { ref as Nt, inject as Mt } from "vue";
2
2
  import { i as Kt } from "./apiClients-8_c5cDW5.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(G) {
6
6
  var Ee, _;
7
- return $ === "system" ? typeof window < "u" && ((_ = (Ee = window.matchMedia) == null ? void 0 : Ee.call(window, "(prefers-color-scheme: dark)")) != null && _.matches) ? "dark" : "light" : $;
7
+ return G === "system" ? typeof window < "u" && ((_ = (Ee = window.matchMedia) == null ? void 0 : Ee.call(window, "(prefers-color-scheme: dark)")) != null && _.matches) ? "dark" : "light" : G;
8
8
  }
9
- function Dt($) {
10
- typeof document > "u" || ($ === "dark" ? (document.body.setAttribute("arco-theme", "dark"), document.body.classList.add("dark")) : (document.body.removeAttribute("arco-theme"), document.body.classList.remove("dark")));
9
+ function Dt(G) {
10
+ typeof document > "u" || (G === "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 = $, Dt(Vt($));
12
+ function qt(G) {
13
+ zt.value = G, Dt(Vt(G));
14
14
  }
15
15
  const it = {
16
16
  avatarBucketId: "68350c206888f565dc7d09e9",
@@ -19,32 +19,33 @@ const it = {
19
19
  region: "ap-beijing",
20
20
  web3formsAccessKey: "72604aac-d55e-4df0-9bcf-31b2206b3753"
21
21
  };
22
- function Gt($) {
22
+ function Gt(G) {
23
23
  var Ee, _;
24
- if (!((Ee = $.clientKey) != null && Ee.trim()))
24
+ if (!((Ee = G.clientKey) != null && Ee.trim()))
25
25
  throw new Error("createHuyoooUI: clientKey 必填(web / desktop / ios / android)");
26
- if (!((_ = $.platform) != null && _.trim()))
26
+ if (!((_ = G.platform) != null && _.trim()))
27
27
  throw new Error("createHuyoooUI: platform 必填(browser / darwin / win32 / linux / ios / android)");
28
- return $.theme !== void 0 && qt($.theme), Object.freeze({
29
- appId: $.appId,
30
- clientKey: $.clientKey.trim(),
31
- platform: $.platform.trim(),
32
- appVersion: $.appVersion,
33
- authPrefixUrl: $.endpoints.auth,
34
- onesPrefixUrl: $.endpoints.ones,
35
- billingPrefixUrl: $.endpoints.billing,
36
- logPrefixUrl: $.endpoints.log,
37
- aiPrefixUrl: $.endpoints.ai,
38
- webhookPrefixUrl: $.endpoints.webhook,
39
- pricingUrl: $.pricingUrl || "/Pricing",
40
- openPricing: $.openPricing,
41
- avatarBucketId: $.avatarBucketId ?? it.avatarBucketId,
42
- feedbackBucketId: $.feedbackBucketId ?? it.feedbackBucketId,
43
- bucket: $.bucket ?? it.bucket,
44
- region: $.region ?? it.region,
45
- web3formsAccessKey: $.web3formsAccessKey ?? it.web3formsAccessKey,
46
- legalDocsMode: $.legalDocsMode ?? "builtin",
47
- getAccessToken: $.getAccessToken
28
+ return G.theme !== void 0 && qt(G.theme), Object.freeze({
29
+ appId: G.appId,
30
+ clientKey: G.clientKey.trim(),
31
+ platform: G.platform.trim(),
32
+ appVersion: G.appVersion,
33
+ authPrefixUrl: G.endpoints.auth,
34
+ onesPrefixUrl: G.endpoints.ones,
35
+ billingPrefixUrl: G.endpoints.billing,
36
+ logPrefixUrl: G.endpoints.log,
37
+ aiPrefixUrl: G.endpoints.ai,
38
+ webhookPrefixUrl: G.endpoints.webhook,
39
+ pricingUrl: G.pricingUrl || "/Pricing",
40
+ openPricing: G.openPricing,
41
+ accessDeniedUrl: G.accessDeniedUrl || "/",
42
+ avatarBucketId: G.avatarBucketId ?? it.avatarBucketId,
43
+ feedbackBucketId: G.feedbackBucketId ?? it.feedbackBucketId,
44
+ bucket: G.bucket ?? it.bucket,
45
+ region: G.region ?? it.region,
46
+ web3formsAccessKey: G.web3formsAccessKey ?? it.web3formsAccessKey,
47
+ legalDocsMode: G.legalDocsMode ?? "builtin",
48
+ getAccessToken: G.getAccessToken
48
49
  });
49
50
  }
50
51
  const $t = {
@@ -173,18 +174,18 @@ const $t = {
173
174
  log: "text/plain",
174
175
  plist: "application/x-plist"
175
176
  };
176
- function Wt($, Ee) {
177
+ function Wt(G, Ee) {
177
178
  var J;
178
- const _ = (J = $.split(".").pop()) == null ? void 0 : J.toLowerCase();
179
+ const _ = (J = G.split(".").pop()) == null ? void 0 : J.toLowerCase();
179
180
  return _ && $t[_] || "application/octet-stream";
180
181
  }
181
- function Qt($) {
182
- return $.type && $.type !== "application/octet-stream" && $.type !== "" ? $.type : Wt($.name);
182
+ function Qt(G) {
183
+ return G.type && G.type !== "application/octet-stream" && G.type !== "" ? G.type : Wt(G.name);
183
184
  }
184
185
  var wt = { exports: {} };
185
- (function($, Ee) {
186
+ (function(G, Ee) {
186
187
  (function(J, E) {
187
- $.exports = E();
188
+ G.exports = E();
188
189
  })(_t, function() {
189
190
  return (
190
191
  /******/
@@ -2370,15 +2371,15 @@ var wt = { exports: {} };
2370
2371
  msg: "[key=".concat(i.Key, "] 分块上传失败: ").concat(JSON.stringify(ee))
2371
2372
  }), o(ee);
2372
2373
  }), r.on("upload_complete", function(ee) {
2373
- var G = N.extend({
2374
+ var $ = N.extend({
2374
2375
  UploadId: i.UploadData.UploadId || ""
2375
2376
  }, ee);
2376
- o(null, G);
2377
+ o(null, $);
2377
2378
  }), r.on("upload_slice_complete", function(ee) {
2378
- var G = {};
2379
+ var $ = {};
2379
2380
  N.each(i.Headers, function(te, de) {
2380
2381
  var fe = de.toLowerCase();
2381
- (fe.indexOf("x-cos-meta-") === 0 || ["pic-operations", "x-cos-callback", "x-cos-callback-var", "x-cos-return-body"].includes(fe)) && (G[de] = te);
2382
+ (fe.indexOf("x-cos-meta-") === 0 || ["pic-operations", "x-cos-callback", "x-cos-callback-var", "x-cos-return-body"].includes(fe)) && ($[de] = te);
2382
2383
  }), t.logger.info({
2383
2384
  cate: "PROCESS",
2384
2385
  tag: "upload",
@@ -2389,7 +2390,7 @@ var wt = { exports: {} };
2389
2390
  Key: m,
2390
2391
  UploadId: ee.UploadId,
2391
2392
  SliceList: ee.SliceList,
2392
- Headers: G,
2393
+ Headers: $,
2393
2394
  tracker: se
2394
2395
  }, function(te, de) {
2395
2396
  if (t._isRunningTask(a)) {
@@ -2410,8 +2411,8 @@ var wt = { exports: {} };
2410
2411
  }
2411
2412
  });
2412
2413
  }), r.on("get_upload_data_finish", function(ee) {
2413
- var G = A.getFileId(M, i.ChunkSize, y, m);
2414
- G && A.saveUploadId.call(t, G, ee.UploadId, t.options.UploadIdCacheLimit), A.setUsing(ee.UploadId), ke(null, !0), t.logger.info({
2414
+ var $ = A.getFileId(M, i.ChunkSize, y, m);
2415
+ $ && A.saveUploadId.call(t, $, ee.UploadId, t.options.UploadIdCacheLimit), A.setUsing(ee.UploadId), ke(null, !0), t.logger.info({
2415
2416
  cate: "PROCESS",
2416
2417
  tag: "upload",
2417
2418
  msg: "[key=".concat(i.Key, "] 开始上传各个分块")
@@ -2469,9 +2470,9 @@ var wt = { exports: {} };
2469
2470
  cate: "PROCESS",
2470
2471
  tag: "upload",
2471
2472
  msg: "[key=".concat(i.Key, "] 去获取 uploadId")
2472
- }), d.call(t, ee, function(G, te) {
2473
+ }), d.call(t, ee, function($, te) {
2473
2474
  if (t._isRunningTask(a)) {
2474
- if (G) return r.emit("error", G);
2475
+ if ($) return r.emit("error", $);
2475
2476
  i.UploadData.UploadId = te.UploadId, i.UploadData.PartList = te.PartList, t.logger.info({
2476
2477
  cate: "PROCESS",
2477
2478
  tag: "upload",
@@ -2480,12 +2481,12 @@ var wt = { exports: {} };
2480
2481
  }
2481
2482
  });
2482
2483
  }
2483
- }), oe = i.ContentLength, delete i.ContentLength, !i.Headers && (i.Headers = {}), N.each(i.Headers, function(ee, G) {
2484
- G.toLowerCase() === "content-length" && delete i.Headers[G];
2484
+ }), oe = i.ContentLength, delete i.ContentLength, !i.Headers && (i.Headers = {}), N.each(i.Headers, function(ee, $) {
2485
+ $.toLowerCase() === "content-length" && delete i.Headers[$];
2485
2486
  }), function() {
2486
- for (var ee = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 5120], G = 1024 * 1024, te = 0; te < ee.length && (G = ee[te] * 1024 * 1024, !(oe / G <= t.options.MaxPartNumber)); te++)
2487
+ for (var ee = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 5120], $ = 1024 * 1024, te = 0; te < ee.length && ($ = ee[te] * 1024 * 1024, !(oe / $ <= t.options.MaxPartNumber)); te++)
2487
2488
  ;
2488
- i.ChunkSize = i.SliceSize = K = Math.max(K, G);
2489
+ i.ChunkSize = i.SliceSize = K = Math.max(K, $);
2489
2490
  }(), oe === 0 ? (i.Body = "", i.ContentLength = 0, i.SkipTask = !0, t.logger.info({
2490
2491
  cate: "PROCESS",
2491
2492
  tag: "upload",
@@ -2493,40 +2494,40 @@ var wt = { exports: {} };
2493
2494
  }), t.putObject(i, o)) : r.emit("get_file_size_finish");
2494
2495
  }
2495
2496
  function d(i, o) {
2496
- var t = i.TaskId, r = i.Bucket, a = i.Region, y = i.Key, I = i.StorageClass, m = this, M = {}, K = i.FileSize, Z = i.SliceSize, X = Math.ceil(K / Z), ne = 0, oe = N.throttleOnProgress.call(m, K, i.onHashProgress), ke = function(G, te) {
2497
- var de = Z * (G - 1), fe = Math.min(de + Z, K), re = fe - de;
2498
- M[G] ? te(null, {
2499
- PartNumber: G,
2500
- ETag: M[G],
2497
+ var t = i.TaskId, r = i.Bucket, a = i.Region, y = i.Key, I = i.StorageClass, m = this, M = {}, K = i.FileSize, Z = i.SliceSize, X = Math.ceil(K / Z), ne = 0, oe = N.throttleOnProgress.call(m, K, i.onHashProgress), ke = function($, te) {
2498
+ var de = Z * ($ - 1), fe = Math.min(de + Z, K), re = fe - de;
2499
+ M[$] ? te(null, {
2500
+ PartNumber: $,
2501
+ ETag: M[$],
2501
2502
  Size: re
2502
2503
  }) : N.fileSlice(i.Body, de, fe, !1, function(ae) {
2503
2504
  N.getFileMd5(ae, function(he, pe) {
2504
2505
  if (he) return te(N.error(he));
2505
2506
  var ve = '"' + pe + '"';
2506
- M[G] = ve, ne += re, oe({
2507
+ M[$] = ve, ne += re, oe({
2507
2508
  loaded: ne,
2508
2509
  total: K
2509
2510
  }), te(null, {
2510
- PartNumber: G,
2511
+ PartNumber: $,
2511
2512
  ETag: ve,
2512
2513
  Size: re
2513
2514
  });
2514
2515
  });
2515
2516
  });
2516
- }, le = function(G, te) {
2517
- var de = G.length;
2517
+ }, le = function($, te) {
2518
+ var de = $.length;
2518
2519
  if (de === 0)
2519
2520
  return te(null, !0);
2520
2521
  if (de > X)
2521
2522
  return te(null, !1);
2522
2523
  if (de > 1) {
2523
- var fe = Math.max(G[0].Size, G[1].Size);
2524
+ var fe = Math.max($[0].Size, $[1].Size);
2524
2525
  if (fe !== Z)
2525
2526
  return te(null, !1);
2526
2527
  }
2527
2528
  var re = function(he) {
2528
2529
  if (he < de) {
2529
- var pe = G[he];
2530
+ var pe = $[he];
2530
2531
  ke(pe.PartNumber, function(ve, Ae) {
2531
2532
  Ae && Ae.ETag === pe.ETag && Ae.Size === pe.Size ? re(he + 1) : te(null, !1);
2532
2533
  });
@@ -2539,12 +2540,12 @@ var wt = { exports: {} };
2539
2540
  if (m._isRunningTask(t))
2540
2541
  return o(ee);
2541
2542
  }), se.on("upload_id_available", function(ee) {
2542
- var G = {}, te = [];
2543
+ var $ = {}, te = [];
2543
2544
  N.each(ee.PartList, function(re) {
2544
- G[re.PartNumber] = re;
2545
+ $[re.PartNumber] = re;
2545
2546
  });
2546
2547
  for (var de = 1; de <= X; de++) {
2547
- var fe = G[de];
2548
+ var fe = $[de];
2548
2549
  fe ? (fe.PartNumber = de, fe.Uploaded = !0) : fe = {
2549
2550
  PartNumber: de,
2550
2551
  ETag: null,
@@ -2563,8 +2564,8 @@ var wt = { exports: {} };
2563
2564
  Body: i.Body,
2564
2565
  calledBySdk: "sliceUploadFile",
2565
2566
  tracker: i.tracker
2566
- }, i), G = N.clone(i.Headers);
2567
- delete G["x-cos-mime-limit"], ee.Headers = G, m.logger.info({
2567
+ }, i), $ = N.clone(i.Headers);
2568
+ delete $["x-cos-mime-limit"], ee.Headers = $, m.logger.info({
2568
2569
  cate: "PROCESS",
2569
2570
  tag: "upload",
2570
2571
  msg: "[key=".concat(i.Key, "] 准备初始化分块上传")
@@ -2591,9 +2592,9 @@ var wt = { exports: {} };
2591
2592
  });
2592
2593
  }
2593
2594
  }), se.on("has_and_check_upload_id", function(ee) {
2594
- ee = ee.reverse(), j.eachLimit(ee, 1, function(G, te) {
2595
+ ee = ee.reverse(), j.eachLimit(ee, 1, function($, te) {
2595
2596
  if (m._isRunningTask(t)) {
2596
- if (A.using[G]) {
2597
+ if (A.using[$]) {
2597
2598
  te();
2598
2599
  return;
2599
2600
  }
@@ -2601,12 +2602,12 @@ var wt = { exports: {} };
2601
2602
  Bucket: r,
2602
2603
  Region: a,
2603
2604
  Key: y,
2604
- UploadId: G,
2605
+ UploadId: $,
2605
2606
  tracker: i.tracker
2606
2607
  }, function(de, fe) {
2607
2608
  if (m._isRunningTask(t)) {
2608
2609
  if (de)
2609
- return A.removeUsing(G), se.emit("error", de);
2610
+ return A.removeUsing($), se.emit("error", de);
2610
2611
  var re = fe.PartList;
2611
2612
  re.forEach(function(ae) {
2612
2613
  ae.PartNumber *= 1, ae.Size *= 1, ae.ETag = ae.ETag || "";
@@ -2614,7 +2615,7 @@ var wt = { exports: {} };
2614
2615
  if (m._isRunningTask(t)) {
2615
2616
  if (ae) return se.emit("error", ae);
2616
2617
  he ? te({
2617
- UploadId: G,
2618
+ UploadId: $,
2618
2619
  PartList: re
2619
2620
  }) : te();
2620
2621
  }
@@ -2622,12 +2623,12 @@ var wt = { exports: {} };
2622
2623
  }
2623
2624
  });
2624
2625
  }
2625
- }, function(G) {
2626
- m._isRunningTask(t) && (oe(null, !0), G && G.UploadId ? se.emit("upload_id_available", G) : se.emit("no_available_upload_id"));
2626
+ }, function($) {
2627
+ m._isRunningTask(t) && (oe(null, !0), $ && $.UploadId ? se.emit("upload_id_available", $) : se.emit("no_available_upload_id"));
2627
2628
  });
2628
2629
  }), se.on("seek_local_avail_upload_id", function(ee) {
2629
- var G = A.getFileId(i.Body, i.ChunkSize, r, y), te = A.getUploadIdList.call(m, G);
2630
- if (!G || !te) {
2630
+ var $ = A.getFileId(i.Body, i.ChunkSize, r, y), te = A.getUploadIdList.call(m, $);
2631
+ if (!$ || !te) {
2631
2632
  se.emit("has_and_check_upload_id", ee);
2632
2633
  return;
2633
2634
  }
@@ -2665,10 +2666,10 @@ var wt = { exports: {} };
2665
2666
  Region: a,
2666
2667
  Key: y,
2667
2668
  tracker: i.tracker
2668
- }, function(ee, G) {
2669
+ }, function(ee, $) {
2669
2670
  if (m._isRunningTask(t)) {
2670
2671
  if (ee) return se.emit("error", ee);
2671
- var te = N.filter(G.UploadList, function(re) {
2672
+ var te = N.filter($.UploadList, function(re) {
2672
2673
  return re.Key === y && (!I || re.StorageClass.toUpperCase() === I.toUpperCase());
2673
2674
  }).reverse().map(function(re) {
2674
2675
  return re.UploadId || re.UploadID;
@@ -2721,16 +2722,16 @@ var wt = { exports: {} };
2721
2722
  y();
2722
2723
  }
2723
2724
  function v(i, o) {
2724
- var t = this, r = i.TaskId, a = i.Bucket, y = i.Region, I = i.Key, m = i.UploadData, M = i.FileSize, K = i.SliceSize, Z = Math.min(i.AsyncLimit || t.options.ChunkParallelLimit || 1, 256), X = i.Body, ne = Math.ceil(M / K), oe = 0, ke = i.ServerSideEncryption, le = i.Headers, se = N.filter(m.PartList, function(G) {
2725
- return G.Uploaded && (oe += G.PartNumber >= ne && M % K || K), !G.Uploaded;
2725
+ var t = this, r = i.TaskId, a = i.Bucket, y = i.Region, I = i.Key, m = i.UploadData, M = i.FileSize, K = i.SliceSize, Z = Math.min(i.AsyncLimit || t.options.ChunkParallelLimit || 1, 256), X = i.Body, ne = Math.ceil(M / K), oe = 0, ke = i.ServerSideEncryption, le = i.Headers, se = N.filter(m.PartList, function($) {
2726
+ return $.Uploaded && (oe += $.PartNumber >= ne && M % K || K), !$.Uploaded;
2726
2727
  }), ee = i.onProgress;
2727
2728
  t.logger.info({
2728
2729
  cate: "PROCESS",
2729
2730
  tag: "upload",
2730
2731
  msg: "[key=".concat(i.Key, "] 开始并发上传各个分块")
2731
- }), j.eachLimit(se, Z, function(G, te) {
2732
+ }), j.eachLimit(se, Z, function($, te) {
2732
2733
  if (t._isRunningTask(r)) {
2733
- var de = G.PartNumber, fe = Math.min(M, G.PartNumber * K) - (G.PartNumber - 1) * K, re = 0;
2734
+ var de = $.PartNumber, fe = Math.min(M, $.PartNumber * K) - ($.PartNumber - 1) * K, re = 0;
2734
2735
  t.logger.info({
2735
2736
  cate: "PROCESS",
2736
2737
  tag: "upload",
@@ -2763,7 +2764,7 @@ var wt = { exports: {} };
2763
2764
  cate: "RESULT",
2764
2765
  tag: "upload",
2765
2766
  msg: "[key=".concat(i.Key, "] 分块").concat(de, "上传失败")
2766
- })) : (oe += fe - re, G.ETag = he.ETag), t.logger.info({
2767
+ })) : (oe += fe - re, $.ETag = he.ETag), t.logger.info({
2767
2768
  cate: "RESULT",
2768
2769
  tag: "upload",
2769
2770
  msg: "[key=".concat(i.Key, "] 分块").concat(de, "上传成功")
@@ -2773,9 +2774,9 @@ var wt = { exports: {} };
2773
2774
  }), te(ae || null, he));
2774
2775
  });
2775
2776
  }
2776
- }, function(G) {
2777
+ }, function($) {
2777
2778
  if (t._isRunningTask(r)) {
2778
- if (G) return o(G);
2779
+ if ($) return o($);
2779
2780
  o(null, {
2780
2781
  UploadId: m.UploadId,
2781
2782
  SliceList: m.PartList
@@ -2786,9 +2787,9 @@ var wt = { exports: {} };
2786
2787
  function T(i, o) {
2787
2788
  var t = this, r = i.TaskId, a = i.Bucket, y = i.Region, I = i.Key, m = i.FileSize, M = i.Body, K = i.PartNumber * 1, Z = i.SliceSize, X = i.ServerSideEncryption, ne = i.UploadData, oe = i.Headers || {}, ke = t.options.ChunkRetryTimes + 1, le = Z * (K - 1), se = Z, ee = le + Z;
2788
2789
  ee > m && (ee = m, se = ee - le);
2789
- var G = ["x-cos-traffic-limit", "x-cos-mime-limit"], te = {};
2790
+ var $ = ["x-cos-traffic-limit", "x-cos-mime-limit"], te = {};
2790
2791
  N.each(oe, function(fe, re) {
2791
- G.indexOf(re) > -1 && (te[re] = fe);
2792
+ $.indexOf(re) > -1 && (te[re] = fe);
2792
2793
  });
2793
2794
  var de = ne.PartList[K - 1];
2794
2795
  j.retry(ke, function(fe) {
@@ -2979,14 +2980,14 @@ var wt = { exports: {} };
2979
2980
  TaskId: ""
2980
2981
  };
2981
2982
  if (!t.options.UseRawKey && ne.Key && ne.Key.substr(0, 1) === "/" && (ne.Key = ne.Key.substr(1)), a += le, t.options.EnableReporter) {
2982
- var ee = t.options.UseAccelerate || typeof t.options.Domain == "string" && t.options.Domain.includes("accelerate."), G = le > r ? "sliceUploadFile" : "putObject";
2983
+ var ee = t.options.UseAccelerate || typeof t.options.Domain == "string" && t.options.Domain.includes("accelerate."), $ = le > r ? "sliceUploadFile" : "putObject";
2983
2984
  ne.tracker = new s({
2984
2985
  Beacon: t.options.BeaconReporter,
2985
2986
  clsReporter: t.options.ClsReporter,
2986
2987
  bucket: ne.Bucket,
2987
2988
  region: ne.Region,
2988
2989
  apiName: "uploadFiles",
2989
- realApi: G,
2990
+ realApi: $,
2990
2991
  fileKey: ne.Key,
2991
2992
  fileSize: le,
2992
2993
  accelerate: ee,
@@ -3028,7 +3029,7 @@ var wt = { exports: {} };
3028
3029
  }
3029
3030
  var K = M.Bucket, Z = M.Region, X = decodeURIComponent(M.Key), ne = i.CopySliceSize === void 0 ? r.options.CopySliceSize : i.CopySliceSize;
3030
3031
  ne = Math.max(0, ne);
3031
- var oe = i.CopyChunkSize || this.options.CopyChunkSize, ke = this.options.CopyChunkParallelLimit, le = this.options.ChunkRetryTimes + 1, se = 0, ee = 0, G, te, de = {}, fe = {}, re = {};
3032
+ var oe = i.CopyChunkSize || this.options.CopyChunkSize, ke = this.options.CopyChunkParallelLimit, le = this.options.ChunkRetryTimes + 1, se = 0, ee = 0, $, te, de = {}, fe = {}, re = {};
3032
3033
  t.on("copy_slice_complete", function(ae) {
3033
3034
  N.each(i.Headers, function(pe, ve) {
3034
3035
  ve.toLowerCase().indexOf("x-cos-meta-");
@@ -3053,15 +3054,15 @@ var wt = { exports: {} };
3053
3054
  if (A.removeUsing(ae.UploadId), pe)
3054
3055
  return te(null, !0), o(pe);
3055
3056
  A.removeUploadId(ae.UploadId), te({
3056
- loaded: G,
3057
- total: G
3057
+ loaded: $,
3058
+ total: $
3058
3059
  }, !0), o(null, ve);
3059
3060
  });
3060
3061
  }), t.on("get_copy_data_finish", function(ae) {
3061
3062
  var he = A.getCopyFileId(m, de, oe, a, I);
3062
3063
  he && A.saveUploadId(he, ae.UploadId, r.options.UploadIdCacheLimit), A.setUsing(ae.UploadId);
3063
3064
  var pe = N.filter(ae.PartList, function(ve) {
3064
- return ve.Uploaded && (ee += ve.PartNumber >= se && G % oe || oe), !ve.Uploaded;
3065
+ return ve.Uploaded && (ee += ve.PartNumber >= se && $ % oe || oe), !ve.Uploaded;
3065
3066
  });
3066
3067
  j.eachLimit(pe, ke, function(ve, Ae) {
3067
3068
  var xe = ve.PartNumber, Ie = ve.CopySourceRange, Ge = ve.end - ve.start;
@@ -3081,7 +3082,7 @@ var wt = { exports: {} };
3081
3082
  if (_e) return Ae(_e);
3082
3083
  ee += Ge, te({
3083
3084
  loaded: ee,
3084
- total: G
3085
+ total: $
3085
3086
  }), ve.ETag = We.ETag, Ae(_e || null, We);
3086
3087
  });
3087
3088
  }, function(ve) {
@@ -3140,11 +3141,11 @@ var wt = { exports: {} };
3140
3141
  ve(0);
3141
3142
  }), t.on("get_file_size_finish", function() {
3142
3143
  if (function() {
3143
- for (var he = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 5120], pe = 1024 * 1024, ve = 0; ve < he.length && (pe = he[ve] * 1024 * 1024, !(G / pe <= r.options.MaxPartNumber)); ve++)
3144
+ for (var he = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 5120], pe = 1024 * 1024, ve = 0; ve < he.length && (pe = he[ve] * 1024 * 1024, !($ / pe <= r.options.MaxPartNumber)); ve++)
3144
3145
  ;
3145
- i.ChunkSize = oe = Math.max(oe, pe), se = Math.ceil(G / oe);
3146
+ i.ChunkSize = oe = Math.max(oe, pe), se = Math.ceil($ / oe);
3146
3147
  for (var Ae = [], xe = 1; xe <= se; xe++) {
3147
- var Ie = (xe - 1) * oe, Ge = xe * oe < G ? xe * oe - 1 : G - 1, _e = {
3148
+ var Ie = (xe - 1) * oe, Ge = xe * oe < $ ? xe * oe - 1 : $ - 1, _e = {
3148
3149
  PartNumber: xe,
3149
3150
  start: Ie,
3150
3151
  end: Ge,
@@ -3174,21 +3175,21 @@ var wt = { exports: {} };
3174
3175
  })) : o(ae);
3175
3176
  return;
3176
3177
  }
3177
- if (G = i.FileSize = he.headers["content-length"], G === void 0 || !G) {
3178
+ if ($ = i.FileSize = he.headers["content-length"], $ === void 0 || !$) {
3178
3179
  o(N.error(new Error('get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.( 获取Content-Length失败,请在CORS ExposeHeader设置中添加Content-Length,请参考文档:https://cloud.tencent.com/document/product/436/13318 )')));
3179
3180
  return;
3180
3181
  }
3181
3182
  if (i.tracker && i.tracker.setParams({
3182
- httpSize: G
3183
- }), te = N.throttleOnProgress.call(r, G, i.onProgress), G <= ne)
3183
+ httpSize: $
3184
+ }), te = N.throttleOnProgress.call(r, $, i.onProgress), $ <= ne)
3184
3185
  i.Headers["x-cos-metadata-directive"] || (i.Headers["x-cos-metadata-directive"] = "Copy"), r.putObjectCopy(Object.assign(i, {
3185
3186
  calledBySdk: "sliceCopyFile"
3186
3187
  }), function(ve, Ae) {
3187
3188
  if (ve)
3188
3189
  return te(null, !0), o(ve);
3189
3190
  te({
3190
- loaded: G,
3191
- total: G
3191
+ loaded: $,
3192
+ total: $
3192
3193
  }, !0), o(ve, Ae);
3193
3194
  });
3194
3195
  else {
@@ -4176,7 +4177,7 @@ var wt = { exports: {} };
4176
4177
  });
4177
4178
  });
4178
4179
  }
4179
- function G(e, c) {
4180
+ function $(e, c) {
4180
4181
  Y.call(this, {
4181
4182
  Action: "name/cos:DeleteBucketDomain",
4182
4183
  method: "DELETE",
@@ -5950,7 +5951,7 @@ var wt = { exports: {} };
5950
5951
  putBucketDomain: se,
5951
5952
  // BucketDomain
5952
5953
  getBucketDomain: ee,
5953
- deleteBucketDomain: G,
5954
+ deleteBucketDomain: $,
5954
5955
  putBucketOrigin: te,
5955
5956
  // BucketOrigin
5956
5957
  getBucketOrigin: de,
@@ -6665,8 +6666,8 @@ var wt = { exports: {} };
6665
6666
  value: function(i, o) {
6666
6667
  var t, r, a, y, I, m, M = (/* @__PURE__ */ new Date()).getTime(), K = d.getNetType(), Z = i ? (i == null ? void 0 : i.code) || (i == null || (t = i.error) === null || t === void 0 ? void 0 : t.code) || (i == null || (r = i.error) === null || r === void 0 ? void 0 : r.Code) : "", X = i ? (i == null ? void 0 : i.message) || (i == null || (a = i.error) === null || a === void 0 ? void 0 : a.message) || (i == null || (y = i.error) === null || y === void 0 ? void 0 : y.Message) : "", ne = X, oe = i ? (i == null ? void 0 : i.resource) || (i == null || (I = i.error) === null || I === void 0 ? void 0 : I.resource) || (i == null || (m = i.error) === null || m === void 0 ? void 0 : m.Resource) : "", ke = i ? i == null ? void 0 : i.statusCode : o.statusCode, le = i ? (i == null ? void 0 : i.headers) && (i == null ? void 0 : i.headers["x-cos-request-id"]) : (o == null ? void 0 : o.headers) && (o == null ? void 0 : o.headers["x-cos-request-id"]), se = i ? le ? "Server" : "Client" : "";
6667
6668
  this.params.requestName === "getObject" && (this.params.httpSize = o ? o.headers && o.headers["content-length"] : 0);
6668
- var ee = this.params.realApi === "sliceUploadFile", G = this.params.realApi === "sliceCopyFile";
6669
- if (ee || G) {
6669
+ var ee = this.params.realApi === "sliceUploadFile", $ = this.params.realApi === "sliceCopyFile";
6670
+ if (ee || $) {
6670
6671
  var te = this.params.httpSize / 1024 / this.params.partTime;
6671
6672
  Object.assign(this.params, {
6672
6673
  httpSpeed: te < 0 ? 0 : te.toFixed(3)
@@ -7024,7 +7025,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7024
7025
  function ee(V, R, P) {
7025
7026
  return V && R in V ? V[R] : P;
7026
7027
  }
7027
- function G(V, R) {
7028
+ function $(V, R) {
7028
7029
  return ae(R, function(P, O) {
7029
7030
  V[O] = R[O];
7030
7031
  }), V;
@@ -7084,7 +7085,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7084
7085
  }
7085
7086
  return !1;
7086
7087
  }, Ie = function(R, P) {
7087
- if (P = G({}, P), R !== "getAuth" && R !== "getV4Auth" && R !== "getObjectUrl") {
7088
+ if (P = $({}, P), R !== "getAuth" && R !== "getV4Auth" && R !== "getObjectUrl") {
7088
7089
  var O = P.Headers || {};
7089
7090
  if (P && A(P) === "object") {
7090
7091
  (function() {
@@ -7261,7 +7262,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7261
7262
  return Date.now() + (R || 0);
7262
7263
  }, He = function(R, P) {
7263
7264
  var O = R;
7264
- return R.message = R.message || null, typeof P == "string" ? (R.error = P, R.message = P) : A(P) === "object" && P !== null && (G(R, P), (P.code || P.name) && (R.code = P.code || P.name), P.message && (R.message = P.message), P.stack && (R.stack = P.stack)), typeof Object.defineProperty == "function" && (Object.defineProperty(R, "name", {
7265
+ return R.message = R.message || null, typeof P == "string" ? (R.error = P, R.message = P) : A(P) === "object" && P !== null && ($(R, P), (P.code || P.name) && (R.code = P.code || P.name), P.message && (R.message = P.message), P.stack && (R.stack = P.stack)), typeof Object.defineProperty == "function" && (Object.defineProperty(R, "name", {
7265
7266
  writable: !0,
7266
7267
  enumerable: !1
7267
7268
  }), Object.defineProperty(R, "message", {
@@ -7328,7 +7329,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7328
7329
  getBodyMd5: oe,
7329
7330
  getFileMd5: le,
7330
7331
  b64: ve,
7331
- extend: G,
7332
+ extend: $,
7332
7333
  isArray: te,
7333
7334
  isInArray: fe,
7334
7335
  makeArray: re,
@@ -7372,7 +7373,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7372
7373
  var Jt = wt.exports;
7373
7374
  const Xt = /* @__PURE__ */ Ht(Jt), Zt = 5 * 1024 * 1024;
7374
7375
  function Yt() {
7375
- async function $(Ee) {
7376
+ async function G(Ee) {
7376
7377
  var A, j;
7377
7378
  let _ = null;
7378
7379
  const J = () => {
@@ -7410,34 +7411,34 @@ function Yt() {
7410
7411
  }
7411
7412
  }
7412
7413
  return {
7413
- upload: $
7414
+ upload: G
7414
7415
  };
7415
7416
  }
7416
- function en($) {
7417
- return !!$ && typeof $ == "object" && "Key" in $ && typeof $.Key == "string" && "Bucket" in $ && typeof $.Bucket == "string" && "Region" in $ && typeof $.Region == "string" && "TmpSecretId" in $ && typeof $.TmpSecretId == "string" && "TmpSecretKey" in $ && typeof $.TmpSecretKey == "string" && "SessionToken" in $ && typeof $.SessionToken == "string" && "StartTime" in $ && typeof $.StartTime == "number" && "ExpiredTime" in $ && typeof $.ExpiredTime == "number";
7417
+ function en(G) {
7418
+ return !!G && typeof G == "object" && "Key" in G && typeof G.Key == "string" && "Bucket" in G && typeof G.Bucket == "string" && "Region" in G && typeof G.Region == "string" && "TmpSecretId" in G && typeof G.TmpSecretId == "string" && "TmpSecretKey" in G && typeof G.TmpSecretKey == "string" && "SessionToken" in G && typeof G.SessionToken == "string" && "StartTime" in G && typeof G.StartTime == "number" && "ExpiredTime" in G && typeof G.ExpiredTime == "number";
7418
7419
  }
7419
- function tn($) {
7420
- return $ && typeof $ == "object" && "id" in $ ? String($.id) : "";
7420
+ function tn(G) {
7421
+ return G && typeof G == "object" && "id" in G ? String(G.id) : "";
7421
7422
  }
7422
- function Rt($, Ee) {
7423
- return $ && typeof $ == "object" && "message" in $ && typeof $.message == "string" ? new Error($.message) : new Error(Ee);
7423
+ function Rt(G, Ee) {
7424
+ return G && typeof G == "object" && "message" in G && typeof G.message == "string" ? new Error(G.message) : new Error(Ee);
7424
7425
  }
7425
7426
  function It() {
7426
7427
  return new DOMException("上传已取消", "AbortError");
7427
7428
  }
7428
- function Bt($) {
7429
- if ($ != null && $.aborted)
7429
+ function Bt(G) {
7430
+ if (G != null && G.aborted)
7430
7431
  throw It();
7431
7432
  }
7432
- function nn($) {
7433
- return $ instanceof Error ? $ : new Error("上传失败");
7433
+ function nn(G) {
7434
+ return G instanceof Error ? G : new Error("上传失败");
7434
7435
  }
7435
- function on($, Ee = Yt()) {
7436
+ function on(G, Ee = Yt()) {
7436
7437
  async function _(J) {
7437
7438
  var E;
7438
7439
  try {
7439
7440
  Bt(J.signal);
7440
- const U = Qt(J.file), A = await $.ones.files.getKeyAndCredentials.post({
7441
+ const U = Qt(J.file), A = await G.ones.files.getKeyAndCredentials.post({
7441
7442
  filename: J.file.name,
7442
7443
  bucketId: J.bucketId,
7443
7444
  size: J.file.size,
@@ -7465,7 +7466,7 @@ function on($, Ee = Yt()) {
7465
7466
  },
7466
7467
  signal: J.signal
7467
7468
  }), Bt(J.signal);
7468
- const L = await $.ones.files.create.post({
7469
+ const L = await G.ones.files.create.post({
7469
7470
  bucketId: J.bucketId,
7470
7471
  filename: j.Key,
7471
7472
  name: J.file.name,
@@ -7475,7 +7476,7 @@ function on($, Ee = Yt()) {
7475
7476
  }), N = tn(L.data);
7476
7477
  if (L.error || !N)
7477
7478
  throw Rt(L.error, "登记上传文件失败");
7478
- const s = await $.ones.files.update.post({
7479
+ const s = await G.ones.files.update.post({
7479
7480
  id: N,
7480
7481
  status: "success"
7481
7482
  });
@@ -7501,10 +7502,10 @@ function on($, Ee = Yt()) {
7501
7502
  }
7502
7503
  const Ft = Symbol("huyooo-runtime");
7503
7504
  let lt = null;
7504
- function an($) {
7505
+ function an(G) {
7505
7506
  if (lt)
7506
7507
  throw new Error("Huyooo UI Runtime 已初始化,不能重复创建");
7507
- const Ee = Gt($), _ = Kt(Ee), J = on(_), E = {
7508
+ const Ee = Gt(G), _ = Kt(Ee), J = on(_), E = {
7508
7509
  config: Ee,
7509
7510
  api: _,
7510
7511
  upload: J
@@ -7522,10 +7523,10 @@ function cn() {
7522
7523
  return lt;
7523
7524
  }
7524
7525
  function ln() {
7525
- const $ = Mt(Ft);
7526
- if (!$)
7526
+ const G = Mt(Ft);
7527
+ if (!G)
7527
7528
  throw new Error("当前 Vue 应用未安装 createHuyoooUI(config)");
7528
- return $;
7529
+ return G;
7529
7530
  }
7530
7531
  export {
7531
7532
  Ft as H,