@das-fed/upf-utils 6.4.0-dev.247 → 6.4.0-dev.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-services/modules/app-manage/es5.js +1079 -1088
- package/api-services/modules/app-manage/index.js +883 -897
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +1114 -1102
- package/api-services/modules/contract/index.js +920 -902
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +1114 -1102
- package/api-services/modules/enterpriseright/index.js +920 -902
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +1319 -1328
- package/api-services/modules/gateway-edge/es5.js +1088 -1079
- package/api-services/modules/gateway-edge/index.js +897 -883
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1032 -1046
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +1104 -1116
- package/api-services/modules/justauth/index.js +903 -921
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +1102 -1114
- package/api-services/modules/link/index.js +902 -920
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +1144 -1132
- package/api-services/modules/platformManage/index.js +953 -935
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +1102 -1114
- package/api-services/modules/portal/index.js +902 -920
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +1102 -1114
- package/api-services/modules/supplychain-manage/index.js +902 -920
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +1102 -1114
- package/api-services/modules/tool/index.js +902 -920
- package/api-services/modules/tool/index.js.gz +0 -0
- package/common-info/es5.js +1257 -1248
- package/common-info/index.js +1040 -1026
- package/common-info/index.js.gz +0 -0
- package/common-tools/timezone-format/es5.js +315 -283
- package/common-tools/timezone-format/index.js +262 -204
- package/common-tools/timezone-format/index.js.gz +0 -0
- package/create-api-service/es5.js +1078 -1090
- package/create-api-service/index.js +887 -905
- package/create-api-service/index.js.gz +0 -0
- package/esm-map.json +13 -0
- package/package.json +3 -3
- package/theme/bridge.d.ts +42 -0
- package/theme/es5.d.ts +12 -41
- package/theme/es5.js +962 -553
- package/theme/index.d.ts +12 -41
- package/theme/index.js +698 -473
- package/theme/index.js.gz +0 -0
- package/theme/source-variables.d.ts +35 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import f from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import rt from "dayjs/plugin/utc";
|
|
3
|
+
import at from "dayjs/plugin/timezone";
|
|
4
4
|
import "@das-fed/upf-utils/config";
|
|
5
|
-
const
|
|
6
|
-
function
|
|
5
|
+
const G = "/api/admin/basic-application/sys-info/v1/license/time-zone-packed-data";
|
|
6
|
+
function st() {
|
|
7
7
|
if (typeof localStorage > "u")
|
|
8
8
|
return null;
|
|
9
9
|
try {
|
|
@@ -12,18 +12,38 @@ function nt() {
|
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const t =
|
|
15
|
+
function it() {
|
|
16
|
+
const t = st();
|
|
17
17
|
if (!(t == null || t === ""))
|
|
18
18
|
return t.trim().startsWith("Bearer ") ? t.trim() : `Bearer ${t.trim()}`;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const e = t.authorization !== void 0 ? t.authorization === "" || t.authorization == null ? void 0 : t.authorization :
|
|
20
|
+
function Y(t = {}) {
|
|
21
|
+
const e = t.authorization !== void 0 ? t.authorization === "" || t.authorization == null ? void 0 : t.authorization : it(), n = { ...t.headers || {} };
|
|
22
22
|
if (e != null && e !== "" && (n.Authorization = e), Object.keys(n).length !== 0)
|
|
23
23
|
return { headers: n };
|
|
24
24
|
}
|
|
25
|
-
let L = null,
|
|
26
|
-
|
|
25
|
+
let L = null, w = null;
|
|
26
|
+
const O = [
|
|
27
|
+
"utc",
|
|
28
|
+
"uct",
|
|
29
|
+
"zulu",
|
|
30
|
+
"universal",
|
|
31
|
+
"etc/utc",
|
|
32
|
+
"etc/uct",
|
|
33
|
+
"etc/zulu",
|
|
34
|
+
"etc/universal",
|
|
35
|
+
"gmt",
|
|
36
|
+
"gmt0",
|
|
37
|
+
"gmt+0",
|
|
38
|
+
"gmt-0",
|
|
39
|
+
"greenwich",
|
|
40
|
+
"etc/gmt",
|
|
41
|
+
"etc/gmt0",
|
|
42
|
+
"etc/gmt+0",
|
|
43
|
+
"etc/gmt-0",
|
|
44
|
+
"etc/greenwich"
|
|
45
|
+
], ct = { u: [1 / 0], o: [0] };
|
|
46
|
+
function R(t) {
|
|
27
47
|
if (!t || typeof t != "object")
|
|
28
48
|
throw new Error("Invalid IANA response: expected an object");
|
|
29
49
|
const e = t;
|
|
@@ -36,7 +56,7 @@ function _(t) {
|
|
|
36
56
|
links: Array.isArray(n) ? n : []
|
|
37
57
|
};
|
|
38
58
|
}
|
|
39
|
-
async function
|
|
59
|
+
async function ft(t, e) {
|
|
40
60
|
if (typeof fetch != "function")
|
|
41
61
|
throw new Error("fetch is not available. Pass preloadFromApi options.fetchJson.");
|
|
42
62
|
const n = await fetch(t, e);
|
|
@@ -44,127 +64,143 @@ async function rt(t, e) {
|
|
|
44
64
|
throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
|
|
45
65
|
return n.json();
|
|
46
66
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
67
|
+
function H(t) {
|
|
68
|
+
return w = R(t), L = It(w), w;
|
|
49
69
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
70
|
+
function ut() {
|
|
71
|
+
return w;
|
|
52
72
|
}
|
|
53
|
-
async function
|
|
54
|
-
const e = t.url ??
|
|
73
|
+
async function lt(t = {}) {
|
|
74
|
+
const e = t.url ?? G, n = Y({
|
|
55
75
|
authorization: t.authorization,
|
|
56
76
|
headers: t.headers
|
|
57
|
-
}), o = await (t.fetchJson ??
|
|
58
|
-
return
|
|
77
|
+
}), o = await (t.fetchJson ?? ft)(e, n), a = t.parseResponse ? t.parseResponse(o) : R(o);
|
|
78
|
+
return H(a);
|
|
59
79
|
}
|
|
60
|
-
function
|
|
61
|
-
L = null,
|
|
80
|
+
function mt() {
|
|
81
|
+
L = null, w = null;
|
|
62
82
|
}
|
|
63
|
-
function
|
|
83
|
+
function j(t) {
|
|
64
84
|
return t > 96 ? t - 87 : t > 64 ? t - 29 : t - 48;
|
|
65
85
|
}
|
|
66
|
-
function
|
|
86
|
+
function dt(t) {
|
|
67
87
|
let e = 1, n = 0, r = 0, o = 1;
|
|
68
|
-
const a = t.split("."),
|
|
88
|
+
const a = t.split("."), i = a[0], c = a[1] || "";
|
|
69
89
|
t.charCodeAt(0) === 45 && (e = -1);
|
|
70
|
-
for (let s = 0; s <
|
|
71
|
-
const
|
|
72
|
-
|
|
90
|
+
for (let s = 0; s < i.length; s++) {
|
|
91
|
+
const u = i.charCodeAt(s);
|
|
92
|
+
u !== 45 && (n = 60 * n + j(u));
|
|
73
93
|
}
|
|
74
|
-
for (let s = 0; s <
|
|
75
|
-
o = o / 60, r +=
|
|
94
|
+
for (let s = 0; s < c.length; s++)
|
|
95
|
+
o = o / 60, r += j(c.charCodeAt(s)) * o;
|
|
76
96
|
return (n + r) * e;
|
|
77
97
|
}
|
|
78
98
|
function v(t) {
|
|
79
99
|
const e = [];
|
|
80
100
|
for (const n of t)
|
|
81
|
-
e.push(
|
|
101
|
+
e.push(dt(n));
|
|
82
102
|
return e;
|
|
83
103
|
}
|
|
84
|
-
function
|
|
104
|
+
function N(t) {
|
|
105
|
+
const e = t.trim();
|
|
106
|
+
return e ? e.split(" ") : [];
|
|
107
|
+
}
|
|
108
|
+
function ht(t) {
|
|
85
109
|
let e = 0;
|
|
86
110
|
const n = [];
|
|
87
111
|
for (const r of t)
|
|
88
112
|
e += r, n.push(Math.round(e * 6e4));
|
|
89
113
|
return n.push(1 / 0), n;
|
|
90
114
|
}
|
|
91
|
-
function
|
|
115
|
+
function Tt(t, e) {
|
|
92
116
|
const n = [];
|
|
93
117
|
for (const r of e)
|
|
94
118
|
n.push(t[r]);
|
|
95
119
|
return n;
|
|
96
120
|
}
|
|
97
|
-
function
|
|
121
|
+
function b(t) {
|
|
122
|
+
return typeof t == "string" ? t.trim().toLowerCase() : "";
|
|
123
|
+
}
|
|
124
|
+
function gt(t) {
|
|
98
125
|
const e = t.split("|");
|
|
99
126
|
if (e.length < 5)
|
|
100
127
|
throw new Error("Invalid packed zone format");
|
|
101
|
-
const n = e[0]
|
|
128
|
+
const n = b(e[0]), r = v(N(e[2])), o = v(e[3].split("")), a = ht(v(N(e[4]))), i = Tt(r, o);
|
|
102
129
|
return {
|
|
103
130
|
name: n,
|
|
104
131
|
rule: {
|
|
105
132
|
u: a,
|
|
106
|
-
o:
|
|
133
|
+
o: i
|
|
107
134
|
}
|
|
108
135
|
};
|
|
109
136
|
}
|
|
110
|
-
function
|
|
137
|
+
function yt(t, e, n) {
|
|
138
|
+
const r = b(e), o = b(n);
|
|
139
|
+
if (!r || !o) return;
|
|
140
|
+
const a = t[r], i = t[o];
|
|
141
|
+
a && !i ? t[o] = a : i && !a && (t[r] = i);
|
|
142
|
+
}
|
|
143
|
+
function pt(t) {
|
|
144
|
+
const e = O.map((n) => t[n]).find(Boolean) || ct;
|
|
145
|
+
O.forEach((n) => {
|
|
146
|
+
t[n] || (t[n] = e);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function It(t) {
|
|
111
150
|
if (!t || !Array.isArray(t.zones))
|
|
112
151
|
throw new TypeError("packed iana data must contain zones array");
|
|
113
152
|
const e = {};
|
|
114
153
|
for (const r of t.zones) {
|
|
115
|
-
const o =
|
|
154
|
+
const o = gt(r);
|
|
116
155
|
e[o.name] = o.rule;
|
|
117
156
|
}
|
|
118
157
|
const n = t.links || [];
|
|
119
158
|
for (const r of n) {
|
|
120
159
|
const o = r.split("|");
|
|
121
|
-
|
|
122
|
-
continue;
|
|
123
|
-
const a = o[0].toLowerCase(), c = o[1].toLowerCase(), i = e[c];
|
|
124
|
-
i && (e[a] = i);
|
|
160
|
+
o.length < 2 || yt(e, o[0], o[1]);
|
|
125
161
|
}
|
|
126
|
-
return e;
|
|
162
|
+
return pt(e), e;
|
|
127
163
|
}
|
|
128
|
-
function
|
|
164
|
+
function Dt() {
|
|
129
165
|
if (!L)
|
|
130
166
|
throw new Error(
|
|
131
167
|
"IANA data not loaded. Await dayjsTimezoneIanaPlugin.preloadFromApi({ url: ... }) before dayjs.extend(dayjsTimezoneIanaPlugin)."
|
|
132
168
|
);
|
|
133
169
|
return L;
|
|
134
170
|
}
|
|
135
|
-
function
|
|
136
|
-
const r =
|
|
171
|
+
function wt(t, e, n) {
|
|
172
|
+
const r = b(e), o = n[r];
|
|
137
173
|
if (o === void 0)
|
|
138
174
|
throw Error("Unknown Time Zone " + e);
|
|
139
|
-
const a = o.o,
|
|
140
|
-
for (let s = 0; s <
|
|
141
|
-
let
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
175
|
+
const a = o.o, i = o.u, c = i.length - 1;
|
|
176
|
+
for (let s = 0; s < c; s++) {
|
|
177
|
+
let u = a[s];
|
|
178
|
+
const l = a[s && s - 1];
|
|
179
|
+
if (u > l && (u = l), t < i[s] - u * 6e4)
|
|
144
180
|
return a[s];
|
|
145
181
|
}
|
|
146
|
-
return a[
|
|
182
|
+
return a[c];
|
|
147
183
|
}
|
|
148
|
-
const
|
|
149
|
-
var s,
|
|
184
|
+
const zt = (t, e, n) => {
|
|
185
|
+
var s, u;
|
|
150
186
|
let r = "";
|
|
151
|
-
const o = n.tz, a = (s = o == null ? void 0 : o.guess) == null ? void 0 : s.bind(o),
|
|
152
|
-
const Z =
|
|
153
|
-
return (typeof n.utc == "function" ? n.utc(
|
|
187
|
+
const o = n.tz, a = (s = o == null ? void 0 : o.guess) == null ? void 0 : s.bind(o), i = (u = o == null ? void 0 : o.setDefault) == null ? void 0 : u.bind(o), c = (l, h, g) => {
|
|
188
|
+
const Z = g || h || r, T = g ? h : void 0;
|
|
189
|
+
return (typeof n.utc == "function" ? n.utc(l, T) : n(l, T).utc()).tz(Z);
|
|
154
190
|
};
|
|
155
|
-
o && Object.assign(
|
|
156
|
-
r =
|
|
157
|
-
},
|
|
158
|
-
var
|
|
159
|
-
const
|
|
191
|
+
o && Object.assign(c, o), c.setDefault = (l) => {
|
|
192
|
+
r = l, i == null || i(l);
|
|
193
|
+
}, c.guess = () => a ? a() : typeof Intl < "u" && typeof Intl.DateTimeFormat == "function" ? Intl.DateTimeFormat().resolvedOptions().timeZone || r || "UTC" : r || "UTC", n.tz = c, e.prototype.tz = function(l = r, h) {
|
|
194
|
+
var y;
|
|
195
|
+
const g = l || ((y = c.guess) == null ? void 0 : y.call(c)) || "UTC", Z = this.utc().valueOf(), T = wt(Z, g, Dt());
|
|
160
196
|
return this.utcOffset(-T, h);
|
|
161
197
|
};
|
|
162
|
-
}, m =
|
|
163
|
-
m.preloadFromApi =
|
|
164
|
-
m.preloadFromData =
|
|
165
|
-
m.getCachedPackedData =
|
|
166
|
-
m.clearIanaCache =
|
|
167
|
-
function
|
|
198
|
+
}, m = zt;
|
|
199
|
+
m.preloadFromApi = lt;
|
|
200
|
+
m.preloadFromData = H;
|
|
201
|
+
m.getCachedPackedData = ut;
|
|
202
|
+
m.clearIanaCache = mt;
|
|
203
|
+
function At(t) {
|
|
168
204
|
if (!t || typeof t != "object")
|
|
169
205
|
throw new Error("Invalid IANA response: expected an object");
|
|
170
206
|
const e = t;
|
|
@@ -177,14 +213,14 @@ function yt(t) {
|
|
|
177
213
|
links: Array.isArray(n) ? n : []
|
|
178
214
|
};
|
|
179
215
|
}
|
|
180
|
-
function
|
|
216
|
+
function J(t, e) {
|
|
181
217
|
if (!t || typeof t.tz != "object" || typeof t.tz.load != "function")
|
|
182
218
|
throw new Error("moment.tz.load is missing. Import moment-timezone before calling loadIanaData.");
|
|
183
219
|
if (!e || !Array.isArray(e.zones))
|
|
184
220
|
throw new Error("Invalid packed IANA data: zones must be an array");
|
|
185
221
|
t.tz.load(e);
|
|
186
222
|
}
|
|
187
|
-
async function
|
|
223
|
+
async function Zt(t, e) {
|
|
188
224
|
if (typeof fetch != "function")
|
|
189
225
|
throw new Error("fetch is not available. Pass loadIanaFromApi options.fetchJson in Node or polyfill fetch.");
|
|
190
226
|
const n = await fetch(t, e);
|
|
@@ -192,32 +228,54 @@ async function pt(t, e) {
|
|
|
192
228
|
throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
|
|
193
229
|
return n.json();
|
|
194
230
|
}
|
|
195
|
-
async function
|
|
196
|
-
let r =
|
|
231
|
+
async function _(t, e, n) {
|
|
232
|
+
let r = G, o = {};
|
|
197
233
|
typeof e == "string" ? (r = e, o = n ?? {}) : e != null && (o = e);
|
|
198
|
-
const a =
|
|
234
|
+
const a = Y({
|
|
199
235
|
authorization: o.authorization,
|
|
200
236
|
headers: o.headers
|
|
201
|
-
}),
|
|
202
|
-
return
|
|
237
|
+
}), c = await (o.fetchJson ?? Zt)(r, a), s = o.parseResponse ? o.parseResponse(c) : At(c);
|
|
238
|
+
return J(t, s), s;
|
|
203
239
|
}
|
|
204
|
-
f.extend(
|
|
205
|
-
f.extend(
|
|
206
|
-
const D = "zh-CN",
|
|
240
|
+
f.extend(rt);
|
|
241
|
+
f.extend(at);
|
|
242
|
+
const D = "zh-CN", Lt = "YYYY.MM.DD HH:mm:ss", S = "YYYY-MM-DD HH:mm:ss", B = "YYYY-MM-DD HH:mm", F = "UTC", x = {
|
|
207
243
|
zh: "夏令时",
|
|
208
244
|
default: "DST"
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
245
|
+
}, bt = [
|
|
246
|
+
"UTC",
|
|
247
|
+
"UCT",
|
|
248
|
+
"Zulu",
|
|
249
|
+
"Universal",
|
|
250
|
+
"Etc/UTC",
|
|
251
|
+
"Etc/UCT",
|
|
252
|
+
"Etc/Zulu",
|
|
253
|
+
"Etc/Universal",
|
|
254
|
+
"GMT",
|
|
255
|
+
"GMT0",
|
|
256
|
+
"GMT+0",
|
|
257
|
+
"GMT-0",
|
|
258
|
+
"Greenwich",
|
|
259
|
+
"Etc/GMT",
|
|
260
|
+
"Etc/GMT0",
|
|
261
|
+
"Etc/GMT+0",
|
|
262
|
+
"Etc/GMT-0",
|
|
263
|
+
"Etc/Greenwich"
|
|
264
|
+
], p = /* @__PURE__ */ new Set();
|
|
265
|
+
var $, V;
|
|
266
|
+
const Et = (V = ($ = f.tz) == null ? void 0 : $.guess) == null ? void 0 : V.bind(f.tz);
|
|
267
|
+
let E = !1;
|
|
268
|
+
const I = (t) => (t || "").trim(), U = (t) => {
|
|
269
|
+
const e = I(t);
|
|
270
|
+
e && p.add(e);
|
|
271
|
+
}, kt = () => bt.forEach(U), St = () => {
|
|
214
272
|
if (!(typeof Intl > "u" || typeof Intl.DateTimeFormat != "function"))
|
|
215
273
|
try {
|
|
216
274
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
217
275
|
} catch {
|
|
218
276
|
return;
|
|
219
277
|
}
|
|
220
|
-
},
|
|
278
|
+
}, Mt = (t) => {
|
|
221
279
|
if (!t) return !1;
|
|
222
280
|
if (typeof Intl > "u" || typeof Intl.DateTimeFormat != "function") return !0;
|
|
223
281
|
try {
|
|
@@ -226,214 +284,214 @@ const w = (t) => (t || "").trim(), It = () => {
|
|
|
226
284
|
return !1;
|
|
227
285
|
}
|
|
228
286
|
}, z = (t) => {
|
|
229
|
-
const e =
|
|
230
|
-
return e ?
|
|
231
|
-
},
|
|
287
|
+
const e = I(t);
|
|
288
|
+
return e ? p.size ? p.has(e) : Mt(e) : !1;
|
|
289
|
+
}, M = (t) => (p.clear(), t.zones.forEach((e) => {
|
|
232
290
|
const n = e.split("|")[0];
|
|
233
|
-
|
|
291
|
+
U(n);
|
|
234
292
|
}), (t.links || []).forEach((e) => {
|
|
235
293
|
e.split("|").forEach((n) => {
|
|
236
|
-
|
|
294
|
+
U(n);
|
|
237
295
|
});
|
|
238
|
-
}), Array.from(
|
|
239
|
-
const n = m.preloadFromData(t), r =
|
|
240
|
-
return
|
|
241
|
-
},
|
|
242
|
-
const e = await m.preloadFromApi(t), n =
|
|
243
|
-
return
|
|
244
|
-
},
|
|
245
|
-
const { url: n, ...r } = e, o = n ? await
|
|
246
|
-
return
|
|
247
|
-
},
|
|
296
|
+
}), kt(), Array.from(p)), Qt = () => Array.from(p), Xt = async (t, e = {}) => {
|
|
297
|
+
const n = m.preloadFromData(t), r = M(n);
|
|
298
|
+
return E || (f.extend(m), E = !0), W(e.defaultTimeZone), { data: n, knownTimeZones: r };
|
|
299
|
+
}, te = async (t = {}) => {
|
|
300
|
+
const e = await m.preloadFromApi(t), n = M(e);
|
|
301
|
+
return E || (f.extend(m), E = !0), W(t.defaultTimeZone), { data: e, knownTimeZones: n };
|
|
302
|
+
}, ee = (t, e) => (J(t, e), M(e), e), ne = async (t, e = {}) => {
|
|
303
|
+
const { url: n, ...r } = e, o = n ? await _(t, n, r) : await _(t, r);
|
|
304
|
+
return M(o), o;
|
|
305
|
+
}, Ct = () => {
|
|
248
306
|
var n;
|
|
249
|
-
const t = (n = f.tz) == null ? void 0 : n.guess, e = typeof t == "function" ? t :
|
|
307
|
+
const t = (n = f.tz) == null ? void 0 : n.guess, e = typeof t == "function" ? t : Et;
|
|
250
308
|
try {
|
|
251
309
|
return e == null ? void 0 : e();
|
|
252
310
|
} catch {
|
|
253
311
|
return;
|
|
254
312
|
}
|
|
255
|
-
},
|
|
313
|
+
}, vt = () => {
|
|
256
314
|
let t = "";
|
|
257
315
|
try {
|
|
258
316
|
t = typeof sessionStorage > "u" ? "" : sessionStorage.getItem("timeZone") || "";
|
|
259
317
|
} catch {
|
|
260
318
|
t = "";
|
|
261
319
|
}
|
|
262
|
-
const e = t ||
|
|
263
|
-
return z(e) ?
|
|
320
|
+
const e = t || Ct() || St();
|
|
321
|
+
return z(e) ? I(e) : F;
|
|
264
322
|
}, d = (t) => {
|
|
265
|
-
const e =
|
|
266
|
-
return z(e) ? e :
|
|
267
|
-
},
|
|
323
|
+
const e = I(t) || vt();
|
|
324
|
+
return z(e) ? e : F;
|
|
325
|
+
}, W = (t) => {
|
|
268
326
|
var r, o;
|
|
269
|
-
const e =
|
|
270
|
-
return e ? z(e) ? ((o = n == null ? void 0 : n.setDefault) == null || o.call(n, e), !0) : !1 : ((r = n == null ? void 0 : n.setDefault) == null || r.call(n,
|
|
271
|
-
},
|
|
327
|
+
const e = I(t), n = f.tz;
|
|
328
|
+
return e ? z(e) ? ((o = n == null ? void 0 : n.setDefault) == null || o.call(n, e), !0) : !1 : ((r = n == null ? void 0 : n.setDefault) == null || r.call(n, F), !0);
|
|
329
|
+
}, Ut = () => {
|
|
272
330
|
var t;
|
|
273
331
|
return typeof window < "u" && ((t = window.navigator) != null && t.language) ? window.navigator.language : D;
|
|
274
|
-
},
|
|
275
|
-
const r = t ||
|
|
332
|
+
}, Ft = (t, e = []) => {
|
|
333
|
+
const r = t || Ut() || D, o = r.toLowerCase();
|
|
276
334
|
if (!e.length)
|
|
277
335
|
return o === "en" ? "en-US" : o === "zh" || o === "zh-cn" ? D : r;
|
|
278
336
|
const a = e.find((s) => s.toLowerCase() === o);
|
|
279
337
|
if (a) return a;
|
|
280
|
-
const
|
|
281
|
-
return
|
|
338
|
+
const i = o.split("-")[0], c = e.find((s) => s.toLowerCase().split("-")[0] === i);
|
|
339
|
+
return c || (i === "en" ? e.find((s) => s.toLowerCase().startsWith("en-")) || r : i === "zh" ? e.find((s) => s.toLowerCase().startsWith("zh-")) || D : r);
|
|
282
340
|
}, A = (t) => {
|
|
283
341
|
if (f.isDayjs(t)) return t;
|
|
284
342
|
if (t == null || t === "") return f();
|
|
285
343
|
const e = f(t);
|
|
286
344
|
return e.isValid() ? e : f();
|
|
287
|
-
}, k = (t) => t == null || t === "",
|
|
288
|
-
const n =
|
|
345
|
+
}, k = (t) => t == null || t === "", K = (t) => f.isDayjs(t) ? t : k(t) ? f() : f(t), q = (t, e = !1) => {
|
|
346
|
+
const n = I(t);
|
|
289
347
|
return n ? d(n) : e ? d() : "";
|
|
290
|
-
},
|
|
291
|
-
const n = e.format || S, r =
|
|
292
|
-
if (!r) return
|
|
348
|
+
}, Ot = (t, e) => A(t).tz(d(e)).utcOffset(), jt = (t, e, n = B) => A(t).tz(d(e)).format(n), Nt = (t, e) => K(t).format(e.format), Q = (t, e) => {
|
|
349
|
+
const n = e.format || S, r = q(e.timeZone, e.useClientTimeZone);
|
|
350
|
+
if (!r) return Nt(t, { format: n });
|
|
293
351
|
if (e.inputMode === "local")
|
|
294
352
|
return k(t) ? f().tz(r).format(n) : f.tz(t, r).format(n);
|
|
295
|
-
const o =
|
|
353
|
+
const o = K(t);
|
|
296
354
|
return o.isValid() ? o.tz(r).format(n) : o.format(n);
|
|
297
|
-
},
|
|
298
|
-
var s,
|
|
355
|
+
}, _t = (t) => typeof t == "function", xt = (t, e) => {
|
|
356
|
+
var s, u;
|
|
299
357
|
const { moment: n } = e, r = e.format || S;
|
|
300
|
-
if (!
|
|
301
|
-
const o = k(t) ? void 0 : t, a =
|
|
358
|
+
if (!_t(n)) return Q(t, { ...e, dateLibrary: "dayjs" });
|
|
359
|
+
const o = k(t) ? void 0 : t, a = q(e.timeZone, e.useClientTimeZone);
|
|
302
360
|
if (!a || typeof n.tz != "function") return n(o).format(r);
|
|
303
361
|
if (e.inputMode === "local")
|
|
304
|
-
return k(t) ? ((
|
|
305
|
-
const
|
|
306
|
-
return (typeof
|
|
307
|
-
},
|
|
362
|
+
return k(t) ? ((u = (s = n()).tz) == null ? void 0 : u.call(s, a).format(r)) || n().format(r) : n.tz(o, a).format(r);
|
|
363
|
+
const i = n(o);
|
|
364
|
+
return (typeof i.tz == "function" ? i.tz(a) : n.tz(o, a)).format(r);
|
|
365
|
+
}, Pt = (t, e = {}) => {
|
|
308
366
|
const n = typeof e == "string" ? { format: e } : e || {}, r = {
|
|
309
367
|
...n,
|
|
310
368
|
format: n.format || S
|
|
311
369
|
};
|
|
312
|
-
return r.dateLibrary === "moment" ?
|
|
313
|
-
},
|
|
314
|
-
const n =
|
|
315
|
-
return `UTC${r}${
|
|
316
|
-
},
|
|
370
|
+
return r.dateLibrary === "moment" ? xt(t, r) : Q(t, r);
|
|
371
|
+
}, oe = (t, e = S, n = {}) => Pt(t, { ...n, format: e }), P = (t) => String(t).padStart(2, "0"), X = (t) => `UTC${t}`, tt = (t, e) => {
|
|
372
|
+
const n = Ot(t, e), r = n >= 0 ? "+" : "-", o = Math.abs(n);
|
|
373
|
+
return `UTC${r}${P(Math.floor(o / 60))}:${P(o % 60)}`;
|
|
374
|
+
}, $t = (t, e = /* @__PURE__ */ new Date()) => {
|
|
317
375
|
const n = t.currentUtcOffsetText || t.baseUtcOffsetText;
|
|
318
|
-
return n ? `UTC${n}` :
|
|
319
|
-
},
|
|
376
|
+
return n ? `UTC${n}` : tt(e, t.timeZoneId);
|
|
377
|
+
}, Vt = (t, e) => {
|
|
320
378
|
const n = t.match(/([+-]\d{1,2})(?::?(\d{2}))?/) || [];
|
|
321
379
|
if (!n[1]) return e;
|
|
322
380
|
const r = n[1].startsWith("-") ? "-" : "+", o = n[1].replace(/[+-]/, "").padStart(2, "0"), a = n[2] || "00";
|
|
323
381
|
return `UTC${r}${o}:${a}`;
|
|
324
|
-
},
|
|
382
|
+
}, Gt = (t, e, n) => {
|
|
325
383
|
var o, a;
|
|
326
|
-
const r =
|
|
384
|
+
const r = X(n.format("Z"));
|
|
327
385
|
try {
|
|
328
|
-
const
|
|
329
|
-
return
|
|
386
|
+
const i = Intl.DateTimeFormat.supportedLocalesOf([e])[0] || e, c = (a = (o = new Intl.DateTimeFormat(i, { timeZone: t, timeZoneName: "long" }).formatToParts(n.toDate()).find((s) => s.type === "timeZoneName")) == null ? void 0 : o.value) == null ? void 0 : a.trim();
|
|
387
|
+
return c ? /^(gmt|utc)/i.test(c) ? Vt(c, r) : c : r;
|
|
330
388
|
} catch {
|
|
331
389
|
return r;
|
|
332
390
|
}
|
|
333
|
-
},
|
|
391
|
+
}, et = (t, e) => {
|
|
334
392
|
const n = e.year();
|
|
335
393
|
return Array.from(
|
|
336
394
|
new Set(
|
|
337
395
|
Array.from({ length: 12 }, (r, o) => {
|
|
338
|
-
const a = `${o + 1}`.padStart(2, "0"),
|
|
339
|
-
return f.tz(
|
|
396
|
+
const a = `${o + 1}`.padStart(2, "0"), i = `${n}-${a}-15 12:00:00`;
|
|
397
|
+
return f.tz(i, t).utcOffset();
|
|
340
398
|
})
|
|
341
399
|
)
|
|
342
400
|
);
|
|
343
|
-
},
|
|
401
|
+
}, nt = (t, e) => {
|
|
344
402
|
const n = d(t);
|
|
345
403
|
if (!z(n)) return !1;
|
|
346
404
|
const r = A(e).tz(n);
|
|
347
|
-
return
|
|
348
|
-
},
|
|
405
|
+
return et(n, r).length > 1;
|
|
406
|
+
}, C = (t, e) => {
|
|
349
407
|
const n = d(t);
|
|
350
408
|
if (!z(n)) return !1;
|
|
351
|
-
const r = A(e).tz(n), o =
|
|
409
|
+
const r = A(e).tz(n), o = et(n, r);
|
|
352
410
|
return o.length <= 1 ? !1 : r.utcOffset() === Math.max(...o);
|
|
353
|
-
},
|
|
411
|
+
}, re = (t, e) => C(t, e), ot = (t) => {
|
|
354
412
|
if (t === 1 || t === "1") return !0;
|
|
355
413
|
if (t === 0 || t === "0") return !1;
|
|
356
|
-
},
|
|
357
|
-
const n =
|
|
358
|
-
return typeof n == "boolean" ? n :
|
|
359
|
-
},
|
|
360
|
-
const n =
|
|
361
|
-
return typeof n == "boolean" ? n :
|
|
362
|
-
},
|
|
363
|
-
const r = n.tzShowName ||
|
|
414
|
+
}, Yt = (t, e) => {
|
|
415
|
+
const n = ot(t.dynamicOffsetFlag);
|
|
416
|
+
return typeof n == "boolean" ? n : nt(t.timeZoneId, e);
|
|
417
|
+
}, Rt = (t, e) => {
|
|
418
|
+
const n = ot(t.currentDstFlag);
|
|
419
|
+
return typeof n == "boolean" ? n : C(t.timeZoneId, e);
|
|
420
|
+
}, ae = (t, e = /* @__PURE__ */ new Date()) => t.map((n) => {
|
|
421
|
+
const r = n.tzShowName || $t(n, e), o = Yt(n, e);
|
|
364
422
|
return {
|
|
365
423
|
value: n.timeZoneId,
|
|
366
424
|
zoneName: r,
|
|
367
425
|
label: r,
|
|
368
426
|
hasDST: o,
|
|
369
|
-
isDST: o ?
|
|
427
|
+
isDST: o ? Rt(n, e) : !1
|
|
370
428
|
};
|
|
371
|
-
}),
|
|
429
|
+
}), Ht = (t) => {
|
|
372
430
|
const e = t.toLowerCase().split("-")[0];
|
|
373
|
-
return
|
|
374
|
-
},
|
|
431
|
+
return x[e] || x.default;
|
|
432
|
+
}, Jt = (t) => typeof t.showDaylightSavingLabel == "boolean" ? t.showDaylightSavingLabel : t.showDaylightSavingMarker ?? !0, se = (t, e, n = {}) => {
|
|
375
433
|
const {
|
|
376
434
|
showZoneLabel: r = !0,
|
|
377
435
|
zoneLabel: o,
|
|
378
436
|
hasDST: a,
|
|
379
|
-
isDST:
|
|
380
|
-
standardTimeLabel:
|
|
437
|
+
isDST: i,
|
|
438
|
+
standardTimeLabel: c,
|
|
381
439
|
daylightSavingLabel: s,
|
|
382
|
-
format:
|
|
383
|
-
} = n,
|
|
384
|
-
return r ? [h, o ||
|
|
385
|
-
},
|
|
386
|
-
const e =
|
|
440
|
+
format: u = B
|
|
441
|
+
} = n, l = d(e), h = jt(t, l, u), g = typeof a == "boolean" ? a : nt(l, t), T = (typeof i == "boolean" ? i : C(l, t)) ? s : c, y = g && T ? `[${T}]` : "";
|
|
442
|
+
return r ? [h, o || tt(t, l), y].filter(Boolean).join(" ") : [h, y].filter(Boolean).join(" ");
|
|
443
|
+
}, ie = (t = {}) => {
|
|
444
|
+
const e = Ft(t.locale, t.supportedLocales), n = d(t.timeZone), r = A(t.value).tz(n), o = Gt(n, e, r), a = X(r.format("Z")), i = C(n, r), c = i ? Ht(e) : "", s = Jt(t), u = i && s ? `${o} - ${c}` : o;
|
|
387
445
|
return {
|
|
388
|
-
formattedValue: r.format(t.format ||
|
|
446
|
+
formattedValue: r.format(t.format || Lt),
|
|
389
447
|
locale: e,
|
|
390
448
|
timeZone: n,
|
|
391
449
|
timeZoneName: o,
|
|
392
|
-
timeZoneLabel:
|
|
450
|
+
timeZoneLabel: u,
|
|
393
451
|
offsetLabel: a,
|
|
394
452
|
offsetMinutes: r.utcOffset(),
|
|
395
|
-
isDaylightSavingTime:
|
|
396
|
-
daylightSavingLabel:
|
|
453
|
+
isDaylightSavingTime: i,
|
|
454
|
+
daylightSavingLabel: c
|
|
397
455
|
};
|
|
398
456
|
};
|
|
399
457
|
export {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
458
|
+
G as TIME_ZONE_PACKED_DATA_URL,
|
|
459
|
+
Xt as applyDayjsIanaTimeZoneData,
|
|
460
|
+
ee as applyMomentIanaTimeZoneData,
|
|
461
|
+
R as assertPackedIanaData,
|
|
462
|
+
At as assertPackedIanaTzData,
|
|
463
|
+
Y as buildIanaFetchInit,
|
|
464
|
+
ae as buildTimeZoneDisplayOptions,
|
|
465
|
+
mt as clearDayjsIanaCache,
|
|
466
|
+
It as createIanaDbFromPackedData,
|
|
409
467
|
m as dayjsTimezoneIanaPlugin,
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
468
|
+
se as formatClientLocalDateTimeLine,
|
|
469
|
+
jt as formatInTimeZone,
|
|
470
|
+
Pt as formatLocalDateTime,
|
|
471
|
+
tt as formatTimeZoneOffsetLabel,
|
|
472
|
+
st as getAccessTokenFromLocalStorage,
|
|
473
|
+
ut as getCachedDayjsPackedIanaData,
|
|
474
|
+
vt as getClientTimeZone,
|
|
475
|
+
it as getDefaultIanaAuthorization,
|
|
476
|
+
Qt as getKnownTimeZoneIds,
|
|
477
|
+
ie as getTimeZoneDisplayInfo,
|
|
478
|
+
Ot as getZoneUtcOffset,
|
|
479
|
+
re as isDaylightSavingTime,
|
|
422
480
|
z as isKnownTimeZone,
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
481
|
+
te as loadDayjsIanaTimeZoneData,
|
|
482
|
+
J as loadIanaData,
|
|
483
|
+
_ as loadIanaFromApi,
|
|
484
|
+
J as loadMomentIanaData,
|
|
485
|
+
_ as loadMomentIanaFromApi,
|
|
486
|
+
ne as loadMomentIanaTimeZoneData,
|
|
487
|
+
Ft as normalizeLocaleCode,
|
|
488
|
+
lt as preloadDayjsIanaFromApi,
|
|
489
|
+
H as preloadDayjsIanaFromData,
|
|
490
|
+
M as rebuildKnownTimeZoneIds,
|
|
433
491
|
d as resolveTimeZone,
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
492
|
+
$t as resolveUtcOffsetFallback,
|
|
493
|
+
W as setDefaultTimeZone,
|
|
494
|
+
nt as timeZoneHasDST,
|
|
495
|
+
C as timeZoneIsDST,
|
|
496
|
+
oe as toLocalDate
|
|
439
497
|
};
|