lizaui 3.0.44 → 3.0.46
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/chunks/index-DUhJE4fQ.js +65 -0
- package/dist/chunks/index-DUhJE4fQ.js.map +1 -0
- package/dist/chunks/{index-DSpBzH_i.js → index-Dtbzjbl8.js} +753 -751
- package/dist/chunks/index-Dtbzjbl8.js.map +1 -0
- package/dist/components/table/body/table-body.d.ts +2 -1
- package/dist/components/table/body/table-body.d.ts.map +1 -1
- package/dist/components/table/table.d.ts +1 -2
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/pagination/index.cjs.js +1 -1
- package/dist/pagination/index.es.js +1 -1
- package/dist/table/index.cjs.js +1 -1
- package/dist/table/index.cjs.js.map +1 -1
- package/dist/table/index.es.js +53 -54
- package/dist/table/index.es.js.map +1 -1
- package/dist/ui/index.cjs.js +1 -1
- package/dist/ui/index.es.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/index-BnlGNtJe.js +0 -65
- package/dist/chunks/index-BnlGNtJe.js.map +0 -1
- package/dist/chunks/index-DSpBzH_i.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as g } from "./jsx-runtime-BYq8_R6m.js";
|
|
2
|
-
import * as
|
|
3
|
-
import Ge, { useContext as Vt, Component as Ii, useId as Ni, useState as Ve, useEffect as Fe, forwardRef as Kt, createElement as je, createContext as Mi, useRef as
|
|
4
|
-
import { c as
|
|
2
|
+
import * as u from "react";
|
|
3
|
+
import Ge, { useContext as Vt, Component as Ii, useId as Ni, useState as Ve, useEffect as Fe, forwardRef as Kt, createElement as je, createContext as Mi, useRef as ye, useLayoutEffect as Li, useImperativeHandle as dr, useCallback as ve, useMemo as ji } from "react";
|
|
4
|
+
import { c as re } from "./variants-DhZQjbsQ.js";
|
|
5
5
|
import { t as ki } from "./tv-ButAo3dF.js";
|
|
6
6
|
import { t as Me } from "./bundle-mjs-kGHm2Pod.js";
|
|
7
7
|
import { c as de, L as fr } from "./utils-C3tlRhMf.js";
|
|
@@ -32,26 +32,26 @@ function xt(e, t, n, o) {
|
|
|
32
32
|
return _n(e, t, _i(n), o);
|
|
33
33
|
}
|
|
34
34
|
const Cr = 1e-4, Ca = 1 - Cr, Ea = 1 + Cr, Er = 0.01, Ra = 0 - Er, Ta = 0 + Er;
|
|
35
|
-
function
|
|
35
|
+
function me(e) {
|
|
36
36
|
return e.max - e.min;
|
|
37
37
|
}
|
|
38
38
|
function Aa(e, t, n) {
|
|
39
39
|
return Math.abs(e - t) <= n;
|
|
40
40
|
}
|
|
41
41
|
function lo(e, t, n, o = 0.5) {
|
|
42
|
-
e.origin = o, e.originPoint = ce(t.min, t.max, e.origin), e.scale =
|
|
42
|
+
e.origin = o, e.originPoint = ce(t.min, t.max, e.origin), e.scale = me(n) / me(t), e.translate = ce(n.min, n.max, e.origin) - e.originPoint, (e.scale >= Ca && e.scale <= Ea || isNaN(e.scale)) && (e.scale = 1), (e.translate >= Ra && e.translate <= Ta || isNaN(e.translate)) && (e.translate = 0);
|
|
43
43
|
}
|
|
44
44
|
function St(e, t, n, o) {
|
|
45
45
|
lo(e.x, t.x, n.x, o ? o.originX : void 0), lo(e.y, t.y, n.y, o ? o.originY : void 0);
|
|
46
46
|
}
|
|
47
47
|
function co(e, t, n) {
|
|
48
|
-
e.min = n.min + t.min, e.max = e.min +
|
|
48
|
+
e.min = n.min + t.min, e.max = e.min + me(t);
|
|
49
49
|
}
|
|
50
50
|
function Da(e, t, n) {
|
|
51
51
|
co(e.x, t.x, n.x), co(e.y, t.y, n.y);
|
|
52
52
|
}
|
|
53
53
|
function uo(e, t, n) {
|
|
54
|
-
e.min = t.min - n.min, e.max = e.min +
|
|
54
|
+
e.min = t.min - n.min, e.max = e.min + me(t);
|
|
55
55
|
}
|
|
56
56
|
function wt(e, t, n) {
|
|
57
57
|
uo(e.x, t.x, n.x), uo(e.y, t.y, n.y);
|
|
@@ -90,8 +90,8 @@ class Tr {
|
|
|
90
90
|
this.dragSnapToOrigin = a, this.handlers = n, this.transformPagePoint = o, this.contextWindow = i || window;
|
|
91
91
|
const r = hr(t), s = cn(r, this.transformPagePoint), { point: l } = s, { timestamp: c } = xe;
|
|
92
92
|
this.history = [{ ...l, timestamp: c }];
|
|
93
|
-
const { onSessionStart:
|
|
94
|
-
|
|
93
|
+
const { onSessionStart: d } = n;
|
|
94
|
+
d && d(t, un(s, this.history)), this.removeListeners = Vi(xt(this.contextWindow, "pointermove", this.handlePointerMove), xt(this.contextWindow, "pointerup", this.handlePointerUp), xt(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
95
95
|
}
|
|
96
96
|
updateHandlers(t) {
|
|
97
97
|
this.handlers = t;
|
|
@@ -165,7 +165,7 @@ function ka(e, t) {
|
|
|
165
165
|
}
|
|
166
166
|
function Oa(e, t) {
|
|
167
167
|
let n = 0.5;
|
|
168
|
-
const o =
|
|
168
|
+
const o = me(e), i = me(t);
|
|
169
169
|
return i > o ? n = Tn(t.min, t.max - o, e.min) : o > i && (n = Tn(e.min, e.max - i, t.min)), pr(0, 1, n);
|
|
170
170
|
}
|
|
171
171
|
function za(e, t) {
|
|
@@ -197,10 +197,10 @@ class Va {
|
|
|
197
197
|
const { presenceContext: o } = this.visualElement;
|
|
198
198
|
if (o && o.isPresent === !1)
|
|
199
199
|
return;
|
|
200
|
-
const i = (
|
|
200
|
+
const i = (d) => {
|
|
201
201
|
const { dragSnapToOrigin: f } = this.getProps();
|
|
202
|
-
f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(hr(
|
|
203
|
-
}, a = (
|
|
202
|
+
f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(hr(d).point);
|
|
203
|
+
}, a = (d, f) => {
|
|
204
204
|
const { drag: h, dragPropagation: m, onDragStart: x } = this.getProps();
|
|
205
205
|
if (h && !m && (this.openDragLock && this.openDragLock(), this.openDragLock = ba(h), !this.openDragLock))
|
|
206
206
|
return;
|
|
@@ -210,14 +210,14 @@ class Va {
|
|
|
210
210
|
const { projection: S } = this.visualElement;
|
|
211
211
|
if (S && S.layout) {
|
|
212
212
|
const w = S.layout.layoutBox[v];
|
|
213
|
-
w && (y =
|
|
213
|
+
w && (y = me(w) * (parseFloat(y) / 100));
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
this.originPoint[v] = y;
|
|
217
|
-
}), x && Pe.postRender(() => x(
|
|
217
|
+
}), x && Pe.postRender(() => x(d, f)), oo(this.visualElement, "transform");
|
|
218
218
|
const { animationState: p } = this.visualElement;
|
|
219
219
|
p && p.setActive("whileDrag", !0);
|
|
220
|
-
}, r = (
|
|
220
|
+
}, r = (d, f) => {
|
|
221
221
|
const { dragPropagation: h, dragDirectionLock: m, onDirectionLock: x, onDrag: p } = this.getProps();
|
|
222
222
|
if (!h && !this.openDragLock)
|
|
223
223
|
return;
|
|
@@ -226,10 +226,10 @@ class Va {
|
|
|
226
226
|
this.currentDirection = Fa(v), this.currentDirection !== null && x && x(this.currentDirection);
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
|
-
this.updateAxis("x", f.point, v), this.updateAxis("y", f.point, v), this.visualElement.render(), p && p(
|
|
230
|
-
}, s = (
|
|
229
|
+
this.updateAxis("x", f.point, v), this.updateAxis("y", f.point, v), this.visualElement.render(), p && p(d, f);
|
|
230
|
+
}, s = (d, f) => this.stop(d, f), l = () => be((d) => {
|
|
231
231
|
var f;
|
|
232
|
-
return this.getAnimationState(
|
|
232
|
+
return this.getAnimationState(d) === "paused" && ((f = this.getAxisMotionValue(d).animation) == null ? void 0 : f.play());
|
|
233
233
|
}), { dragSnapToOrigin: c } = this.getProps();
|
|
234
234
|
this.panSession = new Tr(t, {
|
|
235
235
|
onSessionStart: i,
|
|
@@ -292,14 +292,14 @@ class Va {
|
|
|
292
292
|
return r;
|
|
293
293
|
}
|
|
294
294
|
startAnimation(t) {
|
|
295
|
-
const { drag: n, dragMomentum: o, dragElastic: i, dragTransition: a, dragSnapToOrigin: r, onDragTransitionEnd: s } = this.getProps(), l = this.constraints || {}, c = be((
|
|
296
|
-
if (!Dt(
|
|
295
|
+
const { drag: n, dragMomentum: o, dragElastic: i, dragTransition: a, dragSnapToOrigin: r, onDragTransitionEnd: s } = this.getProps(), l = this.constraints || {}, c = be((d) => {
|
|
296
|
+
if (!Dt(d, n, this.currentDirection))
|
|
297
297
|
return;
|
|
298
|
-
let f = l && l[
|
|
298
|
+
let f = l && l[d] || {};
|
|
299
299
|
r && (f = { min: 0, max: 0 });
|
|
300
300
|
const h = i ? 200 : 1e6, m = i ? 40 : 1e7, x = {
|
|
301
301
|
type: "inertia",
|
|
302
|
-
velocity: o ? t[
|
|
302
|
+
velocity: o ? t[d] : 0,
|
|
303
303
|
bounceStiffness: h,
|
|
304
304
|
bounceDamping: m,
|
|
305
305
|
timeConstant: 750,
|
|
@@ -308,7 +308,7 @@ class Va {
|
|
|
308
308
|
...a,
|
|
309
309
|
...f
|
|
310
310
|
};
|
|
311
|
-
return this.startAxisValueAnimation(
|
|
311
|
+
return this.startAxisValueAnimation(d, x);
|
|
312
312
|
});
|
|
313
313
|
return Promise.all(c).then(s);
|
|
314
314
|
}
|
|
@@ -384,17 +384,17 @@ class Va {
|
|
|
384
384
|
return;
|
|
385
385
|
Ba.set(this.visualElement, this);
|
|
386
386
|
const t = this.visualElement.current, n = xt(t, "pointerdown", (l) => {
|
|
387
|
-
const { drag: c, dragListener:
|
|
388
|
-
c &&
|
|
387
|
+
const { drag: c, dragListener: d = !0 } = this.getProps();
|
|
388
|
+
c && d && this.start(l);
|
|
389
389
|
}), o = () => {
|
|
390
390
|
const { dragConstraints: l } = this.getProps();
|
|
391
391
|
Rt(l) && l.current && (this.constraints = this.resolveRefConstraints());
|
|
392
392
|
}, { projection: i } = this.visualElement, a = i.addEventListener("measure", o);
|
|
393
393
|
i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), Pe.read(o);
|
|
394
394
|
const r = _n(window, "resize", () => this.scalePositionWithinConstraints()), s = i.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: c }) => {
|
|
395
|
-
this.isDragging && c && (be((
|
|
396
|
-
const f = this.getAxisMotionValue(
|
|
397
|
-
f && (this.originPoint[
|
|
395
|
+
this.isDragging && c && (be((d) => {
|
|
396
|
+
const f = this.getAxisMotionValue(d);
|
|
397
|
+
f && (this.originPoint[d] += l[d].translate, f.set(f.get() + l[d].translate));
|
|
398
398
|
}), this.visualElement.render());
|
|
399
399
|
});
|
|
400
400
|
return () => {
|
|
@@ -654,7 +654,7 @@ function Lr(e, t) {
|
|
|
654
654
|
return Io(e.x, t.x) && Io(e.y, t.y);
|
|
655
655
|
}
|
|
656
656
|
function No(e) {
|
|
657
|
-
return
|
|
657
|
+
return me(e.x) / me(e.y);
|
|
658
658
|
}
|
|
659
659
|
function Mo(e, t) {
|
|
660
660
|
return e.translate === t.translate && e.scale === t.scale && e.originPoint === t.originPoint;
|
|
@@ -717,8 +717,8 @@ function il(e, t, n) {
|
|
|
717
717
|
let o = "";
|
|
718
718
|
const i = e.x.translate / t.x, a = e.y.translate / t.y, r = (n == null ? void 0 : n.z) || 0;
|
|
719
719
|
if ((i || a || r) && (o = `translate3d(${i}px, ${a}px, ${r}px) `), (t.x !== 1 || t.y !== 1) && (o += `scale(${1 / t.x}, ${1 / t.y}) `), n) {
|
|
720
|
-
const { transformPerspective: c, rotate:
|
|
721
|
-
c && (o = `perspective(${c}px) ${o}`),
|
|
720
|
+
const { transformPerspective: c, rotate: d, rotateX: f, rotateY: h, skewX: m, skewY: x } = n;
|
|
721
|
+
c && (o = `perspective(${c}px) ${o}`), d && (o += `rotate(${d}deg) `), f && (o += `rotateX(${f}deg) `), h && (o += `rotateY(${h}deg) `), m && (o += `skewX(${m}deg) `), x && (o += `skewY(${x}deg) `);
|
|
722
722
|
}
|
|
723
723
|
const s = e.x.scale * t.x, l = e.y.scale * t.y;
|
|
724
724
|
return (s !== 1 || l !== 1) && (o += `scale(${s}, ${l})`), o || "none";
|
|
@@ -774,13 +774,13 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
774
774
|
this.isSVG = Pr(r) && !Pa(r), this.instance = r;
|
|
775
775
|
const { layoutId: s, layout: l, visualElement: c } = this.options;
|
|
776
776
|
if (c && !c.current && c.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || s) && (this.isLayoutDirty = !0), e) {
|
|
777
|
-
let
|
|
777
|
+
let d;
|
|
778
778
|
const f = () => this.root.updateBlockedByResize = !1;
|
|
779
779
|
e(r, () => {
|
|
780
|
-
this.root.updateBlockedByResize = !0,
|
|
780
|
+
this.root.updateBlockedByResize = !0, d && d(), d = qa(f, 250), Ot.hasAnimatedSinceResize && (Ot.hasAnimatedSinceResize = !1, this.nodes.forEach(jo));
|
|
781
781
|
});
|
|
782
782
|
}
|
|
783
|
-
s && this.root.registerSharedNode(s, this), this.options.animate !== !1 && c && (s || l) && this.addEventListener("didUpdate", ({ delta:
|
|
783
|
+
s && this.root.registerSharedNode(s, this), this.options.animate !== !1 && c && (s || l) && this.addEventListener("didUpdate", ({ delta: d, hasLayoutChanged: f, hasRelativeLayoutChanged: h, layout: m }) => {
|
|
784
784
|
if (this.isTreeAnimationBlocked()) {
|
|
785
785
|
this.target = void 0, this.relativeTarget = void 0;
|
|
786
786
|
return;
|
|
@@ -793,7 +793,7 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
793
793
|
onPlay: p,
|
|
794
794
|
onComplete: v
|
|
795
795
|
};
|
|
796
|
-
(c.shouldReduceMotion || this.options.layoutRoot) && (w.delay = 0, w.type = !1), this.startAnimation(w), this.setAnimationOrigin(
|
|
796
|
+
(c.shouldReduceMotion || this.options.layoutRoot) && (w.delay = 0, w.type = !1), this.startAnimation(w), this.setAnimationOrigin(d, S);
|
|
797
797
|
} else
|
|
798
798
|
f || jo(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
799
799
|
this.targetLayout = m;
|
|
@@ -833,8 +833,8 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
833
833
|
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && jr(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
|
|
834
834
|
return;
|
|
835
835
|
this.isLayoutDirty = !0;
|
|
836
|
-
for (let
|
|
837
|
-
const f = this.path[
|
|
836
|
+
for (let d = 0; d < this.path.length; d++) {
|
|
837
|
+
const f = this.path[d];
|
|
838
838
|
f.shouldResetTransform = !0, f.updateScroll("snapshot"), f.options.layoutRoot && f.willUpdate(!1);
|
|
839
839
|
}
|
|
840
840
|
const { layoutId: s, layout: l } = this.options;
|
|
@@ -870,7 +870,7 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
870
870
|
* Update measurements
|
|
871
871
|
*/
|
|
872
872
|
updateSnapshot() {
|
|
873
|
-
this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !
|
|
873
|
+
this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !me(this.snapshot.measuredBox.x) && !me(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
|
|
874
874
|
}
|
|
875
875
|
updateLayout() {
|
|
876
876
|
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
|
|
@@ -899,8 +899,8 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
899
899
|
resetTransform() {
|
|
900
900
|
if (!i)
|
|
901
901
|
return;
|
|
902
|
-
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, s = this.projectionDelta && !Mr(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0,
|
|
903
|
-
r && this.instance && (s || tt(this.latestValues) ||
|
|
902
|
+
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, s = this.projectionDelta && !Mr(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, d = c !== this.prevTransformTemplateValue;
|
|
903
|
+
r && this.instance && (s || tt(this.latestValues) || d) && (i(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
|
|
904
904
|
}
|
|
905
905
|
measure(r = !0) {
|
|
906
906
|
const s = this.measurePageBox();
|
|
@@ -920,8 +920,8 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
920
920
|
return le();
|
|
921
921
|
const s = r.measureViewportBox();
|
|
922
922
|
if (!(((c = this.scroll) == null ? void 0 : c.wasRoot) || this.path.some(El))) {
|
|
923
|
-
const { scroll:
|
|
924
|
-
|
|
923
|
+
const { scroll: d } = this.root;
|
|
924
|
+
d && (Tt(s.x, d.offset.x), Tt(s.y, d.offset.y));
|
|
925
925
|
}
|
|
926
926
|
return s;
|
|
927
927
|
}
|
|
@@ -931,8 +931,8 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
931
931
|
if (we(s, r), (l = this.scroll) != null && l.wasRoot)
|
|
932
932
|
return s;
|
|
933
933
|
for (let c = 0; c < this.path.length; c++) {
|
|
934
|
-
const
|
|
935
|
-
|
|
934
|
+
const d = this.path[c], { scroll: f, options: h } = d;
|
|
935
|
+
d !== this.root && f && h.layoutScroll && (f.wasRoot && we(s, r), Tt(s.x, f.offset.x), Tt(s.y, f.offset.y));
|
|
936
936
|
}
|
|
937
937
|
return s;
|
|
938
938
|
}
|
|
@@ -940,11 +940,11 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
940
940
|
const l = le();
|
|
941
941
|
we(l, r);
|
|
942
942
|
for (let c = 0; c < this.path.length; c++) {
|
|
943
|
-
const
|
|
944
|
-
!s &&
|
|
945
|
-
x: -
|
|
946
|
-
y: -
|
|
947
|
-
}), tt(
|
|
943
|
+
const d = this.path[c];
|
|
944
|
+
!s && d.options.layoutScroll && d.scroll && d !== d.root && At(l, {
|
|
945
|
+
x: -d.scroll.offset.x,
|
|
946
|
+
y: -d.scroll.offset.y
|
|
947
|
+
}), tt(d.latestValues) && At(l, d.latestValues);
|
|
948
948
|
}
|
|
949
949
|
return tt(this.latestValues) && At(l, this.latestValues), l;
|
|
950
950
|
}
|
|
@@ -956,8 +956,8 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
956
956
|
if (!c.instance || !tt(c.latestValues))
|
|
957
957
|
continue;
|
|
958
958
|
io(c.latestValues) && c.updateSnapshot();
|
|
959
|
-
const
|
|
960
|
-
we(
|
|
959
|
+
const d = le(), f = c.measurePageBox();
|
|
960
|
+
we(d, f), To(s, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, d);
|
|
961
961
|
}
|
|
962
962
|
return tt(this.latestValues) && To(s, this.latestValues), s;
|
|
963
963
|
}
|
|
@@ -984,8 +984,8 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
984
984
|
const l = !!this.resumingFrom || this !== s;
|
|
985
985
|
if (!(r || l && this.isSharedProjectionDirty || this.isProjectionDirty || (h = this.parent) != null && h.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
|
|
986
986
|
return;
|
|
987
|
-
const { layout:
|
|
988
|
-
if (!(!this.layout || !(
|
|
987
|
+
const { layout: d, layoutId: f } = this.options;
|
|
988
|
+
if (!(!this.layout || !(d || f))) {
|
|
989
989
|
if (this.resolvedRelativeTargetAt = xe.timestamp, !this.targetDelta && !this.relativeTarget) {
|
|
990
990
|
const m = this.getClosestProjectingParent();
|
|
991
991
|
m && m.layout && this.animationProgress !== 1 ? (this.relativeParent = m, this.forceRelativeParentToResolveTarget(), this.relativeTarget = le(), this.relativeTargetOrigin = le(), wt(this.relativeTargetOrigin, this.layout.layoutBox, m.layout.layoutBox), we(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -1010,8 +1010,8 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
1010
1010
|
let l = !0;
|
|
1011
1011
|
if ((this.isProjectionDirty || (x = this.parent) != null && x.isProjectionDirty) && (l = !1), s && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === xe.timestamp && (l = !1), l)
|
|
1012
1012
|
return;
|
|
1013
|
-
const { layout: c, layoutId:
|
|
1014
|
-
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c ||
|
|
1013
|
+
const { layout: c, layoutId: d } = this.options;
|
|
1014
|
+
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c || d))
|
|
1015
1015
|
return;
|
|
1016
1016
|
we(this.layoutCorrected, this.layout.layoutBox);
|
|
1017
1017
|
const f = this.treeScale.x, h = this.treeScale.y;
|
|
@@ -1041,14 +1041,14 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
1041
1041
|
this.prevProjectionDelta = at(), this.projectionDelta = at(), this.projectionDeltaWithTransform = at();
|
|
1042
1042
|
}
|
|
1043
1043
|
setAnimationOrigin(r, s = !1) {
|
|
1044
|
-
const l = this.snapshot, c = l ? l.latestValues : {},
|
|
1044
|
+
const l = this.snapshot, c = l ? l.latestValues : {}, d = { ...this.latestValues }, f = at();
|
|
1045
1045
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !s;
|
|
1046
1046
|
const h = le(), m = l ? l.source : void 0, x = this.layout ? this.layout.source : void 0, p = m !== x, v = this.getStack(), y = !v || v.members.length <= 1, S = !!(p && !y && this.options.crossfade === !0 && !this.path.some(bl));
|
|
1047
1047
|
this.animationProgress = 0;
|
|
1048
1048
|
let w;
|
|
1049
1049
|
this.mixTargetDelta = (C) => {
|
|
1050
|
-
const
|
|
1051
|
-
ko(f.x, r.x,
|
|
1050
|
+
const D = C / 1e3;
|
|
1051
|
+
ko(f.x, r.x, D), ko(f.y, r.y, D), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (wt(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox), wl(this.relativeTarget, this.relativeTargetOrigin, h, D), w && rl(this.relativeTarget, w) && (this.isProjectionDirty = !1), w || (w = le()), we(w, this.relativeTarget)), p && (this.animationValues = d, Ja(d, c, this.latestValues, D, S, y)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = D;
|
|
1052
1052
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
1053
1053
|
}
|
|
1054
1054
|
startAnimation(r) {
|
|
@@ -1058,8 +1058,8 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
1058
1058
|
...r,
|
|
1059
1059
|
velocity: 0,
|
|
1060
1060
|
isSync: !0,
|
|
1061
|
-
onUpdate: (
|
|
1062
|
-
this.mixTargetDelta(
|
|
1061
|
+
onUpdate: (d) => {
|
|
1062
|
+
this.mixTargetDelta(d), r.onUpdate && r.onUpdate(d);
|
|
1063
1063
|
},
|
|
1064
1064
|
onStop: () => {
|
|
1065
1065
|
},
|
|
@@ -1079,16 +1079,16 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
1079
1079
|
}
|
|
1080
1080
|
applyTransformsToTarget() {
|
|
1081
1081
|
const r = this.getLead();
|
|
1082
|
-
let { targetWithTransforms: s, target: l, layout: c, latestValues:
|
|
1082
|
+
let { targetWithTransforms: s, target: l, layout: c, latestValues: d } = r;
|
|
1083
1083
|
if (!(!s || !l || !c)) {
|
|
1084
1084
|
if (this !== r && this.layout && c && Or(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
1085
1085
|
l = this.target || le();
|
|
1086
|
-
const f =
|
|
1086
|
+
const f = me(this.layout.layoutBox.x);
|
|
1087
1087
|
l.x.min = r.target.x.min, l.x.max = l.x.min + f;
|
|
1088
|
-
const h =
|
|
1088
|
+
const h = me(this.layout.layoutBox.y);
|
|
1089
1089
|
l.y.min = r.target.y.min, l.y.max = l.y.min + h;
|
|
1090
1090
|
}
|
|
1091
|
-
we(s, l), At(s,
|
|
1091
|
+
we(s, l), At(s, d), St(this.projectionDeltaWithTransform, this.layoutCorrected, s, d);
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
1094
|
registerSharedNode(r, s) {
|
|
@@ -1136,11 +1136,11 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
1136
1136
|
return;
|
|
1137
1137
|
const c = {};
|
|
1138
1138
|
l.z && fn("z", r, c, this.animationValues);
|
|
1139
|
-
for (let
|
|
1140
|
-
fn(`rotate${dn[
|
|
1139
|
+
for (let d = 0; d < dn.length; d++)
|
|
1140
|
+
fn(`rotate${dn[d]}`, r, c, this.animationValues), fn(`skew${dn[d]}`, r, c, this.animationValues);
|
|
1141
1141
|
r.render();
|
|
1142
|
-
for (const
|
|
1143
|
-
r.setStaticValue(
|
|
1142
|
+
for (const d in c)
|
|
1143
|
+
r.setStaticValue(d, c[d]), this.animationValues && (this.animationValues[d] = c[d]);
|
|
1144
1144
|
r.scheduleRender();
|
|
1145
1145
|
}
|
|
1146
1146
|
getProjectionStyles(r) {
|
|
@@ -1158,14 +1158,14 @@ function kr({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
1158
1158
|
const m = {};
|
|
1159
1159
|
return this.options.layoutId && (m.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, m.pointerEvents = ln(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !tt(this.latestValues) && (m.transform = l ? l({}, "") : "none", this.hasProjected = !1), m;
|
|
1160
1160
|
}
|
|
1161
|
-
const
|
|
1162
|
-
this.applyTransformsToTarget(), s.transform = il(this.projectionDeltaWithTransform, this.treeScale,
|
|
1161
|
+
const d = c.animationValues || c.latestValues;
|
|
1162
|
+
this.applyTransformsToTarget(), s.transform = il(this.projectionDeltaWithTransform, this.treeScale, d), l && (s.transform = l(d, s.transform));
|
|
1163
1163
|
const { x: f, y: h } = this.projectionDelta;
|
|
1164
|
-
s.transformOrigin = `${f.origin * 100}% ${h.origin * 100}% 0`, c.animationValues ? s.opacity = c === this ?
|
|
1164
|
+
s.transformOrigin = `${f.origin * 100}% ${h.origin * 100}% 0`, c.animationValues ? s.opacity = c === this ? d.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : d.opacityExit : s.opacity = c === this ? d.opacity !== void 0 ? d.opacity : "" : d.opacityExit !== void 0 ? d.opacityExit : 0;
|
|
1165
1165
|
for (const m in ao) {
|
|
1166
|
-
if (
|
|
1166
|
+
if (d[m] === void 0)
|
|
1167
1167
|
continue;
|
|
1168
|
-
const { correct: x, applyTo: p, isCSSVariable: v } = ao[m], y = s.transform === "none" ?
|
|
1168
|
+
const { correct: x, applyTo: p, isCSSVariable: v } = ao[m], y = s.transform === "none" ? d[m] : x(d[m], c);
|
|
1169
1169
|
if (p) {
|
|
1170
1170
|
const S = p.length;
|
|
1171
1171
|
for (let w = 0; w < S; w++)
|
|
@@ -1196,10 +1196,10 @@ function dl(e) {
|
|
|
1196
1196
|
if (e.isLead() && e.layout && t && e.hasListeners("didUpdate")) {
|
|
1197
1197
|
const { layoutBox: o, measuredBox: i } = e.layout, { animationType: a } = e.options, r = t.source !== e.layout.source;
|
|
1198
1198
|
a === "size" ? be((f) => {
|
|
1199
|
-
const h = r ? t.measuredBox[f] : t.layoutBox[f], m =
|
|
1199
|
+
const h = r ? t.measuredBox[f] : t.layoutBox[f], m = me(h);
|
|
1200
1200
|
h.min = o[f].min, h.max = h.min + m;
|
|
1201
1201
|
}) : Or(a, t.layoutBox, o) && be((f) => {
|
|
1202
|
-
const h = r ? t.measuredBox[f] : t.layoutBox[f], m =
|
|
1202
|
+
const h = r ? t.measuredBox[f] : t.layoutBox[f], m = me(o[f]);
|
|
1203
1203
|
h.max = h.min + m, e.relativeTarget && !e.currentAnimation && (e.isProjectionDirty = !0, e.relativeTarget[f].max = e.relativeTarget[f].min + m);
|
|
1204
1204
|
});
|
|
1205
1205
|
const s = at();
|
|
@@ -1207,7 +1207,7 @@ function dl(e) {
|
|
|
1207
1207
|
const l = at();
|
|
1208
1208
|
r ? St(l, e.applyTransform(i, !0), t.measuredBox) : St(l, o, t.layoutBox);
|
|
1209
1209
|
const c = !Mr(s);
|
|
1210
|
-
let
|
|
1210
|
+
let d = !1;
|
|
1211
1211
|
if (!e.resumeFrom) {
|
|
1212
1212
|
const f = e.getClosestProjectingParent();
|
|
1213
1213
|
if (f && !f.resumeFrom) {
|
|
@@ -1216,7 +1216,7 @@ function dl(e) {
|
|
|
1216
1216
|
const x = le();
|
|
1217
1217
|
wt(x, t.layoutBox, h.layoutBox);
|
|
1218
1218
|
const p = le();
|
|
1219
|
-
wt(p, o, m.layoutBox), Lr(x, p) || (
|
|
1219
|
+
wt(p, o, m.layoutBox), Lr(x, p) || (d = !0), f.options.layoutRoot && (e.relativeTarget = p, e.relativeTargetOrigin = x, e.relativeParent = f);
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
@@ -1226,7 +1226,7 @@ function dl(e) {
|
|
|
1226
1226
|
delta: l,
|
|
1227
1227
|
layoutDelta: s,
|
|
1228
1228
|
hasLayoutChanged: c,
|
|
1229
|
-
hasRelativeLayoutChanged:
|
|
1229
|
+
hasRelativeLayoutChanged: d
|
|
1230
1230
|
});
|
|
1231
1231
|
} else if (e.isLead()) {
|
|
1232
1232
|
const { onExitComplete: o } = e.options;
|
|
@@ -1446,42 +1446,42 @@ const Rl = kr({
|
|
|
1446
1446
|
variant: "solid",
|
|
1447
1447
|
color: "default",
|
|
1448
1448
|
class: {
|
|
1449
|
-
badge:
|
|
1449
|
+
badge: re.solid.default
|
|
1450
1450
|
}
|
|
1451
1451
|
},
|
|
1452
1452
|
{
|
|
1453
1453
|
variant: "solid",
|
|
1454
1454
|
color: "primary",
|
|
1455
1455
|
class: {
|
|
1456
|
-
badge:
|
|
1456
|
+
badge: re.solid.primary
|
|
1457
1457
|
}
|
|
1458
1458
|
},
|
|
1459
1459
|
{
|
|
1460
1460
|
variant: "solid",
|
|
1461
1461
|
color: "secondary",
|
|
1462
1462
|
class: {
|
|
1463
|
-
badge:
|
|
1463
|
+
badge: re.solid.secondary
|
|
1464
1464
|
}
|
|
1465
1465
|
},
|
|
1466
1466
|
{
|
|
1467
1467
|
variant: "solid",
|
|
1468
1468
|
color: "success",
|
|
1469
1469
|
class: {
|
|
1470
|
-
badge:
|
|
1470
|
+
badge: re.solid.success
|
|
1471
1471
|
}
|
|
1472
1472
|
},
|
|
1473
1473
|
{
|
|
1474
1474
|
variant: "solid",
|
|
1475
1475
|
color: "warning",
|
|
1476
1476
|
class: {
|
|
1477
|
-
badge:
|
|
1477
|
+
badge: re.solid.warning
|
|
1478
1478
|
}
|
|
1479
1479
|
},
|
|
1480
1480
|
{
|
|
1481
1481
|
variant: "solid",
|
|
1482
1482
|
color: "danger",
|
|
1483
1483
|
class: {
|
|
1484
|
-
badge:
|
|
1484
|
+
badge: re.solid.danger
|
|
1485
1485
|
}
|
|
1486
1486
|
},
|
|
1487
1487
|
// shadow / color
|
|
@@ -1489,42 +1489,42 @@ const Rl = kr({
|
|
|
1489
1489
|
variant: "shadow",
|
|
1490
1490
|
color: "default",
|
|
1491
1491
|
class: {
|
|
1492
|
-
badge:
|
|
1492
|
+
badge: re.shadow.default
|
|
1493
1493
|
}
|
|
1494
1494
|
},
|
|
1495
1495
|
{
|
|
1496
1496
|
variant: "shadow",
|
|
1497
1497
|
color: "primary",
|
|
1498
1498
|
class: {
|
|
1499
|
-
badge:
|
|
1499
|
+
badge: re.shadow.primary
|
|
1500
1500
|
}
|
|
1501
1501
|
},
|
|
1502
1502
|
{
|
|
1503
1503
|
variant: "shadow",
|
|
1504
1504
|
color: "secondary",
|
|
1505
1505
|
class: {
|
|
1506
|
-
badge:
|
|
1506
|
+
badge: re.shadow.secondary
|
|
1507
1507
|
}
|
|
1508
1508
|
},
|
|
1509
1509
|
{
|
|
1510
1510
|
variant: "shadow",
|
|
1511
1511
|
color: "success",
|
|
1512
1512
|
class: {
|
|
1513
|
-
badge:
|
|
1513
|
+
badge: re.shadow.success
|
|
1514
1514
|
}
|
|
1515
1515
|
},
|
|
1516
1516
|
{
|
|
1517
1517
|
variant: "shadow",
|
|
1518
1518
|
color: "warning",
|
|
1519
1519
|
class: {
|
|
1520
|
-
badge:
|
|
1520
|
+
badge: re.shadow.warning
|
|
1521
1521
|
}
|
|
1522
1522
|
},
|
|
1523
1523
|
{
|
|
1524
1524
|
variant: "shadow",
|
|
1525
1525
|
color: "danger",
|
|
1526
1526
|
class: {
|
|
1527
|
-
badge:
|
|
1527
|
+
badge: re.shadow.danger
|
|
1528
1528
|
}
|
|
1529
1529
|
},
|
|
1530
1530
|
// flat / color
|
|
@@ -1532,42 +1532,42 @@ const Rl = kr({
|
|
|
1532
1532
|
variant: "flat",
|
|
1533
1533
|
color: "default",
|
|
1534
1534
|
class: {
|
|
1535
|
-
badge:
|
|
1535
|
+
badge: re.flat.default
|
|
1536
1536
|
}
|
|
1537
1537
|
},
|
|
1538
1538
|
{
|
|
1539
1539
|
variant: "flat",
|
|
1540
1540
|
color: "primary",
|
|
1541
1541
|
class: {
|
|
1542
|
-
badge:
|
|
1542
|
+
badge: re.flat.primary
|
|
1543
1543
|
}
|
|
1544
1544
|
},
|
|
1545
1545
|
{
|
|
1546
1546
|
variant: "flat",
|
|
1547
1547
|
color: "secondary",
|
|
1548
1548
|
class: {
|
|
1549
|
-
badge:
|
|
1549
|
+
badge: re.flat.secondary
|
|
1550
1550
|
}
|
|
1551
1551
|
},
|
|
1552
1552
|
{
|
|
1553
1553
|
variant: "flat",
|
|
1554
1554
|
color: "success",
|
|
1555
1555
|
class: {
|
|
1556
|
-
badge:
|
|
1556
|
+
badge: re.flat.success
|
|
1557
1557
|
}
|
|
1558
1558
|
},
|
|
1559
1559
|
{
|
|
1560
1560
|
variant: "flat",
|
|
1561
1561
|
color: "warning",
|
|
1562
1562
|
class: {
|
|
1563
|
-
badge:
|
|
1563
|
+
badge: re.flat.warning
|
|
1564
1564
|
}
|
|
1565
1565
|
},
|
|
1566
1566
|
{
|
|
1567
1567
|
variant: "flat",
|
|
1568
1568
|
color: "danger",
|
|
1569
1569
|
class: {
|
|
1570
|
-
badge:
|
|
1570
|
+
badge: re.flat.danger
|
|
1571
1571
|
}
|
|
1572
1572
|
},
|
|
1573
1573
|
// faded / color
|
|
@@ -1575,42 +1575,42 @@ const Rl = kr({
|
|
|
1575
1575
|
variant: "faded",
|
|
1576
1576
|
color: "default",
|
|
1577
1577
|
class: {
|
|
1578
|
-
badge:
|
|
1578
|
+
badge: re.faded.default
|
|
1579
1579
|
}
|
|
1580
1580
|
},
|
|
1581
1581
|
{
|
|
1582
1582
|
variant: "faded",
|
|
1583
1583
|
color: "primary",
|
|
1584
1584
|
class: {
|
|
1585
|
-
badge:
|
|
1585
|
+
badge: re.faded.primary
|
|
1586
1586
|
}
|
|
1587
1587
|
},
|
|
1588
1588
|
{
|
|
1589
1589
|
variant: "faded",
|
|
1590
1590
|
color: "secondary",
|
|
1591
1591
|
class: {
|
|
1592
|
-
badge:
|
|
1592
|
+
badge: re.faded.secondary
|
|
1593
1593
|
}
|
|
1594
1594
|
},
|
|
1595
1595
|
{
|
|
1596
1596
|
variant: "faded",
|
|
1597
1597
|
color: "success",
|
|
1598
1598
|
class: {
|
|
1599
|
-
badge:
|
|
1599
|
+
badge: re.faded.success
|
|
1600
1600
|
}
|
|
1601
1601
|
},
|
|
1602
1602
|
{
|
|
1603
1603
|
variant: "faded",
|
|
1604
1604
|
color: "warning",
|
|
1605
1605
|
class: {
|
|
1606
|
-
badge:
|
|
1606
|
+
badge: re.faded.warning
|
|
1607
1607
|
}
|
|
1608
1608
|
},
|
|
1609
1609
|
{
|
|
1610
1610
|
variant: "faded",
|
|
1611
1611
|
color: "danger",
|
|
1612
1612
|
class: {
|
|
1613
|
-
badge:
|
|
1613
|
+
badge: re.faded.danger
|
|
1614
1614
|
}
|
|
1615
1615
|
},
|
|
1616
1616
|
// isOneChar / size
|
|
@@ -1716,10 +1716,10 @@ const Rl = kr({
|
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
1718
|
]
|
|
1719
|
-
}), Mf =
|
|
1719
|
+
}), Mf = u.forwardRef(
|
|
1720
1720
|
({ className: e, variant: t, size: n, color: o, children: i, content: a, shape: r, placement: s, ...l }, c) => {
|
|
1721
|
-
const { base:
|
|
1722
|
-
return /* @__PURE__ */ g.jsxs("div", { className:
|
|
1721
|
+
const { base: d, badge: f } = Il({ variant: t, size: n, color: o, shape: r, placement: s });
|
|
1722
|
+
return /* @__PURE__ */ g.jsxs("div", { className: d(), children: [
|
|
1723
1723
|
i,
|
|
1724
1724
|
/* @__PURE__ */ g.jsx(
|
|
1725
1725
|
"span",
|
|
@@ -1736,15 +1736,15 @@ const Rl = kr({
|
|
|
1736
1736
|
var o;
|
|
1737
1737
|
if ((t == null ? void 0 : t.variants) == null) return Fo(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
|
|
1738
1738
|
const { variants: i, defaultVariants: a } = t, r = Object.keys(i).map((c) => {
|
|
1739
|
-
const
|
|
1740
|
-
if (
|
|
1741
|
-
const h = Vo(
|
|
1739
|
+
const d = n == null ? void 0 : n[c], f = a == null ? void 0 : a[c];
|
|
1740
|
+
if (d === null) return null;
|
|
1741
|
+
const h = Vo(d) || Vo(f);
|
|
1742
1742
|
return i[c][h];
|
|
1743
|
-
}), s = n && Object.entries(n).reduce((c,
|
|
1744
|
-
let [f, h] =
|
|
1743
|
+
}), s = n && Object.entries(n).reduce((c, d) => {
|
|
1744
|
+
let [f, h] = d;
|
|
1745
1745
|
return h === void 0 || (c[f] = h), c;
|
|
1746
|
-
}, {}), l = t == null || (o = t.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((c,
|
|
1747
|
-
let { class: f, className: h, ...m } =
|
|
1746
|
+
}, {}), l = t == null || (o = t.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((c, d) => {
|
|
1747
|
+
let { class: f, className: h, ...m } = d;
|
|
1748
1748
|
return Object.entries(m).every((x) => {
|
|
1749
1749
|
let [p, v] = x;
|
|
1750
1750
|
return Array.isArray(v) ? v.includes({
|
|
@@ -1785,7 +1785,7 @@ const Rl = kr({
|
|
|
1785
1785
|
radius: "md"
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
|
-
), Ml =
|
|
1788
|
+
), Ml = u.forwardRef((e, t) => {
|
|
1789
1789
|
const {
|
|
1790
1790
|
id: n,
|
|
1791
1791
|
type: o = "text",
|
|
@@ -1793,66 +1793,68 @@ const Rl = kr({
|
|
|
1793
1793
|
defaultValue: a,
|
|
1794
1794
|
className: r,
|
|
1795
1795
|
classNameContainer: s,
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
"text-
|
|
1815
|
-
"text-gray-
|
|
1816
|
-
|
|
1817
|
-
"text-
|
|
1818
|
-
}), K = (
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1796
|
+
startClassName: l,
|
|
1797
|
+
endClassName: c,
|
|
1798
|
+
size: d,
|
|
1799
|
+
radius: f,
|
|
1800
|
+
startContent: h,
|
|
1801
|
+
endContent: m,
|
|
1802
|
+
disabled: x,
|
|
1803
|
+
error: p,
|
|
1804
|
+
touched: v,
|
|
1805
|
+
pattern: y,
|
|
1806
|
+
isErrorText: S = !0,
|
|
1807
|
+
label: w,
|
|
1808
|
+
required: C = !1,
|
|
1809
|
+
isClearable: D = !1,
|
|
1810
|
+
onChange: A,
|
|
1811
|
+
onClear: P,
|
|
1812
|
+
...V
|
|
1813
|
+
} = e, L = u.useId(), F = n || L, U = i !== void 0, O = !x && !!p && v, _ = Xe("absolute top-0 h-full flex items-center cursor-pointer px-1.5 z-[1]", {
|
|
1814
|
+
"text-red-700": O,
|
|
1815
|
+
"text-gray-400": x,
|
|
1816
|
+
"text-green-700": !p && v,
|
|
1817
|
+
"text-gray-500": !O
|
|
1818
|
+
}), X = Xe(h && "pl-8", !h && "pl-2.5", m && "pr-8", !m && "pr-2.5"), K = de(Nl({ size: d, radius: f }), X, r), H = de("block font-normal text-sm text-foreground mb-1", {
|
|
1819
|
+
"text-danger": O
|
|
1820
|
+
}), Q = (Z) => {
|
|
1821
|
+
const he = Z.target.value;
|
|
1822
|
+
y && !Oi(y, he) || A == null || A(Z);
|
|
1823
|
+
}, J = (Z) => {
|
|
1824
|
+
Z.preventDefault(), P == null || P();
|
|
1823
1825
|
};
|
|
1824
1826
|
return /* @__PURE__ */ g.jsxs("div", { className: Me("w-full relative flex flex-col", s), children: [
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
+
w && /* @__PURE__ */ g.jsxs("label", { htmlFor: F, className: H, children: [
|
|
1828
|
+
w,
|
|
1827
1829
|
" ",
|
|
1828
|
-
|
|
1830
|
+
C && /* @__PURE__ */ g.jsx("span", { className: "text-danger", children: "*" })
|
|
1829
1831
|
] }),
|
|
1830
1832
|
/* @__PURE__ */ g.jsxs("div", { className: "w-full relative", children: [
|
|
1831
|
-
|
|
1833
|
+
h && /* @__PURE__ */ g.jsx("div", { className: Me("left-1", _, l), children: h }),
|
|
1832
1834
|
/* @__PURE__ */ g.jsx(
|
|
1833
1835
|
"input",
|
|
1834
1836
|
{
|
|
1835
1837
|
ref: t,
|
|
1836
1838
|
id: F,
|
|
1837
|
-
...
|
|
1839
|
+
...x ? {} : { "aria-invalid": O },
|
|
1838
1840
|
type: o,
|
|
1839
1841
|
autoComplete: "off",
|
|
1840
1842
|
autoCapitalize: "off",
|
|
1841
|
-
disabled:
|
|
1842
|
-
onChange:
|
|
1843
|
-
className:
|
|
1844
|
-
...
|
|
1845
|
-
...
|
|
1843
|
+
disabled: x,
|
|
1844
|
+
onChange: Q,
|
|
1845
|
+
className: K,
|
|
1846
|
+
...U ? { value: i } : { defaultValue: a },
|
|
1847
|
+
...V
|
|
1846
1848
|
}
|
|
1847
1849
|
),
|
|
1848
|
-
|
|
1850
|
+
D && !x && i ? /* @__PURE__ */ g.jsx(
|
|
1849
1851
|
"div",
|
|
1850
1852
|
{
|
|
1851
1853
|
className: Me(
|
|
1852
1854
|
"absolute top-0 h-full flex items-center px-1.5 z-[1] opacity-70 hover:opacity-100 cursor-pointer rounded-full",
|
|
1853
1855
|
"right-1"
|
|
1854
1856
|
),
|
|
1855
|
-
onClick:
|
|
1857
|
+
onClick: J,
|
|
1856
1858
|
children: /* @__PURE__ */ g.jsx("svg", { "aria-hidden": "true", focusable: "false", height: "18", viewBox: "0 0 24 24", width: "18", children: /* @__PURE__ */ g.jsx(
|
|
1857
1859
|
"path",
|
|
1858
1860
|
{
|
|
@@ -1862,9 +1864,9 @@ const Rl = kr({
|
|
|
1862
1864
|
) })
|
|
1863
1865
|
}
|
|
1864
1866
|
) : null,
|
|
1865
|
-
|
|
1867
|
+
m && /* @__PURE__ */ g.jsx("div", { className: Me("right-1", _, c), children: m })
|
|
1866
1868
|
] }),
|
|
1867
|
-
!
|
|
1869
|
+
!x && p && v && S && /* @__PURE__ */ g.jsx(fr, { text: p })
|
|
1868
1870
|
] });
|
|
1869
1871
|
});
|
|
1870
1872
|
Ml.displayName = "Input";
|
|
@@ -1886,8 +1888,8 @@ var Ll = [
|
|
|
1886
1888
|
"span",
|
|
1887
1889
|
"svg",
|
|
1888
1890
|
"ul"
|
|
1889
|
-
],
|
|
1890
|
-
const n = Pt(`Primitive.${t}`), o =
|
|
1891
|
+
], te = Ll.reduce((e, t) => {
|
|
1892
|
+
const n = Pt(`Primitive.${t}`), o = u.forwardRef((i, a) => {
|
|
1891
1893
|
const { asChild: r, ...s } = i, l = r ? n : t;
|
|
1892
1894
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ g.jsx(l, { ...s, ref: a });
|
|
1893
1895
|
});
|
|
@@ -1927,7 +1929,7 @@ const kl = _r(["flex items-center cursor-pointer relative rounded-full p-0.5 px-
|
|
|
1927
1929
|
positionLabel: s = "end",
|
|
1928
1930
|
required: l,
|
|
1929
1931
|
error: c,
|
|
1930
|
-
touched:
|
|
1932
|
+
touched: d,
|
|
1931
1933
|
value: f,
|
|
1932
1934
|
leftIcon: h,
|
|
1933
1935
|
rightIcon: m,
|
|
@@ -1939,9 +1941,9 @@ const kl = _r(["flex items-center cursor-pointer relative rounded-full p-0.5 px-
|
|
|
1939
1941
|
Fe(() => {
|
|
1940
1942
|
C(f);
|
|
1941
1943
|
}, [f]);
|
|
1942
|
-
const
|
|
1943
|
-
p(
|
|
1944
|
-
},
|
|
1944
|
+
const D = (U) => {
|
|
1945
|
+
p(U.target.checked);
|
|
1946
|
+
}, A = () => {
|
|
1945
1947
|
i || p(!w);
|
|
1946
1948
|
}, P = Me(
|
|
1947
1949
|
"transition transform bg-white rounded-full shadow-sm flex justify-center items-center",
|
|
@@ -1953,25 +1955,25 @@ const kl = _r(["flex items-center cursor-pointer relative rounded-full p-0.5 px-
|
|
|
1953
1955
|
n === "md" && w && "translate-x-5",
|
|
1954
1956
|
n === "lg" && w && "translate-x-6"
|
|
1955
1957
|
)
|
|
1956
|
-
),
|
|
1958
|
+
), V = Me(Xe(!w && "bg-default-200", i && "bg-default-100 hover:bg-default-100")), L = Me(
|
|
1957
1959
|
"text-gray-500 leading-none",
|
|
1958
1960
|
Xe({
|
|
1959
1961
|
"text-sm": n === "sm" || n === "md",
|
|
1960
1962
|
"after:content-['*'] after:ml-0.5 after:text-green-500": l,
|
|
1961
1963
|
"after:text-gray-400 text-gray-400": i
|
|
1962
1964
|
})
|
|
1963
|
-
),
|
|
1965
|
+
), F = Me("text-xs text-gray-500 mt-1", i && "text-gray-400");
|
|
1964
1966
|
return /* @__PURE__ */ g.jsxs("div", { className: Me(o), children: [
|
|
1965
1967
|
/* @__PURE__ */ g.jsxs("div", { className: Xe("flex gap-2", r && a ? "items-start" : "items-center"), children: [
|
|
1966
|
-
s === "start" && (a || r) && /* @__PURE__ */ g.jsxs("div", { onClick:
|
|
1968
|
+
s === "start" && (a || r) && /* @__PURE__ */ g.jsxs("div", { onClick: A, className: "cursor-pointer", children: [
|
|
1967
1969
|
a && /* @__PURE__ */ g.jsx("p", { className: L, children: a }),
|
|
1968
|
-
r && /* @__PURE__ */ g.jsx("p", { className:
|
|
1970
|
+
r && /* @__PURE__ */ g.jsx("p", { className: F, children: r })
|
|
1969
1971
|
] }),
|
|
1970
1972
|
/* @__PURE__ */ g.jsxs(
|
|
1971
1973
|
"label",
|
|
1972
1974
|
{
|
|
1973
1975
|
htmlFor: S,
|
|
1974
|
-
className: de(kl({ size: n, color: t }),
|
|
1976
|
+
className: de(kl({ size: n, color: t }), V),
|
|
1975
1977
|
children: [
|
|
1976
1978
|
/* @__PURE__ */ g.jsx(
|
|
1977
1979
|
"input",
|
|
@@ -1979,7 +1981,7 @@ const kl = _r(["flex items-center cursor-pointer relative rounded-full p-0.5 px-
|
|
|
1979
1981
|
type: "checkbox",
|
|
1980
1982
|
id: S,
|
|
1981
1983
|
className: "sr-only peer",
|
|
1982
|
-
onChange:
|
|
1984
|
+
onChange: D,
|
|
1983
1985
|
disabled: i,
|
|
1984
1986
|
checked: w,
|
|
1985
1987
|
"data-state": w ? "checked" : "unchecked",
|
|
@@ -2018,29 +2020,29 @@ const kl = _r(["flex items-center cursor-pointer relative rounded-full p-0.5 px-
|
|
|
2018
2020
|
]
|
|
2019
2021
|
}
|
|
2020
2022
|
),
|
|
2021
|
-
s === "end" && (a || r) && /* @__PURE__ */ g.jsxs("div", { onClick:
|
|
2023
|
+
s === "end" && (a || r) && /* @__PURE__ */ g.jsxs("div", { onClick: A, className: "cursor-pointer", children: [
|
|
2022
2024
|
a && /* @__PURE__ */ g.jsx("p", { className: L, children: a }),
|
|
2023
|
-
r && /* @__PURE__ */ g.jsx("p", { className:
|
|
2025
|
+
r && /* @__PURE__ */ g.jsx("p", { className: F, children: r })
|
|
2024
2026
|
] })
|
|
2025
2027
|
] }),
|
|
2026
|
-
!i && c &&
|
|
2028
|
+
!i && c && d && /* @__PURE__ */ g.jsx(fr, { text: c })
|
|
2027
2029
|
] });
|
|
2028
2030
|
};
|
|
2029
2031
|
Ol.displayName = "Switch";
|
|
2030
|
-
function
|
|
2032
|
+
function ne(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
2031
2033
|
return function(i) {
|
|
2032
2034
|
if (e == null || e(i), n === !1 || !i.defaultPrevented)
|
|
2033
2035
|
return t == null ? void 0 : t(i);
|
|
2034
2036
|
};
|
|
2035
2037
|
}
|
|
2036
2038
|
function zl(e, t) {
|
|
2037
|
-
const n =
|
|
2038
|
-
const { children: r, ...s } = a, l =
|
|
2039
|
+
const n = u.createContext(t), o = (a) => {
|
|
2040
|
+
const { children: r, ...s } = a, l = u.useMemo(() => s, Object.values(s));
|
|
2039
2041
|
return /* @__PURE__ */ g.jsx(n.Provider, { value: l, children: r });
|
|
2040
2042
|
};
|
|
2041
2043
|
o.displayName = e + "Provider";
|
|
2042
2044
|
function i(a) {
|
|
2043
|
-
const r =
|
|
2045
|
+
const r = u.useContext(n);
|
|
2044
2046
|
if (r) return r;
|
|
2045
2047
|
if (t !== void 0) return t;
|
|
2046
2048
|
throw new Error(`\`${a}\` must be used within \`${e}\``);
|
|
@@ -2050,28 +2052,28 @@ function zl(e, t) {
|
|
|
2050
2052
|
function Xt(e, t = []) {
|
|
2051
2053
|
let n = [];
|
|
2052
2054
|
function o(a, r) {
|
|
2053
|
-
const s =
|
|
2055
|
+
const s = u.createContext(r), l = n.length;
|
|
2054
2056
|
n = [...n, r];
|
|
2055
2057
|
const c = (f) => {
|
|
2056
2058
|
var y;
|
|
2057
|
-
const { scope: h, children: m, ...x } = f, p = ((y = h == null ? void 0 : h[e]) == null ? void 0 : y[l]) || s, v =
|
|
2059
|
+
const { scope: h, children: m, ...x } = f, p = ((y = h == null ? void 0 : h[e]) == null ? void 0 : y[l]) || s, v = u.useMemo(() => x, Object.values(x));
|
|
2058
2060
|
return /* @__PURE__ */ g.jsx(p.Provider, { value: v, children: m });
|
|
2059
2061
|
};
|
|
2060
2062
|
c.displayName = a + "Provider";
|
|
2061
|
-
function
|
|
2063
|
+
function d(f, h) {
|
|
2062
2064
|
var p;
|
|
2063
|
-
const m = ((p = h == null ? void 0 : h[e]) == null ? void 0 : p[l]) || s, x =
|
|
2065
|
+
const m = ((p = h == null ? void 0 : h[e]) == null ? void 0 : p[l]) || s, x = u.useContext(m);
|
|
2064
2066
|
if (x) return x;
|
|
2065
2067
|
if (r !== void 0) return r;
|
|
2066
2068
|
throw new Error(`\`${f}\` must be used within \`${a}\``);
|
|
2067
2069
|
}
|
|
2068
|
-
return [c,
|
|
2070
|
+
return [c, d];
|
|
2069
2071
|
}
|
|
2070
2072
|
const i = () => {
|
|
2071
|
-
const a = n.map((r) =>
|
|
2073
|
+
const a = n.map((r) => u.createContext(r));
|
|
2072
2074
|
return function(s) {
|
|
2073
2075
|
const l = (s == null ? void 0 : s[e]) || a;
|
|
2074
|
-
return
|
|
2076
|
+
return u.useMemo(
|
|
2075
2077
|
() => ({ [`__scope${e}`]: { ...s, [e]: l } }),
|
|
2076
2078
|
[s, l]
|
|
2077
2079
|
);
|
|
@@ -2092,13 +2094,13 @@ function _l(...e) {
|
|
|
2092
2094
|
const f = l(a)[`__scope${c}`];
|
|
2093
2095
|
return { ...s, ...f };
|
|
2094
2096
|
}, {});
|
|
2095
|
-
return
|
|
2097
|
+
return u.useMemo(() => ({ [`__scope${t.scopeName}`]: r }), [r]);
|
|
2096
2098
|
};
|
|
2097
2099
|
};
|
|
2098
2100
|
return n.scopeName = t.scopeName, n;
|
|
2099
2101
|
}
|
|
2100
|
-
var fe = globalThis != null && globalThis.document ?
|
|
2101
|
-
}, Bl =
|
|
2102
|
+
var fe = globalThis != null && globalThis.document ? u.useLayoutEffect : () => {
|
|
2103
|
+
}, Bl = u[" useInsertionEffect ".trim().toString()] || fe;
|
|
2102
2104
|
function Dn({
|
|
2103
2105
|
prop: e,
|
|
2104
2106
|
defaultProp: t,
|
|
@@ -2111,23 +2113,23 @@ function Dn({
|
|
|
2111
2113
|
onChange: n
|
|
2112
2114
|
}), s = e !== void 0, l = s ? e : i;
|
|
2113
2115
|
{
|
|
2114
|
-
const
|
|
2115
|
-
|
|
2116
|
-
const f =
|
|
2116
|
+
const d = u.useRef(e !== void 0);
|
|
2117
|
+
u.useEffect(() => {
|
|
2118
|
+
const f = d.current;
|
|
2117
2119
|
if (f !== s) {
|
|
2118
2120
|
const h = f ? "controlled" : "uncontrolled", m = s ? "controlled" : "uncontrolled";
|
|
2119
2121
|
}
|
|
2120
|
-
|
|
2122
|
+
d.current = s;
|
|
2121
2123
|
}, [s, o]);
|
|
2122
2124
|
}
|
|
2123
|
-
const c =
|
|
2124
|
-
(
|
|
2125
|
+
const c = u.useCallback(
|
|
2126
|
+
(d) => {
|
|
2125
2127
|
var f;
|
|
2126
2128
|
if (s) {
|
|
2127
|
-
const h = Fl(
|
|
2129
|
+
const h = Fl(d) ? d(e) : d;
|
|
2128
2130
|
h !== e && ((f = r.current) == null || f.call(r, h));
|
|
2129
2131
|
} else
|
|
2130
|
-
a(
|
|
2132
|
+
a(d);
|
|
2131
2133
|
},
|
|
2132
2134
|
[s, e, a, r]
|
|
2133
2135
|
);
|
|
@@ -2137,10 +2139,10 @@ function Vl({
|
|
|
2137
2139
|
defaultProp: e,
|
|
2138
2140
|
onChange: t
|
|
2139
2141
|
}) {
|
|
2140
|
-
const [n, o] =
|
|
2142
|
+
const [n, o] = u.useState(e), i = u.useRef(n), a = u.useRef(t);
|
|
2141
2143
|
return Bl(() => {
|
|
2142
2144
|
a.current = t;
|
|
2143
|
-
}, [t]),
|
|
2145
|
+
}, [t]), u.useEffect(() => {
|
|
2144
2146
|
var r;
|
|
2145
2147
|
i.current !== n && ((r = a.current) == null || r.call(a, n), i.current = n);
|
|
2146
2148
|
}, [n, i]), [n, o, a];
|
|
@@ -2164,13 +2166,13 @@ function $l(e) {
|
|
|
2164
2166
|
}
|
|
2165
2167
|
);
|
|
2166
2168
|
c.displayName = s;
|
|
2167
|
-
const
|
|
2169
|
+
const d = e + "CollectionItemSlot", f = "data-radix-collection-item", h = Pt(d), m = Ge.forwardRef(
|
|
2168
2170
|
(p, v) => {
|
|
2169
|
-
const { scope: y, children: S, ...w } = p, C = Ge.useRef(null),
|
|
2170
|
-
return Ge.useEffect(() => (
|
|
2171
|
+
const { scope: y, children: S, ...w } = p, C = Ge.useRef(null), D = ae(v, C), A = a(d, y);
|
|
2172
|
+
return Ge.useEffect(() => (A.itemMap.set(C, { ref: C, ...w }), () => void A.itemMap.delete(C))), /* @__PURE__ */ g.jsx(h, { [f]: "", ref: D, children: S });
|
|
2171
2173
|
}
|
|
2172
2174
|
);
|
|
2173
|
-
m.displayName =
|
|
2175
|
+
m.displayName = d;
|
|
2174
2176
|
function x(p) {
|
|
2175
2177
|
const v = a(e + "CollectionConsumer", p);
|
|
2176
2178
|
return Ge.useCallback(() => {
|
|
@@ -2178,7 +2180,7 @@ function $l(e) {
|
|
|
2178
2180
|
if (!S) return [];
|
|
2179
2181
|
const w = Array.from(S.querySelectorAll(`[${f}]`));
|
|
2180
2182
|
return Array.from(v.itemMap.values()).sort(
|
|
2181
|
-
(
|
|
2183
|
+
(A, P) => w.indexOf(A.ref.current) - w.indexOf(P.ref.current)
|
|
2182
2184
|
);
|
|
2183
2185
|
}, [v.collectionRef, v.itemMap]);
|
|
2184
2186
|
}
|
|
@@ -2188,34 +2190,34 @@ function $l(e) {
|
|
|
2188
2190
|
o
|
|
2189
2191
|
];
|
|
2190
2192
|
}
|
|
2191
|
-
var Wl =
|
|
2193
|
+
var Wl = u.createContext(void 0);
|
|
2192
2194
|
function Hl(e) {
|
|
2193
|
-
const t =
|
|
2195
|
+
const t = u.useContext(Wl);
|
|
2194
2196
|
return e || t || "ltr";
|
|
2195
2197
|
}
|
|
2196
2198
|
function qe(e) {
|
|
2197
|
-
const t =
|
|
2198
|
-
return
|
|
2199
|
+
const t = u.useRef(e);
|
|
2200
|
+
return u.useEffect(() => {
|
|
2199
2201
|
t.current = e;
|
|
2200
|
-
}),
|
|
2202
|
+
}), u.useMemo(() => (...n) => {
|
|
2201
2203
|
var o;
|
|
2202
2204
|
return (o = t.current) == null ? void 0 : o.call(t, ...n);
|
|
2203
2205
|
}, []);
|
|
2204
2206
|
}
|
|
2205
2207
|
function Ul(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
2206
2208
|
const n = qe(e);
|
|
2207
|
-
|
|
2209
|
+
u.useEffect(() => {
|
|
2208
2210
|
const o = (i) => {
|
|
2209
2211
|
i.key === "Escape" && n(i);
|
|
2210
2212
|
};
|
|
2211
2213
|
return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
|
|
2212
2214
|
}, [n, t]);
|
|
2213
2215
|
}
|
|
2214
|
-
var Gl = "DismissableLayer", In = "dismissableLayer.update", Kl = "dismissableLayer.pointerDownOutside", Xl = "dismissableLayer.focusOutside", $o, Br =
|
|
2216
|
+
var Gl = "DismissableLayer", In = "dismissableLayer.update", Kl = "dismissableLayer.pointerDownOutside", Xl = "dismissableLayer.focusOutside", $o, Br = u.createContext({
|
|
2215
2217
|
layers: /* @__PURE__ */ new Set(),
|
|
2216
2218
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
2217
2219
|
branches: /* @__PURE__ */ new Set()
|
|
2218
|
-
}), Vn =
|
|
2220
|
+
}), Vn = u.forwardRef(
|
|
2219
2221
|
(e, t) => {
|
|
2220
2222
|
const {
|
|
2221
2223
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -2225,27 +2227,27 @@ var Gl = "DismissableLayer", In = "dismissableLayer.update", Kl = "dismissableLa
|
|
|
2225
2227
|
onInteractOutside: r,
|
|
2226
2228
|
onDismiss: s,
|
|
2227
2229
|
...l
|
|
2228
|
-
} = e, c =
|
|
2229
|
-
const
|
|
2230
|
+
} = e, c = u.useContext(Br), [d, f] = u.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = u.useState({}), x = ae(t, (P) => f(P)), p = Array.from(c.layers), [v] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), y = p.indexOf(v), S = d ? p.indexOf(d) : -1, w = c.layersWithOutsidePointerEventsDisabled.size > 0, C = S >= y, D = Zl((P) => {
|
|
2231
|
+
const V = P.target, L = [...c.branches].some((F) => F.contains(V));
|
|
2230
2232
|
!C || L || (i == null || i(P), r == null || r(P), P.defaultPrevented || s == null || s());
|
|
2231
|
-
}, h),
|
|
2232
|
-
const
|
|
2233
|
-
[...c.branches].some((
|
|
2233
|
+
}, h), A = Jl((P) => {
|
|
2234
|
+
const V = P.target;
|
|
2235
|
+
[...c.branches].some((F) => F.contains(V)) || (a == null || a(P), r == null || r(P), P.defaultPrevented || s == null || s());
|
|
2234
2236
|
}, h);
|
|
2235
2237
|
return Ul((P) => {
|
|
2236
2238
|
S === c.layers.size - 1 && (o == null || o(P), !P.defaultPrevented && s && (P.preventDefault(), s()));
|
|
2237
|
-
}, h),
|
|
2238
|
-
if (
|
|
2239
|
-
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && ($o = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(
|
|
2239
|
+
}, h), u.useEffect(() => {
|
|
2240
|
+
if (d)
|
|
2241
|
+
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && ($o = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(d)), c.layers.add(d), Wo(), () => {
|
|
2240
2242
|
n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = $o);
|
|
2241
2243
|
};
|
|
2242
|
-
}, [
|
|
2243
|
-
|
|
2244
|
-
}, [
|
|
2244
|
+
}, [d, h, n, c]), u.useEffect(() => () => {
|
|
2245
|
+
d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), Wo());
|
|
2246
|
+
}, [d, c]), u.useEffect(() => {
|
|
2245
2247
|
const P = () => m({});
|
|
2246
2248
|
return document.addEventListener(In, P), () => document.removeEventListener(In, P);
|
|
2247
2249
|
}, []), /* @__PURE__ */ g.jsx(
|
|
2248
|
-
|
|
2250
|
+
te.div,
|
|
2249
2251
|
{
|
|
2250
2252
|
...l,
|
|
2251
2253
|
ref: x,
|
|
@@ -2253,32 +2255,32 @@ var Gl = "DismissableLayer", In = "dismissableLayer.update", Kl = "dismissableLa
|
|
|
2253
2255
|
pointerEvents: w ? C ? "auto" : "none" : void 0,
|
|
2254
2256
|
...e.style
|
|
2255
2257
|
},
|
|
2256
|
-
onFocusCapture:
|
|
2257
|
-
onBlurCapture:
|
|
2258
|
-
onPointerDownCapture:
|
|
2258
|
+
onFocusCapture: ne(e.onFocusCapture, A.onFocusCapture),
|
|
2259
|
+
onBlurCapture: ne(e.onBlurCapture, A.onBlurCapture),
|
|
2260
|
+
onPointerDownCapture: ne(
|
|
2259
2261
|
e.onPointerDownCapture,
|
|
2260
|
-
|
|
2262
|
+
D.onPointerDownCapture
|
|
2261
2263
|
)
|
|
2262
2264
|
}
|
|
2263
2265
|
);
|
|
2264
2266
|
}
|
|
2265
2267
|
);
|
|
2266
2268
|
Vn.displayName = Gl;
|
|
2267
|
-
var Yl = "DismissableLayerBranch", ql =
|
|
2268
|
-
const n =
|
|
2269
|
-
return
|
|
2269
|
+
var Yl = "DismissableLayerBranch", ql = u.forwardRef((e, t) => {
|
|
2270
|
+
const n = u.useContext(Br), o = u.useRef(null), i = ae(t, o);
|
|
2271
|
+
return u.useEffect(() => {
|
|
2270
2272
|
const a = o.current;
|
|
2271
2273
|
if (a)
|
|
2272
2274
|
return n.branches.add(a), () => {
|
|
2273
2275
|
n.branches.delete(a);
|
|
2274
2276
|
};
|
|
2275
|
-
}, [n.branches]), /* @__PURE__ */ g.jsx(
|
|
2277
|
+
}, [n.branches]), /* @__PURE__ */ g.jsx(te.div, { ...e, ref: i });
|
|
2276
2278
|
});
|
|
2277
2279
|
ql.displayName = Yl;
|
|
2278
2280
|
function Zl(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
2279
|
-
const n = qe(e), o =
|
|
2281
|
+
const n = qe(e), o = u.useRef(!1), i = u.useRef(() => {
|
|
2280
2282
|
});
|
|
2281
|
-
return
|
|
2283
|
+
return u.useEffect(() => {
|
|
2282
2284
|
const a = (s) => {
|
|
2283
2285
|
if (s.target && !o.current) {
|
|
2284
2286
|
let l = function() {
|
|
@@ -2306,8 +2308,8 @@ function Zl(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
2306
2308
|
};
|
|
2307
2309
|
}
|
|
2308
2310
|
function Jl(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
2309
|
-
const n = qe(e), o =
|
|
2310
|
-
return
|
|
2311
|
+
const n = qe(e), o = u.useRef(!1);
|
|
2312
|
+
return u.useEffect(() => {
|
|
2311
2313
|
const i = (a) => {
|
|
2312
2314
|
a.target && !o.current && Vr(Xl, n, { originalEvent: a }, {
|
|
2313
2315
|
discrete: !1
|
|
@@ -2329,7 +2331,7 @@ function Vr(e, t, n, { discrete: o }) {
|
|
|
2329
2331
|
}
|
|
2330
2332
|
var mn = 0;
|
|
2331
2333
|
function Fr() {
|
|
2332
|
-
|
|
2334
|
+
u.useEffect(() => {
|
|
2333
2335
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
2334
2336
|
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Ho()), document.body.insertAdjacentElement("beforeend", e[1] ?? Ho()), mn++, () => {
|
|
2335
2337
|
mn === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), mn--;
|
|
@@ -2340,14 +2342,14 @@ function Ho() {
|
|
|
2340
2342
|
const e = document.createElement("span");
|
|
2341
2343
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
2342
2344
|
}
|
|
2343
|
-
var gn = "focusScope.autoFocusOnMount", vn = "focusScope.autoFocusOnUnmount", Uo = { bubbles: !1, cancelable: !0 }, Ql = "FocusScope", Fn =
|
|
2345
|
+
var gn = "focusScope.autoFocusOnMount", vn = "focusScope.autoFocusOnUnmount", Uo = { bubbles: !1, cancelable: !0 }, Ql = "FocusScope", Fn = u.forwardRef((e, t) => {
|
|
2344
2346
|
const {
|
|
2345
2347
|
loop: n = !1,
|
|
2346
2348
|
trapped: o = !1,
|
|
2347
2349
|
onMountAutoFocus: i,
|
|
2348
2350
|
onUnmountAutoFocus: a,
|
|
2349
2351
|
...r
|
|
2350
|
-
} = e, [s, l] =
|
|
2352
|
+
} = e, [s, l] = u.useState(null), c = qe(i), d = qe(a), f = u.useRef(null), h = ae(t, (p) => l(p)), m = u.useRef({
|
|
2351
2353
|
paused: !1,
|
|
2352
2354
|
pause() {
|
|
2353
2355
|
this.paused = !0;
|
|
@@ -2356,7 +2358,7 @@ var gn = "focusScope.autoFocusOnMount", vn = "focusScope.autoFocusOnUnmount", Uo
|
|
|
2356
2358
|
this.paused = !1;
|
|
2357
2359
|
}
|
|
2358
2360
|
}).current;
|
|
2359
|
-
|
|
2361
|
+
u.useEffect(() => {
|
|
2360
2362
|
if (o) {
|
|
2361
2363
|
let p = function(w) {
|
|
2362
2364
|
if (m.paused || !s) return;
|
|
@@ -2368,8 +2370,8 @@ var gn = "focusScope.autoFocusOnMount", vn = "focusScope.autoFocusOnUnmount", Uo
|
|
|
2368
2370
|
C !== null && (s.contains(C) || ze(f.current, { select: !0 }));
|
|
2369
2371
|
}, y = function(w) {
|
|
2370
2372
|
if (document.activeElement === document.body)
|
|
2371
|
-
for (const
|
|
2372
|
-
|
|
2373
|
+
for (const D of w)
|
|
2374
|
+
D.removedNodes.length > 0 && ze(s);
|
|
2373
2375
|
};
|
|
2374
2376
|
document.addEventListener("focusin", p), document.addEventListener("focusout", v);
|
|
2375
2377
|
const S = new MutationObserver(y);
|
|
@@ -2377,7 +2379,7 @@ var gn = "focusScope.autoFocusOnMount", vn = "focusScope.autoFocusOnUnmount", Uo
|
|
|
2377
2379
|
document.removeEventListener("focusin", p), document.removeEventListener("focusout", v), S.disconnect();
|
|
2378
2380
|
};
|
|
2379
2381
|
}
|
|
2380
|
-
}, [o, s, m.paused]),
|
|
2382
|
+
}, [o, s, m.paused]), u.useEffect(() => {
|
|
2381
2383
|
if (s) {
|
|
2382
2384
|
Ko.add(m);
|
|
2383
2385
|
const p = document.activeElement;
|
|
@@ -2388,12 +2390,12 @@ var gn = "focusScope.autoFocusOnMount", vn = "focusScope.autoFocusOnUnmount", Uo
|
|
|
2388
2390
|
return () => {
|
|
2389
2391
|
s.removeEventListener(gn, c), setTimeout(() => {
|
|
2390
2392
|
const y = new CustomEvent(vn, Uo);
|
|
2391
|
-
s.addEventListener(vn,
|
|
2393
|
+
s.addEventListener(vn, d), s.dispatchEvent(y), y.defaultPrevented || ze(p ?? document.body, { select: !0 }), s.removeEventListener(vn, d), Ko.remove(m);
|
|
2392
2394
|
}, 0);
|
|
2393
2395
|
};
|
|
2394
2396
|
}
|
|
2395
|
-
}, [s, c,
|
|
2396
|
-
const x =
|
|
2397
|
+
}, [s, c, d, m]);
|
|
2398
|
+
const x = u.useCallback(
|
|
2397
2399
|
(p) => {
|
|
2398
2400
|
if (!n && !o || m.paused) return;
|
|
2399
2401
|
const v = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, y = document.activeElement;
|
|
@@ -2404,7 +2406,7 @@ var gn = "focusScope.autoFocusOnMount", vn = "focusScope.autoFocusOnUnmount", Uo
|
|
|
2404
2406
|
},
|
|
2405
2407
|
[n, o, m.paused]
|
|
2406
2408
|
);
|
|
2407
|
-
return /* @__PURE__ */ g.jsx(
|
|
2409
|
+
return /* @__PURE__ */ g.jsx(te.div, { tabIndex: -1, ...r, ref: h, onKeyDown: x });
|
|
2408
2410
|
});
|
|
2409
2411
|
Fn.displayName = Ql;
|
|
2410
2412
|
function ec(e, { select: t = !1 } = {}) {
|
|
@@ -2469,18 +2471,18 @@ function Xo(e, t) {
|
|
|
2469
2471
|
function sc(e) {
|
|
2470
2472
|
return e.filter((t) => t.tagName !== "A");
|
|
2471
2473
|
}
|
|
2472
|
-
var ic =
|
|
2474
|
+
var ic = u[" useId ".trim().toString()] || (() => {
|
|
2473
2475
|
}), ac = 0;
|
|
2474
2476
|
function ut(e) {
|
|
2475
|
-
const [t, n] =
|
|
2477
|
+
const [t, n] = u.useState(ic());
|
|
2476
2478
|
return fe(() => {
|
|
2477
2479
|
n((o) => o ?? String(ac++));
|
|
2478
2480
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
2479
2481
|
}
|
|
2480
|
-
var lc = "Arrow", Wr =
|
|
2482
|
+
var lc = "Arrow", Wr = u.forwardRef((e, t) => {
|
|
2481
2483
|
const { children: n, width: o = 10, height: i = 5, ...a } = e;
|
|
2482
2484
|
return /* @__PURE__ */ g.jsx(
|
|
2483
|
-
|
|
2485
|
+
te.svg,
|
|
2484
2486
|
{
|
|
2485
2487
|
...a,
|
|
2486
2488
|
ref: t,
|
|
@@ -2495,7 +2497,7 @@ var lc = "Arrow", Wr = d.forwardRef((e, t) => {
|
|
|
2495
2497
|
Wr.displayName = lc;
|
|
2496
2498
|
var cc = Wr;
|
|
2497
2499
|
function uc(e) {
|
|
2498
|
-
const [t, n] =
|
|
2500
|
+
const [t, n] = u.useState(void 0);
|
|
2499
2501
|
return fe(() => {
|
|
2500
2502
|
if (e) {
|
|
2501
2503
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
@@ -2517,22 +2519,22 @@ function uc(e) {
|
|
|
2517
2519
|
}, [e]), t;
|
|
2518
2520
|
}
|
|
2519
2521
|
var $n = "Popper", [Hr, Ur] = Xt($n), [dc, Gr] = Hr($n), Kr = (e) => {
|
|
2520
|
-
const { __scopePopper: t, children: n } = e, [o, i] =
|
|
2522
|
+
const { __scopePopper: t, children: n } = e, [o, i] = u.useState(null);
|
|
2521
2523
|
return /* @__PURE__ */ g.jsx(dc, { scope: t, anchor: o, onAnchorChange: i, children: n });
|
|
2522
2524
|
};
|
|
2523
2525
|
Kr.displayName = $n;
|
|
2524
|
-
var Xr = "PopperAnchor", Yr =
|
|
2526
|
+
var Xr = "PopperAnchor", Yr = u.forwardRef(
|
|
2525
2527
|
(e, t) => {
|
|
2526
|
-
const { __scopePopper: n, virtualRef: o, ...i } = e, a = Gr(Xr, n), r =
|
|
2527
|
-
return
|
|
2528
|
+
const { __scopePopper: n, virtualRef: o, ...i } = e, a = Gr(Xr, n), r = u.useRef(null), s = ae(t, r);
|
|
2529
|
+
return u.useEffect(() => {
|
|
2528
2530
|
a.onAnchorChange((o == null ? void 0 : o.current) || r.current);
|
|
2529
|
-
}), o ? null : /* @__PURE__ */ g.jsx(
|
|
2531
|
+
}), o ? null : /* @__PURE__ */ g.jsx(te.div, { ...i, ref: s });
|
|
2530
2532
|
}
|
|
2531
2533
|
);
|
|
2532
2534
|
Yr.displayName = Xr;
|
|
2533
|
-
var Wn = "PopperContent", [fc, hc] = Hr(Wn), qr =
|
|
2535
|
+
var Wn = "PopperContent", [fc, hc] = Hr(Wn), qr = u.forwardRef(
|
|
2534
2536
|
(e, t) => {
|
|
2535
|
-
var b, R, z, k, $,
|
|
2537
|
+
var b, R, z, k, $, B;
|
|
2536
2538
|
const {
|
|
2537
2539
|
__scopePopper: n,
|
|
2538
2540
|
side: o = "bottom",
|
|
@@ -2542,18 +2544,18 @@ var Wn = "PopperContent", [fc, hc] = Hr(Wn), qr = d.forwardRef(
|
|
|
2542
2544
|
arrowPadding: s = 0,
|
|
2543
2545
|
avoidCollisions: l = !0,
|
|
2544
2546
|
collisionBoundary: c = [],
|
|
2545
|
-
collisionPadding:
|
|
2547
|
+
collisionPadding: d = 0,
|
|
2546
2548
|
sticky: f = "partial",
|
|
2547
2549
|
hideWhenDetached: h = !1,
|
|
2548
2550
|
updatePositionStrategy: m = "optimized",
|
|
2549
2551
|
onPlaced: x,
|
|
2550
2552
|
...p
|
|
2551
|
-
} = e, v = Gr(Wn, n), [y, S] =
|
|
2552
|
-
padding:
|
|
2553
|
-
boundary:
|
|
2553
|
+
} = e, v = Gr(Wn, n), [y, S] = u.useState(null), w = ae(t, (G) => S(G)), [C, D] = u.useState(null), A = uc(C), P = (A == null ? void 0 : A.width) ?? 0, V = (A == null ? void 0 : A.height) ?? 0, L = o + (a !== "center" ? "-" + a : ""), F = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, U = Array.isArray(c) ? c : [c], O = U.length > 0, _ = {
|
|
2554
|
+
padding: F,
|
|
2555
|
+
boundary: U.filter(mc),
|
|
2554
2556
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2555
2557
|
altBoundary: O
|
|
2556
|
-
}, { refs: X, floatingStyles: K, placement:
|
|
2558
|
+
}, { refs: X, floatingStyles: K, placement: H, isPositioned: Q, middlewareData: J } = ha({
|
|
2557
2559
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
2558
2560
|
strategy: "fixed",
|
|
2559
2561
|
placement: L,
|
|
@@ -2564,30 +2566,30 @@ var Wn = "PopperContent", [fc, hc] = Hr(Wn), qr = d.forwardRef(
|
|
|
2564
2566
|
reference: v.anchor
|
|
2565
2567
|
},
|
|
2566
2568
|
middleware: [
|
|
2567
|
-
pa({ mainAxis: i +
|
|
2569
|
+
pa({ mainAxis: i + V, alignmentAxis: r }),
|
|
2568
2570
|
l && ma({
|
|
2569
2571
|
mainAxis: !0,
|
|
2570
2572
|
crossAxis: !1,
|
|
2571
2573
|
limiter: f === "partial" ? Sa() : void 0,
|
|
2572
|
-
...
|
|
2574
|
+
..._
|
|
2573
2575
|
}),
|
|
2574
|
-
l && ga({ ...
|
|
2576
|
+
l && ga({ ..._ }),
|
|
2575
2577
|
va({
|
|
2576
|
-
...
|
|
2577
|
-
apply: ({ elements: G, rects: T, availableWidth: j, availableHeight:
|
|
2578
|
-
const { width: se, height:
|
|
2579
|
-
Y.setProperty("--radix-popper-available-width", `${j}px`), Y.setProperty("--radix-popper-available-height", `${
|
|
2578
|
+
..._,
|
|
2579
|
+
apply: ({ elements: G, rects: T, availableWidth: j, availableHeight: ee }) => {
|
|
2580
|
+
const { width: se, height: q } = T.reference, Y = G.floating.style;
|
|
2581
|
+
Y.setProperty("--radix-popper-available-width", `${j}px`), Y.setProperty("--radix-popper-available-height", `${ee}px`), Y.setProperty("--radix-popper-anchor-width", `${se}px`), Y.setProperty("--radix-popper-anchor-height", `${q}px`);
|
|
2580
2582
|
}
|
|
2581
2583
|
}),
|
|
2582
2584
|
C && ya({ element: C, padding: s }),
|
|
2583
|
-
gc({ arrowWidth: P, arrowHeight:
|
|
2584
|
-
h && xa({ strategy: "referenceHidden", ...
|
|
2585
|
+
gc({ arrowWidth: P, arrowHeight: V }),
|
|
2586
|
+
h && xa({ strategy: "referenceHidden", ..._ })
|
|
2585
2587
|
]
|
|
2586
|
-
}), [
|
|
2588
|
+
}), [Z, he] = Qr(H), oe = qe(x);
|
|
2587
2589
|
fe(() => {
|
|
2588
|
-
|
|
2589
|
-
}, [
|
|
2590
|
-
const ue = (b = J.arrow) == null ? void 0 : b.x, E = (R = J.arrow) == null ? void 0 : R.y, I = ((z = J.arrow) == null ? void 0 : z.centerOffset) !== 0, [M, N] =
|
|
2590
|
+
Q && (oe == null || oe());
|
|
2591
|
+
}, [Q, oe]);
|
|
2592
|
+
const ue = (b = J.arrow) == null ? void 0 : b.x, E = (R = J.arrow) == null ? void 0 : R.y, I = ((z = J.arrow) == null ? void 0 : z.centerOffset) !== 0, [M, N] = u.useState();
|
|
2591
2593
|
return fe(() => {
|
|
2592
2594
|
y && N(window.getComputedStyle(y).zIndex);
|
|
2593
2595
|
}, [y]), /* @__PURE__ */ g.jsx(
|
|
@@ -2597,7 +2599,7 @@ var Wn = "PopperContent", [fc, hc] = Hr(Wn), qr = d.forwardRef(
|
|
|
2597
2599
|
"data-radix-popper-content-wrapper": "",
|
|
2598
2600
|
style: {
|
|
2599
2601
|
...K,
|
|
2600
|
-
transform:
|
|
2602
|
+
transform: Q ? K.transform : "translate(0, -200%)",
|
|
2601
2603
|
// keep off the page when measuring
|
|
2602
2604
|
minWidth: "max-content",
|
|
2603
2605
|
zIndex: M,
|
|
@@ -2608,7 +2610,7 @@ var Wn = "PopperContent", [fc, hc] = Hr(Wn), qr = d.forwardRef(
|
|
|
2608
2610
|
// hide the content if using the hide middleware and should be hidden
|
|
2609
2611
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
2610
2612
|
// as if the PopperContent isn't there at all
|
|
2611
|
-
...((
|
|
2613
|
+
...((B = J.hide) == null ? void 0 : B.referenceHidden) && {
|
|
2612
2614
|
visibility: "hidden",
|
|
2613
2615
|
pointerEvents: "none"
|
|
2614
2616
|
}
|
|
@@ -2618,23 +2620,23 @@ var Wn = "PopperContent", [fc, hc] = Hr(Wn), qr = d.forwardRef(
|
|
|
2618
2620
|
fc,
|
|
2619
2621
|
{
|
|
2620
2622
|
scope: n,
|
|
2621
|
-
placedSide:
|
|
2622
|
-
onArrowChange:
|
|
2623
|
+
placedSide: Z,
|
|
2624
|
+
onArrowChange: D,
|
|
2623
2625
|
arrowX: ue,
|
|
2624
2626
|
arrowY: E,
|
|
2625
2627
|
shouldHideArrow: I,
|
|
2626
2628
|
children: /* @__PURE__ */ g.jsx(
|
|
2627
|
-
|
|
2629
|
+
te.div,
|
|
2628
2630
|
{
|
|
2629
|
-
"data-side":
|
|
2630
|
-
"data-align":
|
|
2631
|
+
"data-side": Z,
|
|
2632
|
+
"data-align": he,
|
|
2631
2633
|
...p,
|
|
2632
2634
|
ref: w,
|
|
2633
2635
|
style: {
|
|
2634
2636
|
...p.style,
|
|
2635
2637
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
2636
2638
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
2637
|
-
animation:
|
|
2639
|
+
animation: Q ? void 0 : "none"
|
|
2638
2640
|
}
|
|
2639
2641
|
}
|
|
2640
2642
|
)
|
|
@@ -2650,7 +2652,7 @@ var Zr = "PopperArrow", pc = {
|
|
|
2650
2652
|
right: "left",
|
|
2651
2653
|
bottom: "top",
|
|
2652
2654
|
left: "right"
|
|
2653
|
-
}, Jr =
|
|
2655
|
+
}, Jr = u.forwardRef(function(t, n) {
|
|
2654
2656
|
const { __scopePopper: o, ...i } = t, a = hc(Zr, o), r = pc[a.placedSide];
|
|
2655
2657
|
return (
|
|
2656
2658
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
@@ -2704,7 +2706,7 @@ var gc = (e) => ({
|
|
|
2704
2706
|
options: e,
|
|
2705
2707
|
fn(t) {
|
|
2706
2708
|
var v, y, S;
|
|
2707
|
-
const { placement: n, rects: o, middlewareData: i } = t, r = ((v = i.arrow) == null ? void 0 : v.centerOffset) !== 0, s = r ? 0 : e.arrowWidth, l = r ? 0 : e.arrowHeight, [c,
|
|
2709
|
+
const { placement: n, rects: o, middlewareData: i } = t, r = ((v = i.arrow) == null ? void 0 : v.centerOffset) !== 0, s = r ? 0 : e.arrowWidth, l = r ? 0 : e.arrowHeight, [c, d] = Qr(n), f = { start: "0%", center: "50%", end: "100%" }[d], h = (((y = i.arrow) == null ? void 0 : y.x) ?? 0) + s / 2, m = (((S = i.arrow) == null ? void 0 : S.y) ?? 0) + l / 2;
|
|
2708
2710
|
let x = "", p = "";
|
|
2709
2711
|
return c === "bottom" ? (x = r ? f : `${h}px`, p = `${-l}px`) : c === "top" ? (x = r ? f : `${h}px`, p = `${o.floating.height + l}px`) : c === "right" ? (x = `${-l}px`, p = r ? f : `${m}px`) : c === "left" && (x = `${o.floating.width + l}px`, p = r ? f : `${m}px`), { data: { x, y: p } };
|
|
2710
2712
|
}
|
|
@@ -2713,24 +2715,24 @@ function Qr(e) {
|
|
|
2713
2715
|
const [t, n = "center"] = e.split("-");
|
|
2714
2716
|
return [t, n];
|
|
2715
2717
|
}
|
|
2716
|
-
var vc = Kr, yc = Yr, xc = qr, Sc = Jr, wc = "Portal", Hn =
|
|
2718
|
+
var vc = Kr, yc = Yr, xc = qr, Sc = Jr, wc = "Portal", Hn = u.forwardRef((e, t) => {
|
|
2717
2719
|
var s;
|
|
2718
|
-
const { container: n, ...o } = e, [i, a] =
|
|
2720
|
+
const { container: n, ...o } = e, [i, a] = u.useState(!1);
|
|
2719
2721
|
fe(() => a(!0), []);
|
|
2720
2722
|
const r = n || i && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
|
|
2721
|
-
return r ? fa.createPortal(/* @__PURE__ */ g.jsx(
|
|
2723
|
+
return r ? fa.createPortal(/* @__PURE__ */ g.jsx(te.div, { ...o, ref: t }), r) : null;
|
|
2722
2724
|
});
|
|
2723
2725
|
Hn.displayName = wc;
|
|
2724
2726
|
function bc(e, t) {
|
|
2725
|
-
return
|
|
2727
|
+
return u.useReducer((n, o) => t[n][o] ?? n, e);
|
|
2726
2728
|
}
|
|
2727
2729
|
var Yt = (e) => {
|
|
2728
|
-
const { present: t, children: n } = e, o = Pc(t), i = typeof n == "function" ? n({ present: o.isPresent }) :
|
|
2729
|
-
return typeof n == "function" || o.isPresent ?
|
|
2730
|
+
const { present: t, children: n } = e, o = Pc(t), i = typeof n == "function" ? n({ present: o.isPresent }) : u.Children.only(n), a = ae(o.ref, Cc(i));
|
|
2731
|
+
return typeof n == "function" || o.isPresent ? u.cloneElement(i, { ref: a }) : null;
|
|
2730
2732
|
};
|
|
2731
2733
|
Yt.displayName = "Presence";
|
|
2732
2734
|
function Pc(e) {
|
|
2733
|
-
const [t, n] =
|
|
2735
|
+
const [t, n] = u.useState(), o = u.useRef(null), i = u.useRef(e), a = u.useRef("none"), r = e ? "mounted" : "unmounted", [s, l] = bc(r, {
|
|
2734
2736
|
mounted: {
|
|
2735
2737
|
UNMOUNT: "unmounted",
|
|
2736
2738
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -2743,23 +2745,23 @@ function Pc(e) {
|
|
|
2743
2745
|
MOUNT: "mounted"
|
|
2744
2746
|
}
|
|
2745
2747
|
});
|
|
2746
|
-
return
|
|
2748
|
+
return u.useEffect(() => {
|
|
2747
2749
|
const c = It(o.current);
|
|
2748
2750
|
a.current = s === "mounted" ? c : "none";
|
|
2749
2751
|
}, [s]), fe(() => {
|
|
2750
|
-
const c = o.current,
|
|
2751
|
-
if (
|
|
2752
|
+
const c = o.current, d = i.current;
|
|
2753
|
+
if (d !== e) {
|
|
2752
2754
|
const h = a.current, m = It(c);
|
|
2753
|
-
e ? l("MOUNT") : m === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(
|
|
2755
|
+
e ? l("MOUNT") : m === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(d && h !== m ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
2754
2756
|
}
|
|
2755
2757
|
}, [e, l]), fe(() => {
|
|
2756
2758
|
if (t) {
|
|
2757
2759
|
let c;
|
|
2758
|
-
const
|
|
2760
|
+
const d = t.ownerDocument.defaultView ?? window, f = (m) => {
|
|
2759
2761
|
const p = It(o.current).includes(m.animationName);
|
|
2760
2762
|
if (m.target === t && p && (l("ANIMATION_END"), !i.current)) {
|
|
2761
2763
|
const v = t.style.animationFillMode;
|
|
2762
|
-
t.style.animationFillMode = "forwards", c =
|
|
2764
|
+
t.style.animationFillMode = "forwards", c = d.setTimeout(() => {
|
|
2763
2765
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
|
|
2764
2766
|
});
|
|
2765
2767
|
}
|
|
@@ -2767,13 +2769,13 @@ function Pc(e) {
|
|
|
2767
2769
|
m.target === t && (a.current = It(o.current));
|
|
2768
2770
|
};
|
|
2769
2771
|
return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
|
|
2770
|
-
|
|
2772
|
+
d.clearTimeout(c), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
|
|
2771
2773
|
};
|
|
2772
2774
|
} else
|
|
2773
2775
|
l("ANIMATION_END");
|
|
2774
2776
|
}, [t, l]), {
|
|
2775
2777
|
isPresent: ["mounted", "unmountSuspended"].includes(s),
|
|
2776
|
-
ref:
|
|
2778
|
+
ref: u.useCallback((c) => {
|
|
2777
2779
|
o.current = c ? getComputedStyle(c) : null, n(c);
|
|
2778
2780
|
}, [])
|
|
2779
2781
|
};
|
|
@@ -2809,10 +2811,10 @@ var Ec = function(e) {
|
|
|
2809
2811
|
!f || s.has(f) || (s.add(f), c(f.parentNode));
|
|
2810
2812
|
};
|
|
2811
2813
|
i.forEach(c);
|
|
2812
|
-
var
|
|
2814
|
+
var d = function(f) {
|
|
2813
2815
|
!f || l.has(f) || Array.prototype.forEach.call(f.children, function(h) {
|
|
2814
2816
|
if (s.has(h))
|
|
2815
|
-
|
|
2817
|
+
d(h);
|
|
2816
2818
|
else
|
|
2817
2819
|
try {
|
|
2818
2820
|
var m = h.getAttribute(o), x = m !== null && m !== "false", p = (nt.get(h) || 0) + 1, v = (a.get(h) || 0) + 1;
|
|
@@ -2821,7 +2823,7 @@ var Ec = function(e) {
|
|
|
2821
2823
|
}
|
|
2822
2824
|
});
|
|
2823
2825
|
};
|
|
2824
|
-
return
|
|
2826
|
+
return d(t), s.clear(), yn++, function() {
|
|
2825
2827
|
r.forEach(function(f) {
|
|
2826
2828
|
var h = nt.get(f) - 1, m = a.get(f) - 1;
|
|
2827
2829
|
nt.set(f, h), a.set(f, m), h || (Nt.has(f) || f.removeAttribute(o), Nt.delete(f)), m || f.removeAttribute(n);
|
|
@@ -2880,7 +2882,7 @@ function Nc(e, t) {
|
|
|
2880
2882
|
})[0];
|
|
2881
2883
|
return n.callback = t, n.facade;
|
|
2882
2884
|
}
|
|
2883
|
-
var Mc = typeof window < "u" ?
|
|
2885
|
+
var Mc = typeof window < "u" ? u.useLayoutEffect : u.useEffect, Yo = /* @__PURE__ */ new WeakMap();
|
|
2884
2886
|
function Lc(e, t) {
|
|
2885
2887
|
var n = Nc(null, function(o) {
|
|
2886
2888
|
return e.forEach(function(i) {
|
|
@@ -2941,17 +2943,17 @@ function kc(e, t) {
|
|
|
2941
2943
|
n = [], s.forEach(a), r = n;
|
|
2942
2944
|
}
|
|
2943
2945
|
var l = function() {
|
|
2944
|
-
var
|
|
2945
|
-
r = [],
|
|
2946
|
+
var d = r;
|
|
2947
|
+
r = [], d.forEach(a);
|
|
2946
2948
|
}, c = function() {
|
|
2947
2949
|
return Promise.resolve().then(l);
|
|
2948
2950
|
};
|
|
2949
2951
|
c(), n = {
|
|
2950
|
-
push: function(
|
|
2951
|
-
r.push(
|
|
2952
|
+
push: function(d) {
|
|
2953
|
+
r.push(d), c();
|
|
2952
2954
|
},
|
|
2953
|
-
filter: function(
|
|
2954
|
-
return r = r.filter(
|
|
2955
|
+
filter: function(d) {
|
|
2956
|
+
return r = r.filter(d), n;
|
|
2955
2957
|
}
|
|
2956
2958
|
};
|
|
2957
2959
|
}
|
|
@@ -2970,24 +2972,24 @@ var os = function(e) {
|
|
|
2970
2972
|
var o = t.read();
|
|
2971
2973
|
if (!o)
|
|
2972
2974
|
throw new Error("Sidecar medium not found");
|
|
2973
|
-
return
|
|
2975
|
+
return u.createElement(o, Ae({}, n));
|
|
2974
2976
|
};
|
|
2975
2977
|
os.isSideCarExport = !0;
|
|
2976
2978
|
function zc(e, t) {
|
|
2977
2979
|
return e.useMedium(t), os;
|
|
2978
2980
|
}
|
|
2979
2981
|
var rs = Oc(), Sn = function() {
|
|
2980
|
-
}, qt =
|
|
2981
|
-
var n =
|
|
2982
|
+
}, qt = u.forwardRef(function(e, t) {
|
|
2983
|
+
var n = u.useRef(null), o = u.useState({
|
|
2982
2984
|
onScrollCapture: Sn,
|
|
2983
2985
|
onWheelCapture: Sn,
|
|
2984
2986
|
onTouchMoveCapture: Sn
|
|
2985
|
-
}), i = o[0], a = o[1], r = e.forwardProps, s = e.children, l = e.className, c = e.removeScrollBar,
|
|
2986
|
-
return
|
|
2987
|
-
|
|
2987
|
+
}), i = o[0], a = o[1], r = e.forwardProps, s = e.children, l = e.className, c = e.removeScrollBar, d = e.enabled, f = e.shards, h = e.sideCar, m = e.noRelative, x = e.noIsolation, p = e.inert, v = e.allowPinchZoom, y = e.as, S = y === void 0 ? "div" : y, w = e.gapMode, C = ns(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), D = h, A = Lc([n, t]), P = Ae(Ae({}, C), i);
|
|
2988
|
+
return u.createElement(
|
|
2989
|
+
u.Fragment,
|
|
2988
2990
|
null,
|
|
2989
|
-
|
|
2990
|
-
r ?
|
|
2991
|
+
d && u.createElement(D, { sideCar: rs, removeScrollBar: c, shards: f, noRelative: m, noIsolation: x, inert: p, setCallbacks: a, allowPinchZoom: !!v, lockRef: n, gapMode: w }),
|
|
2992
|
+
r ? u.cloneElement(u.Children.only(s), Ae(Ae({}, P), { ref: A })) : u.createElement(S, Ae({}, P, { className: l, ref: A }), s)
|
|
2991
2993
|
);
|
|
2992
2994
|
});
|
|
2993
2995
|
qt.defaultProps = {
|
|
@@ -3031,7 +3033,7 @@ var $c = function() {
|
|
|
3031
3033
|
}, Wc = function() {
|
|
3032
3034
|
var e = $c();
|
|
3033
3035
|
return function(t, n) {
|
|
3034
|
-
|
|
3036
|
+
u.useEffect(function() {
|
|
3035
3037
|
return e.add(t), function() {
|
|
3036
3038
|
e.remove();
|
|
3037
3039
|
};
|
|
@@ -3111,7 +3113,7 @@ var $c = function() {
|
|
|
3111
3113
|
var e = parseInt(document.body.getAttribute(dt) || "0", 10);
|
|
3112
3114
|
return isFinite(e) ? e : 0;
|
|
3113
3115
|
}, Yc = function() {
|
|
3114
|
-
|
|
3116
|
+
u.useEffect(function() {
|
|
3115
3117
|
return document.body.setAttribute(dt, (qo() + 1).toString()), function() {
|
|
3116
3118
|
var e = qo() - 1;
|
|
3117
3119
|
e <= 0 ? document.body.removeAttribute(dt) : document.body.setAttribute(dt, e.toString());
|
|
@@ -3120,10 +3122,10 @@ var $c = function() {
|
|
|
3120
3122
|
}, qc = function(e) {
|
|
3121
3123
|
var t = e.noRelative, n = e.noImportant, o = e.gapMode, i = o === void 0 ? "margin" : o;
|
|
3122
3124
|
Yc();
|
|
3123
|
-
var a =
|
|
3125
|
+
var a = u.useMemo(function() {
|
|
3124
3126
|
return Gc(i);
|
|
3125
3127
|
}, [i]);
|
|
3126
|
-
return
|
|
3128
|
+
return u.createElement(Kc, { styles: Xc(a, !t, i, n ? "" : "!important") });
|
|
3127
3129
|
}, Nn = !1;
|
|
3128
3130
|
if (typeof window < "u")
|
|
3129
3131
|
try {
|
|
@@ -3185,7 +3187,7 @@ var ot = Nn ? { passive: !1 } : !1, Zc = function(e) {
|
|
|
3185
3187
|
}, nu = function(e, t) {
|
|
3186
3188
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
3187
3189
|
}, ou = function(e, t, n, o, i) {
|
|
3188
|
-
var a = nu(e, window.getComputedStyle(t).direction), r = a * o, s = n.target, l = t.contains(s), c = !1,
|
|
3190
|
+
var a = nu(e, window.getComputedStyle(t).direction), r = a * o, s = n.target, l = t.contains(s), c = !1, d = r > 0, f = 0, h = 0;
|
|
3189
3191
|
do {
|
|
3190
3192
|
if (!s)
|
|
3191
3193
|
break;
|
|
@@ -3198,7 +3200,7 @@ var ot = Nn ? { passive: !1 } : !1, Zc = function(e) {
|
|
|
3198
3200
|
!l && s !== document.body || // self content
|
|
3199
3201
|
l && (t.contains(s) || t === s)
|
|
3200
3202
|
);
|
|
3201
|
-
return (
|
|
3203
|
+
return (d && Math.abs(f) < 1 || !d && Math.abs(h) < 1) && (c = !0), c;
|
|
3202
3204
|
}, jt = function(e) {
|
|
3203
3205
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
3204
3206
|
}, Jo = function(e) {
|
|
@@ -3214,10 +3216,10 @@ var ot = Nn ? { passive: !1 } : !1, Zc = function(e) {
|
|
|
3214
3216
|
`);
|
|
3215
3217
|
}, iu = 0, rt = [];
|
|
3216
3218
|
function au(e) {
|
|
3217
|
-
var t =
|
|
3218
|
-
|
|
3219
|
+
var t = u.useRef([]), n = u.useRef([0, 0]), o = u.useRef(), i = u.useState(iu++)[0], a = u.useState(ss)[0], r = u.useRef(e);
|
|
3220
|
+
u.useEffect(function() {
|
|
3219
3221
|
r.current = e;
|
|
3220
|
-
}, [e]),
|
|
3222
|
+
}, [e]), u.useEffect(function() {
|
|
3221
3223
|
if (e.inert) {
|
|
3222
3224
|
document.body.classList.add("block-interactivity-".concat(i));
|
|
3223
3225
|
var p = Ac([e.lockRef.current], (e.shards || []).map(Qo), !0).filter(Boolean);
|
|
@@ -3230,69 +3232,69 @@ function au(e) {
|
|
|
3230
3232
|
};
|
|
3231
3233
|
}
|
|
3232
3234
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
3233
|
-
var s =
|
|
3235
|
+
var s = u.useCallback(function(p, v) {
|
|
3234
3236
|
if ("touches" in p && p.touches.length === 2 || p.type === "wheel" && p.ctrlKey)
|
|
3235
3237
|
return !r.current.allowPinchZoom;
|
|
3236
|
-
var y = jt(p), S = n.current, w = "deltaX" in p ? p.deltaX : S[0] - y[0], C = "deltaY" in p ? p.deltaY : S[1] - y[1],
|
|
3237
|
-
if ("touches" in p && P === "h" &&
|
|
3238
|
+
var y = jt(p), S = n.current, w = "deltaX" in p ? p.deltaX : S[0] - y[0], C = "deltaY" in p ? p.deltaY : S[1] - y[1], D, A = p.target, P = Math.abs(w) > Math.abs(C) ? "h" : "v";
|
|
3239
|
+
if ("touches" in p && P === "h" && A.type === "range")
|
|
3238
3240
|
return !1;
|
|
3239
|
-
var
|
|
3240
|
-
if (!
|
|
3241
|
+
var V = Zo(P, A);
|
|
3242
|
+
if (!V)
|
|
3241
3243
|
return !0;
|
|
3242
|
-
if (
|
|
3244
|
+
if (V ? D = P : (D = P === "v" ? "h" : "v", V = Zo(P, A)), !V)
|
|
3243
3245
|
return !1;
|
|
3244
|
-
if (!o.current && "changedTouches" in p && (w || C) && (o.current =
|
|
3246
|
+
if (!o.current && "changedTouches" in p && (w || C) && (o.current = D), !D)
|
|
3245
3247
|
return !0;
|
|
3246
|
-
var L = o.current ||
|
|
3248
|
+
var L = o.current || D;
|
|
3247
3249
|
return ou(L, v, p, L === "h" ? w : C);
|
|
3248
|
-
}, []), l =
|
|
3250
|
+
}, []), l = u.useCallback(function(p) {
|
|
3249
3251
|
var v = p;
|
|
3250
3252
|
if (!(!rt.length || rt[rt.length - 1] !== a)) {
|
|
3251
|
-
var y = "deltaY" in v ? Jo(v) : jt(v), S = t.current.filter(function(
|
|
3252
|
-
return
|
|
3253
|
+
var y = "deltaY" in v ? Jo(v) : jt(v), S = t.current.filter(function(D) {
|
|
3254
|
+
return D.name === v.type && (D.target === v.target || v.target === D.shadowParent) && ru(D.delta, y);
|
|
3253
3255
|
})[0];
|
|
3254
3256
|
if (S && S.should) {
|
|
3255
3257
|
v.cancelable && v.preventDefault();
|
|
3256
3258
|
return;
|
|
3257
3259
|
}
|
|
3258
3260
|
if (!S) {
|
|
3259
|
-
var w = (r.current.shards || []).map(Qo).filter(Boolean).filter(function(
|
|
3260
|
-
return
|
|
3261
|
+
var w = (r.current.shards || []).map(Qo).filter(Boolean).filter(function(D) {
|
|
3262
|
+
return D.contains(v.target);
|
|
3261
3263
|
}), C = w.length > 0 ? s(v, w[0]) : !r.current.noIsolation;
|
|
3262
3264
|
C && v.cancelable && v.preventDefault();
|
|
3263
3265
|
}
|
|
3264
3266
|
}
|
|
3265
|
-
}, []), c =
|
|
3267
|
+
}, []), c = u.useCallback(function(p, v, y, S) {
|
|
3266
3268
|
var w = { name: p, delta: v, target: y, should: S, shadowParent: lu(y) };
|
|
3267
3269
|
t.current.push(w), setTimeout(function() {
|
|
3268
3270
|
t.current = t.current.filter(function(C) {
|
|
3269
3271
|
return C !== w;
|
|
3270
3272
|
});
|
|
3271
3273
|
}, 1);
|
|
3272
|
-
}, []),
|
|
3274
|
+
}, []), d = u.useCallback(function(p) {
|
|
3273
3275
|
n.current = jt(p), o.current = void 0;
|
|
3274
|
-
}, []), f =
|
|
3276
|
+
}, []), f = u.useCallback(function(p) {
|
|
3275
3277
|
c(p.type, Jo(p), p.target, s(p, e.lockRef.current));
|
|
3276
|
-
}, []), h =
|
|
3278
|
+
}, []), h = u.useCallback(function(p) {
|
|
3277
3279
|
c(p.type, jt(p), p.target, s(p, e.lockRef.current));
|
|
3278
3280
|
}, []);
|
|
3279
|
-
|
|
3281
|
+
u.useEffect(function() {
|
|
3280
3282
|
return rt.push(a), e.setCallbacks({
|
|
3281
3283
|
onScrollCapture: f,
|
|
3282
3284
|
onWheelCapture: f,
|
|
3283
3285
|
onTouchMoveCapture: h
|
|
3284
|
-
}), document.addEventListener("wheel", l, ot), document.addEventListener("touchmove", l, ot), document.addEventListener("touchstart",
|
|
3286
|
+
}), document.addEventListener("wheel", l, ot), document.addEventListener("touchmove", l, ot), document.addEventListener("touchstart", d, ot), function() {
|
|
3285
3287
|
rt = rt.filter(function(p) {
|
|
3286
3288
|
return p !== a;
|
|
3287
|
-
}), document.removeEventListener("wheel", l, ot), document.removeEventListener("touchmove", l, ot), document.removeEventListener("touchstart",
|
|
3289
|
+
}), document.removeEventListener("wheel", l, ot), document.removeEventListener("touchmove", l, ot), document.removeEventListener("touchstart", d, ot);
|
|
3288
3290
|
};
|
|
3289
3291
|
}, []);
|
|
3290
3292
|
var m = e.removeScrollBar, x = e.inert;
|
|
3291
|
-
return
|
|
3292
|
-
|
|
3293
|
+
return u.createElement(
|
|
3294
|
+
u.Fragment,
|
|
3293
3295
|
null,
|
|
3294
|
-
x ?
|
|
3295
|
-
m ?
|
|
3296
|
+
x ? u.createElement(a, { styles: su(i) }) : null,
|
|
3297
|
+
m ? u.createElement(qc, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
3296
3298
|
);
|
|
3297
3299
|
}
|
|
3298
3300
|
function lu(e) {
|
|
@@ -3301,8 +3303,8 @@ function lu(e) {
|
|
|
3301
3303
|
return t;
|
|
3302
3304
|
}
|
|
3303
3305
|
const cu = zc(rs, au);
|
|
3304
|
-
var Un =
|
|
3305
|
-
return
|
|
3306
|
+
var Un = u.forwardRef(function(e, t) {
|
|
3307
|
+
return u.createElement(qt, Ae({}, e, { ref: t, sideCar: cu }));
|
|
3306
3308
|
});
|
|
3307
3309
|
Un.classNames = qt.classNames;
|
|
3308
3310
|
const uu = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), du = (e) => e.replace(
|
|
@@ -3351,7 +3353,7 @@ const pu = Kt(
|
|
|
3351
3353
|
...s
|
|
3352
3354
|
},
|
|
3353
3355
|
[
|
|
3354
|
-
...r.map(([c,
|
|
3356
|
+
...r.map(([c, d]) => je(c, d)),
|
|
3355
3357
|
...Array.isArray(a) ? a : [a]
|
|
3356
3358
|
]
|
|
3357
3359
|
)
|
|
@@ -3388,10 +3390,10 @@ const ie = {
|
|
|
3388
3390
|
resizeHandleEnabled: "data-panel-resize-handle-enabled",
|
|
3389
3391
|
resizeHandleId: "data-panel-resize-handle-id",
|
|
3390
3392
|
resizeHandleState: "data-resize-handle-state"
|
|
3391
|
-
}, Kn = 10, Ye = Li, tr =
|
|
3393
|
+
}, Kn = 10, Ye = Li, tr = u.useId, Su = typeof tr == "function" ? tr : () => null;
|
|
3392
3394
|
let wu = 0;
|
|
3393
3395
|
function Xn(e = null) {
|
|
3394
|
-
const t = Su(), n =
|
|
3396
|
+
const t = Su(), n = ye(e || t || null);
|
|
3395
3397
|
return n.current === null && (n.current = "" + wu++), e ?? n.current;
|
|
3396
3398
|
}
|
|
3397
3399
|
function ds({
|
|
@@ -3405,7 +3407,7 @@ function ds({
|
|
|
3405
3407
|
maxSize: s,
|
|
3406
3408
|
minSize: l,
|
|
3407
3409
|
onCollapse: c,
|
|
3408
|
-
onExpand:
|
|
3410
|
+
onExpand: d,
|
|
3409
3411
|
onResize: f,
|
|
3410
3412
|
order: h,
|
|
3411
3413
|
style: m,
|
|
@@ -3420,16 +3422,16 @@ function ds({
|
|
|
3420
3422
|
expandPanel: S,
|
|
3421
3423
|
getPanelSize: w,
|
|
3422
3424
|
getPanelStyle: C,
|
|
3423
|
-
groupId:
|
|
3424
|
-
isPanelCollapsed:
|
|
3425
|
+
groupId: D,
|
|
3426
|
+
isPanelCollapsed: A,
|
|
3425
3427
|
reevaluatePanelConstraints: P,
|
|
3426
|
-
registerPanel:
|
|
3428
|
+
registerPanel: V,
|
|
3427
3429
|
resizePanel: L,
|
|
3428
|
-
unregisterPanel:
|
|
3429
|
-
} = v,
|
|
3430
|
+
unregisterPanel: F
|
|
3431
|
+
} = v, U = Xn(r), O = ye({
|
|
3430
3432
|
callbacks: {
|
|
3431
3433
|
onCollapse: c,
|
|
3432
|
-
onExpand:
|
|
3434
|
+
onExpand: d,
|
|
3433
3435
|
onResize: f
|
|
3434
3436
|
},
|
|
3435
3437
|
constraints: {
|
|
@@ -3439,26 +3441,26 @@ function ds({
|
|
|
3439
3441
|
maxSize: s,
|
|
3440
3442
|
minSize: l
|
|
3441
3443
|
},
|
|
3442
|
-
id:
|
|
3444
|
+
id: U,
|
|
3443
3445
|
idIsFromProps: r !== void 0,
|
|
3444
3446
|
order: h
|
|
3445
3447
|
});
|
|
3446
|
-
|
|
3448
|
+
ye({
|
|
3447
3449
|
didLogMissingDefaultSizeWarning: !1
|
|
3448
3450
|
}), Ye(() => {
|
|
3449
3451
|
const {
|
|
3450
3452
|
callbacks: X,
|
|
3451
3453
|
constraints: K
|
|
3452
|
-
} = O.current,
|
|
3454
|
+
} = O.current, H = {
|
|
3453
3455
|
...K
|
|
3454
3456
|
};
|
|
3455
|
-
O.current.id =
|
|
3457
|
+
O.current.id = U, O.current.idIsFromProps = r !== void 0, O.current.order = h, X.onCollapse = c, X.onExpand = d, X.onResize = f, K.collapsedSize = n, K.collapsible = o, K.defaultSize = i, K.maxSize = s, K.minSize = l, (H.collapsedSize !== K.collapsedSize || H.collapsible !== K.collapsible || H.maxSize !== K.maxSize || H.minSize !== K.minSize) && P(O.current, H);
|
|
3456
3458
|
}), Ye(() => {
|
|
3457
3459
|
const X = O.current;
|
|
3458
|
-
return
|
|
3459
|
-
|
|
3460
|
+
return V(X), () => {
|
|
3461
|
+
F(X);
|
|
3460
3462
|
};
|
|
3461
|
-
}, [h,
|
|
3463
|
+
}, [h, U, V, F]), dr(a, () => ({
|
|
3462
3464
|
collapse: () => {
|
|
3463
3465
|
y(O.current);
|
|
3464
3466
|
},
|
|
@@ -3466,37 +3468,37 @@ function ds({
|
|
|
3466
3468
|
S(O.current, X);
|
|
3467
3469
|
},
|
|
3468
3470
|
getId() {
|
|
3469
|
-
return
|
|
3471
|
+
return U;
|
|
3470
3472
|
},
|
|
3471
3473
|
getSize() {
|
|
3472
3474
|
return w(O.current);
|
|
3473
3475
|
},
|
|
3474
3476
|
isCollapsed() {
|
|
3475
|
-
return
|
|
3477
|
+
return A(O.current);
|
|
3476
3478
|
},
|
|
3477
3479
|
isExpanded() {
|
|
3478
|
-
return !
|
|
3480
|
+
return !A(O.current);
|
|
3479
3481
|
},
|
|
3480
3482
|
resize: (X) => {
|
|
3481
3483
|
L(O.current, X);
|
|
3482
3484
|
}
|
|
3483
|
-
}), [y, S, w,
|
|
3484
|
-
const
|
|
3485
|
+
}), [y, S, w, A, U, L]);
|
|
3486
|
+
const _ = C(O.current, i);
|
|
3485
3487
|
return je(x, {
|
|
3486
3488
|
...p,
|
|
3487
3489
|
children: e,
|
|
3488
3490
|
className: t,
|
|
3489
|
-
id:
|
|
3491
|
+
id: U,
|
|
3490
3492
|
style: {
|
|
3491
|
-
...
|
|
3493
|
+
..._,
|
|
3492
3494
|
...m
|
|
3493
3495
|
},
|
|
3494
3496
|
// CSS selectors
|
|
3495
|
-
[ie.groupId]:
|
|
3497
|
+
[ie.groupId]: D,
|
|
3496
3498
|
[ie.panel]: "",
|
|
3497
3499
|
[ie.panelCollapsible]: o || void 0,
|
|
3498
|
-
[ie.panelId]:
|
|
3499
|
-
[ie.panelSize]: parseFloat("" +
|
|
3500
|
+
[ie.panelId]: U,
|
|
3501
|
+
[ie.panelSize]: parseFloat("" + _.flexGrow).toFixed(1)
|
|
3500
3502
|
});
|
|
3501
3503
|
}
|
|
3502
3504
|
const bu = Kt((e, t) => je(ds, {
|
|
@@ -3649,9 +3651,9 @@ function Mu(e, t, n, o, i) {
|
|
|
3649
3651
|
setResizeHandlerState: i
|
|
3650
3652
|
}, l = (a = Be.get(r)) !== null && a !== void 0 ? a : 0;
|
|
3651
3653
|
return Be.set(r, l + 1), Ct.add(s), $t(), function() {
|
|
3652
|
-
var
|
|
3654
|
+
var d;
|
|
3653
3655
|
Qt.delete(e), Ct.delete(s);
|
|
3654
|
-
const f = (
|
|
3656
|
+
const f = (d = Be.get(r)) !== null && d !== void 0 ? d : 1;
|
|
3655
3657
|
if (Be.set(r, f - 1), $t(), f === 1 && Be.delete(r), Ee.includes(s)) {
|
|
3656
3658
|
const h = Ee.indexOf(s);
|
|
3657
3659
|
h >= 0 && Ee.splice(h, 1), qn(), i("up", !0, null);
|
|
@@ -3724,10 +3726,10 @@ function Yn({
|
|
|
3724
3726
|
} = i, s = a.getBoundingClientRect(), {
|
|
3725
3727
|
bottom: l,
|
|
3726
3728
|
left: c,
|
|
3727
|
-
right:
|
|
3729
|
+
right: d,
|
|
3728
3730
|
top: f
|
|
3729
3731
|
} = s, h = Nu ? r.coarse : r.fine;
|
|
3730
|
-
if (t >= c - h && t <=
|
|
3732
|
+
if (t >= c - h && t <= d + h && n >= f - h && n <= l + h) {
|
|
3731
3733
|
if (o !== null && document.contains(o) && a !== o && !a.contains(o) && !o.contains(a) && // Calculating stacking order has a cost, so we should avoid it if possible
|
|
3732
3734
|
// That is why we only check potentially intersecting handles,
|
|
3733
3735
|
// and why we skip if the event target is within the handle's DOM
|
|
@@ -3797,7 +3799,7 @@ function Wt(e, t) {
|
|
|
3797
3799
|
}
|
|
3798
3800
|
function ju() {
|
|
3799
3801
|
const [e, t] = Ve(0);
|
|
3800
|
-
return
|
|
3802
|
+
return ve(() => t((n) => n + 1), []);
|
|
3801
3803
|
}
|
|
3802
3804
|
function W(e, t) {
|
|
3803
3805
|
if (!e)
|
|
@@ -3950,8 +3952,8 @@ function gt({
|
|
|
3950
3952
|
}
|
|
3951
3953
|
}
|
|
3952
3954
|
}
|
|
3953
|
-
const
|
|
3954
|
-
return Se(
|
|
3955
|
+
const d = r.reduce((f, h) => h + f, 0);
|
|
3956
|
+
return Se(d, 100) ? r : i;
|
|
3955
3957
|
}
|
|
3956
3958
|
function Ou({
|
|
3957
3959
|
layout: e,
|
|
@@ -3969,11 +3971,11 @@ function Ou({
|
|
|
3969
3971
|
} = m;
|
|
3970
3972
|
h === s ? (o = p, i = x) : (a += p, r += x);
|
|
3971
3973
|
});
|
|
3972
|
-
const l = Math.min(i, 100 - a), c = Math.max(o, 100 - r),
|
|
3974
|
+
const l = Math.min(i, 100 - a), c = Math.max(o, 100 - r), d = e[s];
|
|
3973
3975
|
return {
|
|
3974
3976
|
valueMax: l,
|
|
3975
3977
|
valueMin: c,
|
|
3976
|
-
valueNow:
|
|
3978
|
+
valueNow: d
|
|
3977
3979
|
};
|
|
3978
3980
|
}
|
|
3979
3981
|
function Et(e, t = document) {
|
|
@@ -4002,7 +4004,7 @@ function en(e, t = document) {
|
|
|
4002
4004
|
}
|
|
4003
4005
|
function _u(e, t, n, o = document) {
|
|
4004
4006
|
var i, a, r, s;
|
|
4005
|
-
const l = en(t, o), c = Et(e, o),
|
|
4007
|
+
const l = en(t, o), c = Et(e, o), d = l ? c.indexOf(l) : -1, f = (i = (a = n[d]) === null || a === void 0 ? void 0 : a.id) !== null && i !== void 0 ? i : null, h = (r = (s = n[d + 1]) === null || s === void 0 ? void 0 : s.id) !== null && r !== void 0 ? r : null;
|
|
4006
4008
|
return [f, h];
|
|
4007
4009
|
}
|
|
4008
4010
|
function Bu({
|
|
@@ -4014,7 +4016,7 @@ function Bu({
|
|
|
4014
4016
|
panelGroupElement: a,
|
|
4015
4017
|
setLayout: r
|
|
4016
4018
|
}) {
|
|
4017
|
-
|
|
4019
|
+
ye({
|
|
4018
4020
|
didWarnAboutMissingResizeHandle: !1
|
|
4019
4021
|
}), Ye(() => {
|
|
4020
4022
|
if (!a)
|
|
@@ -4023,7 +4025,7 @@ function Bu({
|
|
|
4023
4025
|
for (let l = 0; l < i.length - 1; l++) {
|
|
4024
4026
|
const {
|
|
4025
4027
|
valueMax: c,
|
|
4026
|
-
valueMin:
|
|
4028
|
+
valueMin: d,
|
|
4027
4029
|
valueNow: f
|
|
4028
4030
|
} = Ou({
|
|
4029
4031
|
layout: o,
|
|
@@ -4032,7 +4034,7 @@ function Bu({
|
|
|
4032
4034
|
}), h = s[l];
|
|
4033
4035
|
if (h != null) {
|
|
4034
4036
|
const m = i[l];
|
|
4035
|
-
W(m, `No panel data found for index "${l}"`), h.setAttribute("aria-controls", m.id), h.setAttribute("aria-valuemax", "" + Math.round(c)), h.setAttribute("aria-valuemin", "" + Math.round(
|
|
4037
|
+
W(m, `No panel data found for index "${l}"`), h.setAttribute("aria-controls", m.id), h.setAttribute("aria-valuemax", "" + Math.round(c)), h.setAttribute("aria-valuemin", "" + Math.round(d)), h.setAttribute("aria-valuenow", f != null ? "" + Math.round(f) : "");
|
|
4036
4038
|
}
|
|
4037
4039
|
}
|
|
4038
4040
|
return () => {
|
|
@@ -4049,9 +4051,9 @@ function Bu({
|
|
|
4049
4051
|
panelDataArray: l
|
|
4050
4052
|
} = s, c = Ps(n, a);
|
|
4051
4053
|
W(c != null, `No group found for id "${n}"`);
|
|
4052
|
-
const
|
|
4053
|
-
W(
|
|
4054
|
-
const f =
|
|
4054
|
+
const d = Et(n, a);
|
|
4055
|
+
W(d, `No resize handles found for group id "${n}"`);
|
|
4056
|
+
const f = d.map((h) => {
|
|
4055
4057
|
const m = h.getAttribute(ie.resizeHandleId);
|
|
4056
4058
|
W(m, "Resize handle element has no handle id attribute");
|
|
4057
4059
|
const [x, p] = _u(n, m, l, a);
|
|
@@ -4068,20 +4070,20 @@ function Bu({
|
|
|
4068
4070
|
const w = l[S];
|
|
4069
4071
|
W(w, `No panel data found for index ${S}`);
|
|
4070
4072
|
const C = o[S], {
|
|
4071
|
-
collapsedSize:
|
|
4072
|
-
collapsible:
|
|
4073
|
+
collapsedSize: D = 0,
|
|
4074
|
+
collapsible: A,
|
|
4073
4075
|
minSize: P = 0
|
|
4074
4076
|
} = w.constraints;
|
|
4075
|
-
if (C != null &&
|
|
4076
|
-
const
|
|
4077
|
-
delta: Se(C,
|
|
4077
|
+
if (C != null && A) {
|
|
4078
|
+
const V = gt({
|
|
4079
|
+
delta: Se(C, D) ? P - D : D - C,
|
|
4078
4080
|
initialLayout: o,
|
|
4079
4081
|
panelConstraints: l.map((L) => L.constraints),
|
|
4080
4082
|
pivotIndices: bs(n, m, a),
|
|
4081
4083
|
prevLayout: o,
|
|
4082
4084
|
trigger: "keyboard"
|
|
4083
4085
|
});
|
|
4084
|
-
o !==
|
|
4086
|
+
o !== V && r(V);
|
|
4085
4087
|
}
|
|
4086
4088
|
}
|
|
4087
4089
|
break;
|
|
@@ -4120,9 +4122,9 @@ function Vu(e, t, n, o, i) {
|
|
|
4120
4122
|
let {
|
|
4121
4123
|
initialCursorPosition: l
|
|
4122
4124
|
} = o;
|
|
4123
|
-
const c = Cs(n, e),
|
|
4124
|
-
W(
|
|
4125
|
-
const f =
|
|
4125
|
+
const c = Cs(n, e), d = Ps(s, i);
|
|
4126
|
+
W(d, `No group element found for id "${s}"`);
|
|
4127
|
+
const f = d.getBoundingClientRect(), h = a ? f.width : f.height;
|
|
4126
4128
|
return (c - l) / h * 100;
|
|
4127
4129
|
}
|
|
4128
4130
|
function Fu(e, t, n, o, i, a) {
|
|
@@ -4191,7 +4193,7 @@ function st(e, t, n) {
|
|
|
4191
4193
|
id: l
|
|
4192
4194
|
} = a, {
|
|
4193
4195
|
collapsedSize: c = 0,
|
|
4194
|
-
collapsible:
|
|
4196
|
+
collapsible: d
|
|
4195
4197
|
} = s, f = n[l];
|
|
4196
4198
|
if (f == null || o !== f) {
|
|
4197
4199
|
n[l] = o;
|
|
@@ -4200,7 +4202,7 @@ function st(e, t, n) {
|
|
|
4200
4202
|
onExpand: m,
|
|
4201
4203
|
onResize: x
|
|
4202
4204
|
} = r;
|
|
4203
|
-
x && x(o, f),
|
|
4205
|
+
x && x(o, f), d && (h || m) && (m && (f == null || Le(f, c)) && !Le(o, c) && m(), h && (f == null || !Le(f, c)) && Le(o, c) && h());
|
|
4204
4206
|
}
|
|
4205
4207
|
});
|
|
4206
4208
|
}
|
|
@@ -4353,10 +4355,10 @@ function As({
|
|
|
4353
4355
|
keyboardResizeBy: s = null,
|
|
4354
4356
|
storage: l = vt,
|
|
4355
4357
|
style: c,
|
|
4356
|
-
tagName:
|
|
4358
|
+
tagName: d = "div",
|
|
4357
4359
|
...f
|
|
4358
4360
|
}) {
|
|
4359
|
-
const h = Xn(a), m =
|
|
4361
|
+
const h = Xn(a), m = ye(null), [x, p] = Ve(null), [v, y] = Ve([]), S = ju(), w = ye({}), C = ye(/* @__PURE__ */ new Map()), D = ye(0), A = ye({
|
|
4360
4362
|
autoSaveId: e,
|
|
4361
4363
|
direction: o,
|
|
4362
4364
|
dragState: x,
|
|
@@ -4364,17 +4366,17 @@ function As({
|
|
|
4364
4366
|
keyboardResizeBy: s,
|
|
4365
4367
|
onLayout: r,
|
|
4366
4368
|
storage: l
|
|
4367
|
-
}), P =
|
|
4369
|
+
}), P = ye({
|
|
4368
4370
|
layout: v,
|
|
4369
4371
|
panelDataArray: [],
|
|
4370
4372
|
panelDataArrayChanged: !1
|
|
4371
4373
|
});
|
|
4372
|
-
|
|
4374
|
+
ye({
|
|
4373
4375
|
didLogIdAndOrderWarning: !1,
|
|
4374
4376
|
didLogPanelConstraintsWarning: !1,
|
|
4375
4377
|
prevPanelIds: []
|
|
4376
4378
|
}), dr(i, () => ({
|
|
4377
|
-
getId: () =>
|
|
4379
|
+
getId: () => A.current.id,
|
|
4378
4380
|
getLayout: () => {
|
|
4379
4381
|
const {
|
|
4380
4382
|
layout: E
|
|
@@ -4384,7 +4386,7 @@ function As({
|
|
|
4384
4386
|
setLayout: (E) => {
|
|
4385
4387
|
const {
|
|
4386
4388
|
onLayout: I
|
|
4387
|
-
} =
|
|
4389
|
+
} = A.current, {
|
|
4388
4390
|
layout: M,
|
|
4389
4391
|
panelDataArray: N
|
|
4390
4392
|
} = P.current, b = ar({
|
|
@@ -4394,9 +4396,9 @@ function As({
|
|
|
4394
4396
|
sr(M, b) || (y(b), P.current.layout = b, I && I(b), st(N, b, w.current));
|
|
4395
4397
|
}
|
|
4396
4398
|
}), []), Ye(() => {
|
|
4397
|
-
|
|
4399
|
+
A.current.autoSaveId = e, A.current.direction = o, A.current.dragState = x, A.current.id = h, A.current.onLayout = r, A.current.storage = l;
|
|
4398
4400
|
}), Bu({
|
|
4399
|
-
committedValuesRef:
|
|
4401
|
+
committedValuesRef: A,
|
|
4400
4402
|
eagerValuesRef: P,
|
|
4401
4403
|
groupId: h,
|
|
4402
4404
|
layout: v,
|
|
@@ -4417,10 +4419,10 @@ function As({
|
|
|
4417
4419
|
}
|
|
4418
4420
|
}, [e, v, l]), Fe(() => {
|
|
4419
4421
|
});
|
|
4420
|
-
const
|
|
4422
|
+
const V = ve((E) => {
|
|
4421
4423
|
const {
|
|
4422
4424
|
onLayout: I
|
|
4423
|
-
} =
|
|
4425
|
+
} = A.current, {
|
|
4424
4426
|
layout: M,
|
|
4425
4427
|
panelDataArray: N
|
|
4426
4428
|
} = P.current;
|
|
@@ -4432,8 +4434,8 @@ function As({
|
|
|
4432
4434
|
} = Ke(N, E, M);
|
|
4433
4435
|
if (W(z != null, `Panel size not found for panel "${E.id}"`), !Le(z, R)) {
|
|
4434
4436
|
C.current.set(E.id, z);
|
|
4435
|
-
const
|
|
4436
|
-
delta:
|
|
4437
|
+
const B = it(N, E) === N.length - 1 ? z - R : R - z, G = gt({
|
|
4438
|
+
delta: B,
|
|
4437
4439
|
initialLayout: M,
|
|
4438
4440
|
panelConstraints: b,
|
|
4439
4441
|
pivotIndices: k,
|
|
@@ -4443,10 +4445,10 @@ function As({
|
|
|
4443
4445
|
kt(M, G) || (y(G), P.current.layout = G, I && I(G), st(N, G, w.current));
|
|
4444
4446
|
}
|
|
4445
4447
|
}
|
|
4446
|
-
}, []), L =
|
|
4448
|
+
}, []), L = ve((E, I) => {
|
|
4447
4449
|
const {
|
|
4448
4450
|
onLayout: M
|
|
4449
|
-
} =
|
|
4451
|
+
} = A.current, {
|
|
4450
4452
|
layout: N,
|
|
4451
4453
|
panelDataArray: b
|
|
4452
4454
|
} = P.current;
|
|
@@ -4455,21 +4457,21 @@ function As({
|
|
|
4455
4457
|
collapsedSize: z = 0,
|
|
4456
4458
|
panelSize: k = 0,
|
|
4457
4459
|
minSize: $ = 0,
|
|
4458
|
-
pivotIndices:
|
|
4460
|
+
pivotIndices: B
|
|
4459
4461
|
} = Ke(b, E, N), G = I ?? $;
|
|
4460
4462
|
if (Le(k, z)) {
|
|
4461
|
-
const T = C.current.get(E.id), j = T != null && T >= G ? T : G, se = it(b, E) === b.length - 1 ? k - j : j - k,
|
|
4463
|
+
const T = C.current.get(E.id), j = T != null && T >= G ? T : G, se = it(b, E) === b.length - 1 ? k - j : j - k, q = gt({
|
|
4462
4464
|
delta: se,
|
|
4463
4465
|
initialLayout: N,
|
|
4464
4466
|
panelConstraints: R,
|
|
4465
|
-
pivotIndices:
|
|
4467
|
+
pivotIndices: B,
|
|
4466
4468
|
prevLayout: N,
|
|
4467
4469
|
trigger: "imperative-api"
|
|
4468
4470
|
});
|
|
4469
|
-
kt(N,
|
|
4471
|
+
kt(N, q) || (y(q), P.current.layout = q, M && M(q), st(b, q, w.current));
|
|
4470
4472
|
}
|
|
4471
4473
|
}
|
|
4472
|
-
}, []),
|
|
4474
|
+
}, []), F = ve((E) => {
|
|
4473
4475
|
const {
|
|
4474
4476
|
layout: I,
|
|
4475
4477
|
panelDataArray: M
|
|
@@ -4477,7 +4479,7 @@ function As({
|
|
|
4477
4479
|
panelSize: N
|
|
4478
4480
|
} = Ke(M, E, I);
|
|
4479
4481
|
return W(N != null, `Panel size not found for panel "${E.id}"`), N;
|
|
4480
|
-
}, []),
|
|
4482
|
+
}, []), U = ve((E, I) => {
|
|
4481
4483
|
const {
|
|
4482
4484
|
panelDataArray: M
|
|
4483
4485
|
} = P.current, N = it(M, E);
|
|
@@ -4488,7 +4490,7 @@ function As({
|
|
|
4488
4490
|
panelData: M,
|
|
4489
4491
|
panelIndex: N
|
|
4490
4492
|
});
|
|
4491
|
-
}, [x, v]), O =
|
|
4493
|
+
}, [x, v]), O = ve((E) => {
|
|
4492
4494
|
const {
|
|
4493
4495
|
layout: I,
|
|
4494
4496
|
panelDataArray: M
|
|
@@ -4498,7 +4500,7 @@ function As({
|
|
|
4498
4500
|
panelSize: R
|
|
4499
4501
|
} = Ke(M, E, I);
|
|
4500
4502
|
return W(R != null, `Panel size not found for panel "${E.id}"`), b === !0 && Le(R, N);
|
|
4501
|
-
}, []),
|
|
4503
|
+
}, []), _ = ve((E) => {
|
|
4502
4504
|
const {
|
|
4503
4505
|
layout: I,
|
|
4504
4506
|
panelDataArray: M
|
|
@@ -4508,7 +4510,7 @@ function As({
|
|
|
4508
4510
|
panelSize: R
|
|
4509
4511
|
} = Ke(M, E, I);
|
|
4510
4512
|
return W(R != null, `Panel size not found for panel "${E.id}"`), !b || Ze(R, N) > 0;
|
|
4511
|
-
}, []), X =
|
|
4513
|
+
}, []), X = ve((E) => {
|
|
4512
4514
|
const {
|
|
4513
4515
|
panelDataArray: I
|
|
4514
4516
|
} = P.current;
|
|
@@ -4524,7 +4526,7 @@ function As({
|
|
|
4524
4526
|
autoSaveId: E,
|
|
4525
4527
|
onLayout: I,
|
|
4526
4528
|
storage: M
|
|
4527
|
-
} =
|
|
4529
|
+
} = A.current, {
|
|
4528
4530
|
layout: N,
|
|
4529
4531
|
panelDataArray: b
|
|
4530
4532
|
} = P.current;
|
|
@@ -4548,7 +4550,7 @@ function As({
|
|
|
4548
4550
|
E.layout = [];
|
|
4549
4551
|
};
|
|
4550
4552
|
}, []);
|
|
4551
|
-
const K =
|
|
4553
|
+
const K = ve((E) => {
|
|
4552
4554
|
let I = !1;
|
|
4553
4555
|
const M = m.current;
|
|
4554
4556
|
return M && window.getComputedStyle(M, null).getPropertyValue("direction") === "rtl" && (I = !0), function(b) {
|
|
@@ -4560,31 +4562,31 @@ function As({
|
|
|
4560
4562
|
direction: z,
|
|
4561
4563
|
dragState: k,
|
|
4562
4564
|
id: $,
|
|
4563
|
-
keyboardResizeBy:
|
|
4565
|
+
keyboardResizeBy: B,
|
|
4564
4566
|
onLayout: G
|
|
4565
|
-
} =
|
|
4567
|
+
} = A.current, {
|
|
4566
4568
|
layout: T,
|
|
4567
4569
|
panelDataArray: j
|
|
4568
4570
|
} = P.current, {
|
|
4569
|
-
initialLayout:
|
|
4571
|
+
initialLayout: ee
|
|
4570
4572
|
} = k ?? {}, se = bs($, E, R);
|
|
4571
|
-
let
|
|
4573
|
+
let q = Fu(b, E, z, k, B, R);
|
|
4572
4574
|
const Y = z === "horizontal";
|
|
4573
|
-
Y && I && (
|
|
4574
|
-
const
|
|
4575
|
-
delta:
|
|
4576
|
-
initialLayout:
|
|
4577
|
-
panelConstraints:
|
|
4575
|
+
Y && I && (q = -q);
|
|
4576
|
+
const pe = j.map((De) => De.constraints), Te = gt({
|
|
4577
|
+
delta: q,
|
|
4578
|
+
initialLayout: ee ?? T,
|
|
4579
|
+
panelConstraints: pe,
|
|
4578
4580
|
pivotIndices: se,
|
|
4579
4581
|
prevLayout: T,
|
|
4580
4582
|
trigger: fs(b) ? "keyboard" : "mouse-or-touch"
|
|
4581
|
-
}),
|
|
4582
|
-
(hs(b) || ps(b)) &&
|
|
4583
|
+
}), ge = !kt(T, Te);
|
|
4584
|
+
(hs(b) || ps(b)) && D.current != q && (D.current = q, !ge && q !== 0 ? Y ? En(E, q < 0 ? gs : vs) : En(E, q < 0 ? ys : xs) : En(E, 0)), ge && (y(Te), P.current.layout = Te, G && G(Te), st(j, Te, w.current));
|
|
4583
4585
|
};
|
|
4584
|
-
}, []),
|
|
4586
|
+
}, []), H = ve((E, I) => {
|
|
4585
4587
|
const {
|
|
4586
4588
|
onLayout: M
|
|
4587
|
-
} =
|
|
4589
|
+
} = A.current, {
|
|
4588
4590
|
layout: N,
|
|
4589
4591
|
panelDataArray: b
|
|
4590
4592
|
} = P.current, R = b.map((T) => T.constraints), {
|
|
@@ -4592,8 +4594,8 @@ function As({
|
|
|
4592
4594
|
pivotIndices: k
|
|
4593
4595
|
} = Ke(b, E, N);
|
|
4594
4596
|
W(z != null, `Panel size not found for panel "${E.id}"`);
|
|
4595
|
-
const
|
|
4596
|
-
delta:
|
|
4597
|
+
const B = it(b, E) === b.length - 1 ? z - I : I - z, G = gt({
|
|
4598
|
+
delta: B,
|
|
4597
4599
|
initialLayout: N,
|
|
4598
4600
|
panelConstraints: R,
|
|
4599
4601
|
pivotIndices: k,
|
|
@@ -4601,7 +4603,7 @@ function As({
|
|
|
4601
4603
|
trigger: "imperative-api"
|
|
4602
4604
|
});
|
|
4603
4605
|
kt(N, G) || (y(G), P.current.layout = G, M && M(G), st(b, G, w.current));
|
|
4604
|
-
}, []),
|
|
4606
|
+
}, []), Q = ve((E, I) => {
|
|
4605
4607
|
const {
|
|
4606
4608
|
layout: M,
|
|
4607
4609
|
panelDataArray: N
|
|
@@ -4612,15 +4614,15 @@ function As({
|
|
|
4612
4614
|
collapsedSize: z = 0,
|
|
4613
4615
|
collapsible: k,
|
|
4614
4616
|
maxSize: $ = 100,
|
|
4615
|
-
minSize:
|
|
4617
|
+
minSize: B = 0
|
|
4616
4618
|
} = E.constraints, {
|
|
4617
4619
|
panelSize: G
|
|
4618
4620
|
} = Ke(N, E, M);
|
|
4619
|
-
G != null && (R && k && Le(G, b) ? Le(b, z) ||
|
|
4620
|
-
}, [
|
|
4621
|
+
G != null && (R && k && Le(G, b) ? Le(b, z) || H(E, z) : G < B ? H(E, B) : G > $ && H(E, $));
|
|
4622
|
+
}, [H]), J = ve((E, I) => {
|
|
4621
4623
|
const {
|
|
4622
4624
|
direction: M
|
|
4623
|
-
} =
|
|
4625
|
+
} = A.current, {
|
|
4624
4626
|
layout: N
|
|
4625
4627
|
} = P.current;
|
|
4626
4628
|
if (!m.current)
|
|
@@ -4634,32 +4636,32 @@ function As({
|
|
|
4634
4636
|
initialCursorPosition: R,
|
|
4635
4637
|
initialLayout: N
|
|
4636
4638
|
});
|
|
4637
|
-
}, []),
|
|
4639
|
+
}, []), Z = ve(() => {
|
|
4638
4640
|
p(null);
|
|
4639
|
-
}, []),
|
|
4641
|
+
}, []), he = ve((E) => {
|
|
4640
4642
|
const {
|
|
4641
4643
|
panelDataArray: I
|
|
4642
4644
|
} = P.current, M = it(I, E);
|
|
4643
4645
|
M >= 0 && (I.splice(M, 1), delete w.current[E.id], P.current.panelDataArrayChanged = !0, S());
|
|
4644
|
-
}, [S]),
|
|
4645
|
-
collapsePanel:
|
|
4646
|
+
}, [S]), oe = ji(() => ({
|
|
4647
|
+
collapsePanel: V,
|
|
4646
4648
|
direction: o,
|
|
4647
4649
|
dragState: x,
|
|
4648
4650
|
expandPanel: L,
|
|
4649
|
-
getPanelSize:
|
|
4650
|
-
getPanelStyle:
|
|
4651
|
+
getPanelSize: F,
|
|
4652
|
+
getPanelStyle: U,
|
|
4651
4653
|
groupId: h,
|
|
4652
4654
|
isPanelCollapsed: O,
|
|
4653
|
-
isPanelExpanded:
|
|
4654
|
-
reevaluatePanelConstraints:
|
|
4655
|
+
isPanelExpanded: _,
|
|
4656
|
+
reevaluatePanelConstraints: Q,
|
|
4655
4657
|
registerPanel: X,
|
|
4656
4658
|
registerResizeHandle: K,
|
|
4657
|
-
resizePanel:
|
|
4659
|
+
resizePanel: H,
|
|
4658
4660
|
startDragging: J,
|
|
4659
|
-
stopDragging:
|
|
4660
|
-
unregisterPanel:
|
|
4661
|
+
stopDragging: Z,
|
|
4662
|
+
unregisterPanel: he,
|
|
4661
4663
|
panelGroupElement: m.current
|
|
4662
|
-
}), [
|
|
4664
|
+
}), [V, x, o, L, F, U, h, O, _, Q, X, K, H, J, Z, he]), ue = {
|
|
4663
4665
|
display: "flex",
|
|
4664
4666
|
flexDirection: o === "horizontal" ? "row" : "column",
|
|
4665
4667
|
height: "100%",
|
|
@@ -4667,8 +4669,8 @@ function As({
|
|
|
4667
4669
|
width: "100%"
|
|
4668
4670
|
};
|
|
4669
4671
|
return je(Zt.Provider, {
|
|
4670
|
-
value:
|
|
4671
|
-
}, je(
|
|
4672
|
+
value: oe
|
|
4673
|
+
}, je(d, {
|
|
4672
4674
|
...f,
|
|
4673
4675
|
children: t,
|
|
4674
4676
|
className: n,
|
|
@@ -4731,8 +4733,8 @@ function Yu({
|
|
|
4731
4733
|
W(s, `No group element found for id "${s}"`);
|
|
4732
4734
|
const l = Et(s, o), c = ws(s, t, o);
|
|
4733
4735
|
W(c !== null, `No resize element found for id "${t}"`);
|
|
4734
|
-
const
|
|
4735
|
-
l[
|
|
4736
|
+
const d = r.shiftKey ? c > 0 ? c - 1 : l.length - 1 : c + 1 < l.length ? c + 1 : 0;
|
|
4737
|
+
l[d].focus();
|
|
4736
4738
|
break;
|
|
4737
4739
|
}
|
|
4738
4740
|
}
|
|
@@ -4753,55 +4755,55 @@ function qu({
|
|
|
4753
4755
|
onDragging: s,
|
|
4754
4756
|
onFocus: l,
|
|
4755
4757
|
onPointerDown: c,
|
|
4756
|
-
onPointerUp:
|
|
4758
|
+
onPointerUp: d,
|
|
4757
4759
|
style: f = {},
|
|
4758
4760
|
tabIndex: h = 0,
|
|
4759
4761
|
tagName: m = "div",
|
|
4760
4762
|
...x
|
|
4761
4763
|
}) {
|
|
4762
4764
|
var p, v;
|
|
4763
|
-
const y =
|
|
4765
|
+
const y = ye(null), S = ye({
|
|
4764
4766
|
onClick: r,
|
|
4765
4767
|
onDragging: s,
|
|
4766
4768
|
onPointerDown: c,
|
|
4767
|
-
onPointerUp:
|
|
4769
|
+
onPointerUp: d
|
|
4768
4770
|
});
|
|
4769
4771
|
Fe(() => {
|
|
4770
|
-
S.current.onClick = r, S.current.onDragging = s, S.current.onPointerDown = c, S.current.onPointerUp =
|
|
4772
|
+
S.current.onClick = r, S.current.onDragging = s, S.current.onPointerDown = c, S.current.onPointerUp = d;
|
|
4771
4773
|
});
|
|
4772
4774
|
const w = Vt(Zt);
|
|
4773
4775
|
if (w === null)
|
|
4774
4776
|
throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");
|
|
4775
4777
|
const {
|
|
4776
4778
|
direction: C,
|
|
4777
|
-
groupId:
|
|
4778
|
-
registerResizeHandle:
|
|
4779
|
+
groupId: D,
|
|
4780
|
+
registerResizeHandle: A,
|
|
4779
4781
|
startDragging: P,
|
|
4780
|
-
stopDragging:
|
|
4782
|
+
stopDragging: V,
|
|
4781
4783
|
panelGroupElement: L
|
|
4782
|
-
} = w,
|
|
4783
|
-
state:
|
|
4784
|
+
} = w, F = Xn(i), [U, O] = Ve("inactive"), [_, X] = Ve(!1), [K, H] = Ve(null), Q = ye({
|
|
4785
|
+
state: U
|
|
4784
4786
|
});
|
|
4785
4787
|
Ye(() => {
|
|
4786
|
-
|
|
4788
|
+
Q.current.state = U;
|
|
4787
4789
|
}), Fe(() => {
|
|
4788
4790
|
if (n)
|
|
4789
|
-
|
|
4791
|
+
H(null);
|
|
4790
4792
|
else {
|
|
4791
|
-
const
|
|
4792
|
-
|
|
4793
|
+
const oe = A(F);
|
|
4794
|
+
H(() => oe);
|
|
4793
4795
|
}
|
|
4794
|
-
}, [n,
|
|
4795
|
-
const J = (p = o == null ? void 0 : o.coarse) !== null && p !== void 0 ? p : 15,
|
|
4796
|
+
}, [n, F, A]);
|
|
4797
|
+
const J = (p = o == null ? void 0 : o.coarse) !== null && p !== void 0 ? p : 15, Z = (v = o == null ? void 0 : o.fine) !== null && v !== void 0 ? v : 5;
|
|
4796
4798
|
return Fe(() => {
|
|
4797
4799
|
if (n || K == null)
|
|
4798
4800
|
return;
|
|
4799
|
-
const
|
|
4800
|
-
W(
|
|
4801
|
+
const oe = y.current;
|
|
4802
|
+
W(oe, "Element ref not attached");
|
|
4801
4803
|
let ue = !1;
|
|
4802
|
-
return Mu(
|
|
4804
|
+
return Mu(F, oe, C, {
|
|
4803
4805
|
coarse: J,
|
|
4804
|
-
fine:
|
|
4806
|
+
fine: Z
|
|
4805
4807
|
}, (I, M, N) => {
|
|
4806
4808
|
if (!M) {
|
|
4807
4809
|
O("inactive");
|
|
@@ -4809,7 +4811,7 @@ function qu({
|
|
|
4809
4811
|
}
|
|
4810
4812
|
switch (I) {
|
|
4811
4813
|
case "down": {
|
|
4812
|
-
O("drag"), ue = !1, W(N, 'Expected event to be defined for "down" action'), P(
|
|
4814
|
+
O("drag"), ue = !1, W(N, 'Expected event to be defined for "down" action'), P(F, N);
|
|
4813
4815
|
const {
|
|
4814
4816
|
onDragging: b,
|
|
4815
4817
|
onPointerDown: R
|
|
@@ -4820,12 +4822,12 @@ function qu({
|
|
|
4820
4822
|
case "move": {
|
|
4821
4823
|
const {
|
|
4822
4824
|
state: b
|
|
4823
|
-
} =
|
|
4825
|
+
} = Q.current;
|
|
4824
4826
|
ue = !0, b !== "drag" && O("hover"), W(N, 'Expected event to be defined for "move" action'), K(N);
|
|
4825
4827
|
break;
|
|
4826
4828
|
}
|
|
4827
4829
|
case "up": {
|
|
4828
|
-
O("hover"),
|
|
4830
|
+
O("hover"), V();
|
|
4829
4831
|
const {
|
|
4830
4832
|
onClick: b,
|
|
4831
4833
|
onDragging: R,
|
|
@@ -4836,9 +4838,9 @@ function qu({
|
|
|
4836
4838
|
}
|
|
4837
4839
|
}
|
|
4838
4840
|
});
|
|
4839
|
-
}, [J, C, n,
|
|
4841
|
+
}, [J, C, n, Z, A, F, K, P, V]), Yu({
|
|
4840
4842
|
disabled: n,
|
|
4841
|
-
handleId:
|
|
4843
|
+
handleId: F,
|
|
4842
4844
|
resizeHandler: K,
|
|
4843
4845
|
panelGroupElement: L
|
|
4844
4846
|
}), je(m, {
|
|
@@ -4864,12 +4866,12 @@ function qu({
|
|
|
4864
4866
|
tabIndex: h,
|
|
4865
4867
|
// CSS selectors
|
|
4866
4868
|
[ie.groupDirection]: C,
|
|
4867
|
-
[ie.groupId]:
|
|
4869
|
+
[ie.groupId]: D,
|
|
4868
4870
|
[ie.resizeHandle]: "",
|
|
4869
|
-
[ie.resizeHandleActive]:
|
|
4871
|
+
[ie.resizeHandleActive]: U === "drag" ? "pointer" : _ ? "keyboard" : void 0,
|
|
4870
4872
|
[ie.resizeHandleEnabled]: !n,
|
|
4871
|
-
[ie.resizeHandleId]:
|
|
4872
|
-
[ie.resizeHandleState]:
|
|
4873
|
+
[ie.resizeHandleId]: F,
|
|
4874
|
+
[ie.resizeHandleState]: U
|
|
4873
4875
|
});
|
|
4874
4876
|
}
|
|
4875
4877
|
qu.displayName = "PanelResizeHandle";
|
|
@@ -4881,7 +4883,7 @@ var tn = "Dialog", [Ds, Lf] = Xt(tn), [Zu, Re] = Ds(tn), Is = (e) => {
|
|
|
4881
4883
|
defaultOpen: i,
|
|
4882
4884
|
onOpenChange: a,
|
|
4883
4885
|
modal: r = !0
|
|
4884
|
-
} = e, s =
|
|
4886
|
+
} = e, s = u.useRef(null), l = u.useRef(null), [c, d] = Dn({
|
|
4885
4887
|
prop: o,
|
|
4886
4888
|
defaultProp: i ?? !1,
|
|
4887
4889
|
onChange: a,
|
|
@@ -4897,19 +4899,19 @@ var tn = "Dialog", [Ds, Lf] = Xt(tn), [Zu, Re] = Ds(tn), Is = (e) => {
|
|
|
4897
4899
|
titleId: ut(),
|
|
4898
4900
|
descriptionId: ut(),
|
|
4899
4901
|
open: c,
|
|
4900
|
-
onOpenChange:
|
|
4901
|
-
onOpenToggle:
|
|
4902
|
+
onOpenChange: d,
|
|
4903
|
+
onOpenToggle: u.useCallback(() => d((f) => !f), [d]),
|
|
4902
4904
|
modal: r,
|
|
4903
4905
|
children: n
|
|
4904
4906
|
}
|
|
4905
4907
|
);
|
|
4906
4908
|
};
|
|
4907
4909
|
Is.displayName = tn;
|
|
4908
|
-
var Ns = "DialogTrigger", Ms =
|
|
4910
|
+
var Ns = "DialogTrigger", Ms = u.forwardRef(
|
|
4909
4911
|
(e, t) => {
|
|
4910
4912
|
const { __scopeDialog: n, ...o } = e, i = Re(Ns, n), a = ae(t, i.triggerRef);
|
|
4911
4913
|
return /* @__PURE__ */ g.jsx(
|
|
4912
|
-
|
|
4914
|
+
te.button,
|
|
4913
4915
|
{
|
|
4914
4916
|
type: "button",
|
|
4915
4917
|
"aria-haspopup": "dialog",
|
|
@@ -4918,7 +4920,7 @@ var Ns = "DialogTrigger", Ms = d.forwardRef(
|
|
|
4918
4920
|
"data-state": Qn(i.open),
|
|
4919
4921
|
...o,
|
|
4920
4922
|
ref: a,
|
|
4921
|
-
onClick:
|
|
4923
|
+
onClick: ne(e.onClick, i.onOpenToggle)
|
|
4922
4924
|
}
|
|
4923
4925
|
);
|
|
4924
4926
|
}
|
|
@@ -4928,24 +4930,24 @@ var Zn = "DialogPortal", [Ju, Ls] = Ds(Zn, {
|
|
|
4928
4930
|
forceMount: void 0
|
|
4929
4931
|
}), js = (e) => {
|
|
4930
4932
|
const { __scopeDialog: t, forceMount: n, children: o, container: i } = e, a = Re(Zn, t);
|
|
4931
|
-
return /* @__PURE__ */ g.jsx(Ju, { scope: t, forceMount: n, children:
|
|
4933
|
+
return /* @__PURE__ */ g.jsx(Ju, { scope: t, forceMount: n, children: u.Children.map(o, (r) => /* @__PURE__ */ g.jsx(Yt, { present: n || a.open, children: /* @__PURE__ */ g.jsx(Hn, { asChild: !0, container: i, children: r }) })) });
|
|
4932
4934
|
};
|
|
4933
4935
|
js.displayName = Zn;
|
|
4934
|
-
var Ht = "DialogOverlay", ks =
|
|
4936
|
+
var Ht = "DialogOverlay", ks = u.forwardRef(
|
|
4935
4937
|
(e, t) => {
|
|
4936
4938
|
const n = Ls(Ht, e.__scopeDialog), { forceMount: o = n.forceMount, ...i } = e, a = Re(Ht, e.__scopeDialog);
|
|
4937
4939
|
return a.modal ? /* @__PURE__ */ g.jsx(Yt, { present: o || a.open, children: /* @__PURE__ */ g.jsx(ed, { ...i, ref: t }) }) : null;
|
|
4938
4940
|
}
|
|
4939
4941
|
);
|
|
4940
4942
|
ks.displayName = Ht;
|
|
4941
|
-
var Qu = Pt("DialogOverlay.RemoveScroll"), ed =
|
|
4943
|
+
var Qu = Pt("DialogOverlay.RemoveScroll"), ed = u.forwardRef(
|
|
4942
4944
|
(e, t) => {
|
|
4943
4945
|
const { __scopeDialog: n, ...o } = e, i = Re(Ht, n);
|
|
4944
4946
|
return (
|
|
4945
4947
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
4946
4948
|
// ie. when `Overlay` and `Content` are siblings
|
|
4947
4949
|
/* @__PURE__ */ g.jsx(Un, { as: Qu, allowPinchZoom: !0, shards: [i.contentRef], children: /* @__PURE__ */ g.jsx(
|
|
4948
|
-
|
|
4950
|
+
te.div,
|
|
4949
4951
|
{
|
|
4950
4952
|
"data-state": Qn(i.open),
|
|
4951
4953
|
...o,
|
|
@@ -4955,17 +4957,17 @@ var Qu = Pt("DialogOverlay.RemoveScroll"), ed = d.forwardRef(
|
|
|
4955
4957
|
) })
|
|
4956
4958
|
);
|
|
4957
4959
|
}
|
|
4958
|
-
), Je = "DialogContent", Os =
|
|
4960
|
+
), Je = "DialogContent", Os = u.forwardRef(
|
|
4959
4961
|
(e, t) => {
|
|
4960
4962
|
const n = Ls(Je, e.__scopeDialog), { forceMount: o = n.forceMount, ...i } = e, a = Re(Je, e.__scopeDialog);
|
|
4961
4963
|
return /* @__PURE__ */ g.jsx(Yt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ g.jsx(td, { ...i, ref: t }) : /* @__PURE__ */ g.jsx(nd, { ...i, ref: t }) });
|
|
4962
4964
|
}
|
|
4963
4965
|
);
|
|
4964
4966
|
Os.displayName = Je;
|
|
4965
|
-
var td =
|
|
4967
|
+
var td = u.forwardRef(
|
|
4966
4968
|
(e, t) => {
|
|
4967
|
-
const n = Re(Je, e.__scopeDialog), o =
|
|
4968
|
-
return
|
|
4969
|
+
const n = Re(Je, e.__scopeDialog), o = u.useRef(null), i = ae(t, n.contentRef, o);
|
|
4970
|
+
return u.useEffect(() => {
|
|
4969
4971
|
const a = o.current;
|
|
4970
4972
|
if (a) return ts(a);
|
|
4971
4973
|
}, []), /* @__PURE__ */ g.jsx(
|
|
@@ -4975,24 +4977,24 @@ var td = d.forwardRef(
|
|
|
4975
4977
|
ref: i,
|
|
4976
4978
|
trapFocus: n.open,
|
|
4977
4979
|
disableOutsidePointerEvents: !0,
|
|
4978
|
-
onCloseAutoFocus:
|
|
4980
|
+
onCloseAutoFocus: ne(e.onCloseAutoFocus, (a) => {
|
|
4979
4981
|
var r;
|
|
4980
4982
|
a.preventDefault(), (r = n.triggerRef.current) == null || r.focus();
|
|
4981
4983
|
}),
|
|
4982
|
-
onPointerDownOutside:
|
|
4984
|
+
onPointerDownOutside: ne(e.onPointerDownOutside, (a) => {
|
|
4983
4985
|
const r = a.detail.originalEvent, s = r.button === 0 && r.ctrlKey === !0;
|
|
4984
4986
|
(r.button === 2 || s) && a.preventDefault();
|
|
4985
4987
|
}),
|
|
4986
|
-
onFocusOutside:
|
|
4988
|
+
onFocusOutside: ne(
|
|
4987
4989
|
e.onFocusOutside,
|
|
4988
4990
|
(a) => a.preventDefault()
|
|
4989
4991
|
)
|
|
4990
4992
|
}
|
|
4991
4993
|
);
|
|
4992
4994
|
}
|
|
4993
|
-
), nd =
|
|
4995
|
+
), nd = u.forwardRef(
|
|
4994
4996
|
(e, t) => {
|
|
4995
|
-
const n = Re(Je, e.__scopeDialog), o =
|
|
4997
|
+
const n = Re(Je, e.__scopeDialog), o = u.useRef(!1), i = u.useRef(!1);
|
|
4996
4998
|
return /* @__PURE__ */ g.jsx(
|
|
4997
4999
|
zs,
|
|
4998
5000
|
{
|
|
@@ -5013,9 +5015,9 @@ var td = d.forwardRef(
|
|
|
5013
5015
|
}
|
|
5014
5016
|
);
|
|
5015
5017
|
}
|
|
5016
|
-
), zs =
|
|
5018
|
+
), zs = u.forwardRef(
|
|
5017
5019
|
(e, t) => {
|
|
5018
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: i, onCloseAutoFocus: a, ...r } = e, s = Re(Je, n), l =
|
|
5020
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: i, onCloseAutoFocus: a, ...r } = e, s = Re(Je, n), l = u.useRef(null), c = ae(t, l);
|
|
5019
5021
|
return Fr(), /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
5020
5022
|
/* @__PURE__ */ g.jsx(
|
|
5021
5023
|
Fn,
|
|
@@ -5046,30 +5048,30 @@ var td = d.forwardRef(
|
|
|
5046
5048
|
] })
|
|
5047
5049
|
] });
|
|
5048
5050
|
}
|
|
5049
|
-
), Jn = "DialogTitle", _s =
|
|
5051
|
+
), Jn = "DialogTitle", _s = u.forwardRef(
|
|
5050
5052
|
(e, t) => {
|
|
5051
5053
|
const { __scopeDialog: n, ...o } = e, i = Re(Jn, n);
|
|
5052
|
-
return /* @__PURE__ */ g.jsx(
|
|
5054
|
+
return /* @__PURE__ */ g.jsx(te.h2, { id: i.titleId, ...o, ref: t });
|
|
5053
5055
|
}
|
|
5054
5056
|
);
|
|
5055
5057
|
_s.displayName = Jn;
|
|
5056
|
-
var Bs = "DialogDescription", Vs =
|
|
5058
|
+
var Bs = "DialogDescription", Vs = u.forwardRef(
|
|
5057
5059
|
(e, t) => {
|
|
5058
5060
|
const { __scopeDialog: n, ...o } = e, i = Re(Bs, n);
|
|
5059
|
-
return /* @__PURE__ */ g.jsx(
|
|
5061
|
+
return /* @__PURE__ */ g.jsx(te.p, { id: i.descriptionId, ...o, ref: t });
|
|
5060
5062
|
}
|
|
5061
5063
|
);
|
|
5062
5064
|
Vs.displayName = Bs;
|
|
5063
|
-
var Fs = "DialogClose", $s =
|
|
5065
|
+
var Fs = "DialogClose", $s = u.forwardRef(
|
|
5064
5066
|
(e, t) => {
|
|
5065
5067
|
const { __scopeDialog: n, ...o } = e, i = Re(Fs, n);
|
|
5066
5068
|
return /* @__PURE__ */ g.jsx(
|
|
5067
|
-
|
|
5069
|
+
te.button,
|
|
5068
5070
|
{
|
|
5069
5071
|
type: "button",
|
|
5070
5072
|
...o,
|
|
5071
5073
|
ref: t,
|
|
5072
|
-
onClick:
|
|
5074
|
+
onClick: ne(e.onClick, () => i.onOpenChange(!1))
|
|
5073
5075
|
}
|
|
5074
5076
|
);
|
|
5075
5077
|
}
|
|
@@ -5088,14 +5090,14 @@ var Ws = "DialogTitleWarning", [jf, Hs] = zl(Ws, {
|
|
|
5088
5090
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5089
5091
|
|
|
5090
5092
|
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
5091
|
-
return
|
|
5093
|
+
return u.useEffect(() => {
|
|
5092
5094
|
if (e) {
|
|
5093
5095
|
const o = document.getElementById(e);
|
|
5094
5096
|
}
|
|
5095
5097
|
}, [n, e]), null;
|
|
5096
5098
|
}, rd = "DialogDescriptionWarning", sd = ({ contentRef: e, descriptionId: t }) => {
|
|
5097
5099
|
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hs(rd).contentName}}.`;
|
|
5098
|
-
return
|
|
5100
|
+
return u.useEffect(() => {
|
|
5099
5101
|
var a;
|
|
5100
5102
|
const i = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
5101
5103
|
if (t && i) {
|
|
@@ -5141,7 +5143,7 @@ function pd({ className: e, backdrop: t, ...n }) {
|
|
|
5141
5143
|
}
|
|
5142
5144
|
);
|
|
5143
5145
|
}
|
|
5144
|
-
const _f =
|
|
5146
|
+
const _f = u.forwardRef(
|
|
5145
5147
|
({ className: e, children: t, showCloseButton: n = !0, disabled: o = !1, backdrop: i = "opaque", ...a }, r) => /* @__PURE__ */ g.jsx(ua, { children: /* @__PURE__ */ g.jsxs(hd, { "data-slot": "dialog-portal", children: [
|
|
5146
5148
|
/* @__PURE__ */ g.jsx(pd, { backdrop: i }),
|
|
5147
5149
|
/* @__PURE__ */ g.jsxs(
|
|
@@ -5192,8 +5194,8 @@ function $f({ className: e, ...t }) {
|
|
|
5192
5194
|
return /* @__PURE__ */ g.jsx(fd, { "data-slot": "dialog-description", className: de("text-muted-foreground text-sm", e), ...t });
|
|
5193
5195
|
}
|
|
5194
5196
|
function md(e) {
|
|
5195
|
-
const t =
|
|
5196
|
-
return
|
|
5197
|
+
const t = u.useRef({ value: e, previous: e });
|
|
5198
|
+
return u.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
5197
5199
|
}
|
|
5198
5200
|
var Gs = Object.freeze({
|
|
5199
5201
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
@@ -5207,9 +5209,9 @@ var Gs = Object.freeze({
|
|
|
5207
5209
|
clip: "rect(0, 0, 0, 0)",
|
|
5208
5210
|
whiteSpace: "nowrap",
|
|
5209
5211
|
wordWrap: "normal"
|
|
5210
|
-
}), gd = "VisuallyHidden", Ks =
|
|
5212
|
+
}), gd = "VisuallyHidden", Ks = u.forwardRef(
|
|
5211
5213
|
(e, t) => /* @__PURE__ */ g.jsx(
|
|
5212
|
-
|
|
5214
|
+
te.span,
|
|
5213
5215
|
{
|
|
5214
5216
|
...e,
|
|
5215
5217
|
ref: t,
|
|
@@ -5236,22 +5238,22 @@ var vd = [" ", "Enter", "ArrowUp", "ArrowDown"], yd = [" ", "Enter"], Qe = "Sele
|
|
|
5236
5238
|
defaultValue: s,
|
|
5237
5239
|
onValueChange: l,
|
|
5238
5240
|
dir: c,
|
|
5239
|
-
name:
|
|
5241
|
+
name: d,
|
|
5240
5242
|
autoComplete: f,
|
|
5241
5243
|
disabled: h,
|
|
5242
5244
|
required: m,
|
|
5243
5245
|
form: x
|
|
5244
|
-
} = e, p = rn(t), [v, y] =
|
|
5246
|
+
} = e, p = rn(t), [v, y] = u.useState(null), [S, w] = u.useState(null), [C, D] = u.useState(!1), A = Hl(c), [P, V] = Dn({
|
|
5245
5247
|
prop: o,
|
|
5246
5248
|
defaultProp: i ?? !1,
|
|
5247
5249
|
onChange: a,
|
|
5248
5250
|
caller: Qe
|
|
5249
|
-
}), [L,
|
|
5251
|
+
}), [L, F] = Dn({
|
|
5250
5252
|
prop: r,
|
|
5251
5253
|
defaultProp: s,
|
|
5252
5254
|
onChange: l,
|
|
5253
5255
|
caller: Qe
|
|
5254
|
-
}),
|
|
5256
|
+
}), U = u.useRef(null), O = v ? x || !!v.closest("form") : !0, [_, X] = u.useState(/* @__PURE__ */ new Set()), K = Array.from(_).map((H) => H.props.value).join(";");
|
|
5255
5257
|
return /* @__PURE__ */ g.jsx(vc, { ...p, children: /* @__PURE__ */ g.jsxs(
|
|
5256
5258
|
Sd,
|
|
5257
5259
|
{
|
|
@@ -5262,27 +5264,27 @@ var vd = [" ", "Enter", "ArrowUp", "ArrowDown"], yd = [" ", "Enter"], Qe = "Sele
|
|
|
5262
5264
|
valueNode: S,
|
|
5263
5265
|
onValueNodeChange: w,
|
|
5264
5266
|
valueNodeHasChildren: C,
|
|
5265
|
-
onValueNodeHasChildrenChange:
|
|
5267
|
+
onValueNodeHasChildrenChange: D,
|
|
5266
5268
|
contentId: ut(),
|
|
5267
5269
|
value: L,
|
|
5268
|
-
onValueChange:
|
|
5270
|
+
onValueChange: F,
|
|
5269
5271
|
open: P,
|
|
5270
|
-
onOpenChange:
|
|
5271
|
-
dir:
|
|
5272
|
-
triggerPointerDownPosRef:
|
|
5272
|
+
onOpenChange: V,
|
|
5273
|
+
dir: A,
|
|
5274
|
+
triggerPointerDownPosRef: U,
|
|
5273
5275
|
disabled: h,
|
|
5274
5276
|
children: [
|
|
5275
5277
|
/* @__PURE__ */ g.jsx(nn.Provider, { scope: t, children: /* @__PURE__ */ g.jsx(
|
|
5276
5278
|
wd,
|
|
5277
5279
|
{
|
|
5278
5280
|
scope: e.__scopeSelect,
|
|
5279
|
-
onNativeOptionAdd:
|
|
5280
|
-
X((
|
|
5281
|
+
onNativeOptionAdd: u.useCallback((H) => {
|
|
5282
|
+
X((Q) => new Set(Q).add(H));
|
|
5281
5283
|
}, []),
|
|
5282
|
-
onNativeOptionRemove:
|
|
5283
|
-
X((
|
|
5284
|
-
const J = new Set(
|
|
5285
|
-
return J.delete(
|
|
5284
|
+
onNativeOptionRemove: u.useCallback((H) => {
|
|
5285
|
+
X((Q) => {
|
|
5286
|
+
const J = new Set(Q);
|
|
5287
|
+
return J.delete(H), J;
|
|
5286
5288
|
});
|
|
5287
5289
|
}, []),
|
|
5288
5290
|
children: n
|
|
@@ -5294,15 +5296,15 @@ var vd = [" ", "Enter", "ArrowUp", "ArrowDown"], yd = [" ", "Enter"], Qe = "Sele
|
|
|
5294
5296
|
"aria-hidden": !0,
|
|
5295
5297
|
required: m,
|
|
5296
5298
|
tabIndex: -1,
|
|
5297
|
-
name:
|
|
5299
|
+
name: d,
|
|
5298
5300
|
autoComplete: f,
|
|
5299
5301
|
value: L,
|
|
5300
|
-
onChange: (
|
|
5302
|
+
onChange: (H) => F(H.target.value),
|
|
5301
5303
|
disabled: h,
|
|
5302
5304
|
form: x,
|
|
5303
5305
|
children: [
|
|
5304
5306
|
L === void 0 ? /* @__PURE__ */ g.jsx("option", { value: "" }) : null,
|
|
5305
|
-
Array.from(
|
|
5307
|
+
Array.from(_)
|
|
5306
5308
|
]
|
|
5307
5309
|
},
|
|
5308
5310
|
K
|
|
@@ -5312,9 +5314,9 @@ var vd = [" ", "Enter", "ArrowUp", "ArrowDown"], yd = [" ", "Enter"], Qe = "Sele
|
|
|
5312
5314
|
) });
|
|
5313
5315
|
};
|
|
5314
5316
|
Xs.displayName = Qe;
|
|
5315
|
-
var Ys = "SelectTrigger", qs =
|
|
5317
|
+
var Ys = "SelectTrigger", qs = u.forwardRef(
|
|
5316
5318
|
(e, t) => {
|
|
5317
|
-
const { __scopeSelect: n, disabled: o = !1, ...i } = e, a = rn(n), r = $e(Ys, n), s = r.disabled || o, l = ae(t, r.onTriggerChange), c = on(n),
|
|
5319
|
+
const { __scopeSelect: n, disabled: o = !1, ...i } = e, a = rn(n), r = $e(Ys, n), s = r.disabled || o, l = ae(t, r.onTriggerChange), c = on(n), d = u.useRef("touch"), [f, h, m] = wi((p) => {
|
|
5318
5320
|
const v = c().filter((w) => !w.disabled), y = v.find((w) => w.value === r.value), S = bi(v, p, y);
|
|
5319
5321
|
S !== void 0 && r.onValueChange(S.value);
|
|
5320
5322
|
}), x = (p) => {
|
|
@@ -5324,7 +5326,7 @@ var Ys = "SelectTrigger", qs = d.forwardRef(
|
|
|
5324
5326
|
});
|
|
5325
5327
|
};
|
|
5326
5328
|
return /* @__PURE__ */ g.jsx(yc, { asChild: !0, ...a, children: /* @__PURE__ */ g.jsx(
|
|
5327
|
-
|
|
5329
|
+
te.button,
|
|
5328
5330
|
{
|
|
5329
5331
|
type: "button",
|
|
5330
5332
|
role: "combobox",
|
|
@@ -5339,15 +5341,15 @@ var Ys = "SelectTrigger", qs = d.forwardRef(
|
|
|
5339
5341
|
"data-placeholder": Si(r.value) ? "" : void 0,
|
|
5340
5342
|
...i,
|
|
5341
5343
|
ref: l,
|
|
5342
|
-
onClick:
|
|
5343
|
-
p.currentTarget.focus(),
|
|
5344
|
+
onClick: ne(i.onClick, (p) => {
|
|
5345
|
+
p.currentTarget.focus(), d.current !== "mouse" && x(p);
|
|
5344
5346
|
}),
|
|
5345
|
-
onPointerDown:
|
|
5346
|
-
|
|
5347
|
+
onPointerDown: ne(i.onPointerDown, (p) => {
|
|
5348
|
+
d.current = p.pointerType;
|
|
5347
5349
|
const v = p.target;
|
|
5348
5350
|
v.hasPointerCapture(p.pointerId) && v.releasePointerCapture(p.pointerId), p.button === 0 && p.ctrlKey === !1 && p.pointerType === "mouse" && (x(p), p.preventDefault());
|
|
5349
5351
|
}),
|
|
5350
|
-
onKeyDown:
|
|
5352
|
+
onKeyDown: ne(i.onKeyDown, (p) => {
|
|
5351
5353
|
const v = f.current !== "";
|
|
5352
5354
|
!(p.ctrlKey || p.altKey || p.metaKey) && p.key.length === 1 && h(p.key), !(v && p.key === " ") && vd.includes(p.key) && (x(), p.preventDefault());
|
|
5353
5355
|
})
|
|
@@ -5356,13 +5358,13 @@ var Ys = "SelectTrigger", qs = d.forwardRef(
|
|
|
5356
5358
|
}
|
|
5357
5359
|
);
|
|
5358
5360
|
qs.displayName = Ys;
|
|
5359
|
-
var Zs = "SelectValue", Js =
|
|
5361
|
+
var Zs = "SelectValue", Js = u.forwardRef(
|
|
5360
5362
|
(e, t) => {
|
|
5361
|
-
const { __scopeSelect: n, className: o, style: i, children: a, placeholder: r = "", ...s } = e, l = $e(Zs, n), { onValueNodeHasChildrenChange: c } = l,
|
|
5363
|
+
const { __scopeSelect: n, className: o, style: i, children: a, placeholder: r = "", ...s } = e, l = $e(Zs, n), { onValueNodeHasChildrenChange: c } = l, d = a !== void 0, f = ae(t, l.onValueNodeChange);
|
|
5362
5364
|
return fe(() => {
|
|
5363
|
-
c(
|
|
5364
|
-
}, [c,
|
|
5365
|
-
|
|
5365
|
+
c(d);
|
|
5366
|
+
}, [c, d]), /* @__PURE__ */ g.jsx(
|
|
5367
|
+
te.span,
|
|
5366
5368
|
{
|
|
5367
5369
|
...s,
|
|
5368
5370
|
ref: f,
|
|
@@ -5373,18 +5375,18 @@ var Zs = "SelectValue", Js = d.forwardRef(
|
|
|
5373
5375
|
}
|
|
5374
5376
|
);
|
|
5375
5377
|
Js.displayName = Zs;
|
|
5376
|
-
var Pd = "SelectIcon", Qs =
|
|
5378
|
+
var Pd = "SelectIcon", Qs = u.forwardRef(
|
|
5377
5379
|
(e, t) => {
|
|
5378
5380
|
const { __scopeSelect: n, children: o, ...i } = e;
|
|
5379
|
-
return /* @__PURE__ */ g.jsx(
|
|
5381
|
+
return /* @__PURE__ */ g.jsx(te.span, { "aria-hidden": !0, ...i, ref: t, children: o || "▼" });
|
|
5380
5382
|
}
|
|
5381
5383
|
);
|
|
5382
5384
|
Qs.displayName = Pd;
|
|
5383
5385
|
var Cd = "SelectPortal", ei = (e) => /* @__PURE__ */ g.jsx(Hn, { asChild: !0, ...e });
|
|
5384
5386
|
ei.displayName = Cd;
|
|
5385
|
-
var et = "SelectContent", ti =
|
|
5387
|
+
var et = "SelectContent", ti = u.forwardRef(
|
|
5386
5388
|
(e, t) => {
|
|
5387
|
-
const n = $e(et, e.__scopeSelect), [o, i] =
|
|
5389
|
+
const n = $e(et, e.__scopeSelect), [o, i] = u.useState();
|
|
5388
5390
|
if (fe(() => {
|
|
5389
5391
|
i(new DocumentFragment());
|
|
5390
5392
|
}, []), !n.open) {
|
|
@@ -5398,7 +5400,7 @@ var et = "SelectContent", ti = d.forwardRef(
|
|
|
5398
5400
|
}
|
|
5399
5401
|
);
|
|
5400
5402
|
ti.displayName = et;
|
|
5401
|
-
var Ce = 10, [ni, We] = ht(et), Ed = "SelectContentImpl", Rd = Pt("SelectContent.RemoveScroll"), oi =
|
|
5403
|
+
var Ce = 10, [ni, We] = ht(et), Ed = "SelectContentImpl", Rd = Pt("SelectContent.RemoveScroll"), oi = u.forwardRef(
|
|
5402
5404
|
(e, t) => {
|
|
5403
5405
|
const {
|
|
5404
5406
|
__scopeSelect: n,
|
|
@@ -5411,7 +5413,7 @@ var Ce = 10, [ni, We] = ht(et), Ed = "SelectContentImpl", Rd = Pt("SelectContent
|
|
|
5411
5413
|
side: s,
|
|
5412
5414
|
sideOffset: l,
|
|
5413
5415
|
align: c,
|
|
5414
|
-
alignOffset:
|
|
5416
|
+
alignOffset: d,
|
|
5415
5417
|
arrowPadding: f,
|
|
5416
5418
|
collisionBoundary: h,
|
|
5417
5419
|
collisionPadding: m,
|
|
@@ -5420,69 +5422,69 @@ var Ce = 10, [ni, We] = ht(et), Ed = "SelectContentImpl", Rd = Pt("SelectContent
|
|
|
5420
5422
|
avoidCollisions: v,
|
|
5421
5423
|
//
|
|
5422
5424
|
...y
|
|
5423
|
-
} = e, S = $e(et, n), [w, C] =
|
|
5425
|
+
} = e, S = $e(et, n), [w, C] = u.useState(null), [D, A] = u.useState(null), P = ae(t, (b) => C(b)), [V, L] = u.useState(null), [F, U] = u.useState(
|
|
5424
5426
|
null
|
|
5425
|
-
), O = on(n), [
|
|
5426
|
-
|
|
5427
|
+
), O = on(n), [_, X] = u.useState(!1), K = u.useRef(!1);
|
|
5428
|
+
u.useEffect(() => {
|
|
5427
5429
|
if (w) return ts(w);
|
|
5428
5430
|
}, [w]), Fr();
|
|
5429
|
-
const
|
|
5431
|
+
const H = u.useCallback(
|
|
5430
5432
|
(b) => {
|
|
5431
|
-
const [R, ...z] = O().map((
|
|
5432
|
-
for (const
|
|
5433
|
-
if (
|
|
5433
|
+
const [R, ...z] = O().map((B) => B.ref.current), [k] = z.slice(-1), $ = document.activeElement;
|
|
5434
|
+
for (const B of b)
|
|
5435
|
+
if (B === $ || (B == null || B.scrollIntoView({ block: "nearest" }), B === R && D && (D.scrollTop = 0), B === k && D && (D.scrollTop = D.scrollHeight), B == null || B.focus(), document.activeElement !== $)) return;
|
|
5434
5436
|
},
|
|
5435
|
-
[O,
|
|
5436
|
-
),
|
|
5437
|
-
() =>
|
|
5438
|
-
[
|
|
5437
|
+
[O, D]
|
|
5438
|
+
), Q = u.useCallback(
|
|
5439
|
+
() => H([V, w]),
|
|
5440
|
+
[H, V, w]
|
|
5439
5441
|
);
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
}, [
|
|
5443
|
-
const { onOpenChange: J, triggerPointerDownPosRef:
|
|
5444
|
-
|
|
5442
|
+
u.useEffect(() => {
|
|
5443
|
+
_ && Q();
|
|
5444
|
+
}, [_, Q]);
|
|
5445
|
+
const { onOpenChange: J, triggerPointerDownPosRef: Z } = S;
|
|
5446
|
+
u.useEffect(() => {
|
|
5445
5447
|
if (w) {
|
|
5446
5448
|
let b = { x: 0, y: 0 };
|
|
5447
5449
|
const R = (k) => {
|
|
5448
|
-
var $,
|
|
5450
|
+
var $, B;
|
|
5449
5451
|
b = {
|
|
5450
|
-
x: Math.abs(Math.round(k.pageX) - ((($ =
|
|
5451
|
-
y: Math.abs(Math.round(k.pageY) - (((
|
|
5452
|
+
x: Math.abs(Math.round(k.pageX) - ((($ = Z.current) == null ? void 0 : $.x) ?? 0)),
|
|
5453
|
+
y: Math.abs(Math.round(k.pageY) - (((B = Z.current) == null ? void 0 : B.y) ?? 0))
|
|
5452
5454
|
};
|
|
5453
5455
|
}, z = (k) => {
|
|
5454
|
-
b.x <= 10 && b.y <= 10 ? k.preventDefault() : w.contains(k.target) || J(!1), document.removeEventListener("pointermove", R),
|
|
5456
|
+
b.x <= 10 && b.y <= 10 ? k.preventDefault() : w.contains(k.target) || J(!1), document.removeEventListener("pointermove", R), Z.current = null;
|
|
5455
5457
|
};
|
|
5456
|
-
return
|
|
5458
|
+
return Z.current !== null && (document.addEventListener("pointermove", R), document.addEventListener("pointerup", z, { capture: !0, once: !0 })), () => {
|
|
5457
5459
|
document.removeEventListener("pointermove", R), document.removeEventListener("pointerup", z, { capture: !0 });
|
|
5458
5460
|
};
|
|
5459
5461
|
}
|
|
5460
|
-
}, [w, J,
|
|
5462
|
+
}, [w, J, Z]), u.useEffect(() => {
|
|
5461
5463
|
const b = () => J(!1);
|
|
5462
5464
|
return window.addEventListener("blur", b), window.addEventListener("resize", b), () => {
|
|
5463
5465
|
window.removeEventListener("blur", b), window.removeEventListener("resize", b);
|
|
5464
5466
|
};
|
|
5465
5467
|
}, [J]);
|
|
5466
|
-
const [
|
|
5468
|
+
const [he, oe] = wi((b) => {
|
|
5467
5469
|
const R = O().filter(($) => !$.disabled), z = R.find(($) => $.ref.current === document.activeElement), k = bi(R, b, z);
|
|
5468
5470
|
k && setTimeout(() => k.ref.current.focus());
|
|
5469
|
-
}), ue =
|
|
5471
|
+
}), ue = u.useCallback(
|
|
5470
5472
|
(b, R, z) => {
|
|
5471
5473
|
const k = !K.current && !z;
|
|
5472
5474
|
(S.value !== void 0 && S.value === R || k) && (L(b), k && (K.current = !0));
|
|
5473
5475
|
},
|
|
5474
5476
|
[S.value]
|
|
5475
|
-
), E =
|
|
5477
|
+
), E = u.useCallback(() => w == null ? void 0 : w.focus(), [w]), I = u.useCallback(
|
|
5476
5478
|
(b, R, z) => {
|
|
5477
5479
|
const k = !K.current && !z;
|
|
5478
|
-
(S.value !== void 0 && S.value === R || k) &&
|
|
5480
|
+
(S.value !== void 0 && S.value === R || k) && U(b);
|
|
5479
5481
|
},
|
|
5480
5482
|
[S.value]
|
|
5481
5483
|
), M = o === "popper" ? Ln : ri, N = M === Ln ? {
|
|
5482
5484
|
side: s,
|
|
5483
5485
|
sideOffset: l,
|
|
5484
5486
|
align: c,
|
|
5485
|
-
alignOffset:
|
|
5487
|
+
alignOffset: d,
|
|
5486
5488
|
arrowPadding: f,
|
|
5487
5489
|
collisionBoundary: h,
|
|
5488
5490
|
collisionPadding: m,
|
|
@@ -5495,17 +5497,17 @@ var Ce = 10, [ni, We] = ht(et), Ed = "SelectContentImpl", Rd = Pt("SelectContent
|
|
|
5495
5497
|
{
|
|
5496
5498
|
scope: n,
|
|
5497
5499
|
content: w,
|
|
5498
|
-
viewport:
|
|
5499
|
-
onViewportChange:
|
|
5500
|
+
viewport: D,
|
|
5501
|
+
onViewportChange: A,
|
|
5500
5502
|
itemRefCallback: ue,
|
|
5501
|
-
selectedItem:
|
|
5503
|
+
selectedItem: V,
|
|
5502
5504
|
onItemLeave: E,
|
|
5503
5505
|
itemTextRefCallback: I,
|
|
5504
|
-
focusSelectedItem:
|
|
5505
|
-
selectedItemText:
|
|
5506
|
+
focusSelectedItem: Q,
|
|
5507
|
+
selectedItemText: F,
|
|
5506
5508
|
position: o,
|
|
5507
|
-
isPositioned:
|
|
5508
|
-
searchRef:
|
|
5509
|
+
isPositioned: _,
|
|
5510
|
+
searchRef: he,
|
|
5509
5511
|
children: /* @__PURE__ */ g.jsx(Un, { as: Rd, allowPinchZoom: !0, children: /* @__PURE__ */ g.jsx(
|
|
5510
5512
|
Fn,
|
|
5511
5513
|
{
|
|
@@ -5514,7 +5516,7 @@ var Ce = 10, [ni, We] = ht(et), Ed = "SelectContentImpl", Rd = Pt("SelectContent
|
|
|
5514
5516
|
onMountAutoFocus: (b) => {
|
|
5515
5517
|
b.preventDefault();
|
|
5516
5518
|
},
|
|
5517
|
-
onUnmountAutoFocus:
|
|
5519
|
+
onUnmountAutoFocus: ne(i, (b) => {
|
|
5518
5520
|
var R;
|
|
5519
5521
|
(R = S.trigger) == null || R.focus({ preventScroll: !0 }), b.preventDefault();
|
|
5520
5522
|
}),
|
|
@@ -5547,15 +5549,15 @@ var Ce = 10, [ni, We] = ht(et), Ed = "SelectContentImpl", Rd = Pt("SelectContent
|
|
|
5547
5549
|
outline: "none",
|
|
5548
5550
|
...y.style
|
|
5549
5551
|
},
|
|
5550
|
-
onKeyDown:
|
|
5552
|
+
onKeyDown: ne(y.onKeyDown, (b) => {
|
|
5551
5553
|
const R = b.ctrlKey || b.altKey || b.metaKey;
|
|
5552
|
-
if (b.key === "Tab" && b.preventDefault(), !R && b.key.length === 1 &&
|
|
5554
|
+
if (b.key === "Tab" && b.preventDefault(), !R && b.key.length === 1 && oe(b.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(b.key)) {
|
|
5553
5555
|
let k = O().filter(($) => !$.disabled).map(($) => $.ref.current);
|
|
5554
5556
|
if (["ArrowUp", "End"].includes(b.key) && (k = k.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(b.key)) {
|
|
5555
|
-
const $ = b.target,
|
|
5556
|
-
k = k.slice(
|
|
5557
|
+
const $ = b.target, B = k.indexOf($);
|
|
5558
|
+
k = k.slice(B + 1);
|
|
5557
5559
|
}
|
|
5558
|
-
setTimeout(() =>
|
|
5560
|
+
setTimeout(() => H(k)), b.preventDefault();
|
|
5559
5561
|
}
|
|
5560
5562
|
})
|
|
5561
5563
|
}
|
|
@@ -5569,40 +5571,40 @@ var Ce = 10, [ni, We] = ht(et), Ed = "SelectContentImpl", Rd = Pt("SelectContent
|
|
|
5569
5571
|
}
|
|
5570
5572
|
);
|
|
5571
5573
|
oi.displayName = Ed;
|
|
5572
|
-
var Td = "SelectItemAlignedPosition", ri =
|
|
5573
|
-
const { __scopeSelect: n, onPlaced: o, ...i } = e, a = $e(et, n), r = We(et, n), [s, l] =
|
|
5574
|
+
var Td = "SelectItemAlignedPosition", ri = u.forwardRef((e, t) => {
|
|
5575
|
+
const { __scopeSelect: n, onPlaced: o, ...i } = e, a = $e(et, n), r = We(et, n), [s, l] = u.useState(null), [c, d] = u.useState(null), f = ae(t, (P) => d(P)), h = on(n), m = u.useRef(!1), x = u.useRef(!0), { viewport: p, selectedItem: v, selectedItemText: y, focusSelectedItem: S } = r, w = u.useCallback(() => {
|
|
5574
5576
|
if (a.trigger && a.valueNode && s && c && p && v && y) {
|
|
5575
|
-
const P = a.trigger.getBoundingClientRect(),
|
|
5577
|
+
const P = a.trigger.getBoundingClientRect(), V = c.getBoundingClientRect(), L = a.valueNode.getBoundingClientRect(), F = y.getBoundingClientRect();
|
|
5576
5578
|
if (a.dir !== "rtl") {
|
|
5577
|
-
const $ =
|
|
5579
|
+
const $ = F.left - V.left, B = L.left - $, G = P.left - B, T = P.width + G, j = Math.max(T, V.width), ee = window.innerWidth - Ce, se = cr(B, [
|
|
5578
5580
|
Ce,
|
|
5579
5581
|
// Prevents the content from going off the starting edge of the
|
|
5580
5582
|
// viewport. It may still go off the ending edge, but this can be
|
|
5581
5583
|
// controlled by the user since they may want to manage overflow in a
|
|
5582
5584
|
// specific way.
|
|
5583
5585
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
5584
|
-
Math.max(Ce,
|
|
5586
|
+
Math.max(Ce, ee - j)
|
|
5585
5587
|
]);
|
|
5586
5588
|
s.style.minWidth = T + "px", s.style.left = se + "px";
|
|
5587
5589
|
} else {
|
|
5588
|
-
const $ =
|
|
5590
|
+
const $ = V.right - F.right, B = window.innerWidth - L.right - $, G = window.innerWidth - P.right - B, T = P.width + G, j = Math.max(T, V.width), ee = window.innerWidth - Ce, se = cr(B, [
|
|
5589
5591
|
Ce,
|
|
5590
|
-
Math.max(Ce,
|
|
5592
|
+
Math.max(Ce, ee - j)
|
|
5591
5593
|
]);
|
|
5592
5594
|
s.style.minWidth = T + "px", s.style.right = se + "px";
|
|
5593
5595
|
}
|
|
5594
|
-
const
|
|
5596
|
+
const U = h(), O = window.innerHeight - Ce * 2, _ = p.scrollHeight, X = window.getComputedStyle(c), K = parseInt(X.borderTopWidth, 10), H = parseInt(X.paddingTop, 10), Q = parseInt(X.borderBottomWidth, 10), J = parseInt(X.paddingBottom, 10), Z = K + H + _ + J + Q, he = Math.min(v.offsetHeight * 5, Z), oe = window.getComputedStyle(p), ue = parseInt(oe.paddingTop, 10), E = parseInt(oe.paddingBottom, 10), I = P.top + P.height / 2 - Ce, M = O - I, N = v.offsetHeight / 2, b = v.offsetTop + N, R = K + H + b, z = Z - R;
|
|
5595
5597
|
if (R <= I) {
|
|
5596
|
-
const $ =
|
|
5598
|
+
const $ = U.length > 0 && v === U[U.length - 1].ref.current;
|
|
5597
5599
|
s.style.bottom = "0px";
|
|
5598
|
-
const
|
|
5600
|
+
const B = c.clientHeight - p.offsetTop - p.offsetHeight, G = Math.max(
|
|
5599
5601
|
M,
|
|
5600
5602
|
N + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
5601
|
-
($ ? E : 0) +
|
|
5603
|
+
($ ? E : 0) + B + Q
|
|
5602
5604
|
), T = R + G;
|
|
5603
5605
|
s.style.height = T + "px";
|
|
5604
5606
|
} else {
|
|
5605
|
-
const $ =
|
|
5607
|
+
const $ = U.length > 0 && v === U[0].ref.current;
|
|
5606
5608
|
s.style.top = "0px";
|
|
5607
5609
|
const G = Math.max(
|
|
5608
5610
|
I,
|
|
@@ -5611,7 +5613,7 @@ var Td = "SelectItemAlignedPosition", ri = d.forwardRef((e, t) => {
|
|
|
5611
5613
|
) + z;
|
|
5612
5614
|
s.style.height = G + "px", p.scrollTop = R - I + p.offsetTop;
|
|
5613
5615
|
}
|
|
5614
|
-
s.style.margin = `${Ce}px 0`, s.style.minHeight =
|
|
5616
|
+
s.style.margin = `${Ce}px 0`, s.style.minHeight = he + "px", s.style.maxHeight = O + "px", o == null || o(), requestAnimationFrame(() => m.current = !0);
|
|
5615
5617
|
}
|
|
5616
5618
|
}, [
|
|
5617
5619
|
h,
|
|
@@ -5626,11 +5628,11 @@ var Td = "SelectItemAlignedPosition", ri = d.forwardRef((e, t) => {
|
|
|
5626
5628
|
o
|
|
5627
5629
|
]);
|
|
5628
5630
|
fe(() => w(), [w]);
|
|
5629
|
-
const [C,
|
|
5631
|
+
const [C, D] = u.useState();
|
|
5630
5632
|
fe(() => {
|
|
5631
|
-
c &&
|
|
5633
|
+
c && D(window.getComputedStyle(c).zIndex);
|
|
5632
5634
|
}, [c]);
|
|
5633
|
-
const
|
|
5635
|
+
const A = u.useCallback(
|
|
5634
5636
|
(P) => {
|
|
5635
5637
|
P && x.current === !0 && (w(), S == null || S(), x.current = !1);
|
|
5636
5638
|
},
|
|
@@ -5642,7 +5644,7 @@ var Td = "SelectItemAlignedPosition", ri = d.forwardRef((e, t) => {
|
|
|
5642
5644
|
scope: n,
|
|
5643
5645
|
contentWrapper: s,
|
|
5644
5646
|
shouldExpandOnScrollRef: m,
|
|
5645
|
-
onScrollButtonChange:
|
|
5647
|
+
onScrollButtonChange: A,
|
|
5646
5648
|
children: /* @__PURE__ */ g.jsx(
|
|
5647
5649
|
"div",
|
|
5648
5650
|
{
|
|
@@ -5654,7 +5656,7 @@ var Td = "SelectItemAlignedPosition", ri = d.forwardRef((e, t) => {
|
|
|
5654
5656
|
zIndex: C
|
|
5655
5657
|
},
|
|
5656
5658
|
children: /* @__PURE__ */ g.jsx(
|
|
5657
|
-
|
|
5659
|
+
te.div,
|
|
5658
5660
|
{
|
|
5659
5661
|
...i,
|
|
5660
5662
|
ref: f,
|
|
@@ -5674,7 +5676,7 @@ var Td = "SelectItemAlignedPosition", ri = d.forwardRef((e, t) => {
|
|
|
5674
5676
|
);
|
|
5675
5677
|
});
|
|
5676
5678
|
ri.displayName = Td;
|
|
5677
|
-
var Ad = "SelectPopperPosition", Ln =
|
|
5679
|
+
var Ad = "SelectPopperPosition", Ln = u.forwardRef((e, t) => {
|
|
5678
5680
|
const {
|
|
5679
5681
|
__scopeSelect: n,
|
|
5680
5682
|
align: o = "start",
|
|
@@ -5703,9 +5705,9 @@ var Ad = "SelectPopperPosition", Ln = d.forwardRef((e, t) => {
|
|
|
5703
5705
|
);
|
|
5704
5706
|
});
|
|
5705
5707
|
Ln.displayName = Ad;
|
|
5706
|
-
var [Dd, eo] = ht(et, {}), jn = "SelectViewport", si =
|
|
5708
|
+
var [Dd, eo] = ht(et, {}), jn = "SelectViewport", si = u.forwardRef(
|
|
5707
5709
|
(e, t) => {
|
|
5708
|
-
const { __scopeSelect: n, nonce: o, ...i } = e, a = We(jn, n), r = eo(jn, n), s = ae(t, a.onViewportChange), l =
|
|
5710
|
+
const { __scopeSelect: n, nonce: o, ...i } = e, a = We(jn, n), r = eo(jn, n), s = ae(t, a.onViewportChange), l = u.useRef(0);
|
|
5709
5711
|
return /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
5710
5712
|
/* @__PURE__ */ g.jsx(
|
|
5711
5713
|
"style",
|
|
@@ -5717,7 +5719,7 @@ var [Dd, eo] = ht(et, {}), jn = "SelectViewport", si = d.forwardRef(
|
|
|
5717
5719
|
}
|
|
5718
5720
|
),
|
|
5719
5721
|
/* @__PURE__ */ g.jsx(nn.Slot, { scope: n, children: /* @__PURE__ */ g.jsx(
|
|
5720
|
-
|
|
5722
|
+
te.div,
|
|
5721
5723
|
{
|
|
5722
5724
|
"data-radix-select-viewport": "",
|
|
5723
5725
|
role: "presentation",
|
|
@@ -5736,19 +5738,19 @@ var [Dd, eo] = ht(et, {}), jn = "SelectViewport", si = d.forwardRef(
|
|
|
5736
5738
|
overflow: "hidden auto",
|
|
5737
5739
|
...i.style
|
|
5738
5740
|
},
|
|
5739
|
-
onScroll:
|
|
5740
|
-
const
|
|
5741
|
+
onScroll: ne(i.onScroll, (c) => {
|
|
5742
|
+
const d = c.currentTarget, { contentWrapper: f, shouldExpandOnScrollRef: h } = r;
|
|
5741
5743
|
if (h != null && h.current && f) {
|
|
5742
|
-
const m = Math.abs(l.current -
|
|
5744
|
+
const m = Math.abs(l.current - d.scrollTop);
|
|
5743
5745
|
if (m > 0) {
|
|
5744
5746
|
const x = window.innerHeight - Ce * 2, p = parseFloat(f.style.minHeight), v = parseFloat(f.style.height), y = Math.max(p, v);
|
|
5745
5747
|
if (y < x) {
|
|
5746
5748
|
const S = y + m, w = Math.min(x, S), C = S - w;
|
|
5747
|
-
f.style.height = w + "px", f.style.bottom === "0px" && (
|
|
5749
|
+
f.style.height = w + "px", f.style.bottom === "0px" && (d.scrollTop = C > 0 ? C : 0, f.style.justifyContent = "flex-end");
|
|
5748
5750
|
}
|
|
5749
5751
|
}
|
|
5750
5752
|
}
|
|
5751
|
-
l.current =
|
|
5753
|
+
l.current = d.scrollTop;
|
|
5752
5754
|
})
|
|
5753
5755
|
}
|
|
5754
5756
|
) })
|
|
@@ -5756,21 +5758,21 @@ var [Dd, eo] = ht(et, {}), jn = "SelectViewport", si = d.forwardRef(
|
|
|
5756
5758
|
}
|
|
5757
5759
|
);
|
|
5758
5760
|
si.displayName = jn;
|
|
5759
|
-
var ii = "SelectGroup", [Id, Nd] = ht(ii), ai =
|
|
5761
|
+
var ii = "SelectGroup", [Id, Nd] = ht(ii), ai = u.forwardRef(
|
|
5760
5762
|
(e, t) => {
|
|
5761
5763
|
const { __scopeSelect: n, ...o } = e, i = ut();
|
|
5762
|
-
return /* @__PURE__ */ g.jsx(Id, { scope: n, id: i, children: /* @__PURE__ */ g.jsx(
|
|
5764
|
+
return /* @__PURE__ */ g.jsx(Id, { scope: n, id: i, children: /* @__PURE__ */ g.jsx(te.div, { role: "group", "aria-labelledby": i, ...o, ref: t }) });
|
|
5763
5765
|
}
|
|
5764
5766
|
);
|
|
5765
5767
|
ai.displayName = ii;
|
|
5766
|
-
var li = "SelectLabel", ci =
|
|
5768
|
+
var li = "SelectLabel", ci = u.forwardRef(
|
|
5767
5769
|
(e, t) => {
|
|
5768
5770
|
const { __scopeSelect: n, ...o } = e, i = Nd(li, n);
|
|
5769
|
-
return /* @__PURE__ */ g.jsx(
|
|
5771
|
+
return /* @__PURE__ */ g.jsx(te.div, { id: i.id, ...o, ref: t });
|
|
5770
5772
|
}
|
|
5771
5773
|
);
|
|
5772
5774
|
ci.displayName = li;
|
|
5773
|
-
var Ut = "SelectItem", [Md, ui] = ht(Ut), di =
|
|
5775
|
+
var Ut = "SelectItem", [Md, ui] = ht(Ut), di = u.forwardRef(
|
|
5774
5776
|
(e, t) => {
|
|
5775
5777
|
const {
|
|
5776
5778
|
__scopeSelect: n,
|
|
@@ -5778,13 +5780,13 @@ var Ut = "SelectItem", [Md, ui] = ht(Ut), di = d.forwardRef(
|
|
|
5778
5780
|
disabled: i = !1,
|
|
5779
5781
|
textValue: a,
|
|
5780
5782
|
...r
|
|
5781
|
-
} = e, s = $e(Ut, n), l = We(Ut, n), c = s.value === o, [
|
|
5783
|
+
} = e, s = $e(Ut, n), l = We(Ut, n), c = s.value === o, [d, f] = u.useState(a ?? ""), [h, m] = u.useState(!1), x = ae(
|
|
5782
5784
|
t,
|
|
5783
5785
|
(S) => {
|
|
5784
5786
|
var w;
|
|
5785
5787
|
return (w = l.itemRefCallback) == null ? void 0 : w.call(l, S, o, i);
|
|
5786
5788
|
}
|
|
5787
|
-
), p = ut(), v =
|
|
5789
|
+
), p = ut(), v = u.useRef("touch"), y = () => {
|
|
5788
5790
|
i || (s.onValueChange(o), s.onOpenChange(!1));
|
|
5789
5791
|
};
|
|
5790
5792
|
if (o === "")
|
|
@@ -5799,7 +5801,7 @@ var Ut = "SelectItem", [Md, ui] = ht(Ut), di = d.forwardRef(
|
|
|
5799
5801
|
disabled: i,
|
|
5800
5802
|
textId: p,
|
|
5801
5803
|
isSelected: c,
|
|
5802
|
-
onItemTextChange:
|
|
5804
|
+
onItemTextChange: u.useCallback((S) => {
|
|
5803
5805
|
f((w) => w || ((S == null ? void 0 : S.textContent) ?? "").trim());
|
|
5804
5806
|
}, []),
|
|
5805
5807
|
children: /* @__PURE__ */ g.jsx(
|
|
@@ -5808,9 +5810,9 @@ var Ut = "SelectItem", [Md, ui] = ht(Ut), di = d.forwardRef(
|
|
|
5808
5810
|
scope: n,
|
|
5809
5811
|
value: o,
|
|
5810
5812
|
disabled: i,
|
|
5811
|
-
textValue:
|
|
5813
|
+
textValue: d,
|
|
5812
5814
|
children: /* @__PURE__ */ g.jsx(
|
|
5813
|
-
|
|
5815
|
+
te.div,
|
|
5814
5816
|
{
|
|
5815
5817
|
role: "option",
|
|
5816
5818
|
"aria-labelledby": p,
|
|
@@ -5822,26 +5824,26 @@ var Ut = "SelectItem", [Md, ui] = ht(Ut), di = d.forwardRef(
|
|
|
5822
5824
|
tabIndex: i ? void 0 : -1,
|
|
5823
5825
|
...r,
|
|
5824
5826
|
ref: x,
|
|
5825
|
-
onFocus:
|
|
5826
|
-
onBlur:
|
|
5827
|
-
onClick:
|
|
5827
|
+
onFocus: ne(r.onFocus, () => m(!0)),
|
|
5828
|
+
onBlur: ne(r.onBlur, () => m(!1)),
|
|
5829
|
+
onClick: ne(r.onClick, () => {
|
|
5828
5830
|
v.current !== "mouse" && y();
|
|
5829
5831
|
}),
|
|
5830
|
-
onPointerUp:
|
|
5832
|
+
onPointerUp: ne(r.onPointerUp, () => {
|
|
5831
5833
|
v.current === "mouse" && y();
|
|
5832
5834
|
}),
|
|
5833
|
-
onPointerDown:
|
|
5835
|
+
onPointerDown: ne(r.onPointerDown, (S) => {
|
|
5834
5836
|
v.current = S.pointerType;
|
|
5835
5837
|
}),
|
|
5836
|
-
onPointerMove:
|
|
5838
|
+
onPointerMove: ne(r.onPointerMove, (S) => {
|
|
5837
5839
|
var w;
|
|
5838
5840
|
v.current = S.pointerType, i ? (w = l.onItemLeave) == null || w.call(l) : v.current === "mouse" && S.currentTarget.focus({ preventScroll: !0 });
|
|
5839
5841
|
}),
|
|
5840
|
-
onPointerLeave:
|
|
5842
|
+
onPointerLeave: ne(r.onPointerLeave, (S) => {
|
|
5841
5843
|
var w;
|
|
5842
5844
|
S.currentTarget === document.activeElement && ((w = l.onItemLeave) == null || w.call(l));
|
|
5843
5845
|
}),
|
|
5844
|
-
onKeyDown:
|
|
5846
|
+
onKeyDown: ne(r.onKeyDown, (S) => {
|
|
5845
5847
|
var C;
|
|
5846
5848
|
((C = l.searchRef) == null ? void 0 : C.current) !== "" && S.key === " " || (yd.includes(S.key) && y(), S.key === " " && S.preventDefault());
|
|
5847
5849
|
})
|
|
@@ -5854,9 +5856,9 @@ var Ut = "SelectItem", [Md, ui] = ht(Ut), di = d.forwardRef(
|
|
|
5854
5856
|
}
|
|
5855
5857
|
);
|
|
5856
5858
|
di.displayName = Ut;
|
|
5857
|
-
var yt = "SelectItemText", fi =
|
|
5859
|
+
var yt = "SelectItemText", fi = u.forwardRef(
|
|
5858
5860
|
(e, t) => {
|
|
5859
|
-
const { __scopeSelect: n, className: o, style: i, ...a } = e, r = $e(yt, n), s = We(yt, n), l = ui(yt, n), c = bd(yt, n), [
|
|
5861
|
+
const { __scopeSelect: n, className: o, style: i, ...a } = e, r = $e(yt, n), s = We(yt, n), l = ui(yt, n), c = bd(yt, n), [d, f] = u.useState(null), h = ae(
|
|
5860
5862
|
t,
|
|
5861
5863
|
(y) => f(y),
|
|
5862
5864
|
l.onItemTextChange,
|
|
@@ -5864,26 +5866,26 @@ var yt = "SelectItemText", fi = d.forwardRef(
|
|
|
5864
5866
|
var S;
|
|
5865
5867
|
return (S = s.itemTextRefCallback) == null ? void 0 : S.call(s, y, l.value, l.disabled);
|
|
5866
5868
|
}
|
|
5867
|
-
), m =
|
|
5869
|
+
), m = d == null ? void 0 : d.textContent, x = u.useMemo(
|
|
5868
5870
|
() => /* @__PURE__ */ g.jsx("option", { value: l.value, disabled: l.disabled, children: m }, l.value),
|
|
5869
5871
|
[l.disabled, l.value, m]
|
|
5870
5872
|
), { onNativeOptionAdd: p, onNativeOptionRemove: v } = c;
|
|
5871
5873
|
return fe(() => (p(x), () => v(x)), [p, v, x]), /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
5872
|
-
/* @__PURE__ */ g.jsx(
|
|
5874
|
+
/* @__PURE__ */ g.jsx(te.span, { id: l.textId, ...a, ref: h }),
|
|
5873
5875
|
l.isSelected && r.valueNode && !r.valueNodeHasChildren ? Bn.createPortal(a.children, r.valueNode) : null
|
|
5874
5876
|
] });
|
|
5875
5877
|
}
|
|
5876
5878
|
);
|
|
5877
5879
|
fi.displayName = yt;
|
|
5878
|
-
var hi = "SelectItemIndicator", pi =
|
|
5880
|
+
var hi = "SelectItemIndicator", pi = u.forwardRef(
|
|
5879
5881
|
(e, t) => {
|
|
5880
5882
|
const { __scopeSelect: n, ...o } = e;
|
|
5881
|
-
return ui(hi, n).isSelected ? /* @__PURE__ */ g.jsx(
|
|
5883
|
+
return ui(hi, n).isSelected ? /* @__PURE__ */ g.jsx(te.span, { "aria-hidden": !0, ...o, ref: t }) : null;
|
|
5882
5884
|
}
|
|
5883
5885
|
);
|
|
5884
5886
|
pi.displayName = hi;
|
|
5885
|
-
var kn = "SelectScrollUpButton", mi =
|
|
5886
|
-
const n = We(kn, e.__scopeSelect), o = eo(kn, e.__scopeSelect), [i, a] =
|
|
5887
|
+
var kn = "SelectScrollUpButton", mi = u.forwardRef((e, t) => {
|
|
5888
|
+
const n = We(kn, e.__scopeSelect), o = eo(kn, e.__scopeSelect), [i, a] = u.useState(!1), r = ae(t, o.onScrollButtonChange);
|
|
5887
5889
|
return fe(() => {
|
|
5888
5890
|
if (n.viewport && n.isPositioned) {
|
|
5889
5891
|
let s = function() {
|
|
@@ -5906,13 +5908,13 @@ var kn = "SelectScrollUpButton", mi = d.forwardRef((e, t) => {
|
|
|
5906
5908
|
) : null;
|
|
5907
5909
|
});
|
|
5908
5910
|
mi.displayName = kn;
|
|
5909
|
-
var On = "SelectScrollDownButton", gi =
|
|
5910
|
-
const n = We(On, e.__scopeSelect), o = eo(On, e.__scopeSelect), [i, a] =
|
|
5911
|
+
var On = "SelectScrollDownButton", gi = u.forwardRef((e, t) => {
|
|
5912
|
+
const n = We(On, e.__scopeSelect), o = eo(On, e.__scopeSelect), [i, a] = u.useState(!1), r = ae(t, o.onScrollButtonChange);
|
|
5911
5913
|
return fe(() => {
|
|
5912
5914
|
if (n.viewport && n.isPositioned) {
|
|
5913
5915
|
let s = function() {
|
|
5914
|
-
const c = l.scrollHeight - l.clientHeight,
|
|
5915
|
-
a(
|
|
5916
|
+
const c = l.scrollHeight - l.clientHeight, d = Math.ceil(l.scrollTop) < c;
|
|
5917
|
+
a(d);
|
|
5916
5918
|
};
|
|
5917
5919
|
const l = n.viewport;
|
|
5918
5920
|
return s(), l.addEventListener("scroll", s), () => l.removeEventListener("scroll", s);
|
|
@@ -5930,63 +5932,63 @@ var On = "SelectScrollDownButton", gi = d.forwardRef((e, t) => {
|
|
|
5930
5932
|
) : null;
|
|
5931
5933
|
});
|
|
5932
5934
|
gi.displayName = On;
|
|
5933
|
-
var vi =
|
|
5934
|
-
const { __scopeSelect: n, onAutoScroll: o, ...i } = e, a = We("SelectScrollButton", n), r =
|
|
5935
|
+
var vi = u.forwardRef((e, t) => {
|
|
5936
|
+
const { __scopeSelect: n, onAutoScroll: o, ...i } = e, a = We("SelectScrollButton", n), r = u.useRef(null), s = on(n), l = u.useCallback(() => {
|
|
5935
5937
|
r.current !== null && (window.clearInterval(r.current), r.current = null);
|
|
5936
5938
|
}, []);
|
|
5937
|
-
return
|
|
5938
|
-
var
|
|
5939
|
+
return u.useEffect(() => () => l(), [l]), fe(() => {
|
|
5940
|
+
var d;
|
|
5939
5941
|
const c = s().find((f) => f.ref.current === document.activeElement);
|
|
5940
|
-
(
|
|
5942
|
+
(d = c == null ? void 0 : c.ref.current) == null || d.scrollIntoView({ block: "nearest" });
|
|
5941
5943
|
}, [s]), /* @__PURE__ */ g.jsx(
|
|
5942
|
-
|
|
5944
|
+
te.div,
|
|
5943
5945
|
{
|
|
5944
5946
|
"aria-hidden": !0,
|
|
5945
5947
|
...i,
|
|
5946
5948
|
ref: t,
|
|
5947
5949
|
style: { flexShrink: 0, ...i.style },
|
|
5948
|
-
onPointerDown:
|
|
5950
|
+
onPointerDown: ne(i.onPointerDown, () => {
|
|
5949
5951
|
r.current === null && (r.current = window.setInterval(o, 50));
|
|
5950
5952
|
}),
|
|
5951
|
-
onPointerMove:
|
|
5953
|
+
onPointerMove: ne(i.onPointerMove, () => {
|
|
5952
5954
|
var c;
|
|
5953
5955
|
(c = a.onItemLeave) == null || c.call(a), r.current === null && (r.current = window.setInterval(o, 50));
|
|
5954
5956
|
}),
|
|
5955
|
-
onPointerLeave:
|
|
5957
|
+
onPointerLeave: ne(i.onPointerLeave, () => {
|
|
5956
5958
|
l();
|
|
5957
5959
|
})
|
|
5958
5960
|
}
|
|
5959
5961
|
);
|
|
5960
|
-
}), Ld = "SelectSeparator", yi =
|
|
5962
|
+
}), Ld = "SelectSeparator", yi = u.forwardRef(
|
|
5961
5963
|
(e, t) => {
|
|
5962
5964
|
const { __scopeSelect: n, ...o } = e;
|
|
5963
|
-
return /* @__PURE__ */ g.jsx(
|
|
5965
|
+
return /* @__PURE__ */ g.jsx(te.div, { "aria-hidden": !0, ...o, ref: t });
|
|
5964
5966
|
}
|
|
5965
5967
|
);
|
|
5966
5968
|
yi.displayName = Ld;
|
|
5967
|
-
var zn = "SelectArrow", jd =
|
|
5969
|
+
var zn = "SelectArrow", jd = u.forwardRef(
|
|
5968
5970
|
(e, t) => {
|
|
5969
5971
|
const { __scopeSelect: n, ...o } = e, i = rn(n), a = $e(zn, n), r = We(zn, n);
|
|
5970
5972
|
return a.open && r.position === "popper" ? /* @__PURE__ */ g.jsx(Sc, { ...i, ...o, ref: t }) : null;
|
|
5971
5973
|
}
|
|
5972
5974
|
);
|
|
5973
5975
|
jd.displayName = zn;
|
|
5974
|
-
var kd = "SelectBubbleInput", xi =
|
|
5976
|
+
var kd = "SelectBubbleInput", xi = u.forwardRef(
|
|
5975
5977
|
({ __scopeSelect: e, value: t, ...n }, o) => {
|
|
5976
|
-
const i =
|
|
5977
|
-
return
|
|
5978
|
+
const i = u.useRef(null), a = ae(o, i), r = md(t);
|
|
5979
|
+
return u.useEffect(() => {
|
|
5978
5980
|
const s = i.current;
|
|
5979
5981
|
if (!s) return;
|
|
5980
|
-
const l = window.HTMLSelectElement.prototype,
|
|
5982
|
+
const l = window.HTMLSelectElement.prototype, d = Object.getOwnPropertyDescriptor(
|
|
5981
5983
|
l,
|
|
5982
5984
|
"value"
|
|
5983
5985
|
).set;
|
|
5984
|
-
if (r !== t &&
|
|
5986
|
+
if (r !== t && d) {
|
|
5985
5987
|
const f = new Event("change", { bubbles: !0 });
|
|
5986
|
-
|
|
5988
|
+
d.call(s, t), s.dispatchEvent(f);
|
|
5987
5989
|
}
|
|
5988
5990
|
}, [r, t]), /* @__PURE__ */ g.jsx(
|
|
5989
|
-
|
|
5991
|
+
te.select,
|
|
5990
5992
|
{
|
|
5991
5993
|
...n,
|
|
5992
5994
|
style: { ...Gs, ...n.style },
|
|
@@ -6001,7 +6003,7 @@ function Si(e) {
|
|
|
6001
6003
|
return e === "" || e === void 0;
|
|
6002
6004
|
}
|
|
6003
6005
|
function wi(e) {
|
|
6004
|
-
const t = qe(e), n =
|
|
6006
|
+
const t = qe(e), n = u.useRef(""), o = u.useRef(0), i = u.useCallback(
|
|
6005
6007
|
(r) => {
|
|
6006
6008
|
const s = n.current + r;
|
|
6007
6009
|
t(s), function l(c) {
|
|
@@ -6009,10 +6011,10 @@ function wi(e) {
|
|
|
6009
6011
|
}(s);
|
|
6010
6012
|
},
|
|
6011
6013
|
[t]
|
|
6012
|
-
), a =
|
|
6014
|
+
), a = u.useCallback(() => {
|
|
6013
6015
|
n.current = "", window.clearTimeout(o.current);
|
|
6014
6016
|
}, []);
|
|
6015
|
-
return
|
|
6017
|
+
return u.useEffect(() => () => window.clearTimeout(o.current), []), [n, i, a];
|
|
6016
6018
|
}
|
|
6017
6019
|
function bi(e, t, n) {
|
|
6018
6020
|
const i = t.length > 1 && Array.from(t).every((c) => c === t[0]) ? t[0] : t, a = n ? e.indexOf(n) : -1;
|
|
@@ -6155,20 +6157,20 @@ function af(e) {
|
|
|
6155
6157
|
return [t, n, o];
|
|
6156
6158
|
}
|
|
6157
6159
|
function lf(e) {
|
|
6158
|
-
let t =
|
|
6159
|
-
return
|
|
6160
|
+
let t = u.useRef();
|
|
6161
|
+
return u.useEffect(() => {
|
|
6160
6162
|
t.current = e;
|
|
6161
6163
|
}), t.current;
|
|
6162
6164
|
}
|
|
6163
6165
|
var cf = 18, Ei = 40, uf = `${Ei}px`, df = ["[data-lastpass-icon-root]", "com-1password-button", "[data-dashlanecreated]", '[style$="2147483647 !important;"]'].join(",");
|
|
6164
6166
|
function ff({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFocused: o }) {
|
|
6165
|
-
let [i, a] =
|
|
6167
|
+
let [i, a] = u.useState(!1), [r, s] = u.useState(!1), [l, c] = u.useState(!1), d = u.useMemo(() => n === "none" ? !1 : (n === "increase-width" || n === "experimental-no-flickering") && i && r, [i, r, n]), f = u.useCallback(() => {
|
|
6166
6168
|
let h = e.current, m = t.current;
|
|
6167
6169
|
if (!h || !m || l || n === "none") return;
|
|
6168
6170
|
let x = h, p = x.getBoundingClientRect().left + x.offsetWidth, v = x.getBoundingClientRect().top + x.offsetHeight / 2, y = p - cf, S = v;
|
|
6169
6171
|
document.querySelectorAll(df).length === 0 && document.elementFromPoint(y, S) === h || (a(!0), c(!0));
|
|
6170
6172
|
}, [e, t, l, n]);
|
|
6171
|
-
return
|
|
6173
|
+
return u.useEffect(() => {
|
|
6172
6174
|
let h = e.current;
|
|
6173
6175
|
if (!h || n === "none") return;
|
|
6174
6176
|
function m() {
|
|
@@ -6180,7 +6182,7 @@ function ff({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFo
|
|
|
6180
6182
|
return () => {
|
|
6181
6183
|
clearInterval(x);
|
|
6182
6184
|
};
|
|
6183
|
-
}, [e, n]),
|
|
6185
|
+
}, [e, n]), u.useEffect(() => {
|
|
6184
6186
|
let h = o || document.activeElement === t.current;
|
|
6185
6187
|
if (n === "none" || !h) return;
|
|
6186
6188
|
let m = setTimeout(f, 0), x = setTimeout(f, 2e3), p = setTimeout(f, 5e3), v = setTimeout(() => {
|
|
@@ -6189,97 +6191,97 @@ function ff({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFo
|
|
|
6189
6191
|
return () => {
|
|
6190
6192
|
clearTimeout(m), clearTimeout(x), clearTimeout(p), clearTimeout(v);
|
|
6191
6193
|
};
|
|
6192
|
-
}, [t, o, n, f]), { hasPWMBadge: i, willPushPWMBadge:
|
|
6193
|
-
}
|
|
6194
|
-
var hf =
|
|
6195
|
-
var n = e, { value: o, onChange: i, maxLength: a, textAlign: r = "left", pattern: s, placeholder: l, inputMode: c = "numeric", onComplete:
|
|
6196
|
-
let [P,
|
|
6197
|
-
i == null || i(T),
|
|
6198
|
-
}, [i]), O =
|
|
6199
|
-
|
|
6200
|
-
let T =
|
|
6194
|
+
}, [t, o, n, f]), { hasPWMBadge: i, willPushPWMBadge: d, PWM_BADGE_SPACE_WIDTH: uf };
|
|
6195
|
+
}
|
|
6196
|
+
var hf = u.createContext({}), pf = u.forwardRef((e, t) => {
|
|
6197
|
+
var n = e, { value: o, onChange: i, maxLength: a, textAlign: r = "left", pattern: s, placeholder: l, inputMode: c = "numeric", onComplete: d, pushPasswordManagerStrategy: f = "increase-width", pasteTransformer: h, containerClassName: m, noScriptCSSFallback: x = mf, render: p, children: v } = n, y = sf(n, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), S, w, C, D, A;
|
|
6198
|
+
let [P, V] = u.useState(typeof y.defaultValue == "string" ? y.defaultValue : ""), L = o ?? P, F = lf(L), U = u.useCallback((T) => {
|
|
6199
|
+
i == null || i(T), V(T);
|
|
6200
|
+
}, [i]), O = u.useMemo(() => s ? typeof s == "string" ? new RegExp(s) : s : null, [s]), _ = u.useRef(null), X = u.useRef(null), K = u.useRef({ value: L, onChange: U, isIOS: typeof window < "u" && ((w = (S = window == null ? void 0 : window.CSS) == null ? void 0 : S.supports) == null ? void 0 : w.call(S, "-webkit-touch-callout", "none")) }), H = u.useRef({ prev: [(C = _.current) == null ? void 0 : C.selectionStart, (D = _.current) == null ? void 0 : D.selectionEnd, (A = _.current) == null ? void 0 : A.selectionDirection] });
|
|
6201
|
+
u.useImperativeHandle(t, () => _.current, []), u.useEffect(() => {
|
|
6202
|
+
let T = _.current, j = X.current;
|
|
6201
6203
|
if (!T || !j) return;
|
|
6202
|
-
K.current.value !== T.value && K.current.onChange(T.value),
|
|
6203
|
-
function
|
|
6204
|
+
K.current.value !== T.value && K.current.onChange(T.value), H.current.prev = [T.selectionStart, T.selectionEnd, T.selectionDirection];
|
|
6205
|
+
function ee() {
|
|
6204
6206
|
if (document.activeElement !== T) {
|
|
6205
6207
|
ue(null), I(null);
|
|
6206
6208
|
return;
|
|
6207
6209
|
}
|
|
6208
|
-
let Y = T.selectionStart,
|
|
6209
|
-
if (De.length !== 0 && Y !== null &&
|
|
6210
|
-
let Ti = Y ===
|
|
6210
|
+
let Y = T.selectionStart, pe = T.selectionEnd, Te = T.selectionDirection, ge = T.maxLength, De = T.value, Ie = H.current.prev, ke = -1, Oe = -1, He;
|
|
6211
|
+
if (De.length !== 0 && Y !== null && pe !== null) {
|
|
6212
|
+
let Ti = Y === pe, Ai = Y === De.length && De.length < ge;
|
|
6211
6213
|
if (Ti && !Ai) {
|
|
6212
6214
|
let Ue = Y;
|
|
6213
6215
|
if (Ue === 0) ke = 0, Oe = 1, He = "forward";
|
|
6214
|
-
else if (Ue ===
|
|
6215
|
-
else if (
|
|
6216
|
+
else if (Ue === ge) ke = Ue - 1, Oe = Ue, He = "backward";
|
|
6217
|
+
else if (ge > 1 && De.length > 1) {
|
|
6216
6218
|
let sn = 0;
|
|
6217
6219
|
if (Ie[0] !== null && Ie[1] !== null) {
|
|
6218
6220
|
He = Ue < Ie[1] ? "backward" : "forward";
|
|
6219
|
-
let Di = Ie[0] === Ie[1] && Ie[0] <
|
|
6221
|
+
let Di = Ie[0] === Ie[1] && Ie[0] < ge;
|
|
6220
6222
|
He === "backward" && !Di && (sn = -1);
|
|
6221
6223
|
}
|
|
6222
6224
|
ke = sn + Ue, Oe = sn + Ue + 1;
|
|
6223
6225
|
}
|
|
6224
6226
|
}
|
|
6225
|
-
ke !== -1 && Oe !== -1 && ke !== Oe &&
|
|
6227
|
+
ke !== -1 && Oe !== -1 && ke !== Oe && _.current.setSelectionRange(ke, Oe, He);
|
|
6226
6228
|
}
|
|
6227
|
-
let to = ke !== -1 ? ke : Y, no = Oe !== -1 ? Oe :
|
|
6228
|
-
ue(to), I(no),
|
|
6229
|
+
let to = ke !== -1 ? ke : Y, no = Oe !== -1 ? Oe : pe, Ri = He ?? Te;
|
|
6230
|
+
ue(to), I(no), H.current.prev = [to, no, Ri];
|
|
6229
6231
|
}
|
|
6230
|
-
if (document.addEventListener("selectionchange",
|
|
6232
|
+
if (document.addEventListener("selectionchange", ee, { capture: !0 }), ee(), document.activeElement === T && he(!0), !document.getElementById("input-otp-style")) {
|
|
6231
6233
|
let Y = document.createElement("style");
|
|
6232
6234
|
if (Y.id = "input-otp-style", document.head.appendChild(Y), Y.sheet) {
|
|
6233
|
-
let
|
|
6234
|
-
mt(Y.sheet, "[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"), mt(Y.sheet, `[data-input-otp]:autofill { ${
|
|
6235
|
+
let pe = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";
|
|
6236
|
+
mt(Y.sheet, "[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"), mt(Y.sheet, `[data-input-otp]:autofill { ${pe} }`), mt(Y.sheet, `[data-input-otp]:-webkit-autofill { ${pe} }`), mt(Y.sheet, "@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"), mt(Y.sheet, "[data-input-otp] + * { pointer-events: all !important; }");
|
|
6235
6237
|
}
|
|
6236
6238
|
}
|
|
6237
6239
|
let se = () => {
|
|
6238
6240
|
j && j.style.setProperty("--root-height", `${T.clientHeight}px`);
|
|
6239
6241
|
};
|
|
6240
6242
|
se();
|
|
6241
|
-
let
|
|
6242
|
-
return
|
|
6243
|
-
document.removeEventListener("selectionchange",
|
|
6243
|
+
let q = new ResizeObserver(se);
|
|
6244
|
+
return q.observe(T), () => {
|
|
6245
|
+
document.removeEventListener("selectionchange", ee, { capture: !0 }), q.disconnect();
|
|
6244
6246
|
};
|
|
6245
6247
|
}, []);
|
|
6246
|
-
let [
|
|
6247
|
-
|
|
6248
|
+
let [Q, J] = u.useState(!1), [Z, he] = u.useState(!1), [oe, ue] = u.useState(null), [E, I] = u.useState(null);
|
|
6249
|
+
u.useEffect(() => {
|
|
6248
6250
|
af(() => {
|
|
6249
|
-
var T, j,
|
|
6250
|
-
(T =
|
|
6251
|
-
let
|
|
6252
|
-
|
|
6251
|
+
var T, j, ee, se;
|
|
6252
|
+
(T = _.current) == null || T.dispatchEvent(new Event("input"));
|
|
6253
|
+
let q = (j = _.current) == null ? void 0 : j.selectionStart, Y = (ee = _.current) == null ? void 0 : ee.selectionEnd, pe = (se = _.current) == null ? void 0 : se.selectionDirection;
|
|
6254
|
+
q !== null && Y !== null && (ue(q), I(Y), H.current.prev = [q, Y, pe]);
|
|
6253
6255
|
});
|
|
6254
|
-
}, [L,
|
|
6255
|
-
|
|
6256
|
-
}, [a,
|
|
6257
|
-
let M = ff({ containerRef: X, inputRef:
|
|
6256
|
+
}, [L, Z]), u.useEffect(() => {
|
|
6257
|
+
F !== void 0 && L !== F && F.length < a && L.length === a && (d == null || d(L));
|
|
6258
|
+
}, [a, d, F, L]);
|
|
6259
|
+
let M = ff({ containerRef: X, inputRef: _, pushPasswordManagerStrategy: f, isFocused: Z }), N = u.useCallback((T) => {
|
|
6258
6260
|
let j = T.currentTarget.value.slice(0, a);
|
|
6259
6261
|
if (j.length > 0 && O && !O.test(j)) {
|
|
6260
6262
|
T.preventDefault();
|
|
6261
6263
|
return;
|
|
6262
6264
|
}
|
|
6263
|
-
typeof
|
|
6264
|
-
}, [a,
|
|
6265
|
+
typeof F == "string" && j.length < F.length && document.dispatchEvent(new Event("selectionchange")), U(j);
|
|
6266
|
+
}, [a, U, F, O]), b = u.useCallback(() => {
|
|
6265
6267
|
var T;
|
|
6266
|
-
if (
|
|
6267
|
-
let j = Math.min(
|
|
6268
|
-
(T =
|
|
6269
|
-
}
|
|
6270
|
-
|
|
6271
|
-
}, [a]), R =
|
|
6272
|
-
var j,
|
|
6273
|
-
let se =
|
|
6268
|
+
if (_.current) {
|
|
6269
|
+
let j = Math.min(_.current.value.length, a - 1), ee = _.current.value.length;
|
|
6270
|
+
(T = _.current) == null || T.setSelectionRange(j, ee), ue(j), I(ee);
|
|
6271
|
+
}
|
|
6272
|
+
he(!0);
|
|
6273
|
+
}, [a]), R = u.useCallback((T) => {
|
|
6274
|
+
var j, ee;
|
|
6275
|
+
let se = _.current;
|
|
6274
6276
|
if (!h && (!K.current.isIOS || !T.clipboardData || !se)) return;
|
|
6275
|
-
let
|
|
6277
|
+
let q = T.clipboardData.getData("text/plain"), Y = h ? h(q) : q;
|
|
6276
6278
|
T.preventDefault();
|
|
6277
|
-
let
|
|
6278
|
-
if (
|
|
6279
|
-
se.value =
|
|
6280
|
-
let De = Math.min(
|
|
6279
|
+
let pe = (j = _.current) == null ? void 0 : j.selectionStart, Te = (ee = _.current) == null ? void 0 : ee.selectionEnd, ge = (pe !== Te ? L.slice(0, pe) + Y + L.slice(Te) : L.slice(0, pe) + Y + L.slice(pe)).slice(0, a);
|
|
6280
|
+
if (ge.length > 0 && O && !O.test(ge)) return;
|
|
6281
|
+
se.value = ge, U(ge);
|
|
6282
|
+
let De = Math.min(ge.length, a - 1), Ie = ge.length;
|
|
6281
6283
|
se.setSelectionRange(De, Ie), ue(De), I(Ie);
|
|
6282
|
-
}, [a,
|
|
6284
|
+
}, [a, U, O, L]), z = u.useMemo(() => ({ position: "relative", cursor: y.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [y.disabled]), k = u.useMemo(() => ({ position: "absolute", inset: 0, width: M.willPushPWMBadge ? `calc(100% + ${M.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: M.willPushPWMBadge ? `inset(0 ${M.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: r, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [M.PWM_BADGE_SPACE_WIDTH, M.willPushPWMBadge, r]), $ = u.useMemo(() => u.createElement("input", rf(of({ autoComplete: y.autoComplete || "one-time-code" }, y), { "data-input-otp": !0, "data-input-otp-placeholder-shown": L.length === 0 || void 0, "data-input-otp-mss": oe, "data-input-otp-mse": E, inputMode: c, pattern: O == null ? void 0 : O.source, "aria-placeholder": l, style: k, maxLength: a, value: L, ref: _, onPaste: (T) => {
|
|
6283
6285
|
var j;
|
|
6284
6286
|
R(T), (j = y.onPaste) == null || j.call(y, T);
|
|
6285
6287
|
}, onChange: N, onMouseOver: (T) => {
|
|
@@ -6293,13 +6295,13 @@ var hf = d.createContext({}), pf = d.forwardRef((e, t) => {
|
|
|
6293
6295
|
b(), (j = y.onFocus) == null || j.call(y, T);
|
|
6294
6296
|
}, onBlur: (T) => {
|
|
6295
6297
|
var j;
|
|
6296
|
-
|
|
6297
|
-
} })), [N, b, R, c, k, a, E,
|
|
6298
|
-
var
|
|
6299
|
-
let se =
|
|
6300
|
-
return { char:
|
|
6301
|
-
}), isFocused:
|
|
6302
|
-
return
|
|
6298
|
+
he(!1), (j = y.onBlur) == null || j.call(y, T);
|
|
6299
|
+
} })), [N, b, R, c, k, a, E, oe, y, O == null ? void 0 : O.source, L]), B = u.useMemo(() => ({ slots: Array.from({ length: a }).map((T, j) => {
|
|
6300
|
+
var ee;
|
|
6301
|
+
let se = Z && oe !== null && E !== null && (oe === E && j === oe || j >= oe && j < E), q = L[j] !== void 0 ? L[j] : null, Y = L[0] !== void 0 ? null : (ee = l == null ? void 0 : l[j]) != null ? ee : null;
|
|
6302
|
+
return { char: q, placeholderChar: Y, isActive: se, hasFakeCaret: se && q === null };
|
|
6303
|
+
}), isFocused: Z, isHovering: !y.disabled && Q }), [Z, Q, a, E, oe, y.disabled, L]), G = u.useMemo(() => p ? p(B) : u.createElement(hf.Provider, { value: B }, v), [v, B, p]);
|
|
6304
|
+
return u.createElement(u.Fragment, null, x !== null && u.createElement("noscript", null, u.createElement("style", null, x)), u.createElement("div", { ref: X, "data-input-otp-container": !0, style: z, className: m }, G, u.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, $)));
|
|
6303
6305
|
});
|
|
6304
6306
|
pf.displayName = "Input";
|
|
6305
6307
|
function mt(e, t) {
|
|
@@ -6345,7 +6347,7 @@ export {
|
|
|
6345
6347
|
kf as M,
|
|
6346
6348
|
_f as N,
|
|
6347
6349
|
cd as O,
|
|
6348
|
-
|
|
6350
|
+
te as P,
|
|
6349
6351
|
us as Q,
|
|
6350
6352
|
vc as R,
|
|
6351
6353
|
Uf as S,
|
|
@@ -6379,7 +6381,7 @@ export {
|
|
|
6379
6381
|
Zf as f,
|
|
6380
6382
|
Xt as g,
|
|
6381
6383
|
$l as h,
|
|
6382
|
-
|
|
6384
|
+
ne as i,
|
|
6383
6385
|
Hl as j,
|
|
6384
6386
|
Dn as k,
|
|
6385
6387
|
qe as l,
|
|
@@ -6398,4 +6400,4 @@ export {
|
|
|
6398
6400
|
bu as y,
|
|
6399
6401
|
qu as z
|
|
6400
6402
|
};
|
|
6401
|
-
//# sourceMappingURL=index-
|
|
6403
|
+
//# sourceMappingURL=index-Dtbzjbl8.js.map
|