@sanity/ui 3.0.15-canary.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,11 @@
1
1
  import { buildTheme, createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1, getTheme_v2, getScopedTheme } from "@sanity/ui/theme";
2
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
- import { createContext, useContext, useMemo, forwardRef, useId, useState, useEffect, useCallback, Children, isValidElement, cloneElement, useDebugValue, useSyncExternalStore, useRef, useImperativeHandle, lazy, Suspense, useLayoutEffect } from "react";
2
+ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
3
+ import { c } from "react-compiler-runtime";
4
+ import { createContext, useContext, forwardRef, useId, useState, useEffect, Children, isValidElement, cloneElement, useDebugValue, useSyncExternalStore, useRef, useImperativeHandle, lazy, Suspense, useLayoutEffect } from "react";
4
5
  import { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css, styled, keyframes } from "styled-components";
5
6
  import ReactIs, { isValidElementType } from "react-is";
6
7
  import { SpinnerIcon, CheckmarkIcon, RemoveIcon, ChevronDownIcon, CloseIcon, ChevronRightIcon } from "@sanity/icons";
7
- import { detectOverflow, useFloating, autoUpdate, autoPlacement, flip, offset, shift, arrow, hide } from "@floating-ui/react-dom";
8
+ import { detectOverflow, useFloating, autoPlacement, flip, offset, shift, arrow, hide, autoUpdate } from "@floating-ui/react-dom";
8
9
  import { motion, AnimatePresence } from "framer-motion";
9
10
  import { ResizeObserver } from "@juggle/resize-observer";
10
11
  import { createPortal } from "react-dom";
@@ -212,15 +213,42 @@ function createGlobalScopedContext(key2, defaultValue) {
212
213
  }
213
214
  const ThemeContext = createGlobalScopedContext("@sanity/ui/context/theme", null);
214
215
  function ThemeProvider(props) {
215
- const parentTheme = useContext(ThemeContext), {
216
+ const $ = c(15), parentTheme = useContext(ThemeContext), {
216
217
  children
217
- } = props, scheme = props.scheme ?? (parentTheme?.scheme || "light"), rootTheme = props.theme ?? (parentTheme?.theme || null), tone = props.tone ?? (parentTheme?.tone || "default"), themeContext = useMemo(() => rootTheme ? {
218
- version: 0,
219
- theme: rootTheme,
220
- scheme,
221
- tone
222
- } : null, [rootTheme, scheme, tone]), theme = useMemo(() => rootTheme ? getScopedTheme(rootTheme, scheme, tone) : null, [scheme, rootTheme, tone]);
223
- return theme ? /* @__PURE__ */ jsx(ThemeContext.Provider, { value: themeContext, children: /* @__PURE__ */ jsx(ThemeProvider$1, { theme, children }) }) : /* @__PURE__ */ jsx("pre", { children: 'ThemeProvider: no "theme" property provided' });
218
+ } = props, scheme = props.scheme ?? (parentTheme?.scheme || "light"), rootTheme = props.theme ?? (parentTheme?.theme || null), tone = props.tone ?? (parentTheme?.tone || "default");
219
+ let t0;
220
+ bb0: {
221
+ if (!rootTheme) {
222
+ t0 = null;
223
+ break bb0;
224
+ }
225
+ let t12;
226
+ $[0] !== rootTheme || $[1] !== scheme || $[2] !== tone ? (t12 = {
227
+ version: 0,
228
+ theme: rootTheme,
229
+ scheme,
230
+ tone
231
+ }, $[0] = rootTheme, $[1] = scheme, $[2] = tone, $[3] = t12) : t12 = $[3], t0 = t12;
232
+ }
233
+ const themeContext = t0;
234
+ let t1;
235
+ bb1: {
236
+ if (!rootTheme) {
237
+ t1 = null;
238
+ break bb1;
239
+ }
240
+ let t22;
241
+ $[4] !== rootTheme || $[5] !== scheme || $[6] !== tone ? (t22 = getScopedTheme(rootTheme, scheme, tone), $[4] = rootTheme, $[5] = scheme, $[6] = tone, $[7] = t22) : t22 = $[7], t1 = t22;
242
+ }
243
+ const theme = t1;
244
+ if (!theme) {
245
+ let t22;
246
+ return $[8] === Symbol.for("react.memo_cache_sentinel") ? (t22 = /* @__PURE__ */ jsx("pre", { children: 'ThemeProvider: no "theme" property provided' }), $[8] = t22) : t22 = $[8], t22;
247
+ }
248
+ let t2;
249
+ $[9] !== children || $[10] !== theme ? (t2 = /* @__PURE__ */ jsx(ThemeProvider$1, { theme, children }), $[9] = children, $[10] = theme, $[11] = t2) : t2 = $[11];
250
+ let t3;
251
+ return $[12] !== t2 || $[13] !== themeContext ? (t3 = /* @__PURE__ */ jsx(ThemeContext.Provider, { value: themeContext, children: t2 }), $[12] = t2, $[13] = themeContext, $[14] = t3) : t3 = $[14], t3;
224
252
  }
225
253
  ThemeProvider.displayName = "ThemeProvider";
226
254
  function useRootTheme() {
@@ -230,19 +258,22 @@ function useRootTheme() {
230
258
  return value;
231
259
  }
232
260
  function ThemeColorProvider(props) {
233
- const {
261
+ const $ = c(5), {
234
262
  children,
235
263
  scheme,
236
264
  tone
237
- } = props, root = useRootTheme();
238
- return /* @__PURE__ */ jsx(ThemeProvider, { scheme: scheme || root.scheme, theme: root.theme, tone, children });
265
+ } = props, root = useRootTheme(), t0 = scheme || root.scheme;
266
+ let t1;
267
+ return $[0] !== children || $[1] !== root.theme || $[2] !== t0 || $[3] !== tone ? (t1 = /* @__PURE__ */ jsx(ThemeProvider, { scheme: t0, theme: root.theme, tone, children }), $[0] = children, $[1] = root.theme, $[2] = t0, $[3] = tone, $[4] = t1) : t1 = $[4], t1;
239
268
  }
240
269
  ThemeColorProvider.displayName = "ThemeColorProvider";
241
270
  function useTheme() {
242
271
  return useTheme$1();
243
272
  }
244
273
  function useTheme_v2() {
245
- return getTheme_v2(useTheme$1());
274
+ const $ = c(2), t0 = useTheme$1();
275
+ let t1;
276
+ return $[0] !== t0 ? (t1 = getTheme_v2(t0), $[0] = t0, $[1] = t1) : t1 = $[1], t1;
246
277
  }
247
278
  function responsiveBorderStyle() {
248
279
  return [border, borderTop, borderRight, borderBottom, borderLeft];
@@ -957,18 +988,33 @@ const StyledLabel = /* @__PURE__ */ styled.div.withConfig({
957
988
  displayName: "StyledLabel",
958
989
  componentId: "sc-1luap7z-0"
959
990
  })(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), Label = forwardRef(function(props, ref) {
960
- const {
991
+ const $ = c(26);
992
+ let accent, align, childrenProp, restProps, t0, t1, textOverflow, weight;
993
+ $[0] !== props ? ({
961
994
  accent,
962
995
  align,
963
996
  children: childrenProp,
964
- muted = !1,
965
- size: size2 = 2,
997
+ muted: t0,
998
+ size: t1,
966
999
  textOverflow,
967
1000
  weight,
968
1001
  ...restProps
969
- } = props;
1002
+ } = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = childrenProp, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = textOverflow, $[8] = weight) : (accent = $[1], align = $[2], childrenProp = $[3], restProps = $[4], t0 = $[5], t1 = $[6], textOverflow = $[7], weight = $[8]);
1003
+ const muted = t0 === void 0 ? !1 : t0, size2 = t1 === void 0 ? 2 : t1;
970
1004
  let children = childrenProp;
971
- return textOverflow === "ellipsis" ? children = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }) : children = /* @__PURE__ */ jsx("span", { children }), /* @__PURE__ */ jsx(StyledLabel, { "data-ui": "Label", ...restProps, $accent: accent, $align: _getArrayProp(align), $muted: muted, $size: _getArrayProp(size2), $weight: weight, ref, children });
1005
+ if (textOverflow === "ellipsis") {
1006
+ let t22;
1007
+ $[9] !== children ? (t22 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[9] = children, $[10] = t22) : t22 = $[10], children = t22;
1008
+ } else {
1009
+ let t22;
1010
+ $[11] !== children ? (t22 = /* @__PURE__ */ jsx("span", { children }), $[11] = children, $[12] = t22) : t22 = $[12], children = t22;
1011
+ }
1012
+ let t2;
1013
+ $[13] !== align ? (t2 = _getArrayProp(align), $[13] = align, $[14] = t2) : t2 = $[14];
1014
+ let t3;
1015
+ $[15] !== size2 ? (t3 = _getArrayProp(size2), $[15] = size2, $[16] = t3) : t3 = $[16];
1016
+ let t4;
1017
+ return $[17] !== accent || $[18] !== children || $[19] !== muted || $[20] !== ref || $[21] !== restProps || $[22] !== t2 || $[23] !== t3 || $[24] !== weight ? (t4 = /* @__PURE__ */ jsx(StyledLabel, { "data-ui": "Label", ...restProps, $accent: accent, $align: t2, $muted: muted, $size: t3, $weight: weight, ref, children }), $[17] = accent, $[18] = children, $[19] = muted, $[20] = ref, $[21] = restProps, $[22] = t2, $[23] = t3, $[24] = weight, $[25] = t4) : t4 = $[25], t4;
972
1018
  });
973
1019
  Label.displayName = "ForwardRef(Label)";
974
1020
  const avatarStyle = {
@@ -1138,44 +1184,62 @@ const StyledAvatar = /* @__PURE__ */ styled.div.withConfig({
1138
1184
  displayName: "AvatarImage",
1139
1185
  componentId: "sc-1rj7kl0-6"
1140
1186
  })(avatarStyle.image), Avatar = forwardRef(function(props, ref) {
1141
- const {
1187
+ const $ = c(46);
1188
+ let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, restProps, src, t0, t1, t2, title;
1189
+ $[0] !== props ? ({
1142
1190
  __unstable_hideInnerStroke,
1143
1191
  as: asProp,
1144
- color = "gray",
1192
+ color: t0,
1145
1193
  src,
1146
1194
  title,
1147
1195
  initials,
1148
1196
  onImageLoadError,
1149
1197
  arrowPosition: arrowPositionProp,
1150
1198
  animateArrowFrom,
1151
- status = "online",
1152
- size: sizeProp = 1,
1199
+ status: t1,
1200
+ size: t2,
1153
1201
  ...restProps
1154
- } = props, {
1202
+ } = props, $[0] = props, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = asProp, $[5] = initials, $[6] = onImageLoadError, $[7] = restProps, $[8] = src, $[9] = t0, $[10] = t1, $[11] = t2, $[12] = title) : (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], asProp = $[4], initials = $[5], onImageLoadError = $[6], restProps = $[7], src = $[8], t0 = $[9], t1 = $[10], t2 = $[11], title = $[12]);
1203
+ const color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, {
1155
1204
  avatar
1156
1205
  } = useTheme_v2(), as = ReactIs.isValidElementType(asProp) ? asProp : "div", size2 = _getArrayProp(sizeProp), _sizeRem = (avatar.sizes[size2[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = useId(), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageFailed, setImageFailed] = useState(!1), imageId = `avatar-image-${elementId}`;
1157
- useEffect(() => {
1158
- if (arrowPosition === arrowPositionProp) return;
1206
+ let t3, t4;
1207
+ $[13] !== arrowPosition || $[14] !== arrowPositionProp ? (t3 = () => {
1208
+ if (arrowPosition === arrowPositionProp)
1209
+ return;
1159
1210
  const raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
1160
1211
  return () => cancelAnimationFrame(raf);
1161
- }, [arrowPosition, arrowPositionProp]), useEffect(() => {
1212
+ }, t4 = [arrowPosition, arrowPositionProp], $[13] = arrowPosition, $[14] = arrowPositionProp, $[15] = t3, $[16] = t4) : (t3 = $[15], t4 = $[16]), useEffect(t3, t4);
1213
+ let t5, t6;
1214
+ $[17] !== src ? (t5 = () => {
1162
1215
  src && setImageFailed(!1);
1163
- }, [src]);
1164
- const handleImageError = useCallback(() => {
1216
+ }, t6 = [src], $[17] = src, $[18] = t5, $[19] = t6) : (t5 = $[18], t6 = $[19]), useEffect(t5, t6);
1217
+ let t7;
1218
+ $[20] !== onImageLoadError ? (t7 = () => {
1165
1219
  setImageFailed(!0), onImageLoadError && onImageLoadError(new Error("Avatar: the image failed to load"));
1166
- }, [onImageLoadError]);
1167
- return /* @__PURE__ */ jsxs(StyledAvatar, { as, "data-as": typeof as == "string" ? as : void 0, "data-ui": "Avatar", ...restProps, $color: color, $size: size2, "aria-label": title, "data-arrow-position": arrowPosition, "data-status": status, ref, title, children: [
1168
- /* @__PURE__ */ jsx(Arrow$1, { children: /* @__PURE__ */ jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }),
1169
- !imageFailed && src && /* @__PURE__ */ jsxs(AvatarImage, { viewBox: `0 0 ${_sizeRem} ${_sizeRem}`, fill: "none", children: [
1170
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", { id: imageId, patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ jsx("image", { href: src, width: "1", height: "1", onError: handleImageError }) }) }),
1171
- /* @__PURE__ */ jsx("circle", { cx: _radius, cy: _radius, r: _radius, fill: `url(#${imageId})` }),
1172
- !__unstable_hideInnerStroke && /* @__PURE__ */ jsx(BgStroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" }),
1173
- /* @__PURE__ */ jsx(Stroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" })
1174
- ] }),
1175
- (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Initials, { children: /* @__PURE__ */ jsx(InitialsLabel, { forwardedAs: "span", size: size2.map((s) => s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0), weight: "medium", children: initials }) }) })
1176
- ] });
1220
+ }, $[20] = onImageLoadError, $[21] = t7) : t7 = $[21];
1221
+ const handleImageError = t7, T0 = StyledAvatar, t8 = typeof as == "string" ? as : void 0, t9 = "Avatar";
1222
+ let t10;
1223
+ $[22] !== color ? (t10 = /* @__PURE__ */ jsx(Arrow$1, { children: /* @__PURE__ */ jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }), $[22] = color, $[23] = t10) : t10 = $[23];
1224
+ let t11;
1225
+ $[24] !== __unstable_hideInnerStroke || $[25] !== _radius || $[26] !== _sizeRem || $[27] !== handleImageError || $[28] !== imageFailed || $[29] !== imageId || $[30] !== src ? (t11 = !imageFailed && src && /* @__PURE__ */ jsxs(AvatarImage, { viewBox: `0 0 ${_sizeRem} ${_sizeRem}`, fill: "none", children: [
1226
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", { id: imageId, patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ jsx("image", { href: src, width: "1", height: "1", onError: handleImageError }) }) }),
1227
+ /* @__PURE__ */ jsx("circle", { cx: _radius, cy: _radius, r: _radius, fill: `url(#${imageId})` }),
1228
+ !__unstable_hideInnerStroke && /* @__PURE__ */ jsx(BgStroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" }),
1229
+ /* @__PURE__ */ jsx(Stroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" })
1230
+ ] }), $[24] = __unstable_hideInnerStroke, $[25] = _radius, $[26] = _sizeRem, $[27] = handleImageError, $[28] = imageFailed, $[29] = imageId, $[30] = src, $[31] = t11) : t11 = $[31];
1231
+ const t12 = (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Initials, { children: /* @__PURE__ */ jsx(InitialsLabel, { forwardedAs: "span", size: size2.map(_temp$a), weight: "medium", children: initials }) }) });
1232
+ let t13;
1233
+ return $[32] !== T0 || $[33] !== arrowPosition || $[34] !== as || $[35] !== color || $[36] !== ref || $[37] !== restProps || $[38] !== size2 || $[39] !== status || $[40] !== t10 || $[41] !== t11 || $[42] !== t12 || $[43] !== t8 || $[44] !== title ? (t13 = /* @__PURE__ */ jsxs(T0, { as, "data-as": t8, "data-ui": t9, ...restProps, $color: color, $size: size2, "aria-label": title, "data-arrow-position": arrowPosition, "data-status": status, ref, title, children: [
1234
+ t10,
1235
+ t11,
1236
+ t12
1237
+ ] }), $[32] = T0, $[33] = arrowPosition, $[34] = as, $[35] = color, $[36] = ref, $[37] = restProps, $[38] = size2, $[39] = status, $[40] = t10, $[41] = t11, $[42] = t12, $[43] = t8, $[44] = title, $[45] = t13) : t13 = $[45], t13;
1177
1238
  });
1178
1239
  Avatar.displayName = "ForwardRef(Avatar)";
1240
+ function _temp$a(s) {
1241
+ return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
1242
+ }
1179
1243
  function _responsiveAvatarCounterSizeStyle(props) {
1180
1244
  const {
1181
1245
  avatar,
@@ -1216,13 +1280,25 @@ const StyledAvatarCounter = /* @__PURE__ */ styled.div.withConfig({
1216
1280
  displayName: "StyledAvatarCounter",
1217
1281
  componentId: "sc-1ydx86y-0"
1218
1282
  })(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle), AvatarCounter = forwardRef(function(props, ref) {
1219
- const {
1283
+ const $ = c(20), {
1220
1284
  count,
1221
- size: sizeProp = 1
1222
- } = props, size2 = _getArrayProp(sizeProp);
1223
- return /* @__PURE__ */ jsx(StyledAvatarCounter, { $size: size2, "data-ui": "AvatarCounter", ref, children: /* @__PURE__ */ jsx(Label, { as: "span", size: size2.map((s) => s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0), weight: "medium", children: count }) });
1285
+ size: t0
1286
+ } = props, sizeProp = t0 === void 0 ? 1 : t0;
1287
+ let T0, T1, t1, t2, t3, t4, t5;
1288
+ if ($[0] !== ref || $[1] !== sizeProp) {
1289
+ const size2 = _getArrayProp(sizeProp);
1290
+ T1 = StyledAvatarCounter, t3 = size2, t4 = "AvatarCounter", t5 = ref, T0 = Label, t1 = "span", t2 = size2.map(_temp$9), $[0] = ref, $[1] = sizeProp, $[2] = T0, $[3] = T1, $[4] = t1, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5;
1291
+ } else
1292
+ T0 = $[2], T1 = $[3], t1 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8];
1293
+ let t6;
1294
+ $[9] !== T0 || $[10] !== count || $[11] !== t1 || $[12] !== t2 ? (t6 = /* @__PURE__ */ jsx(T0, { as: t1, size: t2, weight: "medium", children: count }), $[9] = T0, $[10] = count, $[11] = t1, $[12] = t2, $[13] = t6) : t6 = $[13];
1295
+ let t7;
1296
+ return $[14] !== T1 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 ? (t7 = /* @__PURE__ */ jsx(T1, { $size: t3, "data-ui": t4, ref: t5, children: t6 }), $[14] = T1, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = t7) : t7 = $[19], t7;
1224
1297
  });
1225
1298
  AvatarCounter.displayName = "ForwardRef(AvatarCounter)";
1299
+ function _temp$9(s) {
1300
+ return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
1301
+ }
1226
1302
  const BASE_STYLES = css`
1227
1303
  white-space: nowrap;
1228
1304
 
@@ -1255,34 +1331,51 @@ const StyledAvatarStack = /* @__PURE__ */ styled.div.withConfig({
1255
1331
  displayName: "StyledAvatarStack",
1256
1332
  componentId: "sc-cysmbb-0"
1257
1333
  })(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = forwardRef(function(props, ref) {
1258
- const {
1334
+ const $ = c(38);
1335
+ let childrenProp, restProps, t0, t1;
1336
+ $[0] !== props ? ({
1259
1337
  children: childrenProp,
1260
- maxLength: maxLengthProp = 4,
1261
- size: sizeProp = 1,
1338
+ maxLength: t0,
1339
+ size: t1,
1262
1340
  ...restProps
1263
- } = props, children = Children.toArray(childrenProp).filter(isValidElement), maxLength = Math.max(maxLengthProp, 0), size2 = _getArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
1264
- return /* @__PURE__ */ jsxs(StyledAvatarStack, { "data-ui": "AvatarStack", ...restProps, ref, $size: size2, children: [
1265
- len === 0 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, { count: len, size: size2 }) }),
1266
- len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, { count: extraCount, size: size2 }) }),
1267
- visibleChildren.map((child, childIndex) => /* @__PURE__ */ jsx("div", { children: cloneElement(child, {
1341
+ } = props, $[0] = props, $[1] = childrenProp, $[2] = restProps, $[3] = t0, $[4] = t1) : (childrenProp = $[1], restProps = $[2], t0 = $[3], t1 = $[4]);
1342
+ const maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1;
1343
+ let T0, t2, t3, t4, t5, t6, t7, t8;
1344
+ if ($[5] !== childrenProp || $[6] !== maxLengthProp || $[7] !== ref || $[8] !== restProps || $[9] !== sizeProp) {
1345
+ const children = Children.toArray(childrenProp).filter(isValidElement), maxLength = Math.max(maxLengthProp, 0);
1346
+ let t92;
1347
+ $[18] !== sizeProp ? (t92 = _getArrayProp(sizeProp), $[18] = sizeProp, $[19] = t92) : t92 = $[19];
1348
+ const size2 = t92, len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
1349
+ T0 = StyledAvatarStack, t2 = "AvatarStack", t3 = restProps, t4 = ref, t5 = size2, $[20] !== len || $[21] !== size2 ? (t6 = len === 0 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, { count: len, size: size2 }) }), $[20] = len, $[21] = size2, $[22] = t6) : t6 = $[22], $[23] !== extraCount || $[24] !== len || $[25] !== size2 ? (t7 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, { count: extraCount, size: size2 }) }), $[23] = extraCount, $[24] = len, $[25] = size2, $[26] = t7) : t7 = $[26];
1350
+ let t10;
1351
+ $[27] !== size2 ? (t10 = (child, childIndex) => /* @__PURE__ */ jsx("div", { children: cloneElement(child, {
1268
1352
  size: size2
1269
- }) }, String(childIndex)))
1270
- ] });
1353
+ }) }, String(childIndex)), $[27] = size2, $[28] = t10) : t10 = $[28], t8 = visibleChildren.map(t10), $[5] = childrenProp, $[6] = maxLengthProp, $[7] = ref, $[8] = restProps, $[9] = sizeProp, $[10] = T0, $[11] = t2, $[12] = t3, $[13] = t4, $[14] = t5, $[15] = t6, $[16] = t7, $[17] = t8;
1354
+ } else
1355
+ T0 = $[10], t2 = $[11], t3 = $[12], t4 = $[13], t5 = $[14], t6 = $[15], t7 = $[16], t8 = $[17];
1356
+ let t9;
1357
+ return $[29] !== T0 || $[30] !== t2 || $[31] !== t3 || $[32] !== t4 || $[33] !== t5 || $[34] !== t6 || $[35] !== t7 || $[36] !== t8 ? (t9 = /* @__PURE__ */ jsxs(T0, { "data-ui": t2, ...t3, ref: t4, $size: t5, children: [
1358
+ t6,
1359
+ t7,
1360
+ t8
1361
+ ] }), $[29] = T0, $[30] = t2, $[31] = t3, $[32] = t4, $[33] = t5, $[34] = t6, $[35] = t7, $[36] = t8, $[37] = t9) : t9 = $[37], t9;
1271
1362
  });
1272
1363
  AvatarStack.displayName = "ForwardRef(AvatarStack)";
1273
1364
  const StyledBox = /* @__PURE__ */ styled.div.withConfig({
1274
1365
  displayName: "StyledBox",
1275
1366
  componentId: "sc-1hhky9f-0"
1276
1367
  })(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = forwardRef(function(props, ref) {
1277
- const {
1278
- as: asProp = "div",
1368
+ const $ = c(109);
1369
+ let column, columnEnd, columnStart, flex, height, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, overflow, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, restProps, row, rowEnd, rowStart, sizing, t0, t1, t2, t3;
1370
+ $[0] !== props ? ({
1371
+ as: t0,
1279
1372
  column,
1280
1373
  columnStart,
1281
1374
  columnEnd,
1282
- display = "block",
1375
+ display: t1,
1283
1376
  flex,
1284
1377
  height,
1285
- margin = 0,
1378
+ margin: t2,
1286
1379
  marginX,
1287
1380
  marginY,
1288
1381
  marginTop,
@@ -1290,7 +1383,7 @@ const StyledBox = /* @__PURE__ */ styled.div.withConfig({
1290
1383
  marginBottom,
1291
1384
  marginLeft,
1292
1385
  overflow,
1293
- padding = 0,
1386
+ padding: t3,
1294
1387
  paddingX,
1295
1388
  paddingY,
1296
1389
  paddingTop,
@@ -1302,8 +1395,60 @@ const StyledBox = /* @__PURE__ */ styled.div.withConfig({
1302
1395
  rowEnd,
1303
1396
  sizing,
1304
1397
  ...restProps
1305
- } = props;
1306
- return /* @__PURE__ */ jsx(StyledBox, { "data-as": typeof asProp == "string" ? asProp : void 0, "data-ui": "Box", ...restProps, $column: _getArrayProp(column), $columnStart: _getArrayProp(columnStart), $columnEnd: _getArrayProp(columnEnd), $display: _getArrayProp(display), $flex: _getArrayProp(flex), $height: _getArrayProp(height), $margin: _getArrayProp(margin), $marginX: _getArrayProp(marginX), $marginY: _getArrayProp(marginY), $marginTop: _getArrayProp(marginTop), $marginRight: _getArrayProp(marginRight), $marginBottom: _getArrayProp(marginBottom), $marginLeft: _getArrayProp(marginLeft), $overflow: _getArrayProp(overflow), $padding: _getArrayProp(padding), $paddingX: _getArrayProp(paddingX), $paddingY: _getArrayProp(paddingY), $paddingTop: _getArrayProp(paddingTop), $paddingRight: _getArrayProp(paddingRight), $paddingBottom: _getArrayProp(paddingBottom), $paddingLeft: _getArrayProp(paddingLeft), $row: _getArrayProp(row), $rowStart: _getArrayProp(rowStart), $rowEnd: _getArrayProp(rowEnd), $sizing: _getArrayProp(sizing), as: asProp, ref, children: props.children });
1398
+ } = props, $[0] = props, $[1] = column, $[2] = columnEnd, $[3] = columnStart, $[4] = flex, $[5] = height, $[6] = marginBottom, $[7] = marginLeft, $[8] = marginRight, $[9] = marginTop, $[10] = marginX, $[11] = marginY, $[12] = overflow, $[13] = paddingBottom, $[14] = paddingLeft, $[15] = paddingRight, $[16] = paddingTop, $[17] = paddingX, $[18] = paddingY, $[19] = restProps, $[20] = row, $[21] = rowEnd, $[22] = rowStart, $[23] = sizing, $[24] = t0, $[25] = t1, $[26] = t2, $[27] = t3) : (column = $[1], columnEnd = $[2], columnStart = $[3], flex = $[4], height = $[5], marginBottom = $[6], marginLeft = $[7], marginRight = $[8], marginTop = $[9], marginX = $[10], marginY = $[11], overflow = $[12], paddingBottom = $[13], paddingLeft = $[14], paddingRight = $[15], paddingTop = $[16], paddingX = $[17], paddingY = $[18], restProps = $[19], row = $[20], rowEnd = $[21], rowStart = $[22], sizing = $[23], t0 = $[24], t1 = $[25], t2 = $[26], t3 = $[27]);
1399
+ const asProp = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 0 : t3, t4 = typeof asProp == "string" ? asProp : void 0;
1400
+ let t5;
1401
+ $[28] !== column ? (t5 = _getArrayProp(column), $[28] = column, $[29] = t5) : t5 = $[29];
1402
+ let t6;
1403
+ $[30] !== columnStart ? (t6 = _getArrayProp(columnStart), $[30] = columnStart, $[31] = t6) : t6 = $[31];
1404
+ let t7;
1405
+ $[32] !== columnEnd ? (t7 = _getArrayProp(columnEnd), $[32] = columnEnd, $[33] = t7) : t7 = $[33];
1406
+ let t8;
1407
+ $[34] !== display ? (t8 = _getArrayProp(display), $[34] = display, $[35] = t8) : t8 = $[35];
1408
+ let t9;
1409
+ $[36] !== flex ? (t9 = _getArrayProp(flex), $[36] = flex, $[37] = t9) : t9 = $[37];
1410
+ let t10;
1411
+ $[38] !== height ? (t10 = _getArrayProp(height), $[38] = height, $[39] = t10) : t10 = $[39];
1412
+ let t11;
1413
+ $[40] !== margin ? (t11 = _getArrayProp(margin), $[40] = margin, $[41] = t11) : t11 = $[41];
1414
+ let t12;
1415
+ $[42] !== marginX ? (t12 = _getArrayProp(marginX), $[42] = marginX, $[43] = t12) : t12 = $[43];
1416
+ let t13;
1417
+ $[44] !== marginY ? (t13 = _getArrayProp(marginY), $[44] = marginY, $[45] = t13) : t13 = $[45];
1418
+ let t14;
1419
+ $[46] !== marginTop ? (t14 = _getArrayProp(marginTop), $[46] = marginTop, $[47] = t14) : t14 = $[47];
1420
+ let t15;
1421
+ $[48] !== marginRight ? (t15 = _getArrayProp(marginRight), $[48] = marginRight, $[49] = t15) : t15 = $[49];
1422
+ let t16;
1423
+ $[50] !== marginBottom ? (t16 = _getArrayProp(marginBottom), $[50] = marginBottom, $[51] = t16) : t16 = $[51];
1424
+ let t17;
1425
+ $[52] !== marginLeft ? (t17 = _getArrayProp(marginLeft), $[52] = marginLeft, $[53] = t17) : t17 = $[53];
1426
+ let t18;
1427
+ $[54] !== overflow ? (t18 = _getArrayProp(overflow), $[54] = overflow, $[55] = t18) : t18 = $[55];
1428
+ let t19;
1429
+ $[56] !== padding ? (t19 = _getArrayProp(padding), $[56] = padding, $[57] = t19) : t19 = $[57];
1430
+ let t20;
1431
+ $[58] !== paddingX ? (t20 = _getArrayProp(paddingX), $[58] = paddingX, $[59] = t20) : t20 = $[59];
1432
+ let t21;
1433
+ $[60] !== paddingY ? (t21 = _getArrayProp(paddingY), $[60] = paddingY, $[61] = t21) : t21 = $[61];
1434
+ let t22;
1435
+ $[62] !== paddingTop ? (t22 = _getArrayProp(paddingTop), $[62] = paddingTop, $[63] = t22) : t22 = $[63];
1436
+ let t23;
1437
+ $[64] !== paddingRight ? (t23 = _getArrayProp(paddingRight), $[64] = paddingRight, $[65] = t23) : t23 = $[65];
1438
+ let t24;
1439
+ $[66] !== paddingBottom ? (t24 = _getArrayProp(paddingBottom), $[66] = paddingBottom, $[67] = t24) : t24 = $[67];
1440
+ let t25;
1441
+ $[68] !== paddingLeft ? (t25 = _getArrayProp(paddingLeft), $[68] = paddingLeft, $[69] = t25) : t25 = $[69];
1442
+ let t26;
1443
+ $[70] !== row ? (t26 = _getArrayProp(row), $[70] = row, $[71] = t26) : t26 = $[71];
1444
+ let t27;
1445
+ $[72] !== rowStart ? (t27 = _getArrayProp(rowStart), $[72] = rowStart, $[73] = t27) : t27 = $[73];
1446
+ let t28;
1447
+ $[74] !== rowEnd ? (t28 = _getArrayProp(rowEnd), $[74] = rowEnd, $[75] = t28) : t28 = $[75];
1448
+ let t29;
1449
+ $[76] !== sizing ? (t29 = _getArrayProp(sizing), $[76] = sizing, $[77] = t29) : t29 = $[77];
1450
+ let t30;
1451
+ return $[78] !== asProp || $[79] !== props.children || $[80] !== ref || $[81] !== restProps || $[82] !== t10 || $[83] !== t11 || $[84] !== t12 || $[85] !== t13 || $[86] !== t14 || $[87] !== t15 || $[88] !== t16 || $[89] !== t17 || $[90] !== t18 || $[91] !== t19 || $[92] !== t20 || $[93] !== t21 || $[94] !== t22 || $[95] !== t23 || $[96] !== t24 || $[97] !== t25 || $[98] !== t26 || $[99] !== t27 || $[100] !== t28 || $[101] !== t29 || $[102] !== t4 || $[103] !== t5 || $[104] !== t6 || $[105] !== t7 || $[106] !== t8 || $[107] !== t9 ? (t30 = /* @__PURE__ */ jsx(StyledBox, { "data-as": t4, "data-ui": "Box", ...restProps, $column: t5, $columnStart: t6, $columnEnd: t7, $display: t8, $flex: t9, $height: t10, $margin: t11, $marginX: t12, $marginY: t13, $marginTop: t14, $marginRight: t15, $marginBottom: t16, $marginLeft: t17, $overflow: t18, $padding: t19, $paddingX: t20, $paddingY: t21, $paddingTop: t22, $paddingRight: t23, $paddingBottom: t24, $paddingLeft: t25, $row: t26, $rowStart: t27, $rowEnd: t28, $sizing: t29, as: asProp, ref, children: props.children }), $[78] = asProp, $[79] = props.children, $[80] = ref, $[81] = restProps, $[82] = t10, $[83] = t11, $[84] = t12, $[85] = t13, $[86] = t14, $[87] = t15, $[88] = t16, $[89] = t17, $[90] = t18, $[91] = t19, $[92] = t20, $[93] = t21, $[94] = t22, $[95] = t23, $[96] = t24, $[97] = t25, $[98] = t26, $[99] = t27, $[100] = t28, $[101] = t29, $[102] = t4, $[103] = t5, $[104] = t6, $[105] = t7, $[106] = t8, $[107] = t9, $[108] = t30) : t30 = $[108], t30;
1307
1452
  });
1308
1453
  Box.displayName = "ForwardRef(Box)";
1309
1454
  function textBaseStyle(props) {
@@ -1378,18 +1523,32 @@ const StyledText = /* @__PURE__ */ styled.div.withConfig({
1378
1523
  displayName: "StyledText",
1379
1524
  componentId: "sc-11ov82j-0"
1380
1525
  })(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle), Text = forwardRef(function(props, ref) {
1381
- const {
1382
- accent = !1,
1526
+ const $ = c(26);
1527
+ let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
1528
+ $[0] !== props ? ({
1529
+ accent: t0,
1383
1530
  align,
1384
1531
  children: childrenProp,
1385
- muted = !1,
1386
- size: size2 = 2,
1532
+ muted: t1,
1533
+ size: t2,
1387
1534
  textOverflow,
1388
1535
  weight,
1389
1536
  ...restProps
1390
- } = props;
1537
+ } = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = textOverflow, $[8] = weight) : (align = $[1], childrenProp = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], textOverflow = $[7], weight = $[8]);
1538
+ const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
1391
1539
  let children = childrenProp;
1392
- return textOverflow === "ellipsis" && (children = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children })), /* @__PURE__ */ jsx(StyledText, { "data-ui": "Text", ...restProps, $accent: accent, $align: _getArrayProp(align), $muted: muted, ref, $size: _getArrayProp(size2), $weight: weight, children: /* @__PURE__ */ jsx("span", { children }) });
1540
+ if (textOverflow === "ellipsis") {
1541
+ let t32;
1542
+ $[9] !== children ? (t32 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[9] = children, $[10] = t32) : t32 = $[10], children = t32;
1543
+ }
1544
+ let t3;
1545
+ $[11] !== align ? (t3 = _getArrayProp(align), $[11] = align, $[12] = t3) : t3 = $[12];
1546
+ let t4;
1547
+ $[13] !== size2 ? (t4 = _getArrayProp(size2), $[13] = size2, $[14] = t4) : t4 = $[14];
1548
+ let t5;
1549
+ $[15] !== children ? (t5 = /* @__PURE__ */ jsx("span", { children }), $[15] = children, $[16] = t5) : t5 = $[16];
1550
+ let t6;
1551
+ return $[17] !== accent || $[18] !== muted || $[19] !== ref || $[20] !== restProps || $[21] !== t3 || $[22] !== t4 || $[23] !== t5 || $[24] !== weight ? (t6 = /* @__PURE__ */ jsx(StyledText, { "data-ui": "Text", ...restProps, $accent: accent, $align: t3, $muted: muted, ref, $size: t4, $weight: weight, children: t5 }), $[17] = accent, $[18] = muted, $[19] = ref, $[20] = restProps, $[21] = t3, $[22] = t4, $[23] = t5, $[24] = weight, $[25] = t6) : t6 = $[25], t6;
1393
1552
  });
1394
1553
  Text.displayName = "ForwardRef(Text)";
1395
1554
  function badgeStyle(props) {
@@ -1411,33 +1570,60 @@ const StyledBadge = /* @__PURE__ */ styled(Box).withConfig({
1411
1570
  displayName: "StyledBadge",
1412
1571
  componentId: "sc-5u140l-0"
1413
1572
  })(responsiveRadiusStyle, badgeStyle), Badge = forwardRef(function(props, ref) {
1414
- const {
1415
- children,
1416
- fontSize: fontSize2 = 1,
1417
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1418
- mode: _deprecated_mode,
1419
- padding = 1,
1420
- radius = "full",
1421
- tone = "default",
1422
- ...restProps
1423
- } = props;
1424
- return /* @__PURE__ */ jsx(StyledBadge, { "data-ui": "Badge", ...restProps, $tone: tone, $radius: _getArrayProp(radius), padding: _getArrayProp(padding), ref, children: /* @__PURE__ */ jsx(Text, { size: fontSize2, children }) });
1573
+ const $ = c(21);
1574
+ let children, restProps, t0, t1, t2, t3;
1575
+ if ($[0] !== props) {
1576
+ const {
1577
+ children: t42,
1578
+ fontSize: t52,
1579
+ mode: _deprecated_mode,
1580
+ padding: t62,
1581
+ radius: t72,
1582
+ tone: t8,
1583
+ ...t9
1584
+ } = props;
1585
+ children = t42, t0 = t52, t1 = t62, t2 = t72, t3 = t8, restProps = t9, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2, $[6] = t3;
1586
+ } else
1587
+ children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5], t3 = $[6];
1588
+ const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? "full" : t2, tone = t3 === void 0 ? "default" : t3;
1589
+ let t4;
1590
+ $[7] !== radius ? (t4 = _getArrayProp(radius), $[7] = radius, $[8] = t4) : t4 = $[8];
1591
+ let t5;
1592
+ $[9] !== padding ? (t5 = _getArrayProp(padding), $[9] = padding, $[10] = t5) : t5 = $[10];
1593
+ let t6;
1594
+ $[11] !== children || $[12] !== fontSize2 ? (t6 = /* @__PURE__ */ jsx(Text, { size: fontSize2, children }), $[11] = children, $[12] = fontSize2, $[13] = t6) : t6 = $[13];
1595
+ let t7;
1596
+ return $[14] !== ref || $[15] !== restProps || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 || $[19] !== tone ? (t7 = /* @__PURE__ */ jsx(StyledBadge, { "data-ui": "Badge", ...restProps, $tone: tone, $radius: t4, padding: t5, ref, children: t6 }), $[14] = ref, $[15] = restProps, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = tone, $[20] = t7) : t7 = $[20], t7;
1425
1597
  });
1426
1598
  Badge.displayName = "ForwardRef(Badge)";
1427
1599
  const StyledFlex = /* @__PURE__ */ styled(Box).withConfig({
1428
1600
  displayName: "StyledFlex",
1429
1601
  componentId: "sc-oxesg3-0"
1430
1602
  })(flexItemStyle, responsiveFlexStyle), Flex = forwardRef(function(props, ref) {
1431
- const {
1603
+ const $ = c(27);
1604
+ let align, as, gap, justify, restProps, t0, wrap;
1605
+ $[0] !== props ? ({
1432
1606
  align,
1433
1607
  as,
1434
- direction = "row",
1608
+ direction: t0,
1435
1609
  gap,
1436
1610
  justify,
1437
1611
  wrap,
1438
1612
  ...restProps
1439
- } = props;
1440
- return /* @__PURE__ */ jsx(StyledFlex, { "data-ui": "Flex", ...restProps, $align: _getArrayProp(align), $direction: _getArrayProp(direction), $gap: _getArrayProp(gap), $justify: _getArrayProp(justify), $wrap: _getArrayProp(wrap), forwardedAs: as, ref });
1613
+ } = props, $[0] = props, $[1] = align, $[2] = as, $[3] = gap, $[4] = justify, $[5] = restProps, $[6] = t0, $[7] = wrap) : (align = $[1], as = $[2], gap = $[3], justify = $[4], restProps = $[5], t0 = $[6], wrap = $[7]);
1614
+ const direction = t0 === void 0 ? "row" : t0;
1615
+ let t1;
1616
+ $[8] !== align ? (t1 = _getArrayProp(align), $[8] = align, $[9] = t1) : t1 = $[9];
1617
+ let t2;
1618
+ $[10] !== direction ? (t2 = _getArrayProp(direction), $[10] = direction, $[11] = t2) : t2 = $[11];
1619
+ let t3;
1620
+ $[12] !== gap ? (t3 = _getArrayProp(gap), $[12] = gap, $[13] = t3) : t3 = $[13];
1621
+ let t4;
1622
+ $[14] !== justify ? (t4 = _getArrayProp(justify), $[14] = justify, $[15] = t4) : t4 = $[15];
1623
+ let t5;
1624
+ $[16] !== wrap ? (t5 = _getArrayProp(wrap), $[16] = wrap, $[17] = t5) : t5 = $[17];
1625
+ let t6;
1626
+ return $[18] !== as || $[19] !== ref || $[20] !== restProps || $[21] !== t1 || $[22] !== t2 || $[23] !== t3 || $[24] !== t4 || $[25] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledFlex, { "data-ui": "Flex", ...restProps, $align: t1, $direction: t2, $gap: t3, $justify: t4, $wrap: t5, forwardedAs: as, ref }), $[18] = as, $[19] = ref, $[20] = restProps, $[21] = t1, $[22] = t2, $[23] = t3, $[24] = t4, $[25] = t5, $[26] = t6) : t6 = $[26], t6;
1441
1627
  });
1442
1628
  Flex.displayName = "ForwardRef(Flex)";
1443
1629
  const rotate = keyframes`
@@ -1452,7 +1638,11 @@ const rotate = keyframes`
1452
1638
  displayName: "StyledSpinner",
1453
1639
  componentId: "sc-124hnd0-0"
1454
1640
  })`& > span > svg{animation:${rotate} 500ms linear infinite;}`, Spinner = forwardRef(function(props, ref) {
1455
- return /* @__PURE__ */ jsx(StyledSpinner, { "data-ui": "Spinner", ...props, ref, children: /* @__PURE__ */ jsx(SpinnerIcon, {}) });
1641
+ const $ = c(4);
1642
+ let t0;
1643
+ $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsx(SpinnerIcon, {}), $[0] = t0) : t0 = $[0];
1644
+ let t1;
1645
+ return $[1] !== props || $[2] !== ref ? (t1 = /* @__PURE__ */ jsx(StyledSpinner, { "data-ui": "Spinner", ...props, ref, children: t0 }), $[1] = props, $[2] = ref, $[3] = t1) : t1 = $[3], t1;
1456
1646
  });
1457
1647
  Spinner.displayName = "ForwardRef(Spinner)";
1458
1648
  function _cardColorStyle(base, color, checkered = !1) {
@@ -1630,37 +1820,71 @@ const StyledButton = /* @__PURE__ */ styled.button.withConfig({
1630
1820
  displayName: "LoadingBox",
1631
1821
  componentId: "sc-aaekt4-1"
1632
1822
  })`position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background-color:var(--card-bg-color);border-radius:inherit;z-index:1;box-shadow:inherit;`, Button = forwardRef(function(props, ref) {
1633
- const {
1823
+ const $ = c(86);
1824
+ let IconComponent, IconRightComponent, children, disabled, loading, paddingBottomProp, paddingLeftProp, paddingRightProp, paddingTopProp, paddingXProp, paddingYProp, restProps, selected, t0, t1, t2, t3, t4, t5, t6, t7, t8, text, textAlign, textWeight, width;
1825
+ $[0] !== props ? ({
1634
1826
  children,
1635
1827
  disabled,
1636
- fontSize: fontSize2 = 1,
1828
+ fontSize: t0,
1637
1829
  icon: IconComponent,
1638
1830
  iconRight: IconRightComponent,
1639
- justify: justifyProp = "center",
1831
+ justify: t1,
1640
1832
  loading,
1641
- mode = "default",
1642
- padding: paddingProp = 3,
1833
+ mode: t2,
1834
+ padding: t3,
1643
1835
  paddingX: paddingXProp,
1644
1836
  paddingY: paddingYProp,
1645
1837
  paddingTop: paddingTopProp,
1646
1838
  paddingBottom: paddingBottomProp,
1647
1839
  paddingLeft: paddingLeftProp,
1648
1840
  paddingRight: paddingRightProp,
1649
- radius: radiusProp = 2,
1841
+ radius: t4,
1650
1842
  selected,
1651
- space: spaceProp = 3,
1843
+ space: t5,
1652
1844
  text,
1653
1845
  textAlign,
1654
1846
  textWeight,
1655
- tone = "default",
1656
- type = "button",
1657
- muted = !1,
1847
+ tone: t6,
1848
+ type: t7,
1849
+ muted: t8,
1658
1850
  width,
1659
1851
  ...restProps
1660
- } = props, {
1852
+ } = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = loading, $[6] = paddingBottomProp, $[7] = paddingLeftProp, $[8] = paddingRightProp, $[9] = paddingTopProp, $[10] = paddingXProp, $[11] = paddingYProp, $[12] = restProps, $[13] = selected, $[14] = t0, $[15] = t1, $[16] = t2, $[17] = t3, $[18] = t4, $[19] = t5, $[20] = t6, $[21] = t7, $[22] = t8, $[23] = text, $[24] = textAlign, $[25] = textWeight, $[26] = width) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], loading = $[5], paddingBottomProp = $[6], paddingLeftProp = $[7], paddingRightProp = $[8], paddingTopProp = $[9], paddingXProp = $[10], paddingYProp = $[11], restProps = $[12], selected = $[13], t0 = $[14], t1 = $[15], t2 = $[16], t3 = $[17], t4 = $[18], t5 = $[19], t6 = $[20], t7 = $[21], t8 = $[22], text = $[23], textAlign = $[24], textWeight = $[25], width = $[26]);
1853
+ const fontSize2 = t0 === void 0 ? 1 : t0, justifyProp = t1 === void 0 ? "center" : t1, mode = t2 === void 0 ? "default" : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, spaceProp = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, type = t7 === void 0 ? "button" : t7, muted = t8 === void 0 ? !1 : t8, {
1661
1854
  button
1662
- } = useTheme_v2(), justify = _getArrayProp(justifyProp), padding = _getArrayProp(paddingProp), paddingX = _getArrayProp(paddingXProp), paddingY = _getArrayProp(paddingYProp), paddingTop = _getArrayProp(paddingTopProp), paddingBottom = _getArrayProp(paddingBottomProp), paddingLeft = _getArrayProp(paddingLeftProp), paddingRight = _getArrayProp(paddingRightProp), radius = _getArrayProp(radiusProp), space = _getArrayProp(spaceProp), boxProps = useMemo(() => ({
1663
- // flex: 1,
1855
+ } = useTheme_v2();
1856
+ let t9;
1857
+ $[27] !== justifyProp ? (t9 = _getArrayProp(justifyProp), $[27] = justifyProp, $[28] = t9) : t9 = $[28];
1858
+ const justify = t9;
1859
+ let t10;
1860
+ $[29] !== paddingProp ? (t10 = _getArrayProp(paddingProp), $[29] = paddingProp, $[30] = t10) : t10 = $[30];
1861
+ const padding = t10;
1862
+ let t11;
1863
+ $[31] !== paddingXProp ? (t11 = _getArrayProp(paddingXProp), $[31] = paddingXProp, $[32] = t11) : t11 = $[32];
1864
+ const paddingX = t11;
1865
+ let t12;
1866
+ $[33] !== paddingYProp ? (t12 = _getArrayProp(paddingYProp), $[33] = paddingYProp, $[34] = t12) : t12 = $[34];
1867
+ const paddingY = t12;
1868
+ let t13;
1869
+ $[35] !== paddingTopProp ? (t13 = _getArrayProp(paddingTopProp), $[35] = paddingTopProp, $[36] = t13) : t13 = $[36];
1870
+ const paddingTop = t13;
1871
+ let t14;
1872
+ $[37] !== paddingBottomProp ? (t14 = _getArrayProp(paddingBottomProp), $[37] = paddingBottomProp, $[38] = t14) : t14 = $[38];
1873
+ const paddingBottom = t14;
1874
+ let t15;
1875
+ $[39] !== paddingLeftProp ? (t15 = _getArrayProp(paddingLeftProp), $[39] = paddingLeftProp, $[40] = t15) : t15 = $[40];
1876
+ const paddingLeft = t15;
1877
+ let t16;
1878
+ $[41] !== paddingRightProp ? (t16 = _getArrayProp(paddingRightProp), $[41] = paddingRightProp, $[42] = t16) : t16 = $[42];
1879
+ const paddingRight = t16;
1880
+ let t17;
1881
+ $[43] !== radiusProp ? (t17 = _getArrayProp(radiusProp), $[43] = radiusProp, $[44] = t17) : t17 = $[44];
1882
+ const radius = t17;
1883
+ let t18;
1884
+ $[45] !== spaceProp ? (t18 = _getArrayProp(spaceProp), $[45] = spaceProp, $[46] = t18) : t18 = $[46];
1885
+ const space = t18;
1886
+ let t19;
1887
+ $[47] !== padding || $[48] !== paddingBottom || $[49] !== paddingLeft || $[50] !== paddingRight || $[51] !== paddingTop || $[52] !== paddingX || $[53] !== paddingY ? (t19 = {
1664
1888
  padding,
1665
1889
  paddingX,
1666
1890
  paddingY,
@@ -1668,22 +1892,30 @@ const StyledButton = /* @__PURE__ */ styled.button.withConfig({
1668
1892
  paddingBottom,
1669
1893
  paddingLeft,
1670
1894
  paddingRight
1671
- }), [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight]);
1672
- return /* @__PURE__ */ jsxs(StyledButton, { "data-ui": "Button", ...restProps, $mode: mode, $radius: radius, $tone: tone, "data-disabled": !!(loading || disabled), "data-selected": selected ? "" : void 0, disabled: !!(loading || disabled), ref, type, $width: width, children: [
1673
- !!loading && /* @__PURE__ */ jsx(LoadingBox, { children: /* @__PURE__ */ jsx(Spinner, {}) }),
1674
- (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsx(Box, { as: "span", ...boxProps, children: /* @__PURE__ */ jsxs(Flex, { as: "span", justify, gap: space, children: [
1675
- IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
1676
- isValidElement(IconComponent) && IconComponent,
1677
- isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
1678
- ] }),
1679
- text && /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { muted, align: textAlign, size: fontSize2, textOverflow: "ellipsis", weight: textWeight ?? button.textWeight, children: text }) }),
1680
- IconRightComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
1681
- isValidElement(IconRightComponent) && IconRightComponent,
1682
- isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
1683
- ] })
1684
- ] }) }),
1685
- children && /* @__PURE__ */ jsx(Box, { as: "span", ...boxProps, children })
1686
- ] });
1895
+ }, $[47] = padding, $[48] = paddingBottom, $[49] = paddingLeft, $[50] = paddingRight, $[51] = paddingTop, $[52] = paddingX, $[53] = paddingY, $[54] = t19) : t19 = $[54];
1896
+ const boxProps = t19, t20 = !!(loading || disabled), t21 = selected ? "" : void 0, t22 = !!(loading || disabled);
1897
+ let t23;
1898
+ $[55] !== loading ? (t23 = !!loading && /* @__PURE__ */ jsx(LoadingBox, { children: /* @__PURE__ */ jsx(Spinner, {}) }), $[55] = loading, $[56] = t23) : t23 = $[56];
1899
+ let t24;
1900
+ $[57] !== IconComponent || $[58] !== IconRightComponent || $[59] !== boxProps || $[60] !== button || $[61] !== fontSize2 || $[62] !== justify || $[63] !== muted || $[64] !== space || $[65] !== text || $[66] !== textAlign || $[67] !== textWeight ? (t24 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsx(Box, { as: "span", ...boxProps, children: /* @__PURE__ */ jsxs(Flex, { as: "span", justify, gap: space, children: [
1901
+ IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
1902
+ isValidElement(IconComponent) && IconComponent,
1903
+ isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
1904
+ ] }),
1905
+ text && /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { muted, align: textAlign, size: fontSize2, textOverflow: "ellipsis", weight: textWeight ?? button.textWeight, children: text }) }),
1906
+ IconRightComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
1907
+ isValidElement(IconRightComponent) && IconRightComponent,
1908
+ isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
1909
+ ] })
1910
+ ] }) }), $[57] = IconComponent, $[58] = IconRightComponent, $[59] = boxProps, $[60] = button, $[61] = fontSize2, $[62] = justify, $[63] = muted, $[64] = space, $[65] = text, $[66] = textAlign, $[67] = textWeight, $[68] = t24) : t24 = $[68];
1911
+ let t25;
1912
+ $[69] !== boxProps || $[70] !== children ? (t25 = children && /* @__PURE__ */ jsx(Box, { as: "span", ...boxProps, children }), $[69] = boxProps, $[70] = children, $[71] = t25) : t25 = $[71];
1913
+ let t26;
1914
+ return $[72] !== mode || $[73] !== radius || $[74] !== ref || $[75] !== restProps || $[76] !== t20 || $[77] !== t21 || $[78] !== t22 || $[79] !== t23 || $[80] !== t24 || $[81] !== t25 || $[82] !== tone || $[83] !== type || $[84] !== width ? (t26 = /* @__PURE__ */ jsxs(StyledButton, { "data-ui": "Button", ...restProps, $mode: mode, $radius: radius, $tone: tone, "data-disabled": t20, "data-selected": t21, disabled: t22, ref, type, $width: width, children: [
1915
+ t23,
1916
+ t24,
1917
+ t25
1918
+ ] }), $[72] = mode, $[73] = radius, $[74] = ref, $[75] = restProps, $[76] = t20, $[77] = t21, $[78] = t22, $[79] = t23, $[80] = t24, $[81] = t25, $[82] = tone, $[83] = type, $[84] = width, $[85] = t26) : t26 = $[85], t26;
1687
1919
  });
1688
1920
  Button.displayName = "ForwardRef(Button)";
1689
1921
  function cardStyle(props) {
@@ -1838,9 +2070,11 @@ const StyledCard = /* @__PURE__ */ styled(Box).withConfig({
1838
2070
  displayName: "StyledCard",
1839
2071
  componentId: "sc-osnro2-0"
1840
2072
  })(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = forwardRef(function(props, ref) {
1841
- const {
1842
- __unstable_checkered: checkered = !1,
1843
- __unstable_focusRing: focusRing = !1,
2073
+ const $ = c(56);
2074
+ let asProp, border2, borderBottom2, borderLeft2, borderRight2, borderTop2, muted, pressed, restProps, scheme, selected, shadow, t0, t1, t2, t3;
2075
+ $[0] !== props ? ({
2076
+ __unstable_checkered: t0,
2077
+ __unstable_focusRing: t1,
1844
2078
  as: asProp,
1845
2079
  border: border2,
1846
2080
  borderTop: borderTop2,
@@ -1849,18 +2083,39 @@ const StyledCard = /* @__PURE__ */ styled(Box).withConfig({
1849
2083
  borderLeft: borderLeft2,
1850
2084
  muted,
1851
2085
  pressed,
1852
- radius = 0,
2086
+ radius: t2,
1853
2087
  scheme,
1854
2088
  selected,
1855
2089
  shadow,
1856
- tone: toneProp = "default",
2090
+ tone: t3,
1857
2091
  ...restProps
1858
- } = props, as = isValidElementType(asProp) ? asProp : "div", rootTheme = useRootTheme(), tone = toneProp === "inherit" ? rootTheme.tone : toneProp;
1859
- return /* @__PURE__ */ jsx(ThemeColorProvider, { scheme, tone, children: /* @__PURE__ */ jsx(StyledCard, { "data-as": typeof as == "string" ? as : void 0, "data-scheme": rootTheme.scheme, "data-ui": "Card", "data-tone": tone, ...restProps, $border: _getArrayProp(border2), $borderTop: _getArrayProp(borderTop2), $borderRight: _getArrayProp(borderRight2), $borderBottom: _getArrayProp(borderBottom2), $borderLeft: _getArrayProp(borderLeft2), $checkered: checkered, $focusRing: focusRing, $muted: muted, $radius: _getArrayProp(radius), $shadow: _getArrayProp(shadow), $tone: tone, "data-checkered": checkered ? "" : void 0, "data-pressed": pressed ? "" : void 0, "data-selected": selected ? "" : void 0, forwardedAs: as, ref, selected }) });
2092
+ } = props, $[0] = props, $[1] = asProp, $[2] = border2, $[3] = borderBottom2, $[4] = borderLeft2, $[5] = borderRight2, $[6] = borderTop2, $[7] = muted, $[8] = pressed, $[9] = restProps, $[10] = scheme, $[11] = selected, $[12] = shadow, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3) : (asProp = $[1], border2 = $[2], borderBottom2 = $[3], borderLeft2 = $[4], borderRight2 = $[5], borderTop2 = $[6], muted = $[7], pressed = $[8], restProps = $[9], scheme = $[10], selected = $[11], shadow = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16]);
2093
+ const checkered = t0 === void 0 ? !1 : t0, focusRing = t1 === void 0 ? !1 : t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? "default" : t3, as = isValidElementType(asProp) ? asProp : "div", rootTheme = useRootTheme(), tone = toneProp === "inherit" ? rootTheme.tone : toneProp, t4 = typeof as == "string" ? as : void 0, t5 = rootTheme.scheme;
2094
+ let t6;
2095
+ $[17] !== border2 ? (t6 = _getArrayProp(border2), $[17] = border2, $[18] = t6) : t6 = $[18];
2096
+ let t7;
2097
+ $[19] !== borderTop2 ? (t7 = _getArrayProp(borderTop2), $[19] = borderTop2, $[20] = t7) : t7 = $[20];
2098
+ let t8;
2099
+ $[21] !== borderRight2 ? (t8 = _getArrayProp(borderRight2), $[21] = borderRight2, $[22] = t8) : t8 = $[22];
2100
+ let t9;
2101
+ $[23] !== borderBottom2 ? (t9 = _getArrayProp(borderBottom2), $[23] = borderBottom2, $[24] = t9) : t9 = $[24];
2102
+ let t10;
2103
+ $[25] !== borderLeft2 ? (t10 = _getArrayProp(borderLeft2), $[25] = borderLeft2, $[26] = t10) : t10 = $[26];
2104
+ let t11;
2105
+ $[27] !== radius ? (t11 = _getArrayProp(radius), $[27] = radius, $[28] = t11) : t11 = $[28];
2106
+ let t12;
2107
+ $[29] !== shadow ? (t12 = _getArrayProp(shadow), $[29] = shadow, $[30] = t12) : t12 = $[30];
2108
+ const t13 = checkered ? "" : void 0, t14 = pressed ? "" : void 0, t15 = selected ? "" : void 0;
2109
+ let t16;
2110
+ $[31] !== as || $[32] !== checkered || $[33] !== focusRing || $[34] !== muted || $[35] !== ref || $[36] !== restProps || $[37] !== rootTheme.scheme || $[38] !== selected || $[39] !== t10 || $[40] !== t11 || $[41] !== t12 || $[42] !== t13 || $[43] !== t14 || $[44] !== t15 || $[45] !== t4 || $[46] !== t6 || $[47] !== t7 || $[48] !== t8 || $[49] !== t9 || $[50] !== tone ? (t16 = /* @__PURE__ */ jsx(StyledCard, { "data-as": t4, "data-scheme": t5, "data-ui": "Card", "data-tone": tone, ...restProps, $border: t6, $borderTop: t7, $borderRight: t8, $borderBottom: t9, $borderLeft: t10, $checkered: checkered, $focusRing: focusRing, $muted: muted, $radius: t11, $shadow: t12, $tone: tone, "data-checkered": t13, "data-pressed": t14, "data-selected": t15, forwardedAs: as, ref, selected }), $[31] = as, $[32] = checkered, $[33] = focusRing, $[34] = muted, $[35] = ref, $[36] = restProps, $[37] = rootTheme.scheme, $[38] = selected, $[39] = t10, $[40] = t11, $[41] = t12, $[42] = t13, $[43] = t14, $[44] = t15, $[45] = t4, $[46] = t6, $[47] = t7, $[48] = t8, $[49] = t9, $[50] = tone, $[51] = t16) : t16 = $[51];
2111
+ let t17;
2112
+ return $[52] !== scheme || $[53] !== t16 || $[54] !== tone ? (t17 = /* @__PURE__ */ jsx(ThemeColorProvider, { scheme, tone, children: t16 }), $[52] = scheme, $[53] = t16, $[54] = tone, $[55] = t17) : t17 = $[55], t17;
1860
2113
  });
1861
2114
  Card.displayName = "ForwardRef(Card)";
1862
- function useClickOutsideEvent(listener, elementsArg = () => EMPTY_ARRAY, boundaryElement) {
1863
- const onEvent = useEffectEvent((evt) => {
2115
+ function useClickOutsideEvent(listener, t0, boundaryElement) {
2116
+ const $ = c(9), elementsArg = t0 === void 0 ? _temp$8 : t0;
2117
+ let t1;
2118
+ $[0] !== boundaryElement || $[1] !== elementsArg || $[2] !== listener ? (t1 = (evt) => {
1864
2119
  if (!listener)
1865
2120
  return;
1866
2121
  const target = evt.target;
@@ -1874,19 +2129,29 @@ function useClickOutsideEvent(listener, elementsArg = () => EMPTY_ARRAY, boundar
1874
2129
  if (el && (target === el || el.contains(target)))
1875
2130
  return;
1876
2131
  listener(evt);
1877
- }), hasListener = !!listener;
1878
- useEffect(() => {
1879
- if (!hasListener) return;
1880
- const handleEvent = (evt) => onEvent(evt);
2132
+ }, $[0] = boundaryElement, $[1] = elementsArg, $[2] = listener, $[3] = t1) : t1 = $[3];
2133
+ const onEvent = useEffectEvent(t1), hasListener = !!listener;
2134
+ let t2;
2135
+ $[4] !== hasListener || $[5] !== onEvent ? (t2 = () => {
2136
+ if (!hasListener)
2137
+ return;
2138
+ const handleEvent = (evt_0) => onEvent(evt_0);
1881
2139
  return document.addEventListener("mousedown", handleEvent), () => {
1882
2140
  document.removeEventListener("mousedown", handleEvent);
1883
2141
  };
1884
- }, [hasListener]), useDebugValue(listener ? "MouseDown On" : "MouseDown Off");
2142
+ }, $[4] = hasListener, $[5] = onEvent, $[6] = t2) : t2 = $[6];
2143
+ let t3;
2144
+ $[7] !== hasListener ? (t3 = [hasListener], $[7] = hasListener, $[8] = t3) : t3 = $[8], useEffect(t2, t3), useDebugValue(listener ? "MouseDown On" : "MouseDown Off");
2145
+ }
2146
+ function _temp$8() {
2147
+ return EMPTY_ARRAY;
1885
2148
  }
1886
2149
  function useCustomValidity(ref, customValidity) {
1887
- useEffect(() => {
2150
+ const $ = c(4);
2151
+ let t0, t1;
2152
+ $[0] !== customValidity || $[1] !== ref ? (t0 = () => {
1888
2153
  ref.current?.setCustomValidity(customValidity || "");
1889
- }, [customValidity, ref]);
2154
+ }, t1 = [customValidity, ref], $[0] = customValidity, $[1] = ref, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), useEffect(t0, t1);
1890
2155
  }
1891
2156
  const _ResizeObserver = typeof document < "u" && typeof window < "u" && window.ResizeObserver ? window.ResizeObserver : ResizeObserver, _elementSizeObserver = _createElementSizeObserver();
1892
2157
  function _createElementRectValueListener() {
@@ -1928,24 +2193,36 @@ function _createElementSizeObserver() {
1928
2193
  };
1929
2194
  }
1930
2195
  function useElementSize(element) {
1931
- const [size2, setSize] = useState(null);
1932
- return useEffect(() => {
2196
+ const $ = c(3), [size2, setSize] = useState(null);
2197
+ let t0, t1;
2198
+ return $[0] !== element ? (t0 = () => {
1933
2199
  if (element)
1934
2200
  return _elementSizeObserver.subscribe(element, setSize);
1935
- }, [element]), size2;
1936
- }
1937
- function useGlobalKeyDown(onKeyDown) {
1938
- const handleKeyDown = useEffectEvent((event) => onKeyDown(event));
1939
- useEffect(() => {
1940
- const handler = (event) => handleKeyDown(event);
1941
- return window.addEventListener("keydown", handler), () => window.removeEventListener("keydown", handler);
1942
- }, []);
2201
+ }, t1 = [element], $[0] = element, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1), size2;
2202
+ }
2203
+ function useGlobalKeyDown(onKeyDown, options) {
2204
+ const $ = c(7);
2205
+ let t0;
2206
+ $[0] !== onKeyDown ? (t0 = (event) => onKeyDown(event), $[0] = onKeyDown, $[1] = t0) : t0 = $[1];
2207
+ const handleKeyDown = useEffectEvent(t0);
2208
+ let t1;
2209
+ $[2] !== handleKeyDown || $[3] !== options ? (t1 = () => {
2210
+ const handler = (event_0) => handleKeyDown(event_0);
2211
+ return window.addEventListener("keydown", handler, options), () => window.removeEventListener("keydown", handler, options);
2212
+ }, $[2] = handleKeyDown, $[3] = options, $[4] = t1) : t1 = $[4];
2213
+ let t2;
2214
+ $[5] !== options ? (t2 = [options], $[5] = options, $[6] = t2) : t2 = $[6], useEffect(t1, t2);
1943
2215
  }
1944
2216
  function useMatchMedia(mediaQueryString, getServerSnapshot2) {
1945
- return useDebugValue(mediaQueryString), useSyncExternalStore(useCallback((onStoreChange) => {
2217
+ const $ = c(4);
2218
+ useDebugValue(mediaQueryString);
2219
+ let t0;
2220
+ $[0] !== mediaQueryString ? (t0 = (onStoreChange) => {
1946
2221
  const media = window.matchMedia(mediaQueryString);
1947
2222
  return media.addEventListener("change", onStoreChange), () => media.removeEventListener("change", onStoreChange);
1948
- }, [mediaQueryString]), () => window.matchMedia(mediaQueryString).matches, getServerSnapshot2);
2223
+ }, $[0] = mediaQueryString, $[1] = t0) : t0 = $[1];
2224
+ let t1;
2225
+ return $[2] !== mediaQueryString ? (t1 = () => window.matchMedia(mediaQueryString).matches, $[2] = mediaQueryString, $[3] = t1) : t1 = $[3], useSyncExternalStore(t0, t1, getServerSnapshot2);
1949
2226
  }
1950
2227
  function _getMediaQuery(media, index) {
1951
2228
  return index === 0 ? `screen and (max-width: ${media[index] - 1}px)` : index === media.length ? `screen and (min-width: ${media[index - 1]}px)` : `screen and (min-width: ${media[index - 1]}px) and (max-width: ${media[index] - 1}px)`;
@@ -1996,16 +2273,25 @@ function getServerSnapshot() {
1996
2273
  return 0;
1997
2274
  }
1998
2275
  function useMediaIndex() {
1999
- const {
2276
+ const $ = c(2), {
2000
2277
  media
2001
- } = useTheme_v2(), store = useMemo(() => _createMediaStore(media), [media]);
2278
+ } = useTheme_v2();
2279
+ let t0;
2280
+ $[0] !== media ? (t0 = _createMediaStore(media), $[0] = media, $[1] = t0) : t0 = $[1];
2281
+ const store = t0;
2002
2282
  return useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot);
2003
2283
  }
2004
- function usePrefersDark(getServerSnapshot2 = () => !1) {
2005
- return useMatchMedia("(prefers-color-scheme: dark)", getServerSnapshot2);
2284
+ function usePrefersDark(t0) {
2285
+ return useMatchMedia("(prefers-color-scheme: dark)", t0 === void 0 ? _temp$7 : t0);
2286
+ }
2287
+ function _temp$7() {
2288
+ return !1;
2289
+ }
2290
+ function usePrefersReducedMotion(t0) {
2291
+ return useMatchMedia("(prefers-reduced-motion: reduce)", t0 === void 0 ? _temp$6 : t0);
2006
2292
  }
2007
- function usePrefersReducedMotion(getServerSnapshot2 = () => !1) {
2008
- return useMatchMedia("(prefers-reduced-motion: reduce)", getServerSnapshot2);
2293
+ function _temp$6() {
2294
+ return !1;
2009
2295
  }
2010
2296
  function checkboxBaseStyles() {
2011
2297
  return css`
@@ -2152,7 +2438,9 @@ const StyledCheckbox = /* @__PURE__ */ styled.div.withConfig({
2152
2438
  displayName: "Input",
2153
2439
  componentId: "sc-1l5mt2l-1"
2154
2440
  })(inputElementStyles), Checkbox = forwardRef(function(props, forwardedRef) {
2155
- const {
2441
+ const $ = c(25);
2442
+ let checked, className, customValidity, disabled, indeterminate, readOnly, restProps, style;
2443
+ $[0] !== props ? ({
2156
2444
  checked,
2157
2445
  className,
2158
2446
  disabled,
@@ -2161,16 +2449,27 @@ const StyledCheckbox = /* @__PURE__ */ styled.div.withConfig({
2161
2449
  readOnly,
2162
2450
  style,
2163
2451
  ...restProps
2164
- } = props, ref = useRef(null);
2165
- return useImperativeHandle(forwardedRef, () => ref.current), useEffect(() => {
2452
+ } = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = customValidity, $[4] = disabled, $[5] = indeterminate, $[6] = readOnly, $[7] = restProps, $[8] = style) : (checked = $[1], className = $[2], customValidity = $[3], disabled = $[4], indeterminate = $[5], readOnly = $[6], restProps = $[7], style = $[8]);
2453
+ const ref = useRef(null);
2454
+ let t0;
2455
+ $[9] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[9] = t0) : t0 = $[9], useImperativeHandle(forwardedRef, t0);
2456
+ let t1, t2;
2457
+ $[10] !== indeterminate ? (t1 = () => {
2166
2458
  ref.current && (ref.current.indeterminate = indeterminate || !1);
2167
- }, [indeterminate]), useCustomValidity(ref, customValidity), /* @__PURE__ */ jsxs(StyledCheckbox, { className, "data-ui": "Checkbox", style, children: [
2168
- /* @__PURE__ */ jsx(Input$5, { "data-read-only": !disabled && readOnly ? "" : void 0, "data-error": customValidity ? "" : void 0, ...restProps, checked, disabled: disabled || readOnly, type: "checkbox", readOnly, ref }),
2169
- /* @__PURE__ */ jsxs("span", { children: [
2170
- /* @__PURE__ */ jsx(CheckmarkIcon, {}),
2171
- /* @__PURE__ */ jsx(RemoveIcon, {})
2172
- ] })
2173
- ] });
2459
+ }, t2 = [indeterminate], $[10] = indeterminate, $[11] = t1, $[12] = t2) : (t1 = $[11], t2 = $[12]), useEffect(t1, t2), useCustomValidity(ref, customValidity);
2460
+ const t3 = !disabled && readOnly ? "" : void 0, t4 = customValidity ? "" : void 0, t5 = disabled || readOnly;
2461
+ let t6;
2462
+ $[13] !== checked || $[14] !== readOnly || $[15] !== restProps || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsx(Input$5, { "data-read-only": t3, "data-error": t4, ...restProps, checked, disabled: t5, type: "checkbox", readOnly, ref }), $[13] = checked, $[14] = readOnly, $[15] = restProps, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6) : t6 = $[19];
2463
+ let t7;
2464
+ $[20] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxs("span", { children: [
2465
+ /* @__PURE__ */ jsx(CheckmarkIcon, {}),
2466
+ /* @__PURE__ */ jsx(RemoveIcon, {})
2467
+ ] }), $[20] = t7) : t7 = $[20];
2468
+ let t8;
2469
+ return $[21] !== className || $[22] !== style || $[23] !== t6 ? (t8 = /* @__PURE__ */ jsxs(StyledCheckbox, { className, "data-ui": "Checkbox", style, children: [
2470
+ t6,
2471
+ t7
2472
+ ] }), $[21] = className, $[22] = style, $[23] = t6, $[24] = t8) : t8 = $[24], t8;
2174
2473
  });
2175
2474
  Checkbox.displayName = "ForwardRef(Checkbox)";
2176
2475
  function codeSyntaxHighlightingStyle({
@@ -2325,14 +2624,26 @@ const LazyRefractor = lazy(() => import("./refractor.mjs")), StyledCode = /* @__
2325
2624
  displayName: "StyledCode",
2326
2625
  componentId: "sc-4dymyn-0"
2327
2626
  })(codeBaseStyle, responsiveCodeFontStyle), Code = forwardRef(function(props, ref) {
2328
- const {
2627
+ const $ = c(22);
2628
+ let children, language, restProps, t0, weight;
2629
+ $[0] !== props ? ({
2329
2630
  children,
2330
2631
  language,
2331
- size: size2 = 2,
2632
+ size: t0,
2332
2633
  weight,
2333
2634
  ...restProps
2334
- } = props;
2335
- return /* @__PURE__ */ jsx(StyledCode, { "data-ui": "Code", ...restProps, $size: _getArrayProp(size2), $weight: weight, ref, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("code", { children }), children: /* @__PURE__ */ jsx(LazyRefractor, { language, value: children }) }) });
2635
+ } = props, $[0] = props, $[1] = children, $[2] = language, $[3] = restProps, $[4] = t0, $[5] = weight) : (children = $[1], language = $[2], restProps = $[3], t0 = $[4], weight = $[5]);
2636
+ const size2 = t0 === void 0 ? 2 : t0;
2637
+ let t1;
2638
+ $[6] !== size2 ? (t1 = _getArrayProp(size2), $[6] = size2, $[7] = t1) : t1 = $[7];
2639
+ let t2;
2640
+ $[8] !== children ? (t2 = /* @__PURE__ */ jsx("code", { children }), $[8] = children, $[9] = t2) : t2 = $[9];
2641
+ let t3;
2642
+ $[10] !== children || $[11] !== language ? (t3 = /* @__PURE__ */ jsx(LazyRefractor, { language, value: children }), $[10] = children, $[11] = language, $[12] = t3) : t3 = $[12];
2643
+ let t4;
2644
+ $[13] !== t2 || $[14] !== t3 ? (t4 = /* @__PURE__ */ jsx(Suspense, { fallback: t2, children: t3 }), $[13] = t2, $[14] = t3, $[15] = t4) : t4 = $[15];
2645
+ let t5;
2646
+ return $[16] !== ref || $[17] !== restProps || $[18] !== t1 || $[19] !== t4 || $[20] !== weight ? (t5 = /* @__PURE__ */ jsx(StyledCode, { "data-ui": "Code", ...restProps, $size: t1, $weight: weight, ref, children: t4 }), $[16] = ref, $[17] = restProps, $[18] = t1, $[19] = t4, $[20] = weight, $[21] = t5) : t5 = $[21], t5;
2336
2647
  });
2337
2648
  Code.displayName = "ForwardRef(Code)";
2338
2649
  const BASE_STYLE$1 = {
@@ -2355,19 +2666,27 @@ const StyledContainer = /* @__PURE__ */ styled(Box).withConfig({
2355
2666
  displayName: "StyledContainer",
2356
2667
  componentId: "sc-wyroop-0"
2357
2668
  })(containerBaseStyle, responsiveContainerWidthStyle), Container = forwardRef(function(props, ref) {
2358
- const {
2669
+ const $ = c(11);
2670
+ let as, restProps, t0;
2671
+ $[0] !== props ? ({
2359
2672
  as,
2360
- width = 2,
2673
+ width: t0,
2361
2674
  ...restProps
2362
- } = props;
2363
- return /* @__PURE__ */ jsx(StyledContainer, { "data-ui": "Container", ...restProps, $width: _getArrayProp(width), forwardedAs: as, ref });
2675
+ } = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = t0) : (as = $[1], restProps = $[2], t0 = $[3]);
2676
+ const width = t0 === void 0 ? 2 : t0;
2677
+ let t1;
2678
+ $[4] !== width ? (t1 = _getArrayProp(width), $[4] = width, $[5] = t1) : t1 = $[5];
2679
+ let t2;
2680
+ return $[6] !== as || $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsx(StyledContainer, { "data-ui": "Container", ...restProps, $width: t1, forwardedAs: as, ref }), $[6] = as, $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
2364
2681
  });
2365
2682
  Container.displayName = "ForwardRef(Container)";
2366
2683
  const StyledGrid = /* @__PURE__ */ styled(Box).withConfig({
2367
2684
  displayName: "StyledGrid",
2368
2685
  componentId: "sc-v8t8oz-0"
2369
2686
  })(responsiveGridStyle), Grid = forwardRef(function(props, ref) {
2370
- const {
2687
+ const $ = c(42);
2688
+ let as, autoCols, autoFlow, autoRows, children, columns, gap, gapX, gapY, restProps, rows;
2689
+ $[0] !== props ? ({
2371
2690
  as,
2372
2691
  autoRows,
2373
2692
  autoCols,
@@ -2379,8 +2698,26 @@ const StyledGrid = /* @__PURE__ */ styled(Box).withConfig({
2379
2698
  rows,
2380
2699
  children,
2381
2700
  ...restProps
2382
- } = props;
2383
- return /* @__PURE__ */ jsx(StyledGrid, { "data-as": typeof as == "string" ? as : void 0, "data-ui": "Grid", ...restProps, $autoRows: _getArrayProp(autoRows), $autoCols: _getArrayProp(autoCols), $autoFlow: _getArrayProp(autoFlow), $columns: _getArrayProp(columns), $gap: _getArrayProp(gap), $gapX: _getArrayProp(gapX), $gapY: _getArrayProp(gapY), $rows: _getArrayProp(rows), forwardedAs: as, ref, children });
2701
+ } = props, $[0] = props, $[1] = as, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = children, $[6] = columns, $[7] = gap, $[8] = gapX, $[9] = gapY, $[10] = restProps, $[11] = rows) : (as = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], children = $[5], columns = $[6], gap = $[7], gapX = $[8], gapY = $[9], restProps = $[10], rows = $[11]);
2702
+ const t0 = typeof as == "string" ? as : void 0;
2703
+ let t1;
2704
+ $[12] !== autoRows ? (t1 = _getArrayProp(autoRows), $[12] = autoRows, $[13] = t1) : t1 = $[13];
2705
+ let t2;
2706
+ $[14] !== autoCols ? (t2 = _getArrayProp(autoCols), $[14] = autoCols, $[15] = t2) : t2 = $[15];
2707
+ let t3;
2708
+ $[16] !== autoFlow ? (t3 = _getArrayProp(autoFlow), $[16] = autoFlow, $[17] = t3) : t3 = $[17];
2709
+ let t4;
2710
+ $[18] !== columns ? (t4 = _getArrayProp(columns), $[18] = columns, $[19] = t4) : t4 = $[19];
2711
+ let t5;
2712
+ $[20] !== gap ? (t5 = _getArrayProp(gap), $[20] = gap, $[21] = t5) : t5 = $[21];
2713
+ let t6;
2714
+ $[22] !== gapX ? (t6 = _getArrayProp(gapX), $[22] = gapX, $[23] = t6) : t6 = $[23];
2715
+ let t7;
2716
+ $[24] !== gapY ? (t7 = _getArrayProp(gapY), $[24] = gapY, $[25] = t7) : t7 = $[25];
2717
+ let t8;
2718
+ $[26] !== rows ? (t8 = _getArrayProp(rows), $[26] = rows, $[27] = t8) : t8 = $[27];
2719
+ let t9;
2720
+ return $[28] !== as || $[29] !== children || $[30] !== ref || $[31] !== restProps || $[32] !== t0 || $[33] !== t1 || $[34] !== t2 || $[35] !== t3 || $[36] !== t4 || $[37] !== t5 || $[38] !== t6 || $[39] !== t7 || $[40] !== t8 ? (t9 = /* @__PURE__ */ jsx(StyledGrid, { "data-as": t0, "data-ui": "Grid", ...restProps, $autoRows: t1, $autoCols: t2, $autoFlow: t3, $columns: t4, $gap: t5, $gapX: t6, $gapY: t7, $rows: t8, forwardedAs: as, ref, children }), $[28] = as, $[29] = children, $[30] = ref, $[31] = restProps, $[32] = t0, $[33] = t1, $[34] = t2, $[35] = t3, $[36] = t4, $[37] = t5, $[38] = t6, $[39] = t7, $[40] = t8, $[41] = t9) : t9 = $[41], t9;
2384
2721
  });
2385
2722
  Grid.displayName = "ForwardRef(Grid)";
2386
2723
  function headingBaseStyle(props) {
@@ -2446,18 +2783,32 @@ const StyledHeading = /* @__PURE__ */ styled.div.withConfig({
2446
2783
  displayName: "StyledHeading",
2447
2784
  componentId: "sc-137lwim-0"
2448
2785
  })(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), Heading = forwardRef(function(props, ref) {
2449
- const {
2450
- accent = !1,
2786
+ const $ = c(26);
2787
+ let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
2788
+ $[0] !== props ? ({
2789
+ accent: t0,
2451
2790
  align,
2452
2791
  children: childrenProp,
2453
- muted = !1,
2454
- size: size2 = 2,
2792
+ muted: t1,
2793
+ size: t2,
2455
2794
  textOverflow,
2456
2795
  weight,
2457
2796
  ...restProps
2458
- } = props;
2797
+ } = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = textOverflow, $[8] = weight) : (align = $[1], childrenProp = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], textOverflow = $[7], weight = $[8]);
2798
+ const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
2459
2799
  let children = childrenProp;
2460
- return textOverflow === "ellipsis" && (children = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children })), /* @__PURE__ */ jsx(StyledHeading, { "data-ui": "Heading", ...restProps, $accent: accent, $align: _getArrayProp(align), $muted: muted, $size: _getArrayProp(size2), $weight: weight, ref, children: /* @__PURE__ */ jsx("span", { children }) });
2800
+ if (textOverflow === "ellipsis") {
2801
+ let t32;
2802
+ $[9] !== children ? (t32 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[9] = children, $[10] = t32) : t32 = $[10], children = t32;
2803
+ }
2804
+ let t3;
2805
+ $[11] !== align ? (t3 = _getArrayProp(align), $[11] = align, $[12] = t3) : t3 = $[12];
2806
+ let t4;
2807
+ $[13] !== size2 ? (t4 = _getArrayProp(size2), $[13] = size2, $[14] = t4) : t4 = $[14];
2808
+ let t5;
2809
+ $[15] !== children ? (t5 = /* @__PURE__ */ jsx("span", { children }), $[15] = children, $[16] = t5) : t5 = $[16];
2810
+ let t6;
2811
+ return $[17] !== accent || $[18] !== muted || $[19] !== ref || $[20] !== restProps || $[21] !== t3 || $[22] !== t4 || $[23] !== t5 || $[24] !== weight ? (t6 = /* @__PURE__ */ jsx(StyledHeading, { "data-ui": "Heading", ...restProps, $accent: accent, $align: t3, $muted: muted, $size: t4, $weight: weight, ref, children: t5 }), $[17] = accent, $[18] = muted, $[19] = ref, $[20] = restProps, $[21] = t3, $[22] = t4, $[23] = t5, $[24] = weight, $[25] = t6) : t6 = $[25], t6;
2461
2812
  });
2462
2813
  Heading.displayName = "ForwardRef(Heading)";
2463
2814
  function inlineBaseStyle() {
@@ -2491,15 +2842,27 @@ const StyledInline = /* @__PURE__ */ styled(Box).withConfig({
2491
2842
  displayName: "StyledInline",
2492
2843
  componentId: "sc-1pkiy6j-0"
2493
2844
  })(inlineBaseStyle, inlineSpaceStyle), Inline = forwardRef(function(props, ref) {
2494
- const {
2845
+ const $ = c(15);
2846
+ let as, childrenProp, restProps, space;
2847
+ $[0] !== props ? ({
2495
2848
  as,
2496
2849
  children: childrenProp,
2497
2850
  space,
2498
2851
  ...restProps
2499
- } = props, children = useMemo(() => Children.map(childrenProp, (child) => child && /* @__PURE__ */ jsx("div", { children: child })), [childrenProp]);
2500
- return /* @__PURE__ */ jsx(StyledInline, { "data-ui": "Inline", ...restProps, $space: _getArrayProp(space), forwardedAs: as, ref, children });
2852
+ } = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = restProps, $[4] = space) : (as = $[1], childrenProp = $[2], restProps = $[3], space = $[4]);
2853
+ let t0;
2854
+ $[5] !== childrenProp ? (t0 = Children.map(childrenProp, _temp$5), $[5] = childrenProp, $[6] = t0) : t0 = $[6];
2855
+ const children = t0;
2856
+ let t1;
2857
+ $[7] !== space ? (t1 = _getArrayProp(space), $[7] = space, $[8] = t1) : t1 = $[8];
2858
+ const t2 = ref;
2859
+ let t3;
2860
+ return $[9] !== as || $[10] !== children || $[11] !== restProps || $[12] !== t1 || $[13] !== t2 ? (t3 = /* @__PURE__ */ jsx(StyledInline, { "data-ui": "Inline", ...restProps, $space: t1, forwardedAs: as, ref: t2, children }), $[9] = as, $[10] = children, $[11] = restProps, $[12] = t1, $[13] = t2, $[14] = t3) : t3 = $[14], t3;
2501
2861
  });
2502
2862
  Inline.displayName = "ForwardRef(Inline)";
2863
+ function _temp$5(child) {
2864
+ return child && /* @__PURE__ */ jsx("div", { children: child });
2865
+ }
2503
2866
  function kbdStyle() {
2504
2867
  return css`
2505
2868
  --card-bg-color: var(--card-kbd-bg-color);
@@ -2521,14 +2884,24 @@ const StyledKBD = /* @__PURE__ */ styled.kbd.withConfig({
2521
2884
  displayName: "StyledKBD",
2522
2885
  componentId: "sc-1w7yd8w-0"
2523
2886
  })(responsiveRadiusStyle, kbdStyle), KBD = forwardRef(function(props, ref) {
2524
- const {
2887
+ const $ = c(19);
2888
+ let children, restProps, t0, t1, t2;
2889
+ $[0] !== props ? ({
2525
2890
  children,
2526
- fontSize: fontSize2 = 0,
2527
- padding = 1,
2528
- radius = 2,
2891
+ fontSize: t0,
2892
+ padding: t1,
2893
+ radius: t2,
2529
2894
  ...restProps
2530
- } = props;
2531
- return /* @__PURE__ */ jsx(StyledKBD, { "data-ui": "KBD", ...restProps, $radius: _getArrayProp(radius), ref, children: /* @__PURE__ */ jsx(Box, { as: "span", padding, children: /* @__PURE__ */ jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }) }) });
2895
+ } = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2) : (children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5]);
2896
+ const fontSize2 = t0 === void 0 ? 0 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? 2 : t2;
2897
+ let t3;
2898
+ $[6] !== radius ? (t3 = _getArrayProp(radius), $[6] = radius, $[7] = t3) : t3 = $[7];
2899
+ let t4;
2900
+ $[8] !== children || $[9] !== fontSize2 ? (t4 = /* @__PURE__ */ jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }), $[8] = children, $[9] = fontSize2, $[10] = t4) : t4 = $[10];
2901
+ let t5;
2902
+ $[11] !== padding || $[12] !== t4 ? (t5 = /* @__PURE__ */ jsx(Box, { as: "span", padding, children: t4 }), $[11] = padding, $[12] = t4, $[13] = t5) : t5 = $[13];
2903
+ let t6;
2904
+ return $[14] !== ref || $[15] !== restProps || $[16] !== t3 || $[17] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledKBD, { "data-ui": "KBD", ...restProps, $radius: t3, ref, children: t5 }), $[14] = ref, $[15] = restProps, $[16] = t3, $[17] = t5, $[18] = t6) : t6 = $[18], t6;
2532
2905
  });
2533
2906
  KBD.displayName = "ForwardRef(KBD)";
2534
2907
  const origin = {
@@ -2656,12 +3029,15 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
2656
3029
  displayName: "ShapePath",
2657
3030
  componentId: "sc-12vzy6c-2"
2658
3031
  })`fill:var(--card-bg-color);`, Arrow = forwardRef(function(props, ref) {
2659
- const {
3032
+ const $ = c(24);
3033
+ let h, restProps, t0, w;
3034
+ $[0] !== props ? ({
2660
3035
  width: w,
2661
3036
  height: h,
2662
- radius = 0,
3037
+ radius: t0,
2663
3038
  ...restProps
2664
- } = props, {
3039
+ } = props, $[0] = props, $[1] = h, $[2] = restProps, $[3] = t0, $[4] = w) : (h = $[1], restProps = $[2], t0 = $[3], w = $[4]);
3040
+ const radius = t0 === void 0 ? 0 : t0, {
2665
3041
  card
2666
3042
  } = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, points = [{
2667
3043
  x: 0,
@@ -2681,24 +3057,38 @@ const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
2681
3057
  }, {
2682
3058
  x: w,
2683
3059
  y: 0
2684
- }], cmds = getRoundedCommands(points), path = compileCommands(cmds), strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`;
2685
- return /* @__PURE__ */ jsx(StyledArrow, { ...restProps, $w: w, ref, children: /* @__PURE__ */ jsxs("svg", { width: w, height: w, viewBox: `0 0 ${w} ${w}`, children: [
2686
- /* @__PURE__ */ jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsx("rect", { x: 0, y: strokeWidth, width: w, height: w, fill: "white" }) }),
2687
- /* @__PURE__ */ jsx(StrokePath, { d: strokePath, mask: "url(#stroke-mask)", strokeWidth: strokeWidth * 2 }),
2688
- /* @__PURE__ */ jsx(ShapePath, { d: fillPath })
2689
- ] }) });
3060
+ }], cmds = getRoundedCommands(points), path = compileCommands(cmds), strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`, t1 = `0 0 ${w} ${w}`;
3061
+ let t2;
3062
+ $[5] !== strokeWidth || $[6] !== w ? (t2 = /* @__PURE__ */ jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsx("rect", { x: 0, y: strokeWidth, width: w, height: w, fill: "white" }) }), $[5] = strokeWidth, $[6] = w, $[7] = t2) : t2 = $[7];
3063
+ const t3 = strokeWidth * 2;
3064
+ let t4;
3065
+ $[8] !== strokePath || $[9] !== t3 ? (t4 = /* @__PURE__ */ jsx(StrokePath, { d: strokePath, mask: "url(#stroke-mask)", strokeWidth: t3 }), $[8] = strokePath, $[9] = t3, $[10] = t4) : t4 = $[10];
3066
+ let t5;
3067
+ $[11] !== fillPath ? (t5 = /* @__PURE__ */ jsx(ShapePath, { d: fillPath }), $[11] = fillPath, $[12] = t5) : t5 = $[12];
3068
+ let t6;
3069
+ $[13] !== t1 || $[14] !== t2 || $[15] !== t4 || $[16] !== t5 || $[17] !== w ? (t6 = /* @__PURE__ */ jsxs("svg", { width: w, height: w, viewBox: t1, children: [
3070
+ t2,
3071
+ t4,
3072
+ t5
3073
+ ] }), $[13] = t1, $[14] = t2, $[15] = t4, $[16] = t5, $[17] = w, $[18] = t6) : t6 = $[18];
3074
+ let t7;
3075
+ return $[19] !== ref || $[20] !== restProps || $[21] !== t6 || $[22] !== w ? (t7 = /* @__PURE__ */ jsx(StyledArrow, { ...restProps, $w: w, ref, children: t6 }), $[19] = ref, $[20] = restProps, $[21] = t6, $[22] = w, $[23] = t7) : t7 = $[23], t7;
2690
3076
  });
2691
3077
  Arrow.displayName = "ForwardRef(Arrow)";
2692
3078
  const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null);
2693
3079
  function BoundaryElementProvider(props) {
2694
- const {
3080
+ const $ = c(5), {
2695
3081
  children,
2696
3082
  element
2697
- } = props, value = useMemo(() => ({
3083
+ } = props;
3084
+ let t0;
3085
+ $[0] !== element ? (t0 = {
2698
3086
  version: 0,
2699
3087
  element
2700
- }), [element]);
2701
- return /* @__PURE__ */ jsx(BoundaryElementContext.Provider, { value, children });
3088
+ }, $[0] = element, $[1] = t0) : t0 = $[1];
3089
+ const value = t0;
3090
+ let t1;
3091
+ return $[2] !== children || $[3] !== value ? (t1 = /* @__PURE__ */ jsx(BoundaryElementContext.Provider, { value, children }), $[2] = children, $[3] = value, $[4] = t1) : t1 = $[4], t1;
2702
3092
  }
2703
3093
  BoundaryElementProvider.displayName = "BoundaryElementProvider";
2704
3094
  function isRecord(value) {
@@ -2735,18 +3125,32 @@ function findMinBreakpoints(media, width) {
2735
3125
  return ret;
2736
3126
  }
2737
3127
  const ElementQuery = forwardRef(function(props, forwardedRef) {
2738
- const theme = useTheme_v2(), {
3128
+ const $ = c(18), theme = useTheme_v2();
3129
+ let _media, children, restProps;
3130
+ $[0] !== props ? ({
2739
3131
  children,
2740
3132
  media: _media,
2741
3133
  ...restProps
2742
- } = props, media = _media ?? theme.media, [element, setElement] = useState(null), elementSize = useElementSize(element), width = useMemo(() => elementSize?.border.width ?? window.innerWidth, [elementSize]), max = useMemo(() => {
3134
+ } = props, $[0] = props, $[1] = _media, $[2] = children, $[3] = restProps) : (_media = $[1], children = $[2], restProps = $[3]);
3135
+ const media = _media ?? theme.media, [element, setElement] = useState(null), width = useElementSize(element)?.border.width ?? window.innerWidth;
3136
+ let t0;
3137
+ if ($[4] !== media || $[5] !== width) {
2743
3138
  const eq = findMaxBreakpoints(media, width);
2744
- return eq.length ? eq.join(" ") : void 0;
2745
- }, [media, width]), min = useMemo(() => {
2746
- const eq = findMinBreakpoints(media, width);
2747
- return eq.length ? eq.join(" ") : void 0;
2748
- }, [media, width]);
2749
- return useImperativeHandle(forwardedRef, () => element, [element]), /* @__PURE__ */ jsx("div", { "data-ui": "ElementQuery", ...restProps, "data-eq-max": max, "data-eq-min": min, ref: setElement, children });
3139
+ t0 = eq.length ? eq.join(" ") : void 0, $[4] = media, $[5] = width, $[6] = t0;
3140
+ } else
3141
+ t0 = $[6];
3142
+ const max = t0;
3143
+ let t1;
3144
+ if ($[7] !== media || $[8] !== width) {
3145
+ const eq_0 = findMinBreakpoints(media, width);
3146
+ t1 = eq_0.length ? eq_0.join(" ") : void 0, $[7] = media, $[8] = width, $[9] = t1;
3147
+ } else
3148
+ t1 = $[9];
3149
+ const min = t1;
3150
+ let t2, t3;
3151
+ $[10] !== element ? (t2 = () => element, t3 = [element], $[10] = element, $[11] = t2, $[12] = t3) : (t2 = $[11], t3 = $[12]), useImperativeHandle(forwardedRef, t2, t3);
3152
+ let t4;
3153
+ return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t4 = /* @__PURE__ */ jsx("div", { "data-ui": "ElementQuery", ...restProps, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[13] = children, $[14] = max, $[15] = min, $[16] = restProps, $[17] = t4) : t4 = $[17], t4;
2750
3154
  });
2751
3155
  ElementQuery.displayName = "ForwardRef(ElementQuery)";
2752
3156
  function getLayerContext(contextValue) {
@@ -2760,10 +3164,21 @@ function getLayerContext(contextValue) {
2760
3164
  }
2761
3165
  const LayerContext = createGlobalScopedContext("@sanity/ui/context/layer", null);
2762
3166
  function LayerProvider(props) {
2763
- const {
3167
+ const $ = c(21), {
2764
3168
  children,
2765
- zOffset: zOffsetProp = 0
2766
- } = props, parentContextValue = useContext(LayerContext), parent = parentContextValue && getLayerContext(parentContextValue), parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1, zOffset = _getArrayProp(zOffsetProp), maxMediaIndex = zOffset.length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex], [, setChildLayers] = useState({}), [size2, setSize] = useState(0), isTopLayer = size2 === 0, registerChild = useCallback((childLevel) => {
3169
+ zOffset: t0
3170
+ } = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue = useContext(LayerContext);
3171
+ let t1;
3172
+ $[0] !== parentContextValue ? (t1 = parentContextValue && getLayerContext(parentContextValue), $[0] = parentContextValue, $[1] = t1) : t1 = $[1];
3173
+ const parent = t1, parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1;
3174
+ let t2;
3175
+ $[2] !== zOffsetProp ? (t2 = _getArrayProp(zOffsetProp), $[2] = zOffsetProp, $[3] = t2) : t2 = $[3];
3176
+ const zOffset = t2, maxMediaIndex = zOffset.length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex];
3177
+ let t3;
3178
+ $[4] === Symbol.for("react.memo_cache_sentinel") ? (t3 = {}, $[4] = t3) : t3 = $[4];
3179
+ const [, setChildLayers] = useState(t3), [size2, setSize] = useState(0), isTopLayer = size2 === 0;
3180
+ let t4;
3181
+ $[5] !== parentRegisterChild || $[6] !== setChildLayers ? (t4 = (childLevel) => {
2767
3182
  const parentDispose = parentRegisterChild?.(childLevel);
2768
3183
  return childLevel !== void 0 ? setChildLayers((state) => {
2769
3184
  const prevLen = state[childLevel] ?? 0, nextState = {
@@ -2771,34 +3186,47 @@ function LayerProvider(props) {
2771
3186
  [childLevel]: prevLen + 1
2772
3187
  };
2773
3188
  return setSize(Object.keys(nextState).length), nextState;
2774
- }) : setSize((v) => v + 1), () => {
2775
- childLevel !== void 0 ? setChildLayers((state) => {
2776
- const nextState = {
2777
- ...state
3189
+ }) : setSize(_temp$4), () => {
3190
+ childLevel !== void 0 ? setChildLayers((state_0) => {
3191
+ const nextState_0 = {
3192
+ ...state_0
2778
3193
  };
2779
- return nextState[childLevel] === 1 ? (delete nextState[childLevel], setSize(Object.keys(nextState).length)) : nextState[childLevel] -= 1, nextState;
2780
- }) : setSize((v) => v - 1), parentDispose?.();
3194
+ return nextState_0[childLevel] === 1 ? (delete nextState_0[childLevel], setSize(Object.keys(nextState_0).length)) : nextState_0[childLevel] = nextState_0[childLevel] - 1, nextState_0;
3195
+ }) : setSize(_temp2$2), parentDispose?.();
2781
3196
  };
2782
- }, [parentRegisterChild, setSize, setChildLayers]);
2783
- useEffect(() => parentRegisterChild?.(level), [level, parentRegisterChild]);
2784
- const value = useMemo(() => ({
3197
+ }, $[5] = parentRegisterChild, $[6] = setChildLayers, $[7] = t4) : t4 = $[7];
3198
+ const registerChild = t4;
3199
+ let t5, t6;
3200
+ $[8] !== level || $[9] !== parentRegisterChild ? (t5 = () => parentRegisterChild?.(level), t6 = [level, parentRegisterChild], $[8] = level, $[9] = parentRegisterChild, $[10] = t5, $[11] = t6) : (t5 = $[10], t6 = $[11]), useEffect(t5, t6);
3201
+ let t7;
3202
+ $[12] !== isTopLayer || $[13] !== level || $[14] !== registerChild || $[15] !== size2 || $[16] !== zIndex ? (t7 = {
2785
3203
  version: 0,
2786
3204
  isTopLayer,
2787
3205
  level,
2788
3206
  registerChild,
2789
3207
  size: size2,
2790
3208
  zIndex
2791
- }), [isTopLayer, level, registerChild, size2, zIndex]);
2792
- return /* @__PURE__ */ jsx(LayerContext.Provider, { value, children });
3209
+ }, $[12] = isTopLayer, $[13] = level, $[14] = registerChild, $[15] = size2, $[16] = zIndex, $[17] = t7) : t7 = $[17];
3210
+ const value = t7;
3211
+ let t8;
3212
+ return $[18] !== children || $[19] !== value ? (t8 = /* @__PURE__ */ jsx(LayerContext.Provider, { value, children }), $[18] = children, $[19] = value, $[20] = t8) : t8 = $[20], t8;
3213
+ }
3214
+ function _temp2$2(v_0) {
3215
+ return v_0 - 1;
3216
+ }
3217
+ function _temp$4(v) {
3218
+ return v + 1;
2793
3219
  }
2794
3220
  LayerProvider.displayName = "LayerProvider";
2795
3221
  function useLayer() {
2796
- const value = useContext(LayerContext);
3222
+ const $ = c(2), value = useContext(LayerContext);
2797
3223
  if (!value)
2798
3224
  throw new Error("useLayer(): missing context value");
2799
3225
  try {
2800
- return getLayerContext(value);
2801
- } catch (err) {
3226
+ let t1;
3227
+ return $[0] !== value ? (t1 = getLayerContext(value), $[0] = value, $[1] = t1) : t1 = $[1], t1;
3228
+ } catch (t0) {
3229
+ const err = t0;
2802
3230
  throw err instanceof Error ? new Error(`useLayer(): ${err.message}`) : new Error(`useLayer(): ${err}`);
2803
3231
  }
2804
3232
  }
@@ -2808,37 +3236,54 @@ const StyledLayer = /* @__PURE__ */ styled.div.withConfig({
2808
3236
  })({
2809
3237
  position: "relative"
2810
3238
  }), LayerChildren = forwardRef(function(props, forwardedRef) {
2811
- const {
3239
+ const $ = c(22);
3240
+ let children, onActivate, onFocus, restProps, t0;
3241
+ $[0] !== props ? ({
2812
3242
  children,
2813
3243
  onActivate,
2814
3244
  onFocus,
2815
- style = EMPTY_RECORD,
3245
+ style: t0,
2816
3246
  ...restProps
2817
- } = props, {
3247
+ } = props, $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0) : (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]);
3248
+ const style = t0 === void 0 ? EMPTY_RECORD : t0, {
2818
3249
  zIndex,
2819
3250
  isTopLayer
2820
3251
  } = useLayer(), lastFocusedRef = useRef(null), ref = useRef(null), isTopLayerRef = useRef(isTopLayer);
2821
- useImperativeHandle(forwardedRef, () => ref.current), useEffect(() => {
3252
+ let t1;
3253
+ $[6] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => ref.current, $[6] = t1) : t1 = $[6], useImperativeHandle(forwardedRef, t1);
3254
+ let t2, t3;
3255
+ $[7] !== isTopLayer || $[8] !== onActivate ? (t2 = () => {
2822
3256
  isTopLayerRef.current !== isTopLayer && isTopLayer && onActivate?.({
2823
3257
  activeElement: lastFocusedRef.current
2824
3258
  }), isTopLayerRef.current = isTopLayer;
2825
- }, [isTopLayer, onActivate]);
2826
- const handleFocus = useCallback((event) => {
3259
+ }, t3 = [isTopLayer, onActivate], $[7] = isTopLayer, $[8] = onActivate, $[9] = t2, $[10] = t3) : (t2 = $[9], t3 = $[10]), useEffect(t2, t3);
3260
+ let t4;
3261
+ $[11] !== isTopLayer || $[12] !== onFocus ? (t4 = (event) => {
2827
3262
  onFocus?.(event);
2828
3263
  const rootElement = ref.current, target = document.activeElement;
2829
3264
  !isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
2830
- }, [isTopLayer, onFocus]);
2831
- return /* @__PURE__ */ jsx(StyledLayer, { ...restProps, "data-ui": "Layer", onFocus: handleFocus, ref, style: {
3265
+ }, $[11] = isTopLayer, $[12] = onFocus, $[13] = t4) : t4 = $[13];
3266
+ const handleFocus = t4;
3267
+ let t5;
3268
+ $[14] !== style || $[15] !== zIndex ? (t5 = {
2832
3269
  ...style,
2833
3270
  zIndex
2834
- }, children });
3271
+ }, $[14] = style, $[15] = zIndex, $[16] = t5) : t5 = $[16];
3272
+ let t6;
3273
+ return $[17] !== children || $[18] !== handleFocus || $[19] !== restProps || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledLayer, { ...restProps, "data-ui": "Layer", onFocus: handleFocus, ref, style: t5, children }), $[17] = children, $[18] = handleFocus, $[19] = restProps, $[20] = t5, $[21] = t6) : t6 = $[21], t6;
2835
3274
  }), Layer = forwardRef(function(props, ref) {
2836
- const {
3275
+ const $ = c(11);
3276
+ let children, restProps, t0;
3277
+ $[0] !== props ? ({
2837
3278
  children,
2838
- zOffset = 1,
3279
+ zOffset: t0,
2839
3280
  ...restProps
2840
- } = props;
2841
- return /* @__PURE__ */ jsx(LayerProvider, { zOffset, children: /* @__PURE__ */ jsx(LayerChildren, { ...restProps, ref, children }) });
3281
+ } = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
3282
+ const zOffset = t0 === void 0 ? 1 : t0;
3283
+ let t1;
3284
+ $[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsx(LayerChildren, { ...restProps, ref, children }), $[4] = children, $[5] = ref, $[6] = restProps, $[7] = t1) : t1 = $[7];
3285
+ let t2;
3286
+ return $[8] !== t1 || $[9] !== zOffset ? (t2 = /* @__PURE__ */ jsx(LayerProvider, { zOffset, children: t1 }), $[8] = t1, $[9] = zOffset, $[10] = t2) : t2 = $[10], t2;
2842
3287
  });
2843
3288
  Layer.displayName = "ForwardRef(Layer)";
2844
3289
  const key = "@sanity/ui/context/portal", elementKey = Symbol.for(`${key}/element`);
@@ -2859,26 +3304,39 @@ function usePortal() {
2859
3304
  return value;
2860
3305
  }
2861
3306
  function Portal(props) {
2862
- const {
3307
+ const $ = c(3), {
2863
3308
  children,
2864
3309
  __unstable_name: name
2865
3310
  } = props, portal = usePortal(), portalElement = (name ? portal.elements && portal.elements[name] : portal.element) || portal.elements?.default;
2866
- return portalElement ? createPortal(children, portalElement) : null;
3311
+ if (!portalElement)
3312
+ return null;
3313
+ let t0;
3314
+ return $[0] !== children || $[1] !== portalElement ? (t0 = createPortal(children, portalElement), $[0] = children, $[1] = portalElement, $[2] = t0) : t0 = $[2], t0;
2867
3315
  }
2868
3316
  Portal.displayName = "Portal";
2869
3317
  function PortalProvider(props) {
2870
- const {
3318
+ const $ = c(7), {
2871
3319
  boundaryElement,
2872
3320
  children,
2873
3321
  element,
2874
3322
  __unstable_elements: elements
2875
- } = props, fallbackElement = useSyncExternalStore(emptySubscribe, () => document.body, () => null), value = useMemo(() => ({
3323
+ } = props, fallbackElement = useSyncExternalStore(emptySubscribe, _temp$3, _temp2$1), t0 = boundaryElement || null, t1 = element || fallbackElement;
3324
+ let t2;
3325
+ $[0] !== elements || $[1] !== t0 || $[2] !== t1 ? (t2 = {
2876
3326
  version: 0,
2877
- boundaryElement: boundaryElement || null,
2878
- element: element || fallbackElement,
3327
+ boundaryElement: t0,
3328
+ element: t1,
2879
3329
  elements
2880
- }), [boundaryElement, element, elements, fallbackElement]);
2881
- return /* @__PURE__ */ jsx(PortalContext.Provider, { value, children });
3330
+ }, $[0] = elements, $[1] = t0, $[2] = t1, $[3] = t2) : t2 = $[3];
3331
+ const value = t2;
3332
+ let t3;
3333
+ return $[4] !== children || $[5] !== value ? (t3 = /* @__PURE__ */ jsx(PortalContext.Provider, { value, children }), $[4] = children, $[5] = value, $[6] = t3) : t3 = $[6], t3;
3334
+ }
3335
+ function _temp2$1() {
3336
+ return null;
3337
+ }
3338
+ function _temp$3() {
3339
+ return document.body;
2882
3340
  }
2883
3341
  PortalProvider.displayName = "PortalProvider";
2884
3342
  const emptySubscribe = () => () => {
@@ -2886,11 +3344,12 @@ const emptySubscribe = () => () => {
2886
3344
  displayName: "StyledSrOnly",
2887
3345
  componentId: "sc-mubr0c-0"
2888
3346
  })`display:block;width:0;height:0;position:absolute;overflow:hidden;overflow:clip;`, SrOnly = forwardRef(function(props, ref) {
2889
- const {
3347
+ const $ = c(4), {
2890
3348
  as,
2891
3349
  children
2892
3350
  } = props;
2893
- return /* @__PURE__ */ jsx(StyledSrOnly, { "aria-hidden": !0, as, "data-ui": "SrOnly", ref, children });
3351
+ let t0;
3352
+ return $[0] !== as || $[1] !== children || $[2] !== ref ? (t0 = /* @__PURE__ */ jsx(StyledSrOnly, { "aria-hidden": !0, as, "data-ui": "SrOnly", ref, children }), $[0] = as, $[1] = children, $[2] = ref, $[3] = t0) : t0 = $[3], t0;
2894
3353
  });
2895
3354
  SrOnly.displayName = "ForwardRef(SrOnly)";
2896
3355
  const StyledVirtualList = styled.div.withConfig({
@@ -2900,52 +3359,69 @@ const StyledVirtualList = styled.div.withConfig({
2900
3359
  displayName: "ItemWrapper",
2901
3360
  componentId: "sc-dlqsj4-1"
2902
3361
  })`position:absolute;left:0;right:0;`, VirtualList = forwardRef(function(props, forwardedRef) {
2903
- const {
2904
- as = "div",
2905
- gap = 0,
3362
+ const $ = c(44);
3363
+ let getItemKey, onChange, renderItem, restProps, t0, t1, t2;
3364
+ $[0] !== props ? ({
3365
+ as: t0,
3366
+ gap: t1,
2906
3367
  getItemKey,
2907
- items = [],
3368
+ items: t2,
2908
3369
  onChange,
2909
3370
  renderItem,
2910
3371
  ...restProps
2911
- } = props, {
3372
+ } = props, $[0] = props, $[1] = getItemKey, $[2] = onChange, $[3] = renderItem, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = t2) : (getItemKey = $[1], onChange = $[2], renderItem = $[3], restProps = $[4], t0 = $[5], t1 = $[6], t2 = $[7]);
3373
+ const as = t0 === void 0 ? "div" : t0, gap = t1 === void 0 ? 0 : t1;
3374
+ let t3;
3375
+ $[8] !== t2 ? (t3 = t2 === void 0 ? [] : t2, $[8] = t2, $[9] = t3) : t3 = $[9];
3376
+ const items = t3, {
2912
3377
  space
2913
3378
  } = useTheme_v2(), ref = useRef(null), wrapperRef = useRef(null), [scrollTop, setScrollTop] = useState(0), [scrollHeight, setScrollHeight] = useState(0), [itemHeight, setItemHeight] = useState(-1);
2914
- useImperativeHandle(forwardedRef, () => ref.current), useEffect(() => {
2915
- if (!wrapperRef.current) return;
3379
+ let t4;
3380
+ $[10] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[10] = t4) : t4 = $[10], useImperativeHandle(forwardedRef, t4);
3381
+ let t5;
3382
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => {
3383
+ if (!wrapperRef.current)
3384
+ return;
2916
3385
  const firstElement = wrapperRef.current.firstChild;
2917
3386
  firstElement instanceof HTMLElement && setItemHeight(firstElement.offsetHeight);
2918
- }, [renderItem]), useEffect(() => {
2919
- if (!ref.current) return;
3387
+ }, $[11] = t5) : t5 = $[11];
3388
+ let t6;
3389
+ $[12] !== renderItem ? (t6 = [renderItem], $[12] = renderItem, $[13] = t6) : t6 = $[13], useEffect(t5, t6);
3390
+ let t7, t8;
3391
+ $[14] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => {
3392
+ if (!ref.current)
3393
+ return;
2920
3394
  const scrollEl = findScrollable(ref.current.parentNode);
2921
3395
  if (scrollEl) {
2922
- if (!(scrollEl instanceof HTMLElement)) return;
2923
- const handleScroll2 = () => {
3396
+ if (!(scrollEl instanceof HTMLElement))
3397
+ return;
3398
+ const handleScroll = () => {
2924
3399
  setScrollTop(scrollEl.scrollTop);
2925
3400
  };
2926
- scrollEl.addEventListener("scroll", handleScroll2, {
3401
+ scrollEl.addEventListener("scroll", handleScroll, {
2927
3402
  passive: !0
2928
3403
  });
2929
3404
  const ro = new _ResizeObserver((entries) => {
2930
3405
  setScrollHeight(entries[0].contentRect.height);
2931
3406
  });
2932
- return ro.observe(scrollEl), handleScroll2(), () => {
2933
- scrollEl.removeEventListener("scroll", handleScroll2), ro.unobserve(scrollEl), ro.disconnect();
3407
+ return ro.observe(scrollEl), handleScroll(), () => {
3408
+ scrollEl.removeEventListener("scroll", handleScroll), ro.unobserve(scrollEl), ro.disconnect();
2934
3409
  };
2935
3410
  }
2936
- const handleScroll = () => {
3411
+ const handleScroll_0 = () => {
2937
3412
  setScrollTop(window.scrollY);
2938
3413
  }, handleResize = () => {
2939
3414
  setScrollHeight(window.innerHeight);
2940
3415
  };
2941
- return window.addEventListener("scroll", handleScroll, {
3416
+ return window.addEventListener("scroll", handleScroll_0, {
2942
3417
  passive: !0
2943
- }), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll(), () => {
2944
- window.removeEventListener("scroll", handleScroll), window.removeEventListener("resize", handleResize);
3418
+ }), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll_0(), () => {
3419
+ window.removeEventListener("scroll", handleScroll_0), window.removeEventListener("resize", handleResize);
2945
3420
  };
2946
- }, []);
3421
+ }, t8 = [], $[14] = t7, $[15] = t8) : (t7 = $[14], t8 = $[15]), useEffect(t7, t8);
2947
3422
  const len = items.length, height = itemHeight ? len * (itemHeight + space[gap]) - space[gap] : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0;
2948
- useEffect(() => {
3423
+ let t10, t9;
3424
+ $[16] !== fromIndex || $[17] !== gap || $[18] !== itemHeight || $[19] !== onChange || $[20] !== scrollHeight || $[21] !== scrollTop || $[22] !== space || $[23] !== toIndex ? (t9 = () => {
2949
3425
  onChange && onChange({
2950
3426
  fromIndex,
2951
3427
  gap: space[gap],
@@ -2954,8 +3430,9 @@ const StyledVirtualList = styled.div.withConfig({
2954
3430
  scrollTop,
2955
3431
  toIndex
2956
3432
  });
2957
- }, [fromIndex, gap, itemHeight, onChange, scrollHeight, scrollTop, space, toIndex]);
2958
- const children = useChildren({
3433
+ }, t10 = [fromIndex, gap, itemHeight, onChange, scrollHeight, scrollTop, space, toIndex], $[16] = fromIndex, $[17] = gap, $[18] = itemHeight, $[19] = onChange, $[20] = scrollHeight, $[21] = scrollTop, $[22] = space, $[23] = toIndex, $[24] = t10, $[25] = t9) : (t10 = $[24], t9 = $[25]), useEffect(t9, t10);
3434
+ let t11;
3435
+ $[26] !== fromIndex || $[27] !== gap || $[28] !== getItemKey || $[29] !== itemHeight || $[30] !== items || $[31] !== renderItem || $[32] !== space || $[33] !== toIndex ? (t11 = {
2959
3436
  fromIndex,
2960
3437
  gap,
2961
3438
  itemHeight,
@@ -2964,28 +3441,49 @@ const StyledVirtualList = styled.div.withConfig({
2964
3441
  getItemKey,
2965
3442
  items,
2966
3443
  renderItem
2967
- });
2968
- return /* @__PURE__ */ jsx(StyledVirtualList, { as, "data-ui": "VirtualList", ...restProps, ref, children: /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: {
3444
+ }, $[26] = fromIndex, $[27] = gap, $[28] = getItemKey, $[29] = itemHeight, $[30] = items, $[31] = renderItem, $[32] = space, $[33] = toIndex, $[34] = t11) : t11 = $[34];
3445
+ const children = useChildren(t11);
3446
+ let t12;
3447
+ $[35] !== height ? (t12 = {
2969
3448
  height
2970
- }, children }) });
3449
+ }, $[35] = height, $[36] = t12) : t12 = $[36];
3450
+ let t13;
3451
+ $[37] !== children || $[38] !== t12 ? (t13 = /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: t12, children }), $[37] = children, $[38] = t12, $[39] = t13) : t13 = $[39];
3452
+ let t14;
3453
+ return $[40] !== as || $[41] !== restProps || $[42] !== t13 ? (t14 = /* @__PURE__ */ jsx(StyledVirtualList, { as, "data-ui": "VirtualList", ...restProps, ref, children: t13 }), $[40] = as, $[41] = restProps, $[42] = t13, $[43] = t14) : t14 = $[43], t14;
2971
3454
  });
2972
3455
  VirtualList.displayName = "ForwardRef(VirtualList)";
2973
- function useChildren({
2974
- fromIndex,
2975
- gap,
2976
- getItemKey,
2977
- itemHeight,
2978
- items,
2979
- renderItem,
2980
- space,
2981
- toIndex
2982
- }) {
2983
- return !renderItem || items.length === 0 ? null : itemHeight === -1 ? [/* @__PURE__ */ jsx(ItemWrapper, { children: renderItem(items[0]) }, 0)] : items.slice(fromIndex, toIndex).map((item, _itemIndex) => {
2984
- const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
2985
- return /* @__PURE__ */ jsx(ItemWrapper, { style: {
2986
- top: itemIndex * (itemHeight + space[gap])
2987
- }, children: node }, key2);
2988
- });
3456
+ function useChildren(t0) {
3457
+ const $ = c(21), {
3458
+ fromIndex,
3459
+ gap,
3460
+ getItemKey,
3461
+ itemHeight,
3462
+ items,
3463
+ renderItem,
3464
+ space,
3465
+ toIndex
3466
+ } = t0;
3467
+ if (!renderItem || items.length === 0)
3468
+ return null;
3469
+ if (itemHeight === -1) {
3470
+ let t12;
3471
+ $[0] !== items[0] || $[1] !== renderItem ? (t12 = renderItem(items[0]), $[0] = items[0], $[1] = renderItem, $[2] = t12) : t12 = $[2];
3472
+ let t2;
3473
+ return $[3] !== t12 ? (t2 = [/* @__PURE__ */ jsx(ItemWrapper, { children: t12 }, 0)], $[3] = t12, $[4] = t2) : t2 = $[4], t2;
3474
+ }
3475
+ let t1;
3476
+ if ($[5] !== fromIndex || $[6] !== gap || $[7] !== getItemKey || $[8] !== itemHeight || $[9] !== items || $[10] !== renderItem || $[11] !== space || $[12] !== toIndex) {
3477
+ let t2;
3478
+ $[14] !== fromIndex || $[15] !== gap || $[16] !== getItemKey || $[17] !== itemHeight || $[18] !== renderItem || $[19] !== space ? (t2 = (item, _itemIndex) => {
3479
+ const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
3480
+ return /* @__PURE__ */ jsx(ItemWrapper, { style: {
3481
+ top: itemIndex * (itemHeight + space[gap])
3482
+ }, children: node }, key2);
3483
+ }, $[14] = fromIndex, $[15] = gap, $[16] = getItemKey, $[17] = itemHeight, $[18] = renderItem, $[19] = space, $[20] = t2) : t2 = $[20], t1 = items.slice(fromIndex, toIndex).map(t2), $[5] = fromIndex, $[6] = gap, $[7] = getItemKey, $[8] = itemHeight, $[9] = items, $[10] = renderItem, $[11] = space, $[12] = toIndex, $[13] = t1;
3484
+ } else
3485
+ t1 = $[13];
3486
+ return t1;
2989
3487
  }
2990
3488
  function findScrollable(parentNode) {
2991
3489
  let _scrollEl = parentNode;
@@ -3077,7 +3575,9 @@ const MotionCard$1 = styled(motion.create(Card)).withConfig({
3077
3575
  displayName: "MotionFlex",
3078
3576
  componentId: "sc-ihg31s-1"
3079
3577
  })`will-change:opacity;`, PopoverCard = forwardRef(function(props, ref) {
3080
- const {
3578
+ const $ = c(66);
3579
+ let animate, arrow2, arrowRef, arrowX, arrowY, children, marginsProp, originX, originY, overflow, padding, placement, radius, restProps, scheme, shadow, strategy, style, tone, width, xProp, yProp;
3580
+ $[0] !== props ? ({
3081
3581
  __unstable_margins: marginsProp,
3082
3582
  animate,
3083
3583
  arrow: arrow2,
@@ -3100,9 +3600,12 @@ const MotionCard$1 = styled(motion.create(Card)).withConfig({
3100
3600
  x: xProp,
3101
3601
  y: yProp,
3102
3602
  ...restProps
3103
- } = props, {
3603
+ } = props, $[0] = props, $[1] = animate, $[2] = arrow2, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = originX, $[9] = originY, $[10] = overflow, $[11] = padding, $[12] = placement, $[13] = radius, $[14] = restProps, $[15] = scheme, $[16] = shadow, $[17] = strategy, $[18] = style, $[19] = tone, $[20] = width, $[21] = xProp, $[22] = yProp) : (animate = $[1], arrow2 = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], originX = $[8], originY = $[9], overflow = $[10], padding = $[11], placement = $[12], radius = $[13], restProps = $[14], scheme = $[15], shadow = $[16], strategy = $[17], style = $[18], tone = $[19], width = $[20], xProp = $[21], yProp = $[22]);
3604
+ const {
3104
3605
  zIndex
3105
- } = useLayer(), margins = useMemo(() => marginsProp || DEFAULT_POPOVER_MARGINS, [marginsProp]), x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0], rootStyle2 = useMemo(() => ({
3606
+ } = useLayer(), margins = marginsProp || DEFAULT_POPOVER_MARGINS, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0], t0 = animate ? "transform" : void 0;
3607
+ let t1;
3608
+ $[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t0 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t1 = {
3106
3609
  left: x,
3107
3610
  originX,
3108
3611
  originY,
@@ -3110,92 +3613,137 @@ const MotionCard$1 = styled(motion.create(Card)).withConfig({
3110
3613
  top: y,
3111
3614
  width,
3112
3615
  zIndex,
3113
- willChange: animate ? "transform" : void 0,
3616
+ willChange: t0,
3114
3617
  ...style
3115
- }), [animate, originX, originY, strategy, style, width, x, y, zIndex]), arrowStyle = useMemo(() => ({
3116
- left: arrowX !== null ? arrowX : void 0,
3117
- top: arrowY !== null ? arrowY : void 0,
3618
+ }, $[23] = originX, $[24] = originY, $[25] = strategy, $[26] = style, $[27] = t0, $[28] = width, $[29] = x, $[30] = y, $[31] = zIndex, $[32] = t1) : t1 = $[32];
3619
+ const rootStyle2 = t1, t2 = arrowX !== null ? arrowX : void 0, t3 = arrowY !== null ? arrowY : void 0;
3620
+ let t4;
3621
+ $[33] !== t2 || $[34] !== t3 ? (t4 = {
3622
+ left: t2,
3623
+ top: t3,
3118
3624
  right: void 0,
3119
3625
  bottom: void 0
3120
- }), [arrowX, arrowY]);
3121
- return /* @__PURE__ */ jsxs(MotionCard$1, { "data-ui": "Popover", ...restProps, "data-placement": placement, radius, ref, scheme, shadow, sizing: "border", style: rootStyle2, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: animate ? ["hidden", "initial"] : void 0, animate: animate ? ["visible", "scaleIn"] : void 0, exit: animate ? ["hidden", "scaleOut"] : void 0, children: [
3122
- /* @__PURE__ */ jsx(MotionFlex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, overflow, variants: POPOVER_MOTION_PROPS.children, transition: POPOVER_MOTION_PROPS.transition, children: /* @__PURE__ */ jsx(Flex, { direction: "column", flex: 1, padding, children }) }),
3123
- arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS })
3124
- ] });
3626
+ }, $[33] = t2, $[34] = t3, $[35] = t4) : t4 = $[35];
3627
+ const arrowStyle = t4, t5 = restProps;
3628
+ let t6;
3629
+ $[36] !== animate ? (t6 = animate ? ["hidden", "initial"] : void 0, $[36] = animate, $[37] = t6) : t6 = $[37];
3630
+ let t7;
3631
+ $[38] !== animate ? (t7 = animate ? ["visible", "scaleIn"] : void 0, $[38] = animate, $[39] = t7) : t7 = $[39];
3632
+ let t8;
3633
+ $[40] !== animate ? (t8 = animate ? ["hidden", "scaleOut"] : void 0, $[40] = animate, $[41] = t8) : t8 = $[41];
3634
+ let t9;
3635
+ $[42] !== children || $[43] !== padding ? (t9 = /* @__PURE__ */ jsx(Flex, { direction: "column", flex: 1, padding, children }), $[42] = children, $[43] = padding, $[44] = t9) : t9 = $[44];
3636
+ let t10;
3637
+ $[45] !== overflow || $[46] !== t9 ? (t10 = /* @__PURE__ */ jsx(MotionFlex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, overflow, variants: POPOVER_MOTION_PROPS.children, transition: POPOVER_MOTION_PROPS.transition, children: t9 }), $[45] = overflow, $[46] = t9, $[47] = t10) : t10 = $[47];
3638
+ let t11;
3639
+ $[48] !== arrow2 || $[49] !== arrowRef || $[50] !== arrowStyle ? (t11 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[48] = arrow2, $[49] = arrowRef, $[50] = arrowStyle, $[51] = t11) : t11 = $[51];
3640
+ let t12;
3641
+ return $[52] !== placement || $[53] !== radius || $[54] !== ref || $[55] !== rootStyle2 || $[56] !== scheme || $[57] !== shadow || $[58] !== t10 || $[59] !== t11 || $[60] !== t5 || $[61] !== t6 || $[62] !== t7 || $[63] !== t8 || $[64] !== tone ? (t12 = /* @__PURE__ */ jsxs(MotionCard$1, { "data-ui": "Popover", ...t5, "data-placement": placement, radius, ref, scheme, shadow, sizing: "border", style: rootStyle2, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t6, animate: t7, exit: t8, children: [
3642
+ t10,
3643
+ t11
3644
+ ] }), $[52] = placement, $[53] = radius, $[54] = ref, $[55] = rootStyle2, $[56] = scheme, $[57] = shadow, $[58] = t10, $[59] = t11, $[60] = t5, $[61] = t6, $[62] = t7, $[63] = t8, $[64] = tone, $[65] = t12) : t12 = $[65], t12;
3125
3645
  });
3126
3646
  PopoverCard.displayName = "ForwardRef(PopoverCard)";
3127
3647
  const ViewportOverlay = () => {
3128
- const {
3648
+ const $ = c(2), {
3129
3649
  zIndex
3130
3650
  } = useLayer();
3131
- return /* @__PURE__ */ jsx("div", { style: {
3651
+ let t0;
3652
+ return $[0] !== zIndex ? (t0 = /* @__PURE__ */ jsx("div", { style: {
3132
3653
  height: "100vh",
3133
3654
  inset: 0,
3134
3655
  position: "fixed",
3135
3656
  width: "100vw",
3136
3657
  zIndex
3137
- } });
3658
+ } }), $[0] = zIndex, $[1] = t0) : t0 = $[1], t0;
3138
3659
  }, Popover = forwardRef(function(props, forwardedRef) {
3139
- const {
3660
+ const $ = c(126), {
3140
3661
  container,
3141
3662
  layer
3142
- } = useTheme_v2(), boundaryElementContext = useBoundaryElement(), {
3143
- __unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
3144
- animate: _animate = !1,
3145
- arrow: arrowProp = !1,
3146
- boundaryElement: _boundaryElement,
3147
- children: childProp,
3148
- constrainSize = !1,
3149
- content,
3150
- disabled,
3151
- fallbackPlacements: _fallbackPlacements,
3152
- matchReferenceWidth,
3153
- floatingBoundary: _floatingBoundary,
3154
- modal,
3155
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
3156
- onActivate,
3157
- open,
3158
- overflow = "hidden",
3159
- padding: paddingProp,
3160
- placement: placementProp = "bottom",
3161
- placementStrategy = "flip",
3162
- portal,
3163
- preventOverflow = !0,
3164
- radius: radiusProp = 3,
3165
- referenceBoundary: _referenceBoundary,
3166
- referenceElement,
3167
- scheme,
3168
- shadow: shadowProp = 3,
3169
- tone = "inherit",
3170
- width: widthProp = "auto",
3171
- zOffset: _zOffsetProp,
3172
- updateRef,
3173
- ...restProps
3174
- } = props, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacements = _fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"], floatingBoundary = _floatingBoundary ?? props.boundaryElement ?? boundaryElementContext.element, referenceBoundary = _referenceBoundary ?? props.boundaryElement ?? boundaryElementContext.element, zOffsetProp = _zOffsetProp ?? layer.popover.zOffset, animate = usePrefersReducedMotion() ? !1 : _animate, boundarySize = useElementSize(boundaryElement)?.border, padding = _getArrayProp(paddingProp), radius = _getArrayProp(radiusProp), shadow = _getArrayProp(shadowProp), widthArrayProp = _getArrayProp(widthProp), zOffset = _getArrayProp(zOffsetProp), ref = useRef(null), arrowRef = useRef(null), rootBoundary = "viewport";
3175
- useImperativeHandle(forwardedRef, () => ref.current);
3663
+ } = useTheme_v2(), boundaryElementContext = useBoundaryElement();
3664
+ let _boundaryElement, _fallbackPlacements, _floatingBoundary, _referenceBoundary, _zOffsetProp, childProp, content, disabled, matchReferenceWidth, modal, open, paddingProp, portal, referenceElement, restProps, scheme, t0, t1, t10, t11, t2, t3, t4, t5, t6, t7, t8, t9, updateRef;
3665
+ if ($[0] !== props) {
3666
+ const {
3667
+ __unstable_margins: t122,
3668
+ animate: t132,
3669
+ arrow: t142,
3670
+ boundaryElement: t152,
3671
+ children: t162,
3672
+ constrainSize: t172,
3673
+ content: t182,
3674
+ disabled: t192,
3675
+ fallbackPlacements: t202,
3676
+ matchReferenceWidth: t212,
3677
+ floatingBoundary: t222,
3678
+ modal: t232,
3679
+ onActivate,
3680
+ open: t242,
3681
+ overflow: t252,
3682
+ padding: t262,
3683
+ placement: t272,
3684
+ placementStrategy: t282,
3685
+ portal: t292,
3686
+ preventOverflow: t302,
3687
+ radius: t312,
3688
+ referenceBoundary: t322,
3689
+ referenceElement: t332,
3690
+ scheme: t342,
3691
+ shadow: t352,
3692
+ tone: t362,
3693
+ width: t372,
3694
+ zOffset: t382,
3695
+ updateRef: t392,
3696
+ ...t402
3697
+ } = props;
3698
+ t0 = t122, t1 = t132, t2 = t142, _boundaryElement = t152, childProp = t162, t3 = t172, content = t182, disabled = t192, _fallbackPlacements = t202, matchReferenceWidth = t212, _floatingBoundary = t222, modal = t232, open = t242, t4 = t252, paddingProp = t262, t5 = t272, t6 = t282, portal = t292, t7 = t302, t8 = t312, _referenceBoundary = t322, referenceElement = t332, scheme = t342, t9 = t352, t10 = t362, t11 = t372, _zOffsetProp = t382, updateRef = t392, restProps = t402, $[0] = props, $[1] = _boundaryElement, $[2] = _fallbackPlacements, $[3] = _floatingBoundary, $[4] = _referenceBoundary, $[5] = _zOffsetProp, $[6] = childProp, $[7] = content, $[8] = disabled, $[9] = matchReferenceWidth, $[10] = modal, $[11] = open, $[12] = paddingProp, $[13] = portal, $[14] = referenceElement, $[15] = restProps, $[16] = scheme, $[17] = t0, $[18] = t1, $[19] = t10, $[20] = t11, $[21] = t2, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = t6, $[26] = t7, $[27] = t8, $[28] = t9, $[29] = updateRef;
3699
+ } else
3700
+ _boundaryElement = $[1], _fallbackPlacements = $[2], _floatingBoundary = $[3], _referenceBoundary = $[4], _zOffsetProp = $[5], childProp = $[6], content = $[7], disabled = $[8], matchReferenceWidth = $[9], modal = $[10], open = $[11], paddingProp = $[12], portal = $[13], referenceElement = $[14], restProps = $[15], scheme = $[16], t0 = $[17], t1 = $[18], t10 = $[19], t11 = $[20], t2 = $[21], t3 = $[22], t4 = $[23], t5 = $[24], t6 = $[25], t7 = $[26], t8 = $[27], t9 = $[28], updateRef = $[29];
3701
+ const margins = t0 === void 0 ? DEFAULT_POPOVER_MARGINS : t0, _animate = t1 === void 0 ? !1 : t1, arrowProp = t2 === void 0 ? !1 : t2, constrainSize = t3 === void 0 ? !1 : t3, overflow = t4 === void 0 ? "hidden" : t4, placementProp = t5 === void 0 ? "bottom" : t5, placementStrategy = t6 === void 0 ? "flip" : t6, preventOverflow = t7 === void 0 ? !0 : t7, radiusProp = t8 === void 0 ? 3 : t8, shadowProp = t9 === void 0 ? 3 : t9, tone = t10 === void 0 ? "inherit" : t10, widthProp = t11 === void 0 ? "auto" : t11, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacements = _fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"], floatingBoundary = _floatingBoundary ?? props.boundaryElement ?? boundaryElementContext.element, referenceBoundary = _referenceBoundary ?? props.boundaryElement ?? boundaryElementContext.element, zOffsetProp = _zOffsetProp ?? layer.popover.zOffset, animate = usePrefersReducedMotion() ? !1 : _animate, boundarySize = useElementSize(boundaryElement)?.border;
3702
+ let t12;
3703
+ $[30] !== paddingProp ? (t12 = _getArrayProp(paddingProp), $[30] = paddingProp, $[31] = t12) : t12 = $[31];
3704
+ const padding = t12;
3705
+ let t13;
3706
+ $[32] !== radiusProp ? (t13 = _getArrayProp(radiusProp), $[32] = radiusProp, $[33] = t13) : t13 = $[33];
3707
+ const radius = t13;
3708
+ let t14;
3709
+ $[34] !== shadowProp ? (t14 = _getArrayProp(shadowProp), $[34] = shadowProp, $[35] = t14) : t14 = $[35];
3710
+ const shadow = t14, widthArrayProp = _getArrayProp(widthProp);
3711
+ let t15;
3712
+ $[36] !== zOffsetProp ? (t15 = _getArrayProp(zOffsetProp), $[36] = zOffsetProp, $[37] = t15) : t15 = $[37];
3713
+ const zOffset = t15, ref = useRef(null), arrowRef = useRef(null);
3714
+ let t16;
3715
+ $[38] === Symbol.for("react.memo_cache_sentinel") ? (t16 = () => ref.current, $[38] = t16) : t16 = $[38], useImperativeHandle(forwardedRef, t16);
3176
3716
  const mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize?.width : void 0, width = calcCurrentWidth({
3177
3717
  container,
3178
3718
  mediaIndex,
3179
3719
  width: widthArrayProp
3180
3720
  }), widthRef = useRef(width);
3181
- useEffect(() => {
3721
+ let t17, t18;
3722
+ $[39] !== width ? (t17 = () => {
3182
3723
  widthRef.current = width;
3183
- }, [width]);
3184
- const maxWidth = calcMaxWidth({
3724
+ }, t18 = [width], $[39] = width, $[40] = t17, $[41] = t18) : (t17 = $[40], t18 = $[41]), useEffect(t17, t18);
3725
+ let t19;
3726
+ $[42] !== boundaryWidth || $[43] !== width ? (t19 = calcMaxWidth({
3185
3727
  boundaryWidth,
3186
3728
  currentWidth: width
3187
- }), maxWidthRef = useRef(maxWidth);
3188
- useEffect(() => {
3729
+ }), $[42] = boundaryWidth, $[43] = width, $[44] = t19) : t19 = $[44];
3730
+ const maxWidth = t19, maxWidthRef = useRef(maxWidth);
3731
+ let t20, t21;
3732
+ $[45] !== maxWidth ? (t20 = () => {
3189
3733
  maxWidthRef.current = maxWidth;
3190
- }, [maxWidth]);
3734
+ }, t21 = [maxWidth], $[45] = maxWidth, $[46] = t20, $[47] = t21) : (t20 = $[46], t21 = $[47]), useEffect(t20, t21);
3191
3735
  const referenceWidthRef = useRef(void 0);
3192
- useEffect(() => {
3736
+ let t22, t23;
3737
+ $[48] !== matchReferenceWidth || $[49] !== maxWidth || $[50] !== open || $[51] !== width ? (t22 = () => {
3193
3738
  const floatingElement = ref.current;
3194
- if (!open || !floatingElement) return;
3195
- const referenceWidth2 = referenceWidthRef.current;
3196
- matchReferenceWidth ? referenceWidth2 !== void 0 && (floatingElement.style.width = `${referenceWidth2}px`) : width !== void 0 && (floatingElement.style.width = `${width}px`), typeof maxWidth == "number" && (floatingElement.style.maxWidth = `${maxWidth}px`);
3197
- }, [width, matchReferenceWidth, maxWidth, open]);
3198
- const [referenceWidth, setReferenceWidth] = useState(void 0), middleware = useMiddleware$1({
3739
+ if (!open || !floatingElement)
3740
+ return;
3741
+ const referenceWidth = referenceWidthRef.current;
3742
+ matchReferenceWidth ? referenceWidth !== void 0 && (floatingElement.style.width = `${referenceWidth}px`) : width !== void 0 && (floatingElement.style.width = `${width}px`), typeof maxWidth == "number" && (floatingElement.style.maxWidth = `${maxWidth}px`);
3743
+ }, t23 = [width, matchReferenceWidth, maxWidth, open], $[48] = matchReferenceWidth, $[49] = maxWidth, $[50] = open, $[51] = width, $[52] = t22, $[53] = t23) : (t22 = $[52], t23 = $[53]), useEffect(t22, t23);
3744
+ const [referenceWidth_0, setReferenceWidth] = useState(void 0);
3745
+ let t24;
3746
+ $[54] !== animate || $[55] !== arrowProp || $[56] !== constrainSize || $[57] !== fallbackPlacements || $[58] !== floatingBoundary || $[59] !== margins || $[60] !== matchReferenceWidth || $[61] !== placementProp || $[62] !== placementStrategy || $[63] !== preventOverflow || $[64] !== referenceBoundary ? (t24 = {
3199
3747
  animate,
3200
3748
  arrowProp,
3201
3749
  arrowRef,
@@ -3210,10 +3758,23 @@ const ViewportOverlay = () => {
3210
3758
  preventOverflow,
3211
3759
  referenceBoundary,
3212
3760
  referenceWidthRef,
3213
- rootBoundary,
3761
+ rootBoundary: "viewport",
3214
3762
  setReferenceWidth,
3215
3763
  widthRef
3216
- }), {
3764
+ }, $[54] = animate, $[55] = arrowProp, $[56] = constrainSize, $[57] = fallbackPlacements, $[58] = floatingBoundary, $[59] = margins, $[60] = matchReferenceWidth, $[61] = placementProp, $[62] = placementStrategy, $[63] = preventOverflow, $[64] = referenceBoundary, $[65] = t24) : t24 = $[65];
3765
+ const middleware = useMiddleware$1(t24);
3766
+ let t25;
3767
+ $[66] !== referenceElement ? (t25 = referenceElement ? {
3768
+ reference: referenceElement
3769
+ } : void 0, $[66] = referenceElement, $[67] = t25) : t25 = $[67];
3770
+ let t26;
3771
+ $[68] !== middleware || $[69] !== placementProp || $[70] !== t25 ? (t26 = {
3772
+ middleware,
3773
+ placement: placementProp,
3774
+ whileElementsMounted: autoUpdate,
3775
+ elements: t25
3776
+ }, $[68] = middleware, $[69] = placementProp, $[70] = t25, $[71] = t26) : t26 = $[71];
3777
+ const {
3217
3778
  x,
3218
3779
  y,
3219
3780
  middlewareData,
@@ -3221,87 +3782,148 @@ const ViewportOverlay = () => {
3221
3782
  refs,
3222
3783
  strategy,
3223
3784
  update
3224
- } = useFloating({
3225
- middleware,
3226
- placement: placementProp,
3227
- whileElementsMounted: autoUpdate,
3228
- elements: referenceElement ? {
3229
- reference: referenceElement
3230
- } : void 0
3231
- }), referenceHidden = middlewareData.hide?.referenceHidden, arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, setArrow = useCallback((arrowEl) => {
3785
+ } = useFloating(t26), referenceHidden = middlewareData.hide?.referenceHidden, arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY;
3786
+ let t27;
3787
+ $[72] === Symbol.for("react.memo_cache_sentinel") ? (t27 = (arrowEl) => {
3232
3788
  arrowRef.current = arrowEl;
3233
- }, []), setFloating = useCallback((node) => {
3789
+ }, $[72] = t27) : t27 = $[72];
3790
+ const setArrow = t27;
3791
+ let t28;
3792
+ $[73] !== refs ? (t28 = (node) => {
3234
3793
  ref.current = node, refs.setFloating(node);
3235
- }, [refs]);
3236
- useImperativeHandle(childProp ? getElementRef(childProp) : null, () => refs.reference.current);
3237
- const child = useMemo(() => referenceElement ? childProp : childProp ? cloneElement(childProp, {
3238
- ref: refs.setReference
3239
- }) : null, [childProp, referenceElement, refs.setReference]);
3240
- if (useImperativeHandle(updateRef, () => update, [update]), disabled)
3241
- return childProp || /* @__PURE__ */ jsx(Fragment, {});
3242
- const popover = /* @__PURE__ */ jsxs(LayerProvider, { zOffset, children: [
3243
- modal && /* @__PURE__ */ jsx(ViewportOverlay, {}),
3244
- /* @__PURE__ */ jsx(PopoverCard, { ...restProps, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, hidden: referenceHidden, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, tone, width: matchReferenceWidth ? referenceWidth : width, x, y, children: content })
3245
- ] }), children = open && (portal ? /* @__PURE__ */ jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: popover }) : popover);
3246
- return /* @__PURE__ */ jsxs(Fragment, { children: [
3247
- animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children,
3794
+ }, $[73] = refs, $[74] = t28) : t28 = $[74];
3795
+ const setFloating = t28;
3796
+ let t29;
3797
+ $[75] !== childProp ? (t29 = childProp ? getElementRef(childProp) : null, $[75] = childProp, $[76] = t29) : t29 = $[76];
3798
+ let t30;
3799
+ $[77] !== refs.reference.current ? (t30 = () => refs.reference.current, $[77] = refs.reference.current, $[78] = t30) : t30 = $[78], useImperativeHandle(t29, t30);
3800
+ let t31;
3801
+ bb0: {
3802
+ if (referenceElement) {
3803
+ t31 = childProp;
3804
+ break bb0;
3805
+ }
3806
+ if (!childProp) {
3807
+ t31 = null;
3808
+ break bb0;
3809
+ }
3810
+ let t322;
3811
+ $[79] !== childProp || $[80] !== refs.setReference ? (t322 = cloneElement(childProp, {
3812
+ ref: refs.setReference
3813
+ }), $[79] = childProp, $[80] = refs.setReference, $[81] = t322) : t322 = $[81], t31 = t322;
3814
+ }
3815
+ const child = t31;
3816
+ let t32, t33;
3817
+ if ($[82] !== update ? (t32 = () => update, t33 = [update], $[82] = update, $[83] = t32, $[84] = t33) : (t32 = $[83], t33 = $[84]), useImperativeHandle(updateRef, t32, t33), disabled) {
3818
+ let t342;
3819
+ return $[85] !== childProp ? (t342 = childProp || /* @__PURE__ */ jsx(Fragment, {}), $[85] = childProp, $[86] = t342) : t342 = $[86], t342;
3820
+ }
3821
+ let t34;
3822
+ $[87] !== modal ? (t34 = modal && /* @__PURE__ */ jsx(ViewportOverlay, {}), $[87] = modal, $[88] = t34) : t34 = $[88];
3823
+ const t35 = matchReferenceWidth ? referenceWidth_0 : width;
3824
+ let t36;
3825
+ $[89] !== animate || $[90] !== arrowProp || $[91] !== arrowX || $[92] !== arrowY || $[93] !== content || $[94] !== margins || $[95] !== originX || $[96] !== originY || $[97] !== overflow || $[98] !== padding || $[99] !== placement || $[100] !== radius || $[101] !== referenceHidden || $[102] !== restProps || $[103] !== scheme || $[104] !== setFloating || $[105] !== shadow || $[106] !== strategy || $[107] !== t35 || $[108] !== tone || $[109] !== x || $[110] !== y ? (t36 = /* @__PURE__ */ jsx(PopoverCard, { ...restProps, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, hidden: referenceHidden, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, tone, width: t35, x, y, children: content }), $[89] = animate, $[90] = arrowProp, $[91] = arrowX, $[92] = arrowY, $[93] = content, $[94] = margins, $[95] = originX, $[96] = originY, $[97] = overflow, $[98] = padding, $[99] = placement, $[100] = radius, $[101] = referenceHidden, $[102] = restProps, $[103] = scheme, $[104] = setFloating, $[105] = shadow, $[106] = strategy, $[107] = t35, $[108] = tone, $[109] = x, $[110] = y, $[111] = t36) : t36 = $[111];
3826
+ let t37;
3827
+ $[112] !== t34 || $[113] !== t36 || $[114] !== zOffset ? (t37 = /* @__PURE__ */ jsxs(LayerProvider, { zOffset, children: [
3828
+ t34,
3829
+ t36
3830
+ ] }), $[112] = t34, $[113] = t36, $[114] = zOffset, $[115] = t37) : t37 = $[115];
3831
+ const popover = t37;
3832
+ let t38;
3833
+ $[116] !== open || $[117] !== popover || $[118] !== portal ? (t38 = open && (portal ? /* @__PURE__ */ jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: popover }) : popover), $[116] = open, $[117] = popover, $[118] = portal, $[119] = t38) : t38 = $[119];
3834
+ const children = t38;
3835
+ let t39;
3836
+ $[120] !== animate || $[121] !== children ? (t39 = animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children, $[120] = animate, $[121] = children, $[122] = t39) : t39 = $[122];
3837
+ let t40;
3838
+ return $[123] !== child || $[124] !== t39 ? (t40 = /* @__PURE__ */ jsxs(Fragment, { children: [
3839
+ t39,
3248
3840
  child
3249
- ] });
3841
+ ] }), $[123] = child, $[124] = t39, $[125] = t40) : t40 = $[125], t40;
3250
3842
  });
3251
3843
  Popover.displayName = "ForwardRef(Popover)";
3252
- function useMiddleware$1({
3253
- animate,
3254
- arrowProp,
3255
- arrowRef,
3256
- constrainSize,
3257
- fallbackPlacements,
3258
- floatingBoundary,
3259
- margins,
3260
- matchReferenceWidth,
3261
- maxWidthRef,
3262
- placementProp,
3263
- placementStrategy,
3264
- preventOverflow,
3265
- referenceBoundary,
3266
- referenceWidthRef,
3267
- rootBoundary,
3268
- setReferenceWidth,
3269
- widthRef
3270
- }) {
3271
- return useMemo(() => {
3272
- const ret = [];
3273
- return (constrainSize || preventOverflow) && (placementStrategy === "autoPlacement" ? ret.push(autoPlacement({
3274
- allowedPlacements: [placementProp].concat(fallbackPlacements)
3275
- })) : ret.push(flip({
3276
- boundary: floatingBoundary || void 0,
3277
- fallbackPlacements,
3278
- padding: DEFAULT_POPOVER_PADDING,
3279
- rootBoundary
3280
- }))), ret.push(offset({
3844
+ function useMiddleware$1(t0) {
3845
+ const $ = c(42), {
3846
+ animate,
3847
+ arrowProp,
3848
+ arrowRef,
3849
+ constrainSize,
3850
+ fallbackPlacements,
3851
+ floatingBoundary,
3852
+ margins,
3853
+ matchReferenceWidth,
3854
+ maxWidthRef,
3855
+ placementProp,
3856
+ placementStrategy,
3857
+ preventOverflow,
3858
+ referenceBoundary,
3859
+ referenceWidthRef,
3860
+ rootBoundary,
3861
+ setReferenceWidth,
3862
+ widthRef
3863
+ } = t0;
3864
+ let ret;
3865
+ if ($[0] !== animate || $[1] !== arrowProp || $[2] !== arrowRef || $[3] !== constrainSize || $[4] !== fallbackPlacements || $[5] !== floatingBoundary || $[6] !== margins || $[7] !== matchReferenceWidth || $[8] !== maxWidthRef || $[9] !== placementProp || $[10] !== placementStrategy || $[11] !== preventOverflow || $[12] !== referenceBoundary || $[13] !== referenceWidthRef || $[14] !== rootBoundary || $[15] !== setReferenceWidth || $[16] !== widthRef) {
3866
+ if (ret = [], constrainSize || preventOverflow)
3867
+ if (placementStrategy === "autoPlacement") {
3868
+ let t12;
3869
+ $[18] !== fallbackPlacements || $[19] !== placementProp ? (t12 = autoPlacement({
3870
+ allowedPlacements: [placementProp].concat(fallbackPlacements)
3871
+ }), $[18] = fallbackPlacements, $[19] = placementProp, $[20] = t12) : t12 = $[20], ret.push(t12);
3872
+ } else {
3873
+ const t12 = floatingBoundary || void 0;
3874
+ let t22;
3875
+ $[21] !== fallbackPlacements || $[22] !== rootBoundary || $[23] !== t12 ? (t22 = flip({
3876
+ boundary: t12,
3877
+ fallbackPlacements,
3878
+ padding: DEFAULT_POPOVER_PADDING,
3879
+ rootBoundary
3880
+ }), $[21] = fallbackPlacements, $[22] = rootBoundary, $[23] = t12, $[24] = t22) : t22 = $[24], ret.push(t22);
3881
+ }
3882
+ let t1;
3883
+ if ($[25] === Symbol.for("react.memo_cache_sentinel") ? (t1 = offset({
3281
3884
  mainAxis: DEFAULT_POPOVER_DISTANCE
3282
- })), (constrainSize || matchReferenceWidth) && ret.push(size({
3283
- boundaryElement: floatingBoundary || void 0,
3284
- constrainSize,
3285
- margins,
3286
- matchReferenceWidth,
3287
- maxWidthRef,
3288
- padding: DEFAULT_POPOVER_PADDING,
3289
- referenceWidthRef,
3290
- setReferenceWidth,
3291
- widthRef
3292
- })), preventOverflow && ret.push(shift({
3293
- boundary: floatingBoundary || void 0,
3294
- rootBoundary,
3295
- padding: DEFAULT_POPOVER_PADDING
3296
- })), arrowProp && ret.push(arrow({
3297
- element: arrowRef,
3298
- padding: DEFAULT_POPOVER_PADDING
3299
- })), animate && ret.push(origin), ret.push(hide({
3300
- boundary: referenceBoundary || void 0,
3885
+ }), $[25] = t1) : t1 = $[25], ret.push(t1), constrainSize || matchReferenceWidth) {
3886
+ const t22 = floatingBoundary || void 0;
3887
+ let t32;
3888
+ $[26] !== constrainSize || $[27] !== margins || $[28] !== matchReferenceWidth || $[29] !== maxWidthRef || $[30] !== referenceWidthRef || $[31] !== setReferenceWidth || $[32] !== t22 || $[33] !== widthRef ? (t32 = size({
3889
+ boundaryElement: t22,
3890
+ constrainSize,
3891
+ margins,
3892
+ matchReferenceWidth,
3893
+ maxWidthRef,
3894
+ padding: DEFAULT_POPOVER_PADDING,
3895
+ referenceWidthRef,
3896
+ setReferenceWidth,
3897
+ widthRef
3898
+ }), $[26] = constrainSize, $[27] = margins, $[28] = matchReferenceWidth, $[29] = maxWidthRef, $[30] = referenceWidthRef, $[31] = setReferenceWidth, $[32] = t22, $[33] = widthRef, $[34] = t32) : t32 = $[34], ret.push(t32);
3899
+ }
3900
+ if (preventOverflow) {
3901
+ const t22 = floatingBoundary || void 0;
3902
+ let t32;
3903
+ $[35] !== rootBoundary || $[36] !== t22 ? (t32 = shift({
3904
+ boundary: t22,
3905
+ rootBoundary,
3906
+ padding: DEFAULT_POPOVER_PADDING
3907
+ }), $[35] = rootBoundary, $[36] = t22, $[37] = t32) : t32 = $[37], ret.push(t32);
3908
+ }
3909
+ if (arrowProp) {
3910
+ let t22;
3911
+ $[38] !== arrowRef ? (t22 = arrow({
3912
+ element: arrowRef,
3913
+ padding: DEFAULT_POPOVER_PADDING
3914
+ }), $[38] = arrowRef, $[39] = t22) : t22 = $[39], ret.push(t22);
3915
+ }
3916
+ animate && ret.push(origin);
3917
+ const t2 = referenceBoundary || void 0;
3918
+ let t3;
3919
+ $[40] !== t2 ? (t3 = hide({
3920
+ boundary: t2,
3301
3921
  padding: DEFAULT_POPOVER_PADDING,
3302
3922
  strategy: "referenceHidden"
3303
- })), ret;
3304
- }, [animate, arrowProp, arrowRef, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, maxWidthRef, placementProp, placementStrategy, preventOverflow, referenceBoundary, referenceWidthRef, rootBoundary, setReferenceWidth, widthRef]);
3923
+ }), $[40] = t2, $[41] = t3) : t3 = $[41], ret.push(t3), $[0] = animate, $[1] = arrowProp, $[2] = arrowRef, $[3] = constrainSize, $[4] = fallbackPlacements, $[5] = floatingBoundary, $[6] = margins, $[7] = matchReferenceWidth, $[8] = maxWidthRef, $[9] = placementProp, $[10] = placementStrategy, $[11] = preventOverflow, $[12] = referenceBoundary, $[13] = referenceWidthRef, $[14] = rootBoundary, $[15] = setReferenceWidth, $[16] = widthRef, $[17] = ret;
3924
+ } else
3925
+ ret = $[17];
3926
+ return ret;
3305
3927
  }
3306
3928
  function radioBaseStyle() {
3307
3929
  return css`
@@ -3424,18 +4046,29 @@ const StyledRadio = /* @__PURE__ */ styled.div.withConfig({
3424
4046
  displayName: "Input",
3425
4047
  componentId: "sc-ccrwkf-1"
3426
4048
  })(inputElementStyle), Radio = forwardRef(function(props, forwardedRef) {
3427
- const {
4049
+ const $ = c(19);
4050
+ let className, customValidity, disabled, readOnly, restProps, style;
4051
+ $[0] !== props ? ({
3428
4052
  className,
3429
4053
  disabled,
3430
4054
  style,
3431
4055
  customValidity,
3432
4056
  readOnly,
3433
4057
  ...restProps
3434
- } = props, ref = useRef(null);
3435
- return useImperativeHandle(forwardedRef, () => ref.current), useCustomValidity(ref, customValidity), /* @__PURE__ */ jsxs(StyledRadio, { className, "data-ui": "Radio", style, children: [
3436
- /* @__PURE__ */ jsx(Input$4, { "data-read-only": !disabled && readOnly ? "" : void 0, "data-error": customValidity ? "" : void 0, ...restProps, disabled: disabled || readOnly, readOnly, ref, type: "radio" }),
3437
- /* @__PURE__ */ jsx("span", {})
3438
- ] });
4058
+ } = props, $[0] = props, $[1] = className, $[2] = customValidity, $[3] = disabled, $[4] = readOnly, $[5] = restProps, $[6] = style) : (className = $[1], customValidity = $[2], disabled = $[3], readOnly = $[4], restProps = $[5], style = $[6]);
4059
+ const ref = useRef(null);
4060
+ let t0;
4061
+ $[7] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[7] = t0) : t0 = $[7], useImperativeHandle(forwardedRef, t0), useCustomValidity(ref, customValidity);
4062
+ const t1 = !disabled && readOnly ? "" : void 0, t2 = customValidity ? "" : void 0, t3 = disabled || readOnly;
4063
+ let t4;
4064
+ $[8] !== readOnly || $[9] !== restProps || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsx(Input$4, { "data-read-only": t1, "data-error": t2, ...restProps, disabled: t3, readOnly, ref, type: "radio" }), $[8] = readOnly, $[9] = restProps, $[10] = t1, $[11] = t2, $[12] = t3, $[13] = t4) : t4 = $[13];
4065
+ let t5;
4066
+ $[14] === Symbol.for("react.memo_cache_sentinel") ? (t5 = /* @__PURE__ */ jsx("span", {}), $[14] = t5) : t5 = $[14];
4067
+ let t6;
4068
+ return $[15] !== className || $[16] !== style || $[17] !== t4 ? (t6 = /* @__PURE__ */ jsxs(StyledRadio, { className, "data-ui": "Radio", style, children: [
4069
+ t4,
4070
+ t5
4071
+ ] }), $[15] = className, $[16] = style, $[17] = t4, $[18] = t6) : t6 = $[18], t6;
3439
4072
  });
3440
4073
  Radio.displayName = "ForwardRef(Radio)";
3441
4074
  function rootStyle() {
@@ -3590,21 +4223,45 @@ const selectStyle = {
3590
4223
  displayName: "IconBox",
3591
4224
  componentId: "sc-5mxno7-2"
3592
4225
  })(selectStyle.iconBox), Select = forwardRef(function(props, forwardedRef) {
3593
- const {
4226
+ const $ = c(37);
4227
+ let children, customValidity, disabled, readOnly, restProps, t0, t1, t2, t3;
4228
+ $[0] !== props ? ({
3594
4229
  children,
3595
4230
  customValidity,
3596
4231
  disabled,
3597
- fontSize: fontSize2 = 2,
3598
- padding = 3,
3599
- radius = 2,
4232
+ fontSize: t0,
4233
+ padding: t1,
4234
+ radius: t2,
3600
4235
  readOnly,
3601
- space = 3,
4236
+ space: t3,
3602
4237
  ...restProps
3603
- } = props, ref = useRef(null);
3604
- return useImperativeHandle(forwardedRef, () => ref.current), useCustomValidity(ref, customValidity), /* @__PURE__ */ jsxs(StyledSelect, { "data-ui": "Select", children: [
3605
- /* @__PURE__ */ jsx(Input$3, { "data-read-only": !disabled && readOnly ? "" : void 0, "data-ui": "Select", ...restProps, $fontSize: _getArrayProp(fontSize2), $padding: _getArrayProp(padding), $radius: _getArrayProp(radius), $space: _getArrayProp(space), disabled: disabled || readOnly, ref, children }),
3606
- /* @__PURE__ */ jsx(IconBox, { padding, children: /* @__PURE__ */ jsx(Text, { size: fontSize2, children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) }) })
3607
- ] });
4238
+ } = props, $[0] = props, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = readOnly, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3) : (children = $[1], customValidity = $[2], disabled = $[3], readOnly = $[4], restProps = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9]);
4239
+ const fontSize2 = t0 === void 0 ? 2 : t0, padding = t1 === void 0 ? 3 : t1, radius = t2 === void 0 ? 2 : t2, space = t3 === void 0 ? 3 : t3, ref = useRef(null);
4240
+ let t4;
4241
+ $[10] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[10] = t4) : t4 = $[10], useImperativeHandle(forwardedRef, t4), useCustomValidity(ref, customValidity);
4242
+ const t5 = !disabled && readOnly ? "" : void 0;
4243
+ let t6;
4244
+ $[11] !== fontSize2 ? (t6 = _getArrayProp(fontSize2), $[11] = fontSize2, $[12] = t6) : t6 = $[12];
4245
+ let t7;
4246
+ $[13] !== padding ? (t7 = _getArrayProp(padding), $[13] = padding, $[14] = t7) : t7 = $[14];
4247
+ let t8;
4248
+ $[15] !== radius ? (t8 = _getArrayProp(radius), $[15] = radius, $[16] = t8) : t8 = $[16];
4249
+ let t9;
4250
+ $[17] !== space ? (t9 = _getArrayProp(space), $[17] = space, $[18] = t9) : t9 = $[18];
4251
+ const t10 = disabled || readOnly;
4252
+ let t11;
4253
+ $[19] !== children || $[20] !== restProps || $[21] !== t10 || $[22] !== t5 || $[23] !== t6 || $[24] !== t7 || $[25] !== t8 || $[26] !== t9 ? (t11 = /* @__PURE__ */ jsx(Input$3, { "data-read-only": t5, "data-ui": "Select", ...restProps, $fontSize: t6, $padding: t7, $radius: t8, $space: t9, disabled: t10, ref, children }), $[19] = children, $[20] = restProps, $[21] = t10, $[22] = t5, $[23] = t6, $[24] = t7, $[25] = t8, $[26] = t9, $[27] = t11) : t11 = $[27];
4254
+ let t12;
4255
+ $[28] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsx(ChevronDownIcon, {}), $[28] = t12) : t12 = $[28];
4256
+ let t13;
4257
+ $[29] !== fontSize2 ? (t13 = /* @__PURE__ */ jsx(Text, { size: fontSize2, children: t12 }), $[29] = fontSize2, $[30] = t13) : t13 = $[30];
4258
+ let t14;
4259
+ $[31] !== padding || $[32] !== t13 ? (t14 = /* @__PURE__ */ jsx(IconBox, { padding, children: t13 }), $[31] = padding, $[32] = t13, $[33] = t14) : t14 = $[33];
4260
+ let t15;
4261
+ return $[34] !== t11 || $[35] !== t14 ? (t15 = /* @__PURE__ */ jsxs(StyledSelect, { "data-ui": "Select", children: [
4262
+ t11,
4263
+ t14
4264
+ ] }), $[34] = t11, $[35] = t14, $[36] = t15) : t15 = $[36], t15;
3608
4265
  });
3609
4266
  Select.displayName = "ForwardRef(Select)";
3610
4267
  const BASE_STYLE = {
@@ -3633,12 +4290,18 @@ const StyledStack = /* @__PURE__ */ styled(Box).withConfig({
3633
4290
  displayName: "StyledStack",
3634
4291
  componentId: "sc-8dpfq2-0"
3635
4292
  })(stackBaseStyle, responsiveStackSpaceStyle), Stack = forwardRef(function(props, ref) {
3636
- const {
4293
+ const $ = c(12);
4294
+ let as, restProps, space;
4295
+ $[0] !== props ? ({
3637
4296
  as,
3638
4297
  space,
3639
4298
  ...restProps
3640
- } = props;
3641
- return /* @__PURE__ */ jsx(StyledStack, { "data-as": typeof as == "string" ? as : void 0, "data-ui": "Stack", ...restProps, $space: _getArrayProp(space), forwardedAs: as, ref });
4299
+ } = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = space) : (as = $[1], restProps = $[2], space = $[3]);
4300
+ const t0 = typeof as == "string" ? as : void 0;
4301
+ let t1;
4302
+ $[4] !== space ? (t1 = _getArrayProp(space), $[4] = space, $[5] = t1) : t1 = $[5];
4303
+ let t2;
4304
+ return $[6] !== as || $[7] !== ref || $[8] !== restProps || $[9] !== t0 || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(StyledStack, { "data-as": t0, "data-ui": "Stack", ...restProps, $space: t1, forwardedAs: as, ref }), $[6] = as, $[7] = ref, $[8] = restProps, $[9] = t0, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
3642
4305
  });
3643
4306
  Stack.displayName = "ForwardRef(Stack)";
3644
4307
  function switchBaseStyles() {
@@ -3810,7 +4473,9 @@ const StyledSwitch = /* @__PURE__ */ styled.span.withConfig({
3810
4473
  displayName: "Thumb",
3811
4474
  componentId: "sc-dw1foe-4"
3812
4475
  })(switchThumbStyles), Switch = forwardRef(function(props, forwardedRef) {
3813
- const {
4476
+ const $ = c(26);
4477
+ let checked, className, disabled, indeterminate, readOnly, restProps, style;
4478
+ $[0] !== props ? ({
3814
4479
  checked,
3815
4480
  className,
3816
4481
  disabled,
@@ -3818,16 +4483,29 @@ const StyledSwitch = /* @__PURE__ */ styled.span.withConfig({
3818
4483
  readOnly,
3819
4484
  style,
3820
4485
  ...restProps
3821
- } = props, ref = useRef(null);
3822
- return useImperativeHandle(forwardedRef, () => ref.current), useEffect(() => {
4486
+ } = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = disabled, $[4] = indeterminate, $[5] = readOnly, $[6] = restProps, $[7] = style) : (checked = $[1], className = $[2], disabled = $[3], indeterminate = $[4], readOnly = $[5], restProps = $[6], style = $[7]);
4487
+ const ref = useRef(null);
4488
+ let t0;
4489
+ $[8] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[8] = t0) : t0 = $[8], useImperativeHandle(forwardedRef, t0);
4490
+ let t1, t2;
4491
+ $[9] !== indeterminate ? (t1 = () => {
3823
4492
  ref.current && (ref.current.indeterminate = indeterminate || !1);
3824
- }, [indeterminate]), /* @__PURE__ */ jsxs(StyledSwitch, { className, "data-ui": "Switch", style, children: [
3825
- /* @__PURE__ */ jsx(Input$2, { "data-read-only": !disabled && readOnly ? "" : void 0, ...restProps, checked: indeterminate !== !0 && checked, disabled: disabled || readOnly, type: "checkbox", ref }),
3826
- /* @__PURE__ */ jsxs(Representation, { "aria-hidden": !0, "data-name": "representation", children: [
3827
- /* @__PURE__ */ jsx(Track, {}),
3828
- /* @__PURE__ */ jsx(Thumb, { $checked: checked, $indeterminate: indeterminate })
3829
- ] })
3830
- ] });
4493
+ }, t2 = [indeterminate], $[9] = indeterminate, $[10] = t1, $[11] = t2) : (t1 = $[10], t2 = $[11]), useEffect(t1, t2);
4494
+ const t3 = !disabled && readOnly ? "" : void 0, t4 = indeterminate !== !0 && checked, t5 = disabled || readOnly;
4495
+ let t6;
4496
+ $[12] !== restProps || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsx(Input$2, { "data-read-only": t3, ...restProps, checked: t4, disabled: t5, type: "checkbox", ref }), $[12] = restProps, $[13] = t3, $[14] = t4, $[15] = t5, $[16] = t6) : t6 = $[16];
4497
+ let t7;
4498
+ $[17] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsx(Track, {}), $[17] = t7) : t7 = $[17];
4499
+ let t8;
4500
+ $[18] !== checked || $[19] !== indeterminate ? (t8 = /* @__PURE__ */ jsxs(Representation, { "aria-hidden": !0, "data-name": "representation", children: [
4501
+ t7,
4502
+ /* @__PURE__ */ jsx(Thumb, { $checked: checked, $indeterminate: indeterminate })
4503
+ ] }), $[18] = checked, $[19] = indeterminate, $[20] = t8) : t8 = $[20];
4504
+ let t9;
4505
+ return $[21] !== className || $[22] !== style || $[23] !== t6 || $[24] !== t8 ? (t9 = /* @__PURE__ */ jsxs(StyledSwitch, { className, "data-ui": "Switch", style, children: [
4506
+ t6,
4507
+ t8
4508
+ ] }), $[21] = className, $[22] = style, $[23] = t6, $[24] = t8, $[25] = t9) : t9 = $[25], t9;
3831
4509
  });
3832
4510
  Switch.displayName = "ForwardRef(Switch)";
3833
4511
  const StyledTextArea = /* @__PURE__ */ styled.span.withConfig({
@@ -3843,21 +4521,42 @@ const StyledTextArea = /* @__PURE__ */ styled.span.withConfig({
3843
4521
  displayName: "Presentation",
3844
4522
  componentId: "sc-1d6h1o8-3"
3845
4523
  })(responsiveRadiusStyle, textInputRepresentationStyle), TextArea = forwardRef(function(props, forwardedRef) {
3846
- const {
3847
- border: border2 = !0,
4524
+ const $ = c(35);
4525
+ let __unstable_disableFocusRing, customValidity, restProps, t0, t1, t2, t3, t4, weight;
4526
+ $[0] !== props ? ({
4527
+ border: t0,
3848
4528
  customValidity,
3849
- disabled = !1,
3850
- fontSize: fontSize2 = 2,
3851
- padding = 3,
3852
- radius = 2,
4529
+ disabled: t1,
4530
+ fontSize: t2,
4531
+ padding: t3,
4532
+ radius: t4,
3853
4533
  weight,
3854
4534
  __unstable_disableFocusRing,
3855
4535
  ...restProps
3856
- } = props, ref = useRef(null), rootTheme = useRootTheme();
3857
- return useImperativeHandle(forwardedRef, () => ref.current), useCustomValidity(ref, customValidity), /* @__PURE__ */ jsx(StyledTextArea, { "data-ui": "TextArea", children: /* @__PURE__ */ jsxs(InputRoot$1, { children: [
3858
- /* @__PURE__ */ jsx(Input$1, { "data-as": "textarea", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: _getArrayProp(fontSize2), $padding: _getArrayProp(padding), $scheme: rootTheme.scheme, $space: _getArrayProp(0), $tone: rootTheme.tone, $weight: weight, disabled, ref }),
3859
- /* @__PURE__ */ jsx(Presentation$1, { $radius: _getArrayProp(radius), $unstableDisableFocusRing: __unstable_disableFocusRing, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": border2 ? "" : void 0, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone })
3860
- ] }) });
4536
+ } = props, $[0] = props, $[1] = __unstable_disableFocusRing, $[2] = customValidity, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = weight) : (__unstable_disableFocusRing = $[1], customValidity = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], weight = $[9]);
4537
+ const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize2 = t2 === void 0 ? 2 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, ref = useRef(null), rootTheme = useRootTheme();
4538
+ let t5;
4539
+ $[10] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[10] = t5) : t5 = $[10], useImperativeHandle(forwardedRef, t5), useCustomValidity(ref, customValidity);
4540
+ const t6 = rootTheme.scheme, t7 = rootTheme.tone;
4541
+ let t8;
4542
+ $[11] !== fontSize2 ? (t8 = _getArrayProp(fontSize2), $[11] = fontSize2, $[12] = t8) : t8 = $[12];
4543
+ let t9;
4544
+ $[13] !== padding ? (t9 = _getArrayProp(padding), $[13] = padding, $[14] = t9) : t9 = $[14];
4545
+ const t10 = rootTheme.scheme;
4546
+ let t11;
4547
+ $[15] === Symbol.for("react.memo_cache_sentinel") ? (t11 = _getArrayProp(0), $[15] = t11) : t11 = $[15];
4548
+ let t12;
4549
+ $[16] !== disabled || $[17] !== restProps || $[18] !== rootTheme.scheme || $[19] !== rootTheme.tone || $[20] !== t8 || $[21] !== t9 || $[22] !== weight ? (t12 = /* @__PURE__ */ jsx(Input$1, { "data-as": "textarea", "data-scheme": t6, "data-tone": t7, ...restProps, $fontSize: t8, $padding: t9, $scheme: t10, $space: t11, $tone: rootTheme.tone, $weight: weight, disabled, ref }), $[16] = disabled, $[17] = restProps, $[18] = rootTheme.scheme, $[19] = rootTheme.tone, $[20] = t8, $[21] = t9, $[22] = weight, $[23] = t12) : t12 = $[23];
4550
+ let t13;
4551
+ $[24] !== radius ? (t13 = _getArrayProp(radius), $[24] = radius, $[25] = t13) : t13 = $[25];
4552
+ const t14 = border2 ? "" : void 0;
4553
+ let t15;
4554
+ $[26] !== __unstable_disableFocusRing || $[27] !== rootTheme.scheme || $[28] !== rootTheme.tone || $[29] !== t13 || $[30] !== t14 ? (t15 = /* @__PURE__ */ jsx(Presentation$1, { $radius: t13, $unstableDisableFocusRing: __unstable_disableFocusRing, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t14, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone }), $[26] = __unstable_disableFocusRing, $[27] = rootTheme.scheme, $[28] = rootTheme.tone, $[29] = t13, $[30] = t14, $[31] = t15) : t15 = $[31];
4555
+ let t16;
4556
+ return $[32] !== t12 || $[33] !== t15 ? (t16 = /* @__PURE__ */ jsx(StyledTextArea, { "data-ui": "TextArea", children: /* @__PURE__ */ jsxs(InputRoot$1, { children: [
4557
+ t12,
4558
+ t15
4559
+ ] }) }), $[32] = t12, $[33] = t15, $[34] = t16) : t16 = $[34], t16;
3861
4560
  });
3862
4561
  TextArea.displayName = "ForwardRef(TextArea)";
3863
4562
  const CLEAR_BUTTON_BOX_STYLE = {
@@ -3903,61 +4602,119 @@ const CLEAR_BUTTON_BOX_STYLE = {
3903
4602
  display: "block"
3904
4603
  }
3905
4604
  }), TextInput = forwardRef(function(props, forwardedRef) {
3906
- const {
4605
+ const $ = c(92);
4606
+ let IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
4607
+ $[0] !== props ? ({
3907
4608
  __unstable_disableFocusRing,
3908
- border: border2 = !0,
4609
+ border: t0,
3909
4610
  clearButton,
3910
- disabled = !1,
3911
- fontSize: fontSizeProp = 2,
4611
+ disabled: t1,
4612
+ fontSize: t2,
3912
4613
  icon: IconComponent,
3913
4614
  iconRight: IconRightComponent,
3914
4615
  onClear,
3915
- padding: paddingProp = 3,
4616
+ padding: t3,
3916
4617
  prefix,
3917
- radius: radiusProp = 2,
4618
+ radius: t4,
3918
4619
  readOnly,
3919
- space: spaceProp = 3,
4620
+ space: t5,
3920
4621
  suffix,
3921
4622
  customValidity,
3922
- type = "text",
4623
+ type: t6,
3923
4624
  weight,
3924
4625
  ...restProps
3925
- } = props, ref = useRef(null), rootTheme = useRootTheme(), fontSize2 = _getArrayProp(fontSizeProp), padding = _getArrayProp(paddingProp), radius = _getArrayProp(radiusProp), space = _getArrayProp(spaceProp), $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix;
3926
- useImperativeHandle(forwardedRef, () => ref.current), useCustomValidity(ref, customValidity);
3927
- const handleClearMouseDown = useCallback((event) => {
3928
- event.preventDefault(), event.stopPropagation();
3929
- }, []), handleClearClick = useCallback((event) => {
3930
- event.preventDefault(), event.stopPropagation(), onClear && onClear(), ref.current?.focus();
3931
- }, [onClear, ref]), prefixNode = useMemo(() => prefix && /* @__PURE__ */ jsx(Prefix, { borderTop: !0, borderLeft: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsx("span", { children: prefix }) }), [prefix, radius]), presentationNode = useMemo(() => /* @__PURE__ */ jsxs(Presentation, { $hasPrefix, $unstableDisableFocusRing: __unstable_disableFocusRing, $hasSuffix, $radius: radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": border2 ? "" : void 0, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, children: [
3932
- IconComponent && /* @__PURE__ */ jsx(LeftBox, { padding, children: /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
3933
- isValidElement(IconComponent) && IconComponent,
3934
- isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
3935
- ] }) }),
3936
- !$hasClearButton && IconRightComponent && /* @__PURE__ */ jsx(RightBox, { padding, children: /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
3937
- isValidElement(IconRightComponent) && IconRightComponent,
3938
- isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
3939
- ] }) })
3940
- ] }), [__unstable_disableFocusRing, border2, fontSize2, IconComponent, IconRightComponent, padding, radius, rootTheme, $hasClearButton, $hasPrefix, $hasSuffix]), clearButtonBoxPadding = useMemo(() => padding.map((v) => v === 0 ? 0 : v === 1 || v === 2 ? 1 : v - 2), [padding]), clearButtonPadding = useMemo(() => padding.map((v) => v === 0 || v === 1 ? 0 : v === 2 ? 1 : v - 1), [padding]), clearButtonProps = useMemo(() => typeof clearButton == "object" ? clearButton : EMPTY_RECORD, [clearButton]), clearButtonNode = useMemo(() => !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), [clearButton, clearButtonBoxPadding, clearButtonPadding, clearButtonProps, customValidity, disabled, fontSize2, handleClearClick, handleClearMouseDown, radius, readOnly]), suffixNode = useMemo(() => suffix && /* @__PURE__ */ jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsx("span", { children: suffix }) }), [radius, suffix]);
3941
- return /* @__PURE__ */ jsxs(StyledTextInput, { "data-ui": "TextInput", tone: rootTheme.tone, children: [
4626
+ } = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = clearButton, $[5] = customValidity, $[6] = onClear, $[7] = prefix, $[8] = readOnly, $[9] = restProps, $[10] = suffix, $[11] = t0, $[12] = t1, $[13] = t2, $[14] = t3, $[15] = t4, $[16] = t5, $[17] = t6, $[18] = weight) : (IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], clearButton = $[4], customValidity = $[5], onClear = $[6], prefix = $[7], readOnly = $[8], restProps = $[9], suffix = $[10], t0 = $[11], t1 = $[12], t2 = $[13], t3 = $[14], t4 = $[15], t5 = $[16], t6 = $[17], weight = $[18]);
4627
+ const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSizeProp = t2 === void 0 ? 2 : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, spaceProp = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = useRef(null), rootTheme = useRootTheme();
4628
+ let t7;
4629
+ $[19] !== fontSizeProp ? (t7 = _getArrayProp(fontSizeProp), $[19] = fontSizeProp, $[20] = t7) : t7 = $[20];
4630
+ const fontSize2 = t7;
4631
+ let t8;
4632
+ $[21] !== paddingProp ? (t8 = _getArrayProp(paddingProp), $[21] = paddingProp, $[22] = t8) : t8 = $[22];
4633
+ const padding = t8;
4634
+ let t9;
4635
+ $[23] !== radiusProp ? (t9 = _getArrayProp(radiusProp), $[23] = radiusProp, $[24] = t9) : t9 = $[24];
4636
+ const radius = t9;
4637
+ let t10;
4638
+ $[25] !== spaceProp ? (t10 = _getArrayProp(spaceProp), $[25] = spaceProp, $[26] = t10) : t10 = $[26];
4639
+ const space = t10, $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix;
4640
+ let t11;
4641
+ $[27] === Symbol.for("react.memo_cache_sentinel") ? (t11 = () => ref.current, $[27] = t11) : t11 = $[27], useImperativeHandle(forwardedRef, t11), useCustomValidity(ref, customValidity);
4642
+ const handleClearMouseDown = _temp$2;
4643
+ let t12;
4644
+ $[28] !== onClear ? (t12 = (event_0) => {
4645
+ event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
4646
+ }, $[28] = onClear, $[29] = t12) : t12 = $[29];
4647
+ const handleClearClick = t12;
4648
+ let t13;
4649
+ $[30] !== prefix || $[31] !== radius ? (t13 = prefix && /* @__PURE__ */ jsx(Prefix, { borderTop: !0, borderLeft: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsx("span", { children: prefix }) }), $[30] = prefix, $[31] = radius, $[32] = t13) : t13 = $[32];
4650
+ const prefixNode = t13, t14 = border2 ? "" : void 0;
4651
+ let t15;
4652
+ $[33] !== IconComponent || $[34] !== fontSize2 || $[35] !== padding ? (t15 = IconComponent && /* @__PURE__ */ jsx(LeftBox, { padding, children: /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
4653
+ isValidElement(IconComponent) && IconComponent,
4654
+ isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
4655
+ ] }) }), $[33] = IconComponent, $[34] = fontSize2, $[35] = padding, $[36] = t15) : t15 = $[36];
4656
+ let t16;
4657
+ $[37] !== $hasClearButton || $[38] !== IconRightComponent || $[39] !== fontSize2 || $[40] !== padding ? (t16 = !$hasClearButton && IconRightComponent && /* @__PURE__ */ jsx(RightBox, { padding, children: /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
4658
+ isValidElement(IconRightComponent) && IconRightComponent,
4659
+ isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
4660
+ ] }) }), $[37] = $hasClearButton, $[38] = IconRightComponent, $[39] = fontSize2, $[40] = padding, $[41] = t16) : t16 = $[41];
4661
+ let t17;
4662
+ $[42] !== $hasPrefix || $[43] !== $hasSuffix || $[44] !== __unstable_disableFocusRing || $[45] !== radius || $[46] !== rootTheme.scheme || $[47] !== rootTheme.tone || $[48] !== t14 || $[49] !== t15 || $[50] !== t16 ? (t17 = /* @__PURE__ */ jsxs(Presentation, { $hasPrefix, $unstableDisableFocusRing: __unstable_disableFocusRing, $hasSuffix, $radius: radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t14, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, children: [
4663
+ t15,
4664
+ t16
4665
+ ] }), $[42] = $hasPrefix, $[43] = $hasSuffix, $[44] = __unstable_disableFocusRing, $[45] = radius, $[46] = rootTheme.scheme, $[47] = rootTheme.tone, $[48] = t14, $[49] = t15, $[50] = t16, $[51] = t17) : t17 = $[51];
4666
+ const presentationNode = t17;
4667
+ let t18;
4668
+ $[52] !== padding ? (t18 = padding.map(_temp2), $[52] = padding, $[53] = t18) : t18 = $[53];
4669
+ const clearButtonBoxPadding = t18;
4670
+ let t19;
4671
+ $[54] !== padding ? (t19 = padding.map(_temp3), $[54] = padding, $[55] = t19) : t19 = $[55];
4672
+ const clearButtonPadding = t19, clearButtonProps = typeof clearButton == "object" ? clearButton : EMPTY_RECORD;
4673
+ let t20;
4674
+ $[56] !== clearButton || $[57] !== clearButtonBoxPadding || $[58] !== clearButtonPadding || $[59] !== clearButtonProps || $[60] !== customValidity || $[61] !== disabled || $[62] !== fontSize2 || $[63] !== handleClearClick || $[64] !== radius || $[65] !== readOnly ? (t20 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[56] = clearButton, $[57] = clearButtonBoxPadding, $[58] = clearButtonPadding, $[59] = clearButtonProps, $[60] = customValidity, $[61] = disabled, $[62] = fontSize2, $[63] = handleClearClick, $[64] = radius, $[65] = readOnly, $[66] = t20) : t20 = $[66];
4675
+ const clearButtonNode = t20;
4676
+ let t21;
4677
+ $[67] !== radius || $[68] !== suffix ? (t21 = suffix && /* @__PURE__ */ jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsx("span", { children: suffix }) }), $[67] = radius, $[68] = suffix, $[69] = t21) : t21 = $[69];
4678
+ const suffixNode = t21, t22 = $hasIconRight || $hasClearButton;
4679
+ let t23;
4680
+ $[70] !== $hasIcon || $[71] !== disabled || $[72] !== fontSize2 || $[73] !== padding || $[74] !== readOnly || $[75] !== restProps || $[76] !== rootTheme.scheme || $[77] !== rootTheme.tone || $[78] !== space || $[79] !== t22 || $[80] !== type || $[81] !== weight ? (t23 = /* @__PURE__ */ jsx(Input, { "data-as": "input", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: fontSize2, $iconLeft: $hasIcon, $iconRight: t22, $padding: padding, $scheme: rootTheme.scheme, $space: space, $tone: rootTheme.tone, $weight: weight, disabled, readOnly, ref, type }), $[70] = $hasIcon, $[71] = disabled, $[72] = fontSize2, $[73] = padding, $[74] = readOnly, $[75] = restProps, $[76] = rootTheme.scheme, $[77] = rootTheme.tone, $[78] = space, $[79] = t22, $[80] = type, $[81] = weight, $[82] = t23) : t23 = $[82];
4681
+ let t24;
4682
+ $[83] !== clearButtonNode || $[84] !== presentationNode || $[85] !== t23 ? (t24 = /* @__PURE__ */ jsxs(InputRoot, { children: [
4683
+ t23,
4684
+ presentationNode,
4685
+ clearButtonNode
4686
+ ] }), $[83] = clearButtonNode, $[84] = presentationNode, $[85] = t23, $[86] = t24) : t24 = $[86];
4687
+ let t25;
4688
+ return $[87] !== prefixNode || $[88] !== rootTheme.tone || $[89] !== suffixNode || $[90] !== t24 ? (t25 = /* @__PURE__ */ jsxs(StyledTextInput, { "data-ui": "TextInput", tone: rootTheme.tone, children: [
3942
4689
  prefixNode,
3943
- /* @__PURE__ */ jsxs(InputRoot, { children: [
3944
- /* @__PURE__ */ jsx(Input, { "data-as": "input", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: fontSize2, $iconLeft: $hasIcon, $iconRight: $hasIconRight || $hasClearButton, $padding: padding, $scheme: rootTheme.scheme, $space: space, $tone: rootTheme.tone, $weight: weight, disabled, readOnly, ref, type }),
3945
- presentationNode,
3946
- clearButtonNode
3947
- ] }),
4690
+ t24,
3948
4691
  suffixNode
3949
- ] });
4692
+ ] }), $[87] = prefixNode, $[88] = rootTheme.tone, $[89] = suffixNode, $[90] = t24, $[91] = t25) : t25 = $[91], t25;
3950
4693
  });
3951
4694
  TextInput.displayName = "ForwardRef(TextInput)";
4695
+ function _temp$2(event) {
4696
+ event.preventDefault(), event.stopPropagation();
4697
+ }
4698
+ function _temp2(v) {
4699
+ return v === 0 ? 0 : v === 1 || v === 2 ? 1 : v - 2;
4700
+ }
4701
+ function _temp3(v_0) {
4702
+ return v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1;
4703
+ }
3952
4704
  function useDelayedState(initialState) {
3953
- const [state, setState] = useState(initialState), delayedAction = useRef(void 0), onStateChange = useCallback((nextState, delay) => {
4705
+ const $ = c(3), [state, setState] = useState(initialState), delayedAction = useRef(void 0);
4706
+ let t0;
4707
+ $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = (nextState, delay) => {
3954
4708
  const action = () => {
3955
4709
  setState(nextState);
3956
4710
  };
3957
- if (delayedAction.current && (clearTimeout(delayedAction.current), delayedAction.current = void 0), !delay) return action();
4711
+ if (delayedAction.current && (clearTimeout(delayedAction.current), delayedAction.current = void 0), !delay)
4712
+ return action();
3958
4713
  delayedAction.current = setTimeout(action, delay);
3959
- }, []);
3960
- return [state, onStateChange];
4714
+ }, $[0] = t0) : t0 = $[0];
4715
+ const onStateChange = t0;
4716
+ let t1;
4717
+ return $[1] !== state ? (t1 = [state, onStateChange], $[1] = state, $[2] = t1) : t1 = $[2], t1;
3961
4718
  }
3962
4719
  const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAULT_TOOLTIP_ARROW_RADIUS = 2, DEFAULT_TOOLTIP_DISTANCE = 4, DEFAULT_TOOLTIP_PADDING = 4, DEFAULT_FALLBACK_PLACEMENTS = {
3963
4720
  top: ["top-end", "top-start", "bottom", "left", "right"],
@@ -3976,7 +4733,9 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
3976
4733
  displayName: "MotionCard",
3977
4734
  componentId: "sc-1xn138w-0"
3978
4735
  })`will-change:transform;`, TooltipCard = forwardRef(function(props, ref) {
3979
- const {
4736
+ const $ = c(48);
4737
+ let animate, arrow2, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, restProps, scheme, shadow, style;
4738
+ $[0] !== props ? ({
3980
4739
  animate,
3981
4740
  arrow: arrow2,
3982
4741
  arrowRef,
@@ -3992,37 +4751,56 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
3992
4751
  shadow,
3993
4752
  style,
3994
4753
  ...restProps
3995
- } = props, rootStyle2 = useMemo(() => ({
4754
+ } = props, $[0] = props, $[1] = animate, $[2] = arrow2, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = restProps, $[13] = scheme, $[14] = shadow, $[15] = style) : (animate = $[1], arrow2 = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], restProps = $[12], scheme = $[13], shadow = $[14], style = $[15]);
4755
+ const t0 = animate ? "transform" : void 0;
4756
+ let t1;
4757
+ $[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t0 ? (t1 = {
3996
4758
  originX,
3997
4759
  originY,
3998
- willChange: animate ? "transform" : void 0,
4760
+ willChange: t0,
3999
4761
  ...style
4000
- }), [animate, originX, originY, style]), arrowStyle = useMemo(() => ({
4001
- left: arrowX !== null ? arrowX : void 0,
4002
- top: arrowY !== null ? arrowY : void 0,
4762
+ }, $[16] = originX, $[17] = originY, $[18] = style, $[19] = t0, $[20] = t1) : t1 = $[20];
4763
+ const rootStyle2 = t1, t2 = arrowX !== null ? arrowX : void 0, t3 = arrowY !== null ? arrowY : void 0;
4764
+ let t4;
4765
+ $[21] !== t2 || $[22] !== t3 ? (t4 = {
4766
+ left: t2,
4767
+ top: t3,
4003
4768
  right: void 0,
4004
4769
  bottom: void 0
4005
- }), [arrowX, arrowY]);
4006
- return /* @__PURE__ */ jsxs(MotionCard, { "data-ui": "Tooltip__card", ...restProps, "data-placement": placement, padding, radius, ref, scheme, shadow, style: rootStyle2, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: animate ? ["hidden", "initial"] : void 0, animate: animate ? ["visible", "scaleIn"] : void 0, exit: animate ? ["hidden", "scaleOut"] : void 0, children: [
4770
+ }, $[21] = t2, $[22] = t3, $[23] = t4) : t4 = $[23];
4771
+ const arrowStyle = t4, t5 = restProps;
4772
+ let t6;
4773
+ $[24] !== animate ? (t6 = animate ? ["hidden", "initial"] : void 0, $[24] = animate, $[25] = t6) : t6 = $[25];
4774
+ let t7;
4775
+ $[26] !== animate ? (t7 = animate ? ["visible", "scaleIn"] : void 0, $[26] = animate, $[27] = t7) : t7 = $[27];
4776
+ let t8;
4777
+ $[28] !== animate ? (t8 = animate ? ["hidden", "scaleOut"] : void 0, $[28] = animate, $[29] = t8) : t8 = $[29];
4778
+ let t9;
4779
+ $[30] !== arrow2 || $[31] !== arrowRef || $[32] !== arrowStyle ? (t9 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[30] = arrow2, $[31] = arrowRef, $[32] = arrowStyle, $[33] = t9) : t9 = $[33];
4780
+ let t10;
4781
+ return $[34] !== children || $[35] !== padding || $[36] !== placement || $[37] !== radius || $[38] !== ref || $[39] !== rootStyle2 || $[40] !== scheme || $[41] !== shadow || $[42] !== t5 || $[43] !== t6 || $[44] !== t7 || $[45] !== t8 || $[46] !== t9 ? (t10 = /* @__PURE__ */ jsxs(MotionCard, { "data-ui": "Tooltip__card", ...t5, "data-placement": placement, padding, radius, ref, scheme, shadow, style: rootStyle2, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t6, animate: t7, exit: t8, children: [
4007
4782
  children,
4008
- arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS })
4009
- ] });
4783
+ t9
4784
+ ] }), $[34] = children, $[35] = padding, $[36] = placement, $[37] = radius, $[38] = ref, $[39] = rootStyle2, $[40] = scheme, $[41] = shadow, $[42] = t5, $[43] = t6, $[44] = t7, $[45] = t8, $[46] = t9, $[47] = t10) : t10 = $[47], t10;
4010
4785
  });
4011
4786
  TooltipCard.displayName = "ForwardRef(TooltipCard)";
4012
4787
  const TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
4013
4788
  function TooltipDelayGroupProvider(props) {
4014
- const {
4789
+ const $ = c(9), {
4015
4790
  children,
4016
4791
  delay
4017
- } = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay : delay?.open || 0, closeDelay = typeof delay == "number" ? delay : delay?.close || 0, value = useMemo(() => ({
4792
+ } = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay : delay?.open || 0, closeDelay = typeof delay == "number" ? delay : delay?.close || 0, t0 = isGroupActive ? 1 : openDelay;
4793
+ let t1;
4794
+ $[0] !== closeDelay || $[1] !== openTooltipId || $[2] !== setIsGroupActive || $[3] !== setOpenTooltipId || $[4] !== t0 ? (t1 = {
4018
4795
  setIsGroupActive,
4019
4796
  openTooltipId,
4020
4797
  setOpenTooltipId,
4021
- // When the group is active, we want the next tooltip to open immediately.
4022
- openDelay: isGroupActive ? 1 : openDelay,
4798
+ openDelay: t0,
4023
4799
  closeDelay
4024
- }), [closeDelay, isGroupActive, openDelay, openTooltipId, setIsGroupActive, setOpenTooltipId]);
4025
- return /* @__PURE__ */ jsx(TooltipDelayGroupContext.Provider, { value, children });
4800
+ }, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] = t0, $[5] = t1) : t1 = $[5];
4801
+ const value = t1;
4802
+ let t2;
4803
+ return $[6] !== children || $[7] !== value ? (t2 = /* @__PURE__ */ jsx(TooltipDelayGroupContext.Provider, { value, children }), $[6] = children, $[7] = value, $[8] = t2) : t2 = $[8], t2;
4026
4804
  }
4027
4805
  TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
4028
4806
  function useTooltipDelayGroup() {
@@ -4032,51 +4810,71 @@ const StyledTooltip = styled(Layer).withConfig({
4032
4810
  displayName: "StyledTooltip",
4033
4811
  componentId: "sc-13f2zvh-0"
4034
4812
  })`pointer-events:none;`, Tooltip = forwardRef(function(props, forwardedRef) {
4035
- const boundaryElementContext = useBoundaryElement(), {
4813
+ const $ = c(137), boundaryElementContext = useBoundaryElement(), {
4036
4814
  layer
4037
- } = useTheme_v2(), {
4038
- animate: _animate = !1,
4039
- arrow: arrowProp = !1,
4815
+ } = useTheme_v2();
4816
+ let _boundaryElement, _fallbackPlacementsProp, _zOffset, childProp, content, delay, disabled, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5;
4817
+ $[0] !== props ? ({
4818
+ animate: t0,
4819
+ arrow: t1,
4040
4820
  boundaryElement: _boundaryElement,
4041
4821
  children: childProp,
4042
4822
  content,
4043
4823
  disabled,
4044
4824
  fallbackPlacements: _fallbackPlacementsProp,
4045
- padding = 2,
4046
- placement: placementProp = "bottom",
4825
+ padding: t2,
4826
+ placement: t3,
4047
4827
  portal: portalProp,
4048
- radius = 2,
4828
+ radius: t4,
4049
4829
  scheme,
4050
- shadow = 2,
4830
+ shadow: t5,
4051
4831
  zOffset: _zOffset,
4052
4832
  delay,
4053
4833
  ...restProps
4054
- } = props, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacementsProp = _fallbackPlacementsProp ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? "bottom"], zOffset = _zOffset ?? layer.tooltip.zOffset, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = _getArrayProp(fallbackPlacementsProp), ref = useRef(null), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = useState(0);
4055
- useImperativeHandle(forwardedRef, () => ref.current);
4056
- const portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements?.[portalProp] || null : portal.element, middleware = useMiddleware({
4834
+ } = props, $[0] = props, $[1] = _boundaryElement, $[2] = _fallbackPlacementsProp, $[3] = _zOffset, $[4] = childProp, $[5] = content, $[6] = delay, $[7] = disabled, $[8] = portalProp, $[9] = restProps, $[10] = scheme, $[11] = t0, $[12] = t1, $[13] = t2, $[14] = t3, $[15] = t4, $[16] = t5) : (_boundaryElement = $[1], _fallbackPlacementsProp = $[2], _zOffset = $[3], childProp = $[4], content = $[5], delay = $[6], disabled = $[7], portalProp = $[8], restProps = $[9], scheme = $[10], t0 = $[11], t1 = $[12], t2 = $[13], t3 = $[14], t4 = $[15], t5 = $[16]);
4835
+ const _animate = t0 === void 0 ? !1 : t0, arrowProp = t1 === void 0 ? !1 : t1, padding = t2 === void 0 ? 2 : t2, placementProp = t3 === void 0 ? "bottom" : t3, radius = t4 === void 0 ? 2 : t4, shadow = t5 === void 0 ? 2 : t5, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacementsProp = _fallbackPlacementsProp ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? "bottom"], zOffset = _zOffset ?? layer.tooltip.zOffset, animate = usePrefersReducedMotion() ? !1 : _animate;
4836
+ let t6;
4837
+ $[17] !== fallbackPlacementsProp ? (t6 = _getArrayProp(fallbackPlacementsProp), $[17] = fallbackPlacementsProp, $[18] = t6) : t6 = $[18];
4838
+ const fallbackPlacements = t6, ref = useRef(null), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), [tooltipMaxWidth, setTooltipMaxWidth] = useState(0);
4839
+ let t7;
4840
+ $[19] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[19] = t7) : t7 = $[19], useImperativeHandle(forwardedRef, t7);
4841
+ const portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements?.[portalProp] || null : portal.element;
4842
+ let t8;
4843
+ $[20] !== animate || $[21] !== arrowProp || $[22] !== boundaryElement || $[23] !== fallbackPlacements ? (t8 = {
4057
4844
  animate,
4058
4845
  arrowProp,
4059
4846
  arrowRef,
4060
4847
  boundaryElement,
4061
4848
  fallbackPlacements,
4062
- rootBoundary
4063
- }), {
4849
+ rootBoundary: "viewport"
4850
+ }, $[20] = animate, $[21] = arrowProp, $[22] = boundaryElement, $[23] = fallbackPlacements, $[24] = t8) : t8 = $[24];
4851
+ const middleware = useMiddleware(t8);
4852
+ let t9;
4853
+ $[25] !== referenceElement ? (t9 = {
4854
+ reference: referenceElement
4855
+ }, $[25] = referenceElement, $[26] = t9) : t9 = $[26];
4856
+ let t10;
4857
+ $[27] !== middleware || $[28] !== placementProp || $[29] !== t9 ? (t10 = {
4858
+ middleware,
4859
+ placement: placementProp,
4860
+ whileElementsMounted: autoUpdate,
4861
+ elements: t9
4862
+ }, $[27] = middleware, $[28] = placementProp, $[29] = t9, $[30] = t10) : t10 = $[30];
4863
+ const {
4064
4864
  floatingStyles,
4065
4865
  placement,
4066
4866
  middlewareData,
4067
4867
  refs,
4068
4868
  update
4069
- } = useFloating({
4070
- middleware,
4071
- placement: placementProp,
4072
- whileElementsMounted: autoUpdate,
4073
- elements: {
4074
- reference: referenceElement
4075
- }
4076
- }), arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, tooltipId = useId(), [isOpen, setIsOpen] = useDelayedState(!1), delayGroupContext = useTooltipDelayGroup(), {
4869
+ } = useFloating(t10), arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, tooltipId = useId(), [isOpen, setIsOpen] = useDelayedState(!1), delayGroupContext = useTooltipDelayGroup();
4870
+ let t11;
4871
+ $[31] !== delayGroupContext ? (t11 = delayGroupContext || {}, $[31] = delayGroupContext, $[32] = t11) : t11 = $[32];
4872
+ const {
4077
4873
  setIsGroupActive,
4078
4874
  setOpenTooltipId
4079
- } = delayGroupContext || {}, showTooltip = isOpen || delayGroupContext?.openTooltipId === tooltipId, isInsideGroup = delayGroupContext !== null, openDelayProp = typeof delay == "number" ? delay : delay?.open || 0, closeDelayProp = typeof delay == "number" ? delay : delay?.close || 0, openDelay = isInsideGroup ? delayGroupContext.openDelay : openDelayProp, closeDelay = isInsideGroup ? delayGroupContext.closeDelay : closeDelayProp, handleIsOpenChange = useCallback((open, immediate) => {
4875
+ } = t11, showTooltip = isOpen || delayGroupContext?.openTooltipId === tooltipId, isInsideGroup = delayGroupContext !== null, openDelayProp = typeof delay == "number" ? delay : delay?.open || 0, closeDelayProp = typeof delay == "number" ? delay : delay?.close || 0, openDelay = isInsideGroup ? delayGroupContext.openDelay : openDelayProp, closeDelay = isInsideGroup ? delayGroupContext.closeDelay : closeDelayProp;
4876
+ let t12;
4877
+ $[33] !== closeDelay || $[34] !== isInsideGroup || $[35] !== openDelay || $[36] !== setIsGroupActive || $[37] !== setIsOpen || $[38] !== setOpenTooltipId || $[39] !== tooltipId ? (t12 = (open, immediate) => {
4080
4878
  if (isInsideGroup)
4081
4879
  if (open) {
4082
4880
  const groupedOpenDelay = immediate ? 0 : openDelay;
@@ -4087,108 +4885,196 @@ const StyledTooltip = styled(Layer).withConfig({
4087
4885
  }
4088
4886
  else
4089
4887
  setIsOpen(open, immediate ? 0 : open ? openDelay : closeDelay);
4090
- }, [isInsideGroup, openDelay, setIsGroupActive, setOpenTooltipId, tooltipId, closeDelay, setIsOpen]), handleBlur = useCallback((e) => {
4888
+ }, $[33] = closeDelay, $[34] = isInsideGroup, $[35] = openDelay, $[36] = setIsGroupActive, $[37] = setIsOpen, $[38] = setOpenTooltipId, $[39] = tooltipId, $[40] = t12) : t12 = $[40];
4889
+ const handleIsOpenChange = t12;
4890
+ let t13;
4891
+ $[41] !== childProp?.props || $[42] !== handleIsOpenChange ? (t13 = (e) => {
4091
4892
  handleIsOpenChange(!1), childProp?.props?.onBlur?.(e);
4092
- }, [childProp?.props, handleIsOpenChange]), handleClick = useCallback((e) => {
4093
- handleIsOpenChange(!1, !0), childProp?.props.onClick?.(e);
4094
- }, [childProp?.props, handleIsOpenChange]), handleContextMenu = useCallback((e) => {
4095
- handleIsOpenChange(!1, !0), childProp?.props.onContextMenu?.(e);
4096
- }, [childProp?.props, handleIsOpenChange]), handleFocus = useCallback((e) => {
4097
- handleIsOpenChange(!0), childProp?.props?.onFocus?.(e);
4098
- }, [childProp?.props, handleIsOpenChange]), handleMouseEnter = useCallback((e) => {
4099
- handleIsOpenChange(!0), childProp?.props?.onMouseEnter?.(e);
4100
- }, [childProp?.props, handleIsOpenChange]), handleMouseLeave = useCallback((e) => {
4101
- handleIsOpenChange(!1), childProp?.props?.onMouseLeave?.(e);
4102
- }, [childProp?.props, handleIsOpenChange]);
4103
- useCloseOnMouseLeave({
4893
+ }, $[41] = childProp?.props, $[42] = handleIsOpenChange, $[43] = t13) : t13 = $[43];
4894
+ const handleBlur = t13;
4895
+ let t14;
4896
+ $[44] !== childProp?.props || $[45] !== handleIsOpenChange ? (t14 = (e_0) => {
4897
+ handleIsOpenChange(!1, !0), childProp?.props.onClick?.(e_0);
4898
+ }, $[44] = childProp?.props, $[45] = handleIsOpenChange, $[46] = t14) : t14 = $[46];
4899
+ const handleClick = t14;
4900
+ let t15;
4901
+ $[47] !== childProp?.props || $[48] !== handleIsOpenChange ? (t15 = (e_1) => {
4902
+ handleIsOpenChange(!1, !0), childProp?.props.onContextMenu?.(e_1);
4903
+ }, $[47] = childProp?.props, $[48] = handleIsOpenChange, $[49] = t15) : t15 = $[49];
4904
+ const handleContextMenu = t15;
4905
+ let t16;
4906
+ $[50] !== childProp?.props || $[51] !== handleIsOpenChange ? (t16 = (e_2) => {
4907
+ handleIsOpenChange(!0), childProp?.props?.onFocus?.(e_2);
4908
+ }, $[50] = childProp?.props, $[51] = handleIsOpenChange, $[52] = t16) : t16 = $[52];
4909
+ const handleFocus = t16;
4910
+ let t17;
4911
+ $[53] !== childProp?.props || $[54] !== handleIsOpenChange ? (t17 = (e_3) => {
4912
+ handleIsOpenChange(!0), childProp?.props?.onMouseEnter?.(e_3);
4913
+ }, $[53] = childProp?.props, $[54] = handleIsOpenChange, $[55] = t17) : t17 = $[55];
4914
+ const handleMouseEnter = t17;
4915
+ let t18;
4916
+ $[56] !== childProp?.props || $[57] !== handleIsOpenChange ? (t18 = (e_4) => {
4917
+ handleIsOpenChange(!1), childProp?.props?.onMouseLeave?.(e_4);
4918
+ }, $[56] = childProp?.props, $[57] = handleIsOpenChange, $[58] = t18) : t18 = $[58];
4919
+ const handleMouseLeave = t18;
4920
+ let t19;
4921
+ $[59] !== handleIsOpenChange || $[60] !== isInsideGroup || $[61] !== referenceElement || $[62] !== showTooltip ? (t19 = {
4104
4922
  handleIsOpenChange,
4105
4923
  referenceElement,
4106
4924
  showTooltip,
4107
4925
  isInsideGroup
4108
- }), useEffect(() => {
4926
+ }, $[59] = handleIsOpenChange, $[60] = isInsideGroup, $[61] = referenceElement, $[62] = showTooltip, $[63] = t19) : t19 = $[63], useCloseOnMouseLeave(t19);
4927
+ let t20, t21;
4928
+ $[64] !== disabled || $[65] !== handleIsOpenChange || $[66] !== showTooltip ? (t20 = () => {
4109
4929
  disabled && showTooltip && handleIsOpenChange(!1);
4110
- }, [disabled, handleIsOpenChange, showTooltip]), useEffect(() => {
4930
+ }, t21 = [disabled, handleIsOpenChange, showTooltip], $[64] = disabled, $[65] = handleIsOpenChange, $[66] = showTooltip, $[67] = t20, $[68] = t21) : (t20 = $[67], t21 = $[68]), useEffect(t20, t21);
4931
+ let t22, t23;
4932
+ $[69] !== content || $[70] !== handleIsOpenChange || $[71] !== showTooltip ? (t22 = () => {
4111
4933
  !content && showTooltip && handleIsOpenChange(!1);
4112
- }, [content, handleIsOpenChange, showTooltip]), useEffect(() => {
4113
- if (!showTooltip) return;
4114
- function handleWindowKeyDown(event) {
4934
+ }, t23 = [content, handleIsOpenChange, showTooltip], $[69] = content, $[70] = handleIsOpenChange, $[71] = showTooltip, $[72] = t22, $[73] = t23) : (t22 = $[72], t23 = $[73]), useEffect(t22, t23);
4935
+ let t24, t25;
4936
+ $[74] !== handleIsOpenChange || $[75] !== showTooltip ? (t24 = () => {
4937
+ if (!showTooltip)
4938
+ return;
4939
+ const handleWindowKeyDown = function(event) {
4115
4940
  event.key === "Escape" && handleIsOpenChange(!1, !0);
4116
- }
4941
+ };
4117
4942
  return window.addEventListener("keydown", handleWindowKeyDown), () => {
4118
4943
  window.removeEventListener("keydown", handleWindowKeyDown);
4119
4944
  };
4120
- }, [handleIsOpenChange, showTooltip]), useLayoutEffect(() => {
4945
+ }, t25 = [handleIsOpenChange, showTooltip], $[74] = handleIsOpenChange, $[75] = showTooltip, $[76] = t24, $[77] = t25) : (t24 = $[76], t25 = $[77]), useEffect(t24, t25);
4946
+ let t26;
4947
+ $[78] !== boundaryElement || $[79] !== portalElement?.offsetWidth ? (t26 = () => {
4121
4948
  const availableWidths = [...boundaryElement ? [boundaryElement.offsetWidth] : [], portalElement?.offsetWidth || document.body.offsetWidth];
4122
4949
  setTooltipMaxWidth(Math.min(...availableWidths) - DEFAULT_TOOLTIP_PADDING * 2);
4123
- }, [boundaryElement, portalElement]);
4124
- const setArrow = useCallback((arrowEl) => {
4950
+ }, $[78] = boundaryElement, $[79] = portalElement?.offsetWidth, $[80] = t26) : t26 = $[80];
4951
+ let t27;
4952
+ $[81] !== boundaryElement || $[82] !== portalElement ? (t27 = [boundaryElement, portalElement], $[81] = boundaryElement, $[82] = portalElement, $[83] = t27) : t27 = $[83], useLayoutEffect(t26, t27);
4953
+ let t28;
4954
+ $[84] !== update ? (t28 = (arrowEl) => {
4125
4955
  arrowRef.current = arrowEl, update();
4126
- }, [update]), setFloating = useCallback((node) => {
4956
+ }, $[84] = update, $[85] = t28) : t28 = $[85];
4957
+ const setArrow = t28;
4958
+ let t29;
4959
+ $[86] !== refs ? (t29 = (node) => {
4127
4960
  ref.current = node, refs.setFloating(node);
4128
- }, [refs]), child = useMemo(() => childProp ? cloneElement(childProp, {
4129
- onBlur: handleBlur,
4130
- onFocus: handleFocus,
4131
- onMouseEnter: handleMouseEnter,
4132
- onMouseLeave: handleMouseLeave,
4133
- onClick: handleClick,
4134
- onContextMenu: handleContextMenu,
4135
- ref: setReferenceElement
4136
- }) : null, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave]);
4137
- if (useImperativeHandle(childProp ? getElementRef(childProp) : null, () => referenceElement, [referenceElement]), !child) return /* @__PURE__ */ jsx(Fragment, {});
4138
- if (disabled) return child;
4139
- const tooltip = /* @__PURE__ */ jsx(StyledTooltip, { "data-ui": "Tooltip", ...restProps, ref: setFloating, style: {
4961
+ }, $[86] = refs, $[87] = t29) : t29 = $[87];
4962
+ const setFloating = t29;
4963
+ let t30;
4964
+ bb0: {
4965
+ if (!childProp) {
4966
+ t30 = null;
4967
+ break bb0;
4968
+ }
4969
+ let t312;
4970
+ $[88] !== childProp || $[89] !== handleBlur || $[90] !== handleClick || $[91] !== handleContextMenu || $[92] !== handleFocus || $[93] !== handleMouseEnter || $[94] !== handleMouseLeave ? (t312 = cloneElement(childProp, {
4971
+ onBlur: handleBlur,
4972
+ onFocus: handleFocus,
4973
+ onMouseEnter: handleMouseEnter,
4974
+ onMouseLeave: handleMouseLeave,
4975
+ onClick: handleClick,
4976
+ onContextMenu: handleContextMenu,
4977
+ ref: setReferenceElement
4978
+ }), $[88] = childProp, $[89] = handleBlur, $[90] = handleClick, $[91] = handleContextMenu, $[92] = handleFocus, $[93] = handleMouseEnter, $[94] = handleMouseLeave, $[95] = t312) : t312 = $[95], t30 = t312;
4979
+ }
4980
+ const child = t30;
4981
+ let t31;
4982
+ $[96] !== childProp ? (t31 = childProp ? getElementRef(childProp) : null, $[96] = childProp, $[97] = t31) : t31 = $[97];
4983
+ let t32, t33;
4984
+ if ($[98] !== referenceElement ? (t32 = () => referenceElement, t33 = [referenceElement], $[98] = referenceElement, $[99] = t32, $[100] = t33) : (t32 = $[99], t33 = $[100]), useImperativeHandle(t31, t32, t33), !child) {
4985
+ let t342;
4986
+ return $[101] === Symbol.for("react.memo_cache_sentinel") ? (t342 = /* @__PURE__ */ jsx(Fragment, {}), $[101] = t342) : t342 = $[101], t342;
4987
+ }
4988
+ if (disabled)
4989
+ return child;
4990
+ const t34 = tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0;
4991
+ let t35;
4992
+ $[102] !== floatingStyles || $[103] !== t34 ? (t35 = {
4140
4993
  ...floatingStyles,
4141
- maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
4142
- }, zOffset, children: /* @__PURE__ */ jsx(TooltipCard, { ...restProps, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, children: content }) }), children = showTooltip && (portalProp ? /* @__PURE__ */ jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: tooltip }) : tooltip);
4143
- return /* @__PURE__ */ jsxs(Fragment, { children: [
4144
- animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children,
4994
+ maxWidth: t34
4995
+ }, $[102] = floatingStyles, $[103] = t34, $[104] = t35) : t35 = $[104];
4996
+ let t36;
4997
+ $[105] !== animate || $[106] !== arrowProp || $[107] !== arrowX || $[108] !== arrowY || $[109] !== content || $[110] !== originX || $[111] !== originY || $[112] !== padding || $[113] !== placement || $[114] !== radius || $[115] !== restProps || $[116] !== scheme || $[117] !== setArrow || $[118] !== setFloating || $[119] !== shadow ? (t36 = /* @__PURE__ */ jsx(TooltipCard, { ...restProps, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, children: content }), $[105] = animate, $[106] = arrowProp, $[107] = arrowX, $[108] = arrowY, $[109] = content, $[110] = originX, $[111] = originY, $[112] = padding, $[113] = placement, $[114] = radius, $[115] = restProps, $[116] = scheme, $[117] = setArrow, $[118] = setFloating, $[119] = shadow, $[120] = t36) : t36 = $[120];
4998
+ let t37;
4999
+ $[121] !== restProps || $[122] !== setFloating || $[123] !== t35 || $[124] !== t36 || $[125] !== zOffset ? (t37 = /* @__PURE__ */ jsx(StyledTooltip, { "data-ui": "Tooltip", ...restProps, ref: setFloating, style: t35, zOffset, children: t36 }), $[121] = restProps, $[122] = setFloating, $[123] = t35, $[124] = t36, $[125] = zOffset, $[126] = t37) : t37 = $[126];
5000
+ const tooltip = t37;
5001
+ let t38;
5002
+ $[127] !== portalProp || $[128] !== showTooltip || $[129] !== tooltip ? (t38 = showTooltip && (portalProp ? /* @__PURE__ */ jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: tooltip }) : tooltip), $[127] = portalProp, $[128] = showTooltip, $[129] = tooltip, $[130] = t38) : t38 = $[130];
5003
+ const children = t38;
5004
+ let t39;
5005
+ $[131] !== animate || $[132] !== children ? (t39 = animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children, $[131] = animate, $[132] = children, $[133] = t39) : t39 = $[133];
5006
+ let t40;
5007
+ return $[134] !== child || $[135] !== t39 ? (t40 = /* @__PURE__ */ jsxs(Fragment, { children: [
5008
+ t39,
4145
5009
  child
4146
- ] });
5010
+ ] }), $[134] = child, $[135] = t39, $[136] = t40) : t40 = $[136], t40;
4147
5011
  });
4148
5012
  Tooltip.displayName = "ForwardRef(Tooltip)";
4149
- function useMiddleware({
4150
- animate,
4151
- arrowProp,
4152
- arrowRef,
4153
- boundaryElement,
4154
- fallbackPlacements,
4155
- rootBoundary
4156
- }) {
4157
- return useMemo(() => {
4158
- const ret = [];
4159
- return ret.push(flip({
4160
- boundary: boundaryElement || void 0,
5013
+ function useMiddleware(t0) {
5014
+ const $ = c(17), {
5015
+ animate,
5016
+ arrowProp,
5017
+ arrowRef,
5018
+ boundaryElement,
5019
+ fallbackPlacements,
5020
+ rootBoundary
5021
+ } = t0;
5022
+ let ret;
5023
+ if ($[0] !== animate || $[1] !== arrowProp || $[2] !== arrowRef || $[3] !== boundaryElement || $[4] !== fallbackPlacements || $[5] !== rootBoundary) {
5024
+ ret = [];
5025
+ const t1 = boundaryElement || void 0;
5026
+ let t2;
5027
+ $[7] !== fallbackPlacements || $[8] !== rootBoundary || $[9] !== t1 ? (t2 = flip({
5028
+ boundary: t1,
4161
5029
  fallbackPlacements,
4162
5030
  padding: DEFAULT_TOOLTIP_PADDING,
4163
5031
  rootBoundary
4164
- })), ret.push(offset({
5032
+ }), $[7] = fallbackPlacements, $[8] = rootBoundary, $[9] = t1, $[10] = t2) : t2 = $[10], ret.push(t2);
5033
+ let t3;
5034
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t3 = offset({
4165
5035
  mainAxis: DEFAULT_TOOLTIP_DISTANCE
4166
- })), ret.push(shift({
4167
- boundary: boundaryElement || void 0,
5036
+ }), $[11] = t3) : t3 = $[11], ret.push(t3);
5037
+ const t4 = boundaryElement || void 0;
5038
+ let t5;
5039
+ if ($[12] !== rootBoundary || $[13] !== t4 ? (t5 = shift({
5040
+ boundary: t4,
4168
5041
  rootBoundary,
4169
5042
  padding: DEFAULT_TOOLTIP_PADDING
4170
- })), arrowProp && ret.push(arrow({
4171
- element: arrowRef,
4172
- padding: DEFAULT_TOOLTIP_PADDING
4173
- })), animate && ret.push(origin), ret;
4174
- }, [animate, arrowProp, arrowRef, boundaryElement, fallbackPlacements, rootBoundary]);
4175
- }
4176
- function useCloseOnMouseLeave({
4177
- handleIsOpenChange,
4178
- referenceElement,
4179
- showTooltip,
4180
- isInsideGroup
4181
- }) {
4182
- const onMouseMove = useEffectEvent((target, teardown) => {
5043
+ }), $[12] = rootBoundary, $[13] = t4, $[14] = t5) : t5 = $[14], ret.push(t5), arrowProp) {
5044
+ let t6;
5045
+ $[15] !== arrowRef ? (t6 = arrow({
5046
+ element: arrowRef,
5047
+ padding: DEFAULT_TOOLTIP_PADDING
5048
+ }), $[15] = arrowRef, $[16] = t6) : t6 = $[16], ret.push(t6);
5049
+ }
5050
+ animate && ret.push(origin), $[0] = animate, $[1] = arrowProp, $[2] = arrowRef, $[3] = boundaryElement, $[4] = fallbackPlacements, $[5] = rootBoundary, $[6] = ret;
5051
+ } else
5052
+ ret = $[6];
5053
+ return ret;
5054
+ }
5055
+ function useCloseOnMouseLeave(t0) {
5056
+ const $ = c(10), {
5057
+ handleIsOpenChange,
5058
+ referenceElement,
5059
+ showTooltip,
5060
+ isInsideGroup
5061
+ } = t0;
5062
+ let t1;
5063
+ $[0] !== handleIsOpenChange || $[1] !== referenceElement ? (t1 = (target, teardown) => {
4183
5064
  referenceElement && (referenceElement === target || target instanceof Node && referenceElement.contains(target) || (handleIsOpenChange(!1), teardown()));
4184
- });
4185
- useEffect(() => {
4186
- if (!showTooltip || isInsideGroup) return;
5065
+ }, $[0] = handleIsOpenChange, $[1] = referenceElement, $[2] = t1) : t1 = $[2];
5066
+ const onMouseMove = useEffectEvent(t1);
5067
+ let t2;
5068
+ $[3] !== isInsideGroup || $[4] !== onMouseMove || $[5] !== showTooltip ? (t2 = () => {
5069
+ if (!showTooltip || isInsideGroup)
5070
+ return;
4187
5071
  const handleMouseMove = (event) => {
4188
5072
  onMouseMove(event.target, () => window.removeEventListener("mousemove", handleMouseMove));
4189
5073
  };
4190
5074
  return window.addEventListener("mousemove", handleMouseMove), () => window.removeEventListener("mousemove", handleMouseMove);
4191
- }, [isInsideGroup, showTooltip]);
5075
+ }, $[3] = isInsideGroup, $[4] = onMouseMove, $[5] = showTooltip, $[6] = t2) : t2 = $[6];
5076
+ let t3;
5077
+ $[7] !== isInsideGroup || $[8] !== showTooltip ? (t3 = [isInsideGroup, showTooltip], $[7] = isInsideGroup, $[8] = showTooltip, $[9] = t3) : t3 = $[9], useEffect(t2, t3);
4192
5078
  }
4193
5079
  const StyledHotkeys = styled.kbd.withConfig({
4194
5080
  displayName: "StyledHotkeys",
@@ -4197,15 +5083,34 @@ const StyledHotkeys = styled.kbd.withConfig({
4197
5083
  displayName: "Key",
4198
5084
  componentId: "sc-b37mge-1"
4199
5085
  })`&:not([hidden]){display:block;}`, Hotkeys = forwardRef(function(props, ref) {
4200
- const {
5086
+ const $ = c(26);
5087
+ let fontSize2, keys, padding, radius, restProps, t0;
5088
+ $[0] !== props ? ({
4201
5089
  fontSize: fontSize2,
4202
5090
  keys,
4203
5091
  padding,
4204
5092
  radius,
4205
- space: spaceProp = 0.5,
5093
+ space: t0,
4206
5094
  ...restProps
4207
- } = props, space = _getArrayProp(spaceProp);
4208
- return !keys || keys.length === 0 ? /* @__PURE__ */ jsx(Fragment, {}) : /* @__PURE__ */ jsx(StyledHotkeys, { "data-ui": "Hotkeys", ...restProps, ref, children: /* @__PURE__ */ jsx(Inline, { as: "span", space, children: keys.map((key2, i) => /* @__PURE__ */ jsx(Key, { fontSize: fontSize2, padding, radius, children: key2 }, i)) }) });
5095
+ } = props, $[0] = props, $[1] = fontSize2, $[2] = keys, $[3] = padding, $[4] = radius, $[5] = restProps, $[6] = t0) : (fontSize2 = $[1], keys = $[2], padding = $[3], radius = $[4], restProps = $[5], t0 = $[6]);
5096
+ const spaceProp = t0 === void 0 ? 0.5 : t0;
5097
+ let t1;
5098
+ $[7] !== spaceProp ? (t1 = _getArrayProp(spaceProp), $[7] = spaceProp, $[8] = t1) : t1 = $[8];
5099
+ const space = t1;
5100
+ if (!keys || keys.length === 0) {
5101
+ let t22;
5102
+ return $[9] === Symbol.for("react.memo_cache_sentinel") ? (t22 = /* @__PURE__ */ jsx(Fragment, {}), $[9] = t22) : t22 = $[9], t22;
5103
+ }
5104
+ let t2;
5105
+ if ($[10] !== fontSize2 || $[11] !== keys || $[12] !== padding || $[13] !== radius) {
5106
+ let t32;
5107
+ $[15] !== fontSize2 || $[16] !== padding || $[17] !== radius ? (t32 = (key2, i) => /* @__PURE__ */ jsx(Key, { fontSize: fontSize2, padding, radius, children: key2 }, i), $[15] = fontSize2, $[16] = padding, $[17] = radius, $[18] = t32) : t32 = $[18], t2 = keys.map(t32), $[10] = fontSize2, $[11] = keys, $[12] = padding, $[13] = radius, $[14] = t2;
5108
+ } else
5109
+ t2 = $[14];
5110
+ let t3;
5111
+ $[19] !== space || $[20] !== t2 ? (t3 = /* @__PURE__ */ jsx(Inline, { as: "span", space, children: t2 }), $[19] = space, $[20] = t2, $[21] = t3) : t3 = $[21];
5112
+ let t4;
5113
+ return $[22] !== ref || $[23] !== restProps || $[24] !== t3 ? (t4 = /* @__PURE__ */ jsx(StyledHotkeys, { "data-ui": "Hotkeys", ...restProps, ref, children: t3 }), $[22] = ref, $[23] = restProps, $[24] = t3, $[25] = t4) : t4 = $[25], t4;
4209
5114
  });
4210
5115
  Hotkeys.displayName = "ForwardRef(Hotkeys)";
4211
5116
  const MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
@@ -4246,16 +5151,24 @@ function _sortElements(rootElement, elements) {
4246
5151
  elements.sort(_sort);
4247
5152
  }
4248
5153
  function useMenuController(props) {
4249
- const {
5154
+ const $ = c(21), {
4250
5155
  onKeyDown,
4251
5156
  originElement,
4252
5157
  shouldFocus,
4253
5158
  rootElementRef
4254
- } = props, elementsRef = useRef([]), [activeIndex, _setActiveIndex] = useState(-1), activeIndexRef = useRef(activeIndex), [activeElement, setActiveElement] = useState(null), setActiveIndex = useCallback((nextActiveIndex) => {
5159
+ } = props;
5160
+ let t0;
5161
+ $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = [], $[0] = t0) : t0 = $[0];
5162
+ const elementsRef = useRef(t0), [activeIndex, _setActiveIndex] = useState(-1), activeIndexRef = useRef(activeIndex), [activeElement, setActiveElement] = useState(null);
5163
+ let t1;
5164
+ $[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = (nextActiveIndex) => {
4255
5165
  _setActiveIndex(nextActiveIndex), activeIndexRef.current = nextActiveIndex, setActiveElement(elementsRef.current[nextActiveIndex] || null);
4256
- }, []), mount = useCallback((element, selected) => {
4257
- if (!element) return () => {
4258
- };
5166
+ }, $[1] = t1) : t1 = $[1];
5167
+ const setActiveIndex = t1;
5168
+ let t2;
5169
+ $[2] !== rootElementRef ? (t2 = (element, selected) => {
5170
+ if (!element)
5171
+ return _temp$1;
4259
5172
  if (elementsRef.current.indexOf(element) === -1 && (elementsRef.current.push(element), _sortElements(rootElementRef.current, elementsRef.current)), selected) {
4260
5173
  const selectedIndex = elementsRef.current.indexOf(element);
4261
5174
  setActiveIndex(selectedIndex);
@@ -4264,7 +5177,10 @@ function useMenuController(props) {
4264
5177
  const idx = elementsRef.current.indexOf(element);
4265
5178
  idx > -1 && elementsRef.current.splice(idx, 1);
4266
5179
  };
4267
- }, [rootElementRef, setActiveIndex]), handleKeyDown = useCallback((event) => {
5180
+ }, $[2] = rootElementRef, $[3] = t2) : t2 = $[3];
5181
+ const mount = t2;
5182
+ let t3;
5183
+ $[4] !== onKeyDown || $[5] !== originElement ? (t3 = (event) => {
4268
5184
  if (event.key === "Tab") {
4269
5185
  originElement && originElement.focus();
4270
5186
  return;
@@ -4272,64 +5188,77 @@ function useMenuController(props) {
4272
5188
  if (event.key === "Home") {
4273
5189
  event.preventDefault(), event.stopPropagation();
4274
5190
  const el = _getFocusableElements(elementsRef.current)[0];
4275
- if (!el) return;
5191
+ if (!el)
5192
+ return;
4276
5193
  const currentIndex = elementsRef.current.indexOf(el);
4277
5194
  setActiveIndex(currentIndex);
4278
5195
  return;
4279
5196
  }
4280
5197
  if (event.key === "End") {
4281
5198
  event.preventDefault(), event.stopPropagation();
4282
- const focusableElements = _getFocusableElements(elementsRef.current), el = focusableElements[focusableElements.length - 1];
4283
- if (!el) return;
4284
- const currentIndex = elementsRef.current.indexOf(el);
4285
- setActiveIndex(currentIndex);
5199
+ const focusableElements_0 = _getFocusableElements(elementsRef.current), el_0 = focusableElements_0[focusableElements_0.length - 1];
5200
+ if (!el_0)
5201
+ return;
5202
+ const currentIndex_0 = elementsRef.current.indexOf(el_0);
5203
+ setActiveIndex(currentIndex_0);
4286
5204
  return;
4287
5205
  }
4288
5206
  if (event.key === "ArrowUp") {
4289
5207
  event.preventDefault(), event.stopPropagation();
4290
- const focusableElements = _getFocusableElements(elementsRef.current), focusableLen = focusableElements.length;
4291
- if (focusableLen === 0) return;
5208
+ const focusableElements_1 = _getFocusableElements(elementsRef.current), focusableLen = focusableElements_1.length;
5209
+ if (focusableLen === 0)
5210
+ return;
4292
5211
  const focusedElement = elementsRef.current[activeIndexRef.current];
4293
- let focusedIndex = focusableElements.indexOf(focusedElement);
5212
+ let focusedIndex = focusableElements_1.indexOf(focusedElement);
4294
5213
  focusedIndex = (focusedIndex - 1 + focusableLen) % focusableLen;
4295
- const el = focusableElements[focusedIndex], currentIndex = elementsRef.current.indexOf(el);
4296
- setActiveIndex(currentIndex);
5214
+ const el_1 = focusableElements_1[focusedIndex], currentIndex_1 = elementsRef.current.indexOf(el_1);
5215
+ setActiveIndex(currentIndex_1);
4297
5216
  return;
4298
5217
  }
4299
5218
  if (event.key === "ArrowDown") {
4300
5219
  event.preventDefault(), event.stopPropagation();
4301
- const focusableElements = _getFocusableElements(elementsRef.current), focusableLen = focusableElements.length;
4302
- if (focusableLen === 0) return;
4303
- const focusedElement = elementsRef.current[activeIndexRef.current];
4304
- let focusedIndex = focusableElements.indexOf(focusedElement);
4305
- focusedIndex = (focusedIndex + 1) % focusableLen;
4306
- const el = focusableElements[focusedIndex], currentIndex = elementsRef.current.indexOf(el);
4307
- setActiveIndex(currentIndex);
5220
+ const focusableElements_2 = _getFocusableElements(elementsRef.current), focusableLen_0 = focusableElements_2.length;
5221
+ if (focusableLen_0 === 0)
5222
+ return;
5223
+ const focusedElement_0 = elementsRef.current[activeIndexRef.current];
5224
+ let focusedIndex_0 = focusableElements_2.indexOf(focusedElement_0);
5225
+ focusedIndex_0 = (focusedIndex_0 + 1) % focusableLen_0;
5226
+ const el_2 = focusableElements_2[focusedIndex_0], currentIndex_2 = elementsRef.current.indexOf(el_2);
5227
+ setActiveIndex(currentIndex_2);
4308
5228
  return;
4309
5229
  }
4310
5230
  onKeyDown && onKeyDown(event);
4311
- }, [onKeyDown, originElement, setActiveIndex]), handleItemMouseEnter = useCallback((event) => {
4312
- const element = event.currentTarget, currentIndex = elementsRef.current.indexOf(element);
4313
- setActiveIndex(currentIndex);
4314
- }, [setActiveIndex]), handleItemMouseLeave = useCallback(() => {
5231
+ }, $[4] = onKeyDown, $[5] = originElement, $[6] = t3) : t3 = $[6];
5232
+ const handleKeyDown = t3;
5233
+ let t4;
5234
+ $[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = (event_0) => {
5235
+ const element_0 = event_0.currentTarget, currentIndex_3 = elementsRef.current.indexOf(element_0);
5236
+ setActiveIndex(currentIndex_3);
5237
+ }, $[7] = t4) : t4 = $[7];
5238
+ const handleItemMouseEnter = t4;
5239
+ let t5;
5240
+ $[8] !== rootElementRef ? (t5 = () => {
4315
5241
  setActiveIndex(-2), rootElementRef.current?.focus();
4316
- }, [rootElementRef, setActiveIndex]);
4317
- return useEffect(() => {
4318
- if (!rootElementRef.current) return;
5242
+ }, $[8] = rootElementRef, $[9] = t5) : t5 = $[9];
5243
+ const handleItemMouseLeave = t5;
5244
+ let t6, t7;
5245
+ $[10] !== activeIndex || $[11] !== rootElementRef || $[12] !== shouldFocus ? (t6 = () => {
5246
+ if (!rootElementRef.current)
5247
+ return;
4319
5248
  const rafId = requestAnimationFrame(() => {
4320
5249
  if (activeIndex === -1) {
4321
5250
  if (shouldFocus === "first") {
4322
- const el = _getFocusableElements(elementsRef.current)[0];
4323
- if (el) {
4324
- const currentIndex = elementsRef.current.indexOf(el);
4325
- setActiveIndex(currentIndex);
5251
+ const el_3 = _getFocusableElements(elementsRef.current)[0];
5252
+ if (el_3) {
5253
+ const currentIndex_4 = elementsRef.current.indexOf(el_3);
5254
+ setActiveIndex(currentIndex_4);
4326
5255
  }
4327
5256
  }
4328
5257
  if (shouldFocus === "last") {
4329
- const focusableElements = _getFocusableElements(elementsRef.current), el = focusableElements[focusableElements.length - 1];
4330
- if (el) {
4331
- const currentIndex = elementsRef.current.indexOf(el);
4332
- setActiveIndex(currentIndex);
5258
+ const focusableElements_4 = _getFocusableElements(elementsRef.current), el_4 = focusableElements_4[focusableElements_4.length - 1];
5259
+ if (el_4) {
5260
+ const currentIndex_5 = elementsRef.current.indexOf(el_4);
5261
+ setActiveIndex(currentIndex_5);
4333
5262
  }
4334
5263
  }
4335
5264
  return;
@@ -4337,61 +5266,83 @@ function useMenuController(props) {
4337
5266
  (elementsRef.current[activeIndex] || null)?.focus();
4338
5267
  });
4339
5268
  return () => cancelAnimationFrame(rafId);
4340
- }, [activeIndex, rootElementRef, setActiveIndex, shouldFocus]), {
5269
+ }, t7 = [activeIndex, rootElementRef, setActiveIndex, shouldFocus], $[10] = activeIndex, $[11] = rootElementRef, $[12] = shouldFocus, $[13] = t6, $[14] = t7) : (t6 = $[13], t7 = $[14]), useEffect(t6, t7);
5270
+ let t8;
5271
+ return $[15] !== activeElement || $[16] !== activeIndex || $[17] !== handleItemMouseLeave || $[18] !== handleKeyDown || $[19] !== mount ? (t8 = {
4341
5272
  activeElement,
4342
5273
  activeIndex,
4343
5274
  handleItemMouseEnter,
4344
5275
  handleItemMouseLeave,
4345
5276
  handleKeyDown,
4346
5277
  mount
4347
- };
5278
+ }, $[15] = activeElement, $[16] = activeIndex, $[17] = handleItemMouseLeave, $[18] = handleKeyDown, $[19] = mount, $[20] = t8) : t8 = $[20], t8;
5279
+ }
5280
+ function _temp$1() {
4348
5281
  }
4349
5282
  const StyledMenu = styled(Box).withConfig({
4350
5283
  displayName: "StyledMenu",
4351
5284
  componentId: "sc-xt0tnv-0"
4352
5285
  })`outline:none;overflow:auto;`, Menu = forwardRef(function(props, forwardedRef) {
5286
+ const $ = c(49);
5287
+ let _shouldFocus, children, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1;
5288
+ if ($[0] !== props) {
5289
+ const {
5290
+ children: t22,
5291
+ focusFirst,
5292
+ focusLast,
5293
+ onClickOutside: t32,
5294
+ onEscape: t42,
5295
+ onItemClick: t52,
5296
+ onItemSelect: t62,
5297
+ onKeyDown: t72,
5298
+ originElement: t82,
5299
+ padding: t92,
5300
+ registerElement: t102,
5301
+ shouldFocus: t112,
5302
+ space: t122,
5303
+ ...t13
5304
+ } = props;
5305
+ children = t22, onClickOutside = t32, onEscape = t42, onItemClick = t52, onItemSelect = t62, onKeyDown = t72, originElement = t82, t0 = t92, registerElement = t102, _shouldFocus = t112, t1 = t122, restProps = t13, $[0] = props, $[1] = _shouldFocus, $[2] = children, $[3] = onClickOutside, $[4] = onEscape, $[5] = onItemClick, $[6] = onItemSelect, $[7] = onKeyDown, $[8] = originElement, $[9] = registerElement, $[10] = restProps, $[11] = t0, $[12] = t1;
5306
+ } else
5307
+ _shouldFocus = $[1], children = $[2], onClickOutside = $[3], onEscape = $[4], onItemClick = $[5], onItemSelect = $[6], onKeyDown = $[7], originElement = $[8], registerElement = $[9], restProps = $[10], t0 = $[11], t1 = $[12];
5308
+ const padding = t0 === void 0 ? 1 : t0, space = t1 === void 0 ? 1 : t1, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = useRef(null);
5309
+ let t2;
5310
+ $[13] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[13] = t2) : t2 = $[13], useImperativeHandle(forwardedRef, t2);
4353
5311
  const {
4354
- children,
4355
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4356
- focusFirst,
4357
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4358
- focusLast,
4359
- onClickOutside,
4360
- onEscape,
4361
- onItemClick,
4362
- onItemSelect,
5312
+ isTopLayer
5313
+ } = useLayer();
5314
+ let t3;
5315
+ $[14] !== onKeyDown || $[15] !== originElement || $[16] !== shouldFocus ? (t3 = {
4363
5316
  onKeyDown,
4364
5317
  originElement,
4365
- padding = 1,
4366
- registerElement,
4367
- shouldFocus: _shouldFocus,
4368
- space = 1,
4369
- ...restProps
4370
- } = props, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = useRef(null);
4371
- useImperativeHandle(forwardedRef, () => ref.current);
5318
+ shouldFocus,
5319
+ rootElementRef: ref
5320
+ }, $[14] = onKeyDown, $[15] = originElement, $[16] = shouldFocus, $[17] = t3) : t3 = $[17];
4372
5321
  const {
4373
- isTopLayer
4374
- } = useLayer(), {
4375
5322
  activeElement,
4376
5323
  activeIndex,
4377
5324
  handleItemMouseEnter,
4378
5325
  handleItemMouseLeave,
4379
5326
  handleKeyDown,
4380
5327
  mount
4381
- } = useMenuController({
4382
- onKeyDown,
4383
- originElement,
4384
- shouldFocus,
4385
- rootElementRef: ref
4386
- }), unregisterElementRef = useRef(null), handleRefChange = useCallback((el) => {
5328
+ } = useMenuController(t3), unregisterElementRef = useRef(null);
5329
+ let t4;
5330
+ $[18] !== registerElement ? (t4 = (el) => {
4387
5331
  unregisterElementRef.current && (unregisterElementRef.current(), unregisterElementRef.current = null), ref.current = el, ref.current && registerElement && (unregisterElementRef.current = registerElement(ref.current));
4388
- }, [registerElement]);
4389
- useEffect(() => {
5332
+ }, $[18] = registerElement, $[19] = t4) : t4 = $[19];
5333
+ const handleRefChange = t4;
5334
+ let t5, t6;
5335
+ $[20] !== activeIndex || $[21] !== onItemSelect ? (t5 = () => {
4390
5336
  onItemSelect && onItemSelect(activeIndex);
4391
- }, [activeIndex, onItemSelect]), useClickOutsideEvent(isTopLayer && onClickOutside, () => [ref.current]), useGlobalKeyDown(useCallback((event) => {
5337
+ }, t6 = [activeIndex, onItemSelect], $[20] = activeIndex, $[21] = onItemSelect, $[22] = t5, $[23] = t6) : (t5 = $[22], t6 = $[23]), useEffect(t5, t6);
5338
+ let t7;
5339
+ $[24] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => [ref.current], $[24] = t7) : t7 = $[24], useClickOutsideEvent(isTopLayer && onClickOutside, t7);
5340
+ let t8;
5341
+ $[25] !== isTopLayer || $[26] !== onEscape ? (t8 = (event) => {
4392
5342
  isTopLayer && event.key === "Escape" && (event.stopPropagation(), onEscape && onEscape());
4393
- }, [isTopLayer, onEscape]));
4394
- const value = useMemo(() => ({
5343
+ }, $[25] = isTopLayer, $[26] = onEscape, $[27] = t8) : t8 = $[27], useGlobalKeyDown(t8);
5344
+ let t9;
5345
+ $[28] !== activeElement || $[29] !== handleItemMouseEnter || $[30] !== handleItemMouseLeave || $[31] !== mount || $[32] !== onClickOutside || $[33] !== onEscape || $[34] !== onItemClick || $[35] !== registerElement ? (t9 = {
4395
5346
  version: 2,
4396
5347
  activeElement,
4397
5348
  mount,
@@ -4401,8 +5352,14 @@ const StyledMenu = styled(Box).withConfig({
4401
5352
  onItemMouseEnter: handleItemMouseEnter,
4402
5353
  onItemMouseLeave: handleItemMouseLeave,
4403
5354
  registerElement
4404
- }), [activeElement, mount, handleItemMouseEnter, handleItemMouseLeave, onClickOutside, onEscape, onItemClick, registerElement]);
4405
- return /* @__PURE__ */ jsx(MenuContext.Provider, { value, children: /* @__PURE__ */ jsx(StyledMenu, { "data-ui": "Menu", ...restProps, onKeyDown: handleKeyDown, padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: /* @__PURE__ */ jsx(Stack, { space, children }) }) });
5355
+ }, $[28] = activeElement, $[29] = handleItemMouseEnter, $[30] = handleItemMouseLeave, $[31] = mount, $[32] = onClickOutside, $[33] = onEscape, $[34] = onItemClick, $[35] = registerElement, $[36] = t9) : t9 = $[36];
5356
+ const value = t9;
5357
+ let t10;
5358
+ $[37] !== children || $[38] !== space ? (t10 = /* @__PURE__ */ jsx(Stack, { space, children }), $[37] = children, $[38] = space, $[39] = t10) : t10 = $[39];
5359
+ let t11;
5360
+ $[40] !== handleKeyDown || $[41] !== handleRefChange || $[42] !== padding || $[43] !== restProps || $[44] !== t10 ? (t11 = /* @__PURE__ */ jsx(StyledMenu, { "data-ui": "Menu", ...restProps, onKeyDown: handleKeyDown, padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: t10 }), $[40] = handleKeyDown, $[41] = handleRefChange, $[42] = padding, $[43] = restProps, $[44] = t10, $[45] = t11) : t11 = $[45];
5361
+ let t12;
5362
+ return $[46] !== t11 || $[47] !== value ? (t12 = /* @__PURE__ */ jsx(MenuContext.Provider, { value, children: t11 }), $[46] = t11, $[47] = value, $[48] = t12) : t12 = $[48], t12;
4406
5363
  });
4407
5364
  Menu.displayName = "ForwardRef(Menu)";
4408
5365
  const MenuDivider = styled.hr.withConfig({
@@ -4524,21 +5481,24 @@ function useMenu() {
4524
5481
  return value;
4525
5482
  }
4526
5483
  function MenuGroup(props) {
4527
- const {
4528
- as = "button",
5484
+ const $ = c(81);
5485
+ let IconComponent, children, menuProps, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;
5486
+ $[0] !== props ? ({
5487
+ as: t0,
4529
5488
  children,
4530
- fontSize: fontSize2 = 1,
5489
+ fontSize: t1,
4531
5490
  icon: IconComponent,
4532
5491
  menu: menuProps,
4533
5492
  onClick,
4534
- padding = 3,
5493
+ padding: t2,
4535
5494
  popover,
4536
- radius = 2,
4537
- space = 3,
5495
+ radius: t3,
5496
+ space: t4,
4538
5497
  text,
4539
- tone = "default",
5498
+ tone: t5,
4540
5499
  ...restProps
4541
- } = props, menu = useMenu(), {
5500
+ } = props, $[0] = props, $[1] = IconComponent, $[2] = children, $[3] = menuProps, $[4] = onClick, $[5] = popover, $[6] = restProps, $[7] = t0, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5, $[13] = text) : (IconComponent = $[1], children = $[2], menuProps = $[3], onClick = $[4], popover = $[5], restProps = $[6], t0 = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12], text = $[13]);
5501
+ const as = t0 === void 0 ? "button" : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, menu = useMenu(), {
4542
5502
  scheme
4543
5503
  } = useRootTheme(), {
4544
5504
  activeElement,
@@ -4548,54 +5508,100 @@ function MenuGroup(props) {
4548
5508
  onItemClick,
4549
5509
  onItemMouseEnter: _onItemMouseEnter,
4550
5510
  registerElement
4551
- } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, [rootElement, setRootElement] = useState(null), [open, setOpen] = useState(!1), [shouldFocus, setShouldFocus] = useState(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = useState(!1), handleMouseEnter = useCallback((event) => {
5511
+ } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, [rootElement, setRootElement] = useState(null), [open, setOpen] = useState(!1), [shouldFocus, setShouldFocus] = useState(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = useState(!1);
5512
+ let t6;
5513
+ $[14] !== onItemMouseEnter ? (t6 = (event) => {
4552
5514
  setWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);
4553
- }, [onItemMouseEnter]), handleMenuKeyDown = useCallback((event) => {
4554
- event.key === "ArrowLeft" && (event.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {
5515
+ }, $[14] = onItemMouseEnter, $[15] = t6) : t6 = $[15];
5516
+ const handleMouseEnter = t6;
5517
+ let t7;
5518
+ $[16] !== rootElement ? (t7 = (event_0) => {
5519
+ event_0.key === "ArrowLeft" && (event_0.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {
4555
5520
  rootElement?.focus();
4556
5521
  }));
4557
- }, [rootElement]), handleClick = useCallback((event) => {
4558
- onClick?.(event), setShouldFocus("first"), setOpen(!0);
4559
- }, [onClick]), handleChildItemClick = useCallback(() => {
5522
+ }, $[16] = rootElement, $[17] = t7) : t7 = $[17];
5523
+ const handleMenuKeyDown = t7;
5524
+ let t8;
5525
+ $[18] !== onClick ? (t8 = (event_1) => {
5526
+ onClick?.(event_1), setShouldFocus("first"), setOpen(!0);
5527
+ }, $[18] = onClick, $[19] = t8) : t8 = $[19];
5528
+ const handleClick = t8;
5529
+ let t9;
5530
+ $[20] !== onItemClick ? (t9 = () => {
4560
5531
  setOpen(!1), onItemClick?.();
4561
- }, [onItemClick]), handleMenuMouseEnter = useCallback(() => setWithinMenu(!0), []);
4562
- useEffect(() => mount(rootElement), [mount, rootElement]), useEffect(() => {
5532
+ }, $[20] = onItemClick, $[21] = t9) : t9 = $[21];
5533
+ const handleChildItemClick = t9;
5534
+ let t10;
5535
+ $[22] === Symbol.for("react.memo_cache_sentinel") ? (t10 = () => setWithinMenu(!0), $[22] = t10) : t10 = $[22];
5536
+ const handleMenuMouseEnter = t10;
5537
+ let t11, t12;
5538
+ $[23] !== mount || $[24] !== rootElement ? (t11 = () => mount(rootElement), t12 = [mount, rootElement], $[23] = mount, $[24] = rootElement, $[25] = t11, $[26] = t12) : (t11 = $[25], t12 = $[26]), useEffect(t11, t12);
5539
+ let t13, t14;
5540
+ $[27] !== active ? (t13 = () => {
4563
5541
  active || setOpen(!1);
4564
- }, [active]), useEffect(() => {
5542
+ }, t14 = [active], $[27] = active, $[28] = t13, $[29] = t14) : (t13 = $[28], t14 = $[29]), useEffect(t13, t14);
5543
+ let t15, t16;
5544
+ $[30] !== open ? (t15 = () => {
4565
5545
  open || setWithinMenu(!1);
4566
- }, [open]), useEffect(() => {
4567
- if (!shouldFocus) return;
5546
+ }, t16 = [open], $[30] = open, $[31] = t15, $[32] = t16) : (t15 = $[31], t16 = $[32]), useEffect(t15, t16);
5547
+ let t17, t18;
5548
+ $[33] !== shouldFocus ? (t17 = () => {
5549
+ if (!shouldFocus)
5550
+ return;
4568
5551
  const rafId = requestAnimationFrame(() => setShouldFocus(null));
4569
5552
  return () => cancelAnimationFrame(rafId);
4570
- }, [shouldFocus]);
4571
- const childMenu = /* @__PURE__ */ jsx(Menu, { ...menuProps, onClickOutside, onEscape, onItemClick: handleChildItemClick, onKeyDown: handleMenuKeyDown, onMouseEnter: handleMenuMouseEnter, registerElement, shouldFocus, children }), handleKeyDown = useCallback((event) => {
4572
- const target = event.currentTarget;
4573
- if (document.activeElement === target && event.key === "ArrowRight") {
5553
+ }, t18 = [shouldFocus], $[33] = shouldFocus, $[34] = t17, $[35] = t18) : (t17 = $[34], t18 = $[35]), useEffect(t17, t18);
5554
+ let t19;
5555
+ $[36] !== children || $[37] !== handleChildItemClick || $[38] !== handleMenuKeyDown || $[39] !== menuProps || $[40] !== onClickOutside || $[41] !== onEscape || $[42] !== registerElement || $[43] !== shouldFocus ? (t19 = /* @__PURE__ */ jsx(Menu, { ...menuProps, onClickOutside, onEscape, onItemClick: handleChildItemClick, onKeyDown: handleMenuKeyDown, onMouseEnter: handleMenuMouseEnter, registerElement, shouldFocus, children }), $[36] = children, $[37] = handleChildItemClick, $[38] = handleMenuKeyDown, $[39] = menuProps, $[40] = onClickOutside, $[41] = onEscape, $[42] = registerElement, $[43] = shouldFocus, $[44] = t19) : t19 = $[44];
5556
+ const childMenu = t19;
5557
+ let t20;
5558
+ $[45] === Symbol.for("react.memo_cache_sentinel") ? (t20 = (event_2) => {
5559
+ const target = event_2.currentTarget;
5560
+ if (document.activeElement === target && event_2.key === "ArrowRight") {
4574
5561
  setShouldFocus("first"), setOpen(!0), setWithinMenu(!0);
4575
5562
  return;
4576
5563
  }
4577
- }, []);
4578
- return /* @__PURE__ */ jsx(Popover, { ...popover, content: childMenu, "data-ui": "MenuGroup__popover", open, children: /* @__PURE__ */ jsx(Selectable, { "data-as": as, "data-ui": "MenuGroup", forwardedAs: as, ...restProps, "aria-pressed": as === "button" ? withinMenu : void 0, "data-pressed": as !== "button" ? withinMenu : void 0, "data-selected": !withinMenu && active ? "" : void 0, $radius: _getArrayProp(radius), $tone: tone, $scheme: scheme, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, ref: setRootElement, tabIndex: -1, type: as === "button" ? "button" : void 0, children: /* @__PURE__ */ jsxs(Flex, { gap: space, padding, children: [
4579
- IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
4580
- isValidElement(IconComponent) && IconComponent,
4581
- isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
4582
- ] }),
4583
- /* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(Text, { size: fontSize2, textOverflow: "ellipsis", weight: "medium", children: text }) }),
4584
- /* @__PURE__ */ jsx(Text, { size: fontSize2, children: /* @__PURE__ */ jsx(ChevronRightIcon, {}) })
4585
- ] }) }) });
5564
+ }, $[45] = t20) : t20 = $[45];
5565
+ const handleKeyDown = t20, t21 = as === "button" ? withinMenu : void 0, t22 = as !== "button" ? withinMenu : void 0, t23 = !withinMenu && active ? "" : void 0;
5566
+ let t24;
5567
+ $[46] !== radius ? (t24 = _getArrayProp(radius), $[46] = radius, $[47] = t24) : t24 = $[47];
5568
+ const t25 = as === "button" ? "button" : void 0;
5569
+ let t26;
5570
+ $[48] !== IconComponent || $[49] !== fontSize2 ? (t26 = IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
5571
+ isValidElement(IconComponent) && IconComponent,
5572
+ isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
5573
+ ] }), $[48] = IconComponent, $[49] = fontSize2, $[50] = t26) : t26 = $[50];
5574
+ let t27;
5575
+ $[51] !== fontSize2 || $[52] !== text ? (t27 = /* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(Text, { size: fontSize2, textOverflow: "ellipsis", weight: "medium", children: text }) }), $[51] = fontSize2, $[52] = text, $[53] = t27) : t27 = $[53];
5576
+ let t28;
5577
+ $[54] === Symbol.for("react.memo_cache_sentinel") ? (t28 = /* @__PURE__ */ jsx(ChevronRightIcon, {}), $[54] = t28) : t28 = $[54];
5578
+ let t29;
5579
+ $[55] !== fontSize2 ? (t29 = /* @__PURE__ */ jsx(Text, { size: fontSize2, children: t28 }), $[55] = fontSize2, $[56] = t29) : t29 = $[56];
5580
+ let t30;
5581
+ $[57] !== padding || $[58] !== space || $[59] !== t26 || $[60] !== t27 || $[61] !== t29 ? (t30 = /* @__PURE__ */ jsxs(Flex, { gap: space, padding, children: [
5582
+ t26,
5583
+ t27,
5584
+ t29
5585
+ ] }), $[57] = padding, $[58] = space, $[59] = t26, $[60] = t27, $[61] = t29, $[62] = t30) : t30 = $[62];
5586
+ let t31;
5587
+ $[63] !== as || $[64] !== handleClick || $[65] !== handleMouseEnter || $[66] !== restProps || $[67] !== scheme || $[68] !== t21 || $[69] !== t22 || $[70] !== t23 || $[71] !== t24 || $[72] !== t25 || $[73] !== t30 || $[74] !== tone ? (t31 = /* @__PURE__ */ jsx(Selectable, { "data-as": as, "data-ui": "MenuGroup", forwardedAs: as, ...restProps, "aria-pressed": t21, "data-pressed": t22, "data-selected": t23, $radius: t24, $tone: tone, $scheme: scheme, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, ref: setRootElement, tabIndex: -1, type: t25, children: t30 }), $[63] = as, $[64] = handleClick, $[65] = handleMouseEnter, $[66] = restProps, $[67] = scheme, $[68] = t21, $[69] = t22, $[70] = t23, $[71] = t24, $[72] = t25, $[73] = t30, $[74] = tone, $[75] = t31) : t31 = $[75];
5588
+ let t32;
5589
+ return $[76] !== childMenu || $[77] !== open || $[78] !== popover || $[79] !== t31 ? (t32 = /* @__PURE__ */ jsx(Popover, { ...popover, content: childMenu, "data-ui": "MenuGroup__popover", open, children: t31 }), $[76] = childMenu, $[77] = open, $[78] = popover, $[79] = t31, $[80] = t32) : t32 = $[80], t32;
4586
5590
  }
4587
5591
  MenuGroup.displayName = "MenuGroup";
4588
5592
  const MenuItem = forwardRef(function(props, forwardedRef) {
4589
- const {
4590
- as = "button",
5593
+ const $ = c(75);
5594
+ let IconComponent, IconRightComponent, children, disabled, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
5595
+ $[0] !== props ? ({
5596
+ as: t0,
4591
5597
  children,
4592
5598
  disabled,
4593
- fontSize: fontSize2 = 1,
5599
+ fontSize: t1,
4594
5600
  hotkeys,
4595
5601
  icon: IconComponent,
4596
5602
  iconRight: IconRightComponent,
4597
5603
  onClick,
4598
- padding = 3,
5604
+ padding: t2,
4599
5605
  paddingX,
4600
5606
  paddingY,
4601
5607
  paddingTop,
@@ -4603,13 +5609,14 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
4603
5609
  paddingBottom,
4604
5610
  paddingLeft,
4605
5611
  pressed,
4606
- radius = 2,
5612
+ radius: t3,
4607
5613
  selected: selectedProp,
4608
- space = 3,
5614
+ space: t4,
4609
5615
  text,
4610
- tone = "default",
5616
+ tone: t5,
4611
5617
  ...restProps
4612
- } = props, {
5618
+ } = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = hotkeys, $[6] = onClick, $[7] = paddingBottom, $[8] = paddingLeft, $[9] = paddingRight, $[10] = paddingTop, $[11] = paddingX, $[12] = paddingY, $[13] = pressed, $[14] = restProps, $[15] = selectedProp, $[16] = t0, $[17] = t1, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5, $[22] = text) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], hotkeys = $[5], onClick = $[6], paddingBottom = $[7], paddingLeft = $[8], paddingRight = $[9], paddingTop = $[10], paddingX = $[11], paddingY = $[12], pressed = $[13], restProps = $[14], selectedProp = $[15], t0 = $[16], t1 = $[17], t2 = $[18], t3 = $[19], t4 = $[20], t5 = $[21], text = $[22]);
5619
+ const as = t0 === void 0 ? "button" : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, {
4613
5620
  scheme
4614
5621
  } = useRootTheme(), menu = useMenu(), {
4615
5622
  activeElement,
@@ -4618,10 +5625,17 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
4618
5625
  onItemMouseEnter: _onItemMouseEnter,
4619
5626
  onItemMouseLeave: _onItemMouseLeave
4620
5627
  } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, onItemMouseLeave = _onItemMouseLeave ?? menu.onItemMouseLeave, [rootElement, setRootElement] = useState(null), active = !!activeElement && activeElement === rootElement, ref = useRef(null);
4621
- useImperativeHandle(forwardedRef, () => ref.current), useEffect(() => mount(rootElement, selectedProp), [mount, rootElement, selectedProp]);
4622
- const handleClick = useCallback((event) => {
5628
+ let t6;
5629
+ $[23] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[23] = t6) : t6 = $[23], useImperativeHandle(forwardedRef, t6);
5630
+ let t7, t8;
5631
+ $[24] !== mount || $[25] !== rootElement || $[26] !== selectedProp ? (t7 = () => mount(rootElement, selectedProp), t8 = [mount, rootElement, selectedProp], $[24] = mount, $[25] = rootElement, $[26] = selectedProp, $[27] = t7, $[28] = t8) : (t7 = $[27], t8 = $[28]), useEffect(t7, t8);
5632
+ let t9;
5633
+ $[29] !== disabled || $[30] !== onClick || $[31] !== onItemClick ? (t9 = (event) => {
4623
5634
  disabled || (onClick && onClick(event), onItemClick && onItemClick());
4624
- }, [disabled, onClick, onItemClick]), paddingProps = useMemo(() => ({
5635
+ }, $[29] = disabled, $[30] = onClick, $[31] = onItemClick, $[32] = t9) : t9 = $[32];
5636
+ const handleClick = t9;
5637
+ let t10;
5638
+ $[33] !== padding || $[34] !== paddingBottom || $[35] !== paddingLeft || $[36] !== paddingRight || $[37] !== paddingTop || $[38] !== paddingX || $[39] !== paddingY ? (t10 = {
4625
5639
  padding,
4626
5640
  paddingX,
4627
5641
  paddingY,
@@ -4629,71 +5643,119 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
4629
5643
  paddingRight,
4630
5644
  paddingBottom,
4631
5645
  paddingLeft
4632
- }), [padding, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft]), hotkeysFontSize = _getArrayProp(fontSize2).map((s) => s - 1), setRef = useCallback((el) => {
5646
+ }, $[33] = padding, $[34] = paddingBottom, $[35] = paddingLeft, $[36] = paddingRight, $[37] = paddingTop, $[38] = paddingX, $[39] = paddingY, $[40] = t10) : t10 = $[40];
5647
+ const paddingProps = t10;
5648
+ let t11;
5649
+ $[41] !== fontSize2 ? (t11 = _getArrayProp(fontSize2).map(_temp), $[41] = fontSize2, $[42] = t11) : t11 = $[42];
5650
+ const hotkeysFontSize = t11;
5651
+ let t12;
5652
+ $[43] === Symbol.for("react.memo_cache_sentinel") ? (t12 = (el) => {
4633
5653
  ref.current = el, setRootElement(el);
4634
- }, []);
4635
- return /* @__PURE__ */ jsxs(Selectable, { "data-ui": "MenuItem", role: "menuitem", ...restProps, "data-pressed": as !== "button" && pressed ? "" : void 0, "data-selected": active ? "" : void 0, "data-disabled": disabled ? "" : void 0, forwardedAs: as, $radius: _getArrayProp(radius), $padding: _getArrayProp(0), $tone: disabled ? "default" : tone, $scheme: scheme, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, tabIndex: -1, type: as === "button" ? "button" : void 0, children: [
4636
- (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxs(Flex, { as: "span", gap: space, align: "center", ...paddingProps, children: [
4637
- IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
4638
- isValidElement(IconComponent) && IconComponent,
4639
- isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
4640
- ] }),
4641
- text && /* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(Text, { size: fontSize2, textOverflow: "ellipsis", weight: "medium", children: text }) }),
4642
- hotkeys && /* @__PURE__ */ jsx(Hotkeys, { fontSize: hotkeysFontSize, keys: hotkeys, style: {
4643
- marginTop: -4,
4644
- marginBottom: -4
4645
- } }),
4646
- IconRightComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
4647
- isValidElement(IconRightComponent) && IconRightComponent,
4648
- isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
4649
- ] })
5654
+ }, $[43] = t12) : t12 = $[43];
5655
+ const setRef = t12, t13 = as !== "button" && pressed ? "" : void 0, t14 = active ? "" : void 0, t15 = disabled ? "" : void 0;
5656
+ let t16;
5657
+ $[44] !== radius ? (t16 = _getArrayProp(radius), $[44] = radius, $[45] = t16) : t16 = $[45];
5658
+ let t17;
5659
+ $[46] === Symbol.for("react.memo_cache_sentinel") ? (t17 = _getArrayProp(0), $[46] = t17) : t17 = $[46];
5660
+ const t18 = disabled ? "default" : tone, t19 = as === "button" ? "button" : void 0;
5661
+ let t20;
5662
+ $[47] !== IconComponent || $[48] !== IconRightComponent || $[49] !== fontSize2 || $[50] !== hotkeys || $[51] !== hotkeysFontSize || $[52] !== paddingProps || $[53] !== space || $[54] !== text ? (t20 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxs(Flex, { as: "span", gap: space, align: "center", ...paddingProps, children: [
5663
+ IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
5664
+ isValidElement(IconComponent) && IconComponent,
5665
+ isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
4650
5666
  ] }),
4651
- children && /* @__PURE__ */ jsx(Box, { as: "span", ...paddingProps, children })
4652
- ] });
5667
+ text && /* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(Text, { size: fontSize2, textOverflow: "ellipsis", weight: "medium", children: text }) }),
5668
+ hotkeys && /* @__PURE__ */ jsx(Hotkeys, { fontSize: hotkeysFontSize, keys: hotkeys, style: {
5669
+ marginTop: -4,
5670
+ marginBottom: -4
5671
+ } }),
5672
+ IconRightComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
5673
+ isValidElement(IconRightComponent) && IconRightComponent,
5674
+ isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
5675
+ ] })
5676
+ ] }), $[47] = IconComponent, $[48] = IconRightComponent, $[49] = fontSize2, $[50] = hotkeys, $[51] = hotkeysFontSize, $[52] = paddingProps, $[53] = space, $[54] = text, $[55] = t20) : t20 = $[55];
5677
+ let t21;
5678
+ $[56] !== children || $[57] !== paddingProps ? (t21 = children && /* @__PURE__ */ jsx(Box, { as: "span", ...paddingProps, children }), $[56] = children, $[57] = paddingProps, $[58] = t21) : t21 = $[58];
5679
+ let t22;
5680
+ return $[59] !== as || $[60] !== disabled || $[61] !== handleClick || $[62] !== onItemMouseEnter || $[63] !== onItemMouseLeave || $[64] !== restProps || $[65] !== scheme || $[66] !== t13 || $[67] !== t14 || $[68] !== t15 || $[69] !== t16 || $[70] !== t18 || $[71] !== t19 || $[72] !== t20 || $[73] !== t21 ? (t22 = /* @__PURE__ */ jsxs(Selectable, { "data-ui": "MenuItem", role: "menuitem", ...restProps, "data-pressed": t13, "data-selected": t14, "data-disabled": t15, forwardedAs: as, $radius: t16, $padding: t17, $tone: t18, $scheme: scheme, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, tabIndex: -1, type: t19, children: [
5681
+ t20,
5682
+ t21
5683
+ ] }), $[59] = as, $[60] = disabled, $[61] = handleClick, $[62] = onItemMouseEnter, $[63] = onItemMouseLeave, $[64] = restProps, $[65] = scheme, $[66] = t13, $[67] = t14, $[68] = t15, $[69] = t16, $[70] = t18, $[71] = t19, $[72] = t20, $[73] = t21, $[74] = t22) : t22 = $[74], t22;
4653
5684
  });
4654
5685
  MenuItem.displayName = "ForwardRef(MenuItem)";
5686
+ function _temp(s) {
5687
+ return s - 1;
5688
+ }
4655
5689
  const CustomButton = styled(Button).withConfig({
4656
5690
  displayName: "CustomButton",
4657
5691
  componentId: "sc-1kns779-0"
4658
5692
  })`max-width:100%;`, Tab = forwardRef(function(props, forwardedRef) {
4659
- const {
5693
+ const $ = c(30);
5694
+ let focused, icon, id, label, onClick, onFocus, restProps, selected, t0, t1;
5695
+ $[0] !== props ? ({
4660
5696
  icon,
4661
5697
  id,
4662
5698
  focused,
4663
- fontSize: fontSize2 = 1,
5699
+ fontSize: t0,
4664
5700
  label,
4665
5701
  onClick,
4666
5702
  onFocus,
4667
- padding = 2,
5703
+ padding: t1,
4668
5704
  selected,
4669
5705
  ...restProps
4670
- } = props, ref = useRef(null), focusedRef = useRef(!1);
4671
- useImperativeHandle(forwardedRef, () => ref.current);
4672
- const handleBlur = useCallback(() => {
5706
+ } = props, $[0] = props, $[1] = focused, $[2] = icon, $[3] = id, $[4] = label, $[5] = onClick, $[6] = onFocus, $[7] = restProps, $[8] = selected, $[9] = t0, $[10] = t1) : (focused = $[1], icon = $[2], id = $[3], label = $[4], onClick = $[5], onFocus = $[6], restProps = $[7], selected = $[8], t0 = $[9], t1 = $[10]);
5707
+ const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 2 : t1, ref = useRef(null), focusedRef = useRef(!1);
5708
+ let t2;
5709
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], useImperativeHandle(forwardedRef, t2);
5710
+ let t3;
5711
+ $[12] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
4673
5712
  focusedRef.current = !1;
4674
- }, []), handleFocus = useCallback((event) => {
5713
+ }, $[12] = t3) : t3 = $[12];
5714
+ const handleBlur = t3;
5715
+ let t4;
5716
+ $[13] !== onFocus ? (t4 = (event) => {
4675
5717
  focusedRef.current = !0, onFocus && onFocus(event);
4676
- }, [onFocus]);
4677
- return useEffect(() => {
5718
+ }, $[13] = onFocus, $[14] = t4) : t4 = $[14];
5719
+ const handleFocus = t4;
5720
+ let t5, t6;
5721
+ $[15] !== focused ? (t5 = () => {
4678
5722
  focused && !focusedRef.current && (ref.current && ref.current.focus(), focusedRef.current = !0);
4679
- }, [focused]), /* @__PURE__ */ jsx(CustomButton, { "data-ui": "Tab", ...restProps, "aria-selected": selected ? "true" : "false", fontSize: fontSize2, icon, id, mode: "bleed", onClick, onBlur: handleBlur, onFocus: handleFocus, padding, ref, role: "tab", selected, tabIndex: selected ? 0 : -1, text: label, type: "button" });
5723
+ }, t6 = [focused], $[15] = focused, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), useEffect(t5, t6);
5724
+ const t7 = selected ? "true" : "false", t8 = selected ? 0 : -1;
5725
+ let t9;
5726
+ return $[18] !== fontSize2 || $[19] !== handleFocus || $[20] !== icon || $[21] !== id || $[22] !== label || $[23] !== onClick || $[24] !== padding || $[25] !== restProps || $[26] !== selected || $[27] !== t7 || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsx(CustomButton, { "data-ui": "Tab", ...restProps, "aria-selected": t7, fontSize: fontSize2, icon, id, mode: "bleed", onClick, onBlur: handleBlur, onFocus: handleFocus, padding, ref, role: "tab", selected, tabIndex: t8, text: label, type: "button" }), $[18] = fontSize2, $[19] = handleFocus, $[20] = icon, $[21] = id, $[22] = label, $[23] = onClick, $[24] = padding, $[25] = restProps, $[26] = selected, $[27] = t7, $[28] = t8, $[29] = t9) : t9 = $[29], t9;
4680
5727
  });
4681
5728
  Tab.displayName = "ForwardRef(Tab)";
4682
5729
  const CustomInline = styled(Inline).withConfig({
4683
5730
  displayName: "CustomInline",
4684
5731
  componentId: "sc-5cm04m-0"
4685
5732
  })`& > div{display:inline-block;vertical-align:middle;max-width:100%;box-sizing:border-box;}`, TabList = forwardRef(function(props, ref) {
4686
- const {
5733
+ const $ = c(15);
5734
+ let childrenProp, restProps;
5735
+ $[0] !== props ? ({
4687
5736
  children: childrenProp,
4688
5737
  ...restProps
4689
- } = props, [focusedIndex, setFocusedIndex] = useState(-1), tabs = Children.toArray(childrenProp).filter(isValidElement).map((child, childIndex) => cloneElement(child, {
4690
- focused: focusedIndex === childIndex,
4691
- key: childIndex,
4692
- onFocus: () => setFocusedIndex(childIndex)
4693
- })), numTabs = tabs.length, handleKeyDown = useCallback((event) => {
4694
- event.key === "ArrowLeft" && setFocusedIndex((prevIndex) => (prevIndex + numTabs - 1) % numTabs), event.key === "ArrowRight" && setFocusedIndex((prevIndex) => (prevIndex + 1) % numTabs);
4695
- }, [numTabs]);
4696
- return /* @__PURE__ */ jsx(CustomInline, { "data-ui": "TabList", ...restProps, onKeyDown: handleKeyDown, ref, role: "tablist", children: tabs });
5738
+ } = props, $[0] = props, $[1] = childrenProp, $[2] = restProps) : (childrenProp = $[1], restProps = $[2]);
5739
+ const [focusedIndex, setFocusedIndex] = useState(-1);
5740
+ let t0;
5741
+ if ($[3] !== childrenProp || $[4] !== focusedIndex) {
5742
+ const children = Children.toArray(childrenProp).filter(isValidElement);
5743
+ let t12;
5744
+ $[6] !== focusedIndex ? (t12 = (child, childIndex) => cloneElement(child, {
5745
+ focused: focusedIndex === childIndex,
5746
+ key: childIndex,
5747
+ onFocus: () => setFocusedIndex(childIndex)
5748
+ }), $[6] = focusedIndex, $[7] = t12) : t12 = $[7], t0 = children.map(t12), $[3] = childrenProp, $[4] = focusedIndex, $[5] = t0;
5749
+ } else
5750
+ t0 = $[5];
5751
+ const tabs = t0, numTabs = tabs.length;
5752
+ let t1;
5753
+ $[8] !== numTabs ? (t1 = (event) => {
5754
+ event.key === "ArrowLeft" && setFocusedIndex((prevIndex) => (prevIndex + numTabs - 1) % numTabs), event.key === "ArrowRight" && setFocusedIndex((prevIndex_0) => (prevIndex_0 + 1) % numTabs);
5755
+ }, $[8] = numTabs, $[9] = t1) : t1 = $[9];
5756
+ const handleKeyDown = t1;
5757
+ let t2;
5758
+ return $[10] !== handleKeyDown || $[11] !== ref || $[12] !== restProps || $[13] !== tabs ? (t2 = /* @__PURE__ */ jsx(CustomInline, { "data-ui": "TabList", ...restProps, onKeyDown: handleKeyDown, ref, role: "tablist", children: tabs }), $[10] = handleKeyDown, $[11] = ref, $[12] = restProps, $[13] = tabs, $[14] = t2) : t2 = $[14], t2;
4697
5759
  });
4698
5760
  TabList.displayName = "ForwardRef(TabList)";
4699
5761
  export {