likec4 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10643,13 +10643,13 @@ function resolveStyle({ style: style2, theme: theme2 }) {
10643
10643
  {}
10644
10644
  ) : typeof style2 == "function" ? style2(theme2) : style2 ?? {};
10645
10645
  }
10646
- function mergeVars(vars2) {
10647
- return vars2.reduce((acc, current) => (current && Object.keys(current).forEach((key) => {
10646
+ function mergeVars(vars) {
10647
+ return vars.reduce((acc, current) => (current && Object.keys(current).forEach((key) => {
10648
10648
  acc[key] = { ...acc[key], ...filterProps$1(current[key]) };
10649
10649
  }), acc), {});
10650
10650
  }
10651
10651
  function resolveVars({
10652
- vars: vars2,
10652
+ vars,
10653
10653
  varsResolver: varsResolver2,
10654
10654
  theme: theme2,
10655
10655
  props,
@@ -10661,7 +10661,7 @@ function resolveVars({
10661
10661
  return mergeVars([
10662
10662
  headless ? {} : varsResolver2?.(theme2, props, stylesCtx),
10663
10663
  ...themeName.map((name) => theme2.components?.[name]?.vars?.(theme2, props, stylesCtx)),
10664
- vars2?.(theme2, props, stylesCtx)
10664
+ vars?.(theme2, props, stylesCtx)
10665
10665
  ])?.[selector2];
10666
10666
  }
10667
10667
  function getStyle({
@@ -10674,7 +10674,7 @@ function getStyle({
10674
10674
  rootSelector,
10675
10675
  styles,
10676
10676
  style: style2,
10677
- vars: vars2,
10677
+ vars,
10678
10678
  varsResolver: varsResolver2,
10679
10679
  headless,
10680
10680
  withStylesTransform
@@ -10683,13 +10683,13 @@ function getStyle({
10683
10683
  ...!withStylesTransform && getThemeStyles({ theme: theme2, themeName, props, stylesCtx, selector: selector2 }),
10684
10684
  ...!withStylesTransform && resolveStyles({ theme: theme2, styles, props, stylesCtx })[selector2],
10685
10685
  ...!withStylesTransform && resolveStyles({ theme: theme2, styles: options?.styles, props: options?.props || props, stylesCtx })[selector2],
10686
- ...resolveVars({ theme: theme2, props, stylesCtx, vars: vars2, varsResolver: varsResolver2, selector: selector2, themeName, headless }),
10686
+ ...resolveVars({ theme: theme2, props, stylesCtx, vars, varsResolver: varsResolver2, selector: selector2, themeName, headless }),
10687
10687
  ...rootSelector === selector2 ? resolveStyle({ style: style2, theme: theme2 }) : null,
10688
10688
  ...resolveStyle({ style: options?.style, theme: theme2 })
10689
10689
  };
10690
10690
  }
10691
10691
  function useStylesTransform({ props, stylesCtx, themeName }) {
10692
- const theme2 = useMantineTheme(), stylesTransform = useMantineStylesTransform();
10692
+ const theme2 = useMantineTheme(), stylesTransform = useMantineStylesTransform()?.();
10693
10693
  return {
10694
10694
  getTransformedStyles: (styles) => stylesTransform ? [
10695
10695
  ...styles.map(
@@ -10713,7 +10713,7 @@ function useStyles({
10713
10713
  unstyled,
10714
10714
  classNames,
10715
10715
  styles,
10716
- vars: vars2,
10716
+ vars,
10717
10717
  varsResolver: varsResolver2
10718
10718
  }) {
10719
10719
  const theme2 = useMantineTheme(), classNamesPrefix = useMantineClassNamesPrefix(), withStaticClasses = useMantineWithStaticClasses(), headless = useMantineIsHeadless(), themeName = (Array.isArray(name) ? name : [name]).filter((n2) => n2), { withStylesTransform, getTransformedStyles } = useStylesTransform({
@@ -10749,7 +10749,7 @@ function useStyles({
10749
10749
  rootSelector,
10750
10750
  styles,
10751
10751
  style: style2,
10752
- vars: vars2,
10752
+ vars,
10753
10753
  varsResolver: varsResolver2,
10754
10754
  headless,
10755
10755
  withStylesTransform
@@ -10759,22 +10759,22 @@ function useStyles({
10759
10759
  function getAutoContrastValue(autoContrast, theme2) {
10760
10760
  return typeof autoContrast == "boolean" ? autoContrast : theme2.autoContrast;
10761
10761
  }
10762
- function disableTransition() {
10762
+ function disableTransition(nonce) {
10763
10763
  const style2 = document.createElement("style");
10764
- return style2.innerHTML = "*, *::before, *::after {transition: none !important;}", style2.setAttribute("data-mantine-disable-transition", "true"), document.head.appendChild(style2), () => document.querySelectorAll("[data-mantine-disable-transition]").forEach((element) => element.remove());
10764
+ return style2.setAttribute("data-mantine-styles", "inline"), style2.innerHTML = "*, *::before, *::after {transition: none !important;}", style2.setAttribute("data-mantine-disable-transition", "true"), nonce && style2.setAttribute("nonce", nonce), document.head.appendChild(style2), () => document.querySelectorAll("[data-mantine-disable-transition]").forEach((element) => element.remove());
10765
10765
  }
10766
10766
  function useMantineColorScheme({ keepTransitions } = {}) {
10767
- const clearStylesRef = reactExports.useRef(), timeoutRef = reactExports.useRef(), ctx = reactExports.useContext(MantineContext);
10767
+ const clearStylesRef = reactExports.useRef(), timeoutRef = reactExports.useRef(), ctx = reactExports.useContext(MantineContext), nonce = useMantineStyleNonce(), nonceValue = reactExports.useRef(nonce?.());
10768
10768
  if (!ctx)
10769
10769
  throw new Error("[@mantine/core] MantineProvider was not found in tree");
10770
10770
  const setColorScheme = (value) => {
10771
10771
  ctx.setColorScheme(value), clearStylesRef.current = keepTransitions ? () => {
10772
- } : disableTransition(), window.clearTimeout(timeoutRef.current), timeoutRef.current = window.setTimeout(() => {
10772
+ } : disableTransition(nonceValue.current), window.clearTimeout(timeoutRef.current), timeoutRef.current = window.setTimeout(() => {
10773
10773
  clearStylesRef.current?.();
10774
10774
  }, 10);
10775
10775
  }, clearColorScheme = () => {
10776
10776
  ctx.clearColorScheme(), clearStylesRef.current = keepTransitions ? () => {
10777
- } : disableTransition(), window.clearTimeout(timeoutRef.current), timeoutRef.current = window.setTimeout(() => {
10777
+ } : disableTransition(nonceValue.current), window.clearTimeout(timeoutRef.current), timeoutRef.current = window.setTimeout(() => {
10778
10778
  clearStylesRef.current?.();
10779
10779
  }, 10);
10780
10780
  }, osColorScheme = useColorScheme("light", { getInitialValueInEffect: !1 }), computedColorScheme = ctx.colorScheme === "auto" ? osColorScheme : ctx.colorScheme, toggleColorScheme = reactExports.useCallback(
@@ -11136,10 +11136,10 @@ function mergeStyles(styles, theme2) {
11136
11136
  function getBoxStyle({
11137
11137
  theme: theme2,
11138
11138
  style: style2,
11139
- vars: vars2,
11139
+ vars,
11140
11140
  styleProps
11141
11141
  }) {
11142
- const _style = mergeStyles(style2, theme2), _vars = mergeStyles(vars2, theme2);
11142
+ const _style = mergeStyles(style2, theme2), _vars = mergeStyles(vars, theme2);
11143
11143
  return { ..._style, ..._vars, ...styleProps };
11144
11144
  }
11145
11145
  const _Box = reactExports.forwardRef(
@@ -11158,7 +11158,7 @@ const _Box = reactExports.forwardRef(
11158
11158
  renderRoot,
11159
11159
  ...others
11160
11160
  }, ref) => {
11161
- const theme2 = useMantineTheme(), Element2 = component || "div", { styleProps, rest } = extractStyleProps(others), transformedSx = useMantineSxTransform()?.(styleProps.sx), responsiveClassName = useRandomClassName(), parsedStyleProps = parseStyleProps({
11161
+ const theme2 = useMantineTheme(), Element2 = component || "div", { styleProps, rest } = extractStyleProps(others), transformedSx = useMantineSxTransform()?.()?.(styleProps.sx), responsiveClassName = useRandomClassName(), parsedStyleProps = parseStyleProps({
11162
11162
  styleProps,
11163
11163
  theme: theme2,
11164
11164
  data: STYlE_PROPS_DATA
@@ -11676,7 +11676,7 @@ const classes$u = __default__$w, defaultProps$1g = {
11676
11676
  styles,
11677
11677
  unstyled,
11678
11678
  scrollbarSize,
11679
- vars: vars2,
11679
+ vars,
11680
11680
  type,
11681
11681
  scrollHideDelay,
11682
11682
  viewportProps,
@@ -11695,7 +11695,7 @@ const classes$u = __default__$w, defaultProps$1g = {
11695
11695
  classNames,
11696
11696
  styles,
11697
11697
  unstyled,
11698
- vars: vars2,
11698
+ vars,
11699
11699
  varsResolver: varsResolver$x
11700
11700
  });
11701
11701
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -11776,7 +11776,7 @@ const ScrollAreaAutosize = factory((props, ref) => {
11776
11776
  viewportProps,
11777
11777
  scrollbars,
11778
11778
  style: style2,
11779
- vars: vars2,
11779
+ vars,
11780
11780
  ...others
11781
11781
  } = useProps("ScrollAreaAutosize", defaultProps$1g, props);
11782
11782
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { ...others, ref, style: [{ display: "flex", overflow: "auto" }, style2], children: /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { display: "flex", flexDirection: "column", flex: 1 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -11794,7 +11794,7 @@ const ScrollAreaAutosize = factory((props, ref) => {
11794
11794
  unstyled,
11795
11795
  variant,
11796
11796
  viewportProps,
11797
- vars: vars2,
11797
+ vars,
11798
11798
  scrollbars,
11799
11799
  children: children2
11800
11800
  }
@@ -11844,7 +11844,7 @@ UnstyledButton.classes = classes$t;
11844
11844
  UnstyledButton.displayName = "@mantine/core/UnstyledButton";
11845
11845
  var __default__$u = { root: "m_515a97f8" };
11846
11846
  const classes$s = __default__$u, defaultProps$1e = {}, VisuallyHidden = factory((_props, ref) => {
11847
- const props = useProps("VisuallyHidden", defaultProps$1e, _props), { classNames, className, style: style2, styles, unstyled, vars: vars2, ...others } = props, getStyles2 = useStyles({
11847
+ const props = useProps("VisuallyHidden", defaultProps$1e, _props), { classNames, className, style: style2, styles, unstyled, vars, ...others } = props, getStyles2 = useStyles({
11848
11848
  name: "VisuallyHidden",
11849
11849
  classes: classes$s,
11850
11850
  props,
@@ -11872,7 +11872,7 @@ const classes$r = __default__$t, defaultProps$1d = {}, varsResolver$w = (_2, { r
11872
11872
  styles,
11873
11873
  unstyled,
11874
11874
  withBorder,
11875
- vars: vars2,
11875
+ vars,
11876
11876
  radius,
11877
11877
  shadow,
11878
11878
  variant,
@@ -11887,7 +11887,7 @@ const classes$r = __default__$t, defaultProps$1d = {}, varsResolver$w = (_2, { r
11887
11887
  classNames,
11888
11888
  styles,
11889
11889
  unstyled,
11890
- vars: vars2,
11890
+ vars,
11891
11891
  varsResolver: varsResolver$w
11892
11892
  });
11893
11893
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -14317,7 +14317,7 @@ const classes$q = __default__$s, defaultProps$1b = {}, PopoverDropdown = factory
14317
14317
  const props = useProps("PopoverDropdown", defaultProps$1b, _props), {
14318
14318
  className,
14319
14319
  style: style2,
14320
- vars: vars2,
14320
+ vars,
14321
14321
  children: children2,
14322
14322
  onKeyDownCapture,
14323
14323
  variant,
@@ -14583,7 +14583,7 @@ function Popover(_props) {
14583
14583
  returnFocus,
14584
14584
  variant,
14585
14585
  keepMounted,
14586
- vars: vars2,
14586
+ vars,
14587
14587
  floatingStrategy,
14588
14588
  ...others
14589
14589
  } = props, getStyles2 = useStyles({
@@ -14594,7 +14594,7 @@ function Popover(_props) {
14594
14594
  styles,
14595
14595
  unstyled,
14596
14596
  rootSelector: "dropdown",
14597
- vars: vars2,
14597
+ vars,
14598
14598
  varsResolver: varsResolver$v
14599
14599
  }), arrowRef = reactExports.useRef(null), [targetNode, setTargetNode] = reactExports.useState(null), [dropdownNode, setDropdownNode] = reactExports.useState(null), { dir } = useDirection(), uid = useId$1(id2), popover = usePopover({
14600
14600
  middlewares,
@@ -14705,7 +14705,7 @@ const classes$p = __default__$r, Bars = reactExports.forwardRef(({ className, ..
14705
14705
  size: size2,
14706
14706
  color: color2,
14707
14707
  type,
14708
- vars: vars2,
14708
+ vars,
14709
14709
  className,
14710
14710
  style: style2,
14711
14711
  classNames,
@@ -14724,7 +14724,7 @@ const classes$p = __default__$r, Bars = reactExports.forwardRef(({ className, ..
14724
14724
  classNames,
14725
14725
  styles,
14726
14726
  unstyled,
14727
- vars: vars2,
14727
+ vars,
14728
14728
  varsResolver: varsResolver$u
14729
14729
  });
14730
14730
  return children2 ? /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { ...getStyles2("root"), ref, ...others, children: children2 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -14755,7 +14755,7 @@ const classes$o = __default__$q, defaultProps$17 = {
14755
14755
  styles,
14756
14756
  unstyled,
14757
14757
  orientation,
14758
- vars: vars2,
14758
+ vars,
14759
14759
  borderWidth,
14760
14760
  variant,
14761
14761
  mod,
@@ -14769,7 +14769,7 @@ const classes$o = __default__$q, defaultProps$17 = {
14769
14769
  classNames,
14770
14770
  styles,
14771
14771
  unstyled,
14772
- vars: vars2,
14772
+ vars,
14773
14773
  varsResolver: varsResolver$t,
14774
14774
  rootSelector: "group"
14775
14775
  });
@@ -14821,7 +14821,7 @@ const defaultProps$16 = {}, varsResolver$s = (theme2, { size: size2, radius, var
14821
14821
  radius,
14822
14822
  __staticSelector,
14823
14823
  gradient,
14824
- vars: vars2,
14824
+ vars,
14825
14825
  children: children2,
14826
14826
  disabled,
14827
14827
  "data-disabled": dataDisabled,
@@ -14837,7 +14837,7 @@ const defaultProps$16 = {}, varsResolver$s = (theme2, { size: size2, radius, var
14837
14837
  classNames,
14838
14838
  styles,
14839
14839
  unstyled,
14840
- vars: vars2,
14840
+ vars,
14841
14841
  varsResolver: varsResolver$s
14842
14842
  });
14843
14843
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -14897,7 +14897,7 @@ const classes$n = __default__$p, defaultProps$15 = {
14897
14897
  const props = useProps("CloseButton", defaultProps$15, _props), {
14898
14898
  iconSize,
14899
14899
  children: children2,
14900
- vars: vars2,
14900
+ vars,
14901
14901
  radius,
14902
14902
  className,
14903
14903
  classNames,
@@ -14919,7 +14919,7 @@ const classes$n = __default__$p, defaultProps$15 = {
14919
14919
  classNames,
14920
14920
  styles,
14921
14921
  unstyled,
14922
- vars: vars2,
14922
+ vars,
14923
14923
  varsResolver: varsResolver$r
14924
14924
  });
14925
14925
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -14973,7 +14973,7 @@ const classes$m = __default__$o, defaultProps$14 = {
14973
14973
  wrap,
14974
14974
  grow,
14975
14975
  preventGrowOverflow,
14976
- vars: vars2,
14976
+ vars,
14977
14977
  variant,
14978
14978
  __size,
14979
14979
  mod,
@@ -14988,7 +14988,7 @@ const classes$m = __default__$o, defaultProps$14 = {
14988
14988
  classNames,
14989
14989
  styles,
14990
14990
  unstyled,
14991
- vars: vars2,
14991
+ vars,
14992
14992
  varsResolver: varsResolver$q
14993
14993
  });
14994
14994
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -15023,7 +15023,7 @@ const classes$l = __default__$n, defaultProps$13 = {
15023
15023
  style: style2,
15024
15024
  styles,
15025
15025
  unstyled,
15026
- vars: vars2,
15026
+ vars,
15027
15027
  fixed,
15028
15028
  center,
15029
15029
  children: children2,
@@ -15044,7 +15044,7 @@ const classes$l = __default__$n, defaultProps$13 = {
15044
15044
  classNames,
15045
15045
  styles,
15046
15046
  unstyled,
15047
- vars: vars2,
15047
+ vars,
15048
15048
  varsResolver: varsResolver$p
15049
15049
  });
15050
15050
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { ref, ...getStyles2("root"), mod: [{ center, fixed }, mod], ...others, children: children2 });
@@ -15071,7 +15071,7 @@ function useModal({
15071
15071
  return useWindowEvent(
15072
15072
  "keydown",
15073
15073
  (event) => {
15074
- event.key === "Escape" && closeOnEscape2 && event.target?.getAttribute("data-mantine-stop-propagation") !== "true" && onClose();
15074
+ event.key === "Escape" && closeOnEscape2 && opened && event.target?.getAttribute("data-mantine-stop-propagation") !== "true" && onClose();
15075
15075
  },
15076
15076
  { capture: !0 }
15077
15077
  ), useFocusReturn({ opened, shouldReturnFocus: trapFocus && returnFocus }), {
@@ -15306,7 +15306,7 @@ const classes$k = __default__$l, defaultProps$12 = {}, varsResolver$o = (_2, { s
15306
15306
  style: style2,
15307
15307
  styles,
15308
15308
  unstyled,
15309
- vars: vars2,
15309
+ vars,
15310
15310
  size: size2,
15311
15311
  __staticSelector,
15312
15312
  __inheritStyles = !0,
@@ -15322,7 +15322,7 @@ const classes$k = __default__$l, defaultProps$12 = {}, varsResolver$o = (_2, { s
15322
15322
  styles,
15323
15323
  unstyled,
15324
15324
  rootSelector: "description",
15325
- vars: vars2,
15325
+ vars,
15326
15326
  varsResolver: varsResolver$o
15327
15327
  }), getStyles2 = __inheritStyles && ctx?.getStyles || _getStyles;
15328
15328
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -15350,7 +15350,7 @@ const defaultProps$11 = {}, varsResolver$n = (_2, { size: size2 }) => ({
15350
15350
  style: style2,
15351
15351
  styles,
15352
15352
  unstyled,
15353
- vars: vars2,
15353
+ vars,
15354
15354
  size: size2,
15355
15355
  __staticSelector,
15356
15356
  __inheritStyles = !0,
@@ -15366,7 +15366,7 @@ const defaultProps$11 = {}, varsResolver$n = (_2, { size: size2 }) => ({
15366
15366
  styles,
15367
15367
  unstyled,
15368
15368
  rootSelector: "error",
15369
- vars: vars2,
15369
+ vars,
15370
15370
  varsResolver: varsResolver$n
15371
15371
  }), ctx = useInputWrapperContext(), getStyles2 = __inheritStyles && ctx?.getStyles || _getStyles;
15372
15372
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -15397,7 +15397,7 @@ const defaultProps$10 = {
15397
15397
  style: style2,
15398
15398
  styles,
15399
15399
  unstyled,
15400
- vars: vars2,
15400
+ vars,
15401
15401
  labelElement,
15402
15402
  size: size2,
15403
15403
  required,
@@ -15418,7 +15418,7 @@ const defaultProps$10 = {
15418
15418
  styles,
15419
15419
  unstyled,
15420
15420
  rootSelector: "label",
15421
- vars: vars2,
15421
+ vars,
15422
15422
  varsResolver: varsResolver$m
15423
15423
  }), ctx = useInputWrapperContext(), getStyles2 = ctx?.getStyles || _getStyles;
15424
15424
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -15451,7 +15451,7 @@ const defaultProps$$ = {}, InputPlaceholder = factory((_props, ref) => {
15451
15451
  style: style2,
15452
15452
  styles,
15453
15453
  unstyled,
15454
- vars: vars2,
15454
+ vars,
15455
15455
  __staticSelector,
15456
15456
  variant,
15457
15457
  error,
@@ -15483,8 +15483,8 @@ const defaultProps$$ = {}, InputPlaceholder = factory((_props, ref) => {
15483
15483
  InputPlaceholder.classes = classes$k;
15484
15484
  InputPlaceholder.displayName = "@mantine/core/InputPlaceholder";
15485
15485
  function getInputOffsets(inputWrapperOrder, { hasDescription, hasError }) {
15486
- const inputIndex = inputWrapperOrder.findIndex((part) => part === "input"), aboveInput = inputWrapperOrder[inputIndex - 1], belowInput = inputWrapperOrder[inputIndex + 1];
15487
- return { offsetBottom: hasDescription && belowInput === "description" || hasError && belowInput === "error", offsetTop: hasDescription && aboveInput === "description" || hasError && aboveInput === "error" };
15486
+ 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");
15487
+ return { offsetBottom: hasDescription && belowInput.includes("description") || hasError && belowInput.includes("error"), offsetTop };
15488
15488
  }
15489
15489
  const defaultProps$_ = {
15490
15490
  labelElement: "label",
@@ -15508,7 +15508,7 @@ const defaultProps$_ = {
15508
15508
  style: style2,
15509
15509
  styles,
15510
15510
  unstyled,
15511
- vars: vars2,
15511
+ vars,
15512
15512
  size: size2,
15513
15513
  variant,
15514
15514
  __staticSelector,
@@ -15537,7 +15537,7 @@ const defaultProps$_ = {
15537
15537
  classNames,
15538
15538
  styles,
15539
15539
  unstyled,
15540
- vars: vars2,
15540
+ vars,
15541
15541
  varsResolver: varsResolver$l
15542
15542
  }), sharedProps = {
15543
15543
  size: size2,
@@ -15658,7 +15658,7 @@ const defaultProps$Z = {
15658
15658
  rightSectionPointerEvents,
15659
15659
  leftSectionPointerEvents,
15660
15660
  variant,
15661
- vars: vars2,
15661
+ vars,
15662
15662
  pointer: pointer2,
15663
15663
  multiline,
15664
15664
  radius,
@@ -15678,7 +15678,7 @@ const defaultProps$Z = {
15678
15678
  unstyled,
15679
15679
  stylesCtx,
15680
15680
  rootSelector: "wrapper",
15681
- vars: vars2,
15681
+ vars,
15682
15682
  varsResolver: varsResolver$k
15683
15683
  }), ariaAttributes = withAria ? {
15684
15684
  required,
@@ -15778,7 +15778,7 @@ function useInputProps(component, defaultProps2, _props) {
15778
15778
  inputWrapperOrder,
15779
15779
  withAsterisk,
15780
15780
  variant,
15781
- vars: vars2,
15781
+ vars,
15782
15782
  mod,
15783
15783
  ...others
15784
15784
  } = props, { styleProps, rest } = extractStyleProps(others), wrapperProps = {
@@ -15851,7 +15851,7 @@ const classes$j = __default__$k, defaultProps$X = {}, Flex$1 = polymorphicFactor
15851
15851
  style: style2,
15852
15852
  styles,
15853
15853
  unstyled,
15854
- vars: vars2,
15854
+ vars,
15855
15855
  gap,
15856
15856
  rowGap,
15857
15857
  columnGap,
@@ -15869,7 +15869,7 @@ const classes$j = __default__$k, defaultProps$X = {}, Flex$1 = polymorphicFactor
15869
15869
  classNames,
15870
15870
  styles,
15871
15871
  unstyled,
15872
- vars: vars2
15872
+ vars
15873
15873
  }), theme2 = useMantineTheme(), responsiveClassName = useRandomClassName(), parsedStyleProps = parseStyleProps({
15874
15874
  styleProps: { gap, rowGap, columnGap, align, justify, wrap, direction },
15875
15875
  theme: theme2,
@@ -15922,7 +15922,7 @@ const classes$i = __default__$j, defaultProps$W = {}, varsResolver$j = (theme2,
15922
15922
  style: style2,
15923
15923
  styles,
15924
15924
  unstyled,
15925
- vars: vars2,
15925
+ vars,
15926
15926
  radius,
15927
15927
  color: color2,
15928
15928
  title: title2,
@@ -15944,7 +15944,7 @@ const classes$i = __default__$j, defaultProps$W = {}, varsResolver$j = (theme2,
15944
15944
  classNames,
15945
15945
  styles,
15946
15946
  unstyled,
15947
- vars: vars2,
15947
+ vars,
15948
15948
  varsResolver: varsResolver$j
15949
15949
  }), rootId = useId$1(id2), titleId = title2 && `${rootId}-title` || void 0, bodyId = `${rootId}-body`;
15950
15950
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -16009,7 +16009,7 @@ const defaultProps$V = {
16009
16009
  gradient,
16010
16010
  span,
16011
16011
  __staticSelector,
16012
- vars: vars2,
16012
+ vars,
16013
16013
  className,
16014
16014
  style: style2,
16015
16015
  classNames,
@@ -16028,7 +16028,7 @@ const defaultProps$V = {
16028
16028
  classNames,
16029
16029
  styles,
16030
16030
  unstyled,
16031
- vars: vars2,
16031
+ vars,
16032
16032
  varsResolver: varsResolver$i
16033
16033
  });
16034
16034
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -16098,7 +16098,7 @@ const classes$g = __default__$g, defaultProps$T = {
16098
16098
  "--combobox-chevron-size": getSize(size2, "combobox-chevron-size")
16099
16099
  }
16100
16100
  }), ComboboxChevron = factory((_props, ref) => {
16101
- const props = useProps("ComboboxChevron", defaultProps$T, _props), { size: size2, error, style: style2, className, classNames, styles, unstyled, vars: vars2, mod, ...others } = props, getStyles2 = useStyles({
16101
+ const props = useProps("ComboboxChevron", defaultProps$T, _props), { size: size2, error, style: style2, className, classNames, styles, unstyled, vars, mod, ...others } = props, getStyles2 = useStyles({
16102
16102
  name: "ComboboxChevron",
16103
16103
  classes: classes$g,
16104
16104
  props,
@@ -16107,7 +16107,7 @@ const classes$g = __default__$g, defaultProps$T = {
16107
16107
  classNames,
16108
16108
  styles,
16109
16109
  unstyled,
16110
- vars: vars2,
16110
+ vars,
16111
16111
  varsResolver: varsResolver$h,
16112
16112
  rootSelector: "chevron"
16113
16113
  });
@@ -16190,7 +16190,7 @@ const defaultProps$R = {
16190
16190
  });
16191
16191
  ComboboxDropdownTarget.displayName = "@mantine/core/ComboboxDropdownTarget";
16192
16192
  const defaultProps$Q = {}, ComboboxEmpty = factory((props, ref) => {
16193
- const { classNames, className, style: style2, styles, vars: vars2, ...others } = useProps(
16193
+ const { classNames, className, style: style2, styles, vars, ...others } = useProps(
16194
16194
  "ComboboxEmpty",
16195
16195
  defaultProps$Q,
16196
16196
  props
@@ -16278,7 +16278,7 @@ const defaultProps$P = {
16278
16278
  });
16279
16279
  ComboboxEventsTarget.displayName = "@mantine/core/ComboboxEventsTarget";
16280
16280
  const defaultProps$O = {}, ComboboxFooter = factory((props, ref) => {
16281
- const { classNames, className, style: style2, styles, vars: vars2, ...others } = useProps(
16281
+ const { classNames, className, style: style2, styles, vars, ...others } = useProps(
16282
16282
  "ComboboxFooter",
16283
16283
  defaultProps$O,
16284
16284
  props
@@ -16295,7 +16295,7 @@ const defaultProps$O = {}, ComboboxFooter = factory((props, ref) => {
16295
16295
  ComboboxFooter.classes = classes$g;
16296
16296
  ComboboxFooter.displayName = "@mantine/core/ComboboxFooter";
16297
16297
  const defaultProps$N = {}, ComboboxGroup = factory((props, ref) => {
16298
- const { classNames, className, style: style2, styles, vars: vars2, children: children2, label, ...others } = useProps(
16298
+ const { classNames, className, style: style2, styles, vars, children: children2, label, ...others } = useProps(
16299
16299
  "ComboboxGroup",
16300
16300
  defaultProps$N,
16301
16301
  props
@@ -16316,7 +16316,7 @@ const defaultProps$N = {}, ComboboxGroup = factory((props, ref) => {
16316
16316
  ComboboxGroup.classes = classes$g;
16317
16317
  ComboboxGroup.displayName = "@mantine/core/ComboboxGroup";
16318
16318
  const defaultProps$M = {}, ComboboxHeader = factory((props, ref) => {
16319
- const { classNames, className, style: style2, styles, vars: vars2, ...others } = useProps(
16319
+ const { classNames, className, style: style2, styles, vars, ...others } = useProps(
16320
16320
  "ComboboxHeader",
16321
16321
  defaultProps$M,
16322
16322
  props
@@ -16353,7 +16353,7 @@ const defaultProps$L = {}, ComboboxOption = factory((_props, ref) => {
16353
16353
  className,
16354
16354
  style: style2,
16355
16355
  styles,
16356
- vars: vars2,
16356
+ vars,
16357
16357
  onClick,
16358
16358
  id: id2,
16359
16359
  active,
@@ -16420,7 +16420,7 @@ const defaultProps$J = {
16420
16420
  classNames,
16421
16421
  styles,
16422
16422
  unstyled,
16423
- vars: vars2,
16423
+ vars,
16424
16424
  withAriaAttributes,
16425
16425
  onKeyDown,
16426
16426
  withKeyboardNavigation,
@@ -16667,7 +16667,7 @@ function Combobox(_props) {
16667
16667
  unstyled,
16668
16668
  children: children2,
16669
16669
  store: controlledStore,
16670
- vars: vars2,
16670
+ vars,
16671
16671
  onOptionSubmit,
16672
16672
  onClose,
16673
16673
  size: size2,
@@ -16683,7 +16683,7 @@ function Combobox(_props) {
16683
16683
  classNames,
16684
16684
  styles,
16685
16685
  unstyled,
16686
- vars: vars2,
16686
+ vars,
16687
16687
  varsResolver: varsResolver$g
16688
16688
  }), onDropdownClose = () => {
16689
16689
  onClose?.(), store.closeDropdown();
@@ -16867,7 +16867,8 @@ function OptionsDropdown({
16867
16867
  unstyled,
16868
16868
  labelId,
16869
16869
  renderOption,
16870
- scrollAreaProps
16870
+ scrollAreaProps,
16871
+ "aria-label": ariaLabel
16871
16872
  }) {
16872
16873
  validateOptions(data);
16873
16874
  const filteredData = typeof search == "string" ? (filter2 || defaultOptionsFilter)({
@@ -16886,7 +16887,7 @@ function OptionsDropdown({
16886
16887
  },
16887
16888
  isOptionsGroup(item) ? item.group : item.value
16888
16889
  ));
16889
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Combobox.Dropdown, { hidden: hidden2 || hiddenWhenEmpty && isEmpty2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Combobox.Options, { labelledBy: labelId, children: [
16890
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Combobox.Dropdown, { hidden: hidden2 || hiddenWhenEmpty && isEmpty2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Combobox.Options, { labelledBy: labelId, "aria-label": ariaLabel, children: [
16890
16891
  withScrollArea ? /* @__PURE__ */ jsxRuntimeExports.jsx(
16891
16892
  ScrollArea.Autosize,
16892
16893
  {
@@ -16929,7 +16930,7 @@ const classes$f = __default__$f, defaultProps$G = {}, varsResolver$f = (theme2,
16929
16930
  style: style2,
16930
16931
  styles,
16931
16932
  unstyled,
16932
- vars: vars2,
16933
+ vars,
16933
16934
  radius,
16934
16935
  color: color2,
16935
16936
  gradient,
@@ -16951,7 +16952,7 @@ const classes$f = __default__$f, defaultProps$G = {}, varsResolver$f = (theme2,
16951
16952
  classNames,
16952
16953
  styles,
16953
16954
  unstyled,
16954
- vars: vars2,
16955
+ vars,
16955
16956
  varsResolver: varsResolver$f
16956
16957
  });
16957
16958
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -16987,7 +16988,7 @@ const classes$e = __default__$e, defaultProps$F = {}, varsResolver$e = (theme2,
16987
16988
  style: style2,
16988
16989
  styles,
16989
16990
  unstyled,
16990
- vars: vars2,
16991
+ vars,
16991
16992
  opened,
16992
16993
  children: children2,
16993
16994
  transitionDuration,
@@ -17002,7 +17003,7 @@ const classes$e = __default__$e, defaultProps$F = {}, varsResolver$e = (theme2,
17002
17003
  classNames,
17003
17004
  styles,
17004
17005
  unstyled,
17005
- vars: vars2,
17006
+ vars,
17006
17007
  varsResolver: varsResolver$e
17007
17008
  });
17008
17009
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(UnstyledButton, { ...getStyles2("root"), ref, ...others, children: [
@@ -17025,7 +17026,7 @@ const classes$d = __default__$d, defaultProps$E = {
17025
17026
  styles,
17026
17027
  unstyled,
17027
17028
  orientation,
17028
- vars: vars2,
17029
+ vars,
17029
17030
  borderWidth,
17030
17031
  variant,
17031
17032
  mod,
@@ -17039,7 +17040,7 @@ const classes$d = __default__$d, defaultProps$E = {
17039
17040
  classNames,
17040
17041
  styles,
17041
17042
  unstyled,
17042
- vars: vars2,
17043
+ vars,
17043
17044
  varsResolver: varsResolver$d,
17044
17045
  rootSelector: "group"
17045
17046
  });
@@ -17087,7 +17088,7 @@ const loaderTransition = {
17087
17088
  }, Button = polymorphicFactory((_props, ref) => {
17088
17089
  const props = useProps("Button", defaultProps$D, _props), {
17089
17090
  style: style2,
17090
- vars: vars2,
17091
+ vars,
17091
17092
  className,
17092
17093
  color: color2,
17093
17094
  disabled,
@@ -17116,7 +17117,7 @@ const loaderTransition = {
17116
17117
  classNames,
17117
17118
  styles,
17118
17119
  unstyled,
17119
- vars: vars2,
17120
+ vars,
17120
17121
  varsResolver: varsResolver$c
17121
17122
  }), hasLeftSection = !!leftSection, hasRightSection = !!rightSection;
17122
17123
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -17164,7 +17165,7 @@ const [CardProvider, useCardContext] = createSafeContext(
17164
17165
  );
17165
17166
  var __default__$c = { root: "m_e615b15f", section: "m_599a2148" };
17166
17167
  const classes$c = __default__$c, defaultProps$C = {}, CardSection = polymorphicFactory((_props, ref) => {
17167
- const props = useProps("CardSection", defaultProps$C, _props), { classNames, className, style: style2, styles, vars: vars2, withBorder, inheritPadding, mod, ...others } = props, ctx = useCardContext();
17168
+ const props = useProps("CardSection", defaultProps$C, _props), { classNames, className, style: style2, styles, vars, withBorder, inheritPadding, mod, ...others } = props, ctx = useCardContext();
17168
17169
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17169
17170
  Box$1,
17170
17171
  {
@@ -17182,7 +17183,7 @@ const defaultProps$B = {}, varsResolver$b = (_2, { padding }) => ({
17182
17183
  "--card-padding": getSpacing(padding)
17183
17184
  }
17184
17185
  }), Card$1 = polymorphicFactory((_props, ref) => {
17185
- const props = useProps("Card", defaultProps$B, _props), { classNames, className, style: style2, styles, unstyled, vars: vars2, children: children2, padding, ...others } = props, getStyles2 = useStyles({
17186
+ const props = useProps("Card", defaultProps$B, _props), { classNames, className, style: style2, styles, unstyled, vars, children: children2, padding, ...others } = props, getStyles2 = useStyles({
17186
17187
  name: "Card",
17187
17188
  props,
17188
17189
  classes: classes$c,
@@ -17191,7 +17192,7 @@ const defaultProps$B = {}, varsResolver$b = (_2, { padding }) => ({
17191
17192
  classNames,
17192
17193
  styles,
17193
17194
  unstyled,
17194
- vars: vars2,
17195
+ vars,
17195
17196
  varsResolver: varsResolver$b
17196
17197
  }), _children = reactExports.Children.toArray(children2), content2 = _children.map((child, index2) => typeof child == "object" && child && "type" in child && child.type === CardSection ? reactExports.cloneElement(child, {
17197
17198
  "data-first-section": index2 === 0 || void 0,
@@ -17204,7 +17205,7 @@ Card$1.displayName = "@mantine/core/Card";
17204
17205
  Card$1.Section = CardSection;
17205
17206
  var __default__$b = { root: "m_4451eb3a" };
17206
17207
  const classes$b = __default__$b, defaultProps$A = {}, Center = polymorphicFactory((_props, ref) => {
17207
- const props = useProps("Center", defaultProps$A, _props), { classNames, className, style: style2, styles, unstyled, vars: vars2, inline: inline2, mod, ...others } = props, getStyles2 = useStyles({
17208
+ const props = useProps("Center", defaultProps$A, _props), { classNames, className, style: style2, styles, unstyled, vars, inline: inline2, mod, ...others } = props, getStyles2 = useStyles({
17208
17209
  name: "Center",
17209
17210
  props,
17210
17211
  classes: classes$b,
@@ -17213,7 +17214,7 @@ const classes$b = __default__$b, defaultProps$A = {}, Center = polymorphicFactor
17213
17214
  classNames,
17214
17215
  styles,
17215
17216
  unstyled,
17216
- vars: vars2
17217
+ vars
17217
17218
  });
17218
17219
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { ref, mod: [{ inline: inline2 }, mod], ...getStyles2("root"), ...others });
17219
17220
  });
@@ -17231,7 +17232,7 @@ const classes$a = __default__$a, defaultProps$z = {}, varsResolver$a = (theme2,
17231
17232
  style: style2,
17232
17233
  styles,
17233
17234
  unstyled,
17234
- vars: vars2,
17235
+ vars,
17235
17236
  color: color2,
17236
17237
  block,
17237
17238
  variant,
@@ -17246,7 +17247,7 @@ const classes$a = __default__$a, defaultProps$z = {}, varsResolver$a = (theme2,
17246
17247
  classNames,
17247
17248
  styles,
17248
17249
  unstyled,
17249
- vars: vars2,
17250
+ vars,
17250
17251
  varsResolver: varsResolver$a
17251
17252
  });
17252
17253
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -17279,7 +17280,7 @@ const classes$9 = __default__$9, defaultProps$y = {
17279
17280
  style: style2,
17280
17281
  styles,
17281
17282
  unstyled,
17282
- vars: vars2,
17283
+ vars,
17283
17284
  color: color2,
17284
17285
  size: size2,
17285
17286
  radius,
@@ -17296,7 +17297,7 @@ const classes$9 = __default__$9, defaultProps$y = {
17296
17297
  classNames,
17297
17298
  styles,
17298
17299
  unstyled,
17299
- vars: vars2,
17300
+ vars,
17300
17301
  varsResolver: varsResolver$9
17301
17302
  });
17302
17303
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -17324,7 +17325,7 @@ const classes$8 = __default__$8, defaultProps$x = {}, varsResolver$8 = (_2, { si
17324
17325
  "--container-size": fluid ? void 0 : getSize(size2, "container-size")
17325
17326
  }
17326
17327
  }), Container$1 = factory((_props, ref) => {
17327
- const props = useProps("Container", defaultProps$x, _props), { classNames, className, style: style2, styles, unstyled, vars: vars2, fluid, mod, ...others } = props, getStyles2 = useStyles({
17328
+ const props = useProps("Container", defaultProps$x, _props), { classNames, className, style: style2, styles, unstyled, vars, fluid, mod, ...others } = props, getStyles2 = useStyles({
17328
17329
  name: "Container",
17329
17330
  classes: classes$8,
17330
17331
  props,
@@ -17333,7 +17334,7 @@ const classes$8 = __default__$8, defaultProps$x = {}, varsResolver$8 = (_2, { si
17333
17334
  classNames,
17334
17335
  styles,
17335
17336
  unstyled,
17336
- vars: vars2,
17337
+ vars,
17337
17338
  varsResolver: varsResolver$8
17338
17339
  });
17339
17340
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { ref, mod: [{ fluid }, mod], ...getStyles2("root"), ...others });
@@ -17364,7 +17365,7 @@ const classes$7 = __default__$7, defaultProps$v = {
17364
17365
  style: style2,
17365
17366
  styles,
17366
17367
  unstyled,
17367
- vars: vars2,
17368
+ vars,
17368
17369
  color: color2,
17369
17370
  orientation,
17370
17371
  label,
@@ -17380,7 +17381,7 @@ const classes$7 = __default__$7, defaultProps$v = {
17380
17381
  classNames,
17381
17382
  styles,
17382
17383
  unstyled,
17383
- vars: vars2,
17384
+ vars,
17384
17385
  varsResolver: varsResolver$7
17385
17386
  });
17386
17387
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -17402,7 +17403,7 @@ const [DrawerProvider, useDrawerContext] = createSafeContext(
17402
17403
  );
17403
17404
  var __default__$6 = { root: "m_f11b401e", header: "m_5a7c2c9", content: "m_b8a05bbd", inner: "m_31cd769a" };
17404
17405
  const classes$6 = __default__$6, defaultProps$u = {}, DrawerBody = factory((_props, ref) => {
17405
- const props = useProps("DrawerBody", defaultProps$u, _props), { classNames, className, style: style2, styles, vars: vars2, ...others } = props, ctx = useDrawerContext();
17406
+ const props = useProps("DrawerBody", defaultProps$u, _props), { classNames, className, style: style2, styles, vars, ...others } = props, ctx = useDrawerContext();
17406
17407
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17407
17408
  ModalBaseBody,
17408
17409
  {
@@ -17415,7 +17416,7 @@ const classes$6 = __default__$6, defaultProps$u = {}, DrawerBody = factory((_pro
17415
17416
  DrawerBody.classes = classes$6;
17416
17417
  DrawerBody.displayName = "@mantine/core/DrawerBody";
17417
17418
  const defaultProps$t = {}, DrawerCloseButton = factory((_props, ref) => {
17418
- const props = useProps("DrawerCloseButton", defaultProps$t, _props), { classNames, className, style: style2, styles, vars: vars2, ...others } = props, ctx = useDrawerContext();
17419
+ const props = useProps("DrawerCloseButton", defaultProps$t, _props), { classNames, className, style: style2, styles, vars, ...others } = props, ctx = useDrawerContext();
17419
17420
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17420
17421
  ModalBaseCloseButton,
17421
17422
  {
@@ -17428,7 +17429,7 @@ const defaultProps$t = {}, DrawerCloseButton = factory((_props, ref) => {
17428
17429
  DrawerCloseButton.classes = classes$6;
17429
17430
  DrawerCloseButton.displayName = "@mantine/core/DrawerCloseButton";
17430
17431
  const defaultProps$s = {}, DrawerContent = factory((_props, ref) => {
17431
- const props = useProps("DrawerContent", defaultProps$s, _props), { classNames, className, style: style2, styles, vars: vars2, children: children2, radius, ...others } = props, ctx = useDrawerContext(), Scroll = ctx.scrollAreaComponent || NativeScrollArea;
17432
+ const props = useProps("DrawerContent", defaultProps$s, _props), { classNames, className, style: style2, styles, vars, children: children2, radius, ...others } = props, ctx = useDrawerContext(), Scroll = ctx.scrollAreaComponent || NativeScrollArea;
17432
17433
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17433
17434
  ModalBaseContent,
17434
17435
  {
@@ -17444,7 +17445,7 @@ const defaultProps$s = {}, DrawerContent = factory((_props, ref) => {
17444
17445
  DrawerContent.classes = classes$6;
17445
17446
  DrawerContent.displayName = "@mantine/core/DrawerContent";
17446
17447
  const defaultProps$r = {}, DrawerHeader = factory((_props, ref) => {
17447
- const props = useProps("DrawerHeader", defaultProps$r, _props), { classNames, className, style: style2, styles, vars: vars2, ...others } = props, ctx = useDrawerContext();
17448
+ const props = useProps("DrawerHeader", defaultProps$r, _props), { classNames, className, style: style2, styles, vars, ...others } = props, ctx = useDrawerContext();
17448
17449
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17449
17450
  ModalBaseHeader,
17450
17451
  {
@@ -17457,7 +17458,7 @@ const defaultProps$r = {}, DrawerHeader = factory((_props, ref) => {
17457
17458
  DrawerHeader.classes = classes$6;
17458
17459
  DrawerHeader.displayName = "@mantine/core/DrawerHeader";
17459
17460
  const defaultProps$q = {}, DrawerOverlay = factory((_props, ref) => {
17460
- const props = useProps("DrawerOverlay", defaultProps$q, _props), { classNames, className, style: style2, styles, vars: vars2, ...others } = props, ctx = useDrawerContext();
17461
+ const props = useProps("DrawerOverlay", defaultProps$q, _props), { classNames, className, style: style2, styles, vars, ...others } = props, ctx = useDrawerContext();
17461
17462
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17462
17463
  ModalBaseOverlay,
17463
17464
  {
@@ -17519,7 +17520,7 @@ const transitions = {
17519
17520
  style: style2,
17520
17521
  styles,
17521
17522
  unstyled,
17522
- vars: vars2,
17523
+ vars,
17523
17524
  scrollAreaComponent,
17524
17525
  position,
17525
17526
  transitionProps,
@@ -17534,7 +17535,7 @@ const transitions = {
17534
17535
  classNames,
17535
17536
  styles,
17536
17537
  unstyled,
17537
- vars: vars2,
17538
+ vars,
17538
17539
  varsResolver: varsResolver$6
17539
17540
  }), drawerTransition = (dir === "rtl" ? rtlTransitions : transitions)[position];
17540
17541
  return /* @__PURE__ */ jsxRuntimeExports.jsx(DrawerProvider, { value: { scrollAreaComponent, getStyles: getStyles2, radius }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -17551,7 +17552,7 @@ const transitions = {
17551
17552
  DrawerRoot.classes = classes$6;
17552
17553
  DrawerRoot.displayName = "@mantine/core/DrawerRoot";
17553
17554
  const defaultProps$o = {}, DrawerTitle = factory((_props, ref) => {
17554
- const props = useProps("DrawerTitle", defaultProps$o, _props), { classNames, className, style: style2, styles, vars: vars2, ...others } = props, ctx = useDrawerContext();
17555
+ const props = useProps("DrawerTitle", defaultProps$o, _props), { classNames, className, style: style2, styles, vars, ...others } = props, ctx = useDrawerContext();
17555
17556
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17556
17557
  ModalBaseTitle,
17557
17558
  {
@@ -17677,7 +17678,7 @@ const [MenuContextProvider, useMenuContext] = createSafeContext(
17677
17678
  );
17678
17679
  var __default__$5 = { dropdown: "m_dc9b7c9f", label: "m_9bfac126", divider: "m_efdf90cb", item: "m_99ac2aa1", itemLabel: "m_5476e0d3", itemSection: "m_8b75e504" };
17679
17680
  const classes$5 = __default__$5, defaultProps$j = {}, MenuDivider = factory((props, ref) => {
17680
- const { classNames, className, style: style2, styles, vars: vars2, ...others } = useProps(
17681
+ const { classNames, className, style: style2, styles, vars, ...others } = useProps(
17681
17682
  "MenuDivider",
17682
17683
  defaultProps$j,
17683
17684
  props
@@ -17699,7 +17700,7 @@ const defaultProps$i = {}, MenuDropdown = factory((props, ref) => {
17699
17700
  className,
17700
17701
  style: style2,
17701
17702
  styles,
17702
- vars: vars2,
17703
+ vars,
17703
17704
  onMouseEnter,
17704
17705
  onMouseLeave,
17705
17706
  children: children2,
@@ -17747,7 +17748,7 @@ const defaultProps$h = {}, MenuItem = polymorphicFactory((props, ref) => {
17747
17748
  className,
17748
17749
  style: style2,
17749
17750
  styles,
17750
- vars: vars2,
17751
+ vars,
17751
17752
  color: color2,
17752
17753
  closeMenuOnClick,
17753
17754
  leftSection,
@@ -17805,7 +17806,7 @@ const defaultProps$h = {}, MenuItem = polymorphicFactory((props, ref) => {
17805
17806
  MenuItem.classes = classes$5;
17806
17807
  MenuItem.displayName = "@mantine/core/MenuItem";
17807
17808
  const defaultProps$g = {}, MenuLabel = factory((props, ref) => {
17808
- const { classNames, className, style: style2, styles, vars: vars2, ...others } = useProps(
17809
+ const { classNames, className, style: style2, styles, vars, ...others } = useProps(
17809
17810
  "MenuLabel",
17810
17811
  defaultProps$g,
17811
17812
  props
@@ -17874,7 +17875,7 @@ function Menu(_props) {
17874
17875
  styles,
17875
17876
  unstyled,
17876
17877
  variant,
17877
- vars: vars2,
17878
+ vars,
17878
17879
  menuItemTabIndex,
17879
17880
  keepMounted,
17880
17881
  ...others
@@ -17958,7 +17959,7 @@ const [ModalProvider, useModalContext] = createSafeContext(
17958
17959
  );
17959
17960
  var __default__$4 = { root: "m_9df02822", content: "m_54c44539", inner: "m_1f958f16", header: "m_d0e2b9cd" };
17960
17961
  const classes$4 = __default__$4, defaultProps$d = {}, ModalBody = factory((_props, ref) => {
17961
- const props = useProps("ModalBody", defaultProps$d, _props), { classNames, className, style: style2, styles, vars: vars2, ...others } = props, ctx = useModalContext();
17962
+ const props = useProps("ModalBody", defaultProps$d, _props), { classNames, className, style: style2, styles, vars, ...others } = props, ctx = useModalContext();
17962
17963
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17963
17964
  ModalBaseBody,
17964
17965
  {
@@ -17971,7 +17972,7 @@ const classes$4 = __default__$4, defaultProps$d = {}, ModalBody = factory((_prop
17971
17972
  ModalBody.classes = classes$4;
17972
17973
  ModalBody.displayName = "@mantine/core/ModalBody";
17973
17974
  const defaultProps$c = {}, ModalContent = factory((_props, ref) => {
17974
- const props = useProps("ModalContent", defaultProps$c, _props), { classNames, className, style: style2, styles, vars: vars2, children: children2, ...others } = props, ctx = useModalContext(), Scroll = ctx.scrollAreaComponent || NativeScrollArea;
17975
+ const props = useProps("ModalContent", defaultProps$c, _props), { classNames, className, style: style2, styles, vars, children: children2, ...others } = props, ctx = useModalContext(), Scroll = ctx.scrollAreaComponent || NativeScrollArea;
17975
17976
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
17976
17977
  ModalBaseContent,
17977
17978
  {
@@ -17996,7 +17997,7 @@ const defaultProps$c = {}, ModalContent = factory((_props, ref) => {
17996
17997
  ModalContent.classes = classes$4;
17997
17998
  ModalContent.displayName = "@mantine/core/ModalContent";
17998
17999
  const defaultProps$b = {}, ModalOverlay = factory((_props, ref) => {
17999
- const props = useProps("ModalOverlay", defaultProps$b, _props), { classNames, className, style: style2, styles, vars: vars2, ...others } = props, ctx = useModalContext();
18000
+ const props = useProps("ModalOverlay", defaultProps$b, _props), { classNames, className, style: style2, styles, vars, ...others } = props, ctx = useModalContext();
18000
18001
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
18001
18002
  ModalBaseOverlay,
18002
18003
  {
@@ -18034,7 +18035,7 @@ const defaultProps$a = {
18034
18035
  style: style2,
18035
18036
  styles,
18036
18037
  unstyled,
18037
- vars: vars2,
18038
+ vars,
18038
18039
  yOffset,
18039
18040
  scrollAreaComponent,
18040
18041
  radius,
@@ -18052,7 +18053,7 @@ const defaultProps$a = {
18052
18053
  classNames,
18053
18054
  styles,
18054
18055
  unstyled,
18055
- vars: vars2,
18056
+ vars,
18056
18057
  varsResolver: varsResolver$5
18057
18058
  });
18058
18059
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ModalProvider, { value: { yOffset, scrollAreaComponent, getStyles: getStyles2, fullScreen }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -18155,7 +18156,7 @@ const classes$3 = __default__$3, defaultProps$9 = {
18155
18156
  zIndex,
18156
18157
  disabled,
18157
18158
  variant,
18158
- vars: vars2,
18159
+ vars,
18159
18160
  portalProps,
18160
18161
  ...others
18161
18162
  } = props, theme2 = useMantineTheme(), getStyles2 = useStyles({
@@ -18168,7 +18169,7 @@ const classes$3 = __default__$3, defaultProps$9 = {
18168
18169
  styles,
18169
18170
  unstyled,
18170
18171
  rootSelector: "tooltip",
18171
- vars: vars2,
18172
+ vars,
18172
18173
  varsResolver: varsResolver$4
18173
18174
  }), { handleMouseMove, x: x2, y: y2, opened, boundaryRef, floating, setOpened } = useFloatingTooltip({
18174
18175
  offset: offset2,
@@ -18339,7 +18340,7 @@ const defaultProps$7 = {
18339
18340
  inline: inline2,
18340
18341
  variant,
18341
18342
  keepMounted,
18342
- vars: vars2,
18343
+ vars,
18343
18344
  portalProps,
18344
18345
  mod,
18345
18346
  floatingStrategy,
@@ -18367,7 +18368,7 @@ const defaultProps$7 = {
18367
18368
  styles,
18368
18369
  unstyled,
18369
18370
  rootSelector: "tooltip",
18370
- vars: vars2,
18371
+ vars,
18371
18372
  varsResolver: varsResolver$3
18372
18373
  });
18373
18374
  if (!isElement$1(children2))
@@ -18452,7 +18453,7 @@ const defaultProps$6 = {
18452
18453
  classNames,
18453
18454
  styles,
18454
18455
  unstyled,
18455
- vars: vars2,
18456
+ vars,
18456
18457
  dropdownOpened,
18457
18458
  defaultDropdownOpened,
18458
18459
  onDropdownClose,
@@ -18602,7 +18603,8 @@ const defaultProps$6 = {
18602
18603
  withCheckIcon,
18603
18604
  nothingFoundMessage,
18604
18605
  unstyled,
18605
- labelId: `${_id}-label`,
18606
+ labelId: others.label ? `${_id}-label` : void 0,
18607
+ "aria-label": others.label ? void 0 : others["aria-label"],
18606
18608
  renderOption,
18607
18609
  scrollAreaProps
18608
18610
  }
@@ -18642,7 +18644,7 @@ const classes$2 = __default__$2, defaultProps$5 = {
18642
18644
  style: style2,
18643
18645
  styles,
18644
18646
  unstyled,
18645
- vars: vars2,
18647
+ vars,
18646
18648
  align,
18647
18649
  justify,
18648
18650
  gap,
@@ -18657,7 +18659,7 @@ const classes$2 = __default__$2, defaultProps$5 = {
18657
18659
  classNames,
18658
18660
  styles,
18659
18661
  unstyled,
18660
- vars: vars2,
18662
+ vars,
18661
18663
  varsResolver: varsResolver$2
18662
18664
  });
18663
18665
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { ref, ...getStyles2("root"), variant, ...others });
@@ -18740,7 +18742,7 @@ const defaultProps$2 = {}, TabsTab = factory((_props, ref) => {
18740
18742
  style: style2,
18741
18743
  classNames,
18742
18744
  styles,
18743
- vars: vars2,
18745
+ vars,
18744
18746
  mod,
18745
18747
  ...others
18746
18748
  } = props, theme2 = useMantineTheme(), { dir } = useDirection(), ctx = useTabsContext(), active = value === ctx.value, activateTab = (event) => {
@@ -18829,7 +18831,7 @@ const VALUE_ERROR = "Tabs.Tab or Tabs.Panel component was rendered with invalid
18829
18831
  unstyled,
18830
18832
  className,
18831
18833
  style: style2,
18832
- vars: vars2,
18834
+ vars,
18833
18835
  autoContrast,
18834
18836
  mod,
18835
18837
  ...others
@@ -18847,7 +18849,7 @@ const VALUE_ERROR = "Tabs.Tab or Tabs.Panel component was rendered with invalid
18847
18849
  classNames,
18848
18850
  styles,
18849
18851
  unstyled,
18850
- vars: vars2,
18852
+ vars,
18851
18853
  varsResolver: varsResolver$1
18852
18854
  });
18853
18855
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -18934,7 +18936,7 @@ const classes = __default__, defaultProps = {
18934
18936
  styles,
18935
18937
  unstyled,
18936
18938
  order,
18937
- vars: vars2,
18939
+ vars,
18938
18940
  size: size2,
18939
18941
  variant,
18940
18942
  lineClamp,
@@ -18950,7 +18952,7 @@ const classes = __default__, defaultProps = {
18950
18952
  classNames,
18951
18953
  styles,
18952
18954
  unstyled,
18953
- vars: vars2,
18955
+ vars,
18954
18956
  varsResolver
18955
18957
  });
18956
18958
  return [1, 2, 3, 4, 5, 6].includes(order) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -18968,7 +18970,7 @@ const classes = __default__, defaultProps = {
18968
18970
  });
18969
18971
  Title.classes = classes;
18970
18972
  Title.displayName = "@mantine/core/Title";
18971
- var content = "_1u4wf800", image = "_1u4wf801", inner = "_1u4wf802", root$1 = "_1u4wf803", description$1 = "_1u4wf804", title$1 = "_1u4wf805";
18973
+ var content = "_1u4wf800", image = "_1u4wf801", inner = "_1u4wf802", root$1 = "_1u4wf803", description$1 = "_1u4wf804", title$2 = "_1u4wf805";
18972
18974
  function NotFound() {
18973
18975
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Container$1, { className: root$1, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: inner, children: [
18974
18976
  /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 362 145", className: image, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -18979,7 +18981,7 @@ function NotFound() {
18979
18981
  }
18980
18982
  ) }),
18981
18983
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: content, children: [
18982
- /* @__PURE__ */ jsxRuntimeExports.jsx(Title, { className: title$1, children: "Nothing to see here" }),
18984
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Title, { className: title$2, children: "Nothing to see here" }),
18983
18985
  /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { c: "dimmed", size: "lg", ta: "center", className: description$1, children: "Page you are trying to open does not exist. You may have mistyped the address, or the page has been moved to another URL. If you think this is an error contact support." }),
18984
18986
  /* @__PURE__ */ jsxRuntimeExports.jsx(Group, { justify: "center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { component: Link$1, to: "/", search: !0, startTransition: !0, size: "md", children: "Take me back to home page" }) })
18985
18987
  ] })
@@ -20639,7 +20641,7 @@ function extend(parent, definition) {
20639
20641
  prototype[key] = definition[key];
20640
20642
  return prototype;
20641
20643
  }
20642
- function Color$1() {
20644
+ function Color() {
20643
20645
  }
20644
20646
  var darker = 0.7, brighter = 1 / darker, reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`), reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`), reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`), reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`), reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`), reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`), named = {
20645
20647
  aliceblue: 15792383,
@@ -20791,9 +20793,9 @@ var darker = 0.7, brighter = 1 / darker, reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s
20791
20793
  yellow: 16776960,
20792
20794
  yellowgreen: 10145074
20793
20795
  };
20794
- define(Color$1, color$1, {
20795
- copy(channels2) {
20796
- return Object.assign(new this.constructor(), this, channels2);
20796
+ define(Color, color$1, {
20797
+ copy(channels) {
20798
+ return Object.assign(new this.constructor(), this, channels);
20797
20799
  },
20798
20800
  displayable() {
20799
20801
  return this.rgb().displayable();
@@ -20829,7 +20831,7 @@ function rgba$1(r2, g2, b2, a) {
20829
20831
  return a <= 0 && (r2 = g2 = b2 = NaN), new Rgb(r2, g2, b2, a);
20830
20832
  }
20831
20833
  function rgbConvert(o2) {
20832
- return o2 instanceof Color$1 || (o2 = color$1(o2)), o2 ? (o2 = o2.rgb(), new Rgb(o2.r, o2.g, o2.b, o2.opacity)) : new Rgb();
20834
+ return o2 instanceof Color || (o2 = color$1(o2)), o2 ? (o2 = o2.rgb(), new Rgb(o2.r, o2.g, o2.b, o2.opacity)) : new Rgb();
20833
20835
  }
20834
20836
  function rgb(r2, g2, b2, opacity) {
20835
20837
  return arguments.length === 1 ? rgbConvert(r2) : new Rgb(r2, g2, b2, opacity ?? 1);
@@ -20837,7 +20839,7 @@ function rgb(r2, g2, b2, opacity) {
20837
20839
  function Rgb(r2, g2, b2, opacity) {
20838
20840
  this.r = +r2, this.g = +g2, this.b = +b2, this.opacity = +opacity;
20839
20841
  }
20840
- define(Rgb, rgb, extend(Color$1, {
20842
+ define(Rgb, rgb, extend(Color, {
20841
20843
  brighter(k2) {
20842
20844
  return k2 = k2 == null ? brighter : Math.pow(brighter, k2), new Rgb(this.r * k2, this.g * k2, this.b * k2, this.opacity);
20843
20845
  },
@@ -20885,7 +20887,7 @@ function hsla$1(h2, s2, l2, a) {
20885
20887
  function hslConvert(o2) {
20886
20888
  if (o2 instanceof Hsl)
20887
20889
  return new Hsl(o2.h, o2.s, o2.l, o2.opacity);
20888
- if (o2 instanceof Color$1 || (o2 = color$1(o2)), !o2)
20890
+ if (o2 instanceof Color || (o2 = color$1(o2)), !o2)
20889
20891
  return new Hsl();
20890
20892
  if (o2 instanceof Hsl)
20891
20893
  return o2;
@@ -20899,7 +20901,7 @@ function hsl(h2, s2, l2, opacity) {
20899
20901
  function Hsl(h2, s2, l2, opacity) {
20900
20902
  this.h = +h2, this.s = +s2, this.l = +l2, this.opacity = +opacity;
20901
20903
  }
20902
- define(Hsl, hsl, extend(Color$1, {
20904
+ define(Hsl, hsl, extend(Color, {
20903
20905
  brighter(k2) {
20904
20906
  return k2 = k2 == null ? brighter : Math.pow(brighter, k2), new Hsl(this.h, this.s, this.l * k2, this.opacity);
20905
20907
  },
@@ -23362,10 +23364,10 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
23362
23364
  const { transform: transform2, snapGrid, snapToGrid, nodeOrigin: storeNodeOrigin } = getStoreItems(), pointerPosition = getPointerPosition(event.sourceEvent, { transform: transform2, snapGrid, snapToGrid }), childChanges = [];
23363
23365
  if (!node)
23364
23366
  return;
23365
- const { x: prevX, y: prevY, width: prevWidth, height: prevHeight } = prevValues, change2 = {}, nodeOrigin = node.origin ?? storeNodeOrigin, { width, height, x: x2, y: y2 } = getDimensionsAfterResize(startValues, controlDirection, pointerPosition, boundaries, keepAspectRatio, nodeOrigin, parentExtent, childExtent), isWidthChange = width !== prevWidth, isHeightChange = height !== prevHeight, isXPosChange = x2 !== prevX && isWidthChange, isYPosChange = y2 !== prevY && isHeightChange;
23367
+ const { x: prevX, y: prevY, width: prevWidth, height: prevHeight } = prevValues, change = {}, nodeOrigin = node.origin ?? storeNodeOrigin, { width, height, x: x2, y: y2 } = getDimensionsAfterResize(startValues, controlDirection, pointerPosition, boundaries, keepAspectRatio, nodeOrigin, parentExtent, childExtent), isWidthChange = width !== prevWidth, isHeightChange = height !== prevHeight, isXPosChange = x2 !== prevX && isWidthChange, isYPosChange = y2 !== prevY && isHeightChange;
23366
23368
  if (!isXPosChange && !isYPosChange && !isWidthChange && !isHeightChange)
23367
23369
  return;
23368
- if ((isXPosChange || isYPosChange || nodeOrigin[0] === 1 || nodeOrigin[1] == 1) && (change2.x = isXPosChange ? x2 : prevValues.x, change2.y = isYPosChange ? y2 : prevValues.y, prevValues.x = change2.x, prevValues.y = change2.y, parentNode && node.expandParent && (change2.x && change2.x < 0 && (prevValues.x = 0, startValues.x = startValues.x - change2.x), change2.y && change2.y < 0 && (prevValues.y = 0, startValues.y = startValues.y - change2.y)), childNodes.length > 0)) {
23370
+ if ((isXPosChange || isYPosChange || nodeOrigin[0] === 1 || nodeOrigin[1] == 1) && (change.x = isXPosChange ? x2 : prevValues.x, change.y = isYPosChange ? y2 : prevValues.y, prevValues.x = change.x, prevValues.y = change.y, parentNode && node.expandParent && (change.x && change.x < 0 && (prevValues.x = 0, startValues.x = startValues.x - change.x), change.y && change.y < 0 && (prevValues.y = 0, startValues.y = startValues.y - change.y)), childNodes.length > 0)) {
23369
23371
  const xChange = x2 - prevX, yChange = y2 - prevY;
23370
23372
  for (const childNode of childNodes)
23371
23373
  childNode.position = {
@@ -23373,7 +23375,7 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
23373
23375
  y: childNode.position.y - yChange + nodeOrigin[1] * (height - prevHeight)
23374
23376
  }, childChanges.push(childNode);
23375
23377
  }
23376
- (isWidthChange || isHeightChange) && (change2.width = isWidthChange ? width : prevValues.width, change2.height = isHeightChange ? height : prevValues.height, prevValues.width = change2.width, prevValues.height = change2.height);
23378
+ (isWidthChange || isHeightChange) && (change.width = isWidthChange ? width : prevValues.width, change.height = isHeightChange ? height : prevValues.height, prevValues.width = change.width, prevValues.height = change.height);
23377
23379
  const direction = getResizeDirection({
23378
23380
  width: prevValues.width,
23379
23381
  prevWidth,
@@ -23382,7 +23384,7 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
23382
23384
  affectsX: controlDirection.affectsX,
23383
23385
  affectsY: controlDirection.affectsY
23384
23386
  }), nextValues = { ...prevValues, direction };
23385
- shouldResize?.(event, nextValues) !== !1 && (onResize?.(event, nextValues), onChange(change2, childChanges));
23387
+ shouldResize?.(event, nextValues) !== !1 && (onResize?.(event, nextValues), onChange(change, childChanges));
23386
23388
  }).on("end", (event) => {
23387
23389
  onResizeEnd?.(event, { ...prevValues }), onEnd?.();
23388
23390
  });
@@ -23734,15 +23736,15 @@ const useViewportHelper = () => {
23734
23736
  };
23735
23737
  function applyChanges(changes, elements) {
23736
23738
  const updatedElements = [], changesMap = /* @__PURE__ */ new Map();
23737
- for (const change2 of changes)
23738
- if (change2.type === "add") {
23739
- updatedElements.push(change2.item);
23739
+ for (const change of changes)
23740
+ if (change.type === "add") {
23741
+ updatedElements.push(change.item);
23740
23742
  continue;
23741
- } else if (change2.type === "remove" || change2.type === "replace")
23742
- changesMap.set(change2.id, [change2]);
23743
+ } else if (change.type === "remove" || change.type === "replace")
23744
+ changesMap.set(change.id, [change]);
23743
23745
  else {
23744
- const elementChanges = changesMap.get(change2.id);
23745
- elementChanges ? elementChanges.push(change2) : changesMap.set(change2.id, [change2]);
23746
+ const elementChanges = changesMap.get(change.id);
23747
+ elementChanges ? elementChanges.push(change) : changesMap.set(change.id, [change]);
23746
23748
  }
23747
23749
  for (const element of elements) {
23748
23750
  const changes2 = changesMap.get(element.id);
@@ -23757,24 +23759,24 @@ function applyChanges(changes, elements) {
23757
23759
  continue;
23758
23760
  }
23759
23761
  const updatedElement = { ...element };
23760
- for (const change2 of changes2)
23761
- applyChange(change2, updatedElement);
23762
+ for (const change of changes2)
23763
+ applyChange(change, updatedElement);
23762
23764
  updatedElements.push(updatedElement);
23763
23765
  }
23764
23766
  return updatedElements;
23765
23767
  }
23766
- function applyChange(change2, element) {
23767
- switch (change2.type) {
23768
+ function applyChange(change, element) {
23769
+ switch (change.type) {
23768
23770
  case "select": {
23769
- element.selected = change2.selected;
23771
+ element.selected = change.selected;
23770
23772
  break;
23771
23773
  }
23772
23774
  case "position": {
23773
- typeof change2.position < "u" && (element.position = change2.position), typeof change2.dragging < "u" && (element.dragging = change2.dragging);
23775
+ typeof change.position < "u" && (element.position = change.position), typeof change.dragging < "u" && (element.dragging = change.dragging);
23774
23776
  break;
23775
23777
  }
23776
23778
  case "dimensions": {
23777
- typeof change2.dimensions < "u" && (element.measured ??= {}, element.measured.width = change2.dimensions.width, element.measured.height = change2.dimensions.height, change2.setAttributes && (element.width = change2.dimensions.width, element.height = change2.dimensions.height)), typeof change2.resizing == "boolean" && (element.resizing = change2.resizing);
23779
+ typeof change.dimensions < "u" && (element.measured ??= {}, element.measured.width = change.dimensions.width, element.measured.height = change.dimensions.height, change.setAttributes && (element.width = change.dimensions.width, element.height = change.dimensions.height)), typeof change.resizing == "boolean" && (element.resizing = change.resizing);
23778
23780
  break;
23779
23781
  }
23780
23782
  }
@@ -25071,13 +25073,13 @@ const GraphView = reactExports.memo(GraphViewComponent), getInitialState = ({ no
25071
25073
  updateNodePositions: (nodeDragItems, dragging = !1) => {
25072
25074
  const parentExpandChildren = [], changes = [];
25073
25075
  for (const [id2, dragItem] of nodeDragItems) {
25074
- const change2 = {
25076
+ const change = {
25075
25077
  id: id2,
25076
25078
  type: "position",
25077
25079
  position: dragItem.position,
25078
25080
  dragging
25079
25081
  };
25080
- dragItem?.expandParent && dragItem?.parentId && change2.position && (parentExpandChildren.push({
25082
+ dragItem?.expandParent && dragItem?.parentId && change.position && (parentExpandChildren.push({
25081
25083
  id: id2,
25082
25084
  parentId: dragItem.parentId,
25083
25085
  rect: {
@@ -25085,7 +25087,7 @@ const GraphView = reactExports.memo(GraphViewComponent), getInitialState = ({ no
25085
25087
  width: dragItem.measured.width,
25086
25088
  height: dragItem.measured.height
25087
25089
  }
25088
- }), change2.position.x = Math.max(0, change2.position.x), change2.position.y = Math.max(0, change2.position.y)), changes.push(change2);
25090
+ }), change.position.x = Math.max(0, change.position.x), change.position.y = Math.max(0, change.position.y)), changes.push(change);
25089
25091
  }
25090
25092
  if (parentExpandChildren.length > 0) {
25091
25093
  const { nodeLookup, parentLookup } = get2(), parentExpandChanges = handleExpandParent(parentExpandChildren, nodeLookup, parentLookup);
@@ -25495,22 +25497,22 @@ function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle
25495
25497
  nodeOrigin
25496
25498
  };
25497
25499
  },
25498
- onChange: (change2, childChanges) => {
25499
- const { triggerNodeChanges, nodeLookup, parentLookup, nodeOrigin } = store.getState(), changes = [], nextPosition = { x: change2.x, y: change2.y }, node = nodeLookup.get(id2);
25500
+ onChange: (change, childChanges) => {
25501
+ const { triggerNodeChanges, nodeLookup, parentLookup, nodeOrigin } = store.getState(), changes = [], nextPosition = { x: change.x, y: change.y }, node = nodeLookup.get(id2);
25500
25502
  if (node && node.expandParent && node.parentId) {
25501
25503
  const child = {
25502
25504
  id: node.id,
25503
25505
  parentId: node.parentId,
25504
25506
  rect: {
25505
- width: change2.width ?? node.measured.width,
25506
- height: change2.height ?? node.measured.height,
25507
+ width: change.width ?? node.measured.width,
25508
+ height: change.height ?? node.measured.height,
25507
25509
  ...evaluateAbsolutePosition({
25508
- x: change2.x ?? node.position.x,
25509
- y: change2.y ?? node.position.y
25510
+ x: change.x ?? node.position.x,
25511
+ y: change.y ?? node.position.y
25510
25512
  }, node.parentId, nodeLookup, node.origin ?? nodeOrigin)
25511
25513
  }
25512
25514
  }, parentExpandChanges = handleExpandParent([child], nodeLookup, parentLookup, nodeOrigin);
25513
- changes.push(...parentExpandChanges), nextPosition.x = change2.x ? Math.max(0, change2.x) : void 0, nextPosition.y = change2.y ? Math.max(0, change2.y) : void 0;
25515
+ changes.push(...parentExpandChanges), nextPosition.x = change.x ? Math.max(0, change.x) : void 0, nextPosition.y = change.y ? Math.max(0, change.y) : void 0;
25514
25516
  }
25515
25517
  if (nextPosition.x !== void 0 && nextPosition.y !== void 0) {
25516
25518
  const positionChange = {
@@ -25520,15 +25522,15 @@ function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle
25520
25522
  };
25521
25523
  changes.push(positionChange);
25522
25524
  }
25523
- if (change2.width !== void 0 && change2.height !== void 0) {
25525
+ if (change.width !== void 0 && change.height !== void 0) {
25524
25526
  const dimensionChange = {
25525
25527
  id: id2,
25526
25528
  type: "dimensions",
25527
25529
  resizing: !0,
25528
25530
  setAttributes: !0,
25529
25531
  dimensions: {
25530
- width: change2.width,
25531
- height: change2.height
25532
+ width: change.width,
25533
+ height: change.height
25532
25534
  }
25533
25535
  };
25534
25536
  changes.push(dimensionChange);
@@ -25601,7 +25603,30 @@ function clsx() {
25601
25603
  (e2 = arguments[f2]) && (t2 = r(e2)) && (n2 && (n2 += " "), n2 += t2);
25602
25604
  return n2;
25603
25605
  }
25604
- var cssReactFlow = "_17jps3v0", cssDisablePan = "_17jps3v1", cssTransparentBg = "_17jps3v2", cssNoControls = "_17jps3v3";
25606
+ var keepAspectRatioContainer = "_17jps3v0", cssReactFlow = "_17jps3v1", cssDisablePan = "_17jps3v2", cssTransparentBg = "_17jps3v3", cssNoControls = "_17jps3v4";
25607
+ function KeepAspectRatioContainer({
25608
+ children: children2,
25609
+ width,
25610
+ height,
25611
+ enabled,
25612
+ className,
25613
+ style: style2,
25614
+ ...rest
25615
+ }) {
25616
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
25617
+ Box$1,
25618
+ {
25619
+ ...rest,
25620
+ className: clsx(keepAspectRatioContainer, className),
25621
+ style: enabled ? {
25622
+ ...style2,
25623
+ aspectRatio: `${Math.ceil(width)}/${Math.ceil(height)}`,
25624
+ maxHeight: Math.ceil(height)
25625
+ } : style2,
25626
+ children: children2
25627
+ }
25628
+ );
25629
+ }
25605
25630
  function EnsureMantine({ children: children2 }) {
25606
25631
  if (!reactExports.useContext(MantineContext))
25607
25632
  throw new Error("LikeC4Diagram must be a child of MantineProvider");
@@ -25916,10 +25941,6 @@ function useUpdateEffect$1(effect, deps) {
25916
25941
  const isFirstMount = useFirstMountState();
25917
25942
  reactExports.useEffect(isFirstMount ? noop$2 : effect, deps);
25918
25943
  }
25919
- function useDebouncedState(initialState2, delay2, maxWait = 0) {
25920
- const [state, setState] = reactExports.useState(initialState2);
25921
- return [state, useDebouncedCallback(setState, [], delay2, maxWait)];
25922
- }
25923
25944
  const noop$1 = () => {
25924
25945
  };
25925
25946
  function useUpdateEffect(callback, deps, equalityFn, effectHook) {
@@ -26067,396 +26088,6 @@ const blue$1 = {
26067
26088
  font: "Helvetica",
26068
26089
  shadow: "#0a0a0a"
26069
26090
  };
26070
- var safeStableStringify = { exports: {} };
26071
- (function(module, exports) {
26072
- const { hasOwnProperty: hasOwnProperty2 } = Object.prototype, stringify = configure();
26073
- stringify.configure = configure, stringify.stringify = stringify, stringify.default = stringify, exports.stringify = stringify, exports.configure = configure, module.exports = stringify;
26074
- const strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;
26075
- function strEscape(str) {
26076
- return str.length < 5e3 && !strEscapeSequencesRegExp.test(str) ? `"${str}"` : JSON.stringify(str);
26077
- }
26078
- function insertSort(array2) {
26079
- if (array2.length > 200)
26080
- return array2.sort();
26081
- for (let i2 = 1; i2 < array2.length; i2++) {
26082
- const currentValue = array2[i2];
26083
- let position = i2;
26084
- for (; position !== 0 && array2[position - 1] > currentValue; )
26085
- array2[position] = array2[position - 1], position--;
26086
- array2[position] = currentValue;
26087
- }
26088
- return array2;
26089
- }
26090
- const typedArrayPrototypeGetSymbolToStringTag = Object.getOwnPropertyDescriptor(
26091
- Object.getPrototypeOf(
26092
- Object.getPrototypeOf(
26093
- new Int8Array()
26094
- )
26095
- ),
26096
- Symbol.toStringTag
26097
- ).get;
26098
- function isTypedArrayWithEntries(value) {
26099
- return typedArrayPrototypeGetSymbolToStringTag.call(value) !== void 0 && value.length !== 0;
26100
- }
26101
- function stringifyTypedArray(array2, separator, maximumBreadth) {
26102
- array2.length < maximumBreadth && (maximumBreadth = array2.length);
26103
- const whitespace = separator === "," ? "" : " ";
26104
- let res = `"0":${whitespace}${array2[0]}`;
26105
- for (let i2 = 1; i2 < maximumBreadth; i2++)
26106
- res += `${separator}"${i2}":${whitespace}${array2[i2]}`;
26107
- return res;
26108
- }
26109
- function getCircularValueOption(options) {
26110
- if (hasOwnProperty2.call(options, "circularValue")) {
26111
- const circularValue = options.circularValue;
26112
- if (typeof circularValue == "string")
26113
- return `"${circularValue}"`;
26114
- if (circularValue == null)
26115
- return circularValue;
26116
- if (circularValue === Error || circularValue === TypeError)
26117
- return {
26118
- toString() {
26119
- throw new TypeError("Converting circular structure to JSON");
26120
- }
26121
- };
26122
- throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined');
26123
- }
26124
- return '"[Circular]"';
26125
- }
26126
- function getBooleanOption(options, key) {
26127
- let value;
26128
- if (hasOwnProperty2.call(options, key) && (value = options[key], typeof value != "boolean"))
26129
- throw new TypeError(`The "${key}" argument must be of type boolean`);
26130
- return value === void 0 ? !0 : value;
26131
- }
26132
- function getPositiveIntegerOption(options, key) {
26133
- let value;
26134
- if (hasOwnProperty2.call(options, key)) {
26135
- if (value = options[key], typeof value != "number")
26136
- throw new TypeError(`The "${key}" argument must be of type number`);
26137
- if (!Number.isInteger(value))
26138
- throw new TypeError(`The "${key}" argument must be an integer`);
26139
- if (value < 1)
26140
- throw new RangeError(`The "${key}" argument must be >= 1`);
26141
- }
26142
- return value === void 0 ? 1 / 0 : value;
26143
- }
26144
- function getItemCount(number2) {
26145
- return number2 === 1 ? "1 item" : `${number2} items`;
26146
- }
26147
- function getUniqueReplacerSet(replacerArray) {
26148
- const replacerSet = /* @__PURE__ */ new Set();
26149
- for (const value of replacerArray)
26150
- (typeof value == "string" || typeof value == "number") && replacerSet.add(String(value));
26151
- return replacerSet;
26152
- }
26153
- function getStrictOption(options) {
26154
- if (hasOwnProperty2.call(options, "strict")) {
26155
- const value = options.strict;
26156
- if (typeof value != "boolean")
26157
- throw new TypeError('The "strict" argument must be of type boolean');
26158
- if (value)
26159
- return (value2) => {
26160
- let message = `Object can not safely be stringified. Received type ${typeof value2}`;
26161
- throw typeof value2 != "function" && (message += ` (${value2.toString()})`), new Error(message);
26162
- };
26163
- }
26164
- }
26165
- function configure(options) {
26166
- options = { ...options };
26167
- const fail = getStrictOption(options);
26168
- fail && (options.bigint === void 0 && (options.bigint = !1), "circularValue" in options || (options.circularValue = Error));
26169
- const circularValue = getCircularValueOption(options), bigint = getBooleanOption(options, "bigint"), deterministic = getBooleanOption(options, "deterministic"), maximumDepth = getPositiveIntegerOption(options, "maximumDepth"), maximumBreadth = getPositiveIntegerOption(options, "maximumBreadth");
26170
- function stringifyFnReplacer(key, parent, stack, replacer, spacer, indentation) {
26171
- let value = parent[key];
26172
- switch (typeof value == "object" && value !== null && typeof value.toJSON == "function" && (value = value.toJSON(key)), value = replacer.call(parent, key, value), typeof value) {
26173
- case "string":
26174
- return strEscape(value);
26175
- case "object": {
26176
- if (value === null)
26177
- return "null";
26178
- if (stack.indexOf(value) !== -1)
26179
- return circularValue;
26180
- let res = "", join = ",";
26181
- const originalIndentation = indentation;
26182
- if (Array.isArray(value)) {
26183
- if (value.length === 0)
26184
- return "[]";
26185
- if (maximumDepth < stack.length + 1)
26186
- return '"[Array]"';
26187
- stack.push(value), spacer !== "" && (indentation += spacer, res += `
26188
- ${indentation}`, join = `,
26189
- ${indentation}`);
26190
- const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
26191
- let i2 = 0;
26192
- for (; i2 < maximumValuesToStringify - 1; i2++) {
26193
- const tmp2 = stringifyFnReplacer(String(i2), value, stack, replacer, spacer, indentation);
26194
- res += tmp2 !== void 0 ? tmp2 : "null", res += join;
26195
- }
26196
- const tmp = stringifyFnReplacer(String(i2), value, stack, replacer, spacer, indentation);
26197
- if (res += tmp !== void 0 ? tmp : "null", value.length - 1 > maximumBreadth) {
26198
- const removedKeys = value.length - maximumBreadth - 1;
26199
- res += `${join}"... ${getItemCount(removedKeys)} not stringified"`;
26200
- }
26201
- return spacer !== "" && (res += `
26202
- ${originalIndentation}`), stack.pop(), `[${res}]`;
26203
- }
26204
- let keys2 = Object.keys(value);
26205
- const keyLength = keys2.length;
26206
- if (keyLength === 0)
26207
- return "{}";
26208
- if (maximumDepth < stack.length + 1)
26209
- return '"[Object]"';
26210
- let whitespace = "", separator = "";
26211
- spacer !== "" && (indentation += spacer, join = `,
26212
- ${indentation}`, whitespace = " ");
26213
- const maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
26214
- deterministic && !isTypedArrayWithEntries(value) && (keys2 = insertSort(keys2)), stack.push(value);
26215
- for (let i2 = 0; i2 < maximumPropertiesToStringify; i2++) {
26216
- const key2 = keys2[i2], tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
26217
- tmp !== void 0 && (res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`, separator = join);
26218
- }
26219
- if (keyLength > maximumBreadth) {
26220
- const removedKeys = keyLength - maximumBreadth;
26221
- res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`, separator = join;
26222
- }
26223
- return spacer !== "" && separator.length > 1 && (res = `
26224
- ${indentation}${res}
26225
- ${originalIndentation}`), stack.pop(), `{${res}}`;
26226
- }
26227
- case "number":
26228
- return isFinite(value) ? String(value) : fail ? fail(value) : "null";
26229
- case "boolean":
26230
- return value === !0 ? "true" : "false";
26231
- case "undefined":
26232
- return;
26233
- case "bigint":
26234
- if (bigint)
26235
- return String(value);
26236
- default:
26237
- return fail ? fail(value) : void 0;
26238
- }
26239
- }
26240
- function stringifyArrayReplacer(key, value, stack, replacer, spacer, indentation) {
26241
- switch (typeof value == "object" && value !== null && typeof value.toJSON == "function" && (value = value.toJSON(key)), typeof value) {
26242
- case "string":
26243
- return strEscape(value);
26244
- case "object": {
26245
- if (value === null)
26246
- return "null";
26247
- if (stack.indexOf(value) !== -1)
26248
- return circularValue;
26249
- const originalIndentation = indentation;
26250
- let res = "", join = ",";
26251
- if (Array.isArray(value)) {
26252
- if (value.length === 0)
26253
- return "[]";
26254
- if (maximumDepth < stack.length + 1)
26255
- return '"[Array]"';
26256
- stack.push(value), spacer !== "" && (indentation += spacer, res += `
26257
- ${indentation}`, join = `,
26258
- ${indentation}`);
26259
- const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
26260
- let i2 = 0;
26261
- for (; i2 < maximumValuesToStringify - 1; i2++) {
26262
- const tmp2 = stringifyArrayReplacer(String(i2), value[i2], stack, replacer, spacer, indentation);
26263
- res += tmp2 !== void 0 ? tmp2 : "null", res += join;
26264
- }
26265
- const tmp = stringifyArrayReplacer(String(i2), value[i2], stack, replacer, spacer, indentation);
26266
- if (res += tmp !== void 0 ? tmp : "null", value.length - 1 > maximumBreadth) {
26267
- const removedKeys = value.length - maximumBreadth - 1;
26268
- res += `${join}"... ${getItemCount(removedKeys)} not stringified"`;
26269
- }
26270
- return spacer !== "" && (res += `
26271
- ${originalIndentation}`), stack.pop(), `[${res}]`;
26272
- }
26273
- stack.push(value);
26274
- let whitespace = "";
26275
- spacer !== "" && (indentation += spacer, join = `,
26276
- ${indentation}`, whitespace = " ");
26277
- let separator = "";
26278
- for (const key2 of replacer) {
26279
- const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
26280
- tmp !== void 0 && (res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`, separator = join);
26281
- }
26282
- return spacer !== "" && separator.length > 1 && (res = `
26283
- ${indentation}${res}
26284
- ${originalIndentation}`), stack.pop(), `{${res}}`;
26285
- }
26286
- case "number":
26287
- return isFinite(value) ? String(value) : fail ? fail(value) : "null";
26288
- case "boolean":
26289
- return value === !0 ? "true" : "false";
26290
- case "undefined":
26291
- return;
26292
- case "bigint":
26293
- if (bigint)
26294
- return String(value);
26295
- default:
26296
- return fail ? fail(value) : void 0;
26297
- }
26298
- }
26299
- function stringifyIndent(key, value, stack, spacer, indentation) {
26300
- switch (typeof value) {
26301
- case "string":
26302
- return strEscape(value);
26303
- case "object": {
26304
- if (value === null)
26305
- return "null";
26306
- if (typeof value.toJSON == "function") {
26307
- if (value = value.toJSON(key), typeof value != "object")
26308
- return stringifyIndent(key, value, stack, spacer, indentation);
26309
- if (value === null)
26310
- return "null";
26311
- }
26312
- if (stack.indexOf(value) !== -1)
26313
- return circularValue;
26314
- const originalIndentation = indentation;
26315
- if (Array.isArray(value)) {
26316
- if (value.length === 0)
26317
- return "[]";
26318
- if (maximumDepth < stack.length + 1)
26319
- return '"[Array]"';
26320
- stack.push(value), indentation += spacer;
26321
- let res2 = `
26322
- ${indentation}`;
26323
- const join2 = `,
26324
- ${indentation}`, maximumValuesToStringify = Math.min(value.length, maximumBreadth);
26325
- let i2 = 0;
26326
- for (; i2 < maximumValuesToStringify - 1; i2++) {
26327
- const tmp2 = stringifyIndent(String(i2), value[i2], stack, spacer, indentation);
26328
- res2 += tmp2 !== void 0 ? tmp2 : "null", res2 += join2;
26329
- }
26330
- const tmp = stringifyIndent(String(i2), value[i2], stack, spacer, indentation);
26331
- if (res2 += tmp !== void 0 ? tmp : "null", value.length - 1 > maximumBreadth) {
26332
- const removedKeys = value.length - maximumBreadth - 1;
26333
- res2 += `${join2}"... ${getItemCount(removedKeys)} not stringified"`;
26334
- }
26335
- return res2 += `
26336
- ${originalIndentation}`, stack.pop(), `[${res2}]`;
26337
- }
26338
- let keys2 = Object.keys(value);
26339
- const keyLength = keys2.length;
26340
- if (keyLength === 0)
26341
- return "{}";
26342
- if (maximumDepth < stack.length + 1)
26343
- return '"[Object]"';
26344
- indentation += spacer;
26345
- const join = `,
26346
- ${indentation}`;
26347
- let res = "", separator = "", maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
26348
- isTypedArrayWithEntries(value) && (res += stringifyTypedArray(value, join, maximumBreadth), keys2 = keys2.slice(value.length), maximumPropertiesToStringify -= value.length, separator = join), deterministic && (keys2 = insertSort(keys2)), stack.push(value);
26349
- for (let i2 = 0; i2 < maximumPropertiesToStringify; i2++) {
26350
- const key2 = keys2[i2], tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
26351
- tmp !== void 0 && (res += `${separator}${strEscape(key2)}: ${tmp}`, separator = join);
26352
- }
26353
- if (keyLength > maximumBreadth) {
26354
- const removedKeys = keyLength - maximumBreadth;
26355
- res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`, separator = join;
26356
- }
26357
- return separator !== "" && (res = `
26358
- ${indentation}${res}
26359
- ${originalIndentation}`), stack.pop(), `{${res}}`;
26360
- }
26361
- case "number":
26362
- return isFinite(value) ? String(value) : fail ? fail(value) : "null";
26363
- case "boolean":
26364
- return value === !0 ? "true" : "false";
26365
- case "undefined":
26366
- return;
26367
- case "bigint":
26368
- if (bigint)
26369
- return String(value);
26370
- default:
26371
- return fail ? fail(value) : void 0;
26372
- }
26373
- }
26374
- function stringifySimple(key, value, stack) {
26375
- switch (typeof value) {
26376
- case "string":
26377
- return strEscape(value);
26378
- case "object": {
26379
- if (value === null)
26380
- return "null";
26381
- if (typeof value.toJSON == "function") {
26382
- if (value = value.toJSON(key), typeof value != "object")
26383
- return stringifySimple(key, value, stack);
26384
- if (value === null)
26385
- return "null";
26386
- }
26387
- if (stack.indexOf(value) !== -1)
26388
- return circularValue;
26389
- let res = "";
26390
- if (Array.isArray(value)) {
26391
- if (value.length === 0)
26392
- return "[]";
26393
- if (maximumDepth < stack.length + 1)
26394
- return '"[Array]"';
26395
- stack.push(value);
26396
- const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
26397
- let i2 = 0;
26398
- for (; i2 < maximumValuesToStringify - 1; i2++) {
26399
- const tmp2 = stringifySimple(String(i2), value[i2], stack);
26400
- res += tmp2 !== void 0 ? tmp2 : "null", res += ",";
26401
- }
26402
- const tmp = stringifySimple(String(i2), value[i2], stack);
26403
- if (res += tmp !== void 0 ? tmp : "null", value.length - 1 > maximumBreadth) {
26404
- const removedKeys = value.length - maximumBreadth - 1;
26405
- res += `,"... ${getItemCount(removedKeys)} not stringified"`;
26406
- }
26407
- return stack.pop(), `[${res}]`;
26408
- }
26409
- let keys2 = Object.keys(value);
26410
- const keyLength = keys2.length;
26411
- if (keyLength === 0)
26412
- return "{}";
26413
- if (maximumDepth < stack.length + 1)
26414
- return '"[Object]"';
26415
- let separator = "", maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
26416
- isTypedArrayWithEntries(value) && (res += stringifyTypedArray(value, ",", maximumBreadth), keys2 = keys2.slice(value.length), maximumPropertiesToStringify -= value.length, separator = ","), deterministic && (keys2 = insertSort(keys2)), stack.push(value);
26417
- for (let i2 = 0; i2 < maximumPropertiesToStringify; i2++) {
26418
- const key2 = keys2[i2], tmp = stringifySimple(key2, value[key2], stack);
26419
- tmp !== void 0 && (res += `${separator}${strEscape(key2)}:${tmp}`, separator = ",");
26420
- }
26421
- if (keyLength > maximumBreadth) {
26422
- const removedKeys = keyLength - maximumBreadth;
26423
- res += `${separator}"...":"${getItemCount(removedKeys)} not stringified"`;
26424
- }
26425
- return stack.pop(), `{${res}}`;
26426
- }
26427
- case "number":
26428
- return isFinite(value) ? String(value) : fail ? fail(value) : "null";
26429
- case "boolean":
26430
- return value === !0 ? "true" : "false";
26431
- case "undefined":
26432
- return;
26433
- case "bigint":
26434
- if (bigint)
26435
- return String(value);
26436
- default:
26437
- return fail ? fail(value) : void 0;
26438
- }
26439
- }
26440
- function stringify2(value, replacer, space) {
26441
- if (arguments.length > 1) {
26442
- let spacer = "";
26443
- if (typeof space == "number" ? spacer = " ".repeat(Math.min(space, 10)) : typeof space == "string" && (spacer = space.slice(0, 10)), replacer != null) {
26444
- if (typeof replacer == "function")
26445
- return stringifyFnReplacer("", { "": value }, [], replacer, spacer, "");
26446
- if (Array.isArray(replacer))
26447
- return stringifyArrayReplacer("", value, [], getUniqueReplacerSet(replacer), spacer, "");
26448
- }
26449
- if (spacer.length !== 0)
26450
- return stringifyIndent("", value, [], spacer, "");
26451
- }
26452
- return stringifySimple("", value, []);
26453
- }
26454
- return stringify2;
26455
- }
26456
- })(safeStableStringify, safeStableStringify.exports);
26457
- var safeStableStringifyExports = safeStableStringify.exports;
26458
- const cjsModule = /* @__PURE__ */ getDefaultExportFromCjs(safeStableStringifyExports);
26459
- cjsModule.configure;
26460
26091
  function fixProto(target, prototype) {
26461
26092
  var setPrototypeOf = Object.setPrototypeOf;
26462
26093
  setPrototypeOf ? setPrototypeOf(target, prototype) : target.__proto__ = prototype;
@@ -26665,8 +26296,7 @@ class NonExhaustiveError extends BaseError {
26665
26296
  }
26666
26297
  }
26667
26298
  function nonexhaustive(value) {
26668
- const val = typeof value == "string" ? value : cjsModule(value);
26669
- throw new NonExhaustiveError(`NonExhaustive value: ${val}`);
26299
+ throw new NonExhaustiveError(`NonExhaustive value: ${value}`);
26670
26300
  }
26671
26301
  const ElementShapes = [
26672
26302
  "rectangle",
@@ -27266,9 +26896,9 @@ class Solver {
27266
26896
  * Update the values of the variables.
27267
26897
  */
27268
26898
  updateVariables() {
27269
- let vars2 = this._varMap, rows = this._rowMap;
27270
- for (let i2 = 0, n2 = vars2.size(); i2 < n2; ++i2) {
27271
- let pair = vars2.itemAt(i2), rowPair = rows.find(pair.second);
26899
+ let vars = this._varMap, rows = this._rowMap;
26900
+ for (let i2 = 0, n2 = vars.size(); i2 < n2; ++i2) {
26901
+ let pair = vars.itemAt(i2), rowPair = rows.find(pair.second);
27272
26902
  rowPair !== void 0 ? pair.first.setValue(rowPair.second.constant()) : pair.first.setValue(0);
27273
26903
  }
27274
26904
  }
@@ -28165,6 +27795,7 @@ const trackedConnections = /* @__PURE__ */ new Map(), getTrackedConnectionState
28165
27795
  initialized: !1,
28166
27796
  previousViews: [],
28167
27797
  viewportChanged: !1,
27798
+ focusedNodeId: null,
28168
27799
  hoveredNodeId: null,
28169
27800
  hoveredEdgeId: null,
28170
27801
  lastClickedNodeId: null,
@@ -28194,6 +27825,7 @@ function createDiagramStore(props) {
28194
27825
  view: currentView,
28195
27826
  lastOnNavigate,
28196
27827
  previousViews,
27828
+ focusedNodeId,
28197
27829
  lastClickedNodeId,
28198
27830
  lastClickedEdgeId,
28199
27831
  hoveredEdgeId,
@@ -28201,7 +27833,7 @@ function createDiagramStore(props) {
28201
27833
  } = get2();
28202
27834
  if (shallowEqual(currentView, view))
28203
27835
  return;
28204
- lastOnNavigate && lastOnNavigate.toView !== view.id && lastOnNavigate.fromView !== view.id && (lastOnNavigate = null), currentView.id === view.id ? (lastClickedNodeId && !containsWithId(view.nodes, lastClickedNodeId) && (lastClickedNodeId = null), hoveredNodeId && !containsWithId(view.nodes, hoveredNodeId) && (hoveredNodeId = null), lastClickedEdgeId && !containsWithId(view.edges, lastClickedEdgeId) && (lastClickedEdgeId = null), hoveredEdgeId && !containsWithId(view.edges, hoveredEdgeId) && (hoveredEdgeId = null)) : (lastClickedEdgeId = null, lastClickedNodeId = null, hoveredEdgeId = null, hoveredNodeId = null, previousViews = [
27836
+ lastOnNavigate && lastOnNavigate.toView !== view.id && lastOnNavigate.fromView !== view.id && (lastOnNavigate = null), currentView.id === view.id ? (lastClickedNodeId && !containsWithId(view.nodes, lastClickedNodeId) && (lastClickedNodeId = null), hoveredNodeId && !containsWithId(view.nodes, hoveredNodeId) && (hoveredNodeId = null), focusedNodeId && !containsWithId(view.nodes, focusedNodeId) && (focusedNodeId = null), lastClickedEdgeId && !containsWithId(view.edges, lastClickedEdgeId) && (lastClickedEdgeId = null), hoveredEdgeId && !containsWithId(view.edges, hoveredEdgeId) && (hoveredEdgeId = null)) : (lastClickedEdgeId = null, lastClickedNodeId = null, hoveredEdgeId = null, hoveredNodeId = null, focusedNodeId = null, previousViews = [
28205
27837
  currentView,
28206
27838
  ...previousViews.filter((v2) => v2.id !== view.id && v2.id !== currentView.id)
28207
27839
  ]), set2(
@@ -28211,6 +27843,7 @@ function createDiagramStore(props) {
28211
27843
  previousViews,
28212
27844
  lastClickedNodeId,
28213
27845
  lastClickedEdgeId,
27846
+ focusedNodeId,
28214
27847
  hoveredEdgeId,
28215
27848
  hoveredNodeId
28216
27849
  },
@@ -28236,18 +27869,18 @@ function createDiagramStore(props) {
28236
27869
  },
28237
27870
  triggerOnChange: (changes) => {
28238
27871
  const newShapes = /* @__PURE__ */ new Map(), newColor = /* @__PURE__ */ new Map();
28239
- for (const change2 of changes) {
28240
- if (change2.op === "change-shape") {
28241
- for (const target of change2.targets)
28242
- newShapes.set(target, change2.shape);
27872
+ for (const change of changes) {
27873
+ if (change.op === "change-shape") {
27874
+ for (const target of change.targets)
27875
+ newShapes.set(target, change.shape);
28243
27876
  continue;
28244
27877
  }
28245
- if (change2.op === "change-color") {
28246
- for (const target of change2.targets)
28247
- newColor.set(target, change2.color);
27878
+ if (change.op === "change-color") {
27879
+ for (const target of change.targets)
27880
+ newColor.set(target, change.color);
28248
27881
  continue;
28249
27882
  }
28250
- nonexhaustive(change2);
27883
+ nonexhaustive(change);
28251
27884
  }
28252
27885
  get2().xyflow.setNodes(
28253
27886
  (nodes) => nodes.map((node) => {
@@ -28304,15 +27937,16 @@ function createDiagramStore(props) {
28304
27937
  xynode.internals.userNode
28305
27938
  );
28306
27939
  },
28307
- fitDiagram: () => {
28308
- const { fitViewPadding, xyflow } = get2();
27940
+ fitDiagram: (centerNode) => {
27941
+ const { fitViewPadding, xyflow, focusedNodeId } = get2();
28309
27942
  xyflow.fitView({
28310
27943
  includeHiddenNodes: !0,
28311
- duration: 400,
28312
- padding: fitViewPadding,
27944
+ duration: centerNode && focusedNodeId ? 300 : 400,
27945
+ padding: centerNode ? 0 : fitViewPadding,
28313
27946
  minZoom: MinZoom,
28314
- maxZoom: 1
28315
- });
27947
+ maxZoom: 1,
27948
+ ...centerNode && { nodes: [centerNode] }
27949
+ }), centerNode && focusedNodeId !== centerNode.id && set2({ focusedNodeId: centerNode.id }, noReplace, "focus node"), !centerNode && focusedNodeId && set2({ focusedNodeId: null }, noReplace, "unfocus");
28316
27950
  }
28317
27951
  }),
28318
27952
  {
@@ -28343,30 +27977,6 @@ function DiagramContextProvider({ children: children2, view, ...props }) {
28343
27977
  [props]
28344
27978
  ), /* @__PURE__ */ jsxRuntimeExports.jsx(DiagramContext.Provider, { value: store.current, children: children2 });
28345
27979
  }
28346
- var wrapper = "fe2aoi0";
28347
- function KeepAspectRatio({
28348
- children: children2,
28349
- width,
28350
- height,
28351
- enabled,
28352
- className,
28353
- style: style2,
28354
- ...rest
28355
- }) {
28356
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
28357
- Box$1,
28358
- {
28359
- ...rest,
28360
- className: clsx(wrapper, className),
28361
- style: enabled ? {
28362
- ...style2,
28363
- aspectRatio: `${Math.ceil(width)}/${Math.ceil(height)}`,
28364
- maxHeight: Math.ceil(height)
28365
- } : style2,
28366
- children: children2
28367
- }
28368
- );
28369
- }
28370
27980
  const MotionConfigContext = reactExports.createContext({
28371
27981
  transformPagePoint: (p2) => p2,
28372
27982
  isStatic: !1,
@@ -28708,17 +28318,17 @@ const checkStringStartsWith = (token) => (key) => typeof key == "string" && key.
28708
28318
  }, alpha = {
28709
28319
  ...number,
28710
28320
  transform: (v2) => clamp(0, 1, v2)
28711
- }, scale$2 = {
28321
+ }, scale = {
28712
28322
  ...number,
28713
28323
  default: 1
28714
28324
  }, sanitize = (v2) => Math.round(v2 * 1e5) / 1e5, floatRegex = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu, colorRegex = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu, singleColorRegex = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;
28715
28325
  function isString(v2) {
28716
28326
  return typeof v2 == "string";
28717
28327
  }
28718
- const createUnitType = (unit2) => ({
28719
- test: (v2) => isString(v2) && v2.endsWith(unit2) && v2.split(" ").length === 1,
28328
+ const createUnitType = (unit) => ({
28329
+ test: (v2) => isString(v2) && v2.endsWith(unit) && v2.split(" ").length === 1,
28720
28330
  parse: parseFloat,
28721
- transform: (v2) => `${v2}${unit2}`
28331
+ transform: (v2) => `${v2}${unit}`
28722
28332
  }), degrees = createUnitType("deg"), percent = createUnitType("%"), px = createUnitType("px"), vh = createUnitType("vh"), vw = createUnitType("vw"), progressPercentage = {
28723
28333
  ...percent,
28724
28334
  parse: (v2) => percent.parse(v2) / 100,
@@ -28765,10 +28375,10 @@ const createUnitType = (unit2) => ({
28765
28375
  rotateX: degrees,
28766
28376
  rotateY: degrees,
28767
28377
  rotateZ: degrees,
28768
- scale: scale$2,
28769
- scaleX: scale$2,
28770
- scaleY: scale$2,
28771
- scaleZ: scale$2,
28378
+ scale,
28379
+ scaleX: scale,
28380
+ scaleY: scale,
28381
+ scaleZ: scale,
28772
28382
  skew: degrees,
28773
28383
  skewX: degrees,
28774
28384
  skewY: degrees,
@@ -28795,12 +28405,12 @@ const createUnitType = (unit2) => ({
28795
28405
  numOctaves: int
28796
28406
  };
28797
28407
  function buildHTMLStyles(state, latestValues, options, transformTemplate) {
28798
- const { style: style2, vars: vars2, transform: transform2, transformOrigin } = state;
28408
+ const { style: style2, vars, transform: transform2, transformOrigin } = state;
28799
28409
  let hasTransform2 = !1, hasTransformOrigin = !1, transformIsNone = !0;
28800
28410
  for (const key in latestValues) {
28801
28411
  const value = latestValues[key];
28802
28412
  if (isCSSVariableName(key)) {
28803
- vars2[key] = value;
28413
+ vars[key] = value;
28804
28414
  continue;
28805
28415
  }
28806
28416
  const valueType = numberValueTypes[key], valueAsType = getValueAsType(value, valueType);
@@ -28958,10 +28568,10 @@ function createUseRender(forwardMotionProps = !1) {
28958
28568
  });
28959
28569
  };
28960
28570
  }
28961
- function renderHTML(element, { style: style2, vars: vars2 }, styleProp, projection) {
28571
+ function renderHTML(element, { style: style2, vars }, styleProp, projection) {
28962
28572
  Object.assign(element.style, style2, projection && projection.getProjectionStyles(styleProp));
28963
- for (const key in vars2)
28964
- element.style.setProperty(key, vars2[key]);
28573
+ for (const key in vars)
28574
+ element.style.setProperty(key, vars[key]);
28965
28575
  }
28966
28576
  const camelCaseAttributes = /* @__PURE__ */ new Set([
28967
28577
  "baseFrequency",
@@ -29009,8 +28619,22 @@ function scrapeMotionValuesFromProps(props, prevProps, visualElement) {
29009
28619
  }
29010
28620
  return newValues;
29011
28621
  }
29012
- function resolveVariantFromProps(props, definition, custom, currentValues = {}, currentVelocity = {}) {
29013
- return typeof definition == "function" && (definition = definition(custom !== void 0 ? custom : props.custom, currentValues, currentVelocity)), typeof definition == "string" && (definition = props.variants && props.variants[definition]), typeof definition == "function" && (definition = definition(custom !== void 0 ? custom : props.custom, currentValues, currentVelocity)), definition;
28622
+ function getValueState(visualElement) {
28623
+ const state = [{}, {}];
28624
+ return visualElement?.values.forEach((value, key) => {
28625
+ state[0][key] = value.get(), state[1][key] = value.getVelocity();
28626
+ }), state;
28627
+ }
28628
+ function resolveVariantFromProps(props, definition, custom, visualElement) {
28629
+ if (typeof definition == "function") {
28630
+ const [current, velocity] = getValueState(visualElement);
28631
+ definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
28632
+ }
28633
+ if (typeof definition == "string" && (definition = props.variants && props.variants[definition]), typeof definition == "function") {
28634
+ const [current, velocity] = getValueState(visualElement);
28635
+ definition = definition(custom !== void 0 ? custom : props.custom, current, velocity);
28636
+ }
28637
+ return definition;
29014
28638
  }
29015
28639
  function useConstant(init2) {
29016
28640
  const ref = reactExports.useRef(null);
@@ -29154,7 +28778,7 @@ function addHoverEvent(node, isActive) {
29154
28778
  const props = node.getProps();
29155
28779
  node.animationState && props.whileHover && node.animationState.setActive("whileHover", isActive);
29156
28780
  const callback = props[callbackName];
29157
- callback && callback(event, info);
28781
+ callback && frame.postRender(() => callback(event, info));
29158
28782
  };
29159
28783
  return addPointerEvent(node.current, eventName, handleEvent, {
29160
28784
  passive: !node.getProps()[callbackName]
@@ -29205,8 +28829,8 @@ class PressGesture extends Feature {
29205
28829
  const props = this.node.getProps(), removePointerUpListener = addPointerEvent(window, "pointerup", (endEvent, endInfo) => {
29206
28830
  if (!this.checkPressEnd())
29207
28831
  return;
29208
- const { onTap, onTapCancel, globalTapTarget } = this.node.getProps();
29209
- !globalTapTarget && !isNodeOrChild(this.node.current, endEvent.target) ? onTapCancel && onTapCancel(endEvent, endInfo) : onTap && onTap(endEvent, endInfo);
28832
+ const { onTap, onTapCancel, globalTapTarget } = this.node.getProps(), handler = !globalTapTarget && !isNodeOrChild(this.node.current, endEvent.target) ? onTapCancel : onTap;
28833
+ handler && frame.update(() => handler(endEvent, endInfo));
29210
28834
  }, {
29211
28835
  passive: !(props.onTap || props.onPointerUp)
29212
28836
  }), removePointerCancelListener = addPointerEvent(window, "pointercancel", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo), {
@@ -29220,7 +28844,7 @@ class PressGesture extends Feature {
29220
28844
  const handleKeyup = (keyupEvent) => {
29221
28845
  keyupEvent.key !== "Enter" || !this.checkPressEnd() || fireSyntheticPointerEvent("up", (event, info) => {
29222
28846
  const { onTap } = this.node.getProps();
29223
- onTap && onTap(event, info);
28847
+ onTap && frame.postRender(() => onTap(event, info));
29224
28848
  });
29225
28849
  };
29226
28850
  this.removeEndListeners(), this.removeEndListeners = addDomEvent(this.node.current, "keyup", handleKeyup), fireSyntheticPointerEvent("down", (event, info) => {
@@ -29235,7 +28859,7 @@ class PressGesture extends Feature {
29235
28859
  startPress(event, info) {
29236
28860
  this.isPressing = !0;
29237
28861
  const { onTapStart, whileTap } = this.node.getProps();
29238
- whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !0), onTapStart && onTapStart(event, info);
28862
+ whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !0), onTapStart && frame.postRender(() => onTapStart(event, info));
29239
28863
  }
29240
28864
  checkPressEnd() {
29241
28865
  return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !isDragActive();
@@ -29244,7 +28868,7 @@ class PressGesture extends Feature {
29244
28868
  if (!this.checkPressEnd())
29245
28869
  return;
29246
28870
  const { onTapCancel } = this.node.getProps();
29247
- onTapCancel && onTapCancel(event, info);
28871
+ onTapCancel && frame.postRender(() => onTapCancel(event, info));
29248
28872
  }
29249
28873
  mount() {
29250
28874
  const props = this.node.getProps(), removePointerListener = addPointerEvent(props.globalTapTarget ? window : this.node.current, "pointerdown", this.startPointerPress, {
@@ -29338,17 +28962,9 @@ function shallowCompare(next, prev) {
29338
28962
  return !1;
29339
28963
  return !0;
29340
28964
  }
29341
- function getCurrent(visualElement) {
29342
- const current = {};
29343
- return visualElement.values.forEach((value, key) => current[key] = value.get()), current;
29344
- }
29345
- function getVelocity$1(visualElement) {
29346
- const velocity = {};
29347
- return visualElement.values.forEach((value, key) => velocity[key] = value.getVelocity()), velocity;
29348
- }
29349
28965
  function resolveVariant(visualElement, definition, custom) {
29350
28966
  const props = visualElement.getProps();
29351
- return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, getCurrent(visualElement), getVelocity$1(visualElement));
28967
+ return resolveVariantFromProps(props, definition, custom !== void 0 ? custom : props.custom, visualElement);
29352
28968
  }
29353
28969
  const secondsToMilliseconds = (seconds) => seconds * 1e3, millisecondsToSeconds = (milliseconds) => milliseconds / 1e3, underDampedSpring = {
29354
28970
  type: "spring",
@@ -29619,9 +29235,9 @@ function applyDefaultFilter(v2) {
29619
29235
  const [number2] = value.match(floatRegex) || [];
29620
29236
  if (!number2)
29621
29237
  return v2;
29622
- const unit2 = value.replace(number2, "");
29238
+ const unit = value.replace(number2, "");
29623
29239
  let defaultValue = maxDefaults.has(name) ? 1 : 0;
29624
- return number2 !== value && (defaultValue *= 100), name + "(" + defaultValue + unit2 + ")";
29240
+ return number2 !== value && (defaultValue *= 100), name + "(" + defaultValue + unit + ")";
29625
29241
  }
29626
29242
  const functionRegex = /\b([a-z-]*)\(.*?\)/gu, filter = {
29627
29243
  ...complex,
@@ -29650,10 +29266,13 @@ function getAnimatableNone(key, value) {
29650
29266
  let defaultValueType = getDefaultValueType(key);
29651
29267
  return defaultValueType !== filter && (defaultValueType = complex), defaultValueType.getAnimatableNone ? defaultValueType.getAnimatableNone(value) : void 0;
29652
29268
  }
29269
+ const invalidTemplates = /* @__PURE__ */ new Set(["auto", "none", "0"]);
29653
29270
  function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {
29654
29271
  let i2 = 0, animatableTemplate;
29655
- for (; i2 < unresolvedKeyframes.length && !animatableTemplate; )
29656
- typeof unresolvedKeyframes[i2] == "string" && unresolvedKeyframes[i2] !== "none" && unresolvedKeyframes[i2] !== "0" && (animatableTemplate = unresolvedKeyframes[i2]), i2++;
29272
+ for (; i2 < unresolvedKeyframes.length && !animatableTemplate; ) {
29273
+ const keyframe = unresolvedKeyframes[i2];
29274
+ typeof keyframe == "string" && !invalidTemplates.has(keyframe) && analyseComplexValue(keyframe).values.length && (animatableTemplate = unresolvedKeyframes[i2]), i2++;
29275
+ }
29657
29276
  if (animatableTemplate && name)
29658
29277
  for (const noneIndex of noneKeyframeIndexes)
29659
29278
  unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);
@@ -29674,8 +29293,8 @@ class DOMKeyframesResolver extends KeyframeResolver {
29674
29293
  resolved !== void 0 && (unresolvedKeyframes[i2] = resolved), i2 === unresolvedKeyframes.length - 1 && (this.finalKeyframe = keyframe);
29675
29294
  }
29676
29295
  }
29677
- if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2)
29678
- return this.resolveNoneKeyframes();
29296
+ if (this.resolveNoneKeyframes(), !positionalKeys.has(name) || unresolvedKeyframes.length !== 2)
29297
+ return;
29679
29298
  const [origin, target] = unresolvedKeyframes, originType = findDimensionValueType(origin), targetType = findDimensionValueType(target);
29680
29299
  if (originType !== targetType)
29681
29300
  if (isNumOrPxType(originType) && isNumOrPxType(targetType))
@@ -29732,6 +29351,8 @@ function canAnimate(keyframes2, name, type, velocity) {
29732
29351
  const originKeyframe = keyframes2[0];
29733
29352
  if (originKeyframe === null)
29734
29353
  return !1;
29354
+ if (name === "display" || name === "visibility")
29355
+ return !0;
29735
29356
  const targetKeyframe = keyframes2[keyframes2.length - 1], isOriginAnimatable = isAnimatable(originKeyframe, name), isTargetAnimatable = isAnimatable(targetKeyframe, name);
29736
29357
  return !isOriginAnimatable || !isTargetAnimatable ? !1 : hasKeyframesChanged(keyframes2) || type === "spring" && velocity;
29737
29358
  }
@@ -30005,7 +29626,10 @@ function asRGBA(color2) {
30005
29626
  const mixColor = (from, to) => {
30006
29627
  const fromRGBA = asRGBA(from), toRGBA = asRGBA(to), blended = { ...fromRGBA };
30007
29628
  return (v2) => (blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v2), blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v2), blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v2), blended.alpha = mixNumber$1(fromRGBA.alpha, toRGBA.alpha, v2), rgba.transform(blended));
30008
- };
29629
+ }, invisibleValues = /* @__PURE__ */ new Set(["none", "hidden"]);
29630
+ function mixVisibility(origin, target) {
29631
+ return invisibleValues.has(origin) ? (p2) => p2 <= 0 ? origin : target : (p2) => p2 >= 1 ? target : origin;
29632
+ }
30009
29633
  function mixImmediate(a, b2) {
30010
29634
  return (p2) => p2 > 0 ? b2 : a;
30011
29635
  }
@@ -30044,7 +29668,7 @@ function matchOrder(origin, target) {
30044
29668
  }
30045
29669
  const mixComplex = (origin, target) => {
30046
29670
  const template = complex.createTransformer(target), originStats = analyseComplexValue(origin), targetStats = analyseComplexValue(target);
30047
- return originStats.indexes.var.length === targetStats.indexes.var.length && originStats.indexes.color.length === targetStats.indexes.color.length && originStats.indexes.number.length >= targetStats.indexes.number.length ? pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template) : mixImmediate(origin, target);
29671
+ return originStats.indexes.var.length === targetStats.indexes.var.length && originStats.indexes.color.length === targetStats.indexes.color.length && originStats.indexes.number.length >= targetStats.indexes.number.length ? invisibleValues.has(origin) && !targetStats.values.length || invisibleValues.has(target) && !originStats.values.length ? mixVisibility(origin, target) : pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template) : mixImmediate(origin, target);
30048
29672
  };
30049
29673
  function mix(from, to, p2) {
30050
29674
  return typeof from == "number" && typeof to == "number" && typeof p2 == "number" ? mixNumber$1(from, to, p2) : getMixer(from)(from, to);
@@ -30550,13 +30174,13 @@ class MotionValue {
30550
30174
  * @internal
30551
30175
  */
30552
30176
  constructor(init2, options = {}) {
30553
- this.version = "11.1.7", this.canTrackVelocity = !1, this.events = {}, this.updateAndNotify = (v2, render = !0) => {
30177
+ this.version = "11.2.4", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (v2, render = !0) => {
30554
30178
  const currentTime = time.now();
30555
30179
  this.updatedAt !== currentTime && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(v2), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), render && this.events.renderRequest && this.events.renderRequest.notify(this.current);
30556
- }, this.hasAnimated = !1, this.setCurrent(init2), this.canTrackVelocity = isFloat(this.current), this.owner = options.owner;
30180
+ }, this.hasAnimated = !1, this.setCurrent(init2), this.owner = options.owner;
30557
30181
  }
30558
30182
  setCurrent(current) {
30559
- this.current = current, this.updatedAt = time.now();
30183
+ this.current = current, this.updatedAt = time.now(), this.canTrackVelocity === null && current !== void 0 && (this.canTrackVelocity = isFloat(this.current));
30560
30184
  }
30561
30185
  setPrevFrameValue(prevFrameValue = this.current) {
30562
30186
  this.prevFrameValue = prevFrameValue, this.prevUpdatedAt = this.updatedAt;
@@ -30772,7 +30396,7 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
30772
30396
  if (window.HandoffAppearAnimations) {
30773
30397
  const appearId = visualElement.getProps()[optimizedAppearDataAttribute];
30774
30398
  if (appearId) {
30775
- const elapsed = window.HandoffAppearAnimations(appearId, key);
30399
+ const elapsed = window.HandoffAppearAnimations(appearId, key, value, frame);
30776
30400
  elapsed !== null && (valueTransition.elapsed = elapsed, isHandoff = !0);
30777
30401
  }
30778
30402
  }
@@ -31274,7 +30898,7 @@ class VisualElementDragControls {
31274
30898
  }
31275
30899
  }
31276
30900
  this.originPoint[axis] = current;
31277
- }), onDragStart && onDragStart(event, info);
30901
+ }), onDragStart && frame.postRender(() => onDragStart(event, info));
31278
30902
  const { animationState } = this.visualElement;
31279
30903
  animationState && animationState.setActive("whileDrag", !0);
31280
30904
  }, onMove = (event, info) => {
@@ -31310,7 +30934,7 @@ class VisualElementDragControls {
31310
30934
  const { velocity } = info;
31311
30935
  this.startAnimation(velocity);
31312
30936
  const { onDragEnd } = this.getProps();
31313
- onDragEnd && onDragEnd(event, info);
30937
+ onDragEnd && frame.postRender(() => onDragEnd(event, info));
31314
30938
  }
31315
30939
  cancel() {
31316
30940
  this.isDragging = !1;
@@ -31492,7 +31116,7 @@ class DragGesture extends Feature {
31492
31116
  }
31493
31117
  }
31494
31118
  const asyncHandler = (handler) => (event, info) => {
31495
- handler && handler(event, info);
31119
+ handler && frame.postRender(() => handler(event, info));
31496
31120
  };
31497
31121
  class PanGesture extends Feature {
31498
31122
  constructor() {
@@ -31511,7 +31135,7 @@ class PanGesture extends Feature {
31511
31135
  onStart: asyncHandler(onPanStart),
31512
31136
  onMove: onPan,
31513
31137
  onEnd: (event, info) => {
31514
- delete this.session, onPanEnd && onPanEnd(event, info);
31138
+ delete this.session, onPanEnd && frame.postRender(() => onPanEnd(event, info));
31515
31139
  }
31516
31140
  };
31517
31141
  }
@@ -32652,8 +32276,8 @@ class DOMVisualElement extends VisualElement {
32652
32276
  getBaseTargetFromProps(props, key) {
32653
32277
  return props.style ? props.style[key] : void 0;
32654
32278
  }
32655
- removeValueFromRenderState(key, { vars: vars2, style: style2 }) {
32656
- delete vars2[key], delete style2[key];
32279
+ removeValueFromRenderState(key, { vars, style: style2 }) {
32280
+ delete vars[key], delete style2[key];
32657
32281
  }
32658
32282
  }
32659
32283
  function getComputedStyle$1(element) {
@@ -33131,10 +32755,10 @@ function diagramViewToXYFlowData(view, opts) {
33131
32755
  initialHeight: node.height, */
33132
32756
  width: node.width,
33133
32757
  height: node.height,
33134
- measured: {
33135
- width: node.width,
33136
- height: node.height
33137
- },
32758
+ // measured: {
32759
+ // width: node.width,
32760
+ // height: node.height
32761
+ // },
33138
32762
  ...parent && {
33139
32763
  parentId: ns + parent.id
33140
32764
  }
@@ -33206,21 +32830,25 @@ function FitViewOnViewportResize({ diagramApi }) {
33206
32830
  }
33207
32831
  const diagramChangeId = (s2) => s2.view.id + "_" + s2.view.autoLayout + "_" + s2.fitViewPadding;
33208
32832
  function FitViewOnDiagramChanges() {
33209
- const diagramApi = useDiagramStoreApi(), [viewportMoved, setViewportMoved] = reactExports.useState(diagramApi.getState().viewportChanged), [processedChangeId, setProcessed] = reactExports.useState(diagramChangeId(diagramApi.getState())), [pendingChangeId, setPending] = useDebouncedState(processedChangeId, 100), isReady = useNodesInitialized({
32833
+ const diagramApi = useDiagramStoreApi(), [viewportMoved, setViewportMoved] = reactExports.useState(diagramApi.getState().viewportChanged), [processedChangeId, setProcessed] = reactExports.useState(diagramChangeId(diagramApi.getState())), [pendingChangeId, setPending] = reactExports.useState(processedChangeId), isReady = useNodesInitialized({
33210
32834
  includeHiddenNodes: !0
33211
- });
32835
+ }), schedulePending = useDebouncedCallback(
32836
+ (pendingChangeId2) => {
32837
+ setPending(pendingChangeId2);
32838
+ },
32839
+ [setPending],
32840
+ 75
32841
+ );
33212
32842
  return reactExports.useEffect(
33213
32843
  () => diagramApi.subscribe(
33214
- (s2) => ({
33215
- viewportMoved: s2.viewportChanged,
33216
- changeid: diagramChangeId(s2)
33217
- }),
33218
- ({ viewportMoved: viewportMoved2, changeid }) => {
33219
- setPending(changeid), setViewportMoved(viewportMoved2);
33220
- },
33221
- {
33222
- equalityFn: shallowEqual
33223
- }
32844
+ (s2) => diagramChangeId(s2),
32845
+ schedulePending
32846
+ ),
32847
+ [diagramApi, schedulePending]
32848
+ ), reactExports.useEffect(
32849
+ () => diagramApi.subscribe(
32850
+ (s2) => s2.viewportChanged,
32851
+ setViewportMoved
33224
32852
  ),
33225
32853
  [diagramApi]
33226
32854
  ), useRafEffect(
@@ -33235,7 +32863,9 @@ function toDomPrecision(v2) {
33235
32863
  return v2 === null ? 0.01 : Math.round(v2 * 100) / 100;
33236
32864
  }
33237
32865
  const isSameNode = (a) => (b2) => a.id === b2.id && a.type === b2.type && Object.is(a.parentId, b2.parentId), SyncWithDiagram = reactExports.memo(() => {
33238
- const xyflow = useXYFlow(), xyflowApi = useXYStoreApi(), diagramStoreApi = useDiagramStoreApi();
32866
+ const _xyflow = useXYFlow(), xyflowRef = reactExports.useRef(_xyflow);
32867
+ xyflowRef.current = _xyflow;
32868
+ const xyflowApi = useXYStoreApi(), diagramStoreApi = useDiagramStoreApi();
33239
32869
  return reactExports.useEffect(() => diagramStoreApi.subscribe(
33240
32870
  // selector
33241
32871
  (state) => ({
@@ -33248,7 +32878,7 @@ const isSameNode = (a) => (b2) => a.id === b2.id && a.type === b2.type && Object
33248
32878
  // listener
33249
32879
  ({ viewId, nodes, edges, ...opts }) => {
33250
32880
  const { lastOnNavigate } = diagramStoreApi.getState(), updates = diagramViewToXYFlowData({ nodes, edges }, opts);
33251
- if (xyflow.setNodes(
32881
+ if (xyflowRef.current.setNodes(
33252
32882
  (prev) => updates.nodes.map((update) => {
33253
32883
  const existing = prev.find(isSameNode(update));
33254
32884
  return existing ? deepEqual(existing.data.element, update.data.element) ? existing : {
@@ -33256,7 +32886,7 @@ const isSameNode = (a) => (b2) => a.id === b2.id && a.type === b2.type && Object
33256
32886
  ...update
33257
32887
  } : update;
33258
32888
  })
33259
- ), xyflow.setEdges(
32889
+ ), xyflowRef.current.setEdges(
33260
32890
  (prev) => updates.edges.map((update) => {
33261
32891
  const existing = prev.find((e2) => e2.id === update.id);
33262
32892
  return existing ? deepEqual(existing.data, update.data) ? existing : {
@@ -33264,19 +32894,20 @@ const isSameNode = (a) => (b2) => a.id === b2.id && a.type === b2.type && Object
33264
32894
  ...update
33265
32895
  } : update;
33266
32896
  })
33267
- ), lastOnNavigate?.toView === viewId && !lastOnNavigate.positionCorrected) {
32897
+ ), lastOnNavigate?.toView === viewId && lastOnNavigate.positionCorrected !== !0) {
33268
32898
  const elFrom = lastOnNavigate.element, elTo = nodes.find((n2) => n2.id === elFrom.id);
33269
32899
  if (elTo) {
33270
- const centerFrom = lastOnNavigate.elementCenterScreenPosition, nextZoom = Math.min(elFrom.width / elTo.width, elFrom.height / elTo.height);
32900
+ const centerFrom = lastOnNavigate.elementCenterScreenPosition;
32901
+ let nextZoom = Math.min(elFrom.width / elTo.width, elFrom.height / elTo.height);
33271
32902
  requestAnimationFrame(() => {
33272
32903
  requestAnimationFrame(() => {
33273
- const v2 = xyflow.getViewport();
33274
- nextZoom < v2.zoom && xyflow.setViewport({
32904
+ const v2 = xyflowRef.current.getViewport();
32905
+ nextZoom < v2.zoom && (nextZoom = Math.max(nextZoom, v2.zoom * 0.5), xyflowRef.current.setViewport({
33275
32906
  x: v2.x,
33276
32907
  y: v2.y,
33277
32908
  zoom: nextZoom
33278
- });
33279
- const centerTo = xyflow.flowToScreenPosition({
32909
+ }));
32910
+ const centerTo = xyflowRef.current.flowToScreenPosition({
33280
32911
  x: elTo.position[0] + elTo.width / 2,
33281
32912
  y: elTo.position[1] + elTo.height / 2
33282
32913
  }), diff = {
@@ -33302,7 +32933,7 @@ const isSameNode = (a) => (b2) => a.id === b2.id && a.type === b2.type && Object
33302
32933
  {
33303
32934
  equalityFn: shallowEqual
33304
32935
  }
33305
- ), [xyflow, xyflowApi, diagramStoreApi]), null;
32936
+ ), [xyflowApi, diagramStoreApi]), null;
33306
32937
  });
33307
32938
  function getVarName(variable) {
33308
32939
  var matches = variable.match(/^var\((.*)\)$/);
@@ -33349,7 +32980,7 @@ function assignInlineVars(varsOrContract, tokens) {
33349
32980
  writable: !1
33350
32981
  }), styles;
33351
32982
  }
33352
- var container$1 = "yi2p6v0", edgePathBg = "yi2p6v1", fillStrokeCtx = "yi2p6v2", cssEdgePath = "yi2p6v3", varLabelX = "var(--yi2p6v4)", varLabelY = "var(--yi2p6v5)", edgeLabel = "yi2p6v7", edgeLabelBody = "yi2p6v8";
32983
+ var container$2 = "yi2p6v0", edgePathBg = "yi2p6v1", fillStrokeCtx = "yi2p6v2", cssEdgePath = "yi2p6v3", varLabelX = "var(--yi2p6v4)", varLabelY = "var(--yi2p6v5)", edgeLabel = "yi2p6v7", edgeLabelBody = "yi2p6v8";
33353
32984
  function getNodeIntersection(intersectionNode, targetNode) {
33354
32985
  const {
33355
32986
  width: intersectionNodeWidth,
@@ -33443,7 +33074,7 @@ const isSamePoint = (a, b2) => Math.abs(a - b2) < 2.1, isSamePosition = (a, [bx,
33443
33074
  });
33444
33075
  edgePath = _edgePath, labelX = _labelX, labelY = _labelY;
33445
33076
  }
33446
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("g", { className: clsx(container$1), "data-likec4-color": color2, "data-edge-hovered": isHovered, children: [
33077
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("g", { className: clsx(container$2), "data-likec4-color": color2, "data-edge-hovered": isHovered, children: [
33447
33078
  /* @__PURE__ */ jsxRuntimeExports.jsx("g", { className: clsx(fillStrokeCtx), children: /* @__PURE__ */ jsxRuntimeExports.jsx("defs", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
33448
33079
  "marker",
33449
33080
  {
@@ -33473,7 +33104,7 @@ const isSamePoint = (a, b2) => Math.abs(a - b2) < 2.1, isSamePosition = (a, [bx,
33473
33104
  data.label && /* @__PURE__ */ jsxRuntimeExports.jsx(EdgeLabelRenderer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
33474
33105
  Box$1,
33475
33106
  {
33476
- className: clsx(container$1, edgeLabel),
33107
+ className: clsx(container$2, edgeLabel),
33477
33108
  "data-likec4-color": color2,
33478
33109
  style: {
33479
33110
  ...assignInlineVars({
@@ -33529,475 +33160,7 @@ const isSamePoint = (a, b2) => Math.abs(a - b2) < 2.1, isSamePosition = (a, [bx,
33529
33160
  strokeWidth: interactionWidth
33530
33161
  }
33531
33162
  )
33532
- ] })), Channel = {
33533
- /* CLAMP */
33534
- min: {
33535
- r: 0,
33536
- g: 0,
33537
- b: 0,
33538
- s: 0,
33539
- l: 0,
33540
- a: 0
33541
- },
33542
- max: {
33543
- r: 255,
33544
- g: 255,
33545
- b: 255,
33546
- h: 360,
33547
- s: 100,
33548
- l: 100,
33549
- a: 1
33550
- },
33551
- clamp: {
33552
- r: (r2) => r2 >= 255 ? 255 : r2 < 0 ? 0 : r2,
33553
- g: (g2) => g2 >= 255 ? 255 : g2 < 0 ? 0 : g2,
33554
- b: (b2) => b2 >= 255 ? 255 : b2 < 0 ? 0 : b2,
33555
- h: (h2) => h2 % 360,
33556
- s: (s2) => s2 >= 100 ? 100 : s2 < 0 ? 0 : s2,
33557
- l: (l2) => l2 >= 100 ? 100 : l2 < 0 ? 0 : l2,
33558
- a: (a) => a >= 1 ? 1 : a < 0 ? 0 : a
33559
- },
33560
- /* CONVERSION */
33561
- //SOURCE: https://planetcalc.com/7779
33562
- toLinear: (c2) => {
33563
- const n2 = c2 / 255;
33564
- return c2 > 0.03928 ? Math.pow((n2 + 0.055) / 1.055, 2.4) : n2 / 12.92;
33565
- },
33566
- //SOURCE: https://gist.github.com/mjackson/5311256
33567
- hue2rgb: (p2, q2, t2) => (t2 < 0 && (t2 += 1), t2 > 1 && (t2 -= 1), t2 < 1 / 6 ? p2 + (q2 - p2) * 6 * t2 : t2 < 1 / 2 ? q2 : t2 < 2 / 3 ? p2 + (q2 - p2) * (2 / 3 - t2) * 6 : p2),
33568
- hsl2rgb: ({ h: h2, s: s2, l: l2 }, channel) => {
33569
- if (!s2)
33570
- return l2 * 2.55;
33571
- h2 /= 360, s2 /= 100, l2 /= 100;
33572
- const q2 = l2 < 0.5 ? l2 * (1 + s2) : l2 + s2 - l2 * s2, p2 = 2 * l2 - q2;
33573
- switch (channel) {
33574
- case "r":
33575
- return Channel.hue2rgb(p2, q2, h2 + 1 / 3) * 255;
33576
- case "g":
33577
- return Channel.hue2rgb(p2, q2, h2) * 255;
33578
- case "b":
33579
- return Channel.hue2rgb(p2, q2, h2 - 1 / 3) * 255;
33580
- }
33581
- },
33582
- rgb2hsl: ({ r: r2, g: g2, b: b2 }, channel) => {
33583
- r2 /= 255, g2 /= 255, b2 /= 255;
33584
- const max2 = Math.max(r2, g2, b2), min2 = Math.min(r2, g2, b2), l2 = (max2 + min2) / 2;
33585
- if (channel === "l")
33586
- return l2 * 100;
33587
- if (max2 === min2)
33588
- return 0;
33589
- const d2 = max2 - min2, s2 = l2 > 0.5 ? d2 / (2 - max2 - min2) : d2 / (max2 + min2);
33590
- if (channel === "s")
33591
- return s2 * 100;
33592
- switch (max2) {
33593
- case r2:
33594
- return ((g2 - b2) / d2 + (g2 < b2 ? 6 : 0)) * 60;
33595
- case g2:
33596
- return ((b2 - r2) / d2 + 2) * 60;
33597
- case b2:
33598
- return ((r2 - g2) / d2 + 4) * 60;
33599
- default:
33600
- return -1;
33601
- }
33602
- }
33603
- }, Lang = {
33604
- /* API */
33605
- clamp: (number2, lower2, upper) => lower2 > upper ? Math.min(lower2, Math.max(upper, number2)) : Math.min(upper, Math.max(lower2, number2)),
33606
- round: (number2) => Math.round(number2 * 1e10) / 1e10
33607
- }, lang = Lang, Unit = {
33608
- /* API */
33609
- dec2hex: (dec) => {
33610
- const hex2 = Math.round(dec).toString(16);
33611
- return hex2.length > 1 ? hex2 : `0${hex2}`;
33612
- }
33613
- }, unit = Unit, Utils = {
33614
- channel: Channel,
33615
- lang,
33616
- unit
33617
- }, DEC2HEX = {};
33618
- for (let i2 = 0; i2 <= 255; i2++)
33619
- DEC2HEX[i2] = Utils.unit.dec2hex(i2);
33620
- const TYPE = {
33621
- ALL: 0,
33622
- RGB: 1,
33623
- HSL: 2
33624
- };
33625
- class Type {
33626
- constructor() {
33627
- this.type = TYPE.ALL;
33628
- }
33629
- /* API */
33630
- get() {
33631
- return this.type;
33632
- }
33633
- set(type) {
33634
- if (this.type && this.type !== type)
33635
- throw new Error("Cannot change both RGB and HSL channels at the same time");
33636
- this.type = type;
33637
- }
33638
- reset() {
33639
- this.type = TYPE.ALL;
33640
- }
33641
- is(type) {
33642
- return this.type === type;
33643
- }
33644
- }
33645
- class Channels {
33646
- /* CONSTRUCTOR */
33647
- constructor(data, color2) {
33648
- this.color = color2, this.changed = !1, this.data = data, this.type = new Type();
33649
- }
33650
- /* API */
33651
- set(data, color2) {
33652
- return this.color = color2, this.changed = !1, this.data = data, this.type.type = TYPE.ALL, this;
33653
- }
33654
- /* HELPERS */
33655
- _ensureHSL() {
33656
- const data = this.data, { h: h2, s: s2, l: l2 } = data;
33657
- h2 === void 0 && (data.h = Utils.channel.rgb2hsl(data, "h")), s2 === void 0 && (data.s = Utils.channel.rgb2hsl(data, "s")), l2 === void 0 && (data.l = Utils.channel.rgb2hsl(data, "l"));
33658
- }
33659
- _ensureRGB() {
33660
- const data = this.data, { r: r2, g: g2, b: b2 } = data;
33661
- r2 === void 0 && (data.r = Utils.channel.hsl2rgb(data, "r")), g2 === void 0 && (data.g = Utils.channel.hsl2rgb(data, "g")), b2 === void 0 && (data.b = Utils.channel.hsl2rgb(data, "b"));
33662
- }
33663
- /* GETTERS */
33664
- get r() {
33665
- const data = this.data, r2 = data.r;
33666
- return !this.type.is(TYPE.HSL) && r2 !== void 0 ? r2 : (this._ensureHSL(), Utils.channel.hsl2rgb(data, "r"));
33667
- }
33668
- get g() {
33669
- const data = this.data, g2 = data.g;
33670
- return !this.type.is(TYPE.HSL) && g2 !== void 0 ? g2 : (this._ensureHSL(), Utils.channel.hsl2rgb(data, "g"));
33671
- }
33672
- get b() {
33673
- const data = this.data, b2 = data.b;
33674
- return !this.type.is(TYPE.HSL) && b2 !== void 0 ? b2 : (this._ensureHSL(), Utils.channel.hsl2rgb(data, "b"));
33675
- }
33676
- get h() {
33677
- const data = this.data, h2 = data.h;
33678
- return !this.type.is(TYPE.RGB) && h2 !== void 0 ? h2 : (this._ensureRGB(), Utils.channel.rgb2hsl(data, "h"));
33679
- }
33680
- get s() {
33681
- const data = this.data, s2 = data.s;
33682
- return !this.type.is(TYPE.RGB) && s2 !== void 0 ? s2 : (this._ensureRGB(), Utils.channel.rgb2hsl(data, "s"));
33683
- }
33684
- get l() {
33685
- const data = this.data, l2 = data.l;
33686
- return !this.type.is(TYPE.RGB) && l2 !== void 0 ? l2 : (this._ensureRGB(), Utils.channel.rgb2hsl(data, "l"));
33687
- }
33688
- get a() {
33689
- return this.data.a;
33690
- }
33691
- /* SETTERS */
33692
- set r(r2) {
33693
- this.type.set(TYPE.RGB), this.changed = !0, this.data.r = r2;
33694
- }
33695
- set g(g2) {
33696
- this.type.set(TYPE.RGB), this.changed = !0, this.data.g = g2;
33697
- }
33698
- set b(b2) {
33699
- this.type.set(TYPE.RGB), this.changed = !0, this.data.b = b2;
33700
- }
33701
- set h(h2) {
33702
- this.type.set(TYPE.HSL), this.changed = !0, this.data.h = h2;
33703
- }
33704
- set s(s2) {
33705
- this.type.set(TYPE.HSL), this.changed = !0, this.data.s = s2;
33706
- }
33707
- set l(l2) {
33708
- this.type.set(TYPE.HSL), this.changed = !0, this.data.l = l2;
33709
- }
33710
- set a(a) {
33711
- this.changed = !0, this.data.a = a;
33712
- }
33713
- }
33714
- const Channels$1 = Channels, channels = new Channels$1({ r: 0, g: 0, b: 0, a: 0 }, "transparent"), Hex = {
33715
- /* VARIABLES */
33716
- re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,
33717
- /* API */
33718
- parse: (color2) => {
33719
- if (color2.charCodeAt(0) !== 35)
33720
- return;
33721
- const match = color2.match(Hex.re);
33722
- if (!match)
33723
- return;
33724
- const hex2 = match[1], dec = parseInt(hex2, 16), length = hex2.length, hasAlpha = length % 4 === 0, isFullLength = length > 4, multiplier = isFullLength ? 1 : 17, bits = isFullLength ? 8 : 4, bitsOffset = hasAlpha ? 0 : -1, mask = isFullLength ? 255 : 15;
33725
- return channels.set({
33726
- r: (dec >> bits * (bitsOffset + 3) & mask) * multiplier,
33727
- g: (dec >> bits * (bitsOffset + 2) & mask) * multiplier,
33728
- b: (dec >> bits * (bitsOffset + 1) & mask) * multiplier,
33729
- a: hasAlpha ? (dec & mask) * multiplier / 255 : 1
33730
- }, color2);
33731
- },
33732
- stringify: (channels2) => {
33733
- const { r: r2, g: g2, b: b2, a } = channels2;
33734
- return a < 1 ? `#${DEC2HEX[Math.round(r2)]}${DEC2HEX[Math.round(g2)]}${DEC2HEX[Math.round(b2)]}${DEC2HEX[Math.round(a * 255)]}` : `#${DEC2HEX[Math.round(r2)]}${DEC2HEX[Math.round(g2)]}${DEC2HEX[Math.round(b2)]}`;
33735
- }
33736
- }, HSL = {
33737
- /* VARIABLES */
33738
- re: /^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,
33739
- hueRe: /^(.+?)(deg|grad|rad|turn)$/i,
33740
- /* HELPERS */
33741
- _hue2deg: (hue) => {
33742
- const match = hue.match(HSL.hueRe);
33743
- if (match) {
33744
- const [, number2, unit2] = match;
33745
- switch (unit2) {
33746
- case "grad":
33747
- return Utils.channel.clamp.h(parseFloat(number2) * 0.9);
33748
- case "rad":
33749
- return Utils.channel.clamp.h(parseFloat(number2) * 180 / Math.PI);
33750
- case "turn":
33751
- return Utils.channel.clamp.h(parseFloat(number2) * 360);
33752
- }
33753
- }
33754
- return Utils.channel.clamp.h(parseFloat(hue));
33755
- },
33756
- /* API */
33757
- parse: (color2) => {
33758
- const charCode = color2.charCodeAt(0);
33759
- if (charCode !== 104 && charCode !== 72)
33760
- return;
33761
- const match = color2.match(HSL.re);
33762
- if (!match)
33763
- return;
33764
- const [, h2, s2, l2, a, isAlphaPercentage] = match;
33765
- return channels.set({
33766
- h: HSL._hue2deg(h2),
33767
- s: Utils.channel.clamp.s(parseFloat(s2)),
33768
- l: Utils.channel.clamp.l(parseFloat(l2)),
33769
- a: a ? Utils.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1
33770
- }, color2);
33771
- },
33772
- stringify: (channels2) => {
33773
- const { h: h2, s: s2, l: l2, a } = channels2;
33774
- return a < 1 ? `hsla(${Utils.lang.round(h2)}, ${Utils.lang.round(s2)}%, ${Utils.lang.round(l2)}%, ${a})` : `hsl(${Utils.lang.round(h2)}, ${Utils.lang.round(s2)}%, ${Utils.lang.round(l2)}%)`;
33775
- }
33776
- }, Keyword = {
33777
- /* VARIABLES */
33778
- colors: {
33779
- aliceblue: "#f0f8ff",
33780
- antiquewhite: "#faebd7",
33781
- aqua: "#00ffff",
33782
- aquamarine: "#7fffd4",
33783
- azure: "#f0ffff",
33784
- beige: "#f5f5dc",
33785
- bisque: "#ffe4c4",
33786
- black: "#000000",
33787
- blanchedalmond: "#ffebcd",
33788
- blue: "#0000ff",
33789
- blueviolet: "#8a2be2",
33790
- brown: "#a52a2a",
33791
- burlywood: "#deb887",
33792
- cadetblue: "#5f9ea0",
33793
- chartreuse: "#7fff00",
33794
- chocolate: "#d2691e",
33795
- coral: "#ff7f50",
33796
- cornflowerblue: "#6495ed",
33797
- cornsilk: "#fff8dc",
33798
- crimson: "#dc143c",
33799
- cyanaqua: "#00ffff",
33800
- darkblue: "#00008b",
33801
- darkcyan: "#008b8b",
33802
- darkgoldenrod: "#b8860b",
33803
- darkgray: "#a9a9a9",
33804
- darkgreen: "#006400",
33805
- darkgrey: "#a9a9a9",
33806
- darkkhaki: "#bdb76b",
33807
- darkmagenta: "#8b008b",
33808
- darkolivegreen: "#556b2f",
33809
- darkorange: "#ff8c00",
33810
- darkorchid: "#9932cc",
33811
- darkred: "#8b0000",
33812
- darksalmon: "#e9967a",
33813
- darkseagreen: "#8fbc8f",
33814
- darkslateblue: "#483d8b",
33815
- darkslategray: "#2f4f4f",
33816
- darkslategrey: "#2f4f4f",
33817
- darkturquoise: "#00ced1",
33818
- darkviolet: "#9400d3",
33819
- deeppink: "#ff1493",
33820
- deepskyblue: "#00bfff",
33821
- dimgray: "#696969",
33822
- dimgrey: "#696969",
33823
- dodgerblue: "#1e90ff",
33824
- firebrick: "#b22222",
33825
- floralwhite: "#fffaf0",
33826
- forestgreen: "#228b22",
33827
- fuchsia: "#ff00ff",
33828
- gainsboro: "#dcdcdc",
33829
- ghostwhite: "#f8f8ff",
33830
- gold: "#ffd700",
33831
- goldenrod: "#daa520",
33832
- gray: "#808080",
33833
- green: "#008000",
33834
- greenyellow: "#adff2f",
33835
- grey: "#808080",
33836
- honeydew: "#f0fff0",
33837
- hotpink: "#ff69b4",
33838
- indianred: "#cd5c5c",
33839
- indigo: "#4b0082",
33840
- ivory: "#fffff0",
33841
- khaki: "#f0e68c",
33842
- lavender: "#e6e6fa",
33843
- lavenderblush: "#fff0f5",
33844
- lawngreen: "#7cfc00",
33845
- lemonchiffon: "#fffacd",
33846
- lightblue: "#add8e6",
33847
- lightcoral: "#f08080",
33848
- lightcyan: "#e0ffff",
33849
- lightgoldenrodyellow: "#fafad2",
33850
- lightgray: "#d3d3d3",
33851
- lightgreen: "#90ee90",
33852
- lightgrey: "#d3d3d3",
33853
- lightpink: "#ffb6c1",
33854
- lightsalmon: "#ffa07a",
33855
- lightseagreen: "#20b2aa",
33856
- lightskyblue: "#87cefa",
33857
- lightslategray: "#778899",
33858
- lightslategrey: "#778899",
33859
- lightsteelblue: "#b0c4de",
33860
- lightyellow: "#ffffe0",
33861
- lime: "#00ff00",
33862
- limegreen: "#32cd32",
33863
- linen: "#faf0e6",
33864
- magenta: "#ff00ff",
33865
- maroon: "#800000",
33866
- mediumaquamarine: "#66cdaa",
33867
- mediumblue: "#0000cd",
33868
- mediumorchid: "#ba55d3",
33869
- mediumpurple: "#9370db",
33870
- mediumseagreen: "#3cb371",
33871
- mediumslateblue: "#7b68ee",
33872
- mediumspringgreen: "#00fa9a",
33873
- mediumturquoise: "#48d1cc",
33874
- mediumvioletred: "#c71585",
33875
- midnightblue: "#191970",
33876
- mintcream: "#f5fffa",
33877
- mistyrose: "#ffe4e1",
33878
- moccasin: "#ffe4b5",
33879
- navajowhite: "#ffdead",
33880
- navy: "#000080",
33881
- oldlace: "#fdf5e6",
33882
- olive: "#808000",
33883
- olivedrab: "#6b8e23",
33884
- orange: "#ffa500",
33885
- orangered: "#ff4500",
33886
- orchid: "#da70d6",
33887
- palegoldenrod: "#eee8aa",
33888
- palegreen: "#98fb98",
33889
- paleturquoise: "#afeeee",
33890
- palevioletred: "#db7093",
33891
- papayawhip: "#ffefd5",
33892
- peachpuff: "#ffdab9",
33893
- peru: "#cd853f",
33894
- pink: "#ffc0cb",
33895
- plum: "#dda0dd",
33896
- powderblue: "#b0e0e6",
33897
- purple: "#800080",
33898
- rebeccapurple: "#663399",
33899
- red: "#ff0000",
33900
- rosybrown: "#bc8f8f",
33901
- royalblue: "#4169e1",
33902
- saddlebrown: "#8b4513",
33903
- salmon: "#fa8072",
33904
- sandybrown: "#f4a460",
33905
- seagreen: "#2e8b57",
33906
- seashell: "#fff5ee",
33907
- sienna: "#a0522d",
33908
- silver: "#c0c0c0",
33909
- skyblue: "#87ceeb",
33910
- slateblue: "#6a5acd",
33911
- slategray: "#708090",
33912
- slategrey: "#708090",
33913
- snow: "#fffafa",
33914
- springgreen: "#00ff7f",
33915
- tan: "#d2b48c",
33916
- teal: "#008080",
33917
- thistle: "#d8bfd8",
33918
- transparent: "#00000000",
33919
- turquoise: "#40e0d0",
33920
- violet: "#ee82ee",
33921
- wheat: "#f5deb3",
33922
- white: "#ffffff",
33923
- whitesmoke: "#f5f5f5",
33924
- yellow: "#ffff00",
33925
- yellowgreen: "#9acd32"
33926
- },
33927
- /* API */
33928
- parse: (color2) => {
33929
- color2 = color2.toLowerCase();
33930
- const hex2 = Keyword.colors[color2];
33931
- if (hex2)
33932
- return Hex.parse(hex2);
33933
- },
33934
- stringify: (channels2) => {
33935
- const hex2 = Hex.stringify(channels2);
33936
- for (const name in Keyword.colors)
33937
- if (Keyword.colors[name] === hex2)
33938
- return name;
33939
- }
33940
- }, RGB = {
33941
- /* VARIABLES */
33942
- re: /^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,
33943
- /* API */
33944
- parse: (color2) => {
33945
- const charCode = color2.charCodeAt(0);
33946
- if (charCode !== 114 && charCode !== 82)
33947
- return;
33948
- const match = color2.match(RGB.re);
33949
- if (!match)
33950
- return;
33951
- const [, r2, isRedPercentage, g2, isGreenPercentage, b2, isBluePercentage, a, isAlphaPercentage] = match;
33952
- return channels.set({
33953
- r: Utils.channel.clamp.r(isRedPercentage ? parseFloat(r2) * 2.55 : parseFloat(r2)),
33954
- g: Utils.channel.clamp.g(isGreenPercentage ? parseFloat(g2) * 2.55 : parseFloat(g2)),
33955
- b: Utils.channel.clamp.b(isBluePercentage ? parseFloat(b2) * 2.55 : parseFloat(b2)),
33956
- a: a ? Utils.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1
33957
- }, color2);
33958
- },
33959
- stringify: (channels2) => {
33960
- const { r: r2, g: g2, b: b2, a } = channels2;
33961
- return a < 1 ? `rgba(${Utils.lang.round(r2)}, ${Utils.lang.round(g2)}, ${Utils.lang.round(b2)}, ${Utils.lang.round(a)})` : `rgb(${Utils.lang.round(r2)}, ${Utils.lang.round(g2)}, ${Utils.lang.round(b2)})`;
33962
- }
33963
- }, Color = {
33964
- /* VARIABLES */
33965
- format: {
33966
- keyword: Keyword,
33967
- hex: Hex,
33968
- rgb: RGB,
33969
- rgba: RGB,
33970
- hsl: HSL,
33971
- hsla: HSL
33972
- },
33973
- /* API */
33974
- parse: (color2) => {
33975
- if (typeof color2 != "string")
33976
- return color2;
33977
- const channels2 = Hex.parse(color2) || RGB.parse(color2) || HSL.parse(color2) || Keyword.parse(color2);
33978
- if (channels2)
33979
- return channels2;
33980
- throw new Error(`Unsupported color format: "${color2}"`);
33981
- },
33982
- stringify: (channels2) => !channels2.changed && channels2.color ? channels2.color : channels2.type.is(TYPE.HSL) || channels2.data.r === void 0 ? HSL.stringify(channels2) : channels2.a < 1 || !Number.isInteger(channels2.r) || !Number.isInteger(channels2.g) || !Number.isInteger(channels2.b) ? RGB.stringify(channels2) : Hex.stringify(channels2)
33983
- }, change = (color2, channels2) => {
33984
- const ch2 = Color.parse(color2);
33985
- for (const c2 in channels2)
33986
- ch2[c2] = Utils.channel.clamp[c2](channels2[c2]);
33987
- return Color.stringify(ch2);
33988
- }, change$1 = change, toHex = (color2) => Color.format.hex.stringify(Color.parse(color2)), adjust = (color2, channels2) => {
33989
- const ch2 = Color.parse(color2), changes = {};
33990
- for (const c2 in channels2)
33991
- channels2[c2] && (changes[c2] = ch2[c2] + channels2[c2]);
33992
- return change$1(color2, changes);
33993
- }, adjust$1 = adjust, scale = (color2, channels2) => {
33994
- const ch2 = Color.parse(color2), adjustments = {}, delta = (amount, weight, max2) => weight > 0 ? (max2 - amount) * weight / 100 : amount * weight / 100;
33995
- for (const c2 in channels2)
33996
- adjustments[c2] = delta(ch2[c2], channels2[c2], Utils.channel.max[c2]);
33997
- return adjust$1(color2, adjustments);
33998
- }, scale$1 = scale;
33999
- var vars = { default: { font: "var(--likec4-default-font-family)" }, likec4: { font: "var(--likec4-font-family)", background: { color: "var(--likec4-background-color)", pattern: { color: "var(--likec4-background-pattern-color)" } } }, compound: { font: "var(--likec4-compound-font-family)", titleColor: "var(--likec4-compound-title-color)" }, element: { font: "var(--likec4-element-font-family)", fill: "var(--likec4-element-fill)", stroke: "var(--likec4-element-stroke)", hiContrast: "var(--likec4-element-hiContrast)", loContrast: "var(--likec4-element-loContrast)" }, relation: { lineColor: "var(--likec4-relation-lineColor)", labelColor: "var(--likec4-relation-labelColor)", labelBgColor: "var(--likec4-relation-labelBg)" }, optionsPanel: { top: "var(--likec4-options-panel-top)", right: "var(--likec4-options-panel-right)" } };
34000
- const Link = reactExports.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
33163
+ ] })), Link = reactExports.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
34001
33164
  "svg",
34002
33165
  {
34003
33166
  ref,
@@ -34051,48 +33214,45 @@ function NavigateToBtn({ xynodeId, className }) {
34051
33214
  className: clsx("nodrag nopan", className),
34052
33215
  radius: "xl",
34053
33216
  onClick: (event) => {
34054
- diagramApi.getState().triggerOnNavigateTo(xynodeId, event), event.stopPropagation();
33217
+ event.stopPropagation(), diagramApi.getState().triggerOnNavigateTo(xynodeId, event);
34055
33218
  },
33219
+ onDoubleClick: (event) => event.stopPropagation(),
34056
33220
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ZoomIn, {})
34057
33221
  }
34058
33222
  );
34059
33223
  }
34060
- var cssContainer = "c3cfh00", cssCompound = "c3cfh02", cssTitle = "c3cfh04", cssIndicator = "c3cfh06", cssNavigateBtn$1 = "c3cfh07";
34061
- const compoundColor = (color2, depth) => toHex(
34062
- scale$1(color2, {
34063
- l: -35 - 5 * depth,
34064
- s: -15 - 5 * depth
34065
- })
34066
- ), CompoundNodeMemo = /* @__PURE__ */ reactExports.memo(function({
33224
+ var container$1 = "c3cfh00", varTransparency = "var(--c3cfh01)", compoundBody = "c3cfh02", transparent = "c3cfh05", title$1 = "c3cfh06", indicator$1 = "c3cfh0a", navigateBtn = "c3cfh0c";
33225
+ const CompoundNodeMemo = /* @__PURE__ */ reactExports.memo(function({
34067
33226
  id: id2,
34068
33227
  data: {
34069
33228
  element
34070
33229
  }
34071
33230
  }) {
34072
- const { color: color2, depth = 0, ...compound } = element, colors2 = reactExports.useMemo(() => {
34073
- const colors22 = defaultTheme.elements[color2];
34074
- return {
34075
- fill: compoundColor(colors22.fill, depth),
34076
- stroke: compoundColor(colors22.stroke, depth)
34077
- };
34078
- }, [color2, depth]), { isHovered, hasOnNavigateTo } = useDiagramState((s2) => ({
33231
+ const { color: color2, style: style2, depth = 1, ...compound } = element, opacity = style2.opacity ?? 100, { isHovered, hasOnNavigateTo } = useDiagramState((s2) => ({
34079
33232
  isHovered: s2.hoveredNodeId === id2,
34080
33233
  hasOnNavigateTo: !!s2.onNavigateTo
34081
- })), isnavigable = !!compound.navigateTo && hasOnNavigateTo;
33234
+ })), isnavigable = !!compound.navigateTo && hasOnNavigateTo, transparency = clamp$1(100 - opacity, {
33235
+ min: 0,
33236
+ max: 98
33237
+ });
34082
33238
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
34083
33239
  Box$1,
34084
33240
  {
34085
- className: clsx(cssContainer, "likec4-compound-node"),
34086
- style: assignInlineVars({ fill: vars.element.fill, stroke: vars.element.stroke }, {
34087
- fill: colors2.fill,
34088
- stroke: colors2.stroke
34089
- }),
33241
+ className: clsx(
33242
+ container$1,
33243
+ "likec4-compound-node",
33244
+ opacity < 100 && "likec4-compound-transparent"
33245
+ ),
34090
33246
  mod: {
33247
+ "compound-depth": depth,
34091
33248
  "likec4-color": color2,
34092
33249
  "likec4-shape": compound.shape,
34093
33250
  "likec4-navigable": isnavigable,
34094
33251
  hovered: isHovered
34095
33252
  },
33253
+ style: assignInlineVars({
33254
+ [varTransparency]: transparency + "%"
33255
+ }),
34096
33256
  children: [
34097
33257
  /* @__PURE__ */ jsxRuntimeExports.jsx(
34098
33258
  Handle,
@@ -34102,7 +33262,7 @@ const compoundColor = (color2, depth) => toHex(
34102
33262
  style: { visibility: "hidden" }
34103
33263
  }
34104
33264
  ),
34105
- /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: cssIndicator, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
33265
+ /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: indicator$1, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
34106
33266
  "rect",
34107
33267
  {
34108
33268
  x: 0,
@@ -34112,15 +33272,24 @@ const compoundColor = (color2, depth) => toHex(
34112
33272
  rx: 6
34113
33273
  }
34114
33274
  ) }),
34115
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(cssCompound, "likec4-compound"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
34116
- Text$1,
33275
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
33276
+ "div",
34117
33277
  {
34118
- component: "div",
34119
- className: clsx(cssTitle, "likec4-compound-title"),
34120
- children: compound.title
33278
+ className: clsx(compoundBody, opacity < 100 && transparent, "likec4-compound"),
33279
+ style: {
33280
+ borderStyle: opacity < 100 ? style2.border : void 0
33281
+ },
33282
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
33283
+ Text$1,
33284
+ {
33285
+ component: "div",
33286
+ className: clsx(title$1, "likec4-compound-title"),
33287
+ children: compound.title
33288
+ }
33289
+ )
34121
33290
  }
34122
- ) }),
34123
- isnavigable && /* @__PURE__ */ jsxRuntimeExports.jsx(NavigateToBtn, { xynodeId: id2, className: cssNavigateBtn$1 }),
33291
+ ),
33292
+ isnavigable && /* @__PURE__ */ jsxRuntimeExports.jsx(NavigateToBtn, { xynodeId: id2, className: navigateBtn }),
34124
33293
  /* @__PURE__ */ jsxRuntimeExports.jsx(
34125
33294
  Handle,
34126
33295
  {
@@ -34409,7 +33578,7 @@ function ElementNode({
34409
33578
  }) {
34410
33579
  const { isHovered, hasOnNavigateTo, isHovercards, isInteractive } = useDiagramState((s2) => ({
34411
33580
  isHovered: s2.hoveredNodeId === id2,
34412
- isInteractive: s2.nodesDraggable || s2.nodesSelectable,
33581
+ isInteractive: s2.nodesDraggable || s2.nodesSelectable || !!s2.onNavigateTo,
34413
33582
  isHovercards: s2.showElementLinks,
34414
33583
  hasOnNavigateTo: !!s2.onNavigateTo
34415
33584
  })), isNavigable = hasOnNavigateTo && !!element.navigateTo, w2 = toDomPrecision(width ?? element.width), h2 = toDomPrecision(height ?? element.height);
@@ -34421,7 +33590,7 @@ function ElementNode({
34421
33590
  case dragging:
34422
33591
  animate = "idle";
34423
33592
  break;
34424
- case ((isInteractive || hasOnNavigateTo) && isHovered):
33593
+ case (isInteractive && isHovered):
34425
33594
  animate = "hovered";
34426
33595
  break;
34427
33596
  case selected2:
@@ -34537,29 +33706,32 @@ const XYFlowBackground = reactExports.memo(({ background }) => {
34537
33706
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Background, { variant: literalToEnum(variant), ...rest });
34538
33707
  }, deepEqual);
34539
33708
  function useXYFlowEvents() {
34540
- const diagramApi = useDiagramStoreApi(), xyflowApi = useXYStoreApi(), dblclickTimeout = reactExports.useRef();
33709
+ const diagramApi = useDiagramStoreApi(), xyflowApi = useXYStoreApi(), dblclickTimeout = reactExports.useRef(), dbclickGuarg = () => dblclickTimeout.current !== void 0 ? !0 : (dblclickTimeout.current = window.setTimeout(() => {
33710
+ dblclickTimeout.current = void 0;
33711
+ }, 250), !1);
34541
33712
  return reactExports.useMemo(() => ({
34542
- onPaneClick: (event) => {
34543
- diagramApi.setState(
34544
- {
34545
- lastClickedNodeId: null,
34546
- lastClickedEdgeId: null
34547
- },
34548
- !1,
34549
- "onPaneClick"
34550
- );
33713
+ onDoubleClick: (event) => {
33714
+ diagramApi.getState().setLastClickedNode(null), diagramApi.getState().setLastClickedEdge(null);
34551
33715
  const diagramState = diagramApi.getState();
34552
- if (dblclickTimeout.current) {
34553
- if (window.clearTimeout(dblclickTimeout.current), dblclickTimeout.current = void 0, diagramState.onCanvasDblClick) {
34554
- diagramState.onCanvasDblClick(event);
34555
- return;
34556
- }
34557
- diagramState.onCanvasClick?.(event), diagramState.fitViewEnabled && diagramState.viewportChanged && diagramState.fitDiagram();
33716
+ if (diagramState.onCanvasDblClick) {
33717
+ diagramState.onCanvasDblClick(event);
33718
+ return;
33719
+ }
33720
+ if (diagramState.fitViewEnabled && diagramState.zoomable) {
33721
+ diagramState.fitDiagram(), event.stopPropagation();
33722
+ return;
33723
+ }
33724
+ },
33725
+ onPaneClick: (event) => {
33726
+ if (dbclickGuarg())
33727
+ return;
33728
+ diagramApi.getState().setLastClickedNode(null), diagramApi.getState().setLastClickedEdge(null);
33729
+ const { focusedNodeId, fitDiagram, onCanvasClick } = diagramApi.getState();
33730
+ if (onCanvasClick) {
33731
+ onCanvasClick(event);
34558
33732
  return;
34559
33733
  }
34560
- dblclickTimeout.current = window.setTimeout(() => {
34561
- dblclickTimeout.current = void 0, diagramApi.getState().onCanvasClick?.(event);
34562
- }, 300);
33734
+ focusedNodeId && (fitDiagram(), event.stopPropagation());
34563
33735
  },
34564
33736
  onNodeContextMenu: (event, xynode) => {
34565
33737
  diagramApi.getState().setLastClickedNode(xynode.id), diagramApi.getState().onNodeContextMenu?.({
@@ -34579,11 +33751,21 @@ function useXYFlowEvents() {
34579
33751
  });
34580
33752
  },
34581
33753
  onNodeClick: (event, xynode) => {
34582
- diagramApi.getState().setLastClickedNode(xynode.id), diagramApi.getState().onNodeClick?.({
34583
- element: xynode.data.element,
34584
- xynode,
34585
- event
34586
- });
33754
+ diagramApi.getState().setLastClickedNode(xynode.id);
33755
+ const { focusedNodeId, fitDiagram, onNodeClick } = diagramApi.getState();
33756
+ if (onNodeClick) {
33757
+ onNodeClick({
33758
+ element: xynode.data.element,
33759
+ xynode,
33760
+ event
33761
+ });
33762
+ return;
33763
+ }
33764
+ focusedNodeId && focusedNodeId !== xynode.id && (fitDiagram(xynode), event.stopPropagation());
33765
+ },
33766
+ onNodeDoubleClick: (event, xynode) => {
33767
+ const { zoomable, fitDiagram, onNodeClick } = diagramApi.getState();
33768
+ onNodeClick || zoomable && (fitDiagram(xynode), event.stopPropagation());
34587
33769
  },
34588
33770
  onEdgeClick: (event, xyedge) => {
34589
33771
  diagramApi.getState().setLastClickedEdge(xyedge.id), diagramApi.getState().onEdgeClick?.({
@@ -34595,6 +33777,18 @@ function useXYFlowEvents() {
34595
33777
  onMoveEnd: (event, _viewport) => {
34596
33778
  const viewportChanged = !!event;
34597
33779
  viewportChanged !== diagramApi.getState().viewportChanged && diagramApi.setState({ viewportChanged }, !1, `viewport-changed: ${viewportChanged}`);
33780
+ },
33781
+ onNodeMouseEnter: (event, xynode) => {
33782
+ diagramApi.getState().setHoveredNode(xynode.id);
33783
+ },
33784
+ onNodeMouseLeave: (event, xynode) => {
33785
+ diagramApi.getState().setHoveredNode(null);
33786
+ },
33787
+ onEdgeMouseEnter: (event, xyedge) => {
33788
+ diagramApi.getState().setHoveredEdge(xyedge.id);
33789
+ },
33790
+ onEdgeMouseLeave: (event, xyedge) => {
33791
+ diagramApi.getState().setHoveredEdge(null);
34598
33792
  }
34599
33793
  }), [diagramApi, xyflowApi]);
34600
33794
  }
@@ -34614,15 +33808,14 @@ const nodeTypes = {
34614
33808
  hasOnCanvasContextMenu: !!s2.onCanvasContextMenu,
34615
33809
  hasOnEdgeContextMenu: !!s2.onEdgeContextMenu,
34616
33810
  hasOnEdgeClick: !!s2.onEdgeClick,
34617
- hasOnCanvasClick: !!s2.onCanvasClick || !!s2.onCanvasDblClick
33811
+ zoomable: s2.zoomable,
33812
+ pannable: s2.pannable
34618
33813
  });
34619
33814
  function XYFlowWrapper({
34620
33815
  className,
34621
33816
  children: children2,
34622
33817
  defaultNodes,
34623
33818
  defaultEdges,
34624
- pannable,
34625
- zoomable,
34626
33819
  controls,
34627
33820
  background,
34628
33821
  style: style2
@@ -34632,6 +33825,8 @@ function XYFlowWrapper({
34632
33825
  nodesDraggable,
34633
33826
  fitView: fitView2,
34634
33827
  fitViewPadding,
33828
+ pannable,
33829
+ zoomable,
34635
33830
  ...editor
34636
33831
  } = useDiagramState(selector), layoutConstraints = useLayoutConstraints(), handlers = useXYFlowEvents(), isBgWithPattern = background !== "transparent" && background !== "solid", { colorScheme } = useMantineColorScheme(), colorMode = colorScheme !== "auto" ? colorScheme : void 0;
34637
33832
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -34671,33 +33866,27 @@ function XYFlowWrapper({
34671
33866
  selectionKeyCode: null
34672
33867
  },
34673
33868
  nodesDraggable,
34674
- ...nodesDraggable && layoutConstraints,
33869
+ ...nodesDraggable && {
33870
+ onNodeDragStart: layoutConstraints.onNodeDragStart,
33871
+ onNodeDrag: layoutConstraints.onNodeDrag,
33872
+ onNodeDragStop: layoutConstraints.onNodeDragStop
33873
+ },
34675
33874
  zoomOnDoubleClick: !1,
34676
33875
  elevateNodesOnSelect: !1,
34677
33876
  selectNodesOnDrag: !1,
33877
+ onDoubleClick: handlers.onDoubleClick,
34678
33878
  onPaneClick: handlers.onPaneClick,
34679
- ...editor.hasOnNodeClick && {
34680
- onNodeClick: handlers.onNodeClick
34681
- },
34682
- ...editor.hasOnEdgeClick && {
34683
- onEdgeClick: handlers.onEdgeClick
34684
- },
34685
33879
  onMoveEnd: handlers.onMoveEnd,
33880
+ onNodeMouseEnter: handlers.onNodeMouseEnter,
33881
+ onNodeMouseLeave: handlers.onNodeMouseLeave,
33882
+ onEdgeMouseEnter: handlers.onEdgeMouseEnter,
33883
+ onEdgeMouseLeave: handlers.onEdgeMouseLeave,
33884
+ onNodeClick: handlers.onNodeClick,
33885
+ onNodeDoubleClick: handlers.onNodeDoubleClick,
33886
+ onEdgeClick: handlers.onEdgeClick,
34686
33887
  onInit: () => {
34687
33888
  diagramApi.setState({ initialized: !0 }, !1, "initialized");
34688
33889
  },
34689
- onNodeMouseEnter: (_event, node) => {
34690
- diagramApi.getState().setHoveredNode(node.id);
34691
- },
34692
- onNodeMouseLeave: () => {
34693
- diagramApi.getState().setHoveredNode(null);
34694
- },
34695
- onEdgeMouseEnter: (_event, edge) => {
34696
- diagramApi.getState().setHoveredEdge(edge.id);
34697
- },
34698
- onEdgeMouseLeave: () => {
34699
- diagramApi.getState().setHoveredEdge(null);
34700
- },
34701
33890
  ...editor.hasOnNodeContextMenu && {
34702
33891
  onNodeContextMenu: handlers.onNodeContextMenu
34703
33892
  },
@@ -34765,6 +33954,8 @@ function LikeC4Diagram({
34765
33954
  {
34766
33955
  view,
34767
33956
  readonly,
33957
+ pannable,
33958
+ zoomable,
34768
33959
  fitViewEnabled: fitView2,
34769
33960
  fitViewPadding,
34770
33961
  showElementLinks,
@@ -34781,7 +33972,7 @@ function LikeC4Diagram({
34781
33972
  onCanvasDblClick,
34782
33973
  children: [
34783
33974
  /* @__PURE__ */ jsxRuntimeExports.jsx(
34784
- KeepAspectRatio,
33975
+ KeepAspectRatioContainer,
34785
33976
  {
34786
33977
  className: clsx(rootClassName, className),
34787
33978
  enabled: keepAspectRatio,
@@ -34801,8 +33992,6 @@ function LikeC4Diagram({
34801
33992
  controls,
34802
33993
  defaultNodes: initialRef.current.defaultNodes,
34803
33994
  defaultEdges: initialRef.current.defaultEdges,
34804
- pannable,
34805
- zoomable,
34806
33995
  children: readonly !== !0 && /* @__PURE__ */ jsxRuntimeExports.jsx(OptionsPanel2, {})
34807
33996
  }
34808
33997
  )
@@ -37037,22 +36226,22 @@ const ViewViewIdReactLegacyLazyImport = createFileRoute(
37037
36226
  path: "/react-legacy",
37038
36227
  getParentRoute: () => ViewViewIdRoute
37039
36228
  }).lazy(
37040
- () => import("./view._viewId.react-legacy.lazy-Cr471Itv.js").then((d2) => d2.Route)
36229
+ () => import("./view._viewId.react-legacy.lazy-DvQqUilU.js").then((d2) => d2.Route)
37041
36230
  ), ViewViewIdMmdLazyRoute = ViewViewIdMmdLazyImport.update({
37042
36231
  path: "/mmd",
37043
36232
  getParentRoute: () => ViewViewIdRoute
37044
36233
  }).lazy(
37045
- () => import("./view._viewId.mmd.lazy-AyTROblc.js").then((d2) => d2.Route)
36234
+ () => import("./view._viewId.mmd.lazy-o20hkhat.js").then((d2) => d2.Route)
37046
36235
  ), ViewViewIdDotLazyRoute = ViewViewIdDotLazyImport.update({
37047
36236
  path: "/dot",
37048
36237
  getParentRoute: () => ViewViewIdRoute
37049
36238
  }).lazy(
37050
- () => import("./view._viewId.dot.lazy-DDXp1Pjx.js").then((d2) => d2.Route)
36239
+ () => import("./view._viewId.dot.lazy-_gnghLVA.js").then((d2) => d2.Route)
37051
36240
  ), ViewViewIdD2LazyRoute = ViewViewIdD2LazyImport.update({
37052
36241
  path: "/d2",
37053
36242
  getParentRoute: () => ViewViewIdRoute
37054
36243
  }).lazy(
37055
- () => import("./view._viewId.d2.lazy-D9gktAvw.js").then((d2) => d2.Route)
36244
+ () => import("./view._viewId.d2.lazy-BX8VfXLS.js").then((d2) => d2.Route)
37056
36245
  ), ViewViewIdEditorRoute = Route2.update({
37057
36246
  path: "/editor",
37058
36247
  getParentRoute: () => ViewViewIdRoute
@@ -37103,41 +36292,35 @@ client.createRoot(document.getElementById("like4-root")).render(
37103
36292
  /* @__PURE__ */ jsxRuntimeExports.jsx(Routes, {})
37104
36293
  );
37105
36294
  export {
37106
- CopyButton as A,
36295
+ ActionIcon as A,
37107
36296
  Box$1 as B,
37108
- Color as C,
37109
- ActionIcon as D,
37110
- rem as E,
37111
- IconCopy as F,
36297
+ Code as C,
37112
36298
  IconCheck as I,
37113
36299
  React as R,
37114
36300
  ScrollArea as S,
37115
36301
  Tooltip as T,
37116
- Utils as U,
37117
36302
  useUnmountEffect$1 as a,
37118
36303
  useSyncedRef as b,
37119
36304
  useFirstMountState as c,
37120
- change$1 as d,
37121
- channels as e,
37122
- commonjsGlobal as f,
36305
+ commonjsGlobal as d,
36306
+ invariant$1 as e,
36307
+ useUpdateEffect$1 as f,
37123
36308
  getDefaultExportFromCjs as g,
37124
- scale$1 as h,
36309
+ nonNullable as h,
37125
36310
  isBrowser$1 as i,
37126
36311
  jsxRuntimeExports as j,
37127
- invariant$1 as k,
37128
- useUpdateEffect$1 as l,
37129
- nonNullable as m,
36312
+ defaultTheme as k,
36313
+ createLazyFileRoute as l,
36314
+ useRouter as m,
37130
36315
  nonexhaustive as n,
37131
- defaultTheme as o,
37132
- createLazyFileRoute as p,
37133
- useRouter as q,
36316
+ useLikeC4View as o,
36317
+ notFound as p,
36318
+ svgContainer as q,
37134
36319
  reactExports as r,
37135
36320
  schedulerExports as s,
37136
- toHex as t,
36321
+ React$1 as t,
37137
36322
  useRafCallback as u,
37138
- useLikeC4View as v,
37139
- notFound as w,
37140
- Code as x,
37141
- svgContainer as y,
37142
- React$1 as z
36323
+ CopyButton as v,
36324
+ rem as w,
36325
+ IconCopy as x
37143
36326
  };