react-semaphor 0.1.542 → 0.1.544
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/activity/index.js +73 -0
- package/dist/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +51 -50
- package/dist/chunks/{apply-dashboard-operations-Btbp2-6v.js → apply-dashboard-operations-Bz4n1Lq6.js} +44 -44
- package/dist/chunks/{assistant-chat-oHF5lTjA.js → assistant-chat-BNLkCDml.js} +288 -288
- package/dist/chunks/{comparison-window-caption-ChIyd_-L.js → comparison-window-caption-BTkrN3W4.js} +468 -463
- package/dist/chunks/dashboard-briefing-launcher-DQ_8O_e2.js +3725 -0
- package/dist/chunks/{dashboard-controls-CIn22Qgp.js → dashboard-controls-8RyBTQUO.js} +530 -525
- package/dist/chunks/dashboard-g5a4DKWq.js +14 -0
- package/dist/chunks/{dashboard-json-ZUYsIExq.js → dashboard-json-7qT9jmfL.js} +1 -1
- package/dist/chunks/{document-dashboard-inputs-C6MJVyoI.js → document-dashboard-inputs-BC6p-ESg.js} +4 -4
- package/dist/chunks/{document-sheet-utils-BsZUnHRl.js → document-sheet-utils-Duo9uLoH.js} +11 -11
- package/dist/chunks/{edit-dashboard-visual-DLdereA7.js → edit-dashboard-visual-BfJwnRIZ.js} +249 -248
- package/dist/chunks/export-file-format-C-tJsxsf.js +111 -0
- package/dist/chunks/{index-CV5rHq5D.js → index-DkAyQvC6.js} +59 -58
- package/dist/chunks/{matrix-formatter-BnsTX90d.js → matrix-formatter-CxJLkztA.js} +1 -1
- package/dist/chunks/{numeric-presentation-BSAqPpHt.js → numeric-presentation-DESvLiu9.js} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-BBlAfBA0.js → pivot-result-lifecycle-DM4CyGKs.js} +287 -395
- package/dist/chunks/{raw-temporal-presentation-CZ2r0Vb_.js → raw-temporal-presentation-CLiVi90c.js} +2 -2
- package/dist/chunks/{report-preferences-dialog-MRUWpMcJ.js → report-preferences-dialog-Df7VpRVW.js} +195 -195
- package/dist/chunks/{saved-dashboard-context-DjPqgFly.js → saved-dashboard-context-B-mQ--nV.js} +3 -3
- package/dist/chunks/{semaphor-ready-indicator-BWSpRsPj.js → semaphor-ready-indicator-DDAxk8us.js} +39892 -39380
- package/dist/chunks/{shelf-drop-preview-context-CQbFLm3q.js → shelf-drop-preview-context-BSRPwaED.js} +414 -371
- package/dist/chunks/{table-export-sheet-BHSnuZHd.js → table-export-sheet-CPfGAQ9X.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BJDNqdOh.js → use-create-flow-overlay-state-BxzFviM-.js} +67 -78
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +72 -72
- package/dist/data-app-sdk/index.js +1 -1
- package/dist/format-utils/index.js +226 -223
- package/dist/index.js +266 -271
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/activity.d.ts +2 -0
- package/dist/types/components/activity/activity-bell.d.ts +11 -0
- package/dist/types/components/activity/activity-instance.d.ts +50 -0
- package/dist/types/components/activity/activity-notices.d.ts +7 -0
- package/dist/types/components/activity/activity-provider.d.ts +21 -0
- package/dist/types/components/activity/activity-types.d.ts +177 -0
- package/dist/types/components/activity/index.d.ts +6 -0
- package/dist/types/components/activity/use-activity.d.ts +20 -0
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/briefings/briefing-author.d.ts +14 -12
- package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +5 -0
- package/dist/types/components/briefings/use-briefing-run-detail.d.ts +34 -0
- package/dist/types/components/index.d.ts +1 -4
- package/dist/types/lib/activity-identity.d.ts +21 -0
- package/dist/types/lib/api/exports-api.d.ts +4 -4
- package/dist/types/lib/hooks/index.d.ts +1 -3
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
- package/dist/types/shared/activity/activity-contract.d.ts +84 -0
- package/dist/types/shared/activity/index.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +6 -0
- package/dist/types/shared/format-utils/export-policy.d.ts +12 -0
- package/package.json +5 -1
- package/dist/chunks/dashboard-briefing-launcher-B-cm719R.js +0 -4248
- package/dist/chunks/dashboard-s5WJBcK8.js +0 -14
- package/dist/types/components/briefings/briefing-author/run-ui.d.ts +0 -81
- package/dist/types/components/briefings/use-briefing-run-polling.d.ts +0 -34
- package/dist/types/components/notifications/export-notification-item.d.ts +0 -24
- package/dist/types/components/notifications/export-notification-list.d.ts +0 -8
- package/dist/types/components/notifications/index.d.ts +0 -3
- package/dist/types/components/notifications/notification-bell.d.ts +0 -13
- package/dist/types/lib/exports/bounded-request.d.ts +0 -12
- package/dist/types/lib/hooks/use-export-polling.d.ts +0 -32
- package/dist/types/lib/hooks/use-export-recovery.d.ts +0 -11
- package/dist/types/lib/stores/export-store.d.ts +0 -62
package/dist/chunks/{report-preferences-dialog-MRUWpMcJ.js → report-preferences-dialog-Df7VpRVW.js}
RENAMED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { jsxs as h, jsx as l, Fragment as ie } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "react";
|
|
3
|
-
import Ft, { useRef as J, useState as F, useCallback as $, useEffect as ee, useMemo as Q, lazy as Se, Suspense as ye, useLayoutEffect as
|
|
4
|
-
import { u as j, b6 as _t, b7 as Mt,
|
|
5
|
-
import { ad as
|
|
6
|
-
import { l as oe, B as V, N as
|
|
7
|
-
import { X as
|
|
8
|
-
import { j as
|
|
3
|
+
import Ft, { useRef as J, useState as F, useCallback as $, useEffect as ee, useMemo as Q, lazy as Se, Suspense as ye, useLayoutEffect as Xe, Activity as Lt, useId as ce } from "react";
|
|
4
|
+
import { u as j, b6 as _t, b7 as Mt, W as Ut, b8 as Ot, b9 as jt, ba as Wt, b as Bt, aX as Be, bb as $t, bc as Vt, bd as mt, p as Kt, be as Ht, bf as qt, bg as Gt, bh as Xt, bi as be, bj as ft, bk as Je, E as Jt, F as Yt, S as Zt, B as Qt, a as ea, U as ta, D as aa, A as ra, C as na, bl as la, bm as sa, bn as ia, bo as oa, bp as da, bq as Ye, br as Ne, bs as ca, bt as $e, bu as ua, bv as ma, bw as fa, bx as ha, by as pa } from "./semaphor-ready-indicator-DDAxk8us.js";
|
|
5
|
+
import { ad as va, ae as H } from "./numeric-presentation-DESvLiu9.js";
|
|
6
|
+
import { l as oe, B as V, N as ba, O as ga, Q as ya, U as wa, V as Sa, W as xa, X as se, z as Z, Y as he, P as Ca, a as Na, b as Ea, c as Ze, L as ht, r as Pe, s as ze, t as Fe, u as Le, v as X, T as Ta, d as ka, e as Qe, g as et } from "./switch-C3jLxlG0.js";
|
|
7
|
+
import { X as Ia } from "./x-4f5U2XwU.js";
|
|
8
|
+
import { j as Aa } from "./index-CuHybtft.js";
|
|
9
9
|
import "./validators-DMHTpf7a.js";
|
|
10
10
|
import "./matrix-operation-contract-8OIO4gob.js";
|
|
11
11
|
import "./analytics-base-schemas-BFAoRlkU.js";
|
|
12
12
|
import "zod";
|
|
13
|
-
import { parseValueFormatPreferencesResponse as
|
|
13
|
+
import { parseValueFormatPreferencesResponse as Da, canonicalizeSupportedLocale as pt, getSupportedCurrencyCodes as Ra, canonicalizeSupportedCurrencyCode as Pa } from "../value-format-preferences/index.js";
|
|
14
14
|
import { c as M } from "./class-utils-Df1OVOT1.js";
|
|
15
|
-
import { x as
|
|
16
|
-
import { A as
|
|
17
|
-
import { r as
|
|
18
|
-
import { s as
|
|
19
|
-
import { S as
|
|
20
|
-
import { a as
|
|
15
|
+
import { x as za } from "./document-sheet-utils-Duo9uLoH.js";
|
|
16
|
+
import { A as Fa } from "./table-settings-CLZocegs.js";
|
|
17
|
+
import { r as La, a as vt } from "./availability-Bp5Gfu1I.js";
|
|
18
|
+
import { s as _a } from "./stable-serialize-CfqXeiBP.js";
|
|
19
|
+
import { S as Ma } from "./selection-reducer-Dj_8xD69.js";
|
|
20
|
+
import { a as Ua } from "./report-runtime-context-Dq8XyODK.js";
|
|
21
21
|
import { r as ge, M as ue } from "./temporal-bucket-D7NBrrtL.js";
|
|
22
|
-
function
|
|
22
|
+
function Oa(e = []) {
|
|
23
23
|
const a = J(null), t = J(null), r = J(null), [n, i] = F(), s = $(() => {
|
|
24
24
|
var m, S, N;
|
|
25
25
|
const o = ((m = a.current) == null ? void 0 : m.clientWidth) ?? 0, f = ((S = r.current) == null ? void 0 : S.offsetWidth) ?? 0, u = ((N = t.current) == null ? void 0 : N.offsetWidth) ?? 0, c = o - f - u - 8, v = Math.max(c, 0);
|
|
@@ -38,7 +38,7 @@ function Ua(e = []) {
|
|
|
38
38
|
updateAvailableWidth: s
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function ja({ filter: e }) {
|
|
42
42
|
var S;
|
|
43
43
|
const a = j(
|
|
44
44
|
(N) => N.isDashboardEditing
|
|
@@ -50,7 +50,7 @@ function Oa({ filter: e }) {
|
|
|
50
50
|
rightActionsRef: c,
|
|
51
51
|
titleMaxWidth: v,
|
|
52
52
|
updateAvailableWidth: m
|
|
53
|
-
} =
|
|
53
|
+
} = Oa([
|
|
54
54
|
a,
|
|
55
55
|
i,
|
|
56
56
|
r
|
|
@@ -96,7 +96,7 @@ function Oa({ filter: e }) {
|
|
|
96
96
|
s(e.id), o(e.id);
|
|
97
97
|
},
|
|
98
98
|
className: "text-muted-foreground hover:text-foreground",
|
|
99
|
-
children: /* @__PURE__ */ l(
|
|
99
|
+
children: /* @__PURE__ */ l(Ia, { className: "size-3.5" })
|
|
100
100
|
}
|
|
101
101
|
)
|
|
102
102
|
]
|
|
@@ -108,7 +108,7 @@ function Oa({ filter: e }) {
|
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Wa() {
|
|
112
112
|
const e = j((r) => r.dashboard.filters), a = j((r) => r.theme), t = e == null ? void 0 : e.filter((r) => r.hide);
|
|
113
113
|
return t != null && t.length ? /* @__PURE__ */ l(
|
|
114
114
|
"div",
|
|
@@ -122,8 +122,8 @@ function ja() {
|
|
|
122
122
|
{
|
|
123
123
|
className: "flex min-w-[250px] max-w-fit flex-col gap-1 p-2",
|
|
124
124
|
children: [
|
|
125
|
-
/* @__PURE__ */ l(
|
|
126
|
-
/* @__PURE__ */ l(
|
|
125
|
+
/* @__PURE__ */ l(ja, { filter: r }),
|
|
126
|
+
/* @__PURE__ */ l(Wt, { filter: r })
|
|
127
127
|
]
|
|
128
128
|
},
|
|
129
129
|
r.id
|
|
@@ -137,31 +137,31 @@ function Ba() {
|
|
|
137
137
|
(s) => s.isDashboardEditing
|
|
138
138
|
), r = (i = e.sheets) == null ? void 0 : i.find(
|
|
139
139
|
(s) => s.id === a
|
|
140
|
-
), n =
|
|
140
|
+
), n = za(r);
|
|
141
141
|
return /* @__PURE__ */ l(
|
|
142
142
|
"div",
|
|
143
143
|
{
|
|
144
144
|
role: "dashboard-plus-main",
|
|
145
145
|
className: "flex min-h-0 grow basis-0 overflow-hidden",
|
|
146
146
|
children: /* @__PURE__ */ h("section", { className: "flex min-h-0 grow basis-0 flex-col overflow-hidden", children: [
|
|
147
|
-
t && !n && /* @__PURE__ */ l(
|
|
148
|
-
/* @__PURE__ */ l(
|
|
147
|
+
t && !n && /* @__PURE__ */ l(Wa, {}),
|
|
148
|
+
/* @__PURE__ */ l(Bt, {})
|
|
149
149
|
] })
|
|
150
150
|
}
|
|
151
151
|
);
|
|
152
152
|
}
|
|
153
|
-
const
|
|
154
|
-
function
|
|
155
|
-
return
|
|
153
|
+
const $a = /* @__PURE__ */ new Set(["iat", "exp", "nbf", "jti"]);
|
|
154
|
+
function Va(e) {
|
|
155
|
+
return _a(
|
|
156
156
|
Object.fromEntries(
|
|
157
|
-
Object.entries(e ?? {}).filter(([a]) =>
|
|
157
|
+
Object.entries(e ?? {}).filter(([a]) => !$a.has(a))
|
|
158
158
|
)
|
|
159
159
|
);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Ka(e) {
|
|
162
162
|
var t;
|
|
163
163
|
const a = e == null ? void 0 : e.config;
|
|
164
|
-
return
|
|
164
|
+
return La({
|
|
165
165
|
features: ((t = a == null ? void 0 : a.projectFeatures) == null ? void 0 : t.features) ?? {},
|
|
166
166
|
config: { enabled: vt(a).enabled },
|
|
167
167
|
identity: {
|
|
@@ -178,28 +178,28 @@ function at(e, a) {
|
|
|
178
178
|
const { name: t, layout: r } = vt(a == null ? void 0 : a.config);
|
|
179
179
|
return { ...Vt(r), id: tt, callerKey: e, assistantName: t };
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function Ha({
|
|
182
182
|
children: e,
|
|
183
183
|
authToken: a
|
|
184
184
|
}) {
|
|
185
|
-
const t =
|
|
186
|
-
() => a === void 0 ? t.tokenProps :
|
|
185
|
+
const t = Be(), r = Q(
|
|
186
|
+
() => a === void 0 ? t.tokenProps : Ga(a),
|
|
187
187
|
[a, t.tokenProps]
|
|
188
|
-
), n = Q(() =>
|
|
189
|
-
() =>
|
|
188
|
+
), n = Q(() => Va(r), [r]), i = Q(
|
|
189
|
+
() => Ka(r).available,
|
|
190
190
|
[r]
|
|
191
191
|
), [s, o] = F(() => at(n, r));
|
|
192
192
|
s.callerKey !== n && o(at(n, r)), Xa(s);
|
|
193
193
|
const f = Q(() => ({ instance: s, available: i }), [s, i]);
|
|
194
194
|
return /* @__PURE__ */ l($t.Provider, { value: f, children: e });
|
|
195
195
|
}
|
|
196
|
-
function
|
|
197
|
-
return mt() ? /* @__PURE__ */ l(ie, { children: e }) : /* @__PURE__ */ l(
|
|
196
|
+
function qa({ children: e }) {
|
|
197
|
+
return mt() ? /* @__PURE__ */ l(ie, { children: e }) : /* @__PURE__ */ l(Ha, { children: e });
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Ga(e) {
|
|
200
200
|
if (!(e != null && e.accessToken)) return {};
|
|
201
201
|
try {
|
|
202
|
-
return
|
|
202
|
+
return Aa(e.accessToken);
|
|
203
203
|
} catch {
|
|
204
204
|
return {};
|
|
205
205
|
}
|
|
@@ -208,20 +208,20 @@ function Xa(e) {
|
|
|
208
208
|
ee(() => {
|
|
209
209
|
const a = (r, n) => {
|
|
210
210
|
const i = e.store.getState().focus;
|
|
211
|
-
i && !
|
|
211
|
+
i && !Ja(i, r, n) && e.clearFocus();
|
|
212
212
|
}, t = j.getState();
|
|
213
213
|
return a(t.selectedSheetId, t.dashboard), j.subscribe((r, n) => {
|
|
214
214
|
(r.selectedSheetId !== n.selectedSheetId || r.dashboard !== n.dashboard) && a(r.selectedSheetId, r.dashboard), r.isVisualEditing && !n.isVisualEditing && e.leaveBeside();
|
|
215
215
|
});
|
|
216
216
|
}, [e]);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function Ja(e, a, t) {
|
|
219
219
|
if ((a ?? null) !== e.sheetId) return !1;
|
|
220
|
-
const r = t ?
|
|
220
|
+
const r = t ? Fa(t, e.cardId) : void 0;
|
|
221
221
|
return !!r && r.sheet.id === e.sheetId;
|
|
222
222
|
}
|
|
223
|
-
const
|
|
224
|
-
function
|
|
223
|
+
const Ya = Se(() => import("./assistant-chat-BNLkCDml.js"));
|
|
224
|
+
function hn() {
|
|
225
225
|
const e = Kt();
|
|
226
226
|
return e.available ? /* @__PURE__ */ h(
|
|
227
227
|
V,
|
|
@@ -237,17 +237,17 @@ function fn() {
|
|
|
237
237
|
}
|
|
238
238
|
) : null;
|
|
239
239
|
}
|
|
240
|
-
const
|
|
240
|
+
const Za = {
|
|
241
241
|
// Docked widths are the viewer's (the resize handle), applied as a style.
|
|
242
242
|
"docked-right": "relative shrink-0 border-l border-border",
|
|
243
243
|
"docked-left": "relative order-first shrink-0 border-r border-border",
|
|
244
244
|
centered: "absolute left-1/2 top-1/2 z-30 h-[min(80%,760px)] w-[min(640px,calc(100%-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-card border border-border shadow-lg",
|
|
245
245
|
"full-page": "absolute inset-0 z-30"
|
|
246
|
-
},
|
|
247
|
-
function
|
|
246
|
+
}, Qa = "absolute left-0 top-0 z-30 max-h-[var(--assistant-beside-max-h)] max-w-[var(--assistant-beside-max-w)] rounded-card border border-border shadow-lg", er = 640, fe = 8;
|
|
247
|
+
function tr({ surface: e = "dashboard" } = {}) {
|
|
248
248
|
const a = mt(), { isOpen: t, mounted: r, storedLayout: n, width: i, beside: s, besideSize: o, focusCardId: f, askCount: u } = qt(
|
|
249
|
-
(a == null ? void 0 : a.instance.store) ??
|
|
250
|
-
|
|
249
|
+
(a == null ? void 0 : a.instance.store) ?? Xt,
|
|
250
|
+
Gt((w) => {
|
|
251
251
|
var k;
|
|
252
252
|
return {
|
|
253
253
|
isOpen: w.isOpen,
|
|
@@ -261,8 +261,8 @@ function er({ surface: e = "dashboard" } = {}) {
|
|
|
261
261
|
};
|
|
262
262
|
})
|
|
263
263
|
), g = e === "none", c = j(
|
|
264
|
-
(w) => s && t && f && !g ?
|
|
265
|
-
), v =
|
|
264
|
+
(w) => s && t && f && !g ? ar(w.dashboard, w.selectedSheetId, f) : void 0
|
|
265
|
+
), v = rr(c, u);
|
|
266
266
|
if (!(a != null && a.available) || !r && !g) return null;
|
|
267
267
|
const m = g ? "full-page" : v.shown ? "beside-card" : n, S = g || t, N = m === "docked-right" || m === "docked-left";
|
|
268
268
|
return /* @__PURE__ */ h(
|
|
@@ -276,7 +276,7 @@ function er({ surface: e = "dashboard" } = {}) {
|
|
|
276
276
|
"data-beside-side": m === "beside-card" ? v.side : void 0,
|
|
277
277
|
className: M(
|
|
278
278
|
"flex-col bg-background",
|
|
279
|
-
m === "beside-card" ?
|
|
279
|
+
m === "beside-card" ? Qa : Za[m],
|
|
280
280
|
S ? "flex" : "hidden"
|
|
281
281
|
),
|
|
282
282
|
style: m === "beside-card" ? { ...v.style, width: o.width, height: o.height } : (
|
|
@@ -291,14 +291,14 @@ function er({ surface: e = "dashboard" } = {}) {
|
|
|
291
291
|
a.instance.close(), k == null || k.focus();
|
|
292
292
|
} : void 0,
|
|
293
293
|
children: [
|
|
294
|
-
N ? /* @__PURE__ */ l(
|
|
295
|
-
m === "beside-card" ? /* @__PURE__ */ l(
|
|
296
|
-
/* @__PURE__ */ l(ye, { fallback: null, children: /* @__PURE__ */ l(
|
|
294
|
+
N ? /* @__PURE__ */ l(sr, { instance: a.instance, side: m === "docked-left" ? "right" : "left", width: i }) : null,
|
|
295
|
+
m === "beside-card" ? /* @__PURE__ */ l(lr, { instance: a.instance, size: o, side: v.handleSide }) : null,
|
|
296
|
+
/* @__PURE__ */ l(ye, { fallback: null, children: /* @__PURE__ */ l(Ya, { instance: a.instance, surface: e, placement: m }, a.instance.id) })
|
|
297
297
|
]
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function ar(e, a, t) {
|
|
302
302
|
var n, i, s;
|
|
303
303
|
const r = (n = e.sheets) == null ? void 0 : n.find((o) => o.id === a);
|
|
304
304
|
return (s = (i = r == null ? void 0 : r.frames) == null ? void 0 : i.find((o) => {
|
|
@@ -306,32 +306,32 @@ function tr(e, a, t) {
|
|
|
306
306
|
return (f = o.cards) == null ? void 0 : f.some((u) => u.id === t);
|
|
307
307
|
})) == null ? void 0 : s.id;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function rr(e, a) {
|
|
310
310
|
var S;
|
|
311
311
|
const [t, r] = F(void 0), [n, i] = F(void 0), s = J(a);
|
|
312
|
-
|
|
312
|
+
Xe(() => {
|
|
313
313
|
s.current = a;
|
|
314
314
|
});
|
|
315
|
-
const o = n === a ? null : t, { refs: f, elements: u, floatingStyles: g, middlewareData: c, isPositioned: v } =
|
|
315
|
+
const o = n === a ? null : t, { refs: f, elements: u, floatingStyles: g, middlewareData: c, isPositioned: v } = ba({
|
|
316
316
|
strategy: "absolute",
|
|
317
317
|
placement: o ?? "right-start",
|
|
318
318
|
middleware: [
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
319
|
+
ga(fe),
|
|
320
|
+
ya({ padding: fe }),
|
|
321
|
+
wa({
|
|
322
322
|
padding: fe,
|
|
323
323
|
apply: ({ availableWidth: N, availableHeight: w, elements: k }) => {
|
|
324
324
|
k.floating.style.setProperty("--assistant-beside-max-w", `${Math.max(0, N)}px`), k.floating.style.setProperty("--assistant-beside-max-h", `${Math.max(0, w)}px`);
|
|
325
325
|
}
|
|
326
326
|
}),
|
|
327
|
-
|
|
327
|
+
Sa()
|
|
328
328
|
],
|
|
329
|
-
whileElementsMounted: (N, w, k) =>
|
|
330
|
-
const z =
|
|
329
|
+
whileElementsMounted: (N, w, k) => xa(N, w, () => {
|
|
330
|
+
const z = nr(N, w);
|
|
331
331
|
r(z), z === null && i(s.current), k();
|
|
332
332
|
})
|
|
333
333
|
}), m = u.floating;
|
|
334
|
-
return
|
|
334
|
+
return Xe(() => {
|
|
335
335
|
f.setReference(e ? rt(m == null ? void 0 : m.parentElement, e) : null);
|
|
336
336
|
}, [e, m, f]), {
|
|
337
337
|
shown: e !== void 0 && o !== null && u.reference !== null,
|
|
@@ -355,15 +355,15 @@ function ar(e, a) {
|
|
|
355
355
|
function rt(e, a) {
|
|
356
356
|
return e ? Array.from(e.querySelectorAll("[data-frame-id]")).find((t) => t.dataset.frameId === a) ?? null : null;
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function nr(e, a) {
|
|
359
359
|
const t = a.parentElement;
|
|
360
360
|
if (!t || !e.isConnected) return null;
|
|
361
361
|
const r = t.getBoundingClientRect();
|
|
362
|
-
if (r.width <
|
|
362
|
+
if (r.width < er) return null;
|
|
363
363
|
const n = e.getBoundingClientRect(), { min: i } = ft, s = (o, f) => o >= i.width + 2 * fe && f >= i.height + 2 * fe;
|
|
364
364
|
return s(r.right - n.right, r.height) ? "right-start" : s(n.left - r.left, r.height) ? "left-start" : s(r.width, r.bottom - n.bottom) ? "bottom-start" : null;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function lr({
|
|
367
367
|
instance: e,
|
|
368
368
|
size: a,
|
|
369
369
|
side: t
|
|
@@ -413,7 +413,7 @@ function nr({
|
|
|
413
413
|
);
|
|
414
414
|
}
|
|
415
415
|
const le = 16, bt = 0.6;
|
|
416
|
-
function
|
|
416
|
+
function sr({ instance: e, side: a, width: t }) {
|
|
417
417
|
const r = J(void 0), n = (c) => {
|
|
418
418
|
var m, S;
|
|
419
419
|
const v = (S = (m = c.closest("aside")) == null ? void 0 : m.parentElement) == null ? void 0 : S.clientWidth;
|
|
@@ -463,10 +463,10 @@ function lr({ instance: e, side: a, width: t }) {
|
|
|
463
463
|
}
|
|
464
464
|
);
|
|
465
465
|
}
|
|
466
|
-
const
|
|
467
|
-
() => import("./edit-dashboard-visual-
|
|
468
|
-
),
|
|
469
|
-
function
|
|
466
|
+
const ir = Se(() => import("./dashboard-controls-8RyBTQUO.js")), or = Se(
|
|
467
|
+
() => import("./edit-dashboard-visual-BfJwnRIZ.js")
|
|
468
|
+
), dr = Se(() => import("./dashboard-json-7qT9jmfL.js"));
|
|
469
|
+
function pn({
|
|
470
470
|
showControls: e = !1,
|
|
471
471
|
showFooter: a = !0,
|
|
472
472
|
...t
|
|
@@ -478,7 +478,7 @@ function hn({
|
|
|
478
478
|
/* @__PURE__ */ l(ea, { componentType: "surfboard", componentId: t.id }),
|
|
479
479
|
/* @__PURE__ */ h(ta, { appearance: i, children: [
|
|
480
480
|
/* @__PURE__ */ l(
|
|
481
|
-
|
|
481
|
+
va,
|
|
482
482
|
{
|
|
483
483
|
toastOptions: {
|
|
484
484
|
classNames: {
|
|
@@ -493,40 +493,40 @@ function hn({
|
|
|
493
493
|
}
|
|
494
494
|
),
|
|
495
495
|
/* @__PURE__ */ h(aa, { preferences: s, children: [
|
|
496
|
-
n && /* @__PURE__ */ l(ye, { fallback: null, children: /* @__PURE__ */ l(
|
|
497
|
-
/* @__PURE__ */ l(
|
|
498
|
-
e && /* @__PURE__ */ l(ye, { fallback: null, children: /* @__PURE__ */ l(
|
|
496
|
+
n && /* @__PURE__ */ l(ye, { fallback: null, children: /* @__PURE__ */ l(dr, {}) }),
|
|
497
|
+
/* @__PURE__ */ l(ra, { children: /* @__PURE__ */ l(qa, { children: /* @__PURE__ */ h("main", { className: "relative flex h-full w-full flex-col overflow-hidden", children: [
|
|
498
|
+
e && /* @__PURE__ */ l(ye, { fallback: null, children: /* @__PURE__ */ l(ir, {}) }),
|
|
499
499
|
/* @__PURE__ */ h("div", { className: "relative flex grow overflow-hidden", children: [
|
|
500
|
-
/* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1", children: /* @__PURE__ */ h(
|
|
501
|
-
r && /* @__PURE__ */ l(ye, { fallback: null, children: /* @__PURE__ */ l(
|
|
500
|
+
/* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1", children: /* @__PURE__ */ h(na, { ...t, type: "dashboard", children: [
|
|
501
|
+
r && /* @__PURE__ */ l(ye, { fallback: null, children: /* @__PURE__ */ l(or, {}) }),
|
|
502
502
|
/* @__PURE__ */ l(Lt, { mode: r ? "hidden" : "visible", children: /* @__PURE__ */ l(Ba, {}) })
|
|
503
503
|
] }) }),
|
|
504
|
-
/* @__PURE__ */ l(
|
|
504
|
+
/* @__PURE__ */ l(tr, {})
|
|
505
505
|
] })
|
|
506
|
-
] }) })
|
|
506
|
+
] }) }) })
|
|
507
507
|
] })
|
|
508
508
|
] })
|
|
509
509
|
] }) }) });
|
|
510
510
|
}
|
|
511
|
-
var nt = 1,
|
|
511
|
+
var nt = 1, cr = 0.9, ur = 0.8, mr = 0.17, Ee = 0.1, Te = 0.999, fr = 0.9999, hr = 0.99, pr = /[\\\/_+.#"@\[\(\{&]/, vr = /[\\\/_+.#"@\[\(\{&]/g, br = /[\s-]/, gt = /[\s-]/g;
|
|
512
512
|
function _e(e, a, t, r, n, i, s) {
|
|
513
|
-
if (i === a.length) return n === e.length ? nt :
|
|
513
|
+
if (i === a.length) return n === e.length ? nt : hr;
|
|
514
514
|
var o = `${n},${i}`;
|
|
515
515
|
if (s[o] !== void 0) return s[o];
|
|
516
|
-
for (var f = r.charAt(i), u = t.indexOf(f, n), g = 0, c, v, m, S; u >= 0; ) c = _e(e, a, t, r, u + 1, i + 1, s), c > g && (u === n ? c *= nt :
|
|
516
|
+
for (var f = r.charAt(i), u = t.indexOf(f, n), g = 0, c, v, m, S; u >= 0; ) c = _e(e, a, t, r, u + 1, i + 1, s), c > g && (u === n ? c *= nt : pr.test(e.charAt(u - 1)) ? (c *= ur, m = e.slice(n, u - 1).match(vr), m && n > 0 && (c *= Math.pow(Te, m.length))) : br.test(e.charAt(u - 1)) ? (c *= cr, S = e.slice(n, u - 1).match(gt), S && n > 0 && (c *= Math.pow(Te, S.length))) : (c *= mr, n > 0 && (c *= Math.pow(Te, u - n))), e.charAt(u) !== a.charAt(i) && (c *= fr)), (c < Ee && t.charAt(u - 1) === r.charAt(i + 1) || r.charAt(i + 1) === r.charAt(i) && t.charAt(u - 1) !== r.charAt(i)) && (v = _e(e, a, t, r, u + 1, i + 2, s), v * Ee > c && (c = v * Ee)), c > g && (g = c), u = t.indexOf(f, u + 1);
|
|
517
517
|
return s[o] = g, g;
|
|
518
518
|
}
|
|
519
519
|
function lt(e) {
|
|
520
520
|
return e.toLowerCase().replace(gt, " ");
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function gr(e, a, t) {
|
|
523
523
|
return e = t && t.length > 0 ? `${e + " " + t.join(" ")}` : e, _e(e, a, lt(e), lt(a), 0, 0, {});
|
|
524
524
|
}
|
|
525
|
-
var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]',
|
|
525
|
+
var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', yr = '[cmdk-group-heading=""]', yt = '[cmdk-item=""]', st = `${yt}:not([aria-disabled="true"])`, Me = "cmdk-item-select", re = "data-value", wr = (e, a, t) => gr(e, a, t), wt = p.createContext(void 0), pe = () => p.useContext(wt), St = p.createContext(void 0), Ve = () => p.useContext(St), xt = p.createContext(void 0), Ct = p.forwardRef((e, a) => {
|
|
526
526
|
let t = ne(() => {
|
|
527
527
|
var d, T;
|
|
528
528
|
return { search: "", value: (T = (d = e.value) != null ? d : e.defaultValue) != null ? T : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
529
|
-
}), r = ne(() => /* @__PURE__ */ new Set()), n = ne(() => /* @__PURE__ */ new Map()), i = ne(() => /* @__PURE__ */ new Map()), s = ne(() => /* @__PURE__ */ new Set()), o = Nt(e), { label: f, children: u, value: g, onValueChange: c, filter: v, shouldFilter: m, loop: S, disablePointerSelection: N = !1, vimBindings: w = !0, ...k } = e, z = se(), L = se(), U = se(), _ = p.useRef(null), E =
|
|
529
|
+
}), r = ne(() => /* @__PURE__ */ new Set()), n = ne(() => /* @__PURE__ */ new Map()), i = ne(() => /* @__PURE__ */ new Map()), s = ne(() => /* @__PURE__ */ new Set()), o = Nt(e), { label: f, children: u, value: g, onValueChange: c, filter: v, shouldFilter: m, loop: S, disablePointerSelection: N = !1, vimBindings: w = !0, ...k } = e, z = se(), L = se(), U = se(), _ = p.useRef(null), E = Rr();
|
|
530
530
|
te(() => {
|
|
531
531
|
if (g !== void 0) {
|
|
532
532
|
let d = g.trim();
|
|
@@ -536,7 +536,7 @@ var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', gr = '[cmdk-group-head
|
|
|
536
536
|
E(6, ae);
|
|
537
537
|
}, []);
|
|
538
538
|
let b = p.useMemo(() => ({ subscribe: (d) => (s.current.add(d), () => s.current.delete(d)), snapshot: () => t.current, setState: (d, T, A) => {
|
|
539
|
-
var y, D, P,
|
|
539
|
+
var y, D, P, B;
|
|
540
540
|
if (!Object.is(t.current[d], T)) {
|
|
541
541
|
if (t.current[d] = T, d === "search") K(), x(), E(1, q);
|
|
542
542
|
else if (d === "value") {
|
|
@@ -546,10 +546,10 @@ var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', gr = '[cmdk-group-head
|
|
|
546
546
|
}
|
|
547
547
|
if (E(7, () => {
|
|
548
548
|
var O;
|
|
549
|
-
t.current.selectedItemId = (O =
|
|
549
|
+
t.current.selectedItemId = (O = G()) == null ? void 0 : O.id, b.emit();
|
|
550
550
|
}), A || E(5, ae), ((D = o.current) == null ? void 0 : D.value) !== void 0) {
|
|
551
551
|
let O = T ?? "";
|
|
552
|
-
(
|
|
552
|
+
(B = (P = o.current).onValueChange) == null || B.call(P, O);
|
|
553
553
|
return;
|
|
554
554
|
}
|
|
555
555
|
}
|
|
@@ -566,7 +566,7 @@ var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', gr = '[cmdk-group-head
|
|
|
566
566
|
K(), x(), t.current.value || q(), b.emit();
|
|
567
567
|
}), () => {
|
|
568
568
|
i.current.delete(d), r.current.delete(d), t.current.filtered.items.delete(d);
|
|
569
|
-
let A =
|
|
569
|
+
let A = G();
|
|
570
570
|
E(4, () => {
|
|
571
571
|
K(), (A == null ? void 0 : A.getAttribute("id")) === d && q(), b.emit();
|
|
572
572
|
});
|
|
@@ -575,7 +575,7 @@ var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', gr = '[cmdk-group-head
|
|
|
575
575
|
}), filter: () => o.current.shouldFilter, label: f || e["aria-label"], getDisablePointerSelection: () => o.current.disablePointerSelection, listId: z, inputId: U, labelId: L, listInnerRef: _ }), []);
|
|
576
576
|
function R(d, T) {
|
|
577
577
|
var A, y;
|
|
578
|
-
let D = (y = (A = o.current) == null ? void 0 : A.filter) != null ? y :
|
|
578
|
+
let D = (y = (A = o.current) == null ? void 0 : A.filter) != null ? y : wr;
|
|
579
579
|
return d ? D(d, t.current.search, T) : 0;
|
|
580
580
|
}
|
|
581
581
|
function x() {
|
|
@@ -583,16 +583,16 @@ var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', gr = '[cmdk-group-head
|
|
|
583
583
|
let d = t.current.filtered.items, T = [];
|
|
584
584
|
t.current.filtered.groups.forEach((y) => {
|
|
585
585
|
let D = n.current.get(y), P = 0;
|
|
586
|
-
D.forEach((
|
|
587
|
-
let O = d.get(
|
|
586
|
+
D.forEach((B) => {
|
|
587
|
+
let O = d.get(B);
|
|
588
588
|
P = Math.max(O, P);
|
|
589
589
|
}), T.push([y, P]);
|
|
590
590
|
});
|
|
591
591
|
let A = _.current;
|
|
592
592
|
I().sort((y, D) => {
|
|
593
|
-
var P,
|
|
593
|
+
var P, B;
|
|
594
594
|
let O = y.getAttribute("id"), ve = D.getAttribute("id");
|
|
595
|
-
return ((P = d.get(ve)) != null ? P : 0) - ((
|
|
595
|
+
return ((P = d.get(ve)) != null ? P : 0) - ((B = d.get(O)) != null ? B : 0);
|
|
596
596
|
}).forEach((y) => {
|
|
597
597
|
let D = y.closest(ke);
|
|
598
598
|
D ? D.appendChild(y.parentElement === D ? y : y.closest(`${ke} > *`)) : A.appendChild(y.parentElement === A ? y : y.closest(`${ke} > *`));
|
|
@@ -615,10 +615,10 @@ var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', gr = '[cmdk-group-head
|
|
|
615
615
|
t.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
616
616
|
let D = 0;
|
|
617
617
|
for (let P of r.current) {
|
|
618
|
-
let
|
|
618
|
+
let B = (T = (d = i.current.get(P)) == null ? void 0 : d.value) != null ? T : "", O = (y = (A = i.current.get(P)) == null ? void 0 : A.keywords) != null ? y : [], ve = R(B, O);
|
|
619
619
|
t.current.filtered.items.set(P, ve), ve > 0 && D++;
|
|
620
620
|
}
|
|
621
|
-
for (let [P,
|
|
621
|
+
for (let [P, B] of n.current) for (let O of B) if (t.current.filtered.items.get(O) > 0) {
|
|
622
622
|
t.current.filtered.groups.add(P);
|
|
623
623
|
break;
|
|
624
624
|
}
|
|
@@ -626,10 +626,10 @@ var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', gr = '[cmdk-group-head
|
|
|
626
626
|
}
|
|
627
627
|
function ae() {
|
|
628
628
|
var d, T, A;
|
|
629
|
-
let y =
|
|
630
|
-
y && (((d = y.parentElement) == null ? void 0 : d.firstChild) === y && ((A = (T = y.closest(me)) == null ? void 0 : T.querySelector(
|
|
629
|
+
let y = G();
|
|
630
|
+
y && (((d = y.parentElement) == null ? void 0 : d.firstChild) === y && ((A = (T = y.closest(me)) == null ? void 0 : T.querySelector(yr)) == null || A.scrollIntoView({ block: "nearest" })), y.scrollIntoView({ block: "nearest" }));
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function G() {
|
|
633
633
|
var d;
|
|
634
634
|
return (d = _.current) == null ? void 0 : d.querySelector(`${yt}[aria-selected="true"]`);
|
|
635
635
|
}
|
|
@@ -643,17 +643,17 @@ var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', gr = '[cmdk-group-head
|
|
|
643
643
|
}
|
|
644
644
|
function Ce(d) {
|
|
645
645
|
var T;
|
|
646
|
-
let A =
|
|
646
|
+
let A = G(), y = I(), D = y.findIndex((B) => B === A), P = y[D + d];
|
|
647
647
|
(T = o.current) != null && T.loop && (P = D + d < 0 ? y[y.length - 1] : D + d === y.length ? y[0] : y[D + d]), P && b.setState("value", P.getAttribute(re));
|
|
648
648
|
}
|
|
649
649
|
function Ke(d) {
|
|
650
|
-
let T =
|
|
651
|
-
for (; A && !y; ) A = d > 0 ?
|
|
650
|
+
let T = G(), A = T == null ? void 0 : T.closest(me), y;
|
|
651
|
+
for (; A && !y; ) A = d > 0 ? Ar(A, me) : Dr(A, me), y = A == null ? void 0 : A.querySelector(st);
|
|
652
652
|
y ? b.setState("value", y.getAttribute(re)) : Ce(d);
|
|
653
653
|
}
|
|
654
654
|
let He = () => de(I().length - 1), qe = (d) => {
|
|
655
655
|
d.preventDefault(), d.metaKey ? He() : d.altKey ? Ke(1) : Ce(1);
|
|
656
|
-
},
|
|
656
|
+
}, Ge = (d) => {
|
|
657
657
|
d.preventDefault(), d.metaKey ? de(0) : d.altKey ? Ke(-1) : Ce(-1);
|
|
658
658
|
};
|
|
659
659
|
return p.createElement(Z.div, { ref: a, tabIndex: -1, ...k, "cmdk-root": "", onKeyDown: (d) => {
|
|
@@ -672,11 +672,11 @@ var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', gr = '[cmdk-group-head
|
|
|
672
672
|
}
|
|
673
673
|
case "p":
|
|
674
674
|
case "k": {
|
|
675
|
-
w && d.ctrlKey &&
|
|
675
|
+
w && d.ctrlKey && Ge(d);
|
|
676
676
|
break;
|
|
677
677
|
}
|
|
678
678
|
case "ArrowUp": {
|
|
679
|
-
|
|
679
|
+
Ge(d);
|
|
680
680
|
break;
|
|
681
681
|
}
|
|
682
682
|
case "Home": {
|
|
@@ -689,15 +689,15 @@ var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', gr = '[cmdk-group-head
|
|
|
689
689
|
}
|
|
690
690
|
case "Enter": {
|
|
691
691
|
d.preventDefault();
|
|
692
|
-
let y =
|
|
692
|
+
let y = G();
|
|
693
693
|
if (y) {
|
|
694
694
|
let D = new Event(Me);
|
|
695
695
|
y.dispatchEvent(D);
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
} }, p.createElement("label", { "cmdk-label": "", htmlFor: C.inputId, id: C.labelId, style:
|
|
700
|
-
}),
|
|
699
|
+
} }, p.createElement("label", { "cmdk-label": "", htmlFor: C.inputId, id: C.labelId, style: zr }, f), xe(e, (d) => p.createElement(St.Provider, { value: b }, p.createElement(wt.Provider, { value: C }, d))));
|
|
700
|
+
}), Sr = p.forwardRef((e, a) => {
|
|
701
701
|
var t, r;
|
|
702
702
|
let n = se(), i = p.useRef(null), s = p.useContext(xt), o = pe(), f = Nt(e), u = (r = (t = f.current) == null ? void 0 : t.forceMount) != null ? r : s == null ? void 0 : s.forceMount;
|
|
703
703
|
te(() => {
|
|
@@ -718,22 +718,22 @@ var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', gr = '[cmdk-group-head
|
|
|
718
718
|
if (!m) return null;
|
|
719
719
|
let { disabled: w, value: k, onSelect: z, forceMount: L, keywords: U, ..._ } = e;
|
|
720
720
|
return p.createElement(Z.div, { ref: he(i, a), ..._, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!w, "aria-selected": !!v, "data-disabled": !!w, "data-selected": !!v, onPointerMove: w || o.getDisablePointerSelection() ? void 0 : N, onClick: w ? void 0 : S }, e.children);
|
|
721
|
-
}),
|
|
721
|
+
}), xr = p.forwardRef((e, a) => {
|
|
722
722
|
let { heading: t, children: r, forceMount: n, ...i } = e, s = se(), o = p.useRef(null), f = p.useRef(null), u = se(), g = pe(), c = Y((m) => n || g.filter() === !1 ? !0 : m.search ? m.filtered.groups.has(s) : !0);
|
|
723
723
|
te(() => g.group(s), []), Et(s, o, [e.value, e.heading, f]);
|
|
724
724
|
let v = p.useMemo(() => ({ id: s, forceMount: n }), [n]);
|
|
725
725
|
return p.createElement(Z.div, { ref: he(o, a), ...i, "cmdk-group": "", role: "presentation", hidden: c ? void 0 : !0 }, t && p.createElement("div", { ref: f, "cmdk-group-heading": "", "aria-hidden": !0, id: u }, t), xe(e, (m) => p.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": t ? u : void 0 }, p.createElement(xt.Provider, { value: v }, m))));
|
|
726
|
-
}),
|
|
726
|
+
}), Cr = p.forwardRef((e, a) => {
|
|
727
727
|
let { alwaysRender: t, ...r } = e, n = p.useRef(null), i = Y((s) => !s.search);
|
|
728
728
|
return !t && !i ? null : p.createElement(Z.div, { ref: he(n, a), ...r, "cmdk-separator": "", role: "separator" });
|
|
729
|
-
}),
|
|
729
|
+
}), Nr = p.forwardRef((e, a) => {
|
|
730
730
|
let { onValueChange: t, ...r } = e, n = e.value != null, i = Ve(), s = Y((u) => u.search), o = Y((u) => u.selectedItemId), f = pe();
|
|
731
731
|
return p.useEffect(() => {
|
|
732
732
|
e.value != null && i.setState("search", e.value);
|
|
733
733
|
}, [e.value]), p.createElement(Z.input, { ref: a, ...r, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": f.listId, "aria-labelledby": f.labelId, "aria-activedescendant": o, id: f.inputId, type: "text", value: n ? e.value : s, onChange: (u) => {
|
|
734
734
|
n || i.setState("search", u.target.value), t == null || t(u.target.value);
|
|
735
735
|
} });
|
|
736
|
-
}),
|
|
736
|
+
}), Er = p.forwardRef((e, a) => {
|
|
737
737
|
let { children: t, label: r = "Suggestions", ...n } = e, i = p.useRef(null), s = p.useRef(null), o = Y((u) => u.selectedItemId), f = pe();
|
|
738
738
|
return p.useEffect(() => {
|
|
739
739
|
if (s.current && i.current) {
|
|
@@ -748,21 +748,21 @@ var me = '[cmdk-group=""]', ke = '[cmdk-group-items=""]', gr = '[cmdk-group-head
|
|
|
748
748
|
};
|
|
749
749
|
}
|
|
750
750
|
}, []), p.createElement(Z.div, { ref: he(i, a), ...n, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": o, "aria-label": r, id: f.listId }, xe(e, (u) => p.createElement("div", { ref: he(s, f.listInnerRef), "cmdk-list-sizer": "" }, u)));
|
|
751
|
-
}),
|
|
751
|
+
}), Tr = p.forwardRef((e, a) => {
|
|
752
752
|
let { open: t, onOpenChange: r, overlayClassName: n, contentClassName: i, container: s, ...o } = e;
|
|
753
|
-
return p.createElement(
|
|
754
|
-
}),
|
|
753
|
+
return p.createElement(la, { open: t, onOpenChange: r }, p.createElement(sa, { container: s }, p.createElement(ia, { "cmdk-overlay": "", className: n }), p.createElement(oa, { "aria-label": e.label, "cmdk-dialog": "", className: i }, p.createElement(Ct, { ref: a, ...o }))));
|
|
754
|
+
}), kr = p.forwardRef((e, a) => Y((t) => t.filtered.count === 0) ? p.createElement(Z.div, { ref: a, ...e, "cmdk-empty": "", role: "presentation" }) : null), Ir = p.forwardRef((e, a) => {
|
|
755
755
|
let { progress: t, children: r, label: n = "Loading...", ...i } = e;
|
|
756
756
|
return p.createElement(Z.div, { ref: a, ...i, "cmdk-loading": "", role: "progressbar", "aria-valuenow": t, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": n }, xe(e, (s) => p.createElement("div", { "aria-hidden": !0 }, s)));
|
|
757
|
-
}),
|
|
758
|
-
function
|
|
757
|
+
}), W = Object.assign(Ct, { List: Er, Item: Sr, Input: Nr, Group: xr, Separator: Cr, Dialog: Tr, Empty: kr, Loading: Ir });
|
|
758
|
+
function Ar(e, a) {
|
|
759
759
|
let t = e.nextElementSibling;
|
|
760
760
|
for (; t; ) {
|
|
761
761
|
if (t.matches(a)) return t;
|
|
762
762
|
t = t.nextElementSibling;
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function Dr(e, a) {
|
|
766
766
|
let t = e.previousElementSibling;
|
|
767
767
|
for (; t; ) {
|
|
768
768
|
if (t.matches(a)) return t;
|
|
@@ -798,7 +798,7 @@ function Et(e, a, t, r = []) {
|
|
|
798
798
|
i.value(e, o, f), (s = a.current) == null || s.setAttribute(re, o), n.current = o;
|
|
799
799
|
}), n;
|
|
800
800
|
}
|
|
801
|
-
var
|
|
801
|
+
var Rr = () => {
|
|
802
802
|
let [e, a] = p.useState(), t = ne(() => /* @__PURE__ */ new Map());
|
|
803
803
|
return te(() => {
|
|
804
804
|
t.current.forEach((r) => r()), t.current = /* @__PURE__ */ new Map();
|
|
@@ -806,16 +806,16 @@ var Dr = () => {
|
|
|
806
806
|
t.current.set(r, n), a({});
|
|
807
807
|
};
|
|
808
808
|
};
|
|
809
|
-
function
|
|
809
|
+
function Pr(e) {
|
|
810
810
|
let a = e.type;
|
|
811
811
|
return typeof a == "function" ? a(e.props) : "render" in a ? a.render(e.props) : e;
|
|
812
812
|
}
|
|
813
813
|
function xe({ asChild: e, children: a }, t) {
|
|
814
|
-
return e && p.isValidElement(a) ? p.cloneElement(
|
|
814
|
+
return e && p.isValidElement(a) ? p.cloneElement(Pr(a), { ref: a.ref }, t(a.props.children)) : t(a);
|
|
815
815
|
}
|
|
816
|
-
var
|
|
816
|
+
var zr = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
817
817
|
const Tt = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ l(
|
|
818
|
-
|
|
818
|
+
W,
|
|
819
819
|
{
|
|
820
820
|
ref: t,
|
|
821
821
|
className: M(
|
|
@@ -825,11 +825,11 @@ const Tt = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ l(
|
|
|
825
825
|
...a
|
|
826
826
|
}
|
|
827
827
|
));
|
|
828
|
-
Tt.displayName =
|
|
828
|
+
Tt.displayName = W.displayName;
|
|
829
829
|
const kt = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ h("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
830
|
-
/* @__PURE__ */ l(
|
|
830
|
+
/* @__PURE__ */ l(Ma, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
831
831
|
/* @__PURE__ */ l(
|
|
832
|
-
|
|
832
|
+
W.Input,
|
|
833
833
|
{
|
|
834
834
|
ref: t,
|
|
835
835
|
className: M(
|
|
@@ -840,27 +840,27 @@ const kt = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ h("div",
|
|
|
840
840
|
}
|
|
841
841
|
)
|
|
842
842
|
] }));
|
|
843
|
-
kt.displayName =
|
|
843
|
+
kt.displayName = W.Input.displayName;
|
|
844
844
|
const It = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ l(
|
|
845
|
-
|
|
845
|
+
W.List,
|
|
846
846
|
{
|
|
847
847
|
ref: t,
|
|
848
848
|
className: M("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
|
|
849
849
|
...a
|
|
850
850
|
}
|
|
851
851
|
));
|
|
852
|
-
It.displayName =
|
|
852
|
+
It.displayName = W.List.displayName;
|
|
853
853
|
const At = p.forwardRef((e, a) => /* @__PURE__ */ l(
|
|
854
|
-
|
|
854
|
+
W.Empty,
|
|
855
855
|
{
|
|
856
856
|
ref: a,
|
|
857
857
|
className: "py-6 text-center text-sm",
|
|
858
858
|
...e
|
|
859
859
|
}
|
|
860
860
|
));
|
|
861
|
-
At.displayName =
|
|
861
|
+
At.displayName = W.Empty.displayName;
|
|
862
862
|
const Ue = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ l(
|
|
863
|
-
|
|
863
|
+
W.Group,
|
|
864
864
|
{
|
|
865
865
|
ref: t,
|
|
866
866
|
className: M(
|
|
@@ -870,18 +870,18 @@ const Ue = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ l(
|
|
|
870
870
|
...a
|
|
871
871
|
}
|
|
872
872
|
));
|
|
873
|
-
Ue.displayName =
|
|
873
|
+
Ue.displayName = W.Group.displayName;
|
|
874
874
|
const Dt = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ l(
|
|
875
|
-
|
|
875
|
+
W.Separator,
|
|
876
876
|
{
|
|
877
877
|
ref: t,
|
|
878
878
|
className: M("-mx-1 h-px bg-border", e),
|
|
879
879
|
...a
|
|
880
880
|
}
|
|
881
881
|
));
|
|
882
|
-
Dt.displayName =
|
|
882
|
+
Dt.displayName = W.Separator.displayName;
|
|
883
883
|
const Oe = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ l(
|
|
884
|
-
|
|
884
|
+
W.Item,
|
|
885
885
|
{
|
|
886
886
|
ref: t,
|
|
887
887
|
className: M(
|
|
@@ -891,16 +891,16 @@ const Oe = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ l(
|
|
|
891
891
|
...a
|
|
892
892
|
}
|
|
893
893
|
));
|
|
894
|
-
Oe.displayName =
|
|
895
|
-
function
|
|
896
|
-
const { authToken: a, tokenProps: t } =
|
|
894
|
+
Oe.displayName = W.Item.displayName;
|
|
895
|
+
function Fr(e = {}) {
|
|
896
|
+
const { authToken: a, tokenProps: t } = Be(), r = j(
|
|
897
897
|
(E) => E.actions.applyResolvedCalendarPreferences
|
|
898
898
|
), n = e.enabled ?? !0, i = (a == null ? void 0 : a.accessToken) ?? null, s = (t == null ? void 0 : t.apiServiceUrl) ?? null, [o, f] = F(!1), [u, g] = F(!1), [c, v] = F(!1), [m, S] = F(null), [N, w] = F(null), k = J(i);
|
|
899
899
|
k.current = i, ee(() => {
|
|
900
900
|
w(null), S(null), f(!1), g(!1), v(!1);
|
|
901
901
|
}, [i]);
|
|
902
902
|
const z = $(async (E) => {
|
|
903
|
-
const b =
|
|
903
|
+
const b = Ua(await E.json());
|
|
904
904
|
if (!b.ok)
|
|
905
905
|
throw new Error("Calendar preferences response is invalid");
|
|
906
906
|
return b.value;
|
|
@@ -1028,7 +1028,7 @@ const we = [
|
|
|
1028
1028
|
{ value: 1, label: "Monday" },
|
|
1029
1029
|
{ value: 6, label: "Saturday" }
|
|
1030
1030
|
], it = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
1031
|
-
function
|
|
1031
|
+
function Lr() {
|
|
1032
1032
|
try {
|
|
1033
1033
|
const e = Intl;
|
|
1034
1034
|
if (e.supportedValuesOf)
|
|
@@ -1037,7 +1037,7 @@ function Fr() {
|
|
|
1037
1037
|
}
|
|
1038
1038
|
return we.map((e) => e.value);
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function _r(e) {
|
|
1041
1041
|
if (!e) return "default";
|
|
1042
1042
|
if (e.tz !== e.weekStart) return "inherited";
|
|
1043
1043
|
switch (e.tz) {
|
|
@@ -1057,11 +1057,11 @@ function ot(e) {
|
|
|
1057
1057
|
const a = we.find((t) => t.value === e);
|
|
1058
1058
|
return a ? a.label : e;
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function Mr(e) {
|
|
1061
1061
|
const a = Rt.find((t) => t.value === e);
|
|
1062
1062
|
return a ? a.label : String(e);
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function Ur({
|
|
1065
1065
|
active: e,
|
|
1066
1066
|
onClose: a
|
|
1067
1067
|
}) {
|
|
@@ -1072,16 +1072,16 @@ function Mr({
|
|
|
1072
1072
|
isClearing: i,
|
|
1073
1073
|
updatePreferences: s,
|
|
1074
1074
|
clearPreferences: o
|
|
1075
|
-
} =
|
|
1075
|
+
} = Fr({ enabled: e }), f = da(), u = (t == null ? void 0 : t.resolved.tz) || (f == null ? void 0 : f.tz) || "UTC", g = (t == null ? void 0 : t.resolved.weekStart) ?? (f == null ? void 0 : f.weekStart) ?? 1, [c, v] = F((t == null ? void 0 : t.stored) === null), [m, S] = F(!1), [N, w] = F(
|
|
1076
1076
|
u
|
|
1077
1077
|
), [k, z] = F(
|
|
1078
1078
|
g
|
|
1079
|
-
), [L, U] = F(!1), _ = Q(() =>
|
|
1079
|
+
), [L, U] = F(!1), _ = Q(() => Lr(), []), E = Q(
|
|
1080
1080
|
() => _.filter(
|
|
1081
1081
|
(I) => !we.some((de) => de.value === I)
|
|
1082
1082
|
),
|
|
1083
1083
|
[_]
|
|
1084
|
-
), b = Q(() => ot(N), [N]), C = t != null && t.inherited ? ot(t.inherited.tz) : "UTC", R = t != null && t.inherited ?
|
|
1084
|
+
), b = Q(() => ot(N), [N]), C = t != null && t.inherited ? ot(t.inherited.tz) : "UTC", R = t != null && t.inherited ? Mr(t.inherited.weekStart) : "Monday", x = _r(
|
|
1085
1085
|
t == null ? void 0 : t.inheritedSources
|
|
1086
1086
|
);
|
|
1087
1087
|
Ft.useEffect(() => {
|
|
@@ -1108,7 +1108,7 @@ function Mr({
|
|
|
1108
1108
|
}) ? (H.success("Preferences saved."), a()) : H.error("Failed to save preferences. Please try again.");
|
|
1109
1109
|
}, K = () => {
|
|
1110
1110
|
a();
|
|
1111
|
-
}, ae = n || i,
|
|
1111
|
+
}, ae = n || i, G = ae || r;
|
|
1112
1112
|
return /* @__PURE__ */ h(ie, { children: [
|
|
1113
1113
|
/* @__PURE__ */ h("div", { className: "space-y-4 py-1", children: [
|
|
1114
1114
|
/* @__PURE__ */ h(
|
|
@@ -1193,13 +1193,13 @@ function Mr({
|
|
|
1193
1193
|
/* @__PURE__ */ h("div", { className: "space-y-1.5", children: [
|
|
1194
1194
|
/* @__PURE__ */ l(oe, { className: it, children: "Timezone" }),
|
|
1195
1195
|
/* @__PURE__ */ h(
|
|
1196
|
-
|
|
1196
|
+
Ca,
|
|
1197
1197
|
{
|
|
1198
1198
|
open: L,
|
|
1199
1199
|
onOpenChange: U,
|
|
1200
1200
|
modal: !0,
|
|
1201
1201
|
children: [
|
|
1202
|
-
/* @__PURE__ */ l(
|
|
1202
|
+
/* @__PURE__ */ l(Na, { asChild: !0, children: /* @__PURE__ */ h(
|
|
1203
1203
|
V,
|
|
1204
1204
|
{
|
|
1205
1205
|
variant: "outline",
|
|
@@ -1210,12 +1210,12 @@ function Mr({
|
|
|
1210
1210
|
disabled: c,
|
|
1211
1211
|
children: [
|
|
1212
1212
|
/* @__PURE__ */ l("span", { className: "truncate", children: b }),
|
|
1213
|
-
/* @__PURE__ */ l(
|
|
1213
|
+
/* @__PURE__ */ l(ca, { className: "ml-2 h-3.5 w-3.5 shrink-0 opacity-50" })
|
|
1214
1214
|
]
|
|
1215
1215
|
}
|
|
1216
1216
|
) }),
|
|
1217
1217
|
/* @__PURE__ */ l(
|
|
1218
|
-
|
|
1218
|
+
Ea,
|
|
1219
1219
|
{
|
|
1220
1220
|
className: "z-50 w-[--radix-popover-trigger-width] p-0",
|
|
1221
1221
|
align: "start",
|
|
@@ -1328,15 +1328,15 @@ function Mr({
|
|
|
1328
1328
|
children: "Cancel"
|
|
1329
1329
|
}
|
|
1330
1330
|
),
|
|
1331
|
-
/* @__PURE__ */ l(V, { size: "xs", onClick: q, disabled:
|
|
1331
|
+
/* @__PURE__ */ l(V, { size: "xs", onClick: q, disabled: G, children: ae ? /* @__PURE__ */ h(ie, { children: [
|
|
1332
1332
|
/* @__PURE__ */ l(ht, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
1333
1333
|
"Saving…"
|
|
1334
1334
|
] }) : "Save" })
|
|
1335
1335
|
] })
|
|
1336
1336
|
] });
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1339
|
-
const { authToken: a, tokenProps: t } =
|
|
1338
|
+
function Or(e = {}) {
|
|
1339
|
+
const { authToken: a, tokenProps: t } = Be(), r = j(
|
|
1340
1340
|
(b) => b.actions.applyResolvedValueFormatPreferences
|
|
1341
1341
|
), n = e.enabled ?? !0, i = (a == null ? void 0 : a.accessToken) ?? null, s = (t == null ? void 0 : t.apiServiceUrl) ?? null, o = J(i);
|
|
1342
1342
|
o.current = i;
|
|
@@ -1345,7 +1345,7 @@ function Ur(e = {}) {
|
|
|
1345
1345
|
u(null), k(null), c(!1), m(!1), N(!1);
|
|
1346
1346
|
}, [i]);
|
|
1347
1347
|
const z = $(async (b) => {
|
|
1348
|
-
const C =
|
|
1348
|
+
const C = Da(await b.json());
|
|
1349
1349
|
if (!C.ok)
|
|
1350
1350
|
throw new Error("Value format preferences response is invalid");
|
|
1351
1351
|
return C.value;
|
|
@@ -1448,14 +1448,14 @@ const je = [
|
|
|
1448
1448
|
"INR",
|
|
1449
1449
|
"BRL",
|
|
1450
1450
|
"KWD"
|
|
1451
|
-
]),
|
|
1451
|
+
]), jr = Ra(), Wr = jr.filter(
|
|
1452
1452
|
(e) => !Pt.has(e)
|
|
1453
1453
|
), zt = [
|
|
1454
1454
|
{ value: "short", label: "Short" },
|
|
1455
1455
|
{ value: "medium", label: "Medium" },
|
|
1456
1456
|
{ value: "long", label: "Long" }
|
|
1457
1457
|
], dt = "2026-07-31", Ie = "2026-07-31T14:30:45";
|
|
1458
|
-
function
|
|
1458
|
+
function We(e) {
|
|
1459
1459
|
switch (e) {
|
|
1460
1460
|
case "viewer_user":
|
|
1461
1461
|
return "user";
|
|
@@ -1510,10 +1510,10 @@ function Re({
|
|
|
1510
1510
|
children: [
|
|
1511
1511
|
/* @__PURE__ */ l(ze, { id: e, size: "xs", children: /* @__PURE__ */ l(Fe, { children: f }) }),
|
|
1512
1512
|
/* @__PURE__ */ h(Le, { children: [
|
|
1513
|
-
/* @__PURE__ */ l(
|
|
1513
|
+
/* @__PURE__ */ l(X, { value: "inherit", className: "[&>span:last-child]:w-full", children: /* @__PURE__ */ h("span", { className: "flex w-full min-w-0 items-center justify-between gap-4", children: [
|
|
1514
1514
|
/* @__PURE__ */ h("span", { children: [
|
|
1515
1515
|
"Inherited from ",
|
|
1516
|
-
|
|
1516
|
+
We(n),
|
|
1517
1517
|
" ·",
|
|
1518
1518
|
" ",
|
|
1519
1519
|
Ae(r)
|
|
@@ -1521,7 +1521,7 @@ function Re({
|
|
|
1521
1521
|
/* @__PURE__ */ l("span", { className: "shrink-0 tabular-nums text-muted-foreground", children: i[r] })
|
|
1522
1522
|
] }) }),
|
|
1523
1523
|
zt.map((u) => /* @__PURE__ */ l(
|
|
1524
|
-
|
|
1524
|
+
X,
|
|
1525
1525
|
{
|
|
1526
1526
|
value: u.value,
|
|
1527
1527
|
className: "[&>span:last-child]:w-full",
|
|
@@ -1538,7 +1538,7 @@ function Re({
|
|
|
1538
1538
|
)
|
|
1539
1539
|
] });
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function $r({
|
|
1542
1542
|
value: e,
|
|
1543
1543
|
inherited: a,
|
|
1544
1544
|
inheritedSources: t,
|
|
@@ -1633,17 +1633,17 @@ function Wr({
|
|
|
1633
1633
|
children: [
|
|
1634
1634
|
/* @__PURE__ */ l(ze, { id: i, size: "xs", children: /* @__PURE__ */ l(Fe, { children: e.locale === void 0 ? `Inherited · ${a.locale}` : Br(e.locale) }) }),
|
|
1635
1635
|
/* @__PURE__ */ h(Le, { children: [
|
|
1636
|
-
/* @__PURE__ */ h(
|
|
1636
|
+
/* @__PURE__ */ h(X, { value: "inherit", children: [
|
|
1637
1637
|
"Inherited from ",
|
|
1638
|
-
|
|
1638
|
+
We(t.locale),
|
|
1639
1639
|
" ·",
|
|
1640
1640
|
" ",
|
|
1641
1641
|
a.locale
|
|
1642
1642
|
] }),
|
|
1643
1643
|
e.locale && !je.some(
|
|
1644
1644
|
(x) => x.value === e.locale
|
|
1645
|
-
) && /* @__PURE__ */ l(
|
|
1646
|
-
je.map((x) => /* @__PURE__ */ h(
|
|
1645
|
+
) && /* @__PURE__ */ l(X, { value: e.locale, children: e.locale }),
|
|
1646
|
+
je.map((x) => /* @__PURE__ */ h(X, { value: x.value, children: [
|
|
1647
1647
|
x.label,
|
|
1648
1648
|
" — ",
|
|
1649
1649
|
x.value
|
|
@@ -1722,15 +1722,15 @@ function Wr({
|
|
|
1722
1722
|
children: [
|
|
1723
1723
|
/* @__PURE__ */ l(ze, { id: s, size: "xs", children: /* @__PURE__ */ l(Fe, { children: e.defaultCurrency === void 0 ? `Inherited · ${a.defaultCurrency}` : e.defaultCurrency }) }),
|
|
1724
1724
|
/* @__PURE__ */ h(Le, { children: [
|
|
1725
|
-
/* @__PURE__ */ h(
|
|
1725
|
+
/* @__PURE__ */ h(X, { value: "inherit", children: [
|
|
1726
1726
|
"Inherited from ",
|
|
1727
|
-
|
|
1727
|
+
We(t.defaultCurrency),
|
|
1728
1728
|
" ·",
|
|
1729
1729
|
" ",
|
|
1730
1730
|
a.defaultCurrency
|
|
1731
1731
|
] }),
|
|
1732
|
-
[...Pt].map((x) => /* @__PURE__ */ l(
|
|
1733
|
-
|
|
1732
|
+
[...Pt].map((x) => /* @__PURE__ */ l(X, { value: x, children: x }, x)),
|
|
1733
|
+
Wr.map((x) => /* @__PURE__ */ l(X, { value: x, children: x }, x))
|
|
1734
1734
|
] })
|
|
1735
1735
|
]
|
|
1736
1736
|
}
|
|
@@ -1778,7 +1778,7 @@ function ut(e, a) {
|
|
|
1778
1778
|
return e == null ? void 0 : e.defaultCurrency;
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
|
-
function
|
|
1781
|
+
function Vr(e) {
|
|
1782
1782
|
var r, n;
|
|
1783
1783
|
const a = (r = e == null ? void 0 : e.dateTime) == null ? void 0 : r.dateStyle, t = (n = e == null ? void 0 : e.dateTime) == null ? void 0 : n.timeStyle;
|
|
1784
1784
|
return {
|
|
@@ -1788,12 +1788,12 @@ function $r(e) {
|
|
|
1788
1788
|
defaultCurrency: e == null ? void 0 : e.defaultCurrency
|
|
1789
1789
|
};
|
|
1790
1790
|
}
|
|
1791
|
-
function
|
|
1791
|
+
function Kr({
|
|
1792
1792
|
active: e,
|
|
1793
1793
|
onClose: a
|
|
1794
1794
|
}) {
|
|
1795
1795
|
var o, f, u, g, c, v, m;
|
|
1796
|
-
const { preferences: t, isLoading: r, isSaving: n, updatePreferences: i } =
|
|
1796
|
+
const { preferences: t, isLoading: r, isSaving: n, updatePreferences: i } = Or({ enabled: e });
|
|
1797
1797
|
if (!e) return null;
|
|
1798
1798
|
if (!t)
|
|
1799
1799
|
return /* @__PURE__ */ h(ie, { children: [
|
|
@@ -1814,7 +1814,7 @@ function Vr({
|
|
|
1814
1814
|
((m = t.stored) == null ? void 0 : m.defaultCurrency) ?? ""
|
|
1815
1815
|
].join(":");
|
|
1816
1816
|
return /* @__PURE__ */ l(
|
|
1817
|
-
|
|
1817
|
+
Hr,
|
|
1818
1818
|
{
|
|
1819
1819
|
preferences: t,
|
|
1820
1820
|
isSaving: n,
|
|
@@ -1824,7 +1824,7 @@ function Vr({
|
|
|
1824
1824
|
s
|
|
1825
1825
|
);
|
|
1826
1826
|
}
|
|
1827
|
-
function
|
|
1827
|
+
function Hr({
|
|
1828
1828
|
preferences: e,
|
|
1829
1829
|
isSaving: a,
|
|
1830
1830
|
updatePreferences: t,
|
|
@@ -1832,8 +1832,8 @@ function Kr({
|
|
|
1832
1832
|
}) {
|
|
1833
1833
|
var u, g;
|
|
1834
1834
|
const [n, i] = F(
|
|
1835
|
-
() =>
|
|
1836
|
-
), s = (n.locale === void 0 || pt(n.locale) !== void 0) && (n.defaultCurrency === void 0 ||
|
|
1835
|
+
() => Vr(e.stored)
|
|
1836
|
+
), s = (n.locale === void 0 || pt(n.locale) !== void 0) && (n.defaultCurrency === void 0 || Pa(n.defaultCurrency) !== void 0) && (n.dateStyle === void 0 || ["short", "medium", "long"].includes(n.dateStyle)) && (((u = n.dateTime) == null ? void 0 : u.dateStyle) === void 0 || ["short", "medium", "long"].includes(n.dateTime.dateStyle)) && (((g = n.dateTime) == null ? void 0 : g.timeStyle) === void 0 || ["short", "medium", "long"].includes(n.dateTime.timeStyle)), o = async () => {
|
|
1837
1837
|
const c = {
|
|
1838
1838
|
...n.locale !== void 0 ? { locale: n.locale } : {},
|
|
1839
1839
|
...n.dateStyle !== void 0 ? { dateStyle: n.dateStyle } : {},
|
|
@@ -1855,7 +1855,7 @@ function Kr({
|
|
|
1855
1855
|
};
|
|
1856
1856
|
return /* @__PURE__ */ h(ie, { children: [
|
|
1857
1857
|
/* @__PURE__ */ l("div", { className: "py-2", children: /* @__PURE__ */ l(
|
|
1858
|
-
|
|
1858
|
+
$r,
|
|
1859
1859
|
{
|
|
1860
1860
|
value: n,
|
|
1861
1861
|
inherited: e.inherited,
|
|
@@ -1902,30 +1902,30 @@ function Kr({
|
|
|
1902
1902
|
] })
|
|
1903
1903
|
] });
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function vn({
|
|
1906
1906
|
open: e,
|
|
1907
1907
|
onOpenChange: a
|
|
1908
1908
|
}) {
|
|
1909
1909
|
const [t, r] = F("display"), n = () => a(!1);
|
|
1910
|
-
return /* @__PURE__ */ l(
|
|
1911
|
-
/* @__PURE__ */ h(
|
|
1912
|
-
/* @__PURE__ */ l(
|
|
1913
|
-
/* @__PURE__ */ l(
|
|
1910
|
+
return /* @__PURE__ */ l(ua, { open: e, onOpenChange: a, children: /* @__PURE__ */ h(ma, { className: "rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control", children: [
|
|
1911
|
+
/* @__PURE__ */ h(fa, { children: [
|
|
1912
|
+
/* @__PURE__ */ l(ha, { className: "text-[15px]", children: "Report preferences" }),
|
|
1913
|
+
/* @__PURE__ */ l(pa, { className: "text-[13px] leading-5", children: "Set how values and Calendar periods appear for you." })
|
|
1914
1914
|
] }),
|
|
1915
|
-
/* @__PURE__ */ h(
|
|
1916
|
-
/* @__PURE__ */ h(
|
|
1915
|
+
/* @__PURE__ */ h(Ta, { value: t, onValueChange: r, children: [
|
|
1916
|
+
/* @__PURE__ */ h(ka, { variant: "underline", className: "w-full justify-start", children: [
|
|
1917
1917
|
/* @__PURE__ */ l(Qe, { value: "display", children: "Display formats" }),
|
|
1918
1918
|
/* @__PURE__ */ l(Qe, { value: "calendar", children: "Calendar" })
|
|
1919
1919
|
] }),
|
|
1920
1920
|
/* @__PURE__ */ l(et, { value: "display", children: /* @__PURE__ */ l(
|
|
1921
|
-
|
|
1921
|
+
Kr,
|
|
1922
1922
|
{
|
|
1923
1923
|
active: e && t === "display",
|
|
1924
1924
|
onClose: n
|
|
1925
1925
|
}
|
|
1926
1926
|
) }),
|
|
1927
1927
|
/* @__PURE__ */ l(et, { value: "calendar", children: /* @__PURE__ */ l(
|
|
1928
|
-
|
|
1928
|
+
Ur,
|
|
1929
1929
|
{
|
|
1930
1930
|
active: e && t === "calendar",
|
|
1931
1931
|
onClose: n
|
|
@@ -1935,16 +1935,16 @@ function pn({
|
|
|
1935
1935
|
] }) });
|
|
1936
1936
|
}
|
|
1937
1937
|
export {
|
|
1938
|
-
|
|
1938
|
+
Ha as A,
|
|
1939
1939
|
Tt as C,
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1940
|
+
pn as D,
|
|
1941
|
+
vn as R,
|
|
1942
|
+
$r as a,
|
|
1943
1943
|
kt as b,
|
|
1944
1944
|
It as c,
|
|
1945
1945
|
At as d,
|
|
1946
1946
|
Ue as e,
|
|
1947
1947
|
Oe as f,
|
|
1948
|
-
|
|
1949
|
-
|
|
1948
|
+
tr as g,
|
|
1949
|
+
hn as h
|
|
1950
1950
|
};
|