react-semaphor 0.1.543 → 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-CG9S7MGt.js → apply-dashboard-operations-Bz4n1Lq6.js} +44 -44
- package/dist/chunks/{assistant-chat-BFMRUYoB.js → assistant-chat-BNLkCDml.js} +288 -288
- package/dist/chunks/{comparison-window-caption-Bv18samq.js → comparison-window-caption-BTkrN3W4.js} +467 -462
- package/dist/chunks/dashboard-briefing-launcher-DQ_8O_e2.js +3725 -0
- package/dist/chunks/{dashboard-controls-UGpjOM2k.js → dashboard-controls-8RyBTQUO.js} +530 -525
- package/dist/chunks/dashboard-g5a4DKWq.js +14 -0
- package/dist/chunks/{dashboard-json-DG8dz0eX.js → dashboard-json-7qT9jmfL.js} +1 -1
- package/dist/chunks/{document-dashboard-inputs-OwqCbrVp.js → document-dashboard-inputs-BC6p-ESg.js} +4 -4
- package/dist/chunks/{document-sheet-utils-BTb3VZxV.js → document-sheet-utils-Duo9uLoH.js} +11 -11
- package/dist/chunks/{edit-dashboard-visual-CDpA4y5e.js → edit-dashboard-visual-BfJwnRIZ.js} +249 -248
- package/dist/chunks/export-file-format-C-tJsxsf.js +111 -0
- package/dist/chunks/{index-l5LclZvs.js → index-DkAyQvC6.js} +59 -58
- package/dist/chunks/{matrix-formatter-BnsTX90d.js → matrix-formatter-CxJLkztA.js} +1 -1
- package/dist/chunks/{numeric-presentation-F_-H6VAw.js → numeric-presentation-DESvLiu9.js} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-DupbRk-R.js → pivot-result-lifecycle-DM4CyGKs.js} +285 -393
- package/dist/chunks/{raw-temporal-presentation-D-azM_98.js → raw-temporal-presentation-CLiVi90c.js} +2 -2
- package/dist/chunks/{report-preferences-dialog-CPwRwEJx.js → report-preferences-dialog-Df7VpRVW.js} +195 -195
- package/dist/chunks/{saved-dashboard-context-BKvMfRfC.js → saved-dashboard-context-B-mQ--nV.js} +3 -3
- package/dist/chunks/{semaphor-ready-indicator-CN2AHm2x.js → semaphor-ready-indicator-DDAxk8us.js} +39892 -39380
- package/dist/chunks/{shelf-drop-preview-context-BGl_rxcW.js → shelf-drop-preview-context-BSRPwaED.js} +414 -371
- package/dist/chunks/{table-export-sheet-BDRXLLdq.js → table-export-sheet-CPfGAQ9X.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BnclfB2k.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-B9mKTJoy.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-Bdmry_oG.js +0 -4248
- 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
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as Ae, jsx as A, Fragment as ft } from "react/jsx-runtime";
|
|
2
2
|
import * as k from "react";
|
|
3
|
-
import
|
|
4
|
-
import { aS as
|
|
5
|
-
import { C as Et, y as It, z as ze, A as pe, D as
|
|
6
|
-
import { f as Gn, r as
|
|
7
|
-
import { a4 as Un, a5 as Wn, a6 as
|
|
8
|
-
import { f as
|
|
3
|
+
import zn, { forwardRef as $e, createElement as xe, useContext as rt, createContext as xt, useRef as B, useLayoutEffect as Pn, useImperativeHandle as zt, useEffect as Z, useState as ue, useCallback as O, useMemo as U, memo as wn, Suspense as Cn, useSyncExternalStore as En } from "react";
|
|
4
|
+
import { aS as In, Y as te, aT as Pt, Z as wt, aU as ot, aV as Ct, aW as Rn, aX as Dn, aY as An, aZ as Nn, u as Ue, a_ as Mn, a$ as Ln, b0 as _n, b1 as kn, b2 as Tn, b3 as Hn, b4 as Vn, b5 as $n } from "./semaphor-ready-indicator-DDAxk8us.js";
|
|
5
|
+
import { C as Et, y as It, z as ze, A as pe, D as Rt, E as Fn, F as Kn, G as Pe, H as Bn, J as Dt, K as qn, M as On } from "./switch-C3jLxlG0.js";
|
|
6
|
+
import { f as Gn, r as At } from "./editor-draft-sync-BN5qYHPF.js";
|
|
7
|
+
import { a4 as Un, a5 as Wn, a6 as Yn } from "./document-dashboard-inputs-BC6p-ESg.js";
|
|
8
|
+
import { f as Xn, r as Nt, g as Mt, a as Je, c as ke, n as jn, b as Qn } from "./custom-visual-inputs-DUtpYZOk.js";
|
|
9
9
|
import "./index-CuHybtft.js";
|
|
10
10
|
import "./validators-DMHTpf7a.js";
|
|
11
11
|
import "./matrix-operation-contract-8OIO4gob.js";
|
|
12
12
|
import "./analytics-base-schemas-BFAoRlkU.js";
|
|
13
13
|
import "zod";
|
|
14
14
|
import "../value-format-preferences/index.js";
|
|
15
|
-
import { c as
|
|
15
|
+
import { c as we } from "./class-utils-Df1OVOT1.js";
|
|
16
16
|
import { u as Jn } from "./appearance-context-DEYtWinQ.js";
|
|
17
|
-
const
|
|
17
|
+
const wo = zn.memo(function({
|
|
18
18
|
context: t = "editor"
|
|
19
19
|
} = {}) {
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ Ae(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
23
|
"data-content": "fields-section",
|
|
24
24
|
className: "flex h-full grow flex-col items-center overflow-hidden",
|
|
25
25
|
children: [
|
|
26
26
|
" ",
|
|
27
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ A(In, { context: t }),
|
|
28
28
|
" "
|
|
29
29
|
]
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
|
-
}),
|
|
33
|
-
|
|
32
|
+
}), Fe = xt(null);
|
|
33
|
+
Fe.displayName = "PanelGroupContext";
|
|
34
34
|
const K = {
|
|
35
35
|
group: "data-panel-group",
|
|
36
36
|
groupDirection: "data-panel-group-direction",
|
|
@@ -44,13 +44,13 @@ const K = {
|
|
|
44
44
|
resizeHandleEnabled: "data-panel-resize-handle-enabled",
|
|
45
45
|
resizeHandleId: "data-panel-resize-handle-id",
|
|
46
46
|
resizeHandleState: "data-resize-handle-state"
|
|
47
|
-
}, it = 10, me =
|
|
47
|
+
}, it = 10, me = Pn, pt = k.useId, Zn = typeof pt == "function" ? pt : () => null;
|
|
48
48
|
let er = 0;
|
|
49
49
|
function st(e = null) {
|
|
50
50
|
const t = Zn(), n = B(e || t || null);
|
|
51
51
|
return n.current === null && (n.current = "" + er++), e ?? n.current;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Lt({
|
|
54
54
|
children: e,
|
|
55
55
|
className: t = "",
|
|
56
56
|
collapsedSize: n,
|
|
@@ -68,7 +68,7 @@ function Nt({
|
|
|
68
68
|
tagName: m = "div",
|
|
69
69
|
...y
|
|
70
70
|
}) {
|
|
71
|
-
const S =
|
|
71
|
+
const S = rt(Fe);
|
|
72
72
|
if (S === null)
|
|
73
73
|
throw Error("Panel components must be rendered within a PanelGroup container");
|
|
74
74
|
const {
|
|
@@ -79,10 +79,10 @@ function Nt({
|
|
|
79
79
|
groupId: R,
|
|
80
80
|
isPanelCollapsed: M,
|
|
81
81
|
reevaluatePanelConstraints: w,
|
|
82
|
-
registerPanel:
|
|
82
|
+
registerPanel: Y,
|
|
83
83
|
resizePanel: j,
|
|
84
|
-
unregisterPanel:
|
|
85
|
-
} = S,
|
|
84
|
+
unregisterPanel: V
|
|
85
|
+
} = S, N = st(s), L = B({
|
|
86
86
|
callbacks: {
|
|
87
87
|
onCollapse: f,
|
|
88
88
|
onExpand: p,
|
|
@@ -95,7 +95,7 @@ function Nt({
|
|
|
95
95
|
maxSize: l,
|
|
96
96
|
minSize: a
|
|
97
97
|
},
|
|
98
|
-
id:
|
|
98
|
+
id: N,
|
|
99
99
|
idIsFromProps: s !== void 0,
|
|
100
100
|
order: c
|
|
101
101
|
});
|
|
@@ -103,46 +103,46 @@ function Nt({
|
|
|
103
103
|
didLogMissingDefaultSizeWarning: !1
|
|
104
104
|
}), me(() => {
|
|
105
105
|
const {
|
|
106
|
-
callbacks:
|
|
106
|
+
callbacks: $,
|
|
107
107
|
constraints: T
|
|
108
|
-
} =
|
|
108
|
+
} = L.current, H = {
|
|
109
109
|
...T
|
|
110
110
|
};
|
|
111
|
-
|
|
111
|
+
L.current.id = N, L.current.idIsFromProps = s !== void 0, L.current.order = c, $.onCollapse = f, $.onExpand = p, $.onResize = u, T.collapsedSize = n, T.collapsible = r, T.defaultSize = i, T.maxSize = l, T.minSize = a, (H.collapsedSize !== T.collapsedSize || H.collapsible !== T.collapsible || H.maxSize !== T.maxSize || H.minSize !== T.minSize) && w(L.current, H);
|
|
112
112
|
}), me(() => {
|
|
113
|
-
const
|
|
114
|
-
return
|
|
115
|
-
$
|
|
113
|
+
const $ = L.current;
|
|
114
|
+
return Y($), () => {
|
|
115
|
+
V($);
|
|
116
116
|
};
|
|
117
|
-
}, [c,
|
|
117
|
+
}, [c, N, Y, V]), zt(o, () => ({
|
|
118
118
|
collapse: () => {
|
|
119
|
-
v(
|
|
119
|
+
v(L.current);
|
|
120
120
|
},
|
|
121
|
-
expand: (
|
|
122
|
-
D(
|
|
121
|
+
expand: ($) => {
|
|
122
|
+
D(L.current, $);
|
|
123
123
|
},
|
|
124
124
|
getId() {
|
|
125
|
-
return
|
|
125
|
+
return N;
|
|
126
126
|
},
|
|
127
127
|
getSize() {
|
|
128
|
-
return x(
|
|
128
|
+
return x(L.current);
|
|
129
129
|
},
|
|
130
130
|
isCollapsed() {
|
|
131
|
-
return M(
|
|
131
|
+
return M(L.current);
|
|
132
132
|
},
|
|
133
133
|
isExpanded() {
|
|
134
|
-
return !M(
|
|
134
|
+
return !M(L.current);
|
|
135
135
|
},
|
|
136
|
-
resize: (
|
|
137
|
-
j(
|
|
136
|
+
resize: ($) => {
|
|
137
|
+
j(L.current, $);
|
|
138
138
|
}
|
|
139
|
-
}), [v, D, x, M,
|
|
140
|
-
const W = I(
|
|
139
|
+
}), [v, D, x, M, N, j]);
|
|
140
|
+
const W = I(L.current, i);
|
|
141
141
|
return xe(m, {
|
|
142
142
|
...y,
|
|
143
143
|
children: e,
|
|
144
144
|
className: t,
|
|
145
|
-
id:
|
|
145
|
+
id: N,
|
|
146
146
|
style: {
|
|
147
147
|
...W,
|
|
148
148
|
...h
|
|
@@ -151,20 +151,20 @@ function Nt({
|
|
|
151
151
|
[K.groupId]: R,
|
|
152
152
|
[K.panel]: "",
|
|
153
153
|
[K.panelCollapsible]: r || void 0,
|
|
154
|
-
[K.panelId]:
|
|
154
|
+
[K.panelId]: N,
|
|
155
155
|
[K.panelSize]: parseFloat("" + W.flexGrow).toFixed(1)
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
-
const tr = $e((e, t) => xe(
|
|
158
|
+
const tr = $e((e, t) => xe(Lt, {
|
|
159
159
|
...e,
|
|
160
160
|
forwardedRef: t
|
|
161
161
|
}));
|
|
162
|
-
|
|
162
|
+
Lt.displayName = "Panel";
|
|
163
163
|
tr.displayName = "forwardRef(Panel)";
|
|
164
|
-
let
|
|
164
|
+
let Ze = null, Te = -1, ce = null;
|
|
165
165
|
function nr(e, t) {
|
|
166
166
|
if (t) {
|
|
167
|
-
const n = (t &
|
|
167
|
+
const n = (t & Vt) !== 0, r = (t & $t) !== 0, i = (t & Ft) !== 0, o = (t & Kt) !== 0;
|
|
168
168
|
if (n)
|
|
169
169
|
return i ? "se-resize" : o ? "ne-resize" : "e-resize";
|
|
170
170
|
if (r)
|
|
@@ -184,36 +184,36 @@ function nr(e, t) {
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
function rr() {
|
|
187
|
-
ce !== null && (document.head.removeChild(ce),
|
|
187
|
+
ce !== null && (document.head.removeChild(ce), Ze = null, ce = null, Te = -1);
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function We(e, t) {
|
|
190
190
|
var n, r;
|
|
191
191
|
const i = nr(e, t);
|
|
192
|
-
if (
|
|
193
|
-
if (
|
|
192
|
+
if (Ze !== i) {
|
|
193
|
+
if (Ze = i, ce === null && (ce = document.createElement("style"), document.head.appendChild(ce)), Te >= 0) {
|
|
194
194
|
var o;
|
|
195
|
-
(o = ce.sheet) === null || o === void 0 || o.removeRule(
|
|
195
|
+
(o = ce.sheet) === null || o === void 0 || o.removeRule(Te);
|
|
196
196
|
}
|
|
197
|
-
|
|
197
|
+
Te = (n = (r = ce.sheet) === null || r === void 0 ? void 0 : r.insertRule(`*{cursor: ${i} !important;}`)) !== null && n !== void 0 ? n : -1;
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function _t(e) {
|
|
201
201
|
return e.type === "keydown";
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function kt(e) {
|
|
204
204
|
return e.type.startsWith("pointer");
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Tt(e) {
|
|
207
207
|
return e.type.startsWith("mouse");
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
if (
|
|
209
|
+
function Ke(e) {
|
|
210
|
+
if (kt(e)) {
|
|
211
211
|
if (e.isPrimary)
|
|
212
212
|
return {
|
|
213
213
|
x: e.clientX,
|
|
214
214
|
y: e.clientY
|
|
215
215
|
};
|
|
216
|
-
} else if (
|
|
216
|
+
} else if (Tt(e))
|
|
217
217
|
return {
|
|
218
218
|
x: e.clientX,
|
|
219
219
|
y: e.clientY
|
|
@@ -261,7 +261,7 @@ function sr(e, t) {
|
|
|
261
261
|
const lr = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
262
262
|
function ar(e) {
|
|
263
263
|
var t;
|
|
264
|
-
const n = getComputedStyle((t =
|
|
264
|
+
const n = getComputedStyle((t = Ht(e)) !== null && t !== void 0 ? t : e).display;
|
|
265
265
|
return n === "flex" || n === "inline-flex";
|
|
266
266
|
}
|
|
267
267
|
function cr(e) {
|
|
@@ -282,18 +282,18 @@ function gt(e) {
|
|
|
282
282
|
function ht(e) {
|
|
283
283
|
const t = [];
|
|
284
284
|
for (; e; )
|
|
285
|
-
t.push(e), e =
|
|
285
|
+
t.push(e), e = Ht(e);
|
|
286
286
|
return t;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function Ht(e) {
|
|
289
289
|
const {
|
|
290
290
|
parentNode: t
|
|
291
291
|
} = e;
|
|
292
292
|
return t && t instanceof ShadowRoot ? t.host : t;
|
|
293
293
|
}
|
|
294
|
-
const
|
|
295
|
-
let ne = [], be = !1, fe = /* @__PURE__ */ new Map(),
|
|
296
|
-
const
|
|
294
|
+
const Vt = 1, $t = 2, Ft = 4, Kt = 8, ur = or() === "coarse";
|
|
295
|
+
let ne = [], be = !1, fe = /* @__PURE__ */ new Map(), Be = /* @__PURE__ */ new Map();
|
|
296
|
+
const Ne = /* @__PURE__ */ new Set();
|
|
297
297
|
function dr(e, t, n, r, i) {
|
|
298
298
|
var o;
|
|
299
299
|
const {
|
|
@@ -304,11 +304,11 @@ function dr(e, t, n, r, i) {
|
|
|
304
304
|
hitAreaMargins: r,
|
|
305
305
|
setResizeHandlerState: i
|
|
306
306
|
}, a = (o = fe.get(s)) !== null && o !== void 0 ? o : 0;
|
|
307
|
-
return fe.set(s, a + 1),
|
|
307
|
+
return fe.set(s, a + 1), Ne.add(l), He(), function() {
|
|
308
308
|
var p;
|
|
309
|
-
|
|
309
|
+
Be.delete(e), Ne.delete(l);
|
|
310
310
|
const u = (p = fe.get(s)) !== null && p !== void 0 ? p : 1;
|
|
311
|
-
if (fe.set(s, u - 1),
|
|
311
|
+
if (fe.set(s, u - 1), He(), u === 1 && fe.delete(s), ne.includes(l)) {
|
|
312
312
|
const c = ne.indexOf(l);
|
|
313
313
|
c >= 0 && ne.splice(c, 1), at(), i("up", !0, null);
|
|
314
314
|
}
|
|
@@ -320,19 +320,19 @@ function fr(e) {
|
|
|
320
320
|
} = e, {
|
|
321
321
|
x: n,
|
|
322
322
|
y: r
|
|
323
|
-
} =
|
|
323
|
+
} = Ke(e);
|
|
324
324
|
be = !0, lt({
|
|
325
325
|
target: t,
|
|
326
326
|
x: n,
|
|
327
327
|
y: r
|
|
328
|
-
}),
|
|
328
|
+
}), He(), ne.length > 0 && (Ve("down", e), e.preventDefault(), Bt(t) || e.stopImmediatePropagation());
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function Ye(e) {
|
|
331
331
|
const {
|
|
332
332
|
x: t,
|
|
333
333
|
y: n
|
|
334
|
-
} =
|
|
335
|
-
if (be && e.buttons === 0 && (be = !1,
|
|
334
|
+
} = Ke(e);
|
|
335
|
+
if (be && e.buttons === 0 && (be = !1, Ve("up", e)), !be) {
|
|
336
336
|
const {
|
|
337
337
|
target: r
|
|
338
338
|
} = e;
|
|
@@ -342,7 +342,7 @@ function We(e) {
|
|
|
342
342
|
y: n
|
|
343
343
|
});
|
|
344
344
|
}
|
|
345
|
-
|
|
345
|
+
Ve("move", e), at(), ne.length > 0 && e.preventDefault();
|
|
346
346
|
}
|
|
347
347
|
function Xe(e) {
|
|
348
348
|
const {
|
|
@@ -350,14 +350,14 @@ function Xe(e) {
|
|
|
350
350
|
} = e, {
|
|
351
351
|
x: n,
|
|
352
352
|
y: r
|
|
353
|
-
} =
|
|
354
|
-
|
|
353
|
+
} = Ke(e);
|
|
354
|
+
Be.clear(), be = !1, ne.length > 0 && (e.preventDefault(), Bt(t) || e.stopImmediatePropagation()), Ve("up", e), lt({
|
|
355
355
|
target: t,
|
|
356
356
|
x: n,
|
|
357
357
|
y: r
|
|
358
|
-
}), at(),
|
|
358
|
+
}), at(), He();
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Bt(e) {
|
|
361
361
|
let t = e;
|
|
362
362
|
for (; t; ) {
|
|
363
363
|
if (t.hasAttribute(K.resizeHandle))
|
|
@@ -373,7 +373,7 @@ function lt({
|
|
|
373
373
|
}) {
|
|
374
374
|
ne.splice(0);
|
|
375
375
|
let r = null;
|
|
376
|
-
(e instanceof HTMLElement || e instanceof SVGElement) && (r = e),
|
|
376
|
+
(e instanceof HTMLElement || e instanceof SVGElement) && (r = e), Ne.forEach((i) => {
|
|
377
377
|
const {
|
|
378
378
|
element: o,
|
|
379
379
|
hitAreaMargins: s
|
|
@@ -403,8 +403,8 @@ function lt({
|
|
|
403
403
|
}
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
|
|
406
|
+
function je(e, t) {
|
|
407
|
+
Be.set(e, t);
|
|
408
408
|
}
|
|
409
409
|
function at() {
|
|
410
410
|
let e = !1, t = !1;
|
|
@@ -415,31 +415,31 @@ function at() {
|
|
|
415
415
|
i === "horizontal" ? e = !0 : t = !0;
|
|
416
416
|
});
|
|
417
417
|
let n = 0;
|
|
418
|
-
|
|
418
|
+
Be.forEach((r) => {
|
|
419
419
|
n |= r;
|
|
420
|
-
}), e && t ?
|
|
420
|
+
}), e && t ? We("intersection", n) : e ? We("horizontal", n) : t ? We("vertical", n) : rr();
|
|
421
421
|
}
|
|
422
|
-
let
|
|
423
|
-
function
|
|
424
|
-
|
|
422
|
+
let Qe = new AbortController();
|
|
423
|
+
function He() {
|
|
424
|
+
Qe.abort(), Qe = new AbortController();
|
|
425
425
|
const e = {
|
|
426
426
|
capture: !0,
|
|
427
|
-
signal:
|
|
427
|
+
signal: Qe.signal
|
|
428
428
|
};
|
|
429
|
-
|
|
429
|
+
Ne.size && (be ? (ne.length > 0 && fe.forEach((t, n) => {
|
|
430
430
|
const {
|
|
431
431
|
body: r
|
|
432
432
|
} = n;
|
|
433
|
-
t > 0 && (r.addEventListener("contextmenu", Xe, e), r.addEventListener("pointerleave",
|
|
433
|
+
t > 0 && (r.addEventListener("contextmenu", Xe, e), r.addEventListener("pointerleave", Ye, e), r.addEventListener("pointermove", Ye, e));
|
|
434
434
|
}), window.addEventListener("pointerup", Xe, e), window.addEventListener("pointercancel", Xe, e)) : fe.forEach((t, n) => {
|
|
435
435
|
const {
|
|
436
436
|
body: r
|
|
437
437
|
} = n;
|
|
438
|
-
t > 0 && (r.addEventListener("pointerdown", fr, e), r.addEventListener("pointermove",
|
|
438
|
+
t > 0 && (r.addEventListener("pointerdown", fr, e), r.addEventListener("pointermove", Ye, e));
|
|
439
439
|
}));
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
|
|
441
|
+
function Ve(e, t) {
|
|
442
|
+
Ne.forEach((n) => {
|
|
443
443
|
const {
|
|
444
444
|
setResizeHandlerState: r
|
|
445
445
|
} = n, i = ne.includes(n);
|
|
@@ -494,7 +494,7 @@ function Se({
|
|
|
494
494
|
n = l;
|
|
495
495
|
return n = Math.min(s, n), n = parseFloat(n.toFixed(it)), n;
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Re({
|
|
498
498
|
delta: e,
|
|
499
499
|
initialLayout: t,
|
|
500
500
|
panelConstraints: n,
|
|
@@ -630,28 +630,28 @@ function gr({
|
|
|
630
630
|
function Me(e, t = document) {
|
|
631
631
|
return Array.from(t.querySelectorAll(`[${K.resizeHandleId}][data-panel-group-id="${e}"]`));
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function qt(e, t, n = document) {
|
|
634
634
|
const i = Me(e, n).findIndex((o) => o.getAttribute(K.resizeHandleId) === t);
|
|
635
635
|
return i ?? null;
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
const r =
|
|
637
|
+
function Ot(e, t, n) {
|
|
638
|
+
const r = qt(e, t, n);
|
|
639
639
|
return r != null ? [r, r + 1] : [-1, -1];
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function Gt(e, t = document) {
|
|
642
642
|
var n;
|
|
643
643
|
if (t instanceof HTMLElement && (t == null || (n = t.dataset) === null || n === void 0 ? void 0 : n.panelGroupId) == e)
|
|
644
644
|
return t;
|
|
645
645
|
const r = t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);
|
|
646
646
|
return r || null;
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function qe(e, t = document) {
|
|
649
649
|
const n = t.querySelector(`[${K.resizeHandleId}="${e}"]`);
|
|
650
650
|
return n || null;
|
|
651
651
|
}
|
|
652
652
|
function hr(e, t, n, r = document) {
|
|
653
653
|
var i, o, s, l;
|
|
654
|
-
const a =
|
|
654
|
+
const a = qe(t, r), f = Me(e, r), p = a ? f.indexOf(a) : -1, u = (i = (o = n[p]) === null || o === void 0 ? void 0 : o.id) !== null && i !== void 0 ? i : null, c = (s = (l = n[p + 1]) === null || l === void 0 ? void 0 : l.id) !== null && s !== void 0 ? s : null;
|
|
655
655
|
return [u, c];
|
|
656
656
|
}
|
|
657
657
|
function yr({
|
|
@@ -696,7 +696,7 @@ function yr({
|
|
|
696
696
|
E(l, "Eager values not found");
|
|
697
697
|
const {
|
|
698
698
|
panelDataArray: a
|
|
699
|
-
} = l, f =
|
|
699
|
+
} = l, f = Gt(n, o);
|
|
700
700
|
E(f != null, `No group found for id "${n}"`);
|
|
701
701
|
const p = Me(n, o);
|
|
702
702
|
E(p, `No resize handles found for group id "${n}"`);
|
|
@@ -722,15 +722,15 @@ function yr({
|
|
|
722
722
|
minSize: w = 0
|
|
723
723
|
} = x.constraints;
|
|
724
724
|
if (I != null && M) {
|
|
725
|
-
const
|
|
725
|
+
const Y = Re({
|
|
726
726
|
delta: J(I, R) ? w - R : R - I,
|
|
727
727
|
initialLayout: r,
|
|
728
728
|
panelConstraints: a.map((j) => j.constraints),
|
|
729
|
-
pivotIndices:
|
|
729
|
+
pivotIndices: Ot(n, h, o),
|
|
730
730
|
prevLayout: r,
|
|
731
731
|
trigger: "keyboard"
|
|
732
732
|
});
|
|
733
|
-
r !==
|
|
733
|
+
r !== Y && s(Y);
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
736
|
break;
|
|
@@ -754,28 +754,28 @@ function yt(e, t) {
|
|
|
754
754
|
return !1;
|
|
755
755
|
return !0;
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function Ut(e, t) {
|
|
758
758
|
const n = e === "horizontal", {
|
|
759
759
|
x: r,
|
|
760
760
|
y: i
|
|
761
|
-
} =
|
|
761
|
+
} = Ke(t);
|
|
762
762
|
return n ? r : i;
|
|
763
763
|
}
|
|
764
764
|
function vr(e, t, n, r, i) {
|
|
765
|
-
const o = n === "horizontal", s =
|
|
765
|
+
const o = n === "horizontal", s = qe(t, i);
|
|
766
766
|
E(s, `No resize handle element found for id "${t}"`);
|
|
767
767
|
const l = s.getAttribute(K.groupId);
|
|
768
768
|
E(l, "Resize handle element has no group id attribute");
|
|
769
769
|
let {
|
|
770
770
|
initialCursorPosition: a
|
|
771
771
|
} = r;
|
|
772
|
-
const f =
|
|
772
|
+
const f = Ut(n, e), p = Gt(l, i);
|
|
773
773
|
E(p, `No group element found for id "${l}"`);
|
|
774
774
|
const u = p.getBoundingClientRect(), c = o ? u.width : u.height;
|
|
775
775
|
return (f - a) / c * 100;
|
|
776
776
|
}
|
|
777
777
|
function Sr(e, t, n, r, i, o) {
|
|
778
|
-
if (
|
|
778
|
+
if (_t(e)) {
|
|
779
779
|
const s = n === "horizontal";
|
|
780
780
|
let l = 0;
|
|
781
781
|
e.shiftKey ? l = 100 : i != null ? l = i : l = 10;
|
|
@@ -853,7 +853,7 @@ function ye(e, t, n) {
|
|
|
853
853
|
}
|
|
854
854
|
});
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function _e(e, t) {
|
|
857
857
|
if (e.length !== t.length)
|
|
858
858
|
return !1;
|
|
859
859
|
for (let n = 0; n < e.length; n++)
|
|
@@ -903,10 +903,10 @@ function vt(e) {
|
|
|
903
903
|
};
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function Wt(e) {
|
|
907
907
|
return `react-resizable-panels:${e}`;
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function Yt(e) {
|
|
910
910
|
return e.map((t) => {
|
|
911
911
|
const {
|
|
912
912
|
constraints: n,
|
|
@@ -919,7 +919,7 @@ function Wt(e) {
|
|
|
919
919
|
}
|
|
920
920
|
function Xt(e, t) {
|
|
921
921
|
try {
|
|
922
|
-
const n =
|
|
922
|
+
const n = Wt(e), r = t.getItem(n);
|
|
923
923
|
if (r) {
|
|
924
924
|
const i = JSON.parse(r);
|
|
925
925
|
if (typeof i == "object" && i != null)
|
|
@@ -931,12 +931,12 @@ function Xt(e, t) {
|
|
|
931
931
|
}
|
|
932
932
|
function Pr(e, t, n) {
|
|
933
933
|
var r, i;
|
|
934
|
-
const o = (r = Xt(e, n)) !== null && r !== void 0 ? r : {}, s =
|
|
934
|
+
const o = (r = Xt(e, n)) !== null && r !== void 0 ? r : {}, s = Yt(t);
|
|
935
935
|
return (i = o[s]) !== null && i !== void 0 ? i : null;
|
|
936
936
|
}
|
|
937
937
|
function wr(e, t, n, r, i) {
|
|
938
938
|
var o;
|
|
939
|
-
const s =
|
|
939
|
+
const s = Wt(e), l = Yt(t), a = (o = Xt(e, i)) !== null && o !== void 0 ? o : {};
|
|
940
940
|
a[l] = {
|
|
941
941
|
expandToSizes: Object.fromEntries(n.entries()),
|
|
942
942
|
layout: r
|
|
@@ -986,13 +986,13 @@ function St({
|
|
|
986
986
|
}
|
|
987
987
|
return n;
|
|
988
988
|
}
|
|
989
|
-
const Cr = 100,
|
|
990
|
-
getItem: (e) => (vt(
|
|
989
|
+
const Cr = 100, De = {
|
|
990
|
+
getItem: (e) => (vt(De), De.getItem(e)),
|
|
991
991
|
setItem: (e, t) => {
|
|
992
|
-
vt(
|
|
992
|
+
vt(De), De.setItem(e, t);
|
|
993
993
|
}
|
|
994
994
|
}, bt = {};
|
|
995
|
-
function
|
|
995
|
+
function jt({
|
|
996
996
|
autoSaveId: e = null,
|
|
997
997
|
children: t,
|
|
998
998
|
className: n = "",
|
|
@@ -1001,7 +1001,7 @@ function Yt({
|
|
|
1001
1001
|
id: o = null,
|
|
1002
1002
|
onLayout: s = null,
|
|
1003
1003
|
keyboardResizeBy: l = null,
|
|
1004
|
-
storage: a =
|
|
1004
|
+
storage: a = De,
|
|
1005
1005
|
style: f,
|
|
1006
1006
|
tagName: p = "div",
|
|
1007
1007
|
...u
|
|
@@ -1067,7 +1067,7 @@ function Yt({
|
|
|
1067
1067
|
}
|
|
1068
1068
|
}, [e, S, a]), Z(() => {
|
|
1069
1069
|
});
|
|
1070
|
-
const
|
|
1070
|
+
const Y = O((b) => {
|
|
1071
1071
|
const {
|
|
1072
1072
|
onLayout: z
|
|
1073
1073
|
} = M.current, {
|
|
@@ -1077,12 +1077,12 @@ function Yt({
|
|
|
1077
1077
|
if (b.constraints.collapsible) {
|
|
1078
1078
|
const g = d.map((oe) => oe.constraints), {
|
|
1079
1079
|
collapsedSize: P = 0,
|
|
1080
|
-
panelSize:
|
|
1080
|
+
panelSize: _,
|
|
1081
1081
|
pivotIndices: q
|
|
1082
1082
|
} = de(d, b, C);
|
|
1083
|
-
if (E(
|
|
1084
|
-
I.current.set(b.id,
|
|
1085
|
-
const ie = ve(d, b) === d.length - 1 ?
|
|
1083
|
+
if (E(_ != null, `Panel size not found for panel "${b.id}"`), !le(_, P)) {
|
|
1084
|
+
I.current.set(b.id, _);
|
|
1085
|
+
const ie = ve(d, b) === d.length - 1 ? _ - P : P - _, F = Re({
|
|
1086
1086
|
delta: ie,
|
|
1087
1087
|
initialLayout: C,
|
|
1088
1088
|
panelConstraints: g,
|
|
@@ -1090,7 +1090,7 @@ function Yt({
|
|
|
1090
1090
|
prevLayout: C,
|
|
1091
1091
|
trigger: "imperative-api"
|
|
1092
1092
|
});
|
|
1093
|
-
|
|
1093
|
+
_e(C, F) || (v(F), w.current.layout = F, z && z(F), ye(d, F, x.current));
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
1096
|
}, []), j = O((b, z) => {
|
|
@@ -1102,24 +1102,24 @@ function Yt({
|
|
|
1102
1102
|
} = w.current;
|
|
1103
1103
|
if (b.constraints.collapsible) {
|
|
1104
1104
|
const P = g.map((ee) => ee.constraints), {
|
|
1105
|
-
collapsedSize:
|
|
1105
|
+
collapsedSize: _ = 0,
|
|
1106
1106
|
panelSize: q = 0,
|
|
1107
1107
|
minSize: oe = 0,
|
|
1108
1108
|
pivotIndices: ie
|
|
1109
1109
|
} = de(g, b, d), F = z ?? oe;
|
|
1110
|
-
if (le(q,
|
|
1111
|
-
const ee = I.current.get(b.id),
|
|
1112
|
-
delta:
|
|
1110
|
+
if (le(q, _)) {
|
|
1111
|
+
const ee = I.current.get(b.id), Ee = ee != null && ee >= F ? ee : F, Ge = ve(g, b) === g.length - 1 ? q - Ee : Ee - q, Q = Re({
|
|
1112
|
+
delta: Ge,
|
|
1113
1113
|
initialLayout: d,
|
|
1114
1114
|
panelConstraints: P,
|
|
1115
1115
|
pivotIndices: ie,
|
|
1116
1116
|
prevLayout: d,
|
|
1117
1117
|
trigger: "imperative-api"
|
|
1118
1118
|
});
|
|
1119
|
-
|
|
1119
|
+
_e(d, Q) || (v(Q), w.current.layout = Q, C && C(Q), ye(g, Q, x.current));
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
1122
|
-
}, []),
|
|
1122
|
+
}, []), V = O((b) => {
|
|
1123
1123
|
const {
|
|
1124
1124
|
layout: z,
|
|
1125
1125
|
panelDataArray: C
|
|
@@ -1127,7 +1127,7 @@ function Yt({
|
|
|
1127
1127
|
panelSize: d
|
|
1128
1128
|
} = de(C, b, z);
|
|
1129
1129
|
return E(d != null, `Panel size not found for panel "${b.id}"`), d;
|
|
1130
|
-
}, []),
|
|
1130
|
+
}, []), N = O((b, z) => {
|
|
1131
1131
|
const {
|
|
1132
1132
|
panelDataArray: C
|
|
1133
1133
|
} = w.current, d = ve(C, b);
|
|
@@ -1138,7 +1138,7 @@ function Yt({
|
|
|
1138
1138
|
panelData: C,
|
|
1139
1139
|
panelIndex: d
|
|
1140
1140
|
});
|
|
1141
|
-
}, [m, S]),
|
|
1141
|
+
}, [m, S]), L = O((b) => {
|
|
1142
1142
|
const {
|
|
1143
1143
|
layout: z,
|
|
1144
1144
|
panelDataArray: C
|
|
@@ -1158,7 +1158,7 @@ function Yt({
|
|
|
1158
1158
|
panelSize: P
|
|
1159
1159
|
} = de(C, b, z);
|
|
1160
1160
|
return E(P != null, `Panel size not found for panel "${b.id}"`), !g || ge(P, d) > 0;
|
|
1161
|
-
}, []),
|
|
1161
|
+
}, []), $ = O((b) => {
|
|
1162
1162
|
const {
|
|
1163
1163
|
panelDataArray: z
|
|
1164
1164
|
} = w.current;
|
|
@@ -1186,11 +1186,11 @@ function Yt({
|
|
|
1186
1186
|
P == null && (P = br({
|
|
1187
1187
|
panelDataArray: g
|
|
1188
1188
|
}));
|
|
1189
|
-
const
|
|
1189
|
+
const _ = St({
|
|
1190
1190
|
layout: P,
|
|
1191
1191
|
panelConstraints: g.map((q) => q.constraints)
|
|
1192
1192
|
});
|
|
1193
|
-
yt(d,
|
|
1193
|
+
yt(d, _) || (v(_), w.current.layout = _, z && z(_), ye(g, _, x.current));
|
|
1194
1194
|
}
|
|
1195
1195
|
}), me(() => {
|
|
1196
1196
|
const b = w.current;
|
|
@@ -1207,29 +1207,29 @@ function Yt({
|
|
|
1207
1207
|
if (!P)
|
|
1208
1208
|
return () => null;
|
|
1209
1209
|
const {
|
|
1210
|
-
direction:
|
|
1210
|
+
direction: _,
|
|
1211
1211
|
dragState: q,
|
|
1212
1212
|
id: oe,
|
|
1213
1213
|
keyboardResizeBy: ie,
|
|
1214
1214
|
onLayout: F
|
|
1215
1215
|
} = M.current, {
|
|
1216
1216
|
layout: ee,
|
|
1217
|
-
panelDataArray:
|
|
1217
|
+
panelDataArray: Ee
|
|
1218
1218
|
} = w.current, {
|
|
1219
|
-
initialLayout:
|
|
1220
|
-
} = q ?? {},
|
|
1221
|
-
let Q = Sr(g, b,
|
|
1222
|
-
const ut =
|
|
1219
|
+
initialLayout: Le
|
|
1220
|
+
} = q ?? {}, Ge = Ot(oe, b, P);
|
|
1221
|
+
let Q = Sr(g, b, _, q, ie, P);
|
|
1222
|
+
const ut = _ === "horizontal";
|
|
1223
1223
|
ut && z && (Q = -Q);
|
|
1224
|
-
const
|
|
1224
|
+
const bn = Ee.map((xn) => xn.constraints), Ie = Re({
|
|
1225
1225
|
delta: Q,
|
|
1226
|
-
initialLayout:
|
|
1227
|
-
panelConstraints:
|
|
1228
|
-
pivotIndices:
|
|
1226
|
+
initialLayout: Le ?? ee,
|
|
1227
|
+
panelConstraints: bn,
|
|
1228
|
+
pivotIndices: Ge,
|
|
1229
1229
|
prevLayout: ee,
|
|
1230
|
-
trigger:
|
|
1231
|
-
}), dt = !
|
|
1232
|
-
(
|
|
1230
|
+
trigger: _t(g) ? "keyboard" : "mouse-or-touch"
|
|
1231
|
+
}), dt = !_e(ee, Ie);
|
|
1232
|
+
(kt(g) || Tt(g)) && R.current != Q && (R.current = Q, !dt && Q !== 0 ? ut ? je(b, Q < 0 ? Vt : $t) : je(b, Q < 0 ? Ft : Kt) : je(b, 0)), dt && (v(Ie), w.current.layout = Ie, F && F(Ie), ye(Ee, Ie, x.current));
|
|
1233
1233
|
};
|
|
1234
1234
|
}, []), H = O((b, z) => {
|
|
1235
1235
|
const {
|
|
@@ -1238,11 +1238,11 @@ function Yt({
|
|
|
1238
1238
|
layout: d,
|
|
1239
1239
|
panelDataArray: g
|
|
1240
1240
|
} = w.current, P = g.map((ee) => ee.constraints), {
|
|
1241
|
-
panelSize:
|
|
1241
|
+
panelSize: _,
|
|
1242
1242
|
pivotIndices: q
|
|
1243
1243
|
} = de(g, b, d);
|
|
1244
|
-
E(
|
|
1245
|
-
const ie = ve(g, b) === g.length - 1 ?
|
|
1244
|
+
E(_ != null, `Panel size not found for panel "${b.id}"`);
|
|
1245
|
+
const ie = ve(g, b) === g.length - 1 ? _ - z : z - _, F = Re({
|
|
1246
1246
|
delta: ie,
|
|
1247
1247
|
initialLayout: d,
|
|
1248
1248
|
panelConstraints: P,
|
|
@@ -1250,8 +1250,8 @@ function Yt({
|
|
|
1250
1250
|
prevLayout: d,
|
|
1251
1251
|
trigger: "imperative-api"
|
|
1252
1252
|
});
|
|
1253
|
-
|
|
1254
|
-
}, []),
|
|
1253
|
+
_e(d, F) || (v(F), w.current.layout = F, C && C(F), ye(g, F, x.current));
|
|
1254
|
+
}, []), X = O((b, z) => {
|
|
1255
1255
|
const {
|
|
1256
1256
|
layout: C,
|
|
1257
1257
|
panelDataArray: d
|
|
@@ -1259,14 +1259,14 @@ function Yt({
|
|
|
1259
1259
|
collapsedSize: g = 0,
|
|
1260
1260
|
collapsible: P
|
|
1261
1261
|
} = z, {
|
|
1262
|
-
collapsedSize:
|
|
1262
|
+
collapsedSize: _ = 0,
|
|
1263
1263
|
collapsible: q,
|
|
1264
1264
|
maxSize: oe = 100,
|
|
1265
1265
|
minSize: ie = 0
|
|
1266
1266
|
} = b.constraints, {
|
|
1267
1267
|
panelSize: F
|
|
1268
1268
|
} = de(d, b, C);
|
|
1269
|
-
F != null && (P && q && le(F, g) ? le(g,
|
|
1269
|
+
F != null && (P && q && le(F, g) ? le(g, _) || H(b, _) : F < ie ? H(b, ie) : F > oe && H(b, oe));
|
|
1270
1270
|
}, [H]), G = O((b, z) => {
|
|
1271
1271
|
const {
|
|
1272
1272
|
direction: C
|
|
@@ -1275,9 +1275,9 @@ function Yt({
|
|
|
1275
1275
|
} = w.current;
|
|
1276
1276
|
if (!h.current)
|
|
1277
1277
|
return;
|
|
1278
|
-
const g =
|
|
1278
|
+
const g = qe(b, h.current);
|
|
1279
1279
|
E(g, `Drag handle element not found for id "${b}"`);
|
|
1280
|
-
const P =
|
|
1280
|
+
const P = Ut(C, z);
|
|
1281
1281
|
y({
|
|
1282
1282
|
dragHandleId: b,
|
|
1283
1283
|
dragHandleRect: g.getBoundingClientRect(),
|
|
@@ -1292,31 +1292,31 @@ function Yt({
|
|
|
1292
1292
|
} = w.current, C = ve(z, b);
|
|
1293
1293
|
C >= 0 && (z.splice(C, 1), delete x.current[b.id], w.current.panelDataArrayChanged = !0, D());
|
|
1294
1294
|
}, [D]), se = U(() => ({
|
|
1295
|
-
collapsePanel:
|
|
1295
|
+
collapsePanel: Y,
|
|
1296
1296
|
direction: r,
|
|
1297
1297
|
dragState: m,
|
|
1298
1298
|
expandPanel: j,
|
|
1299
|
-
getPanelSize:
|
|
1300
|
-
getPanelStyle:
|
|
1299
|
+
getPanelSize: V,
|
|
1300
|
+
getPanelStyle: N,
|
|
1301
1301
|
groupId: c,
|
|
1302
|
-
isPanelCollapsed:
|
|
1302
|
+
isPanelCollapsed: L,
|
|
1303
1303
|
isPanelExpanded: W,
|
|
1304
|
-
reevaluatePanelConstraints:
|
|
1305
|
-
registerPanel:
|
|
1304
|
+
reevaluatePanelConstraints: X,
|
|
1305
|
+
registerPanel: $,
|
|
1306
1306
|
registerResizeHandle: T,
|
|
1307
1307
|
resizePanel: H,
|
|
1308
1308
|
startDragging: G,
|
|
1309
1309
|
stopDragging: re,
|
|
1310
1310
|
unregisterPanel: he,
|
|
1311
1311
|
panelGroupElement: h.current
|
|
1312
|
-
}), [
|
|
1312
|
+
}), [Y, m, r, j, V, N, c, L, W, X, $, T, H, G, re, he]), ae = {
|
|
1313
1313
|
display: "flex",
|
|
1314
1314
|
flexDirection: r === "horizontal" ? "row" : "column",
|
|
1315
1315
|
height: "100%",
|
|
1316
1316
|
overflow: "hidden",
|
|
1317
1317
|
width: "100%"
|
|
1318
1318
|
};
|
|
1319
|
-
return xe(
|
|
1319
|
+
return xe(Fe.Provider, {
|
|
1320
1320
|
value: se
|
|
1321
1321
|
}, xe(p, {
|
|
1322
1322
|
...u,
|
|
@@ -1334,11 +1334,11 @@ function Yt({
|
|
|
1334
1334
|
[K.groupId]: c
|
|
1335
1335
|
}));
|
|
1336
1336
|
}
|
|
1337
|
-
const Er = $e((e, t) => xe(
|
|
1337
|
+
const Er = $e((e, t) => xe(jt, {
|
|
1338
1338
|
...e,
|
|
1339
1339
|
forwardedRef: t
|
|
1340
1340
|
}));
|
|
1341
|
-
|
|
1341
|
+
jt.displayName = "PanelGroup";
|
|
1342
1342
|
Er.displayName = "forwardRef(PanelGroup)";
|
|
1343
1343
|
function ve(e, t) {
|
|
1344
1344
|
return e.findIndex((n) => n === t || n.id === t.id);
|
|
@@ -1360,7 +1360,7 @@ function Ir({
|
|
|
1360
1360
|
Z(() => {
|
|
1361
1361
|
if (e || n == null || r == null)
|
|
1362
1362
|
return;
|
|
1363
|
-
const i =
|
|
1363
|
+
const i = qe(t, r);
|
|
1364
1364
|
if (i == null)
|
|
1365
1365
|
return;
|
|
1366
1366
|
const o = (s) => {
|
|
@@ -1379,7 +1379,7 @@ function Ir({
|
|
|
1379
1379
|
s.preventDefault();
|
|
1380
1380
|
const l = i.getAttribute(K.groupId);
|
|
1381
1381
|
E(l, `No group element found for id "${l}"`);
|
|
1382
|
-
const a = Me(l, r), f =
|
|
1382
|
+
const a = Me(l, r), f = qt(l, t, r);
|
|
1383
1383
|
E(f !== null, `No resize element found for id "${t}"`);
|
|
1384
1384
|
const p = s.shiftKey ? f > 0 ? f - 1 : a.length - 1 : f + 1 < a.length ? f + 1 : 0;
|
|
1385
1385
|
a[p].focus();
|
|
@@ -1419,7 +1419,7 @@ function Rr({
|
|
|
1419
1419
|
Z(() => {
|
|
1420
1420
|
D.current.onClick = s, D.current.onDragging = l, D.current.onPointerDown = f, D.current.onPointerUp = p;
|
|
1421
1421
|
});
|
|
1422
|
-
const x =
|
|
1422
|
+
const x = rt(Fe);
|
|
1423
1423
|
if (x === null)
|
|
1424
1424
|
throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");
|
|
1425
1425
|
const {
|
|
@@ -1427,21 +1427,21 @@ function Rr({
|
|
|
1427
1427
|
groupId: R,
|
|
1428
1428
|
registerResizeHandle: M,
|
|
1429
1429
|
startDragging: w,
|
|
1430
|
-
stopDragging:
|
|
1430
|
+
stopDragging: Y,
|
|
1431
1431
|
panelGroupElement: j
|
|
1432
|
-
} = x,
|
|
1433
|
-
state:
|
|
1432
|
+
} = x, V = st(i), [N, L] = ue("inactive"), [W, $] = ue(!1), [T, H] = ue(null), X = B({
|
|
1433
|
+
state: N
|
|
1434
1434
|
});
|
|
1435
1435
|
me(() => {
|
|
1436
|
-
|
|
1436
|
+
X.current.state = N;
|
|
1437
1437
|
}), Z(() => {
|
|
1438
1438
|
if (n)
|
|
1439
1439
|
H(null);
|
|
1440
1440
|
else {
|
|
1441
|
-
const se = M(
|
|
1441
|
+
const se = M(V);
|
|
1442
1442
|
H(() => se);
|
|
1443
1443
|
}
|
|
1444
|
-
}, [n,
|
|
1444
|
+
}, [n, V, M]);
|
|
1445
1445
|
const G = (y = r == null ? void 0 : r.coarse) !== null && y !== void 0 ? y : 15, re = (S = r == null ? void 0 : r.fine) !== null && S !== void 0 ? S : 5;
|
|
1446
1446
|
return Z(() => {
|
|
1447
1447
|
if (n || T == null)
|
|
@@ -1449,17 +1449,17 @@ function Rr({
|
|
|
1449
1449
|
const se = v.current;
|
|
1450
1450
|
E(se, "Element ref not attached");
|
|
1451
1451
|
let ae = !1;
|
|
1452
|
-
return dr(
|
|
1452
|
+
return dr(V, se, I, {
|
|
1453
1453
|
coarse: G,
|
|
1454
1454
|
fine: re
|
|
1455
1455
|
}, (z, C, d) => {
|
|
1456
1456
|
if (!C) {
|
|
1457
|
-
|
|
1457
|
+
L("inactive");
|
|
1458
1458
|
return;
|
|
1459
1459
|
}
|
|
1460
1460
|
switch (z) {
|
|
1461
1461
|
case "down": {
|
|
1462
|
-
|
|
1462
|
+
L("drag"), ae = !1, E(d, 'Expected event to be defined for "down" action'), w(V, d);
|
|
1463
1463
|
const {
|
|
1464
1464
|
onDragging: g,
|
|
1465
1465
|
onPointerDown: P
|
|
@@ -1470,25 +1470,25 @@ function Rr({
|
|
|
1470
1470
|
case "move": {
|
|
1471
1471
|
const {
|
|
1472
1472
|
state: g
|
|
1473
|
-
} =
|
|
1474
|
-
ae = !0, g !== "drag" &&
|
|
1473
|
+
} = X.current;
|
|
1474
|
+
ae = !0, g !== "drag" && L("hover"), E(d, 'Expected event to be defined for "move" action'), T(d);
|
|
1475
1475
|
break;
|
|
1476
1476
|
}
|
|
1477
1477
|
case "up": {
|
|
1478
|
-
|
|
1478
|
+
L("hover"), Y();
|
|
1479
1479
|
const {
|
|
1480
1480
|
onClick: g,
|
|
1481
1481
|
onDragging: P,
|
|
1482
|
-
onPointerUp:
|
|
1482
|
+
onPointerUp: _
|
|
1483
1483
|
} = D.current;
|
|
1484
|
-
P == null || P(!1),
|
|
1484
|
+
P == null || P(!1), _ == null || _(), ae || g == null || g();
|
|
1485
1485
|
break;
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
1488
|
});
|
|
1489
|
-
}, [G, I, n, re, M,
|
|
1489
|
+
}, [G, I, n, re, M, V, T, w, Y]), Ir({
|
|
1490
1490
|
disabled: n,
|
|
1491
|
-
handleId:
|
|
1491
|
+
handleId: V,
|
|
1492
1492
|
resizeHandler: T,
|
|
1493
1493
|
panelGroupElement: j
|
|
1494
1494
|
}), xe(h, {
|
|
@@ -1497,10 +1497,10 @@ function Rr({
|
|
|
1497
1497
|
className: t,
|
|
1498
1498
|
id: i,
|
|
1499
1499
|
onBlur: () => {
|
|
1500
|
-
|
|
1500
|
+
$(!1), o == null || o();
|
|
1501
1501
|
},
|
|
1502
1502
|
onFocus: () => {
|
|
1503
|
-
|
|
1503
|
+
$(!0), a == null || a();
|
|
1504
1504
|
},
|
|
1505
1505
|
ref: v,
|
|
1506
1506
|
role: "separator",
|
|
@@ -1516,17 +1516,17 @@ function Rr({
|
|
|
1516
1516
|
[K.groupDirection]: I,
|
|
1517
1517
|
[K.groupId]: R,
|
|
1518
1518
|
[K.resizeHandle]: "",
|
|
1519
|
-
[K.resizeHandleActive]:
|
|
1519
|
+
[K.resizeHandleActive]: N === "drag" ? "pointer" : W ? "keyboard" : void 0,
|
|
1520
1520
|
[K.resizeHandleEnabled]: !n,
|
|
1521
|
-
[K.resizeHandleId]:
|
|
1522
|
-
[K.resizeHandleState]:
|
|
1521
|
+
[K.resizeHandleId]: V,
|
|
1522
|
+
[K.resizeHandleState]: N
|
|
1523
1523
|
});
|
|
1524
1524
|
}
|
|
1525
1525
|
Rr.displayName = "PanelResizeHandle";
|
|
1526
|
-
function
|
|
1526
|
+
function Qt() {
|
|
1527
1527
|
var a, f;
|
|
1528
1528
|
const e = te((p) => p.card), t = te((p) => p.frame), n = U(
|
|
1529
|
-
() =>
|
|
1529
|
+
() => Xn(t, e),
|
|
1530
1530
|
[t, e]
|
|
1531
1531
|
), { manifest: r } = Pt(
|
|
1532
1532
|
((a = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : a.url) || ""
|
|
@@ -1541,7 +1541,7 @@ function jt() {
|
|
|
1541
1541
|
);
|
|
1542
1542
|
},
|
|
1543
1543
|
[r, (f = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : f.componentName]
|
|
1544
|
-
), o =
|
|
1544
|
+
), o = Nt(n, i), s = U(
|
|
1545
1545
|
() => Mt({
|
|
1546
1546
|
frame: t,
|
|
1547
1547
|
configCard: n,
|
|
@@ -1552,15 +1552,15 @@ function jt() {
|
|
|
1552
1552
|
const p = s.findIndex(
|
|
1553
1553
|
(u) => (u == null ? void 0 : u.id) === e.id
|
|
1554
1554
|
);
|
|
1555
|
-
return p < 0 ? -1 :
|
|
1555
|
+
return p < 0 ? -1 : Je(e, p);
|
|
1556
1556
|
}, [s, e]);
|
|
1557
|
-
return U(() => !n || o !== "multiple" || l < 0 ? e.type :
|
|
1557
|
+
return U(() => !n || o !== "multiple" || l < 0 ? e.type : ke(
|
|
1558
1558
|
e,
|
|
1559
1559
|
l,
|
|
1560
1560
|
i == null ? void 0 : i.slots
|
|
1561
1561
|
) ?? e.type, [n, o, l, e, i == null ? void 0 : i.slots]);
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function Jt({
|
|
1564
1564
|
storeValue: e,
|
|
1565
1565
|
defaultValue: t = "",
|
|
1566
1566
|
onStoreUpdate: n,
|
|
@@ -1594,7 +1594,7 @@ function Qt({
|
|
|
1594
1594
|
);
|
|
1595
1595
|
return { value: i, onChange: u, flush: p };
|
|
1596
1596
|
}
|
|
1597
|
-
function
|
|
1597
|
+
function Zt({
|
|
1598
1598
|
queryClient: e,
|
|
1599
1599
|
readQueryKey: t,
|
|
1600
1600
|
setRunSql: n
|
|
@@ -1605,7 +1605,7 @@ function Jt({
|
|
|
1605
1605
|
}
|
|
1606
1606
|
const Dr = 300;
|
|
1607
1607
|
function Ar({ className: e }, t) {
|
|
1608
|
-
const n = te((x) => x.card.sql), r = te((x) => x.sqlGen), i = te((x) => x.card), o =
|
|
1608
|
+
const n = te((x) => x.card.sql), r = te((x) => x.sqlGen), i = te((x) => x.card), o = Qt(), { setCardSql: s, setSqlGen: l, setRunSql: a } = wt(), f = U(() => o !== i.type ? { ...i, type: o } : i, [i, o]), { queryKey: p } = ot(f), u = Ct(), c = B(p);
|
|
1609
1609
|
c.current = p;
|
|
1610
1610
|
const h = B(r);
|
|
1611
1611
|
h.current = r;
|
|
@@ -1618,17 +1618,17 @@ function Ar({ className: e }, t) {
|
|
|
1618
1618
|
value: y,
|
|
1619
1619
|
onChange: S,
|
|
1620
1620
|
flush: v
|
|
1621
|
-
} =
|
|
1621
|
+
} = Jt({
|
|
1622
1622
|
storeValue: n,
|
|
1623
1623
|
defaultValue: "",
|
|
1624
1624
|
onStoreUpdate: m,
|
|
1625
1625
|
delay: Dr
|
|
1626
1626
|
});
|
|
1627
|
-
Z(() =>
|
|
1627
|
+
Z(() => At(v), [v]);
|
|
1628
1628
|
function D(x) {
|
|
1629
1629
|
S(x), Un(h.current) || l({});
|
|
1630
1630
|
}
|
|
1631
|
-
return /* @__PURE__ */
|
|
1631
|
+
return /* @__PURE__ */ A("div", { className: "relative h-full w-full", children: /* @__PURE__ */ A(
|
|
1632
1632
|
Et,
|
|
1633
1633
|
{
|
|
1634
1634
|
ref: t,
|
|
@@ -1641,7 +1641,7 @@ function Ar({ className: e }, t) {
|
|
|
1641
1641
|
placeholder: "Write your SQL here",
|
|
1642
1642
|
className: e,
|
|
1643
1643
|
onKeyDown: (x) => {
|
|
1644
|
-
x.key === "Enter" && x.shiftKey && (x.preventDefault(),
|
|
1644
|
+
x.key === "Enter" && x.shiftKey && (x.preventDefault(), Zt({
|
|
1645
1645
|
queryClient: u,
|
|
1646
1646
|
readQueryKey: () => c.current,
|
|
1647
1647
|
setRunSql: a
|
|
@@ -1650,36 +1650,36 @@ function Ar({ className: e }, t) {
|
|
|
1650
1650
|
}
|
|
1651
1651
|
) });
|
|
1652
1652
|
}
|
|
1653
|
-
const
|
|
1653
|
+
const Co = $e(Ar), Nr = 300, Mr = `# 'data' holds the SQL result.
|
|
1654
1654
|
# Set 'result' to a list of dicts to replace it, for example:
|
|
1655
1655
|
# import pandas as pd
|
|
1656
1656
|
# result = pd.DataFrame(data).to_dict('records')`;
|
|
1657
1657
|
function Lr({ className: e }, t) {
|
|
1658
|
-
const n = te((m) => m.card.python), r = te((m) => m.card), i =
|
|
1658
|
+
const n = te((m) => m.card.python), r = te((m) => m.card), i = Qt(), { setCardPython: o, setRunSql: s } = wt(), l = U(() => i !== r.type ? { ...r, type: i } : r, [r, i]), { queryKey: a } = ot(l), f = Ct(), p = B(a);
|
|
1659
1659
|
p.current = a;
|
|
1660
|
-
const { value: u, onChange: c, flush: h } =
|
|
1660
|
+
const { value: u, onChange: c, flush: h } = Jt({
|
|
1661
1661
|
storeValue: n,
|
|
1662
1662
|
onStoreUpdate: o,
|
|
1663
|
-
delay:
|
|
1663
|
+
delay: Nr
|
|
1664
1664
|
});
|
|
1665
|
-
return Z(() =>
|
|
1665
|
+
return Z(() => At(h), [h]), /* @__PURE__ */ A(
|
|
1666
1666
|
Et,
|
|
1667
1667
|
{
|
|
1668
1668
|
ref: t,
|
|
1669
1669
|
value: u ?? "",
|
|
1670
1670
|
onValueChange: c,
|
|
1671
1671
|
language: "python",
|
|
1672
|
-
placeholder:
|
|
1672
|
+
placeholder: Mr,
|
|
1673
1673
|
ariaLabel: "Python code",
|
|
1674
1674
|
embedded: !0,
|
|
1675
1675
|
hideLineNumbers: !0,
|
|
1676
1676
|
wrapLines: !0,
|
|
1677
|
-
className:
|
|
1677
|
+
className: we(
|
|
1678
1678
|
"[&_.code-editor-pre]:!pt-2 [&_.code-editor-textarea]:!pt-2",
|
|
1679
1679
|
e
|
|
1680
1680
|
),
|
|
1681
1681
|
onKeyDown: (m) => {
|
|
1682
|
-
m.key === "Enter" && m.shiftKey && (m.preventDefault(),
|
|
1682
|
+
m.key === "Enter" && m.shiftKey && (m.preventDefault(), Zt({
|
|
1683
1683
|
queryClient: f,
|
|
1684
1684
|
readQueryKey: () => p.current,
|
|
1685
1685
|
setRunSql: s
|
|
@@ -1688,11 +1688,11 @@ function Lr({ className: e }, t) {
|
|
|
1688
1688
|
}
|
|
1689
1689
|
);
|
|
1690
1690
|
}
|
|
1691
|
-
const
|
|
1691
|
+
const Eo = $e(Lr);
|
|
1692
1692
|
function _r({ card: e }) {
|
|
1693
1693
|
var se, ae, b, z, C;
|
|
1694
|
-
const t =
|
|
1695
|
-
() =>
|
|
1694
|
+
const t = Rn(), [n, r] = ue({}), { authToken: i } = Dn(), o = Wn(i == null ? void 0 : i.accessToken), { compiledAppearance: s } = Jn(), l = U(
|
|
1695
|
+
() => An(s),
|
|
1696
1696
|
[s]
|
|
1697
1697
|
), a = te((d) => d.frame), f = te(
|
|
1698
1698
|
(d) => d.inlineFilterValuesMap[e.id]
|
|
@@ -1707,7 +1707,7 @@ function _r({ card: e }) {
|
|
|
1707
1707
|
var g;
|
|
1708
1708
|
return d.name === ((g = c.customCardPreferences) == null ? void 0 : g.componentName);
|
|
1709
1709
|
}
|
|
1710
|
-
), S =
|
|
1710
|
+
), S = Nt(c, y) ?? "single", v = U(
|
|
1711
1711
|
() => Mt({
|
|
1712
1712
|
frame: a,
|
|
1713
1713
|
configCard: c,
|
|
@@ -1718,8 +1718,8 @@ function _r({ card: e }) {
|
|
|
1718
1718
|
const d = v.findIndex(
|
|
1719
1719
|
(g) => (g == null ? void 0 : g.id) === e.id
|
|
1720
1720
|
);
|
|
1721
|
-
return d < 0 ? -1 :
|
|
1722
|
-
}, [v, e]), x = U(() => S !== "multiple" || D < 0 ? e.type :
|
|
1721
|
+
return d < 0 ? -1 : Je(e, d);
|
|
1722
|
+
}, [v, e]), x = U(() => S !== "multiple" || D < 0 ? e.type : ke(
|
|
1723
1723
|
e,
|
|
1724
1724
|
D,
|
|
1725
1725
|
y == null ? void 0 : y.slots
|
|
@@ -1731,46 +1731,46 @@ function _r({ card: e }) {
|
|
|
1731
1731
|
python: "",
|
|
1732
1732
|
config: void 0,
|
|
1733
1733
|
queryConfig: void 0
|
|
1734
|
-
} : x !== e.type ? { ...e, type: x } : e, [e, x, S]), { data: R, effectiveCardConfig: M } =
|
|
1734
|
+
} : x !== e.type ? { ...e, type: x } : e, [e, x, S]), { data: R, effectiveCardConfig: M } = ot(I), w = Nn(), Y = Ue((d) => d.dashboard.filters), j = Ue((d) => d.filterValues), V = Ue((d) => d.selectedSheetId), N = U(
|
|
1735
1735
|
() => Mn({
|
|
1736
1736
|
card: e,
|
|
1737
|
-
sheetId:
|
|
1737
|
+
sheetId: V || "",
|
|
1738
1738
|
inlineFilterValues: f,
|
|
1739
1739
|
setInlineFilterValue: (d) => p(e.id, d),
|
|
1740
1740
|
removeInlineFilterValue: (d) => u(e.id, d)
|
|
1741
1741
|
}),
|
|
1742
1742
|
[
|
|
1743
1743
|
e,
|
|
1744
|
-
|
|
1744
|
+
V,
|
|
1745
1745
|
f,
|
|
1746
1746
|
p,
|
|
1747
1747
|
u
|
|
1748
1748
|
]
|
|
1749
|
-
), { cardFilters:
|
|
1750
|
-
() =>
|
|
1749
|
+
), { cardFilters: L, cardFilterValues: W } = U(
|
|
1750
|
+
() => Yn({
|
|
1751
1751
|
card: e,
|
|
1752
1752
|
transientContexts: w,
|
|
1753
|
-
filters:
|
|
1753
|
+
filters: Y,
|
|
1754
1754
|
filterValues: j,
|
|
1755
|
-
selectedSheetId:
|
|
1755
|
+
selectedSheetId: V
|
|
1756
1756
|
}),
|
|
1757
1757
|
[
|
|
1758
1758
|
e,
|
|
1759
1759
|
w,
|
|
1760
|
-
|
|
1760
|
+
Y,
|
|
1761
1761
|
j,
|
|
1762
|
-
|
|
1762
|
+
V
|
|
1763
1763
|
]
|
|
1764
|
-
),
|
|
1764
|
+
), $ = O(
|
|
1765
1765
|
(d, g) => {
|
|
1766
1766
|
const P = jn(g);
|
|
1767
|
-
r((
|
|
1768
|
-
...
|
|
1767
|
+
r((_) => ({
|
|
1768
|
+
..._,
|
|
1769
1769
|
[d]: P
|
|
1770
1770
|
}));
|
|
1771
1771
|
},
|
|
1772
1772
|
[]
|
|
1773
|
-
), T = (b = c.customCardPreferences) == null ? void 0 : b.componentName, H = T ? h(T) : null,
|
|
1773
|
+
), T = (b = c.customCardPreferences) == null ? void 0 : b.componentName, H = T ? h(T) : null, X = Ln(
|
|
1774
1774
|
(z = c.customCardPreferences) == null ? void 0 : z.settings,
|
|
1775
1775
|
c
|
|
1776
1776
|
), G = U(
|
|
@@ -1778,7 +1778,7 @@ function _r({ card: e }) {
|
|
|
1778
1778
|
[v]
|
|
1779
1779
|
), re = U(
|
|
1780
1780
|
() => G.map(
|
|
1781
|
-
(d, g) =>
|
|
1781
|
+
(d, g) => ke(
|
|
1782
1782
|
d,
|
|
1783
1783
|
g,
|
|
1784
1784
|
y == null ? void 0 : y.slots
|
|
@@ -1786,8 +1786,8 @@ function _r({ card: e }) {
|
|
|
1786
1786
|
),
|
|
1787
1787
|
[G, y == null ? void 0 : y.slots]
|
|
1788
1788
|
), he = U(
|
|
1789
|
-
() =>
|
|
1790
|
-
S === "multiple" ?
|
|
1789
|
+
() => _n(
|
|
1790
|
+
S === "multiple" ? kn({
|
|
1791
1791
|
slotOrderedCards: G,
|
|
1792
1792
|
multiInputData: n,
|
|
1793
1793
|
valueFormatPreferences: t
|
|
@@ -1812,71 +1812,71 @@ function _r({ card: e }) {
|
|
|
1812
1812
|
t
|
|
1813
1813
|
]
|
|
1814
1814
|
);
|
|
1815
|
-
return T ? /* @__PURE__ */
|
|
1816
|
-
|
|
1815
|
+
return T ? /* @__PURE__ */ A("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ Ae(
|
|
1816
|
+
Cn,
|
|
1817
1817
|
{
|
|
1818
|
-
fallback: /* @__PURE__ */
|
|
1818
|
+
fallback: /* @__PURE__ */ A(ft, {}),
|
|
1819
1819
|
children: [
|
|
1820
|
-
H && S === "single" && /* @__PURE__ */
|
|
1820
|
+
H && S === "single" && /* @__PURE__ */ A(
|
|
1821
1821
|
H,
|
|
1822
1822
|
{
|
|
1823
1823
|
editing: !0,
|
|
1824
1824
|
params: o,
|
|
1825
1825
|
theme: l,
|
|
1826
|
-
settings:
|
|
1827
|
-
cardMetadata:
|
|
1826
|
+
settings: X,
|
|
1827
|
+
cardMetadata: Tn({
|
|
1828
1828
|
card: e,
|
|
1829
1829
|
dataMetadata: R == null ? void 0 : R.metadata
|
|
1830
1830
|
}),
|
|
1831
|
-
onDataChange:
|
|
1831
|
+
onDataChange: $,
|
|
1832
1832
|
data: (R == null ? void 0 : R.records) || [],
|
|
1833
1833
|
columns: (R == null ? void 0 : R.columns) || [],
|
|
1834
1834
|
formatTemporalBucketValue: he,
|
|
1835
|
-
filters:
|
|
1835
|
+
filters: L,
|
|
1836
1836
|
filterValues: [
|
|
1837
1837
|
...W || [],
|
|
1838
1838
|
...f || []
|
|
1839
1839
|
],
|
|
1840
|
-
inlineFilters:
|
|
1840
|
+
inlineFilters: N
|
|
1841
1841
|
}
|
|
1842
1842
|
),
|
|
1843
|
-
H && S === "multiple" && /* @__PURE__ */
|
|
1843
|
+
H && S === "multiple" && /* @__PURE__ */ Ae(ft, { children: [
|
|
1844
1844
|
v.map((d, g) => {
|
|
1845
1845
|
if (!d) return null;
|
|
1846
|
-
const P =
|
|
1846
|
+
const P = Je(d, g), _ = ke(
|
|
1847
1847
|
d,
|
|
1848
1848
|
P,
|
|
1849
1849
|
y == null ? void 0 : y.slots
|
|
1850
1850
|
);
|
|
1851
|
-
return /* @__PURE__ */
|
|
1852
|
-
|
|
1851
|
+
return /* @__PURE__ */ A(
|
|
1852
|
+
Hn,
|
|
1853
1853
|
{
|
|
1854
|
-
onDataChange:
|
|
1854
|
+
onDataChange: $,
|
|
1855
1855
|
card: d,
|
|
1856
|
-
effectiveCardType:
|
|
1856
|
+
effectiveCardType: _
|
|
1857
1857
|
},
|
|
1858
1858
|
`${d.id}-${P}`
|
|
1859
1859
|
);
|
|
1860
1860
|
}),
|
|
1861
|
-
/* @__PURE__ */
|
|
1861
|
+
/* @__PURE__ */ A("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ A(
|
|
1862
1862
|
H,
|
|
1863
1863
|
{
|
|
1864
1864
|
editing: !0,
|
|
1865
|
-
onDataChange:
|
|
1866
|
-
...
|
|
1865
|
+
onDataChange: $,
|
|
1866
|
+
...Vn({
|
|
1867
1867
|
configCard: c,
|
|
1868
1868
|
slotOrderedCards: G,
|
|
1869
1869
|
slotTypes: re,
|
|
1870
1870
|
multiInputData: n,
|
|
1871
1871
|
params: o,
|
|
1872
1872
|
theme: l,
|
|
1873
|
-
chartSettings:
|
|
1874
|
-
filters:
|
|
1873
|
+
chartSettings: X,
|
|
1874
|
+
filters: L,
|
|
1875
1875
|
filterValues: [
|
|
1876
1876
|
...W || [],
|
|
1877
1877
|
...f || []
|
|
1878
1878
|
],
|
|
1879
|
-
inlineFilters:
|
|
1879
|
+
inlineFilters: N,
|
|
1880
1880
|
formatTemporalBucketValue: he
|
|
1881
1881
|
})
|
|
1882
1882
|
}
|
|
@@ -1887,15 +1887,15 @@ function _r({ card: e }) {
|
|
|
1887
1887
|
(C = c.customCardPreferences) == null ? void 0 : C.componentName
|
|
1888
1888
|
) }) : null;
|
|
1889
1889
|
}
|
|
1890
|
-
const
|
|
1891
|
-
var
|
|
1890
|
+
const Io = wn(_r);
|
|
1891
|
+
var en = "Toggle", tn = k.forwardRef((e, t) => {
|
|
1892
1892
|
const { pressed: n, defaultPressed: r, onPressedChange: i, ...o } = e, [s, l] = It({
|
|
1893
1893
|
prop: n,
|
|
1894
1894
|
onChange: i,
|
|
1895
1895
|
defaultProp: r ?? !1,
|
|
1896
|
-
caller:
|
|
1896
|
+
caller: en
|
|
1897
1897
|
});
|
|
1898
|
-
return /* @__PURE__ */
|
|
1898
|
+
return /* @__PURE__ */ A(
|
|
1899
1899
|
ze.button,
|
|
1900
1900
|
{
|
|
1901
1901
|
type: "button",
|
|
@@ -1910,9 +1910,9 @@ var Zt = "Toggle", en = k.forwardRef((e, t) => {
|
|
|
1910
1910
|
}
|
|
1911
1911
|
);
|
|
1912
1912
|
});
|
|
1913
|
-
|
|
1914
|
-
var
|
|
1915
|
-
const kr =
|
|
1913
|
+
tn.displayName = en;
|
|
1914
|
+
var nn = tn;
|
|
1915
|
+
const kr = Rt(
|
|
1916
1916
|
"inline-flex items-center justify-center rounded-control text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
1917
1917
|
{
|
|
1918
1918
|
variants: {
|
|
@@ -1931,23 +1931,64 @@ const kr = Vn(
|
|
|
1931
1931
|
size: "default"
|
|
1932
1932
|
}
|
|
1933
1933
|
}
|
|
1934
|
-
), Tr = k.forwardRef(({ className: e, variant: t, size: n, ...r }, i) => /* @__PURE__ */
|
|
1935
|
-
|
|
1934
|
+
), Tr = k.forwardRef(({ className: e, variant: t, size: n, ...r }, i) => /* @__PURE__ */ A(
|
|
1935
|
+
nn,
|
|
1936
1936
|
{
|
|
1937
1937
|
ref: i,
|
|
1938
|
-
className:
|
|
1938
|
+
className: we(kr({ variant: t, size: n, className: e })),
|
|
1939
1939
|
...r
|
|
1940
1940
|
}
|
|
1941
1941
|
));
|
|
1942
|
-
Tr.displayName =
|
|
1943
|
-
|
|
1942
|
+
Tr.displayName = nn.displayName;
|
|
1943
|
+
const Hr = Rt(
|
|
1944
|
+
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
1945
|
+
{
|
|
1946
|
+
variants: {
|
|
1947
|
+
variant: {
|
|
1948
|
+
default: "bg-background text-foreground",
|
|
1949
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
1950
|
+
}
|
|
1951
|
+
},
|
|
1952
|
+
defaultVariants: {
|
|
1953
|
+
variant: "default"
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
), Vr = k.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ A(
|
|
1957
|
+
"div",
|
|
1958
|
+
{
|
|
1959
|
+
ref: r,
|
|
1960
|
+
role: "alert",
|
|
1961
|
+
className: we(Hr({ variant: t }), e),
|
|
1962
|
+
...n
|
|
1963
|
+
}
|
|
1964
|
+
));
|
|
1965
|
+
Vr.displayName = "Alert";
|
|
1966
|
+
const $r = k.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ A(
|
|
1967
|
+
"h5",
|
|
1968
|
+
{
|
|
1969
|
+
ref: n,
|
|
1970
|
+
className: we("mb-1 font-medium leading-none tracking-tight", e),
|
|
1971
|
+
...t
|
|
1972
|
+
}
|
|
1973
|
+
));
|
|
1974
|
+
$r.displayName = "AlertTitle";
|
|
1975
|
+
const Fr = k.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ A(
|
|
1976
|
+
"div",
|
|
1977
|
+
{
|
|
1978
|
+
ref: n,
|
|
1979
|
+
className: we("text-sm [&_p]:leading-relaxed", e),
|
|
1980
|
+
...t
|
|
1981
|
+
}
|
|
1982
|
+
));
|
|
1983
|
+
Fr.displayName = "AlertDescription";
|
|
1984
|
+
var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], sn = {
|
|
1944
1985
|
"from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
1945
1986
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
1946
1987
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
1947
1988
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
1948
|
-
},
|
|
1949
|
-
|
|
1950
|
-
]), [
|
|
1989
|
+
}, Ce = "Slider", [et, Kr, Br] = Kn(Ce), [ln] = Fn(Ce, [
|
|
1990
|
+
Br
|
|
1991
|
+
]), [qr, Oe] = ln(Ce), an = k.forwardRef(
|
|
1951
1992
|
(e, t) => {
|
|
1952
1993
|
const {
|
|
1953
1994
|
name: n,
|
|
@@ -1966,39 +2007,39 @@ var nn = ["PageUp", "PageDown"], rn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
1966
2007
|
inverted: h = !1,
|
|
1967
2008
|
form: m,
|
|
1968
2009
|
...y
|
|
1969
|
-
} = e, S = k.useRef(/* @__PURE__ */ new Set()), v = k.useRef(0), x = s === "horizontal" ?
|
|
2010
|
+
} = e, S = k.useRef(/* @__PURE__ */ new Set()), v = k.useRef(0), x = s === "horizontal" ? Or : Gr, [I = [], R] = It({
|
|
1970
2011
|
prop: p,
|
|
1971
2012
|
defaultProp: f,
|
|
1972
|
-
onChange: (
|
|
2013
|
+
onChange: (N) => {
|
|
1973
2014
|
var W;
|
|
1974
|
-
(W = [...S.current][v.current]) == null || W.focus(), u(
|
|
2015
|
+
(W = [...S.current][v.current]) == null || W.focus(), u(N);
|
|
1975
2016
|
}
|
|
1976
2017
|
}), M = k.useRef(I);
|
|
1977
|
-
function w(
|
|
1978
|
-
const
|
|
1979
|
-
|
|
2018
|
+
function w(N) {
|
|
2019
|
+
const L = jr(I, N);
|
|
2020
|
+
V(N, L);
|
|
1980
2021
|
}
|
|
1981
|
-
function
|
|
1982
|
-
|
|
2022
|
+
function Y(N) {
|
|
2023
|
+
V(N, v.current);
|
|
1983
2024
|
}
|
|
1984
2025
|
function j() {
|
|
1985
|
-
const
|
|
1986
|
-
I[v.current] !==
|
|
2026
|
+
const N = M.current[v.current];
|
|
2027
|
+
I[v.current] !== N && c(I);
|
|
1987
2028
|
}
|
|
1988
|
-
function
|
|
1989
|
-
const
|
|
1990
|
-
R((
|
|
1991
|
-
const G =
|
|
1992
|
-
if (
|
|
2029
|
+
function V(N, L, { commit: W } = { commit: !1 }) {
|
|
2030
|
+
const $ = eo(o), T = to(Math.round((N - r) / o) * o + r, $), H = Dt(T, [r, i]);
|
|
2031
|
+
R((X = []) => {
|
|
2032
|
+
const G = Yr(X, H, L);
|
|
2033
|
+
if (Zr(G, a * o)) {
|
|
1993
2034
|
v.current = G.indexOf(H);
|
|
1994
|
-
const re = String(G) !== String(
|
|
1995
|
-
return re && W && c(G), re ? G :
|
|
2035
|
+
const re = String(G) !== String(X);
|
|
2036
|
+
return re && W && c(G), re ? G : X;
|
|
1996
2037
|
} else
|
|
1997
|
-
return
|
|
2038
|
+
return X;
|
|
1998
2039
|
});
|
|
1999
2040
|
}
|
|
2000
|
-
return /* @__PURE__ */
|
|
2001
|
-
|
|
2041
|
+
return /* @__PURE__ */ A(
|
|
2042
|
+
qr,
|
|
2002
2043
|
{
|
|
2003
2044
|
scope: e.__scopeSlider,
|
|
2004
2045
|
name: n,
|
|
@@ -2010,7 +2051,7 @@ var nn = ["PageUp", "PageDown"], rn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2010
2051
|
values: I,
|
|
2011
2052
|
orientation: s,
|
|
2012
2053
|
form: m,
|
|
2013
|
-
children: /* @__PURE__ */
|
|
2054
|
+
children: /* @__PURE__ */ A(et.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ A(et.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ A(
|
|
2014
2055
|
x,
|
|
2015
2056
|
{
|
|
2016
2057
|
"aria-disabled": l,
|
|
@@ -2024,14 +2065,14 @@ var nn = ["PageUp", "PageDown"], rn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2024
2065
|
max: i,
|
|
2025
2066
|
inverted: h,
|
|
2026
2067
|
onSlideStart: l ? void 0 : w,
|
|
2027
|
-
onSlideMove: l ? void 0 :
|
|
2068
|
+
onSlideMove: l ? void 0 : Y,
|
|
2028
2069
|
onSlideEnd: l ? void 0 : j,
|
|
2029
|
-
onHomeKeyDown: () => !l &&
|
|
2030
|
-
onEndKeyDown: () => !l &&
|
|
2031
|
-
onStepKeyDown: ({ event:
|
|
2070
|
+
onHomeKeyDown: () => !l && V(r, 0, { commit: !0 }),
|
|
2071
|
+
onEndKeyDown: () => !l && V(i, I.length - 1, { commit: !0 }),
|
|
2072
|
+
onStepKeyDown: ({ event: N, direction: L }) => {
|
|
2032
2073
|
if (!l) {
|
|
2033
|
-
const T =
|
|
2034
|
-
|
|
2074
|
+
const T = rn.includes(N.key) || N.shiftKey && on.includes(N.key) ? 10 : 1, H = v.current, X = I[H], G = o * T * L;
|
|
2075
|
+
V(X + G, H, { commit: !0 });
|
|
2035
2076
|
}
|
|
2036
2077
|
}
|
|
2037
2078
|
}
|
|
@@ -2040,13 +2081,13 @@ var nn = ["PageUp", "PageDown"], rn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2040
2081
|
);
|
|
2041
2082
|
}
|
|
2042
2083
|
);
|
|
2043
|
-
|
|
2044
|
-
var [
|
|
2084
|
+
an.displayName = Ce;
|
|
2085
|
+
var [cn, un] = ln(Ce, {
|
|
2045
2086
|
startEdge: "left",
|
|
2046
2087
|
endEdge: "right",
|
|
2047
2088
|
size: "width",
|
|
2048
2089
|
direction: 1
|
|
2049
|
-
}),
|
|
2090
|
+
}), Or = k.forwardRef(
|
|
2050
2091
|
(e, t) => {
|
|
2051
2092
|
const {
|
|
2052
2093
|
min: n,
|
|
@@ -2063,16 +2104,16 @@ var [an, cn] = sn(we, {
|
|
|
2063
2104
|
const I = m.current || u.getBoundingClientRect(), R = [0, I.width], w = ct(R, v ? [n, r] : [r, n]);
|
|
2064
2105
|
return m.current = I, w(x - I.left);
|
|
2065
2106
|
}
|
|
2066
|
-
return /* @__PURE__ */
|
|
2067
|
-
|
|
2107
|
+
return /* @__PURE__ */ A(
|
|
2108
|
+
cn,
|
|
2068
2109
|
{
|
|
2069
2110
|
scope: e.__scopeSlider,
|
|
2070
2111
|
startEdge: v ? "left" : "right",
|
|
2071
2112
|
endEdge: v ? "right" : "left",
|
|
2072
2113
|
direction: v ? 1 : -1,
|
|
2073
2114
|
size: "width",
|
|
2074
|
-
children: /* @__PURE__ */
|
|
2075
|
-
|
|
2115
|
+
children: /* @__PURE__ */ A(
|
|
2116
|
+
dn,
|
|
2076
2117
|
{
|
|
2077
2118
|
dir: y,
|
|
2078
2119
|
"data-orientation": "horizontal",
|
|
@@ -2094,7 +2135,7 @@ var [an, cn] = sn(we, {
|
|
|
2094
2135
|
m.current = void 0, a == null || a();
|
|
2095
2136
|
},
|
|
2096
2137
|
onStepKeyDown: (x) => {
|
|
2097
|
-
const R =
|
|
2138
|
+
const R = sn[v ? "from-left" : "from-right"].includes(x.key);
|
|
2098
2139
|
f == null || f({ event: x, direction: R ? -1 : 1 });
|
|
2099
2140
|
}
|
|
2100
2141
|
}
|
|
@@ -2102,7 +2143,7 @@ var [an, cn] = sn(we, {
|
|
|
2102
2143
|
}
|
|
2103
2144
|
);
|
|
2104
2145
|
}
|
|
2105
|
-
),
|
|
2146
|
+
), Gr = k.forwardRef(
|
|
2106
2147
|
(e, t) => {
|
|
2107
2148
|
const {
|
|
2108
2149
|
min: n,
|
|
@@ -2118,16 +2159,16 @@ var [an, cn] = sn(we, {
|
|
|
2118
2159
|
const S = c.current || p.current.getBoundingClientRect(), v = [0, S.height], x = ct(v, h ? [r, n] : [n, r]);
|
|
2119
2160
|
return c.current = S, x(y - S.top);
|
|
2120
2161
|
}
|
|
2121
|
-
return /* @__PURE__ */
|
|
2122
|
-
|
|
2162
|
+
return /* @__PURE__ */ A(
|
|
2163
|
+
cn,
|
|
2123
2164
|
{
|
|
2124
2165
|
scope: e.__scopeSlider,
|
|
2125
2166
|
startEdge: h ? "bottom" : "top",
|
|
2126
2167
|
endEdge: h ? "top" : "bottom",
|
|
2127
2168
|
size: "height",
|
|
2128
2169
|
direction: h ? 1 : -1,
|
|
2129
|
-
children: /* @__PURE__ */
|
|
2130
|
-
|
|
2170
|
+
children: /* @__PURE__ */ A(
|
|
2171
|
+
dn,
|
|
2131
2172
|
{
|
|
2132
2173
|
"data-orientation": "vertical",
|
|
2133
2174
|
...f,
|
|
@@ -2148,7 +2189,7 @@ var [an, cn] = sn(we, {
|
|
|
2148
2189
|
c.current = void 0, l == null || l();
|
|
2149
2190
|
},
|
|
2150
2191
|
onStepKeyDown: (y) => {
|
|
2151
|
-
const v =
|
|
2192
|
+
const v = sn[h ? "from-bottom" : "from-top"].includes(y.key);
|
|
2152
2193
|
a == null || a({ event: y, direction: v ? -1 : 1 });
|
|
2153
2194
|
}
|
|
2154
2195
|
}
|
|
@@ -2156,7 +2197,7 @@ var [an, cn] = sn(we, {
|
|
|
2156
2197
|
}
|
|
2157
2198
|
);
|
|
2158
2199
|
}
|
|
2159
|
-
),
|
|
2200
|
+
), dn = k.forwardRef(
|
|
2160
2201
|
(e, t) => {
|
|
2161
2202
|
const {
|
|
2162
2203
|
__scopeSlider: n,
|
|
@@ -2167,14 +2208,14 @@ var [an, cn] = sn(we, {
|
|
|
2167
2208
|
onEndKeyDown: l,
|
|
2168
2209
|
onStepKeyDown: a,
|
|
2169
2210
|
...f
|
|
2170
|
-
} = e, p =
|
|
2171
|
-
return /* @__PURE__ */
|
|
2211
|
+
} = e, p = Oe(Ce, n);
|
|
2212
|
+
return /* @__PURE__ */ A(
|
|
2172
2213
|
ze.span,
|
|
2173
2214
|
{
|
|
2174
2215
|
...f,
|
|
2175
2216
|
ref: t,
|
|
2176
2217
|
onKeyDown: pe(e.onKeyDown, (u) => {
|
|
2177
|
-
u.key === "Home" ? (s(u), u.preventDefault()) : u.key === "End" ? (l(u), u.preventDefault()) :
|
|
2218
|
+
u.key === "Home" ? (s(u), u.preventDefault()) : u.key === "End" ? (l(u), u.preventDefault()) : rn.concat(on).includes(u.key) && (a(u), u.preventDefault());
|
|
2178
2219
|
}),
|
|
2179
2220
|
onPointerDown: pe(e.onPointerDown, (u) => {
|
|
2180
2221
|
const c = u.target;
|
|
@@ -2190,10 +2231,10 @@ var [an, cn] = sn(we, {
|
|
|
2190
2231
|
}
|
|
2191
2232
|
);
|
|
2192
2233
|
}
|
|
2193
|
-
),
|
|
2234
|
+
), fn = "SliderTrack", pn = k.forwardRef(
|
|
2194
2235
|
(e, t) => {
|
|
2195
|
-
const { __scopeSlider: n, ...r } = e, i =
|
|
2196
|
-
return /* @__PURE__ */
|
|
2236
|
+
const { __scopeSlider: n, ...r } = e, i = Oe(fn, n);
|
|
2237
|
+
return /* @__PURE__ */ A(
|
|
2197
2238
|
ze.span,
|
|
2198
2239
|
{
|
|
2199
2240
|
"data-disabled": i.disabled ? "" : void 0,
|
|
@@ -2204,13 +2245,13 @@ var [an, cn] = sn(we, {
|
|
|
2204
2245
|
);
|
|
2205
2246
|
}
|
|
2206
2247
|
);
|
|
2207
|
-
|
|
2208
|
-
var
|
|
2248
|
+
pn.displayName = fn;
|
|
2249
|
+
var tt = "SliderRange", mn = k.forwardRef(
|
|
2209
2250
|
(e, t) => {
|
|
2210
|
-
const { __scopeSlider: n, ...r } = e, i =
|
|
2211
|
-
(c) =>
|
|
2251
|
+
const { __scopeSlider: n, ...r } = e, i = Oe(tt, n), o = un(tt, n), s = k.useRef(null), l = Pe(t, s), a = i.values.length, f = i.values.map(
|
|
2252
|
+
(c) => yn(c, i.min, i.max)
|
|
2212
2253
|
), p = a > 1 ? Math.min(...f) : 0, u = 100 - Math.max(...f);
|
|
2213
|
-
return /* @__PURE__ */
|
|
2254
|
+
return /* @__PURE__ */ A(
|
|
2214
2255
|
ze.span,
|
|
2215
2256
|
{
|
|
2216
2257
|
"data-orientation": i.orientation,
|
|
@@ -2226,24 +2267,24 @@ var et = "SliderRange", pn = k.forwardRef(
|
|
|
2226
2267
|
);
|
|
2227
2268
|
}
|
|
2228
2269
|
);
|
|
2229
|
-
|
|
2230
|
-
var
|
|
2270
|
+
mn.displayName = tt;
|
|
2271
|
+
var nt = "SliderThumb", gn = k.forwardRef(
|
|
2231
2272
|
(e, t) => {
|
|
2232
|
-
const n =
|
|
2273
|
+
const n = Kr(e.__scopeSlider), [r, i] = k.useState(null), o = Pe(t, (l) => i(l)), s = k.useMemo(
|
|
2233
2274
|
() => r ? n().findIndex((l) => l.ref.current === r) : -1,
|
|
2234
2275
|
[n, r]
|
|
2235
2276
|
);
|
|
2236
|
-
return /* @__PURE__ */
|
|
2277
|
+
return /* @__PURE__ */ A(Ur, { ...e, ref: o, index: s });
|
|
2237
2278
|
}
|
|
2238
|
-
),
|
|
2279
|
+
), Ur = k.forwardRef(
|
|
2239
2280
|
(e, t) => {
|
|
2240
|
-
const { __scopeSlider: n, index: r, name: i, ...o } = e, s =
|
|
2281
|
+
const { __scopeSlider: n, index: r, name: i, ...o } = e, s = Oe(nt, n), l = un(nt, n), [a, f] = k.useState(null), p = Pe(t, (D) => f(D)), u = a ? s.form || !!a.closest("form") : !0, c = qn(a), h = s.values[r], m = h === void 0 ? 0 : yn(h, s.min, s.max), y = Xr(r, s.values.length), S = c == null ? void 0 : c[l.size], v = S ? Qr(S, m, l.direction) : 0;
|
|
2241
2282
|
return k.useEffect(() => {
|
|
2242
2283
|
if (a)
|
|
2243
2284
|
return s.thumbs.add(a), () => {
|
|
2244
2285
|
s.thumbs.delete(a);
|
|
2245
2286
|
};
|
|
2246
|
-
}, [a, s.thumbs]), /* @__PURE__ */
|
|
2287
|
+
}, [a, s.thumbs]), /* @__PURE__ */ Ae(
|
|
2247
2288
|
"span",
|
|
2248
2289
|
{
|
|
2249
2290
|
style: {
|
|
@@ -2252,7 +2293,7 @@ var tt = "SliderThumb", mn = k.forwardRef(
|
|
|
2252
2293
|
[l.startEdge]: `calc(${m}% + ${v}px)`
|
|
2253
2294
|
},
|
|
2254
2295
|
children: [
|
|
2255
|
-
/* @__PURE__ */
|
|
2296
|
+
/* @__PURE__ */ A(et.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ A(
|
|
2256
2297
|
ze.span,
|
|
2257
2298
|
{
|
|
2258
2299
|
role: "slider",
|
|
@@ -2272,8 +2313,8 @@ var tt = "SliderThumb", mn = k.forwardRef(
|
|
|
2272
2313
|
})
|
|
2273
2314
|
}
|
|
2274
2315
|
) }),
|
|
2275
|
-
u && /* @__PURE__ */
|
|
2276
|
-
|
|
2316
|
+
u && /* @__PURE__ */ A(
|
|
2317
|
+
hn,
|
|
2277
2318
|
{
|
|
2278
2319
|
name: i ?? (s.name ? s.name + (s.values.length > 1 ? "[]" : "") : void 0),
|
|
2279
2320
|
form: s.form,
|
|
@@ -2286,8 +2327,8 @@ var tt = "SliderThumb", mn = k.forwardRef(
|
|
|
2286
2327
|
);
|
|
2287
2328
|
}
|
|
2288
2329
|
);
|
|
2289
|
-
|
|
2290
|
-
var
|
|
2330
|
+
gn.displayName = nt;
|
|
2331
|
+
var Wr = "RadioBubbleInput", hn = k.forwardRef(
|
|
2291
2332
|
({ __scopeSlider: e, value: t, ...n }, r) => {
|
|
2292
2333
|
const i = k.useRef(null), o = Pe(i, r), s = On(t);
|
|
2293
2334
|
return k.useEffect(() => {
|
|
@@ -2298,7 +2339,7 @@ var qr = "RadioBubbleInput", gn = k.forwardRef(
|
|
|
2298
2339
|
const u = new Event("input", { bubbles: !0 });
|
|
2299
2340
|
p.call(l, t), l.dispatchEvent(u);
|
|
2300
2341
|
}
|
|
2301
|
-
}, [s, t]), /* @__PURE__ */
|
|
2342
|
+
}, [s, t]), /* @__PURE__ */ A(
|
|
2302
2343
|
ze.input,
|
|
2303
2344
|
{
|
|
2304
2345
|
style: { display: "none" },
|
|
@@ -2309,33 +2350,33 @@ var qr = "RadioBubbleInput", gn = k.forwardRef(
|
|
|
2309
2350
|
);
|
|
2310
2351
|
}
|
|
2311
2352
|
);
|
|
2312
|
-
|
|
2313
|
-
function
|
|
2353
|
+
hn.displayName = Wr;
|
|
2354
|
+
function Yr(e = [], t, n) {
|
|
2314
2355
|
const r = [...e];
|
|
2315
2356
|
return r[n] = t, r.sort((i, o) => i - o);
|
|
2316
2357
|
}
|
|
2317
|
-
function
|
|
2358
|
+
function yn(e, t, n) {
|
|
2318
2359
|
const o = 100 / (n - t) * (e - t);
|
|
2319
|
-
return
|
|
2360
|
+
return Dt(o, [0, 100]);
|
|
2320
2361
|
}
|
|
2321
|
-
function
|
|
2362
|
+
function Xr(e, t) {
|
|
2322
2363
|
return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
|
|
2323
2364
|
}
|
|
2324
|
-
function
|
|
2365
|
+
function jr(e, t) {
|
|
2325
2366
|
if (e.length === 1) return 0;
|
|
2326
2367
|
const n = e.map((i) => Math.abs(i - t)), r = Math.min(...n);
|
|
2327
2368
|
return n.indexOf(r);
|
|
2328
2369
|
}
|
|
2329
|
-
function
|
|
2370
|
+
function Qr(e, t, n) {
|
|
2330
2371
|
const r = e / 2, o = ct([0, 50], [0, r]);
|
|
2331
2372
|
return (r - o(t) * n) * n;
|
|
2332
2373
|
}
|
|
2333
|
-
function
|
|
2374
|
+
function Jr(e) {
|
|
2334
2375
|
return e.slice(0, -1).map((t, n) => e[n + 1] - t);
|
|
2335
2376
|
}
|
|
2336
|
-
function
|
|
2377
|
+
function Zr(e, t) {
|
|
2337
2378
|
if (t > 0) {
|
|
2338
|
-
const n =
|
|
2379
|
+
const n = Jr(e);
|
|
2339
2380
|
return Math.min(...n) >= t;
|
|
2340
2381
|
}
|
|
2341
2382
|
return !0;
|
|
@@ -2347,42 +2388,42 @@ function ct(e, t) {
|
|
|
2347
2388
|
return t[0] + r * (n - e[0]);
|
|
2348
2389
|
};
|
|
2349
2390
|
}
|
|
2350
|
-
function
|
|
2391
|
+
function eo(e) {
|
|
2351
2392
|
return (String(e).split(".")[1] || "").length;
|
|
2352
2393
|
}
|
|
2353
|
-
function
|
|
2394
|
+
function to(e, t) {
|
|
2354
2395
|
const n = Math.pow(10, t);
|
|
2355
2396
|
return Math.round(e * n) / n;
|
|
2356
2397
|
}
|
|
2357
|
-
var
|
|
2358
|
-
const
|
|
2359
|
-
|
|
2398
|
+
var vn = an, no = pn, ro = mn, oo = gn;
|
|
2399
|
+
const io = k.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ Ae(
|
|
2400
|
+
vn,
|
|
2360
2401
|
{
|
|
2361
2402
|
ref: n,
|
|
2362
|
-
className:
|
|
2403
|
+
className: we(
|
|
2363
2404
|
"relative flex w-full touch-none select-none items-center",
|
|
2364
2405
|
e
|
|
2365
2406
|
),
|
|
2366
2407
|
...t,
|
|
2367
2408
|
children: [
|
|
2368
|
-
/* @__PURE__ */
|
|
2369
|
-
/* @__PURE__ */
|
|
2409
|
+
/* @__PURE__ */ A(no, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ A(ro, { className: "absolute h-full bg-primary" }) }),
|
|
2410
|
+
/* @__PURE__ */ A(oo, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
|
|
2370
2411
|
]
|
|
2371
2412
|
}
|
|
2372
2413
|
));
|
|
2373
|
-
|
|
2374
|
-
const
|
|
2375
|
-
function
|
|
2376
|
-
const t =
|
|
2377
|
-
return
|
|
2378
|
-
}
|
|
2379
|
-
function
|
|
2380
|
-
return
|
|
2414
|
+
io.displayName = vn.displayName;
|
|
2415
|
+
const so = xt(null), lo = $n();
|
|
2416
|
+
function Sn(e) {
|
|
2417
|
+
const t = rt(so) ?? lo;
|
|
2418
|
+
return En(t.subscribe, () => e(t.get()), () => e(null));
|
|
2419
|
+
}
|
|
2420
|
+
function Ro(e) {
|
|
2421
|
+
return Sn(
|
|
2381
2422
|
O((t) => (t == null ? void 0 : t.slot.zone) === e ? t.outcome : null, [e])
|
|
2382
2423
|
);
|
|
2383
2424
|
}
|
|
2384
|
-
function
|
|
2385
|
-
return
|
|
2425
|
+
function Do(e, t, n) {
|
|
2426
|
+
return Sn(
|
|
2386
2427
|
O(
|
|
2387
2428
|
(r) => (r == null ? void 0 : r.slot.zone) !== e || r.outcome.kind === "refused" ? null : r.slot.beforeId === t ? "top" : !r.slot.beforeId && n ? "bottom" : null,
|
|
2388
2429
|
[e, t, n]
|
|
@@ -2390,18 +2431,20 @@ function Co(e, t, n) {
|
|
|
2390
2431
|
);
|
|
2391
2432
|
}
|
|
2392
2433
|
export {
|
|
2393
|
-
|
|
2394
|
-
|
|
2434
|
+
Vr as A,
|
|
2435
|
+
Io as E,
|
|
2436
|
+
wo as F,
|
|
2395
2437
|
tr as P,
|
|
2396
|
-
|
|
2438
|
+
Co as S,
|
|
2397
2439
|
Tr as T,
|
|
2398
2440
|
Er as a,
|
|
2399
2441
|
Rr as b,
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2442
|
+
Eo as c,
|
|
2443
|
+
Fr as d,
|
|
2444
|
+
io as e,
|
|
2445
|
+
Ro as f,
|
|
2446
|
+
Do as g,
|
|
2447
|
+
so as h,
|
|
2448
|
+
Zt as r,
|
|
2449
|
+
Qt as u
|
|
2407
2450
|
};
|