@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.
Files changed (135) hide show
  1. package/api-services/es5.js +1811 -1697
  2. package/api-services/index.js +1456 -1363
  3. package/api-services/index.js.gz +0 -0
  4. package/api-services/modules/app-manage/es5.js +2116 -2001
  5. package/api-services/modules/app-manage/index.js +1846 -1752
  6. package/api-services/modules/app-manage/index.js.gz +0 -0
  7. package/api-services/modules/authentication/es5.js +1769 -1666
  8. package/api-services/modules/authentication/index.js +1509 -1433
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/es5.js +1732 -1629
  11. package/api-services/modules/bems/index.js +1468 -1392
  12. package/api-services/modules/bems/index.js.gz +0 -0
  13. package/api-services/modules/contract/es5.js +1769 -1666
  14. package/api-services/modules/contract/index.js +1509 -1433
  15. package/api-services/modules/contract/index.js.gz +0 -0
  16. package/api-services/modules/duty-manage/es5.js +1953 -1850
  17. package/api-services/modules/duty-manage/index.js +1688 -1612
  18. package/api-services/modules/duty-manage/index.js.gz +0 -0
  19. package/api-services/modules/enterpriseright/es5.js +1769 -1666
  20. package/api-services/modules/enterpriseright/index.js +1509 -1433
  21. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  22. package/api-services/modules/es5.js +1394 -1292
  23. package/api-services/modules/file/es5.js +1701 -1611
  24. package/api-services/modules/file/index.js +1411 -1354
  25. package/api-services/modules/file/index.js.gz +0 -0
  26. package/api-services/modules/gateway-edge/es5.js +1769 -1666
  27. package/api-services/modules/gateway-edge/index.js +1509 -1433
  28. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  29. package/api-services/modules/index.js +1063 -988
  30. package/api-services/modules/index.js.gz +0 -0
  31. package/api-services/modules/iot/es5.js +2005 -1890
  32. package/api-services/modules/iot/index.js +1741 -1647
  33. package/api-services/modules/iot/index.js.gz +0 -0
  34. package/api-services/modules/justauth/es5.js +1945 -1845
  35. package/api-services/modules/justauth/index.js +1672 -1600
  36. package/api-services/modules/justauth/index.js.gz +0 -0
  37. package/api-services/modules/knowledge/es5.js +2115 -2003
  38. package/api-services/modules/knowledge/index.js +1846 -1756
  39. package/api-services/modules/knowledge/index.js.gz +0 -0
  40. package/api-services/modules/link/es5.js +1769 -1666
  41. package/api-services/modules/link/index.js +1509 -1433
  42. package/api-services/modules/link/index.js.gz +0 -0
  43. package/api-services/modules/permission/es5.js +1769 -1666
  44. package/api-services/modules/permission/index.js +1509 -1433
  45. package/api-services/modules/permission/index.js.gz +0 -0
  46. package/api-services/modules/platformManage/es5.js +2068 -1977
  47. package/api-services/modules/platformManage/index.js +1829 -1771
  48. package/api-services/modules/platformManage/index.js.gz +0 -0
  49. package/api-services/modules/portal/es5.js +1769 -1666
  50. package/api-services/modules/portal/index.js +1509 -1433
  51. package/api-services/modules/portal/index.js.gz +0 -0
  52. package/api-services/modules/space-manage/es5.js +1950 -1847
  53. package/api-services/modules/space-manage/index.js +1681 -1605
  54. package/api-services/modules/space-manage/index.js.gz +0 -0
  55. package/api-services/modules/super-admin/es5.js +1942 -1851
  56. package/api-services/modules/super-admin/index.js +1685 -1627
  57. package/api-services/modules/super-admin/index.js.gz +0 -0
  58. package/api-services/modules/supplier/es5.js +1771 -1668
  59. package/api-services/modules/supplier/index.js +1511 -1435
  60. package/api-services/modules/supplier/index.js.gz +0 -0
  61. package/api-services/modules/supplychain-manage/es5.js +2116 -2001
  62. package/api-services/modules/supplychain-manage/index.js +1846 -1752
  63. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  64. package/api-services/modules/systemConfiguration/es5.js +1769 -1666
  65. package/api-services/modules/systemConfiguration/index.js +1509 -1433
  66. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  67. package/api-services/modules/tool/es5.js +2116 -2001
  68. package/api-services/modules/tool/index.js +1846 -1752
  69. package/api-services/modules/tool/index.js.gz +0 -0
  70. package/api-services/src/create-service/es5.js +2114 -1999
  71. package/api-services/src/create-service/index.js +1844 -1750
  72. package/api-services/src/create-service/index.js.gz +0 -0
  73. package/common-info/es5.js +2125 -2034
  74. package/common-info/getPermissionMethod/es5.js +1943 -1852
  75. package/common-info/getPermissionMethod/index.js +1700 -1642
  76. package/common-info/getPermissionMethod/index.js.gz +0 -0
  77. package/common-info/index.js +1856 -1798
  78. package/common-info/index.js.gz +0 -0
  79. package/common-tools/timezone-format/es5.d.ts +56 -2
  80. package/common-tools/timezone-format/es5.js +778 -512
  81. package/common-tools/timezone-format/index.d.ts +56 -2
  82. package/common-tools/timezone-format/index.js +539 -323
  83. package/common-tools/timezone-format/index.js.gz +0 -0
  84. package/create-api-service/es5.js +2115 -2000
  85. package/create-api-service/index.js +1845 -1751
  86. package/create-api-service/index.js.gz +0 -0
  87. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.d.ts +29 -0
  88. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.js +19826 -0
  89. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.js.gz +0 -0
  90. package/dimple-canvas/use-dimple-canvas/core/konva/index.d.ts +55 -0
  91. package/dimple-canvas/use-dimple-canvas/core/konva/index.js +116 -0
  92. package/dimple-canvas/use-dimple-canvas/core/konva/index.js.gz +0 -0
  93. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-event-listener.d.ts +104 -0
  94. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-event-listener.js +17 -0
  95. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.d.ts +8 -0
  96. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.js +51 -0
  97. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.js.gz +0 -0
  98. package/dimple-canvas/use-dimple-canvas/core/konva/utils/create-canvas.d.ts +5 -0
  99. package/dimple-canvas/use-dimple-canvas/core/konva/utils/create-canvas.js +14 -0
  100. package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.d.ts +7 -0
  101. package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.js +5 -0
  102. package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.d.ts +5 -0
  103. package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.js +180 -0
  104. package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.js.gz +0 -0
  105. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.d.ts +4 -0
  106. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.js +7535 -0
  107. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.js.gz +0 -0
  108. package/dimple-canvas/use-dimple-canvas/core/konva/utils/load-json.d.ts +6 -0
  109. package/dimple-canvas/use-dimple-canvas/core/konva/utils/load-json.js +13 -0
  110. package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.d.ts +6 -0
  111. package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.js +7 -0
  112. package/dimple-canvas/use-dimple-canvas/core/konva/utils/rule.d.ts +8 -0
  113. package/dimple-canvas/use-dimple-canvas/core/konva/utils/rule.js +193 -0
  114. package/dimple-canvas/use-dimple-canvas/core/konva/utils/rule.js.gz +0 -0
  115. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.d.ts +11 -0
  116. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.js +20 -0
  117. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.d.ts +5 -0
  118. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.js +52 -0
  119. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.js.gz +0 -0
  120. package/dimple-canvas/use-dimple-canvas/core/konva/utils/wheel-zoom.d.ts +4 -0
  121. package/dimple-canvas/use-dimple-canvas/core/konva/utils/wheel-zoom.js +14 -0
  122. package/dimple-canvas/use-dimple-canvas/es5.d.ts +9 -0
  123. package/dimple-canvas/use-dimple-canvas/es5.js +20 -0
  124. package/dimple-canvas/use-dimple-canvas/index.d.ts +9 -0
  125. package/dimple-canvas/use-dimple-canvas/index.js +10 -0
  126. package/esm-map.json +31 -1
  127. package/package.json +3 -3
  128. package/theme/bridge.d.ts +42 -0
  129. package/theme/color.d.ts +7 -0
  130. package/theme/es5.d.ts +15 -32
  131. package/theme/es5.js +1120 -651
  132. package/theme/index.d.ts +15 -32
  133. package/theme/index.js +720 -468
  134. package/theme/index.js.gz +0 -0
  135. package/theme/source-variables.d.ts +35 -0
@@ -1,9 +1,10 @@
1
1
  import f from "dayjs";
2
- import tt from "dayjs/plugin/utc";
3
- import et from "dayjs/plugin/timezone";
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 P = "/api/admin/basic-application/sys-info/v1/license/time-zone-packed-data";
6
- function nt() {
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 ot() {
16
- const t = nt();
17
- if (!(t == null || t === ""))
18
- return t.trim().startsWith("Bearer ") ? t.trim() : `Bearer ${t.trim()}`;
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 $(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)
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 L = null, I = null;
26
- function _(t) {
27
- if (!t || typeof t != "object")
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 e = t;
30
- if (!Array.isArray(e.zones))
50
+ const t = e;
51
+ if (!Array.isArray(t.zones))
31
52
  throw new Error("Invalid IANA response: missing zones array");
32
- const n = e.links;
53
+ const n = t.links;
33
54
  return {
34
- version: typeof e.version == "string" ? e.version : void 0,
35
- zones: e.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 rt(t, e) {
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(t, e);
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 V(t) {
48
- return I = _(t), L = mt(I), I;
68
+ function se(e) {
69
+ return p = re(e), _ = Oe(p), p;
49
70
  }
50
- function at() {
51
- return I;
71
+ function Se() {
72
+ return p;
52
73
  }
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);
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 it() {
61
- L = null, I = null;
81
+ function Ce() {
82
+ _ = null, p = null;
62
83
  }
63
- function F(t) {
64
- return t > 96 ? t - 87 : t > 64 ? t - 29 : t - 48;
84
+ function B(e) {
85
+ return e > 96 ? e - 87 : e > 64 ? e - 29 : e - 48;
65
86
  }
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));
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 s = 0; s < i.length; s++)
75
- o = o / 60, r += F(i.charCodeAt(s)) * o;
76
- return (n + r) * e;
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 v(t) {
79
- const e = [];
80
- for (const n of t)
81
- e.push(ct(n));
82
- return e;
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 ft(t) {
85
- let e = 0;
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 r of t)
88
- e += r, n.push(Math.round(e * 6e4));
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 lt(t, e) {
116
+ function Me(e, t) {
92
117
  const n = [];
93
- for (const r of e)
94
- n.push(t[r]);
118
+ for (const o of t)
119
+ n.push(e[o]);
95
120
  return n;
96
121
  }
97
- function ut(t) {
98
- const e = t.split("|");
99
- if (e.length < 5)
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 = e[0].toLowerCase(), r = v(e[2].split(" ")), o = v(e[3].split("")), a = ft(v(e[4].split(" "))), c = lt(r, o);
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: a,
106
- o: c
133
+ u: s,
134
+ o: i
107
135
  }
108
136
  };
109
137
  }
110
- function mt(t) {
111
- if (!t || !Array.isArray(t.zones))
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 e = {};
114
- for (const r of t.zones) {
115
- const o = ut(r);
116
- e[o.name] = o.rule;
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 = 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);
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 e;
163
+ return Ne(t), t;
127
164
  }
128
- function dt() {
129
- if (!L)
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 L;
170
+ return _;
134
171
  }
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];
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 a[i];
183
+ return s[c];
147
184
  }
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);
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
- 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);
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
- }, 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")
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 e = t;
171
- if (!Array.isArray(e.zones))
207
+ const t = e;
208
+ if (!Array.isArray(t.zones))
172
209
  throw new Error("Invalid IANA response: missing zones array");
173
- const n = e.links;
210
+ const n = t.links;
174
211
  return {
175
- version: typeof e.version == "string" ? e.version : void 0,
176
- zones: e.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 Y(t, e) {
181
- if (!t || typeof t.tz != "object" || typeof t.tz.load != "function")
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 (!e || !Array.isArray(e.zones))
220
+ if (!t || !Array.isArray(t.zones))
184
221
  throw new Error("Invalid packed IANA data: zones must be an array");
185
- t.tz.load(e);
222
+ e.tz.load(t);
186
223
  }
187
- async function pt(t, e) {
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(t, e);
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 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;
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(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 = {
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
- }, 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 = () => {
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
- }, wt = (t) => {
221
- if (!t) return !1;
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: t }), !0;
337
+ return new Intl.DateTimeFormat(void 0, { timeZone: e }), !0;
225
338
  } catch {
226
339
  return !1;
227
340
  }
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);
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(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 = () => {
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 t = (n = f.tz) == null ? void 0 : n.guess, e = typeof t == "function" ? t : Dt;
362
+ const e = (n = f.tz) == null ? void 0 : n.guess, t = typeof e == "function" ? e : $e;
250
363
  try {
251
- return e == null ? void 0 : e();
364
+ return t == null ? void 0 : t();
252
365
  } catch {
253
366
  return;
254
367
  }
255
- }, At = () => {
256
- let t = "";
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 = typeof sessionStorage > "u" ? "" : sessionStorage.getItem("timeZone") || "";
382
+ (t = w()) == null || t.dispatchEvent(new CustomEvent(ce, { detail: e }));
259
383
  } catch {
260
- t = "";
261
384
  }
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 = {
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 || S
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 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) => {
320
- const n = t.match(/([+-]\d{1,2})(?::?(\d{2}))?/) || [];
321
- if (!n[1]) return e;
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"));
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 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;
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 r;
532
+ return o;
332
533
  }
333
- }, q = (t, e) => {
334
- const n = e.year();
534
+ }, ge = (e, t) => {
535
+ const n = t.year();
335
536
  return Array.from(
336
537
  new Set(
337
- Array.from({ length: 12 }, (r, o) => {
338
- const a = `${o + 1}`.padStart(2, "0"), c = `${n}-${a}-15 12:00:00`;
339
- return f.tz(c, t).utcOffset();
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
- }, 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);
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: r,
367
- label: r,
368
- hasDST: o,
369
- isDST: o ? xt(n, e) : !1
567
+ zoneName: o,
568
+ label: o,
569
+ hasDST: r,
570
+ isDST: r ? Dt(n, t) : !1
370
571
  };
371
- }), Ut = (t) => {
372
- const e = t.toLowerCase().split("-")[0];
373
- return j[e] || j.default;
374
- }, Nt = (t) => typeof t.showDaylightSavingLabel == "boolean" ? t.showDaylightSavingLabel : t.showDaylightSavingMarker ?? !0, qt = (t, e, n = {}) => {
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: 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;
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: r.format(t.format || gt),
389
- locale: e,
589
+ formattedValue: o.format(e.format || Ve),
590
+ locale: t,
390
591
  timeZone: n,
391
- timeZoneName: o,
392
- timeZoneLabel: l,
393
- offsetLabel: a,
394
- offsetMinutes: r.utcOffset(),
395
- isDaylightSavingTime: c,
396
- daylightSavingLabel: i
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
- 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
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
  };