@das-fed/upf-utils 6.4.0-dev.260 → 6.4.0-dev.262

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