@das-fed/upf-utils 6.4.0-hot.13 → 6.4.0-hot.14
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 +1811 -1697
- package/api-services/index.js +1456 -1363
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +2116 -2001
- package/api-services/modules/app-manage/index.js +1846 -1752
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +1769 -1666
- package/api-services/modules/authentication/index.js +1509 -1433
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +1732 -1629
- package/api-services/modules/bems/index.js +1468 -1392
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +1769 -1666
- package/api-services/modules/contract/index.js +1509 -1433
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +1953 -1850
- package/api-services/modules/duty-manage/index.js +1688 -1612
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +1769 -1666
- package/api-services/modules/enterpriseright/index.js +1509 -1433
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +1394 -1292
- package/api-services/modules/file/es5.js +1701 -1611
- package/api-services/modules/file/index.js +1411 -1354
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +1769 -1666
- package/api-services/modules/gateway-edge/index.js +1509 -1433
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1063 -988
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +2005 -1890
- package/api-services/modules/iot/index.js +1741 -1647
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +1945 -1845
- package/api-services/modules/justauth/index.js +1672 -1600
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +2115 -2003
- package/api-services/modules/knowledge/index.js +1846 -1756
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +1769 -1666
- package/api-services/modules/link/index.js +1509 -1433
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +1769 -1666
- package/api-services/modules/permission/index.js +1509 -1433
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +2068 -1977
- package/api-services/modules/platformManage/index.js +1829 -1771
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +1769 -1666
- package/api-services/modules/portal/index.js +1509 -1433
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +1950 -1847
- package/api-services/modules/space-manage/index.js +1681 -1605
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +1942 -1851
- package/api-services/modules/super-admin/index.js +1685 -1627
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +1771 -1668
- package/api-services/modules/supplier/index.js +1511 -1435
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +2116 -2001
- package/api-services/modules/supplychain-manage/index.js +1846 -1752
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +1769 -1666
- package/api-services/modules/systemConfiguration/index.js +1509 -1433
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +2116 -2001
- package/api-services/modules/tool/index.js +1846 -1752
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +2114 -1999
- package/api-services/src/create-service/index.js +1844 -1750
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +2125 -2034
- package/common-info/getPermissionMethod/es5.js +1943 -1852
- package/common-info/getPermissionMethod/index.js +1700 -1642
- package/common-info/getPermissionMethod/index.js.gz +0 -0
- package/common-info/index.js +1856 -1798
- package/common-info/index.js.gz +0 -0
- package/common-tools/timezone-format/es5.d.ts +56 -2
- package/common-tools/timezone-format/es5.js +778 -512
- package/common-tools/timezone-format/index.d.ts +56 -2
- package/common-tools/timezone-format/index.js +539 -323
- package/common-tools/timezone-format/index.js.gz +0 -0
- package/create-api-service/es5.js +2115 -2000
- package/create-api-service/index.js +1845 -1751
- package/create-api-service/index.js.gz +0 -0
- package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.d.ts +29 -0
- package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.js +19826 -0
- package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.js.gz +0 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/index.d.ts +55 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/index.js +116 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/index.js.gz +0 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-event-listener.d.ts +104 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-event-listener.js +17 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.d.ts +8 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.js +51 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.js.gz +0 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/create-canvas.d.ts +5 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/create-canvas.js +14 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.d.ts +7 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.js +5 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.d.ts +5 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.js +180 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.js.gz +0 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.d.ts +4 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.js +7535 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.js.gz +0 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/load-json.d.ts +6 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/load-json.js +13 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.d.ts +6 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.js +7 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/rule.d.ts +8 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/rule.js +193 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/rule.js.gz +0 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.d.ts +11 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.js +20 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.d.ts +5 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.js +52 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.js.gz +0 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/wheel-zoom.d.ts +4 -0
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/wheel-zoom.js +14 -0
- package/dimple-canvas/use-dimple-canvas/es5.d.ts +9 -0
- package/dimple-canvas/use-dimple-canvas/es5.js +20 -0
- package/dimple-canvas/use-dimple-canvas/index.d.ts +9 -0
- package/dimple-canvas/use-dimple-canvas/index.js +10 -0
- package/esm-map.json +31 -1
- package/package.json +3 -3
- package/theme/bridge.d.ts +42 -0
- package/theme/color.d.ts +7 -0
- package/theme/es5.d.ts +15 -32
- package/theme/es5.js +1120 -651
- package/theme/index.d.ts +15 -32
- package/theme/index.js +720 -468
- package/theme/index.js.gz +0 -0
- package/theme/source-variables.d.ts +35 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import f from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { ref as Ie } from "vue";
|
|
3
|
+
import De from "dayjs/plugin/utc";
|
|
4
|
+
import we from "dayjs/plugin/timezone";
|
|
4
5
|
import "@das-fed/upf-utils/config";
|
|
5
|
-
const
|
|
6
|
-
function
|
|
6
|
+
const ne = "/api/admin/basic-application/sys-info/v1/license/time-zone-packed-data";
|
|
7
|
+
function pe() {
|
|
7
8
|
if (typeof localStorage > "u")
|
|
8
9
|
return null;
|
|
9
10
|
try {
|
|
@@ -12,428 +13,643 @@ function nt() {
|
|
|
12
13
|
return null;
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
if (!(
|
|
18
|
-
return
|
|
16
|
+
function Ae() {
|
|
17
|
+
const e = pe();
|
|
18
|
+
if (!(e == null || e === ""))
|
|
19
|
+
return e.trim().startsWith("Bearer ") ? e.trim() : `Bearer ${e.trim()}`;
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
21
|
+
function oe(e = {}) {
|
|
22
|
+
const t = e.authorization !== void 0 ? e.authorization === "" || e.authorization == null ? void 0 : e.authorization : Ae(), n = { ...e.headers || {} };
|
|
23
|
+
if (t != null && t !== "" && (n.Authorization = t), Object.keys(n).length !== 0)
|
|
23
24
|
return { headers: n };
|
|
24
25
|
}
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
let _ = null, p = null;
|
|
27
|
+
const J = [
|
|
28
|
+
"utc",
|
|
29
|
+
"uct",
|
|
30
|
+
"zulu",
|
|
31
|
+
"universal",
|
|
32
|
+
"etc/utc",
|
|
33
|
+
"etc/uct",
|
|
34
|
+
"etc/zulu",
|
|
35
|
+
"etc/universal",
|
|
36
|
+
"gmt",
|
|
37
|
+
"gmt0",
|
|
38
|
+
"gmt+0",
|
|
39
|
+
"gmt-0",
|
|
40
|
+
"greenwich",
|
|
41
|
+
"etc/gmt",
|
|
42
|
+
"etc/gmt0",
|
|
43
|
+
"etc/gmt+0",
|
|
44
|
+
"etc/gmt-0",
|
|
45
|
+
"etc/greenwich"
|
|
46
|
+
], Ee = { u: [1 / 0], o: [0] };
|
|
47
|
+
function re(e) {
|
|
48
|
+
if (!e || typeof e != "object")
|
|
28
49
|
throw new Error("Invalid IANA response: expected an object");
|
|
29
|
-
const
|
|
30
|
-
if (!Array.isArray(
|
|
50
|
+
const t = e;
|
|
51
|
+
if (!Array.isArray(t.zones))
|
|
31
52
|
throw new Error("Invalid IANA response: missing zones array");
|
|
32
|
-
const n =
|
|
53
|
+
const n = t.links;
|
|
33
54
|
return {
|
|
34
|
-
version: typeof
|
|
35
|
-
zones:
|
|
55
|
+
version: typeof t.version == "string" ? t.version : void 0,
|
|
56
|
+
zones: t.zones,
|
|
36
57
|
links: Array.isArray(n) ? n : []
|
|
37
58
|
};
|
|
38
59
|
}
|
|
39
|
-
async function
|
|
60
|
+
async function ze(e, t) {
|
|
40
61
|
if (typeof fetch != "function")
|
|
41
62
|
throw new Error("fetch is not available. Pass preloadFromApi options.fetchJson.");
|
|
42
|
-
const n = await fetch(
|
|
63
|
+
const n = await fetch(e, t);
|
|
43
64
|
if (!n.ok)
|
|
44
65
|
throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
|
|
45
66
|
return n.json();
|
|
46
67
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
68
|
+
function se(e) {
|
|
69
|
+
return p = re(e), _ = Oe(p), p;
|
|
49
70
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
71
|
+
function Se() {
|
|
72
|
+
return p;
|
|
52
73
|
}
|
|
53
|
-
async function
|
|
54
|
-
const
|
|
55
|
-
authorization:
|
|
56
|
-
headers:
|
|
57
|
-
}),
|
|
58
|
-
return
|
|
74
|
+
async function _e(e = {}) {
|
|
75
|
+
const t = e.url ?? ne, n = oe({
|
|
76
|
+
authorization: e.authorization,
|
|
77
|
+
headers: e.headers
|
|
78
|
+
}), r = await (e.fetchJson ?? ze)(t, n), s = e.parseResponse ? e.parseResponse(r) : re(r);
|
|
79
|
+
return se(s);
|
|
59
80
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
81
|
+
function Ce() {
|
|
82
|
+
_ = null, p = null;
|
|
62
83
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
84
|
+
function B(e) {
|
|
85
|
+
return e > 96 ? e - 87 : e > 64 ? e - 29 : e - 48;
|
|
65
86
|
}
|
|
66
|
-
function
|
|
67
|
-
let
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
for (let
|
|
71
|
-
const
|
|
72
|
-
|
|
87
|
+
function Le(e) {
|
|
88
|
+
let t = 1, n = 0, o = 0, r = 1;
|
|
89
|
+
const s = e.split("."), i = s[0], c = s[1] || "";
|
|
90
|
+
e.charCodeAt(0) === 45 && (t = -1);
|
|
91
|
+
for (let a = 0; a < i.length; a++) {
|
|
92
|
+
const u = i.charCodeAt(a);
|
|
93
|
+
u !== 45 && (n = 60 * n + B(u));
|
|
73
94
|
}
|
|
74
|
-
for (let
|
|
75
|
-
|
|
76
|
-
return (n +
|
|
95
|
+
for (let a = 0; a < c.length; a++)
|
|
96
|
+
r = r / 60, o += B(c.charCodeAt(a)) * r;
|
|
97
|
+
return (n + o) * t;
|
|
77
98
|
}
|
|
78
|
-
function
|
|
79
|
-
const
|
|
80
|
-
for (const n of
|
|
81
|
-
|
|
82
|
-
return
|
|
99
|
+
function O(e) {
|
|
100
|
+
const t = [];
|
|
101
|
+
for (const n of e)
|
|
102
|
+
t.push(Le(n));
|
|
103
|
+
return t;
|
|
83
104
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
105
|
+
function W(e) {
|
|
106
|
+
const t = e.trim();
|
|
107
|
+
return t ? t.split(" ") : [];
|
|
108
|
+
}
|
|
109
|
+
function be(e) {
|
|
110
|
+
let t = 0;
|
|
86
111
|
const n = [];
|
|
87
|
-
for (const
|
|
88
|
-
|
|
112
|
+
for (const o of e)
|
|
113
|
+
t += o, n.push(Math.round(t * 6e4));
|
|
89
114
|
return n.push(1 / 0), n;
|
|
90
115
|
}
|
|
91
|
-
function
|
|
116
|
+
function Me(e, t) {
|
|
92
117
|
const n = [];
|
|
93
|
-
for (const
|
|
94
|
-
n.push(
|
|
118
|
+
for (const o of t)
|
|
119
|
+
n.push(e[o]);
|
|
95
120
|
return n;
|
|
96
121
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
|
|
122
|
+
function C(e) {
|
|
123
|
+
return typeof e == "string" ? e.trim().toLowerCase() : "";
|
|
124
|
+
}
|
|
125
|
+
function ve(e) {
|
|
126
|
+
const t = e.split("|");
|
|
127
|
+
if (t.length < 5)
|
|
100
128
|
throw new Error("Invalid packed zone format");
|
|
101
|
-
const n =
|
|
129
|
+
const n = C(t[0]), o = O(W(t[2])), r = O(t[3].split("")), s = be(O(W(t[4]))), i = Me(o, r);
|
|
102
130
|
return {
|
|
103
131
|
name: n,
|
|
104
132
|
rule: {
|
|
105
|
-
u:
|
|
106
|
-
o:
|
|
133
|
+
u: s,
|
|
134
|
+
o: i
|
|
107
135
|
}
|
|
108
136
|
};
|
|
109
137
|
}
|
|
110
|
-
function
|
|
111
|
-
|
|
138
|
+
function ke(e, t, n) {
|
|
139
|
+
const o = C(t), r = C(n);
|
|
140
|
+
if (!o || !r) return;
|
|
141
|
+
const s = e[o], i = e[r];
|
|
142
|
+
s && !i ? e[r] = s : i && !s && (e[o] = i);
|
|
143
|
+
}
|
|
144
|
+
function Ne(e) {
|
|
145
|
+
const t = J.map((n) => e[n]).find(Boolean) || Ee;
|
|
146
|
+
J.forEach((n) => {
|
|
147
|
+
e[n] || (e[n] = t);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function Oe(e) {
|
|
151
|
+
if (!e || !Array.isArray(e.zones))
|
|
112
152
|
throw new TypeError("packed iana data must contain zones array");
|
|
113
|
-
const
|
|
114
|
-
for (const
|
|
115
|
-
const
|
|
116
|
-
|
|
153
|
+
const t = {};
|
|
154
|
+
for (const o of e.zones) {
|
|
155
|
+
const r = ve(o);
|
|
156
|
+
t[r.name] = r.rule;
|
|
117
157
|
}
|
|
118
|
-
const n =
|
|
119
|
-
for (const
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
continue;
|
|
123
|
-
const a = o[0].toLowerCase(), c = o[1].toLowerCase(), i = e[c];
|
|
124
|
-
i && (e[a] = i);
|
|
158
|
+
const n = e.links || [];
|
|
159
|
+
for (const o of n) {
|
|
160
|
+
const r = o.split("|");
|
|
161
|
+
r.length < 2 || ke(t, r[0], r[1]);
|
|
125
162
|
}
|
|
126
|
-
return
|
|
163
|
+
return Ne(t), t;
|
|
127
164
|
}
|
|
128
|
-
function
|
|
129
|
-
if (!
|
|
165
|
+
function Ue() {
|
|
166
|
+
if (!_)
|
|
130
167
|
throw new Error(
|
|
131
168
|
"IANA data not loaded. Await dayjsTimezoneIanaPlugin.preloadFromApi({ url: ... }) before dayjs.extend(dayjsTimezoneIanaPlugin)."
|
|
132
169
|
);
|
|
133
|
-
return
|
|
170
|
+
return _;
|
|
134
171
|
}
|
|
135
|
-
function
|
|
136
|
-
const
|
|
137
|
-
if (
|
|
138
|
-
throw Error("Unknown Time Zone " +
|
|
139
|
-
const
|
|
140
|
-
for (let
|
|
141
|
-
let
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
return a
|
|
172
|
+
function Pe(e, t, n) {
|
|
173
|
+
const o = C(t), r = n[o];
|
|
174
|
+
if (r === void 0)
|
|
175
|
+
throw Error("Unknown Time Zone " + t);
|
|
176
|
+
const s = r.o, i = r.u, c = i.length - 1;
|
|
177
|
+
for (let a = 0; a < c; a++) {
|
|
178
|
+
let u = s[a];
|
|
179
|
+
const l = s[a && a - 1];
|
|
180
|
+
if (u > l && (u = l), e < i[a] - u * 6e4)
|
|
181
|
+
return s[a];
|
|
145
182
|
}
|
|
146
|
-
return
|
|
183
|
+
return s[c];
|
|
147
184
|
}
|
|
148
|
-
const
|
|
149
|
-
var
|
|
150
|
-
let
|
|
151
|
-
const
|
|
152
|
-
const
|
|
153
|
-
return (typeof n.utc == "function" ? n.utc(
|
|
185
|
+
const Fe = (e, t, n) => {
|
|
186
|
+
var a, u;
|
|
187
|
+
let o = "";
|
|
188
|
+
const r = n.tz, s = (a = r == null ? void 0 : r.guess) == null ? void 0 : a.bind(r), i = (u = r == null ? void 0 : r.setDefault) == null ? void 0 : u.bind(r), c = (l, T, y) => {
|
|
189
|
+
const S = y || T || o, g = y ? T : void 0;
|
|
190
|
+
return (typeof n.utc == "function" ? n.utc(l, g) : n(l, g).utc()).tz(S);
|
|
154
191
|
};
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
},
|
|
158
|
-
var
|
|
159
|
-
const
|
|
160
|
-
return this.utcOffset(-
|
|
192
|
+
r && Object.assign(c, r), c.setDefault = (l) => {
|
|
193
|
+
o = l, i == null || i(l);
|
|
194
|
+
}, c.guess = () => s ? s() : typeof Intl < "u" && typeof Intl.DateTimeFormat == "function" ? Intl.DateTimeFormat().resolvedOptions().timeZone || o || "UTC" : o || "UTC", n.tz = c, t.prototype.tz = function(l = o, T) {
|
|
195
|
+
var Z;
|
|
196
|
+
const y = l || ((Z = c.guess) == null ? void 0 : Z.call(c)) || "UTC", S = this.utc().valueOf(), g = Pe(S, y, Ue());
|
|
197
|
+
return this.utcOffset(-g, T);
|
|
161
198
|
};
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
function
|
|
168
|
-
if (!
|
|
199
|
+
}, d = Fe;
|
|
200
|
+
d.preloadFromApi = _e;
|
|
201
|
+
d.preloadFromData = se;
|
|
202
|
+
d.getCachedPackedData = Se;
|
|
203
|
+
d.clearIanaCache = Ce;
|
|
204
|
+
function Ye(e) {
|
|
205
|
+
if (!e || typeof e != "object")
|
|
169
206
|
throw new Error("Invalid IANA response: expected an object");
|
|
170
|
-
const
|
|
171
|
-
if (!Array.isArray(
|
|
207
|
+
const t = e;
|
|
208
|
+
if (!Array.isArray(t.zones))
|
|
172
209
|
throw new Error("Invalid IANA response: missing zones array");
|
|
173
|
-
const n =
|
|
210
|
+
const n = t.links;
|
|
174
211
|
return {
|
|
175
|
-
version: typeof
|
|
176
|
-
zones:
|
|
212
|
+
version: typeof t.version == "string" ? t.version : void 0,
|
|
213
|
+
zones: t.zones,
|
|
177
214
|
links: Array.isArray(n) ? n : []
|
|
178
215
|
};
|
|
179
216
|
}
|
|
180
|
-
function
|
|
181
|
-
if (!
|
|
217
|
+
function ae(e, t) {
|
|
218
|
+
if (!e || typeof e.tz != "object" || typeof e.tz.load != "function")
|
|
182
219
|
throw new Error("moment.tz.load is missing. Import moment-timezone before calling loadIanaData.");
|
|
183
|
-
if (!
|
|
220
|
+
if (!t || !Array.isArray(t.zones))
|
|
184
221
|
throw new Error("Invalid packed IANA data: zones must be an array");
|
|
185
|
-
|
|
222
|
+
e.tz.load(t);
|
|
186
223
|
}
|
|
187
|
-
async function
|
|
224
|
+
async function je(e, t) {
|
|
188
225
|
if (typeof fetch != "function")
|
|
189
226
|
throw new Error("fetch is not available. Pass loadIanaFromApi options.fetchJson in Node or polyfill fetch.");
|
|
190
|
-
const n = await fetch(
|
|
227
|
+
const n = await fetch(e, t);
|
|
191
228
|
if (!n.ok)
|
|
192
229
|
throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
|
|
193
230
|
return n.json();
|
|
194
231
|
}
|
|
195
|
-
async function
|
|
196
|
-
let
|
|
197
|
-
typeof
|
|
198
|
-
const
|
|
199
|
-
authorization:
|
|
200
|
-
headers:
|
|
201
|
-
}),
|
|
202
|
-
return
|
|
232
|
+
async function K(e, t, n) {
|
|
233
|
+
let o = ne, r = {};
|
|
234
|
+
typeof t == "string" ? (o = t, r = n ?? {}) : t != null && (r = t);
|
|
235
|
+
const s = oe({
|
|
236
|
+
authorization: r.authorization,
|
|
237
|
+
headers: r.headers
|
|
238
|
+
}), c = await (r.fetchJson ?? je)(o, s), a = r.parseResponse ? r.parseResponse(c) : Ye(c);
|
|
239
|
+
return ae(e, a), a;
|
|
203
240
|
}
|
|
204
|
-
f.extend(
|
|
205
|
-
f.extend(
|
|
206
|
-
const
|
|
241
|
+
f.extend(De);
|
|
242
|
+
f.extend(we);
|
|
243
|
+
const I = "zh-CN", Ve = "YYYY.MM.DD HH:mm:ss", A = "YYYY-MM-DD HH:mm:ss", ie = "YYYY-MM-DD HH:mm", Y = "UTC", j = "timeZone", ce = "timezonechange", xe = "__UPF_TIMEZONE_CHANGE__", Re = "ianatimezonedatachange", q = {
|
|
207
244
|
zh: "夏令时",
|
|
208
245
|
default: "DST"
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
246
|
+
}, Ge = [
|
|
247
|
+
"UTC",
|
|
248
|
+
"UCT",
|
|
249
|
+
"Zulu",
|
|
250
|
+
"Universal",
|
|
251
|
+
"Etc/UTC",
|
|
252
|
+
"Etc/UCT",
|
|
253
|
+
"Etc/Zulu",
|
|
254
|
+
"Etc/Universal",
|
|
255
|
+
"GMT",
|
|
256
|
+
"GMT0",
|
|
257
|
+
"GMT+0",
|
|
258
|
+
"GMT-0",
|
|
259
|
+
"Greenwich",
|
|
260
|
+
"Etc/GMT",
|
|
261
|
+
"Etc/GMT0",
|
|
262
|
+
"Etc/GMT+0",
|
|
263
|
+
"Etc/GMT-0",
|
|
264
|
+
"Etc/Greenwich"
|
|
265
|
+
], He = f, D = /* @__PURE__ */ new Set();
|
|
266
|
+
var ee, te;
|
|
267
|
+
const $e = (te = (ee = f.tz) == null ? void 0 : ee.guess) == null ? void 0 : te.bind(f.tz);
|
|
268
|
+
let L = !1;
|
|
269
|
+
const m = (e) => (e || "").trim(), U = (e) => {
|
|
270
|
+
const t = m(e);
|
|
271
|
+
t && D.add(t);
|
|
272
|
+
}, Je = () => Ge.forEach(U), w = () => typeof window > "u" ? void 0 : window, Be = (e) => ({
|
|
273
|
+
version: typeof e.version == "string" ? e.version : void 0,
|
|
274
|
+
zones: Array.isArray(e.zones) ? e.zones.filter((t) => typeof t == "string") : [],
|
|
275
|
+
links: Array.isArray(e.links) ? e.links.filter((t) => typeof t == "string") : []
|
|
276
|
+
}), P = (e, t, n = Date.now()) => ({
|
|
277
|
+
...Be(e),
|
|
278
|
+
source: t,
|
|
279
|
+
timestamp: n
|
|
280
|
+
}), v = (e, t = "iana") => {
|
|
281
|
+
const n = P(e, t);
|
|
282
|
+
try {
|
|
283
|
+
const o = w();
|
|
284
|
+
o && (o.__UPF_IANA_TIMEZONE_DATA__ = n, o.dispatchEvent(new CustomEvent(Re, { detail: n })));
|
|
285
|
+
} catch {
|
|
286
|
+
}
|
|
287
|
+
return n;
|
|
288
|
+
}, We = () => {
|
|
289
|
+
var o;
|
|
290
|
+
const e = w(), t = e == null ? void 0 : e.__UPF_IANA_TIMEZONE_DATA__;
|
|
291
|
+
if (t && Array.isArray(t.zones) && t.zones.length)
|
|
292
|
+
return P(
|
|
293
|
+
t,
|
|
294
|
+
t.source === "fallback" ? "fallback" : "iana",
|
|
295
|
+
Number(t.timestamp || Date.now())
|
|
296
|
+
);
|
|
297
|
+
const n = (o = d.getCachedPackedData) == null ? void 0 : o.call(d);
|
|
298
|
+
return n ? P(n, "iana") : null;
|
|
299
|
+
}, Ct = We, V = () => {
|
|
300
|
+
try {
|
|
301
|
+
return typeof sessionStorage > "u" ? "" : m(sessionStorage.getItem(j));
|
|
302
|
+
} catch {
|
|
303
|
+
return "";
|
|
304
|
+
}
|
|
305
|
+
}, Ke = (e) => {
|
|
306
|
+
try {
|
|
307
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(j, e);
|
|
308
|
+
} catch {
|
|
309
|
+
}
|
|
310
|
+
}, x = () => {
|
|
311
|
+
var t;
|
|
312
|
+
const e = w();
|
|
313
|
+
if (!(e != null && e.name)) return "";
|
|
314
|
+
try {
|
|
315
|
+
const n = (t = JSON.parse(e.name || "{}")) == null ? void 0 : t.parentData;
|
|
316
|
+
return m(n == null ? void 0 : n.timeZone);
|
|
317
|
+
} catch {
|
|
318
|
+
return "";
|
|
319
|
+
}
|
|
320
|
+
}, fe = (e, t) => ({
|
|
321
|
+
timeZone: m(e),
|
|
322
|
+
source: t,
|
|
323
|
+
timestamp: Date.now()
|
|
324
|
+
}), b = Ie(V() || x()), F = /* @__PURE__ */ new Set();
|
|
325
|
+
let Q = !1;
|
|
326
|
+
const qe = () => {
|
|
214
327
|
if (!(typeof Intl > "u" || typeof Intl.DateTimeFormat != "function"))
|
|
215
328
|
try {
|
|
216
329
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
217
330
|
} catch {
|
|
218
331
|
return;
|
|
219
332
|
}
|
|
220
|
-
},
|
|
221
|
-
if (!
|
|
333
|
+
}, Qe = (e) => {
|
|
334
|
+
if (!e) return !1;
|
|
222
335
|
if (typeof Intl > "u" || typeof Intl.DateTimeFormat != "function") return !0;
|
|
223
336
|
try {
|
|
224
|
-
return new Intl.DateTimeFormat(void 0, { timeZone:
|
|
337
|
+
return new Intl.DateTimeFormat(void 0, { timeZone: e }), !0;
|
|
225
338
|
} catch {
|
|
226
339
|
return !1;
|
|
227
340
|
}
|
|
228
|
-
},
|
|
229
|
-
const
|
|
230
|
-
return
|
|
231
|
-
},
|
|
232
|
-
const n =
|
|
233
|
-
|
|
234
|
-
}), (
|
|
235
|
-
|
|
236
|
-
|
|
341
|
+
}, E = (e) => {
|
|
342
|
+
const t = m(e);
|
|
343
|
+
return t ? D.size ? D.has(t) : Qe(t) : !1;
|
|
344
|
+
}, k = (e) => (D.clear(), e.zones.forEach((t) => {
|
|
345
|
+
const n = t.split("|")[0];
|
|
346
|
+
U(n);
|
|
347
|
+
}), (e.links || []).forEach((t) => {
|
|
348
|
+
t.split("|").forEach((n) => {
|
|
349
|
+
U(n);
|
|
237
350
|
});
|
|
238
|
-
}), Array.from(
|
|
239
|
-
const n =
|
|
240
|
-
return
|
|
241
|
-
},
|
|
242
|
-
const
|
|
243
|
-
return
|
|
244
|
-
},
|
|
245
|
-
const { url: n, ...
|
|
246
|
-
return
|
|
247
|
-
},
|
|
351
|
+
}), Je(), Array.from(D)), Lt = () => Array.from(D), bt = async (e, t = {}) => {
|
|
352
|
+
const n = d.preloadFromData(e), o = k(n);
|
|
353
|
+
return L || (f.extend(d), L = !0), R(t.defaultTimeZone), t.syncRuntimeSnapshot !== !1 && v(n, t.runtimeSource || "iana"), { data: n, knownTimeZones: o };
|
|
354
|
+
}, Mt = async (e = {}) => {
|
|
355
|
+
const t = await d.preloadFromApi(e), n = k(t);
|
|
356
|
+
return L || (f.extend(d), L = !0), R(e.defaultTimeZone), e.syncRuntimeSnapshot !== !1 && v(t, e.runtimeSource || "iana"), { data: t, knownTimeZones: n };
|
|
357
|
+
}, vt = (e, t) => (ae(e, t), k(t), v(t, "iana"), t), kt = async (e, t = {}) => {
|
|
358
|
+
const { url: n, ...o } = t, r = n ? await K(e, n, o) : await K(e, o);
|
|
359
|
+
return k(r), v(r, "iana"), r;
|
|
360
|
+
}, Xe = () => {
|
|
248
361
|
var n;
|
|
249
|
-
const
|
|
362
|
+
const e = (n = f.tz) == null ? void 0 : n.guess, t = typeof e == "function" ? e : $e;
|
|
250
363
|
try {
|
|
251
|
-
return
|
|
364
|
+
return t == null ? void 0 : t();
|
|
252
365
|
} catch {
|
|
253
366
|
return;
|
|
254
367
|
}
|
|
255
|
-
},
|
|
256
|
-
|
|
368
|
+
}, R = (e) => {
|
|
369
|
+
var o, r;
|
|
370
|
+
const t = m(e), n = f.tz;
|
|
371
|
+
return t ? E(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, Y), !0);
|
|
372
|
+
}, et = (e) => {
|
|
373
|
+
F.forEach((t) => {
|
|
374
|
+
try {
|
|
375
|
+
t(e.timeZone, e);
|
|
376
|
+
} catch {
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
}, tt = (e) => {
|
|
380
|
+
var t;
|
|
257
381
|
try {
|
|
258
|
-
t =
|
|
382
|
+
(t = w()) == null || t.dispatchEvent(new CustomEvent(ce, { detail: e }));
|
|
259
383
|
} catch {
|
|
260
|
-
t = "";
|
|
261
384
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
return
|
|
271
|
-
},
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
if (
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
},
|
|
291
|
-
const n =
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
385
|
+
}, G = (e, t = {}) => {
|
|
386
|
+
const n = m(e), o = fe(n, t.source), r = b.value !== n;
|
|
387
|
+
r && (b.value = n);
|
|
388
|
+
try {
|
|
389
|
+
const s = w();
|
|
390
|
+
s && (s.__UPF_TIMEZONE_SNAPSHOT__ = o);
|
|
391
|
+
} catch {
|
|
392
|
+
}
|
|
393
|
+
return t.persist !== !1 && Ke(n), t.syncDefault !== !1 && R(n), t.notify !== !1 && r && et(o), t.dispatchEvent !== !1 && tt(o), n;
|
|
394
|
+
}, Nt = (e, t = {}) => G(m(e), {
|
|
395
|
+
persist: !0,
|
|
396
|
+
notify: !0,
|
|
397
|
+
dispatchEvent: !0,
|
|
398
|
+
syncDefault: !0,
|
|
399
|
+
...t
|
|
400
|
+
}), Ot = (e = "sync") => {
|
|
401
|
+
const t = V() || x();
|
|
402
|
+
return t || b.value ? G(t, { source: e, dispatchEvent: !1 }) : "";
|
|
403
|
+
}, Ut = (e) => (F.add(e), () => F.delete(e)), nt = (e) => {
|
|
404
|
+
var n, o, r, s;
|
|
405
|
+
if (typeof e == "string") return fe(e);
|
|
406
|
+
if (!e || typeof e != "object") return null;
|
|
407
|
+
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;
|
|
408
|
+
return t == null ? null : {
|
|
409
|
+
timeZone: m(t),
|
|
410
|
+
source: e.source || ((n = e.detail) == null ? void 0 : n.source) || ((o = e.params) == null ? void 0 : o.source),
|
|
411
|
+
timestamp: Number(e.timestamp || ((r = e.detail) == null ? void 0 : r.timestamp) || ((s = e.params) == null ? void 0 : s.timestamp) || Date.now())
|
|
412
|
+
};
|
|
413
|
+
}, H = (e, t) => {
|
|
414
|
+
const n = nt(e);
|
|
415
|
+
n && G(n.timeZone, {
|
|
416
|
+
source: n.source || t,
|
|
417
|
+
dispatchEvent: !1
|
|
418
|
+
});
|
|
419
|
+
}, ot = (e) => {
|
|
420
|
+
H(e.detail, "window-event");
|
|
421
|
+
}, rt = (e) => {
|
|
422
|
+
e.key === j && H({ timeZone: e.newValue || "", source: "storage" }, "storage");
|
|
423
|
+
}, st = (e) => {
|
|
424
|
+
const t = e.data;
|
|
425
|
+
!t || t.type !== xe || H(t.detail || t, "message");
|
|
426
|
+
}, at = () => {
|
|
427
|
+
const e = w();
|
|
428
|
+
return !e || Q ? !1 : (Q = !0, e.addEventListener(ce, ot), e.addEventListener("storage", rt), e.addEventListener("message", st), !0);
|
|
429
|
+
};
|
|
430
|
+
at();
|
|
431
|
+
const it = () => {
|
|
432
|
+
const t = m(b.value) || V() || x() || Xe() || qe();
|
|
433
|
+
return E(t) ? m(t) : Y;
|
|
434
|
+
}, h = (e) => {
|
|
435
|
+
const t = m(e) || it();
|
|
436
|
+
return E(t) ? t : Y;
|
|
437
|
+
}, ct = () => {
|
|
438
|
+
var e;
|
|
439
|
+
return typeof window < "u" && ((e = window.navigator) != null && e.language) ? window.navigator.language : I;
|
|
440
|
+
}, ue = (e, t = []) => {
|
|
441
|
+
const o = e || ct() || I, r = o.toLowerCase();
|
|
442
|
+
if (!t.length)
|
|
443
|
+
return r === "en" ? "en-US" : r === "zh" || r === "zh-cn" ? I : o;
|
|
444
|
+
const s = t.find((a) => a.toLowerCase() === r);
|
|
445
|
+
if (s) return s;
|
|
446
|
+
const i = r.split("-")[0], c = t.find((a) => a.toLowerCase().split("-")[0] === i);
|
|
447
|
+
return c || (i === "en" ? t.find((a) => a.toLowerCase().startsWith("en-")) || o : i === "zh" ? t.find((a) => a.toLowerCase().startsWith("zh-")) || I : o);
|
|
448
|
+
}, z = (e) => {
|
|
449
|
+
if (f.isDayjs(e)) return e;
|
|
450
|
+
if (e == null || e === "") return f();
|
|
451
|
+
const t = f(e);
|
|
452
|
+
return t.isValid() ? t : f();
|
|
453
|
+
}, M = (e) => e == null || e === "", $ = (e) => f.isDayjs(e) ? e : M(e) ? f() : f(e), le = (e, t = !1) => {
|
|
454
|
+
const n = m(e);
|
|
455
|
+
return n ? h(n) : t ? h() : "";
|
|
456
|
+
}, Pt = () => He, ft = (e, t) => z(e).tz(h(t)).utcOffset(), ut = (e, t, n = ie) => z(e).tz(h(t)).format(n), lt = (e, t) => $(e).format(t.format), me = (e, t) => {
|
|
457
|
+
const n = t.format || A, o = le(t.timeZone, t.useClientTimeZone);
|
|
458
|
+
if (!o) return lt(e, { format: n });
|
|
459
|
+
if (t.inputMode === "local")
|
|
460
|
+
return M(e) ? f().tz(o).format(n) : f.tz(e, o).format(n);
|
|
461
|
+
const r = $(e);
|
|
462
|
+
return r.isValid() ? r.tz(o).format(n) : r.format(n);
|
|
463
|
+
}, mt = (e) => typeof e == "function" && typeof (e == null ? void 0 : e.tz) == "function", dt = (e, t) => {
|
|
464
|
+
var a, u;
|
|
465
|
+
const { moment: n } = t, o = t.format || A;
|
|
466
|
+
if (!mt(n)) return me(e, { ...t, dateLibrary: "dayjs" });
|
|
467
|
+
const r = M(e) ? void 0 : e, s = le(t.timeZone, t.useClientTimeZone);
|
|
468
|
+
if (!s || typeof n.tz != "function") return n(r).format(o);
|
|
469
|
+
if (t.inputMode === "local")
|
|
470
|
+
return M(e) ? ((u = (a = n()).tz) == null ? void 0 : u.call(a, s).format(o)) || n().format(o) : n.tz(r, s).format(o);
|
|
471
|
+
const i = n(r);
|
|
472
|
+
return (typeof i.tz == "function" ? i.tz(s) : n.tz(r, s)).format(o);
|
|
473
|
+
}, de = (e, t = {}) => {
|
|
474
|
+
const n = typeof t == "string" ? { format: t } : t || {}, o = {
|
|
309
475
|
...n,
|
|
310
|
-
format: n.format ||
|
|
476
|
+
format: n.format || A
|
|
477
|
+
};
|
|
478
|
+
return o.dateLibrary === "moment" ? dt(e, o) : me(e, o);
|
|
479
|
+
}, ht = (e, t, n) => new Intl.DateTimeFormat(n, {
|
|
480
|
+
timeZone: t,
|
|
481
|
+
year: "numeric",
|
|
482
|
+
month: "2-digit",
|
|
483
|
+
day: "2-digit",
|
|
484
|
+
hour: "2-digit",
|
|
485
|
+
minute: "2-digit",
|
|
486
|
+
second: "2-digit",
|
|
487
|
+
hourCycle: "h23"
|
|
488
|
+
}).formatToParts(e).reduce((r, s) => (s.type !== "literal" && (r[s.type] = s.value), r), {}), Tt = (e, t, n) => {
|
|
489
|
+
const o = {
|
|
490
|
+
YYYY: t.year || "0000",
|
|
491
|
+
YY: (t.year || "0000").slice(-2),
|
|
492
|
+
MM: t.month || "01",
|
|
493
|
+
M: String(Number(t.month || "1")),
|
|
494
|
+
DD: t.day || "01",
|
|
495
|
+
D: String(Number(t.day || "1")),
|
|
496
|
+
HH: t.hour || "00",
|
|
497
|
+
H: String(Number(t.hour || "0")),
|
|
498
|
+
mm: t.minute || "00",
|
|
499
|
+
m: String(Number(t.minute || "0")),
|
|
500
|
+
ss: t.second || "00",
|
|
501
|
+
s: String(Number(t.second || "0")),
|
|
502
|
+
SSS: n
|
|
311
503
|
};
|
|
312
|
-
return
|
|
313
|
-
},
|
|
314
|
-
const n =
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
const
|
|
504
|
+
return e.replace(/YYYY|SSS|YY|MM|DD|HH|mm|ss|M|D|H|m|s/g, (r) => o[r] ?? r);
|
|
505
|
+
}, Ft = (e, t = {}) => {
|
|
506
|
+
const n = typeof t == "string" ? { format: t } : t || {}, o = n.format || A, r = ue(n.locale || I), s = h(n.timeZone), i = $(e);
|
|
507
|
+
if (!i.isValid()) return i.format(o);
|
|
508
|
+
try {
|
|
509
|
+
const c = i.toDate(), a = ht(c, s, r), u = String(c.getMilliseconds()).padStart(3, "0");
|
|
510
|
+
return Tt(o, a, u);
|
|
511
|
+
} catch {
|
|
512
|
+
return de(e, { format: o, timeZone: s });
|
|
513
|
+
}
|
|
514
|
+
}, Yt = (e, t = A, n = {}) => de(e, { ...n, format: t }), X = (e) => String(e).padStart(2, "0"), he = (e) => `UTC${e}`, Te = (e, t) => {
|
|
515
|
+
const n = ft(e, t), o = n >= 0 ? "+" : "-", r = Math.abs(n);
|
|
516
|
+
return `UTC${o}${X(Math.floor(r / 60))}:${X(r % 60)}`;
|
|
517
|
+
}, gt = (e, t = /* @__PURE__ */ new Date()) => {
|
|
518
|
+
const n = e.currentUtcOffsetText || e.baseUtcOffsetText;
|
|
519
|
+
return n ? `UTC${n}` : Te(t, e.timeZoneId);
|
|
520
|
+
}, yt = (e, t) => {
|
|
521
|
+
const n = e.match(/([+-]\d{1,2})(?::?(\d{2}))?/) || [];
|
|
522
|
+
if (!n[1]) return t;
|
|
523
|
+
const o = n[1].startsWith("-") ? "-" : "+", r = n[1].replace(/[+-]/, "").padStart(2, "0"), s = n[2] || "00";
|
|
524
|
+
return `UTC${o}${r}:${s}`;
|
|
525
|
+
}, Zt = (e, t, n) => {
|
|
526
|
+
var r, s;
|
|
527
|
+
const o = he(n.format("Z"));
|
|
327
528
|
try {
|
|
328
|
-
const
|
|
329
|
-
return
|
|
529
|
+
const i = Intl.DateTimeFormat.supportedLocalesOf([t])[0] || t, c = (s = (r = new Intl.DateTimeFormat(i, { timeZone: e, timeZoneName: "long" }).formatToParts(n.toDate()).find((a) => a.type === "timeZoneName")) == null ? void 0 : r.value) == null ? void 0 : s.trim();
|
|
530
|
+
return c ? /^(gmt|utc)/i.test(c) ? yt(c, o) : c : o;
|
|
330
531
|
} catch {
|
|
331
|
-
return
|
|
532
|
+
return o;
|
|
332
533
|
}
|
|
333
|
-
},
|
|
334
|
-
const n =
|
|
534
|
+
}, ge = (e, t) => {
|
|
535
|
+
const n = t.year();
|
|
335
536
|
return Array.from(
|
|
336
537
|
new Set(
|
|
337
|
-
Array.from({ length: 12 }, (
|
|
338
|
-
const
|
|
339
|
-
return f.tz(
|
|
538
|
+
Array.from({ length: 12 }, (o, r) => {
|
|
539
|
+
const s = `${r + 1}`.padStart(2, "0"), i = `${n}-${s}-15 12:00:00`;
|
|
540
|
+
return f.tz(i, e).utcOffset();
|
|
340
541
|
})
|
|
341
542
|
)
|
|
342
543
|
);
|
|
343
|
-
},
|
|
344
|
-
const n =
|
|
345
|
-
if (!
|
|
346
|
-
const
|
|
347
|
-
return
|
|
348
|
-
},
|
|
349
|
-
const n =
|
|
350
|
-
if (!
|
|
351
|
-
const
|
|
352
|
-
return
|
|
353
|
-
},
|
|
354
|
-
if (
|
|
355
|
-
if (
|
|
356
|
-
},
|
|
357
|
-
const n =
|
|
358
|
-
return typeof n == "boolean" ? n :
|
|
359
|
-
},
|
|
360
|
-
const n =
|
|
361
|
-
return typeof n == "boolean" ? n :
|
|
362
|
-
},
|
|
363
|
-
const
|
|
544
|
+
}, ye = (e, t) => {
|
|
545
|
+
const n = h(e);
|
|
546
|
+
if (!E(n)) return !1;
|
|
547
|
+
const o = z(t).tz(n);
|
|
548
|
+
return ge(n, o).length > 1;
|
|
549
|
+
}, N = (e, t) => {
|
|
550
|
+
const n = h(e);
|
|
551
|
+
if (!E(n)) return !1;
|
|
552
|
+
const o = z(t).tz(n), r = ge(n, o);
|
|
553
|
+
return r.length <= 1 ? !1 : o.utcOffset() === Math.max(...r);
|
|
554
|
+
}, jt = (e, t) => N(e, t), Ze = (e) => {
|
|
555
|
+
if (e === 1 || e === "1") return !0;
|
|
556
|
+
if (e === 0 || e === "0") return !1;
|
|
557
|
+
}, It = (e, t) => {
|
|
558
|
+
const n = Ze(e.dynamicOffsetFlag);
|
|
559
|
+
return typeof n == "boolean" ? n : ye(e.timeZoneId, t);
|
|
560
|
+
}, Dt = (e, t) => {
|
|
561
|
+
const n = Ze(e.currentDstFlag);
|
|
562
|
+
return typeof n == "boolean" ? n : N(e.timeZoneId, t);
|
|
563
|
+
}, Vt = (e, t = /* @__PURE__ */ new Date()) => e.map((n) => {
|
|
564
|
+
const o = n.tzShowName || gt(n, t), r = It(n, t);
|
|
364
565
|
return {
|
|
365
566
|
value: n.timeZoneId,
|
|
366
|
-
zoneName:
|
|
367
|
-
label:
|
|
368
|
-
hasDST:
|
|
369
|
-
isDST:
|
|
567
|
+
zoneName: o,
|
|
568
|
+
label: o,
|
|
569
|
+
hasDST: r,
|
|
570
|
+
isDST: r ? Dt(n, t) : !1
|
|
370
571
|
};
|
|
371
|
-
}),
|
|
372
|
-
const
|
|
373
|
-
return
|
|
374
|
-
},
|
|
572
|
+
}), wt = (e) => {
|
|
573
|
+
const t = e.toLowerCase().split("-")[0];
|
|
574
|
+
return q[t] || q.default;
|
|
575
|
+
}, pt = (e) => typeof e.showDaylightSavingLabel == "boolean" ? e.showDaylightSavingLabel : e.showDaylightSavingMarker ?? !0, xt = (e, t, n = {}) => {
|
|
375
576
|
const {
|
|
376
|
-
showZoneLabel:
|
|
377
|
-
zoneLabel:
|
|
378
|
-
hasDST:
|
|
379
|
-
isDST:
|
|
380
|
-
standardTimeLabel:
|
|
381
|
-
daylightSavingLabel:
|
|
382
|
-
format:
|
|
383
|
-
} = n,
|
|
384
|
-
return
|
|
385
|
-
},
|
|
386
|
-
const
|
|
577
|
+
showZoneLabel: o = !0,
|
|
578
|
+
zoneLabel: r,
|
|
579
|
+
hasDST: s,
|
|
580
|
+
isDST: i,
|
|
581
|
+
standardTimeLabel: c,
|
|
582
|
+
daylightSavingLabel: a,
|
|
583
|
+
format: u = ie
|
|
584
|
+
} = n, l = h(t), T = ut(e, l, u), y = typeof s == "boolean" ? s : ye(l, e), g = (typeof i == "boolean" ? i : N(l, e)) ? a : c, Z = y && g ? `[${g}]` : "";
|
|
585
|
+
return o ? [T, r || Te(e, l), Z].filter(Boolean).join(" ") : [T, Z].filter(Boolean).join(" ");
|
|
586
|
+
}, Rt = (e = {}) => {
|
|
587
|
+
const t = ue(e.locale, e.supportedLocales), n = h(e.timeZone), o = z(e.value).tz(n), r = Zt(n, t, o), s = he(o.format("Z")), i = N(n, o), c = i ? wt(t) : "", a = pt(e), u = i && a ? `${r} - ${c}` : r;
|
|
387
588
|
return {
|
|
388
|
-
formattedValue:
|
|
389
|
-
locale:
|
|
589
|
+
formattedValue: o.format(e.format || Ve),
|
|
590
|
+
locale: t,
|
|
390
591
|
timeZone: n,
|
|
391
|
-
timeZoneName:
|
|
392
|
-
timeZoneLabel:
|
|
393
|
-
offsetLabel:
|
|
394
|
-
offsetMinutes:
|
|
395
|
-
isDaylightSavingTime:
|
|
396
|
-
daylightSavingLabel:
|
|
592
|
+
timeZoneName: r,
|
|
593
|
+
timeZoneLabel: u,
|
|
594
|
+
offsetLabel: s,
|
|
595
|
+
offsetMinutes: o.utcOffset(),
|
|
596
|
+
isDaylightSavingTime: i,
|
|
597
|
+
daylightSavingLabel: c
|
|
397
598
|
};
|
|
398
599
|
};
|
|
399
600
|
export {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
601
|
+
Re as IANA_TIMEZONE_DATA_CHANGE_EVENT,
|
|
602
|
+
ce as TIMEZONE_CHANGE_EVENT,
|
|
603
|
+
ne as TIME_ZONE_PACKED_DATA_URL,
|
|
604
|
+
xe as UPF_TIMEZONE_MESSAGE_TYPE,
|
|
605
|
+
bt as applyDayjsIanaTimeZoneData,
|
|
606
|
+
vt as applyMomentIanaTimeZoneData,
|
|
607
|
+
re as assertPackedIanaData,
|
|
608
|
+
Ye as assertPackedIanaTzData,
|
|
609
|
+
oe as buildIanaFetchInit,
|
|
610
|
+
Vt as buildTimeZoneDisplayOptions,
|
|
611
|
+
Ce as clearDayjsIanaCache,
|
|
612
|
+
b as clientTimeZone,
|
|
613
|
+
Oe as createIanaDbFromPackedData,
|
|
614
|
+
d as dayjsTimezoneIanaPlugin,
|
|
615
|
+
xt as formatClientLocalDateTimeLine,
|
|
616
|
+
ut as formatInTimeZone,
|
|
617
|
+
de as formatLocalDateTime,
|
|
618
|
+
Ft as formatLocalDateTimeIntl,
|
|
619
|
+
Te as formatTimeZoneOffsetLabel,
|
|
620
|
+
pe as getAccessTokenFromLocalStorage,
|
|
621
|
+
Se as getCachedDayjsPackedIanaData,
|
|
622
|
+
it as getClientTimeZone,
|
|
623
|
+
Ae as getDefaultIanaAuthorization,
|
|
624
|
+
Lt as getKnownTimeZoneIds,
|
|
625
|
+
We as getRuntimeIanaTimeZoneDataSnapshot,
|
|
626
|
+
Ct as getRuntimeNameZoneDataSnapshot,
|
|
627
|
+
Pt as getTimeZoneDayjs,
|
|
628
|
+
Rt as getTimeZoneDisplayInfo,
|
|
629
|
+
ft as getZoneUtcOffset,
|
|
630
|
+
at as initClientTimeZoneSync,
|
|
631
|
+
jt as isDaylightSavingTime,
|
|
632
|
+
E as isKnownTimeZone,
|
|
633
|
+
mt as isMomentTimezoneFormatInstance,
|
|
634
|
+
Mt as loadDayjsIanaTimeZoneData,
|
|
635
|
+
ae as loadIanaData,
|
|
636
|
+
K as loadIanaFromApi,
|
|
637
|
+
ae as loadMomentIanaData,
|
|
638
|
+
K as loadMomentIanaFromApi,
|
|
639
|
+
kt as loadMomentIanaTimeZoneData,
|
|
640
|
+
ue as normalizeLocaleCode,
|
|
641
|
+
Ut as onClientTimeZoneChange,
|
|
642
|
+
_e as preloadDayjsIanaFromApi,
|
|
643
|
+
se as preloadDayjsIanaFromData,
|
|
644
|
+
k as rebuildKnownTimeZoneIds,
|
|
645
|
+
h as resolveTimeZone,
|
|
646
|
+
gt as resolveUtcOffsetFallback,
|
|
647
|
+
Nt as setClientTimeZone,
|
|
648
|
+
R as setDefaultTimeZone,
|
|
649
|
+
v as setRuntimeIanaTimeZoneDataSnapshot,
|
|
650
|
+
Ot as syncClientTimeZone,
|
|
651
|
+
He as timeZoneDayjs,
|
|
652
|
+
ye as timeZoneHasDST,
|
|
653
|
+
N as timeZoneIsDST,
|
|
654
|
+
Yt as toLocalDate
|
|
439
655
|
};
|