@das-fed/upf-utils 6.4.0-dev.256 → 6.4.0-dev.257
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/es5.js +1385 -1381
- package/api-services/index.js +1071 -1067
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +1307 -1318
- package/api-services/modules/app-manage/index.js +1069 -1087
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +1219 -1218
- package/api-services/modules/authentication/index.js +973 -973
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +748 -754
- package/api-services/modules/bems/index.js +619 -629
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +1219 -1218
- package/api-services/modules/contract/index.js +973 -973
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +1320 -1307
- package/api-services/modules/duty-manage/index.js +1084 -1066
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +1210 -1209
- package/api-services/modules/enterpriseright/index.js +973 -973
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +1648 -1659
- package/api-services/modules/file/es5.js +1069 -1070
- package/api-services/modules/file/index.js +855 -859
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +1297 -1305
- package/api-services/modules/gateway-edge/index.js +1059 -1073
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1315 -1333
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +1228 -1227
- package/api-services/modules/iot/index.js +979 -979
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +1309 -1320
- package/api-services/modules/justauth/index.js +1070 -1088
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +1319 -1306
- package/api-services/modules/knowledge/index.js +1083 -1065
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +1319 -1306
- package/api-services/modules/link/index.js +1083 -1065
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +1307 -1318
- package/api-services/modules/permission/index.js +1069 -1087
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +1230 -1229
- package/api-services/modules/platformManage/index.js +980 -980
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +1307 -1318
- package/api-services/modules/portal/index.js +1069 -1087
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +1210 -1209
- package/api-services/modules/space-manage/index.js +973 -973
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +1053 -1055
- package/api-services/modules/super-admin/index.js +859 -863
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +1223 -1222
- package/api-services/modules/supplier/index.js +975 -975
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +1210 -1209
- package/api-services/modules/supplychain-manage/index.js +973 -973
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +1311 -1298
- package/api-services/modules/systemConfiguration/index.js +1074 -1056
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +1307 -1318
- package/api-services/modules/tool/index.js +1069 -1087
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +1208 -1207
- package/api-services/src/create-service/index.js +972 -972
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +1301 -1300
- package/common-info/getPermissionMethod/es5.js +1238 -1240
- package/common-info/getPermissionMethod/index.js +1009 -1013
- package/common-info/getPermissionMethod/index.js.gz +0 -0
- package/common-info/index.js +1051 -1051
- package/common-info/index.js.gz +0 -0
- package/common-tools/timezone-format/es5.d.ts +76 -4
- package/common-tools/timezone-format/es5.js +456 -440
- package/common-tools/timezone-format/index.d.ts +76 -4
- package/common-tools/timezone-format/index.js +322 -322
- package/common-tools/timezone-format/index.js.gz +0 -0
- package/create-api-service/es5.js +1296 -1307
- package/create-api-service/index.js +1058 -1076
- package/create-api-service/index.js.gz +0 -0
- package/esm-map.json +13 -13
- package/package.json +3 -3
- package/common-tools/timezone-format/get-iana-data/dayjs-timezone-iana-plugin.d.ts +0 -72
- package/common-tools/timezone-format/get-iana-data/es5.d.ts +0 -3
- package/common-tools/timezone-format/get-iana-data/es5.js +0 -353
- package/common-tools/timezone-format/get-iana-data/iana-api-fetch.d.ts +0 -21
- package/common-tools/timezone-format/get-iana-data/index.d.ts +0 -3
- package/common-tools/timezone-format/get-iana-data/index.js +0 -213
- package/common-tools/timezone-format/get-iana-data/index.js.gz +0 -0
- package/common-tools/timezone-format/get-iana-data/moment-iana-loader.d.ts +0 -30
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import u from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import Ue from "dayjs/plugin/utc";
|
|
3
|
+
import je from "dayjs/plugin/timezone";
|
|
4
4
|
import "@das-fed/upf-utils/config";
|
|
5
|
-
const
|
|
6
|
-
function
|
|
5
|
+
const K = "/api/admin/basic-application/sys-info/v1/license/time-zone-packed-data";
|
|
6
|
+
function me() {
|
|
7
7
|
if (typeof localStorage > "u")
|
|
8
8
|
return null;
|
|
9
9
|
try {
|
|
@@ -12,18 +12,18 @@ function be() {
|
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const e =
|
|
15
|
+
function de() {
|
|
16
|
+
const e = me();
|
|
17
17
|
if (!(e == null || e === ""))
|
|
18
18
|
return e.trim().startsWith("Bearer ") ? e.trim() : `Bearer ${e.trim()}`;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const t = e.authorization !== void 0 ? e.authorization === "" || e.authorization == null ? void 0 : e.authorization :
|
|
20
|
+
function B(e = {}) {
|
|
21
|
+
const t = e.authorization !== void 0 ? e.authorization === "" || e.authorization == null ? void 0 : e.authorization : de(), n = { ...e.headers || {} };
|
|
22
22
|
if (t != null && t !== "" && (n.Authorization = t), Object.keys(n).length !== 0)
|
|
23
23
|
return { headers: n };
|
|
24
24
|
}
|
|
25
|
-
let
|
|
26
|
-
const
|
|
25
|
+
let M = null, z = null;
|
|
26
|
+
const ne = [
|
|
27
27
|
"utc",
|
|
28
28
|
"uct",
|
|
29
29
|
"zulu",
|
|
@@ -42,8 +42,8 @@ const W = [
|
|
|
42
42
|
"etc/gmt+0",
|
|
43
43
|
"etc/gmt-0",
|
|
44
44
|
"etc/greenwich"
|
|
45
|
-
],
|
|
46
|
-
function
|
|
45
|
+
], Oe = { u: [1 / 0], o: [0] };
|
|
46
|
+
function W(e) {
|
|
47
47
|
if (!e || typeof e != "object")
|
|
48
48
|
throw new Error("Invalid IANA response: expected an object");
|
|
49
49
|
const t = e;
|
|
@@ -56,7 +56,7 @@ function ue(e) {
|
|
|
56
56
|
links: Array.isArray(n) ? n : []
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
async function
|
|
59
|
+
async function $e(e, t) {
|
|
60
60
|
if (typeof fetch != "function")
|
|
61
61
|
throw new Error("fetch is not available. Pass preloadFromApi options.fetchJson.");
|
|
62
62
|
const n = await fetch(e, t);
|
|
@@ -64,143 +64,143 @@ async function Ne(e, t) {
|
|
|
64
64
|
throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
|
|
65
65
|
return n.json();
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
return z =
|
|
67
|
+
function q(e) {
|
|
68
|
+
return z = W(e), M = Ie(z), z;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Te() {
|
|
71
71
|
return z;
|
|
72
72
|
}
|
|
73
|
-
async function
|
|
74
|
-
const t = e.url ??
|
|
73
|
+
async function he(e = {}) {
|
|
74
|
+
const t = e.url ?? K, n = B({
|
|
75
75
|
authorization: e.authorization,
|
|
76
76
|
headers: e.headers
|
|
77
|
-
}), r = await (e.fetchJson ??
|
|
78
|
-
return
|
|
77
|
+
}), r = await (e.fetchJson ?? $e)(t, n), a = e.parseResponse ? e.parseResponse(r) : W(r);
|
|
78
|
+
return q(a);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
80
|
+
function ge() {
|
|
81
|
+
M = null, z = null;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function re(e) {
|
|
84
84
|
return e > 96 ? e - 87 : e > 64 ? e - 29 : e - 48;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function xe(e) {
|
|
87
87
|
let t = 1, n = 0, o = 0, r = 1;
|
|
88
|
-
const
|
|
88
|
+
const a = e.split("."), s = a[0], c = a[1] || "";
|
|
89
89
|
e.charCodeAt(0) === 45 && (t = -1);
|
|
90
|
-
for (let i = 0; i <
|
|
91
|
-
const f =
|
|
92
|
-
f !== 45 && (n = 60 * n +
|
|
90
|
+
for (let i = 0; i < s.length; i++) {
|
|
91
|
+
const f = s.charCodeAt(i);
|
|
92
|
+
f !== 45 && (n = 60 * n + re(f));
|
|
93
93
|
}
|
|
94
94
|
for (let i = 0; i < c.length; i++)
|
|
95
|
-
r = r / 60, o +=
|
|
95
|
+
r = r / 60, o += re(c.charCodeAt(i)) * r;
|
|
96
96
|
return (n + o) * t;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function R(e) {
|
|
99
99
|
const t = [];
|
|
100
100
|
for (const n of e)
|
|
101
|
-
t.push(
|
|
101
|
+
t.push(xe(n));
|
|
102
102
|
return t;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function oe(e) {
|
|
105
105
|
const t = e.trim();
|
|
106
106
|
return t ? t.split(" ") : [];
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Ve(e) {
|
|
109
109
|
let t = 0;
|
|
110
110
|
const n = [];
|
|
111
111
|
for (const o of e)
|
|
112
112
|
t += o, n.push(Math.round(t * 6e4));
|
|
113
113
|
return n.push(1 / 0), n;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Re(e, t) {
|
|
116
116
|
const n = [];
|
|
117
117
|
for (const o of t)
|
|
118
118
|
n.push(e[o]);
|
|
119
119
|
return n;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function F(e) {
|
|
122
122
|
return typeof e == "string" ? e.trim().toLowerCase() : "";
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function Ye(e) {
|
|
125
125
|
const t = e.split("|");
|
|
126
126
|
if (t.length < 5)
|
|
127
127
|
throw new Error("Invalid packed zone format");
|
|
128
|
-
const n =
|
|
128
|
+
const n = F(t[0]), o = R(oe(t[2])), r = R(t[3].split("")), a = Ve(R(oe(t[4]))), s = Re(o, r);
|
|
129
129
|
return {
|
|
130
130
|
name: n,
|
|
131
131
|
rule: {
|
|
132
|
-
u:
|
|
133
|
-
o:
|
|
132
|
+
u: a,
|
|
133
|
+
o: s
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
const o =
|
|
137
|
+
function Ge(e, t, n) {
|
|
138
|
+
const o = F(t), r = F(n);
|
|
139
139
|
if (!o || !r) return;
|
|
140
|
-
const
|
|
141
|
-
|
|
140
|
+
const a = e[o], s = e[r];
|
|
141
|
+
a && !s ? e[r] = a : s && !a && (e[o] = s);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
const t =
|
|
145
|
-
|
|
143
|
+
function He(e) {
|
|
144
|
+
const t = ne.map((n) => e[n]).find(Boolean) || Oe;
|
|
145
|
+
ne.forEach((n) => {
|
|
146
146
|
e[n] || (e[n] = t);
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Ie(e) {
|
|
150
150
|
if (!e || !Array.isArray(e.zones))
|
|
151
151
|
throw new TypeError("packed iana data must contain zones array");
|
|
152
152
|
const t = {};
|
|
153
153
|
for (const o of e.zones) {
|
|
154
|
-
const r =
|
|
154
|
+
const r = Ye(o);
|
|
155
155
|
t[r.name] = r.rule;
|
|
156
156
|
}
|
|
157
157
|
const n = e.links || [];
|
|
158
158
|
for (const o of n) {
|
|
159
159
|
const r = o.split("|");
|
|
160
|
-
r.length < 2 ||
|
|
160
|
+
r.length < 2 || Ge(t, r[0], r[1]);
|
|
161
161
|
}
|
|
162
|
-
return
|
|
162
|
+
return He(t), t;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
if (!
|
|
164
|
+
function Je() {
|
|
165
|
+
if (!M)
|
|
166
166
|
throw new Error(
|
|
167
167
|
"IANA data not loaded. Await dayjsTimezoneIanaPlugin.preloadFromApi({ url: ... }) before dayjs.extend(dayjsTimezoneIanaPlugin)."
|
|
168
168
|
);
|
|
169
|
-
return
|
|
169
|
+
return M;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
const o =
|
|
171
|
+
function Ke(e, t, n) {
|
|
172
|
+
const o = F(t), r = n[o];
|
|
173
173
|
if (r === void 0)
|
|
174
174
|
throw Error("Unknown Time Zone " + t);
|
|
175
|
-
const
|
|
175
|
+
const a = r.o, s = r.u, c = s.length - 1;
|
|
176
176
|
for (let i = 0; i < c; i++) {
|
|
177
|
-
let f =
|
|
178
|
-
const l =
|
|
179
|
-
if (f > l && (f = l), e <
|
|
180
|
-
return
|
|
177
|
+
let f = a[i];
|
|
178
|
+
const l = a[i && i - 1];
|
|
179
|
+
if (f > l && (f = l), e < s[i] - f * 6e4)
|
|
180
|
+
return a[i];
|
|
181
181
|
}
|
|
182
|
-
return
|
|
182
|
+
return a[c];
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const Be = (e, t, n) => {
|
|
185
185
|
var i, f;
|
|
186
186
|
let o = "";
|
|
187
|
-
const r = n.tz,
|
|
188
|
-
const
|
|
189
|
-
return (typeof n.utc == "function" ? n.utc(l,
|
|
187
|
+
const r = n.tz, a = (i = r == null ? void 0 : r.guess) == null ? void 0 : i.bind(r), s = (f = r == null ? void 0 : r.setDefault) == null ? void 0 : f.bind(r), c = (l, d, Z) => {
|
|
188
|
+
const k = Z || d || o, g = Z ? d : void 0;
|
|
189
|
+
return (typeof n.utc == "function" ? n.utc(l, g) : n(l, g).utc()).tz(k);
|
|
190
190
|
};
|
|
191
191
|
r && Object.assign(c, r), c.setDefault = (l) => {
|
|
192
|
-
o = l,
|
|
193
|
-
}, c.guess = () =>
|
|
192
|
+
o = l, s == null || s(l);
|
|
193
|
+
}, c.guess = () => a ? a() : typeof Intl < "u" && typeof Intl.DateTimeFormat == "function" ? Intl.DateTimeFormat().resolvedOptions().timeZone || o || "UTC" : o || "UTC", n.tz = c, t.prototype.tz = function(l = o, d) {
|
|
194
194
|
var D;
|
|
195
|
-
const
|
|
196
|
-
return this.utcOffset(-
|
|
195
|
+
const Z = l || ((D = c.guess) == null ? void 0 : D.call(c)) || "UTC", k = this.utc().valueOf(), g = Ke(k, Z, Je());
|
|
196
|
+
return this.utcOffset(-g, d);
|
|
197
197
|
};
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
function
|
|
198
|
+
}, L = Be;
|
|
199
|
+
L.preloadFromApi = he;
|
|
200
|
+
L.preloadFromData = q;
|
|
201
|
+
L.getCachedPackedData = Te;
|
|
202
|
+
L.clearIanaCache = ge;
|
|
203
|
+
function ye(e) {
|
|
204
204
|
if (!e || typeof e != "object")
|
|
205
205
|
throw new Error("Invalid IANA response: expected an object");
|
|
206
206
|
const t = e;
|
|
@@ -213,7 +213,7 @@ function Je(e) {
|
|
|
213
213
|
links: Array.isArray(n) ? n : []
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function Ze(e, t) {
|
|
217
217
|
const n = e == null ? void 0 : e.tz;
|
|
218
218
|
if (!n || typeof n != "object" && typeof n != "function" || typeof n.load != "function")
|
|
219
219
|
throw new Error("moment.tz.load is missing. Import moment-timezone before calling loadIanaData.");
|
|
@@ -221,7 +221,7 @@ function le(e, t) {
|
|
|
221
221
|
throw new Error("Invalid packed IANA data: zones must be an array");
|
|
222
222
|
n.load(t);
|
|
223
223
|
}
|
|
224
|
-
async function
|
|
224
|
+
async function We(e, t) {
|
|
225
225
|
if (typeof fetch != "function")
|
|
226
226
|
throw new Error("fetch is not available. Pass loadIanaFromApi options.fetchJson in Node or polyfill fetch.");
|
|
227
227
|
const n = await fetch(e, t);
|
|
@@ -229,21 +229,21 @@ async function Ke(e, t) {
|
|
|
229
229
|
throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
|
|
230
230
|
return n.json();
|
|
231
231
|
}
|
|
232
|
-
async function
|
|
233
|
-
let o =
|
|
232
|
+
async function qe(e, t, n) {
|
|
233
|
+
let o = K, r = {};
|
|
234
234
|
typeof t == "string" ? (o = t, r = n ?? {}) : t != null && (r = t);
|
|
235
|
-
const
|
|
235
|
+
const a = B({
|
|
236
236
|
authorization: r.authorization,
|
|
237
237
|
headers: r.headers
|
|
238
|
-
}), c = await (r.fetchJson ??
|
|
239
|
-
return
|
|
238
|
+
}), c = await (r.fetchJson ?? We)(o, a), i = r.parseResponse ? r.parseResponse(c) : ye(c);
|
|
239
|
+
return Ze(e, i), i;
|
|
240
240
|
}
|
|
241
|
-
u.extend(
|
|
242
|
-
u.extend(
|
|
243
|
-
const
|
|
241
|
+
u.extend(Ue);
|
|
242
|
+
u.extend(je);
|
|
243
|
+
const p = L, $t = W, xt = q, Vt = Te, Rt = he, Yt = ge, Gt = Ie, Ht = K, Jt = me, Kt = de, Bt = B, Wt = ye, De = Ze, qt = De, Y = qe, Qt = Y, y = "zh-CN", Qe = "YYYY.MM.DD HH:mm:ss", w = "YYYY-MM-DD HH:mm:ss", pe = "YYYY-MM-DD HH:mm", O = "UTC", Q = "timeZone", Ae = "timezonechange", Xe = "__UPF_TIMEZONE_CHANGE__", G = "__UPF_IANA_TIMEZONE_DATA__", et = "ianatimezonedatachange", ae = {
|
|
244
244
|
zh: "夏令时",
|
|
245
245
|
default: "DST"
|
|
246
|
-
},
|
|
246
|
+
}, tt = [
|
|
247
247
|
"UTC",
|
|
248
248
|
"UCT",
|
|
249
249
|
"Zulu",
|
|
@@ -263,27 +263,27 @@ const I = "zh-CN", Be = "YYYY.MM.DD HH:mm:ss", A = "YYYY-MM-DD HH:mm:ss", me = "
|
|
|
263
263
|
"Etc/GMT-0",
|
|
264
264
|
"Etc/Greenwich"
|
|
265
265
|
], E = /* @__PURE__ */ new Set();
|
|
266
|
-
var
|
|
267
|
-
const
|
|
268
|
-
let
|
|
269
|
-
const m = (e) => (e || "").trim(),
|
|
266
|
+
var fe, le;
|
|
267
|
+
const nt = (le = (fe = u.tz) == null ? void 0 : fe.guess) == null ? void 0 : le.bind(u.tz);
|
|
268
|
+
let A = !1, se = "", N = null;
|
|
269
|
+
const m = (e) => (e || "").trim(), H = (e) => {
|
|
270
270
|
const t = m(e);
|
|
271
271
|
t && E.add(t);
|
|
272
|
-
},
|
|
272
|
+
}, rt = () => tt.forEach(H), h = () => typeof window > "u" ? void 0 : window, ot = (e) => e === "iana" ? "iana" : "fallback", P = (e, t) => {
|
|
273
273
|
if (!e || typeof e != "object") return null;
|
|
274
274
|
const n = e;
|
|
275
275
|
if (!Array.isArray(n.zones)) return null;
|
|
276
|
-
const o = n.zones.filter((
|
|
276
|
+
const o = n.zones.filter((a) => typeof a == "string");
|
|
277
277
|
if (!o.length) return null;
|
|
278
|
-
const r = Array.isArray(n.links) ? n.links.filter((
|
|
278
|
+
const r = Array.isArray(n.links) ? n.links.filter((a) => typeof a == "string") : [];
|
|
279
279
|
return {
|
|
280
280
|
version: typeof n.version == "string" ? n.version : void 0,
|
|
281
281
|
zones: o,
|
|
282
282
|
links: r,
|
|
283
|
-
source:
|
|
283
|
+
source: ot(t || n.source),
|
|
284
284
|
timestamp: Number(n.timestamp || Date.now())
|
|
285
285
|
};
|
|
286
|
-
},
|
|
286
|
+
}, ie = (e) => {
|
|
287
287
|
var t;
|
|
288
288
|
return e ? [
|
|
289
289
|
e.source,
|
|
@@ -292,28 +292,28 @@ const m = (e) => (e || "").trim(), R = (e) => {
|
|
|
292
292
|
e.zones.length,
|
|
293
293
|
((t = e.links) == null ? void 0 : t.length) || 0
|
|
294
294
|
].join("|") : "";
|
|
295
|
-
},
|
|
296
|
-
const n =
|
|
295
|
+
}, we = (e, t = {}) => {
|
|
296
|
+
const n = h();
|
|
297
297
|
if (!n) return null;
|
|
298
298
|
const o = P(e, t.source);
|
|
299
299
|
if (!o) return null;
|
|
300
300
|
try {
|
|
301
|
-
const r = P(n[
|
|
301
|
+
const r = P(n[G]);
|
|
302
302
|
if ((r == null ? void 0 : r.source) === "iana" && o.source !== "iana") return r;
|
|
303
|
-
n[
|
|
303
|
+
n[G] = o, t.dispatchEvent !== !1 && n.dispatchEvent(new CustomEvent(et, { detail: o }));
|
|
304
304
|
} catch {
|
|
305
305
|
}
|
|
306
306
|
return o;
|
|
307
|
-
},
|
|
308
|
-
const e =
|
|
307
|
+
}, Ee = () => {
|
|
308
|
+
const e = h();
|
|
309
309
|
try {
|
|
310
|
-
return P(e == null ? void 0 : e[
|
|
310
|
+
return P(e == null ? void 0 : e[G]);
|
|
311
311
|
} catch {
|
|
312
312
|
return null;
|
|
313
313
|
}
|
|
314
|
-
},
|
|
314
|
+
}, at = () => {
|
|
315
315
|
var t;
|
|
316
|
-
const e =
|
|
316
|
+
const e = h();
|
|
317
317
|
if (!(e != null && e.name)) return null;
|
|
318
318
|
try {
|
|
319
319
|
const n = (t = JSON.parse(e.name || "{}")) == null ? void 0 : t.parentData;
|
|
@@ -321,20 +321,20 @@ const m = (e) => (e || "").trim(), R = (e) => {
|
|
|
321
321
|
} catch {
|
|
322
322
|
return null;
|
|
323
323
|
}
|
|
324
|
-
},
|
|
324
|
+
}, $ = () => {
|
|
325
325
|
try {
|
|
326
|
-
return typeof sessionStorage > "u" ? "" : m(sessionStorage.getItem(
|
|
326
|
+
return typeof sessionStorage > "u" ? "" : m(sessionStorage.getItem(Q));
|
|
327
327
|
} catch {
|
|
328
328
|
return "";
|
|
329
329
|
}
|
|
330
|
-
},
|
|
330
|
+
}, st = (e) => {
|
|
331
331
|
try {
|
|
332
|
-
typeof sessionStorage < "u" && sessionStorage.setItem(
|
|
332
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(Q, e);
|
|
333
333
|
} catch {
|
|
334
334
|
}
|
|
335
|
-
},
|
|
335
|
+
}, X = () => {
|
|
336
336
|
var t;
|
|
337
|
-
const e =
|
|
337
|
+
const e = h();
|
|
338
338
|
try {
|
|
339
339
|
return m((t = e == null ? void 0 : e.__UPF_TIMEZONE_SNAPSHOT__) == null ? void 0 : t.timeZone);
|
|
340
340
|
} catch {
|
|
@@ -342,7 +342,7 @@ const m = (e) => (e || "").trim(), R = (e) => {
|
|
|
342
342
|
}
|
|
343
343
|
}, x = () => {
|
|
344
344
|
var t;
|
|
345
|
-
const e =
|
|
345
|
+
const e = h();
|
|
346
346
|
if (!(e != null && e.name)) return "";
|
|
347
347
|
try {
|
|
348
348
|
const n = (t = JSON.parse(e.name || "{}")) == null ? void 0 : t.parentData;
|
|
@@ -350,29 +350,29 @@ const m = (e) => (e || "").trim(), R = (e) => {
|
|
|
350
350
|
} catch {
|
|
351
351
|
return "";
|
|
352
352
|
}
|
|
353
|
-
},
|
|
353
|
+
}, ze = (e, t) => ({
|
|
354
354
|
timeZone: m(e),
|
|
355
355
|
source: t,
|
|
356
356
|
timestamp: Date.now()
|
|
357
357
|
});
|
|
358
|
-
let U =
|
|
359
|
-
const
|
|
358
|
+
let U = X() || x() || $();
|
|
359
|
+
const Se = {
|
|
360
360
|
get value() {
|
|
361
361
|
return U;
|
|
362
362
|
},
|
|
363
363
|
set value(e) {
|
|
364
|
-
|
|
364
|
+
mt(e, { source: "clientTimeZone.value" });
|
|
365
365
|
}
|
|
366
|
-
},
|
|
367
|
-
let
|
|
368
|
-
const
|
|
366
|
+
}, J = /* @__PURE__ */ new Set();
|
|
367
|
+
let ce = !1;
|
|
368
|
+
const _e = () => {
|
|
369
369
|
if (!(typeof Intl > "u" || typeof Intl.DateTimeFormat != "function"))
|
|
370
370
|
try {
|
|
371
371
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
372
372
|
} catch {
|
|
373
373
|
return;
|
|
374
374
|
}
|
|
375
|
-
},
|
|
375
|
+
}, it = (e) => {
|
|
376
376
|
if (!e) return !1;
|
|
377
377
|
if (typeof Intl > "u" || typeof Intl.DateTimeFormat != "function") return !0;
|
|
378
378
|
try {
|
|
@@ -380,174 +380,174 @@ const ye = () => {
|
|
|
380
380
|
} catch {
|
|
381
381
|
return !1;
|
|
382
382
|
}
|
|
383
|
-
},
|
|
383
|
+
}, b = (e) => {
|
|
384
384
|
const t = m(e);
|
|
385
|
-
return t ? E.size ? E.has(t) :
|
|
385
|
+
return t ? E.size ? E.has(t) : it(t) : !1;
|
|
386
386
|
}, S = (e) => (E.clear(), e.zones.forEach((t) => {
|
|
387
387
|
const n = t.split("|")[0];
|
|
388
|
-
|
|
388
|
+
H(n);
|
|
389
389
|
}), (e.links || []).forEach((t) => {
|
|
390
390
|
t.split("|").forEach((n) => {
|
|
391
|
-
|
|
391
|
+
H(n);
|
|
392
392
|
});
|
|
393
|
-
}),
|
|
394
|
-
const n = t.runtimeSource || "fallback", o =
|
|
393
|
+
}), rt(), Array.from(E)), Xt = () => Array.from(E), ct = async (e, t = {}) => {
|
|
394
|
+
const n = t.runtimeSource || "fallback", o = Ee();
|
|
395
395
|
if ((o == null ? void 0 : o.source) === "iana" && n !== "iana") {
|
|
396
|
-
const
|
|
397
|
-
return
|
|
396
|
+
const s = p.preloadFromData(o), c = S(s);
|
|
397
|
+
return A || (u.extend(p), A = !0), j(t.defaultTimeZone), { data: s, knownTimeZones: c };
|
|
398
398
|
}
|
|
399
|
-
const r =
|
|
400
|
-
if (
|
|
401
|
-
const
|
|
402
|
-
|
|
399
|
+
const r = p.preloadFromData(e), a = S(r);
|
|
400
|
+
if (A || (u.extend(p), A = !0), j(t.defaultTimeZone), t.writeRuntimeSnapshot !== !1) {
|
|
401
|
+
const s = { ...r, timestamp: e == null ? void 0 : e.timestamp };
|
|
402
|
+
we(s, { source: n });
|
|
403
403
|
}
|
|
404
|
-
return { data: r, knownTimeZones:
|
|
405
|
-
},
|
|
406
|
-
const t = await
|
|
407
|
-
return
|
|
408
|
-
},
|
|
409
|
-
const { url: n, ...o } = t, r = n ? await
|
|
404
|
+
return { data: r, knownTimeZones: a };
|
|
405
|
+
}, en = async (e = {}) => {
|
|
406
|
+
const t = await p.preloadFromApi(e), n = S(t);
|
|
407
|
+
return A || (u.extend(p), A = !0), j(e.defaultTimeZone), e.writeRuntimeSnapshot !== !1 && we(t, { source: e.runtimeSource || "iana" }), { data: t, knownTimeZones: n };
|
|
408
|
+
}, tn = (e, t) => (De(e, t), S(t), t), nn = async (e, t = {}) => {
|
|
409
|
+
const { url: n, ...o } = t, r = n ? await Y(e, n, o) : await Y(e, o);
|
|
410
410
|
return S(r), r;
|
|
411
|
-
},
|
|
411
|
+
}, ut = () => {
|
|
412
412
|
var n;
|
|
413
|
-
const e = (n = u.tz) == null ? void 0 : n.guess, t = typeof e == "function" ? e :
|
|
413
|
+
const e = (n = u.tz) == null ? void 0 : n.guess, t = typeof e == "function" ? e : nt;
|
|
414
414
|
try {
|
|
415
415
|
return t == null ? void 0 : t();
|
|
416
416
|
} catch {
|
|
417
417
|
return;
|
|
418
418
|
}
|
|
419
|
-
},
|
|
419
|
+
}, j = (e) => {
|
|
420
420
|
var o, r;
|
|
421
421
|
const t = m(e), n = u.tz;
|
|
422
|
-
return t ?
|
|
423
|
-
},
|
|
424
|
-
const e =
|
|
425
|
-
return !e || !t ||
|
|
426
|
-
defaultTimeZone: U || x() ||
|
|
422
|
+
return t ? b(t) ? ((r = n == null ? void 0 : n.setDefault) == null || r.call(n, t), !0) : !1 : ((o = n == null ? void 0 : n.setDefault) == null || o.call(n, O), !0);
|
|
423
|
+
}, Le = () => {
|
|
424
|
+
const e = at(), t = ie(e);
|
|
425
|
+
return !e || !t || ie(Ee()) === t ? Promise.resolve(null) : (N && se === t || (se = t, N = ct(e, {
|
|
426
|
+
defaultTimeZone: U || x() || $(),
|
|
427
427
|
runtimeSource: e.source
|
|
428
|
-
}).catch((n) => null)),
|
|
429
|
-
},
|
|
430
|
-
|
|
428
|
+
}).catch((n) => null)), N);
|
|
429
|
+
}, ft = (e) => {
|
|
430
|
+
J.forEach((t) => {
|
|
431
431
|
try {
|
|
432
432
|
t(e.timeZone, e);
|
|
433
433
|
} catch {
|
|
434
434
|
}
|
|
435
435
|
});
|
|
436
|
-
},
|
|
436
|
+
}, lt = (e) => {
|
|
437
437
|
var t;
|
|
438
438
|
try {
|
|
439
|
-
(t =
|
|
439
|
+
(t = h()) == null || t.dispatchEvent(new CustomEvent(Ae, { detail: e }));
|
|
440
440
|
} catch {
|
|
441
441
|
}
|
|
442
|
-
},
|
|
443
|
-
const n = m(e), o =
|
|
442
|
+
}, ee = (e, t = {}) => {
|
|
443
|
+
const n = m(e), o = ze(n, t.source), r = U !== n;
|
|
444
444
|
r && (U = n);
|
|
445
445
|
try {
|
|
446
|
-
const
|
|
447
|
-
|
|
446
|
+
const a = h();
|
|
447
|
+
a && (a.__UPF_TIMEZONE_SNAPSHOT__ = o);
|
|
448
448
|
} catch {
|
|
449
449
|
}
|
|
450
|
-
return t.persist !== !1 &&
|
|
451
|
-
},
|
|
450
|
+
return t.persist !== !1 && st(n), t.syncDefault !== !1 && j(n), t.notify !== !1 && r && ft(o), t.dispatchEvent !== !1 && lt(o), n;
|
|
451
|
+
}, mt = (e, t = {}) => ee(m(e), {
|
|
452
452
|
persist: !0,
|
|
453
453
|
notify: !0,
|
|
454
454
|
dispatchEvent: !0,
|
|
455
455
|
syncDefault: !0,
|
|
456
456
|
...t
|
|
457
|
-
}),
|
|
458
|
-
|
|
459
|
-
const t =
|
|
460
|
-
return t ||
|
|
461
|
-
},
|
|
462
|
-
var n, o, r,
|
|
463
|
-
if (typeof e == "string") return
|
|
457
|
+
}), rn = (e = "sync") => {
|
|
458
|
+
Le();
|
|
459
|
+
const t = X() || x() || $();
|
|
460
|
+
return t || Se.value ? ee(t, { source: e, persist: !1, dispatchEvent: !1 }) : "";
|
|
461
|
+
}, on = (e) => (J.add(e), () => J.delete(e)), dt = (e) => {
|
|
462
|
+
var n, o, r, a;
|
|
463
|
+
if (typeof e == "string") return ze(e);
|
|
464
464
|
if (!e || typeof e != "object") return null;
|
|
465
465
|
const t = "timeZone" in e ? e.timeZone : e != null && e.detail && "timeZone" in e.detail ? e.detail.timeZone : e != null && e.params && "timeZone" in e.params ? e.params.timeZone : void 0;
|
|
466
466
|
return t == null ? null : {
|
|
467
467
|
timeZone: m(t),
|
|
468
468
|
source: e.source || ((n = e.detail) == null ? void 0 : n.source) || ((o = e.params) == null ? void 0 : o.source),
|
|
469
|
-
timestamp: Number(e.timestamp || ((r = e.detail) == null ? void 0 : r.timestamp) || ((
|
|
469
|
+
timestamp: Number(e.timestamp || ((r = e.detail) == null ? void 0 : r.timestamp) || ((a = e.params) == null ? void 0 : a.timestamp) || Date.now())
|
|
470
470
|
};
|
|
471
|
-
},
|
|
472
|
-
const n =
|
|
473
|
-
n &&
|
|
471
|
+
}, te = (e, t) => {
|
|
472
|
+
const n = dt(e);
|
|
473
|
+
n && ee(n.timeZone, {
|
|
474
474
|
source: n.source || t,
|
|
475
475
|
persist: !1,
|
|
476
476
|
dispatchEvent: !1
|
|
477
477
|
});
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
-
},
|
|
481
|
-
e.key ===
|
|
482
|
-
},
|
|
478
|
+
}, Tt = (e) => {
|
|
479
|
+
te(e.detail, "window-event");
|
|
480
|
+
}, ht = (e) => {
|
|
481
|
+
e.key === Q && te({ timeZone: e.newValue || "", source: "storage" }, "storage");
|
|
482
|
+
}, gt = (e) => {
|
|
483
483
|
const t = e.data;
|
|
484
|
-
!t || t.type !==
|
|
485
|
-
},
|
|
486
|
-
const e =
|
|
487
|
-
return !e ||
|
|
484
|
+
!t || t.type !== Xe || te(t.detail || t, "message");
|
|
485
|
+
}, It = () => {
|
|
486
|
+
const e = h();
|
|
487
|
+
return !e || ce ? !1 : (ce = !0, e.addEventListener(Ae, Tt), e.addEventListener("storage", ht), e.addEventListener("message", gt), !0);
|
|
488
488
|
};
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
const
|
|
492
|
-
const t = m(
|
|
493
|
-
return
|
|
494
|
-
},
|
|
495
|
-
const t = m(e) ||
|
|
496
|
-
return
|
|
497
|
-
},
|
|
489
|
+
It();
|
|
490
|
+
Le();
|
|
491
|
+
const yt = () => {
|
|
492
|
+
const t = m(Se.value) || X() || x() || $() || ut() || _e();
|
|
493
|
+
return b(t) ? m(t) : O;
|
|
494
|
+
}, T = (e) => {
|
|
495
|
+
const t = m(e) || yt();
|
|
496
|
+
return b(t) ? t : O;
|
|
497
|
+
}, Zt = () => {
|
|
498
498
|
var e;
|
|
499
|
-
return typeof window < "u" && ((e = window.navigator) != null && e.language) ? window.navigator.language :
|
|
500
|
-
},
|
|
501
|
-
const o = e ||
|
|
499
|
+
return typeof window < "u" && ((e = window.navigator) != null && e.language) ? window.navigator.language : y;
|
|
500
|
+
}, Dt = (e, t = []) => {
|
|
501
|
+
const o = e || Zt() || y, r = o.toLowerCase();
|
|
502
502
|
if (!t.length)
|
|
503
|
-
return r === "en" ? "en-US" : r === "zh" || r === "zh-cn" ?
|
|
504
|
-
const
|
|
505
|
-
if (
|
|
506
|
-
const
|
|
507
|
-
return c || (
|
|
508
|
-
},
|
|
503
|
+
return r === "en" ? "en-US" : r === "zh" || r === "zh-cn" ? y : o;
|
|
504
|
+
const a = t.find((i) => i.toLowerCase() === r);
|
|
505
|
+
if (a) return a;
|
|
506
|
+
const s = r.split("-")[0], c = t.find((i) => i.toLowerCase().split("-")[0] === s);
|
|
507
|
+
return c || (s === "en" ? t.find((i) => i.toLowerCase().startsWith("en-")) || o : s === "zh" ? t.find((i) => i.toLowerCase().startsWith("zh-")) || y : o);
|
|
508
|
+
}, C = (e) => {
|
|
509
509
|
if (u.isDayjs(e)) return e;
|
|
510
510
|
if (e == null || e === "") return u();
|
|
511
|
-
const t = u(
|
|
511
|
+
const t = u(v(e));
|
|
512
512
|
return t.isValid() ? t : u();
|
|
513
|
-
}, _ = (e) => e == null || e === "",
|
|
513
|
+
}, _ = (e) => e == null || e === "", v = (e) => {
|
|
514
514
|
if (typeof e != "string") return e;
|
|
515
515
|
const t = e.trim();
|
|
516
516
|
return /^\d{13}$/.test(t) ? Number(t) : /^\d{10}$/.test(t) ? Number(t) * 1e3 : e;
|
|
517
|
-
},
|
|
517
|
+
}, be = (e) => u.isDayjs(e) ? e : _(e) ? u() : u(v(e)), Ce = (e, t = !1) => {
|
|
518
518
|
const n = m(e);
|
|
519
|
-
return n ?
|
|
520
|
-
},
|
|
521
|
-
const n = t.format ||
|
|
522
|
-
if (!o) return
|
|
519
|
+
return n ? T(n) : t ? T() : "";
|
|
520
|
+
}, pt = (e, t) => C(e).tz(T(t)).utcOffset(), At = (e, t, n = pe) => C(e).tz(T(t)).format(n), wt = (e, t) => be(e).format(t.format), ve = (e, t) => {
|
|
521
|
+
const n = t.format || w, o = Ce(t.timeZone, t.useClientTimeZone);
|
|
522
|
+
if (!o) return wt(e, { format: n });
|
|
523
523
|
if (t.inputMode === "local")
|
|
524
|
-
return _(e) ? u().tz(o).format(n) : u.tz(
|
|
525
|
-
const r =
|
|
524
|
+
return _(e) ? u().tz(o).format(n) : u.tz(v(e), o).format(n);
|
|
525
|
+
const r = be(e);
|
|
526
526
|
return r.isValid() ? r.tz(o).format(n) : r.format(n);
|
|
527
|
-
},
|
|
527
|
+
}, Et = (e) => typeof e == "function", zt = (e, t) => {
|
|
528
528
|
var i, f;
|
|
529
|
-
const { moment: n } = t, o = t.format ||
|
|
530
|
-
if (!
|
|
531
|
-
const r = _(e) ? void 0 :
|
|
532
|
-
if (!
|
|
529
|
+
const { moment: n } = t, o = t.format || w;
|
|
530
|
+
if (!Et(n)) return ve(e, { ...t, dateLibrary: "dayjs" });
|
|
531
|
+
const r = _(e) ? void 0 : v(e), a = Ce(t.timeZone, t.useClientTimeZone);
|
|
532
|
+
if (!a || typeof n.tz != "function") return n(r).format(o);
|
|
533
533
|
if (t.inputMode === "local")
|
|
534
|
-
return _(e) ? ((f = (i = n()).tz) == null ? void 0 : f.call(i,
|
|
535
|
-
const
|
|
536
|
-
return (typeof
|
|
537
|
-
},
|
|
534
|
+
return _(e) ? ((f = (i = n()).tz) == null ? void 0 : f.call(i, a).format(o)) || n().format(o) : n.tz(r, a).format(o);
|
|
535
|
+
const s = n(r);
|
|
536
|
+
return (typeof s.tz == "function" ? s.tz(a) : n.tz(r, a)).format(o);
|
|
537
|
+
}, St = (e, t = {}) => {
|
|
538
538
|
const n = typeof t == "string" ? { format: t } : t || {}, o = {
|
|
539
539
|
...n,
|
|
540
|
-
format: n.format ||
|
|
540
|
+
format: n.format || w
|
|
541
541
|
};
|
|
542
|
-
return o.dateLibrary === "moment" ?
|
|
543
|
-
},
|
|
544
|
-
function
|
|
545
|
-
const r = typeof t == "object" && t !== null ? t : { timeZone: t, format: n, locale: o },
|
|
546
|
-
if (Number.isNaN(
|
|
547
|
-
const
|
|
542
|
+
return o.dateLibrary === "moment" ? zt(e, o) : ve(e, o);
|
|
543
|
+
}, an = (e, t = w, n = {}) => St(e, { ...n, format: t }), I = (e) => String(e).padStart(2, "0"), _t = (e) => u.isDayjs(e) ? e.toDate() : _(e) ? /* @__PURE__ */ new Date() : new Date(v(e)), ue = (e, t, n) => t.replace(/YYYY/g, n.year || `${e.getFullYear()}`).replace(/MM/g, n.month || I(e.getMonth() + 1)).replace(/DD/g, n.day || I(e.getDate())).replace(/HH/g, n.hour || I(e.getHours())).replace(/mm/g, n.minute || I(e.getMinutes())).replace(/ss/g, n.second || I(e.getSeconds())), Lt = () => _e() || O;
|
|
544
|
+
function sn(e, t, n = w, o = y) {
|
|
545
|
+
const r = typeof t == "object" && t !== null ? t : { timeZone: t, format: n, locale: o }, a = _t(e);
|
|
546
|
+
if (Number.isNaN(a.getTime())) return "";
|
|
547
|
+
const s = m(r.timeZone) || Lt(), c = r.format || w;
|
|
548
548
|
try {
|
|
549
|
-
const f = new Intl.DateTimeFormat(r.locale ||
|
|
550
|
-
timeZone:
|
|
549
|
+
const f = new Intl.DateTimeFormat(r.locale || y, {
|
|
550
|
+
timeZone: s,
|
|
551
551
|
year: "numeric",
|
|
552
552
|
month: "2-digit",
|
|
553
553
|
day: "2-digit",
|
|
@@ -555,151 +555,151 @@ function Rt(e, t, n = A, o = I) {
|
|
|
555
555
|
minute: "2-digit",
|
|
556
556
|
second: "2-digit",
|
|
557
557
|
hour12: !1
|
|
558
|
-
}).formatToParts(
|
|
559
|
-
return
|
|
558
|
+
}).formatToParts(a).reduce((l, d) => (d.type !== "literal" && (l[d.type] = d.value), l), {});
|
|
559
|
+
return ue(a, c, f);
|
|
560
560
|
} catch {
|
|
561
|
-
return
|
|
561
|
+
return ue(a, c, {});
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
|
-
const
|
|
565
|
-
const n =
|
|
566
|
-
return `UTC${o}${
|
|
567
|
-
},
|
|
564
|
+
const ke = (e) => `UTC${e}`, Ne = (e, t) => {
|
|
565
|
+
const n = pt(e, t), o = n >= 0 ? "+" : "-", r = Math.abs(n);
|
|
566
|
+
return `UTC${o}${I(Math.floor(r / 60))}:${I(r % 60)}`;
|
|
567
|
+
}, bt = (e, t = /* @__PURE__ */ new Date()) => {
|
|
568
568
|
const n = e.currentUtcOffsetText || e.baseUtcOffsetText;
|
|
569
|
-
return n ? `UTC${n}` :
|
|
570
|
-
},
|
|
569
|
+
return n ? `UTC${n}` : Ne(t, e.timeZoneId);
|
|
570
|
+
}, Ct = (e, t) => {
|
|
571
571
|
const n = e.match(/([+-]\d{1,2})(?::?(\d{2}))?/) || [];
|
|
572
572
|
if (!n[1]) return t;
|
|
573
|
-
const o = n[1].startsWith("-") ? "-" : "+", r = n[1].replace(/[+-]/, "").padStart(2, "0"),
|
|
574
|
-
return `UTC${o}${r}:${
|
|
575
|
-
},
|
|
576
|
-
var r,
|
|
577
|
-
const o =
|
|
573
|
+
const o = n[1].startsWith("-") ? "-" : "+", r = n[1].replace(/[+-]/, "").padStart(2, "0"), a = n[2] || "00";
|
|
574
|
+
return `UTC${o}${r}:${a}`;
|
|
575
|
+
}, vt = (e, t, n) => {
|
|
576
|
+
var r, a;
|
|
577
|
+
const o = ke(n.format("Z"));
|
|
578
578
|
try {
|
|
579
|
-
const
|
|
580
|
-
return c ? /^(gmt|utc)/i.test(c) ?
|
|
579
|
+
const s = Intl.DateTimeFormat.supportedLocalesOf([t])[0] || t, c = (a = (r = new Intl.DateTimeFormat(s, { timeZone: e, timeZoneName: "long" }).formatToParts(n.toDate()).find((i) => i.type === "timeZoneName")) == null ? void 0 : r.value) == null ? void 0 : a.trim();
|
|
580
|
+
return c ? /^(gmt|utc)/i.test(c) ? Ct(c, o) : c : o;
|
|
581
581
|
} catch {
|
|
582
582
|
return o;
|
|
583
583
|
}
|
|
584
|
-
},
|
|
584
|
+
}, Me = (e, t) => {
|
|
585
585
|
const n = t.year();
|
|
586
586
|
return Array.from(
|
|
587
587
|
new Set(
|
|
588
588
|
Array.from({ length: 12 }, (o, r) => {
|
|
589
|
-
const
|
|
590
|
-
return u.tz(
|
|
589
|
+
const a = `${r + 1}`.padStart(2, "0"), s = `${n}-${a}-15 12:00:00`;
|
|
590
|
+
return u.tz(s, e).utcOffset();
|
|
591
591
|
})
|
|
592
592
|
)
|
|
593
593
|
);
|
|
594
|
-
},
|
|
595
|
-
const n =
|
|
596
|
-
if (!
|
|
597
|
-
const o =
|
|
598
|
-
return
|
|
594
|
+
}, Fe = (e, t) => {
|
|
595
|
+
const n = T(e);
|
|
596
|
+
if (!b(n)) return !1;
|
|
597
|
+
const o = C(t).tz(n);
|
|
598
|
+
return Me(n, o).length > 1;
|
|
599
599
|
}, V = (e, t) => {
|
|
600
|
-
const n =
|
|
601
|
-
if (!
|
|
602
|
-
const o =
|
|
600
|
+
const n = T(e);
|
|
601
|
+
if (!b(n)) return !1;
|
|
602
|
+
const o = C(t).tz(n), r = Me(n, o);
|
|
603
603
|
return r.length <= 1 ? !1 : o.utcOffset() === Math.max(...r);
|
|
604
|
-
},
|
|
604
|
+
}, cn = (e, t) => V(e, t), Pe = (e) => {
|
|
605
605
|
if (e === 1 || e === "1") return !0;
|
|
606
606
|
if (e === 0 || e === "0") return !1;
|
|
607
|
-
},
|
|
608
|
-
const n =
|
|
609
|
-
return typeof n == "boolean" ? n :
|
|
610
|
-
},
|
|
611
|
-
const n =
|
|
607
|
+
}, kt = (e, t) => {
|
|
608
|
+
const n = Pe(e.dynamicOffsetFlag);
|
|
609
|
+
return typeof n == "boolean" ? n : Fe(e.timeZoneId, t);
|
|
610
|
+
}, Nt = (e, t) => {
|
|
611
|
+
const n = Pe(e.currentDstFlag);
|
|
612
612
|
return typeof n == "boolean" ? n : V(e.timeZoneId, t);
|
|
613
|
-
},
|
|
614
|
-
const o = n.tzShowName ||
|
|
613
|
+
}, un = (e, t = /* @__PURE__ */ new Date()) => e.map((n) => {
|
|
614
|
+
const o = n.tzShowName || bt(n, t), r = kt(n, t);
|
|
615
615
|
return {
|
|
616
616
|
value: n.timeZoneId,
|
|
617
617
|
zoneName: o,
|
|
618
618
|
label: o,
|
|
619
619
|
hasDST: r,
|
|
620
|
-
isDST: r ?
|
|
620
|
+
isDST: r ? Nt(n, t) : !1
|
|
621
621
|
};
|
|
622
|
-
}),
|
|
622
|
+
}), Mt = (e) => {
|
|
623
623
|
const t = e.toLowerCase().split("-")[0];
|
|
624
|
-
return
|
|
625
|
-
},
|
|
624
|
+
return ae[t] || ae.default;
|
|
625
|
+
}, Ft = (e) => typeof e.showDaylightSavingLabel == "boolean" ? e.showDaylightSavingLabel : e.showDaylightSavingMarker ?? !0, fn = (e, t, n = {}) => {
|
|
626
626
|
const {
|
|
627
627
|
showZoneLabel: o = !0,
|
|
628
628
|
zoneLabel: r,
|
|
629
|
-
hasDST:
|
|
630
|
-
isDST:
|
|
629
|
+
hasDST: a,
|
|
630
|
+
isDST: s,
|
|
631
631
|
standardTimeLabel: c,
|
|
632
632
|
daylightSavingLabel: i,
|
|
633
|
-
format: f =
|
|
634
|
-
} = n, l =
|
|
635
|
-
return o ? [d, r ||
|
|
636
|
-
},
|
|
637
|
-
const t =
|
|
633
|
+
format: f = pe
|
|
634
|
+
} = n, l = T(t), d = At(e, l, f), Z = typeof a == "boolean" ? a : Fe(l, e), g = (typeof s == "boolean" ? s : V(l, e)) ? i : c, D = Z && g ? `[${g}]` : "";
|
|
635
|
+
return o ? [d, r || Ne(e, l), D].filter(Boolean).join(" ") : [d, D].filter(Boolean).join(" ");
|
|
636
|
+
}, ln = (e = {}) => {
|
|
637
|
+
const t = Dt(e.locale, e.supportedLocales), n = T(e.timeZone), o = C(e.value).tz(n), r = vt(n, t, o), a = ke(o.format("Z")), s = V(n, o), c = s ? Mt(t) : "", i = Ft(e), f = s && i ? `${r} - ${c}` : r;
|
|
638
638
|
return {
|
|
639
|
-
formattedValue: o.format(e.format ||
|
|
639
|
+
formattedValue: o.format(e.format || Qe),
|
|
640
640
|
locale: t,
|
|
641
641
|
timeZone: n,
|
|
642
642
|
timeZoneName: r,
|
|
643
643
|
timeZoneLabel: f,
|
|
644
|
-
offsetLabel:
|
|
644
|
+
offsetLabel: a,
|
|
645
645
|
offsetMinutes: o.utcOffset(),
|
|
646
|
-
isDaylightSavingTime:
|
|
646
|
+
isDaylightSavingTime: s,
|
|
647
647
|
daylightSavingLabel: c
|
|
648
648
|
};
|
|
649
649
|
};
|
|
650
650
|
export {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
651
|
+
et as IANA_TIMEZONE_DATA_CHANGE_EVENT,
|
|
652
|
+
Ae as TIMEZONE_CHANGE_EVENT,
|
|
653
|
+
Ht as TIME_ZONE_PACKED_DATA_URL,
|
|
654
|
+
G as UPF_IANA_TIMEZONE_DATA_KEY,
|
|
655
|
+
Xe as UPF_TIMEZONE_MESSAGE_TYPE,
|
|
656
|
+
ct as applyDayjsIanaTimeZoneData,
|
|
657
|
+
tn as applyMomentIanaTimeZoneData,
|
|
658
|
+
$t as assertPackedIanaData,
|
|
659
|
+
Wt as assertPackedIanaTzData,
|
|
660
|
+
Bt as buildIanaFetchInit,
|
|
661
|
+
un as buildTimeZoneDisplayOptions,
|
|
662
|
+
Yt as clearDayjsIanaCache,
|
|
663
|
+
Se as clientTimeZone,
|
|
664
|
+
Gt as createIanaDbFromPackedData,
|
|
665
|
+
p as dayjsTimezoneIanaPlugin,
|
|
666
|
+
Le as ensureInjectedIanaTimeZoneData,
|
|
667
|
+
fn as formatClientLocalDateTimeLine,
|
|
668
|
+
At as formatInTimeZone,
|
|
669
|
+
St as formatLocalDateTime,
|
|
670
|
+
sn as formatLocalDateTimeIntl,
|
|
671
|
+
Ne as formatTimeZoneOffsetLabel,
|
|
672
|
+
Jt as getAccessTokenFromLocalStorage,
|
|
673
|
+
Lt as getBrowserTimeZone,
|
|
674
|
+
Vt as getCachedDayjsPackedIanaData,
|
|
675
|
+
yt as getClientTimeZone,
|
|
676
|
+
Kt as getDefaultIanaAuthorization,
|
|
677
|
+
Xt as getKnownTimeZoneIds,
|
|
678
|
+
Ee as getRuntimeIanaTimeZoneDataSnapshot,
|
|
679
|
+
ln as getTimeZoneDisplayInfo,
|
|
680
|
+
pt as getZoneUtcOffset,
|
|
681
|
+
It as initClientTimeZoneSync,
|
|
682
|
+
cn as isDaylightSavingTime,
|
|
683
|
+
b as isKnownTimeZone,
|
|
684
|
+
en as loadDayjsIanaTimeZoneData,
|
|
685
|
+
qt as loadIanaData,
|
|
686
|
+
Qt as loadIanaFromApi,
|
|
687
|
+
De as loadMomentIanaData,
|
|
688
|
+
Y as loadMomentIanaFromApi,
|
|
689
|
+
nn as loadMomentIanaTimeZoneData,
|
|
690
|
+
Dt as normalizeLocaleCode,
|
|
691
|
+
on as onClientTimeZoneChange,
|
|
692
|
+
Rt as preloadDayjsIanaFromApi,
|
|
693
|
+
xt as preloadDayjsIanaFromData,
|
|
694
|
+
at as readInjectedParentIanaTimeZoneDataSnapshot,
|
|
695
695
|
S as rebuildKnownTimeZoneIds,
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
696
|
+
T as resolveTimeZone,
|
|
697
|
+
bt as resolveUtcOffsetFallback,
|
|
698
|
+
mt as setClientTimeZone,
|
|
699
|
+
j as setDefaultTimeZone,
|
|
700
|
+
we as setRuntimeIanaTimeZoneDataSnapshot,
|
|
701
|
+
rn as syncClientTimeZone,
|
|
702
|
+
Fe as timeZoneHasDST,
|
|
703
703
|
V as timeZoneIsDST,
|
|
704
|
-
|
|
704
|
+
an as toLocalDate
|
|
705
705
|
};
|