react-semaphor 0.1.325 → 0.1.327
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +260 -226
- package/dist/brand-studio/index.cjs +2 -2
- package/dist/brand-studio/index.js +7 -6
- package/dist/chunks/{braces-ZjRH2Kl7.js → braces-B6qRDu1H.js} +1 -1
- package/dist/chunks/{braces-C7BeIXvM.js → braces-BGWZEnQJ.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-DHhT6Sja.js → calendar-preferences-dialog-CjwbE_82.js} +6 -5
- package/dist/chunks/calendar-preferences-dialog-fkLUMJyR.js +1 -0
- package/dist/chunks/{chevrons-up-down-CA-XvN1o.js → chevrons-up-down-BpsogQvv.js} +1 -1
- package/dist/chunks/{chevrons-up-down-Cuilz9aY.js → chevrons-up-down-xG-bVFD9.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DZiFMK8I.js → dashboard-briefing-launcher-Co57xBfS.js} +2 -2
- package/dist/chunks/{dashboard-briefing-launcher-BzIxRlzW.js → dashboard-briefing-launcher-Cy1nWZRW.js} +714 -719
- package/dist/chunks/{dashboard-controls-DVwsWny9.js → dashboard-controls-BWnVEFJq.js} +10 -9
- package/dist/chunks/{dashboard-controls-BX693lE0.js → dashboard-controls-C7rOGZO-.js} +1 -1
- package/dist/chunks/{dashboard-json-D15C_I9e.js → dashboard-json-BpRNSsF3.js} +7 -6
- package/dist/chunks/dashboard-json-DBPMknGo.js +1 -0
- package/dist/chunks/date-formatter-B4EBSe9C.js +1 -0
- package/dist/chunks/date-formatter-CzcPZx39.js +416 -0
- package/dist/chunks/edit-dashboard-visual-B2vkIKEa.js +178 -0
- package/dist/chunks/{edit-dashboard-visual-wQyJEcVH.js → edit-dashboard-visual-CYf26co_.js} +8243 -7784
- package/dist/chunks/index-BD90s-wf.js +1309 -0
- package/dist/chunks/index-BxM99sFL.js +1 -0
- package/dist/chunks/index-CuHybtft.js +51 -0
- package/dist/chunks/{index-CffvIaZO.js → index-DTlbYpxd.js} +29440 -28968
- package/dist/chunks/{palette-D96DOM7E.js → palette-CSF7IVJn.js} +1 -1
- package/dist/chunks/{palette-CanPG11m.js → palette-CWgEPBoG.js} +1 -1
- package/dist/chunks/{resource-management-panel-DlnrD0y-.js → resource-management-panel-D6nbfJY3.js} +1 -1
- package/dist/chunks/{resource-management-panel-CLoO2DL3.js → resource-management-panel-D893Onv8.js} +6 -5
- package/dist/chunks/{save-CqrBQKG6.js → save-CtQbSub2.js} +1 -1
- package/dist/chunks/{save-DxkSzUTZ.js → save-DRdFKF57.js} +1 -1
- package/dist/chunks/switch-DJJJD_g1.js +168 -0
- package/dist/chunks/{switch-Deo2Ltmj.js → switch-DKf6vHfP.js} +2222 -2228
- package/dist/chunks/{use-create-flow-overlay-state-DocFanjO.js → use-create-flow-overlay-state-C4LgoK8q.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-DsPoCfMu.js → use-create-flow-overlay-state-p21zs2p6.js} +29 -28
- package/dist/chunks/{use-visual-utils-BdO22fQZ.js → use-visual-utils-BKBua6o4.js} +2 -2
- package/dist/chunks/{use-visual-utils-DSbXQQD1.js → use-visual-utils-BqWm0QeW.js} +1 -1
- package/dist/chunks/validators-DDAweCzB.js +371 -0
- package/dist/chunks/validators-odlRJblR.js +2 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +919 -507
- package/dist/data-app-sdk/index.cjs +1 -0
- package/dist/data-app-sdk/index.js +512 -0
- package/dist/format-utils/index.cjs +4 -4
- package/dist/format-utils/index.js +22 -21
- package/dist/index.cjs +1 -1
- package/dist/index.js +141 -140
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +326 -2
- package/dist/types/dashboard-authoring.d.ts +102 -3
- package/dist/types/dashboard.d.ts +23 -3
- package/dist/types/data-app-sdk.d.ts +379 -0
- package/dist/types/format-utils.d.ts +25 -0
- package/dist/types/main.d.ts +182 -12
- package/dist/types/shared.d.ts +18 -2
- package/dist/types/surfboard.d.ts +23 -3
- package/dist/types/types.d.ts +38 -4
- package/package.json +6 -1
- package/dist/chunks/calendar-preferences-dialog-BxeROxyq.js +0 -1
- package/dist/chunks/dashboard-json-DxNEFM-p.js +0 -1
- package/dist/chunks/date-formatter-D9Bvw5Qk.js +0 -1
- package/dist/chunks/date-formatter-DyIOb6uC.js +0 -333
- package/dist/chunks/edit-dashboard-visual-90_qEgRc.js +0 -178
- package/dist/chunks/index-YTk9Hab2.js +0 -1303
- package/dist/chunks/switch-BXICAlvS.js +0 -168
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
import { t as l, c as O, g as S, e as _, a as I, m as $, b as x, f as X, d as U, h as R } from "./index-DFOb_6HB.js";
|
|
2
|
-
function M(r, e) {
|
|
3
|
-
const c = l(r), a = l(e), t = c.getTime() - a.getTime();
|
|
4
|
-
return t < 0 ? -1 : t > 0 ? 1 : t;
|
|
5
|
-
}
|
|
6
|
-
function v(r) {
|
|
7
|
-
return O(r, Date.now());
|
|
8
|
-
}
|
|
9
|
-
function A(r, e) {
|
|
10
|
-
const c = l(r), a = l(e), t = c.getFullYear() - a.getFullYear(), f = c.getMonth() - a.getMonth();
|
|
11
|
-
return t * 12 + f;
|
|
12
|
-
}
|
|
13
|
-
function C(r) {
|
|
14
|
-
return (e) => {
|
|
15
|
-
const a = (r ? Math[r] : Math.trunc)(e);
|
|
16
|
-
return a === 0 ? 0 : a;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
function V(r, e) {
|
|
20
|
-
return +l(r) - +l(e);
|
|
21
|
-
}
|
|
22
|
-
function Y(r) {
|
|
23
|
-
const e = l(r);
|
|
24
|
-
return e.setHours(23, 59, 59, 999), e;
|
|
25
|
-
}
|
|
26
|
-
function B(r) {
|
|
27
|
-
const e = l(r), c = e.getMonth();
|
|
28
|
-
return e.setFullYear(e.getFullYear(), c + 1, 0), e.setHours(23, 59, 59, 999), e;
|
|
29
|
-
}
|
|
30
|
-
function W(r) {
|
|
31
|
-
const e = l(r);
|
|
32
|
-
return +Y(e) == +B(e);
|
|
33
|
-
}
|
|
34
|
-
function k(r, e) {
|
|
35
|
-
const c = l(r), a = l(e), t = M(c, a), f = Math.abs(
|
|
36
|
-
A(c, a)
|
|
37
|
-
);
|
|
38
|
-
let i;
|
|
39
|
-
if (f < 1)
|
|
40
|
-
i = 0;
|
|
41
|
-
else {
|
|
42
|
-
c.getMonth() === 1 && c.getDate() > 27 && c.setDate(30), c.setMonth(c.getMonth() - t * f);
|
|
43
|
-
let u = M(c, a) === -t;
|
|
44
|
-
W(l(r)) && f === 1 && M(r, a) === 1 && (u = !1), i = t * (f - Number(u));
|
|
45
|
-
}
|
|
46
|
-
return i === 0 ? 0 : i;
|
|
47
|
-
}
|
|
48
|
-
function H(r, e, c) {
|
|
49
|
-
const a = V(r, e) / 1e3;
|
|
50
|
-
return C(c == null ? void 0 : c.roundingMethod)(a);
|
|
51
|
-
}
|
|
52
|
-
function E(r, e, c) {
|
|
53
|
-
const a = S(), t = (c == null ? void 0 : c.locale) ?? a.locale ?? _, f = 2520, i = M(r, e);
|
|
54
|
-
if (isNaN(i))
|
|
55
|
-
throw new RangeError("Invalid time value");
|
|
56
|
-
const u = Object.assign({}, c, {
|
|
57
|
-
addSuffix: c == null ? void 0 : c.addSuffix,
|
|
58
|
-
comparison: i
|
|
59
|
-
});
|
|
60
|
-
let m, D;
|
|
61
|
-
i > 0 ? (m = l(e), D = l(r)) : (m = l(r), D = l(e));
|
|
62
|
-
const s = H(D, m), w = (I(D) - I(m)) / 1e3, n = Math.round((s - w) / 60);
|
|
63
|
-
let d;
|
|
64
|
-
if (n < 2)
|
|
65
|
-
return c != null && c.includeSeconds ? s < 5 ? t.formatDistance("lessThanXSeconds", 5, u) : s < 10 ? t.formatDistance("lessThanXSeconds", 10, u) : s < 20 ? t.formatDistance("lessThanXSeconds", 20, u) : s < 40 ? t.formatDistance("halfAMinute", 0, u) : s < 60 ? t.formatDistance("lessThanXMinutes", 1, u) : t.formatDistance("xMinutes", 1, u) : n === 0 ? t.formatDistance("lessThanXMinutes", 1, u) : t.formatDistance("xMinutes", n, u);
|
|
66
|
-
if (n < 45)
|
|
67
|
-
return t.formatDistance("xMinutes", n, u);
|
|
68
|
-
if (n < 90)
|
|
69
|
-
return t.formatDistance("aboutXHours", 1, u);
|
|
70
|
-
if (n < $) {
|
|
71
|
-
const g = Math.round(n / 60);
|
|
72
|
-
return t.formatDistance("aboutXHours", g, u);
|
|
73
|
-
} else {
|
|
74
|
-
if (n < f)
|
|
75
|
-
return t.formatDistance("xDays", 1, u);
|
|
76
|
-
if (n < x) {
|
|
77
|
-
const g = Math.round(n / $);
|
|
78
|
-
return t.formatDistance("xDays", g, u);
|
|
79
|
-
} else if (n < x * 2)
|
|
80
|
-
return d = Math.round(n / x), t.formatDistance("aboutXMonths", d, u);
|
|
81
|
-
}
|
|
82
|
-
if (d = k(D, m), d < 12) {
|
|
83
|
-
const g = Math.round(n / x);
|
|
84
|
-
return t.formatDistance("xMonths", g, u);
|
|
85
|
-
} else {
|
|
86
|
-
const g = d % 12, y = Math.trunc(d / 12);
|
|
87
|
-
return g < 3 ? t.formatDistance("aboutXYears", y, u) : g < 9 ? t.formatDistance("overXYears", y, u) : t.formatDistance("almostXYears", y + 1, u);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
function j(r, e) {
|
|
91
|
-
return E(r, v(r), e);
|
|
92
|
-
}
|
|
93
|
-
function T(r) {
|
|
94
|
-
if (!r) return !1;
|
|
95
|
-
const e = r.toLowerCase().replace("_", "-");
|
|
96
|
-
return e === "en-in" || e.startsWith("en-in-");
|
|
97
|
-
}
|
|
98
|
-
function G(r, e) {
|
|
99
|
-
const c = Math.abs(r);
|
|
100
|
-
return c >= 1e12 ? { divisor: 1e12, suffix: "T" } : c >= 1e9 ? { divisor: 1e9, suffix: "B" } : T(e) && c >= 1e7 ? { divisor: 1e7, suffix: "Cr" } : c >= 1e6 ? { divisor: 1e6, suffix: "M" } : T(e) && c >= 1e5 ? { divisor: 1e5, suffix: "L" } : c >= 1e3 ? { divisor: 1e3, suffix: "K" } : { divisor: 1, suffix: "" };
|
|
101
|
-
}
|
|
102
|
-
function N(r, e) {
|
|
103
|
-
try {
|
|
104
|
-
const c = h(e);
|
|
105
|
-
return G(r, c);
|
|
106
|
-
} catch {
|
|
107
|
-
return G(r, "en-US");
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function K(r) {
|
|
111
|
-
try {
|
|
112
|
-
return new Intl.NumberFormat(r), !0;
|
|
113
|
-
} catch {
|
|
114
|
-
return !1;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
function h(r) {
|
|
118
|
-
return r && K(r) ? r : "en-US";
|
|
119
|
-
}
|
|
120
|
-
function L(r, e) {
|
|
121
|
-
if (r == null || isNaN(r))
|
|
122
|
-
return "";
|
|
123
|
-
const c = h(e == null ? void 0 : e.locale);
|
|
124
|
-
let a = r;
|
|
125
|
-
if (e != null && e.multiplyBy && (a *= e.multiplyBy), e != null && e.useSuffix) {
|
|
126
|
-
const { divisor: f, suffix: i } = N(a, c);
|
|
127
|
-
a = a / f;
|
|
128
|
-
const u = new Intl.NumberFormat(c, {
|
|
129
|
-
minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
|
|
130
|
-
maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
|
|
131
|
-
useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
|
|
132
|
-
}).format(a);
|
|
133
|
-
return `${(e == null ? void 0 : e.prefix) ?? ""}${u}${i}${(e == null ? void 0 : e.suffix) ?? ""}`;
|
|
134
|
-
}
|
|
135
|
-
const t = new Intl.NumberFormat(c, {
|
|
136
|
-
minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
|
|
137
|
-
maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
|
|
138
|
-
useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
|
|
139
|
-
}).format(a);
|
|
140
|
-
if (e != null && e.negativeInParentheses && a < 0) {
|
|
141
|
-
const f = t.replace("-", "");
|
|
142
|
-
return `(${(e == null ? void 0 : e.prefix) ?? ""}${f}${(e == null ? void 0 : e.suffix) ?? ""})`;
|
|
143
|
-
}
|
|
144
|
-
return `${(e == null ? void 0 : e.prefix) ?? ""}${t}${(e == null ? void 0 : e.suffix) ?? ""}`;
|
|
145
|
-
}
|
|
146
|
-
function q(r, e) {
|
|
147
|
-
if (r == null || isNaN(r))
|
|
148
|
-
return "";
|
|
149
|
-
const c = h(e == null ? void 0 : e.locale), a = (e == null ? void 0 : e.currency) || "USD", t = r < 0, f = !!(e != null && e.negativeInParentheses && t), i = f ? Math.abs(r) : r;
|
|
150
|
-
try {
|
|
151
|
-
if (e != null && e.useSuffix) {
|
|
152
|
-
const { divisor: m, suffix: D } = N(i, c), s = i / m, n = `${new Intl.NumberFormat(c, {
|
|
153
|
-
style: "currency",
|
|
154
|
-
currency: a,
|
|
155
|
-
minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
|
|
156
|
-
maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
|
|
157
|
-
useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
|
|
158
|
-
}).format(s)}${D}`;
|
|
159
|
-
return f ? `(${n})` : n;
|
|
160
|
-
}
|
|
161
|
-
const u = new Intl.NumberFormat(c, {
|
|
162
|
-
style: "currency",
|
|
163
|
-
currency: a,
|
|
164
|
-
minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
|
|
165
|
-
maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
|
|
166
|
-
useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
|
|
167
|
-
}).format(i);
|
|
168
|
-
return f ? `(${u})` : u;
|
|
169
|
-
} catch {
|
|
170
|
-
const u = Math.abs(r), m = e != null && e.useSuffix ? N(u, c) : { divisor: 1, suffix: "" }, D = L(
|
|
171
|
-
u / m.divisor,
|
|
172
|
-
{
|
|
173
|
-
locale: c,
|
|
174
|
-
minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
|
|
175
|
-
maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
|
|
176
|
-
useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
|
|
177
|
-
}
|
|
178
|
-
), s = `${a} ${D}${m.suffix}`;
|
|
179
|
-
return t ? e != null && e.negativeInParentheses ? `(${s})` : `-${s}` : s;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
function J(r, e) {
|
|
183
|
-
if (r == null || isNaN(r))
|
|
184
|
-
return "";
|
|
185
|
-
const c = h(e == null ? void 0 : e.locale), t = (e == null ? void 0 : e.alreadyPercent) ?? (e == null ? void 0 : e.percentValueMode) === "whole" ? r / 100 : r;
|
|
186
|
-
return new Intl.NumberFormat(c, {
|
|
187
|
-
style: "percent",
|
|
188
|
-
minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
|
|
189
|
-
maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
|
|
190
|
-
useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
|
|
191
|
-
}).format(t);
|
|
192
|
-
}
|
|
193
|
-
function P(r, e) {
|
|
194
|
-
if (r == null || isNaN(r))
|
|
195
|
-
return "";
|
|
196
|
-
const c = h(e == null ? void 0 : e.locale);
|
|
197
|
-
return new Intl.NumberFormat(c, {
|
|
198
|
-
notation: "scientific",
|
|
199
|
-
minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
|
|
200
|
-
maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2
|
|
201
|
-
}).format(r);
|
|
202
|
-
}
|
|
203
|
-
function F(r, e, c = "en-US") {
|
|
204
|
-
if (r == null || isNaN(r))
|
|
205
|
-
return "";
|
|
206
|
-
const a = h((e == null ? void 0 : e.locale) || c), t = (e == null ? void 0 : e.style) || "decimal";
|
|
207
|
-
if (t === "percent") {
|
|
208
|
-
const i = ((e == null ? void 0 : e.percentValueMode) ?? "whole") === "whole" ? r / 100 : r;
|
|
209
|
-
return new Intl.NumberFormat(a, {
|
|
210
|
-
style: "percent",
|
|
211
|
-
minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
|
|
212
|
-
maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
|
|
213
|
-
useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
|
|
214
|
-
}).format(i);
|
|
215
|
-
}
|
|
216
|
-
return t === "currency" ? new Intl.NumberFormat(a, {
|
|
217
|
-
style: "currency",
|
|
218
|
-
currency: (e == null ? void 0 : e.currency) || "USD",
|
|
219
|
-
minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
|
|
220
|
-
maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
|
|
221
|
-
useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
|
|
222
|
-
}).format(r) : t === "scientific" ? P(r, {
|
|
223
|
-
locale: a,
|
|
224
|
-
minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
|
|
225
|
-
maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2
|
|
226
|
-
}) : new Intl.NumberFormat(a, {
|
|
227
|
-
minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
|
|
228
|
-
maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
|
|
229
|
-
useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
|
|
230
|
-
}).format(r);
|
|
231
|
-
}
|
|
232
|
-
function b(r, e, c) {
|
|
233
|
-
const a = {
|
|
234
|
-
style: e === "currency" ? "currency" : e === "percent" ? "percent" : "decimal",
|
|
235
|
-
locale: c == null ? void 0 : c.locale,
|
|
236
|
-
currency: c == null ? void 0 : c.currency,
|
|
237
|
-
minimumFractionDigits: c == null ? void 0 : c.decimalPlaces,
|
|
238
|
-
maximumFractionDigits: c == null ? void 0 : c.decimalPlaces,
|
|
239
|
-
useSuffix: c == null ? void 0 : c.useSuffix,
|
|
240
|
-
prefix: c == null ? void 0 : c.prefix,
|
|
241
|
-
suffix: c == null ? void 0 : c.suffix,
|
|
242
|
-
negativeInParentheses: c == null ? void 0 : c.negativeInParentheses,
|
|
243
|
-
multiplyBy: c == null ? void 0 : c.multiplyBy
|
|
244
|
-
};
|
|
245
|
-
switch (e) {
|
|
246
|
-
case "currency":
|
|
247
|
-
return q(r, a);
|
|
248
|
-
case "percent":
|
|
249
|
-
return J(r, a);
|
|
250
|
-
case "scientific":
|
|
251
|
-
return P(r, a);
|
|
252
|
-
default:
|
|
253
|
-
return L(r, a);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
function p(r, e) {
|
|
257
|
-
return r && r !== "auto" ? r : e;
|
|
258
|
-
}
|
|
259
|
-
function o(r, e = /* @__PURE__ */ new Date()) {
|
|
260
|
-
try {
|
|
261
|
-
const c = {
|
|
262
|
-
timeZone: r,
|
|
263
|
-
timeZoneName: "short"
|
|
264
|
-
}, t = new Intl.DateTimeFormat("en-US", c).formatToParts(e).find((f) => f.type === "timeZoneName");
|
|
265
|
-
return (t == null ? void 0 : t.value) || r;
|
|
266
|
-
} catch {
|
|
267
|
-
return r;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
function ee(r) {
|
|
271
|
-
try {
|
|
272
|
-
const e = {
|
|
273
|
-
timeZone: r,
|
|
274
|
-
timeZoneName: "long"
|
|
275
|
-
}, a = new Intl.DateTimeFormat("en-US", e).formatToParts(
|
|
276
|
-
/* @__PURE__ */ new Date()
|
|
277
|
-
).find((t) => t.type === "timeZoneName");
|
|
278
|
-
return (a == null ? void 0 : a.value) || r;
|
|
279
|
-
} catch {
|
|
280
|
-
return r;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
function Z(r, e = "auto") {
|
|
284
|
-
if (!r)
|
|
285
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
286
|
-
const c = r.endsWith("Z"), a = /[+-]\d{2}:?\d{2}$/.test(r), t = /\([A-Z]{3,4}\)$/.test(r);
|
|
287
|
-
if (e === "auto")
|
|
288
|
-
return c || a || t ? new Date(r) : /* @__PURE__ */ new Date(r + "Z");
|
|
289
|
-
if (e === "local") {
|
|
290
|
-
if (c || a) {
|
|
291
|
-
const f = r.replace(/Z$/, "").replace(/[+-]\d{2}:?\d{2}$/, "");
|
|
292
|
-
return new Date(f);
|
|
293
|
-
}
|
|
294
|
-
return new Date(r);
|
|
295
|
-
} else return e === "UTC" ? c ? new Date(r) : a ? new Date(r) : /* @__PURE__ */ new Date(r + "Z") : c || a || t ? new Date(r) : R(r, e);
|
|
296
|
-
}
|
|
297
|
-
const Q = "MM/dd/yyyy", re = (r, e, c, a = "auto") => {
|
|
298
|
-
if (!r)
|
|
299
|
-
return "";
|
|
300
|
-
try {
|
|
301
|
-
const t = Z(r, a);
|
|
302
|
-
if (isNaN(t.getTime()))
|
|
303
|
-
return r;
|
|
304
|
-
const i = (e && e.trim() ? e : Q).replace(/LLLL/g, "MMMM").replace(/LLL/g, "MMM");
|
|
305
|
-
return c && c !== "auto" ? X(t, c, i) : U(t, i);
|
|
306
|
-
} catch (t) {
|
|
307
|
-
return console.error("Date formatting error:", t), r;
|
|
308
|
-
}
|
|
309
|
-
}, ce = (r, e = "auto") => {
|
|
310
|
-
if (!r)
|
|
311
|
-
return "";
|
|
312
|
-
try {
|
|
313
|
-
const c = Z(r, e);
|
|
314
|
-
return isNaN(c.getTime()) ? r : j(c, { addSuffix: !0 });
|
|
315
|
-
} catch (c) {
|
|
316
|
-
return console.error("Relative time formatting error:", c), r;
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
export {
|
|
320
|
-
ce as a,
|
|
321
|
-
re as b,
|
|
322
|
-
L as c,
|
|
323
|
-
q as d,
|
|
324
|
-
J as e,
|
|
325
|
-
F as f,
|
|
326
|
-
P as g,
|
|
327
|
-
b as h,
|
|
328
|
-
o as i,
|
|
329
|
-
ee as j,
|
|
330
|
-
j as k,
|
|
331
|
-
Z as p,
|
|
332
|
-
p as r
|
|
333
|
-
};
|