@1urso/generic-editor 0.1.8 → 0.1.9

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.
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from "react";
2
2
  import React, { Component, Fragment, PureComponent, createContext, createElement, forwardRef, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
3
3
  import * as ReactDOM$1 from "react-dom";
4
- import ReactDOM, { createPortal, flushSync } from "react-dom";
4
+ import ReactDOM, { flushSync } from "react-dom";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
6
  var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __esmMin = (s, d) => () => (s && (d = s(s = 0)), d), __commonJSMin = (s, d) => () => (d || s((d = { exports: {} }).exports, d), d.exports), __export = (s) => {
7
7
  let d = {};
@@ -253,7 +253,7 @@ function createCollection(s) {
253
253
  });
254
254
  });
255
255
  q.displayName = U;
256
- let J = s + "CollectionItemSlot", X = "data-radix-collection-item", $ = /* @__PURE__ */ createSlot(J), PD = React.forwardRef((s, C) => {
256
+ let J = s + "CollectionItemSlot", X = "data-radix-collection-item", $ = /* @__PURE__ */ createSlot(J), TO = React.forwardRef((s, C) => {
257
257
  let { scope: w, children: k, ...F } = s, V = React.useRef(null), U = useComposedRefs(C, V), K = L(J, w);
258
258
  return React.useEffect(() => (K.itemMap.set(V, {
259
259
  ref: V,
@@ -264,8 +264,8 @@ function createCollection(s) {
264
264
  children: k
265
265
  });
266
266
  });
267
- PD.displayName = J;
268
- function FD(C) {
267
+ TO.displayName = J;
268
+ function EO(C) {
269
269
  let w = L(s + "CollectionConsumer", C);
270
270
  return React.useCallback(() => {
271
271
  let s = w.collectionRef.current;
@@ -278,9 +278,9 @@ function createCollection(s) {
278
278
  {
279
279
  Provider: V,
280
280
  Slot: q,
281
- ItemSlot: PD
281
+ ItemSlot: TO
282
282
  },
283
- FD,
283
+ EO,
284
284
  k
285
285
  ];
286
286
  }
@@ -433,15 +433,15 @@ var DISMISSABLE_LAYER_NAME = "DismissableLayer", CONTEXT_UPDATE = "dismissableLa
433
433
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
434
434
  branches: /* @__PURE__ */ new Set()
435
435
  }), DismissableLayer = React$1.forwardRef((d, C) => {
436
- let { disableOutsidePointerEvents: w = !1, onEscapeKeyDown: k, onPointerDownOutside: F, onFocusOutside: L, onInteractOutside: V, onDismiss: U, ...K } = d, q = React$1.useContext(DismissableLayerContext), [J, X] = React$1.useState(null), $ = J?.ownerDocument ?? globalThis?.document, [, PD] = React$1.useState({}), FD = useComposedRefs(C, (s) => X(s)), ID = Array.from(q.layers), [LD] = [...q.layersWithOutsidePointerEventsDisabled].slice(-1), RD = ID.indexOf(LD), zD = J ? ID.indexOf(J) : -1, BD = q.layersWithOutsidePointerEventsDisabled.size > 0, VD = zD >= RD, HD = usePointerDownOutside((s) => {
436
+ let { disableOutsidePointerEvents: w = !1, onEscapeKeyDown: k, onPointerDownOutside: F, onFocusOutside: L, onInteractOutside: V, onDismiss: U, ...K } = d, q = React$1.useContext(DismissableLayerContext), [J, X] = React$1.useState(null), $ = J?.ownerDocument ?? globalThis?.document, [, TO] = React$1.useState({}), EO = useComposedRefs(C, (s) => X(s)), DO = Array.from(q.layers), [OO] = [...q.layersWithOutsidePointerEventsDisabled].slice(-1), kO = DO.indexOf(OO), AO = J ? DO.indexOf(J) : -1, jO = q.layersWithOutsidePointerEventsDisabled.size > 0, MO = AO >= kO, NO = usePointerDownOutside((s) => {
437
437
  let d = s.target, C = [...q.branches].some((s) => s.contains(d));
438
- !VD || C || (F?.(s), V?.(s), s.defaultPrevented || U?.());
439
- }, $), UD = useFocusOutside((s) => {
438
+ !MO || C || (F?.(s), V?.(s), s.defaultPrevented || U?.());
439
+ }, $), FO = useFocusOutside((s) => {
440
440
  let d = s.target;
441
441
  [...q.branches].some((s) => s.contains(d)) || (L?.(s), V?.(s), s.defaultPrevented || U?.());
442
442
  }, $);
443
443
  return useEscapeKeydown((s) => {
444
- zD === q.layers.size - 1 && (k?.(s), !s.defaultPrevented && U && (s.preventDefault(), U()));
444
+ AO === q.layers.size - 1 && (k?.(s), !s.defaultPrevented && U && (s.preventDefault(), U()));
445
445
  }, $), React$1.useEffect(() => {
446
446
  if (J) return w && (q.layersWithOutsidePointerEventsDisabled.size === 0 && (originalBodyPointerEvents = $.body.style.pointerEvents, $.body.style.pointerEvents = "none"), q.layersWithOutsidePointerEventsDisabled.add(J)), q.layers.add(J), dispatchUpdate(), () => {
447
447
  w && q.layersWithOutsidePointerEventsDisabled.size === 1 && ($.body.style.pointerEvents = originalBodyPointerEvents);
@@ -454,18 +454,18 @@ var DISMISSABLE_LAYER_NAME = "DismissableLayer", CONTEXT_UPDATE = "dismissableLa
454
454
  ]), React$1.useEffect(() => () => {
455
455
  J && (q.layers.delete(J), q.layersWithOutsidePointerEventsDisabled.delete(J), dispatchUpdate());
456
456
  }, [J, q]), React$1.useEffect(() => {
457
- let s = () => PD({});
457
+ let s = () => TO({});
458
458
  return document.addEventListener(CONTEXT_UPDATE, s), () => document.removeEventListener(CONTEXT_UPDATE, s);
459
459
  }, []), /* @__PURE__ */ jsx(Primitive.div, {
460
460
  ...K,
461
- ref: FD,
461
+ ref: EO,
462
462
  style: {
463
- pointerEvents: BD ? VD ? "auto" : "none" : void 0,
463
+ pointerEvents: jO ? MO ? "auto" : "none" : void 0,
464
464
  ...d.style
465
465
  },
466
- onFocusCapture: composeEventHandlers(d.onFocusCapture, UD.onFocusCapture),
467
- onBlurCapture: composeEventHandlers(d.onBlurCapture, UD.onBlurCapture),
468
- onPointerDownCapture: composeEventHandlers(d.onPointerDownCapture, HD.onPointerDownCapture)
466
+ onFocusCapture: composeEventHandlers(d.onFocusCapture, FO.onFocusCapture),
467
+ onBlurCapture: composeEventHandlers(d.onBlurCapture, FO.onBlurCapture),
468
+ onPointerDownCapture: composeEventHandlers(d.onPointerDownCapture, NO.onPointerDownCapture)
469
469
  });
470
470
  });
471
471
  DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
@@ -529,7 +529,7 @@ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount", AUTOFOCUS_ON_UNMOUNT = "
529
529
  bubbles: !1,
530
530
  cancelable: !0
531
531
  }, FOCUS_SCOPE_NAME = "FocusScope", FocusScope = React$1.forwardRef((d, C) => {
532
- let { loop: w = !1, trapped: k = !1, onMountAutoFocus: F, onUnmountAutoFocus: L, ...V } = d, [U, K] = React$1.useState(null), q = useCallbackRef(F), J = useCallbackRef(L), X = React$1.useRef(null), $ = useComposedRefs(C, (s) => K(s)), PD = React$1.useRef({
532
+ let { loop: w = !1, trapped: k = !1, onMountAutoFocus: F, onUnmountAutoFocus: L, ...V } = d, [U, K] = React$1.useState(null), q = useCallbackRef(F), J = useCallbackRef(L), X = React$1.useRef(null), $ = useComposedRefs(C, (s) => K(s)), TO = React$1.useRef({
533
533
  paused: !1,
534
534
  pause() {
535
535
  this.paused = !0;
@@ -541,11 +541,11 @@ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount", AUTOFOCUS_ON_UNMOUNT = "
541
541
  React$1.useEffect(() => {
542
542
  if (k) {
543
543
  let s = function(s) {
544
- if (PD.paused || !U) return;
544
+ if (TO.paused || !U) return;
545
545
  let d = s.target;
546
546
  U.contains(d) ? X.current = d : focus(X.current, { select: !0 });
547
547
  }, d = function(s) {
548
- if (PD.paused || !U) return;
548
+ if (TO.paused || !U) return;
549
549
  let d = s.relatedTarget;
550
550
  d !== null && (U.contains(d) || focus(X.current, { select: !0 }));
551
551
  }, C = function(s) {
@@ -563,10 +563,10 @@ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount", AUTOFOCUS_ON_UNMOUNT = "
563
563
  }, [
564
564
  k,
565
565
  U,
566
- PD.paused
566
+ TO.paused
567
567
  ]), React$1.useEffect(() => {
568
568
  if (U) {
569
- focusScopesStack.add(PD);
569
+ focusScopesStack.add(TO);
570
570
  let s = document.activeElement;
571
571
  if (!U.contains(s)) {
572
572
  let d = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS$1);
@@ -575,7 +575,7 @@ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount", AUTOFOCUS_ON_UNMOUNT = "
575
575
  return () => {
576
576
  U.removeEventListener(AUTOFOCUS_ON_MOUNT, q), setTimeout(() => {
577
577
  let d = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS$1);
578
- U.addEventListener(AUTOFOCUS_ON_UNMOUNT, J), U.dispatchEvent(d), d.defaultPrevented || focus(s ?? document.body, { select: !0 }), U.removeEventListener(AUTOFOCUS_ON_UNMOUNT, J), focusScopesStack.remove(PD);
578
+ U.addEventListener(AUTOFOCUS_ON_UNMOUNT, J), U.dispatchEvent(d), d.defaultPrevented || focus(s ?? document.body, { select: !0 }), U.removeEventListener(AUTOFOCUS_ON_UNMOUNT, J), focusScopesStack.remove(TO);
579
579
  }, 0);
580
580
  };
581
581
  }
@@ -583,10 +583,10 @@ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount", AUTOFOCUS_ON_UNMOUNT = "
583
583
  U,
584
584
  q,
585
585
  J,
586
- PD
586
+ TO
587
587
  ]);
588
- let FD = React$1.useCallback((s) => {
589
- if (!w && !k || PD.paused) return;
588
+ let EO = React$1.useCallback((s) => {
589
+ if (!w && !k || TO.paused) return;
590
590
  let d = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, C = document.activeElement;
591
591
  if (d && C) {
592
592
  let d = s.currentTarget, [k, F] = getTabbableEdges(d);
@@ -595,13 +595,13 @@ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount", AUTOFOCUS_ON_UNMOUNT = "
595
595
  }, [
596
596
  w,
597
597
  k,
598
- PD.paused
598
+ TO.paused
599
599
  ]);
600
600
  return /* @__PURE__ */ jsx(Primitive.div, {
601
601
  tabIndex: -1,
602
602
  ...V,
603
603
  ref: $,
604
- onKeyDown: FD
604
+ onKeyDown: EO
605
605
  });
606
606
  });
607
607
  FocusScope.displayName = FOCUS_SCOPE_NAME;
@@ -662,7 +662,7 @@ function arrayRemove(s, d) {
662
662
  function removeLinks(s) {
663
663
  return s.filter((s) => s.tagName !== "A");
664
664
  }
665
- var PORTAL_NAME$4 = "Portal", Portal = React$1.forwardRef((d, C) => {
665
+ var PORTAL_NAME$5 = "Portal", Portal = React$1.forwardRef((d, C) => {
666
666
  let { container: w, ...k } = d, [F, L] = React$1.useState(!1);
667
667
  useLayoutEffect2(() => L(!0), []);
668
668
  let V = w || F && globalThis?.document?.body;
@@ -671,7 +671,7 @@ var PORTAL_NAME$4 = "Portal", Portal = React$1.forwardRef((d, C) => {
671
671
  ref: C
672
672
  }), V) : null;
673
673
  });
674
- Portal.displayName = PORTAL_NAME$4;
674
+ Portal.displayName = PORTAL_NAME$5;
675
675
  var count = 0;
676
676
  function useFocusGuards() {
677
677
  React$1.useEffect(() => {
@@ -824,7 +824,7 @@ var effectCar = createSidecarMedium(), nothing = function() {}, RemoveScroll = R
824
824
  onScrollCapture: nothing,
825
825
  onWheelCapture: nothing,
826
826
  onTouchMoveCapture: nothing
827
- }), F = k[0], L = k[1], V = d.forwardProps, U = d.children, K = d.className, q = d.removeScrollBar, J = d.enabled, X = d.shards, $ = d.sideCar, PD = d.noRelative, FD = d.noIsolation, ID = d.inert, LD = d.allowPinchZoom, RD = d.as, zD = RD === void 0 ? "div" : RD, BD = d.gapMode, VD = __rest(d, [
827
+ }), F = k[0], L = k[1], V = d.forwardProps, U = d.children, K = d.className, q = d.removeScrollBar, J = d.enabled, X = d.shards, $ = d.sideCar, TO = d.noRelative, EO = d.noIsolation, DO = d.inert, OO = d.allowPinchZoom, kO = d.as, AO = kO === void 0 ? "div" : kO, jO = d.gapMode, MO = __rest(d, [
828
828
  "forwardProps",
829
829
  "children",
830
830
  "className",
@@ -838,21 +838,21 @@ var effectCar = createSidecarMedium(), nothing = function() {}, RemoveScroll = R
838
838
  "allowPinchZoom",
839
839
  "as",
840
840
  "gapMode"
841
- ]), HD = $, UD = useMergeRefs([w, C]), WD = __assign$2(__assign$2({}, VD), F);
842
- return React$1.createElement(React$1.Fragment, null, J && React$1.createElement(HD, {
841
+ ]), NO = $, PO = useMergeRefs([w, C]), FO = __assign$2(__assign$2({}, MO), F);
842
+ return React$1.createElement(React$1.Fragment, null, J && React$1.createElement(NO, {
843
843
  sideCar: effectCar,
844
844
  removeScrollBar: q,
845
845
  shards: X,
846
- noRelative: PD,
847
- noIsolation: FD,
848
- inert: ID,
846
+ noRelative: TO,
847
+ noIsolation: EO,
848
+ inert: DO,
849
849
  setCallbacks: L,
850
- allowPinchZoom: !!LD,
850
+ allowPinchZoom: !!OO,
851
851
  lockRef: w,
852
- gapMode: BD
853
- }), V ? React$1.cloneElement(React$1.Children.only(U), __assign$2(__assign$2({}, WD), { ref: UD })) : React$1.createElement(zD, __assign$2({}, WD, {
852
+ gapMode: jO
853
+ }), V ? React$1.cloneElement(React$1.Children.only(U), __assign$2(__assign$2({}, FO), { ref: PO })) : React$1.createElement(AO, __assign$2({}, FO, {
854
854
  className: K,
855
- ref: UD
855
+ ref: PO
856
856
  }), U));
857
857
  });
858
858
  RemoveScroll.defaultProps = {
@@ -1040,10 +1040,10 @@ var nonPassive = passiveSupported ? { passive: !1 } : !1, alwaysContainsScroll =
1040
1040
  var F = getDirectionFactor(s, window.getComputedStyle(d).direction), L = F * w, V = C.target, U = d.contains(V), K = !1, q = L > 0, J = 0, X = 0;
1041
1041
  do {
1042
1042
  if (!V) break;
1043
- var $ = getScrollVariables(s, V), PD = $[0], FD = $[1] - $[2] - F * PD;
1044
- (PD || FD) && elementCouldBeScrolled(s, V) && (J += FD, X += PD);
1045
- var ID = V.parentNode;
1046
- V = ID && ID.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? ID.host : ID;
1043
+ var $ = getScrollVariables(s, V), TO = $[0], EO = $[1] - $[2] - F * TO;
1044
+ (TO || EO) && elementCouldBeScrolled(s, V) && (J += EO, X += TO);
1045
+ var DO = V.parentNode;
1046
+ V = DO && DO.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? DO.host : DO;
1047
1047
  } while (!U && V !== document.body || U && (d.contains(V) || d === V));
1048
1048
  return (q && (k && Math.abs(J) < 1 || !k && L > J) || !q && (k && Math.abs(X) < 1 || !k && -L > X)) && (K = !0), K;
1049
1049
  }, getTouchXY = function(s) {
@@ -1087,12 +1087,12 @@ function RemoveScrollSideCar(d) {
1087
1087
  if ("touches" in s && J === "h" && q.type === "range") return !1;
1088
1088
  var X = window.getSelection(), $ = X && X.anchorNode;
1089
1089
  if ($ && ($ === q || $.contains(q))) return !1;
1090
- var PD = locationCouldBeScrolled(J, q);
1091
- if (!PD) return !0;
1092
- if (PD ? K = J : (K = J === "v" ? "h" : "v", PD = locationCouldBeScrolled(J, q)), !PD) return !1;
1090
+ var TO = locationCouldBeScrolled(J, q);
1091
+ if (!TO) return !0;
1092
+ if (TO ? K = J : (K = J === "v" ? "h" : "v", TO = locationCouldBeScrolled(J, q)), !TO) return !1;
1093
1093
  if (!k.current && "changedTouches" in s && (L || U) && (k.current = K), !K) return !0;
1094
- var FD = k.current || K;
1095
- return handleScroll(FD, d, s, FD === "h" ? L : U, !0);
1094
+ var EO = k.current || K;
1095
+ return handleScroll(EO, d, s, EO === "h" ? L : U, !0);
1096
1096
  }, []), K = React$1.useCallback(function(s) {
1097
1097
  var d = s;
1098
1098
  if (!(!lockStack.length || lockStack[lockStack.length - 1] !== L)) {
@@ -1141,8 +1141,8 @@ function RemoveScrollSideCar(d) {
1141
1141
  }), document.removeEventListener("wheel", K, nonPassive), document.removeEventListener("touchmove", K, nonPassive), document.removeEventListener("touchstart", J, nonPassive);
1142
1142
  };
1143
1143
  }, []);
1144
- var PD = d.removeScrollBar, FD = d.inert;
1145
- return React$1.createElement(React$1.Fragment, null, FD ? React$1.createElement(L, { styles: generateStyle(F) }) : null, PD ? React$1.createElement(RemoveScrollBar, {
1144
+ var TO = d.removeScrollBar, EO = d.inert;
1145
+ return React$1.createElement(React$1.Fragment, null, EO ? React$1.createElement(L, { styles: generateStyle(F) }) : null, TO ? React$1.createElement(RemoveScrollBar, {
1146
1146
  noRelative: d.noRelative,
1147
1147
  gapMode: d.gapMode
1148
1148
  }) : null);
@@ -1222,8 +1222,8 @@ var Combination_default = ReactRemoveScroll, getDefaultParent = function(s) {
1222
1222
  });
1223
1223
  };
1224
1224
  Dialog.displayName = DIALOG_NAME;
1225
- var TRIGGER_NAME$2 = "DialogTrigger", DialogTrigger = React$1.forwardRef((s, d) => {
1226
- let { __scopeDialog: C, ...w } = s, k = useDialogContext(TRIGGER_NAME$2, C), F = useComposedRefs(d, k.triggerRef);
1225
+ var TRIGGER_NAME$3 = "DialogTrigger", DialogTrigger = React$1.forwardRef((s, d) => {
1226
+ let { __scopeDialog: C, ...w } = s, k = useDialogContext(TRIGGER_NAME$3, C), F = useComposedRefs(d, k.triggerRef);
1227
1227
  return /* @__PURE__ */ jsx(Primitive.button, {
1228
1228
  type: "button",
1229
1229
  "aria-haspopup": "dialog",
@@ -1235,9 +1235,9 @@ var TRIGGER_NAME$2 = "DialogTrigger", DialogTrigger = React$1.forwardRef((s, d)
1235
1235
  onClick: composeEventHandlers(s.onClick, k.onOpenToggle)
1236
1236
  });
1237
1237
  });
1238
- DialogTrigger.displayName = TRIGGER_NAME$2;
1239
- var PORTAL_NAME$3 = "DialogPortal", [PortalProvider$2, usePortalContext$2] = createDialogContext(PORTAL_NAME$3, { forceMount: void 0 }), DialogPortal = (d) => {
1240
- let { __scopeDialog: C, forceMount: w, children: k, container: F } = d, L = useDialogContext(PORTAL_NAME$3, C);
1238
+ DialogTrigger.displayName = TRIGGER_NAME$3;
1239
+ var PORTAL_NAME$4 = "DialogPortal", [PortalProvider$2, usePortalContext$2] = createDialogContext(PORTAL_NAME$4, { forceMount: void 0 }), DialogPortal = (d) => {
1240
+ let { __scopeDialog: C, forceMount: w, children: k, container: F } = d, L = useDialogContext(PORTAL_NAME$4, C);
1241
1241
  return /* @__PURE__ */ jsx(PortalProvider$2, {
1242
1242
  scope: C,
1243
1243
  forceMount: w,
@@ -1251,7 +1251,7 @@ var PORTAL_NAME$3 = "DialogPortal", [PortalProvider$2, usePortalContext$2] = cre
1251
1251
  }))
1252
1252
  });
1253
1253
  };
1254
- DialogPortal.displayName = PORTAL_NAME$3;
1254
+ DialogPortal.displayName = PORTAL_NAME$4;
1255
1255
  var OVERLAY_NAME = "DialogOverlay", DialogOverlay = React$1.forwardRef((s, d) => {
1256
1256
  let C = usePortalContext$2(OVERLAY_NAME, s.__scopeDialog), { forceMount: w = C.forceMount, ...k } = s, F = useDialogContext(OVERLAY_NAME, s.__scopeDialog);
1257
1257
  return F.modal ? /* @__PURE__ */ jsx(Presence, {
@@ -1279,8 +1279,8 @@ var Slot$1 = /* @__PURE__ */ createSlot("DialogOverlay.RemoveScroll"), DialogOve
1279
1279
  }
1280
1280
  })
1281
1281
  });
1282
- }), CONTENT_NAME$4 = "DialogContent", DialogContent = React$1.forwardRef((s, d) => {
1283
- let C = usePortalContext$2(CONTENT_NAME$4, s.__scopeDialog), { forceMount: w = C.forceMount, ...k } = s, F = useDialogContext(CONTENT_NAME$4, s.__scopeDialog);
1282
+ }), CONTENT_NAME$5 = "DialogContent", DialogContent = React$1.forwardRef((s, d) => {
1283
+ let C = usePortalContext$2(CONTENT_NAME$5, s.__scopeDialog), { forceMount: w = C.forceMount, ...k } = s, F = useDialogContext(CONTENT_NAME$5, s.__scopeDialog);
1284
1284
  return /* @__PURE__ */ jsx(Presence, {
1285
1285
  present: w || F.open,
1286
1286
  children: F.modal ? /* @__PURE__ */ jsx(DialogContentModal, {
@@ -1292,9 +1292,9 @@ var Slot$1 = /* @__PURE__ */ createSlot("DialogOverlay.RemoveScroll"), DialogOve
1292
1292
  })
1293
1293
  });
1294
1294
  });
1295
- DialogContent.displayName = CONTENT_NAME$4;
1295
+ DialogContent.displayName = CONTENT_NAME$5;
1296
1296
  var DialogContentModal = React$1.forwardRef((d, C) => {
1297
- let w = useDialogContext(CONTENT_NAME$4, d.__scopeDialog), k = React$1.useRef(null), F = useComposedRefs(C, w.contentRef, k);
1297
+ let w = useDialogContext(CONTENT_NAME$5, d.__scopeDialog), k = React$1.useRef(null), F = useComposedRefs(C, w.contentRef, k);
1298
1298
  return React$1.useEffect(() => {
1299
1299
  let s = k.current;
1300
1300
  if (s) return hideOthers(s);
@@ -1313,7 +1313,7 @@ var DialogContentModal = React$1.forwardRef((d, C) => {
1313
1313
  onFocusOutside: composeEventHandlers(d.onFocusOutside, (s) => s.preventDefault())
1314
1314
  });
1315
1315
  }), DialogContentNonModal = React$1.forwardRef((d, C) => {
1316
- let w = useDialogContext(CONTENT_NAME$4, d.__scopeDialog), k = React$1.useRef(!1), F = React$1.useRef(!1);
1316
+ let w = useDialogContext(CONTENT_NAME$5, d.__scopeDialog), k = React$1.useRef(!1), F = React$1.useRef(!1);
1317
1317
  return /* @__PURE__ */ jsx(DialogContentImpl, {
1318
1318
  ...d,
1319
1319
  ref: C,
@@ -1329,7 +1329,7 @@ var DialogContentModal = React$1.forwardRef((d, C) => {
1329
1329
  }
1330
1330
  });
1331
1331
  }), DialogContentImpl = React$1.forwardRef((d, C) => {
1332
- let { __scopeDialog: w, trapFocus: k, onOpenAutoFocus: F, onCloseAutoFocus: L, ...V } = d, U = useDialogContext(CONTENT_NAME$4, w), K = React$1.useRef(null), q = useComposedRefs(C, K);
1332
+ let { __scopeDialog: w, trapFocus: k, onOpenAutoFocus: F, onCloseAutoFocus: L, ...V } = d, U = useDialogContext(CONTENT_NAME$5, w), K = React$1.useRef(null), q = useComposedRefs(C, K);
1333
1333
  return useFocusGuards(), /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(FocusScope, {
1334
1334
  asChild: !0,
1335
1335
  loop: !0,
@@ -1382,7 +1382,7 @@ function getState(s) {
1382
1382
  return s ? "open" : "closed";
1383
1383
  }
1384
1384
  var TITLE_WARNING_NAME = "DialogTitleWarning", [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
1385
- contentName: CONTENT_NAME$4,
1385
+ contentName: CONTENT_NAME$5,
1386
1386
  titleName: TITLE_NAME,
1387
1387
  docsSlug: "dialog"
1388
1388
  }), TitleWarning = ({ titleId: d }) => {
@@ -1404,7 +1404,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${C.do
1404
1404
  d,
1405
1405
  C
1406
1406
  ]), null;
1407
- }, Root$3 = Dialog, Trigger$1 = DialogTrigger, Portal$2 = DialogPortal, Overlay = DialogOverlay, Content$1 = DialogContent, Title = DialogTitle, Description = DialogDescription, Close = DialogClose;
1407
+ }, Root$3 = Dialog, Trigger$2 = DialogTrigger, Portal$2 = DialogPortal, Overlay = DialogOverlay, Content$1 = DialogContent, Title = DialogTitle, Description = DialogDescription, Close = DialogClose;
1408
1408
  function useSize(d) {
1409
1409
  let [C, w] = React$1.useState(void 0);
1410
1410
  return useLayoutEffect2(() => {
@@ -1581,9 +1581,9 @@ var computePosition$1 = async (s, d, C) => {
1581
1581
  reference: s,
1582
1582
  floating: d,
1583
1583
  strategy: k
1584
- }), { x: q, y: J } = computeCoordsFromPlacement(K, w, U), X = w, $ = {}, PD = 0;
1584
+ }), { x: q, y: J } = computeCoordsFromPlacement(K, w, U), X = w, $ = {}, TO = 0;
1585
1585
  for (let C = 0; C < V.length; C++) {
1586
- let { name: F, fn: FD } = V[C], { x: ID, y: LD, data: RD, reset: zD } = await FD({
1586
+ let { name: F, fn: EO } = V[C], { x: DO, y: OO, data: kO, reset: AO } = await EO({
1587
1587
  x: q,
1588
1588
  y: J,
1589
1589
  initialPlacement: w,
@@ -1597,17 +1597,17 @@ var computePosition$1 = async (s, d, C) => {
1597
1597
  floating: d
1598
1598
  }
1599
1599
  });
1600
- q = ID ?? q, J = LD ?? J, $ = {
1600
+ q = DO ?? q, J = OO ?? J, $ = {
1601
1601
  ...$,
1602
1602
  [F]: {
1603
1603
  ...$[F],
1604
- ...RD
1604
+ ...kO
1605
1605
  }
1606
- }, zD && PD <= 50 && (PD++, typeof zD == "object" && (zD.placement && (X = zD.placement), zD.rects && (K = zD.rects === !0 ? await L.getElementRects({
1606
+ }, AO && TO <= 50 && (TO++, typeof AO == "object" && (AO.placement && (X = AO.placement), AO.rects && (K = AO.rects === !0 ? await L.getElementRects({
1607
1607
  reference: s,
1608
1608
  floating: d,
1609
1609
  strategy: k
1610
- }) : zD.rects), {x: q, y: J} = computeCoordsFromPlacement(K, X, U)), C = -1);
1610
+ }) : AO.rects), {x: q, y: J} = computeCoordsFromPlacement(K, X, U)), C = -1);
1611
1611
  }
1612
1612
  return {
1613
1613
  x: q,
@@ -1619,30 +1619,30 @@ var computePosition$1 = async (s, d, C) => {
1619
1619
  };
1620
1620
  async function detectOverflow$1(s, d) {
1621
1621
  d === void 0 && (d = {});
1622
- let { x: C, y: w, platform: k, rects: F, elements: L, strategy: V } = s, { boundary: U = "clippingAncestors", rootBoundary: K = "viewport", elementContext: q = "floating", altBoundary: J = !1, padding: X = 0 } = evaluate(d, s), $ = getPaddingObject(X), PD = L[J ? q === "floating" ? "reference" : "floating" : q], FD = rectToClientRect(await k.getClippingRect({
1623
- element: await (k.isElement == null ? void 0 : k.isElement(PD)) ?? !0 ? PD : PD.contextElement || await (k.getDocumentElement == null ? void 0 : k.getDocumentElement(L.floating)),
1622
+ let { x: C, y: w, platform: k, rects: F, elements: L, strategy: V } = s, { boundary: U = "clippingAncestors", rootBoundary: K = "viewport", elementContext: q = "floating", altBoundary: J = !1, padding: X = 0 } = evaluate(d, s), $ = getPaddingObject(X), TO = L[J ? q === "floating" ? "reference" : "floating" : q], EO = rectToClientRect(await k.getClippingRect({
1623
+ element: await (k.isElement == null ? void 0 : k.isElement(TO)) ?? !0 ? TO : TO.contextElement || await (k.getDocumentElement == null ? void 0 : k.getDocumentElement(L.floating)),
1624
1624
  boundary: U,
1625
1625
  rootBoundary: K,
1626
1626
  strategy: V
1627
- })), ID = q === "floating" ? {
1627
+ })), DO = q === "floating" ? {
1628
1628
  x: C,
1629
1629
  y: w,
1630
1630
  width: F.floating.width,
1631
1631
  height: F.floating.height
1632
- } : F.reference, LD = await (k.getOffsetParent == null ? void 0 : k.getOffsetParent(L.floating)), RD = await (k.isElement == null ? void 0 : k.isElement(LD)) && await (k.getScale == null ? void 0 : k.getScale(LD)) || {
1632
+ } : F.reference, OO = await (k.getOffsetParent == null ? void 0 : k.getOffsetParent(L.floating)), kO = await (k.isElement == null ? void 0 : k.isElement(OO)) && await (k.getScale == null ? void 0 : k.getScale(OO)) || {
1633
1633
  x: 1,
1634
1634
  y: 1
1635
- }, zD = rectToClientRect(k.convertOffsetParentRelativeRectToViewportRelativeRect ? await k.convertOffsetParentRelativeRectToViewportRelativeRect({
1635
+ }, AO = rectToClientRect(k.convertOffsetParentRelativeRectToViewportRelativeRect ? await k.convertOffsetParentRelativeRectToViewportRelativeRect({
1636
1636
  elements: L,
1637
- rect: ID,
1638
- offsetParent: LD,
1637
+ rect: DO,
1638
+ offsetParent: OO,
1639
1639
  strategy: V
1640
- }) : ID);
1640
+ }) : DO);
1641
1641
  return {
1642
- top: (FD.top - zD.top + $.top) / RD.y,
1643
- bottom: (zD.bottom - FD.bottom + $.bottom) / RD.y,
1644
- left: (FD.left - zD.left + $.left) / RD.x,
1645
- right: (zD.right - FD.right + $.right) / RD.x
1642
+ top: (EO.top - AO.top + $.top) / kO.y,
1643
+ bottom: (AO.bottom - EO.bottom + $.bottom) / kO.y,
1644
+ left: (EO.left - AO.left + $.left) / kO.x,
1645
+ right: (AO.right - EO.right + $.right) / kO.x
1646
1646
  };
1647
1647
  }
1648
1648
  var arrow$2 = (s) => ({
@@ -1654,17 +1654,17 @@ var arrow$2 = (s) => ({
1654
1654
  let J = getPaddingObject(q), X = {
1655
1655
  x: C,
1656
1656
  y: w
1657
- }, $ = getAlignmentAxis(k), PD = getAxisLength($), FD = await L.getDimensions(K), ID = $ === "y", LD = ID ? "top" : "left", RD = ID ? "bottom" : "right", zD = ID ? "clientHeight" : "clientWidth", BD = F.reference[PD] + F.reference[$] - X[$] - F.floating[PD], VD = X[$] - F.reference[$], HD = await (L.getOffsetParent == null ? void 0 : L.getOffsetParent(K)), UD = HD ? HD[zD] : 0;
1658
- (!UD || !await (L.isElement == null ? void 0 : L.isElement(HD))) && (UD = V.floating[zD] || F.floating[PD]);
1659
- let WD = BD / 2 - VD / 2, GD = UD / 2 - FD[PD] / 2 - 1, KD = min(J[LD], GD), qD = min(J[RD], GD), JD = KD, YD = UD - FD[PD] - qD, XD = UD / 2 - FD[PD] / 2 + WD, ZD = clamp$3(JD, XD, YD), QD = !U.arrow && getAlignment(k) != null && XD !== ZD && F.reference[PD] / 2 - (XD < JD ? KD : qD) - FD[PD] / 2 < 0, $D = QD ? XD < JD ? XD - JD : XD - YD : 0;
1657
+ }, $ = getAlignmentAxis(k), TO = getAxisLength($), EO = await L.getDimensions(K), DO = $ === "y", OO = DO ? "top" : "left", kO = DO ? "bottom" : "right", AO = DO ? "clientHeight" : "clientWidth", jO = F.reference[TO] + F.reference[$] - X[$] - F.floating[TO], MO = X[$] - F.reference[$], NO = await (L.getOffsetParent == null ? void 0 : L.getOffsetParent(K)), PO = NO ? NO[AO] : 0;
1658
+ (!PO || !await (L.isElement == null ? void 0 : L.isElement(NO))) && (PO = V.floating[AO] || F.floating[TO]);
1659
+ let FO = jO / 2 - MO / 2, IO = PO / 2 - EO[TO] / 2 - 1, LO = min(J[OO], IO), RO = min(J[kO], IO), zO = LO, BO = PO - EO[TO] - RO, VO = PO / 2 - EO[TO] / 2 + FO, HO = clamp$3(zO, VO, BO), UO = !U.arrow && getAlignment(k) != null && VO !== HO && F.reference[TO] / 2 - (VO < zO ? LO : RO) - EO[TO] / 2 < 0, WO = UO ? VO < zO ? VO - zO : VO - BO : 0;
1660
1660
  return {
1661
- [$]: X[$] + $D,
1661
+ [$]: X[$] + WO,
1662
1662
  data: {
1663
- [$]: ZD,
1664
- centerOffset: XD - ZD - $D,
1665
- ...QD && { alignmentOffset: $D }
1663
+ [$]: HO,
1664
+ centerOffset: VO - HO - WO,
1665
+ ...UO && { alignmentOffset: WO }
1666
1666
  },
1667
- reset: QD
1667
+ reset: UO
1668
1668
  };
1669
1669
  }
1670
1670
  }), flip$2 = function(s) {
@@ -1673,34 +1673,34 @@ var arrow$2 = (s) => ({
1673
1673
  options: s,
1674
1674
  async fn(d) {
1675
1675
  var C;
1676
- let { placement: w, middlewareData: k, rects: F, initialPlacement: L, platform: V, elements: U } = d, { mainAxis: K = !0, crossAxis: q = !0, fallbackPlacements: J, fallbackStrategy: X = "bestFit", fallbackAxisSideDirection: $ = "none", flipAlignment: PD = !0, ...FD } = evaluate(s, d);
1676
+ let { placement: w, middlewareData: k, rects: F, initialPlacement: L, platform: V, elements: U } = d, { mainAxis: K = !0, crossAxis: q = !0, fallbackPlacements: J, fallbackStrategy: X = "bestFit", fallbackAxisSideDirection: $ = "none", flipAlignment: TO = !0, ...EO } = evaluate(s, d);
1677
1677
  if ((C = k.arrow) != null && C.alignmentOffset) return {};
1678
- let ID = getSide(w), LD = getSideAxis(L), RD = getSide(L) === L, zD = await (V.isRTL == null ? void 0 : V.isRTL(U.floating)), BD = J || (RD || !PD ? [getOppositePlacement(L)] : getExpandedPlacements(L)), VD = $ !== "none";
1679
- !J && VD && BD.push(...getOppositeAxisPlacements(L, PD, $, zD));
1680
- let HD = [L, ...BD], UD = await detectOverflow$1(d, FD), WD = [], GD = k.flip?.overflows || [];
1681
- if (K && WD.push(UD[ID]), q) {
1682
- let s = getAlignmentSides(w, F, zD);
1683
- WD.push(UD[s[0]], UD[s[1]]);
1678
+ let DO = getSide(w), OO = getSideAxis(L), kO = getSide(L) === L, AO = await (V.isRTL == null ? void 0 : V.isRTL(U.floating)), jO = J || (kO || !TO ? [getOppositePlacement(L)] : getExpandedPlacements(L)), MO = $ !== "none";
1679
+ !J && MO && jO.push(...getOppositeAxisPlacements(L, TO, $, AO));
1680
+ let NO = [L, ...jO], PO = await detectOverflow$1(d, EO), FO = [], IO = k.flip?.overflows || [];
1681
+ if (K && FO.push(PO[DO]), q) {
1682
+ let s = getAlignmentSides(w, F, AO);
1683
+ FO.push(PO[s[0]], PO[s[1]]);
1684
1684
  }
1685
- if (GD = [...GD, {
1685
+ if (IO = [...IO, {
1686
1686
  placement: w,
1687
- overflows: WD
1688
- }], !WD.every((s) => s <= 0)) {
1689
- let s = (k.flip?.index || 0) + 1, d = HD[s];
1690
- if (d && (!(q === "alignment" && LD !== getSideAxis(d)) || GD.every((s) => getSideAxis(s.placement) === LD ? s.overflows[0] > 0 : !0))) return {
1687
+ overflows: FO
1688
+ }], !FO.every((s) => s <= 0)) {
1689
+ let s = (k.flip?.index || 0) + 1, d = NO[s];
1690
+ if (d && (!(q === "alignment" && OO !== getSideAxis(d)) || IO.every((s) => getSideAxis(s.placement) === OO ? s.overflows[0] > 0 : !0))) return {
1691
1691
  data: {
1692
1692
  index: s,
1693
- overflows: GD
1693
+ overflows: IO
1694
1694
  },
1695
1695
  reset: { placement: d }
1696
1696
  };
1697
- let C = GD.filter((s) => s.overflows[0] <= 0).sort((s, d) => s.overflows[1] - d.overflows[1])[0]?.placement;
1697
+ let C = IO.filter((s) => s.overflows[0] <= 0).sort((s, d) => s.overflows[1] - d.overflows[1])[0]?.placement;
1698
1698
  if (!C) switch (X) {
1699
1699
  case "bestFit": {
1700
- let s = GD.filter((s) => {
1701
- if (VD) {
1700
+ let s = IO.filter((s) => {
1701
+ if (MO) {
1702
1702
  let d = getSideAxis(s.placement);
1703
- return d === LD || d === "y";
1703
+ return d === OO || d === "y";
1704
1704
  }
1705
1705
  return !0;
1706
1706
  }).map((s) => [s.placement, s.overflows.filter((s) => s > 0).reduce((s, d) => s + d, 0)]).sort((s, d) => s[1] - d[1])[0]?.[0];
@@ -1761,7 +1761,7 @@ var hide$2 = function(s) {
1761
1761
  };
1762
1762
  }, originSides = /* @__PURE__ */ new Set(["left", "top"]);
1763
1763
  async function convertValueToCoords(s, d) {
1764
- let { placement: C, platform: w, elements: k } = s, F = await (w.isRTL == null ? void 0 : w.isRTL(k.floating)), L = getSide(C), V = getAlignment(C), U = getSideAxis(C) === "y", K = originSides.has(L) ? -1 : 1, q = F && U ? -1 : 1, J = evaluate(d, s), { mainAxis: X, crossAxis: $, alignmentAxis: PD } = typeof J == "number" ? {
1764
+ let { placement: C, platform: w, elements: k } = s, F = await (w.isRTL == null ? void 0 : w.isRTL(k.floating)), L = getSide(C), V = getAlignment(C), U = getSideAxis(C) === "y", K = originSides.has(L) ? -1 : 1, q = F && U ? -1 : 1, J = evaluate(d, s), { mainAxis: X, crossAxis: $, alignmentAxis: TO } = typeof J == "number" ? {
1765
1765
  mainAxis: J,
1766
1766
  crossAxis: 0,
1767
1767
  alignmentAxis: null
@@ -1770,7 +1770,7 @@ async function convertValueToCoords(s, d) {
1770
1770
  crossAxis: J.crossAxis || 0,
1771
1771
  alignmentAxis: J.alignmentAxis
1772
1772
  };
1773
- return V && typeof PD == "number" && ($ = V === "end" ? PD * -1 : PD), U ? {
1773
+ return V && typeof TO == "number" && ($ = V === "end" ? TO * -1 : TO), U ? {
1774
1774
  x: $ * q,
1775
1775
  y: X * K
1776
1776
  } : {
@@ -1809,25 +1809,25 @@ var offset$2 = function(s) {
1809
1809
  } }, ...U } = evaluate(s, d), K = {
1810
1810
  x: C,
1811
1811
  y: w
1812
- }, q = await detectOverflow$1(d, U), J = getSideAxis(getSide(k)), X = getOppositeAxis(J), $ = K[X], PD = K[J];
1812
+ }, q = await detectOverflow$1(d, U), J = getSideAxis(getSide(k)), X = getOppositeAxis(J), $ = K[X], TO = K[J];
1813
1813
  if (F) {
1814
1814
  let s = X === "y" ? "top" : "left", d = X === "y" ? "bottom" : "right", C = $ + q[s], w = $ - q[d];
1815
1815
  $ = clamp$3(C, $, w);
1816
1816
  }
1817
1817
  if (L) {
1818
- let s = J === "y" ? "top" : "left", d = J === "y" ? "bottom" : "right", C = PD + q[s], w = PD - q[d];
1819
- PD = clamp$3(C, PD, w);
1818
+ let s = J === "y" ? "top" : "left", d = J === "y" ? "bottom" : "right", C = TO + q[s], w = TO - q[d];
1819
+ TO = clamp$3(C, TO, w);
1820
1820
  }
1821
- let FD = V.fn({
1821
+ let EO = V.fn({
1822
1822
  ...d,
1823
1823
  [X]: $,
1824
- [J]: PD
1824
+ [J]: TO
1825
1825
  });
1826
1826
  return {
1827
- ...FD,
1827
+ ...EO,
1828
1828
  data: {
1829
- x: FD.x - C,
1830
- y: FD.y - w,
1829
+ x: EO.x - C,
1830
+ y: EO.y - w,
1831
1831
  enabled: {
1832
1832
  [X]: F,
1833
1833
  [J]: L
@@ -1843,25 +1843,25 @@ var offset$2 = function(s) {
1843
1843
  let { x: C, y: w, placement: k, rects: F, middlewareData: L } = d, { offset: V = 0, mainAxis: U = !0, crossAxis: K = !0 } = evaluate(s, d), q = {
1844
1844
  x: C,
1845
1845
  y: w
1846
- }, J = getSideAxis(k), X = getOppositeAxis(J), $ = q[X], PD = q[J], FD = evaluate(V, d), ID = typeof FD == "number" ? {
1847
- mainAxis: FD,
1846
+ }, J = getSideAxis(k), X = getOppositeAxis(J), $ = q[X], TO = q[J], EO = evaluate(V, d), DO = typeof EO == "number" ? {
1847
+ mainAxis: EO,
1848
1848
  crossAxis: 0
1849
1849
  } : {
1850
1850
  mainAxis: 0,
1851
1851
  crossAxis: 0,
1852
- ...FD
1852
+ ...EO
1853
1853
  };
1854
1854
  if (U) {
1855
- let s = X === "y" ? "height" : "width", d = F.reference[X] - F.floating[s] + ID.mainAxis, C = F.reference[X] + F.reference[s] - ID.mainAxis;
1855
+ let s = X === "y" ? "height" : "width", d = F.reference[X] - F.floating[s] + DO.mainAxis, C = F.reference[X] + F.reference[s] - DO.mainAxis;
1856
1856
  $ < d ? $ = d : $ > C && ($ = C);
1857
1857
  }
1858
1858
  if (K) {
1859
- let s = X === "y" ? "width" : "height", d = originSides.has(getSide(k)), C = F.reference[J] - F.floating[s] + (d && L.offset?.[J] || 0) + (d ? 0 : ID.crossAxis), w = F.reference[J] + F.reference[s] + (d ? 0 : L.offset?.[J] || 0) - (d ? ID.crossAxis : 0);
1860
- PD < C ? PD = C : PD > w && (PD = w);
1859
+ let s = X === "y" ? "width" : "height", d = originSides.has(getSide(k)), C = F.reference[J] - F.floating[s] + (d && L.offset?.[J] || 0) + (d ? 0 : DO.crossAxis), w = F.reference[J] + F.reference[s] + (d ? 0 : L.offset?.[J] || 0) - (d ? DO.crossAxis : 0);
1860
+ TO < C ? TO = C : TO > w && (TO = w);
1861
1861
  }
1862
1862
  return {
1863
1863
  [X]: $,
1864
- [J]: PD
1864
+ [J]: TO
1865
1865
  };
1866
1866
  }
1867
1867
  };
@@ -1871,20 +1871,20 @@ var offset$2 = function(s) {
1871
1871
  options: s,
1872
1872
  async fn(d) {
1873
1873
  var C, w;
1874
- let { placement: k, rects: F, platform: L, elements: V } = d, { apply: U = () => {}, ...K } = evaluate(s, d), q = await detectOverflow$1(d, K), J = getSide(k), X = getAlignment(k), $ = getSideAxis(k) === "y", { width: PD, height: FD } = F.floating, ID, LD;
1875
- J === "top" || J === "bottom" ? (ID = J, LD = X === (await (L.isRTL == null ? void 0 : L.isRTL(V.floating)) ? "start" : "end") ? "left" : "right") : (LD = J, ID = X === "end" ? "top" : "bottom");
1876
- let RD = FD - q.top - q.bottom, zD = PD - q.left - q.right, BD = min(FD - q[ID], RD), VD = min(PD - q[LD], zD), HD = !d.middlewareData.shift, UD = BD, WD = VD;
1877
- if ((C = d.middlewareData.shift) != null && C.enabled.x && (WD = zD), (w = d.middlewareData.shift) != null && w.enabled.y && (UD = RD), HD && !X) {
1874
+ let { placement: k, rects: F, platform: L, elements: V } = d, { apply: U = () => {}, ...K } = evaluate(s, d), q = await detectOverflow$1(d, K), J = getSide(k), X = getAlignment(k), $ = getSideAxis(k) === "y", { width: TO, height: EO } = F.floating, DO, OO;
1875
+ J === "top" || J === "bottom" ? (DO = J, OO = X === (await (L.isRTL == null ? void 0 : L.isRTL(V.floating)) ? "start" : "end") ? "left" : "right") : (OO = J, DO = X === "end" ? "top" : "bottom");
1876
+ let kO = EO - q.top - q.bottom, AO = TO - q.left - q.right, jO = min(EO - q[DO], kO), MO = min(TO - q[OO], AO), NO = !d.middlewareData.shift, PO = jO, FO = MO;
1877
+ if ((C = d.middlewareData.shift) != null && C.enabled.x && (FO = AO), (w = d.middlewareData.shift) != null && w.enabled.y && (PO = kO), NO && !X) {
1878
1878
  let s = max(q.left, 0), d = max(q.right, 0), C = max(q.top, 0), w = max(q.bottom, 0);
1879
- $ ? WD = PD - 2 * (s !== 0 || d !== 0 ? s + d : max(q.left, q.right)) : UD = FD - 2 * (C !== 0 || w !== 0 ? C + w : max(q.top, q.bottom));
1879
+ $ ? FO = TO - 2 * (s !== 0 || d !== 0 ? s + d : max(q.left, q.right)) : PO = EO - 2 * (C !== 0 || w !== 0 ? C + w : max(q.top, q.bottom));
1880
1880
  }
1881
1881
  await U({
1882
1882
  ...d,
1883
- availableWidth: WD,
1884
- availableHeight: UD
1883
+ availableWidth: FO,
1884
+ availableHeight: PO
1885
1885
  });
1886
- let GD = await L.getDimensions(V.floating);
1887
- return PD !== GD.width || FD !== GD.height ? { reset: { rects: !0 } } : {};
1886
+ let IO = await L.getDimensions(V.floating);
1887
+ return TO !== IO.width || EO !== IO.height ? { reset: { rects: !0 } } : {};
1888
1888
  }
1889
1889
  };
1890
1890
  };
@@ -2268,27 +2268,27 @@ function observeMove(s, d) {
2268
2268
  V === void 0 && (V = !1), U === void 0 && (U = 1), F();
2269
2269
  let K = s.getBoundingClientRect(), { left: q, top: J, width: X, height: $ } = K;
2270
2270
  if (V || d(), !X || !$) return;
2271
- let PD = floor(J), FD = floor(k.clientWidth - (q + X)), ID = floor(k.clientHeight - (J + $)), LD = floor(q), RD = {
2272
- rootMargin: -PD + "px " + -FD + "px " + -ID + "px " + -LD + "px",
2271
+ let TO = floor(J), EO = floor(k.clientWidth - (q + X)), DO = floor(k.clientHeight - (J + $)), OO = floor(q), kO = {
2272
+ rootMargin: -TO + "px " + -EO + "px " + -DO + "px " + -OO + "px",
2273
2273
  threshold: max(0, min(1, U)) || 1
2274
- }, zD = !0;
2275
- function BD(d) {
2274
+ }, AO = !0;
2275
+ function jO(d) {
2276
2276
  let C = d[0].intersectionRatio;
2277
2277
  if (C !== U) {
2278
- if (!zD) return L();
2278
+ if (!AO) return L();
2279
2279
  C ? L(!1, C) : w = setTimeout(() => {
2280
2280
  L(!1, 1e-7);
2281
2281
  }, 1e3);
2282
2282
  }
2283
- C === 1 && !rectsAreEqual(K, s.getBoundingClientRect()) && L(), zD = !1;
2283
+ C === 1 && !rectsAreEqual(K, s.getBoundingClientRect()) && L(), AO = !1;
2284
2284
  }
2285
2285
  try {
2286
- C = new IntersectionObserver(BD, {
2287
- ...RD,
2286
+ C = new IntersectionObserver(jO, {
2287
+ ...kO,
2288
2288
  root: k.ownerDocument
2289
2289
  });
2290
2290
  } catch {
2291
- C = new IntersectionObserver(BD, RD);
2291
+ C = new IntersectionObserver(jO, kO);
2292
2292
  }
2293
2293
  C.observe(s);
2294
2294
  }
@@ -2308,17 +2308,17 @@ function autoUpdate(s, d, C, w) {
2308
2308
  (s = $) == null || s.observe(d);
2309
2309
  })), C();
2310
2310
  }), K && !U && $.observe(K), $.observe(d));
2311
- let PD, FD = U ? getBoundingClientRect(s) : null;
2312
- U && ID();
2313
- function ID() {
2311
+ let TO, EO = U ? getBoundingClientRect(s) : null;
2312
+ U && DO();
2313
+ function DO() {
2314
2314
  let d = getBoundingClientRect(s);
2315
- FD && !rectsAreEqual(FD, d) && C(), FD = d, PD = requestAnimationFrame(ID);
2315
+ EO && !rectsAreEqual(EO, d) && C(), EO = d, TO = requestAnimationFrame(DO);
2316
2316
  }
2317
2317
  return C(), () => {
2318
2318
  var s;
2319
2319
  q.forEach((s) => {
2320
2320
  k && s.removeEventListener("scroll", C), F && s.removeEventListener("resize", C);
2321
- }), J?.(), (s = $) == null || s.disconnect(), $ = null, U && cancelAnimationFrame(PD);
2321
+ }), J?.(), (s = $) == null || s.disconnect(), $ = null, U && cancelAnimationFrame(TO);
2322
2322
  };
2323
2323
  }
2324
2324
  var offset$1 = offset$2, shift$1 = shift$2, flip$1 = flip$2, size$1 = size$2, hide$1 = hide$2, arrow$1 = arrow$2, limitShift$1 = limitShift$2, computePosition = (s, d, C) => {
@@ -2377,25 +2377,25 @@ function useFloating(d) {
2377
2377
  placement: C,
2378
2378
  middlewareData: {},
2379
2379
  isPositioned: !1
2380
- }), [$, PD] = React$1.useState(k);
2381
- deepEqual($, k) || PD(k);
2382
- let [FD, ID] = React$1.useState(null), [LD, RD] = React$1.useState(null), BD = React$1.useCallback((s) => {
2383
- s !== WD.current && (WD.current = s, ID(s));
2384
- }, []), VD = React$1.useCallback((s) => {
2385
- s !== GD.current && (GD.current = s, RD(s));
2386
- }, []), HD = L || FD, UD = V || LD, WD = React$1.useRef(null), GD = React$1.useRef(null), KD = React$1.useRef(J), qD = K != null, JD = useLatestRef(K), YD = useLatestRef(F), XD = useLatestRef(q), ZD = React$1.useCallback(() => {
2387
- if (!WD.current || !GD.current) return;
2380
+ }), [$, TO] = React$1.useState(k);
2381
+ deepEqual($, k) || TO(k);
2382
+ let [EO, DO] = React$1.useState(null), [OO, kO] = React$1.useState(null), jO = React$1.useCallback((s) => {
2383
+ s !== FO.current && (FO.current = s, DO(s));
2384
+ }, []), MO = React$1.useCallback((s) => {
2385
+ s !== IO.current && (IO.current = s, kO(s));
2386
+ }, []), NO = L || EO, PO = V || OO, FO = React$1.useRef(null), IO = React$1.useRef(null), LO = React$1.useRef(J), RO = K != null, zO = useLatestRef(K), BO = useLatestRef(F), VO = useLatestRef(q), HO = React$1.useCallback(() => {
2387
+ if (!FO.current || !IO.current) return;
2388
2388
  let s = {
2389
2389
  placement: C,
2390
2390
  strategy: w,
2391
2391
  middleware: $
2392
2392
  };
2393
- YD.current && (s.platform = YD.current), computePosition(WD.current, GD.current, s).then((s) => {
2393
+ BO.current && (s.platform = BO.current), computePosition(FO.current, IO.current, s).then((s) => {
2394
2394
  let d = {
2395
2395
  ...s,
2396
- isPositioned: XD.current !== !1
2396
+ isPositioned: VO.current !== !1
2397
2397
  };
2398
- QD.current && !deepEqual(KD.current, d) && (KD.current = d, ReactDOM$1.flushSync(() => {
2398
+ UO.current && !deepEqual(LO.current, d) && (LO.current = d, ReactDOM$1.flushSync(() => {
2399
2399
  X(d);
2400
2400
  }));
2401
2401
  });
@@ -2403,50 +2403,50 @@ function useFloating(d) {
2403
2403
  $,
2404
2404
  C,
2405
2405
  w,
2406
- YD,
2407
- XD
2406
+ BO,
2407
+ VO
2408
2408
  ]);
2409
2409
  index(() => {
2410
- q === !1 && KD.current.isPositioned && (KD.current.isPositioned = !1, X((s) => ({
2410
+ q === !1 && LO.current.isPositioned && (LO.current.isPositioned = !1, X((s) => ({
2411
2411
  ...s,
2412
2412
  isPositioned: !1
2413
2413
  })));
2414
2414
  }, [q]);
2415
- let QD = React$1.useRef(!1);
2416
- index(() => (QD.current = !0, () => {
2417
- QD.current = !1;
2415
+ let UO = React$1.useRef(!1);
2416
+ index(() => (UO.current = !0, () => {
2417
+ UO.current = !1;
2418
2418
  }), []), index(() => {
2419
- if (HD && (WD.current = HD), UD && (GD.current = UD), HD && UD) {
2420
- if (JD.current) return JD.current(HD, UD, ZD);
2421
- ZD();
2419
+ if (NO && (FO.current = NO), PO && (IO.current = PO), NO && PO) {
2420
+ if (zO.current) return zO.current(NO, PO, HO);
2421
+ HO();
2422
2422
  }
2423
2423
  }, [
2424
- HD,
2425
- UD,
2426
- ZD,
2427
- JD,
2428
- qD
2424
+ NO,
2425
+ PO,
2426
+ HO,
2427
+ zO,
2428
+ RO
2429
2429
  ]);
2430
- let $D = React$1.useMemo(() => ({
2431
- reference: WD,
2432
- floating: GD,
2433
- setReference: BD,
2434
- setFloating: VD
2435
- }), [BD, VD]), eO = React$1.useMemo(() => ({
2436
- reference: HD,
2437
- floating: UD
2438
- }), [HD, UD]), tO = React$1.useMemo(() => {
2430
+ let WO = React$1.useMemo(() => ({
2431
+ reference: FO,
2432
+ floating: IO,
2433
+ setReference: jO,
2434
+ setFloating: MO
2435
+ }), [jO, MO]), GO = React$1.useMemo(() => ({
2436
+ reference: NO,
2437
+ floating: PO
2438
+ }), [NO, PO]), KO = React$1.useMemo(() => {
2439
2439
  let s = {
2440
2440
  position: w,
2441
2441
  left: 0,
2442
2442
  top: 0
2443
2443
  };
2444
- if (!eO.floating) return s;
2445
- let d = roundByDPR(eO.floating, J.x), C = roundByDPR(eO.floating, J.y);
2444
+ if (!GO.floating) return s;
2445
+ let d = roundByDPR(GO.floating, J.x), C = roundByDPR(GO.floating, J.y);
2446
2446
  return U ? {
2447
2447
  ...s,
2448
2448
  transform: "translate(" + d + "px, " + C + "px)",
2449
- ...getDPR(eO.floating) >= 1.5 && { willChange: "transform" }
2449
+ ...getDPR(GO.floating) >= 1.5 && { willChange: "transform" }
2450
2450
  } : {
2451
2451
  position: w,
2452
2452
  left: d,
@@ -2455,22 +2455,22 @@ function useFloating(d) {
2455
2455
  }, [
2456
2456
  w,
2457
2457
  U,
2458
- eO.floating,
2458
+ GO.floating,
2459
2459
  J.x,
2460
2460
  J.y
2461
2461
  ]);
2462
2462
  return React$1.useMemo(() => ({
2463
2463
  ...J,
2464
- update: ZD,
2465
- refs: $D,
2466
- elements: eO,
2467
- floatingStyles: tO
2464
+ update: HO,
2465
+ refs: WO,
2466
+ elements: GO,
2467
+ floatingStyles: KO
2468
2468
  }), [
2469
2469
  J,
2470
- ZD,
2471
- $D,
2472
- eO,
2473
- tO
2470
+ HO,
2471
+ WO,
2472
+ GO,
2473
+ KO
2474
2474
  ]);
2475
2475
  }
2476
2476
  var arrow$1$1 = (s) => {
@@ -2546,71 +2546,71 @@ var ANCHOR_NAME$1 = "PopperAnchor", PopperAnchor = React$1.forwardRef((d, C) =>
2546
2546
  });
2547
2547
  });
2548
2548
  PopperAnchor.displayName = ANCHOR_NAME$1;
2549
- var CONTENT_NAME$3 = "PopperContent", [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$3), PopperContent = React$1.forwardRef((d, C) => {
2550
- let { __scopePopper: w, side: k = "bottom", sideOffset: F = 0, align: L = "center", alignOffset: V = 0, arrowPadding: U = 0, avoidCollisions: K = !0, collisionBoundary: q = [], collisionPadding: J = 0, sticky: X = "partial", hideWhenDetached: $ = !1, updatePositionStrategy: PD = "optimized", onPlaced: FD, ...ID } = d, LD = usePopperContext(CONTENT_NAME$3, w), [RD, zD] = React$1.useState(null), BD = useComposedRefs(C, (s) => zD(s)), [VD, HD] = React$1.useState(null), UD = useSize(VD), GD = UD?.width ?? 0, KD = UD?.height ?? 0, qD = k + (L === "center" ? "" : "-" + L), JD = typeof J == "number" ? J : {
2549
+ var CONTENT_NAME$4 = "PopperContent", [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$4), PopperContent = React$1.forwardRef((d, C) => {
2550
+ let { __scopePopper: w, side: k = "bottom", sideOffset: F = 0, align: L = "center", alignOffset: V = 0, arrowPadding: U = 0, avoidCollisions: K = !0, collisionBoundary: q = [], collisionPadding: J = 0, sticky: X = "partial", hideWhenDetached: $ = !1, updatePositionStrategy: TO = "optimized", onPlaced: EO, ...DO } = d, OO = usePopperContext(CONTENT_NAME$4, w), [kO, AO] = React$1.useState(null), jO = useComposedRefs(C, (s) => AO(s)), [MO, NO] = React$1.useState(null), FO = useSize(MO), IO = FO?.width ?? 0, LO = FO?.height ?? 0, RO = k + (L === "center" ? "" : "-" + L), zO = typeof J == "number" ? J : {
2551
2551
  top: 0,
2552
2552
  right: 0,
2553
2553
  bottom: 0,
2554
2554
  left: 0,
2555
2555
  ...J
2556
- }, YD = Array.isArray(q) ? q : [q], XD = YD.length > 0, ZD = {
2557
- padding: JD,
2558
- boundary: YD.filter(isNotNull$2),
2559
- altBoundary: XD
2560
- }, { refs: QD, floatingStyles: $D, placement: eO, isPositioned: tO, middlewareData: nO } = useFloating({
2556
+ }, BO = Array.isArray(q) ? q : [q], VO = BO.length > 0, HO = {
2557
+ padding: zO,
2558
+ boundary: BO.filter(isNotNull$2),
2559
+ altBoundary: VO
2560
+ }, { refs: UO, floatingStyles: WO, placement: GO, isPositioned: KO, middlewareData: qO } = useFloating({
2561
2561
  strategy: "fixed",
2562
- placement: qD,
2563
- whileElementsMounted: (...s) => autoUpdate(...s, { animationFrame: PD === "always" }),
2564
- elements: { reference: LD.anchor },
2562
+ placement: RO,
2563
+ whileElementsMounted: (...s) => autoUpdate(...s, { animationFrame: TO === "always" }),
2564
+ elements: { reference: OO.anchor },
2565
2565
  middleware: [
2566
2566
  offset({
2567
- mainAxis: F + KD,
2567
+ mainAxis: F + LO,
2568
2568
  alignmentAxis: V
2569
2569
  }),
2570
2570
  K && shift({
2571
2571
  mainAxis: !0,
2572
2572
  crossAxis: !1,
2573
2573
  limiter: X === "partial" ? limitShift() : void 0,
2574
- ...ZD
2574
+ ...HO
2575
2575
  }),
2576
- K && flip({ ...ZD }),
2576
+ K && flip({ ...HO }),
2577
2577
  size({
2578
- ...ZD,
2578
+ ...HO,
2579
2579
  apply: ({ elements: s, rects: d, availableWidth: C, availableHeight: w }) => {
2580
2580
  let { width: k, height: F } = d.reference, L = s.floating.style;
2581
2581
  L.setProperty("--radix-popper-available-width", `${C}px`), L.setProperty("--radix-popper-available-height", `${w}px`), L.setProperty("--radix-popper-anchor-width", `${k}px`), L.setProperty("--radix-popper-anchor-height", `${F}px`);
2582
2582
  }
2583
2583
  }),
2584
- VD && arrow({
2585
- element: VD,
2584
+ MO && arrow({
2585
+ element: MO,
2586
2586
  padding: U
2587
2587
  }),
2588
2588
  transformOrigin({
2589
- arrowWidth: GD,
2590
- arrowHeight: KD
2589
+ arrowWidth: IO,
2590
+ arrowHeight: LO
2591
2591
  }),
2592
2592
  $ && hide({
2593
2593
  strategy: "referenceHidden",
2594
- ...ZD
2594
+ ...HO
2595
2595
  })
2596
2596
  ]
2597
- }), [rO, iO] = getSideAndAlignFromPlacement(eO), aO = useCallbackRef(FD);
2597
+ }), [JO, YO] = getSideAndAlignFromPlacement(GO), XO = useCallbackRef(EO);
2598
2598
  useLayoutEffect2(() => {
2599
- tO && aO?.();
2600
- }, [tO, aO]);
2601
- let oO = nO.arrow?.x, sO = nO.arrow?.y, cO = nO.arrow?.centerOffset !== 0, [lO, uO] = React$1.useState();
2599
+ KO && XO?.();
2600
+ }, [KO, XO]);
2601
+ let ZO = qO.arrow?.x, QO = qO.arrow?.y, $O = qO.arrow?.centerOffset !== 0, [ek, tk] = React$1.useState();
2602
2602
  return useLayoutEffect2(() => {
2603
- RD && uO(window.getComputedStyle(RD).zIndex);
2604
- }, [RD]), /* @__PURE__ */ jsx("div", {
2605
- ref: QD.setFloating,
2603
+ kO && tk(window.getComputedStyle(kO).zIndex);
2604
+ }, [kO]), /* @__PURE__ */ jsx("div", {
2605
+ ref: UO.setFloating,
2606
2606
  "data-radix-popper-content-wrapper": "",
2607
2607
  style: {
2608
- ...$D,
2609
- transform: tO ? $D.transform : "translate(0, -200%)",
2608
+ ...WO,
2609
+ transform: KO ? WO.transform : "translate(0, -200%)",
2610
2610
  minWidth: "max-content",
2611
- zIndex: lO,
2612
- "--radix-popper-transform-origin": [nO.transformOrigin?.x, nO.transformOrigin?.y].join(" "),
2613
- ...nO.hide?.referenceHidden && {
2611
+ zIndex: ek,
2612
+ "--radix-popper-transform-origin": [qO.transformOrigin?.x, qO.transformOrigin?.y].join(" "),
2613
+ ...qO.hide?.referenceHidden && {
2614
2614
  visibility: "hidden",
2615
2615
  pointerEvents: "none"
2616
2616
  }
@@ -2618,32 +2618,32 @@ var CONTENT_NAME$3 = "PopperContent", [PopperContentProvider, useContentContext]
2618
2618
  dir: d.dir,
2619
2619
  children: /* @__PURE__ */ jsx(PopperContentProvider, {
2620
2620
  scope: w,
2621
- placedSide: rO,
2622
- onArrowChange: HD,
2623
- arrowX: oO,
2624
- arrowY: sO,
2625
- shouldHideArrow: cO,
2621
+ placedSide: JO,
2622
+ onArrowChange: NO,
2623
+ arrowX: ZO,
2624
+ arrowY: QO,
2625
+ shouldHideArrow: $O,
2626
2626
  children: /* @__PURE__ */ jsx(Primitive.div, {
2627
- "data-side": rO,
2628
- "data-align": iO,
2629
- ...ID,
2630
- ref: BD,
2627
+ "data-side": JO,
2628
+ "data-align": YO,
2629
+ ...DO,
2630
+ ref: jO,
2631
2631
  style: {
2632
- ...ID.style,
2633
- animation: tO ? void 0 : "none"
2632
+ ...DO.style,
2633
+ animation: KO ? void 0 : "none"
2634
2634
  }
2635
2635
  })
2636
2636
  })
2637
2637
  });
2638
2638
  });
2639
- PopperContent.displayName = CONTENT_NAME$3;
2640
- var ARROW_NAME$3 = "PopperArrow", OPPOSITE_SIDE = {
2639
+ PopperContent.displayName = CONTENT_NAME$4;
2640
+ var ARROW_NAME$4 = "PopperArrow", OPPOSITE_SIDE = {
2641
2641
  top: "bottom",
2642
2642
  right: "left",
2643
2643
  bottom: "top",
2644
2644
  left: "right"
2645
2645
  }, PopperArrow = React$1.forwardRef(function(s, d) {
2646
- let { __scopePopper: C, ...w } = s, k = useContentContext(ARROW_NAME$3, C), F = OPPOSITE_SIDE[k.placedSide];
2646
+ let { __scopePopper: C, ...w } = s, k = useContentContext(ARROW_NAME$4, C), F = OPPOSITE_SIDE[k.placedSide];
2647
2647
  return /* @__PURE__ */ jsx("span", {
2648
2648
  ref: k.onArrowChange,
2649
2649
  style: {
@@ -2675,7 +2675,7 @@ var ARROW_NAME$3 = "PopperArrow", OPPOSITE_SIDE = {
2675
2675
  })
2676
2676
  });
2677
2677
  });
2678
- PopperArrow.displayName = ARROW_NAME$3;
2678
+ PopperArrow.displayName = ARROW_NAME$4;
2679
2679
  function isNotNull$2(s) {
2680
2680
  return s !== null;
2681
2681
  }
@@ -2687,10 +2687,10 @@ var transformOrigin = (s) => ({
2687
2687
  start: "0%",
2688
2688
  center: "50%",
2689
2689
  end: "100%"
2690
- }[K], J = (k.arrow?.x ?? 0) + L / 2, X = (k.arrow?.y ?? 0) + V / 2, $ = "", PD = "";
2691
- return U === "bottom" ? ($ = F ? q : `${J}px`, PD = `${-V}px`) : U === "top" ? ($ = F ? q : `${J}px`, PD = `${w.floating.height + V}px`) : U === "right" ? ($ = `${-V}px`, PD = F ? q : `${X}px`) : U === "left" && ($ = `${w.floating.width + V}px`, PD = F ? q : `${X}px`), { data: {
2690
+ }[K], J = (k.arrow?.x ?? 0) + L / 2, X = (k.arrow?.y ?? 0) + V / 2, $ = "", TO = "";
2691
+ return U === "bottom" ? ($ = F ? q : `${J}px`, TO = `${-V}px`) : U === "top" ? ($ = F ? q : `${J}px`, TO = `${w.floating.height + V}px`) : U === "right" ? ($ = `${-V}px`, TO = F ? q : `${X}px`) : U === "left" && ($ = `${w.floating.width + V}px`, TO = F ? q : `${X}px`), { data: {
2692
2692
  x: $,
2693
- y: PD
2693
+ y: TO
2694
2694
  } };
2695
2695
  }
2696
2696
  });
@@ -2698,10 +2698,10 @@ function getSideAndAlignFromPlacement(s) {
2698
2698
  let [d, C = "center"] = s.split("-");
2699
2699
  return [d, C];
2700
2700
  }
2701
- var Root2$1 = Popper, Anchor = PopperAnchor, Content = PopperContent, Arrow = PopperArrow, ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus", EVENT_OPTIONS = {
2701
+ var Root2$2 = Popper, Anchor = PopperAnchor, Content = PopperContent, Arrow = PopperArrow, ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus", EVENT_OPTIONS = {
2702
2702
  bubbles: !1,
2703
2703
  cancelable: !0
2704
- }, GROUP_NAME$2 = "RovingFocusGroup", [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(GROUP_NAME$2), [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(GROUP_NAME$2, [createCollectionScope$1]), [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME$2), RovingFocusGroup = React$1.forwardRef((s, d) => /* @__PURE__ */ jsx(Collection$1.Provider, {
2704
+ }, GROUP_NAME$3 = "RovingFocusGroup", [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(GROUP_NAME$3), [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(GROUP_NAME$3, [createCollectionScope$1]), [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME$3), RovingFocusGroup = React$1.forwardRef((s, d) => /* @__PURE__ */ jsx(Collection$1.Provider, {
2705
2705
  scope: s.__scopeRovingFocusGroup,
2706
2706
  children: /* @__PURE__ */ jsx(Collection$1.Slot, {
2707
2707
  scope: s.__scopeRovingFocusGroup,
@@ -2711,65 +2711,65 @@ var Root2$1 = Popper, Anchor = PopperAnchor, Content = PopperContent, Arrow = Po
2711
2711
  })
2712
2712
  })
2713
2713
  }));
2714
- RovingFocusGroup.displayName = GROUP_NAME$2;
2714
+ RovingFocusGroup.displayName = GROUP_NAME$3;
2715
2715
  var RovingFocusGroupImpl = React$1.forwardRef((d, C) => {
2716
- let { __scopeRovingFocusGroup: w, orientation: k, loop: F = !1, dir: L, currentTabStopId: V, defaultCurrentTabStopId: U, onCurrentTabStopIdChange: K, onEntryFocus: q, preventScrollOnEntryFocus: J = !1, ...X } = d, $ = React$1.useRef(null), PD = useComposedRefs(C, $), FD = useDirection(L), [ID, LD] = useControllableState({
2716
+ let { __scopeRovingFocusGroup: w, orientation: k, loop: F = !1, dir: L, currentTabStopId: V, defaultCurrentTabStopId: U, onCurrentTabStopIdChange: K, onEntryFocus: q, preventScrollOnEntryFocus: J = !1, ...X } = d, $ = React$1.useRef(null), TO = useComposedRefs(C, $), EO = useDirection(L), [DO, OO] = useControllableState({
2717
2717
  prop: V,
2718
2718
  defaultProp: U ?? null,
2719
2719
  onChange: K,
2720
- caller: GROUP_NAME$2
2721
- }), [RD, zD] = React$1.useState(!1), BD = useCallbackRef(q), VD = useCollection$1(w), HD = React$1.useRef(!1), [UD, GD] = React$1.useState(0);
2720
+ caller: GROUP_NAME$3
2721
+ }), [kO, AO] = React$1.useState(!1), jO = useCallbackRef(q), MO = useCollection$1(w), NO = React$1.useRef(!1), [FO, IO] = React$1.useState(0);
2722
2722
  return React$1.useEffect(() => {
2723
2723
  let s = $.current;
2724
- if (s) return s.addEventListener(ENTRY_FOCUS, BD), () => s.removeEventListener(ENTRY_FOCUS, BD);
2725
- }, [BD]), /* @__PURE__ */ jsx(RovingFocusProvider, {
2724
+ if (s) return s.addEventListener(ENTRY_FOCUS, jO), () => s.removeEventListener(ENTRY_FOCUS, jO);
2725
+ }, [jO]), /* @__PURE__ */ jsx(RovingFocusProvider, {
2726
2726
  scope: w,
2727
2727
  orientation: k,
2728
- dir: FD,
2728
+ dir: EO,
2729
2729
  loop: F,
2730
- currentTabStopId: ID,
2731
- onItemFocus: React$1.useCallback((s) => LD(s), [LD]),
2732
- onItemShiftTab: React$1.useCallback(() => zD(!0), []),
2733
- onFocusableItemAdd: React$1.useCallback(() => GD((s) => s + 1), []),
2734
- onFocusableItemRemove: React$1.useCallback(() => GD((s) => s - 1), []),
2730
+ currentTabStopId: DO,
2731
+ onItemFocus: React$1.useCallback((s) => OO(s), [OO]),
2732
+ onItemShiftTab: React$1.useCallback(() => AO(!0), []),
2733
+ onFocusableItemAdd: React$1.useCallback(() => IO((s) => s + 1), []),
2734
+ onFocusableItemRemove: React$1.useCallback(() => IO((s) => s - 1), []),
2735
2735
  children: /* @__PURE__ */ jsx(Primitive.div, {
2736
- tabIndex: RD || UD === 0 ? -1 : 0,
2736
+ tabIndex: kO || FO === 0 ? -1 : 0,
2737
2737
  "data-orientation": k,
2738
2738
  ...X,
2739
- ref: PD,
2739
+ ref: TO,
2740
2740
  style: {
2741
2741
  outline: "none",
2742
2742
  ...d.style
2743
2743
  },
2744
2744
  onMouseDown: composeEventHandlers(d.onMouseDown, () => {
2745
- HD.current = !0;
2745
+ NO.current = !0;
2746
2746
  }),
2747
2747
  onFocus: composeEventHandlers(d.onFocus, (s) => {
2748
- let d = !HD.current;
2749
- if (s.target === s.currentTarget && d && !RD) {
2748
+ let d = !NO.current;
2749
+ if (s.target === s.currentTarget && d && !kO) {
2750
2750
  let d = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
2751
2751
  if (s.currentTarget.dispatchEvent(d), !d.defaultPrevented) {
2752
- let s = VD().filter((s) => s.focusable);
2752
+ let s = MO().filter((s) => s.focusable);
2753
2753
  focusFirst$1([
2754
2754
  s.find((s) => s.active),
2755
- s.find((s) => s.id === ID),
2755
+ s.find((s) => s.id === DO),
2756
2756
  ...s
2757
2757
  ].filter(Boolean).map((s) => s.ref.current), J);
2758
2758
  }
2759
2759
  }
2760
- HD.current = !1;
2760
+ NO.current = !1;
2761
2761
  }),
2762
- onBlur: composeEventHandlers(d.onBlur, () => zD(!1))
2762
+ onBlur: composeEventHandlers(d.onBlur, () => AO(!1))
2763
2763
  })
2764
2764
  });
2765
- }), ITEM_NAME$2 = "RovingFocusGroupItem", RovingFocusGroupItem = React$1.forwardRef((d, C) => {
2766
- let { __scopeRovingFocusGroup: w, focusable: k = !0, active: F = !1, tabStopId: L, children: V, ...U } = d, K = useId$1(), q = L || K, J = useRovingFocusContext(ITEM_NAME$2, w), X = J.currentTabStopId === q, $ = useCollection$1(w), { onFocusableItemAdd: PD, onFocusableItemRemove: FD, currentTabStopId: ID } = J;
2765
+ }), ITEM_NAME$3 = "RovingFocusGroupItem", RovingFocusGroupItem = React$1.forwardRef((d, C) => {
2766
+ let { __scopeRovingFocusGroup: w, focusable: k = !0, active: F = !1, tabStopId: L, children: V, ...U } = d, K = useId$1(), q = L || K, J = useRovingFocusContext(ITEM_NAME$3, w), X = J.currentTabStopId === q, $ = useCollection$1(w), { onFocusableItemAdd: TO, onFocusableItemRemove: EO, currentTabStopId: DO } = J;
2767
2767
  return React$1.useEffect(() => {
2768
- if (k) return PD(), () => FD();
2768
+ if (k) return TO(), () => EO();
2769
2769
  }, [
2770
2770
  k,
2771
- PD,
2772
- FD
2771
+ TO,
2772
+ EO
2773
2773
  ]), /* @__PURE__ */ jsx(Collection$1.ItemSlot, {
2774
2774
  scope: w,
2775
2775
  id: q,
@@ -2806,12 +2806,12 @@ var RovingFocusGroupImpl = React$1.forwardRef((d, C) => {
2806
2806
  }),
2807
2807
  children: typeof V == "function" ? V({
2808
2808
  isCurrentTabStop: X,
2809
- hasTabStop: ID != null
2809
+ hasTabStop: DO != null
2810
2810
  }) : V
2811
2811
  })
2812
2812
  });
2813
2813
  });
2814
- RovingFocusGroupItem.displayName = ITEM_NAME$2;
2814
+ RovingFocusGroupItem.displayName = ITEM_NAME$3;
2815
2815
  var MAP_KEY_TO_FOCUS_INTENT = {
2816
2816
  ArrowLeft: "prev",
2817
2817
  ArrowUp: "prev",
@@ -2869,7 +2869,7 @@ var Root$1 = RovingFocusGroup, Item = RovingFocusGroupItem, SELECTION_KEYS = ["E
2869
2869
  return document.addEventListener("keydown", s, { capture: !0 }), () => {
2870
2870
  document.removeEventListener("keydown", s, { capture: !0 }), document.removeEventListener("pointerdown", d, { capture: !0 }), document.removeEventListener("pointermove", d, { capture: !0 });
2871
2871
  };
2872
- }, []), /* @__PURE__ */ jsx(Root2$1, {
2872
+ }, []), /* @__PURE__ */ jsx(Root2$2, {
2873
2873
  ...U,
2874
2874
  children: /* @__PURE__ */ jsx(MenuProvider, {
2875
2875
  scope: C,
@@ -2898,8 +2898,8 @@ var ANCHOR_NAME = "MenuAnchor", MenuAnchor = React$1.forwardRef((s, d) => {
2898
2898
  });
2899
2899
  });
2900
2900
  MenuAnchor.displayName = ANCHOR_NAME;
2901
- var PORTAL_NAME$2 = "MenuPortal", [PortalProvider$1, usePortalContext$1] = createMenuContext(PORTAL_NAME$2, { forceMount: void 0 }), MenuPortal = (s) => {
2902
- let { __scopeMenu: d, forceMount: C, children: w, container: k } = s, F = useMenuContext(PORTAL_NAME$2, d);
2901
+ var PORTAL_NAME$3 = "MenuPortal", [PortalProvider$1, usePortalContext$1] = createMenuContext(PORTAL_NAME$3, { forceMount: void 0 }), MenuPortal = (s) => {
2902
+ let { __scopeMenu: d, forceMount: C, children: w, container: k } = s, F = useMenuContext(PORTAL_NAME$3, d);
2903
2903
  return /* @__PURE__ */ jsx(PortalProvider$1, {
2904
2904
  scope: d,
2905
2905
  forceMount: C,
@@ -2913,9 +2913,9 @@ var PORTAL_NAME$2 = "MenuPortal", [PortalProvider$1, usePortalContext$1] = creat
2913
2913
  })
2914
2914
  });
2915
2915
  };
2916
- MenuPortal.displayName = PORTAL_NAME$2;
2917
- var CONTENT_NAME$2 = "MenuContent", [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME$2), MenuContent = React$1.forwardRef((s, d) => {
2918
- let C = usePortalContext$1(CONTENT_NAME$2, s.__scopeMenu), { forceMount: w = C.forceMount, ...k } = s, F = useMenuContext(CONTENT_NAME$2, s.__scopeMenu), L = useMenuRootContext(CONTENT_NAME$2, s.__scopeMenu);
2916
+ MenuPortal.displayName = PORTAL_NAME$3;
2917
+ var CONTENT_NAME$3 = "MenuContent", [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME$3), MenuContent = React$1.forwardRef((s, d) => {
2918
+ let C = usePortalContext$1(CONTENT_NAME$3, s.__scopeMenu), { forceMount: w = C.forceMount, ...k } = s, F = useMenuContext(CONTENT_NAME$3, s.__scopeMenu), L = useMenuRootContext(CONTENT_NAME$3, s.__scopeMenu);
2919
2919
  return /* @__PURE__ */ jsx(Collection.Provider, {
2920
2920
  scope: s.__scopeMenu,
2921
2921
  children: /* @__PURE__ */ jsx(Presence, {
@@ -2933,7 +2933,7 @@ var CONTENT_NAME$2 = "MenuContent", [MenuContentProvider, useMenuContentContext]
2933
2933
  })
2934
2934
  });
2935
2935
  }), MenuRootContentModal = React$1.forwardRef((d, C) => {
2936
- let w = useMenuContext(CONTENT_NAME$2, d.__scopeMenu), k = React$1.useRef(null), F = useComposedRefs(C, k);
2936
+ let w = useMenuContext(CONTENT_NAME$3, d.__scopeMenu), k = React$1.useRef(null), F = useComposedRefs(C, k);
2937
2937
  return React$1.useEffect(() => {
2938
2938
  let s = k.current;
2939
2939
  if (s) return hideOthers(s);
@@ -2947,7 +2947,7 @@ var CONTENT_NAME$2 = "MenuContent", [MenuContentProvider, useMenuContentContext]
2947
2947
  onDismiss: () => w.onOpenChange(!1)
2948
2948
  });
2949
2949
  }), MenuRootContentNonModal = React$1.forwardRef((s, d) => {
2950
- let C = useMenuContext(CONTENT_NAME$2, s.__scopeMenu);
2950
+ let C = useMenuContext(CONTENT_NAME$3, s.__scopeMenu);
2951
2951
  return /* @__PURE__ */ jsx(MenuContentImpl, {
2952
2952
  ...s,
2953
2953
  ref: d,
@@ -2957,40 +2957,40 @@ var CONTENT_NAME$2 = "MenuContent", [MenuContentProvider, useMenuContentContext]
2957
2957
  onDismiss: () => C.onOpenChange(!1)
2958
2958
  });
2959
2959
  }), Slot = /* @__PURE__ */ createSlot("MenuContent.ScrollLock"), MenuContentImpl = React$1.forwardRef((d, C) => {
2960
- let { __scopeMenu: w, loop: k = !1, trapFocus: F, onOpenAutoFocus: L, onCloseAutoFocus: V, disableOutsidePointerEvents: U, onEntryFocus: K, onEscapeKeyDown: q, onPointerDownOutside: J, onFocusOutside: X, onInteractOutside: $, onDismiss: PD, disableOutsideScroll: FD, ...ID } = d, LD = useMenuContext(CONTENT_NAME$2, w), RD = useMenuRootContext(CONTENT_NAME$2, w), zD = usePopperScope$1(w), BD = useRovingFocusGroupScope(w), VD = useCollection(w), [HD, UD] = React$1.useState(null), GD = React$1.useRef(null), KD = useComposedRefs(C, GD, LD.onContentChange), qD = React$1.useRef(0), JD = React$1.useRef(""), YD = React$1.useRef(0), XD = React$1.useRef(null), ZD = React$1.useRef("right"), QD = React$1.useRef(0), $D = FD ? Combination_default : React$1.Fragment, eO = FD ? {
2960
+ let { __scopeMenu: w, loop: k = !1, trapFocus: F, onOpenAutoFocus: L, onCloseAutoFocus: V, disableOutsidePointerEvents: U, onEntryFocus: K, onEscapeKeyDown: q, onPointerDownOutside: J, onFocusOutside: X, onInteractOutside: $, onDismiss: TO, disableOutsideScroll: EO, ...DO } = d, OO = useMenuContext(CONTENT_NAME$3, w), kO = useMenuRootContext(CONTENT_NAME$3, w), AO = usePopperScope$1(w), jO = useRovingFocusGroupScope(w), MO = useCollection(w), [NO, FO] = React$1.useState(null), IO = React$1.useRef(null), LO = useComposedRefs(C, IO, OO.onContentChange), RO = React$1.useRef(0), zO = React$1.useRef(""), BO = React$1.useRef(0), VO = React$1.useRef(null), HO = React$1.useRef("right"), UO = React$1.useRef(0), WO = EO ? Combination_default : React$1.Fragment, GO = EO ? {
2961
2961
  as: Slot,
2962
2962
  allowPinchZoom: !0
2963
- } : void 0, tO = (s) => {
2964
- let d = JD.current + s, C = VD().filter((s) => !s.disabled), w = document.activeElement, k = C.find((s) => s.ref.current === w)?.textValue, F = getNextMatch(C.map((s) => s.textValue), d, k), L = C.find((s) => s.textValue === F)?.ref.current;
2963
+ } : void 0, KO = (s) => {
2964
+ let d = zO.current + s, C = MO().filter((s) => !s.disabled), w = document.activeElement, k = C.find((s) => s.ref.current === w)?.textValue, F = getNextMatch(C.map((s) => s.textValue), d, k), L = C.find((s) => s.textValue === F)?.ref.current;
2965
2965
  (function s(d) {
2966
- JD.current = d, window.clearTimeout(qD.current), d !== "" && (qD.current = window.setTimeout(() => s(""), 1e3));
2966
+ zO.current = d, window.clearTimeout(RO.current), d !== "" && (RO.current = window.setTimeout(() => s(""), 1e3));
2967
2967
  })(d), L && setTimeout(() => L.focus());
2968
2968
  };
2969
- React$1.useEffect(() => () => window.clearTimeout(qD.current), []), useFocusGuards();
2970
- let nO = React$1.useCallback((s) => ZD.current === XD.current?.side && isPointerInGraceArea(s, XD.current?.area), []);
2969
+ React$1.useEffect(() => () => window.clearTimeout(RO.current), []), useFocusGuards();
2970
+ let qO = React$1.useCallback((s) => HO.current === VO.current?.side && isPointerInGraceArea(s, VO.current?.area), []);
2971
2971
  return /* @__PURE__ */ jsx(MenuContentProvider, {
2972
2972
  scope: w,
2973
- searchRef: JD,
2973
+ searchRef: zO,
2974
2974
  onItemEnter: React$1.useCallback((s) => {
2975
- nO(s) && s.preventDefault();
2976
- }, [nO]),
2975
+ qO(s) && s.preventDefault();
2976
+ }, [qO]),
2977
2977
  onItemLeave: React$1.useCallback((s) => {
2978
- nO(s) || (GD.current?.focus(), UD(null));
2979
- }, [nO]),
2978
+ qO(s) || (IO.current?.focus(), FO(null));
2979
+ }, [qO]),
2980
2980
  onTriggerLeave: React$1.useCallback((s) => {
2981
- nO(s) && s.preventDefault();
2982
- }, [nO]),
2983
- pointerGraceTimerRef: YD,
2981
+ qO(s) && s.preventDefault();
2982
+ }, [qO]),
2983
+ pointerGraceTimerRef: BO,
2984
2984
  onPointerGraceIntentChange: React$1.useCallback((s) => {
2985
- XD.current = s;
2985
+ VO.current = s;
2986
2986
  }, []),
2987
- children: /* @__PURE__ */ jsx($D, {
2988
- ...eO,
2987
+ children: /* @__PURE__ */ jsx(WO, {
2988
+ ...GO,
2989
2989
  children: /* @__PURE__ */ jsx(FocusScope, {
2990
2990
  asChild: !0,
2991
2991
  trapped: F,
2992
2992
  onMountAutoFocus: composeEventHandlers(L, (s) => {
2993
- s.preventDefault(), GD.current?.focus({ preventScroll: !0 });
2993
+ s.preventDefault(), IO.current?.focus({ preventScroll: !0 });
2994
2994
  }),
2995
2995
  onUnmountAutoFocus: V,
2996
2996
  children: /* @__PURE__ */ jsx(DismissableLayer, {
@@ -3000,47 +3000,47 @@ var CONTENT_NAME$2 = "MenuContent", [MenuContentProvider, useMenuContentContext]
3000
3000
  onPointerDownOutside: J,
3001
3001
  onFocusOutside: X,
3002
3002
  onInteractOutside: $,
3003
- onDismiss: PD,
3003
+ onDismiss: TO,
3004
3004
  children: /* @__PURE__ */ jsx(Root$1, {
3005
3005
  asChild: !0,
3006
- ...BD,
3007
- dir: RD.dir,
3006
+ ...jO,
3007
+ dir: kO.dir,
3008
3008
  orientation: "vertical",
3009
3009
  loop: k,
3010
- currentTabStopId: HD,
3011
- onCurrentTabStopIdChange: UD,
3010
+ currentTabStopId: NO,
3011
+ onCurrentTabStopIdChange: FO,
3012
3012
  onEntryFocus: composeEventHandlers(K, (s) => {
3013
- RD.isUsingKeyboardRef.current || s.preventDefault();
3013
+ kO.isUsingKeyboardRef.current || s.preventDefault();
3014
3014
  }),
3015
3015
  preventScrollOnEntryFocus: !0,
3016
3016
  children: /* @__PURE__ */ jsx(Content, {
3017
3017
  role: "menu",
3018
3018
  "aria-orientation": "vertical",
3019
- "data-state": getOpenState(LD.open),
3019
+ "data-state": getOpenState(OO.open),
3020
3020
  "data-radix-menu-content": "",
3021
- dir: RD.dir,
3022
- ...zD,
3023
- ...ID,
3024
- ref: KD,
3021
+ dir: kO.dir,
3022
+ ...AO,
3023
+ ...DO,
3024
+ ref: LO,
3025
3025
  style: {
3026
3026
  outline: "none",
3027
- ...ID.style
3027
+ ...DO.style
3028
3028
  },
3029
- onKeyDown: composeEventHandlers(ID.onKeyDown, (s) => {
3029
+ onKeyDown: composeEventHandlers(DO.onKeyDown, (s) => {
3030
3030
  let d = s.target.closest("[data-radix-menu-content]") === s.currentTarget, C = s.ctrlKey || s.altKey || s.metaKey, w = s.key.length === 1;
3031
- d && (s.key === "Tab" && s.preventDefault(), !C && w && tO(s.key));
3032
- let k = GD.current;
3031
+ d && (s.key === "Tab" && s.preventDefault(), !C && w && KO(s.key));
3032
+ let k = IO.current;
3033
3033
  if (s.target !== k || !FIRST_LAST_KEYS.includes(s.key)) return;
3034
3034
  s.preventDefault();
3035
- let F = VD().filter((s) => !s.disabled).map((s) => s.ref.current);
3035
+ let F = MO().filter((s) => !s.disabled).map((s) => s.ref.current);
3036
3036
  LAST_KEYS.includes(s.key) && F.reverse(), focusFirst(F);
3037
3037
  }),
3038
3038
  onBlur: composeEventHandlers(d.onBlur, (s) => {
3039
- s.currentTarget.contains(s.target) || (window.clearTimeout(qD.current), JD.current = "");
3039
+ s.currentTarget.contains(s.target) || (window.clearTimeout(RO.current), zO.current = "");
3040
3040
  }),
3041
3041
  onPointerMove: composeEventHandlers(d.onPointerMove, whenMouse((s) => {
3042
- let d = s.target, C = QD.current !== s.clientX;
3043
- s.currentTarget.contains(d) && C && (ZD.current = s.clientX > QD.current ? "right" : "left", QD.current = s.clientX);
3042
+ let d = s.target, C = UO.current !== s.clientX;
3043
+ s.currentTarget.contains(d) && C && (HO.current = s.clientX > UO.current ? "right" : "left", UO.current = s.clientX);
3044
3044
  }))
3045
3045
  })
3046
3046
  })
@@ -3049,8 +3049,8 @@ var CONTENT_NAME$2 = "MenuContent", [MenuContentProvider, useMenuContentContext]
3049
3049
  })
3050
3050
  });
3051
3051
  });
3052
- MenuContent.displayName = CONTENT_NAME$2;
3053
- var GROUP_NAME$1 = "MenuGroup", MenuGroup = React$1.forwardRef((s, d) => {
3052
+ MenuContent.displayName = CONTENT_NAME$3;
3053
+ var GROUP_NAME$2 = "MenuGroup", MenuGroup = React$1.forwardRef((s, d) => {
3054
3054
  let { __scopeMenu: C, ...w } = s;
3055
3055
  return /* @__PURE__ */ jsx(Primitive.div, {
3056
3056
  role: "group",
@@ -3058,17 +3058,17 @@ var GROUP_NAME$1 = "MenuGroup", MenuGroup = React$1.forwardRef((s, d) => {
3058
3058
  ref: d
3059
3059
  });
3060
3060
  });
3061
- MenuGroup.displayName = GROUP_NAME$1;
3062
- var LABEL_NAME$1 = "MenuLabel", MenuLabel = React$1.forwardRef((s, d) => {
3061
+ MenuGroup.displayName = GROUP_NAME$2;
3062
+ var LABEL_NAME$2 = "MenuLabel", MenuLabel = React$1.forwardRef((s, d) => {
3063
3063
  let { __scopeMenu: C, ...w } = s;
3064
3064
  return /* @__PURE__ */ jsx(Primitive.div, {
3065
3065
  ...w,
3066
3066
  ref: d
3067
3067
  });
3068
3068
  });
3069
- MenuLabel.displayName = LABEL_NAME$1;
3070
- var ITEM_NAME$1 = "MenuItem", ITEM_SELECT = "menu.itemSelect", MenuItem$1 = React$1.forwardRef((d, C) => {
3071
- let { disabled: w = !1, onSelect: k, ...F } = d, L = React$1.useRef(null), V = useMenuRootContext(ITEM_NAME$1, d.__scopeMenu), U = useMenuContentContext(ITEM_NAME$1, d.__scopeMenu), K = useComposedRefs(C, L), q = React$1.useRef(!1), J = () => {
3069
+ MenuLabel.displayName = LABEL_NAME$2;
3070
+ var ITEM_NAME$2 = "MenuItem", ITEM_SELECT = "menu.itemSelect", MenuItem = React$1.forwardRef((d, C) => {
3071
+ let { disabled: w = !1, onSelect: k, ...F } = d, L = React$1.useRef(null), V = useMenuRootContext(ITEM_NAME$2, d.__scopeMenu), U = useMenuContentContext(ITEM_NAME$2, d.__scopeMenu), K = useComposedRefs(C, L), q = React$1.useRef(!1), J = () => {
3072
3072
  let s = L.current;
3073
3073
  if (!w && s) {
3074
3074
  let d = new CustomEvent(ITEM_SELECT, {
@@ -3095,12 +3095,12 @@ var ITEM_NAME$1 = "MenuItem", ITEM_SELECT = "menu.itemSelect", MenuItem$1 = Reac
3095
3095
  })
3096
3096
  });
3097
3097
  });
3098
- MenuItem$1.displayName = ITEM_NAME$1;
3098
+ MenuItem.displayName = ITEM_NAME$2;
3099
3099
  var MenuItemImpl = React$1.forwardRef((d, C) => {
3100
- let { __scopeMenu: w, disabled: k = !1, textValue: F, ...L } = d, V = useMenuContentContext(ITEM_NAME$1, w), U = useRovingFocusGroupScope(w), K = React$1.useRef(null), q = useComposedRefs(C, K), [J, X] = React$1.useState(!1), [$, PD] = React$1.useState("");
3100
+ let { __scopeMenu: w, disabled: k = !1, textValue: F, ...L } = d, V = useMenuContentContext(ITEM_NAME$2, w), U = useRovingFocusGroupScope(w), K = React$1.useRef(null), q = useComposedRefs(C, K), [J, X] = React$1.useState(!1), [$, TO] = React$1.useState("");
3101
3101
  return React$1.useEffect(() => {
3102
3102
  let s = K.current;
3103
- s && PD((s.textContent ?? "").trim());
3103
+ s && TO((s.textContent ?? "").trim());
3104
3104
  }, [L.children]), /* @__PURE__ */ jsx(Collection.ItemSlot, {
3105
3105
  scope: w,
3106
3106
  disabled: k,
@@ -3125,12 +3125,12 @@ var MenuItemImpl = React$1.forwardRef((d, C) => {
3125
3125
  })
3126
3126
  })
3127
3127
  });
3128
- }), CHECKBOX_ITEM_NAME$1 = "MenuCheckboxItem", MenuCheckboxItem = React$1.forwardRef((s, d) => {
3128
+ }), CHECKBOX_ITEM_NAME$2 = "MenuCheckboxItem", MenuCheckboxItem = React$1.forwardRef((s, d) => {
3129
3129
  let { checked: C = !1, onCheckedChange: w, ...k } = s;
3130
3130
  return /* @__PURE__ */ jsx(ItemIndicatorProvider, {
3131
3131
  scope: s.__scopeMenu,
3132
3132
  checked: C,
3133
- children: /* @__PURE__ */ jsx(MenuItem$1, {
3133
+ children: /* @__PURE__ */ jsx(MenuItem, {
3134
3134
  role: "menuitemcheckbox",
3135
3135
  "aria-checked": isIndeterminate(C) ? "mixed" : C,
3136
3136
  ...k,
@@ -3140,8 +3140,8 @@ var MenuItemImpl = React$1.forwardRef((d, C) => {
3140
3140
  })
3141
3141
  });
3142
3142
  });
3143
- MenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME$1;
3144
- var RADIO_GROUP_NAME$1 = "MenuRadioGroup", [RadioGroupProvider, useRadioGroupContext] = createMenuContext(RADIO_GROUP_NAME$1, {
3143
+ MenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME$2;
3144
+ var RADIO_GROUP_NAME$2 = "MenuRadioGroup", [RadioGroupProvider, useRadioGroupContext] = createMenuContext(RADIO_GROUP_NAME$2, {
3145
3145
  value: void 0,
3146
3146
  onValueChange: () => {}
3147
3147
  }), MenuRadioGroup = React$1.forwardRef((s, d) => {
@@ -3156,13 +3156,13 @@ var RADIO_GROUP_NAME$1 = "MenuRadioGroup", [RadioGroupProvider, useRadioGroupCon
3156
3156
  })
3157
3157
  });
3158
3158
  });
3159
- MenuRadioGroup.displayName = RADIO_GROUP_NAME$1;
3160
- var RADIO_ITEM_NAME$1 = "MenuRadioItem", MenuRadioItem = React$1.forwardRef((s, d) => {
3161
- let { value: C, ...w } = s, k = useRadioGroupContext(RADIO_ITEM_NAME$1, s.__scopeMenu), F = C === k.value;
3159
+ MenuRadioGroup.displayName = RADIO_GROUP_NAME$2;
3160
+ var RADIO_ITEM_NAME$2 = "MenuRadioItem", MenuRadioItem = React$1.forwardRef((s, d) => {
3161
+ let { value: C, ...w } = s, k = useRadioGroupContext(RADIO_ITEM_NAME$2, s.__scopeMenu), F = C === k.value;
3162
3162
  return /* @__PURE__ */ jsx(ItemIndicatorProvider, {
3163
3163
  scope: s.__scopeMenu,
3164
3164
  checked: F,
3165
- children: /* @__PURE__ */ jsx(MenuItem$1, {
3165
+ children: /* @__PURE__ */ jsx(MenuItem, {
3166
3166
  role: "menuitemradio",
3167
3167
  "aria-checked": F,
3168
3168
  ...w,
@@ -3172,7 +3172,7 @@ var RADIO_ITEM_NAME$1 = "MenuRadioItem", MenuRadioItem = React$1.forwardRef((s,
3172
3172
  })
3173
3173
  });
3174
3174
  });
3175
- MenuRadioItem.displayName = RADIO_ITEM_NAME$1;
3175
+ MenuRadioItem.displayName = RADIO_ITEM_NAME$2;
3176
3176
  var ITEM_INDICATOR_NAME = "MenuItemIndicator", [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(ITEM_INDICATOR_NAME, { checked: !1 }), MenuItemIndicator = React$1.forwardRef((s, d) => {
3177
3177
  let { __scopeMenu: C, forceMount: w, ...k } = s, F = useItemIndicatorContext(ITEM_INDICATOR_NAME, C);
3178
3178
  return /* @__PURE__ */ jsx(Presence, {
@@ -3185,7 +3185,7 @@ var ITEM_INDICATOR_NAME = "MenuItemIndicator", [ItemIndicatorProvider, useItemIn
3185
3185
  });
3186
3186
  });
3187
3187
  MenuItemIndicator.displayName = ITEM_INDICATOR_NAME;
3188
- var SEPARATOR_NAME$1 = "MenuSeparator", MenuSeparator$1 = React$1.forwardRef((s, d) => {
3188
+ var SEPARATOR_NAME$2 = "MenuSeparator", MenuSeparator = React$1.forwardRef((s, d) => {
3189
3189
  let { __scopeMenu: C, ...w } = s;
3190
3190
  return /* @__PURE__ */ jsx(Primitive.div, {
3191
3191
  role: "separator",
@@ -3194,8 +3194,8 @@ var SEPARATOR_NAME$1 = "MenuSeparator", MenuSeparator$1 = React$1.forwardRef((s,
3194
3194
  ref: d
3195
3195
  });
3196
3196
  });
3197
- MenuSeparator$1.displayName = SEPARATOR_NAME$1;
3198
- var ARROW_NAME$2 = "MenuArrow", MenuArrow = React$1.forwardRef((s, d) => {
3197
+ MenuSeparator.displayName = SEPARATOR_NAME$2;
3198
+ var ARROW_NAME$3 = "MenuArrow", MenuArrow = React$1.forwardRef((s, d) => {
3199
3199
  let { __scopeMenu: C, ...w } = s;
3200
3200
  return /* @__PURE__ */ jsx(Arrow, {
3201
3201
  ...usePopperScope$1(C),
@@ -3203,10 +3203,10 @@ var ARROW_NAME$2 = "MenuArrow", MenuArrow = React$1.forwardRef((s, d) => {
3203
3203
  ref: d
3204
3204
  });
3205
3205
  });
3206
- MenuArrow.displayName = ARROW_NAME$2;
3207
- var SUB_NAME = "MenuSub", [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME), MenuSub = (d) => {
3208
- let { __scopeMenu: C, children: w, open: k = !1, onOpenChange: F } = d, L = useMenuContext(SUB_NAME, C), V = usePopperScope$1(C), [U, K] = React$1.useState(null), [q, J] = React$1.useState(null), X = useCallbackRef(F);
3209
- return React$1.useEffect(() => (L.open === !1 && X(!1), () => X(!1)), [L.open, X]), /* @__PURE__ */ jsx(Root2$1, {
3206
+ MenuArrow.displayName = ARROW_NAME$3;
3207
+ var SUB_NAME$1 = "MenuSub", [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME$1), MenuSub = (d) => {
3208
+ let { __scopeMenu: C, children: w, open: k = !1, onOpenChange: F } = d, L = useMenuContext(SUB_NAME$1, C), V = usePopperScope$1(C), [U, K] = React$1.useState(null), [q, J] = React$1.useState(null), X = useCallbackRef(F);
3209
+ return React$1.useEffect(() => (L.open === !1 && X(!1), () => X(!1)), [L.open, X]), /* @__PURE__ */ jsx(Root2$2, {
3210
3210
  ...V,
3211
3211
  children: /* @__PURE__ */ jsx(MenuProvider, {
3212
3212
  scope: C,
@@ -3225,9 +3225,9 @@ var SUB_NAME = "MenuSub", [MenuSubProvider, useMenuSubContext] = createMenuConte
3225
3225
  })
3226
3226
  });
3227
3227
  };
3228
- MenuSub.displayName = SUB_NAME;
3229
- var SUB_TRIGGER_NAME$1 = "MenuSubTrigger", MenuSubTrigger = React$1.forwardRef((d, C) => {
3230
- let w = useMenuContext(SUB_TRIGGER_NAME$1, d.__scopeMenu), k = useMenuRootContext(SUB_TRIGGER_NAME$1, d.__scopeMenu), F = useMenuSubContext(SUB_TRIGGER_NAME$1, d.__scopeMenu), L = useMenuContentContext(SUB_TRIGGER_NAME$1, d.__scopeMenu), V = React$1.useRef(null), { pointerGraceTimerRef: U, onPointerGraceIntentChange: K } = L, q = { __scopeMenu: d.__scopeMenu }, J = React$1.useCallback(() => {
3228
+ MenuSub.displayName = SUB_NAME$1;
3229
+ var SUB_TRIGGER_NAME$2 = "MenuSubTrigger", MenuSubTrigger = React$1.forwardRef((d, C) => {
3230
+ let w = useMenuContext(SUB_TRIGGER_NAME$2, d.__scopeMenu), k = useMenuRootContext(SUB_TRIGGER_NAME$2, d.__scopeMenu), F = useMenuSubContext(SUB_TRIGGER_NAME$2, d.__scopeMenu), L = useMenuContentContext(SUB_TRIGGER_NAME$2, d.__scopeMenu), V = React$1.useRef(null), { pointerGraceTimerRef: U, onPointerGraceIntentChange: K } = L, q = { __scopeMenu: d.__scopeMenu }, J = React$1.useCallback(() => {
3231
3231
  V.current && window.clearTimeout(V.current), V.current = null;
3232
3232
  }, []);
3233
3233
  return React$1.useEffect(() => J, [J]), React$1.useEffect(() => {
@@ -3296,9 +3296,9 @@ var SUB_TRIGGER_NAME$1 = "MenuSubTrigger", MenuSubTrigger = React$1.forwardRef((
3296
3296
  })
3297
3297
  });
3298
3298
  });
3299
- MenuSubTrigger.displayName = SUB_TRIGGER_NAME$1;
3300
- var SUB_CONTENT_NAME$1 = "MenuSubContent", MenuSubContent = React$1.forwardRef((d, C) => {
3301
- let w = usePortalContext$1(CONTENT_NAME$2, d.__scopeMenu), { forceMount: k = w.forceMount, ...F } = d, L = useMenuContext(CONTENT_NAME$2, d.__scopeMenu), V = useMenuRootContext(CONTENT_NAME$2, d.__scopeMenu), U = useMenuSubContext(SUB_CONTENT_NAME$1, d.__scopeMenu), K = React$1.useRef(null), q = useComposedRefs(C, K);
3299
+ MenuSubTrigger.displayName = SUB_TRIGGER_NAME$2;
3300
+ var SUB_CONTENT_NAME$2 = "MenuSubContent", MenuSubContent = React$1.forwardRef((d, C) => {
3301
+ let w = usePortalContext$1(CONTENT_NAME$3, d.__scopeMenu), { forceMount: k = w.forceMount, ...F } = d, L = useMenuContext(CONTENT_NAME$3, d.__scopeMenu), V = useMenuRootContext(CONTENT_NAME$3, d.__scopeMenu), U = useMenuSubContext(SUB_CONTENT_NAME$2, d.__scopeMenu), K = React$1.useRef(null), q = useComposedRefs(C, K);
3302
3302
  return /* @__PURE__ */ jsx(Collection.Provider, {
3303
3303
  scope: d.__scopeMenu,
3304
3304
  children: /* @__PURE__ */ jsx(Presence, {
@@ -3334,7 +3334,7 @@ var SUB_CONTENT_NAME$1 = "MenuSubContent", MenuSubContent = React$1.forwardRef((
3334
3334
  })
3335
3335
  });
3336
3336
  });
3337
- MenuSubContent.displayName = SUB_CONTENT_NAME$1;
3337
+ MenuSubContent.displayName = SUB_CONTENT_NAME$2;
3338
3338
  function getOpenState(s) {
3339
3339
  return s ? "open" : "closed";
3340
3340
  }
@@ -3374,7 +3374,224 @@ function isPointerInGraceArea(s, d) {
3374
3374
  function whenMouse(s) {
3375
3375
  return (d) => d.pointerType === "mouse" ? s(d) : void 0;
3376
3376
  }
3377
- var Root3 = Menu, Anchor2 = MenuAnchor, Portal$1 = MenuPortal, Content2$1 = MenuContent, Group = MenuGroup, Label = MenuLabel, Item2$1 = MenuItem$1, CheckboxItem = MenuCheckboxItem, RadioGroup = MenuRadioGroup, RadioItem = MenuRadioItem, ItemIndicator = MenuItemIndicator, Separator = MenuSeparator$1, Arrow2 = MenuArrow, Sub = MenuSub, SubTrigger = MenuSubTrigger, SubContent = MenuSubContent, DROPDOWN_MENU_NAME = "DropdownMenu", [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [createMenuScope]), useMenuScope = createMenuScope(), [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME), DropdownMenu = (d) => {
3377
+ var Root3 = Menu, Anchor2 = MenuAnchor, Portal$1 = MenuPortal, Content2$2 = MenuContent, Group = MenuGroup, Label = MenuLabel, Item2$2 = MenuItem, CheckboxItem = MenuCheckboxItem, RadioGroup = MenuRadioGroup, RadioItem = MenuRadioItem, ItemIndicator = MenuItemIndicator, Separator = MenuSeparator, Arrow2 = MenuArrow, Sub = MenuSub, SubTrigger = MenuSubTrigger, SubContent = MenuSubContent, CONTEXT_MENU_NAME = "ContextMenu", [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [createMenuScope]), useMenuScope$1 = createMenuScope(), [ContextMenuProvider, useContextMenuContext] = createContextMenuContext(CONTEXT_MENU_NAME), ContextMenu = (d) => {
3378
+ let { __scopeContextMenu: C, children: w, onOpenChange: k, dir: F, modal: L = !0 } = d, [V, U] = React$1.useState(!1), K = useMenuScope$1(C), q = useCallbackRef(k), J = React$1.useCallback((s) => {
3379
+ U(s), q(s);
3380
+ }, [q]);
3381
+ return /* @__PURE__ */ jsx(ContextMenuProvider, {
3382
+ scope: C,
3383
+ open: V,
3384
+ onOpenChange: J,
3385
+ modal: L,
3386
+ children: /* @__PURE__ */ jsx(Root3, {
3387
+ ...K,
3388
+ dir: F,
3389
+ open: V,
3390
+ onOpenChange: J,
3391
+ modal: L,
3392
+ children: w
3393
+ })
3394
+ });
3395
+ };
3396
+ ContextMenu.displayName = CONTEXT_MENU_NAME;
3397
+ var TRIGGER_NAME$2 = "ContextMenuTrigger", ContextMenuTrigger = React$1.forwardRef((d, C) => {
3398
+ let { __scopeContextMenu: w, disabled: k = !1, ...F } = d, L = useContextMenuContext(TRIGGER_NAME$2, w), V = useMenuScope$1(w), U = React$1.useRef({
3399
+ x: 0,
3400
+ y: 0
3401
+ }), K = React$1.useRef({ getBoundingClientRect: () => DOMRect.fromRect({
3402
+ width: 0,
3403
+ height: 0,
3404
+ ...U.current
3405
+ }) }), q = React$1.useRef(0), J = React$1.useCallback(() => window.clearTimeout(q.current), []), X = (s) => {
3406
+ U.current = {
3407
+ x: s.clientX,
3408
+ y: s.clientY
3409
+ }, L.onOpenChange(!0);
3410
+ };
3411
+ return React$1.useEffect(() => J, [J]), React$1.useEffect(() => void (k && J()), [k, J]), /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Anchor2, {
3412
+ ...V,
3413
+ virtualRef: K
3414
+ }), /* @__PURE__ */ jsx(Primitive.span, {
3415
+ "data-state": L.open ? "open" : "closed",
3416
+ "data-disabled": k ? "" : void 0,
3417
+ ...F,
3418
+ ref: C,
3419
+ style: {
3420
+ WebkitTouchCallout: "none",
3421
+ ...d.style
3422
+ },
3423
+ onContextMenu: k ? d.onContextMenu : composeEventHandlers(d.onContextMenu, (s) => {
3424
+ J(), X(s), s.preventDefault();
3425
+ }),
3426
+ onPointerDown: k ? d.onPointerDown : composeEventHandlers(d.onPointerDown, whenTouchOrPen((s) => {
3427
+ J(), q.current = window.setTimeout(() => X(s), 700);
3428
+ })),
3429
+ onPointerMove: k ? d.onPointerMove : composeEventHandlers(d.onPointerMove, whenTouchOrPen(J)),
3430
+ onPointerCancel: k ? d.onPointerCancel : composeEventHandlers(d.onPointerCancel, whenTouchOrPen(J)),
3431
+ onPointerUp: k ? d.onPointerUp : composeEventHandlers(d.onPointerUp, whenTouchOrPen(J))
3432
+ })] });
3433
+ });
3434
+ ContextMenuTrigger.displayName = TRIGGER_NAME$2;
3435
+ var PORTAL_NAME$2 = "ContextMenuPortal", ContextMenuPortal = (s) => {
3436
+ let { __scopeContextMenu: d, ...C } = s;
3437
+ return /* @__PURE__ */ jsx(Portal$1, {
3438
+ ...useMenuScope$1(d),
3439
+ ...C
3440
+ });
3441
+ };
3442
+ ContextMenuPortal.displayName = PORTAL_NAME$2;
3443
+ var CONTENT_NAME$2 = "ContextMenuContent", ContextMenuContent = React$1.forwardRef((d, C) => {
3444
+ let { __scopeContextMenu: w, ...k } = d, F = useContextMenuContext(CONTENT_NAME$2, w), L = useMenuScope$1(w), V = React$1.useRef(!1);
3445
+ return /* @__PURE__ */ jsx(Content2$2, {
3446
+ ...L,
3447
+ ...k,
3448
+ ref: C,
3449
+ side: "right",
3450
+ sideOffset: 2,
3451
+ align: "start",
3452
+ onCloseAutoFocus: (s) => {
3453
+ d.onCloseAutoFocus?.(s), !s.defaultPrevented && V.current && s.preventDefault(), V.current = !1;
3454
+ },
3455
+ onInteractOutside: (s) => {
3456
+ d.onInteractOutside?.(s), !s.defaultPrevented && !F.modal && (V.current = !0);
3457
+ },
3458
+ style: {
3459
+ ...d.style,
3460
+ "--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
3461
+ "--radix-context-menu-content-available-width": "var(--radix-popper-available-width)",
3462
+ "--radix-context-menu-content-available-height": "var(--radix-popper-available-height)",
3463
+ "--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)",
3464
+ "--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)"
3465
+ }
3466
+ });
3467
+ });
3468
+ ContextMenuContent.displayName = CONTENT_NAME$2;
3469
+ var GROUP_NAME$1 = "ContextMenuGroup", ContextMenuGroup = React$1.forwardRef((s, d) => {
3470
+ let { __scopeContextMenu: C, ...w } = s;
3471
+ return /* @__PURE__ */ jsx(Group, {
3472
+ ...useMenuScope$1(C),
3473
+ ...w,
3474
+ ref: d
3475
+ });
3476
+ });
3477
+ ContextMenuGroup.displayName = GROUP_NAME$1;
3478
+ var LABEL_NAME$1 = "ContextMenuLabel", ContextMenuLabel = React$1.forwardRef((s, d) => {
3479
+ let { __scopeContextMenu: C, ...w } = s;
3480
+ return /* @__PURE__ */ jsx(Label, {
3481
+ ...useMenuScope$1(C),
3482
+ ...w,
3483
+ ref: d
3484
+ });
3485
+ });
3486
+ ContextMenuLabel.displayName = LABEL_NAME$1;
3487
+ var ITEM_NAME$1 = "ContextMenuItem", ContextMenuItem = React$1.forwardRef((s, d) => {
3488
+ let { __scopeContextMenu: C, ...w } = s;
3489
+ return /* @__PURE__ */ jsx(Item2$2, {
3490
+ ...useMenuScope$1(C),
3491
+ ...w,
3492
+ ref: d
3493
+ });
3494
+ });
3495
+ ContextMenuItem.displayName = ITEM_NAME$1;
3496
+ var CHECKBOX_ITEM_NAME$1 = "ContextMenuCheckboxItem", ContextMenuCheckboxItem = React$1.forwardRef((s, d) => {
3497
+ let { __scopeContextMenu: C, ...w } = s;
3498
+ return /* @__PURE__ */ jsx(CheckboxItem, {
3499
+ ...useMenuScope$1(C),
3500
+ ...w,
3501
+ ref: d
3502
+ });
3503
+ });
3504
+ ContextMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME$1;
3505
+ var RADIO_GROUP_NAME$1 = "ContextMenuRadioGroup", ContextMenuRadioGroup = React$1.forwardRef((s, d) => {
3506
+ let { __scopeContextMenu: C, ...w } = s;
3507
+ return /* @__PURE__ */ jsx(RadioGroup, {
3508
+ ...useMenuScope$1(C),
3509
+ ...w,
3510
+ ref: d
3511
+ });
3512
+ });
3513
+ ContextMenuRadioGroup.displayName = RADIO_GROUP_NAME$1;
3514
+ var RADIO_ITEM_NAME$1 = "ContextMenuRadioItem", ContextMenuRadioItem = React$1.forwardRef((s, d) => {
3515
+ let { __scopeContextMenu: C, ...w } = s;
3516
+ return /* @__PURE__ */ jsx(RadioItem, {
3517
+ ...useMenuScope$1(C),
3518
+ ...w,
3519
+ ref: d
3520
+ });
3521
+ });
3522
+ ContextMenuRadioItem.displayName = RADIO_ITEM_NAME$1;
3523
+ var INDICATOR_NAME$1 = "ContextMenuItemIndicator", ContextMenuItemIndicator = React$1.forwardRef((s, d) => {
3524
+ let { __scopeContextMenu: C, ...w } = s;
3525
+ return /* @__PURE__ */ jsx(ItemIndicator, {
3526
+ ...useMenuScope$1(C),
3527
+ ...w,
3528
+ ref: d
3529
+ });
3530
+ });
3531
+ ContextMenuItemIndicator.displayName = INDICATOR_NAME$1;
3532
+ var SEPARATOR_NAME$1 = "ContextMenuSeparator", ContextMenuSeparator = React$1.forwardRef((s, d) => {
3533
+ let { __scopeContextMenu: C, ...w } = s;
3534
+ return /* @__PURE__ */ jsx(Separator, {
3535
+ ...useMenuScope$1(C),
3536
+ ...w,
3537
+ ref: d
3538
+ });
3539
+ });
3540
+ ContextMenuSeparator.displayName = SEPARATOR_NAME$1;
3541
+ var ARROW_NAME$2 = "ContextMenuArrow", ContextMenuArrow = React$1.forwardRef((s, d) => {
3542
+ let { __scopeContextMenu: C, ...w } = s;
3543
+ return /* @__PURE__ */ jsx(Arrow2, {
3544
+ ...useMenuScope$1(C),
3545
+ ...w,
3546
+ ref: d
3547
+ });
3548
+ });
3549
+ ContextMenuArrow.displayName = ARROW_NAME$2;
3550
+ var SUB_NAME = "ContextMenuSub", ContextMenuSub = (s) => {
3551
+ let { __scopeContextMenu: d, children: C, onOpenChange: w, open: k, defaultOpen: F } = s, L = useMenuScope$1(d), [V, U] = useControllableState({
3552
+ prop: k,
3553
+ defaultProp: F ?? !1,
3554
+ onChange: w,
3555
+ caller: SUB_NAME
3556
+ });
3557
+ return /* @__PURE__ */ jsx(Sub, {
3558
+ ...L,
3559
+ open: V,
3560
+ onOpenChange: U,
3561
+ children: C
3562
+ });
3563
+ };
3564
+ ContextMenuSub.displayName = SUB_NAME;
3565
+ var SUB_TRIGGER_NAME$1 = "ContextMenuSubTrigger", ContextMenuSubTrigger = React$1.forwardRef((s, d) => {
3566
+ let { __scopeContextMenu: C, ...w } = s;
3567
+ return /* @__PURE__ */ jsx(SubTrigger, {
3568
+ ...useMenuScope$1(C),
3569
+ ...w,
3570
+ ref: d
3571
+ });
3572
+ });
3573
+ ContextMenuSubTrigger.displayName = SUB_TRIGGER_NAME$1;
3574
+ var SUB_CONTENT_NAME$1 = "ContextMenuSubContent", ContextMenuSubContent = React$1.forwardRef((s, d) => {
3575
+ let { __scopeContextMenu: C, ...w } = s;
3576
+ return /* @__PURE__ */ jsx(SubContent, {
3577
+ ...useMenuScope$1(C),
3578
+ ...w,
3579
+ ref: d,
3580
+ style: {
3581
+ ...s.style,
3582
+ "--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
3583
+ "--radix-context-menu-content-available-width": "var(--radix-popper-available-width)",
3584
+ "--radix-context-menu-content-available-height": "var(--radix-popper-available-height)",
3585
+ "--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)",
3586
+ "--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)"
3587
+ }
3588
+ });
3589
+ });
3590
+ ContextMenuSubContent.displayName = SUB_CONTENT_NAME$1;
3591
+ function whenTouchOrPen(s) {
3592
+ return (d) => d.pointerType === "mouse" ? void 0 : s(d);
3593
+ }
3594
+ var Root2$1 = ContextMenu, Trigger$1 = ContextMenuTrigger, Portal2$1 = ContextMenuPortal, Content2$1 = ContextMenuContent, Item2$1 = ContextMenuItem, Separator2$1 = ContextMenuSeparator, Sub2$1 = ContextMenuSub, SubTrigger2$1 = ContextMenuSubTrigger, SubContent2$1 = ContextMenuSubContent, DROPDOWN_MENU_NAME = "DropdownMenu", [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [createMenuScope]), useMenuScope = createMenuScope(), [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME), DropdownMenu = (d) => {
3378
3595
  let { __scopeDropdownMenu: C, children: w, dir: k, open: F, defaultOpen: L, onOpenChange: V, modal: U = !0 } = d, K = useMenuScope(C), q = React$1.useRef(null), [J, X] = useControllableState({
3379
3596
  prop: F,
3380
3597
  defaultProp: L ?? !1,
@@ -3441,7 +3658,7 @@ var PORTAL_NAME$1 = "DropdownMenuPortal", DropdownMenuPortal = (s) => {
3441
3658
  DropdownMenuPortal.displayName = PORTAL_NAME$1;
3442
3659
  var CONTENT_NAME$1 = "DropdownMenuContent", DropdownMenuContent = React$1.forwardRef((d, C) => {
3443
3660
  let { __scopeDropdownMenu: w, ...k } = d, F = useDropdownMenuContext(CONTENT_NAME$1, w), L = useMenuScope(w), V = React$1.useRef(!1);
3444
- return /* @__PURE__ */ jsx(Content2$1, {
3661
+ return /* @__PURE__ */ jsx(Content2$2, {
3445
3662
  id: F.contentId,
3446
3663
  "aria-labelledby": F.triggerId,
3447
3664
  ...L,
@@ -3485,7 +3702,7 @@ var LABEL_NAME = "DropdownMenuLabel", DropdownMenuLabel = React$1.forwardRef((s,
3485
3702
  DropdownMenuLabel.displayName = LABEL_NAME;
3486
3703
  var ITEM_NAME = "DropdownMenuItem", DropdownMenuItem = React$1.forwardRef((s, d) => {
3487
3704
  let { __scopeDropdownMenu: C, ...w } = s;
3488
- return /* @__PURE__ */ jsx(Item2$1, {
3705
+ return /* @__PURE__ */ jsx(Item2$2, {
3489
3706
  ...useMenuScope(C),
3490
3707
  ...w,
3491
3708
  ref: d
@@ -3593,35 +3810,35 @@ function useStateMachine(d, C) {
3593
3810
  return React$1.useReducer((s, d) => C[s][d] ?? s, d);
3594
3811
  }
3595
3812
  var SCROLL_AREA_NAME = "ScrollArea", [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME), [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME), ScrollArea = React$1.forwardRef((d, C) => {
3596
- let { __scopeScrollArea: w, type: k = "hover", dir: F, scrollHideDelay: L = 600, ...V } = d, [U, K] = React$1.useState(null), [q, J] = React$1.useState(null), [X, $] = React$1.useState(null), [PD, FD] = React$1.useState(null), [ID, LD] = React$1.useState(null), [RD, zD] = React$1.useState(0), [BD, VD] = React$1.useState(0), [HD, UD] = React$1.useState(!1), [GD, KD] = React$1.useState(!1), qD = useComposedRefs(C, (s) => K(s)), JD = useDirection(F);
3813
+ let { __scopeScrollArea: w, type: k = "hover", dir: F, scrollHideDelay: L = 600, ...V } = d, [U, K] = React$1.useState(null), [q, J] = React$1.useState(null), [X, $] = React$1.useState(null), [TO, EO] = React$1.useState(null), [DO, OO] = React$1.useState(null), [kO, AO] = React$1.useState(0), [jO, MO] = React$1.useState(0), [NO, FO] = React$1.useState(!1), [IO, LO] = React$1.useState(!1), RO = useComposedRefs(C, (s) => K(s)), zO = useDirection(F);
3597
3814
  return /* @__PURE__ */ jsx(ScrollAreaProvider, {
3598
3815
  scope: w,
3599
3816
  type: k,
3600
- dir: JD,
3817
+ dir: zO,
3601
3818
  scrollHideDelay: L,
3602
3819
  scrollArea: U,
3603
3820
  viewport: q,
3604
3821
  onViewportChange: J,
3605
3822
  content: X,
3606
3823
  onContentChange: $,
3607
- scrollbarX: PD,
3608
- onScrollbarXChange: FD,
3609
- scrollbarXEnabled: HD,
3610
- onScrollbarXEnabledChange: UD,
3611
- scrollbarY: ID,
3612
- onScrollbarYChange: LD,
3613
- scrollbarYEnabled: GD,
3614
- onScrollbarYEnabledChange: KD,
3615
- onCornerWidthChange: zD,
3616
- onCornerHeightChange: VD,
3824
+ scrollbarX: TO,
3825
+ onScrollbarXChange: EO,
3826
+ scrollbarXEnabled: NO,
3827
+ onScrollbarXEnabledChange: FO,
3828
+ scrollbarY: DO,
3829
+ onScrollbarYChange: OO,
3830
+ scrollbarYEnabled: IO,
3831
+ onScrollbarYEnabledChange: LO,
3832
+ onCornerWidthChange: AO,
3833
+ onCornerHeightChange: MO,
3617
3834
  children: /* @__PURE__ */ jsx(Primitive.div, {
3618
- dir: JD,
3835
+ dir: zO,
3619
3836
  ...V,
3620
- ref: qD,
3837
+ ref: RO,
3621
3838
  style: {
3622
3839
  position: "relative",
3623
- "--radix-scroll-area-corner-width": RD + "px",
3624
- "--radix-scroll-area-corner-height": BD + "px",
3840
+ "--radix-scroll-area-corner-width": kO + "px",
3841
+ "--radix-scroll-area-corner-height": jO + "px",
3625
3842
  ...d.style
3626
3843
  }
3627
3844
  })
@@ -3892,46 +4109,46 @@ var ScrollAreaScrollbarHover = React$1.forwardRef((d, C) => {
3892
4109
  }
3893
4110
  });
3894
4111
  }), [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME), ScrollAreaScrollbarImpl = React$1.forwardRef((d, C) => {
3895
- let { __scopeScrollArea: w, sizes: k, hasThumb: F, onThumbChange: L, onThumbPointerUp: V, onThumbPointerDown: U, onThumbPositionChange: K, onDragScroll: q, onWheelScroll: J, onResize: X, ...$ } = d, PD = useScrollAreaContext(SCROLLBAR_NAME, w), [FD, ID] = React$1.useState(null), LD = useComposedRefs(C, (s) => ID(s)), RD = React$1.useRef(null), zD = React$1.useRef(""), BD = PD.viewport, VD = k.content - k.viewport, HD = useCallbackRef(J), UD = useCallbackRef(K), GD = useDebounceCallback(X, 10);
3896
- function KD(s) {
3897
- RD.current && q({
3898
- x: s.clientX - RD.current.left,
3899
- y: s.clientY - RD.current.top
4112
+ let { __scopeScrollArea: w, sizes: k, hasThumb: F, onThumbChange: L, onThumbPointerUp: V, onThumbPointerDown: U, onThumbPositionChange: K, onDragScroll: q, onWheelScroll: J, onResize: X, ...$ } = d, TO = useScrollAreaContext(SCROLLBAR_NAME, w), [EO, DO] = React$1.useState(null), OO = useComposedRefs(C, (s) => DO(s)), kO = React$1.useRef(null), AO = React$1.useRef(""), jO = TO.viewport, MO = k.content - k.viewport, NO = useCallbackRef(J), FO = useCallbackRef(K), IO = useDebounceCallback(X, 10);
4113
+ function LO(s) {
4114
+ kO.current && q({
4115
+ x: s.clientX - kO.current.left,
4116
+ y: s.clientY - kO.current.top
3900
4117
  });
3901
4118
  }
3902
4119
  return React$1.useEffect(() => {
3903
4120
  let s = (s) => {
3904
4121
  let d = s.target;
3905
- FD?.contains(d) && HD(s, VD);
4122
+ EO?.contains(d) && NO(s, MO);
3906
4123
  };
3907
4124
  return document.addEventListener("wheel", s, { passive: !1 }), () => document.removeEventListener("wheel", s, { passive: !1 });
3908
4125
  }, [
3909
- BD,
3910
- FD,
3911
- VD,
3912
- HD
3913
- ]), React$1.useEffect(UD, [k, UD]), useResizeObserver(FD, GD), useResizeObserver(PD.content, GD), /* @__PURE__ */ jsx(ScrollbarProvider, {
4126
+ jO,
4127
+ EO,
4128
+ MO,
4129
+ NO
4130
+ ]), React$1.useEffect(FO, [k, FO]), useResizeObserver(EO, IO), useResizeObserver(TO.content, IO), /* @__PURE__ */ jsx(ScrollbarProvider, {
3914
4131
  scope: w,
3915
- scrollbar: FD,
4132
+ scrollbar: EO,
3916
4133
  hasThumb: F,
3917
4134
  onThumbChange: useCallbackRef(L),
3918
4135
  onThumbPointerUp: useCallbackRef(V),
3919
- onThumbPositionChange: UD,
4136
+ onThumbPositionChange: FO,
3920
4137
  onThumbPointerDown: useCallbackRef(U),
3921
4138
  children: /* @__PURE__ */ jsx(Primitive.div, {
3922
4139
  ...$,
3923
- ref: LD,
4140
+ ref: OO,
3924
4141
  style: {
3925
4142
  position: "absolute",
3926
4143
  ...$.style
3927
4144
  },
3928
4145
  onPointerDown: composeEventHandlers(d.onPointerDown, (s) => {
3929
- s.button === 0 && (s.target.setPointerCapture(s.pointerId), RD.current = FD.getBoundingClientRect(), zD.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", PD.viewport && (PD.viewport.style.scrollBehavior = "auto"), KD(s));
4146
+ s.button === 0 && (s.target.setPointerCapture(s.pointerId), kO.current = EO.getBoundingClientRect(), AO.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", TO.viewport && (TO.viewport.style.scrollBehavior = "auto"), LO(s));
3930
4147
  }),
3931
- onPointerMove: composeEventHandlers(d.onPointerMove, KD),
4148
+ onPointerMove: composeEventHandlers(d.onPointerMove, LO),
3932
4149
  onPointerUp: composeEventHandlers(d.onPointerUp, (s) => {
3933
4150
  let d = s.target;
3934
- d.hasPointerCapture(s.pointerId) && d.releasePointerCapture(s.pointerId), document.body.style.webkitUserSelect = zD.current, PD.viewport && (PD.viewport.style.scrollBehavior = ""), RD.current = null;
4151
+ d.hasPointerCapture(s.pointerId) && d.releasePointerCapture(s.pointerId), document.body.style.webkitUserSelect = AO.current, TO.viewport && (TO.viewport.style.scrollBehavior = ""), kO.current = null;
3935
4152
  })
3936
4153
  })
3937
4154
  });
@@ -4097,46 +4314,46 @@ var Root = ScrollArea, Viewport = ScrollAreaViewport, Scrollbar = ScrollAreaScro
4097
4314
  };
4098
4315
  TooltipProvider.displayName = PROVIDER_NAME;
4099
4316
  var TOOLTIP_NAME = "Tooltip", [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME), Tooltip = (d) => {
4100
- let { __scopeTooltip: C, children: w, open: k, defaultOpen: F, onOpenChange: L, disableHoverableContent: V, delayDuration: U } = d, K = useTooltipProviderContext(TOOLTIP_NAME, d.__scopeTooltip), q = usePopperScope(C), [J, X] = React$1.useState(null), $ = useId$1(), PD = React$1.useRef(0), FD = V ?? K.disableHoverableContent, ID = U ?? K.delayDuration, LD = React$1.useRef(!1), [RD, zD] = useControllableState({
4317
+ let { __scopeTooltip: C, children: w, open: k, defaultOpen: F, onOpenChange: L, disableHoverableContent: V, delayDuration: U } = d, K = useTooltipProviderContext(TOOLTIP_NAME, d.__scopeTooltip), q = usePopperScope(C), [J, X] = React$1.useState(null), $ = useId$1(), TO = React$1.useRef(0), EO = V ?? K.disableHoverableContent, DO = U ?? K.delayDuration, OO = React$1.useRef(!1), [kO, AO] = useControllableState({
4101
4318
  prop: k,
4102
4319
  defaultProp: F ?? !1,
4103
4320
  onChange: (s) => {
4104
4321
  s ? (K.onOpen(), document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))) : K.onClose(), L?.(s);
4105
4322
  },
4106
4323
  caller: TOOLTIP_NAME
4107
- }), BD = React$1.useMemo(() => RD ? LD.current ? "delayed-open" : "instant-open" : "closed", [RD]), VD = React$1.useCallback(() => {
4108
- window.clearTimeout(PD.current), PD.current = 0, LD.current = !1, zD(!0);
4109
- }, [zD]), HD = React$1.useCallback(() => {
4110
- window.clearTimeout(PD.current), PD.current = 0, zD(!1);
4111
- }, [zD]), UD = React$1.useCallback(() => {
4112
- window.clearTimeout(PD.current), PD.current = window.setTimeout(() => {
4113
- LD.current = !0, zD(!0), PD.current = 0;
4114
- }, ID);
4115
- }, [ID, zD]);
4324
+ }), jO = React$1.useMemo(() => kO ? OO.current ? "delayed-open" : "instant-open" : "closed", [kO]), MO = React$1.useCallback(() => {
4325
+ window.clearTimeout(TO.current), TO.current = 0, OO.current = !1, AO(!0);
4326
+ }, [AO]), NO = React$1.useCallback(() => {
4327
+ window.clearTimeout(TO.current), TO.current = 0, AO(!1);
4328
+ }, [AO]), FO = React$1.useCallback(() => {
4329
+ window.clearTimeout(TO.current), TO.current = window.setTimeout(() => {
4330
+ OO.current = !0, AO(!0), TO.current = 0;
4331
+ }, DO);
4332
+ }, [DO, AO]);
4116
4333
  return React$1.useEffect(() => () => {
4117
- PD.current &&= (window.clearTimeout(PD.current), 0);
4118
- }, []), /* @__PURE__ */ jsx(Root2$1, {
4334
+ TO.current &&= (window.clearTimeout(TO.current), 0);
4335
+ }, []), /* @__PURE__ */ jsx(Root2$2, {
4119
4336
  ...q,
4120
4337
  children: /* @__PURE__ */ jsx(TooltipContextProvider, {
4121
4338
  scope: C,
4122
4339
  contentId: $,
4123
- open: RD,
4124
- stateAttribute: BD,
4340
+ open: kO,
4341
+ stateAttribute: jO,
4125
4342
  trigger: J,
4126
4343
  onTriggerChange: X,
4127
4344
  onTriggerEnter: React$1.useCallback(() => {
4128
- K.isOpenDelayedRef.current ? UD() : VD();
4345
+ K.isOpenDelayedRef.current ? FO() : MO();
4129
4346
  }, [
4130
4347
  K.isOpenDelayedRef,
4131
- UD,
4132
- VD
4348
+ FO,
4349
+ MO
4133
4350
  ]),
4134
4351
  onTriggerLeave: React$1.useCallback(() => {
4135
- FD ? HD() : (window.clearTimeout(PD.current), PD.current = 0);
4136
- }, [HD, FD]),
4137
- onOpen: VD,
4138
- onClose: HD,
4139
- disableHoverableContent: FD,
4352
+ EO ? NO() : (window.clearTimeout(TO.current), TO.current = 0);
4353
+ }, [NO, EO]),
4354
+ onOpen: MO,
4355
+ onClose: NO,
4356
+ disableHoverableContent: EO,
4140
4357
  children: w
4141
4358
  })
4142
4359
  });
@@ -4203,7 +4420,7 @@ var CONTENT_NAME = "TooltipContent", TooltipContent = React$1.forwardRef((s, d)
4203
4420
  }), TooltipContentHoverable = React$1.forwardRef((d, C) => {
4204
4421
  let w = useTooltipContext(CONTENT_NAME, d.__scopeTooltip), k = useTooltipProviderContext(CONTENT_NAME, d.__scopeTooltip), F = React$1.useRef(null), L = useComposedRefs(C, F), [V, U] = React$1.useState(null), { trigger: K, onClose: q } = w, J = F.current, { onPointerInTransitChange: X } = k, $ = React$1.useCallback(() => {
4205
4422
  U(null), X(!1);
4206
- }, [X]), PD = React$1.useCallback((s, d) => {
4423
+ }, [X]), TO = React$1.useCallback((s, d) => {
4207
4424
  let C = s.currentTarget, w = {
4208
4425
  x: s.clientX,
4209
4426
  y: s.clientY
@@ -4212,7 +4429,7 @@ var CONTENT_NAME = "TooltipContent", TooltipContent = React$1.forwardRef((s, d)
4212
4429
  }, [X]);
4213
4430
  return React$1.useEffect(() => () => $(), [$]), React$1.useEffect(() => {
4214
4431
  if (K && J) {
4215
- let s = (s) => PD(s, J), d = (s) => PD(s, K);
4432
+ let s = (s) => TO(s, J), d = (s) => TO(s, K);
4216
4433
  return K.addEventListener("pointerleave", s), J.addEventListener("pointerleave", d), () => {
4217
4434
  K.removeEventListener("pointerleave", s), J.removeEventListener("pointerleave", d);
4218
4435
  };
@@ -4220,7 +4437,7 @@ var CONTENT_NAME = "TooltipContent", TooltipContent = React$1.forwardRef((s, d)
4220
4437
  }, [
4221
4438
  K,
4222
4439
  J,
4223
- PD,
4440
+ TO,
4224
4441
  $
4225
4442
  ]), React$1.useEffect(() => {
4226
4443
  if (V) {
@@ -4946,79 +5163,79 @@ R.displayName = "Theme";
4946
5163
  var I$2 = React$1.forwardRef((d, C) => {
4947
5164
  let { appearance: w = s$10.appearance.default, accentColor: k = s$10.accentColor.default, grayColor: F = s$10.grayColor.default, panelBackground: L = s$10.panelBackground.default, radius: V = s$10.radius.default, scaling: U = s$10.scaling.default, hasBackground: K = s$10.hasBackground.default, ...q } = d, [J, X] = React$1.useState(w);
4948
5165
  React$1.useEffect(() => X(w), [w]);
4949
- let [$, PD] = React$1.useState(k);
4950
- React$1.useEffect(() => PD(k), [k]);
4951
- let [FD, ID] = React$1.useState(F);
4952
- React$1.useEffect(() => ID(F), [F]);
4953
- let [LD, RD] = React$1.useState(L);
4954
- React$1.useEffect(() => RD(L), [L]);
4955
- let [zD, BD] = React$1.useState(V);
4956
- React$1.useEffect(() => BD(V), [V]);
4957
- let [VD, HD] = React$1.useState(U);
4958
- return React$1.useEffect(() => HD(U), [U]), React$1.createElement(A$1, {
5166
+ let [$, TO] = React$1.useState(k);
5167
+ React$1.useEffect(() => TO(k), [k]);
5168
+ let [EO, DO] = React$1.useState(F);
5169
+ React$1.useEffect(() => DO(F), [F]);
5170
+ let [OO, kO] = React$1.useState(L);
5171
+ React$1.useEffect(() => kO(L), [L]);
5172
+ let [AO, jO] = React$1.useState(V);
5173
+ React$1.useEffect(() => jO(V), [V]);
5174
+ let [MO, NO] = React$1.useState(U);
5175
+ return React$1.useEffect(() => NO(U), [U]), React$1.createElement(A$1, {
4959
5176
  ...q,
4960
5177
  ref: C,
4961
5178
  isRoot: !0,
4962
5179
  hasBackground: K,
4963
5180
  appearance: J,
4964
5181
  accentColor: $,
4965
- grayColor: FD,
4966
- panelBackground: LD,
4967
- radius: zD,
4968
- scaling: VD,
5182
+ grayColor: EO,
5183
+ panelBackground: OO,
5184
+ radius: AO,
5185
+ scaling: MO,
4969
5186
  onAppearanceChange: X,
4970
- onAccentColorChange: PD,
4971
- onGrayColorChange: ID,
4972
- onPanelBackgroundChange: RD,
4973
- onRadiusChange: BD,
4974
- onScalingChange: HD
5187
+ onAccentColorChange: TO,
5188
+ onGrayColorChange: DO,
5189
+ onPanelBackgroundChange: kO,
5190
+ onRadiusChange: jO,
5191
+ onScalingChange: NO
4975
5192
  });
4976
5193
  });
4977
5194
  I$2.displayName = "ThemeRoot";
4978
5195
  var A$1 = React$1.forwardRef((d, C) => {
4979
- let w = React$1.useContext(P), { asChild: k, isRoot: F, hasBackground: L, appearance: V = w?.appearance ?? s$10.appearance.default, accentColor: U = w?.accentColor ?? s$10.accentColor.default, grayColor: K = w?.resolvedGrayColor ?? s$10.grayColor.default, panelBackground: q = w?.panelBackground ?? s$10.panelBackground.default, radius: J = w?.radius ?? s$10.radius.default, scaling: X = w?.scaling ?? s$10.scaling.default, onAppearanceChange: $ = d$4, onAccentColorChange: PD = d$4, onGrayColorChange: FD = d$4, onPanelBackgroundChange: ID = d$4, onRadiusChange: LD = d$4, onScalingChange: RD = d$4, ...zD } = d, BD = k ? Slot$2 : "div", VD = K === "auto" ? a$8(U) : K, HD = d.appearance === "light" || d.appearance === "dark", UD = L === void 0 ? F || HD : L;
5196
+ let w = React$1.useContext(P), { asChild: k, isRoot: F, hasBackground: L, appearance: V = w?.appearance ?? s$10.appearance.default, accentColor: U = w?.accentColor ?? s$10.accentColor.default, grayColor: K = w?.resolvedGrayColor ?? s$10.grayColor.default, panelBackground: q = w?.panelBackground ?? s$10.panelBackground.default, radius: J = w?.radius ?? s$10.radius.default, scaling: X = w?.scaling ?? s$10.scaling.default, onAppearanceChange: $ = d$4, onAccentColorChange: TO = d$4, onGrayColorChange: EO = d$4, onPanelBackgroundChange: DO = d$4, onRadiusChange: OO = d$4, onScalingChange: kO = d$4, ...AO } = d, jO = k ? Slot$2 : "div", MO = K === "auto" ? a$8(U) : K, NO = d.appearance === "light" || d.appearance === "dark", PO = L === void 0 ? F || NO : L;
4980
5197
  return React$1.createElement(P.Provider, { value: React$1.useMemo(() => ({
4981
5198
  appearance: V,
4982
5199
  accentColor: U,
4983
5200
  grayColor: K,
4984
- resolvedGrayColor: VD,
5201
+ resolvedGrayColor: MO,
4985
5202
  panelBackground: q,
4986
5203
  radius: J,
4987
5204
  scaling: X,
4988
5205
  onAppearanceChange: $,
4989
- onAccentColorChange: PD,
4990
- onGrayColorChange: FD,
4991
- onPanelBackgroundChange: ID,
4992
- onRadiusChange: LD,
4993
- onScalingChange: RD
5206
+ onAccentColorChange: TO,
5207
+ onGrayColorChange: EO,
5208
+ onPanelBackgroundChange: DO,
5209
+ onRadiusChange: OO,
5210
+ onScalingChange: kO
4994
5211
  }), [
4995
5212
  V,
4996
5213
  U,
4997
5214
  K,
4998
- VD,
5215
+ MO,
4999
5216
  q,
5000
5217
  J,
5001
5218
  X,
5002
5219
  $,
5003
- PD,
5004
- FD,
5005
- ID,
5006
- LD,
5007
- RD
5008
- ]) }, React$1.createElement(BD, {
5220
+ TO,
5221
+ EO,
5222
+ DO,
5223
+ OO,
5224
+ kO
5225
+ ]) }, React$1.createElement(jO, {
5009
5226
  "data-is-root-theme": F ? "true" : "false",
5010
5227
  "data-accent-color": U,
5011
- "data-gray-color": VD,
5012
- "data-has-background": UD ? "true" : "false",
5228
+ "data-gray-color": MO,
5229
+ "data-has-background": PO ? "true" : "false",
5013
5230
  "data-panel-background": q,
5014
5231
  "data-radius": J,
5015
5232
  "data-scaling": X,
5016
5233
  ref: C,
5017
- ...zD,
5234
+ ...AO,
5018
5235
  className: (0, import_classnames$13.default)("radix-themes", {
5019
5236
  light: V === "light",
5020
5237
  dark: V === "dark"
5021
- }, zD.className)
5238
+ }, AO.className)
5022
5239
  }));
5023
5240
  });
5024
5241
  A$1.displayName = "ThemeImpl";
@@ -5669,16 +5886,16 @@ function S$1(s) {
5669
5886
  customProperties: ["--margin-bottom"],
5670
5887
  propValues: r$5,
5671
5888
  value: s.mb
5672
- }), [$, PD] = R$3({
5889
+ }), [$, TO] = R$3({
5673
5890
  className: "rt-r-ml",
5674
5891
  customProperties: ["--margin-left"],
5675
5892
  propValues: r$5,
5676
5893
  value: s.ml
5677
5894
  });
5678
- return [(0, import_classnames$6.default)(d, w, F, V, K, J, $), l$1(C, k, L, U, q, X, PD)];
5895
+ return [(0, import_classnames$6.default)(d, w, F, V, K, J, $), l$1(C, k, L, U, q, X, TO)];
5679
5896
  }
5680
5897
  var import_classnames$5 = /* @__PURE__ */ __toESM(require_classnames()), c = React$1.forwardRef((d, C) => {
5681
- let { rest: w, ...k } = a$3(d), [F, L] = S$1(k), { asChild: V, children: U, className: K, style: q, type: J, scrollHideDelay: X = J === "scroll" ? void 0 : 0, dir: $, size: PD = t$1.size.default, radius: FD = t$1.radius.default, scrollbars: ID = t$1.scrollbars.default, ...LD } = w;
5898
+ let { rest: w, ...k } = a$3(d), [F, L] = S$1(k), { asChild: V, children: U, className: K, style: q, type: J, scrollHideDelay: X = J === "scroll" ? void 0 : 0, dir: $, size: TO = t$1.size.default, radius: EO = t$1.radius.default, scrollbars: DO = t$1.scrollbars.default, ...OO } = w;
5682
5899
  return React$1.createElement(Root, {
5683
5900
  type: J,
5684
5901
  scrollHideDelay: X,
@@ -5689,26 +5906,26 @@ var import_classnames$5 = /* @__PURE__ */ __toESM(require_classnames()), c = Rea
5689
5906
  asChild: V,
5690
5907
  children: U
5691
5908
  }, (d) => React$1.createElement(React$1.Fragment, null, React$1.createElement(Viewport, {
5692
- ...LD,
5909
+ ...OO,
5693
5910
  ref: C,
5694
5911
  className: "rt-ScrollAreaViewport"
5695
- }, d), React$1.createElement("div", { className: "rt-ScrollAreaViewportFocusRing" }), ID === "vertical" ? null : React$1.createElement(Scrollbar, {
5696
- "data-radius": FD,
5912
+ }, d), React$1.createElement("div", { className: "rt-ScrollAreaViewportFocusRing" }), DO === "vertical" ? null : React$1.createElement(Scrollbar, {
5913
+ "data-radius": EO,
5697
5914
  orientation: "horizontal",
5698
5915
  className: (0, import_classnames$5.default)("rt-ScrollAreaScrollbar", g$2({
5699
5916
  className: "rt-r-size",
5700
- value: PD,
5917
+ value: TO,
5701
5918
  propValues: t$1.size.values
5702
5919
  }))
5703
- }, React$1.createElement(Thumb, { className: "rt-ScrollAreaThumb" })), ID === "horizontal" ? null : React$1.createElement(Scrollbar, {
5704
- "data-radius": FD,
5920
+ }, React$1.createElement(Thumb, { className: "rt-ScrollAreaThumb" })), DO === "horizontal" ? null : React$1.createElement(Scrollbar, {
5921
+ "data-radius": EO,
5705
5922
  orientation: "vertical",
5706
5923
  className: (0, import_classnames$5.default)("rt-ScrollAreaScrollbar", g$2({
5707
5924
  className: "rt-r-size",
5708
- value: PD,
5925
+ value: TO,
5709
5926
  propValues: t$1.size.values
5710
5927
  }))
5711
- }, React$1.createElement(Thumb, { className: "rt-ScrollAreaThumb" })), ID === "both" ? React$1.createElement(Corner, { className: "rt-ScrollAreaCorner" }) : null)));
5928
+ }, React$1.createElement(Thumb, { className: "rt-ScrollAreaThumb" })), DO === "both" ? React$1.createElement(Corner, { className: "rt-ScrollAreaCorner" }) : null)));
5712
5929
  });
5713
5930
  c.displayName = "ScrollArea";
5714
5931
  var n$1 = {
@@ -5739,7 +5956,7 @@ var n$1 = {
5739
5956
  modal: !0
5740
5957
  });
5741
5958
  s$2.displayName = "Dialog.Root";
5742
- var n$2 = React$1.forwardRef(({ children: d, ...C }, w) => React$1.createElement(Trigger$1, {
5959
+ var n$2 = React$1.forwardRef(({ children: d, ...C }, w) => React$1.createElement(Trigger$2, {
5743
5960
  ...C,
5744
5961
  ref: w,
5745
5962
  asChild: !0
@@ -6711,17 +6928,17 @@ function $e({ document: s, event: d, hitRegions: C, initialLayoutMap: w, mounted
6711
6928
  C.forEach((s) => {
6712
6929
  let { group: C, groupSize: U } = s, { disableCursor: K, orientation: q, panels: J } = C, X = 0;
6713
6930
  X = F ? q === "horizontal" ? (d.clientX - F.x) / U * 100 : (d.clientY - F.y) / U * 100 : q === "horizontal" ? d.clientX < 0 ? -100 : 100 : d.clientY < 0 ? -100 : 100;
6714
- let $ = w.get(C), { defaultLayoutDeferred: PD, derivedPanelConstraints: FD, layout: ID, separatorToPanels: LD } = k.get(C) ?? { defaultLayoutDeferred: !1 };
6715
- if (FD && $ && ID && LD) {
6931
+ let $ = w.get(C), { defaultLayoutDeferred: TO, derivedPanelConstraints: EO, layout: DO, separatorToPanels: OO } = k.get(C) ?? { defaultLayoutDeferred: !1 };
6932
+ if (EO && $ && DO && OO) {
6716
6933
  let d = Z({
6717
6934
  delta: X,
6718
6935
  initialLayout: $,
6719
- panelConstraints: FD,
6936
+ panelConstraints: EO,
6720
6937
  pivotIndices: s.panels.map((s) => J.indexOf(s)),
6721
- prevLayout: ID,
6938
+ prevLayout: DO,
6722
6939
  trigger: "mouse-or-touch"
6723
6940
  });
6724
- if (B(d, ID)) {
6941
+ if (B(d, DO)) {
6725
6942
  if (X !== 0 && !K) switch (q) {
6726
6943
  case "horizontal":
6727
6944
  L |= X < 0 ? De : Oe;
@@ -6732,10 +6949,10 @@ function $e({ document: s, event: d, hitRegions: C, initialLayoutMap: w, mounted
6732
6949
  }
6733
6950
  } else {
6734
6951
  V.set(s.group, {
6735
- defaultLayoutDeferred: PD,
6736
- derivedPanelConstraints: FD,
6952
+ defaultLayoutDeferred: TO,
6953
+ derivedPanelConstraints: EO,
6737
6954
  layout: d,
6738
- separatorToPanels: LD
6955
+ separatorToPanels: OO
6739
6956
  });
6740
6957
  let C = s.group.panels.map(({ id: s }) => s).join(",");
6741
6958
  s.group.inMemoryLayouts[C] = d;
@@ -6945,66 +7162,66 @@ function Pt(s, d) {
6945
7162
  });
6946
7163
  }
6947
7164
  function Rt({ children: s, className: d, defaultLayout: C, disableCursor: w, disabled: k, elementRef: F, groupRef: L, id: V, onLayoutChange: U, orientation: K = "horizontal", style: q, ...X }) {
6948
- let $ = useRef({}), PD = le((s) => {
7165
+ let $ = useRef({}), TO = le((s) => {
6949
7166
  B($.current, s) || ($.current = s, U?.(s));
6950
- }), FD = ae(V), zD = useRef(null), [BD, VD] = useState(!1), [HD, UD] = useState(C ?? {}), [GD, KD] = wt(), qD = useRef({
7167
+ }), EO = ae(V), AO = useRef(null), [jO, MO] = useState(!1), [NO, FO] = useState(C ?? {}), [IO, LO] = wt(), RO = useRef({
6951
7168
  lastExpandedPanelSizes: {},
6952
7169
  layouts: {},
6953
7170
  panels: [],
6954
7171
  separators: []
6955
- }), JD = ue(zD, F);
6956
- Pt(FD, L);
6957
- let YD = useMemo(() => ({
6958
- id: FD,
7172
+ }), zO = ue(AO, F);
7173
+ Pt(EO, L);
7174
+ let BO = useMemo(() => ({
7175
+ id: EO,
6959
7176
  orientation: K,
6960
7177
  registerPanel: (s) => {
6961
- let d = qD.current;
6962
- return d.panels = ie(K, [...d.panels, s]), KD(), () => {
6963
- d.panels = d.panels.filter((d) => d !== s), KD();
7178
+ let d = RO.current;
7179
+ return d.panels = ie(K, [...d.panels, s]), LO(), () => {
7180
+ d.panels = d.panels.filter((d) => d !== s), LO();
6964
7181
  };
6965
7182
  },
6966
7183
  registerSeparator: (s) => {
6967
- let d = qD.current;
6968
- return d.separators = ie(K, [...d.separators, s]), KD(), () => {
6969
- d.separators = d.separators.filter((d) => d !== s), KD();
7184
+ let d = RO.current;
7185
+ return d.separators = ie(K, [...d.separators, s]), LO(), () => {
7186
+ d.separators = d.separators.filter((d) => d !== s), LO();
6970
7187
  };
6971
7188
  }
6972
7189
  }), [
6973
- FD,
6974
- KD,
7190
+ EO,
7191
+ LO,
6975
7192
  K
6976
- ]), XD = Lt({
7193
+ ]), VO = Lt({
6977
7194
  defaultLayout: C,
6978
7195
  disableCursor: w
6979
- }), ZD = useRef(null);
7196
+ }), HO = useRef(null);
6980
7197
  A(() => {
6981
- let s = zD.current;
7198
+ let s = AO.current;
6982
7199
  if (s === null) return;
6983
- let d = qD.current, C = {
6984
- defaultLayout: XD.defaultLayout,
6985
- disableCursor: !!XD.disableCursor,
7200
+ let d = RO.current, C = {
7201
+ defaultLayout: VO.defaultLayout,
7202
+ disableCursor: !!VO.disableCursor,
6986
7203
  disabled: !!k,
6987
7204
  element: s,
6988
- id: FD,
6989
- inMemoryLastExpandedPanelSizes: qD.current.lastExpandedPanelSizes,
6990
- inMemoryLayouts: qD.current.layouts,
7205
+ id: EO,
7206
+ inMemoryLastExpandedPanelSizes: RO.current.lastExpandedPanelSizes,
7207
+ inMemoryLayouts: RO.current.layouts,
6991
7208
  orientation: K,
6992
7209
  panels: d.panels,
6993
7210
  separators: d.separators
6994
7211
  };
6995
- ZD.current = C;
7212
+ HO.current = C;
6996
7213
  let w = bt(C), F = D().mountedGroups.get(C);
6997
7214
  if (F) {
6998
7215
  let { defaultLayoutDeferred: s, derivedPanelConstraints: d, layout: C } = F;
6999
- !s && d.length > 0 && (UD(C), PD?.(C));
7216
+ !s && d.length > 0 && (FO(C), TO?.(C));
7000
7217
  }
7001
7218
  let L = T.addListener("interactionStateChange", (s) => {
7002
7219
  switch (s.state) {
7003
7220
  case "active":
7004
- VD(s.hitRegions.some((s) => s.group === C));
7221
+ MO(s.hitRegions.some((s) => s.group === C));
7005
7222
  break;
7006
7223
  default:
7007
- VD(!1);
7224
+ MO(!1);
7008
7225
  break;
7009
7226
  }
7010
7227
  }), V = T.addListener("mountedGroupsChange", (s) => {
@@ -7012,44 +7229,44 @@ function Rt({ children: s, className: d, defaultLayout: C, disableCursor: w, dis
7012
7229
  if (d) {
7013
7230
  let { defaultLayoutDeferred: s, derivedPanelConstraints: C, layout: w } = d;
7014
7231
  if (s || C.length === 0) return;
7015
- UD(w), PD?.(w);
7232
+ FO(w), TO?.(w);
7016
7233
  }
7017
7234
  });
7018
7235
  return () => {
7019
- ZD.current = null, w(), L(), V();
7236
+ HO.current = null, w(), L(), V();
7020
7237
  };
7021
7238
  }, [
7022
7239
  k,
7023
- FD,
7024
- PD,
7240
+ EO,
7241
+ TO,
7025
7242
  K,
7026
- GD,
7027
- XD
7243
+ IO,
7244
+ VO
7028
7245
  ]), useEffect(() => {
7029
- let s = ZD.current;
7246
+ let s = HO.current;
7030
7247
  s && (s.defaultLayout = C, s.disableCursor = !!w);
7031
7248
  });
7032
- let QD = { [Fe]: BD ? "none" : void 0 };
7033
- for (let s in HD) {
7034
- let d = Ve(FD, s);
7035
- QD[d] = HD[s];
7249
+ let UO = { [Fe]: jO ? "none" : void 0 };
7250
+ for (let s in NO) {
7251
+ let d = Ve(EO, s);
7252
+ UO[d] = NO[s];
7036
7253
  }
7037
7254
  return /* @__PURE__ */ jsx(je.Provider, {
7038
- value: YD,
7255
+ value: BO,
7039
7256
  children: /* @__PURE__ */ jsx("div", {
7040
7257
  ...X,
7041
7258
  "aria-orientation": K,
7042
7259
  className: d,
7043
7260
  "data-group": !0,
7044
- "data-testid": FD,
7045
- id: FD,
7046
- ref: JD,
7261
+ "data-testid": EO,
7262
+ id: EO,
7263
+ ref: zO,
7047
7264
  style: {
7048
7265
  height: "100%",
7049
7266
  width: "100%",
7050
7267
  overflow: "hidden",
7051
7268
  ...q,
7052
- ...QD,
7269
+ ...UO,
7053
7270
  display: "flex",
7054
7271
  flexDirection: K === "horizontal" ? "row" : "column",
7055
7272
  flexWrap: "nowrap"
@@ -7167,20 +7384,20 @@ function It(s, d) {
7167
7384
  });
7168
7385
  }
7169
7386
  function kt({ children: s, className: d, collapsedSize: C = "0%", collapsible: w = !1, defaultSize: k, elementRef: F, id: L, maxSize: V = "100%", minSize: U = "0%", onResize: K, panelRef: q, style: J, ...X }) {
7170
- let $ = !!L, PD = ae(L), FD = useRef(null), ID = ue(FD, F), { id: RD, registerPanel: zD } = ce(), BD = K !== null, VD = le((s, d, C) => {
7387
+ let $ = !!L, TO = ae(L), EO = useRef(null), DO = ue(EO, F), { id: kO, registerPanel: AO } = ce(), jO = K !== null, MO = le((s, d, C) => {
7171
7388
  K?.(s, L, C);
7172
7389
  });
7173
7390
  A(() => {
7174
- let s = FD.current;
7175
- if (s !== null) return zD({
7391
+ let s = EO.current;
7392
+ if (s !== null) return AO({
7176
7393
  element: s,
7177
- id: PD,
7394
+ id: TO,
7178
7395
  idIsStable: $,
7179
7396
  mutableValues: {
7180
7397
  expandToSize: void 0,
7181
7398
  prevSize: void 0
7182
7399
  },
7183
- onResize: BD ? VD : void 0,
7400
+ onResize: jO ? MO : void 0,
7184
7401
  panelConstraints: {
7185
7402
  collapsedSize: C,
7186
7403
  collapsible: w,
@@ -7193,25 +7410,25 @@ function kt({ children: s, className: d, collapsedSize: C = "0%", collapsible: w
7193
7410
  C,
7194
7411
  w,
7195
7412
  k,
7196
- BD,
7197
- PD,
7413
+ jO,
7414
+ TO,
7198
7415
  $,
7199
7416
  V,
7200
7417
  U,
7201
- VD,
7202
- zD
7203
- ]), It(PD, q);
7204
- let HD = Ve(RD, PD);
7418
+ MO,
7419
+ AO
7420
+ ]), It(TO, q);
7421
+ let NO = Ve(kO, TO);
7205
7422
  return /* @__PURE__ */ jsx("div", {
7206
7423
  ...X,
7207
7424
  "data-panel": !0,
7208
- "data-testid": PD,
7209
- id: PD,
7210
- ref: ID,
7425
+ "data-testid": TO,
7426
+ id: TO,
7427
+ ref: DO,
7211
7428
  style: {
7212
7429
  ...Gt,
7213
7430
  flexBasis: 0,
7214
- flexGrow: `var(${HD}, 1)`,
7431
+ flexGrow: `var(${NO}, 1)`,
7215
7432
  flexShrink: 1,
7216
7433
  overflow: "hidden",
7217
7434
  pointerEvents: `var(${Fe})`
@@ -7274,14 +7491,14 @@ function Dt({ layout: s, panelConstraints: d, panelId: C, panelIndex: w }) {
7274
7491
  };
7275
7492
  }
7276
7493
  function Ot({ children: s, className: d, elementRef: C, id: w, style: k, ...F }) {
7277
- let L = ae(w), [V, U] = useState({}), [K, q] = useState("inactive"), J = useRef(null), X = ue(J, C), { id: $, orientation: PD, registerSeparator: FD } = ce(), ID = PD === "horizontal" ? "vertical" : "horizontal";
7494
+ let L = ae(w), [V, U] = useState({}), [K, q] = useState("inactive"), J = useRef(null), X = ue(J, C), { id: $, orientation: TO, registerSeparator: EO } = ce(), DO = TO === "horizontal" ? "vertical" : "horizontal";
7278
7495
  return A(() => {
7279
7496
  let s = J.current;
7280
7497
  if (s !== null) {
7281
7498
  let d = {
7282
7499
  element: s,
7283
7500
  id: L
7284
- }, C = FD(d), w = T.addListener("interactionStateChange", (s) => {
7501
+ }, C = EO(d), w = T.addListener("interactionStateChange", (s) => {
7285
7502
  q(s.state !== "inactive" && s.hitRegions.some((s) => s.separator === d) ? s.state : "inactive");
7286
7503
  }), k = T.addListener("mountedGroupsChange", (s) => {
7287
7504
  s.forEach(({ derivedPanelConstraints: s, layout: C, separatorToPanels: w }, k) => {
@@ -7306,11 +7523,11 @@ function Ot({ children: s, className: d, elementRef: C, id: w, style: k, ...F })
7306
7523
  }, [
7307
7524
  $,
7308
7525
  L,
7309
- FD
7526
+ EO
7310
7527
  ]), /* @__PURE__ */ jsx("div", {
7311
7528
  ...F,
7312
7529
  "aria-controls": V.valueControls,
7313
- "aria-orientation": ID,
7530
+ "aria-orientation": DO,
7314
7531
  "aria-valuemax": V.valueMax,
7315
7532
  "aria-valuemin": V.valueMin,
7316
7533
  "aria-valuenow": V.valueNow,
@@ -7337,7 +7554,21 @@ function _objectWithoutPropertiesLoose(s, d) {
7337
7554
  for (F = 0; F < w.length; F++) k = w[F], !(d.indexOf(k) >= 0) && (C[k] = s[k]);
7338
7555
  return C;
7339
7556
  }
7340
- var _excluded$Y = ["color"], ChevronRightIcon = /* @__PURE__ */ forwardRef(function(s, d) {
7557
+ var _excluded$T = ["color"], CheckIcon = /* @__PURE__ */ forwardRef(function(s, d) {
7558
+ var C = s.color, w = C === void 0 ? "currentColor" : C, k = _objectWithoutPropertiesLoose(s, _excluded$T);
7559
+ return createElement("svg", Object.assign({
7560
+ width: "15",
7561
+ height: "15",
7562
+ viewBox: "0 0 15 15",
7563
+ fill: "none",
7564
+ xmlns: "http://www.w3.org/2000/svg"
7565
+ }, k, { ref: d }), createElement("path", {
7566
+ d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
7567
+ fill: w,
7568
+ fillRule: "evenodd",
7569
+ clipRule: "evenodd"
7570
+ }));
7571
+ }), _excluded$Y = ["color"], ChevronRightIcon = /* @__PURE__ */ forwardRef(function(s, d) {
7341
7572
  var C = s.color, w = C === void 0 ? "currentColor" : C, k = _objectWithoutPropertiesLoose(s, _excluded$Y);
7342
7573
  return createElement("svg", Object.assign({
7343
7574
  width: "15",
@@ -7536,7 +7767,7 @@ const EditorProvider = ({ children: s, isList: C = !1, availableProps: w = [], t
7536
7767
  mockData: s,
7537
7768
  singleMockData: d
7538
7769
  }));
7539
- }, []), PD = React.useCallback((s) => {
7770
+ }, []), TO = React.useCallback((s) => {
7540
7771
  L((d) => ({
7541
7772
  ...d,
7542
7773
  listSettings: {
@@ -7544,7 +7775,7 @@ const EditorProvider = ({ children: s, isList: C = !1, availableProps: w = [], t
7544
7775
  ...s
7545
7776
  }
7546
7777
  }));
7547
- }, []), FD = React.useMemo(() => ({
7778
+ }, []), EO = React.useMemo(() => ({
7548
7779
  state: F,
7549
7780
  addElement: U,
7550
7781
  removeElement: K,
@@ -7552,7 +7783,7 @@ const EditorProvider = ({ children: s, isList: C = !1, availableProps: w = [], t
7552
7783
  moveElement: J,
7553
7784
  updateElement: X,
7554
7785
  setMockData: $,
7555
- updateListSettings: PD,
7786
+ updateListSettings: TO,
7556
7787
  loadState: V
7557
7788
  }), [
7558
7789
  F,
@@ -7562,11 +7793,11 @@ const EditorProvider = ({ children: s, isList: C = !1, availableProps: w = [], t
7562
7793
  J,
7563
7794
  X,
7564
7795
  $,
7565
- PD,
7796
+ TO,
7566
7797
  V
7567
7798
  ]);
7568
7799
  return /* @__PURE__ */ jsx(EditorContext.Provider, {
7569
- value: FD,
7800
+ value: EO,
7570
7801
  children: s
7571
7802
  });
7572
7803
  }, useEditor = () => {
@@ -7859,16 +8090,16 @@ var __assign$1 = function() {
7859
8090
  maxHeight: d
7860
8091
  };
7861
8092
  }, d.prototype.calculateNewSizeFromDirection = function(s, d) {
7862
- var C = this.props.scale || 1, w = normalizeToPair(this.props.resizeRatio || 1), k = w[0], F = w[1], L = this.state, V = L.direction, U = L.original, K = this.props, q = K.lockAspectRatio, J = K.lockAspectRatioExtraHeight, X = K.lockAspectRatioExtraWidth, $ = U.width, PD = U.height, FD = J || 0, ID = X || 0;
7863
- return hasDirection("right", V) && ($ = U.width + (s - U.x) * k / C, q && (PD = ($ - ID) / this.ratio + FD)), hasDirection("left", V) && ($ = U.width - (s - U.x) * k / C, q && (PD = ($ - ID) / this.ratio + FD)), hasDirection("bottom", V) && (PD = U.height + (d - U.y) * F / C, q && ($ = (PD - FD) * this.ratio + ID)), hasDirection("top", V) && (PD = U.height - (d - U.y) * F / C, q && ($ = (PD - FD) * this.ratio + ID)), {
8093
+ var C = this.props.scale || 1, w = normalizeToPair(this.props.resizeRatio || 1), k = w[0], F = w[1], L = this.state, V = L.direction, U = L.original, K = this.props, q = K.lockAspectRatio, J = K.lockAspectRatioExtraHeight, X = K.lockAspectRatioExtraWidth, $ = U.width, TO = U.height, EO = J || 0, DO = X || 0;
8094
+ return hasDirection("right", V) && ($ = U.width + (s - U.x) * k / C, q && (TO = ($ - DO) / this.ratio + EO)), hasDirection("left", V) && ($ = U.width - (s - U.x) * k / C, q && (TO = ($ - DO) / this.ratio + EO)), hasDirection("bottom", V) && (TO = U.height + (d - U.y) * F / C, q && ($ = (TO - EO) * this.ratio + DO)), hasDirection("top", V) && (TO = U.height - (d - U.y) * F / C, q && ($ = (TO - EO) * this.ratio + DO)), {
7864
8095
  newWidth: $,
7865
- newHeight: PD
8096
+ newHeight: TO
7866
8097
  };
7867
8098
  }, d.prototype.calculateNewSizeFromAspectRatio = function(s, d, C, w) {
7868
8099
  var k = this.props, F = k.lockAspectRatio, L = k.lockAspectRatioExtraHeight, V = k.lockAspectRatioExtraWidth, U = w.width === void 0 ? 10 : w.width, K = C.width === void 0 || C.width < 0 ? s : C.width, q = w.height === void 0 ? 10 : w.height, J = C.height === void 0 || C.height < 0 ? d : C.height, X = L || 0, $ = V || 0;
7869
8100
  if (F) {
7870
- var PD = (q - X) * this.ratio + $, FD = (J - X) * this.ratio + $, ID = (U - $) / this.ratio + X, LD = (K - $) / this.ratio + X, RD = Math.max(U, PD), zD = Math.min(K, FD), BD = Math.max(q, ID), VD = Math.min(J, LD);
7871
- s = clamp$1(s, RD, zD), d = clamp$1(d, BD, VD);
8101
+ var TO = (q - X) * this.ratio + $, EO = (J - X) * this.ratio + $, DO = (U - $) / this.ratio + X, OO = (K - $) / this.ratio + X, kO = Math.max(U, TO), AO = Math.min(K, EO), jO = Math.max(q, DO), MO = Math.min(J, OO);
8102
+ s = clamp$1(s, kO, AO), d = clamp$1(d, jO, MO);
7872
8103
  } else s = clamp$1(s, U, K), d = clamp$1(d, q, J);
7873
8104
  return {
7874
8105
  newWidth: s,
@@ -7923,58 +8154,58 @@ var __assign$1 = function() {
7923
8154
  if (this.window.TouchEvent && isTouchEvent(s)) try {
7924
8155
  s.preventDefault(), s.stopPropagation();
7925
8156
  } catch {}
7926
- var C = this.props, w = C.maxWidth, k = C.maxHeight, F = C.minWidth, L = C.minHeight, V = isTouchEvent(s) ? s.touches[0].clientX : s.clientX, U = isTouchEvent(s) ? s.touches[0].clientY : s.clientY, K = this.state, q = K.direction, J = K.original, X = K.width, $ = K.height, PD = this.getParentSize(), FD = calculateNewMax(PD, this.window.innerWidth, this.window.innerHeight, w, k, F, L);
7927
- w = FD.maxWidth, k = FD.maxHeight, F = FD.minWidth, L = FD.minHeight;
7928
- var ID = this.calculateNewSizeFromDirection(V, U), LD = ID.newHeight, RD = ID.newWidth, zD = this.calculateNewMaxFromBoundary(w, k);
7929
- this.props.snap && this.props.snap.x && (RD = findClosestSnap(RD, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (LD = findClosestSnap(LD, this.props.snap.y, this.props.snapGap));
7930
- var BD = this.calculateNewSizeFromAspectRatio(RD, LD, {
7931
- width: zD.maxWidth,
7932
- height: zD.maxHeight
8157
+ var C = this.props, w = C.maxWidth, k = C.maxHeight, F = C.minWidth, L = C.minHeight, V = isTouchEvent(s) ? s.touches[0].clientX : s.clientX, U = isTouchEvent(s) ? s.touches[0].clientY : s.clientY, K = this.state, q = K.direction, J = K.original, X = K.width, $ = K.height, TO = this.getParentSize(), EO = calculateNewMax(TO, this.window.innerWidth, this.window.innerHeight, w, k, F, L);
8158
+ w = EO.maxWidth, k = EO.maxHeight, F = EO.minWidth, L = EO.minHeight;
8159
+ var DO = this.calculateNewSizeFromDirection(V, U), OO = DO.newHeight, kO = DO.newWidth, AO = this.calculateNewMaxFromBoundary(w, k);
8160
+ this.props.snap && this.props.snap.x && (kO = findClosestSnap(kO, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (OO = findClosestSnap(OO, this.props.snap.y, this.props.snapGap));
8161
+ var jO = this.calculateNewSizeFromAspectRatio(kO, OO, {
8162
+ width: AO.maxWidth,
8163
+ height: AO.maxHeight
7933
8164
  }, {
7934
8165
  width: F,
7935
8166
  height: L
7936
8167
  });
7937
- if (RD = BD.newWidth, LD = BD.newHeight, this.props.grid) {
7938
- var VD = snap(RD, this.props.grid[0], this.props.gridGap ? this.props.gridGap[0] : 0), UD = snap(LD, this.props.grid[1], this.props.gridGap ? this.props.gridGap[1] : 0), WD = this.props.snapGap || 0, GD = WD === 0 || Math.abs(VD - RD) <= WD ? VD : RD, KD = WD === 0 || Math.abs(UD - LD) <= WD ? UD : LD;
7939
- RD = GD, LD = KD;
8168
+ if (kO = jO.newWidth, OO = jO.newHeight, this.props.grid) {
8169
+ var NO = snap(kO, this.props.grid[0], this.props.gridGap ? this.props.gridGap[0] : 0), PO = snap(OO, this.props.grid[1], this.props.gridGap ? this.props.gridGap[1] : 0), FO = this.props.snapGap || 0, IO = FO === 0 || Math.abs(NO - kO) <= FO ? NO : kO, LO = FO === 0 || Math.abs(PO - OO) <= FO ? PO : OO;
8170
+ kO = IO, OO = LO;
7940
8171
  }
7941
- var qD = {
7942
- width: RD - J.width,
7943
- height: LD - J.height
8172
+ var RO = {
8173
+ width: kO - J.width,
8174
+ height: OO - J.height
7944
8175
  };
7945
- if (this.delta = qD, X && typeof X == "string") {
8176
+ if (this.delta = RO, X && typeof X == "string") {
7946
8177
  if (X.endsWith("%")) {
7947
- var JD = RD / PD.width * 100;
7948
- RD = `${JD}%`;
8178
+ var zO = kO / TO.width * 100;
8179
+ kO = `${zO}%`;
7949
8180
  } else if (X.endsWith("vw")) {
7950
- var YD = RD / this.window.innerWidth * 100;
7951
- RD = `${YD}vw`;
8181
+ var BO = kO / this.window.innerWidth * 100;
8182
+ kO = `${BO}vw`;
7952
8183
  } else if (X.endsWith("vh")) {
7953
- var XD = RD / this.window.innerHeight * 100;
7954
- RD = `${XD}vh`;
8184
+ var VO = kO / this.window.innerHeight * 100;
8185
+ kO = `${VO}vh`;
7955
8186
  }
7956
8187
  }
7957
8188
  if ($ && typeof $ == "string") {
7958
8189
  if ($.endsWith("%")) {
7959
- var JD = LD / PD.height * 100;
7960
- LD = `${JD}%`;
8190
+ var zO = OO / TO.height * 100;
8191
+ OO = `${zO}%`;
7961
8192
  } else if ($.endsWith("vw")) {
7962
- var YD = LD / this.window.innerWidth * 100;
7963
- LD = `${YD}vw`;
8193
+ var BO = OO / this.window.innerWidth * 100;
8194
+ OO = `${BO}vw`;
7964
8195
  } else if ($.endsWith("vh")) {
7965
- var XD = LD / this.window.innerHeight * 100;
7966
- LD = `${XD}vh`;
8196
+ var VO = OO / this.window.innerHeight * 100;
8197
+ OO = `${VO}vh`;
7967
8198
  }
7968
8199
  }
7969
- var ZD = {
7970
- width: this.createSizeForCssProperty(RD, "width"),
7971
- height: this.createSizeForCssProperty(LD, "height")
8200
+ var HO = {
8201
+ width: this.createSizeForCssProperty(kO, "width"),
8202
+ height: this.createSizeForCssProperty(OO, "height")
7972
8203
  };
7973
- this.flexDir === "row" ? ZD.flexBasis = ZD.width : this.flexDir === "column" && (ZD.flexBasis = ZD.height);
7974
- var QD = this.state.width !== ZD.width, $D = this.state.height !== ZD.height, eO = this.state.flexBasis !== ZD.flexBasis, tO = QD || $D || eO;
7975
- tO && flushSync(function() {
7976
- d.setState(ZD);
7977
- }), this.props.onResize && tO && this.props.onResize(s, q, this.resizable, qD);
8204
+ this.flexDir === "row" ? HO.flexBasis = HO.width : this.flexDir === "column" && (HO.flexBasis = HO.height);
8205
+ var UO = this.state.width !== HO.width, WO = this.state.height !== HO.height, GO = this.state.flexBasis !== HO.flexBasis, KO = UO || WO || GO;
8206
+ KO && flushSync(function() {
8207
+ d.setState(HO);
8208
+ }), this.props.onResize && KO && this.props.onResize(s, q, this.resizable, RO);
7978
8209
  }
7979
8210
  }, d.prototype.onMouseUp = function(s) {
7980
8211
  var d = this.state, C = d.isResizing, w = d.direction;
@@ -8057,65 +8288,30 @@ var __assign$1 = function() {
8057
8288
  resizeRatio: 1,
8058
8289
  snapGap: 0
8059
8290
  }, d;
8060
- }(PureComponent), MenuItem = ({ children: s, onClick: d, rightSlot: C, style: w, className: k }) => /* @__PURE__ */ jsxs("div", {
8061
- className: `custom-menu-item ${k || ""}`,
8062
- onClick: (s) => {
8063
- s.stopPropagation(), d && d();
8064
- },
8065
- style: w,
8066
- children: [s, C && /* @__PURE__ */ jsx("div", {
8067
- className: "custom-menu-right-slot",
8068
- children: C
8069
- })]
8070
- }), MenuSeparator = () => /* @__PURE__ */ jsx("div", { className: "custom-menu-separator" }), SubMenu = ({ label: s, children: d, scrollable: C }) => /* @__PURE__ */ jsxs("div", {
8071
- className: "custom-menu-item",
8072
- children: [
8073
- s,
8074
- /* @__PURE__ */ jsx("div", {
8075
- className: "custom-menu-right-slot",
8076
- children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8077
- }),
8078
- /* @__PURE__ */ jsx("div", {
8079
- className: `custom-submenu ${C ? "scrollable" : ""}`,
8080
- children: d
8081
- })
8082
- ]
8083
- });
8291
+ }(PureComponent);
8084
8292
  const ElementContextMenu = ({ children: s, element: d }) => {
8085
- let { updateElement: C, removeElement: w, addElement: k, moveElement: F, state: L } = useEditor(), [V, U] = useState(null), [K, q] = useState(!1), [X, $] = useState(!1), [PD, FD] = useState(d.content), [ID, zD] = useState(d.dataBinding || ""), BD = useRef(null), HD = useRef(null);
8086
- useEffect(() => {
8087
- let s = () => U(null);
8088
- return window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), () => {
8089
- window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s);
8090
- };
8091
- }, []);
8092
- let KD = (s) => {
8093
- s.preventDefault(), s.stopPropagation(), U({
8094
- x: s.clientX,
8095
- y: s.clientY
8096
- });
8097
- }, qD = () => U(null), JD = (s) => {
8098
- let d = BD.current;
8293
+ let { updateElement: C, removeElement: w, addElement: k, moveElement: F, state: L } = useEditor(), [V, U] = useState(!1), [K, q] = useState(!1), [J, X] = useState(d.content), [$, TO] = useState(d.dataBinding || ""), EO = useRef(null), DO = useRef(null), AO = (s) => {
8294
+ let d = EO.current;
8099
8295
  if (d) {
8100
- let C = d.selectionStart, w = d.selectionEnd, k = PD;
8101
- FD(k.substring(0, C) + `{{${s}}}` + k.substring(w)), setTimeout(() => {
8296
+ let C = d.selectionStart, w = d.selectionEnd, k = J;
8297
+ X(k.substring(0, C) + `{{${s}}}` + k.substring(w)), setTimeout(() => {
8102
8298
  d.focus();
8103
8299
  let w = C + s.length + 4;
8104
8300
  d.setSelectionRange(w, w);
8105
8301
  }, 0);
8106
- } else FD((d) => d + `{{${s}}}`);
8107
- }, YD = (s) => {
8302
+ } else X((d) => d + `{{${s}}}`);
8303
+ }, jO = (s) => {
8108
8304
  C(d.id, { style: {
8109
8305
  ...d.style,
8110
8306
  ...s
8111
- } }), qD();
8112
- }, XD = () => {
8307
+ } });
8308
+ }, MO = () => {
8113
8309
  let s = L.elements.findIndex((s) => s.id === d.id);
8114
- s < L.elements.length - 1 && F(s, L.elements.length - 1), qD();
8115
- }, ZD = () => {
8310
+ s < L.elements.length - 1 && F(s, L.elements.length - 1);
8311
+ }, IO = () => {
8116
8312
  let s = L.elements.findIndex((s) => s.id === d.id);
8117
- s > 0 && F(s, 0), qD();
8118
- }, QD = () => {
8313
+ s > 0 && F(s, 0);
8314
+ }, LO = () => {
8119
8315
  k({
8120
8316
  type: d.type,
8121
8317
  content: d.content,
@@ -8124,8 +8320,8 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8124
8320
  width: d.width,
8125
8321
  height: d.height,
8126
8322
  style: d.style
8127
- }), qD();
8128
- }, $D = [
8323
+ });
8324
+ }, RO = [
8129
8325
  "#000000",
8130
8326
  "#FFFFFF",
8131
8327
  "#FF0000",
@@ -8137,14 +8333,9 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8137
8333
  "transparent"
8138
8334
  ];
8139
8335
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
8140
- /* @__PURE__ */ jsx("div", {
8141
- onContextMenu: KD,
8142
- style: { display: "contents" },
8143
- children: s
8144
- }),
8145
8336
  /* @__PURE__ */ jsx(s$2, {
8146
- open: K,
8147
- onOpenChange: q,
8337
+ open: V,
8338
+ onOpenChange: U,
8148
8339
  children: /* @__PURE__ */ jsxs(p$5, {
8149
8340
  style: { maxWidth: 450 },
8150
8341
  children: [/* @__PURE__ */ jsx(g$1, { children: "Editar Texto" }), /* @__PURE__ */ jsxs(p, {
@@ -8152,9 +8343,9 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8152
8343
  gap: "3",
8153
8344
  children: [
8154
8345
  /* @__PURE__ */ jsx(r, {
8155
- ref: BD,
8156
- value: PD,
8157
- onChange: (s) => FD(s.target.value),
8346
+ ref: EO,
8347
+ value: J,
8348
+ onChange: (s) => X(s.target.value),
8158
8349
  placeholder: "Digite o novo texto...",
8159
8350
  style: { height: 100 }
8160
8351
  }),
@@ -8172,7 +8363,7 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8172
8363
  color: "blue",
8173
8364
  variant: "surface",
8174
8365
  style: { cursor: "pointer" },
8175
- onClick: () => JD(s.dataName),
8366
+ onClick: () => AO(s.dataName),
8176
8367
  children: s.name
8177
8368
  }, s.dataName))
8178
8369
  })]
@@ -8186,7 +8377,7 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8186
8377
  children: "Cancelar"
8187
8378
  }) }), /* @__PURE__ */ jsx(o, {
8188
8379
  onClick: () => {
8189
- C(d.id, { content: PD }), q(!1);
8380
+ C(d.id, { content: J }), U(!1);
8190
8381
  },
8191
8382
  children: "Salvar"
8192
8383
  })]
@@ -8196,8 +8387,8 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8196
8387
  })
8197
8388
  }),
8198
8389
  /* @__PURE__ */ jsx(s$2, {
8199
- open: X,
8200
- onOpenChange: $,
8390
+ open: K,
8391
+ onOpenChange: q,
8201
8392
  children: /* @__PURE__ */ jsxs(p$5, {
8202
8393
  style: { maxWidth: 450 },
8203
8394
  children: [/* @__PURE__ */ jsx(g$1, { children: "Vincular Dados Manualmente" }), /* @__PURE__ */ jsxs(p, {
@@ -8209,8 +8400,8 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8209
8400
  children: "Nome da propriedade (ex: titulo, preco, imagem):"
8210
8401
  }),
8211
8402
  /* @__PURE__ */ jsx(u, {
8212
- value: ID,
8213
- onChange: (s) => zD(s.target.value),
8403
+ value: $,
8404
+ onChange: (s) => TO(s.target.value),
8214
8405
  placeholder: "propriedade"
8215
8406
  }),
8216
8407
  /* @__PURE__ */ jsxs(p, {
@@ -8222,8 +8413,8 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8222
8413
  children: "Cancelar"
8223
8414
  }) }), /* @__PURE__ */ jsx(o, {
8224
8415
  onClick: () => {
8225
- let s = ID, w = { dataBinding: s };
8226
- d.type === "text" && (w.content = `{{${s}}}`), C(d.id, w), $(!1);
8416
+ let s = $, w = { dataBinding: s };
8417
+ d.type === "text" && (w.content = `{{${s}}}`), C(d.id, w), q(!1);
8227
8418
  },
8228
8419
  children: "Vincular"
8229
8420
  })]
@@ -8234,7 +8425,7 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8234
8425
  }),
8235
8426
  /* @__PURE__ */ jsx("input", {
8236
8427
  type: "file",
8237
- ref: HD,
8428
+ ref: DO,
8238
8429
  style: { display: "none" },
8239
8430
  accept: "image/*",
8240
8431
  onChange: (s) => {
@@ -8245,143 +8436,200 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8245
8436
  s.target?.result && C(d.id, { content: s.target.result });
8246
8437
  }, s.readAsDataURL(w);
8247
8438
  }
8248
- qD();
8249
8439
  }
8250
8440
  }),
8251
- V && createPortal(/* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
8252
- className: "custom-context-menu-overlay",
8253
- style: { zIndex: 2147483646 },
8254
- onClick: qD,
8255
- onContextMenu: (s) => {
8256
- s.preventDefault(), qD();
8257
- }
8258
- }), /* @__PURE__ */ jsxs("div", {
8259
- className: "custom-context-menu",
8260
- style: {
8261
- top: Math.min(V.y, window.innerHeight - 300),
8262
- left: Math.min(V.x, window.innerWidth - 250),
8263
- zIndex: 2147483647
8264
- },
8441
+ /* @__PURE__ */ jsxs(Root2$1, { children: [/* @__PURE__ */ jsx(Trigger$1, {
8442
+ asChild: !0,
8443
+ children: /* @__PURE__ */ jsx("div", {
8444
+ style: { display: "contents" },
8445
+ children: s
8446
+ })
8447
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsxs(Content2$1, {
8448
+ className: "ContextMenuContent",
8265
8449
  children: [
8266
- /* @__PURE__ */ jsxs(SubMenu, {
8267
- label: /* @__PURE__ */ jsxs(Fragment$1, { children: ["Vincular Dados ", d.dataBinding && /* @__PURE__ */ jsxs("span", {
8268
- style: {
8269
- fontSize: 10,
8270
- marginLeft: 4,
8271
- opacity: .7
8272
- },
8273
- children: [
8274
- "(",
8275
- d.dataBinding,
8276
- ")"
8277
- ]
8278
- })] }),
8450
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8451
+ className: "ContextMenuSubTrigger",
8279
8452
  children: [
8280
- L.availableProps && L.availableProps.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [L.availableProps.map((s) => /* @__PURE__ */ jsx(MenuItem, {
8281
- onClick: () => {
8453
+ "Vincular Dados",
8454
+ d.dataBinding && /* @__PURE__ */ jsxs("span", {
8455
+ style: {
8456
+ fontSize: 10,
8457
+ marginLeft: 4,
8458
+ opacity: .7
8459
+ },
8460
+ children: [
8461
+ "(",
8462
+ d.dataBinding,
8463
+ ")"
8464
+ ]
8465
+ }),
8466
+ /* @__PURE__ */ jsx("div", {
8467
+ className: "RightSlot",
8468
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8469
+ })
8470
+ ]
8471
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsxs(SubContent2$1, {
8472
+ className: "ContextMenuSubContent",
8473
+ sideOffset: 2,
8474
+ alignOffset: -5,
8475
+ children: [
8476
+ L.availableProps && L.availableProps.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [L.availableProps.map((s) => /* @__PURE__ */ jsxs(Item2$1, {
8477
+ className: "ContextMenuItem",
8478
+ onSelect: () => {
8282
8479
  let w = { dataBinding: s.dataName };
8283
- d.type === "text" && (w.content = `{{${s.dataName}}}`), C(d.id, w), qD();
8480
+ d.type === "text" && (w.content = `{{${s.dataName}}}`), C(d.id, w);
8284
8481
  },
8285
- rightSlot: /* @__PURE__ */ jsx("span", {
8286
- style: { fontSize: 10 },
8287
- children: s.dataName
8288
- }),
8289
- children: s.name
8290
- }, s.dataName)), /* @__PURE__ */ jsx(MenuSeparator, {})] }),
8291
- /* @__PURE__ */ jsx(MenuItem, {
8292
- onClick: () => {
8293
- zD(d.dataBinding || ""), $(!0), qD();
8482
+ children: [
8483
+ s.name,
8484
+ " ",
8485
+ /* @__PURE__ */ jsx("div", {
8486
+ className: "RightSlot",
8487
+ children: s.dataName
8488
+ })
8489
+ ]
8490
+ }, s.dataName)), /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" })] }),
8491
+ /* @__PURE__ */ jsx(Item2$1, {
8492
+ className: "ContextMenuItem",
8493
+ onSelect: () => {
8494
+ TO(d.dataBinding || ""), q(!0);
8294
8495
  },
8295
8496
  children: "Outro / Manual..."
8296
8497
  }),
8297
- d.dataBinding && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(MenuSeparator, {}), /* @__PURE__ */ jsx(MenuItem, {
8298
- onClick: () => {
8299
- C(d.id, { dataBinding: void 0 }), qD();
8300
- },
8498
+ d.dataBinding && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }), /* @__PURE__ */ jsx(Item2$1, {
8499
+ className: "ContextMenuItem",
8500
+ onSelect: () => C(d.id, { dataBinding: void 0 }),
8301
8501
  style: { color: "var(--red-9)" },
8302
8502
  children: "Remover Vínculo"
8303
8503
  })] })
8304
8504
  ]
8305
- }),
8306
- /* @__PURE__ */ jsx(MenuSeparator, {}),
8307
- d.type === "text" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(MenuItem, {
8308
- onClick: () => {
8309
- FD(d.content), q(!0), qD();
8505
+ }) })] }),
8506
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
8507
+ d.type === "text" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Item2$1, {
8508
+ className: "ContextMenuItem",
8509
+ onSelect: () => {
8510
+ X(d.content), U(!0);
8310
8511
  },
8311
8512
  children: "Editar Texto..."
8312
- }), /* @__PURE__ */ jsx(MenuSeparator, {})] }),
8313
- /* @__PURE__ */ jsx(MenuItem, {
8314
- onClick: QD,
8513
+ }), /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" })] }),
8514
+ /* @__PURE__ */ jsx(Item2$1, {
8515
+ className: "ContextMenuItem",
8516
+ onSelect: LO,
8315
8517
  children: "Duplicar"
8316
8518
  }),
8317
- /* @__PURE__ */ jsx(MenuItem, {
8318
- onClick: () => {
8319
- w(d.id), qD();
8320
- },
8519
+ /* @__PURE__ */ jsx(Item2$1, {
8520
+ className: "ContextMenuItem",
8521
+ onSelect: () => w(d.id),
8321
8522
  children: "Excluir"
8322
8523
  }),
8323
- /* @__PURE__ */ jsx(MenuSeparator, {}),
8524
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
8324
8525
  d.type === "image" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
8325
- /* @__PURE__ */ jsxs(SubMenu, {
8326
- label: "Alterar Imagem",
8327
- children: [/* @__PURE__ */ jsx(MenuItem, {
8328
- onClick: () => {
8329
- HD.current?.click(), qD();
8330
- },
8526
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8527
+ className: "ContextMenuSubTrigger",
8528
+ children: ["Alterar Imagem", /* @__PURE__ */ jsx("div", {
8529
+ className: "RightSlot",
8530
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8531
+ })]
8532
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsxs(SubContent2$1, {
8533
+ className: "ContextMenuSubContent",
8534
+ sideOffset: 2,
8535
+ alignOffset: -5,
8536
+ children: [/* @__PURE__ */ jsx(Item2$1, {
8537
+ className: "ContextMenuItem",
8538
+ onSelect: () => DO.current?.click(),
8331
8539
  children: "Carregar do Computador"
8332
- }), /* @__PURE__ */ jsx(MenuItem, {
8333
- onClick: () => {
8334
- qD(), setTimeout(() => {
8540
+ }), /* @__PURE__ */ jsx(Item2$1, {
8541
+ className: "ContextMenuItem",
8542
+ onSelect: () => {
8543
+ setTimeout(() => {
8335
8544
  let s = window.prompt("Insira a URL da imagem:", d.content);
8336
8545
  s !== null && C(d.id, { content: s });
8337
8546
  }, 10);
8338
8547
  },
8339
8548
  children: "Inserir URL"
8340
8549
  })]
8341
- }),
8342
- /* @__PURE__ */ jsxs(SubMenu, {
8343
- label: "Ajuste da Imagem",
8550
+ }) })] }),
8551
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8552
+ className: "ContextMenuSubTrigger",
8553
+ children: ["Ajuste da Imagem", /* @__PURE__ */ jsx("div", {
8554
+ className: "RightSlot",
8555
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8556
+ })]
8557
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsxs(SubContent2$1, {
8558
+ className: "ContextMenuSubContent",
8559
+ sideOffset: 2,
8560
+ alignOffset: -5,
8344
8561
  children: [
8345
- /* @__PURE__ */ jsx(MenuItem, {
8346
- onClick: () => YD({ objectFit: "cover" }),
8562
+ /* @__PURE__ */ jsx(Item2$1, {
8563
+ className: "ContextMenuItem",
8564
+ onSelect: () => jO({ objectFit: "cover" }),
8347
8565
  children: "Preencher (Cover)"
8348
8566
  }),
8349
- /* @__PURE__ */ jsx(MenuItem, {
8350
- onClick: () => YD({ objectFit: "contain" }),
8567
+ /* @__PURE__ */ jsx(Item2$1, {
8568
+ className: "ContextMenuItem",
8569
+ onSelect: () => jO({ objectFit: "contain" }),
8351
8570
  children: "Ajustar (Contain)"
8352
8571
  }),
8353
- /* @__PURE__ */ jsx(MenuItem, {
8354
- onClick: () => YD({ objectFit: "fill" }),
8572
+ /* @__PURE__ */ jsx(Item2$1, {
8573
+ className: "ContextMenuItem",
8574
+ onSelect: () => jO({ objectFit: "fill" }),
8355
8575
  children: "Esticar (Fill)"
8356
8576
  })
8357
8577
  ]
8358
- }),
8359
- /* @__PURE__ */ jsx(MenuSeparator, {})
8578
+ }) })] }),
8579
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" })
8360
8580
  ] }),
8361
- /* @__PURE__ */ jsxs(SubMenu, {
8362
- label: "Camadas",
8363
- children: [/* @__PURE__ */ jsx(MenuItem, {
8364
- onClick: XD,
8581
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8582
+ className: "ContextMenuSubTrigger",
8583
+ children: ["Camadas", /* @__PURE__ */ jsx("div", {
8584
+ className: "RightSlot",
8585
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8586
+ })]
8587
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsxs(SubContent2$1, {
8588
+ className: "ContextMenuSubContent",
8589
+ sideOffset: 2,
8590
+ alignOffset: -5,
8591
+ children: [/* @__PURE__ */ jsx(Item2$1, {
8592
+ className: "ContextMenuItem",
8593
+ onSelect: MO,
8365
8594
  children: "Trazer para frente"
8366
- }), /* @__PURE__ */ jsx(MenuItem, {
8367
- onClick: ZD,
8595
+ }), /* @__PURE__ */ jsx(Item2$1, {
8596
+ className: "ContextMenuItem",
8597
+ onSelect: IO,
8368
8598
  children: "Enviar para trás"
8369
8599
  })]
8370
- }),
8371
- /* @__PURE__ */ jsx(MenuSeparator, {}),
8600
+ }) })] }),
8601
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
8372
8602
  d.type === "text" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
8373
- /* @__PURE__ */ jsx(SubMenu, {
8374
- label: "Fonte",
8375
- scrollable: !0,
8376
- children: L.availableFonts && L.availableFonts.map((s) => /* @__PURE__ */ jsx(MenuItem, {
8377
- onClick: () => YD({ fontFamily: s }),
8603
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8604
+ className: "ContextMenuSubTrigger",
8605
+ children: ["Fonte", /* @__PURE__ */ jsx("div", {
8606
+ className: "RightSlot",
8607
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8608
+ })]
8609
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsx(SubContent2$1, {
8610
+ className: "ContextMenuSubContent ContextMenuScrollable",
8611
+ sideOffset: 2,
8612
+ alignOffset: -5,
8613
+ children: L.availableFonts && L.availableFonts.map((s) => /* @__PURE__ */ jsxs(Item2$1, {
8614
+ className: "ContextMenuItem",
8615
+ onSelect: () => jO({ fontFamily: s }),
8378
8616
  style: { fontFamily: s },
8379
- rightSlot: d.style?.fontFamily === s ? "✓" : void 0,
8380
- children: s
8617
+ children: [s, d.style?.fontFamily === s && /* @__PURE__ */ jsx("div", {
8618
+ className: "RightSlot",
8619
+ children: /* @__PURE__ */ jsx(CheckIcon, {})
8620
+ })]
8381
8621
  }, s))
8382
- }),
8383
- /* @__PURE__ */ jsx(SubMenu, {
8384
- label: "Tamanho da Fonte",
8622
+ }) })] }),
8623
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8624
+ className: "ContextMenuSubTrigger",
8625
+ children: ["Tamanho da Fonte", /* @__PURE__ */ jsx("div", {
8626
+ className: "RightSlot",
8627
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8628
+ })]
8629
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsx(SubContent2$1, {
8630
+ className: "ContextMenuSubContent",
8631
+ sideOffset: 2,
8632
+ alignOffset: -5,
8385
8633
  children: [
8386
8634
  12,
8387
8635
  14,
@@ -8391,15 +8639,25 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8391
8639
  32,
8392
8640
  48,
8393
8641
  64
8394
- ].map((s) => /* @__PURE__ */ jsxs(MenuItem, {
8395
- onClick: () => YD({ fontSize: `${s}px` }),
8642
+ ].map((s) => /* @__PURE__ */ jsxs(Item2$1, {
8643
+ className: "ContextMenuItem",
8644
+ onSelect: () => jO({ fontSize: `${s}px` }),
8396
8645
  children: [s, "px"]
8397
8646
  }, s))
8398
- }),
8399
- /* @__PURE__ */ jsx(SubMenu, {
8400
- label: "Cor do Texto",
8401
- children: $D.filter((s) => s !== "transparent").map((s) => /* @__PURE__ */ jsxs(MenuItem, {
8402
- onClick: () => YD({ color: s }),
8647
+ }) })] }),
8648
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8649
+ className: "ContextMenuSubTrigger",
8650
+ children: ["Cor do Texto", /* @__PURE__ */ jsx("div", {
8651
+ className: "RightSlot",
8652
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8653
+ })]
8654
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsx(SubContent2$1, {
8655
+ className: "ContextMenuSubContent",
8656
+ sideOffset: 2,
8657
+ alignOffset: -5,
8658
+ children: RO.filter((s) => s !== "transparent").map((s) => /* @__PURE__ */ jsxs(Item2$1, {
8659
+ className: "ContextMenuItem",
8660
+ onSelect: () => jO({ color: s }),
8403
8661
  children: [/* @__PURE__ */ jsx("div", { style: {
8404
8662
  width: 12,
8405
8663
  height: 12,
@@ -8408,39 +8666,69 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8408
8666
  border: "1px solid #ccc"
8409
8667
  } }), s]
8410
8668
  }, s))
8411
- }),
8412
- /* @__PURE__ */ jsxs(SubMenu, {
8413
- label: "Peso da Fonte",
8414
- children: [/* @__PURE__ */ jsx(MenuItem, {
8415
- onClick: () => YD({ fontWeight: "normal" }),
8669
+ }) })] }),
8670
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8671
+ className: "ContextMenuSubTrigger",
8672
+ children: ["Peso da Fonte", /* @__PURE__ */ jsx("div", {
8673
+ className: "RightSlot",
8674
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8675
+ })]
8676
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsxs(SubContent2$1, {
8677
+ className: "ContextMenuSubContent",
8678
+ sideOffset: 2,
8679
+ alignOffset: -5,
8680
+ children: [/* @__PURE__ */ jsx(Item2$1, {
8681
+ className: "ContextMenuItem",
8682
+ onSelect: () => jO({ fontWeight: "normal" }),
8416
8683
  children: "Normal"
8417
- }), /* @__PURE__ */ jsx(MenuItem, {
8418
- onClick: () => YD({ fontWeight: "bold" }),
8684
+ }), /* @__PURE__ */ jsx(Item2$1, {
8685
+ className: "ContextMenuItem",
8686
+ onSelect: () => jO({ fontWeight: "bold" }),
8419
8687
  children: "Negrito"
8420
8688
  })]
8421
- }),
8422
- /* @__PURE__ */ jsxs(SubMenu, {
8423
- label: "Alinhamento",
8689
+ }) })] }),
8690
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8691
+ className: "ContextMenuSubTrigger",
8692
+ children: ["Alinhamento", /* @__PURE__ */ jsx("div", {
8693
+ className: "RightSlot",
8694
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8695
+ })]
8696
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsxs(SubContent2$1, {
8697
+ className: "ContextMenuSubContent",
8698
+ sideOffset: 2,
8699
+ alignOffset: -5,
8424
8700
  children: [
8425
- /* @__PURE__ */ jsx(MenuItem, {
8426
- onClick: () => YD({ textAlign: "left" }),
8701
+ /* @__PURE__ */ jsx(Item2$1, {
8702
+ className: "ContextMenuItem",
8703
+ onSelect: () => jO({ textAlign: "left" }),
8427
8704
  children: "Esquerda"
8428
8705
  }),
8429
- /* @__PURE__ */ jsx(MenuItem, {
8430
- onClick: () => YD({ textAlign: "center" }),
8706
+ /* @__PURE__ */ jsx(Item2$1, {
8707
+ className: "ContextMenuItem",
8708
+ onSelect: () => jO({ textAlign: "center" }),
8431
8709
  children: "Centro"
8432
8710
  }),
8433
- /* @__PURE__ */ jsx(MenuItem, {
8434
- onClick: () => YD({ textAlign: "right" }),
8711
+ /* @__PURE__ */ jsx(Item2$1, {
8712
+ className: "ContextMenuItem",
8713
+ onSelect: () => jO({ textAlign: "right" }),
8435
8714
  children: "Direita"
8436
8715
  })
8437
8716
  ]
8438
- })
8717
+ }) })] })
8439
8718
  ] }),
8440
- /* @__PURE__ */ jsx(SubMenu, {
8441
- label: "Cor de Fundo",
8442
- children: $D.map((s) => /* @__PURE__ */ jsxs(MenuItem, {
8443
- onClick: () => YD({ backgroundColor: s }),
8719
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8720
+ className: "ContextMenuSubTrigger",
8721
+ children: ["Cor de Fundo", /* @__PURE__ */ jsx("div", {
8722
+ className: "RightSlot",
8723
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8724
+ })]
8725
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsx(SubContent2$1, {
8726
+ className: "ContextMenuSubContent",
8727
+ sideOffset: 2,
8728
+ alignOffset: -5,
8729
+ children: RO.map((s) => /* @__PURE__ */ jsxs(Item2$1, {
8730
+ className: "ContextMenuItem",
8731
+ onSelect: () => jO({ backgroundColor: s }),
8444
8732
  children: [/* @__PURE__ */ jsx("div", { style: {
8445
8733
  width: 12,
8446
8734
  height: 12,
@@ -8449,9 +8737,17 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8449
8737
  border: "1px solid #ccc"
8450
8738
  } }), s === "transparent" ? "Transparente" : s]
8451
8739
  }, s))
8452
- }),
8453
- /* @__PURE__ */ jsx(SubMenu, {
8454
- label: "Arredondamento",
8740
+ }) })] }),
8741
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8742
+ className: "ContextMenuSubTrigger",
8743
+ children: ["Arredondamento", /* @__PURE__ */ jsx("div", {
8744
+ className: "RightSlot",
8745
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8746
+ })]
8747
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsx(SubContent2$1, {
8748
+ className: "ContextMenuSubContent",
8749
+ sideOffset: 2,
8750
+ alignOffset: -5,
8455
8751
  children: [
8456
8752
  0,
8457
8753
  4,
@@ -8460,13 +8756,22 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8460
8756
  16,
8461
8757
  24,
8462
8758
  "50%"
8463
- ].map((s) => /* @__PURE__ */ jsx(MenuItem, {
8464
- onClick: () => YD({ borderRadius: typeof s == "number" ? `${s}px` : s }),
8759
+ ].map((s) => /* @__PURE__ */ jsx(Item2$1, {
8760
+ className: "ContextMenuItem",
8761
+ onSelect: () => jO({ borderRadius: typeof s == "number" ? `${s}px` : s }),
8465
8762
  children: s === "50%" ? "Círculo" : `${s}px`
8466
8763
  }, s))
8467
- }),
8468
- /* @__PURE__ */ jsx(SubMenu, {
8469
- label: "Espaçamento",
8764
+ }) })] }),
8765
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8766
+ className: "ContextMenuSubTrigger",
8767
+ children: ["Espaçamento", /* @__PURE__ */ jsx("div", {
8768
+ className: "RightSlot",
8769
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8770
+ })]
8771
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsx(SubContent2$1, {
8772
+ className: "ContextMenuSubContent",
8773
+ sideOffset: 2,
8774
+ alignOffset: -5,
8470
8775
  children: [
8471
8776
  0,
8472
8777
  4,
@@ -8475,49 +8780,14 @@ const ElementContextMenu = ({ children: s, element: d }) => {
8475
8780
  16,
8476
8781
  24,
8477
8782
  32
8478
- ].map((s) => /* @__PURE__ */ jsxs(MenuItem, {
8479
- onClick: () => YD({ padding: `${s}px` }),
8783
+ ].map((s) => /* @__PURE__ */ jsxs(Item2$1, {
8784
+ className: "ContextMenuItem",
8785
+ onSelect: () => jO({ padding: `${s}px` }),
8480
8786
  children: [s, "px"]
8481
8787
  }, s))
8482
- }),
8483
- /* @__PURE__ */ jsxs(SubMenu, {
8484
- label: "Borda",
8485
- children: [/* @__PURE__ */ jsxs(SubMenu, {
8486
- label: "Cor da Borda",
8487
- children: [$D.filter((s) => s !== "transparent").map((s) => /* @__PURE__ */ jsxs(MenuItem, {
8488
- onClick: () => YD({
8489
- borderColor: s,
8490
- borderStyle: "solid"
8491
- }),
8492
- children: [/* @__PURE__ */ jsx("div", { style: {
8493
- width: 12,
8494
- height: 12,
8495
- backgroundColor: s,
8496
- marginRight: 8,
8497
- border: "1px solid #ccc"
8498
- } }), s]
8499
- }, s)), /* @__PURE__ */ jsx(MenuItem, {
8500
- onClick: () => YD({ borderStyle: "none" }),
8501
- children: "Sem Borda"
8502
- })]
8503
- }), /* @__PURE__ */ jsx(SubMenu, {
8504
- label: "Espessura",
8505
- children: [
8506
- 1,
8507
- 2,
8508
- 4,
8509
- 8
8510
- ].map((s) => /* @__PURE__ */ jsxs(MenuItem, {
8511
- onClick: () => YD({
8512
- borderWidth: `${s}px`,
8513
- borderStyle: "solid"
8514
- }),
8515
- children: [s, "px"]
8516
- }, s))
8517
- })]
8518
- })
8788
+ }) })] })
8519
8789
  ]
8520
- })] }), document.body)
8790
+ }) })] })
8521
8791
  ] });
8522
8792
  };
8523
8793
  var DraggableResizableElement = ({ element: s, isSelected: d }) => {
@@ -8527,26 +8797,26 @@ var DraggableResizableElement = ({ element: s, isSelected: d }) => {
8527
8797
  }), q = useRef({
8528
8798
  x: 0,
8529
8799
  y: 0
8530
- }), X = useRef(0), $ = useRef(0), PD = useRef({
8800
+ }), X = useRef(0), $ = useRef(0), TO = useRef({
8531
8801
  x: 0,
8532
8802
  y: 0
8533
- }), FD = k.isList ? k.mockData.length > 0 ? k.mockData[0] : null : k.singleMockData, ID = s.content;
8534
- if (FD) {
8535
- if (s.type === "text") ID = ID.replace(/\{\{(.*?)\}\}/g, (s, d) => {
8536
- let C = FD[d.trim()];
8803
+ }), EO = k.isList ? k.mockData.length > 0 ? k.mockData[0] : null : k.singleMockData, DO = s.content;
8804
+ if (EO) {
8805
+ if (s.type === "text") DO = DO.replace(/\{\{(.*?)\}\}/g, (s, d) => {
8806
+ let C = EO[d.trim()];
8537
8807
  return C == null ? s : String(C);
8538
8808
  });
8539
8809
  else if (s.type === "image") if (s.dataBinding) {
8540
- let d = FD[s.dataBinding];
8541
- d != null && (ID = String(d));
8542
- } else ID = ID.replace(/\{\{(.*?)\}\}/g, (s, d) => {
8543
- let C = FD[d.trim()];
8810
+ let d = EO[s.dataBinding];
8811
+ d != null && (DO = String(d));
8812
+ } else DO = DO.replace(/\{\{(.*?)\}\}/g, (s, d) => {
8813
+ let C = EO[d.trim()];
8544
8814
  return C == null ? s : String(C);
8545
8815
  });
8546
8816
  }
8547
- let zD = (d) => {
8817
+ let AO = (d) => {
8548
8818
  d.stopPropagation(), C(s.id);
8549
- }, BD = (d) => {
8819
+ }, jO = (d) => {
8550
8820
  d.button === 0 && (d.stopPropagation(), C(s.id), L(!0), K.current = {
8551
8821
  x: d.clientX,
8552
8822
  y: d.clientY
@@ -8554,16 +8824,16 @@ var DraggableResizableElement = ({ element: s, isSelected: d }) => {
8554
8824
  x: s.x,
8555
8825
  y: s.y
8556
8826
  });
8557
- }, VD = (d) => {
8827
+ }, MO = (d) => {
8558
8828
  d.stopPropagation(), d.preventDefault(), U(!0);
8559
8829
  let C = d.target.closest(".resizable-element");
8560
8830
  if (C) {
8561
8831
  let w = C.getBoundingClientRect();
8562
- PD.current = {
8832
+ TO.current = {
8563
8833
  x: w.left + w.width / 2,
8564
8834
  y: w.top + w.height / 2
8565
8835
  };
8566
- let k = d.clientX - PD.current.x, F = d.clientY - PD.current.y;
8836
+ let k = d.clientX - TO.current.x, F = d.clientY - TO.current.y;
8567
8837
  X.current = Math.atan2(F, k) * (180 / Math.PI), $.current = s.rotation || 0;
8568
8838
  }
8569
8839
  };
@@ -8577,7 +8847,7 @@ var DraggableResizableElement = ({ element: s, isSelected: d }) => {
8577
8847
  });
8578
8848
  }
8579
8849
  if (V) {
8580
- let C = d.clientX - PD.current.x, k = d.clientY - PD.current.y, F = Math.atan2(k, C) * (180 / Math.PI) - X.current;
8850
+ let C = d.clientX - TO.current.x, k = d.clientY - TO.current.y, F = Math.atan2(k, C) * (180 / Math.PI) - X.current;
8581
8851
  w(s.id, { rotation: ($.current + F) % 360 });
8582
8852
  }
8583
8853
  }, C = () => {
@@ -8592,7 +8862,7 @@ var DraggableResizableElement = ({ element: s, isSelected: d }) => {
8592
8862
  s.id,
8593
8863
  w
8594
8864
  ]);
8595
- let HD = {
8865
+ let NO = {
8596
8866
  position: "absolute",
8597
8867
  left: 0,
8598
8868
  top: 0,
@@ -8633,9 +8903,9 @@ var DraggableResizableElement = ({ element: s, isSelected: d }) => {
8633
8903
  position: "relative"
8634
8904
  },
8635
8905
  children: [/* @__PURE__ */ jsxs(p$1, {
8636
- style: HD,
8637
- onMouseDown: BD,
8638
- onClick: zD,
8906
+ style: NO,
8907
+ onMouseDown: jO,
8908
+ onClick: AO,
8639
8909
  onMouseEnter: (s) => {
8640
8910
  d || (s.currentTarget.style.borderColor = "var(--gray-6)");
8641
8911
  },
@@ -8648,10 +8918,10 @@ var DraggableResizableElement = ({ element: s, isSelected: d }) => {
8648
8918
  width: "100%",
8649
8919
  height: "100%"
8650
8920
  },
8651
- children: ID
8921
+ children: DO
8652
8922
  }),
8653
- s.type === "image" && (ID ? /* @__PURE__ */ jsx("img", {
8654
- src: ID,
8923
+ s.type === "image" && (DO ? /* @__PURE__ */ jsx("img", {
8924
+ src: DO,
8655
8925
  alt: "Element",
8656
8926
  style: {
8657
8927
  width: "100%",
@@ -8693,7 +8963,7 @@ var DraggableResizableElement = ({ element: s, isSelected: d }) => {
8693
8963
  zIndex: 50,
8694
8964
  boxShadow: "0 0 0 2px white"
8695
8965
  },
8696
- onMouseDown: VD,
8966
+ onMouseDown: MO,
8697
8967
  children: /* @__PURE__ */ jsx(p$1, { style: {
8698
8968
  position: "absolute",
8699
8969
  top: 12,
@@ -8881,16 +9151,16 @@ function createRenderBatcher(s, d) {
8881
9151
  delta: 0,
8882
9152
  timestamp: 0,
8883
9153
  isProcessing: !1
8884
- }, F = () => C = !0, L = stepsOrder.reduce((s, C) => (s[C] = createRenderStep(F, d ? C : void 0), s), {}), { setup: V, read: U, resolveKeyframes: K, preUpdate: q, update: J, preRender: X, render: $, postRender: PD } = L, FD = () => {
9154
+ }, F = () => C = !0, L = stepsOrder.reduce((s, C) => (s[C] = createRenderStep(F, d ? C : void 0), s), {}), { setup: V, read: U, resolveKeyframes: K, preUpdate: q, update: J, preRender: X, render: $, postRender: TO } = L, EO = () => {
8885
9155
  let F = MotionGlobalConfig.useManualTiming ? k.timestamp : performance.now();
8886
- C = !1, MotionGlobalConfig.useManualTiming || (k.delta = w ? 1e3 / 60 : Math.max(Math.min(F - k.timestamp, maxElapsed), 1)), k.timestamp = F, k.isProcessing = !0, V.process(k), U.process(k), K.process(k), q.process(k), J.process(k), X.process(k), $.process(k), PD.process(k), k.isProcessing = !1, C && d && (w = !1, s(FD));
8887
- }, ID = () => {
8888
- C = !0, w = !0, k.isProcessing || s(FD);
9156
+ C = !1, MotionGlobalConfig.useManualTiming || (k.delta = w ? 1e3 / 60 : Math.max(Math.min(F - k.timestamp, maxElapsed), 1)), k.timestamp = F, k.isProcessing = !0, V.process(k), U.process(k), K.process(k), q.process(k), J.process(k), X.process(k), $.process(k), TO.process(k), k.isProcessing = !1, C && d && (w = !1, s(EO));
9157
+ }, DO = () => {
9158
+ C = !0, w = !0, k.isProcessing || s(EO);
8889
9159
  };
8890
9160
  return {
8891
9161
  schedule: stepsOrder.reduce((s, d) => {
8892
9162
  let w = L[d];
8893
- return s[d] = (s, d = !1, k = !1) => (C || ID(), w.schedule(s, d, k)), s;
9163
+ return s[d] = (s, d = !1, k = !1) => (C || DO(), w.schedule(s, d, k)), s;
8894
9164
  }, {}),
8895
9165
  cancel: (s) => {
8896
9166
  for (let d = 0; d < stepsOrder.length; d++) L[stepsOrder[d]].cancel(s);
@@ -9248,40 +9518,40 @@ function spring(s = springDefaults.visualDuration, d = springDefaults.bounce) {
9248
9518
  }, { stiffness: U, damping: K, mass: q, duration: J, velocity: X, isResolvedFromDuration: $ } = getSpringOptions({
9249
9519
  ...C,
9250
9520
  velocity: -/* @__PURE__ */ millisecondsToSeconds(C.velocity || 0)
9251
- }), PD = X || 0, FD = K / (2 * Math.sqrt(U * q)), ID = L - F, LD = /* @__PURE__ */ millisecondsToSeconds(Math.sqrt(U / q)), RD = Math.abs(ID) < 5;
9252
- w ||= RD ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default, k ||= RD ? springDefaults.restDelta.granular : springDefaults.restDelta.default;
9253
- let zD;
9254
- if (FD < 1) {
9255
- let s = calcAngularFreq(LD, FD);
9256
- zD = (d) => L - Math.exp(-FD * LD * d) * ((PD + FD * LD * ID) / s * Math.sin(s * d) + ID * Math.cos(s * d));
9257
- } else if (FD === 1) zD = (s) => L - Math.exp(-LD * s) * (ID + (PD + LD * ID) * s);
9521
+ }), TO = X || 0, EO = K / (2 * Math.sqrt(U * q)), DO = L - F, OO = /* @__PURE__ */ millisecondsToSeconds(Math.sqrt(U / q)), kO = Math.abs(DO) < 5;
9522
+ w ||= kO ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default, k ||= kO ? springDefaults.restDelta.granular : springDefaults.restDelta.default;
9523
+ let AO;
9524
+ if (EO < 1) {
9525
+ let s = calcAngularFreq(OO, EO);
9526
+ AO = (d) => L - Math.exp(-EO * OO * d) * ((TO + EO * OO * DO) / s * Math.sin(s * d) + DO * Math.cos(s * d));
9527
+ } else if (EO === 1) AO = (s) => L - Math.exp(-OO * s) * (DO + (TO + OO * DO) * s);
9258
9528
  else {
9259
- let s = LD * Math.sqrt(FD * FD - 1);
9260
- zD = (d) => {
9261
- let C = Math.exp(-FD * LD * d), w = Math.min(s * d, 300);
9262
- return L - C * ((PD + FD * LD * ID) * Math.sinh(w) + s * ID * Math.cosh(w)) / s;
9529
+ let s = OO * Math.sqrt(EO * EO - 1);
9530
+ AO = (d) => {
9531
+ let C = Math.exp(-EO * OO * d), w = Math.min(s * d, 300);
9532
+ return L - C * ((TO + EO * OO * DO) * Math.sinh(w) + s * DO * Math.cosh(w)) / s;
9263
9533
  };
9264
9534
  }
9265
- let BD = {
9535
+ let jO = {
9266
9536
  calculatedDuration: $ && J || null,
9267
9537
  next: (s) => {
9268
- let d = zD(s);
9538
+ let d = AO(s);
9269
9539
  if ($) V.done = s >= J;
9270
9540
  else {
9271
- let C = s === 0 ? PD : 0;
9272
- FD < 1 && (C = s === 0 ? /* @__PURE__ */ secondsToMilliseconds(PD) : calcGeneratorVelocity(zD, s, d));
9541
+ let C = s === 0 ? TO : 0;
9542
+ EO < 1 && (C = s === 0 ? /* @__PURE__ */ secondsToMilliseconds(TO) : calcGeneratorVelocity(AO, s, d));
9273
9543
  let F = Math.abs(C) <= w, U = Math.abs(L - d) <= k;
9274
9544
  V.done = F && U;
9275
9545
  }
9276
9546
  return V.value = V.done ? L : d, V;
9277
9547
  },
9278
9548
  toString: () => {
9279
- let s = Math.min(calcGeneratorDuration(BD), maxGeneratorDuration), d = generateLinearEasing((d) => BD.next(s * d).value, s, 30);
9549
+ let s = Math.min(calcGeneratorDuration(jO), maxGeneratorDuration), d = generateLinearEasing((d) => jO.next(s * d).value, s, 30);
9280
9550
  return s + "ms " + d;
9281
9551
  },
9282
9552
  toTransition: () => {}
9283
9553
  };
9284
- return BD;
9554
+ return jO;
9285
9555
  }
9286
9556
  spring.applyToOptions = (s) => {
9287
9557
  let d = createGeneratorEasing(s, 100, spring);
@@ -9291,26 +9561,26 @@ function inertia({ keyframes: s, velocity: d = 0, power: C = .8, timeConstant: w
9291
9561
  let J = s[0], X = {
9292
9562
  done: !1,
9293
9563
  value: J
9294
- }, $ = (s) => V !== void 0 && s < V || U !== void 0 && s > U, PD = (s) => V === void 0 ? U : U === void 0 || Math.abs(V - s) < Math.abs(U - s) ? V : U, FD = C * d, ID = J + FD, LD = L === void 0 ? ID : L(ID);
9295
- LD !== ID && (FD = LD - J);
9296
- let RD = (s) => -FD * Math.exp(-s / w), zD = (s) => LD + RD(s), BD = (s) => {
9297
- let d = RD(s), C = zD(s);
9298
- X.done = Math.abs(d) <= K, X.value = X.done ? LD : C;
9299
- }, VD, HD, UD = (s) => {
9300
- $(X.value) && (VD = s, HD = spring({
9301
- keyframes: [X.value, PD(X.value)],
9302
- velocity: calcGeneratorVelocity(zD, s, X.value),
9564
+ }, $ = (s) => V !== void 0 && s < V || U !== void 0 && s > U, TO = (s) => V === void 0 ? U : U === void 0 || Math.abs(V - s) < Math.abs(U - s) ? V : U, EO = C * d, DO = J + EO, OO = L === void 0 ? DO : L(DO);
9565
+ OO !== DO && (EO = OO - J);
9566
+ let kO = (s) => -EO * Math.exp(-s / w), AO = (s) => OO + kO(s), jO = (s) => {
9567
+ let d = kO(s), C = AO(s);
9568
+ X.done = Math.abs(d) <= K, X.value = X.done ? OO : C;
9569
+ }, MO, NO, PO = (s) => {
9570
+ $(X.value) && (MO = s, NO = spring({
9571
+ keyframes: [X.value, TO(X.value)],
9572
+ velocity: calcGeneratorVelocity(AO, s, X.value),
9303
9573
  damping: k,
9304
9574
  stiffness: F,
9305
9575
  restDelta: K,
9306
9576
  restSpeed: q
9307
9577
  }));
9308
9578
  };
9309
- return UD(0), {
9579
+ return PO(0), {
9310
9580
  calculatedDuration: null,
9311
9581
  next: (s) => {
9312
9582
  let d = !1;
9313
- return !HD && VD === void 0 && (d = !0, BD(s), UD(s)), VD !== void 0 && s >= VD ? HD.next(s - VD) : (!d && BD(s), X);
9583
+ return !NO && MO === void 0 && (d = !0, jO(s), PO(s)), MO !== void 0 && s >= MO ? NO.next(s - MO) : (!d && jO(s), X);
9314
9584
  }
9315
9585
  };
9316
9586
  }
@@ -9428,24 +9698,24 @@ var WithPromise = class {
9428
9698
  tick(s, d = !1) {
9429
9699
  let { generator: C, totalDuration: w, mixKeyframes: k, mirroredGenerator: F, resolvedDuration: L, calculatedDuration: V } = this;
9430
9700
  if (this.startTime === null) return C.next(0);
9431
- let { delay: U = 0, keyframes: K, repeat: q, repeatType: J, repeatDelay: X, type: $, onUpdate: PD, finalKeyframe: FD } = this.options;
9701
+ let { delay: U = 0, keyframes: K, repeat: q, repeatType: J, repeatDelay: X, type: $, onUpdate: TO, finalKeyframe: EO } = this.options;
9432
9702
  this.speed > 0 ? this.startTime = Math.min(this.startTime, s) : this.speed < 0 && (this.startTime = Math.min(s - w / this.speed, this.startTime)), d ? this.currentTime = s : this.updateTime(s);
9433
- let ID = this.currentTime - U * (this.playbackSpeed >= 0 ? 1 : -1), LD = this.playbackSpeed >= 0 ? ID < 0 : ID > w;
9434
- this.currentTime = Math.max(ID, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = w);
9435
- let RD = this.currentTime, zD = C;
9703
+ let DO = this.currentTime - U * (this.playbackSpeed >= 0 ? 1 : -1), OO = this.playbackSpeed >= 0 ? DO < 0 : DO > w;
9704
+ this.currentTime = Math.max(DO, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = w);
9705
+ let kO = this.currentTime, AO = C;
9436
9706
  if (q) {
9437
9707
  let s = Math.min(this.currentTime, w) / L, d = Math.floor(s), C = s % 1;
9438
- !C && s >= 1 && (C = 1), C === 1 && d--, d = Math.min(d, q + 1), d % 2 && (J === "reverse" ? (C = 1 - C, X && (C -= X / L)) : J === "mirror" && (zD = F)), RD = clamp(0, 1, C) * L;
9708
+ !C && s >= 1 && (C = 1), C === 1 && d--, d = Math.min(d, q + 1), d % 2 && (J === "reverse" ? (C = 1 - C, X && (C -= X / L)) : J === "mirror" && (AO = F)), kO = clamp(0, 1, C) * L;
9439
9709
  }
9440
- let BD = LD ? {
9710
+ let jO = OO ? {
9441
9711
  done: !1,
9442
9712
  value: K[0]
9443
- } : zD.next(RD);
9444
- k && (BD.value = k(BD.value));
9445
- let { done: VD } = BD;
9446
- !LD && V !== null && (VD = this.playbackSpeed >= 0 ? this.currentTime >= w : this.currentTime <= 0);
9447
- let HD = this.holdTime === null && (this.state === "finished" || this.state === "running" && VD);
9448
- return HD && $ !== inertia && (BD.value = getFinalKeyframe$1(K, this.options, FD, this.speed)), PD && PD(BD.value), HD && this.finish(), BD;
9713
+ } : AO.next(kO);
9714
+ k && (jO.value = k(jO.value));
9715
+ let { done: MO } = jO;
9716
+ !OO && V !== null && (MO = this.playbackSpeed >= 0 ? this.currentTime >= w : this.currentTime <= 0);
9717
+ let NO = this.holdTime === null && (this.state === "finished" || this.state === "running" && MO);
9718
+ return NO && $ !== inertia && (jO.value = getFinalKeyframe$1(K, this.options, EO, this.speed)), TO && TO(jO.value), NO && this.finish(), jO;
9449
9719
  }
9450
9720
  then(s, d) {
9451
9721
  return this.finished.then(s, d);
@@ -10814,18 +11084,18 @@ function useVisualElement(s, d, C, w, k, F) {
10814
11084
  reducedMotionConfig: K,
10815
11085
  isSVG: F
10816
11086
  }));
10817
- let $ = X.current, FD = useContext(SwitchLayoutGroupContext);
10818
- $ && !$.projection && k && ($.type === "html" || $.type === "svg") && createProjectionNode$1(X.current, C, k, FD);
10819
- let ID = useRef(!1);
11087
+ let $ = X.current, EO = useContext(SwitchLayoutGroupContext);
11088
+ $ && !$.projection && k && ($.type === "html" || $.type === "svg") && createProjectionNode$1(X.current, C, k, EO);
11089
+ let DO = useRef(!1);
10820
11090
  useInsertionEffect(() => {
10821
- $ && ID.current && $.update(C, U);
11091
+ $ && DO.current && $.update(C, U);
10822
11092
  });
10823
- let RD = C[optimizedAppearDataAttribute], zD = useRef(!!RD && !window.MotionHandoffIsComplete?.(RD) && window.MotionHasOptimisedAnimation?.(RD));
11093
+ let kO = C[optimizedAppearDataAttribute], AO = useRef(!!kO && !window.MotionHandoffIsComplete?.(kO) && window.MotionHasOptimisedAnimation?.(kO));
10824
11094
  return useIsomorphicLayoutEffect(() => {
10825
- $ && (ID.current = !0, window.MotionIsMounted = !0, $.updateFeatures(), $.scheduleRenderMicrotask(), zD.current && $.animationState && $.animationState.animateChanges());
11095
+ $ && (DO.current = !0, window.MotionIsMounted = !0, $.updateFeatures(), $.scheduleRenderMicrotask(), AO.current && $.animationState && $.animationState.animateChanges());
10826
11096
  }), useEffect(() => {
10827
- $ && (!zD.current && $.animationState && $.animationState.animateChanges(), zD.current &&= (queueMicrotask(() => {
10828
- window.MotionHandoffMarkAsComplete?.(RD);
11097
+ $ && (!AO.current && $.animationState && $.animationState.animateChanges(), AO.current &&= (queueMicrotask(() => {
11098
+ window.MotionHandoffMarkAsComplete?.(kO);
10829
11099
  }), !1), $.enteringChildren = void 0);
10830
11100
  }), $;
10831
11101
  }
@@ -11503,34 +11773,34 @@ function createAnimationState(s) {
11503
11773
  function L(F) {
11504
11774
  let { props: L } = s, V = getVariantContext(s.parent) || {}, U = [], K = /* @__PURE__ */ new Set(), q = {}, J = Infinity;
11505
11775
  for (let d = 0; d < numAnimationTypes; d++) {
11506
- let X = reversePriorityOrder[d], $ = C[X], PD = L[X] === void 0 ? V[X] : L[X], FD = isVariantLabel(PD), ID = X === F ? $.isActive : null;
11507
- ID === !1 && (J = d);
11508
- let LD = PD === V[X] && PD !== L[X] && FD;
11509
- if (LD && w && s.manuallyAnimateOnMount && (LD = !1), $.protectedKeys = { ...q }, !$.isActive && ID === null || !PD && !$.prevProp || isAnimationControls(PD) || typeof PD == "boolean") continue;
11510
- let RD = checkVariantsDidChange($.prevProp, PD), zD = RD || X === F && $.isActive && !LD && FD || d > J && FD, BD = !1, VD = Array.isArray(PD) ? PD : [PD], HD = VD.reduce(k(X), {});
11511
- ID === !1 && (HD = {});
11512
- let { prevResolvedValues: UD = {} } = $, WD = {
11513
- ...UD,
11514
- ...HD
11515
- }, GD = (d) => {
11516
- zD = !0, K.has(d) && (BD = !0, K.delete(d)), $.needsAnimating[d] = !0;
11776
+ let X = reversePriorityOrder[d], $ = C[X], TO = L[X] === void 0 ? V[X] : L[X], EO = isVariantLabel(TO), DO = X === F ? $.isActive : null;
11777
+ DO === !1 && (J = d);
11778
+ let OO = TO === V[X] && TO !== L[X] && EO;
11779
+ if (OO && w && s.manuallyAnimateOnMount && (OO = !1), $.protectedKeys = { ...q }, !$.isActive && DO === null || !TO && !$.prevProp || isAnimationControls(TO) || typeof TO == "boolean") continue;
11780
+ let kO = checkVariantsDidChange($.prevProp, TO), AO = kO || X === F && $.isActive && !OO && EO || d > J && EO, jO = !1, MO = Array.isArray(TO) ? TO : [TO], NO = MO.reduce(k(X), {});
11781
+ DO === !1 && (NO = {});
11782
+ let { prevResolvedValues: PO = {} } = $, FO = {
11783
+ ...PO,
11784
+ ...NO
11785
+ }, IO = (d) => {
11786
+ AO = !0, K.has(d) && (jO = !0, K.delete(d)), $.needsAnimating[d] = !0;
11517
11787
  let C = s.getValue(d);
11518
11788
  C && (C.liveStyle = !1);
11519
11789
  };
11520
- for (let s in WD) {
11521
- let d = HD[s], C = UD[s];
11790
+ for (let s in FO) {
11791
+ let d = NO[s], C = PO[s];
11522
11792
  if (q.hasOwnProperty(s)) continue;
11523
11793
  let w = !1;
11524
- w = isKeyframesTarget(d) && isKeyframesTarget(C) ? !shallowCompare(d, C) : d !== C, w ? d == null ? K.add(s) : GD(s) : d !== void 0 && K.has(s) ? GD(s) : $.protectedKeys[s] = !0;
11794
+ w = isKeyframesTarget(d) && isKeyframesTarget(C) ? !shallowCompare(d, C) : d !== C, w ? d == null ? K.add(s) : IO(s) : d !== void 0 && K.has(s) ? IO(s) : $.protectedKeys[s] = !0;
11525
11795
  }
11526
- $.prevProp = PD, $.prevResolvedValues = HD, $.isActive && (q = {
11796
+ $.prevProp = TO, $.prevResolvedValues = NO, $.isActive && (q = {
11527
11797
  ...q,
11528
- ...HD
11529
- }), w && s.blockInitialAnimation && (zD = !1);
11530
- let KD = LD && RD;
11531
- zD && (!KD || BD) && U.push(...VD.map((d) => {
11798
+ ...NO
11799
+ }), w && s.blockInitialAnimation && (AO = !1);
11800
+ let LO = OO && kO;
11801
+ AO && (!LO || jO) && U.push(...MO.map((d) => {
11532
11802
  let C = { type: X };
11533
- if (typeof d == "string" && w && !KD && s.manuallyAnimateOnMount && s.parent) {
11803
+ if (typeof d == "string" && w && !LO && s.manuallyAnimateOnMount && s.parent) {
11534
11804
  let { parent: w } = s, k = resolveVariant(w, d);
11535
11805
  if (w.enteringChildren && k) {
11536
11806
  let { delayChildren: d } = k.transition || {};