@das-fed/upf-utils 6.4.0-dev.243 → 6.4.0-dev.245
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 +952 -938
- package/api-services/index.js +732 -723
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +690 -676
- package/api-services/modules/app-manage/index.js +540 -531
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +690 -676
- package/api-services/modules/authentication/index.js +540 -531
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +705 -691
- package/api-services/modules/bems/index.js +555 -546
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +926 -909
- package/api-services/modules/contract/index.js +732 -719
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +708 -694
- package/api-services/modules/duty-manage/index.js +559 -550
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +1160 -1137
- package/api-services/modules/enterpriseright/index.js +969 -946
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +1453 -1451
- package/api-services/modules/file/es5.js +1349 -1347
- package/api-services/modules/file/index.js +1101 -1110
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +690 -676
- package/api-services/modules/gateway-edge/index.js +540 -531
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1137 -1146
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +1155 -1153
- package/api-services/modules/iot/index.js +947 -956
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +1115 -1110
- package/api-services/modules/justauth/index.js +917 -922
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +1091 -1065
- package/api-services/modules/knowledge/index.js +919 -892
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +690 -676
- package/api-services/modules/link/index.js +540 -531
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +737 -723
- package/api-services/modules/permission/index.js +581 -572
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +755 -741
- package/api-services/modules/platformManage/index.js +590 -581
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +737 -723
- package/api-services/modules/portal/index.js +581 -572
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +1091 -1065
- package/api-services/modules/space-manage/index.js +919 -892
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +614 -603
- package/api-services/modules/super-admin/index.js +490 -485
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +1058 -1032
- package/api-services/modules/supplier/index.js +898 -871
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +737 -723
- package/api-services/modules/supplychain-manage/index.js +581 -572
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +1116 -1111
- package/api-services/modules/systemConfiguration/index.js +917 -922
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +579 -568
- package/api-services/modules/tool/index.js +475 -470
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +1160 -1137
- package/api-services/src/create-service/index.js +969 -946
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +734 -720
- package/common-info/getPermissionMethod/es5.js +705 -691
- package/common-info/getPermissionMethod/index.js +544 -535
- package/common-info/getPermissionMethod/index.js.gz +0 -0
- package/common-info/index.js +569 -560
- package/common-info/index.js.gz +0 -0
- package/common-tools/timezone-format/es5.d.ts +107 -3
- package/common-tools/timezone-format/es5.js +751 -101
- package/common-tools/timezone-format/get-iana-data/dayjs-timezone-iana-plugin.d.ts +72 -0
- package/common-tools/timezone-format/get-iana-data/iana-api-fetch.d.ts +21 -0
- package/common-tools/timezone-format/get-iana-data/moment-iana-loader.d.ts +29 -0
- package/common-tools/timezone-format/index.d.ts +107 -3
- package/common-tools/timezone-format/index.js +392 -62
- package/common-tools/timezone-format/index.js.gz +0 -0
- package/create-api-service/es5.js +736 -722
- package/create-api-service/index.js +581 -572
- 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 +19868 -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 +33 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +3 -3
- package/theme/es5.d.ts +20 -1
- package/theme/es5.js +614 -303
- package/theme/index.d.ts +20 -1
- package/theme/index.js +523 -276
- package/theme/index.js.gz +0 -0
|
@@ -1,21 +1,223 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import f from "dayjs";
|
|
2
|
+
import tt from "dayjs/plugin/utc";
|
|
3
|
+
import et from "dayjs/plugin/timezone";
|
|
4
|
+
import "@das-fed/upf-utils/config";
|
|
5
|
+
const P = "/api/admin/basic-application/sys-info/v1/license/time-zone-packed-data";
|
|
6
|
+
function nt() {
|
|
7
|
+
if (typeof localStorage > "u")
|
|
8
|
+
return null;
|
|
9
|
+
try {
|
|
10
|
+
return localStorage.getItem("accessToken");
|
|
11
|
+
} catch {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function ot() {
|
|
16
|
+
const t = nt();
|
|
17
|
+
if (!(t == null || t === ""))
|
|
18
|
+
return t.trim().startsWith("Bearer ") ? t.trim() : `Bearer ${t.trim()}`;
|
|
19
|
+
}
|
|
20
|
+
function $(t = {}) {
|
|
21
|
+
const e = t.authorization !== void 0 ? t.authorization === "" || t.authorization == null ? void 0 : t.authorization : ot(), n = { ...t.headers || {} };
|
|
22
|
+
if (e != null && e !== "" && (n.Authorization = e), Object.keys(n).length !== 0)
|
|
23
|
+
return { headers: n };
|
|
24
|
+
}
|
|
25
|
+
let L = null, I = null;
|
|
26
|
+
function _(t) {
|
|
27
|
+
if (!t || typeof t != "object")
|
|
28
|
+
throw new Error("Invalid IANA response: expected an object");
|
|
29
|
+
const e = t;
|
|
30
|
+
if (!Array.isArray(e.zones))
|
|
31
|
+
throw new Error("Invalid IANA response: missing zones array");
|
|
32
|
+
const n = e.links;
|
|
33
|
+
return {
|
|
34
|
+
version: typeof e.version == "string" ? e.version : void 0,
|
|
35
|
+
zones: e.zones,
|
|
36
|
+
links: Array.isArray(n) ? n : []
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
async function rt(t, e) {
|
|
40
|
+
if (typeof fetch != "function")
|
|
41
|
+
throw new Error("fetch is not available. Pass preloadFromApi options.fetchJson.");
|
|
42
|
+
const n = await fetch(t, e);
|
|
43
|
+
if (!n.ok)
|
|
44
|
+
throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
|
|
45
|
+
return n.json();
|
|
46
|
+
}
|
|
47
|
+
function V(t) {
|
|
48
|
+
return I = _(t), L = mt(I), I;
|
|
49
|
+
}
|
|
50
|
+
function at() {
|
|
51
|
+
return I;
|
|
52
|
+
}
|
|
53
|
+
async function st(t = {}) {
|
|
54
|
+
const e = t.url ?? P, n = $({
|
|
55
|
+
authorization: t.authorization,
|
|
56
|
+
headers: t.headers
|
|
57
|
+
}), o = await (t.fetchJson ?? rt)(e, n), a = t.parseResponse ? t.parseResponse(o) : _(o);
|
|
58
|
+
return V(a);
|
|
59
|
+
}
|
|
60
|
+
function it() {
|
|
61
|
+
L = null, I = null;
|
|
62
|
+
}
|
|
63
|
+
function F(t) {
|
|
64
|
+
return t > 96 ? t - 87 : t > 64 ? t - 29 : t - 48;
|
|
65
|
+
}
|
|
66
|
+
function ct(t) {
|
|
67
|
+
let e = 1, n = 0, r = 0, o = 1;
|
|
68
|
+
const a = t.split("."), c = a[0], i = a[1] || "";
|
|
69
|
+
t.charCodeAt(0) === 45 && (e = -1);
|
|
70
|
+
for (let s = 0; s < c.length; s++) {
|
|
71
|
+
const l = c.charCodeAt(s);
|
|
72
|
+
l !== 45 && (n = 60 * n + F(l));
|
|
73
|
+
}
|
|
74
|
+
for (let s = 0; s < i.length; s++)
|
|
75
|
+
o = o / 60, r += F(i.charCodeAt(s)) * o;
|
|
76
|
+
return (n + r) * e;
|
|
77
|
+
}
|
|
78
|
+
function v(t) {
|
|
79
|
+
const e = [];
|
|
80
|
+
for (const n of t)
|
|
81
|
+
e.push(ct(n));
|
|
82
|
+
return e;
|
|
83
|
+
}
|
|
84
|
+
function ft(t) {
|
|
85
|
+
let e = 0;
|
|
86
|
+
const n = [];
|
|
87
|
+
for (const r of t)
|
|
88
|
+
e += r, n.push(Math.round(e * 6e4));
|
|
89
|
+
return n.push(1 / 0), n;
|
|
90
|
+
}
|
|
91
|
+
function lt(t, e) {
|
|
92
|
+
const n = [];
|
|
93
|
+
for (const r of e)
|
|
94
|
+
n.push(t[r]);
|
|
95
|
+
return n;
|
|
96
|
+
}
|
|
97
|
+
function ut(t) {
|
|
98
|
+
const e = t.split("|");
|
|
99
|
+
if (e.length < 5)
|
|
100
|
+
throw new Error("Invalid packed zone format");
|
|
101
|
+
const n = e[0].toLowerCase(), r = v(e[2].split(" ")), o = v(e[3].split("")), a = ft(v(e[4].split(" "))), c = lt(r, o);
|
|
102
|
+
return {
|
|
103
|
+
name: n,
|
|
104
|
+
rule: {
|
|
105
|
+
u: a,
|
|
106
|
+
o: c
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function mt(t) {
|
|
111
|
+
if (!t || !Array.isArray(t.zones))
|
|
112
|
+
throw new TypeError("packed iana data must contain zones array");
|
|
113
|
+
const e = {};
|
|
114
|
+
for (const r of t.zones) {
|
|
115
|
+
const o = ut(r);
|
|
116
|
+
e[o.name] = o.rule;
|
|
117
|
+
}
|
|
118
|
+
const n = t.links || [];
|
|
119
|
+
for (const r of n) {
|
|
120
|
+
const o = r.split("|");
|
|
121
|
+
if (o.length < 2)
|
|
122
|
+
continue;
|
|
123
|
+
const a = o[0].toLowerCase(), c = o[1].toLowerCase(), i = e[c];
|
|
124
|
+
i && (e[a] = i);
|
|
125
|
+
}
|
|
126
|
+
return e;
|
|
127
|
+
}
|
|
128
|
+
function dt() {
|
|
129
|
+
if (!L)
|
|
130
|
+
throw new Error(
|
|
131
|
+
"IANA data not loaded. Await dayjsTimezoneIanaPlugin.preloadFromApi({ url: ... }) before dayjs.extend(dayjsTimezoneIanaPlugin)."
|
|
132
|
+
);
|
|
133
|
+
return L;
|
|
134
|
+
}
|
|
135
|
+
function ht(t, e, n) {
|
|
136
|
+
const r = typeof e == "string" ? e.toLowerCase() : "", o = n[r];
|
|
137
|
+
if (o === void 0)
|
|
138
|
+
throw Error("Unknown Time Zone " + e);
|
|
139
|
+
const a = o.o, c = o.u, i = c.length - 1;
|
|
140
|
+
for (let s = 0; s < i; s++) {
|
|
141
|
+
let l = a[s];
|
|
142
|
+
const u = a[s && s - 1];
|
|
143
|
+
if (l > u && (l = u), t < c[s] - l * 6e4)
|
|
144
|
+
return a[s];
|
|
145
|
+
}
|
|
146
|
+
return a[i];
|
|
147
|
+
}
|
|
148
|
+
const Tt = (t, e, n) => {
|
|
149
|
+
var s, l;
|
|
150
|
+
let r = "";
|
|
151
|
+
const o = n.tz, a = (s = o == null ? void 0 : o.guess) == null ? void 0 : s.bind(o), c = (l = o == null ? void 0 : o.setDefault) == null ? void 0 : l.bind(o), i = (u, h, p) => {
|
|
152
|
+
const Z = p || h || r, T = p ? h : void 0;
|
|
153
|
+
return (typeof n.utc == "function" ? n.utc(u, T) : n(u, T).utc()).tz(Z);
|
|
154
|
+
};
|
|
155
|
+
o && Object.assign(i, o), i.setDefault = (u) => {
|
|
156
|
+
r = u, c == null || c(u);
|
|
157
|
+
}, i.guess = () => a ? a() : typeof Intl < "u" && typeof Intl.DateTimeFormat == "function" ? Intl.DateTimeFormat().resolvedOptions().timeZone || r || "UTC" : r || "UTC", n.tz = i, e.prototype.tz = function(u = r, h) {
|
|
158
|
+
var g;
|
|
159
|
+
const p = u || ((g = i.guess) == null ? void 0 : g.call(i)) || "UTC", Z = this.utc().valueOf(), T = ht(Z, p, dt());
|
|
160
|
+
return this.utcOffset(-T, h);
|
|
161
|
+
};
|
|
162
|
+
}, m = Tt;
|
|
163
|
+
m.preloadFromApi = st;
|
|
164
|
+
m.preloadFromData = V;
|
|
165
|
+
m.getCachedPackedData = at;
|
|
166
|
+
m.clearIanaCache = it;
|
|
167
|
+
function yt(t) {
|
|
168
|
+
if (!t || typeof t != "object")
|
|
169
|
+
throw new Error("Invalid IANA response: expected an object");
|
|
170
|
+
const e = t;
|
|
171
|
+
if (!Array.isArray(e.zones))
|
|
172
|
+
throw new Error("Invalid IANA response: missing zones array");
|
|
173
|
+
const n = e.links;
|
|
174
|
+
return {
|
|
175
|
+
version: typeof e.version == "string" ? e.version : void 0,
|
|
176
|
+
zones: e.zones,
|
|
177
|
+
links: Array.isArray(n) ? n : []
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
function Y(t, e) {
|
|
181
|
+
if (!t || typeof t.tz != "object" || typeof t.tz.load != "function")
|
|
182
|
+
throw new Error("moment.tz.load is missing. Import moment-timezone before calling loadIanaData.");
|
|
183
|
+
if (!e || !Array.isArray(e.zones))
|
|
184
|
+
throw new Error("Invalid packed IANA data: zones must be an array");
|
|
185
|
+
t.tz.load(e);
|
|
186
|
+
}
|
|
187
|
+
async function pt(t, e) {
|
|
188
|
+
if (typeof fetch != "function")
|
|
189
|
+
throw new Error("fetch is not available. Pass loadIanaFromApi options.fetchJson in Node or polyfill fetch.");
|
|
190
|
+
const n = await fetch(t, e);
|
|
191
|
+
if (!n.ok)
|
|
192
|
+
throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
|
|
193
|
+
return n.json();
|
|
194
|
+
}
|
|
195
|
+
async function O(t, e, n) {
|
|
196
|
+
let r = P, o = {};
|
|
197
|
+
typeof e == "string" ? (r = e, o = n ?? {}) : e != null && (o = e);
|
|
198
|
+
const a = $({
|
|
199
|
+
authorization: o.authorization,
|
|
200
|
+
headers: o.headers
|
|
201
|
+
}), i = await (o.fetchJson ?? pt)(r, a), s = o.parseResponse ? o.parseResponse(i) : yt(i);
|
|
202
|
+
return Y(t, s), s;
|
|
203
|
+
}
|
|
204
|
+
f.extend(tt);
|
|
205
|
+
f.extend(et);
|
|
206
|
+
const D = "zh-CN", gt = "YYYY.MM.DD HH:mm:ss", S = "YYYY-MM-DD HH:mm:ss", H = "YYYY-MM-DD HH:mm", M = "UTC", j = {
|
|
7
207
|
zh: "夏令时",
|
|
8
208
|
default: "DST"
|
|
9
|
-
};
|
|
10
|
-
var
|
|
11
|
-
const
|
|
209
|
+
}, y = /* @__PURE__ */ new Set();
|
|
210
|
+
var U, N;
|
|
211
|
+
const Dt = (N = (U = f.tz) == null ? void 0 : U.guess) == null ? void 0 : N.bind(f.tz);
|
|
212
|
+
let b = !1;
|
|
213
|
+
const w = (t) => (t || "").trim(), It = () => {
|
|
12
214
|
if (!(typeof Intl > "u" || typeof Intl.DateTimeFormat != "function"))
|
|
13
215
|
try {
|
|
14
216
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
15
217
|
} catch {
|
|
16
218
|
return;
|
|
17
219
|
}
|
|
18
|
-
},
|
|
220
|
+
}, wt = (t) => {
|
|
19
221
|
if (!t) return !1;
|
|
20
222
|
if (typeof Intl > "u" || typeof Intl.DateTimeFormat != "function") return !0;
|
|
21
223
|
try {
|
|
@@ -23,87 +225,215 @@ const S = (g = (d = i.tz) == null ? void 0 : d.guess) == null ? void 0 : g.bind(
|
|
|
23
225
|
} catch {
|
|
24
226
|
return !1;
|
|
25
227
|
}
|
|
26
|
-
},
|
|
228
|
+
}, z = (t) => {
|
|
229
|
+
const e = w(t);
|
|
230
|
+
return e ? y.size ? y.has(e) : wt(e) : !1;
|
|
231
|
+
}, C = (t) => (y.clear(), t.zones.forEach((e) => {
|
|
232
|
+
const n = e.split("|")[0];
|
|
233
|
+
n && y.add(n);
|
|
234
|
+
}), (t.links || []).forEach((e) => {
|
|
235
|
+
e.split("|").forEach((n) => {
|
|
236
|
+
n && y.add(n);
|
|
237
|
+
});
|
|
238
|
+
}), Array.from(y)), Yt = () => Array.from(y), Ht = async (t, e = {}) => {
|
|
239
|
+
const n = m.preloadFromData(t), r = C(n);
|
|
240
|
+
return b || (f.extend(m), b = !0), J(e.defaultTimeZone), { data: n, knownTimeZones: r };
|
|
241
|
+
}, Jt = async (t = {}) => {
|
|
242
|
+
const e = await m.preloadFromApi(t), n = C(e);
|
|
243
|
+
return b || (f.extend(m), b = !0), J(t.defaultTimeZone), { data: e, knownTimeZones: n };
|
|
244
|
+
}, Rt = (t, e) => (Y(t, e), C(e), e), Bt = async (t, e = {}) => {
|
|
245
|
+
const { url: n, ...r } = e, o = n ? await O(t, n, r) : await O(t, r);
|
|
246
|
+
return C(o), o;
|
|
247
|
+
}, zt = () => {
|
|
27
248
|
var n;
|
|
28
|
-
const t = (n =
|
|
249
|
+
const t = (n = f.tz) == null ? void 0 : n.guess, e = typeof t == "function" ? t : Dt;
|
|
29
250
|
try {
|
|
30
251
|
return e == null ? void 0 : e();
|
|
31
252
|
} catch {
|
|
32
253
|
return;
|
|
33
254
|
}
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
return C(t) ? t : v;
|
|
37
|
-
}, b = () => {
|
|
38
|
-
var t;
|
|
39
|
-
return typeof window < "u" && ((t = window.navigator) != null && t.language) ? window.navigator.language : l;
|
|
40
|
-
}, p = (t, e = []) => {
|
|
41
|
-
const r = t || b() || l, o = r.toLowerCase();
|
|
42
|
-
if (!e.length)
|
|
43
|
-
return o === "en" ? "en-US" : o === "zh" || o === "zh-cn" ? l : r;
|
|
44
|
-
const s = e.find((c) => c.toLowerCase() === o);
|
|
45
|
-
if (s) return s;
|
|
46
|
-
const a = o.split("-")[0], f = e.find((c) => c.toLowerCase().split("-")[0] === a);
|
|
47
|
-
return f || (a === "en" ? e.find((c) => c.toLowerCase().startsWith("en-")) || r : a === "zh" ? e.find((c) => c.toLowerCase().startsWith("zh-")) || l : r);
|
|
48
|
-
}, h = (t) => {
|
|
49
|
-
if (i.isDayjs(t)) return t;
|
|
50
|
-
if (t == null || t === "") return i();
|
|
51
|
-
const e = i(t);
|
|
52
|
-
return e.isValid() ? e : i();
|
|
53
|
-
}, T = (t) => {
|
|
54
|
-
if (!t) return m();
|
|
255
|
+
}, At = () => {
|
|
256
|
+
let t = "";
|
|
55
257
|
try {
|
|
56
|
-
|
|
258
|
+
t = typeof sessionStorage > "u" ? "" : sessionStorage.getItem("timeZone") || "";
|
|
57
259
|
} catch {
|
|
58
|
-
|
|
260
|
+
t = "";
|
|
59
261
|
}
|
|
60
|
-
|
|
262
|
+
const e = t || zt() || It();
|
|
263
|
+
return z(e) ? w(e) : M;
|
|
264
|
+
}, d = (t) => {
|
|
265
|
+
const e = w(t) || At();
|
|
266
|
+
return z(e) ? e : M;
|
|
267
|
+
}, J = (t) => {
|
|
268
|
+
var r, o;
|
|
269
|
+
const e = w(t), n = f.tz;
|
|
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, M), !0);
|
|
271
|
+
}, Zt = () => {
|
|
272
|
+
var t;
|
|
273
|
+
return typeof window < "u" && ((t = window.navigator) != null && t.language) ? window.navigator.language : D;
|
|
274
|
+
}, Lt = (t, e = []) => {
|
|
275
|
+
const r = t || Zt() || D, o = r.toLowerCase();
|
|
276
|
+
if (!e.length)
|
|
277
|
+
return o === "en" ? "en-US" : o === "zh" || o === "zh-cn" ? D : r;
|
|
278
|
+
const a = e.find((s) => s.toLowerCase() === o);
|
|
279
|
+
if (a) return a;
|
|
280
|
+
const c = o.split("-")[0], i = e.find((s) => s.toLowerCase().split("-")[0] === c);
|
|
281
|
+
return i || (c === "en" ? e.find((s) => s.toLowerCase().startsWith("en-")) || r : c === "zh" ? e.find((s) => s.toLowerCase().startsWith("zh-")) || D : r);
|
|
282
|
+
}, A = (t) => {
|
|
283
|
+
if (f.isDayjs(t)) return t;
|
|
284
|
+
if (t == null || t === "") return f();
|
|
285
|
+
const e = f(t);
|
|
286
|
+
return e.isValid() ? e : f();
|
|
287
|
+
}, k = (t) => t == null || t === "", R = (t) => f.isDayjs(t) ? t : k(t) ? f() : f(t), B = (t, e = !1) => {
|
|
288
|
+
const n = w(t);
|
|
289
|
+
return n ? d(n) : e ? d() : "";
|
|
290
|
+
}, bt = (t, e) => A(t).tz(d(e)).utcOffset(), kt = (t, e, n = H) => A(t).tz(d(e)).format(n), St = (t, e) => R(t).format(e.format), W = (t, e) => {
|
|
291
|
+
const n = e.format || S, r = B(e.timeZone, e.useClientTimeZone);
|
|
292
|
+
if (!r) return St(t, { format: n });
|
|
293
|
+
if (e.inputMode === "local")
|
|
294
|
+
return k(t) ? f().tz(r).format(n) : f.tz(t, r).format(n);
|
|
295
|
+
const o = R(t);
|
|
296
|
+
return o.isValid() ? o.tz(r).format(n) : o.format(n);
|
|
297
|
+
}, Ct = (t) => typeof t == "function", Et = (t, e) => {
|
|
298
|
+
var s, l;
|
|
299
|
+
const { moment: n } = e, r = e.format || S;
|
|
300
|
+
if (!Ct(n)) return W(t, { ...e, dateLibrary: "dayjs" });
|
|
301
|
+
const o = k(t) ? void 0 : t, a = B(e.timeZone, e.useClientTimeZone);
|
|
302
|
+
if (!a || typeof n.tz != "function") return n(o).format(r);
|
|
303
|
+
if (e.inputMode === "local")
|
|
304
|
+
return k(t) ? ((l = (s = n()).tz) == null ? void 0 : l.call(s, a).format(r)) || n().format(r) : n.tz(o, a).format(r);
|
|
305
|
+
const c = n(o);
|
|
306
|
+
return (typeof c.tz == "function" ? c.tz(a) : n.tz(o, a)).format(r);
|
|
307
|
+
}, vt = (t, e = {}) => {
|
|
308
|
+
const n = typeof e == "string" ? { format: e } : e || {}, r = {
|
|
309
|
+
...n,
|
|
310
|
+
format: n.format || S
|
|
311
|
+
};
|
|
312
|
+
return r.dateLibrary === "moment" ? Et(t, r) : W(t, r);
|
|
313
|
+
}, Wt = (t, e = S, n = {}) => vt(t, { ...n, format: e }), x = (t) => String(t).padStart(2, "0"), G = (t) => `UTC${t}`, K = (t, e) => {
|
|
314
|
+
const n = bt(t, e), r = n >= 0 ? "+" : "-", o = Math.abs(n);
|
|
315
|
+
return `UTC${r}${x(Math.floor(o / 60))}:${x(o % 60)}`;
|
|
316
|
+
}, Mt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
317
|
+
const n = t.currentUtcOffsetText || t.baseUtcOffsetText;
|
|
318
|
+
return n ? `UTC${n}` : K(e, t.timeZoneId);
|
|
319
|
+
}, Ft = (t, e) => {
|
|
61
320
|
const n = t.match(/([+-]\d{1,2})(?::?(\d{2}))?/) || [];
|
|
62
321
|
if (!n[1]) return e;
|
|
63
|
-
const r = n[1].startsWith("-") ? "-" : "+", o = n[1].replace(/[+-]/, "").padStart(2, "0"),
|
|
64
|
-
return `UTC${r}${o}:${
|
|
65
|
-
},
|
|
66
|
-
var o,
|
|
67
|
-
const r =
|
|
322
|
+
const r = n[1].startsWith("-") ? "-" : "+", o = n[1].replace(/[+-]/, "").padStart(2, "0"), a = n[2] || "00";
|
|
323
|
+
return `UTC${r}${o}:${a}`;
|
|
324
|
+
}, Ot = (t, e, n) => {
|
|
325
|
+
var o, a;
|
|
326
|
+
const r = G(n.format("Z"));
|
|
68
327
|
try {
|
|
69
|
-
const
|
|
70
|
-
return
|
|
328
|
+
const c = Intl.DateTimeFormat.supportedLocalesOf([e])[0] || e, i = (a = (o = new Intl.DateTimeFormat(c, { timeZone: t, timeZoneName: "long" }).formatToParts(n.toDate()).find((s) => s.type === "timeZoneName")) == null ? void 0 : o.value) == null ? void 0 : a.trim();
|
|
329
|
+
return i ? /^(gmt|utc)/i.test(i) ? Ft(i, r) : i : r;
|
|
71
330
|
} catch {
|
|
72
331
|
return r;
|
|
73
332
|
}
|
|
74
|
-
},
|
|
333
|
+
}, q = (t, e) => {
|
|
75
334
|
const n = e.year();
|
|
76
335
|
return Array.from(
|
|
77
336
|
new Set(
|
|
78
337
|
Array.from({ length: 12 }, (r, o) => {
|
|
79
|
-
const
|
|
80
|
-
return
|
|
338
|
+
const a = `${o + 1}`.padStart(2, "0"), c = `${n}-${a}-15 12:00:00`;
|
|
339
|
+
return f.tz(c, t).utcOffset();
|
|
81
340
|
})
|
|
82
341
|
)
|
|
83
342
|
);
|
|
84
|
-
},
|
|
85
|
-
const n =
|
|
86
|
-
|
|
87
|
-
|
|
343
|
+
}, Q = (t, e) => {
|
|
344
|
+
const n = d(t);
|
|
345
|
+
if (!z(n)) return !1;
|
|
346
|
+
const r = A(e).tz(n);
|
|
347
|
+
return q(n, r).length > 1;
|
|
348
|
+
}, E = (t, e) => {
|
|
349
|
+
const n = d(t);
|
|
350
|
+
if (!z(n)) return !1;
|
|
351
|
+
const r = A(e).tz(n), o = q(n, r);
|
|
352
|
+
return o.length <= 1 ? !1 : r.utcOffset() === Math.max(...o);
|
|
353
|
+
}, Gt = (t, e) => E(t, e), X = (t) => {
|
|
354
|
+
if (t === 1 || t === "1") return !0;
|
|
355
|
+
if (t === 0 || t === "0") return !1;
|
|
356
|
+
}, jt = (t, e) => {
|
|
357
|
+
const n = X(t.dynamicOffsetFlag);
|
|
358
|
+
return typeof n == "boolean" ? n : Q(t.timeZoneId, e);
|
|
359
|
+
}, xt = (t, e) => {
|
|
360
|
+
const n = X(t.currentDstFlag);
|
|
361
|
+
return typeof n == "boolean" ? n : E(t.timeZoneId, e);
|
|
362
|
+
}, Kt = (t, e = /* @__PURE__ */ new Date()) => t.map((n) => {
|
|
363
|
+
const r = n.tzShowName || Mt(n, e), o = jt(n, e);
|
|
364
|
+
return {
|
|
365
|
+
value: n.timeZoneId,
|
|
366
|
+
zoneName: r,
|
|
367
|
+
label: r,
|
|
368
|
+
hasDST: o,
|
|
369
|
+
isDST: o ? xt(n, e) : !1
|
|
370
|
+
};
|
|
371
|
+
}), Ut = (t) => {
|
|
88
372
|
const e = t.toLowerCase().split("-")[0];
|
|
89
|
-
return
|
|
90
|
-
},
|
|
91
|
-
const
|
|
373
|
+
return j[e] || j.default;
|
|
374
|
+
}, Nt = (t) => typeof t.showDaylightSavingLabel == "boolean" ? t.showDaylightSavingLabel : t.showDaylightSavingMarker ?? !0, qt = (t, e, n = {}) => {
|
|
375
|
+
const {
|
|
376
|
+
showZoneLabel: r = !0,
|
|
377
|
+
zoneLabel: o,
|
|
378
|
+
hasDST: a,
|
|
379
|
+
isDST: c,
|
|
380
|
+
standardTimeLabel: i,
|
|
381
|
+
daylightSavingLabel: s,
|
|
382
|
+
format: l = H
|
|
383
|
+
} = n, u = d(e), h = kt(t, u, l), p = typeof a == "boolean" ? a : Q(u, t), T = (typeof c == "boolean" ? c : E(u, t)) ? s : i, g = p && T ? `[${T}]` : "";
|
|
384
|
+
return r ? [h, o || K(t, u), g].filter(Boolean).join(" ") : [h, g].filter(Boolean).join(" ");
|
|
385
|
+
}, Qt = (t = {}) => {
|
|
386
|
+
const e = Lt(t.locale, t.supportedLocales), n = d(t.timeZone), r = A(t.value).tz(n), o = Ot(n, e, r), a = G(r.format("Z")), c = E(n, r), i = c ? Ut(e) : "", s = Nt(t), l = c && s ? `${o} - ${i}` : o;
|
|
92
387
|
return {
|
|
93
|
-
formattedValue: r.format(t.format ||
|
|
388
|
+
formattedValue: r.format(t.format || gt),
|
|
94
389
|
locale: e,
|
|
95
390
|
timeZone: n,
|
|
96
391
|
timeZoneName: o,
|
|
97
|
-
timeZoneLabel:
|
|
98
|
-
offsetLabel:
|
|
392
|
+
timeZoneLabel: l,
|
|
393
|
+
offsetLabel: a,
|
|
99
394
|
offsetMinutes: r.utcOffset(),
|
|
100
|
-
isDaylightSavingTime:
|
|
101
|
-
daylightSavingLabel:
|
|
395
|
+
isDaylightSavingTime: c,
|
|
396
|
+
daylightSavingLabel: i
|
|
102
397
|
};
|
|
103
398
|
};
|
|
104
399
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
400
|
+
P as TIME_ZONE_PACKED_DATA_URL,
|
|
401
|
+
Ht as applyDayjsIanaTimeZoneData,
|
|
402
|
+
Rt as applyMomentIanaTimeZoneData,
|
|
403
|
+
_ as assertPackedIanaData,
|
|
404
|
+
yt as assertPackedIanaTzData,
|
|
405
|
+
$ as buildIanaFetchInit,
|
|
406
|
+
Kt as buildTimeZoneDisplayOptions,
|
|
407
|
+
it as clearDayjsIanaCache,
|
|
408
|
+
mt as createIanaDbFromPackedData,
|
|
409
|
+
m as dayjsTimezoneIanaPlugin,
|
|
410
|
+
qt as formatClientLocalDateTimeLine,
|
|
411
|
+
kt as formatInTimeZone,
|
|
412
|
+
vt as formatLocalDateTime,
|
|
413
|
+
K as formatTimeZoneOffsetLabel,
|
|
414
|
+
nt as getAccessTokenFromLocalStorage,
|
|
415
|
+
at as getCachedDayjsPackedIanaData,
|
|
416
|
+
At as getClientTimeZone,
|
|
417
|
+
ot as getDefaultIanaAuthorization,
|
|
418
|
+
Yt as getKnownTimeZoneIds,
|
|
419
|
+
Qt as getTimeZoneDisplayInfo,
|
|
420
|
+
bt as getZoneUtcOffset,
|
|
421
|
+
Gt as isDaylightSavingTime,
|
|
422
|
+
z as isKnownTimeZone,
|
|
423
|
+
Jt as loadDayjsIanaTimeZoneData,
|
|
424
|
+
Y as loadIanaData,
|
|
425
|
+
O as loadIanaFromApi,
|
|
426
|
+
Y as loadMomentIanaData,
|
|
427
|
+
O as loadMomentIanaFromApi,
|
|
428
|
+
Bt as loadMomentIanaTimeZoneData,
|
|
429
|
+
Lt as normalizeLocaleCode,
|
|
430
|
+
st as preloadDayjsIanaFromApi,
|
|
431
|
+
V as preloadDayjsIanaFromData,
|
|
432
|
+
C as rebuildKnownTimeZoneIds,
|
|
433
|
+
d as resolveTimeZone,
|
|
434
|
+
Mt as resolveUtcOffsetFallback,
|
|
435
|
+
J as setDefaultTimeZone,
|
|
436
|
+
Q as timeZoneHasDST,
|
|
437
|
+
E as timeZoneIsDST,
|
|
438
|
+
Wt as toLocalDate
|
|
109
439
|
};
|
|
Binary file
|