@das-fed/utils 6.3.0-beta.9 → 6.4.0-dev.2

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 (39) hide show
  1. package/api-services/modules/file/index.d.ts +1 -1
  2. package/api-services/modules/file/index.js +253 -244
  3. package/api-services/modules/file/index.js.gz +0 -0
  4. package/common-info/set-personal-info/index.js +591 -565
  5. package/common-info/set-personal-info/index.js.gz +0 -0
  6. package/common-tools/date-format/index.js +2 -1
  7. package/common-tools/get-url-params/index.d.ts +1 -1
  8. package/common-tools/get-url-params/index.js +49 -46
  9. package/common-tools/get-url-params/index.js.gz +0 -0
  10. package/common-tools/update-fav-icon/index.js +1 -1
  11. package/create-api-service/index.js +1405 -1371
  12. package/create-api-service/index.js.gz +0 -0
  13. package/create-api-service/sso/index.js +739 -714
  14. package/create-api-service/sso/index.js.gz +0 -0
  15. package/curring-http/index.js +856 -830
  16. package/curring-http/index.js.gz +0 -0
  17. package/directive/auth/index.d.ts +8 -0
  18. package/directive/auth/index.js +62 -0
  19. package/directive/auth/index.js.gz +0 -0
  20. package/directive/clickOutside/index.d.ts +6 -0
  21. package/directive/clickOutside/index.js +27 -0
  22. package/directive/hoverInside/index.d.ts +6 -0
  23. package/directive/hoverInside/index.js +21 -0
  24. package/directive/utils/index.d.ts +7 -0
  25. package/directive/utils/index.js +7 -0
  26. package/esm-map.json +135 -5
  27. package/hooks/popup-manager/use-zindex/index.d.ts +5 -0
  28. package/hooks/popup-manager/use-zindex/index.js +22 -0
  29. package/hooks/use-get-auth/apis.d.ts +4 -0
  30. package/hooks/use-get-auth/index.d.ts +9 -0
  31. package/hooks/use-get-auth/index.js +53 -0
  32. package/hooks/use-get-auth/index.js.gz +0 -0
  33. package/package.json +5 -3
  34. package/pinyin-first-character/index.js +142 -132
  35. package/pinyin-first-character/index.js.gz +0 -0
  36. package/style/index.js +1 -1
  37. package/style/index.js.gz +0 -0
  38. package/vue/hooks/use-model-value/index.d.ts +5 -0
  39. package/vue/hooks/use-model-value/index.js +10 -0
@@ -1,188 +1,188 @@
1
1
  import { iotMinio as G, iotProgress as te } from "@das-fed/utils/api-services/modules/iot";
2
- import { ref as C } from "vue";
2
+ import { ref as L } from "vue";
3
3
  import { getConfig as Q } from "@das-fed/utils/config";
4
- let re = (l = 21) => {
5
- let v = "", $ = crypto.getRandomValues(new Uint8Array(l));
4
+ let se = (l = 21) => {
5
+ let g = "", w = crypto.getRandomValues(new Uint8Array(l));
6
6
  for (; l--; ) {
7
- let c = $[l] & 63;
8
- c < 36 ? v += c.toString(36) : c < 62 ? v += (c - 26).toString(36).toUpperCase() : c < 63 ? v += "_" : v += "-";
7
+ let c = w[l] & 63;
8
+ c < 36 ? g += c.toString(36) : c < 62 ? g += (c - 26).toString(36).toUpperCase() : c < 63 ? g += "_" : g += "-";
9
9
  }
10
- return v;
10
+ return g;
11
11
  };
12
- var se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
12
+ var re = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
13
13
  function ne(l) {
14
14
  return l && l.__esModule && Object.prototype.hasOwnProperty.call(l, "default") ? l.default : l;
15
15
  }
16
16
  var ee = { exports: {} };
17
- (function(l, v) {
18
- (function($, c) {
17
+ (function(l, g) {
18
+ (function(w, c) {
19
19
  l.exports = c();
20
- })(se, function() {
21
- var $ = 1e3, c = 6e4, j = 36e5, M = "millisecond", T = "second", b = "minute", _ = "hour", y = "day", Y = "week", D = "month", R = "quarter", k = "year", P = "date", B = "Invalid Date", q = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Z = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, F = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t) {
22
- var r = ["th", "st", "nd", "rd"], e = t % 100;
23
- return "[" + t + (r[(e - 20) % 10] || r[e] || r[0]) + "]";
24
- } }, E = function(t, r, e) {
20
+ })(re, function() {
21
+ var w = 1e3, c = 6e4, j = 36e5, b = "millisecond", x = "second", D = "minute", _ = "hour", y = "day", Y = "week", S = "month", R = "quarter", k = "year", N = "date", B = "Invalid Date", q = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Z = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, F = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t) {
22
+ var s = ["th", "st", "nd", "rd"], e = t % 100;
23
+ return "[" + t + (s[(e - 20) % 10] || s[e] || s[0]) + "]";
24
+ } }, E = function(t, s, e) {
25
25
  var n = String(t);
26
- return !n || n.length >= r ? t : "" + Array(r + 1 - n.length).join(e) + t;
26
+ return !n || n.length >= s ? t : "" + Array(s + 1 - n.length).join(e) + t;
27
27
  }, z = { s: E, z: function(t) {
28
- var r = -t.utcOffset(), e = Math.abs(r), n = Math.floor(e / 60), s = e % 60;
29
- return (r <= 0 ? "+" : "-") + E(n, 2, "0") + ":" + E(s, 2, "0");
30
- }, m: function t(r, e) {
31
- if (r.date() < e.date()) return -t(e, r);
32
- var n = 12 * (e.year() - r.year()) + (e.month() - r.month()), s = r.clone().add(n, D), i = e - s < 0, u = r.clone().add(n + (i ? -1 : 1), D);
33
- return +(-(n + (e - s) / (i ? s - u : u - s)) || 0);
28
+ var s = -t.utcOffset(), e = Math.abs(s), n = Math.floor(e / 60), r = e % 60;
29
+ return (s <= 0 ? "+" : "-") + E(n, 2, "0") + ":" + E(r, 2, "0");
30
+ }, m: function t(s, e) {
31
+ if (s.date() < e.date()) return -t(e, s);
32
+ var n = 12 * (e.year() - s.year()) + (e.month() - s.month()), r = s.clone().add(n, S), i = e - r < 0, u = s.clone().add(n + (i ? -1 : 1), S);
33
+ return +(-(n + (e - r) / (i ? r - u : u - r)) || 0);
34
34
  }, a: function(t) {
35
35
  return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
36
36
  }, p: function(t) {
37
- return { M: D, y: k, w: Y, d: y, D: P, h: _, m: b, s: T, ms: M, Q: R }[t] || String(t || "").toLowerCase().replace(/s$/, "");
37
+ return { M: S, y: k, w: Y, d: y, D: N, h: _, m: D, s: x, ms: b, Q: R }[t] || String(t || "").toLowerCase().replace(/s$/, "");
38
38
  }, u: function(t) {
39
39
  return t === void 0;
40
- } }, I = "en", H = {};
41
- H[I] = F;
40
+ } }, P = "en", C = {};
41
+ C[P] = F;
42
42
  var W = "$isDayjsObject", J = function(t) {
43
- return t instanceof h || !(!t || !t[W]);
44
- }, f = function t(r, e, n) {
45
- var s;
46
- if (!r) return I;
47
- if (typeof r == "string") {
48
- var i = r.toLowerCase();
49
- H[i] && (s = i), e && (H[i] = e, s = i);
50
- var u = r.split("-");
51
- if (!s && u.length > 1) return t(u[0]);
43
+ return t instanceof m || !(!t || !t[W]);
44
+ }, f = function t(s, e, n) {
45
+ var r;
46
+ if (!s) return P;
47
+ if (typeof s == "string") {
48
+ var i = s.toLowerCase();
49
+ C[i] && (r = i), e && (C[i] = e, r = i);
50
+ var u = s.split("-");
51
+ if (!r && u.length > 1) return t(u[0]);
52
52
  } else {
53
- var d = r.name;
54
- H[d] = r, s = d;
53
+ var d = s.name;
54
+ C[d] = s, r = d;
55
55
  }
56
- return !n && s && (I = s), s || !n && I;
57
- }, a = function(t, r) {
56
+ return !n && r && (P = r), r || !n && P;
57
+ }, a = function(t, s) {
58
58
  if (J(t)) return t.clone();
59
- var e = typeof r == "object" ? r : {};
60
- return e.date = t, e.args = arguments, new h(e);
59
+ var e = typeof s == "object" ? s : {};
60
+ return e.date = t, e.args = arguments, new m(e);
61
61
  }, o = z;
62
- o.l = f, o.i = J, o.w = function(t, r) {
63
- return a(t, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
62
+ o.l = f, o.i = J, o.w = function(t, s) {
63
+ return a(t, { locale: s.$L, utc: s.$u, x: s.$x, $offset: s.$offset });
64
64
  };
65
- var h = function() {
65
+ var m = function() {
66
66
  function t(e) {
67
67
  this.$L = f(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[W] = !0;
68
68
  }
69
- var r = t.prototype;
70
- return r.parse = function(e) {
69
+ var s = t.prototype;
70
+ return s.parse = function(e) {
71
71
  this.$d = function(n) {
72
- var s = n.date, i = n.utc;
73
- if (s === null) return /* @__PURE__ */ new Date(NaN);
74
- if (o.u(s)) return /* @__PURE__ */ new Date();
75
- if (s instanceof Date) return new Date(s);
76
- if (typeof s == "string" && !/Z$/i.test(s)) {
77
- var u = s.match(q);
72
+ var r = n.date, i = n.utc;
73
+ if (r === null) return /* @__PURE__ */ new Date(NaN);
74
+ if (o.u(r)) return /* @__PURE__ */ new Date();
75
+ if (r instanceof Date) return new Date(r);
76
+ if (typeof r == "string" && !/Z$/i.test(r)) {
77
+ var u = r.match(q);
78
78
  if (u) {
79
- var d = u[2] - 1 || 0, p = (u[7] || "0").substring(0, 3);
80
- return i ? new Date(Date.UTC(u[1], d, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, p)) : new Date(u[1], d, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, p);
79
+ var d = u[2] - 1 || 0, h = (u[7] || "0").substring(0, 3);
80
+ return i ? new Date(Date.UTC(u[1], d, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, h)) : new Date(u[1], d, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, h);
81
81
  }
82
82
  }
83
- return new Date(s);
83
+ return new Date(r);
84
84
  }(e), this.init();
85
- }, r.init = function() {
85
+ }, s.init = function() {
86
86
  var e = this.$d;
87
87
  this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
88
- }, r.$utils = function() {
88
+ }, s.$utils = function() {
89
89
  return o;
90
- }, r.isValid = function() {
90
+ }, s.isValid = function() {
91
91
  return this.$d.toString() !== B;
92
- }, r.isSame = function(e, n) {
93
- var s = a(e);
94
- return this.startOf(n) <= s && s <= this.endOf(n);
95
- }, r.isAfter = function(e, n) {
92
+ }, s.isSame = function(e, n) {
93
+ var r = a(e);
94
+ return this.startOf(n) <= r && r <= this.endOf(n);
95
+ }, s.isAfter = function(e, n) {
96
96
  return a(e) < this.startOf(n);
97
- }, r.isBefore = function(e, n) {
97
+ }, s.isBefore = function(e, n) {
98
98
  return this.endOf(n) < a(e);
99
- }, r.$g = function(e, n, s) {
100
- return o.u(e) ? this[n] : this.set(s, e);
101
- }, r.unix = function() {
99
+ }, s.$g = function(e, n, r) {
100
+ return o.u(e) ? this[n] : this.set(r, e);
101
+ }, s.unix = function() {
102
102
  return Math.floor(this.valueOf() / 1e3);
103
- }, r.valueOf = function() {
103
+ }, s.valueOf = function() {
104
104
  return this.$d.getTime();
105
- }, r.startOf = function(e, n) {
106
- var s = this, i = !!o.u(n) || n, u = o.p(e), d = function(L, x) {
107
- var N = o.w(s.$u ? Date.UTC(s.$y, x, L) : new Date(s.$y, x, L), s);
108
- return i ? N : N.endOf(y);
109
- }, p = function(L, x) {
110
- return o.w(s.toDate()[L].apply(s.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(x)), s);
111
- }, m = this.$W, g = this.$M, w = this.$D, A = "set" + (this.$u ? "UTC" : "");
105
+ }, s.startOf = function(e, n) {
106
+ var r = this, i = !!o.u(n) || n, u = o.p(e), d = function(O, $) {
107
+ var I = o.w(r.$u ? Date.UTC(r.$y, $, O) : new Date(r.$y, $, O), r);
108
+ return i ? I : I.endOf(y);
109
+ }, h = function(O, $) {
110
+ return o.w(r.toDate()[O].apply(r.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($)), r);
111
+ }, v = this.$W, p = this.$M, M = this.$D, A = "set" + (this.$u ? "UTC" : "");
112
112
  switch (u) {
113
113
  case k:
114
114
  return i ? d(1, 0) : d(31, 11);
115
- case D:
116
- return i ? d(1, g) : d(0, g + 1);
115
+ case S:
116
+ return i ? d(1, p) : d(0, p + 1);
117
117
  case Y:
118
- var O = this.$locale().weekStart || 0, U = (m < O ? m + 7 : m) - O;
119
- return d(i ? w - U : w + (6 - U), g);
118
+ var H = this.$locale().weekStart || 0, U = (v < H ? v + 7 : v) - H;
119
+ return d(i ? M - U : M + (6 - U), p);
120
120
  case y:
121
- case P:
122
- return p(A + "Hours", 0);
121
+ case N:
122
+ return h(A + "Hours", 0);
123
123
  case _:
124
- return p(A + "Minutes", 1);
125
- case b:
126
- return p(A + "Seconds", 2);
127
- case T:
128
- return p(A + "Milliseconds", 3);
124
+ return h(A + "Minutes", 1);
125
+ case D:
126
+ return h(A + "Seconds", 2);
127
+ case x:
128
+ return h(A + "Milliseconds", 3);
129
129
  default:
130
130
  return this.clone();
131
131
  }
132
- }, r.endOf = function(e) {
132
+ }, s.endOf = function(e) {
133
133
  return this.startOf(e, !1);
134
- }, r.$set = function(e, n) {
135
- var s, i = o.p(e), u = "set" + (this.$u ? "UTC" : ""), d = (s = {}, s[y] = u + "Date", s[P] = u + "Date", s[D] = u + "Month", s[k] = u + "FullYear", s[_] = u + "Hours", s[b] = u + "Minutes", s[T] = u + "Seconds", s[M] = u + "Milliseconds", s)[i], p = i === y ? this.$D + (n - this.$W) : n;
136
- if (i === D || i === k) {
137
- var m = this.clone().set(P, 1);
138
- m.$d[d](p), m.init(), this.$d = m.set(P, Math.min(this.$D, m.daysInMonth())).$d;
139
- } else d && this.$d[d](p);
134
+ }, s.$set = function(e, n) {
135
+ var r, i = o.p(e), u = "set" + (this.$u ? "UTC" : ""), d = (r = {}, r[y] = u + "Date", r[N] = u + "Date", r[S] = u + "Month", r[k] = u + "FullYear", r[_] = u + "Hours", r[D] = u + "Minutes", r[x] = u + "Seconds", r[b] = u + "Milliseconds", r)[i], h = i === y ? this.$D + (n - this.$W) : n;
136
+ if (i === S || i === k) {
137
+ var v = this.clone().set(N, 1);
138
+ v.$d[d](h), v.init(), this.$d = v.set(N, Math.min(this.$D, v.daysInMonth())).$d;
139
+ } else d && this.$d[d](h);
140
140
  return this.init(), this;
141
- }, r.set = function(e, n) {
141
+ }, s.set = function(e, n) {
142
142
  return this.clone().$set(e, n);
143
- }, r.get = function(e) {
143
+ }, s.get = function(e) {
144
144
  return this[o.p(e)]();
145
- }, r.add = function(e, n) {
146
- var s, i = this;
145
+ }, s.add = function(e, n) {
146
+ var r, i = this;
147
147
  e = Number(e);
148
- var u = o.p(n), d = function(g) {
149
- var w = a(i);
150
- return o.w(w.date(w.date() + Math.round(g * e)), i);
148
+ var u = o.p(n), d = function(p) {
149
+ var M = a(i);
150
+ return o.w(M.date(M.date() + Math.round(p * e)), i);
151
151
  };
152
- if (u === D) return this.set(D, this.$M + e);
152
+ if (u === S) return this.set(S, this.$M + e);
153
153
  if (u === k) return this.set(k, this.$y + e);
154
154
  if (u === y) return d(1);
155
155
  if (u === Y) return d(7);
156
- var p = (s = {}, s[b] = c, s[_] = j, s[T] = $, s)[u] || 1, m = this.$d.getTime() + e * p;
157
- return o.w(m, this);
158
- }, r.subtract = function(e, n) {
156
+ var h = (r = {}, r[D] = c, r[_] = j, r[x] = w, r)[u] || 1, v = this.$d.getTime() + e * h;
157
+ return o.w(v, this);
158
+ }, s.subtract = function(e, n) {
159
159
  return this.add(-1 * e, n);
160
- }, r.format = function(e) {
161
- var n = this, s = this.$locale();
162
- if (!this.isValid()) return s.invalidDate || B;
163
- var i = e || "YYYY-MM-DDTHH:mm:ssZ", u = o.z(this), d = this.$H, p = this.$m, m = this.$M, g = s.weekdays, w = s.months, A = s.meridiem, O = function(x, N, K, V) {
164
- return x && (x[N] || x(n, i)) || K[N].slice(0, V);
165
- }, U = function(x) {
166
- return o.s(d % 12 || 12, x, "0");
167
- }, L = A || function(x, N, K) {
168
- var V = x < 12 ? "AM" : "PM";
160
+ }, s.format = function(e) {
161
+ var n = this, r = this.$locale();
162
+ if (!this.isValid()) return r.invalidDate || B;
163
+ var i = e || "YYYY-MM-DDTHH:mm:ssZ", u = o.z(this), d = this.$H, h = this.$m, v = this.$M, p = r.weekdays, M = r.months, A = r.meridiem, H = function($, I, K, V) {
164
+ return $ && ($[I] || $(n, i)) || K[I].slice(0, V);
165
+ }, U = function($) {
166
+ return o.s(d % 12 || 12, $, "0");
167
+ }, O = A || function($, I, K) {
168
+ var V = $ < 12 ? "AM" : "PM";
169
169
  return K ? V.toLowerCase() : V;
170
170
  };
171
- return i.replace(Z, function(x, N) {
172
- return N || function(K) {
171
+ return i.replace(Z, function($, I) {
172
+ return I || function(K) {
173
173
  switch (K) {
174
174
  case "YY":
175
175
  return String(n.$y).slice(-2);
176
176
  case "YYYY":
177
177
  return o.s(n.$y, 4, "0");
178
178
  case "M":
179
- return m + 1;
179
+ return v + 1;
180
180
  case "MM":
181
- return o.s(m + 1, 2, "0");
181
+ return o.s(v + 1, 2, "0");
182
182
  case "MMM":
183
- return O(s.monthsShort, m, w, 3);
183
+ return H(r.monthsShort, v, M, 3);
184
184
  case "MMMM":
185
- return O(w, m);
185
+ return H(M, v);
186
186
  case "D":
187
187
  return n.$D;
188
188
  case "DD":
@@ -190,11 +190,11 @@ var ee = { exports: {} };
190
190
  case "d":
191
191
  return String(n.$W);
192
192
  case "dd":
193
- return O(s.weekdaysMin, n.$W, g, 2);
193
+ return H(r.weekdaysMin, n.$W, p, 2);
194
194
  case "ddd":
195
- return O(s.weekdaysShort, n.$W, g, 3);
195
+ return H(r.weekdaysShort, n.$W, p, 3);
196
196
  case "dddd":
197
- return g[n.$W];
197
+ return p[n.$W];
198
198
  case "H":
199
199
  return String(d);
200
200
  case "HH":
@@ -204,13 +204,13 @@ var ee = { exports: {} };
204
204
  case "hh":
205
205
  return U(2);
206
206
  case "a":
207
- return L(d, p, !0);
207
+ return O(d, h, !0);
208
208
  case "A":
209
- return L(d, p, !1);
209
+ return O(d, h, !1);
210
210
  case "m":
211
- return String(p);
211
+ return String(h);
212
212
  case "mm":
213
- return o.s(p, 2, "0");
213
+ return o.s(h, 2, "0");
214
214
  case "s":
215
215
  return String(n.$s);
216
216
  case "ss":
@@ -221,173 +221,182 @@ var ee = { exports: {} };
221
221
  return u;
222
222
  }
223
223
  return null;
224
- }(x) || u.replace(":", "");
224
+ }($) || u.replace(":", "");
225
225
  });
226
- }, r.utcOffset = function() {
226
+ }, s.utcOffset = function() {
227
227
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
228
- }, r.diff = function(e, n, s) {
229
- var i, u = this, d = o.p(n), p = a(e), m = (p.utcOffset() - this.utcOffset()) * c, g = this - p, w = function() {
230
- return o.m(u, p);
228
+ }, s.diff = function(e, n, r) {
229
+ var i, u = this, d = o.p(n), h = a(e), v = (h.utcOffset() - this.utcOffset()) * c, p = this - h, M = function() {
230
+ return o.m(u, h);
231
231
  };
232
232
  switch (d) {
233
233
  case k:
234
- i = w() / 12;
234
+ i = M() / 12;
235
235
  break;
236
- case D:
237
- i = w();
236
+ case S:
237
+ i = M();
238
238
  break;
239
239
  case R:
240
- i = w() / 3;
240
+ i = M() / 3;
241
241
  break;
242
242
  case Y:
243
- i = (g - m) / 6048e5;
243
+ i = (p - v) / 6048e5;
244
244
  break;
245
245
  case y:
246
- i = (g - m) / 864e5;
246
+ i = (p - v) / 864e5;
247
247
  break;
248
248
  case _:
249
- i = g / j;
249
+ i = p / j;
250
250
  break;
251
- case b:
252
- i = g / c;
251
+ case D:
252
+ i = p / c;
253
253
  break;
254
- case T:
255
- i = g / $;
254
+ case x:
255
+ i = p / w;
256
256
  break;
257
257
  default:
258
- i = g;
258
+ i = p;
259
259
  }
260
- return s ? i : o.a(i);
261
- }, r.daysInMonth = function() {
262
- return this.endOf(D).$D;
263
- }, r.$locale = function() {
264
- return H[this.$L];
265
- }, r.locale = function(e, n) {
260
+ return r ? i : o.a(i);
261
+ }, s.daysInMonth = function() {
262
+ return this.endOf(S).$D;
263
+ }, s.$locale = function() {
264
+ return C[this.$L];
265
+ }, s.locale = function(e, n) {
266
266
  if (!e) return this.$L;
267
- var s = this.clone(), i = f(e, n, !0);
268
- return i && (s.$L = i), s;
269
- }, r.clone = function() {
267
+ var r = this.clone(), i = f(e, n, !0);
268
+ return i && (r.$L = i), r;
269
+ }, s.clone = function() {
270
270
  return o.w(this.$d, this);
271
- }, r.toDate = function() {
271
+ }, s.toDate = function() {
272
272
  return new Date(this.valueOf());
273
- }, r.toJSON = function() {
273
+ }, s.toJSON = function() {
274
274
  return this.isValid() ? this.toISOString() : null;
275
- }, r.toISOString = function() {
275
+ }, s.toISOString = function() {
276
276
  return this.$d.toISOString();
277
- }, r.toString = function() {
277
+ }, s.toString = function() {
278
278
  return this.$d.toUTCString();
279
279
  }, t;
280
- }(), S = h.prototype;
281
- return a.prototype = S, [["$ms", M], ["$s", T], ["$m", b], ["$H", _], ["$W", y], ["$M", D], ["$y", k], ["$D", P]].forEach(function(t) {
282
- S[t[1]] = function(r) {
283
- return this.$g(r, t[0], t[1]);
280
+ }(), T = m.prototype;
281
+ return a.prototype = T, [["$ms", b], ["$s", x], ["$m", D], ["$H", _], ["$W", y], ["$M", S], ["$y", k], ["$D", N]].forEach(function(t) {
282
+ T[t[1]] = function(s) {
283
+ return this.$g(s, t[0], t[1]);
284
284
  };
285
- }), a.extend = function(t, r) {
286
- return t.$i || (t(r, h, a), t.$i = !0), a;
285
+ }), a.extend = function(t, s) {
286
+ return t.$i || (t(s, m, a), t.$i = !0), a;
287
287
  }, a.locale = f, a.isDayjs = J, a.unix = function(t) {
288
288
  return a(1e3 * t);
289
- }, a.en = H[I], a.Ls = H, a.p = {}, a;
289
+ }, a.en = C[P], a.Ls = C, a.p = {}, a;
290
290
  });
291
291
  })(ee);
292
292
  var ae = ee.exports;
293
- const ie = /* @__PURE__ */ ne(ae), oe = G.get("token"), ue = G.post("putObject", (l) => (l.headers || (l.headers = {}), l.headers["Content-Type"] = "multipart/form-data", l.responseType = "blob", l)), le = G.post("upload-objects", (l) => (l.headers || (l.headers = {}), l.headers["Content-Type"] = "multipart/form-data", l.responseType = "blob", l)), ce = te.get("progress"), ve = () => {
294
- let l = C(!1), v = C(""), $ = C(0), c = C("normal"), j = C(!1), M, T = C(""), b = C(""), _ = C(""), y = C(""), Y = C(!1), D = C(""), R = "", k;
295
- const P = () => {
296
- b.value = "", _.value = "", y.value = "", Y.value = !1, D.value = "";
293
+ const ie = /* @__PURE__ */ ne(ae), oe = G.get("token"), ue = G.post("put-object", (l) => (l.headers || (l.headers = {}), l.headers["Content-Type"] = "multipart/form-data", l.responseType = "blob", l)), le = G.post("upload-objects", (l) => (l.headers || (l.headers = {}), l.headers["Content-Type"] = "multipart/form-data", l.responseType = "blob", l)), ce = te.get("progress"), ve = () => {
294
+ let l = L(!1), g = L(""), w = L(0), c = L("normal"), j = L(!1), b, x = L(""), D = L(""), _ = L(""), y = L(""), Y = L(!1), S = L(""), R = "", k;
295
+ const N = () => {
296
+ D.value = "", _.value = "", y.value = "", Y.value = !1, S.value = "";
297
297
  }, B = async () => {
298
298
  const [f, a] = await oe().run();
299
299
  return f ? { stauts: !1 } : { status: !0, data: a };
300
300
  }, q = (f) => new Promise((a, o) => {
301
- const S = [];
301
+ const T = [];
302
302
  let t = 0;
303
303
  for (; t < f.size; ) {
304
304
  const e = f.slice(t, t + 1048576);
305
- S.push(e), t += 1048576;
305
+ T.push(e), t += 1048576;
306
306
  }
307
- const r = new Blob(S, { type: f.type });
308
- a(r);
309
- }), Z = async (f, a, o, h = !0, S = "", t = !1) => {
310
- var A;
311
- R = S, h && (c.value = "normal", $.value = 0, v.value = "导入进度", l.value = !0, T.value = ""), k = a;
312
- const r = await B();
313
- if (!r.status) return;
314
- let e = r.data, n = null, { autoContentType: s, bucketName: i, importFileName: u } = o;
307
+ const s = new Blob(T, { type: f.type });
308
+ a(s);
309
+ }), Z = async (f, a, o, m = !0, T = "", t = !1) => {
310
+ var A, H;
311
+ R = T, m && (c.value = "normal", w.value = 0, g.value = "导入进度", l.value = !0, x.value = ""), k = a;
312
+ const s = await B();
313
+ if (!s.status) return;
314
+ let e = s.data, n = null, { autoContentType: r, bucketName: i, importFileName: u } = o;
315
315
  const d = t ? le : ue;
316
316
  if (t) {
317
- let O = [];
318
- await a.forEach(async (U) => {
319
- let L = await q(U);
320
- O.push(L);
321
- }), n = new FormData(), n.append("accessKeyId", e.accessKeyId), n.append("secretAccessKey", e.secretAccessKey), n.append("sessionToken", e.sessionToken), n.append("bucketName", i), a.forEach((U, L) => {
322
- n.append("file", O[L]);
323
- }), u.forEach((U) => {
324
- n.append("filePaths", U);
317
+ let U = [];
318
+ await a.forEach(async (O) => {
319
+ let $ = await q(O);
320
+ U.push($);
321
+ }), n = new FormData(), n.append("accessKeyId", e.accessKeyId), n.append("secretAccessKey", e.secretAccessKey), n.append("sessionToken", e.sessionToken), n.append("bucketName", i), a.forEach((O, $) => {
322
+ n.append("file", U[$]);
323
+ }), u.forEach((O) => {
324
+ n.append("filePaths", O);
325
325
  });
326
326
  } else {
327
- const O = await q(a);
327
+ const U = await q(a);
328
328
  n = {
329
329
  accessKeyId: e.accessKeyId,
330
330
  secretAccessKey: e.secretAccessKey,
331
331
  sessionToken: e.sessionToken,
332
- file: O,
332
+ file: U,
333
333
  bucketName: i,
334
334
  filePath: u,
335
- autoContentType: s
335
+ autoContentType: r
336
336
  };
337
337
  }
338
- const [p, m] = await d(n).run();
339
- if (p) return;
340
- const g = await de(m.data), w = await (f == null ? void 0 : f(g));
341
- if (h) {
342
- if (!w.status) {
338
+ const [h, v] = await d(n).run();
339
+ if (h) return l.value = !1;
340
+ const p = await de(v.data);
341
+ if ((p == null ? void 0 : p.statusCode) != 200) {
342
+ l.value = !1, (A = window.DasMessage) == null || A.error({
343
+ message: (p == null ? void 0 : p.errorMsg) || "上传失败",
344
+ grouping: !0,
345
+ repeatNum: 1
346
+ });
347
+ return;
348
+ }
349
+ const M = await (f == null ? void 0 : f(p));
350
+ if (m) {
351
+ if (!M.status) {
343
352
  l.value = !1, c.value = "error";
344
353
  return;
345
354
  }
346
- v.value = "导入进度", l.value = !0, z(w.taskId, "import", "");
355
+ g.value = "导入进度", l.value = !0, z(M.taskId, "import", "");
347
356
  } else {
348
- if (!w.status) return;
349
- c.value = "success", (A = window.DasMessage) == null || A.success({
357
+ if (!M.status) return;
358
+ c.value = "success", (H = window.DasMessage) == null || H.success({
350
359
  message: "导入成功",
351
360
  grouping: !0,
352
361
  repeatNum: 1
353
362
  });
354
363
  }
355
364
  }, F = async (f, a = "", o = "") => {
356
- c.value = "normal", $.value = 0, v.value = o || "导出进度", l.value = !0;
357
- const h = await (f == null ? void 0 : f());
358
- if (!h.status) {
365
+ c.value = "normal", w.value = 0, g.value = o || "导出进度", l.value = !0;
366
+ const m = await (f == null ? void 0 : f());
367
+ if (!m.status) {
359
368
  l.value = !1, c.value = "error";
360
369
  return;
361
370
  }
362
- z(h.taskId, "action", "");
363
- }, E = async (f, a = "", o = "", h = !0) => {
364
- h && (c.value = "normal", $.value = 0, v.value = "导出进度", l.value = !0);
365
- const S = await (f == null ? void 0 : f());
366
- if (!S.status) {
371
+ z(m.taskId, "action", "");
372
+ }, E = async (f, a = "", o = "", m = !0) => {
373
+ m && (c.value = "normal", w.value = 0, g.value = "导出进度", l.value = !0);
374
+ const T = await (f == null ? void 0 : f());
375
+ if (!T.status) {
367
376
  l.value = !1, c.value = "error";
368
377
  return;
369
378
  }
370
- ie().format("YYYYMMDDHHmmss") + "", z(S.taskId, "export", a || "", o);
371
- }, z = async (f, a, o, h = "") => {
372
- j.value = !0, H(f, a, o, h), M = setTimeout(() => {
379
+ ie().format("YYYYMMDDHHmmss") + "", z(T.taskId, "export", a || "", o);
380
+ }, z = async (f, a, o, m = "") => {
381
+ j.value = !0, C(f, a, o, m), b = setTimeout(() => {
373
382
  }, 50);
374
- }, I = () => {
375
- clearTimeout(M), M = null, l.value = !1;
376
- }, H = async (f, a = "export", o, h = "") => {
377
- var e, n, s;
378
- const [S, t] = await ce("", {
383
+ }, P = () => {
384
+ clearTimeout(b), b = null, l.value = !1;
385
+ }, C = async (f, a = "export", o, m = "") => {
386
+ var e, n, r;
387
+ const [T, t] = await ce("", {
379
388
  url: `progress/${f}`
380
389
  }).run();
381
- if (S) {
390
+ if (T) {
382
391
  j.value = !1;
383
392
  return;
384
393
  }
385
- $.value = t.percentage;
386
- const r = a == "export" ? "导出" : "导入";
387
- if ($.value == 100)
388
- if (T.value = t, j.value = !1, I(), a == "export")
389
- t.status == 1 ? (c.value = "success", X(`${Q().baseURL}/oss${t.filePath}`, o, h), j.value = !1) : t.status == 2 && (y.value = t.message || `${r}失败`, (e = window.DasMessage) == null || e.error({
390
- message: t.message || `${r}失败`,
394
+ w.value = t.percentage;
395
+ const s = a == "export" ? "导出" : "导入";
396
+ if (w.value == 100)
397
+ if (x.value = t, j.value = !1, P(), a == "export")
398
+ t.status == 1 ? (c.value = "success", X(`${Q().baseURL}/oss${t.filePath}`, o, m), j.value = !1) : t.status == 2 && (y.value = t.message || `${s}失败`, (e = window.DasMessage) == null || e.error({
399
+ message: t.message || `${s}失败`,
391
400
  grouping: !0,
392
401
  repeatNum: 1
393
402
  }));
@@ -396,22 +405,22 @@ const ie = /* @__PURE__ */ ne(ae), oe = G.get("token"), ue = G.post("putObject",
396
405
  c.value = "error";
397
406
  const i = (n = k.name) == null ? void 0 : n.match(/(.*?)(\.[^.]*$|$)/), u = i.length ? i[2] : "";
398
407
  Y.value = !0;
399
- const d = (s = t.filePath) == null ? void 0 : s.replace(/(.*\/)*([^.]+).*/gi, "$2");
400
- b.value = R || `${d}${u}`, _.value = k.sizeText, y.value = "部分数据校验不通过,请下载附件并修改,重新导入!", D.value = `${Q().baseURL}/oss${t.filePath}`;
408
+ const d = (r = t.filePath) == null ? void 0 : r.replace(/(.*\/)*([^.]+).*/gi, "$2");
409
+ D.value = R || `${d}${u}`, _.value = k.sizeText, y.value = "部分数据校验不通过,请下载附件并修改,重新导入!", S.value = `${Q().baseURL}/oss${t.filePath}`;
401
410
  }
402
- W(t.status, r, t.message);
411
+ W(t.status, s, t.message);
403
412
  } else a == "action" && (c.value = "success");
404
413
  else
405
- M && t.status != 2 ? M = setTimeout(() => {
406
- H(f, a, o, h);
407
- }, 50) : (T.value = t, j.value = !1, W(t.status, r, t.message), I(), Y.value = !0, y.value = (t == null ? void 0 : t.message) || "");
414
+ b && t.status != 2 ? b = setTimeout(() => {
415
+ C(f, a, o, m);
416
+ }, 50) : (x.value = t, j.value = !1, W(t.status, s, t.message), P(), Y.value = !0, y.value = (t == null ? void 0 : t.message) || "");
408
417
  }, W = (f, a, o) => {
409
- var h, S, t;
410
- f == 1 ? (c.value = "success", (h = window.DasMessage) == null || h.success({
418
+ var m, T, t;
419
+ f == 1 ? (c.value = "success", (m = window.DasMessage) == null || m.success({
411
420
  message: `${a}成功`,
412
421
  grouping: !0,
413
422
  repeatNum: 1
414
- }), b.value = "", _.value = "", y.value = "") : f == 2 ? (c.value = "error", (S = window.DasMessage) == null || S.error({
423
+ }), D.value = "", _.value = "", y.value = "") : f == 2 ? (c.value = "error", (T = window.DasMessage) == null || T.error({
415
424
  message: o || `${a}失败`,
416
425
  grouping: !0,
417
426
  repeatNum: 1
@@ -423,29 +432,29 @@ const ie = /* @__PURE__ */ ne(ae), oe = G.get("token"), ue = G.post("putObject",
423
432
  };
424
433
  return {
425
434
  showProgressDialog: l,
426
- progressTitle: v,
427
- percent: $,
435
+ progressTitle: g,
436
+ percent: w,
428
437
  progressStatus: c,
429
438
  progressLoading: j,
430
- progressResult: T,
431
- errorFileName: b,
439
+ progressResult: x,
440
+ errorFileName: D,
432
441
  errorFileSize: _,
433
442
  errorMessage: y,
434
443
  errorImport: Y,
435
- errorFilePath: D,
444
+ errorFilePath: S,
436
445
  fileImport: Z,
437
446
  fileExport: E,
438
447
  fileAction: F,
439
448
  generateUniqueName: (f) => {
440
449
  const a = f == null ? void 0 : f.match(/(.*?)(\.[^.]*$|$)/), o = a.length ? a[2] : "";
441
- return `${a.length ? a[1] : f}${re()}${o}`;
450
+ return `${a.length ? a[1] : f}${se()}${o}`;
442
451
  },
443
452
  downloadFile: X,
444
- resetStataus: P,
453
+ resetStataus: N,
445
454
  checkProgress: z
446
455
  };
447
456
  }, fe = (l) => {
448
- let v = l == null ? void 0 : l.toLocaleLowerCase();
457
+ let g = l == null ? void 0 : l.toLocaleLowerCase();
449
458
  return {
450
459
  excel: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
451
460
  pdf: "application/pdf",
@@ -472,25 +481,25 @@ const ie = /* @__PURE__ */ ne(ae), oe = G.get("token"), ue = G.post("putObject",
472
481
  crt: "application/x-x509-ca-cert",
473
482
  der: "application/x-x509-ca-cert",
474
483
  cer: "application/pkix-cert"
475
- }[v];
476
- }, X = (l, v, $ = "excel") => {
484
+ }[g];
485
+ }, X = (l, g, w = "excel") => {
477
486
  const c = new XMLHttpRequest();
478
487
  c.open("get", l), c.setRequestHeader("Content-Type", "application/json; charset=UTF-8"), c.responseType = "blob", c.onload = function(j) {
479
- const M = new Blob([this.response], {
480
- type: fe($)
481
- }), T = URL.createObjectURL(M);
488
+ const b = new Blob([this.response], {
489
+ type: fe(w)
490
+ }), x = URL.createObjectURL(b);
482
491
  if (window.navigator.msSaveOrOpenBlob)
483
- navigator.msSaveBlob(M, v);
492
+ navigator.msSaveBlob(b, g);
484
493
  else {
485
- const b = document.createElement("a");
486
- b.href = T, b.download = v, b.click(), window.URL.revokeObjectURL(T);
494
+ const D = document.createElement("a");
495
+ D.href = x, D.download = g, D.click(), window.URL.revokeObjectURL(x);
487
496
  }
488
497
  }, c.send();
489
- }, de = (l) => new Promise((v, $) => {
498
+ }, de = (l) => new Promise((g, w) => {
490
499
  var c = new FileReader();
491
500
  c.onload = function(j) {
492
- let M = "";
493
- typeof c.result == "string" && (M = JSON.parse(c.result)), v(M);
501
+ let b = "";
502
+ typeof c.result == "string" && (b = JSON.parse(c.result)), g(b);
494
503
  }, c.readAsText(l);
495
504
  });
496
505
  export {