react-semaphor 0.1.535 → 0.1.537
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/brand-studio/index.js +1 -1
- package/dist/briefings/index.js +1 -1
- package/dist/chunks/{card-config-utils-C-QfuqEy.js → card-config-utils-BOM1dxCk.js} +108 -91
- package/dist/chunks/{dashboard-B7y_WeF2.js → dashboard-BPJo-Fnd.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DwSxDtgZ.js → dashboard-briefing-launcher-A2uVpHCp.js} +5 -5
- package/dist/chunks/{dashboard-controls-CzTh9J0s.js → dashboard-controls-DxTuVis_.js} +6 -6
- package/dist/chunks/{dashboard-json-o6tOjNhH.js → dashboard-json-B1dEQu98.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-Lp_iKRGH.js → edit-dashboard-visual-ByV0OwSp.js} +6928 -7140
- package/dist/chunks/{index-P5aUuGF1.js → index-DTcTAGGM.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-BaUr346O.js → report-preferences-dialog-DXPjteCU.js} +5 -5
- package/dist/chunks/{semaphor-ready-indicator-B017OW6t.js → semaphor-ready-indicator-CHu1L-lo.js} +34105 -33932
- package/dist/chunks/{slider-CrLoCpsr.js → shelf-drop-preview-context-i-H6DFyU.js} +524 -503
- package/dist/chunks/{switch-ojmMsFMO.js → switch-DO8a0EfJ.js} +2 -1
- package/dist/chunks/{use-create-flow-overlay-state-BbwQ0gpQ.js → use-create-flow-overlay-state-Bj63WwHc.js} +2 -2
- package/dist/dashboard/index.js +1 -1
- package/dist/index.js +12 -12
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/shared/analytics-protocol/contracts.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsxs as De, jsx as _, Fragment as
|
|
1
|
+
import { jsxs as De, jsx as _, Fragment as ft } from "react/jsx-runtime";
|
|
2
2
|
import * as k from "react";
|
|
3
|
-
import
|
|
4
|
-
import { aF as
|
|
5
|
-
import { a1 as te, a2 as
|
|
6
|
-
import { f as
|
|
7
|
-
import { f as
|
|
3
|
+
import bn, { forwardRef as Ve, createElement as be, useContext as nt, createContext as bt, useRef as B, useLayoutEffect as zn, useImperativeHandle as zt, useEffect as Z, useState as ue, useCallback as O, useMemo as U, memo as Pn, Suspense as wn, useSyncExternalStore as Cn } from "react";
|
|
4
|
+
import { aF as En, aG as Pt, aH as rt, aI as wt, aJ as In, aK as Rn, aL as Dn, aM as An, aN as Mn, aO as Nn, aP as Ln, aQ as _n, aR as kn, aS as Tn, aT as Hn, aU as Vn, aV as $n } from "./semaphor-ready-indicator-CHu1L-lo.js";
|
|
5
|
+
import { a1 as te, a2 as Ct, C as Et, ax as Fn, c as ot, ay as Kn, u as Ge, az as It, aA as ze, aB as pe, aC as Bn, aD as qn, aE as On, aF as Pe, aG as Gn, aH as Rt, aI as Un, aJ as Wn } from "./switch-DO8a0EfJ.js";
|
|
6
|
+
import { f as Xn, r as Dt } from "./use-create-flow-overlay-state-Bj63WwHc.js";
|
|
7
|
+
import { f as Yn, r as At, g as Mt, a as Qe, b as _e, n as jn, c as Qn } from "./index-DTcTAGGM.js";
|
|
8
8
|
import "./x-CXDkqdur.js";
|
|
9
9
|
import "./validators-DMSH81OM.js";
|
|
10
10
|
import "./matrix-operation-contract-BKupLHXL.js";
|
|
11
11
|
import "zod";
|
|
12
12
|
import "../value-format-preferences/index.js";
|
|
13
|
-
import { u as
|
|
14
|
-
const
|
|
13
|
+
import { u as Jn } from "./appearance-context-DEYtWinQ.js";
|
|
14
|
+
const yo = bn.memo(function({
|
|
15
15
|
context: t = "editor"
|
|
16
16
|
} = {}) {
|
|
17
17
|
return /* @__PURE__ */ De(
|
|
@@ -21,13 +21,13 @@ const fo = Sn.memo(function({
|
|
|
21
21
|
className: "flex h-full grow flex-col items-center overflow-hidden",
|
|
22
22
|
children: [
|
|
23
23
|
" ",
|
|
24
|
-
/* @__PURE__ */ _(
|
|
24
|
+
/* @__PURE__ */ _(En, { context: t }),
|
|
25
25
|
" "
|
|
26
26
|
]
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
|
-
}),
|
|
30
|
-
|
|
29
|
+
}), $e = bt(null);
|
|
30
|
+
$e.displayName = "PanelGroupContext";
|
|
31
31
|
const K = {
|
|
32
32
|
group: "data-panel-group",
|
|
33
33
|
groupDirection: "data-panel-group-direction",
|
|
@@ -41,13 +41,13 @@ const K = {
|
|
|
41
41
|
resizeHandleEnabled: "data-panel-resize-handle-enabled",
|
|
42
42
|
resizeHandleId: "data-panel-resize-handle-id",
|
|
43
43
|
resizeHandleState: "data-resize-handle-state"
|
|
44
|
-
},
|
|
45
|
-
let
|
|
46
|
-
function
|
|
47
|
-
const t =
|
|
48
|
-
return n.current === null && (n.current = "" +
|
|
44
|
+
}, it = 10, me = zn, pt = k.useId, Zn = typeof pt == "function" ? pt : () => null;
|
|
45
|
+
let er = 0;
|
|
46
|
+
function st(e = null) {
|
|
47
|
+
const t = Zn(), n = B(e || t || null);
|
|
48
|
+
return n.current === null && (n.current = "" + er++), e ?? n.current;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Nt({
|
|
51
51
|
children: e,
|
|
52
52
|
className: t = "",
|
|
53
53
|
collapsedSize: n,
|
|
@@ -55,8 +55,8 @@ function Mt({
|
|
|
55
55
|
defaultSize: i,
|
|
56
56
|
forwardedRef: o,
|
|
57
57
|
id: s,
|
|
58
|
-
maxSize:
|
|
59
|
-
minSize:
|
|
58
|
+
maxSize: l,
|
|
59
|
+
minSize: a,
|
|
60
60
|
onCollapse: f,
|
|
61
61
|
onExpand: p,
|
|
62
62
|
onResize: u,
|
|
@@ -65,7 +65,7 @@ function Mt({
|
|
|
65
65
|
tagName: m = "div",
|
|
66
66
|
...y
|
|
67
67
|
}) {
|
|
68
|
-
const S =
|
|
68
|
+
const S = nt($e);
|
|
69
69
|
if (S === null)
|
|
70
70
|
throw Error("Panel components must be rendered within a PanelGroup container");
|
|
71
71
|
const {
|
|
@@ -78,8 +78,8 @@ function Mt({
|
|
|
78
78
|
reevaluatePanelConstraints: w,
|
|
79
79
|
registerPanel: X,
|
|
80
80
|
resizePanel: j,
|
|
81
|
-
unregisterPanel:
|
|
82
|
-
} = S, A =
|
|
81
|
+
unregisterPanel: V
|
|
82
|
+
} = S, A = st(s), N = B({
|
|
83
83
|
callbacks: {
|
|
84
84
|
onCollapse: f,
|
|
85
85
|
onExpand: p,
|
|
@@ -89,8 +89,8 @@ function Mt({
|
|
|
89
89
|
collapsedSize: n,
|
|
90
90
|
collapsible: r,
|
|
91
91
|
defaultSize: i,
|
|
92
|
-
maxSize:
|
|
93
|
-
minSize:
|
|
92
|
+
maxSize: l,
|
|
93
|
+
minSize: a
|
|
94
94
|
},
|
|
95
95
|
id: A,
|
|
96
96
|
idIsFromProps: s !== void 0,
|
|
@@ -100,41 +100,41 @@ function Mt({
|
|
|
100
100
|
didLogMissingDefaultSizeWarning: !1
|
|
101
101
|
}), me(() => {
|
|
102
102
|
const {
|
|
103
|
-
callbacks:
|
|
103
|
+
callbacks: $,
|
|
104
104
|
constraints: T
|
|
105
|
-
} =
|
|
105
|
+
} = N.current, H = {
|
|
106
106
|
...T
|
|
107
107
|
};
|
|
108
|
-
|
|
108
|
+
N.current.id = A, N.current.idIsFromProps = s !== void 0, N.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(N.current, H);
|
|
109
109
|
}), me(() => {
|
|
110
|
-
const
|
|
111
|
-
return X(
|
|
112
|
-
$
|
|
110
|
+
const $ = N.current;
|
|
111
|
+
return X($), () => {
|
|
112
|
+
V($);
|
|
113
113
|
};
|
|
114
|
-
}, [c, A, X,
|
|
114
|
+
}, [c, A, X, V]), zt(o, () => ({
|
|
115
115
|
collapse: () => {
|
|
116
|
-
v(
|
|
116
|
+
v(N.current);
|
|
117
117
|
},
|
|
118
|
-
expand: (
|
|
119
|
-
D(
|
|
118
|
+
expand: ($) => {
|
|
119
|
+
D(N.current, $);
|
|
120
120
|
},
|
|
121
121
|
getId() {
|
|
122
122
|
return A;
|
|
123
123
|
},
|
|
124
124
|
getSize() {
|
|
125
|
-
return b(
|
|
125
|
+
return b(N.current);
|
|
126
126
|
},
|
|
127
127
|
isCollapsed() {
|
|
128
|
-
return M(
|
|
128
|
+
return M(N.current);
|
|
129
129
|
},
|
|
130
130
|
isExpanded() {
|
|
131
|
-
return !M(
|
|
131
|
+
return !M(N.current);
|
|
132
132
|
},
|
|
133
|
-
resize: (
|
|
134
|
-
j(
|
|
133
|
+
resize: ($) => {
|
|
134
|
+
j(N.current, $);
|
|
135
135
|
}
|
|
136
136
|
}), [v, D, b, M, A, j]);
|
|
137
|
-
const W = I(
|
|
137
|
+
const W = I(N.current, i);
|
|
138
138
|
return be(m, {
|
|
139
139
|
...y,
|
|
140
140
|
children: e,
|
|
@@ -152,16 +152,16 @@ function Mt({
|
|
|
152
152
|
[K.panelSize]: parseFloat("" + W.flexGrow).toFixed(1)
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
-
const
|
|
155
|
+
const tr = Ve((e, t) => be(Nt, {
|
|
156
156
|
...e,
|
|
157
157
|
forwardedRef: t
|
|
158
158
|
}));
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
Nt.displayName = "Panel";
|
|
160
|
+
tr.displayName = "forwardRef(Panel)";
|
|
161
161
|
let Je = null, ke = -1, ce = null;
|
|
162
|
-
function
|
|
162
|
+
function nr(e, t) {
|
|
163
163
|
if (t) {
|
|
164
|
-
const n = (t &
|
|
164
|
+
const n = (t & Ht) !== 0, r = (t & Vt) !== 0, i = (t & $t) !== 0, o = (t & Ft) !== 0;
|
|
165
165
|
if (n)
|
|
166
166
|
return i ? "se-resize" : o ? "ne-resize" : "e-resize";
|
|
167
167
|
if (r)
|
|
@@ -180,12 +180,12 @@ function Zn(e, t) {
|
|
|
180
180
|
return "ns-resize";
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function rr() {
|
|
184
184
|
ce !== null && (document.head.removeChild(ce), Je = null, ce = null, ke = -1);
|
|
185
185
|
}
|
|
186
186
|
function Ue(e, t) {
|
|
187
187
|
var n, r;
|
|
188
|
-
const i =
|
|
188
|
+
const i = nr(e, t);
|
|
189
189
|
if (Je !== i) {
|
|
190
190
|
if (Je = i, ce === null && (ce = document.createElement("style"), document.head.appendChild(ce)), ke >= 0) {
|
|
191
191
|
var o;
|
|
@@ -197,20 +197,20 @@ function Ue(e, t) {
|
|
|
197
197
|
function Lt(e) {
|
|
198
198
|
return e.type === "keydown";
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function _t(e) {
|
|
201
201
|
return e.type.startsWith("pointer");
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function kt(e) {
|
|
204
204
|
return e.type.startsWith("mouse");
|
|
205
205
|
}
|
|
206
206
|
function Fe(e) {
|
|
207
|
-
if (
|
|
207
|
+
if (_t(e)) {
|
|
208
208
|
if (e.isPrimary)
|
|
209
209
|
return {
|
|
210
210
|
x: e.clientX,
|
|
211
211
|
y: e.clientY
|
|
212
212
|
};
|
|
213
|
-
} else if (
|
|
213
|
+
} else if (kt(e))
|
|
214
214
|
return {
|
|
215
215
|
x: e.clientX,
|
|
216
216
|
y: e.clientY
|
|
@@ -220,109 +220,109 @@ function Fe(e) {
|
|
|
220
220
|
y: 1 / 0
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function or() {
|
|
224
224
|
if (typeof matchMedia == "function")
|
|
225
225
|
return matchMedia("(pointer:coarse)").matches ? "coarse" : "fine";
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function ir(e, t, n) {
|
|
228
228
|
return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function sr(e, t) {
|
|
231
231
|
if (e === t) throw new Error("Cannot compare node with itself");
|
|
232
232
|
const n = {
|
|
233
|
-
a:
|
|
234
|
-
b:
|
|
233
|
+
a: ht(e),
|
|
234
|
+
b: ht(t)
|
|
235
235
|
};
|
|
236
236
|
let r;
|
|
237
237
|
for (; n.a.at(-1) === n.b.at(-1); )
|
|
238
238
|
e = n.a.pop(), t = n.b.pop(), r = e;
|
|
239
239
|
E(r, "Stacking order can only be calculated for elements with a common ancestor");
|
|
240
240
|
const i = {
|
|
241
|
-
a: mt(
|
|
242
|
-
b: mt(
|
|
241
|
+
a: gt(mt(n.a)),
|
|
242
|
+
b: gt(mt(n.b))
|
|
243
243
|
};
|
|
244
244
|
if (i.a === i.b) {
|
|
245
245
|
const o = r.childNodes, s = {
|
|
246
246
|
a: n.a.at(-1),
|
|
247
247
|
b: n.b.at(-1)
|
|
248
248
|
};
|
|
249
|
-
let
|
|
250
|
-
for (;
|
|
251
|
-
const
|
|
252
|
-
if (
|
|
253
|
-
if (
|
|
249
|
+
let l = o.length;
|
|
250
|
+
for (; l--; ) {
|
|
251
|
+
const a = o[l];
|
|
252
|
+
if (a === s.a) return 1;
|
|
253
|
+
if (a === s.b) return -1;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
return Math.sign(i.a - i.b);
|
|
257
257
|
}
|
|
258
|
-
const
|
|
259
|
-
function
|
|
258
|
+
const lr = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
259
|
+
function ar(e) {
|
|
260
260
|
var t;
|
|
261
|
-
const n = getComputedStyle((t =
|
|
261
|
+
const n = getComputedStyle((t = Tt(e)) !== null && t !== void 0 ? t : e).display;
|
|
262
262
|
return n === "flex" || n === "inline-flex";
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function cr(e) {
|
|
265
265
|
const t = getComputedStyle(e);
|
|
266
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" ||
|
|
266
|
+
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || ar(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || lr.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function mt(e) {
|
|
269
269
|
let t = e.length;
|
|
270
270
|
for (; t--; ) {
|
|
271
271
|
const n = e[t];
|
|
272
|
-
if (E(n, "Missing node"),
|
|
272
|
+
if (E(n, "Missing node"), cr(n)) return n;
|
|
273
273
|
}
|
|
274
274
|
return null;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function gt(e) {
|
|
277
277
|
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function ht(e) {
|
|
280
280
|
const t = [];
|
|
281
281
|
for (; e; )
|
|
282
|
-
t.push(e), e =
|
|
282
|
+
t.push(e), e = Tt(e);
|
|
283
283
|
return t;
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function Tt(e) {
|
|
286
286
|
const {
|
|
287
287
|
parentNode: t
|
|
288
288
|
} = e;
|
|
289
289
|
return t && t instanceof ShadowRoot ? t.host : t;
|
|
290
290
|
}
|
|
291
|
-
const
|
|
291
|
+
const Ht = 1, Vt = 2, $t = 4, Ft = 8, ur = or() === "coarse";
|
|
292
292
|
let ne = [], xe = !1, fe = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ new Map();
|
|
293
293
|
const Ae = /* @__PURE__ */ new Set();
|
|
294
|
-
function
|
|
294
|
+
function dr(e, t, n, r, i) {
|
|
295
295
|
var o;
|
|
296
296
|
const {
|
|
297
297
|
ownerDocument: s
|
|
298
|
-
} = t,
|
|
298
|
+
} = t, l = {
|
|
299
299
|
direction: n,
|
|
300
300
|
element: t,
|
|
301
301
|
hitAreaMargins: r,
|
|
302
302
|
setResizeHandlerState: i
|
|
303
|
-
},
|
|
304
|
-
return fe.set(s,
|
|
303
|
+
}, a = (o = fe.get(s)) !== null && o !== void 0 ? o : 0;
|
|
304
|
+
return fe.set(s, a + 1), Ae.add(l), Te(), function() {
|
|
305
305
|
var p;
|
|
306
|
-
Ke.delete(e), Ae.delete(
|
|
306
|
+
Ke.delete(e), Ae.delete(l);
|
|
307
307
|
const u = (p = fe.get(s)) !== null && p !== void 0 ? p : 1;
|
|
308
|
-
if (fe.set(s, u - 1), Te(), u === 1 && fe.delete(s), ne.includes(
|
|
309
|
-
const c = ne.indexOf(
|
|
308
|
+
if (fe.set(s, u - 1), Te(), u === 1 && fe.delete(s), ne.includes(l)) {
|
|
309
|
+
const c = ne.indexOf(l);
|
|
310
310
|
c >= 0 && ne.splice(c, 1), at(), i("up", !0, null);
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function fr(e) {
|
|
315
315
|
const {
|
|
316
316
|
target: t
|
|
317
317
|
} = e, {
|
|
318
318
|
x: n,
|
|
319
319
|
y: r
|
|
320
320
|
} = Fe(e);
|
|
321
|
-
xe = !0,
|
|
321
|
+
xe = !0, lt({
|
|
322
322
|
target: t,
|
|
323
323
|
x: n,
|
|
324
324
|
y: r
|
|
325
|
-
}), Te(), ne.length > 0 && (He("down", e), e.preventDefault(),
|
|
325
|
+
}), Te(), ne.length > 0 && (He("down", e), e.preventDefault(), Kt(t) || e.stopImmediatePropagation());
|
|
326
326
|
}
|
|
327
327
|
function We(e) {
|
|
328
328
|
const {
|
|
@@ -333,7 +333,7 @@ function We(e) {
|
|
|
333
333
|
const {
|
|
334
334
|
target: r
|
|
335
335
|
} = e;
|
|
336
|
-
|
|
336
|
+
lt({
|
|
337
337
|
target: r,
|
|
338
338
|
x: t,
|
|
339
339
|
y: n
|
|
@@ -348,13 +348,13 @@ function Xe(e) {
|
|
|
348
348
|
x: n,
|
|
349
349
|
y: r
|
|
350
350
|
} = Fe(e);
|
|
351
|
-
Ke.clear(), xe = !1, ne.length > 0 && (e.preventDefault(),
|
|
351
|
+
Ke.clear(), xe = !1, ne.length > 0 && (e.preventDefault(), Kt(t) || e.stopImmediatePropagation()), He("up", e), lt({
|
|
352
352
|
target: t,
|
|
353
353
|
x: n,
|
|
354
354
|
y: r
|
|
355
355
|
}), at(), Te();
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Kt(e) {
|
|
358
358
|
let t = e;
|
|
359
359
|
for (; t; ) {
|
|
360
360
|
if (t.hasAttribute(K.resizeHandle))
|
|
@@ -363,7 +363,7 @@ function Ft(e) {
|
|
|
363
363
|
}
|
|
364
364
|
return !1;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function lt({
|
|
367
367
|
target: e,
|
|
368
368
|
x: t,
|
|
369
369
|
y: n
|
|
@@ -374,20 +374,20 @@ function st({
|
|
|
374
374
|
const {
|
|
375
375
|
element: o,
|
|
376
376
|
hitAreaMargins: s
|
|
377
|
-
} = i,
|
|
378
|
-
bottom:
|
|
377
|
+
} = i, l = o.getBoundingClientRect(), {
|
|
378
|
+
bottom: a,
|
|
379
379
|
left: f,
|
|
380
380
|
right: p,
|
|
381
381
|
top: u
|
|
382
|
-
} =
|
|
383
|
-
if (t >= f - c && t <= p + c && n >= u - c && n <=
|
|
382
|
+
} = l, c = ur ? s.coarse : s.fine;
|
|
383
|
+
if (t >= f - c && t <= p + c && n >= u - c && n <= a + c) {
|
|
384
384
|
if (r !== null && document.contains(r) && o !== r && !o.contains(r) && !r.contains(o) && // Calculating stacking order has a cost, so we should avoid it if possible
|
|
385
385
|
// That is why we only check potentially intersecting handles,
|
|
386
386
|
// and why we skip if the event target is within the handle's DOM
|
|
387
|
-
|
|
387
|
+
sr(r, o) > 0) {
|
|
388
388
|
let m = r, y = !1;
|
|
389
389
|
for (; m && !m.contains(o); ) {
|
|
390
|
-
if (
|
|
390
|
+
if (ir(m.getBoundingClientRect(), l)) {
|
|
391
391
|
y = !0;
|
|
392
392
|
break;
|
|
393
393
|
}
|
|
@@ -414,7 +414,7 @@ function at() {
|
|
|
414
414
|
let n = 0;
|
|
415
415
|
Ke.forEach((r) => {
|
|
416
416
|
n |= r;
|
|
417
|
-
}), e && t ? Ue("intersection", n) : e ? Ue("horizontal", n) : t ? Ue("vertical", n) :
|
|
417
|
+
}), e && t ? Ue("intersection", n) : e ? Ue("horizontal", n) : t ? Ue("vertical", n) : rr();
|
|
418
418
|
}
|
|
419
419
|
let je = new AbortController();
|
|
420
420
|
function Te() {
|
|
@@ -432,7 +432,7 @@ function Te() {
|
|
|
432
432
|
const {
|
|
433
433
|
body: r
|
|
434
434
|
} = n;
|
|
435
|
-
t > 0 && (r.addEventListener("pointerdown",
|
|
435
|
+
t > 0 && (r.addEventListener("pointerdown", fr, e), r.addEventListener("pointermove", We, e));
|
|
436
436
|
}));
|
|
437
437
|
}
|
|
438
438
|
function He(e, t) {
|
|
@@ -443,7 +443,7 @@ function He(e, t) {
|
|
|
443
443
|
r(e, i, t);
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function pr() {
|
|
447
447
|
const [e, t] = ue(0);
|
|
448
448
|
return O(() => t((n) => n + 1), []);
|
|
449
449
|
}
|
|
@@ -451,16 +451,16 @@ function E(e, t) {
|
|
|
451
451
|
if (!e)
|
|
452
452
|
throw console.error(t), Error(t);
|
|
453
453
|
}
|
|
454
|
-
function ge(e, t, n =
|
|
454
|
+
function ge(e, t, n = it) {
|
|
455
455
|
return e.toFixed(n) === t.toFixed(n) ? 0 : e > t ? 1 : -1;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function le(e, t, n = it) {
|
|
458
458
|
return ge(e, t, n) === 0;
|
|
459
459
|
}
|
|
460
460
|
function J(e, t, n) {
|
|
461
461
|
return ge(e, t, n) === 0;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function mr(e, t, n) {
|
|
464
464
|
if (e.length !== t.length)
|
|
465
465
|
return !1;
|
|
466
466
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -481,15 +481,15 @@ function Se({
|
|
|
481
481
|
collapsedSize: i = 0,
|
|
482
482
|
collapsible: o,
|
|
483
483
|
maxSize: s = 100,
|
|
484
|
-
minSize:
|
|
484
|
+
minSize: l = 0
|
|
485
485
|
} = r;
|
|
486
|
-
if (ge(n,
|
|
486
|
+
if (ge(n, l) < 0)
|
|
487
487
|
if (o) {
|
|
488
|
-
const
|
|
489
|
-
ge(n,
|
|
488
|
+
const a = (i + l) / 2;
|
|
489
|
+
ge(n, a) < 0 ? n = i : n = l;
|
|
490
490
|
} else
|
|
491
|
-
n =
|
|
492
|
-
return n = Math.min(s, n), n = parseFloat(n.toFixed(
|
|
491
|
+
n = l;
|
|
492
|
+
return n = Math.min(s, n), n = parseFloat(n.toFixed(it)), n;
|
|
493
493
|
}
|
|
494
494
|
function Ie({
|
|
495
495
|
delta: e,
|
|
@@ -501,12 +501,12 @@ function Ie({
|
|
|
501
501
|
}) {
|
|
502
502
|
if (J(e, 0))
|
|
503
503
|
return t;
|
|
504
|
-
const s = [...t], [
|
|
505
|
-
E(
|
|
504
|
+
const s = [...t], [l, a] = r;
|
|
505
|
+
E(l != null, "Invalid first pivot index"), E(a != null, "Invalid second pivot index");
|
|
506
506
|
let f = 0;
|
|
507
507
|
if (o === "keyboard") {
|
|
508
508
|
{
|
|
509
|
-
const u = e < 0 ?
|
|
509
|
+
const u = e < 0 ? a : l, c = n[u];
|
|
510
510
|
E(c, `Panel constraints not found for index ${u}`);
|
|
511
511
|
const {
|
|
512
512
|
collapsedSize: h = 0,
|
|
@@ -522,7 +522,7 @@ function Ie({
|
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
{
|
|
525
|
-
const u = e < 0 ?
|
|
525
|
+
const u = e < 0 ? l : a, c = n[u];
|
|
526
526
|
E(c, `No panel constraints found for index ${u}`);
|
|
527
527
|
const {
|
|
528
528
|
collapsedSize: h = 0,
|
|
@@ -540,7 +540,7 @@ function Ie({
|
|
|
540
540
|
}
|
|
541
541
|
{
|
|
542
542
|
const u = e < 0 ? 1 : -1;
|
|
543
|
-
let c = e < 0 ?
|
|
543
|
+
let c = e < 0 ? a : l, h = 0;
|
|
544
544
|
for (; ; ) {
|
|
545
545
|
const y = t[c];
|
|
546
546
|
E(y != null, `Previous layout not found for panel index ${c}`);
|
|
@@ -556,7 +556,7 @@ function Ie({
|
|
|
556
556
|
e = e < 0 ? 0 - m : m;
|
|
557
557
|
}
|
|
558
558
|
{
|
|
559
|
-
let c = e < 0 ?
|
|
559
|
+
let c = e < 0 ? l : a;
|
|
560
560
|
for (; c >= 0 && c < n.length; ) {
|
|
561
561
|
const h = Math.abs(e) - Math.abs(f), m = t[c];
|
|
562
562
|
E(m != null, `Previous layout not found for panel index ${c}`);
|
|
@@ -572,10 +572,10 @@ function Ie({
|
|
|
572
572
|
e < 0 ? c-- : c++;
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
if (
|
|
575
|
+
if (mr(i, s))
|
|
576
576
|
return i;
|
|
577
577
|
{
|
|
578
|
-
const u = e < 0 ?
|
|
578
|
+
const u = e < 0 ? a : l, c = t[u];
|
|
579
579
|
E(c != null, `Previous layout not found for panel index ${u}`);
|
|
580
580
|
const h = c + f, m = Se({
|
|
581
581
|
panelConstraints: n,
|
|
@@ -583,7 +583,7 @@ function Ie({
|
|
|
583
583
|
size: h
|
|
584
584
|
});
|
|
585
585
|
if (s[u] = m, !J(m, h)) {
|
|
586
|
-
let y = h - m, v = e < 0 ?
|
|
586
|
+
let y = h - m, v = e < 0 ? a : l;
|
|
587
587
|
for (; v >= 0 && v < n.length; ) {
|
|
588
588
|
const D = s[v];
|
|
589
589
|
E(D != null, `Previous layout not found for panel index ${v}`);
|
|
@@ -601,25 +601,25 @@ function Ie({
|
|
|
601
601
|
const p = s.reduce((u, c) => c + u, 0);
|
|
602
602
|
return J(p, 100) ? s : i;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function gr({
|
|
605
605
|
layout: e,
|
|
606
606
|
panelsArray: t,
|
|
607
607
|
pivotIndices: n
|
|
608
608
|
}) {
|
|
609
609
|
let r = 0, i = 100, o = 0, s = 0;
|
|
610
|
-
const
|
|
611
|
-
E(
|
|
610
|
+
const l = n[0];
|
|
611
|
+
E(l != null, "No pivot index found"), t.forEach((u, c) => {
|
|
612
612
|
const {
|
|
613
613
|
constraints: h
|
|
614
614
|
} = u, {
|
|
615
615
|
maxSize: m = 100,
|
|
616
616
|
minSize: y = 0
|
|
617
617
|
} = h;
|
|
618
|
-
c ===
|
|
618
|
+
c === l ? (r = y, i = m) : (o += y, s += m);
|
|
619
619
|
});
|
|
620
|
-
const
|
|
620
|
+
const a = Math.min(i, 100 - o), f = Math.max(r, 100 - s), p = e[l];
|
|
621
621
|
return {
|
|
622
|
-
valueMax:
|
|
622
|
+
valueMax: a,
|
|
623
623
|
valueMin: f,
|
|
624
624
|
valueNow: p
|
|
625
625
|
};
|
|
@@ -627,15 +627,15 @@ function fr({
|
|
|
627
627
|
function Me(e, t = document) {
|
|
628
628
|
return Array.from(t.querySelectorAll(`[${K.resizeHandleId}][data-panel-group-id="${e}"]`));
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function Bt(e, t, n = document) {
|
|
631
631
|
const i = Me(e, n).findIndex((o) => o.getAttribute(K.resizeHandleId) === t);
|
|
632
632
|
return i ?? null;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
635
|
-
const r =
|
|
634
|
+
function qt(e, t, n) {
|
|
635
|
+
const r = Bt(e, t, n);
|
|
636
636
|
return r != null ? [r, r + 1] : [-1, -1];
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function Ot(e, t = document) {
|
|
639
639
|
var n;
|
|
640
640
|
if (t instanceof HTMLElement && (t == null || (n = t.dataset) === null || n === void 0 ? void 0 : n.panelGroupId) == e)
|
|
641
641
|
return t;
|
|
@@ -646,12 +646,12 @@ function Be(e, t = document) {
|
|
|
646
646
|
const n = t.querySelector(`[${K.resizeHandleId}="${e}"]`);
|
|
647
647
|
return n || null;
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
var i, o, s,
|
|
651
|
-
const
|
|
649
|
+
function hr(e, t, n, r = document) {
|
|
650
|
+
var i, o, s, l;
|
|
651
|
+
const a = Be(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;
|
|
652
652
|
return [u, c];
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function yr({
|
|
655
655
|
committedValuesRef: e,
|
|
656
656
|
eagerValuesRef: t,
|
|
657
657
|
groupId: n,
|
|
@@ -665,42 +665,42 @@ function mr({
|
|
|
665
665
|
}), me(() => {
|
|
666
666
|
if (!o)
|
|
667
667
|
return;
|
|
668
|
-
const
|
|
669
|
-
for (let
|
|
668
|
+
const l = Me(n, o);
|
|
669
|
+
for (let a = 0; a < i.length - 1; a++) {
|
|
670
670
|
const {
|
|
671
671
|
valueMax: f,
|
|
672
672
|
valueMin: p,
|
|
673
673
|
valueNow: u
|
|
674
|
-
} =
|
|
674
|
+
} = gr({
|
|
675
675
|
layout: r,
|
|
676
676
|
panelsArray: i,
|
|
677
|
-
pivotIndices: [
|
|
678
|
-
}), c = a
|
|
677
|
+
pivotIndices: [a, a + 1]
|
|
678
|
+
}), c = l[a];
|
|
679
679
|
if (c != null) {
|
|
680
|
-
const h = i[
|
|
681
|
-
E(h, `No panel data found for index "${
|
|
680
|
+
const h = i[a];
|
|
681
|
+
E(h, `No panel data found for index "${a}"`), c.setAttribute("aria-controls", h.id), c.setAttribute("aria-valuemax", "" + Math.round(f)), c.setAttribute("aria-valuemin", "" + Math.round(p)), c.setAttribute("aria-valuenow", u != null ? "" + Math.round(u) : "");
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
return () => {
|
|
685
|
-
|
|
686
|
-
|
|
685
|
+
l.forEach((a, f) => {
|
|
686
|
+
a.removeAttribute("aria-controls"), a.removeAttribute("aria-valuemax"), a.removeAttribute("aria-valuemin"), a.removeAttribute("aria-valuenow");
|
|
687
687
|
});
|
|
688
688
|
};
|
|
689
689
|
}, [n, r, i, o]), Z(() => {
|
|
690
690
|
if (!o)
|
|
691
691
|
return;
|
|
692
|
-
const
|
|
693
|
-
E(
|
|
692
|
+
const l = t.current;
|
|
693
|
+
E(l, "Eager values not found");
|
|
694
694
|
const {
|
|
695
|
-
panelDataArray:
|
|
696
|
-
} =
|
|
695
|
+
panelDataArray: a
|
|
696
|
+
} = l, f = Ot(n, o);
|
|
697
697
|
E(f != null, `No group found for id "${n}"`);
|
|
698
698
|
const p = Me(n, o);
|
|
699
699
|
E(p, `No resize handles found for group id "${n}"`);
|
|
700
700
|
const u = p.map((c) => {
|
|
701
701
|
const h = c.getAttribute(K.resizeHandleId);
|
|
702
702
|
E(h, "Resize handle element has no handle id attribute");
|
|
703
|
-
const [m, y] =
|
|
703
|
+
const [m, y] = hr(n, h, a, o);
|
|
704
704
|
if (m == null || y == null)
|
|
705
705
|
return () => {
|
|
706
706
|
};
|
|
@@ -709,9 +709,9 @@ function mr({
|
|
|
709
709
|
switch (v.key) {
|
|
710
710
|
case "Enter": {
|
|
711
711
|
v.preventDefault();
|
|
712
|
-
const D =
|
|
712
|
+
const D = a.findIndex((b) => b.id === m);
|
|
713
713
|
if (D >= 0) {
|
|
714
|
-
const b =
|
|
714
|
+
const b = a[D];
|
|
715
715
|
E(b, `No panel data found for index ${D}`);
|
|
716
716
|
const I = r[D], {
|
|
717
717
|
collapsedSize: R = 0,
|
|
@@ -722,8 +722,8 @@ function mr({
|
|
|
722
722
|
const X = Ie({
|
|
723
723
|
delta: J(I, R) ? w - R : R - I,
|
|
724
724
|
initialLayout: r,
|
|
725
|
-
panelConstraints:
|
|
726
|
-
pivotIndices:
|
|
725
|
+
panelConstraints: a.map((j) => j.constraints),
|
|
726
|
+
pivotIndices: qt(n, h, o),
|
|
727
727
|
prevLayout: r,
|
|
728
728
|
trigger: "keyboard"
|
|
729
729
|
});
|
|
@@ -743,7 +743,7 @@ function mr({
|
|
|
743
743
|
};
|
|
744
744
|
}, [o, e, t, n, r, i, s]);
|
|
745
745
|
}
|
|
746
|
-
function
|
|
746
|
+
function yt(e, t) {
|
|
747
747
|
if (e.length !== t.length)
|
|
748
748
|
return !1;
|
|
749
749
|
for (let n = 0; n < e.length; n++)
|
|
@@ -758,50 +758,50 @@ function Gt(e, t) {
|
|
|
758
758
|
} = Fe(t);
|
|
759
759
|
return n ? r : i;
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function vr(e, t, n, r, i) {
|
|
762
762
|
const o = n === "horizontal", s = Be(t, i);
|
|
763
763
|
E(s, `No resize handle element found for id "${t}"`);
|
|
764
|
-
const
|
|
765
|
-
E(
|
|
764
|
+
const l = s.getAttribute(K.groupId);
|
|
765
|
+
E(l, "Resize handle element has no group id attribute");
|
|
766
766
|
let {
|
|
767
|
-
initialCursorPosition:
|
|
767
|
+
initialCursorPosition: a
|
|
768
768
|
} = r;
|
|
769
|
-
const f = Gt(n, e), p =
|
|
770
|
-
E(p, `No group element found for id "${
|
|
769
|
+
const f = Gt(n, e), p = Ot(l, i);
|
|
770
|
+
E(p, `No group element found for id "${l}"`);
|
|
771
771
|
const u = p.getBoundingClientRect(), c = o ? u.width : u.height;
|
|
772
|
-
return (f -
|
|
772
|
+
return (f - a) / c * 100;
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function Sr(e, t, n, r, i, o) {
|
|
775
775
|
if (Lt(e)) {
|
|
776
776
|
const s = n === "horizontal";
|
|
777
|
-
let a = 0;
|
|
778
|
-
e.shiftKey ? a = 100 : i != null ? a = i : a = 10;
|
|
779
777
|
let l = 0;
|
|
778
|
+
e.shiftKey ? l = 100 : i != null ? l = i : l = 10;
|
|
779
|
+
let a = 0;
|
|
780
780
|
switch (e.key) {
|
|
781
781
|
case "ArrowDown":
|
|
782
|
-
|
|
782
|
+
a = s ? 0 : l;
|
|
783
783
|
break;
|
|
784
784
|
case "ArrowLeft":
|
|
785
|
-
|
|
785
|
+
a = s ? -l : 0;
|
|
786
786
|
break;
|
|
787
787
|
case "ArrowRight":
|
|
788
|
-
|
|
788
|
+
a = s ? l : 0;
|
|
789
789
|
break;
|
|
790
790
|
case "ArrowUp":
|
|
791
|
-
|
|
791
|
+
a = s ? 0 : -l;
|
|
792
792
|
break;
|
|
793
793
|
case "End":
|
|
794
|
-
|
|
794
|
+
a = 100;
|
|
795
795
|
break;
|
|
796
796
|
case "Home":
|
|
797
|
-
|
|
797
|
+
a = -100;
|
|
798
798
|
break;
|
|
799
799
|
}
|
|
800
|
-
return
|
|
800
|
+
return a;
|
|
801
801
|
} else
|
|
802
|
-
return r == null ? 0 :
|
|
802
|
+
return r == null ? 0 : vr(e, t, n, r, o);
|
|
803
803
|
}
|
|
804
|
-
function
|
|
804
|
+
function xr({
|
|
805
805
|
panelDataArray: e
|
|
806
806
|
}) {
|
|
807
807
|
const t = Array(e.length), n = e.map((o) => o.constraints);
|
|
@@ -810,19 +810,19 @@ function yr({
|
|
|
810
810
|
const s = n[o];
|
|
811
811
|
E(s, `Panel constraints not found for index ${o}`);
|
|
812
812
|
const {
|
|
813
|
-
defaultSize:
|
|
813
|
+
defaultSize: l
|
|
814
814
|
} = s;
|
|
815
|
-
|
|
815
|
+
l != null && (r++, t[o] = l, i -= l);
|
|
816
816
|
}
|
|
817
817
|
for (let o = 0; o < e.length; o++) {
|
|
818
818
|
const s = n[o];
|
|
819
819
|
E(s, `Panel constraints not found for index ${o}`);
|
|
820
820
|
const {
|
|
821
|
-
defaultSize:
|
|
821
|
+
defaultSize: l
|
|
822
822
|
} = s;
|
|
823
|
-
if (
|
|
823
|
+
if (l != null)
|
|
824
824
|
continue;
|
|
825
|
-
const
|
|
825
|
+
const a = e.length - r, f = i / a;
|
|
826
826
|
r++, t[o] = f, i -= f;
|
|
827
827
|
}
|
|
828
828
|
return t;
|
|
@@ -833,24 +833,24 @@ function ye(e, t, n) {
|
|
|
833
833
|
E(o, `Panel data not found for index ${i}`);
|
|
834
834
|
const {
|
|
835
835
|
callbacks: s,
|
|
836
|
-
constraints:
|
|
837
|
-
id:
|
|
836
|
+
constraints: l,
|
|
837
|
+
id: a
|
|
838
838
|
} = o, {
|
|
839
839
|
collapsedSize: f = 0,
|
|
840
840
|
collapsible: p
|
|
841
|
-
} =
|
|
841
|
+
} = l, u = n[a];
|
|
842
842
|
if (u == null || r !== u) {
|
|
843
|
-
n[
|
|
843
|
+
n[a] = r;
|
|
844
844
|
const {
|
|
845
845
|
onCollapse: c,
|
|
846
846
|
onExpand: h,
|
|
847
847
|
onResize: m
|
|
848
848
|
} = s;
|
|
849
|
-
m && m(r, u), p && (c || h) && (h && (u == null ||
|
|
849
|
+
m && m(r, u), p && (c || h) && (h && (u == null || le(u, f)) && !le(r, f) && h(), c && (u == null || !le(u, f)) && le(r, f) && c());
|
|
850
850
|
}
|
|
851
851
|
});
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function Le(e, t) {
|
|
854
854
|
if (e.length !== t.length)
|
|
855
855
|
return !1;
|
|
856
856
|
for (let n = 0; n < e.length; n++)
|
|
@@ -858,7 +858,7 @@ function Ne(e, t) {
|
|
|
858
858
|
return !1;
|
|
859
859
|
return !0;
|
|
860
860
|
}
|
|
861
|
-
function
|
|
861
|
+
function br({
|
|
862
862
|
defaultSize: e,
|
|
863
863
|
dragState: t,
|
|
864
864
|
layout: n,
|
|
@@ -867,10 +867,10 @@ function vr({
|
|
|
867
867
|
precision: o = 3
|
|
868
868
|
}) {
|
|
869
869
|
const s = n[i];
|
|
870
|
-
let
|
|
871
|
-
return s == null ?
|
|
870
|
+
let l;
|
|
871
|
+
return s == null ? l = e != null ? e.toPrecision(o) : "1" : r.length === 1 ? l = "1" : l = s.toPrecision(o), {
|
|
872
872
|
flexBasis: 0,
|
|
873
|
-
flexGrow:
|
|
873
|
+
flexGrow: l,
|
|
874
874
|
flexShrink: 1,
|
|
875
875
|
// Without this, Panel sizes may be unintentionally overridden by their content
|
|
876
876
|
overflow: "hidden",
|
|
@@ -879,7 +879,7 @@ function vr({
|
|
|
879
879
|
pointerEvents: t !== null ? "none" : void 0
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function zr(e, t = 10) {
|
|
883
883
|
let n = null;
|
|
884
884
|
return (...i) => {
|
|
885
885
|
n !== null && clearTimeout(n), n = setTimeout(() => {
|
|
@@ -887,7 +887,7 @@ function Sr(e, t = 10) {
|
|
|
887
887
|
}, t);
|
|
888
888
|
};
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function vt(e) {
|
|
891
891
|
try {
|
|
892
892
|
if (typeof localStorage < "u")
|
|
893
893
|
e.getItem = (t) => localStorage.getItem(t), e.setItem = (t, n) => {
|
|
@@ -900,10 +900,10 @@ function yt(e) {
|
|
|
900
900
|
};
|
|
901
901
|
}
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function Ut(e) {
|
|
904
904
|
return `react-resizable-panels:${e}`;
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function Wt(e) {
|
|
907
907
|
return e.map((t) => {
|
|
908
908
|
const {
|
|
909
909
|
constraints: n,
|
|
@@ -914,9 +914,9 @@ function Ut(e) {
|
|
|
914
914
|
return i ? r : o ? `${o}:${JSON.stringify(n)}` : JSON.stringify(n);
|
|
915
915
|
}).sort((t, n) => t.localeCompare(n)).join(",");
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function Xt(e, t) {
|
|
918
918
|
try {
|
|
919
|
-
const n =
|
|
919
|
+
const n = Ut(e), r = t.getItem(n);
|
|
920
920
|
if (r) {
|
|
921
921
|
const i = JSON.parse(r);
|
|
922
922
|
if (typeof i == "object" && i != null)
|
|
@@ -926,25 +926,25 @@ function Wt(e, t) {
|
|
|
926
926
|
}
|
|
927
927
|
return null;
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Pr(e, t, n) {
|
|
930
930
|
var r, i;
|
|
931
|
-
const o = (r =
|
|
931
|
+
const o = (r = Xt(e, n)) !== null && r !== void 0 ? r : {}, s = Wt(t);
|
|
932
932
|
return (i = o[s]) !== null && i !== void 0 ? i : null;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function wr(e, t, n, r, i) {
|
|
935
935
|
var o;
|
|
936
|
-
const s =
|
|
937
|
-
l
|
|
936
|
+
const s = Ut(e), l = Wt(t), a = (o = Xt(e, i)) !== null && o !== void 0 ? o : {};
|
|
937
|
+
a[l] = {
|
|
938
938
|
expandToSizes: Object.fromEntries(n.entries()),
|
|
939
939
|
layout: r
|
|
940
940
|
};
|
|
941
941
|
try {
|
|
942
|
-
i.setItem(s, JSON.stringify(
|
|
942
|
+
i.setItem(s, JSON.stringify(a));
|
|
943
943
|
} catch (f) {
|
|
944
944
|
console.error(f);
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function St({
|
|
948
948
|
layout: e,
|
|
949
949
|
panelConstraints: t
|
|
950
950
|
}) {
|
|
@@ -955,41 +955,41 @@ function vt({
|
|
|
955
955
|
for (let o = 0; o < t.length; o++) {
|
|
956
956
|
const s = n[o];
|
|
957
957
|
E(s != null, `No layout data found for index ${o}`);
|
|
958
|
-
const
|
|
959
|
-
n[o] =
|
|
958
|
+
const l = 100 / r * s;
|
|
959
|
+
n[o] = l;
|
|
960
960
|
}
|
|
961
961
|
let i = 0;
|
|
962
962
|
for (let o = 0; o < t.length; o++) {
|
|
963
963
|
const s = n[o];
|
|
964
964
|
E(s != null, `No layout data found for index ${o}`);
|
|
965
|
-
const
|
|
965
|
+
const l = Se({
|
|
966
966
|
panelConstraints: t,
|
|
967
967
|
panelIndex: o,
|
|
968
968
|
size: s
|
|
969
969
|
});
|
|
970
|
-
s !=
|
|
970
|
+
s != l && (i += s - l, n[o] = l);
|
|
971
971
|
}
|
|
972
972
|
if (!J(i, 0))
|
|
973
973
|
for (let o = 0; o < t.length; o++) {
|
|
974
974
|
const s = n[o];
|
|
975
975
|
E(s != null, `No layout data found for index ${o}`);
|
|
976
|
-
const
|
|
976
|
+
const l = s + i, a = Se({
|
|
977
977
|
panelConstraints: t,
|
|
978
978
|
panelIndex: o,
|
|
979
|
-
size:
|
|
979
|
+
size: l
|
|
980
980
|
});
|
|
981
|
-
if (s !==
|
|
981
|
+
if (s !== a && (i -= a - s, n[o] = a, J(i, 0)))
|
|
982
982
|
break;
|
|
983
983
|
}
|
|
984
984
|
return n;
|
|
985
985
|
}
|
|
986
|
-
const
|
|
987
|
-
getItem: (e) => (
|
|
986
|
+
const Cr = 100, Re = {
|
|
987
|
+
getItem: (e) => (vt(Re), Re.getItem(e)),
|
|
988
988
|
setItem: (e, t) => {
|
|
989
|
-
|
|
989
|
+
vt(Re), Re.setItem(e, t);
|
|
990
990
|
}
|
|
991
|
-
},
|
|
992
|
-
function
|
|
991
|
+
}, xt = {};
|
|
992
|
+
function Yt({
|
|
993
993
|
autoSaveId: e = null,
|
|
994
994
|
children: t,
|
|
995
995
|
className: n = "",
|
|
@@ -997,20 +997,20 @@ function Xt({
|
|
|
997
997
|
forwardedRef: i,
|
|
998
998
|
id: o = null,
|
|
999
999
|
onLayout: s = null,
|
|
1000
|
-
keyboardResizeBy:
|
|
1001
|
-
storage:
|
|
1000
|
+
keyboardResizeBy: l = null,
|
|
1001
|
+
storage: a = Re,
|
|
1002
1002
|
style: f,
|
|
1003
1003
|
tagName: p = "div",
|
|
1004
1004
|
...u
|
|
1005
1005
|
}) {
|
|
1006
|
-
const c =
|
|
1006
|
+
const c = st(o), h = B(null), [m, y] = ue(null), [S, v] = ue([]), D = pr(), b = B({}), I = B(/* @__PURE__ */ new Map()), R = B(0), M = B({
|
|
1007
1007
|
autoSaveId: e,
|
|
1008
1008
|
direction: r,
|
|
1009
1009
|
dragState: m,
|
|
1010
1010
|
id: c,
|
|
1011
|
-
keyboardResizeBy:
|
|
1011
|
+
keyboardResizeBy: l,
|
|
1012
1012
|
onLayout: s,
|
|
1013
|
-
storage:
|
|
1013
|
+
storage: a
|
|
1014
1014
|
}), w = B({
|
|
1015
1015
|
layout: S,
|
|
1016
1016
|
panelDataArray: [],
|
|
@@ -1020,7 +1020,7 @@ function Xt({
|
|
|
1020
1020
|
didLogIdAndOrderWarning: !1,
|
|
1021
1021
|
didLogPanelConstraintsWarning: !1,
|
|
1022
1022
|
prevPanelIds: []
|
|
1023
|
-
}),
|
|
1023
|
+
}), zt(i, () => ({
|
|
1024
1024
|
getId: () => M.current.id,
|
|
1025
1025
|
getLayout: () => {
|
|
1026
1026
|
const {
|
|
@@ -1034,15 +1034,15 @@ function Xt({
|
|
|
1034
1034
|
} = M.current, {
|
|
1035
1035
|
layout: C,
|
|
1036
1036
|
panelDataArray: d
|
|
1037
|
-
} = w.current, g =
|
|
1037
|
+
} = w.current, g = St({
|
|
1038
1038
|
layout: x,
|
|
1039
1039
|
panelConstraints: d.map((P) => P.constraints)
|
|
1040
1040
|
});
|
|
1041
|
-
|
|
1041
|
+
yt(C, g) || (v(g), w.current.layout = g, z && z(g), ye(d, g, b.current));
|
|
1042
1042
|
}
|
|
1043
1043
|
}), []), me(() => {
|
|
1044
|
-
M.current.autoSaveId = e, M.current.direction = r, M.current.dragState = m, M.current.id = c, M.current.onLayout = s, M.current.storage =
|
|
1045
|
-
}),
|
|
1044
|
+
M.current.autoSaveId = e, M.current.direction = r, M.current.dragState = m, M.current.id = c, M.current.onLayout = s, M.current.storage = a;
|
|
1045
|
+
}), yr({
|
|
1046
1046
|
committedValuesRef: M,
|
|
1047
1047
|
eagerValuesRef: w,
|
|
1048
1048
|
groupId: c,
|
|
@@ -1057,12 +1057,12 @@ function Xt({
|
|
|
1057
1057
|
if (e) {
|
|
1058
1058
|
if (S.length === 0 || S.length !== x.length)
|
|
1059
1059
|
return;
|
|
1060
|
-
let z =
|
|
1061
|
-
z == null && (z =
|
|
1060
|
+
let z = xt[e];
|
|
1061
|
+
z == null && (z = zr(wr, Cr), xt[e] = z);
|
|
1062
1062
|
const C = [...x], d = new Map(I.current);
|
|
1063
|
-
z(e, C, d, S,
|
|
1063
|
+
z(e, C, d, S, a);
|
|
1064
1064
|
}
|
|
1065
|
-
}, [e, S,
|
|
1065
|
+
}, [e, S, a]), Z(() => {
|
|
1066
1066
|
});
|
|
1067
1067
|
const X = O((x) => {
|
|
1068
1068
|
const {
|
|
@@ -1074,12 +1074,12 @@ function Xt({
|
|
|
1074
1074
|
if (x.constraints.collapsible) {
|
|
1075
1075
|
const g = d.map((oe) => oe.constraints), {
|
|
1076
1076
|
collapsedSize: P = 0,
|
|
1077
|
-
panelSize:
|
|
1077
|
+
panelSize: L,
|
|
1078
1078
|
pivotIndices: q
|
|
1079
1079
|
} = de(d, x, C);
|
|
1080
|
-
if (E(
|
|
1081
|
-
I.current.set(x.id,
|
|
1082
|
-
const ie = ve(d, x) === d.length - 1 ?
|
|
1080
|
+
if (E(L != null, `Panel size not found for panel "${x.id}"`), !le(L, P)) {
|
|
1081
|
+
I.current.set(x.id, L);
|
|
1082
|
+
const ie = ve(d, x) === d.length - 1 ? L - P : P - L, F = Ie({
|
|
1083
1083
|
delta: ie,
|
|
1084
1084
|
initialLayout: C,
|
|
1085
1085
|
panelConstraints: g,
|
|
@@ -1087,7 +1087,7 @@ function Xt({
|
|
|
1087
1087
|
prevLayout: C,
|
|
1088
1088
|
trigger: "imperative-api"
|
|
1089
1089
|
});
|
|
1090
|
-
|
|
1090
|
+
Le(C, F) || (v(F), w.current.layout = F, z && z(F), ye(d, F, b.current));
|
|
1091
1091
|
}
|
|
1092
1092
|
}
|
|
1093
1093
|
}, []), j = O((x, z) => {
|
|
@@ -1099,24 +1099,24 @@ function Xt({
|
|
|
1099
1099
|
} = w.current;
|
|
1100
1100
|
if (x.constraints.collapsible) {
|
|
1101
1101
|
const P = g.map((ee) => ee.constraints), {
|
|
1102
|
-
collapsedSize:
|
|
1102
|
+
collapsedSize: L = 0,
|
|
1103
1103
|
panelSize: q = 0,
|
|
1104
1104
|
minSize: oe = 0,
|
|
1105
1105
|
pivotIndices: ie
|
|
1106
1106
|
} = de(g, x, d), F = z ?? oe;
|
|
1107
|
-
if (
|
|
1108
|
-
const ee = I.current.get(x.id), Ce = ee != null && ee >= F ? ee : F,
|
|
1109
|
-
delta:
|
|
1107
|
+
if (le(q, L)) {
|
|
1108
|
+
const ee = I.current.get(x.id), Ce = ee != null && ee >= F ? ee : F, Oe = ve(g, x) === g.length - 1 ? q - Ce : Ce - q, Q = Ie({
|
|
1109
|
+
delta: Oe,
|
|
1110
1110
|
initialLayout: d,
|
|
1111
1111
|
panelConstraints: P,
|
|
1112
1112
|
pivotIndices: ie,
|
|
1113
1113
|
prevLayout: d,
|
|
1114
1114
|
trigger: "imperative-api"
|
|
1115
1115
|
});
|
|
1116
|
-
|
|
1116
|
+
Le(d, Q) || (v(Q), w.current.layout = Q, C && C(Q), ye(g, Q, b.current));
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
|
-
}, []),
|
|
1119
|
+
}, []), V = O((x) => {
|
|
1120
1120
|
const {
|
|
1121
1121
|
layout: z,
|
|
1122
1122
|
panelDataArray: C
|
|
@@ -1128,14 +1128,14 @@ function Xt({
|
|
|
1128
1128
|
const {
|
|
1129
1129
|
panelDataArray: C
|
|
1130
1130
|
} = w.current, d = ve(C, x);
|
|
1131
|
-
return
|
|
1131
|
+
return br({
|
|
1132
1132
|
defaultSize: z,
|
|
1133
1133
|
dragState: m,
|
|
1134
1134
|
layout: S,
|
|
1135
1135
|
panelData: C,
|
|
1136
1136
|
panelIndex: d
|
|
1137
1137
|
});
|
|
1138
|
-
}, [m, S]),
|
|
1138
|
+
}, [m, S]), N = O((x) => {
|
|
1139
1139
|
const {
|
|
1140
1140
|
layout: z,
|
|
1141
1141
|
panelDataArray: C
|
|
@@ -1144,7 +1144,7 @@ function Xt({
|
|
|
1144
1144
|
collapsible: g,
|
|
1145
1145
|
panelSize: P
|
|
1146
1146
|
} = de(C, x, z);
|
|
1147
|
-
return E(P != null, `Panel size not found for panel "${x.id}"`), g === !0 &&
|
|
1147
|
+
return E(P != null, `Panel size not found for panel "${x.id}"`), g === !0 && le(P, d);
|
|
1148
1148
|
}, []), W = O((x) => {
|
|
1149
1149
|
const {
|
|
1150
1150
|
layout: z,
|
|
@@ -1155,7 +1155,7 @@ function Xt({
|
|
|
1155
1155
|
panelSize: P
|
|
1156
1156
|
} = de(C, x, z);
|
|
1157
1157
|
return E(P != null, `Panel size not found for panel "${x.id}"`), !g || ge(P, d) > 0;
|
|
1158
|
-
}, []),
|
|
1158
|
+
}, []), $ = O((x) => {
|
|
1159
1159
|
const {
|
|
1160
1160
|
panelDataArray: z
|
|
1161
1161
|
} = w.current;
|
|
@@ -1177,17 +1177,17 @@ function Xt({
|
|
|
1177
1177
|
} = w.current;
|
|
1178
1178
|
let P = null;
|
|
1179
1179
|
if (x) {
|
|
1180
|
-
const q =
|
|
1180
|
+
const q = Pr(x, g, C);
|
|
1181
1181
|
q && (I.current = new Map(Object.entries(q.expandToSizes)), P = q.layout);
|
|
1182
1182
|
}
|
|
1183
|
-
P == null && (P =
|
|
1183
|
+
P == null && (P = xr({
|
|
1184
1184
|
panelDataArray: g
|
|
1185
1185
|
}));
|
|
1186
|
-
const
|
|
1186
|
+
const L = St({
|
|
1187
1187
|
layout: P,
|
|
1188
1188
|
panelConstraints: g.map((q) => q.constraints)
|
|
1189
1189
|
});
|
|
1190
|
-
|
|
1190
|
+
yt(d, L) || (v(L), w.current.layout = L, z && z(L), ye(g, L, b.current));
|
|
1191
1191
|
}
|
|
1192
1192
|
}), me(() => {
|
|
1193
1193
|
const x = w.current;
|
|
@@ -1204,7 +1204,7 @@ function Xt({
|
|
|
1204
1204
|
if (!P)
|
|
1205
1205
|
return () => null;
|
|
1206
1206
|
const {
|
|
1207
|
-
direction:
|
|
1207
|
+
direction: L,
|
|
1208
1208
|
dragState: q,
|
|
1209
1209
|
id: oe,
|
|
1210
1210
|
keyboardResizeBy: ie,
|
|
@@ -1213,20 +1213,20 @@ function Xt({
|
|
|
1213
1213
|
layout: ee,
|
|
1214
1214
|
panelDataArray: Ce
|
|
1215
1215
|
} = w.current, {
|
|
1216
|
-
initialLayout:
|
|
1217
|
-
} = q ?? {},
|
|
1218
|
-
let Q =
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1221
|
-
const
|
|
1216
|
+
initialLayout: Ne
|
|
1217
|
+
} = q ?? {}, Oe = qt(oe, x, P);
|
|
1218
|
+
let Q = Sr(g, x, L, q, ie, P);
|
|
1219
|
+
const ut = L === "horizontal";
|
|
1220
|
+
ut && z && (Q = -Q);
|
|
1221
|
+
const Sn = Ce.map((xn) => xn.constraints), Ee = Ie({
|
|
1222
1222
|
delta: Q,
|
|
1223
|
-
initialLayout:
|
|
1224
|
-
panelConstraints:
|
|
1225
|
-
pivotIndices:
|
|
1223
|
+
initialLayout: Ne ?? ee,
|
|
1224
|
+
panelConstraints: Sn,
|
|
1225
|
+
pivotIndices: Oe,
|
|
1226
1226
|
prevLayout: ee,
|
|
1227
1227
|
trigger: Lt(g) ? "keyboard" : "mouse-or-touch"
|
|
1228
|
-
}),
|
|
1229
|
-
(
|
|
1228
|
+
}), dt = !Le(ee, Ee);
|
|
1229
|
+
(_t(g) || kt(g)) && R.current != Q && (R.current = Q, !dt && Q !== 0 ? ut ? Ye(x, Q < 0 ? Ht : Vt) : Ye(x, Q < 0 ? $t : Ft) : Ye(x, 0)), dt && (v(Ee), w.current.layout = Ee, F && F(Ee), ye(Ce, Ee, b.current));
|
|
1230
1230
|
};
|
|
1231
1231
|
}, []), H = O((x, z) => {
|
|
1232
1232
|
const {
|
|
@@ -1235,11 +1235,11 @@ function Xt({
|
|
|
1235
1235
|
layout: d,
|
|
1236
1236
|
panelDataArray: g
|
|
1237
1237
|
} = w.current, P = g.map((ee) => ee.constraints), {
|
|
1238
|
-
panelSize:
|
|
1238
|
+
panelSize: L,
|
|
1239
1239
|
pivotIndices: q
|
|
1240
1240
|
} = de(g, x, d);
|
|
1241
|
-
E(
|
|
1242
|
-
const ie = ve(g, x) === g.length - 1 ?
|
|
1241
|
+
E(L != null, `Panel size not found for panel "${x.id}"`);
|
|
1242
|
+
const ie = ve(g, x) === g.length - 1 ? L - z : z - L, F = Ie({
|
|
1243
1243
|
delta: ie,
|
|
1244
1244
|
initialLayout: d,
|
|
1245
1245
|
panelConstraints: P,
|
|
@@ -1247,7 +1247,7 @@ function Xt({
|
|
|
1247
1247
|
prevLayout: d,
|
|
1248
1248
|
trigger: "imperative-api"
|
|
1249
1249
|
});
|
|
1250
|
-
|
|
1250
|
+
Le(d, F) || (v(F), w.current.layout = F, C && C(F), ye(g, F, b.current));
|
|
1251
1251
|
}, []), Y = O((x, z) => {
|
|
1252
1252
|
const {
|
|
1253
1253
|
layout: C,
|
|
@@ -1256,14 +1256,14 @@ function Xt({
|
|
|
1256
1256
|
collapsedSize: g = 0,
|
|
1257
1257
|
collapsible: P
|
|
1258
1258
|
} = z, {
|
|
1259
|
-
collapsedSize:
|
|
1259
|
+
collapsedSize: L = 0,
|
|
1260
1260
|
collapsible: q,
|
|
1261
1261
|
maxSize: oe = 100,
|
|
1262
1262
|
minSize: ie = 0
|
|
1263
1263
|
} = x.constraints, {
|
|
1264
1264
|
panelSize: F
|
|
1265
1265
|
} = de(d, x, C);
|
|
1266
|
-
F != null && (P && q &&
|
|
1266
|
+
F != null && (P && q && le(F, g) ? le(g, L) || H(x, L) : F < ie ? H(x, ie) : F > oe && H(x, oe));
|
|
1267
1267
|
}, [H]), G = O((x, z) => {
|
|
1268
1268
|
const {
|
|
1269
1269
|
direction: C
|
|
@@ -1293,27 +1293,27 @@ function Xt({
|
|
|
1293
1293
|
direction: r,
|
|
1294
1294
|
dragState: m,
|
|
1295
1295
|
expandPanel: j,
|
|
1296
|
-
getPanelSize:
|
|
1296
|
+
getPanelSize: V,
|
|
1297
1297
|
getPanelStyle: A,
|
|
1298
1298
|
groupId: c,
|
|
1299
|
-
isPanelCollapsed:
|
|
1299
|
+
isPanelCollapsed: N,
|
|
1300
1300
|
isPanelExpanded: W,
|
|
1301
1301
|
reevaluatePanelConstraints: Y,
|
|
1302
|
-
registerPanel:
|
|
1302
|
+
registerPanel: $,
|
|
1303
1303
|
registerResizeHandle: T,
|
|
1304
1304
|
resizePanel: H,
|
|
1305
1305
|
startDragging: G,
|
|
1306
1306
|
stopDragging: re,
|
|
1307
1307
|
unregisterPanel: he,
|
|
1308
1308
|
panelGroupElement: h.current
|
|
1309
|
-
}), [X, m, r, j,
|
|
1309
|
+
}), [X, m, r, j, V, A, c, N, W, Y, $, T, H, G, re, he]), ae = {
|
|
1310
1310
|
display: "flex",
|
|
1311
1311
|
flexDirection: r === "horizontal" ? "row" : "column",
|
|
1312
1312
|
height: "100%",
|
|
1313
1313
|
overflow: "hidden",
|
|
1314
1314
|
width: "100%"
|
|
1315
1315
|
};
|
|
1316
|
-
return be(
|
|
1316
|
+
return be($e.Provider, {
|
|
1317
1317
|
value: se
|
|
1318
1318
|
}, be(p, {
|
|
1319
1319
|
...u,
|
|
@@ -1322,7 +1322,7 @@ function Xt({
|
|
|
1322
1322
|
id: o,
|
|
1323
1323
|
ref: h,
|
|
1324
1324
|
style: {
|
|
1325
|
-
...
|
|
1325
|
+
...ae,
|
|
1326
1326
|
...f
|
|
1327
1327
|
},
|
|
1328
1328
|
// CSS selectors
|
|
@@ -1331,12 +1331,12 @@ function Xt({
|
|
|
1331
1331
|
[K.groupId]: c
|
|
1332
1332
|
}));
|
|
1333
1333
|
}
|
|
1334
|
-
const
|
|
1334
|
+
const Er = Ve((e, t) => be(Yt, {
|
|
1335
1335
|
...e,
|
|
1336
1336
|
forwardedRef: t
|
|
1337
1337
|
}));
|
|
1338
|
-
|
|
1339
|
-
|
|
1338
|
+
Yt.displayName = "PanelGroup";
|
|
1339
|
+
Er.displayName = "forwardRef(PanelGroup)";
|
|
1340
1340
|
function ve(e, t) {
|
|
1341
1341
|
return e.findIndex((n) => n === t || n.id === t.id);
|
|
1342
1342
|
}
|
|
@@ -1348,7 +1348,7 @@ function de(e, t, n) {
|
|
|
1348
1348
|
pivotIndices: o
|
|
1349
1349
|
};
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1351
|
+
function Ir({
|
|
1352
1352
|
disabled: e,
|
|
1353
1353
|
handleId: t,
|
|
1354
1354
|
resizeHandler: n,
|
|
@@ -1374,12 +1374,12 @@ function wr({
|
|
|
1374
1374
|
}
|
|
1375
1375
|
case "F6": {
|
|
1376
1376
|
s.preventDefault();
|
|
1377
|
-
const
|
|
1378
|
-
E(
|
|
1379
|
-
const
|
|
1377
|
+
const l = i.getAttribute(K.groupId);
|
|
1378
|
+
E(l, `No group element found for id "${l}"`);
|
|
1379
|
+
const a = Me(l, r), f = Bt(l, t, r);
|
|
1380
1380
|
E(f !== null, `No resize element found for id "${t}"`);
|
|
1381
|
-
const p = s.shiftKey ? f > 0 ? f - 1 :
|
|
1382
|
-
|
|
1381
|
+
const p = s.shiftKey ? f > 0 ? f - 1 : a.length - 1 : f + 1 < a.length ? f + 1 : 0;
|
|
1382
|
+
a[p].focus();
|
|
1383
1383
|
break;
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
@@ -1389,7 +1389,7 @@ function wr({
|
|
|
1389
1389
|
};
|
|
1390
1390
|
}, [r, e, t, n]);
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1392
|
+
function Rr({
|
|
1393
1393
|
children: e = null,
|
|
1394
1394
|
className: t = "",
|
|
1395
1395
|
disabled: n = !1,
|
|
@@ -1397,8 +1397,8 @@ function Cr({
|
|
|
1397
1397
|
id: i,
|
|
1398
1398
|
onBlur: o,
|
|
1399
1399
|
onClick: s,
|
|
1400
|
-
onDragging:
|
|
1401
|
-
onFocus:
|
|
1400
|
+
onDragging: l,
|
|
1401
|
+
onFocus: a,
|
|
1402
1402
|
onPointerDown: f,
|
|
1403
1403
|
onPointerUp: p,
|
|
1404
1404
|
style: u = {},
|
|
@@ -1409,14 +1409,14 @@ function Cr({
|
|
|
1409
1409
|
var y, S;
|
|
1410
1410
|
const v = B(null), D = B({
|
|
1411
1411
|
onClick: s,
|
|
1412
|
-
onDragging:
|
|
1412
|
+
onDragging: l,
|
|
1413
1413
|
onPointerDown: f,
|
|
1414
1414
|
onPointerUp: p
|
|
1415
1415
|
});
|
|
1416
1416
|
Z(() => {
|
|
1417
|
-
D.current.onClick = s, D.current.onDragging =
|
|
1417
|
+
D.current.onClick = s, D.current.onDragging = l, D.current.onPointerDown = f, D.current.onPointerUp = p;
|
|
1418
1418
|
});
|
|
1419
|
-
const b =
|
|
1419
|
+
const b = nt($e);
|
|
1420
1420
|
if (b === null)
|
|
1421
1421
|
throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");
|
|
1422
1422
|
const {
|
|
@@ -1426,7 +1426,7 @@ function Cr({
|
|
|
1426
1426
|
startDragging: w,
|
|
1427
1427
|
stopDragging: X,
|
|
1428
1428
|
panelGroupElement: j
|
|
1429
|
-
} = b,
|
|
1429
|
+
} = b, V = st(i), [A, N] = ue("inactive"), [W, $] = ue(!1), [T, H] = ue(null), Y = B({
|
|
1430
1430
|
state: A
|
|
1431
1431
|
});
|
|
1432
1432
|
me(() => {
|
|
@@ -1435,28 +1435,28 @@ function Cr({
|
|
|
1435
1435
|
if (n)
|
|
1436
1436
|
H(null);
|
|
1437
1437
|
else {
|
|
1438
|
-
const se = M(
|
|
1438
|
+
const se = M(V);
|
|
1439
1439
|
H(() => se);
|
|
1440
1440
|
}
|
|
1441
|
-
}, [n,
|
|
1441
|
+
}, [n, V, M]);
|
|
1442
1442
|
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;
|
|
1443
1443
|
return Z(() => {
|
|
1444
1444
|
if (n || T == null)
|
|
1445
1445
|
return;
|
|
1446
1446
|
const se = v.current;
|
|
1447
1447
|
E(se, "Element ref not attached");
|
|
1448
|
-
let
|
|
1449
|
-
return
|
|
1448
|
+
let ae = !1;
|
|
1449
|
+
return dr(V, se, I, {
|
|
1450
1450
|
coarse: G,
|
|
1451
1451
|
fine: re
|
|
1452
1452
|
}, (z, C, d) => {
|
|
1453
1453
|
if (!C) {
|
|
1454
|
-
|
|
1454
|
+
N("inactive");
|
|
1455
1455
|
return;
|
|
1456
1456
|
}
|
|
1457
1457
|
switch (z) {
|
|
1458
1458
|
case "down": {
|
|
1459
|
-
|
|
1459
|
+
N("drag"), ae = !1, E(d, 'Expected event to be defined for "down" action'), w(V, d);
|
|
1460
1460
|
const {
|
|
1461
1461
|
onDragging: g,
|
|
1462
1462
|
onPointerDown: P
|
|
@@ -1468,24 +1468,24 @@ function Cr({
|
|
|
1468
1468
|
const {
|
|
1469
1469
|
state: g
|
|
1470
1470
|
} = Y.current;
|
|
1471
|
-
|
|
1471
|
+
ae = !0, g !== "drag" && N("hover"), E(d, 'Expected event to be defined for "move" action'), T(d);
|
|
1472
1472
|
break;
|
|
1473
1473
|
}
|
|
1474
1474
|
case "up": {
|
|
1475
|
-
|
|
1475
|
+
N("hover"), X();
|
|
1476
1476
|
const {
|
|
1477
1477
|
onClick: g,
|
|
1478
1478
|
onDragging: P,
|
|
1479
|
-
onPointerUp:
|
|
1479
|
+
onPointerUp: L
|
|
1480
1480
|
} = D.current;
|
|
1481
|
-
P == null || P(!1),
|
|
1481
|
+
P == null || P(!1), L == null || L(), ae || g == null || g();
|
|
1482
1482
|
break;
|
|
1483
1483
|
}
|
|
1484
1484
|
}
|
|
1485
1485
|
});
|
|
1486
|
-
}, [G, I, n, re, M,
|
|
1486
|
+
}, [G, I, n, re, M, V, T, w, X]), Ir({
|
|
1487
1487
|
disabled: n,
|
|
1488
|
-
handleId:
|
|
1488
|
+
handleId: V,
|
|
1489
1489
|
resizeHandler: T,
|
|
1490
1490
|
panelGroupElement: j
|
|
1491
1491
|
}), be(h, {
|
|
@@ -1494,10 +1494,10 @@ function Cr({
|
|
|
1494
1494
|
className: t,
|
|
1495
1495
|
id: i,
|
|
1496
1496
|
onBlur: () => {
|
|
1497
|
-
|
|
1497
|
+
$(!1), o == null || o();
|
|
1498
1498
|
},
|
|
1499
1499
|
onFocus: () => {
|
|
1500
|
-
|
|
1500
|
+
$(!0), a == null || a();
|
|
1501
1501
|
},
|
|
1502
1502
|
ref: v,
|
|
1503
1503
|
role: "separator",
|
|
@@ -1515,18 +1515,18 @@ function Cr({
|
|
|
1515
1515
|
[K.resizeHandle]: "",
|
|
1516
1516
|
[K.resizeHandleActive]: A === "drag" ? "pointer" : W ? "keyboard" : void 0,
|
|
1517
1517
|
[K.resizeHandleEnabled]: !n,
|
|
1518
|
-
[K.resizeHandleId]:
|
|
1518
|
+
[K.resizeHandleId]: V,
|
|
1519
1519
|
[K.resizeHandleState]: A
|
|
1520
1520
|
});
|
|
1521
1521
|
}
|
|
1522
|
-
|
|
1523
|
-
function
|
|
1524
|
-
var
|
|
1522
|
+
Rr.displayName = "PanelResizeHandle";
|
|
1523
|
+
function jt() {
|
|
1524
|
+
var a, f;
|
|
1525
1525
|
const e = te((p) => p.card), t = te((p) => p.frame), n = U(
|
|
1526
|
-
() =>
|
|
1526
|
+
() => Yn(t, e),
|
|
1527
1527
|
[t, e]
|
|
1528
|
-
), { manifest: r } =
|
|
1529
|
-
((
|
|
1528
|
+
), { manifest: r } = Pt(
|
|
1529
|
+
((a = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : a.url) || ""
|
|
1530
1530
|
), i = U(
|
|
1531
1531
|
() => {
|
|
1532
1532
|
var p;
|
|
@@ -1538,39 +1538,39 @@ function Yt() {
|
|
|
1538
1538
|
);
|
|
1539
1539
|
},
|
|
1540
1540
|
[r, (f = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : f.componentName]
|
|
1541
|
-
), o =
|
|
1542
|
-
() =>
|
|
1541
|
+
), o = At(n, i), s = U(
|
|
1542
|
+
() => Mt({
|
|
1543
1543
|
frame: t,
|
|
1544
1544
|
configCard: n,
|
|
1545
1545
|
isMultiInputVisual: o === "multiple"
|
|
1546
1546
|
}),
|
|
1547
1547
|
[t, n, o]
|
|
1548
|
-
),
|
|
1548
|
+
), l = U(() => {
|
|
1549
1549
|
const p = s.findIndex(
|
|
1550
1550
|
(u) => (u == null ? void 0 : u.id) === e.id
|
|
1551
1551
|
);
|
|
1552
1552
|
return p < 0 ? -1 : Qe(e, p);
|
|
1553
1553
|
}, [s, e]);
|
|
1554
|
-
return U(() => !n || o !== "multiple" ||
|
|
1554
|
+
return U(() => !n || o !== "multiple" || l < 0 ? e.type : _e(
|
|
1555
1555
|
e,
|
|
1556
|
-
|
|
1556
|
+
l,
|
|
1557
1557
|
i == null ? void 0 : i.slots
|
|
1558
|
-
) ?? e.type, [n, o,
|
|
1558
|
+
) ?? e.type, [n, o, l, e, i == null ? void 0 : i.slots]);
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1560
|
+
function Qt({
|
|
1561
1561
|
storeValue: e,
|
|
1562
1562
|
defaultValue: t = "",
|
|
1563
1563
|
onStoreUpdate: n,
|
|
1564
1564
|
delay: r = 300
|
|
1565
1565
|
}) {
|
|
1566
|
-
const [i, o] = ue(e ?? t), s = B(null),
|
|
1567
|
-
s.current && (clearTimeout(s.current), s.current = null), f.current &&
|
|
1566
|
+
const [i, o] = ue(e ?? t), s = B(null), l = B(i), a = B(e), f = B(!1), p = O(() => {
|
|
1567
|
+
s.current && (clearTimeout(s.current), s.current = null), f.current && l.current !== (a.current ?? t) && (n(l.current), a.current = l.current);
|
|
1568
1568
|
}, [t, n]);
|
|
1569
1569
|
Z(() => {
|
|
1570
|
-
if (e !==
|
|
1570
|
+
if (e !== a.current) {
|
|
1571
1571
|
s.current && (clearTimeout(s.current), s.current = null);
|
|
1572
1572
|
const c = e ?? t;
|
|
1573
|
-
o(c),
|
|
1573
|
+
o(c), l.current = c, a.current = e, f.current = !1;
|
|
1574
1574
|
}
|
|
1575
1575
|
}, [e, t]), Z(() => {
|
|
1576
1576
|
if (f.current)
|
|
@@ -1585,24 +1585,24 @@ function jt({
|
|
|
1585
1585
|
const u = O(
|
|
1586
1586
|
(c) => {
|
|
1587
1587
|
const h = c ?? t;
|
|
1588
|
-
f.current = !0,
|
|
1588
|
+
f.current = !0, l.current = h, o(h);
|
|
1589
1589
|
},
|
|
1590
1590
|
[t]
|
|
1591
1591
|
);
|
|
1592
1592
|
return { value: i, onChange: u, flush: p };
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1594
|
+
function Jt({
|
|
1595
1595
|
queryClient: e,
|
|
1596
1596
|
readQueryKey: t,
|
|
1597
1597
|
setRunSql: n
|
|
1598
1598
|
}) {
|
|
1599
|
-
|
|
1599
|
+
Xn(), setTimeout(() => {
|
|
1600
1600
|
e.resetQueries({ queryKey: t(), exact: !0 }), n(!0);
|
|
1601
1601
|
}, 0);
|
|
1602
1602
|
}
|
|
1603
|
-
const
|
|
1604
|
-
function
|
|
1605
|
-
const n = te((b) => b.card.sql), r = te((b) => b.sqlGen), i = te((b) => b.card), o =
|
|
1603
|
+
const Dr = 300;
|
|
1604
|
+
function Ar({ className: e }, t) {
|
|
1605
|
+
const n = te((b) => b.card.sql), r = te((b) => b.sqlGen), i = te((b) => b.card), o = jt(), { setCardSql: s, setSqlGen: l, setRunSql: a } = Ct(), f = U(() => o !== i.type ? { ...i, type: o } : i, [i, o]), { queryKey: p } = rt(f), u = wt(), c = B(p);
|
|
1606
1606
|
c.current = p;
|
|
1607
1607
|
const h = B(r);
|
|
1608
1608
|
h.current = r;
|
|
@@ -1615,18 +1615,18 @@ function Ir({ className: e }, t) {
|
|
|
1615
1615
|
value: y,
|
|
1616
1616
|
onChange: S,
|
|
1617
1617
|
flush: v
|
|
1618
|
-
} =
|
|
1618
|
+
} = Qt({
|
|
1619
1619
|
storeValue: n,
|
|
1620
1620
|
defaultValue: "",
|
|
1621
1621
|
onStoreUpdate: m,
|
|
1622
|
-
delay:
|
|
1622
|
+
delay: Dr
|
|
1623
1623
|
});
|
|
1624
|
-
Z(() =>
|
|
1624
|
+
Z(() => Dt(v), [v]);
|
|
1625
1625
|
function D(b) {
|
|
1626
|
-
S(b),
|
|
1626
|
+
S(b), Fn(h.current) || l({});
|
|
1627
1627
|
}
|
|
1628
1628
|
return /* @__PURE__ */ _("div", { className: "relative h-full w-full", children: /* @__PURE__ */ _(
|
|
1629
|
-
|
|
1629
|
+
Et,
|
|
1630
1630
|
{
|
|
1631
1631
|
ref: t,
|
|
1632
1632
|
value: y ?? "",
|
|
@@ -1638,45 +1638,45 @@ function Ir({ className: e }, t) {
|
|
|
1638
1638
|
placeholder: "Write your SQL here",
|
|
1639
1639
|
className: e,
|
|
1640
1640
|
onKeyDown: (b) => {
|
|
1641
|
-
b.key === "Enter" && b.shiftKey && (b.preventDefault(),
|
|
1641
|
+
b.key === "Enter" && b.shiftKey && (b.preventDefault(), Jt({
|
|
1642
1642
|
queryClient: u,
|
|
1643
1643
|
readQueryKey: () => c.current,
|
|
1644
|
-
setRunSql:
|
|
1644
|
+
setRunSql: a
|
|
1645
1645
|
}));
|
|
1646
1646
|
}
|
|
1647
1647
|
}
|
|
1648
1648
|
) });
|
|
1649
1649
|
}
|
|
1650
|
-
const
|
|
1650
|
+
const vo = Ve(Ar), Mr = 300, Nr = `# 'data' holds the SQL result.
|
|
1651
1651
|
# Set 'result' to a list of dicts to replace it, for example:
|
|
1652
1652
|
# import pandas as pd
|
|
1653
1653
|
# result = pd.DataFrame(data).to_dict('records')`;
|
|
1654
|
-
function
|
|
1655
|
-
const n = te((m) => m.card.python), r = te((m) => m.card), i =
|
|
1656
|
-
p.current =
|
|
1657
|
-
const { value: u, onChange: c, flush: h } =
|
|
1654
|
+
function Lr({ className: e }, t) {
|
|
1655
|
+
const n = te((m) => m.card.python), r = te((m) => m.card), i = jt(), { setCardPython: o, setRunSql: s } = Ct(), l = U(() => i !== r.type ? { ...r, type: i } : r, [r, i]), { queryKey: a } = rt(l), f = wt(), p = B(a);
|
|
1656
|
+
p.current = a;
|
|
1657
|
+
const { value: u, onChange: c, flush: h } = Qt({
|
|
1658
1658
|
storeValue: n,
|
|
1659
1659
|
onStoreUpdate: o,
|
|
1660
|
-
delay:
|
|
1660
|
+
delay: Mr
|
|
1661
1661
|
});
|
|
1662
|
-
return Z(() =>
|
|
1663
|
-
|
|
1662
|
+
return Z(() => Dt(h), [h]), /* @__PURE__ */ _(
|
|
1663
|
+
Et,
|
|
1664
1664
|
{
|
|
1665
1665
|
ref: t,
|
|
1666
1666
|
value: u ?? "",
|
|
1667
1667
|
onValueChange: c,
|
|
1668
1668
|
language: "python",
|
|
1669
|
-
placeholder:
|
|
1669
|
+
placeholder: Nr,
|
|
1670
1670
|
ariaLabel: "Python code",
|
|
1671
1671
|
embedded: !0,
|
|
1672
1672
|
hideLineNumbers: !0,
|
|
1673
1673
|
wrapLines: !0,
|
|
1674
|
-
className:
|
|
1674
|
+
className: ot(
|
|
1675
1675
|
"[&_.code-editor-pre]:!pt-2 [&_.code-editor-textarea]:!pt-2",
|
|
1676
1676
|
e
|
|
1677
1677
|
),
|
|
1678
1678
|
onKeyDown: (m) => {
|
|
1679
|
-
m.key === "Enter" && m.shiftKey && (m.preventDefault(),
|
|
1679
|
+
m.key === "Enter" && m.shiftKey && (m.preventDefault(), Jt({
|
|
1680
1680
|
queryClient: f,
|
|
1681
1681
|
readQueryKey: () => p.current,
|
|
1682
1682
|
setRunSql: s
|
|
@@ -1685,32 +1685,32 @@ function Ar({ className: e }, t) {
|
|
|
1685
1685
|
}
|
|
1686
1686
|
);
|
|
1687
1687
|
}
|
|
1688
|
-
const
|
|
1689
|
-
function
|
|
1690
|
-
var se,
|
|
1691
|
-
const t =
|
|
1692
|
-
() =>
|
|
1688
|
+
const So = Ve(Lr);
|
|
1689
|
+
function _r({ card: e }) {
|
|
1690
|
+
var se, ae, x, z, C;
|
|
1691
|
+
const t = In(), [n, r] = ue({}), { authToken: i } = Rn(), o = Kn(i == null ? void 0 : i.accessToken), { compiledAppearance: s } = Jn(), l = U(
|
|
1692
|
+
() => Dn(s),
|
|
1693
1693
|
[s]
|
|
1694
|
-
),
|
|
1694
|
+
), a = te((d) => d.frame), f = te(
|
|
1695
1695
|
(d) => d.inlineFilterValuesMap[e.id]
|
|
1696
1696
|
), p = te(
|
|
1697
1697
|
(d) => d.actions.setCardInlineFilterValue
|
|
1698
1698
|
), u = te(
|
|
1699
1699
|
(d) => d.actions.removeCardInlineFilterValue
|
|
1700
|
-
), c = e, { getCard: h, manifest: m } =
|
|
1700
|
+
), c = e, { getCard: h, manifest: m } = Pt(
|
|
1701
1701
|
((se = c.customCardPreferences) == null ? void 0 : se.url) || ""
|
|
1702
|
-
), y = (
|
|
1702
|
+
), y = (ae = m == null ? void 0 : m.visuals) == null ? void 0 : ae.find(
|
|
1703
1703
|
(d) => {
|
|
1704
1704
|
var g;
|
|
1705
1705
|
return d.name === ((g = c.customCardPreferences) == null ? void 0 : g.componentName);
|
|
1706
1706
|
}
|
|
1707
|
-
), S =
|
|
1708
|
-
() =>
|
|
1709
|
-
frame:
|
|
1707
|
+
), S = At(c, y) ?? "single", v = U(
|
|
1708
|
+
() => Mt({
|
|
1709
|
+
frame: a,
|
|
1710
1710
|
configCard: c,
|
|
1711
1711
|
isMultiInputVisual: S === "multiple"
|
|
1712
1712
|
}),
|
|
1713
|
-
[
|
|
1713
|
+
[a, c, S]
|
|
1714
1714
|
), D = U(() => {
|
|
1715
1715
|
const d = v.findIndex(
|
|
1716
1716
|
(g) => (g == null ? void 0 : g.id) === e.id
|
|
@@ -1728,50 +1728,50 @@ function Mr({ card: e }) {
|
|
|
1728
1728
|
python: "",
|
|
1729
1729
|
config: void 0,
|
|
1730
1730
|
queryConfig: void 0
|
|
1731
|
-
} : b !== e.type ? { ...e, type: b } : e, [e, b, S]), { data: R, effectiveCardConfig: M } =
|
|
1732
|
-
() =>
|
|
1731
|
+
} : b !== e.type ? { ...e, type: b } : e, [e, b, S]), { data: R, effectiveCardConfig: M } = rt(I), w = An(), X = Ge((d) => d.dashboard.filters), j = Ge((d) => d.filterValues), V = Ge((d) => d.selectedSheetId), A = U(
|
|
1732
|
+
() => Mn({
|
|
1733
1733
|
card: e,
|
|
1734
|
-
sheetId:
|
|
1734
|
+
sheetId: V || "",
|
|
1735
1735
|
inlineFilterValues: f,
|
|
1736
1736
|
setInlineFilterValue: (d) => p(e.id, d),
|
|
1737
1737
|
removeInlineFilterValue: (d) => u(e.id, d)
|
|
1738
1738
|
}),
|
|
1739
1739
|
[
|
|
1740
1740
|
e,
|
|
1741
|
-
|
|
1741
|
+
V,
|
|
1742
1742
|
f,
|
|
1743
1743
|
p,
|
|
1744
1744
|
u
|
|
1745
1745
|
]
|
|
1746
|
-
), { cardFilters:
|
|
1747
|
-
() =>
|
|
1746
|
+
), { cardFilters: N, cardFilterValues: W } = U(
|
|
1747
|
+
() => Nn({
|
|
1748
1748
|
card: e,
|
|
1749
1749
|
transientContexts: w,
|
|
1750
1750
|
filters: X,
|
|
1751
1751
|
filterValues: j,
|
|
1752
|
-
selectedSheetId:
|
|
1752
|
+
selectedSheetId: V
|
|
1753
1753
|
}),
|
|
1754
1754
|
[
|
|
1755
1755
|
e,
|
|
1756
1756
|
w,
|
|
1757
1757
|
X,
|
|
1758
1758
|
j,
|
|
1759
|
-
|
|
1759
|
+
V
|
|
1760
1760
|
]
|
|
1761
|
-
),
|
|
1761
|
+
), $ = O(
|
|
1762
1762
|
(d, g) => {
|
|
1763
|
-
const P =
|
|
1764
|
-
r((
|
|
1765
|
-
...
|
|
1763
|
+
const P = jn(g);
|
|
1764
|
+
r((L) => ({
|
|
1765
|
+
...L,
|
|
1766
1766
|
[d]: P
|
|
1767
1767
|
}));
|
|
1768
1768
|
},
|
|
1769
1769
|
[]
|
|
1770
|
-
), T = (x = c.customCardPreferences) == null ? void 0 : x.componentName, H = T ? h(T) : null, Y =
|
|
1770
|
+
), T = (x = c.customCardPreferences) == null ? void 0 : x.componentName, H = T ? h(T) : null, Y = Ln(
|
|
1771
1771
|
(z = c.customCardPreferences) == null ? void 0 : z.settings,
|
|
1772
1772
|
c
|
|
1773
1773
|
), G = U(
|
|
1774
|
-
() =>
|
|
1774
|
+
() => Qn(v),
|
|
1775
1775
|
[v]
|
|
1776
1776
|
), re = U(
|
|
1777
1777
|
() => G.map(
|
|
@@ -1783,8 +1783,8 @@ function Mr({ card: e }) {
|
|
|
1783
1783
|
),
|
|
1784
1784
|
[G, y == null ? void 0 : y.slots]
|
|
1785
1785
|
), he = U(
|
|
1786
|
-
() =>
|
|
1787
|
-
S === "multiple" ?
|
|
1786
|
+
() => _n(
|
|
1787
|
+
S === "multiple" ? kn({
|
|
1788
1788
|
slotOrderedCards: G,
|
|
1789
1789
|
multiInputData: n,
|
|
1790
1790
|
valueFormatPreferences: t
|
|
@@ -1810,26 +1810,26 @@ function Mr({ card: e }) {
|
|
|
1810
1810
|
]
|
|
1811
1811
|
);
|
|
1812
1812
|
return T ? /* @__PURE__ */ _("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ De(
|
|
1813
|
-
|
|
1813
|
+
wn,
|
|
1814
1814
|
{
|
|
1815
|
-
fallback: /* @__PURE__ */ _(
|
|
1815
|
+
fallback: /* @__PURE__ */ _(ft, {}),
|
|
1816
1816
|
children: [
|
|
1817
1817
|
H && S === "single" && /* @__PURE__ */ _(
|
|
1818
1818
|
H,
|
|
1819
1819
|
{
|
|
1820
1820
|
editing: !0,
|
|
1821
1821
|
params: o,
|
|
1822
|
-
theme:
|
|
1822
|
+
theme: l,
|
|
1823
1823
|
settings: Y,
|
|
1824
|
-
cardMetadata:
|
|
1824
|
+
cardMetadata: Tn({
|
|
1825
1825
|
card: e,
|
|
1826
1826
|
dataMetadata: R == null ? void 0 : R.metadata
|
|
1827
1827
|
}),
|
|
1828
|
-
onDataChange:
|
|
1828
|
+
onDataChange: $,
|
|
1829
1829
|
data: (R == null ? void 0 : R.records) || [],
|
|
1830
1830
|
columns: (R == null ? void 0 : R.columns) || [],
|
|
1831
1831
|
formatTemporalBucketValue: he,
|
|
1832
|
-
filters:
|
|
1832
|
+
filters: N,
|
|
1833
1833
|
filterValues: [
|
|
1834
1834
|
...W || [],
|
|
1835
1835
|
...f || []
|
|
@@ -1837,20 +1837,20 @@ function Mr({ card: e }) {
|
|
|
1837
1837
|
inlineFilters: A
|
|
1838
1838
|
}
|
|
1839
1839
|
),
|
|
1840
|
-
H && S === "multiple" && /* @__PURE__ */ De(
|
|
1840
|
+
H && S === "multiple" && /* @__PURE__ */ De(ft, { children: [
|
|
1841
1841
|
v.map((d, g) => {
|
|
1842
1842
|
if (!d) return null;
|
|
1843
|
-
const P = Qe(d, g),
|
|
1843
|
+
const P = Qe(d, g), L = _e(
|
|
1844
1844
|
d,
|
|
1845
1845
|
P,
|
|
1846
1846
|
y == null ? void 0 : y.slots
|
|
1847
1847
|
);
|
|
1848
1848
|
return /* @__PURE__ */ _(
|
|
1849
|
-
|
|
1849
|
+
Hn,
|
|
1850
1850
|
{
|
|
1851
|
-
onDataChange:
|
|
1851
|
+
onDataChange: $,
|
|
1852
1852
|
card: d,
|
|
1853
|
-
effectiveCardType:
|
|
1853
|
+
effectiveCardType: L
|
|
1854
1854
|
},
|
|
1855
1855
|
`${d.id}-${P}`
|
|
1856
1856
|
);
|
|
@@ -1859,16 +1859,16 @@ function Mr({ card: e }) {
|
|
|
1859
1859
|
H,
|
|
1860
1860
|
{
|
|
1861
1861
|
editing: !0,
|
|
1862
|
-
onDataChange:
|
|
1863
|
-
...
|
|
1862
|
+
onDataChange: $,
|
|
1863
|
+
...Vn({
|
|
1864
1864
|
configCard: c,
|
|
1865
1865
|
slotOrderedCards: G,
|
|
1866
1866
|
slotTypes: re,
|
|
1867
1867
|
multiInputData: n,
|
|
1868
1868
|
params: o,
|
|
1869
|
-
theme:
|
|
1869
|
+
theme: l,
|
|
1870
1870
|
chartSettings: Y,
|
|
1871
|
-
filters:
|
|
1871
|
+
filters: N,
|
|
1872
1872
|
filterValues: [
|
|
1873
1873
|
...W || [],
|
|
1874
1874
|
...f || []
|
|
@@ -1884,13 +1884,13 @@ function Mr({ card: e }) {
|
|
|
1884
1884
|
(C = c.customCardPreferences) == null ? void 0 : C.componentName
|
|
1885
1885
|
) }) : null;
|
|
1886
1886
|
}
|
|
1887
|
-
const
|
|
1888
|
-
var
|
|
1889
|
-
const { pressed: n, defaultPressed: r, onPressedChange: i, ...o } = e, [s,
|
|
1887
|
+
const xo = Pn(_r);
|
|
1888
|
+
var Zt = "Toggle", en = k.forwardRef((e, t) => {
|
|
1889
|
+
const { pressed: n, defaultPressed: r, onPressedChange: i, ...o } = e, [s, l] = It({
|
|
1890
1890
|
prop: n,
|
|
1891
1891
|
onChange: i,
|
|
1892
1892
|
defaultProp: r ?? !1,
|
|
1893
|
-
caller:
|
|
1893
|
+
caller: Zt
|
|
1894
1894
|
});
|
|
1895
1895
|
return /* @__PURE__ */ _(
|
|
1896
1896
|
ze.button,
|
|
@@ -1902,14 +1902,14 @@ var Jt = "Toggle", Zt = k.forwardRef((e, t) => {
|
|
|
1902
1902
|
...o,
|
|
1903
1903
|
ref: t,
|
|
1904
1904
|
onClick: pe(e.onClick, () => {
|
|
1905
|
-
e.disabled ||
|
|
1905
|
+
e.disabled || l(!s);
|
|
1906
1906
|
})
|
|
1907
1907
|
}
|
|
1908
1908
|
);
|
|
1909
1909
|
});
|
|
1910
|
-
|
|
1911
|
-
var
|
|
1912
|
-
const
|
|
1910
|
+
en.displayName = Zt;
|
|
1911
|
+
var tn = en;
|
|
1912
|
+
const kr = Bn(
|
|
1913
1913
|
"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",
|
|
1914
1914
|
{
|
|
1915
1915
|
variants: {
|
|
@@ -1928,23 +1928,23 @@ const Lr = Vn(
|
|
|
1928
1928
|
size: "default"
|
|
1929
1929
|
}
|
|
1930
1930
|
}
|
|
1931
|
-
),
|
|
1932
|
-
|
|
1931
|
+
), Tr = k.forwardRef(({ className: e, variant: t, size: n, ...r }, i) => /* @__PURE__ */ _(
|
|
1932
|
+
tn,
|
|
1933
1933
|
{
|
|
1934
1934
|
ref: i,
|
|
1935
|
-
className:
|
|
1935
|
+
className: ot(kr({ variant: t, size: n, className: e })),
|
|
1936
1936
|
...r
|
|
1937
1937
|
}
|
|
1938
1938
|
));
|
|
1939
|
-
|
|
1940
|
-
var
|
|
1939
|
+
Tr.displayName = tn.displayName;
|
|
1940
|
+
var nn = ["PageUp", "PageDown"], rn = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], on = {
|
|
1941
1941
|
"from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
1942
1942
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
1943
1943
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
1944
1944
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
1945
|
-
}, we = "Slider", [Ze,
|
|
1946
|
-
|
|
1947
|
-
]), [
|
|
1945
|
+
}, we = "Slider", [Ze, Hr, Vr] = On(we), [sn] = qn(we, [
|
|
1946
|
+
Vr
|
|
1947
|
+
]), [$r, qe] = sn(we), ln = k.forwardRef(
|
|
1948
1948
|
(e, t) => {
|
|
1949
1949
|
const {
|
|
1950
1950
|
name: n,
|
|
@@ -1952,8 +1952,8 @@ var tn = ["PageUp", "PageDown"], nn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
1952
1952
|
max: i = 100,
|
|
1953
1953
|
step: o = 1,
|
|
1954
1954
|
orientation: s = "horizontal",
|
|
1955
|
-
disabled:
|
|
1956
|
-
minStepsBetweenThumbs:
|
|
1955
|
+
disabled: l = !1,
|
|
1956
|
+
minStepsBetweenThumbs: a = 0,
|
|
1957
1957
|
defaultValue: f = [r],
|
|
1958
1958
|
value: p,
|
|
1959
1959
|
onValueChange: u = () => {
|
|
@@ -1963,7 +1963,7 @@ var tn = ["PageUp", "PageDown"], nn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
1963
1963
|
inverted: h = !1,
|
|
1964
1964
|
form: m,
|
|
1965
1965
|
...y
|
|
1966
|
-
} = e, S = k.useRef(/* @__PURE__ */ new Set()), v = k.useRef(0), b = s === "horizontal" ?
|
|
1966
|
+
} = e, S = k.useRef(/* @__PURE__ */ new Set()), v = k.useRef(0), b = s === "horizontal" ? Fr : Kr, [I = [], R] = It({
|
|
1967
1967
|
prop: p,
|
|
1968
1968
|
defaultProp: f,
|
|
1969
1969
|
onChange: (A) => {
|
|
@@ -1972,21 +1972,21 @@ var tn = ["PageUp", "PageDown"], nn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
1972
1972
|
}
|
|
1973
1973
|
}), M = k.useRef(I);
|
|
1974
1974
|
function w(A) {
|
|
1975
|
-
const
|
|
1976
|
-
|
|
1975
|
+
const N = Ur(I, A);
|
|
1976
|
+
V(A, N);
|
|
1977
1977
|
}
|
|
1978
1978
|
function X(A) {
|
|
1979
|
-
|
|
1979
|
+
V(A, v.current);
|
|
1980
1980
|
}
|
|
1981
1981
|
function j() {
|
|
1982
1982
|
const A = M.current[v.current];
|
|
1983
1983
|
I[v.current] !== A && c(I);
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1986
|
-
const
|
|
1985
|
+
function V(A, N, { commit: W } = { commit: !1 }) {
|
|
1986
|
+
const $ = jr(o), T = Qr(Math.round((A - r) / o) * o + r, $), H = Rt(T, [r, i]);
|
|
1987
1987
|
R((Y = []) => {
|
|
1988
|
-
const G =
|
|
1989
|
-
if (
|
|
1988
|
+
const G = Or(Y, H, N);
|
|
1989
|
+
if (Yr(G, a * o)) {
|
|
1990
1990
|
v.current = G.indexOf(H);
|
|
1991
1991
|
const re = String(G) !== String(Y);
|
|
1992
1992
|
return re && W && c(G), re ? G : Y;
|
|
@@ -1995,11 +1995,11 @@ var tn = ["PageUp", "PageDown"], nn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
1995
1995
|
});
|
|
1996
1996
|
}
|
|
1997
1997
|
return /* @__PURE__ */ _(
|
|
1998
|
-
|
|
1998
|
+
$r,
|
|
1999
1999
|
{
|
|
2000
2000
|
scope: e.__scopeSlider,
|
|
2001
2001
|
name: n,
|
|
2002
|
-
disabled:
|
|
2002
|
+
disabled: l,
|
|
2003
2003
|
min: r,
|
|
2004
2004
|
max: i,
|
|
2005
2005
|
valueIndexToChangeRef: v,
|
|
@@ -2010,25 +2010,25 @@ var tn = ["PageUp", "PageDown"], nn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2010
2010
|
children: /* @__PURE__ */ _(Ze.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ _(Ze.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ _(
|
|
2011
2011
|
b,
|
|
2012
2012
|
{
|
|
2013
|
-
"aria-disabled":
|
|
2014
|
-
"data-disabled":
|
|
2013
|
+
"aria-disabled": l,
|
|
2014
|
+
"data-disabled": l ? "" : void 0,
|
|
2015
2015
|
...y,
|
|
2016
2016
|
ref: t,
|
|
2017
2017
|
onPointerDown: pe(y.onPointerDown, () => {
|
|
2018
|
-
|
|
2018
|
+
l || (M.current = I);
|
|
2019
2019
|
}),
|
|
2020
2020
|
min: r,
|
|
2021
2021
|
max: i,
|
|
2022
2022
|
inverted: h,
|
|
2023
|
-
onSlideStart:
|
|
2024
|
-
onSlideMove:
|
|
2025
|
-
onSlideEnd:
|
|
2026
|
-
onHomeKeyDown: () => !
|
|
2027
|
-
onEndKeyDown: () => !
|
|
2028
|
-
onStepKeyDown: ({ event: A, direction:
|
|
2029
|
-
if (!
|
|
2030
|
-
const T =
|
|
2031
|
-
|
|
2023
|
+
onSlideStart: l ? void 0 : w,
|
|
2024
|
+
onSlideMove: l ? void 0 : X,
|
|
2025
|
+
onSlideEnd: l ? void 0 : j,
|
|
2026
|
+
onHomeKeyDown: () => !l && V(r, 0, { commit: !0 }),
|
|
2027
|
+
onEndKeyDown: () => !l && V(i, I.length - 1, { commit: !0 }),
|
|
2028
|
+
onStepKeyDown: ({ event: A, direction: N }) => {
|
|
2029
|
+
if (!l) {
|
|
2030
|
+
const T = nn.includes(A.key) || A.shiftKey && rn.includes(A.key) ? 10 : 1, H = v.current, Y = I[H], G = o * T * N;
|
|
2031
|
+
V(Y + G, H, { commit: !0 });
|
|
2032
2032
|
}
|
|
2033
2033
|
}
|
|
2034
2034
|
}
|
|
@@ -2037,13 +2037,13 @@ var tn = ["PageUp", "PageDown"], nn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2037
2037
|
);
|
|
2038
2038
|
}
|
|
2039
2039
|
);
|
|
2040
|
-
|
|
2041
|
-
var [an,
|
|
2040
|
+
ln.displayName = we;
|
|
2041
|
+
var [an, cn] = sn(we, {
|
|
2042
2042
|
startEdge: "left",
|
|
2043
2043
|
endEdge: "right",
|
|
2044
2044
|
size: "width",
|
|
2045
2045
|
direction: 1
|
|
2046
|
-
}),
|
|
2046
|
+
}), Fr = k.forwardRef(
|
|
2047
2047
|
(e, t) => {
|
|
2048
2048
|
const {
|
|
2049
2049
|
min: n,
|
|
@@ -2051,13 +2051,13 @@ var [an, ln] = on(we, {
|
|
|
2051
2051
|
dir: i,
|
|
2052
2052
|
inverted: o,
|
|
2053
2053
|
onSlideStart: s,
|
|
2054
|
-
onSlideMove:
|
|
2055
|
-
onSlideEnd:
|
|
2054
|
+
onSlideMove: l,
|
|
2055
|
+
onSlideEnd: a,
|
|
2056
2056
|
onStepKeyDown: f,
|
|
2057
2057
|
...p
|
|
2058
|
-
} = e, [u, c] = k.useState(null), h = Pe(t, (b) => c(b)), m = k.useRef(void 0), y =
|
|
2058
|
+
} = e, [u, c] = k.useState(null), h = Pe(t, (b) => c(b)), m = k.useRef(void 0), y = Gn(i), S = y === "ltr", v = S && !o || !S && o;
|
|
2059
2059
|
function D(b) {
|
|
2060
|
-
const I = m.current || u.getBoundingClientRect(), R = [0, I.width], w =
|
|
2060
|
+
const I = m.current || u.getBoundingClientRect(), R = [0, I.width], w = ct(R, v ? [n, r] : [r, n]);
|
|
2061
2061
|
return m.current = I, w(b - I.left);
|
|
2062
2062
|
}
|
|
2063
2063
|
return /* @__PURE__ */ _(
|
|
@@ -2069,7 +2069,7 @@ var [an, ln] = on(we, {
|
|
|
2069
2069
|
direction: v ? 1 : -1,
|
|
2070
2070
|
size: "width",
|
|
2071
2071
|
children: /* @__PURE__ */ _(
|
|
2072
|
-
|
|
2072
|
+
un,
|
|
2073
2073
|
{
|
|
2074
2074
|
dir: y,
|
|
2075
2075
|
"data-orientation": "horizontal",
|
|
@@ -2085,13 +2085,13 @@ var [an, ln] = on(we, {
|
|
|
2085
2085
|
},
|
|
2086
2086
|
onSlideMove: (b) => {
|
|
2087
2087
|
const I = D(b.clientX);
|
|
2088
|
-
|
|
2088
|
+
l == null || l(I);
|
|
2089
2089
|
},
|
|
2090
2090
|
onSlideEnd: () => {
|
|
2091
|
-
m.current = void 0,
|
|
2091
|
+
m.current = void 0, a == null || a();
|
|
2092
2092
|
},
|
|
2093
2093
|
onStepKeyDown: (b) => {
|
|
2094
|
-
const R =
|
|
2094
|
+
const R = on[v ? "from-left" : "from-right"].includes(b.key);
|
|
2095
2095
|
f == null || f({ event: b, direction: R ? -1 : 1 });
|
|
2096
2096
|
}
|
|
2097
2097
|
}
|
|
@@ -2099,7 +2099,7 @@ var [an, ln] = on(we, {
|
|
|
2099
2099
|
}
|
|
2100
2100
|
);
|
|
2101
2101
|
}
|
|
2102
|
-
),
|
|
2102
|
+
), Kr = k.forwardRef(
|
|
2103
2103
|
(e, t) => {
|
|
2104
2104
|
const {
|
|
2105
2105
|
min: n,
|
|
@@ -2107,12 +2107,12 @@ var [an, ln] = on(we, {
|
|
|
2107
2107
|
inverted: i,
|
|
2108
2108
|
onSlideStart: o,
|
|
2109
2109
|
onSlideMove: s,
|
|
2110
|
-
onSlideEnd:
|
|
2111
|
-
onStepKeyDown:
|
|
2110
|
+
onSlideEnd: l,
|
|
2111
|
+
onStepKeyDown: a,
|
|
2112
2112
|
...f
|
|
2113
2113
|
} = e, p = k.useRef(null), u = Pe(t, p), c = k.useRef(void 0), h = !i;
|
|
2114
2114
|
function m(y) {
|
|
2115
|
-
const S = c.current || p.current.getBoundingClientRect(), v = [0, S.height], b =
|
|
2115
|
+
const S = c.current || p.current.getBoundingClientRect(), v = [0, S.height], b = ct(v, h ? [r, n] : [n, r]);
|
|
2116
2116
|
return c.current = S, b(y - S.top);
|
|
2117
2117
|
}
|
|
2118
2118
|
return /* @__PURE__ */ _(
|
|
@@ -2124,7 +2124,7 @@ var [an, ln] = on(we, {
|
|
|
2124
2124
|
size: "height",
|
|
2125
2125
|
direction: h ? 1 : -1,
|
|
2126
2126
|
children: /* @__PURE__ */ _(
|
|
2127
|
-
|
|
2127
|
+
un,
|
|
2128
2128
|
{
|
|
2129
2129
|
"data-orientation": "vertical",
|
|
2130
2130
|
...f,
|
|
@@ -2142,18 +2142,18 @@ var [an, ln] = on(we, {
|
|
|
2142
2142
|
s == null || s(S);
|
|
2143
2143
|
},
|
|
2144
2144
|
onSlideEnd: () => {
|
|
2145
|
-
c.current = void 0,
|
|
2145
|
+
c.current = void 0, l == null || l();
|
|
2146
2146
|
},
|
|
2147
2147
|
onStepKeyDown: (y) => {
|
|
2148
|
-
const v =
|
|
2149
|
-
|
|
2148
|
+
const v = on[h ? "from-bottom" : "from-top"].includes(y.key);
|
|
2149
|
+
a == null || a({ event: y, direction: v ? -1 : 1 });
|
|
2150
2150
|
}
|
|
2151
2151
|
}
|
|
2152
2152
|
)
|
|
2153
2153
|
}
|
|
2154
2154
|
);
|
|
2155
2155
|
}
|
|
2156
|
-
),
|
|
2156
|
+
), un = k.forwardRef(
|
|
2157
2157
|
(e, t) => {
|
|
2158
2158
|
const {
|
|
2159
2159
|
__scopeSlider: n,
|
|
@@ -2161,8 +2161,8 @@ var [an, ln] = on(we, {
|
|
|
2161
2161
|
onSlideMove: i,
|
|
2162
2162
|
onSlideEnd: o,
|
|
2163
2163
|
onHomeKeyDown: s,
|
|
2164
|
-
onEndKeyDown:
|
|
2165
|
-
onStepKeyDown:
|
|
2164
|
+
onEndKeyDown: l,
|
|
2165
|
+
onStepKeyDown: a,
|
|
2166
2166
|
...f
|
|
2167
2167
|
} = e, p = qe(we, n);
|
|
2168
2168
|
return /* @__PURE__ */ _(
|
|
@@ -2171,7 +2171,7 @@ var [an, ln] = on(we, {
|
|
|
2171
2171
|
...f,
|
|
2172
2172
|
ref: t,
|
|
2173
2173
|
onKeyDown: pe(e.onKeyDown, (u) => {
|
|
2174
|
-
u.key === "Home" ? (s(u), u.preventDefault()) : u.key === "End" ? (
|
|
2174
|
+
u.key === "Home" ? (s(u), u.preventDefault()) : u.key === "End" ? (l(u), u.preventDefault()) : nn.concat(rn).includes(u.key) && (a(u), u.preventDefault());
|
|
2175
2175
|
}),
|
|
2176
2176
|
onPointerDown: pe(e.onPointerDown, (u) => {
|
|
2177
2177
|
const c = u.target;
|
|
@@ -2187,9 +2187,9 @@ var [an, ln] = on(we, {
|
|
|
2187
2187
|
}
|
|
2188
2188
|
);
|
|
2189
2189
|
}
|
|
2190
|
-
),
|
|
2190
|
+
), dn = "SliderTrack", fn = k.forwardRef(
|
|
2191
2191
|
(e, t) => {
|
|
2192
|
-
const { __scopeSlider: n, ...r } = e, i = qe(
|
|
2192
|
+
const { __scopeSlider: n, ...r } = e, i = qe(dn, n);
|
|
2193
2193
|
return /* @__PURE__ */ _(
|
|
2194
2194
|
ze.span,
|
|
2195
2195
|
{
|
|
@@ -2201,19 +2201,19 @@ var [an, ln] = on(we, {
|
|
|
2201
2201
|
);
|
|
2202
2202
|
}
|
|
2203
2203
|
);
|
|
2204
|
-
|
|
2205
|
-
var et = "SliderRange",
|
|
2204
|
+
fn.displayName = dn;
|
|
2205
|
+
var et = "SliderRange", pn = k.forwardRef(
|
|
2206
2206
|
(e, t) => {
|
|
2207
|
-
const { __scopeSlider: n, ...r } = e, i = qe(et, n), o =
|
|
2208
|
-
(c) =>
|
|
2209
|
-
), p =
|
|
2207
|
+
const { __scopeSlider: n, ...r } = e, i = qe(et, n), o = cn(et, n), s = k.useRef(null), l = Pe(t, s), a = i.values.length, f = i.values.map(
|
|
2208
|
+
(c) => hn(c, i.min, i.max)
|
|
2209
|
+
), p = a > 1 ? Math.min(...f) : 0, u = 100 - Math.max(...f);
|
|
2210
2210
|
return /* @__PURE__ */ _(
|
|
2211
2211
|
ze.span,
|
|
2212
2212
|
{
|
|
2213
2213
|
"data-orientation": i.orientation,
|
|
2214
2214
|
"data-disabled": i.disabled ? "" : void 0,
|
|
2215
2215
|
...r,
|
|
2216
|
-
ref:
|
|
2216
|
+
ref: l,
|
|
2217
2217
|
style: {
|
|
2218
2218
|
...e.style,
|
|
2219
2219
|
[o.startEdge]: p + "%",
|
|
@@ -2223,30 +2223,30 @@ var et = "SliderRange", fn = k.forwardRef(
|
|
|
2223
2223
|
);
|
|
2224
2224
|
}
|
|
2225
2225
|
);
|
|
2226
|
-
|
|
2227
|
-
var tt = "SliderThumb",
|
|
2226
|
+
pn.displayName = et;
|
|
2227
|
+
var tt = "SliderThumb", mn = k.forwardRef(
|
|
2228
2228
|
(e, t) => {
|
|
2229
|
-
const n =
|
|
2230
|
-
() => r ? n().findIndex((
|
|
2229
|
+
const n = Hr(e.__scopeSlider), [r, i] = k.useState(null), o = Pe(t, (l) => i(l)), s = k.useMemo(
|
|
2230
|
+
() => r ? n().findIndex((l) => l.ref.current === r) : -1,
|
|
2231
2231
|
[n, r]
|
|
2232
2232
|
);
|
|
2233
|
-
return /* @__PURE__ */ _(
|
|
2233
|
+
return /* @__PURE__ */ _(Br, { ...e, ref: o, index: s });
|
|
2234
2234
|
}
|
|
2235
|
-
),
|
|
2235
|
+
), Br = k.forwardRef(
|
|
2236
2236
|
(e, t) => {
|
|
2237
|
-
const { __scopeSlider: n, index: r, name: i, ...o } = e, s = qe(tt, n),
|
|
2237
|
+
const { __scopeSlider: n, index: r, name: i, ...o } = e, s = qe(tt, n), l = cn(tt, n), [a, f] = k.useState(null), p = Pe(t, (D) => f(D)), u = a ? s.form || !!a.closest("form") : !0, c = Un(a), h = s.values[r], m = h === void 0 ? 0 : hn(h, s.min, s.max), y = Gr(r, s.values.length), S = c == null ? void 0 : c[l.size], v = S ? Wr(S, m, l.direction) : 0;
|
|
2238
2238
|
return k.useEffect(() => {
|
|
2239
|
-
if (
|
|
2240
|
-
return s.thumbs.add(
|
|
2241
|
-
s.thumbs.delete(
|
|
2239
|
+
if (a)
|
|
2240
|
+
return s.thumbs.add(a), () => {
|
|
2241
|
+
s.thumbs.delete(a);
|
|
2242
2242
|
};
|
|
2243
|
-
}, [
|
|
2243
|
+
}, [a, s.thumbs]), /* @__PURE__ */ De(
|
|
2244
2244
|
"span",
|
|
2245
2245
|
{
|
|
2246
2246
|
style: {
|
|
2247
2247
|
transform: "var(--radix-slider-thumb-transform)",
|
|
2248
2248
|
position: "absolute",
|
|
2249
|
-
[
|
|
2249
|
+
[l.startEdge]: `calc(${m}% + ${v}px)`
|
|
2250
2250
|
},
|
|
2251
2251
|
children: [
|
|
2252
2252
|
/* @__PURE__ */ _(Ze.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ _(
|
|
@@ -2270,7 +2270,7 @@ var tt = "SliderThumb", pn = k.forwardRef(
|
|
|
2270
2270
|
}
|
|
2271
2271
|
) }),
|
|
2272
2272
|
u && /* @__PURE__ */ _(
|
|
2273
|
-
|
|
2273
|
+
gn,
|
|
2274
2274
|
{
|
|
2275
2275
|
name: i ?? (s.name ? s.name + (s.values.length > 1 ? "[]" : "") : void 0),
|
|
2276
2276
|
form: s.form,
|
|
@@ -2283,17 +2283,17 @@ var tt = "SliderThumb", pn = k.forwardRef(
|
|
|
2283
2283
|
);
|
|
2284
2284
|
}
|
|
2285
2285
|
);
|
|
2286
|
-
|
|
2287
|
-
var
|
|
2286
|
+
mn.displayName = tt;
|
|
2287
|
+
var qr = "RadioBubbleInput", gn = k.forwardRef(
|
|
2288
2288
|
({ __scopeSlider: e, value: t, ...n }, r) => {
|
|
2289
|
-
const i = k.useRef(null), o = Pe(i, r), s =
|
|
2289
|
+
const i = k.useRef(null), o = Pe(i, r), s = Wn(t);
|
|
2290
2290
|
return k.useEffect(() => {
|
|
2291
|
-
const
|
|
2292
|
-
if (!
|
|
2293
|
-
const
|
|
2291
|
+
const l = i.current;
|
|
2292
|
+
if (!l) return;
|
|
2293
|
+
const a = window.HTMLInputElement.prototype, p = Object.getOwnPropertyDescriptor(a, "value").set;
|
|
2294
2294
|
if (s !== t && p) {
|
|
2295
2295
|
const u = new Event("input", { bubbles: !0 });
|
|
2296
|
-
p.call(
|
|
2296
|
+
p.call(l, t), l.dispatchEvent(u);
|
|
2297
2297
|
}
|
|
2298
2298
|
}, [s, t]), /* @__PURE__ */ _(
|
|
2299
2299
|
ze.input,
|
|
@@ -2306,78 +2306,99 @@ var Fr = "RadioBubbleInput", mn = k.forwardRef(
|
|
|
2306
2306
|
);
|
|
2307
2307
|
}
|
|
2308
2308
|
);
|
|
2309
|
-
|
|
2310
|
-
function
|
|
2309
|
+
gn.displayName = qr;
|
|
2310
|
+
function Or(e = [], t, n) {
|
|
2311
2311
|
const r = [...e];
|
|
2312
2312
|
return r[n] = t, r.sort((i, o) => i - o);
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2314
|
+
function hn(e, t, n) {
|
|
2315
2315
|
const o = 100 / (n - t) * (e - t);
|
|
2316
|
-
return
|
|
2316
|
+
return Rt(o, [0, 100]);
|
|
2317
2317
|
}
|
|
2318
|
-
function
|
|
2318
|
+
function Gr(e, t) {
|
|
2319
2319
|
return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
|
|
2320
2320
|
}
|
|
2321
|
-
function
|
|
2321
|
+
function Ur(e, t) {
|
|
2322
2322
|
if (e.length === 1) return 0;
|
|
2323
2323
|
const n = e.map((i) => Math.abs(i - t)), r = Math.min(...n);
|
|
2324
2324
|
return n.indexOf(r);
|
|
2325
2325
|
}
|
|
2326
|
-
function
|
|
2327
|
-
const r = e / 2, o =
|
|
2326
|
+
function Wr(e, t, n) {
|
|
2327
|
+
const r = e / 2, o = ct([0, 50], [0, r]);
|
|
2328
2328
|
return (r - o(t) * n) * n;
|
|
2329
2329
|
}
|
|
2330
|
-
function
|
|
2330
|
+
function Xr(e) {
|
|
2331
2331
|
return e.slice(0, -1).map((t, n) => e[n + 1] - t);
|
|
2332
2332
|
}
|
|
2333
|
-
function
|
|
2333
|
+
function Yr(e, t) {
|
|
2334
2334
|
if (t > 0) {
|
|
2335
|
-
const n =
|
|
2335
|
+
const n = Xr(e);
|
|
2336
2336
|
return Math.min(...n) >= t;
|
|
2337
2337
|
}
|
|
2338
2338
|
return !0;
|
|
2339
2339
|
}
|
|
2340
|
-
function
|
|
2340
|
+
function ct(e, t) {
|
|
2341
2341
|
return (n) => {
|
|
2342
2342
|
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
2343
2343
|
const r = (t[1] - t[0]) / (e[1] - e[0]);
|
|
2344
2344
|
return t[0] + r * (n - e[0]);
|
|
2345
2345
|
};
|
|
2346
2346
|
}
|
|
2347
|
-
function
|
|
2347
|
+
function jr(e) {
|
|
2348
2348
|
return (String(e).split(".")[1] || "").length;
|
|
2349
2349
|
}
|
|
2350
|
-
function
|
|
2350
|
+
function Qr(e, t) {
|
|
2351
2351
|
const n = Math.pow(10, t);
|
|
2352
2352
|
return Math.round(e * n) / n;
|
|
2353
2353
|
}
|
|
2354
|
-
var
|
|
2355
|
-
const
|
|
2356
|
-
|
|
2354
|
+
var yn = ln, Jr = fn, Zr = pn, eo = mn;
|
|
2355
|
+
const to = k.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ De(
|
|
2356
|
+
yn,
|
|
2357
2357
|
{
|
|
2358
2358
|
ref: n,
|
|
2359
|
-
className:
|
|
2359
|
+
className: ot(
|
|
2360
2360
|
"relative flex w-full touch-none select-none items-center",
|
|
2361
2361
|
e
|
|
2362
2362
|
),
|
|
2363
2363
|
...t,
|
|
2364
2364
|
children: [
|
|
2365
|
-
/* @__PURE__ */ _(
|
|
2366
|
-
/* @__PURE__ */ _(
|
|
2365
|
+
/* @__PURE__ */ _(Jr, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ _(Zr, { className: "absolute h-full bg-primary" }) }),
|
|
2366
|
+
/* @__PURE__ */ _(eo, { 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" })
|
|
2367
2367
|
]
|
|
2368
2368
|
}
|
|
2369
2369
|
));
|
|
2370
|
-
|
|
2370
|
+
to.displayName = yn.displayName;
|
|
2371
|
+
const no = bt(null), ro = $n();
|
|
2372
|
+
function vn(e) {
|
|
2373
|
+
const t = nt(no) ?? ro;
|
|
2374
|
+
return Cn(t.subscribe, () => e(t.get()), () => e(null));
|
|
2375
|
+
}
|
|
2376
|
+
function bo(e) {
|
|
2377
|
+
return vn(
|
|
2378
|
+
O((t) => (t == null ? void 0 : t.slot.zone) === e ? t.outcome : null, [e])
|
|
2379
|
+
);
|
|
2380
|
+
}
|
|
2381
|
+
function zo(e, t, n) {
|
|
2382
|
+
return vn(
|
|
2383
|
+
O(
|
|
2384
|
+
(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,
|
|
2385
|
+
[e, t, n]
|
|
2386
|
+
)
|
|
2387
|
+
);
|
|
2388
|
+
}
|
|
2371
2389
|
export {
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2390
|
+
xo as E,
|
|
2391
|
+
yo as F,
|
|
2392
|
+
tr as P,
|
|
2393
|
+
vo as S,
|
|
2394
|
+
Tr as T,
|
|
2395
|
+
Er as a,
|
|
2396
|
+
Rr as b,
|
|
2397
|
+
So as c,
|
|
2398
|
+
to as d,
|
|
2399
|
+
bo as e,
|
|
2400
|
+
zo as f,
|
|
2401
|
+
no as g,
|
|
2402
|
+
Jt as r,
|
|
2403
|
+
jt as u
|
|
2383
2404
|
};
|