m-tool-store 1.0.1 → 1.0.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.
@@ -1,4 +1,4 @@
1
- class ut {
1
+ class it {
2
2
  //金额格式化 , 千分位
3
3
  static formatMoney(S, M) {
4
4
  if (S == null) return "";
@@ -10,295 +10,293 @@ class ut {
10
10
  return m === "" && (m = "0"), M != null && (M == 0 ? u && parseFloat(u) > 0.5 ? (u = "", m = parseInt(m) + 1 + "") : u = "" : M > 0 && (!u || u == "0" || u == ".0" ? u = "." + "0".repeat(M) : (u = parseFloat(u).toFixed(2), u >= "1" && (m = parseInt(m) + 1 + "", u = "." + "0".repeat(M)))), u = (u || "").replace("0.", ".")), w + m + u;
11
11
  }
12
12
  }
13
- var Z = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
14
- function R(y) {
13
+ var J = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
14
+ function G(y) {
15
15
  return y && y.__esModule && Object.prototype.hasOwnProperty.call(y, "default") ? y.default : y;
16
16
  }
17
- var J = { exports: {} }, Q;
18
- function V() {
19
- return Q || (Q = 1, function(y, S) {
20
- (function(M, $) {
21
- y.exports = $();
22
- })(Z, function() {
23
- var M = 1e3, $ = 6e4, D = 36e5, w = "millisecond", f = "second", u = "minute", p = "hour", m = "day", k = "week", v = "month", W = "quarter", b = "year", T = "date", P = "Invalid Date", X = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, tt = /\[([^\]]+)]|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, et = { 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(s) {
24
- var n = ["th", "st", "nd", "rd"], t = s % 100;
25
- return "[" + s + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
26
- } }, U = function(s, n, t) {
27
- var r = String(s);
28
- return !r || r.length >= n ? s : "" + Array(n + 1 - r.length).join(t) + s;
29
- }, nt = { s: U, z: function(s) {
30
- var n = -s.utcOffset(), t = Math.abs(n), r = Math.floor(t / 60), e = t % 60;
31
- return (n <= 0 ? "+" : "-") + U(r, 2, "0") + ":" + U(e, 2, "0");
32
- }, m: function s(n, t) {
33
- if (n.date() < t.date()) return -s(t, n);
34
- var r = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(r, v), i = t - e < 0, a = n.clone().add(r + (i ? -1 : 1), v);
35
- return +(-(r + (t - e) / (i ? e - a : a - e)) || 0);
36
- }, a: function(s) {
37
- return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
38
- }, p: function(s) {
39
- return { M: v, y: b, w: k, d: m, D: T, h: p, m: u, s: f, ms: w, Q: W }[s] || String(s || "").toLowerCase().replace(/s$/, "");
40
- }, u: function(s) {
41
- return s === void 0;
42
- } }, C = "en", x = {};
43
- x[C] = et;
44
- var B = "$isDayjsObject", E = function(s) {
45
- return s instanceof N || !(!s || !s[B]);
46
- }, I = function s(n, t, r) {
47
- var e;
48
- if (!n) return C;
49
- if (typeof n == "string") {
50
- var i = n.toLowerCase();
51
- x[i] && (e = i), t && (x[i] = t, e = i);
52
- var a = n.split("-");
53
- if (!e && a.length > 1) return s(a[0]);
54
- } else {
55
- var c = n.name;
56
- x[c] = n, e = c;
57
- }
58
- return !r && e && (C = e), e || !r && C;
59
- }, d = function(s, n) {
60
- if (E(s)) return s.clone();
61
- var t = typeof n == "object" ? n : {};
62
- return t.date = s, t.args = arguments, new N(t);
63
- }, o = nt;
64
- o.l = I, o.i = E, o.w = function(s, n) {
65
- return d(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
66
- };
67
- var N = function() {
68
- function s(t) {
69
- this.$L = I(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[B] = !0;
70
- }
71
- var n = s.prototype;
72
- return n.parse = function(t) {
73
- this.$d = function(r) {
74
- var e = r.date, i = r.utc;
75
- if (e === null) return /* @__PURE__ */ new Date(NaN);
76
- if (o.u(e)) return /* @__PURE__ */ new Date();
77
- if (e instanceof Date) return new Date(e);
78
- if (typeof e == "string" && !/Z$/i.test(e)) {
79
- var a = e.match(X);
80
- if (a) {
81
- var c = a[2] - 1 || 0, l = (a[7] || "0").substring(0, 3);
82
- return i ? new Date(Date.UTC(a[1], c, a[3] || 1, a[4] || 0, a[5] || 0, a[6] || 0, l)) : new Date(a[1], c, a[3] || 1, a[4] || 0, a[5] || 0, a[6] || 0, l);
83
- }
17
+ var Q = { exports: {} };
18
+ (function(y, S) {
19
+ (function(M, $) {
20
+ y.exports = $();
21
+ })(J, function() {
22
+ var M = 1e3, $ = 6e4, D = 36e5, w = "millisecond", f = "second", u = "minute", p = "hour", m = "day", k = "week", v = "month", W = "quarter", b = "year", T = "date", P = "Invalid Date", R = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, X = /\[([^\]]+)]|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, tt = { 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(s) {
23
+ var n = ["th", "st", "nd", "rd"], t = s % 100;
24
+ return "[" + s + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
25
+ } }, U = function(s, n, t) {
26
+ var r = String(s);
27
+ return !r || r.length >= n ? s : "" + Array(n + 1 - r.length).join(t) + s;
28
+ }, et = { s: U, z: function(s) {
29
+ var n = -s.utcOffset(), t = Math.abs(n), r = Math.floor(t / 60), e = t % 60;
30
+ return (n <= 0 ? "+" : "-") + U(r, 2, "0") + ":" + U(e, 2, "0");
31
+ }, m: function s(n, t) {
32
+ if (n.date() < t.date()) return -s(t, n);
33
+ var r = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(r, v), i = t - e < 0, a = n.clone().add(r + (i ? -1 : 1), v);
34
+ return +(-(r + (t - e) / (i ? e - a : a - e)) || 0);
35
+ }, a: function(s) {
36
+ return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
37
+ }, p: function(s) {
38
+ return { M: v, y: b, w: k, d: m, D: T, h: p, m: u, s: f, ms: w, Q: W }[s] || String(s || "").toLowerCase().replace(/s$/, "");
39
+ }, u: function(s) {
40
+ return s === void 0;
41
+ } }, C = "en", x = {};
42
+ x[C] = tt;
43
+ var q = "$isDayjsObject", E = function(s) {
44
+ return s instanceof N || !(!s || !s[q]);
45
+ }, I = function s(n, t, r) {
46
+ var e;
47
+ if (!n) return C;
48
+ if (typeof n == "string") {
49
+ var i = n.toLowerCase();
50
+ x[i] && (e = i), t && (x[i] = t, e = i);
51
+ var a = n.split("-");
52
+ if (!e && a.length > 1) return s(a[0]);
53
+ } else {
54
+ var c = n.name;
55
+ x[c] = n, e = c;
56
+ }
57
+ return !r && e && (C = e), e || !r && C;
58
+ }, d = function(s, n) {
59
+ if (E(s)) return s.clone();
60
+ var t = typeof n == "object" ? n : {};
61
+ return t.date = s, t.args = arguments, new N(t);
62
+ }, o = et;
63
+ o.l = I, o.i = E, o.w = function(s, n) {
64
+ return d(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
65
+ };
66
+ var N = function() {
67
+ function s(t) {
68
+ this.$L = I(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[q] = !0;
69
+ }
70
+ var n = s.prototype;
71
+ return n.parse = function(t) {
72
+ this.$d = function(r) {
73
+ var e = r.date, i = r.utc;
74
+ if (e === null) return /* @__PURE__ */ new Date(NaN);
75
+ if (o.u(e)) return /* @__PURE__ */ new Date();
76
+ if (e instanceof Date) return new Date(e);
77
+ if (typeof e == "string" && !/Z$/i.test(e)) {
78
+ var a = e.match(R);
79
+ if (a) {
80
+ var c = a[2] - 1 || 0, l = (a[7] || "0").substring(0, 3);
81
+ return i ? new Date(Date.UTC(a[1], c, a[3] || 1, a[4] || 0, a[5] || 0, a[6] || 0, l)) : new Date(a[1], c, a[3] || 1, a[4] || 0, a[5] || 0, a[6] || 0, l);
84
82
  }
85
- return new Date(e);
86
- }(t), this.init();
87
- }, n.init = function() {
88
- var t = this.$d;
89
- this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
90
- }, n.$utils = function() {
91
- return o;
92
- }, n.isValid = function() {
93
- return this.$d.toString() !== P;
94
- }, n.isSame = function(t, r) {
95
- var e = d(t);
96
- return this.startOf(r) <= e && e <= this.endOf(r);
97
- }, n.isAfter = function(t, r) {
98
- return d(t) < this.startOf(r);
99
- }, n.isBefore = function(t, r) {
100
- return this.endOf(r) < d(t);
101
- }, n.$g = function(t, r, e) {
102
- return o.u(t) ? this[r] : this.set(e, t);
103
- }, n.unix = function() {
104
- return Math.floor(this.valueOf() / 1e3);
105
- }, n.valueOf = function() {
106
- return this.$d.getTime();
107
- }, n.startOf = function(t, r) {
108
- var e = this, i = !!o.u(r) || r, a = o.p(t), c = function(H, Y) {
109
- var O = o.w(e.$u ? Date.UTC(e.$y, Y, H) : new Date(e.$y, Y, H), e);
110
- return i ? O : O.endOf(m);
111
- }, l = function(H, Y) {
112
- return o.w(e.toDate()[H].apply(e.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Y)), e);
113
- }, h = this.$W, _ = this.$M, g = this.$D, j = "set" + (this.$u ? "UTC" : "");
114
- switch (a) {
115
- case b:
116
- return i ? c(1, 0) : c(31, 11);
117
- case v:
118
- return i ? c(1, _) : c(0, _ + 1);
119
- case k:
120
- var L = this.$locale().weekStart || 0, A = (h < L ? h + 7 : h) - L;
121
- return c(i ? g - A : g + (6 - A), _);
122
- case m:
123
- case T:
124
- return l(j + "Hours", 0);
125
- case p:
126
- return l(j + "Minutes", 1);
127
- case u:
128
- return l(j + "Seconds", 2);
129
- case f:
130
- return l(j + "Milliseconds", 3);
131
- default:
132
- return this.clone();
133
- }
134
- }, n.endOf = function(t) {
135
- return this.startOf(t, !1);
136
- }, n.$set = function(t, r) {
137
- var e, i = o.p(t), a = "set" + (this.$u ? "UTC" : ""), c = (e = {}, e[m] = a + "Date", e[T] = a + "Date", e[v] = a + "Month", e[b] = a + "FullYear", e[p] = a + "Hours", e[u] = a + "Minutes", e[f] = a + "Seconds", e[w] = a + "Milliseconds", e)[i], l = i === m ? this.$D + (r - this.$W) : r;
138
- if (i === v || i === b) {
139
- var h = this.clone().set(T, 1);
140
- h.$d[c](l), h.init(), this.$d = h.set(T, Math.min(this.$D, h.daysInMonth())).$d;
141
- } else c && this.$d[c](l);
142
- return this.init(), this;
143
- }, n.set = function(t, r) {
144
- return this.clone().$set(t, r);
145
- }, n.get = function(t) {
146
- return this[o.p(t)]();
147
- }, n.add = function(t, r) {
148
- var e, i = this;
149
- t = Number(t);
150
- var a = o.p(r), c = function(_) {
151
- var g = d(i);
152
- return o.w(g.date(g.date() + Math.round(_ * t)), i);
153
- };
154
- if (a === v) return this.set(v, this.$M + t);
155
- if (a === b) return this.set(b, this.$y + t);
156
- if (a === m) return c(1);
157
- if (a === k) return c(7);
158
- var l = (e = {}, e[u] = $, e[p] = D, e[f] = M, e)[a] || 1, h = this.$d.getTime() + t * l;
159
- return o.w(h, this);
160
- }, n.subtract = function(t, r) {
161
- return this.add(-1 * t, r);
162
- }, n.format = function(t) {
163
- var r = this, e = this.$locale();
164
- if (!this.isValid()) return e.invalidDate || P;
165
- var i = t || "YYYY-MM-DDTHH:mm:ssZ", a = o.z(this), c = this.$H, l = this.$m, h = this.$M, _ = e.weekdays, g = e.months, j = e.meridiem, L = function(Y, O, F, z) {
166
- return Y && (Y[O] || Y(r, i)) || F[O].slice(0, z);
167
- }, A = function(Y) {
168
- return o.s(c % 12 || 12, Y, "0");
169
- }, H = j || function(Y, O, F) {
170
- var z = Y < 12 ? "AM" : "PM";
171
- return F ? z.toLowerCase() : z;
172
- };
173
- return i.replace(tt, function(Y, O) {
174
- return O || function(F) {
175
- switch (F) {
176
- case "YY":
177
- return String(r.$y).slice(-2);
178
- case "YYYY":
179
- return o.s(r.$y, 4, "0");
180
- case "M":
181
- return h + 1;
182
- case "MM":
183
- return o.s(h + 1, 2, "0");
184
- case "MMM":
185
- return L(e.monthsShort, h, g, 3);
186
- case "MMMM":
187
- return L(g, h);
188
- case "D":
189
- return r.$D;
190
- case "DD":
191
- return o.s(r.$D, 2, "0");
192
- case "d":
193
- return String(r.$W);
194
- case "dd":
195
- return L(e.weekdaysMin, r.$W, _, 2);
196
- case "ddd":
197
- return L(e.weekdaysShort, r.$W, _, 3);
198
- case "dddd":
199
- return _[r.$W];
200
- case "H":
201
- return String(c);
202
- case "HH":
203
- return o.s(c, 2, "0");
204
- case "h":
205
- return A(1);
206
- case "hh":
207
- return A(2);
208
- case "a":
209
- return H(c, l, !0);
210
- case "A":
211
- return H(c, l, !1);
212
- case "m":
213
- return String(l);
214
- case "mm":
215
- return o.s(l, 2, "0");
216
- case "s":
217
- return String(r.$s);
218
- case "ss":
219
- return o.s(r.$s, 2, "0");
220
- case "SSS":
221
- return o.s(r.$ms, 3, "0");
222
- case "Z":
223
- return a;
224
- }
225
- return null;
226
- }(Y) || a.replace(":", "");
227
- });
228
- }, n.utcOffset = function() {
229
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
230
- }, n.diff = function(t, r, e) {
231
- var i, a = this, c = o.p(r), l = d(t), h = (l.utcOffset() - this.utcOffset()) * $, _ = this - l, g = function() {
232
- return o.m(a, l);
233
- };
234
- switch (c) {
235
- case b:
236
- i = g() / 12;
237
- break;
238
- case v:
239
- i = g();
240
- break;
241
- case W:
242
- i = g() / 3;
243
- break;
244
- case k:
245
- i = (_ - h) / 6048e5;
246
- break;
247
- case m:
248
- i = (_ - h) / 864e5;
249
- break;
250
- case p:
251
- i = _ / D;
252
- break;
253
- case u:
254
- i = _ / $;
255
- break;
256
- case f:
257
- i = _ / M;
258
- break;
259
- default:
260
- i = _;
261
83
  }
262
- return e ? i : o.a(i);
263
- }, n.daysInMonth = function() {
264
- return this.endOf(v).$D;
265
- }, n.$locale = function() {
266
- return x[this.$L];
267
- }, n.locale = function(t, r) {
268
- if (!t) return this.$L;
269
- var e = this.clone(), i = I(t, r, !0);
270
- return i && (e.$L = i), e;
271
- }, n.clone = function() {
272
- return o.w(this.$d, this);
273
- }, n.toDate = function() {
274
- return new Date(this.valueOf());
275
- }, n.toJSON = function() {
276
- return this.isValid() ? this.toISOString() : null;
277
- }, n.toISOString = function() {
278
- return this.$d.toISOString();
279
- }, n.toString = function() {
280
- return this.$d.toUTCString();
281
- }, s;
282
- }(), G = N.prototype;
283
- return d.prototype = G, [["$ms", w], ["$s", f], ["$m", u], ["$H", p], ["$W", m], ["$M", v], ["$y", b], ["$D", T]].forEach(function(s) {
284
- G[s[1]] = function(n) {
285
- return this.$g(n, s[0], s[1]);
84
+ return new Date(e);
85
+ }(t), this.init();
86
+ }, n.init = function() {
87
+ var t = this.$d;
88
+ this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
89
+ }, n.$utils = function() {
90
+ return o;
91
+ }, n.isValid = function() {
92
+ return this.$d.toString() !== P;
93
+ }, n.isSame = function(t, r) {
94
+ var e = d(t);
95
+ return this.startOf(r) <= e && e <= this.endOf(r);
96
+ }, n.isAfter = function(t, r) {
97
+ return d(t) < this.startOf(r);
98
+ }, n.isBefore = function(t, r) {
99
+ return this.endOf(r) < d(t);
100
+ }, n.$g = function(t, r, e) {
101
+ return o.u(t) ? this[r] : this.set(e, t);
102
+ }, n.unix = function() {
103
+ return Math.floor(this.valueOf() / 1e3);
104
+ }, n.valueOf = function() {
105
+ return this.$d.getTime();
106
+ }, n.startOf = function(t, r) {
107
+ var e = this, i = !!o.u(r) || r, a = o.p(t), c = function(H, Y) {
108
+ var O = o.w(e.$u ? Date.UTC(e.$y, Y, H) : new Date(e.$y, Y, H), e);
109
+ return i ? O : O.endOf(m);
110
+ }, l = function(H, Y) {
111
+ return o.w(e.toDate()[H].apply(e.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Y)), e);
112
+ }, h = this.$W, _ = this.$M, g = this.$D, j = "set" + (this.$u ? "UTC" : "");
113
+ switch (a) {
114
+ case b:
115
+ return i ? c(1, 0) : c(31, 11);
116
+ case v:
117
+ return i ? c(1, _) : c(0, _ + 1);
118
+ case k:
119
+ var L = this.$locale().weekStart || 0, A = (h < L ? h + 7 : h) - L;
120
+ return c(i ? g - A : g + (6 - A), _);
121
+ case m:
122
+ case T:
123
+ return l(j + "Hours", 0);
124
+ case p:
125
+ return l(j + "Minutes", 1);
126
+ case u:
127
+ return l(j + "Seconds", 2);
128
+ case f:
129
+ return l(j + "Milliseconds", 3);
130
+ default:
131
+ return this.clone();
132
+ }
133
+ }, n.endOf = function(t) {
134
+ return this.startOf(t, !1);
135
+ }, n.$set = function(t, r) {
136
+ var e, i = o.p(t), a = "set" + (this.$u ? "UTC" : ""), c = (e = {}, e[m] = a + "Date", e[T] = a + "Date", e[v] = a + "Month", e[b] = a + "FullYear", e[p] = a + "Hours", e[u] = a + "Minutes", e[f] = a + "Seconds", e[w] = a + "Milliseconds", e)[i], l = i === m ? this.$D + (r - this.$W) : r;
137
+ if (i === v || i === b) {
138
+ var h = this.clone().set(T, 1);
139
+ h.$d[c](l), h.init(), this.$d = h.set(T, Math.min(this.$D, h.daysInMonth())).$d;
140
+ } else c && this.$d[c](l);
141
+ return this.init(), this;
142
+ }, n.set = function(t, r) {
143
+ return this.clone().$set(t, r);
144
+ }, n.get = function(t) {
145
+ return this[o.p(t)]();
146
+ }, n.add = function(t, r) {
147
+ var e, i = this;
148
+ t = Number(t);
149
+ var a = o.p(r), c = function(_) {
150
+ var g = d(i);
151
+ return o.w(g.date(g.date() + Math.round(_ * t)), i);
286
152
  };
287
- }), d.extend = function(s, n) {
288
- return s.$i || (s(n, N, d), s.$i = !0), d;
289
- }, d.locale = I, d.isDayjs = E, d.unix = function(s) {
290
- return d(1e3 * s);
291
- }, d.en = x[C], d.Ls = x, d.p = {}, d;
292
- });
293
- }(J)), J.exports;
294
- }
295
- var rt = V();
296
- const q = /* @__PURE__ */ R(rt);
153
+ if (a === v) return this.set(v, this.$M + t);
154
+ if (a === b) return this.set(b, this.$y + t);
155
+ if (a === m) return c(1);
156
+ if (a === k) return c(7);
157
+ var l = (e = {}, e[u] = $, e[p] = D, e[f] = M, e)[a] || 1, h = this.$d.getTime() + t * l;
158
+ return o.w(h, this);
159
+ }, n.subtract = function(t, r) {
160
+ return this.add(-1 * t, r);
161
+ }, n.format = function(t) {
162
+ var r = this, e = this.$locale();
163
+ if (!this.isValid()) return e.invalidDate || P;
164
+ var i = t || "YYYY-MM-DDTHH:mm:ssZ", a = o.z(this), c = this.$H, l = this.$m, h = this.$M, _ = e.weekdays, g = e.months, j = e.meridiem, L = function(Y, O, F, z) {
165
+ return Y && (Y[O] || Y(r, i)) || F[O].slice(0, z);
166
+ }, A = function(Y) {
167
+ return o.s(c % 12 || 12, Y, "0");
168
+ }, H = j || function(Y, O, F) {
169
+ var z = Y < 12 ? "AM" : "PM";
170
+ return F ? z.toLowerCase() : z;
171
+ };
172
+ return i.replace(X, function(Y, O) {
173
+ return O || function(F) {
174
+ switch (F) {
175
+ case "YY":
176
+ return String(r.$y).slice(-2);
177
+ case "YYYY":
178
+ return o.s(r.$y, 4, "0");
179
+ case "M":
180
+ return h + 1;
181
+ case "MM":
182
+ return o.s(h + 1, 2, "0");
183
+ case "MMM":
184
+ return L(e.monthsShort, h, g, 3);
185
+ case "MMMM":
186
+ return L(g, h);
187
+ case "D":
188
+ return r.$D;
189
+ case "DD":
190
+ return o.s(r.$D, 2, "0");
191
+ case "d":
192
+ return String(r.$W);
193
+ case "dd":
194
+ return L(e.weekdaysMin, r.$W, _, 2);
195
+ case "ddd":
196
+ return L(e.weekdaysShort, r.$W, _, 3);
197
+ case "dddd":
198
+ return _[r.$W];
199
+ case "H":
200
+ return String(c);
201
+ case "HH":
202
+ return o.s(c, 2, "0");
203
+ case "h":
204
+ return A(1);
205
+ case "hh":
206
+ return A(2);
207
+ case "a":
208
+ return H(c, l, !0);
209
+ case "A":
210
+ return H(c, l, !1);
211
+ case "m":
212
+ return String(l);
213
+ case "mm":
214
+ return o.s(l, 2, "0");
215
+ case "s":
216
+ return String(r.$s);
217
+ case "ss":
218
+ return o.s(r.$s, 2, "0");
219
+ case "SSS":
220
+ return o.s(r.$ms, 3, "0");
221
+ case "Z":
222
+ return a;
223
+ }
224
+ return null;
225
+ }(Y) || a.replace(":", "");
226
+ });
227
+ }, n.utcOffset = function() {
228
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
229
+ }, n.diff = function(t, r, e) {
230
+ var i, a = this, c = o.p(r), l = d(t), h = (l.utcOffset() - this.utcOffset()) * $, _ = this - l, g = function() {
231
+ return o.m(a, l);
232
+ };
233
+ switch (c) {
234
+ case b:
235
+ i = g() / 12;
236
+ break;
237
+ case v:
238
+ i = g();
239
+ break;
240
+ case W:
241
+ i = g() / 3;
242
+ break;
243
+ case k:
244
+ i = (_ - h) / 6048e5;
245
+ break;
246
+ case m:
247
+ i = (_ - h) / 864e5;
248
+ break;
249
+ case p:
250
+ i = _ / D;
251
+ break;
252
+ case u:
253
+ i = _ / $;
254
+ break;
255
+ case f:
256
+ i = _ / M;
257
+ break;
258
+ default:
259
+ i = _;
260
+ }
261
+ return e ? i : o.a(i);
262
+ }, n.daysInMonth = function() {
263
+ return this.endOf(v).$D;
264
+ }, n.$locale = function() {
265
+ return x[this.$L];
266
+ }, n.locale = function(t, r) {
267
+ if (!t) return this.$L;
268
+ var e = this.clone(), i = I(t, r, !0);
269
+ return i && (e.$L = i), e;
270
+ }, n.clone = function() {
271
+ return o.w(this.$d, this);
272
+ }, n.toDate = function() {
273
+ return new Date(this.valueOf());
274
+ }, n.toJSON = function() {
275
+ return this.isValid() ? this.toISOString() : null;
276
+ }, n.toISOString = function() {
277
+ return this.$d.toISOString();
278
+ }, n.toString = function() {
279
+ return this.$d.toUTCString();
280
+ }, s;
281
+ }(), B = N.prototype;
282
+ return d.prototype = B, [["$ms", w], ["$s", f], ["$m", u], ["$H", p], ["$W", m], ["$M", v], ["$y", b], ["$D", T]].forEach(function(s) {
283
+ B[s[1]] = function(n) {
284
+ return this.$g(n, s[0], s[1]);
285
+ };
286
+ }), d.extend = function(s, n) {
287
+ return s.$i || (s(n, N, d), s.$i = !0), d;
288
+ }, d.locale = I, d.isDayjs = E, d.unix = function(s) {
289
+ return d(1e3 * s);
290
+ }, d.en = x[C], d.Ls = x, d.p = {}, d;
291
+ });
292
+ })(Q);
293
+ var V = Q.exports;
294
+ const Z = /* @__PURE__ */ G(V);
297
295
  var K = { exports: {} };
298
296
  (function(y, S) {
299
297
  (function(M, $) {
300
298
  y.exports = $();
301
- })(Z, function() {
299
+ })(J, function() {
302
300
  return function(M, $) {
303
301
  $.prototype.weekday = function(D) {
304
302
  var w = this.$locale().weekStart || 0, f = this.$W, u = (f < w ? f + 7 : f) - w;
@@ -307,13 +305,13 @@ var K = { exports: {} };
307
305
  };
308
306
  });
309
307
  })(K);
310
- var st = K.exports;
311
- const it = /* @__PURE__ */ R(st);
312
- var at = { exports: {} };
308
+ var nt = K.exports;
309
+ const rt = /* @__PURE__ */ G(nt);
310
+ var st = { exports: {} };
313
311
  (function(y, S) {
314
312
  (function(M, $) {
315
- y.exports = $(V());
316
- })(Z, function(M) {
313
+ y.exports = $(V);
314
+ })(J, function(M) {
317
315
  function $(f) {
318
316
  return f && typeof f == "object" && "default" in f ? f : { default: f };
319
317
  }
@@ -325,12 +323,12 @@ var at = { exports: {} };
325
323
  } };
326
324
  return D.default.locale(w, null, !0), w;
327
325
  });
328
- })(at);
329
- q.extend(it);
330
- q.locale("zh-cn");
331
- const ot = (y, S = "YYYY-MM-DD") => q(y).format(S);
326
+ })(st);
327
+ Z.extend(rt);
328
+ Z.locale("zh-cn");
329
+ const at = (y, S = "YYYY-MM-DD") => Z(y).format(S);
332
330
  export {
333
- ut as FormatterUtils,
334
- q as dayjs,
335
- ot as formatDate
331
+ it as FormatterUtils,
332
+ Z as dayjs,
333
+ at as formatDate
336
334
  };
@@ -1 +1 @@
1
- (function(S,C){typeof exports=="object"&&typeof module<"u"?C(exports):typeof define=="function"&&define.amd?define(["exports"],C):(S=typeof globalThis<"u"?globalThis:S||self,C(S.MToolStore={}))})(this,function(S){"use strict";class C{static formatMoney(b,M){if(b==null)return"";let $=Number(b);if(isNaN($))return b;let D=/([\-\+]?)(\d*)(\.\d+)?/g.exec(""+$),w=D&&D[1]||"",c=(D&&D[2]||"").split(""),u=D&&D[3]||"",y=c.length%3,m=c.reduce(function(x,v,F){return F+1===y||(F+1-y)%3===0?x+v+",":x+v},"").replace(/\,$/g,"");return m===""&&(m="0"),M!=null&&(M==0?u&&parseFloat(u)>.5?(u="",m=parseInt(m)+1+""):u="":M>0&&(!u||u=="0"||u==".0"?u="."+"0".repeat(M):(u=parseFloat(u).toFixed(2),u>="1"&&(m=parseInt(m)+1+"",u="."+"0".repeat(M)))),u=(u||"").replace("0.",".")),w+m+u}}var Z=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function G(_){return _&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_}var q={exports:{}},Q;function R(){return Q||(Q=1,function(_,b){(function(M,$){_.exports=$()})(Z,function(){var M=1e3,$=6e4,D=36e5,w="millisecond",c="second",u="minute",y="hour",m="day",x="week",v="month",F="quarter",O="year",j="date",K="Invalid Date",at=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ut=/\[([^\]]+)]|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,ot={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(i){var n=["th","st","nd","rd"],t=i%100;return"["+i+(n[(t-20)%10]||n[t]||n[0])+"]"}},P=function(i,n,t){var r=String(i);return!r||r.length>=n?i:""+Array(n+1-r.length).join(t)+i},ft={s:P,z:function(i){var n=-i.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+P(r,2,"0")+":"+P(e,2,"0")},m:function i(n,t){if(n.date()<t.date())return-i(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(r,v),s=t-e<0,a=n.clone().add(r+(s?-1:1),v);return+(-(r+(t-e)/(s?e-a:a-e))||0)},a:function(i){return i<0?Math.ceil(i)||0:Math.floor(i)},p:function(i){return{M:v,y:O,w:x,d:m,D:j,h:y,m:u,s:c,ms:w,Q:F}[i]||String(i||"").toLowerCase().replace(/s$/,"")},u:function(i){return i===void 0}},A="en",L={};L[A]=ot;var X="$isDayjsObject",B=function(i){return i instanceof E||!(!i||!i[X])},z=function i(n,t,r){var e;if(!n)return A;if(typeof n=="string"){var s=n.toLowerCase();L[s]&&(e=s),t&&(L[s]=t,e=s);var a=n.split("-");if(!e&&a.length>1)return i(a[0])}else{var f=n.name;L[f]=n,e=f}return!r&&e&&(A=e),e||!r&&A},l=function(i,n){if(B(i))return i.clone();var t=typeof n=="object"?n:{};return t.date=i,t.args=arguments,new E(t)},o=ft;o.l=z,o.i=B,o.w=function(i,n){return l(i,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var E=function(){function i(t){this.$L=z(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[X]=!0}var n=i.prototype;return n.parse=function(t){this.$d=function(r){var e=r.date,s=r.utc;if(e===null)return new Date(NaN);if(o.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(at);if(a){var f=a[2]-1||0,d=(a[7]||"0").substring(0,3);return s?new Date(Date.UTC(a[1],f,a[3]||1,a[4]||0,a[5]||0,a[6]||0,d)):new Date(a[1],f,a[3]||1,a[4]||0,a[5]||0,a[6]||0,d)}}return new Date(e)}(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return o},n.isValid=function(){return this.$d.toString()!==K},n.isSame=function(t,r){var e=l(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return l(t)<this.startOf(r)},n.isBefore=function(t,r){return this.endOf(r)<l(t)},n.$g=function(t,r,e){return o.u(t)?this[r]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,r){var e=this,s=!!o.u(r)||r,a=o.p(t),f=function(H,g){var k=o.w(e.$u?Date.UTC(e.$y,g,H):new Date(e.$y,g,H),e);return s?k:k.endOf(m)},d=function(H,g){return o.w(e.toDate()[H].apply(e.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(g)),e)},h=this.$W,p=this.$M,Y=this.$D,W="set"+(this.$u?"UTC":"");switch(a){case O:return s?f(1,0):f(31,11);case v:return s?f(1,p):f(0,p+1);case x:var T=this.$locale().weekStart||0,I=(h<T?h+7:h)-T;return f(s?Y-I:Y+(6-I),p);case m:case j:return d(W+"Hours",0);case y:return d(W+"Minutes",1);case u:return d(W+"Seconds",2);case c:return d(W+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,r){var e,s=o.p(t),a="set"+(this.$u?"UTC":""),f=(e={},e[m]=a+"Date",e[j]=a+"Date",e[v]=a+"Month",e[O]=a+"FullYear",e[y]=a+"Hours",e[u]=a+"Minutes",e[c]=a+"Seconds",e[w]=a+"Milliseconds",e)[s],d=s===m?this.$D+(r-this.$W):r;if(s===v||s===O){var h=this.clone().set(j,1);h.$d[f](d),h.init(),this.$d=h.set(j,Math.min(this.$D,h.daysInMonth())).$d}else f&&this.$d[f](d);return this.init(),this},n.set=function(t,r){return this.clone().$set(t,r)},n.get=function(t){return this[o.p(t)]()},n.add=function(t,r){var e,s=this;t=Number(t);var a=o.p(r),f=function(p){var Y=l(s);return o.w(Y.date(Y.date()+Math.round(p*t)),s)};if(a===v)return this.set(v,this.$M+t);if(a===O)return this.set(O,this.$y+t);if(a===m)return f(1);if(a===x)return f(7);var d=(e={},e[u]=$,e[y]=D,e[c]=M,e)[a]||1,h=this.$d.getTime()+t*d;return o.w(h,this)},n.subtract=function(t,r){return this.add(-1*t,r)},n.format=function(t){var r=this,e=this.$locale();if(!this.isValid())return e.invalidDate||K;var s=t||"YYYY-MM-DDTHH:mm:ssZ",a=o.z(this),f=this.$H,d=this.$m,h=this.$M,p=e.weekdays,Y=e.months,W=e.meridiem,T=function(g,k,N,J){return g&&(g[k]||g(r,s))||N[k].slice(0,J)},I=function(g){return o.s(f%12||12,g,"0")},H=W||function(g,k,N){var J=g<12?"AM":"PM";return N?J.toLowerCase():J};return s.replace(ut,function(g,k){return k||function(N){switch(N){case"YY":return String(r.$y).slice(-2);case"YYYY":return o.s(r.$y,4,"0");case"M":return h+1;case"MM":return o.s(h+1,2,"0");case"MMM":return T(e.monthsShort,h,Y,3);case"MMMM":return T(Y,h);case"D":return r.$D;case"DD":return o.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return T(e.weekdaysMin,r.$W,p,2);case"ddd":return T(e.weekdaysShort,r.$W,p,3);case"dddd":return p[r.$W];case"H":return String(f);case"HH":return o.s(f,2,"0");case"h":return I(1);case"hh":return I(2);case"a":return H(f,d,!0);case"A":return H(f,d,!1);case"m":return String(d);case"mm":return o.s(d,2,"0");case"s":return String(r.$s);case"ss":return o.s(r.$s,2,"0");case"SSS":return o.s(r.$ms,3,"0");case"Z":return a}return null}(g)||a.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,r,e){var s,a=this,f=o.p(r),d=l(t),h=(d.utcOffset()-this.utcOffset())*$,p=this-d,Y=function(){return o.m(a,d)};switch(f){case O:s=Y()/12;break;case v:s=Y();break;case F:s=Y()/3;break;case x:s=(p-h)/6048e5;break;case m:s=(p-h)/864e5;break;case y:s=p/D;break;case u:s=p/$;break;case c:s=p/M;break;default:s=p}return e?s:o.a(s)},n.daysInMonth=function(){return this.endOf(v).$D},n.$locale=function(){return L[this.$L]},n.locale=function(t,r){if(!t)return this.$L;var e=this.clone(),s=z(t,r,!0);return s&&(e.$L=s),e},n.clone=function(){return o.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},i}(),tt=E.prototype;return l.prototype=tt,[["$ms",w],["$s",c],["$m",u],["$H",y],["$W",m],["$M",v],["$y",O],["$D",j]].forEach(function(i){tt[i[1]]=function(n){return this.$g(n,i[0],i[1])}}),l.extend=function(i,n){return i.$i||(i(n,E,l),i.$i=!0),l},l.locale=z,l.isDayjs=B,l.unix=function(i){return l(1e3*i)},l.en=L[A],l.Ls=L,l.p={},l})}(q)),q.exports}var et=R();const U=G(et);var V={exports:{}};(function(_,b){(function(M,$){_.exports=$()})(Z,function(){return function(M,$){$.prototype.weekday=function(D){var w=this.$locale().weekStart||0,c=this.$W,u=(c<w?c+7:c)-w;return this.$utils().u(D)?u:this.subtract(u,"day").add(D,"day")}}})})(V);var nt=V.exports;const rt=G(nt);var it={exports:{}};(function(_,b){(function(M,$){_.exports=$(R())})(Z,function(M){function $(c){return c&&typeof c=="object"&&"default"in c?c:{default:c}}var D=$(M),w={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(c,u){return u==="W"?c+"周":c+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(c,u){var y=100*c+u;return y<600?"凌晨":y<900?"早上":y<1100?"上午":y<1300?"中午":y<1800?"下午":"晚上"}};return D.default.locale(w,null,!0),w})})(it),U.extend(rt),U.locale("zh-cn");const st=(_,b="YYYY-MM-DD")=>U(_).format(b);S.FormatterUtils=C,S.dayjs=U,S.formatDate=st,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
1
+ (function(S,C){typeof exports=="object"&&typeof module<"u"?C(exports):typeof define=="function"&&define.amd?define(["exports"],C):(S=typeof globalThis<"u"?globalThis:S||self,C(S.MToolStore={}))})(this,function(S){"use strict";class C{static formatMoney(b,M){if(b==null)return"";let $=Number(b);if(isNaN($))return b;let D=/([\-\+]?)(\d*)(\.\d+)?/g.exec(""+$),w=D&&D[1]||"",f=(D&&D[2]||"").split(""),u=D&&D[3]||"",y=f.length%3,m=f.reduce(function(L,v,F){return F+1===y||(F+1-y)%3===0?L+v+",":L+v},"").replace(/\,$/g,"");return m===""&&(m="0"),M!=null&&(M==0?u&&parseFloat(u)>.5?(u="",m=parseInt(m)+1+""):u="":M>0&&(!u||u=="0"||u==".0"?u="."+"0".repeat(M):(u=parseFloat(u).toFixed(2),u>="1"&&(m=parseInt(m)+1+"",u="."+"0".repeat(M)))),u=(u||"").replace("0.",".")),w+m+u}}var Z=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function B(_){return _&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_}var G={exports:{}};(function(_,b){(function(M,$){_.exports=$()})(Z,function(){var M=1e3,$=6e4,D=36e5,w="millisecond",f="second",u="minute",y="hour",m="day",L="week",v="month",F="quarter",O="year",j="date",K="Invalid Date",it=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,st=/\[([^\]]+)]|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,at={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(i){var n=["th","st","nd","rd"],t=i%100;return"["+i+(n[(t-20)%10]||n[t]||n[0])+"]"}},P=function(i,n,t){var r=String(i);return!r||r.length>=n?i:""+Array(n+1-r.length).join(t)+i},ut={s:P,z:function(i){var n=-i.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+P(r,2,"0")+":"+P(e,2,"0")},m:function i(n,t){if(n.date()<t.date())return-i(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(r,v),s=t-e<0,a=n.clone().add(r+(s?-1:1),v);return+(-(r+(t-e)/(s?e-a:a-e))||0)},a:function(i){return i<0?Math.ceil(i)||0:Math.floor(i)},p:function(i){return{M:v,y:O,w:L,d:m,D:j,h:y,m:u,s:f,ms:w,Q:F}[i]||String(i||"").toLowerCase().replace(/s$/,"")},u:function(i){return i===void 0}},A="en",T={};T[A]=at;var R="$isDayjsObject",q=function(i){return i instanceof E||!(!i||!i[R])},z=function i(n,t,r){var e;if(!n)return A;if(typeof n=="string"){var s=n.toLowerCase();T[s]&&(e=s),t&&(T[s]=t,e=s);var a=n.split("-");if(!e&&a.length>1)return i(a[0])}else{var c=n.name;T[c]=n,e=c}return!r&&e&&(A=e),e||!r&&A},l=function(i,n){if(q(i))return i.clone();var t=typeof n=="object"?n:{};return t.date=i,t.args=arguments,new E(t)},o=ut;o.l=z,o.i=q,o.w=function(i,n){return l(i,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var E=function(){function i(t){this.$L=z(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[R]=!0}var n=i.prototype;return n.parse=function(t){this.$d=function(r){var e=r.date,s=r.utc;if(e===null)return new Date(NaN);if(o.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(it);if(a){var c=a[2]-1||0,d=(a[7]||"0").substring(0,3);return s?new Date(Date.UTC(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,d)):new Date(a[1],c,a[3]||1,a[4]||0,a[5]||0,a[6]||0,d)}}return new Date(e)}(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return o},n.isValid=function(){return this.$d.toString()!==K},n.isSame=function(t,r){var e=l(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return l(t)<this.startOf(r)},n.isBefore=function(t,r){return this.endOf(r)<l(t)},n.$g=function(t,r,e){return o.u(t)?this[r]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,r){var e=this,s=!!o.u(r)||r,a=o.p(t),c=function(H,g){var k=o.w(e.$u?Date.UTC(e.$y,g,H):new Date(e.$y,g,H),e);return s?k:k.endOf(m)},d=function(H,g){return o.w(e.toDate()[H].apply(e.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(g)),e)},h=this.$W,p=this.$M,Y=this.$D,W="set"+(this.$u?"UTC":"");switch(a){case O:return s?c(1,0):c(31,11);case v:return s?c(1,p):c(0,p+1);case L:var x=this.$locale().weekStart||0,I=(h<x?h+7:h)-x;return c(s?Y-I:Y+(6-I),p);case m:case j:return d(W+"Hours",0);case y:return d(W+"Minutes",1);case u:return d(W+"Seconds",2);case f:return d(W+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,r){var e,s=o.p(t),a="set"+(this.$u?"UTC":""),c=(e={},e[m]=a+"Date",e[j]=a+"Date",e[v]=a+"Month",e[O]=a+"FullYear",e[y]=a+"Hours",e[u]=a+"Minutes",e[f]=a+"Seconds",e[w]=a+"Milliseconds",e)[s],d=s===m?this.$D+(r-this.$W):r;if(s===v||s===O){var h=this.clone().set(j,1);h.$d[c](d),h.init(),this.$d=h.set(j,Math.min(this.$D,h.daysInMonth())).$d}else c&&this.$d[c](d);return this.init(),this},n.set=function(t,r){return this.clone().$set(t,r)},n.get=function(t){return this[o.p(t)]()},n.add=function(t,r){var e,s=this;t=Number(t);var a=o.p(r),c=function(p){var Y=l(s);return o.w(Y.date(Y.date()+Math.round(p*t)),s)};if(a===v)return this.set(v,this.$M+t);if(a===O)return this.set(O,this.$y+t);if(a===m)return c(1);if(a===L)return c(7);var d=(e={},e[u]=$,e[y]=D,e[f]=M,e)[a]||1,h=this.$d.getTime()+t*d;return o.w(h,this)},n.subtract=function(t,r){return this.add(-1*t,r)},n.format=function(t){var r=this,e=this.$locale();if(!this.isValid())return e.invalidDate||K;var s=t||"YYYY-MM-DDTHH:mm:ssZ",a=o.z(this),c=this.$H,d=this.$m,h=this.$M,p=e.weekdays,Y=e.months,W=e.meridiem,x=function(g,k,N,J){return g&&(g[k]||g(r,s))||N[k].slice(0,J)},I=function(g){return o.s(c%12||12,g,"0")},H=W||function(g,k,N){var J=g<12?"AM":"PM";return N?J.toLowerCase():J};return s.replace(st,function(g,k){return k||function(N){switch(N){case"YY":return String(r.$y).slice(-2);case"YYYY":return o.s(r.$y,4,"0");case"M":return h+1;case"MM":return o.s(h+1,2,"0");case"MMM":return x(e.monthsShort,h,Y,3);case"MMMM":return x(Y,h);case"D":return r.$D;case"DD":return o.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return x(e.weekdaysMin,r.$W,p,2);case"ddd":return x(e.weekdaysShort,r.$W,p,3);case"dddd":return p[r.$W];case"H":return String(c);case"HH":return o.s(c,2,"0");case"h":return I(1);case"hh":return I(2);case"a":return H(c,d,!0);case"A":return H(c,d,!1);case"m":return String(d);case"mm":return o.s(d,2,"0");case"s":return String(r.$s);case"ss":return o.s(r.$s,2,"0");case"SSS":return o.s(r.$ms,3,"0");case"Z":return a}return null}(g)||a.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,r,e){var s,a=this,c=o.p(r),d=l(t),h=(d.utcOffset()-this.utcOffset())*$,p=this-d,Y=function(){return o.m(a,d)};switch(c){case O:s=Y()/12;break;case v:s=Y();break;case F:s=Y()/3;break;case L:s=(p-h)/6048e5;break;case m:s=(p-h)/864e5;break;case y:s=p/D;break;case u:s=p/$;break;case f:s=p/M;break;default:s=p}return e?s:o.a(s)},n.daysInMonth=function(){return this.endOf(v).$D},n.$locale=function(){return T[this.$L]},n.locale=function(t,r){if(!t)return this.$L;var e=this.clone(),s=z(t,r,!0);return s&&(e.$L=s),e},n.clone=function(){return o.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},i}(),X=E.prototype;return l.prototype=X,[["$ms",w],["$s",f],["$m",u],["$H",y],["$W",m],["$M",v],["$y",O],["$D",j]].forEach(function(i){X[i[1]]=function(n){return this.$g(n,i[0],i[1])}}),l.extend=function(i,n){return i.$i||(i(n,E,l),i.$i=!0),l},l.locale=z,l.isDayjs=q,l.unix=function(i){return l(1e3*i)},l.en=T[A],l.Ls=T,l.p={},l})})(G);var Q=G.exports;const U=B(Q);var V={exports:{}};(function(_,b){(function(M,$){_.exports=$()})(Z,function(){return function(M,$){$.prototype.weekday=function(D){var w=this.$locale().weekStart||0,f=this.$W,u=(f<w?f+7:f)-w;return this.$utils().u(D)?u:this.subtract(u,"day").add(D,"day")}}})})(V);var tt=V.exports;const et=B(tt);var nt={exports:{}};(function(_,b){(function(M,$){_.exports=$(Q)})(Z,function(M){function $(f){return f&&typeof f=="object"&&"default"in f?f:{default:f}}var D=$(M),w={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(f,u){return u==="W"?f+"周":f+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(f,u){var y=100*f+u;return y<600?"凌晨":y<900?"早上":y<1100?"上午":y<1300?"中午":y<1800?"下午":"晚上"}};return D.default.locale(w,null,!0),w})})(nt),U.extend(et),U.locale("zh-cn");const rt=(_,b="YYYY-MM-DD")=>U(_).format(b);S.FormatterUtils=C,S.dayjs=U,S.formatDate=rt,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "m-tool-store",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "JavaScript 工具库",
5
5
  "type": "module",
6
6
  "author": "Mmm",
7
7
  "license": "ISC",
8
8
  "main": "./dist/m-tool-store.umd.cjs",
9
9
  "module": "./dist/m-tool-store.js",
10
- "types": "types/global.d.ts",
10
+ "types": "types/index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
13
  "import": "./dist/m-tool-store.js",
@@ -15,7 +15,8 @@
15
15
  }
16
16
  },
17
17
  "files": [
18
- "dist"
18
+ "dist",
19
+ "types"
19
20
  ],
20
21
  "publishConfig": {
21
22
  "access": "public",
@@ -0,0 +1,6 @@
1
+ interface MenuItemType {
2
+ label: string;
3
+ path?: string;
4
+ icon?: string;
5
+ children?: MenuItemType[];
6
+ }
@@ -0,0 +1,34 @@
1
+ import { Dayjs } from 'dayjs';
2
+
3
+ /**
4
+ * 格式化工具类
5
+ * 提供各种数据格式化方法
6
+ */
7
+ export declare const FormatterUtils: {
8
+ // 根据实际类型定义方法
9
+ formatMoney(num: any, dec?: number): string;
10
+ };
11
+
12
+ /**
13
+ * 时间格式化函数
14
+ * @param date - 要格式化的日期
15
+ * @param format - 格式化字符串,默认为 'YYYY-MM-DD'
16
+ * @returns 格式化后的日期字符串
17
+ */
18
+ export declare function formatDate(date: string | Date | Dayjs, format?: string): string;
19
+
20
+ /**
21
+ * dayjs对象 - 日期处理库实例
22
+ */
23
+ export declare const dayjs: typeof import('dayjs').default;
24
+
25
+ /**
26
+ * 工具库主入口
27
+ */
28
+ export declare const exportObj: {
29
+ FormatterUtils: typeof FormatterUtils;
30
+ formatDate: typeof formatDate;
31
+ dayjs: typeof dayjs;
32
+ };
33
+
34
+ export default exportObj;
@@ -0,0 +1,14 @@
1
+
2
+ declare module '*.vue' {
3
+ import { DefineComponent } from 'vue'
4
+ const component: DefineComponent<{}, {}, any>
5
+ export default component
6
+ }
7
+
8
+ declare module 'view-ui-plus/dist/locale/en-US' {
9
+ const locale: any
10
+ export default locale
11
+ }
12
+
13
+
14
+