likec4 1.17.0 → 1.17.1

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,5 +1,5 @@
1
1
  import * as React from "react";
2
- import React__default, { useState, Fragment, createContext, useContext, useRef, useEffect, useMemo, useCallback, useLayoutEffect, useId as useId$2, forwardRef, cloneElement, Children, createElement } from "react";
2
+ import React__default, { useState, Fragment, createContext, useContext, useRef, useEffect, useMemo, useCallback, useLayoutEffect, useId as useId$2, forwardRef, cloneElement, Children, createElement, useSyncExternalStore } from "react";
3
3
  import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
4
4
  import * as ReactDOM from "react-dom";
5
5
  import ReactDOM__default, { createPortal } from "react-dom";
@@ -399,7 +399,7 @@ function RemoveScrollSideCar(props) {
399
399
  }
400
400
  }, [props.inert, props.lockRef.current, props.shards]);
401
401
  var shouldCancelEvent = React.useCallback(function(event, parent) {
402
- if ("touches" in event && event.touches.length === 2)
402
+ if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey)
403
403
  return !lastProps.current.allowPinchZoom;
404
404
  var touch = getTouchXY(event), touchStart = touchStartRef.current, deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0], deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1], currentAxis, target = event.target, moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
405
405
  if ("touches" in event && moveDirection === "h" && target.type === "range")
@@ -812,24 +812,6 @@ function useFocusReturn({ opened, shouldReturnFocus = !0 }) {
812
812
  };
813
813
  }, [opened, shouldReturnFocus]), returnFocus;
814
814
  }
815
- function createAriaHider(containerNode, selector = "body > :not(script)") {
816
- const id = randomId(), rootNodes = Array.from(
817
- document.querySelectorAll(selector)
818
- ).map((node) => {
819
- if (node?.shadowRoot?.contains(containerNode) || node.contains(containerNode))
820
- return;
821
- const ariaHidden = node.getAttribute("aria-hidden"), prevAriaHidden = node.getAttribute("data-hidden"), prevFocusId = node.getAttribute("data-focus-id");
822
- return node.setAttribute("data-focus-id", id), ariaHidden === null || ariaHidden === "false" ? node.setAttribute("aria-hidden", "true") : !prevAriaHidden && !prevFocusId && node.setAttribute("data-hidden", ariaHidden), {
823
- node,
824
- ariaHidden: prevAriaHidden || null
825
- };
826
- });
827
- return () => {
828
- rootNodes.forEach((item) => {
829
- !item || id !== item.node.getAttribute("data-focus-id") || (item.ariaHidden === null ? item.node.removeAttribute("aria-hidden") : item.node.setAttribute("aria-hidden", item.ariaHidden), item.node.removeAttribute("data-focus-id"), item.node.removeAttribute("data-hidden"));
830
- });
831
- };
832
- }
833
815
  const TABBABLE_NODES = /input|select|textarea|button|object/, FOCUS_SELECTOR = "a, input, select, textarea, button, object, [tabindex]";
834
816
  function hidden(element) {
835
817
  return element.style.display === "none";
@@ -878,7 +860,7 @@ function scopeTab(node, event) {
878
860
  target && target.focus();
879
861
  }
880
862
  function useFocusTrap(active = !0) {
881
- const ref = useRef(), restoreAria = useRef(null), focusNode = (node) => {
863
+ const ref = useRef(), focusNode = (node) => {
882
864
  let focusElement = node.querySelector("[data-autofocus]");
883
865
  if (!focusElement) {
884
866
  const children = Array.from(node.querySelectorAll(FOCUS_SELECTOR));
@@ -887,15 +869,9 @@ function useFocusTrap(active = !0) {
887
869
  focusElement && focusElement.focus({ preventScroll: !0 });
888
870
  }, setRef = useCallback(
889
871
  (node) => {
890
- if (active) {
891
- if (node === null) {
892
- restoreAria.current && (restoreAria.current(), restoreAria.current = null);
893
- return;
894
- }
895
- restoreAria.current = createAriaHider(node), ref.current !== node && (node ? (setTimeout(() => {
896
- node.getRootNode() && focusNode(node);
897
- }), ref.current = node) : ref.current = null);
898
- }
872
+ active && node !== null && ref.current !== node && (node ? (setTimeout(() => {
873
+ node.getRootNode() && focusNode(node);
874
+ }), ref.current = node) : ref.current = null);
899
875
  },
900
876
  [active]
901
877
  );
@@ -906,9 +882,7 @@ function useFocusTrap(active = !0) {
906
882
  const handleKeyDown = (event) => {
907
883
  event.key === "Tab" && ref.current && scopeTab(ref.current, event);
908
884
  };
909
- return document.addEventListener("keydown", handleKeyDown), () => {
910
- document.removeEventListener("keydown", handleKeyDown), restoreAria.current && restoreAria.current();
911
- };
885
+ return document.addEventListener("keydown", handleKeyDown), () => document.removeEventListener("keydown", handleKeyDown);
912
886
  }, [active]), setRef;
913
887
  }
914
888
  const __useId = React__default.useId || (() => {
@@ -1135,11 +1109,12 @@ function parseHotkey(hotkey) {
1135
1109
  ctrl: keys2.includes("ctrl"),
1136
1110
  meta: keys2.includes("meta"),
1137
1111
  mod: keys2.includes("mod"),
1138
- shift: keys2.includes("shift")
1112
+ shift: keys2.includes("shift"),
1113
+ plus: keys2.includes("[plus]")
1139
1114
  }, reservedKeys = ["alt", "ctrl", "meta", "shift", "mod"], freeKey = keys2.find((key) => !reservedKeys.includes(key));
1140
1115
  return {
1141
1116
  ...modifiers,
1142
- key: freeKey
1117
+ key: freeKey === "[plus]" ? "+" : freeKey
1143
1118
  };
1144
1119
  }
1145
1120
  function isExactHotkey(hotkey, event) {
@@ -1271,6 +1246,15 @@ function memoize(func) {
1271
1246
  return cache.set(key, result), result;
1272
1247
  };
1273
1248
  }
1249
+ function findClosestNumber(value, numbers) {
1250
+ return numbers.length === 0 ? value : numbers.reduce(
1251
+ (prev, curr) => Math.abs(curr - value) < Math.abs(prev - value) ? curr : prev
1252
+ );
1253
+ }
1254
+ function getRefProp(element) {
1255
+ const version = React__default.version;
1256
+ return typeof React__default.version != "string" || version.startsWith("18.") ? element?.ref : element?.props?.ref;
1257
+ }
1274
1258
  function r(e) {
1275
1259
  var t, f, n = "";
1276
1260
  if (typeof e == "string" || typeof e == "number") n += e;
@@ -2826,7 +2810,7 @@ const STYlE_PROPS_DATA = {
2826
2810
  bgr: { type: "identity", property: "backgroundRepeat" },
2827
2811
  bga: { type: "identity", property: "backgroundAttachment" },
2828
2812
  pos: { type: "identity", property: "position" },
2829
- top: { type: "identity", property: "top" },
2813
+ top: { type: "size", property: "top" },
2830
2814
  left: { type: "size", property: "left" },
2831
2815
  bottom: { type: "size", property: "bottom" },
2832
2816
  right: { type: "size", property: "right" },
@@ -3115,11 +3099,11 @@ const Corner = forwardRef((props, ref) => {
3115
3099
  }), ScrollAreaCorner = forwardRef((props, ref) => {
3116
3100
  const ctx = useScrollAreaContext(), hasBothScrollbarsVisible = !!(ctx.scrollbarX && ctx.scrollbarY);
3117
3101
  return ctx.type !== "scroll" && hasBothScrollbarsVisible ? /* @__PURE__ */ jsx(Corner, { ...props, ref }) : null;
3118
- }), defaultProps$1u = {
3102
+ }), defaultProps$1I = {
3119
3103
  scrollHideDelay: 1e3,
3120
3104
  type: "hover"
3121
3105
  }, ScrollAreaRoot = forwardRef((_props, ref) => {
3122
- const props = useProps("ScrollAreaRoot", defaultProps$1u, _props), { type, scrollHideDelay, scrollbars, ...others } = props, [scrollArea, setScrollArea] = useState(null), [viewport, setViewport] = useState(null), [content, setContent] = useState(null), [scrollbarX, setScrollbarX] = useState(null), [scrollbarY, setScrollbarY] = useState(null), [cornerWidth, setCornerWidth] = useState(0), [cornerHeight, setCornerHeight] = useState(0), [scrollbarXEnabled, setScrollbarXEnabled] = useState(!1), [scrollbarYEnabled, setScrollbarYEnabled] = useState(!1), rootRef = useMergedRef(ref, (node) => setScrollArea(node));
3106
+ const props = useProps("ScrollAreaRoot", defaultProps$1I, _props), { type, scrollHideDelay, scrollbars, ...others } = props, [scrollArea, setScrollArea] = useState(null), [viewport, setViewport] = useState(null), [content, setContent] = useState(null), [scrollbarX, setScrollbarX] = useState(null), [scrollbarY, setScrollbarY] = useState(null), [cornerWidth, setCornerWidth] = useState(0), [cornerHeight, setCornerHeight] = useState(0), [scrollbarXEnabled, setScrollbarXEnabled] = useState(!1), [scrollbarYEnabled, setScrollbarYEnabled] = useState(!1), rootRef = useMergedRef(ref, (node) => setScrollArea(node));
3123
3107
  return /* @__PURE__ */ jsx(
3124
3108
  ScrollAreaProvider,
3125
3109
  {
@@ -3544,17 +3528,17 @@ const ScrollAreaViewport = forwardRef(
3544
3528
  }
3545
3529
  );
3546
3530
  ScrollAreaViewport.displayName = "@mantine/core/ScrollAreaViewport";
3547
- var __default__$H = { root: "m_d57069b5", viewport: "m_c0783ff9", viewportInner: "m_f8f631dd", scrollbar: "m_c44ba933", thumb: "m_d8b5e363", corner: "m_21657268" };
3548
- const classes$H = __default__$H, defaultProps$1t = {
3531
+ var __default__$J = { root: "m_d57069b5", viewport: "m_c0783ff9", viewportInner: "m_f8f631dd", scrollbar: "m_c44ba933", thumb: "m_d8b5e363", corner: "m_21657268" };
3532
+ const classes$J = __default__$J, defaultProps$1H = {
3549
3533
  scrollHideDelay: 1e3,
3550
3534
  type: "hover",
3551
3535
  scrollbars: "xy"
3552
- }, varsResolver$I = (_, { scrollbarSize }) => ({
3536
+ }, varsResolver$J = (_, { scrollbarSize }) => ({
3553
3537
  root: {
3554
3538
  "--scrollarea-scrollbar-size": rem(scrollbarSize)
3555
3539
  }
3556
3540
  }), ScrollArea = factory((_props, ref) => {
3557
- const props = useProps("ScrollArea", defaultProps$1t, _props), {
3541
+ const props = useProps("ScrollArea", defaultProps$1H, _props), {
3558
3542
  classNames,
3559
3543
  className,
3560
3544
  style,
@@ -3576,14 +3560,14 @@ const classes$H = __default__$H, defaultProps$1t = {
3576
3560
  } = props, [scrollbarHovered, setScrollbarHovered] = useState(!1), getStyles2 = useStyles({
3577
3561
  name: "ScrollArea",
3578
3562
  props,
3579
- classes: classes$H,
3563
+ classes: classes$J,
3580
3564
  className,
3581
3565
  style,
3582
3566
  classNames,
3583
3567
  styles,
3584
3568
  unstyled,
3585
3569
  vars,
3586
- varsResolver: varsResolver$I
3570
+ varsResolver: varsResolver$J
3587
3571
  });
3588
3572
  return /* @__PURE__ */ jsxs(
3589
3573
  ScrollAreaRoot,
@@ -3669,7 +3653,7 @@ const ScrollAreaAutosize = factory((props, ref) => {
3669
3653
  onBottomReached,
3670
3654
  onTopReached,
3671
3655
  ...others
3672
- } = useProps("ScrollAreaAutosize", defaultProps$1t, props);
3656
+ } = useProps("ScrollAreaAutosize", defaultProps$1H, props);
3673
3657
  return /* @__PURE__ */ jsx(Box, { ...others, ref, style: [{ display: "flex", overflow: "auto" }, style], children: /* @__PURE__ */ jsx(Box, { style: { display: "flex", flexDirection: "column", flex: 1 }, children: /* @__PURE__ */ jsx(
3674
3658
  ScrollArea,
3675
3659
  {
@@ -3693,16 +3677,16 @@ const ScrollAreaAutosize = factory((props, ref) => {
3693
3677
  }
3694
3678
  ) }) });
3695
3679
  });
3696
- ScrollArea.classes = classes$H;
3680
+ ScrollArea.classes = classes$J;
3697
3681
  ScrollAreaAutosize.displayName = "@mantine/core/ScrollAreaAutosize";
3698
- ScrollAreaAutosize.classes = classes$H;
3682
+ ScrollAreaAutosize.classes = classes$J;
3699
3683
  ScrollArea.Autosize = ScrollAreaAutosize;
3700
- var __default__$G = { root: "m_87cf2631" };
3701
- const classes$G = __default__$G, defaultProps$1s = {
3684
+ var __default__$I = { root: "m_87cf2631" };
3685
+ const classes$I = __default__$I, defaultProps$1G = {
3702
3686
  __staticSelector: "UnstyledButton"
3703
3687
  }, UnstyledButton = polymorphicFactory(
3704
3688
  (_props, ref) => {
3705
- const props = useProps("UnstyledButton", defaultProps$1s, _props), {
3689
+ const props = useProps("UnstyledButton", defaultProps$1G, _props), {
3706
3690
  className,
3707
3691
  component = "button",
3708
3692
  __staticSelector,
@@ -3714,7 +3698,7 @@ const classes$G = __default__$G, defaultProps$1s = {
3714
3698
  } = props, getStyles2 = useStyles({
3715
3699
  name: __staticSelector,
3716
3700
  props,
3717
- classes: classes$G,
3701
+ classes: classes$I,
3718
3702
  className,
3719
3703
  style,
3720
3704
  classNames,
@@ -3733,13 +3717,13 @@ const classes$G = __default__$G, defaultProps$1s = {
3733
3717
  );
3734
3718
  }
3735
3719
  );
3736
- UnstyledButton.classes = classes$G;
3720
+ UnstyledButton.classes = classes$I;
3737
3721
  UnstyledButton.displayName = "@mantine/core/UnstyledButton";
3738
- var __default__$F = { root: "m_515a97f8" };
3739
- const classes$F = __default__$F, defaultProps$1r = {}, VisuallyHidden = factory((_props, ref) => {
3740
- const props = useProps("VisuallyHidden", defaultProps$1r, _props), { classNames, className, style, styles, unstyled, vars, ...others } = props, getStyles2 = useStyles({
3722
+ var __default__$H = { root: "m_515a97f8" };
3723
+ const classes$H = __default__$H, defaultProps$1F = {}, VisuallyHidden = factory((_props, ref) => {
3724
+ const props = useProps("VisuallyHidden", defaultProps$1F, _props), { classNames, className, style, styles, unstyled, vars, ...others } = props, getStyles2 = useStyles({
3741
3725
  name: "VisuallyHidden",
3742
- classes: classes$F,
3726
+ classes: classes$H,
3743
3727
  props,
3744
3728
  className,
3745
3729
  style,
@@ -3749,16 +3733,16 @@ const classes$F = __default__$F, defaultProps$1r = {}, VisuallyHidden = factory(
3749
3733
  });
3750
3734
  return /* @__PURE__ */ jsx(Box, { component: "span", ref, ...getStyles2("root"), ...others });
3751
3735
  });
3752
- VisuallyHidden.classes = classes$F;
3736
+ VisuallyHidden.classes = classes$H;
3753
3737
  VisuallyHidden.displayName = "@mantine/core/VisuallyHidden";
3754
- var __default__$E = { root: "m_1b7284a3" };
3755
- const classes$E = __default__$E, defaultProps$1q = {}, varsResolver$H = (_, { radius, shadow }) => ({
3738
+ var __default__$G = { root: "m_1b7284a3" };
3739
+ const classes$G = __default__$G, defaultProps$1E = {}, varsResolver$I = (_, { radius, shadow }) => ({
3756
3740
  root: {
3757
3741
  "--paper-radius": radius === void 0 ? void 0 : getRadius(radius),
3758
3742
  "--paper-shadow": getShadow(shadow)
3759
3743
  }
3760
3744
  }), Paper = polymorphicFactory((_props, ref) => {
3761
- const props = useProps("Paper", defaultProps$1q, _props), {
3745
+ const props = useProps("Paper", defaultProps$1E, _props), {
3762
3746
  classNames,
3763
3747
  className,
3764
3748
  style,
@@ -3774,14 +3758,14 @@ const classes$E = __default__$E, defaultProps$1q = {}, varsResolver$H = (_, { ra
3774
3758
  } = props, getStyles2 = useStyles({
3775
3759
  name: "Paper",
3776
3760
  props,
3777
- classes: classes$E,
3761
+ classes: classes$G,
3778
3762
  className,
3779
3763
  style,
3780
3764
  classNames,
3781
3765
  styles,
3782
3766
  unstyled,
3783
3767
  vars,
3784
- varsResolver: varsResolver$H
3768
+ varsResolver: varsResolver$I
3785
3769
  });
3786
3770
  return /* @__PURE__ */ jsx(
3787
3771
  Box,
@@ -3794,8 +3778,11 @@ const classes$E = __default__$E, defaultProps$1q = {}, varsResolver$H = (_, { ra
3794
3778
  }
3795
3779
  );
3796
3780
  });
3797
- Paper.classes = classes$E;
3781
+ Paper.classes = classes$G;
3798
3782
  Paper.displayName = "@mantine/core/Paper";
3783
+ function hasWindow() {
3784
+ return typeof window < "u";
3785
+ }
3799
3786
  function getNodeName(node) {
3800
3787
  return isNode(node) ? (node.nodeName || "").toLowerCase() : "#document";
3801
3788
  }
@@ -3808,16 +3795,16 @@ function getDocumentElement(node) {
3808
3795
  return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
3809
3796
  }
3810
3797
  function isNode(value) {
3811
- return value instanceof Node || value instanceof getWindow(value).Node;
3798
+ return hasWindow() ? value instanceof Node || value instanceof getWindow(value).Node : !1;
3812
3799
  }
3813
3800
  function isElement(value) {
3814
- return value instanceof Element || value instanceof getWindow(value).Element;
3801
+ return hasWindow() ? value instanceof Element || value instanceof getWindow(value).Element : !1;
3815
3802
  }
3816
3803
  function isHTMLElement(value) {
3817
- return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
3804
+ return hasWindow() ? value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement : !1;
3818
3805
  }
3819
3806
  function isShadowRoot(value) {
3820
- return typeof ShadowRoot > "u" ? !1 : value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
3807
+ return !hasWindow() || typeof ShadowRoot > "u" ? !1 : value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
3821
3808
  }
3822
3809
  function isOverflowElement(element) {
3823
3810
  const {
@@ -3840,17 +3827,17 @@ function isTopLayer(element) {
3840
3827
  }
3841
3828
  });
3842
3829
  }
3843
- function isContainingBlock(element) {
3844
- const webkit = isWebKit(), css = getComputedStyle$1(element);
3830
+ function isContainingBlock(elementOrCss) {
3831
+ const webkit = isWebKit(), css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
3845
3832
  return css.transform !== "none" || css.perspective !== "none" || (css.containerType ? css.containerType !== "normal" : !1) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : !1) || !webkit && (css.filter ? css.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((value) => (css.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css.contain || "").includes(value));
3846
3833
  }
3847
3834
  function getContainingBlock(element) {
3848
3835
  let currentNode = getParentNode(element);
3849
3836
  for (; isHTMLElement(currentNode) && !isLastTraversableNode(currentNode); ) {
3850
- if (isTopLayer(currentNode))
3851
- return null;
3852
3837
  if (isContainingBlock(currentNode))
3853
3838
  return currentNode;
3839
+ if (isTopLayer(currentNode))
3840
+ return null;
3854
3841
  currentNode = getParentNode(currentNode);
3855
3842
  }
3856
3843
  return null;
@@ -3893,7 +3880,14 @@ function getOverflowAncestors(node, list, traverseIframes) {
3893
3880
  var _node$ownerDocument2;
3894
3881
  list === void 0 && (list = []), traverseIframes === void 0 && (traverseIframes = !0);
3895
3882
  const scrollableAncestor = getNearestOverflowAncestor(node), isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body), win = getWindow(scrollableAncestor);
3896
- return isBody ? list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []) : list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
3883
+ if (isBody) {
3884
+ const frameElement = getFrameElement(win);
3885
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
3886
+ }
3887
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
3888
+ }
3889
+ function getFrameElement(win) {
3890
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
3897
3891
  }
3898
3892
  function activeElement(doc) {
3899
3893
  let activeElement2 = doc.activeElement;
@@ -5046,7 +5040,7 @@ function useFloating$1(options) {
5046
5040
  node !== referenceRef.current && (referenceRef.current = node, _setReference(node));
5047
5041
  }, []), setFloating = React.useCallback((node) => {
5048
5042
  node !== floatingRef.current && (floatingRef.current = node, _setFloating(node));
5049
- }, []), referenceEl = externalReference || _reference, floatingEl = externalFloating || _floating, referenceRef = React.useRef(null), floatingRef = React.useRef(null), dataRef = React.useRef(data), hasWhileElementsMounted = whileElementsMounted != null, whileElementsMountedRef = useLatestRef$1(whileElementsMounted), platformRef = useLatestRef$1(platform2), update = React.useCallback(() => {
5043
+ }, []), referenceEl = externalReference || _reference, floatingEl = externalFloating || _floating, referenceRef = React.useRef(null), floatingRef = React.useRef(null), dataRef = React.useRef(data), hasWhileElementsMounted = whileElementsMounted != null, whileElementsMountedRef = useLatestRef$1(whileElementsMounted), platformRef = useLatestRef$1(platform2), openRef = useLatestRef$1(open), update = React.useCallback(() => {
5050
5044
  if (!referenceRef.current || !floatingRef.current)
5051
5045
  return;
5052
5046
  const config = {
@@ -5057,13 +5051,17 @@ function useFloating$1(options) {
5057
5051
  platformRef.current && (config.platform = platformRef.current), computePosition(referenceRef.current, floatingRef.current, config).then((data2) => {
5058
5052
  const fullData = {
5059
5053
  ...data2,
5060
- isPositioned: !0
5054
+ // The floating element's position may be recomputed while it's closed
5055
+ // but still mounted (such as when transitioning out). To ensure
5056
+ // `isPositioned` will be `false` initially on the next open, avoid
5057
+ // setting it to `true` when `open === false` (must be specified).
5058
+ isPositioned: openRef.current !== !1
5061
5059
  };
5062
5060
  isMountedRef.current && !deepEqual(dataRef.current, fullData) && (dataRef.current = fullData, ReactDOM.flushSync(() => {
5063
5061
  setData(fullData);
5064
5062
  }));
5065
5063
  });
5066
- }, [latestMiddleware, placement, strategy, platformRef]);
5064
+ }, [latestMiddleware, placement, strategy, platformRef, openRef]);
5067
5065
  index$1(() => {
5068
5066
  open === !1 && dataRef.current.isPositioned && (dataRef.current.isPositioned = !1, setData((data2) => ({
5069
5067
  ...data2,
@@ -5238,7 +5236,7 @@ function useHover(context, props) {
5238
5236
  restMs = 0,
5239
5237
  move = !0
5240
5238
  } = props, tree = useFloatingTree(), parentId = useFloatingParentNodeId(), handleCloseRef = useLatestRef(handleClose), delayRef = useLatestRef(delay), openRef = useLatestRef(open), pointerTypeRef = React.useRef(), timeoutRef = React.useRef(-1), handlerRef = React.useRef(), restTimeoutRef = React.useRef(-1), blockMouseMoveRef = React.useRef(!0), performedPointerEventsMutationRef = React.useRef(!1), unbindMouseMoveRef = React.useRef(() => {
5241
- }), isHoverOpen = React.useCallback(() => {
5239
+ }), restTimeoutPendingRef = React.useRef(!1), isHoverOpen = React.useCallback(() => {
5242
5240
  var _dataRef$current$open;
5243
5241
  const type = (_dataRef$current$open = dataRef.current.openEvent) == null ? void 0 : _dataRef$current$open.type;
5244
5242
  return type?.includes("mouse") && type !== "mousedown";
@@ -5249,7 +5247,7 @@ function useHover(context, props) {
5249
5247
  let {
5250
5248
  open: open2
5251
5249
  } = _ref;
5252
- open2 || (clearTimeout(timeoutRef.current), clearTimeout(restTimeoutRef.current), blockMouseMoveRef.current = !0);
5250
+ open2 || (clearTimeout(timeoutRef.current), clearTimeout(restTimeoutRef.current), blockMouseMoveRef.current = !0, restTimeoutPendingRef.current = !1);
5253
5251
  }
5254
5252
  return events.on("openchange", onOpenChange2), () => {
5255
5253
  events.off("openchange", onOpenChange2);
@@ -5275,32 +5273,29 @@ function useHover(context, props) {
5275
5273
  const body = getDocument(elements.floating).body;
5276
5274
  body.style.pointerEvents = "", body.removeAttribute(safePolygonIdentifier), performedPointerEventsMutationRef.current = !1;
5277
5275
  }
5278
- });
5276
+ }), isClickLikeOpenEvent = useEffectEvent(() => dataRef.current.openEvent ? ["click", "mousedown"].includes(dataRef.current.openEvent.type) : !1);
5279
5277
  React.useEffect(() => {
5280
5278
  if (!enabled) return;
5281
- function isClickLikeOpenEvent() {
5282
- return dataRef.current.openEvent ? ["click", "mousedown"].includes(dataRef.current.openEvent.type) : !1;
5283
- }
5284
5279
  function onMouseEnter(event) {
5285
5280
  if (clearTimeout(timeoutRef.current), blockMouseMoveRef.current = !1, mouseOnly && !isMouseLikePointerType(pointerTypeRef.current) || restMs > 0 && !getDelay(delayRef.current, "open"))
5286
5281
  return;
5287
5282
  const openDelay = getDelay(delayRef.current, "open", pointerTypeRef.current);
5288
5283
  openDelay ? timeoutRef.current = window.setTimeout(() => {
5289
5284
  openRef.current || onOpenChange(!0, event, "hover");
5290
- }, openDelay) : onOpenChange(!0, event, "hover");
5285
+ }, openDelay) : open || onOpenChange(!0, event, "hover");
5291
5286
  }
5292
5287
  function onMouseLeave(event) {
5293
5288
  if (isClickLikeOpenEvent()) return;
5294
5289
  unbindMouseMoveRef.current();
5295
5290
  const doc = getDocument(elements.floating);
5296
- if (clearTimeout(restTimeoutRef.current), handleCloseRef.current && dataRef.current.floatingContext) {
5291
+ if (clearTimeout(restTimeoutRef.current), restTimeoutPendingRef.current = !1, handleCloseRef.current && dataRef.current.floatingContext) {
5297
5292
  open || clearTimeout(timeoutRef.current), handlerRef.current = handleCloseRef.current({
5298
5293
  ...dataRef.current.floatingContext,
5299
5294
  tree,
5300
5295
  x: event.clientX,
5301
5296
  y: event.clientY,
5302
5297
  onClose() {
5303
- clearPointerEvents(), cleanupMouseMoveHandler(), closeWithDelay(event, !0, "safe-polygon");
5298
+ clearPointerEvents(), cleanupMouseMoveHandler(), isClickLikeOpenEvent() || closeWithDelay(event, !0, "safe-polygon");
5304
5299
  }
5305
5300
  });
5306
5301
  const handler = handlerRef.current;
@@ -5318,7 +5313,7 @@ function useHover(context, props) {
5318
5313
  x: event.clientX,
5319
5314
  y: event.clientY,
5320
5315
  onClose() {
5321
- clearPointerEvents(), cleanupMouseMoveHandler(), closeWithDelay(event);
5316
+ clearPointerEvents(), cleanupMouseMoveHandler(), isClickLikeOpenEvent() || closeWithDelay(event);
5322
5317
  }
5323
5318
  })(event));
5324
5319
  }
@@ -5332,22 +5327,23 @@ function useHover(context, props) {
5332
5327
  open && ref.removeEventListener("mouseleave", onScrollMouseLeave), (_elements$floating2 = elements.floating) == null || _elements$floating2.removeEventListener("mouseleave", onScrollMouseLeave), move && ref.removeEventListener("mousemove", onMouseEnter), ref.removeEventListener("mouseenter", onMouseEnter), ref.removeEventListener("mouseleave", onMouseLeave);
5333
5328
  };
5334
5329
  }
5335
- }, [elements, enabled, context, mouseOnly, restMs, move, closeWithDelay, cleanupMouseMoveHandler, clearPointerEvents, onOpenChange, open, openRef, tree, delayRef, handleCloseRef, dataRef]), index(() => {
5330
+ }, [elements, enabled, context, mouseOnly, restMs, move, closeWithDelay, cleanupMouseMoveHandler, clearPointerEvents, onOpenChange, open, openRef, tree, delayRef, handleCloseRef, dataRef, isClickLikeOpenEvent]), index(() => {
5336
5331
  var _handleCloseRef$curre;
5337
5332
  if (enabled && open && (_handleCloseRef$curre = handleCloseRef.current) != null && _handleCloseRef$curre.__options.blockPointerEvents && isHoverOpen()) {
5338
- const body = getDocument(elements.floating).body;
5339
- body.setAttribute(safePolygonIdentifier, ""), body.style.pointerEvents = "none", performedPointerEventsMutationRef.current = !0;
5333
+ performedPointerEventsMutationRef.current = !0;
5340
5334
  const floatingEl = elements.floating;
5341
5335
  if (isElement(elements.domReference) && floatingEl) {
5342
5336
  var _tree$nodesRef$curren;
5337
+ const body = getDocument(elements.floating).body;
5338
+ body.setAttribute(safePolygonIdentifier, "");
5343
5339
  const ref = elements.domReference, parentFloating = tree == null || (_tree$nodesRef$curren = tree.nodesRef.current.find((node) => node.id === parentId)) == null || (_tree$nodesRef$curren = _tree$nodesRef$curren.context) == null ? void 0 : _tree$nodesRef$curren.elements.floating;
5344
- return parentFloating && (parentFloating.style.pointerEvents = ""), ref.style.pointerEvents = "auto", floatingEl.style.pointerEvents = "auto", () => {
5345
- ref.style.pointerEvents = "", floatingEl.style.pointerEvents = "";
5340
+ return parentFloating && (parentFloating.style.pointerEvents = ""), body.style.pointerEvents = "none", ref.style.pointerEvents = "auto", floatingEl.style.pointerEvents = "auto", () => {
5341
+ body.style.pointerEvents = "", ref.style.pointerEvents = "", floatingEl.style.pointerEvents = "";
5346
5342
  };
5347
5343
  }
5348
5344
  }
5349
5345
  }, [enabled, open, parentId, elements, tree, handleCloseRef, isHoverOpen]), index(() => {
5350
- open || (pointerTypeRef.current = void 0, cleanupMouseMoveHandler(), clearPointerEvents());
5346
+ open || (pointerTypeRef.current = void 0, restTimeoutPendingRef.current = !1, cleanupMouseMoveHandler(), clearPointerEvents());
5351
5347
  }, [open, cleanupMouseMoveHandler, clearPointerEvents]), React.useEffect(() => () => {
5352
5348
  cleanupMouseMoveHandler(), clearTimeout(timeoutRef.current), clearTimeout(restTimeoutRef.current), clearPointerEvents();
5353
5349
  }, [enabled, elements.domReference, cleanupMouseMoveHandler, clearPointerEvents]);
@@ -5365,7 +5361,7 @@ function useHover(context, props) {
5365
5361
  function handleMouseMove() {
5366
5362
  !blockMouseMoveRef.current && !openRef.current && onOpenChange(!0, nativeEvent, "hover");
5367
5363
  }
5368
- mouseOnly && !isMouseLikePointerType(pointerTypeRef.current) || open || restMs === 0 || (clearTimeout(restTimeoutRef.current), pointerTypeRef.current === "touch" ? handleMouseMove() : restTimeoutRef.current = window.setTimeout(handleMouseMove, restMs));
5364
+ mouseOnly && !isMouseLikePointerType(pointerTypeRef.current) || open || restMs === 0 || restTimeoutPendingRef.current && event.movementX ** 2 + event.movementY ** 2 < 2 || (clearTimeout(restTimeoutRef.current), pointerTypeRef.current === "touch" ? handleMouseMove() : (restTimeoutPendingRef.current = !0, restTimeoutRef.current = window.setTimeout(handleMouseMove, restMs)));
5369
5365
  }
5370
5366
  };
5371
5367
  }, [mouseOnly, onOpenChange, open, openRef, restMs]), floating = React.useMemo(() => ({
@@ -5373,9 +5369,9 @@ function useHover(context, props) {
5373
5369
  clearTimeout(timeoutRef.current);
5374
5370
  },
5375
5371
  onMouseLeave(event) {
5376
- closeWithDelay(event.nativeEvent, !1);
5372
+ isClickLikeOpenEvent() || closeWithDelay(event.nativeEvent, !1);
5377
5373
  }
5378
- }), [closeWithDelay]);
5374
+ }), [closeWithDelay, isClickLikeOpenEvent]);
5379
5375
  return React.useMemo(() => enabled ? {
5380
5376
  reference,
5381
5377
  floating
@@ -5431,7 +5427,8 @@ function useDelayGroup(context, options) {
5431
5427
  onOpenChange,
5432
5428
  floatingId
5433
5429
  } = context, {
5434
- id: optionId
5430
+ id: optionId,
5431
+ enabled = !0
5435
5432
  } = options, id = optionId ?? floatingId, groupContext = useDelayGroupContext(), {
5436
5433
  currentId,
5437
5434
  setCurrentId,
@@ -5440,20 +5437,20 @@ function useDelayGroup(context, options) {
5440
5437
  timeoutMs
5441
5438
  } = groupContext;
5442
5439
  return index(() => {
5443
- currentId && (setState({
5440
+ enabled && currentId && (setState({
5444
5441
  delay: {
5445
5442
  open: 1,
5446
5443
  close: getDelay(initialDelay, "close")
5447
5444
  }
5448
5445
  }), currentId !== id && onOpenChange(!1));
5449
- }, [id, onOpenChange, setState, currentId, initialDelay]), index(() => {
5446
+ }, [enabled, id, onOpenChange, setState, currentId, initialDelay]), index(() => {
5450
5447
  function unset() {
5451
5448
  onOpenChange(!1), setState({
5452
5449
  delay: initialDelay,
5453
5450
  currentId: null
5454
5451
  });
5455
5452
  }
5456
- if (currentId && !open && currentId === id) {
5453
+ if (enabled && currentId && !open && currentId === id) {
5457
5454
  if (timeoutMs) {
5458
5455
  const timeout = window.setTimeout(unset, timeoutMs);
5459
5456
  return () => {
@@ -5462,9 +5459,9 @@ function useDelayGroup(context, options) {
5462
5459
  }
5463
5460
  unset();
5464
5461
  }
5465
- }, [open, setState, currentId, id, onOpenChange, initialDelay, timeoutMs]), index(() => {
5466
- setCurrentId === NOOP || !open || setCurrentId(id);
5467
- }, [open, setCurrentId, id]), groupContext;
5462
+ }, [enabled, open, setState, currentId, id, onOpenChange, initialDelay, timeoutMs]), index(() => {
5463
+ enabled && (setCurrentId === NOOP || !open || setCurrentId(id));
5464
+ }, [enabled, open, setCurrentId, id]), groupContext;
5468
5465
  }
5469
5466
  function getChildren(nodes, id) {
5470
5467
  let allChildren = nodes.filter((node) => {
@@ -5481,7 +5478,7 @@ function getChildren(nodes, id) {
5481
5478
  }), allChildren = allChildren.concat(currentChildren);
5482
5479
  return allChildren;
5483
5480
  }
5484
- const bubbleHandlerKeys = {
5481
+ const FOCUSABLE_ATTRIBUTE = "data-floating-ui-focusable", bubbleHandlerKeys = {
5485
5482
  pointerdown: "onPointerDown",
5486
5483
  mousedown: "onMouseDown",
5487
5484
  click: "onClick"
@@ -5519,9 +5516,9 @@ function useDismiss(context, props) {
5519
5516
  } = normalizeProp(bubbles), {
5520
5517
  escapeKey: escapeKeyCapture,
5521
5518
  outsidePress: outsidePressCapture
5522
- } = normalizeProp(capture), closeOnEscapeKeyDown = useEffectEvent((event) => {
5519
+ } = normalizeProp(capture), isComposingRef = React.useRef(!1), closeOnEscapeKeyDown = useEffectEvent((event) => {
5523
5520
  var _dataRef$current$floa;
5524
- if (!open || !enabled || !escapeKey || event.key !== "Escape")
5521
+ if (!open || !enabled || !escapeKey || event.key !== "Escape" || isComposingRef.current)
5525
5522
  return;
5526
5523
  const nodeId = (_dataRef$current$floa = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa.nodeId, children = tree ? getChildren(tree.nodesRef.current, nodeId) : [];
5527
5524
  if (!escapeKeyBubbles && (event.stopPropagation(), children.length > 0)) {
@@ -5600,11 +5597,25 @@ function useDismiss(context, props) {
5600
5597
  if (!open || !enabled)
5601
5598
  return;
5602
5599
  dataRef.current.__escapeKeyBubbles = escapeKeyBubbles, dataRef.current.__outsidePressBubbles = outsidePressBubbles;
5600
+ let compositionTimeout = -1;
5603
5601
  function onScroll(event) {
5604
5602
  onOpenChange(!1, event, "ancestor-scroll");
5605
5603
  }
5604
+ function handleCompositionStart() {
5605
+ window.clearTimeout(compositionTimeout), isComposingRef.current = !0;
5606
+ }
5607
+ function handleCompositionEnd() {
5608
+ compositionTimeout = window.setTimeout(
5609
+ () => {
5610
+ isComposingRef.current = !1;
5611
+ },
5612
+ // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
5613
+ // Only apply to WebKit for the test to remain 0ms.
5614
+ isWebKit() ? 5 : 0
5615
+ );
5616
+ }
5606
5617
  const doc = getDocument(elements.floating);
5607
- escapeKey && doc.addEventListener("keydown", escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture), outsidePress && doc.addEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);
5618
+ escapeKey && (doc.addEventListener("keydown", escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture), doc.addEventListener("compositionstart", handleCompositionStart), doc.addEventListener("compositionend", handleCompositionEnd)), outsidePress && doc.addEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);
5608
5619
  let ancestors = [];
5609
5620
  return ancestorScroll && (isElement(elements.domReference) && (ancestors = getOverflowAncestors(elements.domReference)), isElement(elements.floating) && (ancestors = ancestors.concat(getOverflowAncestors(elements.floating))), !isElement(elements.reference) && elements.reference && elements.reference.contextElement && (ancestors = ancestors.concat(getOverflowAncestors(elements.reference.contextElement)))), ancestors = ancestors.filter((ancestor) => {
5610
5621
  var _doc$defaultView;
@@ -5614,9 +5625,9 @@ function useDismiss(context, props) {
5614
5625
  passive: !0
5615
5626
  });
5616
5627
  }), () => {
5617
- escapeKey && doc.removeEventListener("keydown", escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture), outsidePress && doc.removeEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture), ancestors.forEach((ancestor) => {
5628
+ escapeKey && (doc.removeEventListener("keydown", escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture), doc.removeEventListener("compositionstart", handleCompositionStart), doc.removeEventListener("compositionend", handleCompositionEnd)), outsidePress && doc.removeEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture), ancestors.forEach((ancestor) => {
5618
5629
  ancestor.removeEventListener("scroll", onScroll);
5619
- });
5630
+ }), window.clearTimeout(compositionTimeout);
5620
5631
  };
5621
5632
  }, [dataRef, elements, escapeKey, outsidePress, outsidePressEvent, open, onOpenChange, ancestorScroll, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, escapeKeyCapture, closeOnEscapeKeyDownCapture, closeOnPressOutside, outsidePressCapture, closeOnPressOutsideCapture]), React.useEffect(() => {
5622
5633
  insideReactTreeRef.current = !1;
@@ -5683,7 +5694,7 @@ function useFloating(options) {
5683
5694
  floating: null,
5684
5695
  ...options.elements
5685
5696
  }
5686
- }), rootContext = options.rootContext || internalRootContext, computedElements = rootContext.elements, [_domReference, setDomReference] = React.useState(null), [positionReference, _setPositionReference] = React.useState(null), domReference = computedElements?.reference || _domReference, domReferenceRef = React.useRef(null), tree = useFloatingTree();
5697
+ }), rootContext = options.rootContext || internalRootContext, computedElements = rootContext.elements, [_domReference, setDomReference] = React.useState(null), [positionReference, _setPositionReference] = React.useState(null), domReference = computedElements?.domReference || _domReference, domReferenceRef = React.useRef(null), tree = useFloatingTree();
5687
5698
  index(() => {
5688
5699
  domReference && (domReferenceRef.current = domReference);
5689
5700
  }, [domReference]);
@@ -5818,7 +5829,8 @@ function mergeProps(userProps, propsList, elementKey) {
5818
5829
  }
5819
5830
  return {
5820
5831
  ...elementKey === "floating" && {
5821
- tabIndex: -1
5832
+ tabIndex: -1,
5833
+ [FOCUSABLE_ATTRIBUTE]: ""
5822
5834
  },
5823
5835
  ...domUserProps,
5824
5836
  ...propsList.map((value) => {
@@ -6060,8 +6072,8 @@ function createPortalNode(props) {
6060
6072
  const node = document.createElement("div");
6061
6073
  return node.setAttribute("data-portal", "true"), typeof props.className == "string" && node.classList.add(...props.className.split(" ").filter(Boolean)), typeof props.style == "object" && Object.assign(node.style, props.style), typeof props.id == "string" && node.setAttribute("id", props.id), node;
6062
6074
  }
6063
- const defaultProps$1p = {}, Portal = forwardRef((props, ref) => {
6064
- const { children, target, ...others } = useProps("Portal", defaultProps$1p, props), [mounted, setMounted] = useState(!1), nodeRef = useRef(null);
6075
+ const defaultProps$1D = {}, Portal = forwardRef((props, ref) => {
6076
+ const { children, target, ...others } = useProps("Portal", defaultProps$1D, props), [mounted, setMounted] = useState(!1), nodeRef = useRef(null);
6065
6077
  return useIsomorphicEffect(() => (setMounted(!0), nodeRef.current = target ? typeof target == "string" ? document.querySelector(target) : target : createPortalNode(others), assignRef(ref, nodeRef.current), !target && nodeRef.current && document.body.appendChild(nodeRef.current), () => {
6066
6078
  !target && nodeRef.current && document.body.removeChild(nodeRef.current);
6067
6079
  }), [target]), !mounted || !nodeRef.current ? null : createPortal(/* @__PURE__ */ jsx(Fragment$1, { children }), nodeRef.current);
@@ -6304,9 +6316,9 @@ function Transition({
6304
6316
  ) });
6305
6317
  }
6306
6318
  Transition.displayName = "@mantine/core/Transition";
6307
- var __default__$D = { dropdown: "m_38a85659", arrow: "m_a31dc6c1" };
6308
- const classes$D = __default__$D, defaultProps$1o = {}, PopoverDropdown = factory((_props, ref) => {
6309
- const props = useProps("PopoverDropdown", defaultProps$1o, _props), {
6319
+ var __default__$F = { dropdown: "m_38a85659", arrow: "m_a31dc6c1" };
6320
+ const classes$F = __default__$F, defaultProps$1C = {}, PopoverDropdown = factory((_props, ref) => {
6321
+ const props = useProps("PopoverDropdown", defaultProps$1C, _props), {
6310
6322
  className,
6311
6323
  style,
6312
6324
  vars,
@@ -6360,6 +6372,8 @@ const classes$D = __default__$D, defaultProps$1o = {}, PopoverDropdown = factory
6360
6372
  left: ctx.x ?? 0,
6361
6373
  width: ctx.width === "target" ? void 0 : rem(ctx.width)
6362
6374
  },
6375
+ ctx.resolvedStyles.dropdown,
6376
+ styles?.dropdown,
6363
6377
  style
6364
6378
  ]
6365
6379
  }),
@@ -6390,22 +6404,22 @@ const classes$D = __default__$D, defaultProps$1o = {}, PopoverDropdown = factory
6390
6404
  }
6391
6405
  ) });
6392
6406
  });
6393
- PopoverDropdown.classes = classes$D;
6407
+ PopoverDropdown.classes = classes$F;
6394
6408
  PopoverDropdown.displayName = "@mantine/core/PopoverDropdown";
6395
- const defaultProps$1n = {
6409
+ const defaultProps$1B = {
6396
6410
  refProp: "ref",
6397
6411
  popupType: "dialog"
6398
6412
  }, PopoverTarget = factory((props, ref) => {
6399
6413
  const { children, refProp, popupType, ...others } = useProps(
6400
6414
  "PopoverTarget",
6401
- defaultProps$1n,
6415
+ defaultProps$1B,
6402
6416
  props
6403
6417
  );
6404
6418
  if (!isElement$1(children))
6405
6419
  throw new Error(
6406
6420
  "Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
6407
6421
  );
6408
- const forwardedProps = others, ctx = usePopoverContext(), targetRef = useMergedRef(ctx.reference, children.ref, ref), accessibleProps = ctx.withRoles ? {
6422
+ const forwardedProps = others, ctx = usePopoverContext(), targetRef = useMergedRef(ctx.reference, getRefProp(children), ref), accessibleProps = ctx.withRoles ? {
6409
6423
  "aria-haspopup": popupType,
6410
6424
  "aria-expanded": ctx.opened,
6411
6425
  "aria-controls": ctx.getDropdownId(),
@@ -6484,7 +6498,7 @@ function usePopover(options) {
6484
6498
  defaultValue: options.defaultOpened,
6485
6499
  finalValue: !1,
6486
6500
  onChange: options.onChange
6487
- }), onClose = () => {
6501
+ }), previouslyOpened = useRef(_opened), onClose = () => {
6488
6502
  _opened && setOpened(!1);
6489
6503
  }, onToggle = () => setOpened(!_opened), floating = useFloating({
6490
6504
  strategy: options.strategy,
@@ -6499,7 +6513,7 @@ function usePopover(options) {
6499
6513
  }), useDidUpdate(() => {
6500
6514
  options.onPositionChange?.(floating.placement);
6501
6515
  }, [floating.placement]), useDidUpdate(() => {
6502
- _opened ? options.onOpen?.() : options.onClose?.();
6516
+ _opened !== previouslyOpened.current && (_opened ? options.onOpen?.() : options.onClose?.()), previouslyOpened.current = _opened;
6503
6517
  }, [_opened, options.onClose, options.onOpen]), {
6504
6518
  floating,
6505
6519
  controlled: typeof options.opened == "boolean",
@@ -6508,7 +6522,7 @@ function usePopover(options) {
6508
6522
  onToggle
6509
6523
  };
6510
6524
  }
6511
- const defaultProps$1m = {
6525
+ const defaultProps$1A = {
6512
6526
  position: "bottom",
6513
6527
  offset: 8,
6514
6528
  positionDependencies: [],
@@ -6528,14 +6542,14 @@ const defaultProps$1m = {
6528
6542
  zIndex: getDefaultZIndex("popover"),
6529
6543
  __staticSelector: "Popover",
6530
6544
  width: "max-content"
6531
- }, varsResolver$G = (_, { radius, shadow }) => ({
6545
+ }, varsResolver$H = (_, { radius, shadow }) => ({
6532
6546
  dropdown: {
6533
6547
  "--popover-radius": radius === void 0 ? void 0 : getRadius(radius),
6534
6548
  "--popover-shadow": getShadow(shadow)
6535
6549
  }
6536
6550
  });
6537
6551
  function Popover(_props) {
6538
- const props = useProps("Popover", defaultProps$1m, _props), {
6552
+ const props = useProps("Popover", defaultProps$1A, _props), {
6539
6553
  children,
6540
6554
  position,
6541
6555
  offset: offset2,
@@ -6579,14 +6593,14 @@ function Popover(_props) {
6579
6593
  } = props, getStyles2 = useStyles({
6580
6594
  name: __staticSelector,
6581
6595
  props,
6582
- classes: classes$D,
6596
+ classes: classes$F,
6583
6597
  classNames,
6584
6598
  styles,
6585
6599
  unstyled,
6586
6600
  rootSelector: "dropdown",
6587
6601
  vars,
6588
- varsResolver: varsResolver$G
6589
- }), arrowRef = useRef(null), [targetNode, setTargetNode] = useState(null), [dropdownNode, setDropdownNode] = useState(null), { dir } = useDirection(), uid = useId$1(id), popover = usePopover({
6602
+ varsResolver: varsResolver$H
6603
+ }), { resolvedStyles } = useResolvedStylesApi({ classNames, styles, props }), arrowRef = useRef(null), [targetNode, setTargetNode] = useState(null), [dropdownNode, setDropdownNode] = useState(null), { dir } = useDirection(), uid = useId$1(id), popover = usePopover({
6590
6604
  middlewares,
6591
6605
  width,
6592
6606
  position: getFloatingPosition(dir, position),
@@ -6660,6 +6674,7 @@ function Popover(_props) {
6660
6674
  variant,
6661
6675
  keepMounted,
6662
6676
  getStyles: getStyles2,
6677
+ resolvedStyles,
6663
6678
  floatingStrategy
6664
6679
  },
6665
6680
  children
@@ -6670,35 +6685,35 @@ Popover.Target = PopoverTarget;
6670
6685
  Popover.Dropdown = PopoverDropdown;
6671
6686
  Popover.displayName = "@mantine/core/Popover";
6672
6687
  Popover.extend = (input) => input;
6673
- var __default__$C = { root: "m_5ae2e3c", barsLoader: "m_7a2bd4cd", bar: "m_870bb79", "bars-loader-animation": "m_5d2b3b9d", dotsLoader: "m_4e3f22d7", dot: "m_870c4af", "loader-dots-animation": "m_aac34a1", ovalLoader: "m_b34414df", "oval-loader-animation": "m_f8e89c4b" };
6674
- const classes$C = __default__$C, Bars = forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxs(Box, { component: "span", className: clsx(classes$C.barsLoader, className), ...others, ref, children: [
6675
- /* @__PURE__ */ jsx("span", { className: classes$C.bar }),
6676
- /* @__PURE__ */ jsx("span", { className: classes$C.bar }),
6677
- /* @__PURE__ */ jsx("span", { className: classes$C.bar })
6688
+ var __default__$E = { root: "m_5ae2e3c", barsLoader: "m_7a2bd4cd", bar: "m_870bb79", "bars-loader-animation": "m_5d2b3b9d", dotsLoader: "m_4e3f22d7", dot: "m_870c4af", "loader-dots-animation": "m_aac34a1", ovalLoader: "m_b34414df", "oval-loader-animation": "m_f8e89c4b" };
6689
+ const classes$E = __default__$E, Bars = forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxs(Box, { component: "span", className: clsx(classes$E.barsLoader, className), ...others, ref, children: [
6690
+ /* @__PURE__ */ jsx("span", { className: classes$E.bar }),
6691
+ /* @__PURE__ */ jsx("span", { className: classes$E.bar }),
6692
+ /* @__PURE__ */ jsx("span", { className: classes$E.bar })
6678
6693
  ] }));
6679
6694
  Bars.displayName = "@mantine/core/Bars";
6680
- const Dots = forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxs(Box, { component: "span", className: clsx(classes$C.dotsLoader, className), ...others, ref, children: [
6681
- /* @__PURE__ */ jsx("span", { className: classes$C.dot }),
6682
- /* @__PURE__ */ jsx("span", { className: classes$C.dot }),
6683
- /* @__PURE__ */ jsx("span", { className: classes$C.dot })
6695
+ const Dots = forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxs(Box, { component: "span", className: clsx(classes$E.dotsLoader, className), ...others, ref, children: [
6696
+ /* @__PURE__ */ jsx("span", { className: classes$E.dot }),
6697
+ /* @__PURE__ */ jsx("span", { className: classes$E.dot }),
6698
+ /* @__PURE__ */ jsx("span", { className: classes$E.dot })
6684
6699
  ] }));
6685
6700
  Dots.displayName = "@mantine/core/Dots";
6686
- const Oval = forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsx(Box, { component: "span", className: clsx(classes$C.ovalLoader, className), ...others, ref }));
6701
+ const Oval = forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsx(Box, { component: "span", className: clsx(classes$E.ovalLoader, className), ...others, ref }));
6687
6702
  Oval.displayName = "@mantine/core/Oval";
6688
6703
  const defaultLoaders = {
6689
6704
  bars: Bars,
6690
6705
  oval: Oval,
6691
6706
  dots: Dots
6692
- }, defaultProps$1l = {
6707
+ }, defaultProps$1z = {
6693
6708
  loaders: defaultLoaders,
6694
6709
  type: "oval"
6695
- }, varsResolver$F = (theme, { size: size2, color }) => ({
6710
+ }, varsResolver$G = (theme, { size: size2, color }) => ({
6696
6711
  root: {
6697
6712
  "--loader-size": getSize(size2, "loader-size"),
6698
6713
  "--loader-color": color ? getThemeColor(color, theme) : void 0
6699
6714
  }
6700
6715
  }), Loader = factory((_props, ref) => {
6701
- const props = useProps("Loader", defaultProps$1l, _props), {
6716
+ const props = useProps("Loader", defaultProps$1z, _props), {
6702
6717
  size: size2,
6703
6718
  color,
6704
6719
  type,
@@ -6715,14 +6730,14 @@ const defaultLoaders = {
6715
6730
  } = props, getStyles2 = useStyles({
6716
6731
  name: "Loader",
6717
6732
  props,
6718
- classes: classes$C,
6733
+ classes: classes$E,
6719
6734
  className,
6720
6735
  style,
6721
6736
  classNames,
6722
6737
  styles,
6723
6738
  unstyled,
6724
6739
  vars,
6725
- varsResolver: varsResolver$F
6740
+ varsResolver: varsResolver$G
6726
6741
  });
6727
6742
  return children ? /* @__PURE__ */ jsx(Box, { ...getStyles2("root"), ref, ...others, children }) : /* @__PURE__ */ jsx(
6728
6743
  Box,
@@ -6737,15 +6752,15 @@ const defaultLoaders = {
6737
6752
  );
6738
6753
  });
6739
6754
  Loader.defaultLoaders = defaultLoaders;
6740
- Loader.classes = classes$C;
6755
+ Loader.classes = classes$E;
6741
6756
  Loader.displayName = "@mantine/core/Loader";
6742
- var __default__$B = { root: "m_8d3f4000", icon: "m_8d3afb97", loader: "m_302b9fb1", group: "m_1a0f1b21" };
6743
- const classes$B = __default__$B, defaultProps$1k = {
6757
+ var __default__$D = { root: "m_8d3f4000", icon: "m_8d3afb97", loader: "m_302b9fb1", group: "m_1a0f1b21" };
6758
+ const classes$D = __default__$D, defaultProps$1y = {
6744
6759
  orientation: "horizontal"
6745
- }, varsResolver$E = (_, { borderWidth }) => ({
6760
+ }, varsResolver$F = (_, { borderWidth }) => ({
6746
6761
  group: { "--ai-border-width": rem(borderWidth) }
6747
6762
  }), ActionIconGroup = factory((_props, ref) => {
6748
- const props = useProps("ActionIconGroup", defaultProps$1k, _props), {
6763
+ const props = useProps("ActionIconGroup", defaultProps$1y, _props), {
6749
6764
  className,
6750
6765
  style,
6751
6766
  classNames,
@@ -6757,17 +6772,17 @@ const classes$B = __default__$B, defaultProps$1k = {
6757
6772
  variant,
6758
6773
  mod,
6759
6774
  ...others
6760
- } = useProps("ActionIconGroup", defaultProps$1k, _props), getStyles2 = useStyles({
6775
+ } = useProps("ActionIconGroup", defaultProps$1y, _props), getStyles2 = useStyles({
6761
6776
  name: "ActionIconGroup",
6762
6777
  props,
6763
- classes: classes$B,
6778
+ classes: classes$D,
6764
6779
  className,
6765
6780
  style,
6766
6781
  classNames,
6767
6782
  styles,
6768
6783
  unstyled,
6769
6784
  vars,
6770
- varsResolver: varsResolver$E,
6785
+ varsResolver: varsResolver$F,
6771
6786
  rootSelector: "group"
6772
6787
  });
6773
6788
  return /* @__PURE__ */ jsx(
@@ -6782,9 +6797,9 @@ const classes$B = __default__$B, defaultProps$1k = {
6782
6797
  }
6783
6798
  );
6784
6799
  });
6785
- ActionIconGroup.classes = classes$B;
6800
+ ActionIconGroup.classes = classes$D;
6786
6801
  ActionIconGroup.displayName = "@mantine/core/ActionIconGroup";
6787
- const defaultProps$1j = {}, varsResolver$D = (theme, { size: size2, radius, variant, gradient, color, autoContrast }) => {
6802
+ const defaultProps$1x = {}, varsResolver$E = (theme, { size: size2, radius, variant, gradient, color, autoContrast }) => {
6788
6803
  const colors = theme.variantColorResolver({
6789
6804
  color: color || theme.primaryColor,
6790
6805
  theme,
@@ -6804,7 +6819,7 @@ const defaultProps$1j = {}, varsResolver$D = (theme, { size: size2, radius, vari
6804
6819
  }
6805
6820
  };
6806
6821
  }, ActionIcon = polymorphicFactory((_props, ref) => {
6807
- const props = useProps("ActionIcon", defaultProps$1j, _props), {
6822
+ const props = useProps("ActionIcon", defaultProps$1x, _props), {
6808
6823
  className,
6809
6824
  unstyled,
6810
6825
  variant,
@@ -6830,12 +6845,12 @@ const defaultProps$1j = {}, varsResolver$D = (theme, { size: size2, radius, vari
6830
6845
  props,
6831
6846
  className,
6832
6847
  style,
6833
- classes: classes$B,
6848
+ classes: classes$D,
6834
6849
  classNames,
6835
6850
  styles,
6836
6851
  unstyled,
6837
6852
  vars,
6838
- varsResolver: varsResolver$D
6853
+ varsResolver: varsResolver$E
6839
6854
  });
6840
6855
  return /* @__PURE__ */ jsxs(
6841
6856
  UnstyledButton,
@@ -6855,7 +6870,7 @@ const defaultProps$1j = {}, varsResolver$D = (theme, { size: size2, radius, vari
6855
6870
  }
6856
6871
  );
6857
6872
  });
6858
- ActionIcon.classes = classes$B;
6873
+ ActionIcon.classes = classes$D;
6859
6874
  ActionIcon.displayName = "@mantine/core/ActionIcon";
6860
6875
  ActionIcon.Group = ActionIconGroup;
6861
6876
  const CloseIcon = forwardRef(
@@ -6881,17 +6896,17 @@ const CloseIcon = forwardRef(
6881
6896
  )
6882
6897
  );
6883
6898
  CloseIcon.displayName = "@mantine/core/CloseIcon";
6884
- var __default__$A = { root: "m_86a44da5", "root--subtle": "m_220c80f2" };
6885
- const classes$A = __default__$A, defaultProps$1i = {
6899
+ var __default__$C = { root: "m_86a44da5", "root--subtle": "m_220c80f2" };
6900
+ const classes$C = __default__$C, defaultProps$1w = {
6886
6901
  variant: "subtle"
6887
- }, varsResolver$C = (_, { size: size2, radius, iconSize }) => ({
6902
+ }, varsResolver$D = (_, { size: size2, radius, iconSize }) => ({
6888
6903
  root: {
6889
6904
  "--cb-size": getSize(size2, "cb-size"),
6890
6905
  "--cb-radius": radius === void 0 ? void 0 : getRadius(radius),
6891
6906
  "--cb-icon-size": rem(iconSize)
6892
6907
  }
6893
6908
  }), CloseButton = polymorphicFactory((_props, ref) => {
6894
- const props = useProps("CloseButton", defaultProps$1i, _props), {
6909
+ const props = useProps("CloseButton", defaultProps$1w, _props), {
6895
6910
  iconSize,
6896
6911
  children,
6897
6912
  vars,
@@ -6912,12 +6927,12 @@ const classes$A = __default__$A, defaultProps$1i = {
6912
6927
  props,
6913
6928
  className,
6914
6929
  style,
6915
- classes: classes$A,
6930
+ classes: classes$C,
6916
6931
  classNames,
6917
6932
  styles,
6918
6933
  unstyled,
6919
6934
  vars,
6920
- varsResolver: varsResolver$C
6935
+ varsResolver: varsResolver$D
6921
6936
  });
6922
6937
  return /* @__PURE__ */ jsxs(
6923
6938
  UnstyledButton,
@@ -6936,19 +6951,19 @@ const classes$A = __default__$A, defaultProps$1i = {
6936
6951
  }
6937
6952
  );
6938
6953
  });
6939
- CloseButton.classes = classes$A;
6954
+ CloseButton.classes = classes$C;
6940
6955
  CloseButton.displayName = "@mantine/core/CloseButton";
6941
6956
  function filterFalsyChildren(children) {
6942
6957
  return Children.toArray(children).filter(Boolean);
6943
6958
  }
6944
- var __default__$z = { root: "m_4081bf90" };
6945
- const classes$z = __default__$z, defaultProps$1h = {
6959
+ var __default__$B = { root: "m_4081bf90" };
6960
+ const classes$B = __default__$B, defaultProps$1v = {
6946
6961
  preventGrowOverflow: !0,
6947
6962
  gap: "md",
6948
6963
  align: "center",
6949
6964
  justify: "flex-start",
6950
6965
  wrap: "wrap"
6951
- }, varsResolver$B = (_, { grow, preventGrowOverflow, gap, align, justify, wrap }, { childWidth }) => ({
6966
+ }, varsResolver$C = (_, { grow, preventGrowOverflow, gap, align, justify, wrap }, { childWidth }) => ({
6952
6967
  root: {
6953
6968
  "--group-child-width": grow && preventGrowOverflow ? childWidth : void 0,
6954
6969
  "--group-gap": getSpacing(gap),
@@ -6957,7 +6972,7 @@ const classes$z = __default__$z, defaultProps$1h = {
6957
6972
  "--group-wrap": wrap
6958
6973
  }
6959
6974
  }), Group = factory((_props, ref) => {
6960
- const props = useProps("Group", defaultProps$1h, _props), {
6975
+ const props = useProps("Group", defaultProps$1v, _props), {
6961
6976
  classNames,
6962
6977
  className,
6963
6978
  style,
@@ -6981,12 +6996,12 @@ const classes$z = __default__$z, defaultProps$1h = {
6981
6996
  stylesCtx,
6982
6997
  className,
6983
6998
  style,
6984
- classes: classes$z,
6999
+ classes: classes$B,
6985
7000
  classNames,
6986
7001
  styles,
6987
7002
  unstyled,
6988
7003
  vars,
6989
- varsResolver: varsResolver$B
7004
+ varsResolver: varsResolver$C
6990
7005
  });
6991
7006
  return /* @__PURE__ */ jsx(
6992
7007
  Box,
@@ -7001,12 +7016,12 @@ const classes$z = __default__$z, defaultProps$1h = {
7001
7016
  }
7002
7017
  );
7003
7018
  });
7004
- Group.classes = classes$z;
7019
+ Group.classes = classes$B;
7005
7020
  Group.displayName = "@mantine/core/Group";
7006
- var __default__$y = { root: "m_9814e45f" };
7007
- const classes$y = __default__$y, defaultProps$1g = {
7021
+ var __default__$A = { root: "m_9814e45f" };
7022
+ const classes$A = __default__$A, defaultProps$1u = {
7008
7023
  zIndex: getDefaultZIndex("modal")
7009
- }, varsResolver$A = (_, { gradient, color, backgroundOpacity, blur, radius, zIndex }) => ({
7024
+ }, varsResolver$B = (_, { gradient, color, backgroundOpacity, blur, radius, zIndex }) => ({
7010
7025
  root: {
7011
7026
  "--overlay-bg": gradient || (color !== void 0 || backgroundOpacity !== void 0) && rgba(color || "#000", backgroundOpacity ?? 0.6) || void 0,
7012
7027
  "--overlay-filter": blur ? `blur(${rem(blur)})` : void 0,
@@ -7014,7 +7029,7 @@ const classes$y = __default__$y, defaultProps$1g = {
7014
7029
  "--overlay-z-index": zIndex?.toString()
7015
7030
  }
7016
7031
  }), Overlay = polymorphicFactory((_props, ref) => {
7017
- const props = useProps("Overlay", defaultProps$1g, _props), {
7032
+ const props = useProps("Overlay", defaultProps$1u, _props), {
7018
7033
  classNames,
7019
7034
  className,
7020
7035
  style,
@@ -7035,18 +7050,18 @@ const classes$y = __default__$y, defaultProps$1g = {
7035
7050
  } = props, getStyles2 = useStyles({
7036
7051
  name: "Overlay",
7037
7052
  props,
7038
- classes: classes$y,
7053
+ classes: classes$A,
7039
7054
  className,
7040
7055
  style,
7041
7056
  classNames,
7042
7057
  styles,
7043
7058
  unstyled,
7044
7059
  vars,
7045
- varsResolver: varsResolver$A
7060
+ varsResolver: varsResolver$B
7046
7061
  });
7047
7062
  return /* @__PURE__ */ jsx(Box, { ref, ...getStyles2("root"), mod: [{ center, fixed }, mod], ...others, children });
7048
7063
  });
7049
- Overlay.classes = classes$y;
7064
+ Overlay.classes = classes$A;
7050
7065
  Overlay.displayName = "@mantine/core/Overlay";
7051
7066
  const [ModalBaseProvider, useModalBaseContext] = createSafeContext(
7052
7067
  "ModalBase component was not found in tree"
@@ -7154,8 +7169,8 @@ function useModalBodyId() {
7154
7169
  const ctx = useModalBaseContext();
7155
7170
  return useEffect(() => (ctx.setBodyMounted(!0), () => ctx.setBodyMounted(!1)), []), ctx.getBodyId();
7156
7171
  }
7157
- var __default__$x = { title: "m_615af6c9", header: "m_b5489c3c", inner: "m_60c222c7", content: "m_fd1ab0aa", close: "m_606cb269", body: "m_5df29311" };
7158
- const classes$x = __default__$x, ModalBaseBody = forwardRef(
7172
+ var __default__$z = { title: "m_615af6c9", header: "m_b5489c3c", inner: "m_60c222c7", content: "m_fd1ab0aa", close: "m_606cb269", body: "m_5df29311" };
7173
+ const classes$z = __default__$z, ModalBaseBody = forwardRef(
7159
7174
  ({ className, ...others }, ref) => {
7160
7175
  const bodyId = useModalBodyId(), ctx = useModalBaseContext();
7161
7176
  return /* @__PURE__ */ jsx(
@@ -7164,7 +7179,7 @@ const classes$x = __default__$x, ModalBaseBody = forwardRef(
7164
7179
  ref,
7165
7180
  ...others,
7166
7181
  id: bodyId,
7167
- className: clsx({ [classes$x.body]: !ctx.unstyled }, className)
7182
+ className: clsx({ [classes$z.body]: !ctx.unstyled }, className)
7168
7183
  }
7169
7184
  );
7170
7185
  }
@@ -7181,7 +7196,7 @@ const ModalBaseCloseButton = forwardRef(
7181
7196
  onClick: (event) => {
7182
7197
  ctx.onClose(), onClick?.(event);
7183
7198
  },
7184
- className: clsx({ [classes$x.close]: !ctx.unstyled }, className),
7199
+ className: clsx({ [classes$z.close]: !ctx.unstyled }, className),
7185
7200
  unstyled: ctx.unstyled
7186
7201
  }
7187
7202
  );
@@ -7202,7 +7217,7 @@ const ModalBaseContent = forwardRef(
7202
7217
  "div",
7203
7218
  {
7204
7219
  ...innerProps,
7205
- className: clsx({ [classes$x.inner]: !ctx.unstyled }, innerProps.className),
7220
+ className: clsx({ [classes$z.inner]: !ctx.unstyled }, innerProps.className),
7206
7221
  children: /* @__PURE__ */ jsx(FocusTrap, { active: ctx.opened && ctx.trapFocus, innerRef: ref, children: /* @__PURE__ */ jsx(
7207
7222
  Paper,
7208
7223
  {
@@ -7214,7 +7229,7 @@ const ModalBaseContent = forwardRef(
7214
7229
  "aria-describedby": ctx.bodyMounted ? ctx.getBodyId() : void 0,
7215
7230
  "aria-labelledby": ctx.titleMounted ? ctx.getTitleId() : void 0,
7216
7231
  style: [style, transitionStyles],
7217
- className: clsx({ [classes$x.content]: !ctx.unstyled }, className),
7232
+ className: clsx({ [classes$z.content]: !ctx.unstyled }, className),
7218
7233
  unstyled: ctx.unstyled,
7219
7234
  children: others.children
7220
7235
  }
@@ -7234,7 +7249,7 @@ const ModalBaseHeader = forwardRef(
7234
7249
  {
7235
7250
  component: "header",
7236
7251
  ref,
7237
- className: clsx({ [classes$x.header]: !ctx.unstyled }, className),
7252
+ className: clsx({ [classes$z.header]: !ctx.unstyled }, className),
7238
7253
  ...others
7239
7254
  }
7240
7255
  );
@@ -7251,22 +7266,30 @@ function useModalTransition(transitionOverride) {
7251
7266
  return { ...DEFAULT_TRANSITION, ...ctx.transitionProps, ...transitionOverride };
7252
7267
  }
7253
7268
  const ModalBaseOverlay = forwardRef(
7254
- ({ onClick, transitionProps, style, ...others }, ref) => {
7269
+ ({ onClick, transitionProps, style, visible: visible2, ...others }, ref) => {
7255
7270
  const ctx = useModalBaseContext(), transition = useModalTransition(transitionProps);
7256
- return /* @__PURE__ */ jsx(Transition, { mounted: ctx.opened, ...transition, transition: "fade", children: (transitionStyles) => /* @__PURE__ */ jsx(
7257
- Overlay,
7271
+ return /* @__PURE__ */ jsx(
7272
+ Transition,
7258
7273
  {
7259
- ref,
7260
- fixed: !0,
7261
- style: [style, transitionStyles],
7262
- zIndex: ctx.zIndex,
7263
- unstyled: ctx.unstyled,
7264
- onClick: (event) => {
7265
- onClick?.(event), ctx.closeOnClickOutside && ctx.onClose();
7266
- },
7267
- ...others
7274
+ mounted: visible2 !== void 0 ? visible2 : ctx.opened,
7275
+ ...transition,
7276
+ transition: "fade",
7277
+ children: (transitionStyles) => /* @__PURE__ */ jsx(
7278
+ Overlay,
7279
+ {
7280
+ ref,
7281
+ fixed: !0,
7282
+ style: [style, transitionStyles],
7283
+ zIndex: ctx.zIndex,
7284
+ unstyled: ctx.unstyled,
7285
+ onClick: (event) => {
7286
+ onClick?.(event), ctx.closeOnClickOutside && ctx.onClose();
7287
+ },
7288
+ ...others
7289
+ }
7290
+ )
7268
7291
  }
7269
- ) });
7292
+ );
7270
7293
  }
7271
7294
  );
7272
7295
  ModalBaseOverlay.displayName = "@mantine/core/ModalBaseOverlay";
@@ -7282,7 +7305,7 @@ const ModalBaseTitle = forwardRef(
7282
7305
  {
7283
7306
  component: "h2",
7284
7307
  ref,
7285
- className: clsx({ [classes$x.title]: !ctx.unstyled }, className),
7308
+ className: clsx({ [classes$z.title]: !ctx.unstyled }, className),
7286
7309
  ...others,
7287
7310
  id
7288
7311
  }
@@ -7301,13 +7324,13 @@ const [InputWrapperProvider, useInputWrapperContext] = createOptionalContext({
7301
7324
  inputId: void 0,
7302
7325
  labelId: void 0
7303
7326
  });
7304
- var __default__$w = { wrapper: "m_6c018570", input: "m_8fb7ebe7", section: "m_82577fc2", placeholder: "m_88bacfd0", root: "m_46b77525", label: "m_8fdc1311", required: "m_78a94662", error: "m_8f816625", description: "m_fe47ce59" };
7305
- const classes$w = __default__$w, defaultProps$1f = {}, varsResolver$z = (_, { size: size2 }) => ({
7327
+ var __default__$y = { wrapper: "m_6c018570", input: "m_8fb7ebe7", section: "m_82577fc2", placeholder: "m_88bacfd0", root: "m_46b77525", label: "m_8fdc1311", required: "m_78a94662", error: "m_8f816625", description: "m_fe47ce59" };
7328
+ const classes$y = __default__$y, defaultProps$1t = {}, varsResolver$A = (_, { size: size2 }) => ({
7306
7329
  description: {
7307
7330
  "--input-description-size": size2 === void 0 ? void 0 : `calc(${getFontSize(size2)} - ${rem(2)})`
7308
7331
  }
7309
7332
  }), InputDescription = factory((_props, ref) => {
7310
- const props = useProps("InputDescription", defaultProps$1f, _props), {
7333
+ const props = useProps("InputDescription", defaultProps$1t, _props), {
7311
7334
  classNames,
7312
7335
  className,
7313
7336
  style,
@@ -7319,10 +7342,10 @@ const classes$w = __default__$w, defaultProps$1f = {}, varsResolver$z = (_, { si
7319
7342
  __inheritStyles = !0,
7320
7343
  variant,
7321
7344
  ...others
7322
- } = useProps("InputDescription", defaultProps$1f, props), ctx = useInputWrapperContext(), _getStyles = useStyles({
7345
+ } = useProps("InputDescription", defaultProps$1t, props), ctx = useInputWrapperContext(), _getStyles = useStyles({
7323
7346
  name: ["InputWrapper", __staticSelector],
7324
7347
  props,
7325
- classes: classes$w,
7348
+ classes: classes$y,
7326
7349
  className,
7327
7350
  style,
7328
7351
  classNames,
@@ -7330,7 +7353,7 @@ const classes$w = __default__$w, defaultProps$1f = {}, varsResolver$z = (_, { si
7330
7353
  unstyled,
7331
7354
  rootSelector: "description",
7332
7355
  vars,
7333
- varsResolver: varsResolver$z
7356
+ varsResolver: varsResolver$A
7334
7357
  }), getStyles2 = __inheritStyles && ctx?.getStyles || _getStyles;
7335
7358
  return /* @__PURE__ */ jsx(
7336
7359
  Box,
@@ -7344,14 +7367,14 @@ const classes$w = __default__$w, defaultProps$1f = {}, varsResolver$z = (_, { si
7344
7367
  }
7345
7368
  );
7346
7369
  });
7347
- InputDescription.classes = classes$w;
7370
+ InputDescription.classes = classes$y;
7348
7371
  InputDescription.displayName = "@mantine/core/InputDescription";
7349
- const defaultProps$1e = {}, varsResolver$y = (_, { size: size2 }) => ({
7372
+ const defaultProps$1s = {}, varsResolver$z = (_, { size: size2 }) => ({
7350
7373
  error: {
7351
7374
  "--input-error-size": size2 === void 0 ? void 0 : `calc(${getFontSize(size2)} - ${rem(2)})`
7352
7375
  }
7353
7376
  }), InputError = factory((_props, ref) => {
7354
- const props = useProps("InputError", defaultProps$1e, _props), {
7377
+ const props = useProps("InputError", defaultProps$1s, _props), {
7355
7378
  classNames,
7356
7379
  className,
7357
7380
  style,
@@ -7366,7 +7389,7 @@ const defaultProps$1e = {}, varsResolver$y = (_, { size: size2 }) => ({
7366
7389
  } = props, _getStyles = useStyles({
7367
7390
  name: ["InputWrapper", __staticSelector],
7368
7391
  props,
7369
- classes: classes$w,
7392
+ classes: classes$y,
7370
7393
  className,
7371
7394
  style,
7372
7395
  classNames,
@@ -7374,7 +7397,7 @@ const defaultProps$1e = {}, varsResolver$y = (_, { size: size2 }) => ({
7374
7397
  unstyled,
7375
7398
  rootSelector: "error",
7376
7399
  vars,
7377
- varsResolver: varsResolver$y
7400
+ varsResolver: varsResolver$z
7378
7401
  }), ctx = useInputWrapperContext(), getStyles2 = __inheritStyles && ctx?.getStyles || _getStyles;
7379
7402
  return /* @__PURE__ */ jsx(
7380
7403
  Box,
@@ -7388,17 +7411,17 @@ const defaultProps$1e = {}, varsResolver$y = (_, { size: size2 }) => ({
7388
7411
  }
7389
7412
  );
7390
7413
  });
7391
- InputError.classes = classes$w;
7414
+ InputError.classes = classes$y;
7392
7415
  InputError.displayName = "@mantine/core/InputError";
7393
- const defaultProps$1d = {
7416
+ const defaultProps$1r = {
7394
7417
  labelElement: "label"
7395
- }, varsResolver$x = (_, { size: size2 }) => ({
7418
+ }, varsResolver$y = (_, { size: size2 }) => ({
7396
7419
  label: {
7397
7420
  "--input-label-size": getFontSize(size2),
7398
7421
  "--input-asterisk-color": void 0
7399
7422
  }
7400
7423
  }), InputLabel = factory((_props, ref) => {
7401
- const props = useProps("InputLabel", defaultProps$1d, _props), {
7424
+ const props = useProps("InputLabel", defaultProps$1r, _props), {
7402
7425
  classNames,
7403
7426
  className,
7404
7427
  style,
@@ -7415,10 +7438,10 @@ const defaultProps$1d = {
7415
7438
  variant,
7416
7439
  mod,
7417
7440
  ...others
7418
- } = useProps("InputLabel", defaultProps$1d, props), _getStyles = useStyles({
7441
+ } = useProps("InputLabel", defaultProps$1r, props), _getStyles = useStyles({
7419
7442
  name: ["InputWrapper", __staticSelector],
7420
7443
  props,
7421
- classes: classes$w,
7444
+ classes: classes$y,
7422
7445
  className,
7423
7446
  style,
7424
7447
  classNames,
@@ -7426,7 +7449,7 @@ const defaultProps$1d = {
7426
7449
  unstyled,
7427
7450
  rootSelector: "label",
7428
7451
  vars,
7429
- varsResolver: varsResolver$x
7452
+ varsResolver: varsResolver$y
7430
7453
  }), ctx = useInputWrapperContext(), getStyles2 = ctx?.getStyles || _getStyles;
7431
7454
  return /* @__PURE__ */ jsxs(
7432
7455
  Box,
@@ -7449,10 +7472,10 @@ const defaultProps$1d = {
7449
7472
  }
7450
7473
  );
7451
7474
  });
7452
- InputLabel.classes = classes$w;
7475
+ InputLabel.classes = classes$y;
7453
7476
  InputLabel.displayName = "@mantine/core/InputLabel";
7454
- const defaultProps$1c = {}, InputPlaceholder = factory((_props, ref) => {
7455
- const props = useProps("InputPlaceholder", defaultProps$1c, _props), {
7477
+ const defaultProps$1q = {}, InputPlaceholder = factory((_props, ref) => {
7478
+ const props = useProps("InputPlaceholder", defaultProps$1q, _props), {
7456
7479
  classNames,
7457
7480
  className,
7458
7481
  style,
@@ -7464,10 +7487,10 @@ const defaultProps$1c = {}, InputPlaceholder = factory((_props, ref) => {
7464
7487
  error,
7465
7488
  mod,
7466
7489
  ...others
7467
- } = useProps("InputPlaceholder", defaultProps$1c, props), getStyles2 = useStyles({
7490
+ } = useProps("InputPlaceholder", defaultProps$1q, props), getStyles2 = useStyles({
7468
7491
  name: ["InputPlaceholder", __staticSelector],
7469
7492
  props,
7470
- classes: classes$w,
7493
+ classes: classes$y,
7471
7494
  className,
7472
7495
  style,
7473
7496
  classNames,
@@ -7487,17 +7510,17 @@ const defaultProps$1c = {}, InputPlaceholder = factory((_props, ref) => {
7487
7510
  }
7488
7511
  );
7489
7512
  });
7490
- InputPlaceholder.classes = classes$w;
7513
+ InputPlaceholder.classes = classes$y;
7491
7514
  InputPlaceholder.displayName = "@mantine/core/InputPlaceholder";
7492
7515
  function getInputOffsets(inputWrapperOrder, { hasDescription, hasError }) {
7493
7516
  const inputIndex = inputWrapperOrder.findIndex((part) => part === "input"), aboveInput = inputWrapperOrder.slice(0, inputIndex), belowInput = inputWrapperOrder.slice(inputIndex + 1), offsetTop = hasDescription && aboveInput.includes("description") || hasError && aboveInput.includes("error");
7494
7517
  return { offsetBottom: hasDescription && belowInput.includes("description") || hasError && belowInput.includes("error"), offsetTop };
7495
7518
  }
7496
- const defaultProps$1b = {
7519
+ const defaultProps$1p = {
7497
7520
  labelElement: "label",
7498
7521
  inputContainer: (children) => children,
7499
7522
  inputWrapperOrder: ["label", "description", "input", "error"]
7500
- }, varsResolver$w = (_, { size: size2 }) => ({
7523
+ }, varsResolver$x = (_, { size: size2 }) => ({
7501
7524
  label: {
7502
7525
  "--input-label-size": getFontSize(size2),
7503
7526
  "--input-asterisk-color": void 0
@@ -7509,7 +7532,7 @@ const defaultProps$1b = {
7509
7532
  "--input-description-size": size2 === void 0 ? void 0 : `calc(${getFontSize(size2)} - ${rem(2)})`
7510
7533
  }
7511
7534
  }), InputWrapper = factory((_props, ref) => {
7512
- const props = useProps("InputWrapper", defaultProps$1b, _props), {
7535
+ const props = useProps("InputWrapper", defaultProps$1p, _props), {
7513
7536
  classNames,
7514
7537
  className,
7515
7538
  style,
@@ -7538,14 +7561,14 @@ const defaultProps$1b = {
7538
7561
  } = props, getStyles2 = useStyles({
7539
7562
  name: ["InputWrapper", __staticSelector],
7540
7563
  props: __stylesApiProps || props,
7541
- classes: classes$w,
7564
+ classes: classes$y,
7542
7565
  className,
7543
7566
  style,
7544
7567
  classNames,
7545
7568
  styles,
7546
7569
  unstyled,
7547
7570
  vars,
7548
- varsResolver: varsResolver$w
7571
+ varsResolver: varsResolver$x
7549
7572
  }), sharedProps = {
7550
7573
  size: size2,
7551
7574
  variant,
@@ -7621,15 +7644,15 @@ const defaultProps$1b = {
7621
7644
  }
7622
7645
  );
7623
7646
  });
7624
- InputWrapper.classes = classes$w;
7647
+ InputWrapper.classes = classes$y;
7625
7648
  InputWrapper.displayName = "@mantine/core/InputWrapper";
7626
- const defaultProps$1a = {
7649
+ const defaultProps$1o = {
7627
7650
  variant: "default",
7628
7651
  leftSectionPointerEvents: "none",
7629
7652
  rightSectionPointerEvents: "none",
7630
7653
  withAria: !0,
7631
7654
  withErrorStyles: !0
7632
- }, varsResolver$v = (_, props, ctx) => ({
7655
+ }, varsResolver$w = (_, props, ctx) => ({
7633
7656
  wrapper: {
7634
7657
  "--input-margin-top": ctx.offsetTop ? "calc(var(--mantine-spacing-xs) / 2)" : void 0,
7635
7658
  "--input-margin-bottom": ctx.offsetBottom ? "calc(var(--mantine-spacing-xs) / 2)" : void 0,
@@ -7643,7 +7666,7 @@ const defaultProps$1a = {
7643
7666
  "--input-right-section-pointer-events": props.rightSectionPointerEvents
7644
7667
  }
7645
7668
  }), Input = polymorphicFactory((_props, ref) => {
7646
- const props = useProps("Input", defaultProps$1a, _props), {
7669
+ const props = useProps("Input", defaultProps$1o, _props), {
7647
7670
  classNames,
7648
7671
  className,
7649
7672
  style,
@@ -7678,7 +7701,7 @@ const defaultProps$1a = {
7678
7701
  } = props, { styleProps, rest } = extractStyleProps(others), ctx = useInputWrapperContext(), stylesCtx = { offsetBottom: ctx?.offsetBottom, offsetTop: ctx?.offsetTop }, getStyles2 = useStyles({
7679
7702
  name: ["Input", __staticSelector],
7680
7703
  props: __stylesApiProps || props,
7681
- classes: classes$w,
7704
+ classes: classes$y,
7682
7705
  className,
7683
7706
  style,
7684
7707
  classNames,
@@ -7687,7 +7710,7 @@ const defaultProps$1a = {
7687
7710
  stylesCtx,
7688
7711
  rootSelector: "wrapper",
7689
7712
  vars,
7690
- varsResolver: varsResolver$v
7713
+ varsResolver: varsResolver$w
7691
7714
  }), ariaAttributes = withAria ? {
7692
7715
  required,
7693
7716
  disabled,
@@ -7757,7 +7780,7 @@ const defaultProps$1a = {
7757
7780
  }
7758
7781
  );
7759
7782
  });
7760
- Input.classes = classes$w;
7783
+ Input.classes = classes$y;
7761
7784
  Input.Wrapper = InputWrapper;
7762
7785
  Input.Label = InputLabel;
7763
7786
  Input.Error = InputError;
@@ -7834,11 +7857,11 @@ function useInputProps(component, defaultProps2, _props) {
7834
7857
  }
7835
7858
  };
7836
7859
  }
7837
- const defaultProps$19 = {
7860
+ const defaultProps$1n = {
7838
7861
  __staticSelector: "InputBase",
7839
7862
  withAria: !0
7840
7863
  }, InputBase = polymorphicFactory((props, ref) => {
7841
- const { inputProps, wrapperProps, ...others } = useInputProps("InputBase", defaultProps$19, props);
7864
+ const { inputProps, wrapperProps, ...others } = useInputProps("InputBase", defaultProps$1n, props);
7842
7865
  return /* @__PURE__ */ jsx(Input.Wrapper, { ...wrapperProps, children: /* @__PURE__ */ jsx(Input, { ...inputProps, ...others, ref }) });
7843
7866
  });
7844
7867
  InputBase.classes = { ...Input.classes, ...Input.Wrapper.classes };
@@ -7852,9 +7875,9 @@ const FLEX_STYLE_PROPS_DATA = {
7852
7875
  wrap: { type: "identity", property: "flexWrap" },
7853
7876
  direction: { type: "identity", property: "flexDirection" }
7854
7877
  };
7855
- var __default__$v = { root: "m_8bffd616" };
7856
- const classes$v = __default__$v, defaultProps$18 = {}, Flex = polymorphicFactory((_props, ref) => {
7857
- const props = useProps("Flex", defaultProps$18, _props), {
7878
+ var __default__$x = { root: "m_8bffd616" };
7879
+ const classes$x = __default__$x, defaultProps$1m = {}, Flex = polymorphicFactory((_props, ref) => {
7880
+ const props = useProps("Flex", defaultProps$1m, _props), {
7858
7881
  classNames,
7859
7882
  className,
7860
7883
  style,
@@ -7871,7 +7894,7 @@ const classes$v = __default__$v, defaultProps$18 = {}, Flex = polymorphicFactory
7871
7894
  ...others
7872
7895
  } = props, getStyles2 = useStyles({
7873
7896
  name: "Flex",
7874
- classes: classes$v,
7897
+ classes: classes$x,
7875
7898
  props,
7876
7899
  className,
7877
7900
  style,
@@ -7906,7 +7929,7 @@ const classes$v = __default__$v, defaultProps$18 = {}, Flex = polymorphicFactory
7906
7929
  )
7907
7930
  ] });
7908
7931
  });
7909
- Flex.classes = classes$v;
7932
+ Flex.classes = classes$x;
7910
7933
  Flex.displayName = "@mantine/core/Flex";
7911
7934
  function isParent(parentElement, childElement) {
7912
7935
  if (!childElement || !parentElement)
@@ -7972,13 +7995,13 @@ function useFloatingIndicator({
7972
7995
  () => document.documentElement
7973
7996
  ), { initialized, hidden: hidden2 };
7974
7997
  }
7975
- var __default__$u = { root: "m_96b553a6" };
7976
- const classes$u = __default__$u, defaultProps$17 = {}, varsResolver$u = (_theme, { transitionDuration }) => ({
7998
+ var __default__$w = { root: "m_96b553a6" };
7999
+ const classes$w = __default__$w, defaultProps$1l = {}, varsResolver$v = (_theme, { transitionDuration }) => ({
7977
8000
  root: {
7978
8001
  "--transition-duration": typeof transitionDuration == "number" ? `${transitionDuration}ms` : transitionDuration
7979
8002
  }
7980
8003
  }), FloatingIndicator = factory((_props, ref) => {
7981
- const props = useProps("FloatingIndicator", defaultProps$17, _props), {
8004
+ const props = useProps("FloatingIndicator", defaultProps$1l, _props), {
7982
8005
  classNames,
7983
8006
  className,
7984
8007
  style,
@@ -7993,7 +8016,7 @@ const classes$u = __default__$u, defaultProps$17 = {}, varsResolver$u = (_theme,
7993
8016
  ...others
7994
8017
  } = props, getStyles2 = useStyles({
7995
8018
  name: "FloatingIndicator",
7996
- classes: classes$u,
8019
+ classes: classes$w,
7997
8020
  props,
7998
8021
  className,
7999
8022
  style,
@@ -8001,7 +8024,7 @@ const classes$u = __default__$u, defaultProps$17 = {}, varsResolver$u = (_theme,
8001
8024
  styles,
8002
8025
  unstyled,
8003
8026
  vars,
8004
- varsResolver: varsResolver$u
8027
+ varsResolver: varsResolver$v
8005
8028
  }), innerRef = useRef(null), { initialized, hidden: hidden2 } = useFloatingIndicator({
8006
8029
  target,
8007
8030
  parent,
@@ -8011,9 +8034,9 @@ const classes$u = __default__$u, defaultProps$17 = {}, varsResolver$u = (_theme,
8011
8034
  return !target || !parent ? null : /* @__PURE__ */ jsx(Box, { ref: mergedRef, mod: [{ initialized, hidden: hidden2 }, mod], ...getStyles2("root"), ...others });
8012
8035
  });
8013
8036
  FloatingIndicator.displayName = "@mantine/core/FloatingIndicator";
8014
- FloatingIndicator.classes = classes$u;
8015
- var __default__$t = { root: "m_66836ed3", wrapper: "m_a5d60502", body: "m_667c2793", title: "m_6a03f287", label: "m_698f4f23", icon: "m_667f2a6a", message: "m_7fa78076", closeButton: "m_87f54839" };
8016
- const classes$t = __default__$t, defaultProps$16 = {}, varsResolver$t = (theme, { radius, color, variant, autoContrast }) => {
8037
+ FloatingIndicator.classes = classes$w;
8038
+ var __default__$v = { root: "m_66836ed3", wrapper: "m_a5d60502", body: "m_667c2793", title: "m_6a03f287", label: "m_698f4f23", icon: "m_667f2a6a", message: "m_7fa78076", closeButton: "m_87f54839" };
8039
+ const classes$v = __default__$v, defaultProps$1k = {}, varsResolver$u = (theme, { radius, color, variant, autoContrast }) => {
8017
8040
  const colors = theme.variantColorResolver({
8018
8041
  color: color || theme.primaryColor,
8019
8042
  theme,
@@ -8029,7 +8052,7 @@ const classes$t = __default__$t, defaultProps$16 = {}, varsResolver$t = (theme,
8029
8052
  }
8030
8053
  };
8031
8054
  }, Alert = factory((_props, ref) => {
8032
- const props = useProps("Alert", defaultProps$16, _props), {
8055
+ const props = useProps("Alert", defaultProps$1k, _props), {
8033
8056
  classNames,
8034
8057
  className,
8035
8058
  style,
@@ -8050,7 +8073,7 @@ const classes$t = __default__$t, defaultProps$16 = {}, varsResolver$t = (theme,
8050
8073
  ...others
8051
8074
  } = props, getStyles2 = useStyles({
8052
8075
  name: "Alert",
8053
- classes: classes$t,
8076
+ classes: classes$v,
8054
8077
  props,
8055
8078
  className,
8056
8079
  style,
@@ -8058,7 +8081,7 @@ const classes$t = __default__$t, defaultProps$16 = {}, varsResolver$t = (theme,
8058
8081
  styles,
8059
8082
  unstyled,
8060
8083
  vars,
8061
- varsResolver: varsResolver$t
8084
+ varsResolver: varsResolver$u
8062
8085
  }), rootId = useId$1(id), titleId = title && `${rootId}-title` || void 0, bodyId = `${rootId}-body`;
8063
8086
  return /* @__PURE__ */ jsx(
8064
8087
  Box,
@@ -8093,19 +8116,19 @@ const classes$t = __default__$t, defaultProps$16 = {}, varsResolver$t = (theme,
8093
8116
  }
8094
8117
  );
8095
8118
  });
8096
- Alert.classes = classes$t;
8119
+ Alert.classes = classes$v;
8097
8120
  Alert.displayName = "@mantine/core/Alert";
8098
- var __default__$s = { root: "m_b6d8b162" };
8099
- const classes$s = __default__$s;
8121
+ var __default__$u = { root: "m_b6d8b162" };
8122
+ const classes$u = __default__$u;
8100
8123
  function getTextTruncate(truncate) {
8101
8124
  if (truncate === "start")
8102
8125
  return "start";
8103
8126
  if (truncate === "end" || truncate)
8104
8127
  return "end";
8105
8128
  }
8106
- const defaultProps$15 = {
8129
+ const defaultProps$1j = {
8107
8130
  inherit: !1
8108
- }, varsResolver$s = (theme, { variant, lineClamp, gradient, size: size2, color }) => ({
8131
+ }, varsResolver$t = (theme, { variant, lineClamp, gradient, size: size2, color }) => ({
8109
8132
  root: {
8110
8133
  "--text-fz": getFontSize(size2),
8111
8134
  "--text-lh": getLineHeight(size2),
@@ -8114,7 +8137,7 @@ const defaultProps$15 = {
8114
8137
  "--text-color": color ? getThemeColor(color, theme) : void 0
8115
8138
  }
8116
8139
  }), Text = polymorphicFactory((_props, ref) => {
8117
- const props = useProps("Text", defaultProps$15, _props), {
8140
+ const props = useProps("Text", defaultProps$1j, _props), {
8118
8141
  lineClamp,
8119
8142
  truncate,
8120
8143
  inline: inline2,
@@ -8135,14 +8158,14 @@ const defaultProps$15 = {
8135
8158
  } = props, getStyles2 = useStyles({
8136
8159
  name: ["Text", __staticSelector],
8137
8160
  props,
8138
- classes: classes$s,
8161
+ classes: classes$u,
8139
8162
  className,
8140
8163
  style,
8141
8164
  classNames,
8142
8165
  styles,
8143
8166
  unstyled,
8144
8167
  vars,
8145
- varsResolver: varsResolver$s
8168
+ varsResolver: varsResolver$t
8146
8169
  });
8147
8170
  return /* @__PURE__ */ jsx(
8148
8171
  Box,
@@ -8165,15 +8188,15 @@ const defaultProps$15 = {
8165
8188
  }
8166
8189
  );
8167
8190
  });
8168
- Text.classes = classes$s;
8191
+ Text.classes = classes$u;
8169
8192
  Text.displayName = "@mantine/core/Text";
8170
- var __default__$r = { root: "m_849cf0da" };
8171
- const classes$r = __default__$r, defaultProps$14 = {
8193
+ var __default__$t = { root: "m_849cf0da" };
8194
+ const classes$t = __default__$t, defaultProps$1i = {
8172
8195
  underline: "hover"
8173
8196
  }, Anchor = polymorphicFactory((props, ref) => {
8174
8197
  const { underline, className, unstyled, mod, ...others } = useProps(
8175
8198
  "Anchor",
8176
- defaultProps$14,
8199
+ defaultProps$1i,
8177
8200
  props
8178
8201
  );
8179
8202
  return /* @__PURE__ */ jsx(
@@ -8181,7 +8204,7 @@ const classes$r = __default__$r, defaultProps$14 = {
8181
8204
  {
8182
8205
  component: "a",
8183
8206
  ref,
8184
- className: clsx({ [classes$r.root]: !unstyled }, className),
8207
+ className: clsx({ [classes$t.root]: !unstyled }, className),
8185
8208
  ...others,
8186
8209
  mod: [{ underline }, mod],
8187
8210
  __staticSelector: "Anchor",
@@ -8189,7 +8212,7 @@ const classes$r = __default__$r, defaultProps$14 = {
8189
8212
  }
8190
8213
  );
8191
8214
  });
8192
- Anchor.classes = classes$r;
8215
+ Anchor.classes = classes$t;
8193
8216
  Anchor.displayName = "@mantine/core/Anchor";
8194
8217
  function parseItem(item) {
8195
8218
  return typeof item == "string" ? { value: item, label: item } : "value" in item && !("label" in item) ? { value: item.value, label: item.value, disabled: item.disabled } : typeof item == "number" ? { value: item.toString(), label: item.toString() } : "group" in item ? {
@@ -8203,17 +8226,17 @@ function getParsedComboboxData(data) {
8203
8226
  function getOptionsLockup(options) {
8204
8227
  return options.reduce((acc, item) => "group" in item ? { ...acc, ...getOptionsLockup(item.items) } : (acc[item.value] = item, acc), {});
8205
8228
  }
8206
- var __default__$q = { dropdown: "m_88b62a41", search: "m_985517d8", options: "m_b2821a6e", option: "m_92253aa5", empty: "m_2530cd1d", header: "m_858f94bd", footer: "m_82b967cb", group: "m_254f3e4f", groupLabel: "m_2bb2e9e5", chevron: "m_2943220b", optionsDropdownOption: "m_390b5f4", optionsDropdownCheckIcon: "m_8ee53fc2" };
8207
- const classes$q = __default__$q, defaultProps$13 = {
8229
+ var __default__$s = { dropdown: "m_88b62a41", search: "m_985517d8", options: "m_b2821a6e", option: "m_92253aa5", empty: "m_2530cd1d", header: "m_858f94bd", footer: "m_82b967cb", group: "m_254f3e4f", groupLabel: "m_2bb2e9e5", chevron: "m_2943220b", optionsDropdownOption: "m_390b5f4", optionsDropdownCheckIcon: "m_8ee53fc2" };
8230
+ const classes$s = __default__$s, defaultProps$1h = {
8208
8231
  error: null
8209
- }, varsResolver$r = (_, { size: size2 }) => ({
8232
+ }, varsResolver$s = (_, { size: size2 }) => ({
8210
8233
  chevron: {
8211
8234
  "--combobox-chevron-size": getSize(size2, "combobox-chevron-size")
8212
8235
  }
8213
8236
  }), ComboboxChevron = factory((_props, ref) => {
8214
- const props = useProps("ComboboxChevron", defaultProps$13, _props), { size: size2, error, style, className, classNames, styles, unstyled, vars, mod, ...others } = props, getStyles2 = useStyles({
8237
+ const props = useProps("ComboboxChevron", defaultProps$1h, _props), { size: size2, error, style, className, classNames, styles, unstyled, vars, mod, ...others } = props, getStyles2 = useStyles({
8215
8238
  name: "ComboboxChevron",
8216
- classes: classes$q,
8239
+ classes: classes$s,
8217
8240
  props,
8218
8241
  style,
8219
8242
  className,
@@ -8221,7 +8244,7 @@ const classes$q = __default__$q, defaultProps$13 = {
8221
8244
  styles,
8222
8245
  unstyled,
8223
8246
  vars,
8224
- varsResolver: varsResolver$r,
8247
+ varsResolver: varsResolver$s,
8225
8248
  rootSelector: "chevron"
8226
8249
  });
8227
8250
  return /* @__PURE__ */ jsx(
@@ -8248,7 +8271,7 @@ const classes$q = __default__$q, defaultProps$13 = {
8248
8271
  }
8249
8272
  );
8250
8273
  });
8251
- ComboboxChevron.classes = classes$q;
8274
+ ComboboxChevron.classes = classes$s;
8252
8275
  ComboboxChevron.displayName = "@mantine/core/ComboboxChevron";
8253
8276
  const [ComboboxProvider, useComboboxContext] = createSafeContext(
8254
8277
  "Combobox component was not found in tree"
@@ -8272,10 +8295,10 @@ const [ComboboxProvider, useComboboxContext] = createSafeContext(
8272
8295
  )
8273
8296
  );
8274
8297
  ComboboxClearButton.displayName = "@mantine/core/ComboboxClearButton";
8275
- const defaultProps$12 = {}, ComboboxDropdown = factory((props, ref) => {
8298
+ const defaultProps$1g = {}, ComboboxDropdown = factory((props, ref) => {
8276
8299
  const { classNames, styles, className, style, hidden: hidden2, ...others } = useProps(
8277
8300
  "ComboboxDropdown",
8278
- defaultProps$12,
8301
+ defaultProps$1g,
8279
8302
  props
8280
8303
  ), ctx = useComboboxContext();
8281
8304
  return /* @__PURE__ */ jsx(
@@ -8289,12 +8312,12 @@ const defaultProps$12 = {}, ComboboxDropdown = factory((props, ref) => {
8289
8312
  }
8290
8313
  );
8291
8314
  });
8292
- ComboboxDropdown.classes = classes$q;
8315
+ ComboboxDropdown.classes = classes$s;
8293
8316
  ComboboxDropdown.displayName = "@mantine/core/ComboboxDropdown";
8294
- const defaultProps$11 = {
8317
+ const defaultProps$1f = {
8295
8318
  refProp: "ref"
8296
8319
  }, ComboboxDropdownTarget = factory((props, ref) => {
8297
- const { children, refProp } = useProps("ComboboxDropdownTarget", defaultProps$11, props);
8320
+ const { children, refProp } = useProps("ComboboxDropdownTarget", defaultProps$1f, props);
8298
8321
  if (useComboboxContext(), !isElement$1(children))
8299
8322
  throw new Error(
8300
8323
  "Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
@@ -8302,10 +8325,10 @@ const defaultProps$11 = {
8302
8325
  return /* @__PURE__ */ jsx(Popover.Target, { ref, refProp, children });
8303
8326
  });
8304
8327
  ComboboxDropdownTarget.displayName = "@mantine/core/ComboboxDropdownTarget";
8305
- const defaultProps$10 = {}, ComboboxEmpty = factory((props, ref) => {
8328
+ const defaultProps$1e = {}, ComboboxEmpty = factory((props, ref) => {
8306
8329
  const { classNames, className, style, styles, vars, ...others } = useProps(
8307
8330
  "ComboboxEmpty",
8308
- defaultProps$10,
8331
+ defaultProps$1e,
8309
8332
  props
8310
8333
  ), ctx = useComboboxContext();
8311
8334
  return /* @__PURE__ */ jsx(
@@ -8317,7 +8340,7 @@ const defaultProps$10 = {}, ComboboxEmpty = factory((props, ref) => {
8317
8340
  }
8318
8341
  );
8319
8342
  });
8320
- ComboboxEmpty.classes = classes$q;
8343
+ ComboboxEmpty.classes = classes$s;
8321
8344
  ComboboxEmpty.displayName = "@mantine/core/ComboboxEmpty";
8322
8345
  function useComboboxTargetProps({
8323
8346
  onKeyDown,
@@ -8331,7 +8354,7 @@ function useComboboxTargetProps({
8331
8354
  if (onKeyDown?.(event), !ctx.readOnly && withKeyboardNavigation) {
8332
8355
  if (event.nativeEvent.isComposing)
8333
8356
  return;
8334
- if (event.nativeEvent.code === "ArrowDown" && (event.preventDefault(), ctx.store.dropdownOpened ? setSelectedOptionId(ctx.store.selectNextOption()) : (ctx.store.openDropdown("keyboard"), setSelectedOptionId(ctx.store.selectActiveOption()))), event.nativeEvent.code === "ArrowUp" && (event.preventDefault(), ctx.store.dropdownOpened ? setSelectedOptionId(ctx.store.selectPreviousOption()) : (ctx.store.openDropdown("keyboard"), setSelectedOptionId(ctx.store.selectActiveOption()))), event.nativeEvent.code === "Enter" || event.nativeEvent.code === "NumpadEnter") {
8357
+ if (event.nativeEvent.code === "ArrowDown" && (event.preventDefault(), ctx.store.dropdownOpened ? setSelectedOptionId(ctx.store.selectNextOption()) : (ctx.store.openDropdown("keyboard"), setSelectedOptionId(ctx.store.selectActiveOption()), ctx.store.updateSelectedOptionIndex("selected", { scrollIntoView: !0 }))), event.nativeEvent.code === "ArrowUp" && (event.preventDefault(), ctx.store.dropdownOpened ? setSelectedOptionId(ctx.store.selectPreviousOption()) : (ctx.store.openDropdown("keyboard"), setSelectedOptionId(ctx.store.selectActiveOption()), ctx.store.updateSelectedOptionIndex("selected", { scrollIntoView: !0 }))), event.nativeEvent.code === "Enter" || event.nativeEvent.code === "NumpadEnter") {
8335
8358
  if (event.nativeEvent.keyCode === 229)
8336
8359
  return;
8337
8360
  const selectedOptionIndex = ctx.store.getSelectedOptionIndex();
@@ -8344,7 +8367,7 @@ function useComboboxTargetProps({
8344
8367
  ...withAriaAttributes ? {
8345
8368
  "aria-haspopup": "listbox",
8346
8369
  "aria-expanded": withExpandedAttribute && !!(ctx.store.listId && ctx.store.dropdownOpened) || void 0,
8347
- "aria-controls": ctx.store.listId,
8370
+ "aria-controls": ctx.store.dropdownOpened ? ctx.store.listId : void 0,
8348
8371
  "aria-activedescendant": ctx.store.dropdownOpened && selectedOptionId || void 0,
8349
8372
  autoComplete,
8350
8373
  "data-expanded": ctx.store.dropdownOpened || void 0,
@@ -8353,7 +8376,7 @@ function useComboboxTargetProps({
8353
8376
  onKeyDown: handleKeyDown
8354
8377
  };
8355
8378
  }
8356
- const defaultProps$$ = {
8379
+ const defaultProps$1d = {
8357
8380
  refProp: "ref",
8358
8381
  targetType: "input",
8359
8382
  withKeyboardNavigation: !0,
@@ -8370,7 +8393,7 @@ const defaultProps$$ = {
8370
8393
  targetType,
8371
8394
  autoComplete,
8372
8395
  ...others
8373
- } = useProps("ComboboxEventsTarget", defaultProps$$, props);
8396
+ } = useProps("ComboboxEventsTarget", defaultProps$1d, props);
8374
8397
  if (!isElement$1(children))
8375
8398
  throw new Error(
8376
8399
  "Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
@@ -8386,14 +8409,14 @@ const defaultProps$$ = {
8386
8409
  return cloneElement(children, {
8387
8410
  ...targetProps,
8388
8411
  ...others,
8389
- [refProp]: useMergedRef(ref, ctx.store.targetRef, children?.ref)
8412
+ [refProp]: useMergedRef(ref, ctx.store.targetRef, getRefProp(children))
8390
8413
  });
8391
8414
  });
8392
8415
  ComboboxEventsTarget.displayName = "@mantine/core/ComboboxEventsTarget";
8393
- const defaultProps$_ = {}, ComboboxFooter = factory((props, ref) => {
8416
+ const defaultProps$1c = {}, ComboboxFooter = factory((props, ref) => {
8394
8417
  const { classNames, className, style, styles, vars, ...others } = useProps(
8395
8418
  "ComboboxFooter",
8396
- defaultProps$_,
8419
+ defaultProps$1c,
8397
8420
  props
8398
8421
  ), ctx = useComboboxContext();
8399
8422
  return /* @__PURE__ */ jsx(
@@ -8408,12 +8431,12 @@ const defaultProps$_ = {}, ComboboxFooter = factory((props, ref) => {
8408
8431
  }
8409
8432
  );
8410
8433
  });
8411
- ComboboxFooter.classes = classes$q;
8434
+ ComboboxFooter.classes = classes$s;
8412
8435
  ComboboxFooter.displayName = "@mantine/core/ComboboxFooter";
8413
- const defaultProps$Z = {}, ComboboxGroup = factory((props, ref) => {
8436
+ const defaultProps$1b = {}, ComboboxGroup = factory((props, ref) => {
8414
8437
  const { classNames, className, style, styles, vars, children, label, ...others } = useProps(
8415
8438
  "ComboboxGroup",
8416
- defaultProps$Z,
8439
+ defaultProps$1b,
8417
8440
  props
8418
8441
  ), ctx = useComboboxContext();
8419
8442
  return /* @__PURE__ */ jsxs(
@@ -8429,12 +8452,12 @@ const defaultProps$Z = {}, ComboboxGroup = factory((props, ref) => {
8429
8452
  }
8430
8453
  );
8431
8454
  });
8432
- ComboboxGroup.classes = classes$q;
8455
+ ComboboxGroup.classes = classes$s;
8433
8456
  ComboboxGroup.displayName = "@mantine/core/ComboboxGroup";
8434
- const defaultProps$Y = {}, ComboboxHeader = factory((props, ref) => {
8457
+ const defaultProps$1a = {}, ComboboxHeader = factory((props, ref) => {
8435
8458
  const { classNames, className, style, styles, vars, ...others } = useProps(
8436
8459
  "ComboboxHeader",
8437
- defaultProps$Y,
8460
+ defaultProps$1a,
8438
8461
  props
8439
8462
  ), ctx = useComboboxContext();
8440
8463
  return /* @__PURE__ */ jsx(
@@ -8449,7 +8472,7 @@ const defaultProps$Y = {}, ComboboxHeader = factory((props, ref) => {
8449
8472
  }
8450
8473
  );
8451
8474
  });
8452
- ComboboxHeader.classes = classes$q;
8475
+ ComboboxHeader.classes = classes$s;
8453
8476
  ComboboxHeader.displayName = "@mantine/core/ComboboxHeader";
8454
8477
  function ComboboxHiddenInput({
8455
8478
  value,
@@ -8466,8 +8489,8 @@ function ComboboxHiddenInput({
8466
8489
  );
8467
8490
  }
8468
8491
  ComboboxHiddenInput.displayName = "@mantine/core/ComboboxHiddenInput";
8469
- const defaultProps$X = {}, ComboboxOption = factory((_props, ref) => {
8470
- const props = useProps("ComboboxOption", defaultProps$X, _props), {
8492
+ const defaultProps$19 = {}, ComboboxOption = factory((_props, ref) => {
8493
+ const props = useProps("ComboboxOption", defaultProps$19, _props), {
8471
8494
  classNames,
8472
8495
  className,
8473
8496
  style,
@@ -8508,10 +8531,10 @@ const defaultProps$X = {}, ComboboxOption = factory((_props, ref) => {
8508
8531
  }
8509
8532
  );
8510
8533
  });
8511
- ComboboxOption.classes = classes$q;
8534
+ ComboboxOption.classes = classes$s;
8512
8535
  ComboboxOption.displayName = "@mantine/core/ComboboxOption";
8513
- const defaultProps$W = {}, ComboboxOptions = factory((_props, ref) => {
8514
- const props = useProps("ComboboxOptions", defaultProps$W, _props), { classNames, className, style, styles, id, onMouseDown, labelledBy, ...others } = props, ctx = useComboboxContext(), _id = useId$1(id);
8536
+ const defaultProps$18 = {}, ComboboxOptions = factory((_props, ref) => {
8537
+ const props = useProps("ComboboxOptions", defaultProps$18, _props), { classNames, className, style, styles, id, onMouseDown, labelledBy, ...others } = props, ctx = useComboboxContext(), _id = useId$1(id);
8515
8538
  return useEffect(() => {
8516
8539
  ctx.store.setListId(_id);
8517
8540
  }, [_id]), /* @__PURE__ */ jsx(
@@ -8529,13 +8552,13 @@ const defaultProps$W = {}, ComboboxOptions = factory((_props, ref) => {
8529
8552
  }
8530
8553
  );
8531
8554
  });
8532
- ComboboxOptions.classes = classes$q;
8555
+ ComboboxOptions.classes = classes$s;
8533
8556
  ComboboxOptions.displayName = "@mantine/core/ComboboxOptions";
8534
- const defaultProps$V = {
8557
+ const defaultProps$17 = {
8535
8558
  withAriaAttributes: !0,
8536
8559
  withKeyboardNavigation: !0
8537
8560
  }, ComboboxSearch = factory((_props, ref) => {
8538
- const props = useProps("ComboboxSearch", defaultProps$V, _props), {
8561
+ const props = useProps("ComboboxSearch", defaultProps$17, _props), {
8539
8562
  classNames,
8540
8563
  styles,
8541
8564
  unstyled,
@@ -8566,9 +8589,9 @@ const defaultProps$V = {
8566
8589
  }
8567
8590
  );
8568
8591
  });
8569
- ComboboxSearch.classes = classes$q;
8592
+ ComboboxSearch.classes = classes$s;
8570
8593
  ComboboxSearch.displayName = "@mantine/core/ComboboxSearch";
8571
- const defaultProps$U = {
8594
+ const defaultProps$16 = {
8572
8595
  refProp: "ref",
8573
8596
  targetType: "input",
8574
8597
  withKeyboardNavigation: !0,
@@ -8585,7 +8608,7 @@ const defaultProps$U = {
8585
8608
  targetType,
8586
8609
  autoComplete,
8587
8610
  ...others
8588
- } = useProps("ComboboxTarget", defaultProps$U, props);
8611
+ } = useProps("ComboboxTarget", defaultProps$16, props);
8589
8612
  if (!isElement$1(children))
8590
8613
  throw new Error(
8591
8614
  "Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
@@ -8727,7 +8750,7 @@ function useCombobox({
8727
8750
  document.querySelectorAll(
8728
8751
  `#${listId.current} [data-combobox-option]`
8729
8752
  )?.[selectedOptionIndex.current]?.click();
8730
- }, []), setListId = useCallback((id) => {
8753
+ }, []), setListId2 = useCallback((id) => {
8731
8754
  listId.current = id;
8732
8755
  }, []), focusSearchInput = useCallback(() => {
8733
8756
  focusSearchTimeout.current = window.setTimeout(() => searchRef.current.focus(), 0);
@@ -8754,7 +8777,7 @@ function useCombobox({
8754
8777
  resetSelectedOption,
8755
8778
  updateSelectedOptionIndex,
8756
8779
  listId: listId.current,
8757
- setListId,
8780
+ setListId: setListId2,
8758
8781
  clickSelectedOption,
8759
8782
  searchRef,
8760
8783
  focusSearchInput,
@@ -8762,13 +8785,13 @@ function useCombobox({
8762
8785
  focusTarget
8763
8786
  };
8764
8787
  }
8765
- const defaultProps$T = {
8788
+ const defaultProps$15 = {
8766
8789
  keepMounted: !0,
8767
8790
  withinPortal: !0,
8768
8791
  resetSelectionOnOptionHover: !1,
8769
8792
  width: "target",
8770
8793
  transitionProps: { transition: "fade", duration: 0 }
8771
- }, varsResolver$q = (_, { size: size2, dropdownPadding }) => ({
8794
+ }, varsResolver$r = (_, { size: size2, dropdownPadding }) => ({
8772
8795
  options: {
8773
8796
  "--combobox-option-fz": getFontSize(size2),
8774
8797
  "--combobox-option-padding": getSize(size2, "combobox-option-padding")
@@ -8780,7 +8803,7 @@ const defaultProps$T = {
8780
8803
  }
8781
8804
  });
8782
8805
  function Combobox(_props) {
8783
- const props = useProps("Combobox", defaultProps$T, _props), {
8806
+ const props = useProps("Combobox", defaultProps$15, _props), {
8784
8807
  classNames,
8785
8808
  styles,
8786
8809
  unstyled,
@@ -8797,13 +8820,13 @@ function Combobox(_props) {
8797
8820
  ...others
8798
8821
  } = props, uncontrolledStore = useCombobox(), store = controlledStore || uncontrolledStore, getStyles2 = useStyles({
8799
8822
  name: __staticSelector || "Combobox",
8800
- classes: classes$q,
8823
+ classes: classes$s,
8801
8824
  props,
8802
8825
  classNames,
8803
8826
  styles,
8804
8827
  unstyled,
8805
8828
  vars,
8806
- varsResolver: varsResolver$q
8829
+ varsResolver: varsResolver$r
8807
8830
  }), onDropdownClose = () => {
8808
8831
  onClose?.(), store.closeDropdown();
8809
8832
  };
@@ -8834,7 +8857,7 @@ function Combobox(_props) {
8834
8857
  }
8835
8858
  const extendCombobox = (c) => c;
8836
8859
  Combobox.extend = extendCombobox;
8837
- Combobox.classes = classes$q;
8860
+ Combobox.classes = classes$s;
8838
8861
  Combobox.displayName = "@mantine/core/Combobox";
8839
8862
  Combobox.Target = ComboboxTarget;
8840
8863
  Combobox.Dropdown = ComboboxDropdown;
@@ -8936,7 +8959,7 @@ function Option({
8936
8959
  renderOption
8937
8960
  }) {
8938
8961
  if (!isOptionsGroup(data)) {
8939
- const checked = isValueChecked(value, data.value), check = withCheckIcon && checked && /* @__PURE__ */ jsx(CheckIcon, { className: classes$q.optionsDropdownCheckIcon }), defaultContent = /* @__PURE__ */ jsxs(Fragment$1, { children: [
8962
+ const checked = isValueChecked(value, data.value), check = withCheckIcon && checked && /* @__PURE__ */ jsx(CheckIcon, { className: classes$s.optionsDropdownCheckIcon }), defaultContent = /* @__PURE__ */ jsxs(Fragment$1, { children: [
8940
8963
  checkIconPosition === "left" && check,
8941
8964
  /* @__PURE__ */ jsx("span", { children: data.label }),
8942
8965
  checkIconPosition === "right" && check
@@ -8946,7 +8969,7 @@ function Option({
8946
8969
  {
8947
8970
  value: data.value,
8948
8971
  disabled: data.disabled,
8949
- className: clsx({ [classes$q.optionsDropdownOption]: !unstyled }),
8972
+ className: clsx({ [classes$s.optionsDropdownOption]: !unstyled }),
8950
8973
  "data-reverse": checkIconPosition === "right" || void 0,
8951
8974
  "data-checked": checked || void 0,
8952
8975
  "aria-selected": checked,
@@ -9021,8 +9044,8 @@ function OptionsDropdown({
9021
9044
  isEmpty && nothingFoundMessage && /* @__PURE__ */ jsx(Combobox.Empty, { children: nothingFoundMessage })
9022
9045
  ] }) });
9023
9046
  }
9024
- var __default__$p = { root: "m_347db0ec", "root--dot": "m_fbd81e3d", label: "m_5add502a", section: "m_91fdda9b" };
9025
- const classes$p = __default__$p, defaultProps$S = {}, varsResolver$p = (theme, { radius, color, gradient, variant, size: size2, autoContrast }) => {
9047
+ var __default__$r = { root: "m_347db0ec", "root--dot": "m_fbd81e3d", label: "m_5add502a", section: "m_91fdda9b" };
9048
+ const classes$r = __default__$r, defaultProps$14 = {}, varsResolver$q = (theme, { radius, color, gradient, variant, size: size2, autoContrast }) => {
9026
9049
  const colors = theme.variantColorResolver({
9027
9050
  color: color || theme.primaryColor,
9028
9051
  theme,
@@ -9043,7 +9066,7 @@ const classes$p = __default__$p, defaultProps$S = {}, varsResolver$p = (theme, {
9043
9066
  }
9044
9067
  };
9045
9068
  }, Badge = polymorphicFactory((_props, ref) => {
9046
- const props = useProps("Badge", defaultProps$S, _props), {
9069
+ const props = useProps("Badge", defaultProps$14, _props), {
9047
9070
  classNames,
9048
9071
  className,
9049
9072
  style,
@@ -9065,14 +9088,14 @@ const classes$p = __default__$p, defaultProps$S = {}, varsResolver$p = (theme, {
9065
9088
  } = props, getStyles2 = useStyles({
9066
9089
  name: "Badge",
9067
9090
  props,
9068
- classes: classes$p,
9091
+ classes: classes$r,
9069
9092
  className,
9070
9093
  style,
9071
9094
  classNames,
9072
9095
  styles,
9073
9096
  unstyled,
9074
9097
  vars,
9075
- varsResolver: varsResolver$p
9098
+ varsResolver: varsResolver$q
9076
9099
  });
9077
9100
  return /* @__PURE__ */ jsxs(
9078
9101
  Box,
@@ -9098,10 +9121,10 @@ const classes$p = __default__$p, defaultProps$S = {}, varsResolver$p = (theme, {
9098
9121
  }
9099
9122
  );
9100
9123
  });
9101
- Badge.classes = classes$p;
9124
+ Badge.classes = classes$r;
9102
9125
  Badge.displayName = "@mantine/core/Badge";
9103
- var __default__$o = { root: "m_fea6bf1a", burger: "m_d4fb9cad" };
9104
- const classes$o = __default__$o, defaultProps$R = {}, varsResolver$o = (theme, { color, size: size2, lineSize, transitionDuration, transitionTimingFunction }) => ({
9126
+ var __default__$q = { root: "m_fea6bf1a", burger: "m_d4fb9cad" };
9127
+ const classes$q = __default__$q, defaultProps$13 = {}, varsResolver$p = (theme, { color, size: size2, lineSize, transitionDuration, transitionTimingFunction }) => ({
9105
9128
  root: {
9106
9129
  "--burger-color": color ? getThemeColor(color, theme) : void 0,
9107
9130
  "--burger-size": getSize(size2, "burger-size"),
@@ -9110,7 +9133,7 @@ const classes$o = __default__$o, defaultProps$R = {}, varsResolver$o = (theme, {
9110
9133
  "--burger-transition-timing-function": transitionTimingFunction
9111
9134
  }
9112
9135
  }), Burger = factory((_props, ref) => {
9113
- const props = useProps("Burger", defaultProps$R, _props), {
9136
+ const props = useProps("Burger", defaultProps$13, _props), {
9114
9137
  classNames,
9115
9138
  className,
9116
9139
  style,
@@ -9125,7 +9148,7 @@ const classes$o = __default__$o, defaultProps$R = {}, varsResolver$o = (theme, {
9125
9148
  ...others
9126
9149
  } = props, getStyles2 = useStyles({
9127
9150
  name: "Burger",
9128
- classes: classes$o,
9151
+ classes: classes$q,
9129
9152
  props,
9130
9153
  className,
9131
9154
  style,
@@ -9133,22 +9156,22 @@ const classes$o = __default__$o, defaultProps$R = {}, varsResolver$o = (theme, {
9133
9156
  styles,
9134
9157
  unstyled,
9135
9158
  vars,
9136
- varsResolver: varsResolver$o
9159
+ varsResolver: varsResolver$p
9137
9160
  });
9138
9161
  return /* @__PURE__ */ jsxs(UnstyledButton, { ...getStyles2("root"), ref, ...others, children: [
9139
9162
  /* @__PURE__ */ jsx(Box, { mod: ["reduce-motion", { opened }], ...getStyles2("burger") }),
9140
9163
  children
9141
9164
  ] });
9142
9165
  });
9143
- Burger.classes = classes$o;
9166
+ Burger.classes = classes$q;
9144
9167
  Burger.displayName = "@mantine/core/Burger";
9145
- var __default__$n = { root: "m_77c9d27d", inner: "m_80f1301b", label: "m_811560b9", section: "m_a74036a", loader: "m_a25b86ee", group: "m_80d6d844" };
9146
- const classes$n = __default__$n, defaultProps$Q = {
9168
+ var __default__$p = { root: "m_77c9d27d", inner: "m_80f1301b", label: "m_811560b9", section: "m_a74036a", loader: "m_a25b86ee", group: "m_80d6d844" };
9169
+ const classes$p = __default__$p, defaultProps$12 = {
9147
9170
  orientation: "horizontal"
9148
- }, varsResolver$n = (_, { borderWidth }) => ({
9171
+ }, varsResolver$o = (_, { borderWidth }) => ({
9149
9172
  group: { "--button-border-width": rem(borderWidth) }
9150
9173
  }), ButtonGroup = factory((_props, ref) => {
9151
- const props = useProps("ButtonGroup", defaultProps$Q, _props), {
9174
+ const props = useProps("ButtonGroup", defaultProps$12, _props), {
9152
9175
  className,
9153
9176
  style,
9154
9177
  classNames,
@@ -9160,17 +9183,17 @@ const classes$n = __default__$n, defaultProps$Q = {
9160
9183
  variant,
9161
9184
  mod,
9162
9185
  ...others
9163
- } = useProps("ButtonGroup", defaultProps$Q, _props), getStyles2 = useStyles({
9186
+ } = useProps("ButtonGroup", defaultProps$12, _props), getStyles2 = useStyles({
9164
9187
  name: "ButtonGroup",
9165
9188
  props,
9166
- classes: classes$n,
9189
+ classes: classes$p,
9167
9190
  className,
9168
9191
  style,
9169
9192
  classNames,
9170
9193
  styles,
9171
9194
  unstyled,
9172
9195
  vars,
9173
- varsResolver: varsResolver$n,
9196
+ varsResolver: varsResolver$o,
9174
9197
  rootSelector: "group"
9175
9198
  });
9176
9199
  return /* @__PURE__ */ jsx(
@@ -9185,14 +9208,14 @@ const classes$n = __default__$n, defaultProps$Q = {
9185
9208
  }
9186
9209
  );
9187
9210
  });
9188
- ButtonGroup.classes = classes$n;
9211
+ ButtonGroup.classes = classes$p;
9189
9212
  ButtonGroup.displayName = "@mantine/core/ButtonGroup";
9190
9213
  const loaderTransition = {
9191
9214
  in: { opacity: 1, transform: `translate(-50%, calc(-50% + ${rem(1)}))` },
9192
9215
  out: { opacity: 0, transform: "translate(-50%, -200%)" },
9193
9216
  common: { transformOrigin: "center" },
9194
9217
  transitionProperty: "transform, opacity"
9195
- }, defaultProps$P = {}, varsResolver$m = (theme, { radius, color, gradient, variant, size: size2, justify, autoContrast }) => {
9218
+ }, defaultProps$11 = {}, varsResolver$n = (theme, { radius, color, gradient, variant, size: size2, justify, autoContrast }) => {
9196
9219
  const colors = theme.variantColorResolver({
9197
9220
  color: color || theme.primaryColor,
9198
9221
  theme,
@@ -9215,7 +9238,7 @@ const loaderTransition = {
9215
9238
  }
9216
9239
  };
9217
9240
  }, Button = polymorphicFactory((_props, ref) => {
9218
- const props = useProps("Button", defaultProps$P, _props), {
9241
+ const props = useProps("Button", defaultProps$11, _props), {
9219
9242
  style,
9220
9243
  vars,
9221
9244
  className,
@@ -9240,14 +9263,14 @@ const loaderTransition = {
9240
9263
  } = props, getStyles2 = useStyles({
9241
9264
  name: "Button",
9242
9265
  props,
9243
- classes: classes$n,
9266
+ classes: classes$p,
9244
9267
  className,
9245
9268
  style,
9246
9269
  classNames,
9247
9270
  styles,
9248
9271
  unstyled,
9249
9272
  vars,
9250
- varsResolver: varsResolver$m
9273
+ varsResolver: varsResolver$n
9251
9274
  }), hasLeftSection = !!leftSection, hasRightSection = !!rightSection;
9252
9275
  return /* @__PURE__ */ jsxs(
9253
9276
  UnstyledButton,
@@ -9286,15 +9309,15 @@ const loaderTransition = {
9286
9309
  }
9287
9310
  );
9288
9311
  });
9289
- Button.classes = classes$n;
9312
+ Button.classes = classes$p;
9290
9313
  Button.displayName = "@mantine/core/Button";
9291
9314
  Button.Group = ButtonGroup;
9292
9315
  const [CardProvider, useCardContext] = createSafeContext(
9293
9316
  "Card component was not found in tree"
9294
9317
  );
9295
- var __default__$m = { root: "m_e615b15f", section: "m_599a2148" };
9296
- const classes$m = __default__$m, defaultProps$O = {}, CardSection = polymorphicFactory((_props, ref) => {
9297
- const props = useProps("CardSection", defaultProps$O, _props), { classNames, className, style, styles, vars, withBorder, inheritPadding, mod, ...others } = props, ctx = useCardContext();
9318
+ var __default__$o = { root: "m_e615b15f", section: "m_599a2148" };
9319
+ const classes$o = __default__$o, defaultProps$10 = {}, CardSection = polymorphicFactory((_props, ref) => {
9320
+ const props = useProps("CardSection", defaultProps$10, _props), { classNames, className, style, styles, vars, withBorder, inheritPadding, mod, ...others } = props, ctx = useCardContext();
9298
9321
  return /* @__PURE__ */ jsx(
9299
9322
  Box,
9300
9323
  {
@@ -9305,39 +9328,39 @@ const classes$m = __default__$m, defaultProps$O = {}, CardSection = polymorphicF
9305
9328
  }
9306
9329
  );
9307
9330
  });
9308
- CardSection.classes = classes$m;
9331
+ CardSection.classes = classes$o;
9309
9332
  CardSection.displayName = "@mantine/core/CardSection";
9310
- const defaultProps$N = {}, varsResolver$l = (_, { padding }) => ({
9333
+ const defaultProps$$ = {}, varsResolver$m = (_, { padding }) => ({
9311
9334
  root: {
9312
9335
  "--card-padding": getSpacing(padding)
9313
9336
  }
9314
9337
  }), Card = polymorphicFactory((_props, ref) => {
9315
- const props = useProps("Card", defaultProps$N, _props), { classNames, className, style, styles, unstyled, vars, children, padding, ...others } = props, getStyles2 = useStyles({
9338
+ const props = useProps("Card", defaultProps$$, _props), { classNames, className, style, styles, unstyled, vars, children, padding, ...others } = props, getStyles2 = useStyles({
9316
9339
  name: "Card",
9317
9340
  props,
9318
- classes: classes$m,
9341
+ classes: classes$o,
9319
9342
  className,
9320
9343
  style,
9321
9344
  classNames,
9322
9345
  styles,
9323
9346
  unstyled,
9324
9347
  vars,
9325
- varsResolver: varsResolver$l
9348
+ varsResolver: varsResolver$m
9326
9349
  }), _children = Children.toArray(children), content = _children.map((child, index2) => typeof child == "object" && child && "type" in child && child.type === CardSection ? cloneElement(child, {
9327
9350
  "data-first-section": index2 === 0 || void 0,
9328
9351
  "data-last-section": index2 === _children.length - 1 || void 0
9329
9352
  }) : child);
9330
9353
  return /* @__PURE__ */ jsx(CardProvider, { value: { getStyles: getStyles2 }, children: /* @__PURE__ */ jsx(Paper, { ref, unstyled, ...getStyles2("root"), ...others, children: content }) });
9331
9354
  });
9332
- Card.classes = classes$m;
9355
+ Card.classes = classes$o;
9333
9356
  Card.displayName = "@mantine/core/Card";
9334
9357
  Card.Section = CardSection;
9335
- var __default__$l = { root: "m_4451eb3a" };
9336
- const classes$l = __default__$l, defaultProps$M = {}, Center = polymorphicFactory((_props, ref) => {
9337
- const props = useProps("Center", defaultProps$M, _props), { classNames, className, style, styles, unstyled, vars, inline: inline2, mod, ...others } = props, getStyles2 = useStyles({
9358
+ var __default__$n = { root: "m_4451eb3a" };
9359
+ const classes$n = __default__$n, defaultProps$_ = {}, Center = polymorphicFactory((_props, ref) => {
9360
+ const props = useProps("Center", defaultProps$_, _props), { classNames, className, style, styles, unstyled, vars, inline: inline2, mod, ...others } = props, getStyles2 = useStyles({
9338
9361
  name: "Center",
9339
9362
  props,
9340
- classes: classes$l,
9363
+ classes: classes$n,
9341
9364
  className,
9342
9365
  style,
9343
9366
  classNames,
@@ -9347,15 +9370,15 @@ const classes$l = __default__$l, defaultProps$M = {}, Center = polymorphicFactor
9347
9370
  });
9348
9371
  return /* @__PURE__ */ jsx(Box, { ref, mod: [{ inline: inline2 }, mod], ...getStyles2("root"), ...others });
9349
9372
  });
9350
- Center.classes = classes$l;
9373
+ Center.classes = classes$n;
9351
9374
  Center.displayName = "@mantine/core/Center";
9352
- var __default__$k = { root: "m_b183c0a2" };
9353
- const classes$k = __default__$k, defaultProps$L = {}, varsResolver$k = (theme, { color }) => ({
9375
+ var __default__$m = { root: "m_b183c0a2" };
9376
+ const classes$m = __default__$m, defaultProps$Z = {}, varsResolver$l = (theme, { color }) => ({
9354
9377
  root: {
9355
9378
  "--code-bg": color ? getThemeColor(color, theme) : void 0
9356
9379
  }
9357
9380
  }), Code = factory((_props, ref) => {
9358
- const props = useProps("Code", defaultProps$L, _props), {
9381
+ const props = useProps("Code", defaultProps$Z, _props), {
9359
9382
  classNames,
9360
9383
  className,
9361
9384
  style,
@@ -9370,14 +9393,14 @@ const classes$k = __default__$k, defaultProps$L = {}, varsResolver$k = (theme, {
9370
9393
  } = props, getStyles2 = useStyles({
9371
9394
  name: "Code",
9372
9395
  props,
9373
- classes: classes$k,
9396
+ classes: classes$m,
9374
9397
  className,
9375
9398
  style,
9376
9399
  classNames,
9377
9400
  styles,
9378
9401
  unstyled,
9379
9402
  vars,
9380
- varsResolver: varsResolver$k
9403
+ varsResolver: varsResolver$l
9381
9404
  });
9382
9405
  return /* @__PURE__ */ jsx(
9383
9406
  Box,
@@ -9392,18 +9415,18 @@ const classes$k = __default__$k, defaultProps$L = {}, varsResolver$k = (theme, {
9392
9415
  }
9393
9416
  );
9394
9417
  });
9395
- Code.classes = classes$k;
9418
+ Code.classes = classes$m;
9396
9419
  Code.displayName = "@mantine/core/Code";
9397
- var __default__$j = { root: "m_de3d2490", colorOverlay: "m_862f3d1b", shadowOverlay: "m_98ae7f22", alphaOverlay: "m_95709ac0", childrenOverlay: "m_93e74e3" };
9398
- const classes$j = __default__$j, defaultProps$K = {
9420
+ var __default__$l = { root: "m_de3d2490", colorOverlay: "m_862f3d1b", shadowOverlay: "m_98ae7f22", alphaOverlay: "m_95709ac0", childrenOverlay: "m_93e74e3" };
9421
+ const classes$l = __default__$l, defaultProps$Y = {
9399
9422
  withShadow: !0
9400
- }, varsResolver$j = (_, { radius, size: size2 }) => ({
9423
+ }, varsResolver$k = (_, { radius, size: size2 }) => ({
9401
9424
  root: {
9402
9425
  "--cs-radius": radius === void 0 ? void 0 : getRadius(radius),
9403
9426
  "--cs-size": rem(size2)
9404
9427
  }
9405
9428
  }), ColorSwatch = polymorphicFactory((_props, ref) => {
9406
- const props = useProps("ColorSwatch", defaultProps$K, _props), {
9429
+ const props = useProps("ColorSwatch", defaultProps$Y, _props), {
9407
9430
  classNames,
9408
9431
  className,
9409
9432
  style,
@@ -9417,17 +9440,17 @@ const classes$j = __default__$j, defaultProps$K = {
9417
9440
  children,
9418
9441
  variant,
9419
9442
  ...others
9420
- } = useProps("ColorSwatch", defaultProps$K, props), getStyles2 = useStyles({
9443
+ } = useProps("ColorSwatch", defaultProps$Y, props), getStyles2 = useStyles({
9421
9444
  name: "ColorSwatch",
9422
9445
  props,
9423
- classes: classes$j,
9446
+ classes: classes$l,
9424
9447
  className,
9425
9448
  style,
9426
9449
  classNames,
9427
9450
  styles,
9428
9451
  unstyled,
9429
9452
  vars,
9430
- varsResolver: varsResolver$j
9453
+ varsResolver: varsResolver$k
9431
9454
  });
9432
9455
  return /* @__PURE__ */ jsxs(
9433
9456
  Box,
@@ -9446,17 +9469,17 @@ const classes$j = __default__$j, defaultProps$K = {
9446
9469
  }
9447
9470
  );
9448
9471
  });
9449
- ColorSwatch.classes = classes$j;
9472
+ ColorSwatch.classes = classes$l;
9450
9473
  ColorSwatch.displayName = "@mantine/core/ColorSwatch";
9451
- var __default__$i = { root: "m_7485cace" };
9452
- const classes$i = __default__$i, defaultProps$J = {}, varsResolver$i = (_, { size: size2, fluid }) => ({
9474
+ var __default__$k = { root: "m_7485cace" };
9475
+ const classes$k = __default__$k, defaultProps$X = {}, varsResolver$j = (_, { size: size2, fluid }) => ({
9453
9476
  root: {
9454
9477
  "--container-size": fluid ? void 0 : getSize(size2, "container-size")
9455
9478
  }
9456
9479
  }), Container = factory((_props, ref) => {
9457
- const props = useProps("Container", defaultProps$J, _props), { classNames, className, style, styles, unstyled, vars, fluid, mod, ...others } = props, getStyles2 = useStyles({
9480
+ const props = useProps("Container", defaultProps$X, _props), { classNames, className, style, styles, unstyled, vars, fluid, mod, ...others } = props, getStyles2 = useStyles({
9458
9481
  name: "Container",
9459
- classes: classes$i,
9482
+ classes: classes$k,
9460
9483
  props,
9461
9484
  className,
9462
9485
  style,
@@ -9464,31 +9487,31 @@ const classes$i = __default__$i, defaultProps$J = {}, varsResolver$i = (_, { siz
9464
9487
  styles,
9465
9488
  unstyled,
9466
9489
  vars,
9467
- varsResolver: varsResolver$i
9490
+ varsResolver: varsResolver$j
9468
9491
  });
9469
9492
  return /* @__PURE__ */ jsx(Box, { ref, mod: [{ fluid }, mod], ...getStyles2("root"), ...others });
9470
9493
  });
9471
- Container.classes = classes$i;
9494
+ Container.classes = classes$k;
9472
9495
  Container.displayName = "@mantine/core/Container";
9473
- const defaultProps$I = {
9496
+ const defaultProps$W = {
9474
9497
  timeout: 1e3
9475
9498
  };
9476
9499
  function CopyButton(props) {
9477
- const { children, timeout, value, ...others } = useProps("CopyButton", defaultProps$I, props), clipboard = useClipboard({ timeout });
9500
+ const { children, timeout, value, ...others } = useProps("CopyButton", defaultProps$W, props), clipboard = useClipboard({ timeout });
9478
9501
  return /* @__PURE__ */ jsx(Fragment$1, { children: children({ copy: () => clipboard.copy(value), copied: clipboard.copied, ...others }) });
9479
9502
  }
9480
9503
  CopyButton.displayName = "@mantine/core/CopyButton";
9481
- var __default__$h = { root: "m_3eebeb36", label: "m_9e365f20" };
9482
- const classes$h = __default__$h, defaultProps$H = {
9504
+ var __default__$j = { root: "m_3eebeb36", label: "m_9e365f20" };
9505
+ const classes$j = __default__$j, defaultProps$V = {
9483
9506
  orientation: "horizontal"
9484
- }, varsResolver$h = (theme, { color, variant, size: size2 }) => ({
9507
+ }, varsResolver$i = (theme, { color, variant, size: size2 }) => ({
9485
9508
  root: {
9486
9509
  "--divider-color": color ? getThemeColor(color, theme) : void 0,
9487
9510
  "--divider-border-style": variant,
9488
9511
  "--divider-size": getSize(size2, "divider-size")
9489
9512
  }
9490
9513
  }), Divider = factory((_props, ref) => {
9491
- const props = useProps("Divider", defaultProps$H, _props), {
9514
+ const props = useProps("Divider", defaultProps$V, _props), {
9492
9515
  classNames,
9493
9516
  className,
9494
9517
  style,
@@ -9503,7 +9526,7 @@ const classes$h = __default__$h, defaultProps$H = {
9503
9526
  ...others
9504
9527
  } = props, getStyles2 = useStyles({
9505
9528
  name: "Divider",
9506
- classes: classes$h,
9529
+ classes: classes$j,
9507
9530
  props,
9508
9531
  className,
9509
9532
  style,
@@ -9511,7 +9534,7 @@ const classes$h = __default__$h, defaultProps$H = {
9511
9534
  styles,
9512
9535
  unstyled,
9513
9536
  vars,
9514
- varsResolver: varsResolver$h
9537
+ varsResolver: varsResolver$i
9515
9538
  });
9516
9539
  return /* @__PURE__ */ jsx(
9517
9540
  Box,
@@ -9525,14 +9548,14 @@ const classes$h = __default__$h, defaultProps$H = {
9525
9548
  }
9526
9549
  );
9527
9550
  });
9528
- Divider.classes = classes$h;
9551
+ Divider.classes = classes$j;
9529
9552
  Divider.displayName = "@mantine/core/Divider";
9530
9553
  const [DrawerProvider, useDrawerContext] = createSafeContext(
9531
9554
  "Drawer component was not found in tree"
9532
9555
  );
9533
- var __default__$g = { root: "m_f11b401e", header: "m_5a7c2c9", content: "m_b8a05bbd", inner: "m_31cd769a" };
9534
- const classes$g = __default__$g, defaultProps$G = {}, DrawerBody = factory((_props, ref) => {
9535
- const props = useProps("DrawerBody", defaultProps$G, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useDrawerContext();
9556
+ var __default__$i = { root: "m_f11b401e", header: "m_5a7c2c9", content: "m_b8a05bbd", inner: "m_31cd769a" };
9557
+ const classes$i = __default__$i, defaultProps$U = {}, DrawerBody = factory((_props, ref) => {
9558
+ const props = useProps("DrawerBody", defaultProps$U, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useDrawerContext();
9536
9559
  return /* @__PURE__ */ jsx(
9537
9560
  ModalBaseBody,
9538
9561
  {
@@ -9542,10 +9565,10 @@ const classes$g = __default__$g, defaultProps$G = {}, DrawerBody = factory((_pro
9542
9565
  }
9543
9566
  );
9544
9567
  });
9545
- DrawerBody.classes = classes$g;
9568
+ DrawerBody.classes = classes$i;
9546
9569
  DrawerBody.displayName = "@mantine/core/DrawerBody";
9547
- const defaultProps$F = {}, DrawerCloseButton = factory((_props, ref) => {
9548
- const props = useProps("DrawerCloseButton", defaultProps$F, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useDrawerContext();
9570
+ const defaultProps$T = {}, DrawerCloseButton = factory((_props, ref) => {
9571
+ const props = useProps("DrawerCloseButton", defaultProps$T, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useDrawerContext();
9549
9572
  return /* @__PURE__ */ jsx(
9550
9573
  ModalBaseCloseButton,
9551
9574
  {
@@ -9555,10 +9578,10 @@ const defaultProps$F = {}, DrawerCloseButton = factory((_props, ref) => {
9555
9578
  }
9556
9579
  );
9557
9580
  });
9558
- DrawerCloseButton.classes = classes$g;
9581
+ DrawerCloseButton.classes = classes$i;
9559
9582
  DrawerCloseButton.displayName = "@mantine/core/DrawerCloseButton";
9560
- const defaultProps$E = {}, DrawerContent = factory((_props, ref) => {
9561
- const props = useProps("DrawerContent", defaultProps$E, _props), { classNames, className, style, styles, vars, children, radius, ...others } = props, ctx = useDrawerContext(), Scroll = ctx.scrollAreaComponent || NativeScrollArea;
9583
+ const defaultProps$S = {}, DrawerContent = factory((_props, ref) => {
9584
+ const props = useProps("DrawerContent", defaultProps$S, _props), { classNames, className, style, styles, vars, children, radius, __hidden, ...others } = props, ctx = useDrawerContext(), Scroll = ctx.scrollAreaComponent || NativeScrollArea;
9562
9585
  return /* @__PURE__ */ jsx(
9563
9586
  ModalBaseContent,
9564
9587
  {
@@ -9567,14 +9590,15 @@ const defaultProps$E = {}, DrawerContent = factory((_props, ref) => {
9567
9590
  ref,
9568
9591
  ...others,
9569
9592
  radius: radius || ctx.radius || 0,
9593
+ "data-hidden": __hidden || void 0,
9570
9594
  children: /* @__PURE__ */ jsx(Scroll, { style: { height: "calc(100vh - var(--drawer-offset) * 2)" }, children })
9571
9595
  }
9572
9596
  );
9573
9597
  });
9574
- DrawerContent.classes = classes$g;
9598
+ DrawerContent.classes = classes$i;
9575
9599
  DrawerContent.displayName = "@mantine/core/DrawerContent";
9576
- const defaultProps$D = {}, DrawerHeader = factory((_props, ref) => {
9577
- const props = useProps("DrawerHeader", defaultProps$D, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useDrawerContext();
9600
+ const defaultProps$R = {}, DrawerHeader = factory((_props, ref) => {
9601
+ const props = useProps("DrawerHeader", defaultProps$R, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useDrawerContext();
9578
9602
  return /* @__PURE__ */ jsx(
9579
9603
  ModalBaseHeader,
9580
9604
  {
@@ -9584,10 +9608,10 @@ const defaultProps$D = {}, DrawerHeader = factory((_props, ref) => {
9584
9608
  }
9585
9609
  );
9586
9610
  });
9587
- DrawerHeader.classes = classes$g;
9611
+ DrawerHeader.classes = classes$i;
9588
9612
  DrawerHeader.displayName = "@mantine/core/DrawerHeader";
9589
- const defaultProps$C = {}, DrawerOverlay = factory((_props, ref) => {
9590
- const props = useProps("DrawerOverlay", defaultProps$C, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useDrawerContext();
9613
+ const defaultProps$Q = {}, DrawerOverlay = factory((_props, ref) => {
9614
+ const props = useProps("DrawerOverlay", defaultProps$Q, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useDrawerContext();
9591
9615
  return /* @__PURE__ */ jsx(
9592
9616
  ModalBaseOverlay,
9593
9617
  {
@@ -9597,7 +9621,7 @@ const defaultProps$C = {}, DrawerOverlay = factory((_props, ref) => {
9597
9621
  }
9598
9622
  );
9599
9623
  });
9600
- DrawerOverlay.classes = classes$g;
9624
+ DrawerOverlay.classes = classes$i;
9601
9625
  DrawerOverlay.displayName = "@mantine/core/DrawerOverlay";
9602
9626
  function getDrawerAlign(position) {
9603
9627
  switch (position) {
@@ -9623,7 +9647,7 @@ const transitions = {
9623
9647
  bottom: "slide-up",
9624
9648
  right: "slide-right",
9625
9649
  left: "slide-left"
9626
- }, defaultProps$B = {
9650
+ }, defaultProps$P = {
9627
9651
  closeOnClickOutside: !0,
9628
9652
  withinPortal: !0,
9629
9653
  lockScroll: !0,
@@ -9633,7 +9657,7 @@ const transitions = {
9633
9657
  keepMounted: !1,
9634
9658
  zIndex: getDefaultZIndex("modal"),
9635
9659
  position: "left"
9636
- }, varsResolver$g = (_, { position, size: size2, offset: offset2 }) => ({
9660
+ }, varsResolver$h = (_, { position, size: size2, offset: offset2 }) => ({
9637
9661
  root: {
9638
9662
  "--drawer-size": getSize(size2, "drawer-size"),
9639
9663
  "--drawer-flex": getDrawerFlex(position),
@@ -9643,7 +9667,7 @@ const transitions = {
9643
9667
  "--drawer-offset": rem(offset2)
9644
9668
  }
9645
9669
  }), DrawerRoot = factory((_props, ref) => {
9646
- const props = useProps("DrawerRoot", defaultProps$B, _props), {
9670
+ const props = useProps("DrawerRoot", defaultProps$P, _props), {
9647
9671
  classNames,
9648
9672
  className,
9649
9673
  style,
@@ -9657,7 +9681,7 @@ const transitions = {
9657
9681
  ...others
9658
9682
  } = props, { dir } = useDirection(), getStyles2 = useStyles({
9659
9683
  name: "Drawer",
9660
- classes: classes$g,
9684
+ classes: classes$i,
9661
9685
  props,
9662
9686
  className,
9663
9687
  style,
@@ -9665,7 +9689,7 @@ const transitions = {
9665
9689
  styles,
9666
9690
  unstyled,
9667
9691
  vars,
9668
- varsResolver: varsResolver$g
9692
+ varsResolver: varsResolver$h
9669
9693
  }), drawerTransition = (dir === "rtl" ? rtlTransitions : transitions)[position];
9670
9694
  return /* @__PURE__ */ jsx(DrawerProvider, { value: { scrollAreaComponent, getStyles: getStyles2, radius }, children: /* @__PURE__ */ jsx(
9671
9695
  ModalBase,
@@ -9678,10 +9702,33 @@ const transitions = {
9678
9702
  }
9679
9703
  ) });
9680
9704
  });
9681
- DrawerRoot.classes = classes$g;
9705
+ DrawerRoot.classes = classes$i;
9682
9706
  DrawerRoot.displayName = "@mantine/core/DrawerRoot";
9683
- const defaultProps$A = {}, DrawerTitle = factory((_props, ref) => {
9684
- const props = useProps("DrawerTitle", defaultProps$A, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useDrawerContext();
9707
+ const [DrawerStackProvider, useDrawerStackContext] = createOptionalContext();
9708
+ function DrawerStack({ children }) {
9709
+ const [stack, setStack] = useState([]), [maxZIndex, setMaxZIndex] = useState(getDefaultZIndex("modal"));
9710
+ return /* @__PURE__ */ jsx(
9711
+ DrawerStackProvider,
9712
+ {
9713
+ value: {
9714
+ stack,
9715
+ addModal: (id, zIndex) => {
9716
+ setStack((current) => [.../* @__PURE__ */ new Set([...current, id])]), setMaxZIndex(
9717
+ (current) => typeof zIndex == "number" && typeof current == "number" ? Math.max(current, zIndex) : current
9718
+ );
9719
+ },
9720
+ removeModal: (id) => setStack((current) => current.filter((currentId) => currentId !== id)),
9721
+ getZIndex: (id) => `calc(${maxZIndex} + ${stack.indexOf(id)} + 1)`,
9722
+ currentId: stack[stack.length - 1],
9723
+ maxZIndex
9724
+ },
9725
+ children
9726
+ }
9727
+ );
9728
+ }
9729
+ DrawerStack.displayName = "@mantine/core/DrawerStack";
9730
+ const defaultProps$O = {}, DrawerTitle = factory((_props, ref) => {
9731
+ const props = useProps("DrawerTitle", defaultProps$O, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useDrawerContext();
9685
9732
  return /* @__PURE__ */ jsx(
9686
9733
  ModalBaseTitle,
9687
9734
  {
@@ -9691,9 +9738,9 @@ const defaultProps$A = {}, DrawerTitle = factory((_props, ref) => {
9691
9738
  }
9692
9739
  );
9693
9740
  });
9694
- DrawerTitle.classes = classes$g;
9741
+ DrawerTitle.classes = classes$i;
9695
9742
  DrawerTitle.displayName = "@mantine/core/DrawerTitle";
9696
- const defaultProps$z = {
9743
+ const defaultProps$N = {
9697
9744
  closeOnClickOutside: !0,
9698
9745
  withinPortal: !0,
9699
9746
  lockScroll: !0,
@@ -9712,20 +9759,46 @@ const defaultProps$z = {
9712
9759
  withCloseButton,
9713
9760
  closeButtonProps,
9714
9761
  children,
9762
+ opened,
9763
+ stackId,
9764
+ zIndex,
9715
9765
  ...others
9716
- } = useProps("Drawer", defaultProps$z, _props), hasHeader = !!title || withCloseButton;
9717
- return /* @__PURE__ */ jsxs(DrawerRoot, { ref, ...others, children: [
9718
- withOverlay && /* @__PURE__ */ jsx(DrawerOverlay, { ...overlayProps }),
9719
- /* @__PURE__ */ jsxs(DrawerContent, { children: [
9720
- hasHeader && /* @__PURE__ */ jsxs(DrawerHeader, { children: [
9721
- title && /* @__PURE__ */ jsx(DrawerTitle, { children: title }),
9722
- withCloseButton && /* @__PURE__ */ jsx(DrawerCloseButton, { ...closeButtonProps })
9723
- ] }),
9724
- /* @__PURE__ */ jsx(DrawerBody, { children })
9725
- ] })
9726
- ] });
9766
+ } = useProps("Drawer", defaultProps$N, _props), ctx = useDrawerStackContext(), hasHeader = !!title || withCloseButton, stackProps = ctx && stackId ? {
9767
+ closeOnEscape: ctx.currentId === stackId,
9768
+ trapFocus: ctx.currentId === stackId,
9769
+ zIndex: ctx.getZIndex(stackId)
9770
+ } : {}, overlayVisible = withOverlay === !1 ? !1 : stackId && ctx ? ctx.currentId === stackId : opened;
9771
+ return useEffect(() => {
9772
+ ctx && stackId && (opened ? ctx.addModal(stackId, zIndex || getDefaultZIndex("modal")) : ctx.removeModal(stackId));
9773
+ }, [opened, stackId, zIndex]), /* @__PURE__ */ jsxs(
9774
+ DrawerRoot,
9775
+ {
9776
+ ref,
9777
+ opened,
9778
+ zIndex: ctx && stackId ? ctx.getZIndex(stackId) : zIndex,
9779
+ ...others,
9780
+ ...stackProps,
9781
+ children: [
9782
+ withOverlay && /* @__PURE__ */ jsx(
9783
+ DrawerOverlay,
9784
+ {
9785
+ visible: overlayVisible,
9786
+ transitionProps: ctx && stackId ? { duration: 0 } : void 0,
9787
+ ...overlayProps
9788
+ }
9789
+ ),
9790
+ /* @__PURE__ */ jsxs(DrawerContent, { __hidden: ctx && stackId && opened ? stackId !== ctx.currentId : !1, children: [
9791
+ hasHeader && /* @__PURE__ */ jsxs(DrawerHeader, { children: [
9792
+ title && /* @__PURE__ */ jsx(DrawerTitle, { children: title }),
9793
+ withCloseButton && /* @__PURE__ */ jsx(DrawerCloseButton, { ...closeButtonProps })
9794
+ ] }),
9795
+ /* @__PURE__ */ jsx(DrawerBody, { children })
9796
+ ] })
9797
+ ]
9798
+ }
9799
+ );
9727
9800
  });
9728
- Drawer.classes = classes$g;
9801
+ Drawer.classes = classes$i;
9729
9802
  Drawer.displayName = "@mantine/core/Drawer";
9730
9803
  Drawer.Root = DrawerRoot;
9731
9804
  Drawer.Overlay = DrawerOverlay;
@@ -9734,6 +9807,7 @@ Drawer.Body = DrawerBody;
9734
9807
  Drawer.Header = DrawerHeader;
9735
9808
  Drawer.Title = DrawerTitle;
9736
9809
  Drawer.CloseButton = DrawerCloseButton;
9810
+ Drawer.Stack = DrawerStack;
9737
9811
  function useDelayedHover({ open, close, openDelay, closeDelay }) {
9738
9812
  const openTimeout = useRef(-1), closeTimeout = useRef(-1), clearTimeouts = () => {
9739
9813
  window.clearTimeout(openTimeout.current), window.clearTimeout(closeTimeout.current);
@@ -9744,24 +9818,87 @@ function useDelayedHover({ open, close, openDelay, closeDelay }) {
9744
9818
  };
9745
9819
  return useEffect(() => clearTimeouts, []), { openDropdown, closeDropdown };
9746
9820
  }
9821
+ function getMarkColor({ color, theme, defaultShade }) {
9822
+ const parsed = parseThemeColor({ color, theme });
9823
+ return parsed.isThemeColor ? parsed.shade === void 0 ? `var(--mantine-color-${parsed.color}-${defaultShade})` : `var(${parsed.variable})` : color;
9824
+ }
9825
+ var __default__$h = { root: "m_bcb3f3c2" };
9826
+ const classes$h = __default__$h, defaultProps$M = {
9827
+ color: "yellow"
9828
+ }, varsResolver$g = (theme, { color }) => ({
9829
+ root: {
9830
+ "--mark-bg-dark": getMarkColor({ color, theme, defaultShade: 5 }),
9831
+ "--mark-bg-light": getMarkColor({ color, theme, defaultShade: 2 })
9832
+ }
9833
+ }), Mark = factory((_props, ref) => {
9834
+ const props = useProps("Mark", defaultProps$M, _props), { classNames, className, style, styles, unstyled, vars, color, variant, ...others } = props, getStyles2 = useStyles({
9835
+ name: "Mark",
9836
+ props,
9837
+ className,
9838
+ style,
9839
+ classes: classes$h,
9840
+ classNames,
9841
+ styles,
9842
+ unstyled,
9843
+ vars,
9844
+ varsResolver: varsResolver$g
9845
+ });
9846
+ return /* @__PURE__ */ jsx(Box, { component: "mark", ref, variant, ...getStyles2("root"), ...others });
9847
+ });
9848
+ Mark.classes = classes$h;
9849
+ Mark.displayName = "@mantine/core/Mark";
9850
+ function escapeRegex(value) {
9851
+ return value.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&");
9852
+ }
9853
+ function highlighter(value, _highlight) {
9854
+ if (_highlight == null)
9855
+ return [{ chunk: value, highlighted: !1 }];
9856
+ const highlight = Array.isArray(_highlight) ? _highlight.map(escapeRegex) : escapeRegex(_highlight);
9857
+ if (!(Array.isArray(highlight) ? highlight.filter((part) => part.trim().length > 0).length > 0 : highlight.trim() !== ""))
9858
+ return [{ chunk: value, highlighted: !1 }];
9859
+ const matcher = typeof highlight == "string" ? highlight.trim() : highlight.filter((part) => part.trim().length !== 0).map((part) => part.trim()).sort((a, b) => b.length - a.length).join("|"), re = new RegExp(`(${matcher})`, "gi");
9860
+ return value.split(re).map((part) => ({ chunk: part, highlighted: re.test(part) })).filter(({ chunk }) => chunk);
9861
+ }
9862
+ const defaultProps$L = {}, Highlight = polymorphicFactory((props, ref) => {
9863
+ const { unstyled, children, highlight, highlightStyles, color, ...others } = useProps(
9864
+ "Highlight",
9865
+ defaultProps$L,
9866
+ props
9867
+ ), highlightChunks = highlighter(children, highlight);
9868
+ return /* @__PURE__ */ jsx(Text, { unstyled, ref, ...others, __staticSelector: "Highlight", children: highlightChunks.map(
9869
+ ({ chunk, highlighted }, i) => highlighted ? /* @__PURE__ */ jsx(
9870
+ Mark,
9871
+ {
9872
+ unstyled,
9873
+ color,
9874
+ style: highlightStyles,
9875
+ "data-highlight": chunk,
9876
+ children: chunk
9877
+ },
9878
+ i
9879
+ ) : /* @__PURE__ */ jsx("span", { children: chunk }, i)
9880
+ ) });
9881
+ });
9882
+ Highlight.classes = Text.classes;
9883
+ Highlight.displayName = "@mantine/core/Highlight";
9747
9884
  const [HoverCardContextProvider, useHoverCardContext] = createSafeContext(
9748
9885
  "HoverCard component was not found in the tree"
9749
- ), defaultProps$y = {};
9886
+ ), defaultProps$K = {};
9750
9887
  function HoverCardDropdown(props) {
9751
9888
  const { children, onMouseEnter, onMouseLeave, ...others } = useProps(
9752
9889
  "HoverCardDropdown",
9753
- defaultProps$y,
9890
+ defaultProps$K,
9754
9891
  props
9755
9892
  ), ctx = useHoverCardContext(), handleMouseEnter = createEventHandler(onMouseEnter, ctx.openDropdown), handleMouseLeave = createEventHandler(onMouseLeave, ctx.closeDropdown);
9756
9893
  return /* @__PURE__ */ jsx(Popover.Dropdown, { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...others, children });
9757
9894
  }
9758
9895
  HoverCardDropdown.displayName = "@mantine/core/HoverCardDropdown";
9759
- const defaultProps$x = {
9896
+ const defaultProps$J = {
9760
9897
  refProp: "ref"
9761
9898
  }, HoverCardTarget = forwardRef((props, ref) => {
9762
9899
  const { children, refProp, eventPropsWrapperName, ...others } = useProps(
9763
9900
  "HoverCardTarget",
9764
- defaultProps$x,
9901
+ defaultProps$J,
9765
9902
  props
9766
9903
  );
9767
9904
  if (!isElement$1(children))
@@ -9775,7 +9912,7 @@ const defaultProps$x = {
9775
9912
  ) });
9776
9913
  });
9777
9914
  HoverCardTarget.displayName = "@mantine/core/HoverCardTarget";
9778
- const defaultProps$w = {
9915
+ const defaultProps$I = {
9779
9916
  openDelay: 0,
9780
9917
  closeDelay: 150,
9781
9918
  initiallyOpened: !1
@@ -9783,7 +9920,7 @@ const defaultProps$w = {
9783
9920
  function HoverCard(props) {
9784
9921
  const { children, onOpen, onClose, openDelay, closeDelay, initiallyOpened, ...others } = useProps(
9785
9922
  "HoverCard",
9786
- defaultProps$w,
9923
+ defaultProps$I,
9787
9924
  props
9788
9925
  ), [opened, { open, close }] = useDisclosure(initiallyOpened, { onClose, onOpen }), { openDropdown, closeDropdown } = useDelayedHover({ open, close, openDelay, closeDelay });
9789
9926
  return /* @__PURE__ */ jsx(HoverCardContextProvider, { value: { openDropdown, closeDropdown }, children: /* @__PURE__ */ jsx(Popover, { ...others, opened, __staticSelector: "HoverCard", children }) });
@@ -9792,14 +9929,14 @@ HoverCard.displayName = "@mantine/core/HoverCard";
9792
9929
  HoverCard.Target = HoverCardTarget;
9793
9930
  HoverCard.Dropdown = HoverCardDropdown;
9794
9931
  HoverCard.extend = (input) => input;
9795
- var __default__$f = { root: "m_9e117634" };
9796
- const classes$f = __default__$f, defaultProps$v = {}, varsResolver$f = (_, { radius, fit }) => ({
9932
+ var __default__$g = { root: "m_9e117634" };
9933
+ const classes$g = __default__$g, defaultProps$H = {}, varsResolver$f = (_, { radius, fit }) => ({
9797
9934
  root: {
9798
9935
  "--image-radius": radius === void 0 ? void 0 : getRadius(radius),
9799
9936
  "--image-object-fit": fit
9800
9937
  }
9801
9938
  }), Image = polymorphicFactory((_props, ref) => {
9802
- const props = useProps("Image", defaultProps$v, _props), {
9939
+ const props = useProps("Image", defaultProps$H, _props), {
9803
9940
  classNames,
9804
9941
  className,
9805
9942
  style,
@@ -9817,7 +9954,7 @@ const classes$f = __default__$f, defaultProps$v = {}, varsResolver$f = (_, { rad
9817
9954
  useEffect(() => setError(!src), [src]);
9818
9955
  const getStyles2 = useStyles({
9819
9956
  name: "Image",
9820
- classes: classes$f,
9957
+ classes: classes$g,
9821
9958
  props,
9822
9959
  className,
9823
9960
  style,
@@ -9853,10 +9990,10 @@ const classes$f = __default__$f, defaultProps$v = {}, varsResolver$f = (_, { rad
9853
9990
  }
9854
9991
  );
9855
9992
  });
9856
- Image.classes = classes$f;
9993
+ Image.classes = classes$g;
9857
9994
  Image.displayName = "@mantine/core/Image";
9858
- var __default__$e = { root: "m_6e45937b", loader: "m_e8eb006c", overlay: "m_df587f17" };
9859
- const classes$e = __default__$e, defaultProps$u = {
9995
+ var __default__$f = { root: "m_6e45937b", loader: "m_e8eb006c", overlay: "m_df587f17" };
9996
+ const classes$f = __default__$f, defaultProps$G = {
9860
9997
  transitionProps: { transition: "fade", duration: 0 },
9861
9998
  overlayProps: { backgroundOpacity: 0.75 },
9862
9999
  zIndex: getDefaultZIndex("overlay")
@@ -9865,7 +10002,7 @@ const classes$e = __default__$e, defaultProps$u = {
9865
10002
  "--lo-z-index": zIndex?.toString()
9866
10003
  }
9867
10004
  }), LoadingOverlay = factory((_props, ref) => {
9868
- const props = useProps("LoadingOverlay", defaultProps$u, _props), {
10005
+ const props = useProps("LoadingOverlay", defaultProps$G, _props), {
9869
10006
  classNames,
9870
10007
  className,
9871
10008
  style,
@@ -9880,7 +10017,7 @@ const classes$e = __default__$e, defaultProps$u = {
9880
10017
  ...others
9881
10018
  } = props, theme = useMantineTheme(), getStyles2 = useStyles({
9882
10019
  name: "LoadingOverlay",
9883
- classes: classes$e,
10020
+ classes: classes$f,
9884
10021
  props,
9885
10022
  className,
9886
10023
  style,
@@ -9889,7 +10026,7 @@ const classes$e = __default__$e, defaultProps$u = {
9889
10026
  unstyled,
9890
10027
  vars,
9891
10028
  varsResolver: varsResolver$e
9892
- }), _overlayProps = { ...defaultProps$u.overlayProps, ...overlayProps };
10029
+ }), _overlayProps = { ...defaultProps$G.overlayProps, ...overlayProps };
9893
10030
  return /* @__PURE__ */ jsx(Transition, { transition: "fade", ...transitionProps, mounted: !!visible2, children: (transitionStyles) => /* @__PURE__ */ jsxs(Box, { ...getStyles2("root", { style: transitionStyles }), ref, ...others, children: [
9894
10031
  /* @__PURE__ */ jsx(Loader, { ...getStyles2("loader"), unstyled, ...loaderProps }),
9895
10032
  /* @__PURE__ */ jsx(
@@ -9914,16 +10051,16 @@ const classes$e = __default__$e, defaultProps$u = {
9914
10051
  )
9915
10052
  ] }) });
9916
10053
  });
9917
- LoadingOverlay.classes = classes$e;
10054
+ LoadingOverlay.classes = classes$f;
9918
10055
  LoadingOverlay.displayName = "@mantine/core/LoadingOverlay";
9919
10056
  const [MenuContextProvider, useMenuContext] = createSafeContext(
9920
10057
  "Menu component was not found in the tree"
9921
10058
  );
9922
- var __default__$d = { dropdown: "m_dc9b7c9f", label: "m_9bfac126", divider: "m_efdf90cb", item: "m_99ac2aa1", itemLabel: "m_5476e0d3", itemSection: "m_8b75e504" };
9923
- const classes$d = __default__$d, defaultProps$t = {}, MenuDivider = factory((props, ref) => {
10059
+ var __default__$e = { dropdown: "m_dc9b7c9f", label: "m_9bfac126", divider: "m_efdf90cb", item: "m_99ac2aa1", itemLabel: "m_5476e0d3", itemSection: "m_8b75e504" };
10060
+ const classes$e = __default__$e, defaultProps$F = {}, MenuDivider = factory((props, ref) => {
9924
10061
  const { classNames, className, style, styles, vars, ...others } = useProps(
9925
10062
  "MenuDivider",
9926
- defaultProps$t,
10063
+ defaultProps$F,
9927
10064
  props
9928
10065
  ), ctx = useMenuContext();
9929
10066
  return /* @__PURE__ */ jsx(
@@ -9935,9 +10072,9 @@ const classes$d = __default__$d, defaultProps$t = {}, MenuDivider = factory((pro
9935
10072
  }
9936
10073
  );
9937
10074
  });
9938
- MenuDivider.classes = classes$d;
10075
+ MenuDivider.classes = classes$e;
9939
10076
  MenuDivider.displayName = "@mantine/core/MenuDivider";
9940
- const defaultProps$s = {}, MenuDropdown = factory((props, ref) => {
10077
+ const defaultProps$E = {}, MenuDropdown = factory((props, ref) => {
9941
10078
  const {
9942
10079
  classNames,
9943
10080
  className,
@@ -9949,7 +10086,7 @@ const defaultProps$s = {}, MenuDropdown = factory((props, ref) => {
9949
10086
  onKeyDown,
9950
10087
  children,
9951
10088
  ...others
9952
- } = useProps("MenuDropdown", defaultProps$s, props), wrapperRef = useRef(null), ctx = useMenuContext(), handleKeyDown = createEventHandler(onKeyDown, (event) => {
10089
+ } = useProps("MenuDropdown", defaultProps$E, props), wrapperRef = useRef(null), ctx = useMenuContext(), handleKeyDown = createEventHandler(onKeyDown, (event) => {
9953
10090
  (event.key === "ArrowUp" || event.key === "ArrowDown") && (event.preventDefault(), wrapperRef.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus());
9954
10091
  }), handleMouseEnter = createEventHandler(
9955
10092
  onMouseEnter,
@@ -9984,9 +10121,9 @@ const defaultProps$s = {}, MenuDropdown = factory((props, ref) => {
9984
10121
  }
9985
10122
  );
9986
10123
  });
9987
- MenuDropdown.classes = classes$d;
10124
+ MenuDropdown.classes = classes$e;
9988
10125
  MenuDropdown.displayName = "@mantine/core/MenuDropdown";
9989
- const defaultProps$r = {}, MenuItem = polymorphicFactory((props, ref) => {
10126
+ const defaultProps$D = {}, MenuItem = polymorphicFactory((props, ref) => {
9990
10127
  const {
9991
10128
  classNames,
9992
10129
  className,
@@ -10000,7 +10137,7 @@ const defaultProps$r = {}, MenuItem = polymorphicFactory((props, ref) => {
10000
10137
  children,
10001
10138
  disabled,
10002
10139
  ...others
10003
- } = useProps("MenuItem", defaultProps$r, props), ctx = useMenuContext(), theme = useMantineTheme(), { dir } = useDirection(), itemRef = useRef(), itemIndex = ctx.getItemIndex(itemRef.current), _others = others, handleMouseLeave = createEventHandler(_others.onMouseLeave, () => ctx.setHovered(-1)), handleMouseEnter = createEventHandler(
10140
+ } = useProps("MenuItem", defaultProps$D, props), ctx = useMenuContext(), theme = useMantineTheme(), { dir } = useDirection(), itemRef = useRef(), itemIndex = ctx.getItemIndex(itemRef.current), _others = others, handleMouseLeave = createEventHandler(_others.onMouseLeave, () => ctx.setHovered(-1)), handleMouseEnter = createEventHandler(
10004
10141
  _others.onMouseEnter,
10005
10142
  () => ctx.setHovered(ctx.getItemIndex(itemRef.current))
10006
10143
  ), handleClick = createEventHandler(_others.onClick, () => {
@@ -10048,12 +10185,12 @@ const defaultProps$r = {}, MenuItem = polymorphicFactory((props, ref) => {
10048
10185
  }
10049
10186
  );
10050
10187
  });
10051
- MenuItem.classes = classes$d;
10188
+ MenuItem.classes = classes$e;
10052
10189
  MenuItem.displayName = "@mantine/core/MenuItem";
10053
- const defaultProps$q = {}, MenuLabel = factory((props, ref) => {
10190
+ const defaultProps$C = {}, MenuLabel = factory((props, ref) => {
10054
10191
  const { classNames, className, style, styles, vars, ...others } = useProps(
10055
10192
  "MenuLabel",
10056
- defaultProps$q,
10193
+ defaultProps$C,
10057
10194
  props
10058
10195
  ), ctx = useMenuContext();
10059
10196
  return /* @__PURE__ */ jsx(
@@ -10065,12 +10202,12 @@ const defaultProps$q = {}, MenuLabel = factory((props, ref) => {
10065
10202
  }
10066
10203
  );
10067
10204
  });
10068
- MenuLabel.classes = classes$d;
10205
+ MenuLabel.classes = classes$e;
10069
10206
  MenuLabel.displayName = "@mantine/core/MenuLabel";
10070
- const defaultProps$p = {
10207
+ const defaultProps$B = {
10071
10208
  refProp: "ref"
10072
10209
  }, MenuTarget = forwardRef((props, ref) => {
10073
- const { children, refProp, ...others } = useProps("MenuTarget", defaultProps$p, props);
10210
+ const { children, refProp, ...others } = useProps("MenuTarget", defaultProps$B, props);
10074
10211
  if (!isElement$1(children))
10075
10212
  throw new Error(
10076
10213
  "Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
@@ -10091,7 +10228,7 @@ const defaultProps$p = {
10091
10228
  }) });
10092
10229
  });
10093
10230
  MenuTarget.displayName = "@mantine/core/MenuTarget";
10094
- const defaultProps$o = {
10231
+ const defaultProps$A = {
10095
10232
  trapFocus: !0,
10096
10233
  closeOnItemClick: !0,
10097
10234
  clickOutsideEvents: ["mousedown", "touchstart", "keydown"],
@@ -10102,7 +10239,7 @@ const defaultProps$o = {
10102
10239
  menuItemTabIndex: -1
10103
10240
  };
10104
10241
  function Menu(_props) {
10105
- const props = useProps("Menu", defaultProps$o, _props), {
10242
+ const props = useProps("Menu", defaultProps$A, _props), {
10106
10243
  children,
10107
10244
  onOpen,
10108
10245
  onClose,
@@ -10126,7 +10263,7 @@ function Menu(_props) {
10126
10263
  ...others
10127
10264
  } = props, getStyles2 = useStyles({
10128
10265
  name: "Menu",
10129
- classes: classes$d,
10266
+ classes: classes$e,
10130
10267
  props,
10131
10268
  classNames,
10132
10269
  styles,
@@ -10192,7 +10329,7 @@ function Menu(_props) {
10192
10329
  );
10193
10330
  }
10194
10331
  Menu.extend = (input) => input;
10195
- Menu.classes = classes$d;
10332
+ Menu.classes = classes$e;
10196
10333
  Menu.displayName = "@mantine/core/Menu";
10197
10334
  Menu.Item = MenuItem;
10198
10335
  Menu.Label = MenuLabel;
@@ -10202,9 +10339,9 @@ Menu.Divider = MenuDivider;
10202
10339
  const [ModalProvider, useModalContext] = createSafeContext(
10203
10340
  "Modal component was not found in tree"
10204
10341
  );
10205
- var __default__$c = { root: "m_9df02822", content: "m_54c44539", inner: "m_1f958f16", header: "m_d0e2b9cd" };
10206
- const classes$c = __default__$c, defaultProps$n = {}, ModalBody = factory((_props, ref) => {
10207
- const props = useProps("ModalBody", defaultProps$n, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useModalContext();
10342
+ var __default__$d = { root: "m_9df02822", content: "m_54c44539", inner: "m_1f958f16", header: "m_d0e2b9cd" };
10343
+ const classes$d = __default__$d, defaultProps$z = {}, ModalBody = factory((_props, ref) => {
10344
+ const props = useProps("ModalBody", defaultProps$z, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useModalContext();
10208
10345
  return /* @__PURE__ */ jsx(
10209
10346
  ModalBaseBody,
10210
10347
  {
@@ -10214,10 +10351,23 @@ const classes$c = __default__$c, defaultProps$n = {}, ModalBody = factory((_prop
10214
10351
  }
10215
10352
  );
10216
10353
  });
10217
- ModalBody.classes = classes$c;
10354
+ ModalBody.classes = classes$d;
10218
10355
  ModalBody.displayName = "@mantine/core/ModalBody";
10219
- const defaultProps$m = {}, ModalContent = factory((_props, ref) => {
10220
- const props = useProps("ModalContent", defaultProps$m, _props), { classNames, className, style, styles, vars, children, ...others } = props, ctx = useModalContext(), Scroll = ctx.scrollAreaComponent || NativeScrollArea;
10356
+ const defaultProps$y = {}, ModalCloseButton = factory((_props, ref) => {
10357
+ const props = useProps("ModalCloseButton", defaultProps$y, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useModalContext();
10358
+ return /* @__PURE__ */ jsx(
10359
+ ModalBaseCloseButton,
10360
+ {
10361
+ ref,
10362
+ ...ctx.getStyles("close", { classNames, style, styles, className }),
10363
+ ...others
10364
+ }
10365
+ );
10366
+ });
10367
+ ModalCloseButton.classes = classes$d;
10368
+ ModalCloseButton.displayName = "@mantine/core/ModalCloseButton";
10369
+ const defaultProps$x = {}, ModalContent = factory((_props, ref) => {
10370
+ const props = useProps("ModalContent", defaultProps$x, _props), { classNames, className, style, styles, vars, children, __hidden, ...others } = props, ctx = useModalContext(), Scroll = ctx.scrollAreaComponent || NativeScrollArea;
10221
10371
  return /* @__PURE__ */ jsx(
10222
10372
  ModalBaseContent,
10223
10373
  {
@@ -10225,6 +10375,7 @@ const defaultProps$m = {}, ModalContent = factory((_props, ref) => {
10225
10375
  innerProps: ctx.getStyles("inner", { className, style, styles, classNames }),
10226
10376
  "data-full-screen": ctx.fullScreen || void 0,
10227
10377
  "data-modal-content": !0,
10378
+ "data-hidden": __hidden || void 0,
10228
10379
  ref,
10229
10380
  ...others,
10230
10381
  children: /* @__PURE__ */ jsx(
@@ -10239,10 +10390,23 @@ const defaultProps$m = {}, ModalContent = factory((_props, ref) => {
10239
10390
  }
10240
10391
  );
10241
10392
  });
10242
- ModalContent.classes = classes$c;
10393
+ ModalContent.classes = classes$d;
10243
10394
  ModalContent.displayName = "@mantine/core/ModalContent";
10244
- const defaultProps$l = {}, ModalOverlay = factory((_props, ref) => {
10245
- const props = useProps("ModalOverlay", defaultProps$l, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useModalContext();
10395
+ const defaultProps$w = {}, ModalHeader = factory((_props, ref) => {
10396
+ const props = useProps("ModalHeader", defaultProps$w, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useModalContext();
10397
+ return /* @__PURE__ */ jsx(
10398
+ ModalBaseHeader,
10399
+ {
10400
+ ref,
10401
+ ...ctx.getStyles("header", { classNames, style, styles, className }),
10402
+ ...others
10403
+ }
10404
+ );
10405
+ });
10406
+ ModalHeader.classes = classes$d;
10407
+ ModalHeader.displayName = "@mantine/core/ModalHeader";
10408
+ const defaultProps$v = {}, ModalOverlay = factory((_props, ref) => {
10409
+ const props = useProps("ModalOverlay", defaultProps$v, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useModalContext();
10246
10410
  return /* @__PURE__ */ jsx(
10247
10411
  ModalBaseOverlay,
10248
10412
  {
@@ -10252,9 +10416,9 @@ const defaultProps$l = {}, ModalOverlay = factory((_props, ref) => {
10252
10416
  }
10253
10417
  );
10254
10418
  });
10255
- ModalOverlay.classes = classes$c;
10419
+ ModalOverlay.classes = classes$d;
10256
10420
  ModalOverlay.displayName = "@mantine/core/ModalOverlay";
10257
- const defaultProps$k = {
10421
+ const defaultProps$u = {
10258
10422
  __staticSelector: "Modal",
10259
10423
  closeOnClickOutside: !0,
10260
10424
  withinPortal: !0,
@@ -10274,7 +10438,7 @@ const defaultProps$k = {
10274
10438
  "--modal-x-offset": rem(xOffset)
10275
10439
  }
10276
10440
  }), ModalRoot = factory((_props, ref) => {
10277
- const props = useProps("ModalRoot", defaultProps$k, _props), {
10441
+ const props = useProps("ModalRoot", defaultProps$u, _props), {
10278
10442
  classNames,
10279
10443
  className,
10280
10444
  style,
@@ -10291,7 +10455,7 @@ const defaultProps$k = {
10291
10455
  ...others
10292
10456
  } = props, getStyles2 = useStyles({
10293
10457
  name: __staticSelector,
10294
- classes: classes$c,
10458
+ classes: classes$d,
10295
10459
  props,
10296
10460
  className,
10297
10461
  style,
@@ -10313,34 +10477,148 @@ const defaultProps$k = {
10313
10477
  }
10314
10478
  ) });
10315
10479
  });
10316
- ModalRoot.classes = classes$c;
10480
+ ModalRoot.classes = classes$d;
10317
10481
  ModalRoot.displayName = "@mantine/core/ModalRoot";
10318
- const [PillsInputProvider, usePillsInputContext] = createOptionalContext(), [PillGroupProvider, usePillGroupContext] = createOptionalContext();
10319
- var __default__$b = { root: "m_7cda1cd6", "root--default": "m_44da308b", "root--contrast": "m_e3a01f8", label: "m_1e0e6180", remove: "m_ae386778", group: "m_1dcfd90b" };
10320
- const classes$b = __default__$b, defaultProps$j = {}, varsResolver$c = (_, { gap }, { size: size2 }) => ({
10321
- group: {
10322
- "--pg-gap": gap !== void 0 ? getSize(gap) : getSize(size2, "pg-gap")
10323
- }
10324
- }), PillGroup = factory((_props, ref) => {
10325
- const props = useProps("PillGroup", defaultProps$j, _props), { classNames, className, style, styles, unstyled, vars, size: size2, disabled, ...others } = props, _size = usePillsInputContext()?.size || size2 || void 0, getStyles2 = useStyles({
10326
- name: "PillGroup",
10327
- classes: classes$b,
10328
- props,
10329
- className,
10330
- style,
10331
- classNames,
10332
- styles,
10333
- unstyled,
10334
- vars,
10335
- varsResolver: varsResolver$c,
10336
- stylesCtx: { size: _size },
10337
- rootSelector: "group"
10338
- });
10339
- return /* @__PURE__ */ jsx(PillGroupProvider, { value: { size: _size, disabled }, children: /* @__PURE__ */ jsx(Box, { ref, size: _size, ...getStyles2("group"), ...others }) });
10340
- });
10341
- PillGroup.classes = classes$b;
10482
+ const [ModalStackProvider, useModalStackContext] = createOptionalContext();
10483
+ function ModalStack({ children }) {
10484
+ const [stack, setStack] = useState([]), [maxZIndex, setMaxZIndex] = useState(getDefaultZIndex("modal"));
10485
+ return /* @__PURE__ */ jsx(
10486
+ ModalStackProvider,
10487
+ {
10488
+ value: {
10489
+ stack,
10490
+ addModal: (id, zIndex) => {
10491
+ setStack((current) => [.../* @__PURE__ */ new Set([...current, id])]), setMaxZIndex(
10492
+ (current) => typeof zIndex == "number" && typeof current == "number" ? Math.max(current, zIndex) : current
10493
+ );
10494
+ },
10495
+ removeModal: (id) => setStack((current) => current.filter((currentId) => currentId !== id)),
10496
+ getZIndex: (id) => `calc(${maxZIndex} + ${stack.indexOf(id)} + 1)`,
10497
+ currentId: stack[stack.length - 1],
10498
+ maxZIndex
10499
+ },
10500
+ children
10501
+ }
10502
+ );
10503
+ }
10504
+ ModalStack.displayName = "@mantine/core/ModalStack";
10505
+ const defaultProps$t = {}, ModalTitle = factory((_props, ref) => {
10506
+ const props = useProps("ModalTitle", defaultProps$t, _props), { classNames, className, style, styles, vars, ...others } = props, ctx = useModalContext();
10507
+ return /* @__PURE__ */ jsx(
10508
+ ModalBaseTitle,
10509
+ {
10510
+ ref,
10511
+ ...ctx.getStyles("title", { classNames, style, styles, className }),
10512
+ ...others
10513
+ }
10514
+ );
10515
+ });
10516
+ ModalTitle.classes = classes$d;
10517
+ ModalTitle.displayName = "@mantine/core/ModalTitle";
10518
+ const defaultProps$s = {
10519
+ closeOnClickOutside: !0,
10520
+ withinPortal: !0,
10521
+ lockScroll: !0,
10522
+ trapFocus: !0,
10523
+ returnFocus: !0,
10524
+ closeOnEscape: !0,
10525
+ keepMounted: !1,
10526
+ zIndex: getDefaultZIndex("modal"),
10527
+ transitionProps: { duration: 200, transition: "fade-down" },
10528
+ withOverlay: !0,
10529
+ withCloseButton: !0
10530
+ }, Modal = factory((_props, ref) => {
10531
+ const {
10532
+ title,
10533
+ withOverlay,
10534
+ overlayProps,
10535
+ withCloseButton,
10536
+ closeButtonProps,
10537
+ children,
10538
+ radius,
10539
+ opened,
10540
+ stackId,
10541
+ zIndex,
10542
+ ...others
10543
+ } = useProps("Modal", defaultProps$s, _props), ctx = useModalStackContext(), hasHeader = !!title || withCloseButton, stackProps = ctx && stackId ? {
10544
+ closeOnEscape: ctx.currentId === stackId,
10545
+ trapFocus: ctx.currentId === stackId,
10546
+ zIndex: ctx.getZIndex(stackId)
10547
+ } : {}, overlayVisible = withOverlay === !1 ? !1 : stackId && ctx ? ctx.currentId === stackId : opened;
10548
+ return useEffect(() => {
10549
+ ctx && stackId && (opened ? ctx.addModal(stackId, zIndex || getDefaultZIndex("modal")) : ctx.removeModal(stackId));
10550
+ }, [opened, stackId, zIndex]), /* @__PURE__ */ jsxs(
10551
+ ModalRoot,
10552
+ {
10553
+ ref,
10554
+ radius,
10555
+ opened,
10556
+ zIndex: ctx && stackId ? ctx.getZIndex(stackId) : zIndex,
10557
+ ...others,
10558
+ ...stackProps,
10559
+ children: [
10560
+ withOverlay && /* @__PURE__ */ jsx(
10561
+ ModalOverlay,
10562
+ {
10563
+ visible: overlayVisible,
10564
+ transitionProps: ctx && stackId ? { duration: 0 } : void 0,
10565
+ ...overlayProps
10566
+ }
10567
+ ),
10568
+ /* @__PURE__ */ jsxs(
10569
+ ModalContent,
10570
+ {
10571
+ radius,
10572
+ __hidden: ctx && stackId && opened ? stackId !== ctx.currentId : !1,
10573
+ children: [
10574
+ hasHeader && /* @__PURE__ */ jsxs(ModalHeader, { children: [
10575
+ title && /* @__PURE__ */ jsx(ModalTitle, { children: title }),
10576
+ withCloseButton && /* @__PURE__ */ jsx(ModalCloseButton, { ...closeButtonProps })
10577
+ ] }),
10578
+ /* @__PURE__ */ jsx(ModalBody, { children })
10579
+ ]
10580
+ }
10581
+ )
10582
+ ]
10583
+ }
10584
+ );
10585
+ });
10586
+ Modal.classes = classes$d;
10587
+ Modal.displayName = "@mantine/core/Modal";
10588
+ Modal.Root = ModalRoot;
10589
+ Modal.Overlay = ModalOverlay;
10590
+ Modal.Content = ModalContent;
10591
+ Modal.Body = ModalBody;
10592
+ Modal.Header = ModalHeader;
10593
+ Modal.Title = ModalTitle;
10594
+ Modal.CloseButton = ModalCloseButton;
10595
+ Modal.Stack = ModalStack;
10596
+ const [PillsInputProvider, usePillsInputContext] = createOptionalContext(), [PillGroupProvider, usePillGroupContext] = createOptionalContext();
10597
+ var __default__$c = { root: "m_7cda1cd6", "root--default": "m_44da308b", "root--contrast": "m_e3a01f8", label: "m_1e0e6180", remove: "m_ae386778", group: "m_1dcfd90b" };
10598
+ const classes$c = __default__$c, defaultProps$r = {}, varsResolver$c = (_, { gap }, { size: size2 }) => ({
10599
+ group: {
10600
+ "--pg-gap": gap !== void 0 ? getSize(gap) : getSize(size2, "pg-gap")
10601
+ }
10602
+ }), PillGroup = factory((_props, ref) => {
10603
+ const props = useProps("PillGroup", defaultProps$r, _props), { classNames, className, style, styles, unstyled, vars, size: size2, disabled, ...others } = props, _size = usePillsInputContext()?.size || size2 || void 0, getStyles2 = useStyles({
10604
+ name: "PillGroup",
10605
+ classes: classes$c,
10606
+ props,
10607
+ className,
10608
+ style,
10609
+ classNames,
10610
+ styles,
10611
+ unstyled,
10612
+ vars,
10613
+ varsResolver: varsResolver$c,
10614
+ stylesCtx: { size: _size },
10615
+ rootSelector: "group"
10616
+ });
10617
+ return /* @__PURE__ */ jsx(PillGroupProvider, { value: { size: _size, disabled }, children: /* @__PURE__ */ jsx(Box, { ref, size: _size, ...getStyles2("group"), ...others }) });
10618
+ });
10619
+ PillGroup.classes = classes$c;
10342
10620
  PillGroup.displayName = "@mantine/core/PillGroup";
10343
- const defaultProps$i = {
10621
+ const defaultProps$q = {
10344
10622
  variant: "default"
10345
10623
  }, varsResolver$b = (_, { radius }, { size: size2 }) => ({
10346
10624
  root: {
@@ -10349,7 +10627,7 @@ const defaultProps$i = {
10349
10627
  "--pill-radius": radius === void 0 ? void 0 : getRadius(radius)
10350
10628
  }
10351
10629
  }), Pill = factory((_props, ref) => {
10352
- const props = useProps("Pill", defaultProps$i, _props), {
10630
+ const props = useProps("Pill", defaultProps$q, _props), {
10353
10631
  classNames,
10354
10632
  className,
10355
10633
  style,
@@ -10368,7 +10646,7 @@ const defaultProps$i = {
10368
10646
  ...others
10369
10647
  } = props, ctx = usePillGroupContext(), pillsInputCtx = usePillsInputContext(), _size = size2 || ctx?.size || void 0, _variant = pillsInputCtx?.variant === "filled" ? "contrast" : variant || "default", getStyles2 = useStyles({
10370
10648
  name: "Pill",
10371
- classes: classes$b,
10649
+ classes: classes$c,
10372
10650
  props,
10373
10651
  className,
10374
10652
  style,
@@ -10419,11 +10697,11 @@ const defaultProps$i = {
10419
10697
  }
10420
10698
  );
10421
10699
  });
10422
- Pill.classes = classes$b;
10700
+ Pill.classes = classes$c;
10423
10701
  Pill.displayName = "@mantine/core/Pill";
10424
10702
  Pill.Group = PillGroup;
10425
- var __default__$a = { root: "m_a513464", icon: "m_a4ceffb", loader: "m_b0920b15", body: "m_a49ed24", title: "m_3feedf16", description: "m_3d733a3a", closeButton: "m_919a4d88" };
10426
- const classes$a = __default__$a, defaultProps$h = {
10703
+ var __default__$b = { root: "m_a513464", icon: "m_a4ceffb", loader: "m_b0920b15", body: "m_a49ed24", title: "m_3feedf16", description: "m_3d733a3a", closeButton: "m_919a4d88" };
10704
+ const classes$b = __default__$b, defaultProps$p = {
10427
10705
  withCloseButton: !0
10428
10706
  }, varsResolver$a = (theme, { radius, color }) => ({
10429
10707
  root: {
@@ -10431,7 +10709,7 @@ const classes$a = __default__$a, defaultProps$h = {
10431
10709
  "--notification-color": color ? getThemeColor(color, theme) : void 0
10432
10710
  }
10433
10711
  }), Notification = factory((_props, ref) => {
10434
- const props = useProps("Notification", defaultProps$h, _props), {
10712
+ const props = useProps("Notification", defaultProps$p, _props), {
10435
10713
  className,
10436
10714
  color,
10437
10715
  radius,
@@ -10453,7 +10731,7 @@ const classes$a = __default__$a, defaultProps$h = {
10453
10731
  ...others
10454
10732
  } = props, getStyles2 = useStyles({
10455
10733
  name: "Notification",
10456
- classes: classes$a,
10734
+ classes: classes$b,
10457
10735
  props,
10458
10736
  className,
10459
10737
  style,
@@ -10494,7 +10772,7 @@ const classes$a = __default__$a, defaultProps$h = {
10494
10772
  }
10495
10773
  );
10496
10774
  });
10497
- Notification.classes = classes$a;
10775
+ Notification.classes = classes$b;
10498
10776
  Notification.displayName = "@mantine/core/Notification";
10499
10777
  const defaultTransition = {
10500
10778
  duration: 100,
@@ -10551,8 +10829,8 @@ function useFloatingTooltip({
10551
10829
  }
10552
10830
  }, [elements.reference, refs.floating.current, update, handleMouseMove, opened]), { handleMouseMove, x, y, opened, setOpened, boundaryRef, floating: refs.setFloating };
10553
10831
  }
10554
- var __default__$9 = { tooltip: "m_1b3c8819", arrow: "m_f898399f" };
10555
- const classes$9 = __default__$9, defaultProps$g = {
10832
+ var __default__$a = { tooltip: "m_1b3c8819", arrow: "m_f898399f" };
10833
+ const classes$a = __default__$a, defaultProps$o = {
10556
10834
  refProp: "ref",
10557
10835
  withinPortal: !0,
10558
10836
  offset: 10,
@@ -10566,7 +10844,7 @@ const classes$9 = __default__$9, defaultProps$g = {
10566
10844
  "--tooltip-color": color ? "var(--mantine-color-white)" : void 0
10567
10845
  }
10568
10846
  }), TooltipFloating = factory((_props, ref) => {
10569
- const props = useProps("TooltipFloating", defaultProps$g, _props), {
10847
+ const props = useProps("TooltipFloating", defaultProps$o, _props), {
10570
10848
  children,
10571
10849
  refProp,
10572
10850
  withinPortal,
@@ -10591,7 +10869,7 @@ const classes$9 = __default__$9, defaultProps$g = {
10591
10869
  } = props, theme = useMantineTheme(), getStyles2 = useStyles({
10592
10870
  name: "TooltipFloating",
10593
10871
  props,
10594
- classes: classes$9,
10872
+ classes: classes$a,
10595
10873
  className,
10596
10874
  style,
10597
10875
  classNames,
@@ -10609,7 +10887,7 @@ const classes$9 = __default__$9, defaultProps$g = {
10609
10887
  throw new Error(
10610
10888
  "[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"
10611
10889
  );
10612
- const targetRef = useMergedRef(boundaryRef, children.ref, ref), onMouseEnter = (event) => {
10890
+ const targetRef = useMergedRef(boundaryRef, getRefProp(children), ref), onMouseEnter = (event) => {
10613
10891
  children.props.onMouseEnter?.(event), handleMouseMove(event), setOpened(!0);
10614
10892
  }, onMouseLeave = (event) => {
10615
10893
  children.props.onMouseLeave?.(event), setOpened(!1);
@@ -10642,14 +10920,14 @@ const classes$9 = __default__$9, defaultProps$g = {
10642
10920
  })
10643
10921
  ] });
10644
10922
  });
10645
- TooltipFloating.classes = classes$9;
10923
+ TooltipFloating.classes = classes$a;
10646
10924
  TooltipFloating.displayName = "@mantine/core/TooltipFloating";
10647
- const TooltipGroupContext = createContext(!1), TooltipGroupProvider = TooltipGroupContext.Provider, useTooltipGroupContext = () => useContext(TooltipGroupContext), defaultProps$f = {
10925
+ const TooltipGroupContext = createContext(!1), TooltipGroupProvider = TooltipGroupContext.Provider, useTooltipGroupContext = () => useContext(TooltipGroupContext), defaultProps$n = {
10648
10926
  openDelay: 0,
10649
10927
  closeDelay: 0
10650
10928
  };
10651
10929
  function TooltipGroup(props) {
10652
- const { openDelay, closeDelay, children } = useProps("TooltipGroup", defaultProps$f, props);
10930
+ const { openDelay, closeDelay, children } = useProps("TooltipGroup", defaultProps$n, props);
10653
10931
  return /* @__PURE__ */ jsx(TooltipGroupProvider, { value: !0, children: /* @__PURE__ */ jsx(FloatingDelayGroup, { delay: { open: openDelay, close: closeDelay }, children }) });
10654
10932
  }
10655
10933
  TooltipGroup.displayName = "@mantine/core/TooltipGroup";
@@ -10680,7 +10958,9 @@ function useTooltip(settings) {
10680
10958
  arrow({ element: settings.arrowRef, padding: settings.arrowOffset }),
10681
10959
  ...settings.inline ? [inline()] : []
10682
10960
  ]
10683
- }), { getReferenceProps, getFloatingProps } = useInteractions([
10961
+ });
10962
+ useDelayGroup(context, { id: uid });
10963
+ const { getReferenceProps, getFloatingProps } = useInteractions([
10684
10964
  useHover(context, {
10685
10965
  enabled: settings.events?.hover,
10686
10966
  delay: withinGroup ? groupDelay : { open: settings.openDelay, close: settings.closeDelay },
@@ -10689,8 +10969,7 @@ function useTooltip(settings) {
10689
10969
  useFocus(context, { enabled: settings.events?.focus, visibleOnly: !0 }),
10690
10970
  useRole(context, { role: "tooltip" }),
10691
10971
  // Cannot be used with controlled tooltip, page jumps
10692
- useDismiss(context, { enabled: typeof settings.opened > "u" }),
10693
- useDelayGroup(context, { id: uid })
10972
+ useDismiss(context, { enabled: typeof settings.opened > "u" })
10694
10973
  ]);
10695
10974
  useFloatingAutoUpdate({
10696
10975
  opened,
@@ -10715,7 +10994,7 @@ function useTooltip(settings) {
10715
10994
  placement
10716
10995
  };
10717
10996
  }
10718
- const defaultProps$e = {
10997
+ const defaultProps$m = {
10719
10998
  position: "top",
10720
10999
  refProp: "ref",
10721
11000
  withinPortal: !0,
@@ -10737,7 +11016,7 @@ const defaultProps$e = {
10737
11016
  "--tooltip-color": color ? "var(--mantine-color-white)" : void 0
10738
11017
  }
10739
11018
  }), Tooltip = factory((_props, ref) => {
10740
- const props = useProps("Tooltip", defaultProps$e, _props), {
11019
+ const props = useProps("Tooltip", defaultProps$m, _props), {
10741
11020
  children,
10742
11021
  position,
10743
11022
  refProp,
@@ -10778,7 +11057,7 @@ const defaultProps$e = {
10778
11057
  mod,
10779
11058
  floatingStrategy,
10780
11059
  ...others
10781
- } = useProps("Tooltip", defaultProps$e, props), { dir } = useDirection(), arrowRef = useRef(null), tooltip = useTooltip({
11060
+ } = useProps("Tooltip", defaultProps$m, props), { dir } = useDirection(), arrowRef = useRef(null), tooltip = useTooltip({
10782
11061
  position: getFloatingPosition(dir, position),
10783
11062
  closeDelay,
10784
11063
  openDelay,
@@ -10795,7 +11074,7 @@ const defaultProps$e = {
10795
11074
  }), getStyles2 = useStyles({
10796
11075
  name: "Tooltip",
10797
11076
  props,
10798
- classes: classes$9,
11077
+ classes: classes$a,
10799
11078
  className,
10800
11079
  style,
10801
11080
  classNames,
@@ -10809,7 +11088,7 @@ const defaultProps$e = {
10809
11088
  throw new Error(
10810
11089
  "[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"
10811
11090
  );
10812
- const targetRef = useMergedRef(tooltip.reference, children.ref, ref), transition = getTransitionProps(transitionProps, { duration: 100, transition: "fade" });
11091
+ const targetRef = useMergedRef(tooltip.reference, getRefProp(children), ref), transition = getTransitionProps(transitionProps, { duration: 100, transition: "fade" });
10813
11092
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
10814
11093
  /* @__PURE__ */ jsx(OptionalPortal, { ...portalProps, withinPortal, children: /* @__PURE__ */ jsx(
10815
11094
  Transition,
@@ -10874,12 +11153,12 @@ const defaultProps$e = {
10874
11153
  )
10875
11154
  ] });
10876
11155
  });
10877
- Tooltip.classes = classes$9;
11156
+ Tooltip.classes = classes$a;
10878
11157
  Tooltip.displayName = "@mantine/core/Tooltip";
10879
11158
  Tooltip.Floating = TooltipFloating;
10880
11159
  Tooltip.Group = TooltipGroup;
10881
- var __default__$8 = { root: "m_cf365364", indicator: "m_9e182ccd", label: "m_1738fcb2", input: "m_1714d588", control: "m_69686b9b", innerLabel: "m_78882f40" };
10882
- const classes$8 = __default__$8, defaultProps$d = {
11160
+ var __default__$9 = { root: "m_cf365364", indicator: "m_9e182ccd", label: "m_1738fcb2", input: "m_1714d588", control: "m_69686b9b", innerLabel: "m_78882f40" };
11161
+ const classes$9 = __default__$9, defaultProps$l = {
10883
11162
  withItemsBorders: !0
10884
11163
  }, varsResolver$7 = (theme, { radius, color, transitionDuration, size: size2, transitionTimingFunction }) => ({
10885
11164
  root: {
@@ -10892,7 +11171,7 @@ const classes$8 = __default__$8, defaultProps$d = {
10892
11171
  "--sc-font-size": getFontSize(size2)
10893
11172
  }
10894
11173
  }), SegmentedControl = factory((_props, ref) => {
10895
- const props = useProps("SegmentedControl", defaultProps$d, _props), {
11174
+ const props = useProps("SegmentedControl", defaultProps$l, _props), {
10896
11175
  classNames,
10897
11176
  className,
10898
11177
  style,
@@ -10921,7 +11200,7 @@ const classes$8 = __default__$8, defaultProps$d = {
10921
11200
  } = props, getStyles2 = useStyles({
10922
11201
  name: "SegmentedControl",
10923
11202
  props,
10924
- classes: classes$8,
11203
+ classes: classes$9,
10925
11204
  className,
10926
11205
  style,
10927
11206
  classNames,
@@ -11015,15 +11294,15 @@ const classes$8 = __default__$8, defaultProps$d = {
11015
11294
  }
11016
11295
  );
11017
11296
  });
11018
- SegmentedControl.classes = classes$8;
11297
+ SegmentedControl.classes = classes$9;
11019
11298
  SegmentedControl.displayName = "@mantine/core/SegmentedControl";
11020
- const defaultProps$c = {
11299
+ const defaultProps$k = {
11021
11300
  searchable: !1,
11022
11301
  withCheckIcon: !0,
11023
11302
  allowDeselect: !0,
11024
11303
  checkIconPosition: "left"
11025
11304
  }, Select = factory((_props, ref) => {
11026
- const props = useProps("Select", defaultProps$c, _props), {
11305
+ const props = useProps("Select", defaultProps$k, _props), {
11027
11306
  classNames,
11028
11307
  styles,
11029
11308
  unstyled,
@@ -11260,13 +11539,13 @@ function SimpleGridContainerVariables({
11260
11539
  }));
11261
11540
  return /* @__PURE__ */ jsx(InlineStyles, { styles: baseStyles, container: media, selector });
11262
11541
  }
11263
- var __default__$7 = { container: "m_925c2d2c", root: "m_2415a157" };
11264
- const classes$7 = __default__$7, defaultProps$b = {
11542
+ var __default__$8 = { container: "m_925c2d2c", root: "m_2415a157" };
11543
+ const classes$8 = __default__$8, defaultProps$j = {
11265
11544
  cols: 1,
11266
11545
  spacing: "md",
11267
11546
  type: "media"
11268
11547
  }, SimpleGrid = factory((_props, ref) => {
11269
- const props = useProps("SimpleGrid", defaultProps$b, _props), {
11548
+ const props = useProps("SimpleGrid", defaultProps$j, _props), {
11270
11549
  classNames,
11271
11550
  className,
11272
11551
  style,
@@ -11280,7 +11559,7 @@ const classes$7 = __default__$7, defaultProps$b = {
11280
11559
  ...others
11281
11560
  } = props, getStyles2 = useStyles({
11282
11561
  name: "SimpleGrid",
11283
- classes: classes$7,
11562
+ classes: classes$8,
11284
11563
  props,
11285
11564
  className,
11286
11565
  style,
@@ -11297,7 +11576,7 @@ const classes$7 = __default__$7, defaultProps$b = {
11297
11576
  /* @__PURE__ */ jsx(Box, { ref, ...getStyles2("root", { className: responsiveClassName }), ...others })
11298
11577
  ] });
11299
11578
  });
11300
- SimpleGrid.classes = classes$7;
11579
+ SimpleGrid.classes = classes$8;
11301
11580
  SimpleGrid.displayName = "@mantine/core/SimpleGrid";
11302
11581
  const [SliderProvider, useSliderContext] = createSafeContext(
11303
11582
  "SliderProvider was not found in tree"
@@ -11458,8 +11737,8 @@ function getPrecision(step) {
11458
11737
  const split = step.toString().split(".");
11459
11738
  return split.length > 1 ? split[1].length : 0;
11460
11739
  }
11461
- var __default__$6 = { root: "m_dd36362e", label: "m_c9357328", thumb: "m_c9a9a60a", trackContainer: "m_a8645c2", track: "m_c9ade57f", bar: "m_38aeed47", markWrapper: "m_b7b0423a", mark: "m_dd33bc19", markLabel: "m_68c77a5b" };
11462
- const classes$6 = __default__$6, defaultProps$a = {
11740
+ var __default__$7 = { root: "m_dd36362e", label: "m_c9357328", thumb: "m_c9a9a60a", trackContainer: "m_a8645c2", track: "m_c9ade57f", bar: "m_38aeed47", markWrapper: "m_b7b0423a", mark: "m_dd33bc19", markLabel: "m_68c77a5b" };
11741
+ const classes$7 = __default__$7, defaultProps$i = {
11463
11742
  radius: "xl",
11464
11743
  min: 0,
11465
11744
  max: 100,
@@ -11480,7 +11759,7 @@ const classes$6 = __default__$6, defaultProps$a = {
11480
11759
  "--slider-thumb-size": thumbSize !== void 0 ? rem(thumbSize) : "calc(var(--slider-size) * 2)"
11481
11760
  }
11482
11761
  }), Slider = factory((_props, ref) => {
11483
- const props = useProps("Slider", defaultProps$a, _props), {
11762
+ const props = useProps("Slider", defaultProps$i, _props), {
11484
11763
  classNames,
11485
11764
  styles,
11486
11765
  value,
@@ -11508,11 +11787,12 @@ const classes$6 = __default__$6, defaultProps$a = {
11508
11787
  style,
11509
11788
  vars,
11510
11789
  hiddenInputProps,
11790
+ restrictToMarks,
11511
11791
  ...others
11512
11792
  } = props, getStyles2 = useStyles({
11513
11793
  name: "Slider",
11514
11794
  props,
11515
- classes: classes$6,
11795
+ classes: classes$7,
11516
11796
  classNames,
11517
11797
  className,
11518
11798
  styles,
@@ -11535,13 +11815,25 @@ const classes$6 = __default__$6, defaultProps$a = {
11535
11815
  step,
11536
11816
  precision
11537
11817
  });
11538
- setValue(nextValue), valueRef.current = nextValue;
11818
+ setValue(
11819
+ restrictToMarks && marks?.length ? findClosestNumber(
11820
+ nextValue,
11821
+ marks.map((mark) => mark.value)
11822
+ ) : nextValue
11823
+ ), valueRef.current = nextValue;
11539
11824
  }
11540
11825
  },
11541
- [disabled, min2, max2, step, precision, setValue]
11826
+ [disabled, min2, max2, step, precision, setValue, marks, restrictToMarks]
11542
11827
  ), { ref: container, active } = useMove(
11543
11828
  handleChange,
11544
- { onScrubEnd: () => onChangeEnd?.(valueRef.current) },
11829
+ {
11830
+ onScrubEnd: () => onChangeEnd?.(
11831
+ restrictToMarks && marks?.length ? findClosestNumber(
11832
+ valueRef.current,
11833
+ marks.map((mark) => mark.value)
11834
+ ) : valueRef.current
11835
+ )
11836
+ },
11545
11837
  dir
11546
11838
  ), handleTrackKeydownCapture = (event) => {
11547
11839
  if (!disabled)
@@ -11644,15 +11936,15 @@ const classes$6 = __default__$6, defaultProps$a = {
11644
11936
  }
11645
11937
  ) });
11646
11938
  });
11647
- Slider.classes = classes$6;
11939
+ Slider.classes = classes$7;
11648
11940
  Slider.displayName = "@mantine/core/Slider";
11649
- const defaultProps$9 = {}, Space = factory((props, ref) => {
11650
- const { w, h, miw, mih, ...others } = useProps("Space", defaultProps$9, props);
11941
+ const defaultProps$h = {}, Space = factory((props, ref) => {
11942
+ const { w, h, miw, mih, ...others } = useProps("Space", defaultProps$h, props);
11651
11943
  return /* @__PURE__ */ jsx(Box, { ref, ...others, w, miw: miw ?? w, h, mih: mih ?? h });
11652
11944
  });
11653
11945
  Space.displayName = "@mantine/core/Space";
11654
- var __default__$5 = { root: "m_559cce2d", content: "m_b912df4e", control: "m_b9131032" };
11655
- const classes$5 = __default__$5, defaultProps$8 = {
11946
+ var __default__$6 = { root: "m_559cce2d", content: "m_b912df4e", control: "m_b9131032" };
11947
+ const classes$6 = __default__$6, defaultProps$g = {
11656
11948
  maxHeight: 100,
11657
11949
  initialState: !1
11658
11950
  }, varsResolver$5 = (_, { transitionDuration }) => ({
@@ -11660,7 +11952,7 @@ const classes$5 = __default__$5, defaultProps$8 = {
11660
11952
  "--spoiler-transition-duration": transitionDuration !== void 0 ? `${transitionDuration}ms` : void 0
11661
11953
  }
11662
11954
  }), Spoiler = factory((_props, ref) => {
11663
- const props = useProps("Spoiler", defaultProps$8, _props), {
11955
+ const props = useProps("Spoiler", defaultProps$g, _props), {
11664
11956
  classNames,
11665
11957
  className,
11666
11958
  style,
@@ -11680,7 +11972,7 @@ const classes$5 = __default__$5, defaultProps$8 = {
11680
11972
  ...others
11681
11973
  } = props, getStyles2 = useStyles({
11682
11974
  name: "Spoiler",
11683
- classes: classes$5,
11975
+ classes: classes$6,
11684
11976
  props,
11685
11977
  className,
11686
11978
  style,
@@ -11733,10 +12025,10 @@ const classes$5 = __default__$5, defaultProps$8 = {
11733
12025
  }
11734
12026
  );
11735
12027
  });
11736
- Spoiler.classes = classes$5;
12028
+ Spoiler.classes = classes$6;
11737
12029
  Spoiler.displayName = "@mantine/core/Spoiler";
11738
- var __default__$4 = { root: "m_6d731127" };
11739
- const classes$4 = __default__$4, defaultProps$7 = {
12030
+ var __default__$5 = { root: "m_6d731127" };
12031
+ const classes$5 = __default__$5, defaultProps$f = {
11740
12032
  gap: "md",
11741
12033
  align: "stretch",
11742
12034
  justify: "flex-start"
@@ -11747,7 +12039,7 @@ const classes$4 = __default__$4, defaultProps$7 = {
11747
12039
  "--stack-justify": justify
11748
12040
  }
11749
12041
  }), Stack = factory((_props, ref) => {
11750
- const props = useProps("Stack", defaultProps$7, _props), {
12042
+ const props = useProps("Stack", defaultProps$f, _props), {
11751
12043
  classNames,
11752
12044
  className,
11753
12045
  style,
@@ -11762,7 +12054,7 @@ const classes$4 = __default__$4, defaultProps$7 = {
11762
12054
  } = props, getStyles2 = useStyles({
11763
12055
  name: "Stack",
11764
12056
  props,
11765
- classes: classes$4,
12057
+ classes: classes$5,
11766
12058
  className,
11767
12059
  style,
11768
12060
  classNames,
@@ -11773,14 +12065,14 @@ const classes$4 = __default__$4, defaultProps$7 = {
11773
12065
  });
11774
12066
  return /* @__PURE__ */ jsx(Box, { ref, ...getStyles2("root"), variant, ...others });
11775
12067
  });
11776
- Stack.classes = classes$4;
12068
+ Stack.classes = classes$5;
11777
12069
  Stack.displayName = "@mantine/core/Stack";
11778
12070
  const [TabsProvider, useTabsContext] = createSafeContext(
11779
12071
  "Tabs component was not found in the tree"
11780
12072
  );
11781
- var __default__$3 = { root: "m_89d60db1", "list--default": "m_576c9d4", list: "m_89d33d6d", panel: "m_b0c91715", tab: "m_4ec4dce6", tabSection: "m_fc420b1f", "tab--default": "m_539e827b", "list--outline": "m_6772fbd5", "tab--outline": "m_b59ab47c", "tab--pills": "m_c3381914" };
11782
- const classes$3 = __default__$3, defaultProps$6 = {}, TabsList = factory((_props, ref) => {
11783
- const props = useProps("TabsList", defaultProps$6, _props), { children, className, grow, justify, classNames, styles, style, mod, ...others } = props, ctx = useTabsContext();
12073
+ var __default__$4 = { root: "m_89d60db1", "list--default": "m_576c9d4", list: "m_89d33d6d", panel: "m_b0c91715", tab: "m_4ec4dce6", tabSection: "m_fc420b1f", "tab--default": "m_539e827b", "list--outline": "m_6772fbd5", "tab--outline": "m_b59ab47c", "tab--pills": "m_c3381914" };
12074
+ const classes$4 = __default__$4, defaultProps$e = {}, TabsList = factory((_props, ref) => {
12075
+ const props = useProps("TabsList", defaultProps$e, _props), { children, className, grow, justify, classNames, styles, style, mod, ...others } = props, ctx = useTabsContext();
11784
12076
  return /* @__PURE__ */ jsx(
11785
12077
  Box,
11786
12078
  {
@@ -11811,10 +12103,10 @@ const classes$3 = __default__$3, defaultProps$6 = {}, TabsList = factory((_props
11811
12103
  }
11812
12104
  );
11813
12105
  });
11814
- TabsList.classes = classes$3;
12106
+ TabsList.classes = classes$4;
11815
12107
  TabsList.displayName = "@mantine/core/TabsList";
11816
- const defaultProps$5 = {}, TabsPanel = factory((_props, ref) => {
11817
- const props = useProps("TabsPanel", defaultProps$5, _props), { children, className, value, classNames, styles, style, mod, keepMounted, ...others } = props, ctx = useTabsContext(), active = ctx.value === value, content = ctx.keepMounted || keepMounted || active ? children : null;
12108
+ const defaultProps$d = {}, TabsPanel = factory((_props, ref) => {
12109
+ const props = useProps("TabsPanel", defaultProps$d, _props), { children, className, value, classNames, styles, style, mod, keepMounted, ...others } = props, ctx = useTabsContext(), active = ctx.value === value, content = ctx.keepMounted || keepMounted || active ? children : null;
11818
12110
  return /* @__PURE__ */ jsx(
11819
12111
  Box,
11820
12112
  {
@@ -11835,10 +12127,10 @@ const defaultProps$5 = {}, TabsPanel = factory((_props, ref) => {
11835
12127
  }
11836
12128
  );
11837
12129
  });
11838
- TabsPanel.classes = classes$3;
12130
+ TabsPanel.classes = classes$4;
11839
12131
  TabsPanel.displayName = "@mantine/core/TabsPanel";
11840
- const defaultProps$4 = {}, TabsTab = factory((_props, ref) => {
11841
- const props = useProps("TabsTab", defaultProps$4, _props), {
12132
+ const defaultProps$c = {}, TabsTab = factory((_props, ref) => {
12133
+ const props = useProps("TabsTab", defaultProps$c, _props), {
11842
12134
  className,
11843
12135
  children,
11844
12136
  rightSection,
@@ -11853,6 +12145,7 @@ const defaultProps$4 = {}, TabsTab = factory((_props, ref) => {
11853
12145
  styles,
11854
12146
  vars,
11855
12147
  mod,
12148
+ tabIndex,
11856
12149
  ...others
11857
12150
  } = props, theme = useMantineTheme(), { dir } = useDirection(), ctx = useTabsContext(), active = value === ctx.value, activateTab = (event) => {
11858
12151
  ctx.onChange(ctx.allowTabDeactivation && value === ctx.value ? null : value), onClick?.(event);
@@ -11879,7 +12172,7 @@ const defaultProps$4 = {}, TabsTab = factory((_props, ref) => {
11879
12172
  role: "tab",
11880
12173
  id: ctx.getTabId(value),
11881
12174
  "aria-selected": active,
11882
- tabIndex: active || ctx.value === null ? 0 : -1,
12175
+ tabIndex: tabIndex || active || ctx.value === null ? 0 : -1,
11883
12176
  "aria-controls": ctx.getPanelId(value),
11884
12177
  onClick: activateTab,
11885
12178
  __vars: { "--tabs-color": color ? getThemeColor(color, theme) : void 0 },
@@ -11900,9 +12193,9 @@ const defaultProps$4 = {}, TabsTab = factory((_props, ref) => {
11900
12193
  }
11901
12194
  );
11902
12195
  });
11903
- TabsTab.classes = classes$3;
12196
+ TabsTab.classes = classes$4;
11904
12197
  TabsTab.displayName = "@mantine/core/TabsTab";
11905
- const VALUE_ERROR = "Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value", defaultProps$3 = {
12198
+ const VALUE_ERROR = "Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value", defaultProps$b = {
11906
12199
  keepMounted: !0,
11907
12200
  orientation: "horizontal",
11908
12201
  loop: !0,
@@ -11919,7 +12212,7 @@ const VALUE_ERROR = "Tabs.Tab or Tabs.Panel component was rendered with invalid
11919
12212
  "--tabs-text-color": getAutoContrastValue(autoContrast, theme) ? getContrastColor({ color, theme, autoContrast }) : void 0
11920
12213
  }
11921
12214
  }), Tabs = factory((_props, ref) => {
11922
- const props = useProps("Tabs", defaultProps$3, _props), {
12215
+ const props = useProps("Tabs", defaultProps$b, _props), {
11923
12216
  defaultValue,
11924
12217
  value,
11925
12218
  onChange,
@@ -11952,7 +12245,7 @@ const VALUE_ERROR = "Tabs.Tab or Tabs.Panel component was rendered with invalid
11952
12245
  }), getStyles2 = useStyles({
11953
12246
  name: "Tabs",
11954
12247
  props,
11955
- classes: classes$3,
12248
+ classes: classes$4,
11956
12249
  className,
11957
12250
  style,
11958
12251
  classNames,
@@ -12005,13 +12298,13 @@ const VALUE_ERROR = "Tabs.Tab or Tabs.Panel component was rendered with invalid
12005
12298
  }
12006
12299
  );
12007
12300
  });
12008
- Tabs.classes = classes$3;
12301
+ Tabs.classes = classes$4;
12009
12302
  Tabs.displayName = "@mantine/core/Tabs";
12010
12303
  Tabs.Tab = TabsTab;
12011
12304
  Tabs.Panel = TabsPanel;
12012
12305
  Tabs.List = TabsList;
12013
- var __default__$2 = { root: "m_7341320d" };
12014
- const classes$2 = __default__$2, defaultProps$2 = {}, varsResolver$2 = (theme, { size: size2, radius, variant, gradient, color, autoContrast }) => {
12306
+ var __default__$3 = { root: "m_7341320d" };
12307
+ const classes$3 = __default__$3, defaultProps$a = {}, varsResolver$2 = (theme, { size: size2, radius, variant, gradient, color, autoContrast }) => {
12015
12308
  const colors = theme.variantColorResolver({
12016
12309
  color: color || theme.primaryColor,
12017
12310
  theme,
@@ -12029,9 +12322,9 @@ const classes$2 = __default__$2, defaultProps$2 = {}, varsResolver$2 = (theme, {
12029
12322
  }
12030
12323
  };
12031
12324
  }, ThemeIcon = factory((_props, ref) => {
12032
- const props = useProps("ThemeIcon", defaultProps$2, _props), { classNames, className, style, styles, unstyled, vars, autoContrast, ...others } = props, getStyles2 = useStyles({
12325
+ const props = useProps("ThemeIcon", defaultProps$a, _props), { classNames, className, style, styles, unstyled, vars, autoContrast, ...others } = props, getStyles2 = useStyles({
12033
12326
  name: "ThemeIcon",
12034
- classes: classes$2,
12327
+ classes: classes$3,
12035
12328
  props,
12036
12329
  className,
12037
12330
  style,
@@ -12043,7 +12336,7 @@ const classes$2 = __default__$2, defaultProps$2 = {}, varsResolver$2 = (theme, {
12043
12336
  });
12044
12337
  return /* @__PURE__ */ jsx(Box, { ref, ...getStyles2("root"), ...others });
12045
12338
  });
12046
- ThemeIcon.classes = classes$2;
12339
+ ThemeIcon.classes = classes$3;
12047
12340
  ThemeIcon.displayName = "@mantine/core/ThemeIcon";
12048
12341
  const headings = ["h1", "h2", "h3", "h4", "h5", "h6"], sizes = ["xs", "sm", "md", "lg", "xl"];
12049
12342
  function getTitleSize(order, size2) {
@@ -12062,8 +12355,8 @@ function getTitleSize(order, size2) {
12062
12355
  lineHeight: `var(--mantine-h${order}-line-height)`
12063
12356
  };
12064
12357
  }
12065
- var __default__$1 = { root: "m_8a5d1357" };
12066
- const classes$1 = __default__$1, defaultProps$1 = {
12358
+ var __default__$2 = { root: "m_8a5d1357" };
12359
+ const classes$2 = __default__$2, defaultProps$9 = {
12067
12360
  order: 1
12068
12361
  }, varsResolver$1 = (_, { order, size: size2, lineClamp, textWrap }) => {
12069
12362
  const sizeVariables = getTitleSize(order, size2);
@@ -12077,7 +12370,7 @@ const classes$1 = __default__$1, defaultProps$1 = {
12077
12370
  }
12078
12371
  };
12079
12372
  }, Title = factory((_props, ref) => {
12080
- const props = useProps("Title", defaultProps$1, _props), {
12373
+ const props = useProps("Title", defaultProps$9, _props), {
12081
12374
  classNames,
12082
12375
  className,
12083
12376
  style,
@@ -12094,7 +12387,7 @@ const classes$1 = __default__$1, defaultProps$1 = {
12094
12387
  } = props, getStyles2 = useStyles({
12095
12388
  name: "Title",
12096
12389
  props,
12097
- classes: classes$1,
12390
+ classes: classes$2,
12098
12391
  className,
12099
12392
  style,
12100
12393
  classNames,
@@ -12116,7 +12409,7 @@ const classes$1 = __default__$1, defaultProps$1 = {
12116
12409
  }
12117
12410
  ) : null;
12118
12411
  });
12119
- Title.classes = classes$1;
12412
+ Title.classes = classes$2;
12120
12413
  Title.displayName = "@mantine/core/Title";
12121
12414
  function getValuesRange(anchor, value, flatValues) {
12122
12415
  if (!anchor || !value)
@@ -12265,6 +12558,9 @@ function getChildrenNodesValues(value, data, acc = []) {
12265
12558
  Array.isArray(child.children) && child.children.length > 0 ? getChildrenNodesValues(child.value, data, acc) : acc.push(child.value);
12266
12559
  }), acc) : acc;
12267
12560
  }
12561
+ function getAllChildrenNodes(data) {
12562
+ return data.reduce((acc, node) => (Array.isArray(node.children) && node.children.length > 0 ? acc.push(...getAllChildrenNodes(node.children)) : acc.push(node.value), acc), []);
12563
+ }
12268
12564
  function isNodeChecked(value, data, checkedState) {
12269
12565
  return checkedState.length === 0 ? !1 : checkedState.includes(value) ? !0 : getAllCheckedNodes(data, checkedState).result.some((node) => node.value === value && node.checked);
12270
12566
  }
@@ -12273,33 +12569,47 @@ function isNodeIndeterminate(value, data, checkedState) {
12273
12569
  return checkedState.length === 0 ? !1 : getAllCheckedNodes(data, checkedState).result.some((node) => node.value === value && node.indeterminate);
12274
12570
  }
12275
12571
  const memoizedIsNodeIndeterminate = memoize(isNodeIndeterminate);
12276
- function getInitialExpandedState(initialState, data, value, acc = {}) {
12572
+ function getInitialTreeExpandedState(initialState, data, value, acc = {}) {
12277
12573
  return data.forEach((node) => {
12278
- acc[node.value] = node.value in initialState ? initialState[node.value] : node.value === value, Array.isArray(node.children) && getInitialExpandedState(initialState, node.children, value, acc);
12574
+ acc[node.value] = node.value in initialState ? initialState[node.value] : node.value === value, Array.isArray(node.children) && getInitialTreeExpandedState(initialState, node.children, value, acc);
12279
12575
  }), acc;
12280
12576
  }
12281
12577
  function getInitialCheckedState(initialState, data) {
12282
12578
  const acc = [];
12283
- return initialState.forEach((node) => acc.push(...getChildrenNodesValues(node, data))), acc;
12579
+ return initialState.forEach((node) => acc.push(...getChildrenNodesValues(node, data))), Array.from(new Set(acc));
12284
12580
  }
12285
12581
  function useTree({
12286
12582
  initialSelectedState = [],
12287
12583
  initialCheckedState = [],
12288
12584
  initialExpandedState = {},
12289
- multiple = !1
12585
+ multiple = !1,
12586
+ onNodeCollapse,
12587
+ onNodeExpand
12290
12588
  } = {}) {
12291
12589
  const [data, setData] = useState([]), [expandedState, setExpandedState] = useState(initialExpandedState), [selectedState, setSelectedState] = useState(initialSelectedState), [checkedState, setCheckedState] = useState(initialCheckedState), [anchorNode, setAnchorNode] = useState(null), [hoveredNode, setHoveredNode] = useState(null), initialize = useCallback(
12292
12590
  (_data) => {
12293
- setExpandedState((current) => getInitialExpandedState(current, _data, selectedState)), setCheckedState((current) => getInitialCheckedState(current, _data)), setData(_data);
12591
+ setExpandedState((current) => getInitialTreeExpandedState(current, _data, selectedState)), setCheckedState((current) => getInitialCheckedState(current, _data)), setData(_data);
12294
12592
  },
12295
12593
  [selectedState, checkedState]
12296
- ), toggleExpanded = useCallback((value) => {
12297
- setExpandedState((current) => ({ ...current, [value]: !current[value] }));
12298
- }, []), collapse = useCallback((value) => {
12299
- setExpandedState((current) => ({ ...current, [value]: !1 }));
12300
- }, []), expand = useCallback((value) => {
12301
- setExpandedState((current) => ({ ...current, [value]: !0 }));
12302
- }, []), expandAllNodes = useCallback(() => {
12594
+ ), toggleExpanded = useCallback(
12595
+ (value) => {
12596
+ setExpandedState((current) => {
12597
+ const nextState = { ...current, [value]: !current[value] };
12598
+ return nextState[value] ? onNodeExpand?.(value) : onNodeCollapse?.(value), nextState;
12599
+ });
12600
+ },
12601
+ [onNodeCollapse, onNodeExpand]
12602
+ ), collapse = useCallback(
12603
+ (value) => {
12604
+ setExpandedState((current) => (current[value] !== !1 && onNodeCollapse?.(value), { ...current, [value]: !1 }));
12605
+ },
12606
+ [onNodeCollapse]
12607
+ ), expand = useCallback(
12608
+ (value) => {
12609
+ setExpandedState((current) => (current[value] !== !0 && onNodeExpand?.(value), { ...current, [value]: !0 }));
12610
+ },
12611
+ [onNodeExpand]
12612
+ ), expandAllNodes = useCallback(() => {
12303
12613
  setExpandedState((current) => {
12304
12614
  const next = { ...current };
12305
12615
  return Object.keys(next).forEach((key) => {
@@ -12336,7 +12646,11 @@ function useTree({
12336
12646
  setCheckedState((current) => current.filter((item) => !checkedNodes.includes(item)));
12337
12647
  },
12338
12648
  [data]
12339
- );
12649
+ ), checkAllNodes = useCallback(() => {
12650
+ setCheckedState(() => getAllChildrenNodes(data));
12651
+ }, [data]), uncheckAllNodes = useCallback(() => {
12652
+ setCheckedState([]);
12653
+ }, []);
12340
12654
  return {
12341
12655
  multiple,
12342
12656
  expandedState,
@@ -12352,6 +12666,9 @@ function useTree({
12352
12666
  setExpandedState,
12353
12667
  checkNode,
12354
12668
  uncheckNode,
12669
+ checkAllNodes,
12670
+ uncheckAllNodes,
12671
+ setCheckedState,
12355
12672
  toggleSelected,
12356
12673
  select,
12357
12674
  deselect,
@@ -12364,12 +12681,12 @@ function useTree({
12364
12681
  isNodeIndeterminate: (value) => memoizedIsNodeIndeterminate(value, data, checkedState)
12365
12682
  };
12366
12683
  }
12367
- var __default__ = { root: "m_f698e191", subtree: "m_75f3ecf", node: "m_f6970eb1", label: "m_dc283425" };
12368
- const classes = __default__;
12684
+ var __default__$1 = { root: "m_f698e191", subtree: "m_75f3ecf", node: "m_f6970eb1", label: "m_dc283425" };
12685
+ const classes$1 = __default__$1;
12369
12686
  function getFlatValues(data) {
12370
12687
  return data.reduce((acc, item) => (acc.push(item.value), item.children && acc.push(...getFlatValues(item.children)), acc), []);
12371
12688
  }
12372
- const defaultProps = {
12689
+ const defaultProps$8 = {
12373
12690
  expandOnClick: !0,
12374
12691
  allowRangeSelection: !0,
12375
12692
  expandOnSpace: !0
@@ -12378,7 +12695,7 @@ const defaultProps = {
12378
12695
  "--level-offset": getSpacing(levelOffset)
12379
12696
  }
12380
12697
  }), Tree = factory((_props, ref) => {
12381
- const props = useProps("Tree", defaultProps, _props), {
12698
+ const props = useProps("Tree", defaultProps$8, _props), {
12382
12699
  classNames,
12383
12700
  className,
12384
12701
  style,
@@ -12397,7 +12714,7 @@ const defaultProps = {
12397
12714
  ...others
12398
12715
  } = props, defaultController = useTree(), controller = tree || defaultController, getStyles2 = useStyles({
12399
12716
  name: "Tree",
12400
- classes,
12717
+ classes: classes$1,
12401
12718
  props,
12402
12719
  className,
12403
12720
  style,
@@ -12443,7 +12760,7 @@ const defaultProps = {
12443
12760
  );
12444
12761
  });
12445
12762
  Tree.displayName = "@mantine/core/Tree";
12446
- Tree.classes = classes;
12763
+ Tree.classes = classes$1;
12447
12764
  function getSizesVariables(theme, themeKey, name) {
12448
12765
  return Object.keys(theme[themeKey]).reduce((acc, size2) => (acc[size2] = `var(--mantine-${name}-${size2})`, acc), {});
12449
12766
  }
@@ -12539,79 +12856,606 @@ function themeToVars(theme) {
12539
12856
  largerThan: (breakpoint) => `(min-width: ${getBreakpointValue(breakpoint, mergedTheme)})`
12540
12857
  };
12541
12858
  }
12859
+ function createStore(initialState) {
12860
+ let state = initialState, initialized = !1;
12861
+ const listeners = /* @__PURE__ */ new Set();
12862
+ return {
12863
+ getState() {
12864
+ return state;
12865
+ },
12866
+ updateState(value) {
12867
+ state = typeof value == "function" ? value(state) : value;
12868
+ },
12869
+ setState(value) {
12870
+ this.updateState(value), listeners.forEach((listener) => listener(state));
12871
+ },
12872
+ initialize(value) {
12873
+ initialized || (state = value, initialized = !0);
12874
+ },
12875
+ subscribe(callback) {
12876
+ return listeners.add(callback), () => listeners.delete(callback);
12877
+ }
12878
+ };
12879
+ }
12880
+ function useStore(store) {
12881
+ return useSyncExternalStore(
12882
+ store.subscribe,
12883
+ () => store.getState(),
12884
+ () => store.getState()
12885
+ );
12886
+ }
12887
+ const createSpotlightStore = () => createStore({
12888
+ opened: !1,
12889
+ empty: !1,
12890
+ selected: -1,
12891
+ listId: "",
12892
+ query: "",
12893
+ registeredActions: /* @__PURE__ */ new Set()
12894
+ }), useSpotlight = (store) => useStore(store);
12895
+ function updateSpotlightStateAction(update, store) {
12896
+ const state = store.getState();
12897
+ store.setState({ ...state, ...update(store.getState()) });
12898
+ }
12899
+ function openSpotlightAction(store) {
12900
+ updateSpotlightStateAction(() => ({ opened: !0, selected: -1 }), store);
12901
+ }
12902
+ function closeSpotlightAction(store) {
12903
+ updateSpotlightStateAction(() => ({ opened: !1 }), store);
12904
+ }
12905
+ function toggleSpotlightAction(store) {
12906
+ updateSpotlightStateAction(
12907
+ (state) => ({ opened: !state.opened, selected: state.opened ? state.selected : -1 }),
12908
+ store
12909
+ );
12910
+ }
12911
+ function setSelectedAction(index2, store) {
12912
+ store.updateState((state) => ({ ...state, selected: index2 }));
12913
+ }
12914
+ function setListId(id, store) {
12915
+ store.updateState((state) => ({ ...state, listId: id }));
12916
+ }
12917
+ function findElementByQuerySelector(selector, root = document) {
12918
+ const element = root.querySelector(selector);
12919
+ if (element)
12920
+ return element;
12921
+ const children = root instanceof ShadowRoot ? root.host.children : root.children;
12922
+ for (let i = 0; i < children.length; i += 1) {
12923
+ const child = children[i];
12924
+ if (child.shadowRoot) {
12925
+ const shadowElement = findElementByQuerySelector(selector, child.shadowRoot);
12926
+ if (shadowElement)
12927
+ return shadowElement;
12928
+ }
12929
+ const nestedElement = findElementByQuerySelector(selector, child);
12930
+ if (nestedElement)
12931
+ return nestedElement;
12932
+ }
12933
+ return null;
12934
+ }
12935
+ function selectAction(index2, store) {
12936
+ const state = store.getState(), actionsList = state.listId ? findElementByQuerySelector(`#${state.listId}`) : null, selected = actionsList?.querySelector("[data-selected]"), actions = actionsList?.querySelectorAll("[data-action]") ?? [], nextIndex = index2 === -1 ? actions.length - 1 : index2 === actions.length ? 0 : index2, selectedIndex = clamp$2(nextIndex, 0, actions.length - 1);
12937
+ return selected?.removeAttribute("data-selected"), actions[selectedIndex]?.scrollIntoView({ block: "nearest" }), actions[selectedIndex]?.setAttribute("data-selected", "true"), setSelectedAction(selectedIndex, store), selectedIndex;
12938
+ }
12939
+ function selectNextAction(store) {
12940
+ return selectAction(store.getState().selected + 1, store);
12941
+ }
12942
+ function selectPreviousAction(store) {
12943
+ return selectAction(store.getState().selected - 1, store);
12944
+ }
12945
+ function triggerSelectedAction(store) {
12946
+ const state = store.getState();
12947
+ findElementByQuerySelector(
12948
+ `#${state.listId} [data-selected]`
12949
+ )?.click();
12950
+ }
12951
+ function registerAction(id, store) {
12952
+ const state = store.getState();
12953
+ return state.registeredActions.add(id), () => {
12954
+ state.registeredActions.delete(id);
12955
+ };
12956
+ }
12957
+ function setQuery(query, store) {
12958
+ updateSpotlightStateAction(() => ({ query }), store), Promise.resolve().then(() => {
12959
+ selectAction(0, store), updateSpotlightStateAction(
12960
+ (state) => ({
12961
+ empty: state.query.trim().length > 0 && state.registeredActions.size === 0 || !1
12962
+ }),
12963
+ store
12964
+ );
12965
+ });
12966
+ }
12967
+ function clearSpotlightState({ clearQuery }, store) {
12968
+ store.updateState((state) => ({
12969
+ ...state,
12970
+ selected: -1,
12971
+ query: clearQuery ? "" : state.query,
12972
+ empty: clearQuery ? !1 : state.empty
12973
+ }));
12974
+ }
12975
+ const spotlightActions = {
12976
+ open: openSpotlightAction,
12977
+ close: closeSpotlightAction,
12978
+ toggle: toggleSpotlightAction,
12979
+ updateState: updateSpotlightStateAction,
12980
+ setSelectedAction,
12981
+ setListId,
12982
+ selectAction,
12983
+ selectNextAction,
12984
+ selectPreviousAction,
12985
+ triggerSelectedAction,
12986
+ registerAction,
12987
+ setQuery,
12988
+ clearSpotlightState
12989
+ };
12990
+ function createSpotlight() {
12991
+ const store = createSpotlightStore();
12992
+ return [store, {
12993
+ open: () => openSpotlightAction(store),
12994
+ close: () => closeSpotlightAction(store),
12995
+ toggle: () => toggleSpotlightAction(store)
12996
+ }];
12997
+ }
12998
+ const [spotlightStore, spotlight] = createSpotlight(), { open: openSpotlight, close: closeSpotlight, toggle: toggleSpotlight } = spotlight;
12999
+ function isActionsGroup(item) {
13000
+ const _item = item;
13001
+ return _item.group !== void 0 && Array.isArray(_item.actions);
13002
+ }
13003
+ function getKeywords(keywords) {
13004
+ return Array.isArray(keywords) ? keywords.map((keyword) => keyword.trim()).join(",").toLowerCase().trim() : typeof keywords == "string" ? keywords.toLowerCase().trim() : "";
13005
+ }
13006
+ function getFlatActions(data) {
13007
+ return data.reduce((acc, item) => "actions" in item ? [...acc, ...item.actions.map((action) => ({ ...action, group: item.group }))] : [...acc, item], []);
13008
+ }
13009
+ function flatActionsToGroups(data) {
13010
+ const groups = {}, result = [];
13011
+ return data.forEach((action) => {
13012
+ action.group ? (groups[action.group] || (groups[action.group] = { pushed: !1, data: { group: action.group, actions: [] } }), groups[action.group].data.actions.push(action), groups[action.group].pushed || (groups[action.group].pushed = !0, result.push(groups[action.group].data))) : result.push(action);
13013
+ }), result;
13014
+ }
13015
+ const defaultSpotlightFilter = (_query, data) => {
13016
+ const query = _query.trim().toLowerCase(), priorityMatrix = [[], []];
13017
+ return getFlatActions(data).forEach((item) => {
13018
+ item.label?.toLowerCase().includes(query) ? priorityMatrix[0].push(item) : (item.description?.toLowerCase().includes(query) || getKeywords(item.keywords).includes(query)) && priorityMatrix[1].push(item);
13019
+ }), flatActionsToGroups(priorityMatrix.flat());
13020
+ };
13021
+ function limitActions(actions, limit) {
13022
+ if (!Array.isArray(actions))
13023
+ return [];
13024
+ let count2 = 0;
13025
+ return actions.reduce((acc, item) => {
13026
+ if (count2 >= limit)
13027
+ return acc;
13028
+ if (isActionsGroup(item)) {
13029
+ const groupActions = limitActions(item.actions, limit - count2);
13030
+ acc.push({
13031
+ group: item.group,
13032
+ actions: groupActions
13033
+ }), count2 += groupActions.length;
13034
+ } else
13035
+ acc.push(item), count2 += 1;
13036
+ return acc;
13037
+ }, []);
13038
+ }
13039
+ const [SpotlightProvider, useSpotlightContext] = createSafeContext(
13040
+ "Spotlight component was not found in tree"
13041
+ );
13042
+ var __default__ = { root: "m_d2b315db", content: "m_3cd250e0", body: "m_d2abce9b", search: "m_f366a061", actionsList: "m_6e463822", action: "m_d49bb8ef", actionBody: "m_3d475731", actionSection: "m_832642f6", actionLabel: "m_6c2a1345", actionDescription: "m_a6d9d78d", empty: "m_82f78f74", footer: "m_ddcaf054", actionsGroup: "m_5a3e5f7b" };
13043
+ const classes = __default__, defaultProps$7 = {
13044
+ dimmedSections: !0,
13045
+ highlightQuery: !1
13046
+ }, SpotlightAction = factory((_props, ref) => {
13047
+ const props = useProps("SpotlightAction", defaultProps$7, _props), {
13048
+ className,
13049
+ style,
13050
+ classNames,
13051
+ styles,
13052
+ id,
13053
+ description,
13054
+ label,
13055
+ leftSection,
13056
+ rightSection,
13057
+ children,
13058
+ dimmedSections,
13059
+ highlightQuery,
13060
+ highlightColor,
13061
+ closeSpotlightOnTrigger,
13062
+ onClick,
13063
+ onMouseDown,
13064
+ keywords,
13065
+ vars,
13066
+ ...others
13067
+ } = props, ctx = useSpotlightContext(), stylesApi = { classNames, styles }, labelNode = highlightQuery && typeof label == "string" ? /* @__PURE__ */ jsx(
13068
+ Highlight,
13069
+ {
13070
+ component: "span",
13071
+ highlight: ctx.query,
13072
+ color: highlightColor,
13073
+ ...ctx.getStyles("actionLabel", stylesApi),
13074
+ children: label
13075
+ }
13076
+ ) : /* @__PURE__ */ jsx("span", { ...ctx.getStyles("actionLabel", stylesApi), children: label });
13077
+ return /* @__PURE__ */ jsx(
13078
+ UnstyledButton,
13079
+ {
13080
+ ref,
13081
+ "data-action": !0,
13082
+ ...ctx.getStyles("action", { className, style, ...stylesApi }),
13083
+ ...others,
13084
+ onMouseDown: (event) => {
13085
+ event.preventDefault(), onMouseDown?.(event);
13086
+ },
13087
+ onClick: (event) => {
13088
+ onClick?.(event), (closeSpotlightOnTrigger ?? ctx.closeOnActionTrigger) && spotlightActions.close(ctx.store);
13089
+ },
13090
+ tabIndex: -1,
13091
+ children: children || /* @__PURE__ */ jsxs(Fragment$1, { children: [
13092
+ leftSection && /* @__PURE__ */ jsx(
13093
+ Box,
13094
+ {
13095
+ component: "span",
13096
+ mod: { position: "left", dimmed: dimmedSections },
13097
+ ...ctx.getStyles("actionSection", stylesApi),
13098
+ children: leftSection
13099
+ }
13100
+ ),
13101
+ /* @__PURE__ */ jsxs("span", { ...ctx.getStyles("actionBody", stylesApi), children: [
13102
+ labelNode,
13103
+ /* @__PURE__ */ jsx("span", { ...ctx.getStyles("actionDescription", stylesApi), children: description })
13104
+ ] }),
13105
+ rightSection && /* @__PURE__ */ jsx(
13106
+ Box,
13107
+ {
13108
+ component: "span",
13109
+ mod: { position: "right", dimmed: dimmedSections },
13110
+ ...ctx.getStyles("actionSection", stylesApi),
13111
+ children: rightSection
13112
+ }
13113
+ )
13114
+ ] })
13115
+ }
13116
+ );
13117
+ });
13118
+ SpotlightAction.classes = classes;
13119
+ SpotlightAction.displayName = "@mantine/spotlight/SpotlightAction";
13120
+ const defaultProps$6 = {}, SpotlightActionsGroup = factory((props, ref) => {
13121
+ const { className, style, styles, classNames, label, children, ...others } = useProps(
13122
+ "SpotlightActionsGroup",
13123
+ defaultProps$6,
13124
+ props
13125
+ ), ctx = useSpotlightContext();
13126
+ return /* @__PURE__ */ jsx(
13127
+ Box,
13128
+ {
13129
+ ...ctx.getStyles("actionsGroup", { className, style, classNames, styles }),
13130
+ ref,
13131
+ ...others,
13132
+ __vars: { "--spotlight-label": `'${label}'` },
13133
+ children
13134
+ }
13135
+ );
13136
+ });
13137
+ SpotlightActionsGroup.classes = classes;
13138
+ SpotlightActionsGroup.displayName = "@mantine/core/SpotlightActionsGroup";
13139
+ const defaultProps$5 = {}, SpotlightActionsList = factory((props, ref) => {
13140
+ const { className, style, id, children, vars, classNames, styles, ...others } = useProps(
13141
+ "SpotlightActionsList",
13142
+ defaultProps$5,
13143
+ props
13144
+ ), ctx = useSpotlightContext(), generatedId = `mantine-${useId$2().replace(/:/g, "")}`, listId = id || generatedId;
13145
+ return useEffect(() => (spotlightActions.setListId(listId, ctx.store), () => spotlightActions.setListId("", ctx.store)), []), /* @__PURE__ */ jsx(
13146
+ ScrollArea.Autosize,
13147
+ {
13148
+ ...ctx.getStyles("actionsList", { className, style, classNames, styles }),
13149
+ ref,
13150
+ type: "scroll",
13151
+ scrollbarSize: "var(--spotlight-actions-list-padding)",
13152
+ offsetScrollbars: "y",
13153
+ id: listId,
13154
+ ...others,
13155
+ children
13156
+ }
13157
+ );
13158
+ });
13159
+ SpotlightActionsList.classes = classes;
13160
+ SpotlightActionsList.displayName = "@mantine/spotlight/SpotlightActionsList";
13161
+ const defaultProps$4 = {}, SpotlightEmpty = factory((props, ref) => {
13162
+ const { className, style, classNames, styles, ...others } = useProps(
13163
+ "SpotlightEmpty",
13164
+ defaultProps$4,
13165
+ props
13166
+ ), ctx = useSpotlightContext();
13167
+ return /* @__PURE__ */ jsx(
13168
+ Box,
13169
+ {
13170
+ ref,
13171
+ ...ctx.getStyles("empty", { classNames, styles, className, style }),
13172
+ ...others
13173
+ }
13174
+ );
13175
+ });
13176
+ SpotlightEmpty.classes = classes;
13177
+ SpotlightEmpty.displayName = "@mantine/spotlight/SpotlightEmpty";
13178
+ const defaultProps$3 = {}, SpotlightFooter = factory((props, ref) => {
13179
+ const { className, style, classNames, styles, ...others } = useProps(
13180
+ "SpotlightFooter",
13181
+ defaultProps$3,
13182
+ props
13183
+ ), ctx = useSpotlightContext();
13184
+ return /* @__PURE__ */ jsx(
13185
+ Box,
13186
+ {
13187
+ ref,
13188
+ ...ctx.getStyles("footer", { className, classNames, style, styles }),
13189
+ ...others
13190
+ }
13191
+ );
13192
+ });
13193
+ SpotlightFooter.classes = classes;
13194
+ SpotlightFooter.displayName = "@mantine/spotlight/SpotlightFooter";
13195
+ function getHotkeys(hotkeys, store) {
13196
+ if (!hotkeys)
13197
+ return [];
13198
+ const open = () => spotlightActions.open(store);
13199
+ return Array.isArray(hotkeys) ? hotkeys.map((hotkey) => [hotkey, open]) : [[hotkeys, open]];
13200
+ }
13201
+ const defaultProps$2 = {
13202
+ size: 600,
13203
+ yOffset: 80,
13204
+ zIndex: getDefaultZIndex("max"),
13205
+ overlayProps: { backgroundOpacity: 0.35, blur: 7 },
13206
+ transitionProps: { duration: 200, transition: "pop" },
13207
+ store: spotlightStore,
13208
+ clearQueryOnClose: !0,
13209
+ closeOnActionTrigger: !0,
13210
+ shortcut: "mod + K",
13211
+ maxHeight: 400,
13212
+ scrollable: !1
13213
+ }, SpotlightRoot = factory((_props, ref) => {
13214
+ const props = useProps("SpotlightRoot", defaultProps$2, _props), {
13215
+ classNames,
13216
+ className,
13217
+ style,
13218
+ styles,
13219
+ unstyled,
13220
+ vars,
13221
+ store,
13222
+ children,
13223
+ query,
13224
+ onQueryChange,
13225
+ transitionProps,
13226
+ clearQueryOnClose,
13227
+ shortcut,
13228
+ tagsToIgnore,
13229
+ triggerOnContentEditable,
13230
+ disabled,
13231
+ onSpotlightOpen,
13232
+ onSpotlightClose,
13233
+ forceOpened,
13234
+ closeOnActionTrigger,
13235
+ maxHeight,
13236
+ scrollable,
13237
+ ...others
13238
+ } = props, theme = useMantineTheme(), { opened, query: storeQuery } = useSpotlight(store), _query = query || storeQuery, setQuery2 = (q) => {
13239
+ onQueryChange?.(q), spotlightActions.setQuery(q, store);
13240
+ }, getStyles2 = useStyles({
13241
+ name: "Spotlight",
13242
+ classes,
13243
+ props,
13244
+ className,
13245
+ style,
13246
+ classNames,
13247
+ styles,
13248
+ unstyled
13249
+ });
13250
+ return useHotkeys(getHotkeys(shortcut, store), tagsToIgnore, triggerOnContentEditable), useDidUpdate(() => {
13251
+ opened ? onSpotlightOpen?.() : onSpotlightClose?.();
13252
+ }, [opened]), disabled ? null : /* @__PURE__ */ jsx(
13253
+ SpotlightProvider,
13254
+ {
13255
+ value: {
13256
+ getStyles: getStyles2,
13257
+ query: _query,
13258
+ setQuery: setQuery2,
13259
+ store,
13260
+ closeOnActionTrigger
13261
+ },
13262
+ children: /* @__PURE__ */ jsx(
13263
+ Modal,
13264
+ {
13265
+ ref,
13266
+ ...others,
13267
+ withCloseButton: !1,
13268
+ opened: opened || !!forceOpened,
13269
+ padding: 0,
13270
+ onClose: () => spotlightActions.close(store),
13271
+ className,
13272
+ style,
13273
+ classNames: resolveClassNames({
13274
+ theme,
13275
+ classNames: [classes, classNames],
13276
+ props,
13277
+ stylesCtx: void 0
13278
+ }),
13279
+ styles: resolveStyles({ theme, styles, props, stylesCtx: void 0 }),
13280
+ transitionProps: {
13281
+ ...transitionProps,
13282
+ onExited: () => {
13283
+ clearQueryOnClose && setQuery2(""), spotlightActions.clearSpotlightState({ clearQuery: clearQueryOnClose }, store), transitionProps?.onExited?.();
13284
+ }
13285
+ },
13286
+ __vars: { "--spotlight-max-height": scrollable ? rem(maxHeight) : void 0 },
13287
+ __staticSelector: "Spotlight",
13288
+ "data-scrollable": scrollable || void 0,
13289
+ children
13290
+ }
13291
+ )
13292
+ }
13293
+ );
13294
+ });
13295
+ SpotlightRoot.classes = classes;
13296
+ SpotlightRoot.displayName = "@mantine/spotlight/SpotlightRoot";
13297
+ const defaultProps$1 = {
13298
+ size: "lg"
13299
+ }, SpotlightSearch = factory((props, ref) => {
13300
+ const { classNames, styles, onKeyDown, onChange, vars, value, ...others } = useProps(
13301
+ "SpotlightSearch",
13302
+ defaultProps$1,
13303
+ props
13304
+ ), ctx = useSpotlightContext(), inputStyles = ctx.getStyles("search"), [isComposing, setIsComposing] = useState(!1), handleKeyDown = (event) => {
13305
+ onKeyDown?.(event), !isComposing && (event.nativeEvent.code === "ArrowDown" && (event.preventDefault(), spotlightActions.selectNextAction(ctx.store)), event.nativeEvent.code === "ArrowUp" && (event.preventDefault(), spotlightActions.selectPreviousAction(ctx.store)), (event.nativeEvent.code === "Enter" || event.nativeEvent.code === "NumpadEnter") && (event.preventDefault(), spotlightActions.triggerSelectedAction(ctx.store)));
13306
+ };
13307
+ return /* @__PURE__ */ jsx(
13308
+ Input,
13309
+ {
13310
+ ref,
13311
+ classNames: [{ input: inputStyles.className }, classNames],
13312
+ styles: [{ input: inputStyles.style }, styles],
13313
+ ...others,
13314
+ value: value ?? ctx.query,
13315
+ onChange: (event) => {
13316
+ ctx.setQuery(event.currentTarget.value), onChange?.(event);
13317
+ },
13318
+ onKeyDown: handleKeyDown,
13319
+ onCompositionStart: () => setIsComposing(!0),
13320
+ onCompositionEnd: () => setIsComposing(!1)
13321
+ }
13322
+ );
13323
+ });
13324
+ SpotlightSearch.classes = classes;
13325
+ SpotlightSearch.displayName = "@mantine/spotlight/SpotlightSearch";
13326
+ const defaultProps = {
13327
+ size: 600,
13328
+ yOffset: 80,
13329
+ limit: 1 / 0,
13330
+ zIndex: getDefaultZIndex("max"),
13331
+ overlayProps: { backgroundOpacity: 0.35, blur: 7 },
13332
+ transitionProps: { duration: 200, transition: "pop" },
13333
+ store: spotlightStore,
13334
+ filter: defaultSpotlightFilter,
13335
+ clearQueryOnClose: !0,
13336
+ closeOnActionTrigger: !0,
13337
+ shortcut: "mod + K",
13338
+ highlightQuery: !1
13339
+ }, Spotlight = factory((_props, ref) => {
13340
+ const props = useProps("Spotlight", defaultProps, _props), {
13341
+ searchProps,
13342
+ filter,
13343
+ query,
13344
+ onQueryChange,
13345
+ actions,
13346
+ nothingFound,
13347
+ highlightQuery,
13348
+ limit,
13349
+ ...others
13350
+ } = props, [_query, setQuery2] = useUncontrolled({
13351
+ value: query,
13352
+ defaultValue: "",
13353
+ finalValue: "",
13354
+ onChange: onQueryChange
13355
+ }), filteredActions = limitActions(filter(_query, actions), limit).map((item) => {
13356
+ if (isActionsGroup(item)) {
13357
+ const items = item.actions.map(({ id, ...actionData }) => /* @__PURE__ */ jsx(SpotlightAction, { highlightQuery, ...actionData }, id));
13358
+ return /* @__PURE__ */ jsx(SpotlightActionsGroup, { label: item.group, children: items }, item.group);
13359
+ }
13360
+ return /* @__PURE__ */ jsx(SpotlightAction, { highlightQuery, ...item }, item.id);
13361
+ });
13362
+ return /* @__PURE__ */ jsxs(SpotlightRoot, { ...others, query: _query, onQueryChange: setQuery2, ref, children: [
13363
+ /* @__PURE__ */ jsx(SpotlightSearch, { ...searchProps }),
13364
+ /* @__PURE__ */ jsxs(SpotlightActionsList, { children: [
13365
+ filteredActions,
13366
+ filteredActions.length === 0 && nothingFound && /* @__PURE__ */ jsx(SpotlightEmpty, { children: nothingFound })
13367
+ ] })
13368
+ ] });
13369
+ });
13370
+ Spotlight.classes = classes;
13371
+ Spotlight.displayName = "@mantine/spotlight/Spotlight";
13372
+ Spotlight.Search = SpotlightSearch;
13373
+ Spotlight.ActionsList = SpotlightActionsList;
13374
+ Spotlight.Action = SpotlightAction;
13375
+ Spotlight.Empty = SpotlightEmpty;
13376
+ Spotlight.ActionsGroup = SpotlightActionsGroup;
13377
+ Spotlight.Footer = SpotlightFooter;
13378
+ Spotlight.Root = SpotlightRoot;
13379
+ Spotlight.open = spotlight.open;
13380
+ Spotlight.close = spotlight.close;
13381
+ Spotlight.toggle = spotlight.toggle;
12542
13382
  export {
12543
- useHotkeys as $,
13383
+ useLocalStorage as $,
12544
13384
  ActionIcon as A,
12545
13385
  Box as B,
12546
13386
  Card as C,
12547
- Divider as D,
12548
- FocusTrapInitialFocus as E,
12549
- FocusTrap as F,
13387
+ Pill as D,
13388
+ Divider as E,
13389
+ useViewportSize as F,
12550
13390
  Group as G,
12551
- CloseButton as H,
13391
+ Highlight as H,
12552
13392
  Image as I,
12553
- Badge as J,
12554
- Flex as K,
12555
- ActionIconGroup as L,
12556
- Tabs as M,
12557
- TabsList as N,
12558
- TabsTab as O,
13393
+ FocusTrap as J,
13394
+ FocusTrapInitialFocus as K,
13395
+ CloseButton as L,
13396
+ Badge as M,
13397
+ Flex as N,
13398
+ ActionIconGroup as O,
12559
13399
  Paper as P,
12560
- TabsPanel as Q,
13400
+ Tabs as Q,
12561
13401
  RemoveScroll as R,
12562
- ScrollAreaAutosize as S,
13402
+ Spotlight as S,
12563
13403
  ThemeIcon as T,
12564
- ScrollArea as U,
12565
- UnstyledButton as V,
12566
- CopyButton as W,
12567
- Code as X,
12568
- useLocalStorage as Y,
12569
- useStateHistory as Z,
12570
- Space as _,
13404
+ TabsList as U,
13405
+ TabsTab as V,
13406
+ TabsPanel as W,
13407
+ ScrollArea as X,
13408
+ UnstyledButton as Y,
13409
+ CopyButton as Z,
13410
+ Code as _,
12571
13411
  Text as a,
12572
- MantineContext as a0,
12573
- Menu as a1,
12574
- MenuTarget as a2,
12575
- MenuDropdown as a3,
12576
- MenuLabel as a4,
12577
- MenuDivider as a5,
12578
- TooltipGroup as a6,
12579
- MenuItem as a7,
12580
- keys as a8,
12581
- ColorSwatch as a9,
12582
- useMantineTheme as aA,
12583
- useMediaQuery as aB,
12584
- useDisclosure as aC,
12585
- LoadingOverlay as aD,
12586
- useCallbackRef as aE,
12587
- Burger as aF,
12588
- Loader as aG,
12589
- CheckIcon as aa,
12590
- rem as ab,
12591
- Slider as ac,
12592
- useDebouncedValue as ad,
12593
- Spoiler as ae,
12594
- ButtonGroup as af,
12595
- useHover$1 as ag,
12596
- FloatingIndicator as ah,
12597
- useUncontrolled as ai,
12598
- clampUseMovePosition as aj,
12599
- useMove as ak,
12600
- HoverCard as al,
12601
- HoverCardTarget as am,
12602
- Overlay as an,
12603
- HoverCardDropdown as ao,
12604
- Notification as ap,
12605
- createTheme as aq,
12606
- MantineProvider as ar,
12607
- useInViewport as as,
12608
- SimpleGrid as at,
12609
- Drawer as au,
12610
- Select as av,
12611
- ModalRoot as aw,
12612
- ModalOverlay as ax,
12613
- ModalContent as ay,
12614
- ModalBody as az,
13412
+ useStateHistory as a0,
13413
+ Space as a1,
13414
+ useHotkeys as a2,
13415
+ MantineContext as a3,
13416
+ Menu as a4,
13417
+ MenuTarget as a5,
13418
+ MenuDropdown as a6,
13419
+ MenuLabel as a7,
13420
+ MenuDivider as a8,
13421
+ TooltipGroup as a9,
13422
+ ModalRoot as aA,
13423
+ ModalOverlay as aB,
13424
+ ModalContent as aC,
13425
+ ModalBody as aD,
13426
+ useMantineTheme as aE,
13427
+ useMediaQuery as aF,
13428
+ useDisclosure as aG,
13429
+ LoadingOverlay as aH,
13430
+ useCallbackRef as aI,
13431
+ Burger as aJ,
13432
+ Loader as aK,
13433
+ MenuItem as aa,
13434
+ keys as ab,
13435
+ ColorSwatch as ac,
13436
+ CheckIcon as ad,
13437
+ rem as ae,
13438
+ Slider as af,
13439
+ useDebouncedValue as ag,
13440
+ Spoiler as ah,
13441
+ ButtonGroup as ai,
13442
+ useHover$1 as aj,
13443
+ FloatingIndicator as ak,
13444
+ useUncontrolled as al,
13445
+ clampUseMovePosition as am,
13446
+ useMove as an,
13447
+ openSpotlight as ao,
13448
+ HoverCard as ap,
13449
+ HoverCardTarget as aq,
13450
+ Overlay as ar,
13451
+ HoverCardDropdown as as,
13452
+ Notification as at,
13453
+ createTheme as au,
13454
+ MantineProvider as av,
13455
+ useInViewport as aw,
13456
+ SimpleGrid as ax,
13457
+ Drawer as ay,
13458
+ Select as az,
12615
13459
  CardSection as b,
12616
13460
  clsx as c,
12617
13461
  Center as d,
@@ -12621,20 +13465,20 @@ export {
12621
13465
  useReducedMotion as h,
12622
13466
  useMergedRef as i,
12623
13467
  useMantineStyleNonce as j,
12624
- useComputedColorScheme as k,
12625
- Popover as l,
12626
- PopoverTarget as m,
12627
- PopoverDropdown as n,
12628
- Stack as o,
12629
- useTree as p,
12630
- Tree as q,
12631
- Tooltip as r,
12632
- useId$1 as s,
13468
+ SpotlightActionsGroup as k,
13469
+ useComputedColorScheme as l,
13470
+ Popover as m,
13471
+ PopoverTarget as n,
13472
+ PopoverDropdown as o,
13473
+ ScrollAreaAutosize as p,
13474
+ Stack as q,
13475
+ useTree as r,
13476
+ Tree as s,
12633
13477
  themeToVars as t,
12634
13478
  useMantineColorScheme as u,
12635
- SegmentedControl as v,
12636
- Alert as w,
12637
- Anchor as x,
12638
- Pill as y,
12639
- useViewportSize as z
13479
+ Tooltip as v,
13480
+ useId$1 as w,
13481
+ SegmentedControl as x,
13482
+ Alert as y,
13483
+ Anchor as z
12640
13484
  };