@1urso/generic-editor 0.1.68 → 0.1.70

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.
@@ -987,15 +987,15 @@ var DISMISSABLE_LAYER_NAME = "DismissableLayer", CONTEXT_UPDATE = "dismissableLa
987
987
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
988
988
  branches: /* @__PURE__ */ new Set()
989
989
  }), DismissableLayer = React$1.forwardRef((_, E) => {
990
- let { disableOutsidePointerEvents: O = !1, onEscapeKeyDown: A, onPointerDownOutside: j, onFocusOutside: M, onInteractOutside: N, onDismiss: P, ...z } = _, B = React$1.useContext(DismissableLayerContext), [H, U] = React$1.useState(null), W = H?.ownerDocument ?? globalThis?.document, [, G] = React$1.useState({}), Z = useComposedRefs$1(E, (n) => U(n)), KF = Array.from(B.layers), [qF] = [...B.layersWithOutsidePointerEventsDisabled].slice(-1), JF = KF.indexOf(qF), YF = H ? KF.indexOf(H) : -1, XF = B.layersWithOutsidePointerEventsDisabled.size > 0, ZF = YF >= JF, QF = usePointerDownOutside((n) => {
990
+ let { disableOutsidePointerEvents: O = !1, onEscapeKeyDown: A, onPointerDownOutside: j, onFocusOutside: M, onInteractOutside: N, onDismiss: P, ...z } = _, B = React$1.useContext(DismissableLayerContext), [H, U] = React$1.useState(null), W = H?.ownerDocument ?? globalThis?.document, [, G] = React$1.useState({}), Z = useComposedRefs$1(E, (n) => U(n)), qF = Array.from(B.layers), [JF] = [...B.layersWithOutsidePointerEventsDisabled].slice(-1), YF = qF.indexOf(JF), XF = H ? qF.indexOf(H) : -1, ZF = B.layersWithOutsidePointerEventsDisabled.size > 0, QF = XF >= YF, $F = usePointerDownOutside((n) => {
991
991
  let _ = n.target, E = [...B.branches].some((n) => n.contains(_));
992
- !ZF || E || (j?.(n), N?.(n), n.defaultPrevented || P?.());
993
- }, W), $F = useFocusOutside((n) => {
992
+ !QF || E || (j?.(n), N?.(n), n.defaultPrevented || P?.());
993
+ }, W), eI = useFocusOutside((n) => {
994
994
  let _ = n.target;
995
995
  [...B.branches].some((n) => n.contains(_)) || (M?.(n), N?.(n), n.defaultPrevented || P?.());
996
996
  }, W);
997
997
  return useEscapeKeydown((n) => {
998
- YF === B.layers.size - 1 && (A?.(n), !n.defaultPrevented && P && (n.preventDefault(), P()));
998
+ XF === B.layers.size - 1 && (A?.(n), !n.defaultPrevented && P && (n.preventDefault(), P()));
999
999
  }, W), React$1.useEffect(() => {
1000
1000
  if (H) return O && (B.layersWithOutsidePointerEventsDisabled.size === 0 && (originalBodyPointerEvents = W.body.style.pointerEvents, W.body.style.pointerEvents = "none"), B.layersWithOutsidePointerEventsDisabled.add(H)), B.layers.add(H), dispatchUpdate(), () => {
1001
1001
  O && B.layersWithOutsidePointerEventsDisabled.size === 1 && (W.body.style.pointerEvents = originalBodyPointerEvents);
@@ -1014,12 +1014,12 @@ var DISMISSABLE_LAYER_NAME = "DismissableLayer", CONTEXT_UPDATE = "dismissableLa
1014
1014
  ...z,
1015
1015
  ref: Z,
1016
1016
  style: {
1017
- pointerEvents: XF ? ZF ? "auto" : "none" : void 0,
1017
+ pointerEvents: ZF ? QF ? "auto" : "none" : void 0,
1018
1018
  ..._.style
1019
1019
  },
1020
- onFocusCapture: composeEventHandlers(_.onFocusCapture, $F.onFocusCapture),
1021
- onBlurCapture: composeEventHandlers(_.onBlurCapture, $F.onBlurCapture),
1022
- onPointerDownCapture: composeEventHandlers(_.onPointerDownCapture, QF.onPointerDownCapture)
1020
+ onFocusCapture: composeEventHandlers(_.onFocusCapture, eI.onFocusCapture),
1021
+ onBlurCapture: composeEventHandlers(_.onBlurCapture, eI.onBlurCapture),
1022
+ onPointerDownCapture: composeEventHandlers(_.onPointerDownCapture, $F.onPointerDownCapture)
1023
1023
  });
1024
1024
  });
1025
1025
  DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
@@ -1378,7 +1378,7 @@ var effectCar = createSidecarMedium(), nothing = function() {}, RemoveScroll = R
1378
1378
  onScrollCapture: nothing,
1379
1379
  onWheelCapture: nothing,
1380
1380
  onTouchMoveCapture: nothing
1381
- }), j = A[0], M = A[1], N = _.forwardProps, P = _.children, z = _.className, B = _.removeScrollBar, H = _.enabled, U = _.shards, W = _.sideCar, G = _.noRelative, Z = _.noIsolation, KF = _.inert, qF = _.allowPinchZoom, JF = _.as, YF = JF === void 0 ? "div" : JF, XF = _.gapMode, ZF = __rest(_, [
1381
+ }), j = A[0], M = A[1], N = _.forwardProps, P = _.children, z = _.className, B = _.removeScrollBar, H = _.enabled, U = _.shards, W = _.sideCar, G = _.noRelative, Z = _.noIsolation, qF = _.inert, JF = _.allowPinchZoom, YF = _.as, XF = YF === void 0 ? "div" : YF, ZF = _.gapMode, QF = __rest(_, [
1382
1382
  "forwardProps",
1383
1383
  "children",
1384
1384
  "className",
@@ -1392,21 +1392,21 @@ var effectCar = createSidecarMedium(), nothing = function() {}, RemoveScroll = R
1392
1392
  "allowPinchZoom",
1393
1393
  "as",
1394
1394
  "gapMode"
1395
- ]), QF = W, $F = useMergeRefs([O, E]), eI = __assign$2(__assign$2({}, ZF), j);
1396
- return React$1.createElement(React$1.Fragment, null, H && React$1.createElement(QF, {
1395
+ ]), $F = W, eI = useMergeRefs([O, E]), tI = __assign$2(__assign$2({}, QF), j);
1396
+ return React$1.createElement(React$1.Fragment, null, H && React$1.createElement($F, {
1397
1397
  sideCar: effectCar,
1398
1398
  removeScrollBar: B,
1399
1399
  shards: U,
1400
1400
  noRelative: G,
1401
1401
  noIsolation: Z,
1402
- inert: KF,
1402
+ inert: qF,
1403
1403
  setCallbacks: M,
1404
- allowPinchZoom: !!qF,
1404
+ allowPinchZoom: !!JF,
1405
1405
  lockRef: O,
1406
- gapMode: XF
1407
- }), N ? React$1.cloneElement(React$1.Children.only(P), __assign$2(__assign$2({}, eI), { ref: $F })) : React$1.createElement(YF, __assign$2({}, eI, {
1406
+ gapMode: ZF
1407
+ }), N ? React$1.cloneElement(React$1.Children.only(P), __assign$2(__assign$2({}, tI), { ref: eI })) : React$1.createElement(XF, __assign$2({}, tI, {
1408
1408
  className: z,
1409
- ref: $F
1409
+ ref: eI
1410
1410
  }), P));
1411
1411
  });
1412
1412
  RemoveScroll.defaultProps = {
@@ -1596,8 +1596,8 @@ var nonPassive = passiveSupported ? { passive: !1 } : !1, alwaysContainsScroll =
1596
1596
  if (!N) break;
1597
1597
  var W = getScrollVariables(n, N), G = W[0], Z = W[1] - W[2] - j * G;
1598
1598
  (G || Z) && elementCouldBeScrolled(n, N) && (H += Z, U += G);
1599
- var KF = N.parentNode;
1600
- N = KF && KF.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? KF.host : KF;
1599
+ var qF = N.parentNode;
1600
+ N = qF && qF.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? qF.host : qF;
1601
1601
  } while (!P && N !== document.body || P && (_.contains(N) || _ === N));
1602
1602
  return (B && (A && Math.abs(H) < 1 || !A && M > H) || !B && (A && Math.abs(U) < 1 || !A && -M > U)) && (z = !0), z;
1603
1603
  }, getTouchXY = function(n) {
@@ -2144,7 +2144,7 @@ var computePosition$1 = async (n, _, E) => {
2144
2144
  strategy: A
2145
2145
  }), { x: B, y: H } = computeCoordsFromPlacement(z, O, P), U = O, W = {}, G = 0;
2146
2146
  for (let E = 0; E < N.length; E++) {
2147
- let { name: j, fn: Z } = N[E], { x: KF, y: qF, data: JF, reset: YF } = await Z({
2147
+ let { name: j, fn: Z } = N[E], { x: qF, y: JF, data: YF, reset: XF } = await Z({
2148
2148
  x: B,
2149
2149
  y: H,
2150
2150
  initialPlacement: O,
@@ -2158,17 +2158,17 @@ var computePosition$1 = async (n, _, E) => {
2158
2158
  floating: _
2159
2159
  }
2160
2160
  });
2161
- B = KF ?? B, H = qF ?? H, W = {
2161
+ B = qF ?? B, H = JF ?? H, W = {
2162
2162
  ...W,
2163
2163
  [j]: {
2164
2164
  ...W[j],
2165
- ...JF
2165
+ ...YF
2166
2166
  }
2167
- }, YF && G <= 50 && (G++, typeof YF == "object" && (YF.placement && (U = YF.placement), YF.rects && (z = YF.rects === !0 ? await M.getElementRects({
2167
+ }, XF && G <= 50 && (G++, typeof XF == "object" && (XF.placement && (U = XF.placement), XF.rects && (z = XF.rects === !0 ? await M.getElementRects({
2168
2168
  reference: n,
2169
2169
  floating: _,
2170
2170
  strategy: A
2171
- }) : YF.rects), {x: B, y: H} = computeCoordsFromPlacement(z, U, P)), E = -1);
2171
+ }) : XF.rects), {x: B, y: H} = computeCoordsFromPlacement(z, U, P)), E = -1);
2172
2172
  }
2173
2173
  return {
2174
2174
  x: B,
@@ -2185,25 +2185,25 @@ async function detectOverflow$1(n, _) {
2185
2185
  boundary: P,
2186
2186
  rootBoundary: z,
2187
2187
  strategy: N
2188
- })), KF = B === "floating" ? {
2188
+ })), qF = B === "floating" ? {
2189
2189
  x: E,
2190
2190
  y: O,
2191
2191
  width: j.floating.width,
2192
2192
  height: j.floating.height
2193
- } : j.reference, qF = await (A.getOffsetParent == null ? void 0 : A.getOffsetParent(M.floating)), JF = await (A.isElement == null ? void 0 : A.isElement(qF)) && await (A.getScale == null ? void 0 : A.getScale(qF)) || {
2193
+ } : j.reference, JF = await (A.getOffsetParent == null ? void 0 : A.getOffsetParent(M.floating)), YF = await (A.isElement == null ? void 0 : A.isElement(JF)) && await (A.getScale == null ? void 0 : A.getScale(JF)) || {
2194
2194
  x: 1,
2195
2195
  y: 1
2196
- }, YF = rectToClientRect(A.convertOffsetParentRelativeRectToViewportRelativeRect ? await A.convertOffsetParentRelativeRectToViewportRelativeRect({
2196
+ }, XF = rectToClientRect(A.convertOffsetParentRelativeRectToViewportRelativeRect ? await A.convertOffsetParentRelativeRectToViewportRelativeRect({
2197
2197
  elements: M,
2198
- rect: KF,
2199
- offsetParent: qF,
2198
+ rect: qF,
2199
+ offsetParent: JF,
2200
2200
  strategy: N
2201
- }) : KF);
2201
+ }) : qF);
2202
2202
  return {
2203
- top: (Z.top - YF.top + W.top) / JF.y,
2204
- bottom: (YF.bottom - Z.bottom + W.bottom) / JF.y,
2205
- left: (Z.left - YF.left + W.left) / JF.x,
2206
- right: (YF.right - Z.right + W.right) / JF.x
2203
+ top: (Z.top - XF.top + W.top) / YF.y,
2204
+ bottom: (XF.bottom - Z.bottom + W.bottom) / YF.y,
2205
+ left: (Z.left - XF.left + W.left) / YF.x,
2206
+ right: (XF.right - Z.right + W.right) / YF.x
2207
2207
  };
2208
2208
  }
2209
2209
  var arrow$2 = (n) => ({
@@ -2215,17 +2215,17 @@ var arrow$2 = (n) => ({
2215
2215
  let H = getPaddingObject(B), U = {
2216
2216
  x: E,
2217
2217
  y: O
2218
- }, W = getAlignmentAxis(A), G = getAxisLength(W), Z = await M.getDimensions(z), KF = W === "y", qF = KF ? "top" : "left", JF = KF ? "bottom" : "right", YF = KF ? "clientHeight" : "clientWidth", XF = j.reference[G] + j.reference[W] - U[W] - j.floating[G], ZF = U[W] - j.reference[W], QF = await (M.getOffsetParent == null ? void 0 : M.getOffsetParent(z)), $F = QF ? QF[YF] : 0;
2219
- (!$F || !await (M.isElement == null ? void 0 : M.isElement(QF))) && ($F = N.floating[YF] || j.floating[G]);
2220
- let eI = XF / 2 - ZF / 2, tI = $F / 2 - Z[G] / 2 - 1, nI = min(H[qF], tI), rI = min(H[JF], tI), iI = nI, aI = $F - Z[G] - rI, oI = $F / 2 - Z[G] / 2 + eI, sI = clamp$3(iI, oI, aI), cI = !P.arrow && getAlignment(A) != null && oI !== sI && j.reference[G] / 2 - (oI < iI ? nI : rI) - Z[G] / 2 < 0, lI = cI ? oI < iI ? oI - iI : oI - aI : 0;
2218
+ }, W = getAlignmentAxis(A), G = getAxisLength(W), Z = await M.getDimensions(z), qF = W === "y", JF = qF ? "top" : "left", YF = qF ? "bottom" : "right", XF = qF ? "clientHeight" : "clientWidth", ZF = j.reference[G] + j.reference[W] - U[W] - j.floating[G], QF = U[W] - j.reference[W], $F = await (M.getOffsetParent == null ? void 0 : M.getOffsetParent(z)), eI = $F ? $F[XF] : 0;
2219
+ (!eI || !await (M.isElement == null ? void 0 : M.isElement($F))) && (eI = N.floating[XF] || j.floating[G]);
2220
+ let tI = ZF / 2 - QF / 2, nI = eI / 2 - Z[G] / 2 - 1, rI = min(H[JF], nI), iI = min(H[YF], nI), aI = rI, oI = eI - Z[G] - iI, sI = eI / 2 - Z[G] / 2 + tI, cI = clamp$3(aI, sI, oI), lI = !P.arrow && getAlignment(A) != null && sI !== cI && j.reference[G] / 2 - (sI < aI ? rI : iI) - Z[G] / 2 < 0, uI = lI ? sI < aI ? sI - aI : sI - oI : 0;
2221
2221
  return {
2222
- [W]: U[W] + lI,
2222
+ [W]: U[W] + uI,
2223
2223
  data: {
2224
- [W]: sI,
2225
- centerOffset: oI - sI - lI,
2226
- ...cI && { alignmentOffset: lI }
2224
+ [W]: cI,
2225
+ centerOffset: sI - cI - uI,
2226
+ ...lI && { alignmentOffset: uI }
2227
2227
  },
2228
- reset: cI
2228
+ reset: lI
2229
2229
  };
2230
2230
  }
2231
2231
  }), flip$2 = function(n) {
@@ -2236,32 +2236,32 @@ var arrow$2 = (n) => ({
2236
2236
  var E;
2237
2237
  let { placement: O, middlewareData: A, rects: j, initialPlacement: M, platform: N, elements: P } = _, { mainAxis: z = !0, crossAxis: B = !0, fallbackPlacements: H, fallbackStrategy: U = "bestFit", fallbackAxisSideDirection: W = "none", flipAlignment: G = !0, ...Z } = evaluate(n, _);
2238
2238
  if ((E = A.arrow) != null && E.alignmentOffset) return {};
2239
- let KF = getSide(O), qF = getSideAxis(M), JF = getSide(M) === M, YF = await (N.isRTL == null ? void 0 : N.isRTL(P.floating)), XF = H || (JF || !G ? [getOppositePlacement(M)] : getExpandedPlacements(M)), ZF = W !== "none";
2240
- !H && ZF && XF.push(...getOppositeAxisPlacements(M, G, W, YF));
2241
- let QF = [M, ...XF], $F = await detectOverflow$1(_, Z), eI = [], tI = A.flip?.overflows || [];
2242
- if (z && eI.push($F[KF]), B) {
2243
- let n = getAlignmentSides(O, j, YF);
2244
- eI.push($F[n[0]], $F[n[1]]);
2239
+ let qF = getSide(O), JF = getSideAxis(M), YF = getSide(M) === M, XF = await (N.isRTL == null ? void 0 : N.isRTL(P.floating)), ZF = H || (YF || !G ? [getOppositePlacement(M)] : getExpandedPlacements(M)), QF = W !== "none";
2240
+ !H && QF && ZF.push(...getOppositeAxisPlacements(M, G, W, XF));
2241
+ let $F = [M, ...ZF], eI = await detectOverflow$1(_, Z), tI = [], nI = A.flip?.overflows || [];
2242
+ if (z && tI.push(eI[qF]), B) {
2243
+ let n = getAlignmentSides(O, j, XF);
2244
+ tI.push(eI[n[0]], eI[n[1]]);
2245
2245
  }
2246
- if (tI = [...tI, {
2246
+ if (nI = [...nI, {
2247
2247
  placement: O,
2248
- overflows: eI
2249
- }], !eI.every((n) => n <= 0)) {
2250
- let n = (A.flip?.index || 0) + 1, _ = QF[n];
2251
- if (_ && (!(B === "alignment" && qF !== getSideAxis(_)) || tI.every((n) => getSideAxis(n.placement) === qF ? n.overflows[0] > 0 : !0))) return {
2248
+ overflows: tI
2249
+ }], !tI.every((n) => n <= 0)) {
2250
+ let n = (A.flip?.index || 0) + 1, _ = $F[n];
2251
+ if (_ && (!(B === "alignment" && JF !== getSideAxis(_)) || nI.every((n) => getSideAxis(n.placement) === JF ? n.overflows[0] > 0 : !0))) return {
2252
2252
  data: {
2253
2253
  index: n,
2254
- overflows: tI
2254
+ overflows: nI
2255
2255
  },
2256
2256
  reset: { placement: _ }
2257
2257
  };
2258
- let E = tI.filter((n) => n.overflows[0] <= 0).sort((n, _) => n.overflows[1] - _.overflows[1])[0]?.placement;
2258
+ let E = nI.filter((n) => n.overflows[0] <= 0).sort((n, _) => n.overflows[1] - _.overflows[1])[0]?.placement;
2259
2259
  if (!E) switch (U) {
2260
2260
  case "bestFit": {
2261
- let n = tI.filter((n) => {
2262
- if (ZF) {
2261
+ let n = nI.filter((n) => {
2262
+ if (QF) {
2263
2263
  let _ = getSideAxis(n.placement);
2264
- return _ === qF || _ === "y";
2264
+ return _ === JF || _ === "y";
2265
2265
  }
2266
2266
  return !0;
2267
2267
  }).map((n) => [n.placement, n.overflows.filter((n) => n > 0).reduce((n, _) => n + _, 0)]).sort((n, _) => n[1] - _[1])[0]?.[0];
@@ -2404,7 +2404,7 @@ var offset$2 = function(n) {
2404
2404
  let { x: E, y: O, placement: A, rects: j, middlewareData: M } = _, { offset: N = 0, mainAxis: P = !0, crossAxis: z = !0 } = evaluate(n, _), B = {
2405
2405
  x: E,
2406
2406
  y: O
2407
- }, H = getSideAxis(A), U = getOppositeAxis(H), W = B[U], G = B[H], Z = evaluate(N, _), KF = typeof Z == "number" ? {
2407
+ }, H = getSideAxis(A), U = getOppositeAxis(H), W = B[U], G = B[H], Z = evaluate(N, _), qF = typeof Z == "number" ? {
2408
2408
  mainAxis: Z,
2409
2409
  crossAxis: 0
2410
2410
  } : {
@@ -2413,11 +2413,11 @@ var offset$2 = function(n) {
2413
2413
  ...Z
2414
2414
  };
2415
2415
  if (P) {
2416
- let n = U === "y" ? "height" : "width", _ = j.reference[U] - j.floating[n] + KF.mainAxis, E = j.reference[U] + j.reference[n] - KF.mainAxis;
2416
+ let n = U === "y" ? "height" : "width", _ = j.reference[U] - j.floating[n] + qF.mainAxis, E = j.reference[U] + j.reference[n] - qF.mainAxis;
2417
2417
  W < _ ? W = _ : W > E && (W = E);
2418
2418
  }
2419
2419
  if (z) {
2420
- let n = U === "y" ? "width" : "height", _ = originSides.has(getSide(A)), E = j.reference[H] - j.floating[n] + (_ && M.offset?.[H] || 0) + (_ ? 0 : KF.crossAxis), O = j.reference[H] + j.reference[n] + (_ ? 0 : M.offset?.[H] || 0) - (_ ? KF.crossAxis : 0);
2420
+ let n = U === "y" ? "width" : "height", _ = originSides.has(getSide(A)), E = j.reference[H] - j.floating[n] + (_ && M.offset?.[H] || 0) + (_ ? 0 : qF.crossAxis), O = j.reference[H] + j.reference[n] + (_ ? 0 : M.offset?.[H] || 0) - (_ ? qF.crossAxis : 0);
2421
2421
  G < E ? G = E : G > O && (G = O);
2422
2422
  }
2423
2423
  return {
@@ -2432,20 +2432,20 @@ var offset$2 = function(n) {
2432
2432
  options: n,
2433
2433
  async fn(_) {
2434
2434
  var E, O;
2435
- let { placement: A, rects: j, platform: M, elements: N } = _, { apply: P = () => {}, ...z } = evaluate(n, _), B = await detectOverflow$1(_, z), H = getSide(A), U = getAlignment(A), W = getSideAxis(A) === "y", { width: G, height: Z } = j.floating, KF, qF;
2436
- H === "top" || H === "bottom" ? (KF = H, qF = U === (await (M.isRTL == null ? void 0 : M.isRTL(N.floating)) ? "start" : "end") ? "left" : "right") : (qF = H, KF = U === "end" ? "top" : "bottom");
2437
- let JF = Z - B.top - B.bottom, YF = G - B.left - B.right, XF = min(Z - B[KF], JF), ZF = min(G - B[qF], YF), QF = !_.middlewareData.shift, $F = XF, eI = ZF;
2438
- if ((E = _.middlewareData.shift) != null && E.enabled.x && (eI = YF), (O = _.middlewareData.shift) != null && O.enabled.y && ($F = JF), QF && !U) {
2435
+ let { placement: A, rects: j, platform: M, elements: N } = _, { apply: P = () => {}, ...z } = evaluate(n, _), B = await detectOverflow$1(_, z), H = getSide(A), U = getAlignment(A), W = getSideAxis(A) === "y", { width: G, height: Z } = j.floating, qF, JF;
2436
+ H === "top" || H === "bottom" ? (qF = H, JF = U === (await (M.isRTL == null ? void 0 : M.isRTL(N.floating)) ? "start" : "end") ? "left" : "right") : (JF = H, qF = U === "end" ? "top" : "bottom");
2437
+ let YF = Z - B.top - B.bottom, XF = G - B.left - B.right, ZF = min(Z - B[qF], YF), QF = min(G - B[JF], XF), $F = !_.middlewareData.shift, eI = ZF, tI = QF;
2438
+ if ((E = _.middlewareData.shift) != null && E.enabled.x && (tI = XF), (O = _.middlewareData.shift) != null && O.enabled.y && (eI = YF), $F && !U) {
2439
2439
  let n = max(B.left, 0), _ = max(B.right, 0), E = max(B.top, 0), O = max(B.bottom, 0);
2440
- W ? eI = G - 2 * (n !== 0 || _ !== 0 ? n + _ : max(B.left, B.right)) : $F = Z - 2 * (E !== 0 || O !== 0 ? E + O : max(B.top, B.bottom));
2440
+ W ? tI = G - 2 * (n !== 0 || _ !== 0 ? n + _ : max(B.left, B.right)) : eI = Z - 2 * (E !== 0 || O !== 0 ? E + O : max(B.top, B.bottom));
2441
2441
  }
2442
2442
  await P({
2443
2443
  ..._,
2444
- availableWidth: eI,
2445
- availableHeight: $F
2444
+ availableWidth: tI,
2445
+ availableHeight: eI
2446
2446
  });
2447
- let tI = await M.getDimensions(N.floating);
2448
- return G !== tI.width || Z !== tI.height ? { reset: { rects: !0 } } : {};
2447
+ let nI = await M.getDimensions(N.floating);
2448
+ return G !== nI.width || Z !== nI.height ? { reset: { rects: !0 } } : {};
2449
2449
  }
2450
2450
  };
2451
2451
  };
@@ -2829,27 +2829,27 @@ function observeMove(n, _) {
2829
2829
  N === void 0 && (N = !1), P === void 0 && (P = 1), j();
2830
2830
  let z = n.getBoundingClientRect(), { left: B, top: H, width: U, height: W } = z;
2831
2831
  if (N || _(), !U || !W) return;
2832
- let G = floor(H), Z = floor(A.clientWidth - (B + U)), KF = floor(A.clientHeight - (H + W)), qF = floor(B), JF = {
2833
- rootMargin: -G + "px " + -Z + "px " + -KF + "px " + -qF + "px",
2832
+ let G = floor(H), Z = floor(A.clientWidth - (B + U)), qF = floor(A.clientHeight - (H + W)), JF = floor(B), YF = {
2833
+ rootMargin: -G + "px " + -Z + "px " + -qF + "px " + -JF + "px",
2834
2834
  threshold: max(0, min(1, P)) || 1
2835
- }, YF = !0;
2836
- function XF(_) {
2835
+ }, XF = !0;
2836
+ function ZF(_) {
2837
2837
  let E = _[0].intersectionRatio;
2838
2838
  if (E !== P) {
2839
- if (!YF) return M();
2839
+ if (!XF) return M();
2840
2840
  E ? M(!1, E) : O = setTimeout(() => {
2841
2841
  M(!1, 1e-7);
2842
2842
  }, 1e3);
2843
2843
  }
2844
- E === 1 && !rectsAreEqual(z, n.getBoundingClientRect()) && M(), YF = !1;
2844
+ E === 1 && !rectsAreEqual(z, n.getBoundingClientRect()) && M(), XF = !1;
2845
2845
  }
2846
2846
  try {
2847
- E = new IntersectionObserver(XF, {
2848
- ...JF,
2847
+ E = new IntersectionObserver(ZF, {
2848
+ ...YF,
2849
2849
  root: A.ownerDocument
2850
2850
  });
2851
2851
  } catch {
2852
- E = new IntersectionObserver(XF, JF);
2852
+ E = new IntersectionObserver(ZF, YF);
2853
2853
  }
2854
2854
  E.observe(n);
2855
2855
  }
@@ -2870,10 +2870,10 @@ function autoUpdate(n, _, E, O) {
2870
2870
  })), E();
2871
2871
  }), z && !P && W.observe(z), W.observe(_));
2872
2872
  let G, Z = P ? getBoundingClientRect(n) : null;
2873
- P && KF();
2874
- function KF() {
2873
+ P && qF();
2874
+ function qF() {
2875
2875
  let _ = getBoundingClientRect(n);
2876
- Z && !rectsAreEqual(Z, _) && E(), Z = _, G = requestAnimationFrame(KF);
2876
+ Z && !rectsAreEqual(Z, _) && E(), Z = _, G = requestAnimationFrame(qF);
2877
2877
  }
2878
2878
  return E(), () => {
2879
2879
  var n;
@@ -2940,23 +2940,23 @@ function useFloating(_) {
2940
2940
  isPositioned: !1
2941
2941
  }), [W, G] = React$1.useState(A);
2942
2942
  deepEqual(W, A) || G(A);
2943
- let [Z, KF] = React$1.useState(null), [qF, JF] = React$1.useState(null), YF = React$1.useCallback((n) => {
2944
- n !== eI.current && (eI.current = n, KF(n));
2945
- }, []), XF = React$1.useCallback((n) => {
2946
- n !== tI.current && (tI.current = n, JF(n));
2947
- }, []), ZF = M || Z, QF = N || qF, eI = React$1.useRef(null), tI = React$1.useRef(null), nI = React$1.useRef(H), rI = z != null, iI = useLatestRef(z), aI = useLatestRef(j), oI = useLatestRef(B), sI = React$1.useCallback(() => {
2948
- if (!eI.current || !tI.current) return;
2943
+ let [Z, qF] = React$1.useState(null), [JF, YF] = React$1.useState(null), XF = React$1.useCallback((n) => {
2944
+ n !== tI.current && (tI.current = n, qF(n));
2945
+ }, []), ZF = React$1.useCallback((n) => {
2946
+ n !== nI.current && (nI.current = n, YF(n));
2947
+ }, []), QF = M || Z, $F = N || JF, tI = React$1.useRef(null), nI = React$1.useRef(null), rI = React$1.useRef(H), iI = z != null, aI = useLatestRef(z), oI = useLatestRef(j), sI = useLatestRef(B), cI = React$1.useCallback(() => {
2948
+ if (!tI.current || !nI.current) return;
2949
2949
  let n = {
2950
2950
  placement: E,
2951
2951
  strategy: O,
2952
2952
  middleware: W
2953
2953
  };
2954
- aI.current && (n.platform = aI.current), computePosition(eI.current, tI.current, n).then((n) => {
2954
+ oI.current && (n.platform = oI.current), computePosition(tI.current, nI.current, n).then((n) => {
2955
2955
  let _ = {
2956
2956
  ...n,
2957
- isPositioned: oI.current !== !1
2957
+ isPositioned: sI.current !== !1
2958
2958
  };
2959
- cI.current && !deepEqual(nI.current, _) && (nI.current = _, ReactDOM$1.flushSync(() => {
2959
+ lI.current && !deepEqual(rI.current, _) && (rI.current = _, ReactDOM$1.flushSync(() => {
2960
2960
  U(_);
2961
2961
  }));
2962
2962
  });
@@ -2964,50 +2964,50 @@ function useFloating(_) {
2964
2964
  W,
2965
2965
  E,
2966
2966
  O,
2967
- aI,
2968
- oI
2967
+ oI,
2968
+ sI
2969
2969
  ]);
2970
2970
  index(() => {
2971
- B === !1 && nI.current.isPositioned && (nI.current.isPositioned = !1, U((n) => ({
2971
+ B === !1 && rI.current.isPositioned && (rI.current.isPositioned = !1, U((n) => ({
2972
2972
  ...n,
2973
2973
  isPositioned: !1
2974
2974
  })));
2975
2975
  }, [B]);
2976
- let cI = React$1.useRef(!1);
2977
- index(() => (cI.current = !0, () => {
2978
- cI.current = !1;
2976
+ let lI = React$1.useRef(!1);
2977
+ index(() => (lI.current = !0, () => {
2978
+ lI.current = !1;
2979
2979
  }), []), index(() => {
2980
- if (ZF && (eI.current = ZF), QF && (tI.current = QF), ZF && QF) {
2981
- if (iI.current) return iI.current(ZF, QF, sI);
2982
- sI();
2980
+ if (QF && (tI.current = QF), $F && (nI.current = $F), QF && $F) {
2981
+ if (aI.current) return aI.current(QF, $F, cI);
2982
+ cI();
2983
2983
  }
2984
2984
  }, [
2985
- ZF,
2986
2985
  QF,
2987
- sI,
2988
- iI,
2989
- rI
2986
+ $F,
2987
+ cI,
2988
+ aI,
2989
+ iI
2990
2990
  ]);
2991
- let lI = React$1.useMemo(() => ({
2992
- reference: eI,
2993
- floating: tI,
2994
- setReference: YF,
2995
- setFloating: XF
2996
- }), [YF, XF]), uI = React$1.useMemo(() => ({
2997
- reference: ZF,
2998
- floating: QF
2999
- }), [ZF, QF]), dI = React$1.useMemo(() => {
2991
+ let uI = React$1.useMemo(() => ({
2992
+ reference: tI,
2993
+ floating: nI,
2994
+ setReference: XF,
2995
+ setFloating: ZF
2996
+ }), [XF, ZF]), dI = React$1.useMemo(() => ({
2997
+ reference: QF,
2998
+ floating: $F
2999
+ }), [QF, $F]), fI = React$1.useMemo(() => {
3000
3000
  let n = {
3001
3001
  position: O,
3002
3002
  left: 0,
3003
3003
  top: 0
3004
3004
  };
3005
- if (!uI.floating) return n;
3006
- let _ = roundByDPR(uI.floating, H.x), E = roundByDPR(uI.floating, H.y);
3005
+ if (!dI.floating) return n;
3006
+ let _ = roundByDPR(dI.floating, H.x), E = roundByDPR(dI.floating, H.y);
3007
3007
  return P ? {
3008
3008
  ...n,
3009
3009
  transform: "translate(" + _ + "px, " + E + "px)",
3010
- ...getDPR(uI.floating) >= 1.5 && { willChange: "transform" }
3010
+ ...getDPR(dI.floating) >= 1.5 && { willChange: "transform" }
3011
3011
  } : {
3012
3012
  position: O,
3013
3013
  left: _,
@@ -3016,22 +3016,22 @@ function useFloating(_) {
3016
3016
  }, [
3017
3017
  O,
3018
3018
  P,
3019
- uI.floating,
3019
+ dI.floating,
3020
3020
  H.x,
3021
3021
  H.y
3022
3022
  ]);
3023
3023
  return React$1.useMemo(() => ({
3024
3024
  ...H,
3025
- update: sI,
3026
- refs: lI,
3027
- elements: uI,
3028
- floatingStyles: dI
3025
+ update: cI,
3026
+ refs: uI,
3027
+ elements: dI,
3028
+ floatingStyles: fI
3029
3029
  }), [
3030
3030
  H,
3031
- sI,
3032
- lI,
3031
+ cI,
3033
3032
  uI,
3034
- dI
3033
+ dI,
3034
+ fI
3035
3035
  ]);
3036
3036
  }
3037
3037
  var arrow$1$1 = (n) => {
@@ -3108,70 +3108,70 @@ var ANCHOR_NAME$2 = "PopperAnchor", PopperAnchor = React$1.forwardRef((_, E) =>
3108
3108
  });
3109
3109
  PopperAnchor.displayName = ANCHOR_NAME$2;
3110
3110
  var CONTENT_NAME$6 = "PopperContent", [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$6), PopperContent = React$1.forwardRef((_, E) => {
3111
- let { __scopePopper: O, side: A = "bottom", sideOffset: j = 0, align: M = "center", alignOffset: N = 0, arrowPadding: P = 0, avoidCollisions: z = !0, collisionBoundary: B = [], collisionPadding: H = 0, sticky: U = "partial", hideWhenDetached: W = !1, updatePositionStrategy: G = "optimized", onPlaced: Z, ...KF } = _, qF = usePopperContext(CONTENT_NAME$6, O), [JF, YF] = React$1.useState(null), XF = useComposedRefs$1(E, (n) => YF(n)), [ZF, QF] = React$1.useState(null), $F = useSize(ZF), eI = $F?.width ?? 0, tI = $F?.height ?? 0, nI = A + (M === "center" ? "" : "-" + M), rI = typeof H == "number" ? H : {
3111
+ let { __scopePopper: O, side: A = "bottom", sideOffset: j = 0, align: M = "center", alignOffset: N = 0, arrowPadding: P = 0, avoidCollisions: z = !0, collisionBoundary: B = [], collisionPadding: H = 0, sticky: U = "partial", hideWhenDetached: W = !1, updatePositionStrategy: G = "optimized", onPlaced: Z, ...qF } = _, JF = usePopperContext(CONTENT_NAME$6, O), [YF, XF] = React$1.useState(null), ZF = useComposedRefs$1(E, (n) => XF(n)), [QF, $F] = React$1.useState(null), eI = useSize(QF), tI = eI?.width ?? 0, nI = eI?.height ?? 0, rI = A + (M === "center" ? "" : "-" + M), iI = typeof H == "number" ? H : {
3112
3112
  top: 0,
3113
3113
  right: 0,
3114
3114
  bottom: 0,
3115
3115
  left: 0,
3116
3116
  ...H
3117
- }, iI = Array.isArray(B) ? B : [B], oI = iI.length > 0, sI = {
3118
- padding: rI,
3119
- boundary: iI.filter(isNotNull$2),
3120
- altBoundary: oI
3121
- }, { refs: cI, floatingStyles: lI, placement: uI, isPositioned: dI, middlewareData: fI } = useFloating({
3117
+ }, aI = Array.isArray(B) ? B : [B], sI = aI.length > 0, cI = {
3118
+ padding: iI,
3119
+ boundary: aI.filter(isNotNull$2),
3120
+ altBoundary: sI
3121
+ }, { refs: lI, floatingStyles: uI, placement: dI, isPositioned: fI, middlewareData: pI } = useFloating({
3122
3122
  strategy: "fixed",
3123
- placement: nI,
3123
+ placement: rI,
3124
3124
  whileElementsMounted: (...n) => autoUpdate(...n, { animationFrame: G === "always" }),
3125
- elements: { reference: qF.anchor },
3125
+ elements: { reference: JF.anchor },
3126
3126
  middleware: [
3127
3127
  offset({
3128
- mainAxis: j + tI,
3128
+ mainAxis: j + nI,
3129
3129
  alignmentAxis: N
3130
3130
  }),
3131
3131
  z && shift({
3132
3132
  mainAxis: !0,
3133
3133
  crossAxis: !1,
3134
3134
  limiter: U === "partial" ? limitShift() : void 0,
3135
- ...sI
3135
+ ...cI
3136
3136
  }),
3137
- z && flip({ ...sI }),
3137
+ z && flip({ ...cI }),
3138
3138
  size({
3139
- ...sI,
3139
+ ...cI,
3140
3140
  apply: ({ elements: n, rects: _, availableWidth: E, availableHeight: O }) => {
3141
3141
  let { width: A, height: j } = _.reference, M = n.floating.style;
3142
3142
  M.setProperty("--radix-popper-available-width", `${E}px`), M.setProperty("--radix-popper-available-height", `${O}px`), M.setProperty("--radix-popper-anchor-width", `${A}px`), M.setProperty("--radix-popper-anchor-height", `${j}px`);
3143
3143
  }
3144
3144
  }),
3145
- ZF && arrow({
3146
- element: ZF,
3145
+ QF && arrow({
3146
+ element: QF,
3147
3147
  padding: P
3148
3148
  }),
3149
3149
  transformOrigin({
3150
- arrowWidth: eI,
3151
- arrowHeight: tI
3150
+ arrowWidth: tI,
3151
+ arrowHeight: nI
3152
3152
  }),
3153
3153
  W && hide({
3154
3154
  strategy: "referenceHidden",
3155
- ...sI
3155
+ ...cI
3156
3156
  })
3157
3157
  ]
3158
- }), [pI, mI] = getSideAndAlignFromPlacement(uI), hI = useCallbackRef(Z);
3158
+ }), [mI, hI] = getSideAndAlignFromPlacement(dI), gI = useCallbackRef(Z);
3159
3159
  useLayoutEffect2(() => {
3160
- dI && hI?.();
3161
- }, [dI, hI]);
3162
- let gI = fI.arrow?.x, _I = fI.arrow?.y, vI = fI.arrow?.centerOffset !== 0, [yI, bI] = React$1.useState();
3160
+ fI && gI?.();
3161
+ }, [fI, gI]);
3162
+ let _I = pI.arrow?.x, vI = pI.arrow?.y, yI = pI.arrow?.centerOffset !== 0, [bI, xI] = React$1.useState();
3163
3163
  return useLayoutEffect2(() => {
3164
- JF && bI(window.getComputedStyle(JF).zIndex);
3165
- }, [JF]), /* @__PURE__ */ jsx("div", {
3166
- ref: cI.setFloating,
3164
+ YF && xI(window.getComputedStyle(YF).zIndex);
3165
+ }, [YF]), /* @__PURE__ */ jsx("div", {
3166
+ ref: lI.setFloating,
3167
3167
  "data-radix-popper-content-wrapper": "",
3168
3168
  style: {
3169
- ...lI,
3170
- transform: dI ? lI.transform : "translate(0, -200%)",
3169
+ ...uI,
3170
+ transform: fI ? uI.transform : "translate(0, -200%)",
3171
3171
  minWidth: "max-content",
3172
- zIndex: yI,
3173
- "--radix-popper-transform-origin": [fI.transformOrigin?.x, fI.transformOrigin?.y].join(" "),
3174
- ...fI.hide?.referenceHidden && {
3172
+ zIndex: bI,
3173
+ "--radix-popper-transform-origin": [pI.transformOrigin?.x, pI.transformOrigin?.y].join(" "),
3174
+ ...pI.hide?.referenceHidden && {
3175
3175
  visibility: "hidden",
3176
3176
  pointerEvents: "none"
3177
3177
  }
@@ -3179,19 +3179,19 @@ var CONTENT_NAME$6 = "PopperContent", [PopperContentProvider, useContentContext]
3179
3179
  dir: _.dir,
3180
3180
  children: /* @__PURE__ */ jsx(PopperContentProvider, {
3181
3181
  scope: O,
3182
- placedSide: pI,
3183
- onArrowChange: QF,
3184
- arrowX: gI,
3185
- arrowY: _I,
3186
- shouldHideArrow: vI,
3182
+ placedSide: mI,
3183
+ onArrowChange: $F,
3184
+ arrowX: _I,
3185
+ arrowY: vI,
3186
+ shouldHideArrow: yI,
3187
3187
  children: /* @__PURE__ */ jsx(Primitive.div, {
3188
- "data-side": pI,
3189
- "data-align": mI,
3190
- ...KF,
3191
- ref: XF,
3188
+ "data-side": mI,
3189
+ "data-align": hI,
3190
+ ...qF,
3191
+ ref: ZF,
3192
3192
  style: {
3193
- ...KF.style,
3194
- animation: dI ? void 0 : "none"
3193
+ ...qF.style,
3194
+ animation: fI ? void 0 : "none"
3195
3195
  }
3196
3196
  })
3197
3197
  })
@@ -3274,27 +3274,27 @@ var Root2$4 = Popper, Anchor = PopperAnchor, Content$1 = PopperContent, Arrow =
3274
3274
  }));
3275
3275
  RovingFocusGroup.displayName = GROUP_NAME$3;
3276
3276
  var RovingFocusGroupImpl = React$1.forwardRef((_, E) => {
3277
- let { __scopeRovingFocusGroup: O, orientation: A, loop: j = !1, dir: M, currentTabStopId: N, defaultCurrentTabStopId: P, onCurrentTabStopIdChange: z, onEntryFocus: B, preventScrollOnEntryFocus: H = !1, ...U } = _, W = React$1.useRef(null), G = useComposedRefs$1(E, W), Z = useDirection(M), [KF, qF] = useControllableState({
3277
+ let { __scopeRovingFocusGroup: O, orientation: A, loop: j = !1, dir: M, currentTabStopId: N, defaultCurrentTabStopId: P, onCurrentTabStopIdChange: z, onEntryFocus: B, preventScrollOnEntryFocus: H = !1, ...U } = _, W = React$1.useRef(null), G = useComposedRefs$1(E, W), Z = useDirection(M), [qF, JF] = useControllableState({
3278
3278
  prop: N,
3279
3279
  defaultProp: P ?? null,
3280
3280
  onChange: z,
3281
3281
  caller: GROUP_NAME$3
3282
- }), [JF, YF] = React$1.useState(!1), XF = useCallbackRef(B), ZF = useCollection$1(O), QF = React$1.useRef(!1), [$F, eI] = React$1.useState(0);
3282
+ }), [YF, XF] = React$1.useState(!1), ZF = useCallbackRef(B), QF = useCollection$1(O), $F = React$1.useRef(!1), [eI, tI] = React$1.useState(0);
3283
3283
  return React$1.useEffect(() => {
3284
3284
  let n = W.current;
3285
- if (n) return n.addEventListener(ENTRY_FOCUS, XF), () => n.removeEventListener(ENTRY_FOCUS, XF);
3286
- }, [XF]), /* @__PURE__ */ jsx(RovingFocusProvider, {
3285
+ if (n) return n.addEventListener(ENTRY_FOCUS, ZF), () => n.removeEventListener(ENTRY_FOCUS, ZF);
3286
+ }, [ZF]), /* @__PURE__ */ jsx(RovingFocusProvider, {
3287
3287
  scope: O,
3288
3288
  orientation: A,
3289
3289
  dir: Z,
3290
3290
  loop: j,
3291
- currentTabStopId: KF,
3292
- onItemFocus: React$1.useCallback((n) => qF(n), [qF]),
3293
- onItemShiftTab: React$1.useCallback(() => YF(!0), []),
3294
- onFocusableItemAdd: React$1.useCallback(() => eI((n) => n + 1), []),
3295
- onFocusableItemRemove: React$1.useCallback(() => eI((n) => n - 1), []),
3291
+ currentTabStopId: qF,
3292
+ onItemFocus: React$1.useCallback((n) => JF(n), [JF]),
3293
+ onItemShiftTab: React$1.useCallback(() => XF(!0), []),
3294
+ onFocusableItemAdd: React$1.useCallback(() => tI((n) => n + 1), []),
3295
+ onFocusableItemRemove: React$1.useCallback(() => tI((n) => n - 1), []),
3296
3296
  children: /* @__PURE__ */ jsx(Primitive.div, {
3297
- tabIndex: JF || $F === 0 ? -1 : 0,
3297
+ tabIndex: YF || eI === 0 ? -1 : 0,
3298
3298
  "data-orientation": A,
3299
3299
  ...U,
3300
3300
  ref: G,
@@ -3303,28 +3303,28 @@ var RovingFocusGroupImpl = React$1.forwardRef((_, E) => {
3303
3303
  ..._.style
3304
3304
  },
3305
3305
  onMouseDown: composeEventHandlers(_.onMouseDown, () => {
3306
- QF.current = !0;
3306
+ $F.current = !0;
3307
3307
  }),
3308
3308
  onFocus: composeEventHandlers(_.onFocus, (n) => {
3309
- let _ = !QF.current;
3310
- if (n.target === n.currentTarget && _ && !JF) {
3309
+ let _ = !$F.current;
3310
+ if (n.target === n.currentTarget && _ && !YF) {
3311
3311
  let _ = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
3312
3312
  if (n.currentTarget.dispatchEvent(_), !_.defaultPrevented) {
3313
- let n = ZF().filter((n) => n.focusable);
3313
+ let n = QF().filter((n) => n.focusable);
3314
3314
  focusFirst$1([
3315
3315
  n.find((n) => n.active),
3316
- n.find((n) => n.id === KF),
3316
+ n.find((n) => n.id === qF),
3317
3317
  ...n
3318
3318
  ].filter(Boolean).map((n) => n.ref.current), H);
3319
3319
  }
3320
3320
  }
3321
- QF.current = !1;
3321
+ $F.current = !1;
3322
3322
  }),
3323
- onBlur: composeEventHandlers(_.onBlur, () => YF(!1))
3323
+ onBlur: composeEventHandlers(_.onBlur, () => XF(!1))
3324
3324
  })
3325
3325
  });
3326
3326
  }), ITEM_NAME$3 = "RovingFocusGroupItem", RovingFocusGroupItem = React$1.forwardRef((_, E) => {
3327
- let { __scopeRovingFocusGroup: O, focusable: A = !0, active: j = !1, tabStopId: M, children: N, ...P } = _, z = useId$1(), B = M || z, H = useRovingFocusContext(ITEM_NAME$3, O), U = H.currentTabStopId === B, W = useCollection$1(O), { onFocusableItemAdd: G, onFocusableItemRemove: Z, currentTabStopId: KF } = H;
3327
+ let { __scopeRovingFocusGroup: O, focusable: A = !0, active: j = !1, tabStopId: M, children: N, ...P } = _, z = useId$1(), B = M || z, H = useRovingFocusContext(ITEM_NAME$3, O), U = H.currentTabStopId === B, W = useCollection$1(O), { onFocusableItemAdd: G, onFocusableItemRemove: Z, currentTabStopId: qF } = H;
3328
3328
  return React$1.useEffect(() => {
3329
3329
  if (A) return G(), () => Z();
3330
3330
  }, [
@@ -3367,7 +3367,7 @@ var RovingFocusGroupImpl = React$1.forwardRef((_, E) => {
3367
3367
  }),
3368
3368
  children: typeof N == "function" ? N({
3369
3369
  isCurrentTabStop: U,
3370
- hasTabStop: KF != null
3370
+ hasTabStop: qF != null
3371
3371
  }) : N
3372
3372
  })
3373
3373
  });
@@ -3518,40 +3518,40 @@ var CONTENT_NAME$5 = "MenuContent", [MenuContentProvider, useMenuContentContext]
3518
3518
  onDismiss: () => E.onOpenChange(!1)
3519
3519
  });
3520
3520
  }), Slot$1 = /* @__PURE__ */ createSlot("MenuContent.ScrollLock"), MenuContentImpl = React$1.forwardRef((_, E) => {
3521
- let { __scopeMenu: O, loop: A = !1, trapFocus: j, onOpenAutoFocus: M, onCloseAutoFocus: N, disableOutsidePointerEvents: P, onEntryFocus: z, onEscapeKeyDown: B, onPointerDownOutside: H, onFocusOutside: U, onInteractOutside: W, onDismiss: G, disableOutsideScroll: Z, ...KF } = _, qF = useMenuContext(CONTENT_NAME$5, O), JF = useMenuRootContext(CONTENT_NAME$5, O), YF = usePopperScope$2(O), XF = useRovingFocusGroupScope$1(O), ZF = useCollection(O), [QF, $F] = React$1.useState(null), eI = React$1.useRef(null), tI = useComposedRefs$1(E, eI, qF.onContentChange), nI = React$1.useRef(0), rI = React$1.useRef(""), iI = React$1.useRef(0), oI = React$1.useRef(null), sI = React$1.useRef("right"), cI = React$1.useRef(0), lI = Z ? Combination_default : React$1.Fragment, uI = Z ? {
3521
+ let { __scopeMenu: O, loop: A = !1, trapFocus: j, onOpenAutoFocus: M, onCloseAutoFocus: N, disableOutsidePointerEvents: P, onEntryFocus: z, onEscapeKeyDown: B, onPointerDownOutside: H, onFocusOutside: U, onInteractOutside: W, onDismiss: G, disableOutsideScroll: Z, ...qF } = _, JF = useMenuContext(CONTENT_NAME$5, O), YF = useMenuRootContext(CONTENT_NAME$5, O), XF = usePopperScope$2(O), ZF = useRovingFocusGroupScope$1(O), QF = useCollection(O), [$F, eI] = React$1.useState(null), tI = React$1.useRef(null), nI = useComposedRefs$1(E, tI, JF.onContentChange), rI = React$1.useRef(0), iI = React$1.useRef(""), aI = React$1.useRef(0), sI = React$1.useRef(null), cI = React$1.useRef("right"), lI = React$1.useRef(0), uI = Z ? Combination_default : React$1.Fragment, dI = Z ? {
3522
3522
  as: Slot$1,
3523
3523
  allowPinchZoom: !0
3524
- } : void 0, dI = (n) => {
3525
- let _ = rI.current + n, E = ZF().filter((n) => !n.disabled), O = document.activeElement, A = E.find((n) => n.ref.current === O)?.textValue, j = getNextMatch(E.map((n) => n.textValue), _, A), M = E.find((n) => n.textValue === j)?.ref.current;
3524
+ } : void 0, fI = (n) => {
3525
+ let _ = iI.current + n, E = QF().filter((n) => !n.disabled), O = document.activeElement, A = E.find((n) => n.ref.current === O)?.textValue, j = getNextMatch(E.map((n) => n.textValue), _, A), M = E.find((n) => n.textValue === j)?.ref.current;
3526
3526
  (function n(_) {
3527
- rI.current = _, window.clearTimeout(nI.current), _ !== "" && (nI.current = window.setTimeout(() => n(""), 1e3));
3527
+ iI.current = _, window.clearTimeout(rI.current), _ !== "" && (rI.current = window.setTimeout(() => n(""), 1e3));
3528
3528
  })(_), M && setTimeout(() => M.focus());
3529
3529
  };
3530
- React$1.useEffect(() => () => window.clearTimeout(nI.current), []), useFocusGuards();
3531
- let fI = React$1.useCallback((n) => sI.current === oI.current?.side && isPointerInGraceArea(n, oI.current?.area), []);
3530
+ React$1.useEffect(() => () => window.clearTimeout(rI.current), []), useFocusGuards();
3531
+ let pI = React$1.useCallback((n) => cI.current === sI.current?.side && isPointerInGraceArea(n, sI.current?.area), []);
3532
3532
  return /* @__PURE__ */ jsx(MenuContentProvider, {
3533
3533
  scope: O,
3534
- searchRef: rI,
3534
+ searchRef: iI,
3535
3535
  onItemEnter: React$1.useCallback((n) => {
3536
- fI(n) && n.preventDefault();
3537
- }, [fI]),
3536
+ pI(n) && n.preventDefault();
3537
+ }, [pI]),
3538
3538
  onItemLeave: React$1.useCallback((n) => {
3539
- fI(n) || (eI.current?.focus(), $F(null));
3540
- }, [fI]),
3539
+ pI(n) || (tI.current?.focus(), eI(null));
3540
+ }, [pI]),
3541
3541
  onTriggerLeave: React$1.useCallback((n) => {
3542
- fI(n) && n.preventDefault();
3543
- }, [fI]),
3544
- pointerGraceTimerRef: iI,
3542
+ pI(n) && n.preventDefault();
3543
+ }, [pI]),
3544
+ pointerGraceTimerRef: aI,
3545
3545
  onPointerGraceIntentChange: React$1.useCallback((n) => {
3546
- oI.current = n;
3546
+ sI.current = n;
3547
3547
  }, []),
3548
- children: /* @__PURE__ */ jsx(lI, {
3549
- ...uI,
3548
+ children: /* @__PURE__ */ jsx(uI, {
3549
+ ...dI,
3550
3550
  children: /* @__PURE__ */ jsx(FocusScope, {
3551
3551
  asChild: !0,
3552
3552
  trapped: j,
3553
3553
  onMountAutoFocus: composeEventHandlers(M, (n) => {
3554
- n.preventDefault(), eI.current?.focus({ preventScroll: !0 });
3554
+ n.preventDefault(), tI.current?.focus({ preventScroll: !0 });
3555
3555
  }),
3556
3556
  onUnmountAutoFocus: N,
3557
3557
  children: /* @__PURE__ */ jsx(DismissableLayer, {
@@ -3564,44 +3564,44 @@ var CONTENT_NAME$5 = "MenuContent", [MenuContentProvider, useMenuContentContext]
3564
3564
  onDismiss: G,
3565
3565
  children: /* @__PURE__ */ jsx(Root$2, {
3566
3566
  asChild: !0,
3567
- ...XF,
3568
- dir: JF.dir,
3567
+ ...ZF,
3568
+ dir: YF.dir,
3569
3569
  orientation: "vertical",
3570
3570
  loop: A,
3571
- currentTabStopId: QF,
3572
- onCurrentTabStopIdChange: $F,
3571
+ currentTabStopId: $F,
3572
+ onCurrentTabStopIdChange: eI,
3573
3573
  onEntryFocus: composeEventHandlers(z, (n) => {
3574
- JF.isUsingKeyboardRef.current || n.preventDefault();
3574
+ YF.isUsingKeyboardRef.current || n.preventDefault();
3575
3575
  }),
3576
3576
  preventScrollOnEntryFocus: !0,
3577
3577
  children: /* @__PURE__ */ jsx(Content$1, {
3578
3578
  role: "menu",
3579
3579
  "aria-orientation": "vertical",
3580
- "data-state": getOpenState(qF.open),
3580
+ "data-state": getOpenState(JF.open),
3581
3581
  "data-radix-menu-content": "",
3582
- dir: JF.dir,
3583
- ...YF,
3584
- ...KF,
3585
- ref: tI,
3582
+ dir: YF.dir,
3583
+ ...XF,
3584
+ ...qF,
3585
+ ref: nI,
3586
3586
  style: {
3587
3587
  outline: "none",
3588
- ...KF.style
3588
+ ...qF.style
3589
3589
  },
3590
- onKeyDown: composeEventHandlers(KF.onKeyDown, (n) => {
3590
+ onKeyDown: composeEventHandlers(qF.onKeyDown, (n) => {
3591
3591
  let _ = n.target.closest("[data-radix-menu-content]") === n.currentTarget, E = n.ctrlKey || n.altKey || n.metaKey, O = n.key.length === 1;
3592
- _ && (n.key === "Tab" && n.preventDefault(), !E && O && dI(n.key));
3593
- let A = eI.current;
3592
+ _ && (n.key === "Tab" && n.preventDefault(), !E && O && fI(n.key));
3593
+ let A = tI.current;
3594
3594
  if (n.target !== A || !FIRST_LAST_KEYS.includes(n.key)) return;
3595
3595
  n.preventDefault();
3596
- let j = ZF().filter((n) => !n.disabled).map((n) => n.ref.current);
3596
+ let j = QF().filter((n) => !n.disabled).map((n) => n.ref.current);
3597
3597
  LAST_KEYS.includes(n.key) && j.reverse(), focusFirst(j);
3598
3598
  }),
3599
3599
  onBlur: composeEventHandlers(_.onBlur, (n) => {
3600
- n.currentTarget.contains(n.target) || (window.clearTimeout(nI.current), rI.current = "");
3600
+ n.currentTarget.contains(n.target) || (window.clearTimeout(rI.current), iI.current = "");
3601
3601
  }),
3602
3602
  onPointerMove: composeEventHandlers(_.onPointerMove, whenMouse((n) => {
3603
- let _ = n.target, E = cI.current !== n.clientX;
3604
- n.currentTarget.contains(_) && E && (sI.current = n.clientX > cI.current ? "right" : "left", cI.current = n.clientX);
3603
+ let _ = n.target, E = lI.current !== n.clientX;
3604
+ n.currentTarget.contains(_) && E && (cI.current = n.clientX > lI.current ? "right" : "left", lI.current = n.clientX);
3605
3605
  }))
3606
3606
  })
3607
3607
  })
@@ -4549,11 +4549,11 @@ function useStateMachine(_, E) {
4549
4549
  return React$1.useReducer((n, _) => E[n][_] ?? n, _);
4550
4550
  }
4551
4551
  var SCROLL_AREA_NAME = "ScrollArea", [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME), [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME), ScrollArea = React$1.forwardRef((_, E) => {
4552
- let { __scopeScrollArea: O, type: A = "hover", dir: j, scrollHideDelay: M = 600, ...N } = _, [P, z] = React$1.useState(null), [B, H] = React$1.useState(null), [U, W] = React$1.useState(null), [G, Z] = React$1.useState(null), [KF, qF] = React$1.useState(null), [JF, YF] = React$1.useState(0), [XF, ZF] = React$1.useState(0), [QF, $F] = React$1.useState(!1), [eI, tI] = React$1.useState(!1), nI = useComposedRefs$1(E, (n) => z(n)), rI = useDirection(j);
4552
+ let { __scopeScrollArea: O, type: A = "hover", dir: j, scrollHideDelay: M = 600, ...N } = _, [P, z] = React$1.useState(null), [B, H] = React$1.useState(null), [U, W] = React$1.useState(null), [G, Z] = React$1.useState(null), [qF, JF] = React$1.useState(null), [YF, XF] = React$1.useState(0), [ZF, QF] = React$1.useState(0), [$F, eI] = React$1.useState(!1), [tI, nI] = React$1.useState(!1), rI = useComposedRefs$1(E, (n) => z(n)), iI = useDirection(j);
4553
4553
  return /* @__PURE__ */ jsx(ScrollAreaProvider, {
4554
4554
  scope: O,
4555
4555
  type: A,
4556
- dir: rI,
4556
+ dir: iI,
4557
4557
  scrollHideDelay: M,
4558
4558
  scrollArea: P,
4559
4559
  viewport: B,
@@ -4562,22 +4562,22 @@ var SCROLL_AREA_NAME = "ScrollArea", [createScrollAreaContext, createScrollAreaS
4562
4562
  onContentChange: W,
4563
4563
  scrollbarX: G,
4564
4564
  onScrollbarXChange: Z,
4565
- scrollbarXEnabled: QF,
4566
- onScrollbarXEnabledChange: $F,
4567
- scrollbarY: KF,
4568
- onScrollbarYChange: qF,
4569
- scrollbarYEnabled: eI,
4570
- onScrollbarYEnabledChange: tI,
4571
- onCornerWidthChange: YF,
4572
- onCornerHeightChange: ZF,
4565
+ scrollbarXEnabled: $F,
4566
+ onScrollbarXEnabledChange: eI,
4567
+ scrollbarY: qF,
4568
+ onScrollbarYChange: JF,
4569
+ scrollbarYEnabled: tI,
4570
+ onScrollbarYEnabledChange: nI,
4571
+ onCornerWidthChange: XF,
4572
+ onCornerHeightChange: QF,
4573
4573
  children: /* @__PURE__ */ jsx(Primitive.div, {
4574
- dir: rI,
4574
+ dir: iI,
4575
4575
  ...N,
4576
- ref: nI,
4576
+ ref: rI,
4577
4577
  style: {
4578
4578
  position: "relative",
4579
- "--radix-scroll-area-corner-width": JF + "px",
4580
- "--radix-scroll-area-corner-height": XF + "px",
4579
+ "--radix-scroll-area-corner-width": YF + "px",
4580
+ "--radix-scroll-area-corner-height": ZF + "px",
4581
4581
  ..._.style
4582
4582
  }
4583
4583
  })
@@ -4848,46 +4848,46 @@ var ScrollAreaScrollbarHover = React$1.forwardRef((_, E) => {
4848
4848
  }
4849
4849
  });
4850
4850
  }), [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME), ScrollAreaScrollbarImpl = React$1.forwardRef((_, E) => {
4851
- let { __scopeScrollArea: O, sizes: A, hasThumb: j, onThumbChange: M, onThumbPointerUp: N, onThumbPointerDown: P, onThumbPositionChange: z, onDragScroll: B, onWheelScroll: H, onResize: U, ...W } = _, G = useScrollAreaContext(SCROLLBAR_NAME, O), [Z, KF] = React$1.useState(null), qF = useComposedRefs$1(E, (n) => KF(n)), JF = React$1.useRef(null), YF = React$1.useRef(""), XF = G.viewport, ZF = A.content - A.viewport, QF = useCallbackRef(H), $F = useCallbackRef(z), eI = useDebounceCallback(U, 10);
4852
- function tI(n) {
4853
- JF.current && B({
4854
- x: n.clientX - JF.current.left,
4855
- y: n.clientY - JF.current.top
4851
+ let { __scopeScrollArea: O, sizes: A, hasThumb: j, onThumbChange: M, onThumbPointerUp: N, onThumbPointerDown: P, onThumbPositionChange: z, onDragScroll: B, onWheelScroll: H, onResize: U, ...W } = _, G = useScrollAreaContext(SCROLLBAR_NAME, O), [Z, qF] = React$1.useState(null), JF = useComposedRefs$1(E, (n) => qF(n)), YF = React$1.useRef(null), XF = React$1.useRef(""), ZF = G.viewport, QF = A.content - A.viewport, $F = useCallbackRef(H), eI = useCallbackRef(z), tI = useDebounceCallback(U, 10);
4852
+ function nI(n) {
4853
+ YF.current && B({
4854
+ x: n.clientX - YF.current.left,
4855
+ y: n.clientY - YF.current.top
4856
4856
  });
4857
4857
  }
4858
4858
  return React$1.useEffect(() => {
4859
4859
  let n = (n) => {
4860
4860
  let _ = n.target;
4861
- Z?.contains(_) && QF(n, ZF);
4861
+ Z?.contains(_) && $F(n, QF);
4862
4862
  };
4863
4863
  return document.addEventListener("wheel", n, { passive: !1 }), () => document.removeEventListener("wheel", n, { passive: !1 });
4864
4864
  }, [
4865
- XF,
4866
- Z,
4867
4865
  ZF,
4868
- QF
4869
- ]), React$1.useEffect($F, [A, $F]), useResizeObserver$1(Z, eI), useResizeObserver$1(G.content, eI), /* @__PURE__ */ jsx(ScrollbarProvider, {
4866
+ Z,
4867
+ QF,
4868
+ $F
4869
+ ]), React$1.useEffect(eI, [A, eI]), useResizeObserver$1(Z, tI), useResizeObserver$1(G.content, tI), /* @__PURE__ */ jsx(ScrollbarProvider, {
4870
4870
  scope: O,
4871
4871
  scrollbar: Z,
4872
4872
  hasThumb: j,
4873
4873
  onThumbChange: useCallbackRef(M),
4874
4874
  onThumbPointerUp: useCallbackRef(N),
4875
- onThumbPositionChange: $F,
4875
+ onThumbPositionChange: eI,
4876
4876
  onThumbPointerDown: useCallbackRef(P),
4877
4877
  children: /* @__PURE__ */ jsx(Primitive.div, {
4878
4878
  ...W,
4879
- ref: qF,
4879
+ ref: JF,
4880
4880
  style: {
4881
4881
  position: "absolute",
4882
4882
  ...W.style
4883
4883
  },
4884
4884
  onPointerDown: composeEventHandlers(_.onPointerDown, (n) => {
4885
- n.button === 0 && (n.target.setPointerCapture(n.pointerId), JF.current = Z.getBoundingClientRect(), YF.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", G.viewport && (G.viewport.style.scrollBehavior = "auto"), tI(n));
4885
+ n.button === 0 && (n.target.setPointerCapture(n.pointerId), YF.current = Z.getBoundingClientRect(), XF.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", G.viewport && (G.viewport.style.scrollBehavior = "auto"), nI(n));
4886
4886
  }),
4887
- onPointerMove: composeEventHandlers(_.onPointerMove, tI),
4887
+ onPointerMove: composeEventHandlers(_.onPointerMove, nI),
4888
4888
  onPointerUp: composeEventHandlers(_.onPointerUp, (n) => {
4889
4889
  let _ = n.target;
4890
- _.hasPointerCapture(n.pointerId) && _.releasePointerCapture(n.pointerId), document.body.style.webkitUserSelect = YF.current, G.viewport && (G.viewport.style.scrollBehavior = ""), JF.current = null;
4890
+ _.hasPointerCapture(n.pointerId) && _.releasePointerCapture(n.pointerId), document.body.style.webkitUserSelect = XF.current, G.viewport && (G.viewport.style.scrollBehavior = ""), YF.current = null;
4891
4891
  })
4892
4892
  })
4893
4893
  });
@@ -5029,7 +5029,7 @@ function useResizeObserver$1(n, _) {
5029
5029
  }, [n, E]);
5030
5030
  }
5031
5031
  var Root$1 = ScrollArea, Viewport = ScrollAreaViewport, Scrollbar = ScrollAreaScrollbar, Thumb$1 = ScrollAreaThumb, Corner = ScrollAreaCorner, SWITCH_NAME = "Switch", [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME), [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME), Switch = React$1.forwardRef((_, E) => {
5032
- let { __scopeSwitch: O, name: A, checked: j, defaultChecked: M, required: N, disabled: P, value: z = "on", onCheckedChange: B, form: H, ...U } = _, [W, G] = React$1.useState(null), Z = useComposedRefs$1(E, (n) => G(n)), KF = React$1.useRef(!1), qF = W ? H || !!W.closest("form") : !0, [JF, YF] = useControllableState({
5032
+ let { __scopeSwitch: O, name: A, checked: j, defaultChecked: M, required: N, disabled: P, value: z = "on", onCheckedChange: B, form: H, ...U } = _, [W, G] = React$1.useState(null), Z = useComposedRefs$1(E, (n) => G(n)), qF = React$1.useRef(!1), JF = W ? H || !!W.closest("form") : !0, [YF, XF] = useControllableState({
5033
5033
  prop: j,
5034
5034
  defaultProp: M ?? !1,
5035
5035
  onChange: B,
@@ -5037,28 +5037,28 @@ var Root$1 = ScrollArea, Viewport = ScrollAreaViewport, Scrollbar = ScrollAreaSc
5037
5037
  });
5038
5038
  return /* @__PURE__ */ jsxs(SwitchProvider, {
5039
5039
  scope: O,
5040
- checked: JF,
5040
+ checked: YF,
5041
5041
  disabled: P,
5042
5042
  children: [/* @__PURE__ */ jsx(Primitive.button, {
5043
5043
  type: "button",
5044
5044
  role: "switch",
5045
- "aria-checked": JF,
5045
+ "aria-checked": YF,
5046
5046
  "aria-required": N,
5047
- "data-state": getState(JF),
5047
+ "data-state": getState(YF),
5048
5048
  "data-disabled": P ? "" : void 0,
5049
5049
  disabled: P,
5050
5050
  value: z,
5051
5051
  ...U,
5052
5052
  ref: Z,
5053
5053
  onClick: composeEventHandlers(_.onClick, (n) => {
5054
- YF((n) => !n), qF && (KF.current = n.isPropagationStopped(), KF.current || n.stopPropagation());
5054
+ XF((n) => !n), JF && (qF.current = n.isPropagationStopped(), qF.current || n.stopPropagation());
5055
5055
  })
5056
- }), qF && /* @__PURE__ */ jsx(SwitchBubbleInput, {
5056
+ }), JF && /* @__PURE__ */ jsx(SwitchBubbleInput, {
5057
5057
  control: W,
5058
- bubbles: !KF.current,
5058
+ bubbles: !qF.current,
5059
5059
  name: A,
5060
5060
  value: z,
5061
- checked: JF,
5061
+ checked: YF,
5062
5062
  required: N,
5063
5063
  disabled: P,
5064
5064
  form: H,
@@ -5242,22 +5242,22 @@ var Root2 = Tabs, List = TabsList, Trigger$1 = TabsTrigger, Content = TabsConten
5242
5242
  };
5243
5243
  TooltipProvider.displayName = PROVIDER_NAME;
5244
5244
  var TOOLTIP_NAME = "Tooltip", [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME), Tooltip = (_) => {
5245
- let { __scopeTooltip: E, children: O, open: A, defaultOpen: j, onOpenChange: M, disableHoverableContent: N, delayDuration: P } = _, z = useTooltipProviderContext(TOOLTIP_NAME, _.__scopeTooltip), B = usePopperScope(E), [H, U] = React$1.useState(null), W = useId$1(), G = React$1.useRef(0), Z = N ?? z.disableHoverableContent, KF = P ?? z.delayDuration, qF = React$1.useRef(!1), [JF, YF] = useControllableState({
5245
+ let { __scopeTooltip: E, children: O, open: A, defaultOpen: j, onOpenChange: M, disableHoverableContent: N, delayDuration: P } = _, z = useTooltipProviderContext(TOOLTIP_NAME, _.__scopeTooltip), B = usePopperScope(E), [H, U] = React$1.useState(null), W = useId$1(), G = React$1.useRef(0), Z = N ?? z.disableHoverableContent, qF = P ?? z.delayDuration, JF = React$1.useRef(!1), [YF, XF] = useControllableState({
5246
5246
  prop: A,
5247
5247
  defaultProp: j ?? !1,
5248
5248
  onChange: (n) => {
5249
5249
  n ? (z.onOpen(), document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))) : z.onClose(), M?.(n);
5250
5250
  },
5251
5251
  caller: TOOLTIP_NAME
5252
- }), XF = React$1.useMemo(() => JF ? qF.current ? "delayed-open" : "instant-open" : "closed", [JF]), ZF = React$1.useCallback(() => {
5253
- window.clearTimeout(G.current), G.current = 0, qF.current = !1, YF(!0);
5254
- }, [YF]), QF = React$1.useCallback(() => {
5255
- window.clearTimeout(G.current), G.current = 0, YF(!1);
5256
- }, [YF]), $F = React$1.useCallback(() => {
5252
+ }), ZF = React$1.useMemo(() => YF ? JF.current ? "delayed-open" : "instant-open" : "closed", [YF]), QF = React$1.useCallback(() => {
5253
+ window.clearTimeout(G.current), G.current = 0, JF.current = !1, XF(!0);
5254
+ }, [XF]), $F = React$1.useCallback(() => {
5255
+ window.clearTimeout(G.current), G.current = 0, XF(!1);
5256
+ }, [XF]), eI = React$1.useCallback(() => {
5257
5257
  window.clearTimeout(G.current), G.current = window.setTimeout(() => {
5258
- qF.current = !0, YF(!0), G.current = 0;
5259
- }, KF);
5260
- }, [KF, YF]);
5258
+ JF.current = !0, XF(!0), G.current = 0;
5259
+ }, qF);
5260
+ }, [qF, XF]);
5261
5261
  return React$1.useEffect(() => () => {
5262
5262
  G.current &&= (window.clearTimeout(G.current), 0);
5263
5263
  }, []), /* @__PURE__ */ jsx(Root2$4, {
@@ -5265,22 +5265,22 @@ var TOOLTIP_NAME = "Tooltip", [TooltipContextProvider, useTooltipContext] = crea
5265
5265
  children: /* @__PURE__ */ jsx(TooltipContextProvider, {
5266
5266
  scope: E,
5267
5267
  contentId: W,
5268
- open: JF,
5269
- stateAttribute: XF,
5268
+ open: YF,
5269
+ stateAttribute: ZF,
5270
5270
  trigger: H,
5271
5271
  onTriggerChange: U,
5272
5272
  onTriggerEnter: React$1.useCallback(() => {
5273
- z.isOpenDelayedRef.current ? $F() : ZF();
5273
+ z.isOpenDelayedRef.current ? eI() : QF();
5274
5274
  }, [
5275
5275
  z.isOpenDelayedRef,
5276
- $F,
5277
- ZF
5276
+ eI,
5277
+ QF
5278
5278
  ]),
5279
5279
  onTriggerLeave: React$1.useCallback(() => {
5280
- Z ? QF() : (window.clearTimeout(G.current), G.current = 0);
5281
- }, [QF, Z]),
5282
- onOpen: ZF,
5283
- onClose: QF,
5280
+ Z ? $F() : (window.clearTimeout(G.current), G.current = 0);
5281
+ }, [$F, Z]),
5282
+ onOpen: QF,
5283
+ onClose: $F,
5284
5284
  disableHoverableContent: Z,
5285
5285
  children: O
5286
5286
  })
@@ -6093,14 +6093,14 @@ var I$3 = React$1.forwardRef((_, E) => {
6093
6093
  React$1.useEffect(() => U(O), [O]);
6094
6094
  let [W, G] = React$1.useState(A);
6095
6095
  React$1.useEffect(() => G(A), [A]);
6096
- let [Z, KF] = React$1.useState(j);
6097
- React$1.useEffect(() => KF(j), [j]);
6098
- let [qF, JF] = React$1.useState(M);
6099
- React$1.useEffect(() => JF(M), [M]);
6100
- let [YF, XF] = React$1.useState(N);
6101
- React$1.useEffect(() => XF(N), [N]);
6102
- let [ZF, QF] = React$1.useState(P);
6103
- return React$1.useEffect(() => QF(P), [P]), React$1.createElement(A$2, {
6096
+ let [Z, qF] = React$1.useState(j);
6097
+ React$1.useEffect(() => qF(j), [j]);
6098
+ let [JF, YF] = React$1.useState(M);
6099
+ React$1.useEffect(() => YF(M), [M]);
6100
+ let [XF, ZF] = React$1.useState(N);
6101
+ React$1.useEffect(() => ZF(N), [N]);
6102
+ let [QF, $F] = React$1.useState(P);
6103
+ return React$1.useEffect(() => $F(P), [P]), React$1.createElement(A$2, {
6104
6104
  ...B,
6105
6105
  ref: E,
6106
6106
  isRoot: !0,
@@ -6108,62 +6108,62 @@ var I$3 = React$1.forwardRef((_, E) => {
6108
6108
  appearance: H,
6109
6109
  accentColor: W,
6110
6110
  grayColor: Z,
6111
- panelBackground: qF,
6112
- radius: YF,
6113
- scaling: ZF,
6111
+ panelBackground: JF,
6112
+ radius: XF,
6113
+ scaling: QF,
6114
6114
  onAppearanceChange: U,
6115
6115
  onAccentColorChange: G,
6116
- onGrayColorChange: KF,
6117
- onPanelBackgroundChange: JF,
6118
- onRadiusChange: XF,
6119
- onScalingChange: QF
6116
+ onGrayColorChange: qF,
6117
+ onPanelBackgroundChange: YF,
6118
+ onRadiusChange: ZF,
6119
+ onScalingChange: $F
6120
6120
  });
6121
6121
  });
6122
6122
  I$3.displayName = "ThemeRoot";
6123
6123
  var A$2 = React$1.forwardRef((_, E) => {
6124
- let O = React$1.useContext(P$3), { asChild: A, isRoot: j, hasBackground: M, appearance: N = O?.appearance ?? s$13.appearance.default, accentColor: P = O?.accentColor ?? s$13.accentColor.default, grayColor: z = O?.resolvedGrayColor ?? s$13.grayColor.default, panelBackground: B = O?.panelBackground ?? s$13.panelBackground.default, radius: H = O?.radius ?? s$13.radius.default, scaling: U = O?.scaling ?? s$13.scaling.default, onAppearanceChange: W = d$5, onAccentColorChange: G = d$5, onGrayColorChange: Z = d$5, onPanelBackgroundChange: KF = d$5, onRadiusChange: qF = d$5, onScalingChange: JF = d$5, ...YF } = _, XF = A ? Slot$3 : "div", ZF = z === "auto" ? a$12(P) : z, QF = _.appearance === "light" || _.appearance === "dark", $F = M === void 0 ? j || QF : M;
6124
+ let O = React$1.useContext(P$3), { asChild: A, isRoot: j, hasBackground: M, appearance: N = O?.appearance ?? s$13.appearance.default, accentColor: P = O?.accentColor ?? s$13.accentColor.default, grayColor: z = O?.resolvedGrayColor ?? s$13.grayColor.default, panelBackground: B = O?.panelBackground ?? s$13.panelBackground.default, radius: H = O?.radius ?? s$13.radius.default, scaling: U = O?.scaling ?? s$13.scaling.default, onAppearanceChange: W = d$5, onAccentColorChange: G = d$5, onGrayColorChange: Z = d$5, onPanelBackgroundChange: qF = d$5, onRadiusChange: JF = d$5, onScalingChange: YF = d$5, ...XF } = _, ZF = A ? Slot$3 : "div", QF = z === "auto" ? a$12(P) : z, $F = _.appearance === "light" || _.appearance === "dark", eI = M === void 0 ? j || $F : M;
6125
6125
  return React$1.createElement(P$3.Provider, { value: React$1.useMemo(() => ({
6126
6126
  appearance: N,
6127
6127
  accentColor: P,
6128
6128
  grayColor: z,
6129
- resolvedGrayColor: ZF,
6129
+ resolvedGrayColor: QF,
6130
6130
  panelBackground: B,
6131
6131
  radius: H,
6132
6132
  scaling: U,
6133
6133
  onAppearanceChange: W,
6134
6134
  onAccentColorChange: G,
6135
6135
  onGrayColorChange: Z,
6136
- onPanelBackgroundChange: KF,
6137
- onRadiusChange: qF,
6138
- onScalingChange: JF
6136
+ onPanelBackgroundChange: qF,
6137
+ onRadiusChange: JF,
6138
+ onScalingChange: YF
6139
6139
  }), [
6140
6140
  N,
6141
6141
  P,
6142
6142
  z,
6143
- ZF,
6143
+ QF,
6144
6144
  B,
6145
6145
  H,
6146
6146
  U,
6147
6147
  W,
6148
6148
  G,
6149
6149
  Z,
6150
- KF,
6151
6150
  qF,
6152
- JF
6153
- ]) }, React$1.createElement(XF, {
6151
+ JF,
6152
+ YF
6153
+ ]) }, React$1.createElement(ZF, {
6154
6154
  "data-is-root-theme": j ? "true" : "false",
6155
6155
  "data-accent-color": P,
6156
- "data-gray-color": ZF,
6157
- "data-has-background": $F ? "true" : "false",
6156
+ "data-gray-color": QF,
6157
+ "data-has-background": eI ? "true" : "false",
6158
6158
  "data-panel-background": B,
6159
6159
  "data-radius": H,
6160
6160
  "data-scaling": U,
6161
6161
  ref: E,
6162
- ...YF,
6162
+ ...XF,
6163
6163
  className: (0, import_classnames$20.default)("radix-themes", {
6164
6164
  light: N === "light",
6165
6165
  dark: N === "dark"
6166
- }, YF.className)
6166
+ }, XF.className)
6167
6167
  }));
6168
6168
  });
6169
6169
  A$2.displayName = "ThemeImpl";
@@ -6935,7 +6935,7 @@ function S$2(n) {
6935
6935
  return [(0, import_classnames$12.default)(_, O, j, N, z, H, W), l$1(E, A, M, P, B, U, G)];
6936
6936
  }
6937
6937
  var import_classnames$11 = /* @__PURE__ */ __toESM(require_classnames()), c = React$1.forwardRef((_, E) => {
6938
- let { rest: O, ...A } = a$5(_), [j, M] = S$2(A), { asChild: N, children: P, className: z, style: B, type: H, scrollHideDelay: U = H === "scroll" ? void 0 : 0, dir: W, size: G = t$3.size.default, radius: Z = t$3.radius.default, scrollbars: KF = t$3.scrollbars.default, ...qF } = O;
6938
+ let { rest: O, ...A } = a$5(_), [j, M] = S$2(A), { asChild: N, children: P, className: z, style: B, type: H, scrollHideDelay: U = H === "scroll" ? void 0 : 0, dir: W, size: G = t$3.size.default, radius: Z = t$3.radius.default, scrollbars: qF = t$3.scrollbars.default, ...JF } = O;
6939
6939
  return React$1.createElement(Root$1, {
6940
6940
  type: H,
6941
6941
  scrollHideDelay: U,
@@ -6946,10 +6946,10 @@ var import_classnames$11 = /* @__PURE__ */ __toESM(require_classnames()), c = Re
6946
6946
  asChild: N,
6947
6947
  children: P
6948
6948
  }, (_) => React$1.createElement(React$1.Fragment, null, React$1.createElement(Viewport, {
6949
- ...qF,
6949
+ ...JF,
6950
6950
  ref: E,
6951
6951
  className: "rt-ScrollAreaViewport"
6952
- }, _), React$1.createElement("div", { className: "rt-ScrollAreaViewportFocusRing" }), KF === "vertical" ? null : React$1.createElement(Scrollbar, {
6952
+ }, _), React$1.createElement("div", { className: "rt-ScrollAreaViewportFocusRing" }), qF === "vertical" ? null : React$1.createElement(Scrollbar, {
6953
6953
  "data-radius": Z,
6954
6954
  orientation: "horizontal",
6955
6955
  className: (0, import_classnames$11.default)("rt-ScrollAreaScrollbar", g$3({
@@ -6957,7 +6957,7 @@ var import_classnames$11 = /* @__PURE__ */ __toESM(require_classnames()), c = Re
6957
6957
  value: G,
6958
6958
  propValues: t$3.size.values
6959
6959
  }))
6960
- }, React$1.createElement(Thumb$1, { className: "rt-ScrollAreaThumb" })), KF === "horizontal" ? null : React$1.createElement(Scrollbar, {
6960
+ }, React$1.createElement(Thumb$1, { className: "rt-ScrollAreaThumb" })), qF === "horizontal" ? null : React$1.createElement(Scrollbar, {
6961
6961
  "data-radius": Z,
6962
6962
  orientation: "vertical",
6963
6963
  className: (0, import_classnames$11.default)("rt-ScrollAreaScrollbar", g$3({
@@ -6965,7 +6965,7 @@ var import_classnames$11 = /* @__PURE__ */ __toESM(require_classnames()), c = Re
6965
6965
  value: G,
6966
6966
  propValues: t$3.size.values
6967
6967
  }))
6968
- }, React$1.createElement(Thumb$1, { className: "rt-ScrollAreaThumb" })), KF === "both" ? React$1.createElement(Corner, { className: "rt-ScrollAreaCorner" }) : null)));
6968
+ }, React$1.createElement(Thumb$1, { className: "rt-ScrollAreaThumb" })), qF === "both" ? React$1.createElement(Corner, { className: "rt-ScrollAreaCorner" }) : null)));
6969
6969
  });
6970
6970
  c.displayName = "ScrollArea";
6971
6971
  var n$2 = {
@@ -8231,17 +8231,17 @@ function $e({ document: n, event: _, hitRegions: E, initialLayoutMap: O, mounted
8231
8231
  E.forEach((n) => {
8232
8232
  let { group: E, groupSize: P } = n, { disableCursor: z, orientation: B, panels: H } = E, U = 0;
8233
8233
  U = j ? B === "horizontal" ? (_.clientX - j.x) / P * 100 : (_.clientY - j.y) / P * 100 : B === "horizontal" ? _.clientX < 0 ? -100 : 100 : _.clientY < 0 ? -100 : 100;
8234
- let W = O.get(E), { defaultLayoutDeferred: G, derivedPanelConstraints: Z, layout: KF, separatorToPanels: qF } = A.get(E) ?? { defaultLayoutDeferred: !1 };
8235
- if (Z && W && KF && qF) {
8234
+ let W = O.get(E), { defaultLayoutDeferred: G, derivedPanelConstraints: Z, layout: qF, separatorToPanels: JF } = A.get(E) ?? { defaultLayoutDeferred: !1 };
8235
+ if (Z && W && qF && JF) {
8236
8236
  let _ = Z$1({
8237
8237
  delta: U,
8238
8238
  initialLayout: W,
8239
8239
  panelConstraints: Z,
8240
8240
  pivotIndices: n.panels.map((n) => H.indexOf(n)),
8241
- prevLayout: KF,
8241
+ prevLayout: qF,
8242
8242
  trigger: "mouse-or-touch"
8243
8243
  });
8244
- if (B$1(_, KF)) {
8244
+ if (B$1(_, qF)) {
8245
8245
  if (U !== 0 && !z) switch (B) {
8246
8246
  case "horizontal":
8247
8247
  M |= U < 0 ? De : Oe$1;
@@ -8255,7 +8255,7 @@ function $e({ document: n, event: _, hitRegions: E, initialLayoutMap: O, mounted
8255
8255
  defaultLayoutDeferred: G,
8256
8256
  derivedPanelConstraints: Z,
8257
8257
  layout: _,
8258
- separatorToPanels: qF
8258
+ separatorToPanels: JF
8259
8259
  });
8260
8260
  let E = n.group.panels.map(({ id: n }) => n).join(",");
8261
8261
  n.group.inMemoryLayouts[E] = _;
@@ -8467,64 +8467,64 @@ function Pt(n, _) {
8467
8467
  function Rt({ children: n, className: _, defaultLayout: E, disableCursor: O, disabled: A, elementRef: j, groupRef: M, id: N, onLayoutChange: P, orientation: z = "horizontal", style: B, ...H }) {
8468
8468
  let U = useRef({}), W = le$1((n) => {
8469
8469
  B$1(U.current, n) || (U.current = n, P?.(n));
8470
- }), Z = ae$1(N), KF = useRef(null), [qF, JF] = useState(!1), [XF, $F] = useState(E ?? {}), [eI, tI] = wt(), nI = useRef({
8470
+ }), Z = ae$1(N), qF = useRef(null), [JF, YF] = useState(!1), [ZF, eI] = useState(E ?? {}), [tI, nI] = wt(), rI = useRef({
8471
8471
  lastExpandedPanelSizes: {},
8472
8472
  layouts: {},
8473
8473
  panels: [],
8474
8474
  separators: []
8475
- }), rI = ue$1(KF, j);
8475
+ }), iI = ue$1(qF, j);
8476
8476
  Pt(Z, M);
8477
- let iI = useMemo(() => ({
8477
+ let aI = useMemo(() => ({
8478
8478
  id: Z,
8479
8479
  orientation: z,
8480
8480
  registerPanel: (n) => {
8481
- let _ = nI.current;
8482
- return _.panels = ie$1(z, [..._.panels, n]), tI(), () => {
8483
- _.panels = _.panels.filter((_) => _ !== n), tI();
8481
+ let _ = rI.current;
8482
+ return _.panels = ie$1(z, [..._.panels, n]), nI(), () => {
8483
+ _.panels = _.panels.filter((_) => _ !== n), nI();
8484
8484
  };
8485
8485
  },
8486
8486
  registerSeparator: (n) => {
8487
- let _ = nI.current;
8488
- return _.separators = ie$1(z, [..._.separators, n]), tI(), () => {
8489
- _.separators = _.separators.filter((_) => _ !== n), tI();
8487
+ let _ = rI.current;
8488
+ return _.separators = ie$1(z, [..._.separators, n]), nI(), () => {
8489
+ _.separators = _.separators.filter((_) => _ !== n), nI();
8490
8490
  };
8491
8491
  }
8492
8492
  }), [
8493
8493
  Z,
8494
- tI,
8494
+ nI,
8495
8495
  z
8496
- ]), oI = Lt({
8496
+ ]), sI = Lt({
8497
8497
  defaultLayout: E,
8498
8498
  disableCursor: O
8499
- }), sI = useRef(null);
8499
+ }), cI = useRef(null);
8500
8500
  A$1(() => {
8501
- let n = KF.current;
8501
+ let n = qF.current;
8502
8502
  if (n === null) return;
8503
- let _ = nI.current, E = {
8504
- defaultLayout: oI.defaultLayout,
8505
- disableCursor: !!oI.disableCursor,
8503
+ let _ = rI.current, E = {
8504
+ defaultLayout: sI.defaultLayout,
8505
+ disableCursor: !!sI.disableCursor,
8506
8506
  disabled: !!A,
8507
8507
  element: n,
8508
8508
  id: Z,
8509
- inMemoryLastExpandedPanelSizes: nI.current.lastExpandedPanelSizes,
8510
- inMemoryLayouts: nI.current.layouts,
8509
+ inMemoryLastExpandedPanelSizes: rI.current.lastExpandedPanelSizes,
8510
+ inMemoryLayouts: rI.current.layouts,
8511
8511
  orientation: z,
8512
8512
  panels: _.panels,
8513
8513
  separators: _.separators
8514
8514
  };
8515
- sI.current = E;
8515
+ cI.current = E;
8516
8516
  let O = bt(E), j = D$1().mountedGroups.get(E);
8517
8517
  if (j) {
8518
8518
  let { defaultLayoutDeferred: n, derivedPanelConstraints: _, layout: E } = j;
8519
- !n && _.length > 0 && ($F(E), W?.(E));
8519
+ !n && _.length > 0 && (eI(E), W?.(E));
8520
8520
  }
8521
8521
  let M = T$1.addListener("interactionStateChange", (n) => {
8522
8522
  switch (n.state) {
8523
8523
  case "active":
8524
- JF(n.hitRegions.some((n) => n.group === E));
8524
+ YF(n.hitRegions.some((n) => n.group === E));
8525
8525
  break;
8526
8526
  default:
8527
- JF(!1);
8527
+ YF(!1);
8528
8528
  break;
8529
8529
  }
8530
8530
  }), N = T$1.addListener("mountedGroupsChange", (n) => {
@@ -8532,30 +8532,30 @@ function Rt({ children: n, className: _, defaultLayout: E, disableCursor: O, dis
8532
8532
  if (_) {
8533
8533
  let { defaultLayoutDeferred: n, derivedPanelConstraints: E, layout: O } = _;
8534
8534
  if (n || E.length === 0) return;
8535
- $F(O), W?.(O);
8535
+ eI(O), W?.(O);
8536
8536
  }
8537
8537
  });
8538
8538
  return () => {
8539
- sI.current = null, O(), M(), N();
8539
+ cI.current = null, O(), M(), N();
8540
8540
  };
8541
8541
  }, [
8542
8542
  A,
8543
8543
  Z,
8544
8544
  W,
8545
8545
  z,
8546
- eI,
8547
- oI
8546
+ tI,
8547
+ sI
8548
8548
  ]), useEffect(() => {
8549
- let n = sI.current;
8549
+ let n = cI.current;
8550
8550
  n && (n.defaultLayout = E, n.disableCursor = !!O);
8551
8551
  });
8552
- let cI = { [Fe]: qF ? "none" : void 0 };
8553
- for (let n in XF) {
8552
+ let lI = { [Fe]: JF ? "none" : void 0 };
8553
+ for (let n in ZF) {
8554
8554
  let _ = Ve(Z, n);
8555
- cI[_] = XF[n];
8555
+ lI[_] = ZF[n];
8556
8556
  }
8557
8557
  return /* @__PURE__ */ jsx(je.Provider, {
8558
- value: iI,
8558
+ value: aI,
8559
8559
  children: /* @__PURE__ */ jsx("div", {
8560
8560
  ...H,
8561
8561
  "aria-orientation": z,
@@ -8563,13 +8563,13 @@ function Rt({ children: n, className: _, defaultLayout: E, disableCursor: O, dis
8563
8563
  "data-group": !0,
8564
8564
  "data-testid": Z,
8565
8565
  id: Z,
8566
- ref: rI,
8566
+ ref: iI,
8567
8567
  style: {
8568
8568
  height: "100%",
8569
8569
  width: "100%",
8570
8570
  overflow: "hidden",
8571
8571
  ...B,
8572
- ...cI,
8572
+ ...lI,
8573
8573
  display: "flex",
8574
8574
  flexDirection: z === "horizontal" ? "row" : "column",
8575
8575
  flexWrap: "nowrap"
@@ -8687,12 +8687,12 @@ function It(n, _) {
8687
8687
  });
8688
8688
  }
8689
8689
  function kt({ children: n, className: _, collapsedSize: E = "0%", collapsible: O = !1, defaultSize: A, elementRef: j, id: M, maxSize: N = "100%", minSize: P = "0%", onResize: z, panelRef: B, style: H, ...U }) {
8690
- let W = !!M, G = ae$1(M), Z = useRef(null), KF = ue$1(Z, j), { id: qF, registerPanel: JF } = ce$1(), YF = z !== null, XF = le$1((n, _, E) => {
8690
+ let W = !!M, G = ae$1(M), Z = useRef(null), qF = ue$1(Z, j), { id: JF, registerPanel: YF } = ce$1(), XF = z !== null, ZF = le$1((n, _, E) => {
8691
8691
  z?.(n, M, E);
8692
8692
  });
8693
8693
  A$1(() => {
8694
8694
  let n = Z.current;
8695
- if (n !== null) return JF({
8695
+ if (n !== null) return YF({
8696
8696
  element: n,
8697
8697
  id: G,
8698
8698
  idIsStable: W,
@@ -8700,7 +8700,7 @@ function kt({ children: n, className: _, collapsedSize: E = "0%", collapsible: O
8700
8700
  expandToSize: void 0,
8701
8701
  prevSize: void 0
8702
8702
  },
8703
- onResize: YF ? XF : void 0,
8703
+ onResize: XF ? ZF : void 0,
8704
8704
  panelConstraints: {
8705
8705
  collapsedSize: E,
8706
8706
  collapsible: O,
@@ -8713,25 +8713,25 @@ function kt({ children: n, className: _, collapsedSize: E = "0%", collapsible: O
8713
8713
  E,
8714
8714
  O,
8715
8715
  A,
8716
- YF,
8716
+ XF,
8717
8717
  G,
8718
8718
  W,
8719
8719
  N,
8720
8720
  P,
8721
- XF,
8722
- JF
8721
+ ZF,
8722
+ YF
8723
8723
  ]), It(G, B);
8724
- let QF = Ve(qF, G);
8724
+ let $F = Ve(JF, G);
8725
8725
  return /* @__PURE__ */ jsx("div", {
8726
8726
  ...U,
8727
8727
  "data-panel": !0,
8728
8728
  "data-testid": G,
8729
8729
  id: G,
8730
- ref: KF,
8730
+ ref: qF,
8731
8731
  style: {
8732
8732
  ...Gt,
8733
8733
  flexBasis: 0,
8734
- flexGrow: `var(${QF}, 1)`,
8734
+ flexGrow: `var(${$F}, 1)`,
8735
8735
  flexShrink: 1,
8736
8736
  overflow: "hidden",
8737
8737
  pointerEvents: `var(${Fe})`
@@ -8794,7 +8794,7 @@ function Dt({ layout: n, panelConstraints: _, panelId: E, panelIndex: O }) {
8794
8794
  };
8795
8795
  }
8796
8796
  function Ot({ children: n, className: _, elementRef: E, id: O, style: A, ...j }) {
8797
- let M = ae$1(O), [N, P] = useState({}), [z, B] = useState("inactive"), H = useRef(null), U = ue$1(H, E), { id: W, orientation: G, registerSeparator: Z } = ce$1(), KF = G === "horizontal" ? "vertical" : "horizontal";
8797
+ let M = ae$1(O), [N, P] = useState({}), [z, B] = useState("inactive"), H = useRef(null), U = ue$1(H, E), { id: W, orientation: G, registerSeparator: Z } = ce$1(), qF = G === "horizontal" ? "vertical" : "horizontal";
8798
8798
  return A$1(() => {
8799
8799
  let n = H.current;
8800
8800
  if (n !== null) {
@@ -8830,7 +8830,7 @@ function Ot({ children: n, className: _, elementRef: E, id: O, style: A, ...j })
8830
8830
  ]), /* @__PURE__ */ jsx("div", {
8831
8831
  ...j,
8832
8832
  "aria-controls": N.valueControls,
8833
- "aria-orientation": KF,
8833
+ "aria-orientation": qF,
8834
8834
  "aria-valuemax": N.valueMax,
8835
8835
  "aria-valuemin": N.valueMin,
8836
8836
  "aria-valuenow": N.valueNow,
@@ -8853,7 +8853,7 @@ function Ot({ children: n, className: _, elementRef: E, id: O, style: A, ...j })
8853
8853
  Ot.displayName = "Separator";
8854
8854
  var package_default = {
8855
8855
  name: "@1urso/generic-editor",
8856
- version: "0.1.68",
8856
+ version: "0.1.70",
8857
8857
  publishConfig: { access: "public" },
8858
8858
  type: "module",
8859
8859
  main: "./dist/generic-editor.umd.cjs",
@@ -9081,7 +9081,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9081
9081
  historyIndex: n,
9082
9082
  selectedElementIds: []
9083
9083
  } : _);
9084
- }, []), KF = React.useCallback(() => {
9084
+ }, []), qF = React.useCallback(() => {
9085
9085
  M((n) => {
9086
9086
  if (n.selectedElementIds.length > 0) {
9087
9087
  let _ = n.elements.filter((_) => n.selectedElementIds.includes(_.id));
@@ -9092,7 +9092,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9092
9092
  }
9093
9093
  return n;
9094
9094
  });
9095
- }, []), qF = React.useCallback(() => {
9095
+ }, []), JF = React.useCallback(() => {
9096
9096
  M((n) => {
9097
9097
  if (n.clipboard.length > 0) {
9098
9098
  let _ = n.clipboard.map((n) => ({
@@ -9111,7 +9111,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9111
9111
  }
9112
9112
  return n;
9113
9113
  });
9114
- }, []), JF = React.useCallback((n) => {
9114
+ }, []), YF = React.useCallback((n) => {
9115
9115
  let _ = {};
9116
9116
  n.type === "box" && (_.backgroundColor = "var(--gray-4)"), n.type === "text-container" && (_.backgroundColor = "var(--gray-4)", _.border = "1px solid var(--gray-8)", _.padding = "8px", _.display = "flex", _.alignItems = "flex-start", _.justifyContent = "flex-start");
9117
9117
  let E = {
@@ -9136,7 +9136,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9136
9136
  selectedElementIds: [E.id]
9137
9137
  };
9138
9138
  });
9139
- }, []), YF = React.useCallback((n) => {
9139
+ }, []), XF = React.useCallback((n) => {
9140
9140
  M((_) => {
9141
9141
  let E = _.elements.filter((_) => _.id !== n), O = _.history.slice(0, _.historyIndex + 1);
9142
9142
  O.push(E);
@@ -9150,7 +9150,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9150
9150
  historyIndex: O.length - 1
9151
9151
  };
9152
9152
  });
9153
- }, []), XF = React.useCallback(() => {
9153
+ }, []), ZF = React.useCallback(() => {
9154
9154
  M((n) => {
9155
9155
  if (n.selectedElementIds.length === 0) return n;
9156
9156
  let _ = n.elements.filter((_) => !n.selectedElementIds.includes(_.id)), E = n.history.slice(0, n.historyIndex + 1);
@@ -9165,7 +9165,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9165
9165
  historyIndex: E.length - 1
9166
9166
  };
9167
9167
  });
9168
- }, []), ZF = React.useCallback((n, _ = !1) => {
9168
+ }, []), QF = React.useCallback((n, _ = !1) => {
9169
9169
  M((E) => {
9170
9170
  if (n === null) return {
9171
9171
  ...E,
@@ -9182,12 +9182,12 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9182
9182
  selectedElementIds: [n]
9183
9183
  };
9184
9184
  });
9185
- }, []), $F = React.useCallback((n) => {
9185
+ }, []), eI = React.useCallback((n) => {
9186
9186
  M((_) => ({
9187
9187
  ..._,
9188
9188
  selectedElementIds: n
9189
9189
  }));
9190
- }, []), eI = React.useCallback((n, _) => {
9190
+ }, []), tI = React.useCallback((n, _) => {
9191
9191
  M((E) => {
9192
9192
  let O = [...E.elements], A = O[n];
9193
9193
  O.splice(n, 1), O.splice(_, 0, A);
@@ -9199,7 +9199,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9199
9199
  historyIndex: j.length - 1
9200
9200
  };
9201
9201
  });
9202
- }, []), tI = React.useCallback((n, _, E = !0) => {
9202
+ }, []), nI = React.useCallback((n, _, E = !0) => {
9203
9203
  M((O) => {
9204
9204
  let A = O.elements.map((E) => E.id === n ? {
9205
9205
  ...E,
@@ -9212,7 +9212,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9212
9212
  historyIndex: M
9213
9213
  };
9214
9214
  });
9215
- }, []), nI = React.useCallback((n, _ = !0) => {
9215
+ }, []), rI = React.useCallback((n, _ = !0) => {
9216
9216
  M((E) => {
9217
9217
  let O = [...E.elements], A = [], j = /* @__PURE__ */ new Set();
9218
9218
  n.forEach(({ id: n, changes: _ }) => {
@@ -9266,7 +9266,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9266
9266
  historyIndex: P
9267
9267
  };
9268
9268
  });
9269
- }, []), rI = React.useCallback((n) => {
9269
+ }, []), iI = React.useCallback((n) => {
9270
9270
  M((_) => {
9271
9271
  let E = _.elements.filter((_) => n.includes(_.id));
9272
9272
  if (E.length === 0) return _;
@@ -9297,7 +9297,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9297
9297
  historyIndex: z.length - 1
9298
9298
  };
9299
9299
  });
9300
- }, []), iI = React.useCallback((n) => {
9300
+ }, []), aI = React.useCallback((n) => {
9301
9301
  M((_) => {
9302
9302
  let E = _.elements.find((_) => _.id === n);
9303
9303
  if (!E || E.type !== "group") return _;
@@ -9316,7 +9316,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9316
9316
  historyIndex: j.length - 1
9317
9317
  };
9318
9318
  });
9319
- }, []), oI = React.useCallback((n, _) => {
9319
+ }, []), sI = React.useCallback((n, _) => {
9320
9320
  M((E) => {
9321
9321
  let O = E.elements.map((E) => E.id === n ? {
9322
9322
  ...E,
@@ -9327,7 +9327,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9327
9327
  elements: O
9328
9328
  };
9329
9329
  });
9330
- }, []), sI = React.useCallback((n, _) => {
9330
+ }, []), cI = React.useCallback((n, _) => {
9331
9331
  if (!n.find((n) => n.id === _ && n.type === "group")) return n;
9332
9332
  let E = n.filter((n) => n.groupId === _);
9333
9333
  if (E.length === 0) return n;
@@ -9339,7 +9339,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9339
9339
  width: j - O,
9340
9340
  height: M - A
9341
9341
  } : n);
9342
- }, []), cI = React.useCallback((n, _) => {
9342
+ }, []), lI = React.useCallback((n, _) => {
9343
9343
  M((E) => {
9344
9344
  let O = E.elements.find((_) => _.id === n), A = E.elements.find((n) => n.id === _ && n.type === "group");
9345
9345
  if (!O || !A) return E;
@@ -9347,7 +9347,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9347
9347
  ...E,
9348
9348
  groupId: _
9349
9349
  } : E);
9350
- j = sI(j, _);
9350
+ j = cI(j, _);
9351
9351
  let M = E.history.slice(0, E.historyIndex + 1);
9352
9352
  M.push(j);
9353
9353
  let N = E.historyDescriptions.slice(0, E.historyIndex + 1);
@@ -9359,7 +9359,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9359
9359
  historyIndex: M.length - 1
9360
9360
  };
9361
9361
  });
9362
- }, [sI]), lI = React.useCallback((n) => {
9362
+ }, [cI]), uI = React.useCallback((n) => {
9363
9363
  M((_) => {
9364
9364
  let E = _.elements.find((_) => _.id === n);
9365
9365
  if (!E || !E.groupId) return _;
@@ -9367,7 +9367,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9367
9367
  ..._,
9368
9368
  groupId: void 0
9369
9369
  } : _);
9370
- A = sI(A, O);
9370
+ A = cI(A, O);
9371
9371
  let j = _.history.slice(0, _.historyIndex + 1);
9372
9372
  j.push(A);
9373
9373
  let M = _.historyDescriptions.slice(0, _.historyIndex + 1);
@@ -9379,7 +9379,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9379
9379
  historyIndex: j.length - 1
9380
9380
  };
9381
9381
  });
9382
- }, [sI]), uI = React.useCallback((n, _, E) => {
9382
+ }, [cI]), dI = React.useCallback((n, _, E) => {
9383
9383
  M((O) => {
9384
9384
  let A = O.elements.find((_) => _.id === n && _.type === "group");
9385
9385
  if (!A) return O;
@@ -9411,13 +9411,13 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9411
9411
  historyIndex: B.length - 1
9412
9412
  };
9413
9413
  });
9414
- }, []), dI = React.useCallback((n, _) => {
9414
+ }, []), fI = React.useCallback((n, _) => {
9415
9415
  M((E) => ({
9416
9416
  ...E,
9417
9417
  mockData: n,
9418
9418
  singleMockData: _
9419
9419
  }));
9420
- }, []), fI = React.useCallback((n) => {
9420
+ }, []), pI = React.useCallback((n) => {
9421
9421
  M((_) => ({
9422
9422
  ..._,
9423
9423
  listSettings: {
@@ -9425,81 +9425,81 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
9425
9425
  ...n
9426
9426
  }
9427
9427
  }));
9428
- }, []), pI = React.useCallback((n) => {
9428
+ }, []), mI = React.useCallback((n) => {
9429
9429
  M((_) => ({
9430
9430
  ..._,
9431
9431
  assets: [..._.assets, n]
9432
9432
  }));
9433
- }, []), mI = React.useCallback((n) => {
9433
+ }, []), hI = React.useCallback((n) => {
9434
9434
  M((_) => ({
9435
9435
  ..._,
9436
9436
  assets: _.assets.filter((_) => _.id !== n)
9437
9437
  }));
9438
- }, []), hI = React.useMemo(() => ({
9438
+ }, []), gI = React.useMemo(() => ({
9439
9439
  state: j,
9440
- addElement: JF,
9441
- removeElement: YF,
9442
- removeSelected: XF,
9443
- selectElement: ZF,
9444
- setSelectedElements: $F,
9445
- moveElement: eI,
9446
- updateElement: tI,
9447
- updateElements: nI,
9448
- groupElements: rI,
9449
- ungroupElements: iI,
9450
- renameElement: oI,
9451
- addToGroup: cI,
9452
- removeFromGroup: lI,
9453
- resizeGroup: uI,
9454
- setMockData: dI,
9455
- updateListSettings: fI,
9440
+ addElement: YF,
9441
+ removeElement: XF,
9442
+ removeSelected: ZF,
9443
+ selectElement: QF,
9444
+ setSelectedElements: eI,
9445
+ moveElement: tI,
9446
+ updateElement: nI,
9447
+ updateElements: rI,
9448
+ groupElements: iI,
9449
+ ungroupElements: aI,
9450
+ renameElement: sI,
9451
+ addToGroup: lI,
9452
+ removeFromGroup: uI,
9453
+ resizeGroup: dI,
9454
+ setMockData: fI,
9455
+ updateListSettings: pI,
9456
9456
  setCanvasHeight: N,
9457
9457
  loadState: U,
9458
9458
  undo: W,
9459
9459
  redo: G,
9460
9460
  jumpToHistory: Z,
9461
- copy: KF,
9462
- paste: qF,
9461
+ copy: qF,
9462
+ paste: JF,
9463
9463
  setGridSize: P,
9464
9464
  setZoom: z,
9465
9465
  setPan: B,
9466
9466
  setSnapLines: H,
9467
- addAsset: pI,
9468
- removeAsset: mI
9467
+ addAsset: mI,
9468
+ removeAsset: hI
9469
9469
  }), [
9470
9470
  j,
9471
- JF,
9472
9471
  YF,
9473
9472
  XF,
9474
9473
  ZF,
9475
- $F,
9474
+ QF,
9476
9475
  eI,
9477
9476
  tI,
9478
9477
  nI,
9479
9478
  rI,
9480
9479
  iI,
9481
- oI,
9482
- cI,
9480
+ aI,
9481
+ sI,
9483
9482
  lI,
9484
9483
  uI,
9485
9484
  dI,
9486
9485
  fI,
9486
+ pI,
9487
9487
  N,
9488
9488
  U,
9489
9489
  W,
9490
9490
  G,
9491
9491
  Z,
9492
- KF,
9493
9492
  qF,
9493
+ JF,
9494
9494
  P,
9495
9495
  z,
9496
9496
  B,
9497
9497
  H,
9498
- pI,
9499
- mI
9498
+ mI,
9499
+ hI
9500
9500
  ]);
9501
9501
  return /* @__PURE__ */ jsx(EditorContext.Provider, {
9502
- value: hI,
9502
+ value: gI,
9503
9503
  children: n
9504
9504
  });
9505
9505
  }, useEditor = () => {
@@ -9941,16 +9941,16 @@ var __assign$1 = function() {
9941
9941
  maxHeight: _
9942
9942
  };
9943
9943
  }, _.prototype.calculateNewSizeFromDirection = function(n, _) {
9944
- var E = this.props.scale || 1, O = normalizeToPair(this.props.resizeRatio || 1), A = O[0], j = O[1], M = this.state, N = M.direction, P = M.original, z = this.props, B = z.lockAspectRatio, H = z.lockAspectRatioExtraHeight, U = z.lockAspectRatioExtraWidth, W = P.width, G = P.height, Z = H || 0, KF = U || 0;
9945
- return hasDirection("right", N) && (W = P.width + (n - P.x) * A / E, B && (G = (W - KF) / this.ratio + Z)), hasDirection("left", N) && (W = P.width - (n - P.x) * A / E, B && (G = (W - KF) / this.ratio + Z)), hasDirection("bottom", N) && (G = P.height + (_ - P.y) * j / E, B && (W = (G - Z) * this.ratio + KF)), hasDirection("top", N) && (G = P.height - (_ - P.y) * j / E, B && (W = (G - Z) * this.ratio + KF)), {
9944
+ var E = this.props.scale || 1, O = normalizeToPair(this.props.resizeRatio || 1), A = O[0], j = O[1], M = this.state, N = M.direction, P = M.original, z = this.props, B = z.lockAspectRatio, H = z.lockAspectRatioExtraHeight, U = z.lockAspectRatioExtraWidth, W = P.width, G = P.height, Z = H || 0, qF = U || 0;
9945
+ return hasDirection("right", N) && (W = P.width + (n - P.x) * A / E, B && (G = (W - qF) / this.ratio + Z)), hasDirection("left", N) && (W = P.width - (n - P.x) * A / E, B && (G = (W - qF) / this.ratio + Z)), hasDirection("bottom", N) && (G = P.height + (_ - P.y) * j / E, B && (W = (G - Z) * this.ratio + qF)), hasDirection("top", N) && (G = P.height - (_ - P.y) * j / E, B && (W = (G - Z) * this.ratio + qF)), {
9946
9946
  newWidth: W,
9947
9947
  newHeight: G
9948
9948
  };
9949
9949
  }, _.prototype.calculateNewSizeFromAspectRatio = function(n, _, E, O) {
9950
9950
  var A = this.props, j = A.lockAspectRatio, M = A.lockAspectRatioExtraHeight, N = A.lockAspectRatioExtraWidth, P = O.width === void 0 ? 10 : O.width, z = E.width === void 0 || E.width < 0 ? n : E.width, B = O.height === void 0 ? 10 : O.height, H = E.height === void 0 || E.height < 0 ? _ : E.height, U = M || 0, W = N || 0;
9951
9951
  if (j) {
9952
- var G = (B - U) * this.ratio + W, Z = (H - U) * this.ratio + W, KF = (P - W) / this.ratio + U, qF = (z - W) / this.ratio + U, JF = Math.max(P, G), YF = Math.min(z, Z), XF = Math.max(B, KF), ZF = Math.min(H, qF);
9953
- n = clamp$1(n, JF, YF), _ = clamp$1(_, XF, ZF);
9952
+ var G = (B - U) * this.ratio + W, Z = (H - U) * this.ratio + W, qF = (P - W) / this.ratio + U, JF = (z - W) / this.ratio + U, YF = Math.max(P, G), XF = Math.min(z, Z), ZF = Math.max(B, qF), QF = Math.min(H, JF);
9953
+ n = clamp$1(n, YF, XF), _ = clamp$1(_, ZF, QF);
9954
9954
  } else n = clamp$1(n, P, z), _ = clamp$1(_, B, H);
9955
9955
  return {
9956
9956
  newWidth: n,
@@ -10007,56 +10007,56 @@ var __assign$1 = function() {
10007
10007
  } catch {}
10008
10008
  var E = this.props, O = E.maxWidth, A = E.maxHeight, j = E.minWidth, M = E.minHeight, N = isTouchEvent$1(n) ? n.touches[0].clientX : n.clientX, P = isTouchEvent$1(n) ? n.touches[0].clientY : n.clientY, z = this.state, B = z.direction, H = z.original, U = z.width, W = z.height, G = this.getParentSize(), Z = calculateNewMax(G, this.window.innerWidth, this.window.innerHeight, O, A, j, M);
10009
10009
  O = Z.maxWidth, A = Z.maxHeight, j = Z.minWidth, M = Z.minHeight;
10010
- var KF = this.calculateNewSizeFromDirection(N, P), qF = KF.newHeight, JF = KF.newWidth, YF = this.calculateNewMaxFromBoundary(O, A);
10011
- this.props.snap && this.props.snap.x && (JF = findClosestSnap(JF, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (qF = findClosestSnap(qF, this.props.snap.y, this.props.snapGap));
10012
- var XF = this.calculateNewSizeFromAspectRatio(JF, qF, {
10013
- width: YF.maxWidth,
10014
- height: YF.maxHeight
10010
+ var qF = this.calculateNewSizeFromDirection(N, P), JF = qF.newHeight, YF = qF.newWidth, XF = this.calculateNewMaxFromBoundary(O, A);
10011
+ this.props.snap && this.props.snap.x && (YF = findClosestSnap(YF, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (JF = findClosestSnap(JF, this.props.snap.y, this.props.snapGap));
10012
+ var ZF = this.calculateNewSizeFromAspectRatio(YF, JF, {
10013
+ width: XF.maxWidth,
10014
+ height: XF.maxHeight
10015
10015
  }, {
10016
10016
  width: j,
10017
10017
  height: M
10018
10018
  });
10019
- if (JF = XF.newWidth, qF = XF.newHeight, this.props.grid) {
10020
- var ZF = snap(JF, this.props.grid[0], this.props.gridGap ? this.props.gridGap[0] : 0), QF = snap(qF, this.props.grid[1], this.props.gridGap ? this.props.gridGap[1] : 0), $F = this.props.snapGap || 0, eI = $F === 0 || Math.abs(ZF - JF) <= $F ? ZF : JF, tI = $F === 0 || Math.abs(QF - qF) <= $F ? QF : qF;
10021
- JF = eI, qF = tI;
10019
+ if (YF = ZF.newWidth, JF = ZF.newHeight, this.props.grid) {
10020
+ var QF = snap(YF, this.props.grid[0], this.props.gridGap ? this.props.gridGap[0] : 0), $F = snap(JF, this.props.grid[1], this.props.gridGap ? this.props.gridGap[1] : 0), eI = this.props.snapGap || 0, tI = eI === 0 || Math.abs(QF - YF) <= eI ? QF : YF, nI = eI === 0 || Math.abs($F - JF) <= eI ? $F : JF;
10021
+ YF = tI, JF = nI;
10022
10022
  }
10023
- var rI = {
10024
- width: JF - H.width,
10025
- height: qF - H.height
10023
+ var iI = {
10024
+ width: YF - H.width,
10025
+ height: JF - H.height
10026
10026
  };
10027
- if (this.delta = rI, U && typeof U == "string") {
10027
+ if (this.delta = iI, U && typeof U == "string") {
10028
10028
  if (U.endsWith("%")) {
10029
- var iI = JF / G.width * 100;
10030
- JF = `${iI}%`;
10029
+ var aI = YF / G.width * 100;
10030
+ YF = `${aI}%`;
10031
10031
  } else if (U.endsWith("vw")) {
10032
- var aI = JF / this.window.innerWidth * 100;
10033
- JF = `${aI}vw`;
10032
+ var oI = YF / this.window.innerWidth * 100;
10033
+ YF = `${oI}vw`;
10034
10034
  } else if (U.endsWith("vh")) {
10035
- var oI = JF / this.window.innerHeight * 100;
10036
- JF = `${oI}vh`;
10035
+ var sI = YF / this.window.innerHeight * 100;
10036
+ YF = `${sI}vh`;
10037
10037
  }
10038
10038
  }
10039
10039
  if (W && typeof W == "string") {
10040
10040
  if (W.endsWith("%")) {
10041
- var iI = qF / G.height * 100;
10042
- qF = `${iI}%`;
10041
+ var aI = JF / G.height * 100;
10042
+ JF = `${aI}%`;
10043
10043
  } else if (W.endsWith("vw")) {
10044
- var aI = qF / this.window.innerWidth * 100;
10045
- qF = `${aI}vw`;
10044
+ var oI = JF / this.window.innerWidth * 100;
10045
+ JF = `${oI}vw`;
10046
10046
  } else if (W.endsWith("vh")) {
10047
- var oI = qF / this.window.innerHeight * 100;
10048
- qF = `${oI}vh`;
10047
+ var sI = JF / this.window.innerHeight * 100;
10048
+ JF = `${sI}vh`;
10049
10049
  }
10050
10050
  }
10051
- var sI = {
10052
- width: this.createSizeForCssProperty(JF, "width"),
10053
- height: this.createSizeForCssProperty(qF, "height")
10051
+ var cI = {
10052
+ width: this.createSizeForCssProperty(YF, "width"),
10053
+ height: this.createSizeForCssProperty(JF, "height")
10054
10054
  };
10055
- this.flexDir === "row" ? sI.flexBasis = sI.width : this.flexDir === "column" && (sI.flexBasis = sI.height);
10056
- var cI = this.state.width !== sI.width, lI = this.state.height !== sI.height, uI = this.state.flexBasis !== sI.flexBasis, dI = cI || lI || uI;
10057
- dI && flushSync(function() {
10058
- _.setState(sI);
10059
- }), this.props.onResize && dI && this.props.onResize(n, B, this.resizable, rI);
10055
+ this.flexDir === "row" ? cI.flexBasis = cI.width : this.flexDir === "column" && (cI.flexBasis = cI.height);
10056
+ var lI = this.state.width !== cI.width, uI = this.state.height !== cI.height, dI = this.state.flexBasis !== cI.flexBasis, fI = lI || uI || dI;
10057
+ fI && flushSync(function() {
10058
+ _.setState(cI);
10059
+ }), this.props.onResize && fI && this.props.onResize(n, B, this.resizable, iI);
10060
10060
  }
10061
10061
  }, _.prototype.onMouseUp = function(n) {
10062
10062
  var _ = this.state, E = _.isResizing, O = _.direction;
@@ -11190,6 +11190,10 @@ var AnimationSettings = ({ element: n, updateElement: _ }) => {
11190
11190
  {
11191
11191
  label: "Cor da Borda",
11192
11192
  value: "borderColor"
11193
+ },
11194
+ {
11195
+ label: "Cor da Sombra",
11196
+ value: "boxShadowColor"
11193
11197
  }
11194
11198
  ], P = (E, O) => {
11195
11199
  let j = { ...A };
@@ -11566,32 +11570,32 @@ var AnimationSettings = ({ element: n, updateElement: _ }) => {
11566
11570
  });
11567
11571
  }, stopProp = (n) => n.stopPropagation();
11568
11572
  const ElementContextMenu = ({ children: n, element: _ }) => {
11569
- let { updateElement: E, removeElement: O, removeSelected: A, addElement: j, moveElement: M, copy: N, paste: P, state: z, renameElement: B, groupElements: H, ungroupElements: U } = useEditor(), [W, G] = useState(!1), [Z, KF] = useState(!1), [qF, JF] = useState(!1), [YF, XF] = useState(!1), [$F, eI] = useState("formatting"), [tI, nI] = useState({
11573
+ let { updateElement: E, removeElement: O, removeSelected: A, addElement: j, moveElement: M, copy: N, paste: P, state: z, renameElement: B, groupElements: H, ungroupElements: U } = useEditor(), [W, G] = useState(!1), [Z, qF] = useState(!1), [JF, YF] = useState(!1), [XF, ZF] = useState(!1), [eI, tI] = useState("formatting"), [nI, rI] = useState({
11570
11574
  open: !1,
11571
11575
  prop: "",
11572
11576
  value: ""
11573
- }), [rI, sI] = useState(!1), [cI, lI] = useState(""), [uI, dI] = useState(""), [fI, pI] = useState(_.content), [mI, hI] = useState(_.dataBinding || ""), gI = useRef(null), _I = useRef(null), vI = (n) => {
11574
- let _ = gI.current;
11577
+ }), [iI, cI] = useState(!1), [lI, uI] = useState(""), [dI, fI] = useState(""), [pI, mI] = useState(_.content), [hI, gI] = useState(_.dataBinding || ""), _I = useRef(null), vI = useRef(null), yI = (n) => {
11578
+ let _ = _I.current;
11575
11579
  if (_) {
11576
- let E = _.selectionStart, O = _.selectionEnd, A = fI;
11577
- pI(A.substring(0, E) + `{{${n}}}` + A.substring(O)), setTimeout(() => {
11580
+ let E = _.selectionStart, O = _.selectionEnd, A = pI;
11581
+ mI(A.substring(0, E) + `{{${n}}}` + A.substring(O)), setTimeout(() => {
11578
11582
  _.focus();
11579
11583
  let O = E + n.length + 4;
11580
11584
  _.setSelectionRange(O, O);
11581
11585
  }, 0);
11582
- } else pI((_) => _ + `{{${n}}}`);
11583
- }, yI = (n) => {
11586
+ } else mI((_) => _ + `{{${n}}}`);
11587
+ }, bI = (n) => {
11584
11588
  E(_.id, { style: {
11585
11589
  ..._.style,
11586
11590
  ...n
11587
11591
  } });
11588
- }, bI = () => {
11592
+ }, xI = () => {
11589
11593
  let n = z.elements.findIndex((n) => n.id === _.id);
11590
11594
  n < z.elements.length - 1 && M(n, z.elements.length - 1);
11591
- }, xI = () => {
11595
+ }, SI = () => {
11592
11596
  let n = z.elements.findIndex((n) => n.id === _.id);
11593
11597
  n > 0 && M(n, 0);
11594
- }, SI = () => {
11598
+ }, CI = () => {
11595
11599
  z.selectedElementIds.includes(_.id) && z.selectedElementIds.length > 1 ? (N(), P()) : j({
11596
11600
  type: _.type,
11597
11601
  content: _.content,
@@ -11601,7 +11605,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11601
11605
  height: _.height,
11602
11606
  style: _.style
11603
11607
  });
11604
- }, CI = [
11608
+ }, wI = [
11605
11609
  "#000000",
11606
11610
  "#FFFFFF",
11607
11611
  "#FF0000",
@@ -11611,59 +11615,152 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11611
11615
  "#808080",
11612
11616
  "#800080",
11613
11617
  "transparent"
11614
- ], wI = [
11618
+ ], TI = [
11615
11619
  0,
11616
11620
  1,
11617
11621
  2,
11618
11622
  4,
11619
11623
  8
11620
- ], TI = [
11624
+ ], EI = [
11621
11625
  "solid",
11622
11626
  "dashed",
11623
11627
  "dotted",
11624
11628
  "double"
11625
- ], EI = (n, _) => {
11626
- nI({
11629
+ ], DI = [
11630
+ {
11631
+ label: "Sem Sombra",
11632
+ value: "none"
11633
+ },
11634
+ {
11635
+ label: "Suave",
11636
+ value: "0 2px 8px rgba(0, 0, 0, 0.12)"
11637
+ },
11638
+ {
11639
+ label: "Média",
11640
+ value: "0 6px 16px rgba(0, 0, 0, 0.18)"
11641
+ },
11642
+ {
11643
+ label: "Forte",
11644
+ value: "0 10px 24px rgba(0, 0, 0, 0.28)"
11645
+ },
11646
+ {
11647
+ label: "Brilho",
11648
+ value: "0 0 16px rgba(0, 0, 0, 0.35)"
11649
+ }
11650
+ ], OI = [
11651
+ {
11652
+ label: "Cima",
11653
+ x: 0,
11654
+ y: -6
11655
+ },
11656
+ {
11657
+ label: "Baixo",
11658
+ x: 0,
11659
+ y: 6
11660
+ },
11661
+ {
11662
+ label: "Esquerda",
11663
+ x: -6,
11664
+ y: 0
11665
+ },
11666
+ {
11667
+ label: "Direita",
11668
+ x: 6,
11669
+ y: 0
11670
+ },
11671
+ {
11672
+ label: "Diagonal",
11673
+ x: 6,
11674
+ y: 6
11675
+ }
11676
+ ], kI = (n) => {
11677
+ if (!n || n === "none") return;
11678
+ let _ = n.match(/(rgba?\([^)]+\)|#(?:[0-9a-fA-F]{3,8})|[a-zA-Z]+)\s*$/);
11679
+ return _ ? _[1] : void 0;
11680
+ }, AI = (n) => {
11681
+ let _ = {
11682
+ x: 0,
11683
+ y: 4,
11684
+ blur: 12,
11685
+ spread: 0,
11686
+ color: "rgba(0, 0, 0, 0.25)"
11687
+ };
11688
+ if (!n || n === "none") return _;
11689
+ let E = (n.match(/-?\d+px/g) || []).map((n) => parseInt(n, 10)), O = kI(n) || _.color;
11690
+ return {
11691
+ x: E[0] ?? _.x,
11692
+ y: E[1] ?? _.y,
11693
+ blur: E[2] ?? _.blur,
11694
+ spread: E[3] ?? _.spread,
11695
+ color: O
11696
+ };
11697
+ }, jI = (n) => `${n.x}px ${n.y}px ${n.blur}px ${n.spread}px ${n.color}`, MI = (n, _) => {
11698
+ let E = /(rgba?\([^)]+\)|#(?:[0-9a-fA-F]{3,8})|[a-zA-Z]+)\s*$/;
11699
+ return !n || n === "none" ? jI({
11700
+ ...AI(void 0),
11701
+ color: _
11702
+ }) : E.test(n) ? n.replace(E, _) : `${n} ${_}`;
11703
+ }, NI = (n, _) => {
11704
+ rI({
11627
11705
  open: !0,
11628
11706
  prop: n,
11629
11707
  value: _
11630
11708
  });
11631
- }, DI = () => {
11632
- yI({ [tI.prop]: tI.value }), nI((n) => ({
11709
+ }, PI = () => {
11710
+ if (nI.prop === "boxShadowColor") {
11711
+ bI({ boxShadow: MI(_.style?.boxShadow, nI.value) }), rI((n) => ({
11712
+ ...n,
11713
+ open: !1
11714
+ }));
11715
+ return;
11716
+ }
11717
+ bI({ [nI.prop]: nI.value }), rI((n) => ({
11633
11718
  ...n,
11634
11719
  open: !1
11635
11720
  }));
11636
- }, OI = (n) => {
11721
+ }, FI = (n) => {
11637
11722
  if (n === 0) {
11638
- yI({
11723
+ bI({
11724
+ border: "none",
11639
11725
  borderWidth: "0px",
11640
- borderStyle: "none"
11726
+ borderStyle: "none",
11727
+ borderColor: "transparent"
11641
11728
  });
11642
11729
  return;
11643
11730
  }
11644
- yI({
11731
+ bI({
11645
11732
  borderWidth: `${n}px`,
11646
11733
  borderStyle: _.style?.borderStyle || "solid"
11647
11734
  });
11648
- }, kI = (n) => {
11735
+ }, II = (n) => {
11649
11736
  if (!parseInt(_.style?.borderWidth || "0", 10)) {
11650
- yI({
11737
+ bI({
11651
11738
  borderStyle: n,
11652
11739
  borderWidth: "1px"
11653
11740
  });
11654
11741
  return;
11655
11742
  }
11656
- yI({ borderStyle: n });
11657
- }, AI = (n) => {
11743
+ bI({ borderStyle: n });
11744
+ }, LI = (n) => {
11658
11745
  if (!parseInt(_.style?.borderWidth || "0", 10)) {
11659
- yI({
11746
+ bI({
11660
11747
  borderColor: n,
11661
11748
  borderWidth: "1px",
11662
11749
  borderStyle: _.style?.borderStyle || "solid"
11663
11750
  });
11664
11751
  return;
11665
11752
  }
11666
- yI({ borderColor: n });
11753
+ bI({ borderColor: n });
11754
+ }, RI = (n) => {
11755
+ bI({ boxShadow: n });
11756
+ }, BI = (n) => {
11757
+ bI({ boxShadow: MI(_.style?.boxShadow, n) });
11758
+ }, HI = (n, E) => {
11759
+ bI({ boxShadow: jI({
11760
+ ...AI(_.style?.boxShadow),
11761
+ x: n,
11762
+ y: E
11763
+ }) });
11667
11764
  };
11668
11765
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
11669
11766
  /* @__PURE__ */ jsx(s$4, {
@@ -11676,8 +11773,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11676
11773
  direction: "column",
11677
11774
  gap: "3",
11678
11775
  children: [/* @__PURE__ */ jsx(u$1, {
11679
- value: uI,
11680
- onChange: (n) => dI(n.target.value),
11776
+ value: dI,
11777
+ onChange: (n) => fI(n.target.value),
11681
11778
  placeholder: "Nome da camada..."
11682
11779
  }), /* @__PURE__ */ jsxs(p$1, {
11683
11780
  gap: "3",
@@ -11688,7 +11785,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11688
11785
  children: "Cancelar"
11689
11786
  }) }), /* @__PURE__ */ jsx(o, {
11690
11787
  onClick: () => {
11691
- B(_.id, uI), G(!1);
11788
+ B(_.id, dI), G(!1);
11692
11789
  },
11693
11790
  children: "Salvar"
11694
11791
  })]
@@ -11698,7 +11795,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11698
11795
  }),
11699
11796
  /* @__PURE__ */ jsx(s$4, {
11700
11797
  open: Z,
11701
- onOpenChange: KF,
11798
+ onOpenChange: qF,
11702
11799
  children: /* @__PURE__ */ jsxs(p$8, {
11703
11800
  style: { maxWidth: 450 },
11704
11801
  onPointerDown: stopProp,
@@ -11707,9 +11804,9 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11707
11804
  gap: "3",
11708
11805
  children: [
11709
11806
  /* @__PURE__ */ jsx(r$1, {
11710
- ref: gI,
11711
- value: fI,
11712
- onChange: (n) => pI(n.target.value),
11807
+ ref: _I,
11808
+ value: pI,
11809
+ onChange: (n) => mI(n.target.value),
11713
11810
  placeholder: "Digite o novo texto...",
11714
11811
  style: { height: 100 }
11715
11812
  }),
@@ -11727,7 +11824,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11727
11824
  color: "blue",
11728
11825
  variant: "surface",
11729
11826
  style: { cursor: "pointer" },
11730
- onClick: () => vI(n.dataName),
11827
+ onClick: () => yI(n.dataName),
11731
11828
  children: n.name
11732
11829
  }, n.dataName))
11733
11830
  })]
@@ -11741,7 +11838,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11741
11838
  children: "Cancelar"
11742
11839
  }) }), /* @__PURE__ */ jsx(o, {
11743
11840
  onClick: () => {
11744
- E(_.id, { content: fI }), KF(!1);
11841
+ E(_.id, { content: pI }), qF(!1);
11745
11842
  },
11746
11843
  children: "Salvar"
11747
11844
  })]
@@ -11751,8 +11848,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11751
11848
  })
11752
11849
  }),
11753
11850
  /* @__PURE__ */ jsx(s$4, {
11754
- open: qF,
11755
- onOpenChange: JF,
11851
+ open: JF,
11852
+ onOpenChange: YF,
11756
11853
  children: /* @__PURE__ */ jsxs(p$8, {
11757
11854
  style: { maxWidth: 450 },
11758
11855
  onPointerDown: stopProp,
@@ -11765,8 +11862,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11765
11862
  children: "Nome da propriedade (ex: titulo, preco, imagem):"
11766
11863
  }),
11767
11864
  /* @__PURE__ */ jsx(u$1, {
11768
- value: mI,
11769
- onChange: (n) => hI(n.target.value),
11865
+ value: hI,
11866
+ onChange: (n) => gI(n.target.value),
11770
11867
  placeholder: "propriedade"
11771
11868
  }),
11772
11869
  /* @__PURE__ */ jsxs(p$1, {
@@ -11778,8 +11875,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11778
11875
  children: "Cancelar"
11779
11876
  }) }), /* @__PURE__ */ jsx(o, {
11780
11877
  onClick: () => {
11781
- let n = mI, O = { dataBinding: n };
11782
- (_.type === "text" || _.type === "text-container") && (O.content = `{{${n}}}`), E(_.id, O), JF(!1);
11878
+ let n = hI, O = { dataBinding: n };
11879
+ (_.type === "text" || _.type === "text-container") && (O.content = `{{${n}}}`), E(_.id, O), YF(!1);
11783
11880
  },
11784
11881
  children: "Vincular"
11785
11882
  })]
@@ -11789,8 +11886,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11789
11886
  })
11790
11887
  }),
11791
11888
  /* @__PURE__ */ jsx(s$4, {
11792
- open: tI.open,
11793
- onOpenChange: (n) => nI((_) => ({
11889
+ open: nI.open,
11890
+ onOpenChange: (n) => rI((_) => ({
11794
11891
  ..._,
11795
11892
  open: n
11796
11893
  })),
@@ -11800,8 +11897,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11800
11897
  children: [
11801
11898
  /* @__PURE__ */ jsx(g$2, { children: "Selecionar Cor" }),
11802
11899
  /* @__PURE__ */ jsx(ColorPickerContent, {
11803
- color: tI.value,
11804
- onChange: (n) => nI((_) => ({
11900
+ color: nI.value,
11901
+ onChange: (n) => rI((_) => ({
11805
11902
  ..._,
11806
11903
  value: n
11807
11904
  }))
@@ -11815,7 +11912,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11815
11912
  color: "gray",
11816
11913
  children: "Cancelar"
11817
11914
  }) }), /* @__PURE__ */ jsx(o, {
11818
- onClick: DI,
11915
+ onClick: PI,
11819
11916
  children: "Aplicar"
11820
11917
  })]
11821
11918
  })
@@ -11824,13 +11921,13 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11824
11921
  }),
11825
11922
  /* @__PURE__ */ jsx(ElementAdvancedSettings, {
11826
11923
  elementId: _.id,
11827
- open: YF,
11828
- onOpenChange: XF,
11829
- initialTab: $F
11924
+ open: XF,
11925
+ onOpenChange: ZF,
11926
+ initialTab: eI
11830
11927
  }),
11831
11928
  /* @__PURE__ */ jsx(s$4, {
11832
- open: rI,
11833
- onOpenChange: sI,
11929
+ open: iI,
11930
+ onOpenChange: cI,
11834
11931
  children: /* @__PURE__ */ jsxs(p$8, {
11835
11932
  style: { maxWidth: 450 },
11836
11933
  onPointerDown: stopProp,
@@ -11838,8 +11935,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11838
11935
  direction: "column",
11839
11936
  gap: "3",
11840
11937
  children: [/* @__PURE__ */ jsx(u$1, {
11841
- value: cI,
11842
- onChange: (n) => lI(n.target.value),
11938
+ value: lI,
11939
+ onChange: (n) => uI(n.target.value),
11843
11940
  placeholder: "https://exemplo.com/imagem.png"
11844
11941
  }), /* @__PURE__ */ jsxs(p$1, {
11845
11942
  gap: "3",
@@ -11850,7 +11947,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11850
11947
  children: "Cancelar"
11851
11948
  }) }), /* @__PURE__ */ jsx(o, {
11852
11949
  onClick: () => {
11853
- E(_.id, { content: cI }), sI(!1);
11950
+ E(_.id, { content: lI }), cI(!1);
11854
11951
  },
11855
11952
  children: "Aplicar"
11856
11953
  })]
@@ -11860,7 +11957,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11860
11957
  }),
11861
11958
  /* @__PURE__ */ jsx("input", {
11862
11959
  type: "file",
11863
- ref: _I,
11960
+ ref: vI,
11864
11961
  style: { display: "none" },
11865
11962
  accept: "image/*",
11866
11963
  onChange: (n) => {
@@ -11948,7 +12045,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11948
12045
  className: "ContextMenuItem",
11949
12046
  onPointerDown: stopProp,
11950
12047
  onSelect: () => {
11951
- hI(_.dataBinding || ""), JF(!0);
12048
+ gI(_.dataBinding || ""), YF(!0);
11952
12049
  },
11953
12050
  children: "Outro / Manual..."
11954
12051
  }),
@@ -11966,7 +12063,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11966
12063
  className: "ContextMenuItem",
11967
12064
  onPointerDown: stopProp,
11968
12065
  onSelect: () => {
11969
- pI(_.content), KF(!0);
12066
+ mI(_.content), qF(!0);
11970
12067
  },
11971
12068
  children: "Editar Texto..."
11972
12069
  }), /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" })] }),
@@ -11974,7 +12071,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11974
12071
  className: "ContextMenuItem",
11975
12072
  onPointerDown: stopProp,
11976
12073
  onSelect: () => {
11977
- dI(_.name || (_.type === "group" ? "Grupo" : "Elemento")), G(!0);
12074
+ fI(_.name || (_.type === "group" ? "Grupo" : "Elemento")), G(!0);
11978
12075
  },
11979
12076
  children: "Renomear..."
11980
12077
  }),
@@ -11994,14 +12091,14 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
11994
12091
  /* @__PURE__ */ jsx(Item2$1, {
11995
12092
  className: "ContextMenuItem",
11996
12093
  onPointerDown: stopProp,
11997
- onSelect: () => XF(!0),
12094
+ onSelect: () => ZF(!0),
11998
12095
  children: "Configurações Avançadas..."
11999
12096
  }),
12000
12097
  /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
12001
12098
  /* @__PURE__ */ jsx(Item2$1, {
12002
12099
  className: "ContextMenuItem",
12003
12100
  onPointerDown: stopProp,
12004
- onSelect: SI,
12101
+ onSelect: CI,
12005
12102
  children: z.selectedElementIds.includes(_.id) && z.selectedElementIds.length > 1 ? `Duplicar Selecionados (${z.selectedElementIds.length})` : "Duplicar"
12006
12103
  }),
12007
12104
  /* @__PURE__ */ jsx(Item2$1, {
@@ -12028,13 +12125,13 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12028
12125
  children: [/* @__PURE__ */ jsx(Item2$1, {
12029
12126
  className: "ContextMenuItem",
12030
12127
  onPointerDown: stopProp,
12031
- onSelect: () => _I.current?.click(),
12128
+ onSelect: () => vI.current?.click(),
12032
12129
  children: "Carregar do Computador"
12033
12130
  }), /* @__PURE__ */ jsx(Item2$1, {
12034
12131
  className: "ContextMenuItem",
12035
12132
  onPointerDown: stopProp,
12036
12133
  onSelect: () => {
12037
- lI(typeof _.content == "string" ? _.content : ""), sI(!0);
12134
+ uI(typeof _.content == "string" ? _.content : ""), cI(!0);
12038
12135
  },
12039
12136
  children: "Inserir URL"
12040
12137
  })]
@@ -12054,19 +12151,19 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12054
12151
  /* @__PURE__ */ jsx(Item2$1, {
12055
12152
  className: "ContextMenuItem",
12056
12153
  onPointerDown: stopProp,
12057
- onSelect: () => yI({ objectFit: "cover" }),
12154
+ onSelect: () => bI({ objectFit: "cover" }),
12058
12155
  children: "Preencher (Cover)"
12059
12156
  }),
12060
12157
  /* @__PURE__ */ jsx(Item2$1, {
12061
12158
  className: "ContextMenuItem",
12062
12159
  onPointerDown: stopProp,
12063
- onSelect: () => yI({ objectFit: "contain" }),
12160
+ onSelect: () => bI({ objectFit: "contain" }),
12064
12161
  children: "Ajustar (Contain)"
12065
12162
  }),
12066
12163
  /* @__PURE__ */ jsx(Item2$1, {
12067
12164
  className: "ContextMenuItem",
12068
12165
  onPointerDown: stopProp,
12069
- onSelect: () => yI({ objectFit: "fill" }),
12166
+ onSelect: () => bI({ objectFit: "fill" }),
12070
12167
  children: "Esticar (Fill)"
12071
12168
  })
12072
12169
  ]
@@ -12087,12 +12184,12 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12087
12184
  children: [/* @__PURE__ */ jsx(Item2$1, {
12088
12185
  className: "ContextMenuItem",
12089
12186
  onPointerDown: stopProp,
12090
- onSelect: bI,
12187
+ onSelect: xI,
12091
12188
  children: "Trazer para frente"
12092
12189
  }), /* @__PURE__ */ jsx(Item2$1, {
12093
12190
  className: "ContextMenuItem",
12094
12191
  onPointerDown: stopProp,
12095
- onSelect: xI,
12192
+ onSelect: SI,
12096
12193
  children: "Enviar para trás"
12097
12194
  })]
12098
12195
  }) })] }),
@@ -12112,7 +12209,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12112
12209
  children: z.availableFonts && z.availableFonts.map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12113
12210
  className: "ContextMenuItem",
12114
12211
  onPointerDown: stopProp,
12115
- onSelect: () => yI({ fontFamily: n }),
12212
+ onSelect: () => bI({ fontFamily: n }),
12116
12213
  style: { fontFamily: n },
12117
12214
  children: [n, _.style?.fontFamily === n && /* @__PURE__ */ jsx("div", {
12118
12215
  className: "RightSlot",
@@ -12143,7 +12240,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12143
12240
  ].map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12144
12241
  className: "ContextMenuItem",
12145
12242
  onPointerDown: stopProp,
12146
- onSelect: () => yI({ fontSize: `${n}px` }),
12243
+ onSelect: () => bI({ fontSize: `${n}px` }),
12147
12244
  children: [n, "px"]
12148
12245
  }, n))
12149
12246
  }) })] }),
@@ -12159,10 +12256,10 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12159
12256
  sideOffset: 2,
12160
12257
  alignOffset: -5,
12161
12258
  children: [
12162
- CI.filter((n) => n !== "transparent").map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12259
+ wI.filter((n) => n !== "transparent").map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12163
12260
  className: "ContextMenuItem",
12164
12261
  onPointerDown: stopProp,
12165
- onSelect: () => yI({ color: n }),
12262
+ onSelect: () => bI({ color: n }),
12166
12263
  children: [/* @__PURE__ */ jsx("div", { style: {
12167
12264
  width: 12,
12168
12265
  height: 12,
@@ -12175,7 +12272,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12175
12272
  /* @__PURE__ */ jsx(Item2$1, {
12176
12273
  className: "ContextMenuItem",
12177
12274
  onPointerDown: stopProp,
12178
- onSelect: () => EI("color", _.style?.color || "#000000"),
12275
+ onSelect: () => NI("color", _.style?.color || "#000000"),
12179
12276
  children: "Outra Cor..."
12180
12277
  })
12181
12278
  ]
@@ -12194,12 +12291,12 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12194
12291
  children: [/* @__PURE__ */ jsx(Item2$1, {
12195
12292
  className: "ContextMenuItem",
12196
12293
  onPointerDown: stopProp,
12197
- onSelect: () => yI({ fontWeight: "normal" }),
12294
+ onSelect: () => bI({ fontWeight: "normal" }),
12198
12295
  children: "Normal"
12199
12296
  }), /* @__PURE__ */ jsx(Item2$1, {
12200
12297
  className: "ContextMenuItem",
12201
12298
  onPointerDown: stopProp,
12202
- onSelect: () => yI({ fontWeight: "bold" }),
12299
+ onSelect: () => bI({ fontWeight: "bold" }),
12203
12300
  children: "Negrito"
12204
12301
  })]
12205
12302
  }) })] }),
@@ -12218,19 +12315,19 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12218
12315
  /* @__PURE__ */ jsx(Item2$1, {
12219
12316
  className: "ContextMenuItem",
12220
12317
  onPointerDown: stopProp,
12221
- onSelect: () => yI({ textAlign: "left" }),
12318
+ onSelect: () => bI({ textAlign: "left" }),
12222
12319
  children: "Esquerda"
12223
12320
  }),
12224
12321
  /* @__PURE__ */ jsx(Item2$1, {
12225
12322
  className: "ContextMenuItem",
12226
12323
  onPointerDown: stopProp,
12227
- onSelect: () => yI({ textAlign: "center" }),
12324
+ onSelect: () => bI({ textAlign: "center" }),
12228
12325
  children: "Centro"
12229
12326
  }),
12230
12327
  /* @__PURE__ */ jsx(Item2$1, {
12231
12328
  className: "ContextMenuItem",
12232
12329
  onPointerDown: stopProp,
12233
- onSelect: () => yI({ textAlign: "right" }),
12330
+ onSelect: () => bI({ textAlign: "right" }),
12234
12331
  children: "Direita"
12235
12332
  })
12236
12333
  ]
@@ -12250,7 +12347,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12250
12347
  /* @__PURE__ */ jsx(Item2$1, {
12251
12348
  className: "ContextMenuItem",
12252
12349
  onPointerDown: stopProp,
12253
- onSelect: () => yI({
12350
+ onSelect: () => bI({
12254
12351
  display: "flex",
12255
12352
  flexDirection: "column",
12256
12353
  justifyContent: "flex-start"
@@ -12260,7 +12357,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12260
12357
  /* @__PURE__ */ jsx(Item2$1, {
12261
12358
  className: "ContextMenuItem",
12262
12359
  onPointerDown: stopProp,
12263
- onSelect: () => yI({
12360
+ onSelect: () => bI({
12264
12361
  display: "flex",
12265
12362
  flexDirection: "column",
12266
12363
  justifyContent: "center"
@@ -12270,7 +12367,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12270
12367
  /* @__PURE__ */ jsx(Item2$1, {
12271
12368
  className: "ContextMenuItem",
12272
12369
  onPointerDown: stopProp,
12273
- onSelect: () => yI({
12370
+ onSelect: () => bI({
12274
12371
  display: "flex",
12275
12372
  flexDirection: "column",
12276
12373
  justifyContent: "flex-end"
@@ -12292,10 +12389,10 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12292
12389
  sideOffset: 2,
12293
12390
  alignOffset: -5,
12294
12391
  children: [
12295
- CI.map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12392
+ wI.map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12296
12393
  className: "ContextMenuItem",
12297
12394
  onPointerDown: stopProp,
12298
- onSelect: () => yI({ backgroundColor: n }),
12395
+ onSelect: () => bI({ backgroundColor: n }),
12299
12396
  children: [/* @__PURE__ */ jsx("div", { style: {
12300
12397
  width: 12,
12301
12398
  height: 12,
@@ -12308,7 +12405,54 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12308
12405
  /* @__PURE__ */ jsx(Item2$1, {
12309
12406
  className: "ContextMenuItem",
12310
12407
  onPointerDown: stopProp,
12311
- onSelect: () => EI("backgroundColor", _.style?.backgroundColor || "transparent"),
12408
+ onSelect: () => NI("backgroundColor", _.style?.backgroundColor || "transparent"),
12409
+ children: "Outra Cor..."
12410
+ })
12411
+ ]
12412
+ }) })] }),
12413
+ /* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
12414
+ className: "ContextMenuSubTrigger",
12415
+ onPointerDown: stopProp,
12416
+ children: ["Sombra", /* @__PURE__ */ jsx("div", {
12417
+ className: "RightSlot",
12418
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
12419
+ })]
12420
+ }), /* @__PURE__ */ jsx(Portal2$1, { children: /* @__PURE__ */ jsxs(SubContent2$1, {
12421
+ className: "ContextMenuSubContent",
12422
+ sideOffset: 2,
12423
+ alignOffset: -5,
12424
+ children: [
12425
+ DI.map((n) => /* @__PURE__ */ jsx(Item2$1, {
12426
+ className: "ContextMenuItem",
12427
+ onPointerDown: stopProp,
12428
+ onSelect: () => RI(n.value),
12429
+ children: n.label
12430
+ }, n.label)),
12431
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
12432
+ OI.map((n) => /* @__PURE__ */ jsx(Item2$1, {
12433
+ className: "ContextMenuItem",
12434
+ onPointerDown: stopProp,
12435
+ onSelect: () => HI(n.x, n.y),
12436
+ children: n.label
12437
+ }, n.label)),
12438
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
12439
+ wI.filter((n) => n !== "transparent").map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12440
+ className: "ContextMenuItem",
12441
+ onPointerDown: stopProp,
12442
+ onSelect: () => BI(n),
12443
+ children: [/* @__PURE__ */ jsx("div", { style: {
12444
+ width: 12,
12445
+ height: 12,
12446
+ backgroundColor: n,
12447
+ marginRight: 8,
12448
+ border: "1px solid #ccc"
12449
+ } }), n]
12450
+ }, n)),
12451
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
12452
+ /* @__PURE__ */ jsx(Item2$1, {
12453
+ className: "ContextMenuItem",
12454
+ onPointerDown: stopProp,
12455
+ onSelect: () => NI("boxShadowColor", "#000000"),
12312
12456
  children: "Outra Cor..."
12313
12457
  })
12314
12458
  ]
@@ -12325,24 +12469,24 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12325
12469
  sideOffset: 2,
12326
12470
  alignOffset: -5,
12327
12471
  children: [
12328
- wI.map((n) => /* @__PURE__ */ jsx(Item2$1, {
12472
+ TI.map((n) => /* @__PURE__ */ jsx(Item2$1, {
12329
12473
  className: "ContextMenuItem",
12330
12474
  onPointerDown: stopProp,
12331
- onSelect: () => OI(n),
12475
+ onSelect: () => FI(n),
12332
12476
  children: n === 0 ? "Sem Borda" : `${n}px`
12333
12477
  }, n)),
12334
12478
  /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
12335
- TI.map((n) => /* @__PURE__ */ jsx(Item2$1, {
12479
+ EI.map((n) => /* @__PURE__ */ jsx(Item2$1, {
12336
12480
  className: "ContextMenuItem",
12337
12481
  onPointerDown: stopProp,
12338
- onSelect: () => kI(n),
12482
+ onSelect: () => II(n),
12339
12483
  children: n
12340
12484
  }, n)),
12341
12485
  /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
12342
- CI.map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12486
+ wI.map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12343
12487
  className: "ContextMenuItem",
12344
12488
  onPointerDown: stopProp,
12345
- onSelect: () => AI(n),
12489
+ onSelect: () => LI(n),
12346
12490
  children: [/* @__PURE__ */ jsx("div", { style: {
12347
12491
  width: 12,
12348
12492
  height: 12,
@@ -12355,7 +12499,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12355
12499
  /* @__PURE__ */ jsx(Item2$1, {
12356
12500
  className: "ContextMenuItem",
12357
12501
  onPointerDown: stopProp,
12358
- onSelect: () => EI("borderColor", _.style?.borderColor || "#000000"),
12502
+ onSelect: () => NI("borderColor", _.style?.borderColor || "#000000"),
12359
12503
  children: "Outra Cor..."
12360
12504
  })
12361
12505
  ]
@@ -12383,7 +12527,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12383
12527
  ].map((n) => /* @__PURE__ */ jsx(Item2$1, {
12384
12528
  className: "ContextMenuItem",
12385
12529
  onPointerDown: stopProp,
12386
- onSelect: () => yI({ borderRadius: typeof n == "number" ? `${n}px` : n }),
12530
+ onSelect: () => bI({ borderRadius: typeof n == "number" ? `${n}px` : n }),
12387
12531
  children: n === "50%" ? "Círculo" : `${n}px`
12388
12532
  }, n)),
12389
12533
  /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
@@ -12391,7 +12535,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12391
12535
  className: "ContextMenuItem",
12392
12536
  onPointerDown: stopProp,
12393
12537
  onSelect: () => {
12394
- eI("style"), XF(!0);
12538
+ tI("style"), ZF(!0);
12395
12539
  },
12396
12540
  children: "Personalizar..."
12397
12541
  })
@@ -12420,7 +12564,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12420
12564
  ].map((n) => /* @__PURE__ */ jsxs(Item2$1, {
12421
12565
  className: "ContextMenuItem",
12422
12566
  onPointerDown: stopProp,
12423
- onSelect: () => yI({ padding: `${n}px` }),
12567
+ onSelect: () => bI({ padding: `${n}px` }),
12424
12568
  children: [n, "px"]
12425
12569
  }, n)),
12426
12570
  /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
@@ -12428,7 +12572,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12428
12572
  className: "ContextMenuItem",
12429
12573
  onPointerDown: stopProp,
12430
12574
  onSelect: () => {
12431
- eI("style"), XF(!0);
12575
+ tI("style"), ZF(!0);
12432
12576
  },
12433
12577
  children: "Personalizar..."
12434
12578
  })
@@ -12438,55 +12582,64 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12438
12582
  }) })] })
12439
12583
  ] });
12440
12584
  }, DraggableElement = React.memo(({ element: n, isSelected: _ }) => {
12441
- let { selectElement: E, updateElement: O, updateElements: A, state: j, resizeGroup: M, setSnapLines: N } = useEditor(), [P, z] = useState(!1), [B, H] = useState(!1), [U, W] = useState(!1), Z = useRef(null), KF = useRef({
12585
+ let { selectElement: E, updateElement: O, updateElements: A, state: j, resizeGroup: M, setSnapLines: N } = useEditor(), [P, z] = useState(!1), [B, H] = useState(!1), [U, W] = useState(!1), Z = useRef(null), qF = useRef({
12442
12586
  x: 0,
12443
12587
  y: 0
12444
- }), qF = useRef({}), JF = useRef(!1), YF = useRef(!1), XF = useRef(0), $F = useRef(0), eI = useRef({
12588
+ }), JF = useRef({}), YF = useRef(!1), XF = useRef(!1), ZF = useRef(0), eI = useRef(0), tI = useRef({
12445
12589
  x: 0,
12446
12590
  y: 0
12447
- }), tI = useRef(!1), nI = j.canvasHeight || 150, rI = j.isList ? j.mockData.length > 0 ? j.mockData[0] : null : j.singleMockData, iI = n.content, sI = {};
12448
- if (rI) {
12449
- if (n.type === "text" || n.type === "text-container") iI = iI.replace(/\{\{(.*?)\}\}/g, (_, E) => {
12450
- let O = rI[E.trim()];
12591
+ }), nI = useRef(!1), rI = j.canvasHeight || 150, iI = j.isList ? j.mockData.length > 0 ? j.mockData[0] : null : j.singleMockData, aI = n.content, cI = {}, lI = (n, _) => {
12592
+ let E = /(rgba?\([^)]+\)|#(?:[0-9a-fA-F]{3,8})|[a-zA-Z]+)\s*$/;
12593
+ return !n || n === "none" ? `0 4px 12px 0 ${_}` : E.test(n) ? n.replace(E, _) : `${n} ${_}`;
12594
+ };
12595
+ if (iI) {
12596
+ if (n.type === "text" || n.type === "text-container") aI = aI.replace(/\{\{(.*?)\}\}/g, (_, E) => {
12597
+ let O = iI[E.trim()];
12451
12598
  return O == null ? _ : n.formatting ? formatValue$1(O, n.formatting) : String(O);
12452
12599
  });
12453
12600
  else if (n.type === "image") if (n.dataBinding) {
12454
- let _ = rI[n.dataBinding];
12455
- _ != null && (iI = String(_));
12456
- } else iI = iI.replace(/\{\{(.*?)\}\}/g, (n, _) => {
12457
- let E = rI[_.trim()];
12601
+ let _ = iI[n.dataBinding];
12602
+ _ != null && (aI = String(_));
12603
+ } else aI = aI.replace(/\{\{(.*?)\}\}/g, (n, _) => {
12604
+ let E = iI[_.trim()];
12458
12605
  return E == null ? n : String(E);
12459
12606
  });
12460
- n.styleBindings && Object.entries(n.styleBindings).forEach(([n, _]) => {
12461
- let E = rI[_];
12462
- E != null && (sI = {
12463
- ...sI,
12464
- [n]: String(E)
12465
- });
12607
+ n.styleBindings && Object.entries(n.styleBindings).forEach(([_, E]) => {
12608
+ let O = iI[E];
12609
+ if (O != null) if (_ === "boxShadowColor") {
12610
+ let _ = cI.boxShadow || n.style?.boxShadow;
12611
+ cI = {
12612
+ ...cI,
12613
+ boxShadow: lI(_, String(O))
12614
+ };
12615
+ } else cI = {
12616
+ ...cI,
12617
+ [_]: String(O)
12618
+ };
12466
12619
  }), n.conditions && n.conditions.forEach((n) => {
12467
- let _ = rI[n.property];
12468
- checkCondition$1(_, n.operator, n.value) && (sI = {
12469
- ...sI,
12620
+ let _ = iI[n.property];
12621
+ checkCondition$1(_, n.operator, n.value) && (cI = {
12622
+ ...cI,
12470
12623
  ...n.style
12471
12624
  });
12472
12625
  });
12473
12626
  }
12474
- let cI = sI.display === "none";
12475
- if (cI && _) {
12476
- let { display: n, ..._ } = sI;
12477
- sI = _;
12627
+ let uI = cI.display === "none";
12628
+ if (uI && _) {
12629
+ let { display: n, ..._ } = cI;
12630
+ cI = _;
12478
12631
  }
12479
- let lI = (_) => {
12480
- _.stopPropagation(), !JF.current && !YF.current && !P && (_.shiftKey ? E(n.id, !0) : E(n.id, !1));
12481
- }, uI = (O) => {
12632
+ let dI = (_) => {
12633
+ _.stopPropagation(), !YF.current && !XF.current && !P && (_.shiftKey ? E(n.id, !0) : E(n.id, !1));
12634
+ }, fI = (O) => {
12482
12635
  if (n.locked || O.button !== 0) return;
12483
12636
  O.stopPropagation();
12484
12637
  let A = O.shiftKey;
12485
- if (JF.current = !1, YF.current = !1, n.groupId && !_) {
12638
+ if (YF.current = !1, XF.current = !1, n.groupId && !_) {
12486
12639
  E(n.groupId, A);
12487
12640
  return;
12488
12641
  }
12489
- _ || (E(n.id, A), YF.current = !0), z(!0), KF.current = {
12642
+ _ || (E(n.id, A), XF.current = !0), z(!0), qF.current = {
12490
12643
  x: O.clientX,
12491
12644
  y: O.clientY
12492
12645
  }, O.currentTarget.setPointerCapture(O.pointerId);
@@ -12498,17 +12651,17 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12498
12651
  x: n.x,
12499
12652
  y: n.y
12500
12653
  });
12501
- }), qF.current = N;
12502
- }, dI = (_) => {
12654
+ }), JF.current = N;
12655
+ }, pI = (_) => {
12503
12656
  if (P) {
12504
- let E = j.zoom || 1, O = (_.clientX - KF.current.x) / E, M = (_.clientY - KF.current.y) / E;
12505
- (Math.abs(O) > 2 || Math.abs(M) > 2) && (JF.current = !0);
12506
- let P = 5 / E, z = [], B = Object.entries(qF.current).map(([_, E]) => {
12657
+ let E = j.zoom || 1, O = (_.clientX - qF.current.x) / E, M = (_.clientY - qF.current.y) / E;
12658
+ (Math.abs(O) > 2 || Math.abs(M) > 2) && (YF.current = !0);
12659
+ let P = 5 / E, z = [], B = Object.entries(JF.current).map(([_, E]) => {
12507
12660
  let A = E.x + O, N = E.y + M;
12508
12661
  if (j.gridSize > 0) A = Math.round(A / j.gridSize) * j.gridSize, N = Math.round(N / j.gridSize) * j.gridSize;
12509
12662
  else {
12510
12663
  let E = !1, O = !1, M = n.width ?? 100, B = n.height ?? 100;
12511
- Object.keys(qF.current).length === 1 && j.elements.forEach((n) => {
12664
+ Object.keys(JF.current).length === 1 && j.elements.forEach((n) => {
12512
12665
  if (n.id === _) return;
12513
12666
  let j = n.width ?? 100, H = n.height ?? 100;
12514
12667
  E || (Math.abs(A - n.x) < P ? (A = n.x, E = !0, z.push({
@@ -12541,7 +12694,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12541
12694
  if (A = Math.max(0, A), j.isList) {
12542
12695
  N = Math.max(0, N);
12543
12696
  let _ = n.height ?? 100;
12544
- nI > 0 && (N = Math.min(N, nI - _)), N = Math.max(0, N);
12697
+ rI > 0 && (N = Math.min(N, rI - _)), N = Math.max(0, N);
12545
12698
  }
12546
12699
  return {
12547
12700
  id: _,
@@ -12553,25 +12706,25 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12553
12706
  });
12554
12707
  N && N(z), A(B, !1);
12555
12708
  }
12556
- }, fI = (n) => {
12709
+ }, mI = (n) => {
12557
12710
  P && (z(!1), n.currentTarget.releasePointerCapture(n.pointerId), A([], !0), N && N([]));
12558
- }, pI = (_) => {
12711
+ }, hI = (_) => {
12559
12712
  _.stopPropagation(), _.preventDefault(), W(!0);
12560
12713
  let E = _.target.closest(".resizable-element");
12561
12714
  if (E) {
12562
12715
  let O = E.getBoundingClientRect();
12563
- eI.current = {
12716
+ tI.current = {
12564
12717
  x: O.left + O.width / 2,
12565
12718
  y: O.top + O.height / 2
12566
12719
  };
12567
- let A = _.clientX - eI.current.x, j = _.clientY - eI.current.y;
12568
- XF.current = Math.atan2(j, A) * (180 / Math.PI), $F.current = n.rotation || 0;
12720
+ let A = _.clientX - tI.current.x, j = _.clientY - tI.current.y;
12721
+ ZF.current = Math.atan2(j, A) * (180 / Math.PI), eI.current = n.rotation || 0;
12569
12722
  }
12570
12723
  };
12571
12724
  useEffect(() => {
12572
12725
  let _ = (_) => {
12573
12726
  if (U) {
12574
- let E = _.clientX - eI.current.x, A = _.clientY - eI.current.y, j = Math.atan2(A, E) * (180 / Math.PI) - XF.current, M = ($F.current + j) % 360;
12727
+ let E = _.clientX - tI.current.x, A = _.clientY - tI.current.y, j = Math.atan2(A, E) * (180 / Math.PI) - ZF.current, M = (eI.current + j) % 360;
12575
12728
  O(n.id, { rotation: M }, !1);
12576
12729
  }
12577
12730
  }, E = () => {
@@ -12593,7 +12746,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12593
12746
  }
12594
12747
  });
12595
12748
  }, [
12596
- iI,
12749
+ aI,
12597
12750
  n.autoGrow,
12598
12751
  n.containerExpansion,
12599
12752
  n.style,
@@ -12603,7 +12756,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12603
12756
  n.id,
12604
12757
  n.type
12605
12758
  ]);
12606
- let mI = {
12759
+ let gI = {
12607
12760
  position: "relative",
12608
12761
  left: 0,
12609
12762
  top: 0,
@@ -12621,7 +12774,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12621
12774
  userSelect: "none",
12622
12775
  boxSizing: "border-box",
12623
12776
  ...n.style,
12624
- ...sI
12777
+ ...cI
12625
12778
  };
12626
12779
  return /* @__PURE__ */ jsx(Resizable, {
12627
12780
  className: "resizable-element",
@@ -12629,9 +12782,9 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12629
12782
  width: n.width ?? 100,
12630
12783
  height: n.autoGrow ? "auto" : n.height ?? 100
12631
12784
  },
12632
- maxHeight: j.isList ? Math.max(10, nI - n.y) : void 0,
12785
+ maxHeight: j.isList ? Math.max(10, rI - n.y) : void 0,
12633
12786
  onResizeStart: (n) => {
12634
- H(!0), tI.current = !!n.shiftKey;
12787
+ H(!0), nI.current = !!n.shiftKey;
12635
12788
  },
12636
12789
  onResizeStop: (_, E, A, j) => {
12637
12790
  H(!1);
@@ -12766,8 +12919,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12766
12919
  position: "absolute",
12767
12920
  transform: `translate(${n.x ?? 0}px, ${n.y ?? 0}px) rotate(${n.rotation || 0}deg)`,
12768
12921
  height: n.autoGrow ? "auto" : void 0,
12769
- display: cI && !_ ? "none" : void 0,
12770
- opacity: cI && _ ? .4 : 1,
12922
+ display: uI && !_ ? "none" : void 0,
12923
+ opacity: uI && _ ? .4 : 1,
12771
12924
  zIndex: _ ? 1e3 : void 0,
12772
12925
  outline: "none",
12773
12926
  overflow: "visible"
@@ -12782,7 +12935,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12782
12935
  bottomLeft: !1,
12783
12936
  topLeft: !1
12784
12937
  } : void 0,
12785
- lockAspectRatio: tI.current,
12938
+ lockAspectRatio: nI.current,
12786
12939
  grid: j.gridSize > 0 ? [j.gridSize, j.gridSize] : void 0,
12787
12940
  children: /* @__PURE__ */ jsx(ElementContextMenu, {
12788
12941
  element: n,
@@ -12795,18 +12948,18 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12795
12948
  children: [/* @__PURE__ */ jsxs(p, {
12796
12949
  ref: Z,
12797
12950
  style: {
12798
- ...mI,
12799
- whiteSpace: n.type === "text-container" && n.autoGrow && n.containerExpansion === "horizontal" ? "nowrap" : mI.whiteSpace,
12951
+ ...gI,
12952
+ whiteSpace: n.type === "text-container" && n.autoGrow && n.containerExpansion === "horizontal" ? "nowrap" : gI.whiteSpace,
12800
12953
  width: n.type === "text-container" && n.autoGrow && n.containerExpansion === "horizontal" ? "max-content" : "100%",
12801
12954
  height: n.type === "text-container" && n.autoGrow && n.containerExpansion === "vertical" ? "auto" : "100%"
12802
12955
  },
12803
- onPointerDown: uI,
12804
- onPointerMove: dI,
12805
- onPointerUp: fI,
12956
+ onPointerDown: fI,
12957
+ onPointerMove: pI,
12958
+ onPointerUp: mI,
12806
12959
  onMouseDown: (n) => {
12807
12960
  n.button === 0 && n.stopPropagation();
12808
12961
  },
12809
- onClick: lI,
12962
+ onClick: dI,
12810
12963
  title: n.name,
12811
12964
  onMouseEnter: (n) => {
12812
12965
  _ || (n.currentTarget.style.borderColor = "var(--gray-6)");
@@ -12837,7 +12990,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12837
12990
  width: "100%",
12838
12991
  height: "100%"
12839
12992
  },
12840
- children: iI
12993
+ children: aI
12841
12994
  }),
12842
12995
  n.type === "text-container" && /* @__PURE__ */ jsx(p$2, {
12843
12996
  style: {
@@ -12845,10 +12998,10 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12845
12998
  height: "100%",
12846
12999
  display: "block"
12847
13000
  },
12848
- children: iI
13001
+ children: aI
12849
13002
  }),
12850
- n.type === "image" && (iI ? /* @__PURE__ */ jsx("img", {
12851
- src: iI,
13003
+ n.type === "image" && (aI ? /* @__PURE__ */ jsx("img", {
13004
+ src: aI,
12852
13005
  alt: "Element",
12853
13006
  style: {
12854
13007
  width: "100%",
@@ -12914,7 +13067,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12914
13067
  zIndex: 50,
12915
13068
  boxShadow: "0 0 0 2px white"
12916
13069
  },
12917
- onMouseDown: pI,
13070
+ onMouseDown: hI,
12918
13071
  onPointerDown: (n) => n.stopPropagation(),
12919
13072
  children: /* @__PURE__ */ jsx(p, { style: {
12920
13073
  position: "absolute",
@@ -12944,74 +13097,74 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
12944
13097
  borderTop: n.orientation === "horizontal" ? "1px dashed #ff0000" : "none"
12945
13098
  } }, _)) });
12946
13099
  }, Canvas = () => {
12947
- let { state: n, selectElement: _, setSelectedElements: E, addElement: O, setZoom: A, setPan: j, undo: M, redo: N, copy: P, paste: z, removeSelected: B, updateElements: H } = useEditor(), W = useRef(null), [Z, KF] = useState(null), qF = useRef(!1), JF = useRef(!1), YF = useRef(!1), XF = useRef({
13100
+ let { state: n, selectElement: _, setSelectedElements: E, addElement: O, setZoom: A, setPan: j, undo: M, redo: N, copy: P, paste: z, removeSelected: B, updateElements: H } = useEditor(), W = useRef(null), [Z, qF] = useState(null), JF = useRef(!1), YF = useRef(!1), XF = useRef(!1), ZF = useRef({
12948
13101
  x: 0,
12949
13102
  y: 0
12950
- }), $F = useRef({
13103
+ }), eI = useRef({
12951
13104
  x: 0,
12952
13105
  y: 0
12953
- }), eI = useRef([]), tI = useRef([]), nI = useRef(n), rI = useRef(0);
13106
+ }), tI = useRef([]), nI = useRef([]), rI = useRef(n), iI = useRef(0);
12954
13107
  useEffect(() => {
12955
- nI.current = n;
13108
+ rI.current = n;
12956
13109
  }, [n]);
12957
- let iI = useCallback((n) => {
13110
+ let aI = useCallback((n) => {
12958
13111
  if (!W.current) return;
12959
- let _ = nI.current;
12960
- if (JF.current) {
12961
- let E = n.clientX - $F.current.x, O = n.clientY - $F.current.y;
13112
+ let _ = rI.current;
13113
+ if (YF.current) {
13114
+ let E = n.clientX - eI.current.x, O = n.clientY - eI.current.y;
12962
13115
  j({
12963
13116
  x: _.pan.x + E,
12964
13117
  y: _.pan.y + O
12965
- }), $F.current = {
13118
+ }), eI.current = {
12966
13119
  x: n.clientX,
12967
13120
  y: n.clientY
12968
13121
  };
12969
13122
  return;
12970
13123
  }
12971
- if (!qF.current) return;
12972
- let O = W.current.getBoundingClientRect(), A = (n.clientX - O.left - _.pan.x) / _.zoom, M = (n.clientY - O.top - _.pan.y) / _.zoom, N = Math.min(XF.current.x, A), P = Math.min(XF.current.y, M), z = Math.abs(A - XF.current.x), B = Math.abs(M - XF.current.y);
12973
- KF({
13124
+ if (!JF.current) return;
13125
+ let O = W.current.getBoundingClientRect(), A = (n.clientX - O.left - _.pan.x) / _.zoom, M = (n.clientY - O.top - _.pan.y) / _.zoom, N = Math.min(ZF.current.x, A), P = Math.min(ZF.current.y, M), z = Math.abs(A - ZF.current.x), B = Math.abs(M - ZF.current.y);
13126
+ qF({
12974
13127
  x: N,
12975
13128
  y: P,
12976
13129
  width: z,
12977
13130
  height: B
12978
13131
  });
12979
13132
  let H = Date.now();
12980
- if (!(H - rI.current < 50) && (z > 0 || B > 0)) {
13133
+ if (!(H - iI.current < 50) && (z > 0 || B > 0)) {
12981
13134
  let n = [];
12982
13135
  _.elements.forEach((_) => {
12983
13136
  let E = _.x ?? 0, O = _.y ?? 0, A = _.width ?? 100, j = _.height ?? 100, M = E + A, H = O + j, U = N + z, W = P + B;
12984
13137
  E < U && M > N && O < W && H > P && n.push(_.id);
12985
13138
  });
12986
- let O = Array.from(new Set([...eI.current, ...n])), A = tI.current;
12987
- A.length === O.length && A.every((n) => O.includes(n)) || (E(O), tI.current = O, rI.current = H);
13139
+ let O = Array.from(new Set([...tI.current, ...n])), A = nI.current;
13140
+ A.length === O.length && A.every((n) => O.includes(n)) || (E(O), nI.current = O, iI.current = H);
12988
13141
  }
12989
- }, [E, j]), sI = useCallback((n) => {
12990
- (qF.current || JF.current) && n.target.releasePointerCapture(n.pointerId), qF.current = !1, JF.current = !1, KF(null);
12991
- }, []), cI = (E) => {
13142
+ }, [E, j]), cI = useCallback((n) => {
13143
+ (JF.current || YF.current) && n.target.releasePointerCapture(n.pointerId), JF.current = !1, YF.current = !1, qF(null);
13144
+ }, []), lI = (E) => {
12992
13145
  if (E.button === 2) return;
12993
13146
  let O = E.target;
12994
13147
  if (O.closest(".resize-handle") || O.closest(".rotate-handle")) return;
12995
- if (E.currentTarget.setPointerCapture(E.pointerId), E.button === 1 || E.button === 0 && YF.current) {
12996
- E.preventDefault(), JF.current = !0, $F.current = {
13148
+ if (E.currentTarget.setPointerCapture(E.pointerId), E.button === 1 || E.button === 0 && XF.current) {
13149
+ E.preventDefault(), YF.current = !0, eI.current = {
12997
13150
  x: E.clientX,
12998
13151
  y: E.clientY
12999
13152
  };
13000
13153
  return;
13001
13154
  }
13002
- qF.current = E.shiftKey;
13155
+ JF.current = E.shiftKey;
13003
13156
  let A = W.current?.getBoundingClientRect();
13004
13157
  if (!A) return;
13005
13158
  let j = A.left, M = A.top;
13006
- XF.current = {
13159
+ ZF.current = {
13007
13160
  x: (E.clientX - j - n.pan.x) / n.zoom,
13008
13161
  y: (E.clientY - M - n.pan.y) / n.zoom
13009
- }, eI.current = n.selectedElementIds, tI.current = n.selectedElementIds, E.shiftKey || (_(null), eI.current = [], tI.current = []);
13162
+ }, tI.current = n.selectedElementIds, nI.current = n.selectedElementIds, E.shiftKey || (_(null), tI.current = [], nI.current = []);
13010
13163
  };
13011
13164
  useEffect(() => {
13012
13165
  let n = (n) => {
13013
13166
  n.preventDefault();
13014
- let _ = nI.current;
13167
+ let _ = rI.current;
13015
13168
  if (n.ctrlKey || n.metaKey) A(Math.min(Math.max(.1, _.zoom - n.deltaY * .001), 5));
13016
13169
  else {
13017
13170
  let E = n.shiftKey ? n.deltaY : n.deltaX, O = n.shiftKey ? n.deltaX : n.deltaY;
@@ -13026,7 +13179,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13026
13179
  };
13027
13180
  }, [A, j]), useEffect(() => {
13028
13181
  let _ = (_) => {
13029
- if (_.code === "Space" && !_.repeat && !(_.target instanceof HTMLInputElement || _.target instanceof HTMLTextAreaElement) && (YF.current = !0, W.current && (W.current.style.cursor = "grab")), !(_.target instanceof HTMLInputElement || _.target instanceof HTMLTextAreaElement) && ((_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "z" && (_.preventDefault(), _.shiftKey ? N() : M()), (_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "y" && (_.preventDefault(), N()), (_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "c" && (_.preventDefault(), P()), (_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "v" && (_.preventDefault(), z()), (_.key === "Delete" || _.key === "Backspace") && (_.preventDefault(), B()), [
13182
+ if (_.code === "Space" && !_.repeat && !(_.target instanceof HTMLInputElement || _.target instanceof HTMLTextAreaElement) && (XF.current = !0, W.current && (W.current.style.cursor = "grab")), !(_.target instanceof HTMLInputElement || _.target instanceof HTMLTextAreaElement) && ((_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "z" && (_.preventDefault(), _.shiftKey ? N() : M()), (_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "y" && (_.preventDefault(), N()), (_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "c" && (_.preventDefault(), P()), (_.ctrlKey || _.metaKey) && _.key.toLowerCase() === "v" && (_.preventDefault(), z()), (_.key === "Delete" || _.key === "Backspace") && (_.preventDefault(), B()), [
13030
13183
  "ArrowUp",
13031
13184
  "ArrowDown",
13032
13185
  "ArrowLeft",
@@ -13054,7 +13207,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13054
13207
  }), O.length > 0 && H(O);
13055
13208
  }
13056
13209
  }, E = (n) => {
13057
- n.code === "Space" && (YF.current = !1, W.current && !JF.current && (W.current.style.cursor = "default"));
13210
+ n.code === "Space" && (XF.current = !1, W.current && !YF.current && (W.current.style.cursor = "default"));
13058
13211
  };
13059
13212
  return window.addEventListener("keydown", _), window.addEventListener("keyup", E), () => {
13060
13213
  window.removeEventListener("keydown", _), window.removeEventListener("keyup", E);
@@ -13069,21 +13222,21 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13069
13222
  n.selectedElementIds,
13070
13223
  n.elements
13071
13224
  ]);
13072
- let lI = useRef(!1), { setCanvasHeight: uI } = useEditor(), dI = (n) => {
13073
- n.stopPropagation(), n.preventDefault(), lI.current = !0, window.addEventListener("mousemove", fI), window.addEventListener("mouseup", pI);
13074
- }, fI = useCallback((n) => {
13075
- if (!lI.current || !W.current) return;
13225
+ let uI = useRef(!1), { setCanvasHeight: dI } = useEditor(), fI = (n) => {
13226
+ n.stopPropagation(), n.preventDefault(), uI.current = !0, window.addEventListener("mousemove", pI), window.addEventListener("mouseup", mI);
13227
+ }, pI = useCallback((n) => {
13228
+ if (!uI.current || !W.current) return;
13076
13229
  let _ = W.current.getBoundingClientRect(), E = n.clientY - _.top, O = Math.max(50, Math.min(E, 2e3));
13077
- uI(Math.round(O));
13078
- }, [uI]), pI = useCallback(() => {
13079
- lI.current = !1, window.removeEventListener("mousemove", fI), window.removeEventListener("mouseup", pI);
13080
- }, [fI]);
13230
+ dI(Math.round(O));
13231
+ }, [dI]), mI = useCallback(() => {
13232
+ uI.current = !1, window.removeEventListener("mousemove", pI), window.removeEventListener("mouseup", mI);
13233
+ }, [pI]);
13081
13234
  useEffect(() => () => {
13082
- window.removeEventListener("mousemove", fI), window.removeEventListener("mouseup", pI);
13083
- }, [fI, pI]);
13084
- let mI = (n) => {
13235
+ window.removeEventListener("mousemove", pI), window.removeEventListener("mouseup", mI);
13236
+ }, [pI, mI]);
13237
+ let hI = (n) => {
13085
13238
  n.preventDefault(), n.dataTransfer.dropEffect = "copy";
13086
- }, hI = (_) => {
13239
+ }, gI = (_) => {
13087
13240
  _.preventDefault();
13088
13241
  let E = _.currentTarget.getBoundingClientRect(), A = (_.clientX - E.left - n.pan.x) / n.zoom, j = (_.clientY - E.top - n.pan.y) / n.zoom, M = _.dataTransfer.getData("application/x-editor-prop");
13089
13242
  if (M) {
@@ -13113,25 +13266,25 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13113
13266
  } catch (n) {
13114
13267
  console.error("Failed to parse asset", n);
13115
13268
  }
13116
- }, gI = n.canvasHeight || 150;
13269
+ }, _I = n.canvasHeight || 150;
13117
13270
  return /* @__PURE__ */ jsxs(p, {
13118
13271
  ref: W,
13119
- onPointerDown: cI,
13272
+ onPointerDown: lI,
13120
13273
  onPointerMove: (n) => {
13121
- (qF.current || JF.current) && iI(n.nativeEvent);
13274
+ (JF.current || YF.current) && aI(n.nativeEvent);
13122
13275
  },
13123
13276
  onPointerUp: (n) => {
13124
- (qF.current || JF.current) && sI(n.nativeEvent);
13277
+ (JF.current || YF.current) && cI(n.nativeEvent);
13125
13278
  },
13126
- onDragOver: mI,
13127
- onDrop: hI,
13279
+ onDragOver: hI,
13280
+ onDrop: gI,
13128
13281
  style: {
13129
13282
  width: "100%",
13130
13283
  height: "100%",
13131
13284
  position: "relative",
13132
13285
  overflow: "hidden",
13133
13286
  backgroundColor: "var(--gray-1)",
13134
- cursor: JF.current ? "grabbing" : "default",
13287
+ cursor: YF.current ? "grabbing" : "default",
13135
13288
  backgroundImage: "radial-gradient(var(--gray-5) 1px, transparent 1px)",
13136
13289
  backgroundSize: `${20 * n.zoom}px ${20 * n.zoom}px`,
13137
13290
  backgroundPosition: `${n.pan.x}px ${n.pan.y}px`
@@ -13195,7 +13348,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13195
13348
  n.isList && /* @__PURE__ */ jsxs("div", {
13196
13349
  style: {
13197
13350
  position: "absolute",
13198
- top: gI,
13351
+ top: _I,
13199
13352
  left: 0,
13200
13353
  right: 0,
13201
13354
  height: "10px",
@@ -13206,7 +13359,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13206
13359
  alignItems: "center",
13207
13360
  justifyContent: "center"
13208
13361
  },
13209
- onMouseDown: dI,
13362
+ onMouseDown: fI,
13210
13363
  children: [/* @__PURE__ */ jsx("div", { style: {
13211
13364
  width: "100%",
13212
13365
  height: "2px",
@@ -13230,7 +13383,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13230
13383
  },
13231
13384
  children: [
13232
13385
  "Altura do Item: ",
13233
- gI,
13386
+ _I,
13234
13387
  "px"
13235
13388
  ]
13236
13389
  })]
@@ -13290,22 +13443,22 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13290
13443
  ]
13291
13444
  });
13292
13445
  }, EditorSettings = () => {
13293
- let { state: n, updateListSettings: _, setCanvasHeight: E, setGridSize: O } = useEditor(), [A, j] = useState(!1), [M, N] = useState(""), [P, z] = useState("asc"), [B, H] = useState("bottom"), [U, W] = useState("down"), [Z, KF] = useState("150"), [qF, JF] = useState(""), [YF, XF] = useState("0"), [ZF, $F] = useState("slideIn"), [eI, tI] = useState(.3), [nI, rI] = useState("ease-out");
13446
+ let { state: n, updateListSettings: _, setCanvasHeight: E, setGridSize: O } = useEditor(), [A, j] = useState(!1), [M, N] = useState(""), [P, z] = useState("asc"), [B, H] = useState("bottom"), [U, W] = useState("down"), [Z, qF] = useState("150"), [JF, YF] = useState(""), [XF, ZF] = useState("0"), [QF, eI] = useState("slideIn"), [tI, nI] = useState(.3), [rI, iI] = useState("ease-out");
13294
13447
  return useEffect(() => {
13295
13448
  if (A) {
13296
- N(n.listSettings.sortProp || "__none__"), z(n.listSettings.sortOrder || "asc"), H(n.listSettings.newestPosition || "bottom"), W(n.listSettings.scrollDirection || "down"), JF(n.listSettings.containerHeight ? String(n.listSettings.containerHeight) : ""), KF(String(n.canvasHeight || 150)), XF(String(n.gridSize || 0));
13449
+ N(n.listSettings.sortProp || "__none__"), z(n.listSettings.sortOrder || "asc"), H(n.listSettings.newestPosition || "bottom"), W(n.listSettings.scrollDirection || "down"), YF(n.listSettings.containerHeight ? String(n.listSettings.containerHeight) : ""), qF(String(n.canvasHeight || 150)), ZF(String(n.gridSize || 0));
13297
13450
  let _ = n.listSettings.entryAnimation;
13298
- $F(_?.type || "slideIn"), tI(_?.duration || .3), rI(_?.timingFunction || "ease-out");
13451
+ eI(_?.type || "slideIn"), nI(_?.duration || .3), iI(_?.timingFunction || "ease-out");
13299
13452
  }
13300
13453
  }, [A]), useEffect(() => {
13301
13454
  if (!A) return;
13302
13455
  let _ = parseInt(Z, 10);
13303
13456
  !isNaN(_) && _ > 0 && n.canvasHeight !== _ && E(_);
13304
- let j = parseInt(YF, 10);
13457
+ let j = parseInt(XF, 10);
13305
13458
  !isNaN(j) && j >= 0 && n.gridSize !== j && O(j);
13306
13459
  }, [
13307
13460
  Z,
13308
- YF,
13461
+ XF,
13309
13462
  A,
13310
13463
  E,
13311
13464
  O,
@@ -13484,7 +13637,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13484
13637
  type: "number",
13485
13638
  min: "10",
13486
13639
  value: Z,
13487
- onChange: (n) => KF(n.target.value)
13640
+ onChange: (n) => qF(n.target.value)
13488
13641
  }),
13489
13642
  /* @__PURE__ */ jsx(p$2, {
13490
13643
  size: "1",
@@ -13505,8 +13658,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13505
13658
  type: "number",
13506
13659
  min: "0",
13507
13660
  placeholder: "Auto (100%)",
13508
- value: qF,
13509
- onChange: (n) => JF(n.target.value)
13661
+ value: JF,
13662
+ onChange: (n) => YF(n.target.value)
13510
13663
  }),
13511
13664
  /* @__PURE__ */ jsx(p$2, {
13512
13665
  size: "1",
@@ -13532,8 +13685,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13532
13685
  as: "div",
13533
13686
  children: "Efeito"
13534
13687
  }), /* @__PURE__ */ jsxs("select", {
13535
- value: ZF,
13536
- onChange: (n) => $F(n.target.value),
13688
+ value: QF,
13689
+ onChange: (n) => eI(n.target.value),
13537
13690
  style: {
13538
13691
  width: "100%",
13539
13692
  padding: "6px",
@@ -13595,8 +13748,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13595
13748
  type: "number",
13596
13749
  step: "0.1",
13597
13750
  min: "0.1",
13598
- value: eI,
13599
- onChange: (n) => tI(parseFloat(n.target.value) || .3)
13751
+ value: tI,
13752
+ onChange: (n) => nI(parseFloat(n.target.value) || .3)
13600
13753
  })] }),
13601
13754
  /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
13602
13755
  size: "1",
@@ -13604,8 +13757,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13604
13757
  as: "div",
13605
13758
  children: "Curva (Easing)"
13606
13759
  }), /* @__PURE__ */ jsxs("select", {
13607
- value: nI,
13608
- onChange: (n) => rI(n.target.value),
13760
+ value: rI,
13761
+ onChange: (n) => iI(n.target.value),
13609
13762
  style: {
13610
13763
  width: "100%",
13611
13764
  padding: "6px",
@@ -13660,8 +13813,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13660
13813
  children: "Tamanho do Grid (px) - 0 para desativar"
13661
13814
  }), /* @__PURE__ */ jsx(u$1, {
13662
13815
  type: "number",
13663
- value: YF,
13664
- onChange: (n) => XF(n.target.value),
13816
+ value: XF,
13817
+ onChange: (n) => ZF(n.target.value),
13665
13818
  placeholder: "0"
13666
13819
  })]
13667
13820
  })
@@ -13680,11 +13833,11 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
13680
13833
  children: "Cancelar"
13681
13834
  }) }), /* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o, {
13682
13835
  onClick: () => {
13683
- let n = parseInt(qF, 10), E = {
13684
- type: ZF,
13685
- duration: Number(eI),
13836
+ let n = parseInt(JF, 10), E = {
13837
+ type: QF,
13838
+ duration: Number(tI),
13686
13839
  delay: 0,
13687
- timingFunction: nI
13840
+ timingFunction: rI
13688
13841
  };
13689
13842
  _({
13690
13843
  sortProp: M === "__none__" ? "" : M,
@@ -14463,7 +14616,7 @@ var defaultKeyboardCodes = {
14463
14616
  let A = n.code, { isTop: j, isRight: N, isLeft: P, isBottom: z, maxScroll: H, minScroll: U } = getScrollPosition(E), W = getScrollElementRect(E), G = {
14464
14617
  x: Math.min(A === KeyboardCode.Right ? W.right - W.width / 2 : W.right, Math.max(A === KeyboardCode.Right ? W.left : W.left + W.width / 2, B.x)),
14465
14618
  y: Math.min(A === KeyboardCode.Down ? W.bottom - W.height / 2 : W.bottom, Math.max(A === KeyboardCode.Down ? W.top : W.top + W.height / 2, B.y))
14466
- }, Z = A === KeyboardCode.Right && !N || A === KeyboardCode.Left && !P, KF = A === KeyboardCode.Down && !z || A === KeyboardCode.Up && !j;
14619
+ }, Z = A === KeyboardCode.Right && !N || A === KeyboardCode.Left && !P, qF = A === KeyboardCode.Down && !z || A === KeyboardCode.Up && !j;
14467
14620
  if (Z && G.x !== B.x) {
14468
14621
  let n = E.scrollLeft + _.x, j = A === KeyboardCode.Right && n <= H.x || A === KeyboardCode.Left && n >= U.x;
14469
14622
  if (j && !_.y) {
@@ -14478,7 +14631,7 @@ var defaultKeyboardCodes = {
14478
14631
  behavior: M
14479
14632
  });
14480
14633
  break;
14481
- } else if (KF && G.y !== B.y) {
14634
+ } else if (qF && G.y !== B.y) {
14482
14635
  let n = E.scrollTop + _.y, j = A === KeyboardCode.Down && n <= H.y || A === KeyboardCode.Up && n >= U.y;
14483
14636
  if (j && !_.x) {
14484
14637
  E.scrollTo({
@@ -14670,13 +14823,13 @@ function useAutoScroller(n) {
14670
14823
  let { acceleration: _, activator: E = AutoScrollActivator.Pointer, canScroll: O, draggingRect: A, enabled: j, interval: M = 5, order: N = TraversalOrder.TreeOrder, pointerCoordinates: P, scrollableAncestors: z, scrollableAncestorRects: B, delta: H, threshold: W } = n, Z = useScrollIntent({
14671
14824
  delta: H,
14672
14825
  disabled: !j
14673
- }), [KF, qF] = useInterval(), JF = useRef({
14826
+ }), [qF, JF] = useInterval(), YF = useRef({
14674
14827
  x: 0,
14675
14828
  y: 0
14676
- }), XF = useRef({
14829
+ }), ZF = useRef({
14677
14830
  x: 0,
14678
14831
  y: 0
14679
- }), QF = useMemo(() => {
14832
+ }), $F = useMemo(() => {
14680
14833
  switch (E) {
14681
14834
  case AutoScrollActivator.Pointer: return P ? {
14682
14835
  top: P.y,
@@ -14690,47 +14843,47 @@ function useAutoScroller(n) {
14690
14843
  E,
14691
14844
  A,
14692
14845
  P
14693
- ]), $F = useRef(null), eI = useCallback(() => {
14694
- let n = $F.current;
14846
+ ]), eI = useRef(null), tI = useCallback(() => {
14847
+ let n = eI.current;
14695
14848
  if (!n) return;
14696
- let _ = JF.current.x * XF.current.x, E = JF.current.y * XF.current.y;
14849
+ let _ = YF.current.x * ZF.current.x, E = YF.current.y * ZF.current.y;
14697
14850
  n.scrollBy(_, E);
14698
- }, []), tI = useMemo(() => N === TraversalOrder.TreeOrder ? [...z].reverse() : z, [N, z]);
14851
+ }, []), nI = useMemo(() => N === TraversalOrder.TreeOrder ? [...z].reverse() : z, [N, z]);
14699
14852
  useEffect(() => {
14700
- if (!j || !z.length || !QF) {
14701
- qF();
14853
+ if (!j || !z.length || !$F) {
14854
+ JF();
14702
14855
  return;
14703
14856
  }
14704
- for (let n of tI) {
14857
+ for (let n of nI) {
14705
14858
  if (O?.(n) === !1) continue;
14706
14859
  let E = B[z.indexOf(n)];
14707
14860
  if (!E) continue;
14708
- let { direction: A, speed: j } = getScrollDirectionAndSpeed(n, E, QF, _, W);
14861
+ let { direction: A, speed: j } = getScrollDirectionAndSpeed(n, E, $F, _, W);
14709
14862
  for (let n of ["x", "y"]) Z[n][A[n]] || (j[n] = 0, A[n] = 0);
14710
14863
  if (j.x > 0 || j.y > 0) {
14711
- qF(), $F.current = n, KF(eI, M), JF.current = j, XF.current = A;
14864
+ JF(), eI.current = n, qF(tI, M), YF.current = j, ZF.current = A;
14712
14865
  return;
14713
14866
  }
14714
14867
  }
14715
- JF.current = {
14868
+ YF.current = {
14716
14869
  x: 0,
14717
14870
  y: 0
14718
- }, XF.current = {
14871
+ }, ZF.current = {
14719
14872
  x: 0,
14720
14873
  y: 0
14721
- }, qF();
14874
+ }, JF();
14722
14875
  }, [
14723
14876
  _,
14724
- eI,
14877
+ tI,
14725
14878
  O,
14726
- qF,
14879
+ JF,
14727
14880
  j,
14728
14881
  M,
14729
- JSON.stringify(QF),
14882
+ JSON.stringify($F),
14730
14883
  JSON.stringify(Z),
14731
- KF,
14884
+ qF,
14732
14885
  z,
14733
- tI,
14886
+ nI,
14734
14887
  B,
14735
14888
  JSON.stringify(W)
14736
14889
  ]);
@@ -14792,9 +14945,9 @@ var MeasuringFrequency;
14792
14945
  })(MeasuringFrequency ||= {});
14793
14946
  var defaultValue = /* @__PURE__ */ new Map();
14794
14947
  function useDroppableMeasuring(n, _) {
14795
- let { dragging: E, dependencies: O, config: A } = _, [j, M] = useState(null), { frequency: N, measure: P, strategy: z } = A, B = useRef(n), H = JF(), W = useLatestValue(H), Z = useCallback(function(n) {
14948
+ let { dragging: E, dependencies: O, config: A } = _, [j, M] = useState(null), { frequency: N, measure: P, strategy: z } = A, B = useRef(n), H = YF(), W = useLatestValue(H), Z = useCallback(function(n) {
14796
14949
  n === void 0 && (n = []), !W.current && M((_) => _ === null ? n : _.concat(n.filter((n) => !_.includes(n))));
14797
- }, [W]), KF = useRef(null), qF = useLazyMemo((_) => {
14950
+ }, [W]), qF = useRef(null), JF = useLazyMemo((_) => {
14798
14951
  if (H && !E) return defaultValue;
14799
14952
  if (!_ || _ === defaultValue || B.current !== n || j != null) {
14800
14953
  let _ = /* @__PURE__ */ new Map();
@@ -14824,8 +14977,8 @@ function useDroppableMeasuring(n, _) {
14824
14977
  }, [E, H]), useEffect(() => {
14825
14978
  j && j.length > 0 && M(null);
14826
14979
  }, [JSON.stringify(j)]), useEffect(() => {
14827
- H || typeof N != "number" || KF.current !== null || (KF.current = setTimeout(() => {
14828
- Z(), KF.current = null;
14980
+ H || typeof N != "number" || qF.current !== null || (qF.current = setTimeout(() => {
14981
+ Z(), qF.current = null;
14829
14982
  }, N));
14830
14983
  }, [
14831
14984
  N,
@@ -14833,11 +14986,11 @@ function useDroppableMeasuring(n, _) {
14833
14986
  Z,
14834
14987
  ...O
14835
14988
  ]), {
14836
- droppableRects: qF,
14989
+ droppableRects: JF,
14837
14990
  measureDroppableContainers: Z,
14838
14991
  measuringScheduled: j != null
14839
14992
  };
14840
- function JF() {
14993
+ function YF() {
14841
14994
  switch (z) {
14842
14995
  case MeasuringStrategy.Always: return !1;
14843
14996
  case MeasuringStrategy.BeforeDragging: return E;
@@ -15262,84 +15415,84 @@ var ActiveDraggableContext = /* @__PURE__ */ createContext({
15262
15415
  n[n.Uninitialized = 0] = "Uninitialized", n[n.Initializing = 1] = "Initializing", n[n.Initialized = 2] = "Initialized";
15263
15416
  })(Status ||= {});
15264
15417
  var DndContext = /* @__PURE__ */ memo(function(n) {
15265
- let { id: E, accessibility: O, autoScroll: A = !0, children: j, sensors: M = defaultSensors, collisionDetection: N = rectIntersection, measuring: P, modifiers: z, ...B } = n, [H, W] = useReducer(reducer, void 0, getInitialState), [Z, KF] = useDndMonitorProvider(), [qF, JF] = useState(Status.Uninitialized), $F = qF === Status.Initialized, { draggable: { active: eI, nodes: tI, translate: nI }, droppable: { containers: iI } } = H, aI = eI == null ? null : tI.get(eI), oI = useRef({
15418
+ let { id: E, accessibility: O, autoScroll: A = !0, children: j, sensors: M = defaultSensors, collisionDetection: N = rectIntersection, measuring: P, modifiers: z, ...B } = n, [H, W] = useReducer(reducer, void 0, getInitialState), [Z, qF] = useDndMonitorProvider(), [JF, YF] = useState(Status.Uninitialized), eI = JF === Status.Initialized, { draggable: { active: tI, nodes: nI, translate: rI }, droppable: { containers: aI } } = H, oI = tI == null ? null : nI.get(tI), sI = useRef({
15266
15419
  initial: null,
15267
15420
  translated: null
15268
- }), sI = useMemo(() => eI == null ? null : {
15269
- id: eI,
15270
- data: aI?.data ?? defaultData,
15271
- rect: oI
15272
- }, [eI, aI]), cI = useRef(null), [lI, uI] = useState(null), [dI, fI] = useState(null), pI = useLatestValue(B, Object.values(B)), mI = useUniqueId("DndDescribedBy", E), hI = useMemo(() => iI.getEnabled(), [iI]), gI = useMeasuringConfiguration(P), { droppableRects: _I, measureDroppableContainers: vI, measuringScheduled: yI } = useDroppableMeasuring(hI, {
15273
- dragging: $F,
15274
- dependencies: [nI.x, nI.y],
15275
- config: gI.droppable
15276
- }), bI = useCachedNode(tI, eI), xI = useMemo(() => dI ? getEventCoordinates(dI) : null, [dI]), SI = $I(), CI = useInitialRect(bI, gI.draggable.measure);
15421
+ }), cI = useMemo(() => tI == null ? null : {
15422
+ id: tI,
15423
+ data: oI?.data ?? defaultData,
15424
+ rect: sI
15425
+ }, [tI, oI]), lI = useRef(null), [uI, dI] = useState(null), [fI, pI] = useState(null), mI = useLatestValue(B, Object.values(B)), hI = useUniqueId("DndDescribedBy", E), gI = useMemo(() => aI.getEnabled(), [aI]), _I = useMeasuringConfiguration(P), { droppableRects: vI, measureDroppableContainers: yI, measuringScheduled: bI } = useDroppableMeasuring(gI, {
15426
+ dragging: eI,
15427
+ dependencies: [rI.x, rI.y],
15428
+ config: _I.droppable
15429
+ }), xI = useCachedNode(nI, tI), SI = useMemo(() => fI ? getEventCoordinates(fI) : null, [fI]), CI = eL(), wI = useInitialRect(xI, _I.draggable.measure);
15277
15430
  useLayoutShiftScrollCompensation({
15278
- activeNode: eI == null ? null : tI.get(eI),
15279
- config: SI.layoutShiftCompensation,
15280
- initialRect: CI,
15281
- measure: gI.draggable.measure
15431
+ activeNode: tI == null ? null : nI.get(tI),
15432
+ config: CI.layoutShiftCompensation,
15433
+ initialRect: wI,
15434
+ measure: _I.draggable.measure
15282
15435
  });
15283
- let wI = useRect(bI, gI.draggable.measure, CI), TI = useRect(bI ? bI.parentElement : null), EI = useRef({
15436
+ let TI = useRect(xI, _I.draggable.measure, wI), EI = useRect(xI ? xI.parentElement : null), DI = useRef({
15284
15437
  activatorEvent: null,
15285
15438
  active: null,
15286
- activeNode: bI,
15439
+ activeNode: xI,
15287
15440
  collisionRect: null,
15288
15441
  collisions: null,
15289
- droppableRects: _I,
15290
- draggableNodes: tI,
15442
+ droppableRects: vI,
15443
+ draggableNodes: nI,
15291
15444
  draggingNode: null,
15292
15445
  draggingNodeRect: null,
15293
- droppableContainers: iI,
15446
+ droppableContainers: aI,
15294
15447
  over: null,
15295
15448
  scrollableAncestors: [],
15296
15449
  scrollAdjustedTranslate: null
15297
- }), DI = iI.getNodeFor(EI.current.over?.id), OI = useDragOverlayMeasuring({ measure: gI.dragOverlay.measure }), kI = OI.nodeRef.current ?? bI, AI = $F ? OI.rect ?? wI : null, jI = !!(OI.nodeRef.current && OI.rect), MI = useRectDelta(jI ? null : wI), NI = useWindowRect(kI ? getWindow(kI) : null), PI = useScrollableAncestors($F ? DI ?? bI : null), FI = useRects(PI), II = applyModifiers(z, {
15450
+ }), OI = aI.getNodeFor(DI.current.over?.id), kI = useDragOverlayMeasuring({ measure: _I.dragOverlay.measure }), AI = kI.nodeRef.current ?? xI, jI = eI ? kI.rect ?? TI : null, MI = !!(kI.nodeRef.current && kI.rect), NI = useRectDelta(MI ? null : TI), PI = useWindowRect(AI ? getWindow(AI) : null), FI = useScrollableAncestors(eI ? OI ?? xI : null), II = useRects(FI), LI = applyModifiers(z, {
15298
15451
  transform: {
15299
- x: nI.x - MI.x,
15300
- y: nI.y - MI.y,
15452
+ x: rI.x - NI.x,
15453
+ y: rI.y - NI.y,
15301
15454
  scaleX: 1,
15302
15455
  scaleY: 1
15303
15456
  },
15304
- activatorEvent: dI,
15305
- active: sI,
15306
- activeNodeRect: wI,
15307
- containerNodeRect: TI,
15308
- draggingNodeRect: AI,
15309
- over: EI.current.over,
15310
- overlayNodeRect: OI.rect,
15311
- scrollableAncestors: PI,
15312
- scrollableAncestorRects: FI,
15313
- windowRect: NI
15314
- }), LI = xI ? add(xI, nI) : null, RI = useScrollOffsets(PI), zI = useScrollOffsetsDelta(RI), BI = useScrollOffsetsDelta(RI, [wI]), VI = add(II, zI), HI = AI ? getAdjustedRect(AI, II) : null, UI = sI && HI ? N({
15315
- active: sI,
15316
- collisionRect: HI,
15317
- droppableRects: _I,
15318
- droppableContainers: hI,
15319
- pointerCoordinates: LI
15320
- }) : null, WI = getFirstCollision(UI, "id"), [GI, KI] = useState(null), qI = adjustScale(jI ? II : add(II, BI), GI?.rect ?? null, wI), JI = useRef(null), YI = useCallback((n, _) => {
15457
+ activatorEvent: fI,
15458
+ active: cI,
15459
+ activeNodeRect: TI,
15460
+ containerNodeRect: EI,
15461
+ draggingNodeRect: jI,
15462
+ over: DI.current.over,
15463
+ overlayNodeRect: kI.rect,
15464
+ scrollableAncestors: FI,
15465
+ scrollableAncestorRects: II,
15466
+ windowRect: PI
15467
+ }), RI = SI ? add(SI, rI) : null, zI = useScrollOffsets(FI), BI = useScrollOffsetsDelta(zI), VI = useScrollOffsetsDelta(zI, [TI]), HI = add(LI, BI), UI = jI ? getAdjustedRect(jI, LI) : null, WI = cI && UI ? N({
15468
+ active: cI,
15469
+ collisionRect: UI,
15470
+ droppableRects: vI,
15471
+ droppableContainers: gI,
15472
+ pointerCoordinates: RI
15473
+ }) : null, GI = getFirstCollision(WI, "id"), [KI, qI] = useState(null), JI = adjustScale(MI ? LI : add(LI, VI), KI?.rect ?? null, TI), YI = useRef(null), XI = useCallback((n, _) => {
15321
15474
  let { sensor: E, options: O } = _;
15322
- if (cI.current == null) return;
15323
- let A = tI.get(cI.current);
15475
+ if (lI.current == null) return;
15476
+ let A = nI.get(lI.current);
15324
15477
  if (!A) return;
15325
15478
  let j = n.nativeEvent;
15326
- JI.current = new E({
15327
- active: cI.current,
15479
+ YI.current = new E({
15480
+ active: lI.current,
15328
15481
  activeNode: A,
15329
15482
  event: j,
15330
15483
  options: O,
15331
- context: EI,
15484
+ context: DI,
15332
15485
  onAbort(n) {
15333
- if (!tI.get(n)) return;
15334
- let { onDragAbort: _ } = pI.current, E = { id: n };
15486
+ if (!nI.get(n)) return;
15487
+ let { onDragAbort: _ } = mI.current, E = { id: n };
15335
15488
  _?.(E), Z({
15336
15489
  type: "onDragAbort",
15337
15490
  event: E
15338
15491
  });
15339
15492
  },
15340
15493
  onPending(n, _, E, O) {
15341
- if (!tI.get(n)) return;
15342
- let { onDragPending: A } = pI.current, j = {
15494
+ if (!nI.get(n)) return;
15495
+ let { onDragPending: A } = mI.current, j = {
15343
15496
  id: n,
15344
15497
  constraint: _,
15345
15498
  initialCoordinates: E,
@@ -15351,27 +15504,27 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15351
15504
  });
15352
15505
  },
15353
15506
  onStart(n) {
15354
- let _ = cI.current;
15507
+ let _ = lI.current;
15355
15508
  if (_ == null) return;
15356
- let E = tI.get(_);
15509
+ let E = nI.get(_);
15357
15510
  if (!E) return;
15358
- let { onDragStart: O } = pI.current, A = {
15511
+ let { onDragStart: O } = mI.current, A = {
15359
15512
  activatorEvent: j,
15360
15513
  active: {
15361
15514
  id: _,
15362
15515
  data: E.data,
15363
- rect: oI
15516
+ rect: sI
15364
15517
  }
15365
15518
  };
15366
15519
  unstable_batchedUpdates(() => {
15367
- O?.(A), JF(Status.Initializing), W({
15520
+ O?.(A), YF(Status.Initializing), W({
15368
15521
  type: Action.DragStart,
15369
15522
  initialCoordinates: n,
15370
15523
  active: _
15371
15524
  }), Z({
15372
15525
  type: "onDragStart",
15373
15526
  event: A
15374
- }), uI(JI.current), fI(j);
15527
+ }), dI(YI.current), pI(j);
15375
15528
  });
15376
15529
  },
15377
15530
  onMove(n) {
@@ -15385,9 +15538,9 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15385
15538
  });
15386
15539
  function M(n) {
15387
15540
  return async function() {
15388
- let { active: _, collisions: E, over: O, scrollAdjustedTranslate: A } = EI.current, M = null;
15541
+ let { active: _, collisions: E, over: O, scrollAdjustedTranslate: A } = DI.current, M = null;
15389
15542
  if (_ && A) {
15390
- let { cancelDrop: N } = pI.current;
15543
+ let { cancelDrop: N } = mI.current;
15391
15544
  M = {
15392
15545
  activatorEvent: j,
15393
15546
  active: _,
@@ -15396,11 +15549,11 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15396
15549
  over: O
15397
15550
  }, n === Action.DragEnd && typeof N == "function" && await Promise.resolve(N(M)) && (n = Action.DragCancel);
15398
15551
  }
15399
- cI.current = null, unstable_batchedUpdates(() => {
15400
- W({ type: n }), JF(Status.Uninitialized), KI(null), uI(null), fI(null), JI.current = null;
15552
+ lI.current = null, unstable_batchedUpdates(() => {
15553
+ W({ type: n }), YF(Status.Uninitialized), qI(null), dI(null), pI(null), YI.current = null;
15401
15554
  let _ = n === Action.DragEnd ? "onDragEnd" : "onDragCancel";
15402
15555
  if (M) {
15403
- let n = pI.current[_];
15556
+ let n = mI.current[_];
15404
15557
  n?.(M), Z({
15405
15558
  type: _,
15406
15559
  event: M
@@ -15409,24 +15562,24 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15409
15562
  });
15410
15563
  };
15411
15564
  }
15412
- }, [tI]), XI = useCombineActivators(M, useCallback((n, _) => (E, O) => {
15413
- let A = E.nativeEvent, j = tI.get(O);
15414
- if (cI.current !== null || !j || A.dndKit || A.defaultPrevented) return;
15565
+ }, [nI]), ZI = useCombineActivators(M, useCallback((n, _) => (E, O) => {
15566
+ let A = E.nativeEvent, j = nI.get(O);
15567
+ if (lI.current !== null || !j || A.dndKit || A.defaultPrevented) return;
15415
15568
  let M = { active: j };
15416
- n(E, _.options, M) === !0 && (A.dndKit = { capturedBy: _.sensor }, cI.current = O, YI(E, _));
15417
- }, [tI, YI]));
15569
+ n(E, _.options, M) === !0 && (A.dndKit = { capturedBy: _.sensor }, lI.current = O, XI(E, _));
15570
+ }, [nI, XI]));
15418
15571
  useSensorSetup(M), useIsomorphicLayoutEffect$1(() => {
15419
- wI && qF === Status.Initializing && JF(Status.Initialized);
15420
- }, [wI, qF]), useEffect(() => {
15421
- let { onDragMove: n } = pI.current, { active: _, activatorEvent: E, collisions: O, over: A } = EI.current;
15572
+ TI && JF === Status.Initializing && YF(Status.Initialized);
15573
+ }, [TI, JF]), useEffect(() => {
15574
+ let { onDragMove: n } = mI.current, { active: _, activatorEvent: E, collisions: O, over: A } = DI.current;
15422
15575
  if (!_ || !E) return;
15423
15576
  let j = {
15424
15577
  active: _,
15425
15578
  activatorEvent: E,
15426
15579
  collisions: O,
15427
15580
  delta: {
15428
- x: VI.x,
15429
- y: VI.y
15581
+ x: HI.x,
15582
+ y: HI.y
15430
15583
  },
15431
15584
  over: A
15432
15585
  };
@@ -15436,10 +15589,10 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15436
15589
  event: j
15437
15590
  });
15438
15591
  });
15439
- }, [VI.x, VI.y]), useEffect(() => {
15440
- let { active: n, activatorEvent: _, collisions: E, droppableContainers: O, scrollAdjustedTranslate: A } = EI.current;
15441
- if (!n || cI.current == null || !_ || !A) return;
15442
- let { onDragOver: j } = pI.current, M = O.get(WI), N = M && M.rect.current ? {
15592
+ }, [HI.x, HI.y]), useEffect(() => {
15593
+ let { active: n, activatorEvent: _, collisions: E, droppableContainers: O, scrollAdjustedTranslate: A } = DI.current;
15594
+ if (!n || lI.current == null || !_ || !A) return;
15595
+ let { onDragOver: j } = mI.current, M = O.get(GI), N = M && M.rect.current ? {
15443
15596
  id: M.id,
15444
15597
  rect: M.rect.current,
15445
15598
  data: M.data,
@@ -15455,114 +15608,114 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15455
15608
  over: N
15456
15609
  };
15457
15610
  unstable_batchedUpdates(() => {
15458
- KI(N), j?.(P), Z({
15611
+ qI(N), j?.(P), Z({
15459
15612
  type: "onDragOver",
15460
15613
  event: P
15461
15614
  });
15462
15615
  });
15463
- }, [WI]), useIsomorphicLayoutEffect$1(() => {
15464
- EI.current = {
15465
- activatorEvent: dI,
15466
- active: sI,
15467
- activeNode: bI,
15468
- collisionRect: HI,
15469
- collisions: UI,
15470
- droppableRects: _I,
15471
- draggableNodes: tI,
15472
- draggingNode: kI,
15473
- draggingNodeRect: AI,
15474
- droppableContainers: iI,
15475
- over: GI,
15476
- scrollableAncestors: PI,
15477
- scrollAdjustedTranslate: VI
15478
- }, oI.current = {
15479
- initial: AI,
15480
- translated: HI
15616
+ }, [GI]), useIsomorphicLayoutEffect$1(() => {
15617
+ DI.current = {
15618
+ activatorEvent: fI,
15619
+ active: cI,
15620
+ activeNode: xI,
15621
+ collisionRect: UI,
15622
+ collisions: WI,
15623
+ droppableRects: vI,
15624
+ draggableNodes: nI,
15625
+ draggingNode: AI,
15626
+ draggingNodeRect: jI,
15627
+ droppableContainers: aI,
15628
+ over: KI,
15629
+ scrollableAncestors: FI,
15630
+ scrollAdjustedTranslate: HI
15631
+ }, sI.current = {
15632
+ initial: jI,
15633
+ translated: UI
15481
15634
  };
15482
15635
  }, [
15483
- sI,
15484
- bI,
15636
+ cI,
15637
+ xI,
15638
+ WI,
15485
15639
  UI,
15486
- HI,
15487
- tI,
15488
- kI,
15640
+ nI,
15489
15641
  AI,
15490
- _I,
15491
- iI,
15492
- GI,
15493
- PI,
15494
- VI
15642
+ jI,
15643
+ vI,
15644
+ aI,
15645
+ KI,
15646
+ FI,
15647
+ HI
15495
15648
  ]), useAutoScroller({
15496
- ...SI,
15497
- delta: nI,
15498
- draggingRect: HI,
15499
- pointerCoordinates: LI,
15500
- scrollableAncestors: PI,
15501
- scrollableAncestorRects: FI
15649
+ ...CI,
15650
+ delta: rI,
15651
+ draggingRect: UI,
15652
+ pointerCoordinates: RI,
15653
+ scrollableAncestors: FI,
15654
+ scrollableAncestorRects: II
15502
15655
  });
15503
- let ZI = useMemo(() => ({
15504
- active: sI,
15505
- activeNode: bI,
15506
- activeNodeRect: wI,
15507
- activatorEvent: dI,
15508
- collisions: UI,
15509
- containerNodeRect: TI,
15510
- dragOverlay: OI,
15511
- draggableNodes: tI,
15512
- droppableContainers: iI,
15513
- droppableRects: _I,
15514
- over: GI,
15515
- measureDroppableContainers: vI,
15516
- scrollableAncestors: PI,
15517
- scrollableAncestorRects: FI,
15518
- measuringConfiguration: gI,
15519
- measuringScheduled: yI,
15520
- windowRect: NI
15656
+ let QI = useMemo(() => ({
15657
+ active: cI,
15658
+ activeNode: xI,
15659
+ activeNodeRect: TI,
15660
+ activatorEvent: fI,
15661
+ collisions: WI,
15662
+ containerNodeRect: EI,
15663
+ dragOverlay: kI,
15664
+ draggableNodes: nI,
15665
+ droppableContainers: aI,
15666
+ droppableRects: vI,
15667
+ over: KI,
15668
+ measureDroppableContainers: yI,
15669
+ scrollableAncestors: FI,
15670
+ scrollableAncestorRects: II,
15671
+ measuringConfiguration: _I,
15672
+ measuringScheduled: bI,
15673
+ windowRect: PI
15521
15674
  }), [
15522
- sI,
15523
- bI,
15524
- wI,
15525
- dI,
15526
- UI,
15675
+ cI,
15676
+ xI,
15527
15677
  TI,
15528
- OI,
15529
- tI,
15530
- iI,
15531
- _I,
15532
- GI,
15678
+ fI,
15679
+ WI,
15680
+ EI,
15681
+ kI,
15682
+ nI,
15683
+ aI,
15533
15684
  vI,
15534
- PI,
15535
- FI,
15536
- gI,
15685
+ KI,
15537
15686
  yI,
15538
- NI
15539
- ]), QI = useMemo(() => ({
15540
- activatorEvent: dI,
15541
- activators: XI,
15542
- active: sI,
15543
- activeNodeRect: wI,
15544
- ariaDescribedById: { draggable: mI },
15687
+ FI,
15688
+ II,
15689
+ _I,
15690
+ bI,
15691
+ PI
15692
+ ]), $I = useMemo(() => ({
15693
+ activatorEvent: fI,
15694
+ activators: ZI,
15695
+ active: cI,
15696
+ activeNodeRect: TI,
15697
+ ariaDescribedById: { draggable: hI },
15545
15698
  dispatch: W,
15546
- draggableNodes: tI,
15547
- over: GI,
15548
- measureDroppableContainers: vI
15699
+ draggableNodes: nI,
15700
+ over: KI,
15701
+ measureDroppableContainers: yI
15549
15702
  }), [
15550
- dI,
15551
- XI,
15552
- sI,
15553
- wI,
15703
+ fI,
15704
+ ZI,
15705
+ cI,
15706
+ TI,
15554
15707
  W,
15555
- mI,
15556
- tI,
15557
- GI,
15558
- vI
15708
+ hI,
15709
+ nI,
15710
+ KI,
15711
+ yI
15559
15712
  ]);
15560
- return React.createElement(DndMonitorContext.Provider, { value: KF }, React.createElement(InternalContext.Provider, { value: QI }, React.createElement(PublicContext.Provider, { value: ZI }, React.createElement(ActiveDraggableContext.Provider, { value: qI }, j)), React.createElement(RestoreFocus, { disabled: O?.restoreFocus === !1 })), React.createElement(Accessibility, {
15713
+ return React.createElement(DndMonitorContext.Provider, { value: qF }, React.createElement(InternalContext.Provider, { value: $I }, React.createElement(PublicContext.Provider, { value: QI }, React.createElement(ActiveDraggableContext.Provider, { value: JI }, j)), React.createElement(RestoreFocus, { disabled: O?.restoreFocus === !1 })), React.createElement(Accessibility, {
15561
15714
  ...O,
15562
- hiddenTextDescribedById: mI
15715
+ hiddenTextDescribedById: hI
15563
15716
  }));
15564
- function $I() {
15565
- let n = lI?.autoScrollEnabled === !1, _ = typeof A == "object" ? A.enabled === !1 : A === !1, E = $F && !n && !_;
15717
+ function eL() {
15718
+ let n = uI?.autoScrollEnabled === !1, _ = typeof A == "object" ? A.enabled === !1 : A === !1, E = eI && !n && !_;
15566
15719
  return typeof A == "object" ? {
15567
15720
  ...A,
15568
15721
  enabled: E
@@ -15570,13 +15723,13 @@ var DndContext = /* @__PURE__ */ memo(function(n) {
15570
15723
  }
15571
15724
  }), NullContext = /* @__PURE__ */ createContext(null), defaultRole = "button", ID_PREFIX$1 = "Draggable";
15572
15725
  function useDraggable(n) {
15573
- let { id: _, data: E, disabled: O = !1, attributes: A } = n, j = useUniqueId(ID_PREFIX$1), { activators: M, activatorEvent: N, active: P, activeNodeRect: z, ariaDescribedById: B, draggableNodes: H, over: U } = useContext(InternalContext), { role: G = defaultRole, roleDescription: Z = "draggable", tabIndex: KF = 0 } = A ?? {}, qF = P?.id === _, JF = useContext(qF ? ActiveDraggableContext : NullContext), [XF, ZF] = useNodeRef(), [QF, $F] = useNodeRef(), eI = useSyntheticListeners(M, _), tI = useLatestValue(E);
15726
+ let { id: _, data: E, disabled: O = !1, attributes: A } = n, j = useUniqueId(ID_PREFIX$1), { activators: M, activatorEvent: N, active: P, activeNodeRect: z, ariaDescribedById: B, draggableNodes: H, over: U } = useContext(InternalContext), { role: G = defaultRole, roleDescription: Z = "draggable", tabIndex: qF = 0 } = A ?? {}, JF = P?.id === _, YF = useContext(JF ? ActiveDraggableContext : NullContext), [ZF, QF] = useNodeRef(), [$F, eI] = useNodeRef(), tI = useSyntheticListeners(M, _), nI = useLatestValue(E);
15574
15727
  return useIsomorphicLayoutEffect$1(() => (H.set(_, {
15575
15728
  id: _,
15576
15729
  key: j,
15577
- node: XF,
15578
- activatorNode: QF,
15579
- data: tI
15730
+ node: ZF,
15731
+ activatorNode: $F,
15732
+ data: nI
15580
15733
  }), () => {
15581
15734
  let n = H.get(_);
15582
15735
  n && n.key === j && H.delete(_);
@@ -15586,26 +15739,26 @@ function useDraggable(n) {
15586
15739
  activeNodeRect: z,
15587
15740
  attributes: useMemo(() => ({
15588
15741
  role: G,
15589
- tabIndex: KF,
15742
+ tabIndex: qF,
15590
15743
  "aria-disabled": O,
15591
- "aria-pressed": qF && G === defaultRole ? !0 : void 0,
15744
+ "aria-pressed": JF && G === defaultRole ? !0 : void 0,
15592
15745
  "aria-roledescription": Z,
15593
15746
  "aria-describedby": B.draggable
15594
15747
  }), [
15595
15748
  O,
15596
15749
  G,
15597
- KF,
15598
15750
  qF,
15751
+ JF,
15599
15752
  Z,
15600
15753
  B.draggable
15601
15754
  ]),
15602
- isDragging: qF,
15603
- listeners: O ? void 0 : eI,
15604
- node: XF,
15755
+ isDragging: JF,
15756
+ listeners: O ? void 0 : tI,
15757
+ node: ZF,
15605
15758
  over: U,
15606
- setNodeRef: ZF,
15607
- setActivatorNodeRef: $F,
15608
- transform: JF
15759
+ setNodeRef: QF,
15760
+ setActivatorNodeRef: eI,
15761
+ transform: YF
15609
15762
  };
15610
15763
  }
15611
15764
  function useDndContext() {
@@ -15613,34 +15766,34 @@ function useDndContext() {
15613
15766
  }
15614
15767
  var ID_PREFIX$1$1 = "Droppable", defaultResizeObserverConfig = { timeout: 25 };
15615
15768
  function useDroppable(n) {
15616
- let { data: _, disabled: E = !1, id: O, resizeObserverConfig: A } = n, j = useUniqueId(ID_PREFIX$1$1), { active: M, dispatch: N, over: P, measureDroppableContainers: z } = useContext(InternalContext), B = useRef({ disabled: E }), H = useRef(!1), Z = useRef(null), KF = useRef(null), { disabled: qF, updateMeasurementsFor: JF, timeout: YF } = {
15769
+ let { data: _, disabled: E = !1, id: O, resizeObserverConfig: A } = n, j = useUniqueId(ID_PREFIX$1$1), { active: M, dispatch: N, over: P, measureDroppableContainers: z } = useContext(InternalContext), B = useRef({ disabled: E }), H = useRef(!1), Z = useRef(null), qF = useRef(null), { disabled: JF, updateMeasurementsFor: YF, timeout: XF } = {
15617
15770
  ...defaultResizeObserverConfig,
15618
15771
  ...A
15619
- }, XF = useLatestValue(JF ?? O), QF = useResizeObserver({
15772
+ }, ZF = useLatestValue(YF ?? O), $F = useResizeObserver({
15620
15773
  callback: useCallback(() => {
15621
15774
  if (!H.current) {
15622
15775
  H.current = !0;
15623
15776
  return;
15624
15777
  }
15625
- KF.current != null && clearTimeout(KF.current), KF.current = setTimeout(() => {
15626
- z(Array.isArray(XF.current) ? XF.current : [XF.current]), KF.current = null;
15627
- }, YF);
15628
- }, [YF]),
15629
- disabled: qF || !M
15630
- }), [$F, eI] = useNodeRef(useCallback((n, _) => {
15631
- QF && (_ && (QF.unobserve(_), H.current = !1), n && QF.observe(n));
15632
- }, [QF])), tI = useLatestValue(_);
15778
+ qF.current != null && clearTimeout(qF.current), qF.current = setTimeout(() => {
15779
+ z(Array.isArray(ZF.current) ? ZF.current : [ZF.current]), qF.current = null;
15780
+ }, XF);
15781
+ }, [XF]),
15782
+ disabled: JF || !M
15783
+ }), [eI, tI] = useNodeRef(useCallback((n, _) => {
15784
+ $F && (_ && ($F.unobserve(_), H.current = !1), n && $F.observe(n));
15785
+ }, [$F])), nI = useLatestValue(_);
15633
15786
  return useEffect(() => {
15634
- !QF || !$F.current || (QF.disconnect(), H.current = !1, QF.observe($F.current));
15635
- }, [$F, QF]), useEffect(() => (N({
15787
+ !$F || !eI.current || ($F.disconnect(), H.current = !1, $F.observe(eI.current));
15788
+ }, [eI, $F]), useEffect(() => (N({
15636
15789
  type: Action.RegisterDroppable,
15637
15790
  element: {
15638
15791
  id: O,
15639
15792
  key: j,
15640
15793
  disabled: E,
15641
- node: $F,
15794
+ node: eI,
15642
15795
  rect: Z,
15643
- data: tI
15796
+ data: nI
15644
15797
  }
15645
15798
  }), () => N({
15646
15799
  type: Action.UnregisterDroppable,
@@ -15662,9 +15815,9 @@ function useDroppable(n) {
15662
15815
  active: M,
15663
15816
  rect: Z,
15664
15817
  isOver: P?.id === O,
15665
- node: $F,
15818
+ node: eI,
15666
15819
  over: P,
15667
- setNodeRef: eI
15820
+ setNodeRef: tI
15668
15821
  };
15669
15822
  }
15670
15823
  function AnimationManager(n) {
@@ -15801,13 +15954,13 @@ function createDefaultDropAnimation(n) {
15801
15954
  active: j,
15802
15955
  dragOverlay: M,
15803
15956
  ...P
15804
- }), KF = M.node.animate(U, {
15957
+ }), qF = M.node.animate(U, {
15805
15958
  duration: _,
15806
15959
  easing: E,
15807
15960
  fill: "forwards"
15808
15961
  });
15809
15962
  return new Promise((n) => {
15810
- KF.onfinish = () => {
15963
+ qF.onfinish = () => {
15811
15964
  Z?.(), n();
15812
15965
  };
15813
15966
  });
@@ -15820,39 +15973,39 @@ function useKey(n) {
15820
15973
  }, [n]);
15821
15974
  }
15822
15975
  var DragOverlay = /* @__PURE__ */ React.memo((n) => {
15823
- let { adjustScale: E = !1, children: O, dropAnimation: A, style: j, transition: M, modifiers: N, wrapperElement: P = "div", className: z, zIndex: B = 999 } = n, { activatorEvent: H, active: U, activeNodeRect: G, containerNodeRect: Z, draggableNodes: KF, droppableContainers: qF, dragOverlay: JF, over: YF, measuringConfiguration: XF, scrollableAncestors: ZF, scrollableAncestorRects: QF, windowRect: $F } = useDndContext(), eI = useContext(ActiveDraggableContext), tI = useKey(U?.id), nI = applyModifiers(N, {
15976
+ let { adjustScale: E = !1, children: O, dropAnimation: A, style: j, transition: M, modifiers: N, wrapperElement: P = "div", className: z, zIndex: B = 999 } = n, { activatorEvent: H, active: U, activeNodeRect: G, containerNodeRect: Z, draggableNodes: qF, droppableContainers: JF, dragOverlay: YF, over: XF, measuringConfiguration: ZF, scrollableAncestors: QF, scrollableAncestorRects: $F, windowRect: eI } = useDndContext(), tI = useContext(ActiveDraggableContext), nI = useKey(U?.id), rI = applyModifiers(N, {
15824
15977
  activatorEvent: H,
15825
15978
  active: U,
15826
15979
  activeNodeRect: G,
15827
15980
  containerNodeRect: Z,
15828
- draggingNodeRect: JF.rect,
15829
- over: YF,
15830
- overlayNodeRect: JF.rect,
15831
- scrollableAncestors: ZF,
15832
- scrollableAncestorRects: QF,
15833
- transform: eI,
15834
- windowRect: $F
15835
- }), rI = useInitialValue(G), iI = useDropAnimation({
15981
+ draggingNodeRect: YF.rect,
15982
+ over: XF,
15983
+ overlayNodeRect: YF.rect,
15984
+ scrollableAncestors: QF,
15985
+ scrollableAncestorRects: $F,
15986
+ transform: tI,
15987
+ windowRect: eI
15988
+ }), iI = useInitialValue(G), aI = useDropAnimation({
15836
15989
  config: A,
15837
- draggableNodes: KF,
15838
- droppableContainers: qF,
15839
- measuringConfiguration: XF
15840
- }), aI = rI ? JF.setRef : void 0;
15841
- return React.createElement(NullifiedContextProvider, null, React.createElement(AnimationManager, { animation: iI }, U && tI ? React.createElement(PositionedOverlay, {
15842
- key: tI,
15990
+ draggableNodes: qF,
15991
+ droppableContainers: JF,
15992
+ measuringConfiguration: ZF
15993
+ }), oI = iI ? YF.setRef : void 0;
15994
+ return React.createElement(NullifiedContextProvider, null, React.createElement(AnimationManager, { animation: aI }, U && nI ? React.createElement(PositionedOverlay, {
15995
+ key: nI,
15843
15996
  id: U.id,
15844
- ref: aI,
15997
+ ref: oI,
15845
15998
  as: P,
15846
15999
  activatorEvent: H,
15847
16000
  adjustScale: E,
15848
16001
  className: z,
15849
16002
  transition: M,
15850
- rect: rI,
16003
+ rect: iI,
15851
16004
  style: {
15852
16005
  zIndex: B,
15853
16006
  ...j
15854
16007
  },
15855
- transform: nI
16008
+ transform: rI
15856
16009
  }, O) : null));
15857
16010
  });
15858
16011
  function arrayMove(n, _, E) {
@@ -15936,40 +16089,40 @@ var ID_PREFIX = "Sortable", Context = /* @__PURE__ */ React.createContext({
15936
16089
  }
15937
16090
  });
15938
16091
  function SortableContext(n) {
15939
- let { children: E, id: O, items: A, strategy: j = rectSortingStrategy, disabled: M = !1 } = n, { active: N, dragOverlay: P, droppableRects: z, over: B, measureDroppableContainers: H } = useDndContext(), U = useUniqueId(ID_PREFIX, O), W = P.rect !== null, Z = useMemo(() => A.map((n) => typeof n == "object" && "id" in n ? n.id : n), [A]), KF = N != null, qF = N ? Z.indexOf(N.id) : -1, JF = B ? Z.indexOf(B.id) : -1, XF = useRef(Z), QF = !itemsEqual(Z, XF.current), $F = JF !== -1 && qF === -1 || QF, eI = normalizeDisabled(M);
16092
+ let { children: E, id: O, items: A, strategy: j = rectSortingStrategy, disabled: M = !1 } = n, { active: N, dragOverlay: P, droppableRects: z, over: B, measureDroppableContainers: H } = useDndContext(), U = useUniqueId(ID_PREFIX, O), W = P.rect !== null, Z = useMemo(() => A.map((n) => typeof n == "object" && "id" in n ? n.id : n), [A]), qF = N != null, JF = N ? Z.indexOf(N.id) : -1, YF = B ? Z.indexOf(B.id) : -1, ZF = useRef(Z), $F = !itemsEqual(Z, ZF.current), eI = YF !== -1 && JF === -1 || $F, tI = normalizeDisabled(M);
15940
16093
  useIsomorphicLayoutEffect$1(() => {
15941
- QF && KF && H(Z);
16094
+ $F && qF && H(Z);
15942
16095
  }, [
15943
- QF,
16096
+ $F,
15944
16097
  Z,
15945
- KF,
16098
+ qF,
15946
16099
  H
15947
16100
  ]), useEffect(() => {
15948
- XF.current = Z;
16101
+ ZF.current = Z;
15949
16102
  }, [Z]);
15950
- let tI = useMemo(() => ({
15951
- activeIndex: qF,
16103
+ let nI = useMemo(() => ({
16104
+ activeIndex: JF,
15952
16105
  containerId: U,
15953
- disabled: eI,
15954
- disableTransforms: $F,
16106
+ disabled: tI,
16107
+ disableTransforms: eI,
15955
16108
  items: Z,
15956
- overIndex: JF,
16109
+ overIndex: YF,
15957
16110
  useDragOverlay: W,
15958
16111
  sortedRects: getSortedRects(Z, z),
15959
16112
  strategy: j
15960
16113
  }), [
15961
- qF,
16114
+ JF,
15962
16115
  U,
15963
- eI.draggable,
15964
- eI.droppable,
15965
- $F,
16116
+ tI.draggable,
16117
+ tI.droppable,
16118
+ eI,
15966
16119
  Z,
15967
- JF,
16120
+ YF,
15968
16121
  z,
15969
16122
  W,
15970
16123
  j
15971
16124
  ]);
15972
- return React.createElement(Context.Provider, { value: tI }, E);
16125
+ return React.createElement(Context.Provider, { value: nI }, E);
15973
16126
  }
15974
16127
  var defaultNewIndexGetter = (n) => {
15975
16128
  let { id: _, items: E, activeIndex: O, overIndex: A } = n;
@@ -16011,112 +16164,112 @@ function useDerivedTransform(n) {
16011
16164
  }, [j]), j;
16012
16165
  }
16013
16166
  function useSortable(n) {
16014
- let { animateLayoutChanges: _ = defaultAnimateLayoutChanges, attributes: E, disabled: O, data: A, getNewIndex: j = defaultNewIndexGetter, id: M, strategy: N, resizeObserverConfig: P, transition: z = defaultTransition } = n, { items: B, containerId: H, activeIndex: U, disabled: Z, disableTransforms: KF, sortedRects: qF, overIndex: JF, useDragOverlay: XF, strategy: QF } = useContext(Context), $F = normalizeLocalDisabled(O, Z), eI = B.indexOf(M), tI = useMemo(() => ({
16167
+ let { animateLayoutChanges: _ = defaultAnimateLayoutChanges, attributes: E, disabled: O, data: A, getNewIndex: j = defaultNewIndexGetter, id: M, strategy: N, resizeObserverConfig: P, transition: z = defaultTransition } = n, { items: B, containerId: H, activeIndex: U, disabled: Z, disableTransforms: qF, sortedRects: JF, overIndex: YF, useDragOverlay: ZF, strategy: $F } = useContext(Context), eI = normalizeLocalDisabled(O, Z), tI = B.indexOf(M), nI = useMemo(() => ({
16015
16168
  sortable: {
16016
16169
  containerId: H,
16017
- index: eI,
16170
+ index: tI,
16018
16171
  items: B
16019
16172
  },
16020
16173
  ...A
16021
16174
  }), [
16022
16175
  H,
16023
16176
  A,
16024
- eI,
16177
+ tI,
16025
16178
  B
16026
- ]), nI = useMemo(() => B.slice(B.indexOf(M)), [B, M]), { rect: rI, node: iI, isOver: aI, setNodeRef: oI } = useDroppable({
16179
+ ]), rI = useMemo(() => B.slice(B.indexOf(M)), [B, M]), { rect: iI, node: aI, isOver: oI, setNodeRef: sI } = useDroppable({
16027
16180
  id: M,
16028
- data: tI,
16029
- disabled: $F.droppable,
16181
+ data: nI,
16182
+ disabled: eI.droppable,
16030
16183
  resizeObserverConfig: {
16031
- updateMeasurementsFor: nI,
16184
+ updateMeasurementsFor: rI,
16032
16185
  ...P
16033
16186
  }
16034
- }), { active: sI, activatorEvent: cI, activeNodeRect: lI, attributes: uI, setNodeRef: dI, listeners: fI, isDragging: pI, over: mI, setActivatorNodeRef: hI, transform: gI } = useDraggable({
16187
+ }), { active: cI, activatorEvent: lI, activeNodeRect: uI, attributes: dI, setNodeRef: fI, listeners: pI, isDragging: mI, over: hI, setActivatorNodeRef: gI, transform: _I } = useDraggable({
16035
16188
  id: M,
16036
- data: tI,
16189
+ data: nI,
16037
16190
  attributes: {
16038
16191
  ...defaultAttributes,
16039
16192
  ...E
16040
16193
  },
16041
- disabled: $F.draggable
16042
- }), _I = useCombinedRefs(oI, dI), vI = !!sI, yI = vI && !KF && isValidIndex(U) && isValidIndex(JF), bI = !XF && pI, xI = yI ? (bI && yI ? gI : null) ?? (N ?? QF)({
16043
- rects: qF,
16044
- activeNodeRect: lI,
16194
+ disabled: eI.draggable
16195
+ }), vI = useCombinedRefs(sI, fI), yI = !!cI, bI = yI && !qF && isValidIndex(U) && isValidIndex(YF), xI = !ZF && mI, SI = bI ? (xI && bI ? _I : null) ?? (N ?? $F)({
16196
+ rects: JF,
16197
+ activeNodeRect: uI,
16045
16198
  activeIndex: U,
16046
- overIndex: JF,
16047
- index: eI
16048
- }) : null, SI = isValidIndex(U) && isValidIndex(JF) ? j({
16199
+ overIndex: YF,
16200
+ index: tI
16201
+ }) : null, CI = isValidIndex(U) && isValidIndex(YF) ? j({
16049
16202
  id: M,
16050
16203
  items: B,
16051
16204
  activeIndex: U,
16052
- overIndex: JF
16053
- }) : eI, CI = sI?.id, wI = useRef({
16054
- activeId: CI,
16205
+ overIndex: YF
16206
+ }) : tI, wI = cI?.id, TI = useRef({
16207
+ activeId: wI,
16055
16208
  items: B,
16056
- newIndex: SI,
16209
+ newIndex: CI,
16057
16210
  containerId: H
16058
- }), TI = B !== wI.current.items, EI = _({
16059
- active: sI,
16211
+ }), EI = B !== TI.current.items, DI = _({
16212
+ active: cI,
16060
16213
  containerId: H,
16061
- isDragging: pI,
16062
- isSorting: vI,
16214
+ isDragging: mI,
16215
+ isSorting: yI,
16063
16216
  id: M,
16064
- index: eI,
16217
+ index: tI,
16065
16218
  items: B,
16066
- newIndex: wI.current.newIndex,
16067
- previousItems: wI.current.items,
16068
- previousContainerId: wI.current.containerId,
16219
+ newIndex: TI.current.newIndex,
16220
+ previousItems: TI.current.items,
16221
+ previousContainerId: TI.current.containerId,
16069
16222
  transition: z,
16070
- wasDragging: wI.current.activeId != null
16071
- }), DI = useDerivedTransform({
16072
- disabled: !EI,
16073
- index: eI,
16074
- node: iI,
16075
- rect: rI
16223
+ wasDragging: TI.current.activeId != null
16224
+ }), OI = useDerivedTransform({
16225
+ disabled: !DI,
16226
+ index: tI,
16227
+ node: aI,
16228
+ rect: iI
16076
16229
  });
16077
16230
  return useEffect(() => {
16078
- vI && wI.current.newIndex !== SI && (wI.current.newIndex = SI), H !== wI.current.containerId && (wI.current.containerId = H), B !== wI.current.items && (wI.current.items = B);
16231
+ yI && TI.current.newIndex !== CI && (TI.current.newIndex = CI), H !== TI.current.containerId && (TI.current.containerId = H), B !== TI.current.items && (TI.current.items = B);
16079
16232
  }, [
16080
- vI,
16081
- SI,
16233
+ yI,
16234
+ CI,
16082
16235
  H,
16083
16236
  B
16084
16237
  ]), useEffect(() => {
16085
- if (CI === wI.current.activeId) return;
16086
- if (CI != null && wI.current.activeId == null) {
16087
- wI.current.activeId = CI;
16238
+ if (wI === TI.current.activeId) return;
16239
+ if (wI != null && TI.current.activeId == null) {
16240
+ TI.current.activeId = wI;
16088
16241
  return;
16089
16242
  }
16090
16243
  let n = setTimeout(() => {
16091
- wI.current.activeId = CI;
16244
+ TI.current.activeId = wI;
16092
16245
  }, 50);
16093
16246
  return () => clearTimeout(n);
16094
- }, [CI]), {
16095
- active: sI,
16247
+ }, [wI]), {
16248
+ active: cI,
16096
16249
  activeIndex: U,
16097
- attributes: uI,
16098
- data: tI,
16099
- rect: rI,
16100
- index: eI,
16101
- newIndex: SI,
16250
+ attributes: dI,
16251
+ data: nI,
16252
+ rect: iI,
16253
+ index: tI,
16254
+ newIndex: CI,
16102
16255
  items: B,
16103
- isOver: aI,
16104
- isSorting: vI,
16105
- isDragging: pI,
16106
- listeners: fI,
16107
- node: iI,
16108
- overIndex: JF,
16109
- over: mI,
16110
- setNodeRef: _I,
16111
- setActivatorNodeRef: hI,
16112
- setDroppableNodeRef: oI,
16113
- setDraggableNodeRef: dI,
16114
- transform: DI ?? xI,
16115
- transition: OI()
16256
+ isOver: oI,
16257
+ isSorting: yI,
16258
+ isDragging: mI,
16259
+ listeners: pI,
16260
+ node: aI,
16261
+ overIndex: YF,
16262
+ over: hI,
16263
+ setNodeRef: vI,
16264
+ setActivatorNodeRef: gI,
16265
+ setDroppableNodeRef: sI,
16266
+ setDraggableNodeRef: fI,
16267
+ transform: OI ?? SI,
16268
+ transition: kI()
16116
16269
  };
16117
- function OI() {
16118
- if (DI || TI && wI.current.newIndex === eI) return disabledTransition;
16119
- if (!(bI && !isKeyboardEvent(cI) || !z) && (vI || EI)) return CSS$1.Transition.toString({
16270
+ function kI() {
16271
+ if (OI || EI && TI.current.newIndex === tI) return disabledTransition;
16272
+ if (!(xI && !isKeyboardEvent(lI) || !z) && (yI || DI)) return CSS$1.Transition.toString({
16120
16273
  ...z,
16121
16274
  property: transitionProperty
16122
16275
  });
@@ -16512,13 +16665,13 @@ function createRenderBatcher(n, _) {
16512
16665
  }, j = () => E = !0, M = stepsOrder.reduce((n, E) => (n[E] = createRenderStep(j, _ ? E : void 0), n), {}), { setup: N, read: P, resolveKeyframes: z, preUpdate: B, update: H, preRender: U, render: W, postRender: G } = M, Z = () => {
16513
16666
  let j = MotionGlobalConfig.useManualTiming ? A.timestamp : performance.now();
16514
16667
  E = !1, MotionGlobalConfig.useManualTiming || (A.delta = O ? 1e3 / 60 : Math.max(Math.min(j - A.timestamp, maxElapsed), 1)), A.timestamp = j, A.isProcessing = !0, N.process(A), P.process(A), z.process(A), B.process(A), H.process(A), U.process(A), W.process(A), G.process(A), A.isProcessing = !1, E && _ && (O = !1, n(Z));
16515
- }, KF = () => {
16668
+ }, qF = () => {
16516
16669
  E = !0, O = !0, A.isProcessing || n(Z);
16517
16670
  };
16518
16671
  return {
16519
16672
  schedule: stepsOrder.reduce((n, _) => {
16520
16673
  let O = M[_];
16521
- return n[_] = (n, _ = !1, A = !1) => (E || KF(), O.schedule(n, _, A)), n;
16674
+ return n[_] = (n, _ = !1, A = !1) => (E || qF(), O.schedule(n, _, A)), n;
16522
16675
  }, {}),
16523
16676
  cancel: (n) => {
16524
16677
  for (let _ = 0; _ < stepsOrder.length; _++) M[stepsOrder[_]].cancel(n);
@@ -16876,40 +17029,40 @@ function spring(n = springDefaults.visualDuration, _ = springDefaults.bounce) {
16876
17029
  }, { stiffness: P, damping: z, mass: B, duration: H, velocity: U, isResolvedFromDuration: W } = getSpringOptions({
16877
17030
  ...E,
16878
17031
  velocity: -/* @__PURE__ */ millisecondsToSeconds(E.velocity || 0)
16879
- }), G = U || 0, Z = z / (2 * Math.sqrt(P * B)), KF = M - j, qF = /* @__PURE__ */ millisecondsToSeconds(Math.sqrt(P / B)), JF = Math.abs(KF) < 5;
16880
- O ||= JF ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default, A ||= JF ? springDefaults.restDelta.granular : springDefaults.restDelta.default;
16881
- let YF;
17032
+ }), G = U || 0, Z = z / (2 * Math.sqrt(P * B)), qF = M - j, JF = /* @__PURE__ */ millisecondsToSeconds(Math.sqrt(P / B)), YF = Math.abs(qF) < 5;
17033
+ O ||= YF ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default, A ||= YF ? springDefaults.restDelta.granular : springDefaults.restDelta.default;
17034
+ let XF;
16882
17035
  if (Z < 1) {
16883
- let n = calcAngularFreq(qF, Z);
16884
- YF = (_) => M - Math.exp(-Z * qF * _) * ((G + Z * qF * KF) / n * Math.sin(n * _) + KF * Math.cos(n * _));
16885
- } else if (Z === 1) YF = (n) => M - Math.exp(-qF * n) * (KF + (G + qF * KF) * n);
17036
+ let n = calcAngularFreq(JF, Z);
17037
+ XF = (_) => M - Math.exp(-Z * JF * _) * ((G + Z * JF * qF) / n * Math.sin(n * _) + qF * Math.cos(n * _));
17038
+ } else if (Z === 1) XF = (n) => M - Math.exp(-JF * n) * (qF + (G + JF * qF) * n);
16886
17039
  else {
16887
- let n = qF * Math.sqrt(Z * Z - 1);
16888
- YF = (_) => {
16889
- let E = Math.exp(-Z * qF * _), O = Math.min(n * _, 300);
16890
- return M - E * ((G + Z * qF * KF) * Math.sinh(O) + n * KF * Math.cosh(O)) / n;
17040
+ let n = JF * Math.sqrt(Z * Z - 1);
17041
+ XF = (_) => {
17042
+ let E = Math.exp(-Z * JF * _), O = Math.min(n * _, 300);
17043
+ return M - E * ((G + Z * JF * qF) * Math.sinh(O) + n * qF * Math.cosh(O)) / n;
16891
17044
  };
16892
17045
  }
16893
- let XF = {
17046
+ let ZF = {
16894
17047
  calculatedDuration: W && H || null,
16895
17048
  next: (n) => {
16896
- let _ = YF(n);
17049
+ let _ = XF(n);
16897
17050
  if (W) N.done = n >= H;
16898
17051
  else {
16899
17052
  let E = n === 0 ? G : 0;
16900
- Z < 1 && (E = n === 0 ? /* @__PURE__ */ secondsToMilliseconds(G) : calcGeneratorVelocity(YF, n, _));
17053
+ Z < 1 && (E = n === 0 ? /* @__PURE__ */ secondsToMilliseconds(G) : calcGeneratorVelocity(XF, n, _));
16901
17054
  let j = Math.abs(E) <= O, P = Math.abs(M - _) <= A;
16902
17055
  N.done = j && P;
16903
17056
  }
16904
17057
  return N.value = N.done ? M : _, N;
16905
17058
  },
16906
17059
  toString: () => {
16907
- let n = Math.min(calcGeneratorDuration(XF), maxGeneratorDuration), _ = generateLinearEasing((_) => XF.next(n * _).value, n, 30);
17060
+ let n = Math.min(calcGeneratorDuration(ZF), maxGeneratorDuration), _ = generateLinearEasing((_) => ZF.next(n * _).value, n, 30);
16908
17061
  return n + "ms " + _;
16909
17062
  },
16910
17063
  toTransition: () => {}
16911
17064
  };
16912
- return XF;
17065
+ return ZF;
16913
17066
  }
16914
17067
  spring.applyToOptions = (n) => {
16915
17068
  let _ = createGeneratorEasing(n, 100, spring);
@@ -16919,26 +17072,26 @@ function inertia({ keyframes: n, velocity: _ = 0, power: E = .8, timeConstant: O
16919
17072
  let H = n[0], U = {
16920
17073
  done: !1,
16921
17074
  value: H
16922
- }, W = (n) => N !== void 0 && n < N || P !== void 0 && n > P, G = (n) => N === void 0 ? P : P === void 0 || Math.abs(N - n) < Math.abs(P - n) ? N : P, Z = E * _, KF = H + Z, qF = M === void 0 ? KF : M(KF);
16923
- qF !== KF && (Z = qF - H);
16924
- let JF = (n) => -Z * Math.exp(-n / O), YF = (n) => qF + JF(n), XF = (n) => {
16925
- let _ = JF(n), E = YF(n);
16926
- U.done = Math.abs(_) <= z, U.value = U.done ? qF : E;
16927
- }, ZF, QF, $F = (n) => {
16928
- W(U.value) && (ZF = n, QF = spring({
17075
+ }, W = (n) => N !== void 0 && n < N || P !== void 0 && n > P, G = (n) => N === void 0 ? P : P === void 0 || Math.abs(N - n) < Math.abs(P - n) ? N : P, Z = E * _, qF = H + Z, JF = M === void 0 ? qF : M(qF);
17076
+ JF !== qF && (Z = JF - H);
17077
+ let YF = (n) => -Z * Math.exp(-n / O), XF = (n) => JF + YF(n), ZF = (n) => {
17078
+ let _ = YF(n), E = XF(n);
17079
+ U.done = Math.abs(_) <= z, U.value = U.done ? JF : E;
17080
+ }, QF, $F, eI = (n) => {
17081
+ W(U.value) && (QF = n, $F = spring({
16929
17082
  keyframes: [U.value, G(U.value)],
16930
- velocity: calcGeneratorVelocity(YF, n, U.value),
17083
+ velocity: calcGeneratorVelocity(XF, n, U.value),
16931
17084
  damping: A,
16932
17085
  stiffness: j,
16933
17086
  restDelta: z,
16934
17087
  restSpeed: B
16935
17088
  }));
16936
17089
  };
16937
- return $F(0), {
17090
+ return eI(0), {
16938
17091
  calculatedDuration: null,
16939
17092
  next: (n) => {
16940
17093
  let _ = !1;
16941
- return !QF && ZF === void 0 && (_ = !0, XF(n), $F(n)), ZF !== void 0 && n >= ZF ? QF.next(n - ZF) : (!_ && XF(n), U);
17094
+ return !$F && QF === void 0 && (_ = !0, ZF(n), eI(n)), QF !== void 0 && n >= QF ? $F.next(n - QF) : (!_ && ZF(n), U);
16942
17095
  }
16943
17096
  };
16944
17097
  }
@@ -17058,22 +17211,22 @@ var WithPromise = class {
17058
17211
  if (this.startTime === null) return E.next(0);
17059
17212
  let { delay: P = 0, keyframes: z, repeat: B, repeatType: H, repeatDelay: U, type: W, onUpdate: G, finalKeyframe: Z } = this.options;
17060
17213
  this.speed > 0 ? this.startTime = Math.min(this.startTime, n) : this.speed < 0 && (this.startTime = Math.min(n - O / this.speed, this.startTime)), _ ? this.currentTime = n : this.updateTime(n);
17061
- let KF = this.currentTime - P * (this.playbackSpeed >= 0 ? 1 : -1), qF = this.playbackSpeed >= 0 ? KF < 0 : KF > O;
17062
- this.currentTime = Math.max(KF, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = O);
17063
- let JF = this.currentTime, YF = E;
17214
+ let qF = this.currentTime - P * (this.playbackSpeed >= 0 ? 1 : -1), JF = this.playbackSpeed >= 0 ? qF < 0 : qF > O;
17215
+ this.currentTime = Math.max(qF, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = O);
17216
+ let YF = this.currentTime, XF = E;
17064
17217
  if (B) {
17065
17218
  let n = Math.min(this.currentTime, O) / M, _ = Math.floor(n), E = n % 1;
17066
- !E && n >= 1 && (E = 1), E === 1 && _--, _ = Math.min(_, B + 1), _ % 2 && (H === "reverse" ? (E = 1 - E, U && (E -= U / M)) : H === "mirror" && (YF = j)), JF = clamp(0, 1, E) * M;
17219
+ !E && n >= 1 && (E = 1), E === 1 && _--, _ = Math.min(_, B + 1), _ % 2 && (H === "reverse" ? (E = 1 - E, U && (E -= U / M)) : H === "mirror" && (XF = j)), YF = clamp(0, 1, E) * M;
17067
17220
  }
17068
- let XF = qF ? {
17221
+ let ZF = JF ? {
17069
17222
  done: !1,
17070
17223
  value: z[0]
17071
- } : YF.next(JF);
17072
- A && (XF.value = A(XF.value));
17073
- let { done: ZF } = XF;
17074
- !qF && N !== null && (ZF = this.playbackSpeed >= 0 ? this.currentTime >= O : this.currentTime <= 0);
17075
- let QF = this.holdTime === null && (this.state === "finished" || this.state === "running" && ZF);
17076
- return QF && W !== inertia && (XF.value = getFinalKeyframe$1(z, this.options, Z, this.speed)), G && G(XF.value), QF && this.finish(), XF;
17224
+ } : XF.next(YF);
17225
+ A && (ZF.value = A(ZF.value));
17226
+ let { done: QF } = ZF;
17227
+ !JF && N !== null && (QF = this.playbackSpeed >= 0 ? this.currentTime >= O : this.currentTime <= 0);
17228
+ let $F = this.holdTime === null && (this.state === "finished" || this.state === "running" && QF);
17229
+ return $F && W !== inertia && (ZF.value = getFinalKeyframe$1(z, this.options, Z, this.speed)), G && G(ZF.value), $F && this.finish(), ZF;
17077
17230
  }
17078
17231
  then(n, _) {
17079
17232
  return this.finished.then(n, _);
@@ -18136,46 +18289,46 @@ function onlyElements(n) {
18136
18289
  }), _;
18137
18290
  }
18138
18291
  var AnimatePresence = ({ children: n, custom: _, initial: E = !0, onExitComplete: O, presenceAffectsLayout: A = !0, mode: j = "sync", propagate: M = !1, anchorX: N = "left", root: P }) => {
18139
- let [z, B] = usePresence(M), H = useMemo(() => onlyElements(n), [n]), U = M && !z ? [] : H.map(getChildKey), G = useRef(!0), Z = useRef(H), KF = useConstant(() => /* @__PURE__ */ new Map()), qF = useRef(/* @__PURE__ */ new Set()), [JF, XF] = useState(H), [$F, eI] = useState(H);
18292
+ let [z, B] = usePresence(M), H = useMemo(() => onlyElements(n), [n]), U = M && !z ? [] : H.map(getChildKey), G = useRef(!0), Z = useRef(H), qF = useConstant(() => /* @__PURE__ */ new Map()), JF = useRef(/* @__PURE__ */ new Set()), [YF, ZF] = useState(H), [eI, tI] = useState(H);
18140
18293
  useIsomorphicLayoutEffect(() => {
18141
18294
  G.current = !1, Z.current = H;
18142
- for (let n = 0; n < $F.length; n++) {
18143
- let _ = getChildKey($F[n]);
18144
- U.includes(_) ? (KF.delete(_), qF.current.delete(_)) : KF.get(_) !== !0 && KF.set(_, !1);
18295
+ for (let n = 0; n < eI.length; n++) {
18296
+ let _ = getChildKey(eI[n]);
18297
+ U.includes(_) ? (qF.delete(_), JF.current.delete(_)) : qF.get(_) !== !0 && qF.set(_, !1);
18145
18298
  }
18146
18299
  }, [
18147
- $F,
18300
+ eI,
18148
18301
  U.length,
18149
18302
  U.join("-")
18150
18303
  ]);
18151
- let tI = [];
18152
- if (H !== JF) {
18304
+ let nI = [];
18305
+ if (H !== YF) {
18153
18306
  let n = [...H];
18154
- for (let _ = 0; _ < $F.length; _++) {
18155
- let E = $F[_], O = getChildKey(E);
18156
- U.includes(O) || (n.splice(_, 0, E), tI.push(E));
18307
+ for (let _ = 0; _ < eI.length; _++) {
18308
+ let E = eI[_], O = getChildKey(E);
18309
+ U.includes(O) || (n.splice(_, 0, E), nI.push(E));
18157
18310
  }
18158
- return j === "wait" && tI.length && (n = tI), eI(onlyElements(n)), XF(H), null;
18311
+ return j === "wait" && nI.length && (n = nI), tI(onlyElements(n)), ZF(H), null;
18159
18312
  }
18160
- process.env.NODE_ENV !== "production" && j === "wait" && $F.length > 1 && console.warn("You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.");
18161
- let { forceRender: nI } = useContext(LayoutGroupContext);
18162
- return jsx(Fragment$1, { children: $F.map((n) => {
18163
- let W = getChildKey(n), JF = M && !z ? !1 : H === $F || U.includes(W);
18313
+ process.env.NODE_ENV !== "production" && j === "wait" && eI.length > 1 && console.warn("You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.");
18314
+ let { forceRender: rI } = useContext(LayoutGroupContext);
18315
+ return jsx(Fragment$1, { children: eI.map((n) => {
18316
+ let W = getChildKey(n), YF = M && !z ? !1 : H === eI || U.includes(W);
18164
18317
  return jsx(PresenceChild, {
18165
- isPresent: JF,
18318
+ isPresent: YF,
18166
18319
  initial: !G.current || E ? void 0 : !1,
18167
18320
  custom: _,
18168
18321
  presenceAffectsLayout: A,
18169
18322
  mode: j,
18170
18323
  root: P,
18171
- onExitComplete: JF ? void 0 : () => {
18172
- if (qF.current.has(W)) return;
18173
- if (qF.current.add(W), KF.has(W)) KF.set(W, !0);
18324
+ onExitComplete: YF ? void 0 : () => {
18325
+ if (JF.current.has(W)) return;
18326
+ if (JF.current.add(W), qF.has(W)) qF.set(W, !0);
18174
18327
  else return;
18175
18328
  let n = !0;
18176
- KF.forEach((_) => {
18329
+ qF.forEach((_) => {
18177
18330
  _ || (n = !1);
18178
- }), n && (nI?.(), eI(Z.current), M && B?.(), O && O());
18331
+ }), n && (rI?.(), tI(Z.current), M && B?.(), O && O());
18179
18332
  },
18180
18333
  anchorX: N,
18181
18334
  children: n
@@ -18604,12 +18757,12 @@ function useVisualElement(n, _, E, O, A, j) {
18604
18757
  useInsertionEffect(() => {
18605
18758
  H && Z.current && H.update(E, P);
18606
18759
  });
18607
- let KF = E[optimizedAppearDataAttribute], JF = useRef(!!KF && !window.MotionHandoffIsComplete?.(KF) && window.MotionHasOptimisedAnimation?.(KF));
18760
+ let qF = E[optimizedAppearDataAttribute], YF = useRef(!!qF && !window.MotionHandoffIsComplete?.(qF) && window.MotionHasOptimisedAnimation?.(qF));
18608
18761
  return useIsomorphicLayoutEffect(() => {
18609
- H && (Z.current = !0, window.MotionIsMounted = !0, H.updateFeatures(), H.scheduleRenderMicrotask(), JF.current && H.animationState && H.animationState.animateChanges());
18762
+ H && (Z.current = !0, window.MotionIsMounted = !0, H.updateFeatures(), H.scheduleRenderMicrotask(), YF.current && H.animationState && H.animationState.animateChanges());
18610
18763
  }), useEffect(() => {
18611
- H && (!JF.current && H.animationState && H.animationState.animateChanges(), JF.current &&= (queueMicrotask(() => {
18612
- window.MotionHandoffMarkAsComplete?.(KF);
18764
+ H && (!YF.current && H.animationState && H.animationState.animateChanges(), YF.current &&= (queueMicrotask(() => {
18765
+ window.MotionHandoffMarkAsComplete?.(qF);
18613
18766
  }), !1), H.enteringChildren = void 0);
18614
18767
  }), H;
18615
18768
  }
@@ -19287,34 +19440,34 @@ function createAnimationState(n) {
19287
19440
  function M(j) {
19288
19441
  let { props: M } = n, N = getVariantContext(n.parent) || {}, P = [], z = /* @__PURE__ */ new Set(), B = {}, H = Infinity;
19289
19442
  for (let _ = 0; _ < numAnimationTypes; _++) {
19290
- let U = reversePriorityOrder[_], W = E[U], G = M[U] === void 0 ? N[U] : M[U], Z = isVariantLabel(G), KF = U === j ? W.isActive : null;
19291
- KF === !1 && (H = _);
19292
- let qF = G === N[U] && G !== M[U] && Z;
19293
- if (qF && O && n.manuallyAnimateOnMount && (qF = !1), W.protectedKeys = { ...B }, !W.isActive && KF === null || !G && !W.prevProp || isAnimationControls(G) || typeof G == "boolean") continue;
19294
- let JF = checkVariantsDidChange(W.prevProp, G), YF = JF || U === j && W.isActive && !qF && Z || _ > H && Z, XF = !1, ZF = Array.isArray(G) ? G : [G], QF = ZF.reduce(A(U), {});
19295
- KF === !1 && (QF = {});
19296
- let { prevResolvedValues: $F = {} } = W, eI = {
19297
- ...$F,
19298
- ...QF
19299
- }, tI = (_) => {
19300
- YF = !0, z.has(_) && (XF = !0, z.delete(_)), W.needsAnimating[_] = !0;
19443
+ let U = reversePriorityOrder[_], W = E[U], G = M[U] === void 0 ? N[U] : M[U], Z = isVariantLabel(G), qF = U === j ? W.isActive : null;
19444
+ qF === !1 && (H = _);
19445
+ let JF = G === N[U] && G !== M[U] && Z;
19446
+ if (JF && O && n.manuallyAnimateOnMount && (JF = !1), W.protectedKeys = { ...B }, !W.isActive && qF === null || !G && !W.prevProp || isAnimationControls(G) || typeof G == "boolean") continue;
19447
+ let YF = checkVariantsDidChange(W.prevProp, G), XF = YF || U === j && W.isActive && !JF && Z || _ > H && Z, ZF = !1, QF = Array.isArray(G) ? G : [G], $F = QF.reduce(A(U), {});
19448
+ qF === !1 && ($F = {});
19449
+ let { prevResolvedValues: eI = {} } = W, tI = {
19450
+ ...eI,
19451
+ ...$F
19452
+ }, nI = (_) => {
19453
+ XF = !0, z.has(_) && (ZF = !0, z.delete(_)), W.needsAnimating[_] = !0;
19301
19454
  let E = n.getValue(_);
19302
19455
  E && (E.liveStyle = !1);
19303
19456
  };
19304
- for (let n in eI) {
19305
- let _ = QF[n], E = $F[n];
19457
+ for (let n in tI) {
19458
+ let _ = $F[n], E = eI[n];
19306
19459
  if (B.hasOwnProperty(n)) continue;
19307
19460
  let O = !1;
19308
- O = isKeyframesTarget(_) && isKeyframesTarget(E) ? !shallowCompare(_, E) : _ !== E, O ? _ == null ? z.add(n) : tI(n) : _ !== void 0 && z.has(n) ? tI(n) : W.protectedKeys[n] = !0;
19461
+ O = isKeyframesTarget(_) && isKeyframesTarget(E) ? !shallowCompare(_, E) : _ !== E, O ? _ == null ? z.add(n) : nI(n) : _ !== void 0 && z.has(n) ? nI(n) : W.protectedKeys[n] = !0;
19309
19462
  }
19310
- W.prevProp = G, W.prevResolvedValues = QF, W.isActive && (B = {
19463
+ W.prevProp = G, W.prevResolvedValues = $F, W.isActive && (B = {
19311
19464
  ...B,
19312
- ...QF
19313
- }), O && n.blockInitialAnimation && (YF = !1);
19314
- let nI = qF && JF;
19315
- YF && (!nI || XF) && P.push(...ZF.map((_) => {
19465
+ ...$F
19466
+ }), O && n.blockInitialAnimation && (XF = !1);
19467
+ let rI = JF && YF;
19468
+ XF && (!rI || ZF) && P.push(...QF.map((_) => {
19316
19469
  let E = { type: U };
19317
- if (typeof _ == "string" && O && !nI && n.manuallyAnimateOnMount && n.parent) {
19470
+ if (typeof _ == "string" && O && !rI && n.manuallyAnimateOnMount && n.parent) {
19318
19471
  let { parent: O } = n, A = resolveVariant(O, _);
19319
19472
  if (O.enteringChildren && A) {
19320
19473
  let { delayChildren: _ } = A.transition || {};
@@ -21472,10 +21625,10 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$4, { children: [/* @__PURE_
21472
21625
  });
21473
21626
  let N = j - n + 100, P = M - O + 100, z = window.innerWidth - 300, B = window.innerHeight - 100, H = z / N, U = B / P, W = Math.min(H, U);
21474
21627
  W = Math.min(Math.max(W, .1), 5), _(W);
21475
- let G = (n + j) / 2, Z = (O + M) / 2, KF = z / 2, qF = B / 2;
21628
+ let G = (n + j) / 2, Z = (O + M) / 2, qF = z / 2, JF = B / 2;
21476
21629
  E({
21477
- x: KF - G * W,
21478
- y: qF - Z * W
21630
+ x: qF - G * W,
21631
+ y: JF - Z * W
21479
21632
  });
21480
21633
  },
21481
21634
  children: /* @__PURE__ */ jsx(AspectRatioIcon, {})
@@ -21485,34 +21638,34 @@ const ShortcutsDialog = () => /* @__PURE__ */ jsxs(s$4, { children: [/* @__PURE_
21485
21638
  });
21486
21639
  };
21487
21640
  var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light", templates: j, activeTemplateId: M, onTemplateChange: N }) => {
21488
- let [P, z] = useState(!0), [B, H] = useState(!0), [U, W] = useState(null), [G, Z] = useState(!1), [KF, qF] = useState(!1), [JF, YF] = useState(j && j.length > 0 ? j[0].id : null), XF = React.useRef(null), { addElement: ZF, loadState: $F, state: eI, undo: tI, redo: nI, copy: rI, paste: iI, removeSelected: sI, updateElements: cI } = useEditor(), lI = React.useRef(null);
21641
+ let [P, z] = useState(!0), [B, H] = useState(!0), [U, W] = useState(null), [G, Z] = useState(!1), [qF, JF] = useState(!1), [YF, XF] = useState(j && j.length > 0 ? j[0].id : null), ZF = React.useRef(null), { addElement: QF, loadState: eI, state: tI, undo: nI, redo: rI, copy: iI, paste: aI, removeSelected: cI, updateElements: lI } = useEditor(), uI = React.useRef(null);
21489
21642
  React.useEffect(() => {
21490
21643
  let n = () => {
21491
- qF(window.innerWidth < 768);
21644
+ JF(window.innerWidth < 768);
21492
21645
  };
21493
21646
  return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
21494
21647
  }, []);
21495
- let uI = () => {
21648
+ let dI = () => {
21496
21649
  let n = {
21497
- elements: eI.elements,
21498
- isList: eI.isList,
21499
- mockData: eI.mockData,
21500
- singleMockData: eI.singleMockData,
21501
- listSettings: eI.listSettings,
21502
- canvasHeight: eI.canvasHeight,
21503
- gridSize: eI.gridSize
21650
+ elements: tI.elements,
21651
+ isList: tI.isList,
21652
+ mockData: tI.mockData,
21653
+ singleMockData: tI.singleMockData,
21654
+ listSettings: tI.listSettings,
21655
+ canvasHeight: tI.canvasHeight,
21656
+ gridSize: tI.gridSize
21504
21657
  }, _ = JSON.stringify(n, null, 2), E = new Blob([_], { type: "application/json" }), O = URL.createObjectURL(E), A = document.createElement("a");
21505
21658
  A.href = O, A.download = `layout-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.json`, document.body.appendChild(A), A.click(), document.body.removeChild(A), URL.revokeObjectURL(O);
21506
- }, dI = () => {
21507
- lI.current?.click();
21508
- }, fI = (n) => {
21659
+ }, fI = () => {
21660
+ uI.current?.click();
21661
+ }, pI = (n) => {
21509
21662
  let _ = n.target.files?.[0];
21510
21663
  if (!_) return;
21511
21664
  let E = new FileReader();
21512
21665
  E.onload = (n) => {
21513
21666
  try {
21514
21667
  let _ = n.target?.result;
21515
- $F(JSON.parse(_));
21668
+ eI(JSON.parse(_));
21516
21669
  } catch (n) {
21517
21670
  console.error("Failed to import layout", n), alert("Erro ao importar layout. Arquivo inválido.");
21518
21671
  }
@@ -21530,7 +21683,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21530
21683
  let n = new FileReader();
21531
21684
  n.onload = (n) => {
21532
21685
  let _ = n.target?.result;
21533
- ZF({
21686
+ QF({
21534
21687
  type: "image",
21535
21688
  content: _,
21536
21689
  width: 200,
@@ -21542,24 +21695,24 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21542
21695
  }
21543
21696
  };
21544
21697
  return window.addEventListener("paste", n), () => window.removeEventListener("paste", n);
21545
- }, [ZF]), React.useEffect(() => {
21698
+ }, [QF]), React.useEffect(() => {
21546
21699
  let n = (n) => {
21547
21700
  if (!(document.activeElement?.tagName === "INPUT" || document.activeElement?.tagName === "TEXTAREA" || document.activeElement?.isContentEditable)) {
21548
- if ((n.ctrlKey || n.metaKey) && n.key === "z") n.shiftKey ? (n.preventDefault(), nI()) : (n.preventDefault(), tI());
21549
- else if ((n.ctrlKey || n.metaKey) && n.key === "y") n.preventDefault(), nI();
21550
- else if ((n.ctrlKey || n.metaKey) && n.key === "c") n.preventDefault(), rI();
21551
- else if ((n.ctrlKey || n.metaKey) && n.key === "v") n.preventDefault(), iI();
21552
- else if (n.key === "Delete" || n.key === "Backspace") eI.selectedElementIds.length > 0 && (n.preventDefault(), sI());
21701
+ if ((n.ctrlKey || n.metaKey) && n.key === "z") n.shiftKey ? (n.preventDefault(), rI()) : (n.preventDefault(), nI());
21702
+ else if ((n.ctrlKey || n.metaKey) && n.key === "y") n.preventDefault(), rI();
21703
+ else if ((n.ctrlKey || n.metaKey) && n.key === "c") n.preventDefault(), iI();
21704
+ else if ((n.ctrlKey || n.metaKey) && n.key === "v") n.preventDefault(), aI();
21705
+ else if (n.key === "Delete" || n.key === "Backspace") tI.selectedElementIds.length > 0 && (n.preventDefault(), cI());
21553
21706
  else if ([
21554
21707
  "ArrowUp",
21555
21708
  "ArrowDown",
21556
21709
  "ArrowLeft",
21557
21710
  "ArrowRight"
21558
- ].includes(n.key) && eI.selectedElementIds.length > 0) {
21711
+ ].includes(n.key) && tI.selectedElementIds.length > 0) {
21559
21712
  n.preventDefault();
21560
21713
  let _ = n.shiftKey ? 10 : 1, E = [];
21561
- eI.selectedElementIds.forEach((O) => {
21562
- let A = eI.elements.find((n) => n.id === O);
21714
+ tI.selectedElementIds.forEach((O) => {
21715
+ let A = tI.elements.find((n) => n.id === O);
21563
21716
  if (A) {
21564
21717
  let j = {};
21565
21718
  n.key === "ArrowUp" && (j.y = A.y - _), n.key === "ArrowDown" && (j.y = A.y + _), n.key === "ArrowLeft" && (j.x = A.x - _), n.key === "ArrowRight" && (j.x = A.x + _), E.push({
@@ -21567,66 +21720,66 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21567
21720
  changes: j
21568
21721
  });
21569
21722
  }
21570
- }), E.length > 0 && cI(E);
21723
+ }), E.length > 0 && lI(E);
21571
21724
  }
21572
21725
  }
21573
21726
  };
21574
21727
  return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
21575
21728
  }, [
21576
- tI,
21577
21729
  nI,
21578
21730
  rI,
21579
21731
  iI,
21580
- sI,
21581
- eI.selectedElementIds,
21582
- eI.elements,
21583
- cI
21732
+ aI,
21733
+ cI,
21734
+ tI.selectedElementIds,
21735
+ tI.elements,
21736
+ lI
21584
21737
  ]), React.useEffect(() => {
21585
21738
  if (E) try {
21586
21739
  let n = typeof E == "string" ? JSON.parse(E) : E;
21587
- Array.isArray(n) ? $F({ elements: n }) : n.elements && $F(n);
21740
+ Array.isArray(n) ? eI({ elements: n }) : n.elements && eI(n);
21588
21741
  } catch (n) {
21589
21742
  console.error("Failed to load initial state", n);
21590
21743
  }
21591
- }, [E, $F]), React.useEffect(() => {
21744
+ }, [E, eI]), React.useEffect(() => {
21592
21745
  if (!(!j || j.length === 0)) {
21593
21746
  if (M) {
21594
- YF(M);
21747
+ XF(M);
21595
21748
  return;
21596
21749
  }
21597
- JF || YF(j[0].id);
21750
+ YF || XF(j[0].id);
21598
21751
  }
21599
21752
  }, [
21600
21753
  M,
21601
- JF,
21754
+ YF,
21602
21755
  j
21603
21756
  ]);
21604
- let pI = React.useCallback((n) => {
21757
+ let mI = React.useCallback((n) => {
21605
21758
  if (n) try {
21606
21759
  let _ = typeof n == "string" ? JSON.parse(n) : n;
21607
21760
  if (Array.isArray(_)) {
21608
- $F({ elements: _ });
21761
+ eI({ elements: _ });
21609
21762
  return;
21610
21763
  }
21611
21764
  if (_ && typeof _ == "object" && "elements" in _) {
21612
- $F(_);
21765
+ eI(_);
21613
21766
  return;
21614
21767
  }
21615
21768
  } catch (n) {
21616
21769
  console.error("Failed to apply template", n);
21617
21770
  }
21618
- }, [$F]);
21771
+ }, [eI]);
21619
21772
  React.useEffect(() => {
21620
- if (!j || j.length === 0 || !M || XF.current === M) return;
21773
+ if (!j || j.length === 0 || !M || ZF.current === M) return;
21621
21774
  let n = j.find((n) => n.id === M);
21622
- n && (pI(n.state), XF.current = M);
21775
+ n && (mI(n.state), ZF.current = M);
21623
21776
  }, [
21624
21777
  M,
21625
- pI,
21778
+ mI,
21626
21779
  j
21627
21780
  ]);
21628
- let mI = (n) => {
21629
- console.log(`Adding element of type: ${n}`), ZF({
21781
+ let hI = (n) => {
21782
+ console.log(`Adding element of type: ${n}`), QF({
21630
21783
  type: n,
21631
21784
  content: `New ${n}`
21632
21785
  });
@@ -21696,19 +21849,19 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21696
21849
  style: { width: "240px" },
21697
21850
  children: [
21698
21851
  /* @__PURE__ */ jsx(v$3, {
21699
- onSelect: () => mI("text"),
21852
+ onSelect: () => hI("text"),
21700
21853
  children: "Texto"
21701
21854
  }),
21702
21855
  /* @__PURE__ */ jsx(v$3, {
21703
- onSelect: () => mI("image"),
21856
+ onSelect: () => hI("image"),
21704
21857
  children: "Imagem"
21705
21858
  }),
21706
21859
  /* @__PURE__ */ jsx(v$3, {
21707
- onSelect: () => mI("box"),
21860
+ onSelect: () => hI("box"),
21708
21861
  children: "Caixa (Container)"
21709
21862
  }),
21710
21863
  /* @__PURE__ */ jsx(v$3, {
21711
- onSelect: () => mI("text-container"),
21864
+ onSelect: () => hI("text-container"),
21712
21865
  children: "Container com Texto"
21713
21866
  })
21714
21867
  ]
@@ -21724,12 +21877,12 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21724
21877
  onClick: () => {
21725
21878
  if (O) {
21726
21879
  let n = {
21727
- elements: eI.elements,
21728
- isList: eI.isList,
21729
- mockData: eI.mockData,
21730
- singleMockData: eI.singleMockData,
21731
- listSettings: eI.listSettings,
21732
- canvasHeight: eI.canvasHeight
21880
+ elements: tI.elements,
21881
+ isList: tI.isList,
21882
+ mockData: tI.mockData,
21883
+ singleMockData: tI.singleMockData,
21884
+ listSettings: tI.listSettings,
21885
+ canvasHeight: tI.canvasHeight
21733
21886
  };
21734
21887
  O(JSON.stringify(n, null, 2));
21735
21888
  }
@@ -21747,7 +21900,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21747
21900
  cursor: "pointer",
21748
21901
  justifyContent: "center"
21749
21902
  },
21750
- onClick: uI,
21903
+ onClick: dI,
21751
21904
  children: [/* @__PURE__ */ jsx(DownloadIcon, {}), " Exportar"]
21752
21905
  }), /* @__PURE__ */ jsxs(o, {
21753
21906
  variant: "soft",
@@ -21757,16 +21910,16 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21757
21910
  cursor: "pointer",
21758
21911
  justifyContent: "center"
21759
21912
  },
21760
- onClick: dI,
21913
+ onClick: fI,
21761
21914
  children: [/* @__PURE__ */ jsx(UploadIcon, {}), " Importar"]
21762
21915
  })]
21763
21916
  }),
21764
21917
  /* @__PURE__ */ jsx("input", {
21765
21918
  type: "file",
21766
- ref: lI,
21919
+ ref: uI,
21767
21920
  style: { display: "none" },
21768
21921
  accept: ".json",
21769
- onChange: fI
21922
+ onChange: pI
21770
21923
  }),
21771
21924
  /* @__PURE__ */ jsxs(p, {
21772
21925
  mt: "3",
@@ -21827,8 +21980,8 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21827
21980
  /* @__PURE__ */ jsx(p, {
21828
21981
  mt: "2",
21829
21982
  children: /* @__PURE__ */ jsx("select", {
21830
- value: JF || "",
21831
- onChange: (n) => YF(n.target.value),
21983
+ value: YF || "",
21984
+ onChange: (n) => XF(n.target.value),
21832
21985
  style: {
21833
21986
  width: "100%",
21834
21987
  padding: "8px",
@@ -21845,12 +21998,12 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21845
21998
  }, n.id))
21846
21999
  })
21847
22000
  }),
21848
- JF && j.find((n) => n.id === JF)?.description && /* @__PURE__ */ jsx(p$2, {
22001
+ YF && j.find((n) => n.id === YF)?.description && /* @__PURE__ */ jsx(p$2, {
21849
22002
  size: "1",
21850
22003
  color: "gray",
21851
22004
  as: "div",
21852
22005
  mt: "2",
21853
- children: j.find((n) => n.id === JF)?.description
22006
+ children: j.find((n) => n.id === YF)?.description
21854
22007
  }),
21855
22008
  /* @__PURE__ */ jsx(o, {
21856
22009
  variant: "soft",
@@ -21862,13 +22015,13 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
21862
22015
  marginTop: "10px"
21863
22016
  },
21864
22017
  onClick: () => {
21865
- if (!JF) return;
22018
+ if (!YF) return;
21866
22019
  if (N) {
21867
- N(JF);
22020
+ N(YF);
21868
22021
  return;
21869
22022
  }
21870
- let n = j.find((n) => n.id === JF);
21871
- n && (pI(n.state), XF.current = JF);
22023
+ let n = j.find((n) => n.id === YF);
22024
+ n && (mI(n.state), ZF.current = YF);
21872
22025
  },
21873
22026
  children: "Aplicar Template"
21874
22027
  })
@@ -22122,7 +22275,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
22122
22275
  onOpenChange: Z
22123
22276
  }),
22124
22277
  /* @__PURE__ */ jsx(s$4, {
22125
- open: KF,
22278
+ open: qF,
22126
22279
  children: /* @__PURE__ */ jsxs(p$8, {
22127
22280
  style: { maxWidth: 450 },
22128
22281
  children: [/* @__PURE__ */ jsx(g$2, { children: "Dispositivo Não Suportado" }), /* @__PURE__ */ jsx(m$3, {
@@ -22173,6 +22326,9 @@ var camelToKebab = (n) => n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toL
22173
22326
  let O = camelToKebab(n), A = typeof E == "number" && _.includes(n) ? E + "px" : E;
22174
22327
  return typeof A == "string" && /^#([0-9a-fA-F]{8})$/.test(A) && (A = hex8ToRgba(A)), `${O}: ${A}`;
22175
22328
  }).filter(Boolean).join("; ");
22329
+ }, applyShadowColor = (n, _) => {
22330
+ let E = /(rgba?\([^)]+\)|#(?:[0-9a-fA-F]{3,8})|[a-zA-Z]+)\s*$/;
22331
+ return !n || n === "none" ? `0 4px 12px 0 ${_}` : E.test(n) ? n.replace(E, _) : `${n} ${_}`;
22176
22332
  }, measureTextHeight = (n, _, E, O, A = 1.2) => {
22177
22333
  if (!n) return 0;
22178
22334
  try {
@@ -22273,8 +22429,8 @@ var camelToKebab = (n) => n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toL
22273
22429
  } else _ = measureTextHeight(M, B, z, P);
22274
22430
  let U = _ + N * 2;
22275
22431
  (!H || H && !_) && (U += 4);
22276
- let W = parseInt(String(n.style && n.style.minHeight || 0)), G = Math.max(U, W), Z = n.height, KF = G - Z;
22277
- if (KF > 0) {
22432
+ let W = parseInt(String(n.style && n.style.minHeight || 0)), G = Math.max(U, W), Z = n.height, qF = G - Z;
22433
+ if (qF > 0) {
22278
22434
  n.height = G, n.content = M;
22279
22435
  let _ = [], N = O.get(n.id);
22280
22436
  N && E.forEach((E) => {
@@ -22284,10 +22440,10 @@ var camelToKebab = (n) => n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toL
22284
22440
  });
22285
22441
  let P = new Set([n.id]);
22286
22442
  _.forEach((n) => {
22287
- n.height += KF, P.add(n.id);
22443
+ n.height += qF, P.add(n.id);
22288
22444
  }), A.push({
22289
22445
  triggerY: n.y + Z,
22290
- delta: KF,
22446
+ delta: qF,
22291
22447
  ignoreIds: P
22292
22448
  });
22293
22449
  }
@@ -22335,9 +22491,9 @@ var camelToKebab = (n) => n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toL
22335
22491
  });
22336
22492
  });
22337
22493
  let j = {};
22338
- n.styleBindings && Object.entries(n.styleBindings).forEach(([n, E]) => {
22339
- let O = _[E];
22340
- O != null && (j[n] = String(O));
22494
+ n.styleBindings && Object.entries(n.styleBindings).forEach(([E, O]) => {
22495
+ let M = _[O];
22496
+ M != null && (E === "boxShadowColor" ? j.boxShadow = applyShadowColor(A.boxShadow || n.style?.boxShadow, String(M)) : j[E] = String(M));
22341
22497
  });
22342
22498
  let M = {
22343
22499
  width: n.width,
@@ -22405,9 +22561,9 @@ var camelToKebab = (n) => n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toL
22405
22561
  });
22406
22562
  });
22407
22563
  let j = {};
22408
- n.styleBindings && Object.entries(n.styleBindings).forEach(([n, E]) => {
22409
- let O = _[E];
22410
- O != null && (j[n] = String(O));
22564
+ n.styleBindings && Object.entries(n.styleBindings).forEach(([E, O]) => {
22565
+ let M = _[O];
22566
+ M != null && (E === "boxShadowColor" ? j.boxShadow = applyShadowColor(A.boxShadow || n.style?.boxShadow, String(M)) : j[E] = String(M));
22411
22567
  });
22412
22568
  let M = {
22413
22569
  position: "absolute",
@@ -22552,6 +22708,7 @@ var getRuntimeScript = (n, _) => `
22552
22708
  const camelToKebab = ${camelToKebab.toString()};
22553
22709
  const hex8ToRgba = ${hex8ToRgba.toString()};
22554
22710
  const styleObjectToString = ${styleObjectToString.toString()};
22711
+ const applyShadowColor = ${applyShadowColor.toString()};
22555
22712
  const measureTextHeight = ${measureTextHeight.toString()};
22556
22713
  const checkCondition = ${checkCondition.toString()};
22557
22714
  const formatValue = ${formatValue.toString()};