import { jsx as w, jsxs as ve } from "react/jsx-runtime";
import * as x from "react";
import { createElement as Wt } from "react";
import { p as fe, q as me, r as U, _ as D, v as nt, O as Jt, A as Gt, w as Le, x as Ht, Q as Yt, l as de, y as Ie, P as r, R as ot, z as ge, D as Qe, U as Qt, I as rt, j as Zt, V as it, b as ue, e as te, t as en, h as tn, k as G, o as nn, J as on, g as rn, H as ce, W as sn, X as st, Y as ie, G as Ze, i as ln, K as an, S as cn, M as dn, N as un } from "./Stack-ThmeJzqr.js";
import { u as pn, a as fn, b as X } from "./useFormControl-Cj8rSR6R.js";
function mn(e) {
  return fe("MuiCollapse", e);
}
me("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
const In = ["addEndListener", "children", "className", "collapsedSize", "component", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "orientation", "style", "timeout", "TransitionComponent"], gn = (e) => {
  const {
    orientation: t,
    classes: n
  } = e, o = {
    root: ["root", `${t}`],
    entered: ["entered"],
    hidden: ["hidden"],
    wrapper: ["wrapper", `${t}`],
    wrapperInner: ["wrapperInner", `${t}`]
  };
  return ge(o, mn, n);
}, hn = U("div", {
  name: "MuiCollapse",
  slot: "Root",
  overridesResolver: (e, t) => {
    const {
      ownerState: n
    } = e;
    return [t.root, t[n.orientation], n.state === "entered" && t.entered, n.state === "exited" && !n.in && n.collapsedSize === "0px" && t.hidden];
  }
})(({
  theme: e,
  ownerState: t
}) => D({
  height: 0,
  overflow: "hidden",
  transition: e.transitions.create("height")
}, t.orientation === "horizontal" && {
  height: "auto",
  width: 0,
  transition: e.transitions.create("width")
}, t.state === "entered" && D({
  height: "auto",
  overflow: "visible"
}, t.orientation === "horizontal" && {
  width: "auto"
}), t.state === "exited" && !t.in && t.collapsedSize === "0px" && {
  visibility: "hidden"
})), bn = U("div", {
  name: "MuiCollapse",
  slot: "Wrapper",
  overridesResolver: (e, t) => t.wrapper
})(({
  ownerState: e
}) => D({
  // Hack to get children with a negative margin to not falsify the height computation.
  display: "flex",
  width: "100%"
}, e.orientation === "horizontal" && {
  width: "auto",
  height: "100%"
})), yn = U("div", {
  name: "MuiCollapse",
  slot: "WrapperInner",
  overridesResolver: (e, t) => t.wrapperInner
})(({
  ownerState: e
}) => D({
  width: "100%"
}, e.orientation === "horizontal" && {
  width: "auto",
  height: "100%"
})), Ne = /* @__PURE__ */ x.forwardRef(function(t, n) {
  const o = nt({
    props: t,
    name: "MuiCollapse"
  }), {
    addEndListener: l,
    children: p,
    className: c,
    collapsedSize: i = "0px",
    component: u,
    easing: d,
    in: s,
    onEnter: a,
    onEntered: m,
    onEntering: I,
    onExit: h,
    onExited: f,
    onExiting: g,
    orientation: b = "vertical",
    style: y,
    timeout: C = Jt.standard,
    // eslint-disable-next-line react/prop-types
    TransitionComponent: k = Gt
  } = o, T = Le(o, In), v = D({}, o, {
    orientation: b,
    collapsedSize: i
  }), M = gn(v), B = Ht(), K = Yt(), V = x.useRef(null), F = x.useRef(), _ = typeof i == "number" ? `${i}px` : i, j = b === "horizontal", q = j ? "width" : "height", L = x.useRef(null), H = de(n, L), N = (S) => ($) => {
    if (S) {
      const z = L.current;
      $ === void 0 ? S(z) : S(z, $);
    }
  }, W = () => V.current ? V.current[j ? "clientWidth" : "clientHeight"] : 0, P = N((S, $) => {
    V.current && j && (V.current.style.position = "absolute"), S.style[q] = _, a && a(S, $);
  }), O = N((S, $) => {
    const z = W();
    V.current && j && (V.current.style.position = "");
    const {
      duration: A,
      easing: Y
    } = Qe({
      style: y,
      timeout: C,
      easing: d
    }, {
      mode: "enter"
    });
    if (C === "auto") {
      const xe = B.transitions.getAutoHeightDuration(z);
      S.style.transitionDuration = `${xe}ms`, F.current = xe;
    } else
      S.style.transitionDuration = typeof A == "string" ? A : `${A}ms`;
    S.style[q] = `${z}px`, S.style.transitionTimingFunction = Y, I && I(S, $);
  }), ne = N((S, $) => {
    S.style[q] = "auto", m && m(S, $);
  }), ye = N((S) => {
    S.style[q] = `${W()}px`, h && h(S);
  }), Me = N(f), ke = N((S) => {
    const $ = W(), {
      duration: z,
      easing: A
    } = Qe({
      style: y,
      timeout: C,
      easing: d
    }, {
      mode: "exit"
    });
    if (C === "auto") {
      const Y = B.transitions.getAutoHeightDuration($);
      S.style.transitionDuration = `${Y}ms`, F.current = Y;
    } else
      S.style.transitionDuration = typeof z == "string" ? z : `${z}ms`;
    S.style[q] = _, S.style.transitionTimingFunction = A, g && g(S);
  });
  return /* @__PURE__ */ w(k, D({
    in: s,
    onEnter: P,
    onEntered: ne,
    onEntering: O,
    onExit: ye,
    onExited: Me,
    onExiting: ke,
    addEndListener: (S) => {
      C === "auto" && K.start(F.current || 0, S), l && l(L.current, S);
    },
    nodeRef: L,
    timeout: C === "auto" ? null : C
  }, T, {
    children: (S, $) => /* @__PURE__ */ w(hn, D({
      as: u,
      className: Ie(M.root, c, {
        entered: M.entered,
        exited: !s && _ === "0px" && M.hidden
      }[S]),
      style: D({
        [j ? "minWidth" : "minHeight"]: _
      }, y),
      ref: H
    }, $, {
      // `ownerState` is set after `childProps` to override any existing `ownerState` property in `childProps`
      // that might have been forwarded from the Transition component.
      ownerState: D({}, v, {
        state: S
      }),
      children: /* @__PURE__ */ w(bn, {
        ownerState: D({}, v, {
          state: S
        }),
        className: M.wrapper,
        ref: V,
        children: /* @__PURE__ */ w(yn, {
          ownerState: D({}, v, {
            state: S
          }),
          className: M.wrapperInner,
          children: p
        })
      })
    }))
  }));
});
process.env.NODE_ENV !== "production" && (Ne.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * Add a custom transition end trigger. Called with the transitioning DOM
   * node and a done callback. Allows for more fine grained transition end
   * logic. Note: Timeouts are still used as a fallback if provided.
   */
  addEndListener: r.func,
  /**
   * The content node to be collapsed.
   */
  children: r.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: r.object,
  /**
   * @ignore
   */
  className: r.string,
  /**
   * The width (horizontal) or height (vertical) of the container when collapsed.
   * @default '0px'
   */
  collapsedSize: r.oneOfType([r.number, r.string]),
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: ot,
  /**
   * The transition timing function.
   * You may specify a single easing or a object containing enter and exit values.
   */
  easing: r.oneOfType([r.shape({
    enter: r.string,
    exit: r.string
  }), r.string]),
  /**
   * If `true`, the component will transition in.
   */
  in: r.bool,
  /**
   * @ignore
   */
  onEnter: r.func,
  /**
   * @ignore
   */
  onEntered: r.func,
  /**
   * @ignore
   */
  onEntering: r.func,
  /**
   * @ignore
   */
  onExit: r.func,
  /**
   * @ignore
   */
  onExited: r.func,
  /**
   * @ignore
   */
  onExiting: r.func,
  /**
   * The transition orientation.
   * @default 'vertical'
   */
  orientation: r.oneOf(["horizontal", "vertical"]),
  /**
   * @ignore
   */
  style: r.object,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
  /**
   * The duration for the transition, in milliseconds.
   * You may specify a single timeout for all transitions, or individually with an object.
   *
   * Set to 'auto' to automatically calculate transition time based on height.
   * @default duration.standard
   */
  timeout: r.oneOfType([r.oneOf(["auto"]), r.number, r.shape({
    appear: r.number,
    enter: r.number,
    exit: r.number
  })])
});
Ne.muiSupportAuto = !0;
function xn(e) {
  return fe("PrivateSwitchBase", e);
}
me("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
const En = ["autoFocus", "checked", "checkedIcon", "className", "defaultChecked", "disabled", "disableFocusRipple", "edge", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"], Cn = (e) => {
  const {
    classes: t,
    checked: n,
    disabled: o,
    edge: l
  } = e, p = {
    root: ["root", n && "checked", o && "disabled", l && `edge${ue(l)}`],
    input: ["input"]
  };
  return ge(p, xn, t);
}, Tn = U(Qt)(({
  ownerState: e
}) => D({
  padding: 9,
  borderRadius: "50%"
}, e.edge === "start" && {
  marginLeft: e.size === "small" ? -3 : -12
}, e.edge === "end" && {
  marginRight: e.size === "small" ? -3 : -12
})), wn = U("input", {
  shouldForwardProp: rt
})({
  cursor: "inherit",
  position: "absolute",
  opacity: 0,
  width: "100%",
  height: "100%",
  top: 0,
  left: 0,
  margin: 0,
  padding: 0,
  zIndex: 1
}), lt = /* @__PURE__ */ x.forwardRef(function(t, n) {
  const {
    autoFocus: o,
    checked: l,
    checkedIcon: p,
    className: c,
    defaultChecked: i,
    disabled: u,
    disableFocusRipple: d = !1,
    edge: s = !1,
    icon: a,
    id: m,
    inputProps: I,
    inputRef: h,
    name: f,
    onBlur: g,
    onChange: b,
    onFocus: y,
    readOnly: C,
    required: k = !1,
    tabIndex: T,
    type: v,
    value: M
  } = t, B = Le(t, En), [K, V] = Zt({
    controlled: l,
    default: !!i,
    name: "SwitchBase",
    state: "checked"
  }), F = pn(), _ = (P) => {
    y && y(P), F && F.onFocus && F.onFocus(P);
  }, j = (P) => {
    g && g(P), F && F.onBlur && F.onBlur(P);
  }, q = (P) => {
    if (P.nativeEvent.defaultPrevented)
      return;
    const O = P.target.checked;
    V(O), b && b(P, O);
  };
  let L = u;
  F && typeof L > "u" && (L = F.disabled);
  const H = v === "checkbox" || v === "radio", N = D({}, t, {
    checked: K,
    disabled: L,
    disableFocusRipple: d,
    edge: s
  }), W = Cn(N);
  return /* @__PURE__ */ ve(Tn, D({
    component: "span",
    className: Ie(W.root, c),
    centerRipple: !0,
    focusRipple: !d,
    disabled: L,
    tabIndex: null,
    role: void 0,
    onFocus: _,
    onBlur: j,
    ownerState: N,
    ref: n
  }, B, {
    children: [/* @__PURE__ */ w(wn, D({
      autoFocus: o,
      checked: l,
      defaultChecked: i,
      className: W.input,
      disabled: L,
      id: H ? m : void 0,
      name: f,
      onChange: q,
      readOnly: C,
      ref: h,
      required: k,
      ownerState: N,
      tabIndex: T,
      type: v
    }, v === "checkbox" && M === void 0 ? {} : {
      value: M
    }, I)), K ? p : a]
  }));
});
process.env.NODE_ENV !== "production" && (lt.propTypes = {
  /**
   * If `true`, the `input` element is focused during the first mount.
   */
  autoFocus: r.bool,
  /**
   * If `true`, the component is checked.
   */
  checked: r.bool,
  /**
   * The icon to display when the component is checked.
   */
  checkedIcon: r.node.isRequired,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: r.object,
  /**
   * @ignore
   */
  className: r.string,
  /**
   * @ignore
   */
  defaultChecked: r.bool,
  /**
   * If `true`, the component is disabled.
   */
  disabled: r.bool,
  /**
   * If `true`, the  keyboard focus ripple is disabled.
   * @default false
   */
  disableFocusRipple: r.bool,
  /**
   * If given, uses a negative margin to counteract the padding on one
   * side (this is often helpful for aligning the left or right
   * side of the icon with content above or below, without ruining the border
   * size and shape).
   * @default false
   */
  edge: r.oneOf(["end", "start", !1]),
  /**
   * The icon to display when the component is unchecked.
   */
  icon: r.node.isRequired,
  /**
   * The id of the `input` element.
   */
  id: r.string,
  /**
   * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
   */
  inputProps: r.object,
  /**
   * Pass a ref to the `input` element.
   */
  inputRef: it,
  /*
   * @ignore
   */
  name: r.string,
  /**
   * @ignore
   */
  onBlur: r.func,
  /**
   * Callback fired when the state is changed.
   *
   * @param {object} event The event source of the callback.
   * You can pull out the new checked state by accessing `event.target.checked` (boolean).
   */
  onChange: r.func,
  /**
   * @ignore
   */
  onFocus: r.func,
  /**
   * It prevents the user from changing the value of the field
   * (not from interacting with the field).
   */
  readOnly: r.bool,
  /**
   * If `true`, the `input` element is required.
   */
  required: r.bool,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: r.object,
  /**
   * @ignore
   */
  tabIndex: r.oneOfType([r.number, r.string]),
  /**
   * The input component prop `type`.
   */
  type: r.string.isRequired,
  /**
   * The value of the component.
   */
  value: r.any
});
const vn = te(/* @__PURE__ */ w("path", {
  d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
}), "CheckBoxOutlineBlank"), Sn = te(/* @__PURE__ */ w("path", {
  d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
}), "CheckBox"), Rn = te(/* @__PURE__ */ w("path", {
  d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
}), "IndeterminateCheckBox");
function Mn(e) {
  return fe("MuiCheckbox", e);
}
const Ae = me("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]), kn = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size", "className"], Pn = (e) => {
  const {
    classes: t,
    indeterminate: n,
    color: o,
    size: l
  } = e, p = {
    root: ["root", n && "indeterminate", `color${ue(o)}`, `size${ue(l)}`]
  }, c = ge(p, Mn, t);
  return D({}, t, c);
}, On = U(lt, {
  shouldForwardProp: (e) => rt(e) || e === "classes",
  name: "MuiCheckbox",
  slot: "Root",
  overridesResolver: (e, t) => {
    const {
      ownerState: n
    } = e;
    return [t.root, n.indeterminate && t.indeterminate, t[`size${ue(n.size)}`], n.color !== "default" && t[`color${ue(n.color)}`]];
  }
})(({
  theme: e,
  ownerState: t
}) => D({
  color: (e.vars || e).palette.text.secondary
}, !t.disableRipple && {
  "&:hover": {
    backgroundColor: e.vars ? `rgba(${t.color === "default" ? e.vars.palette.action.activeChannel : e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : en(t.color === "default" ? e.palette.action.active : e.palette[t.color].main, e.palette.action.hoverOpacity),
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: "transparent"
    }
  }
}, t.color !== "default" && {
  [`&.${Ae.checked}, &.${Ae.indeterminate}`]: {
    color: (e.vars || e).palette[t.color].main
  },
  [`&.${Ae.disabled}`]: {
    color: (e.vars || e).palette.action.disabled
  }
})), Dn = /* @__PURE__ */ w(Sn, {}), Vn = /* @__PURE__ */ w(vn, {}), An = /* @__PURE__ */ w(Rn, {}), at = /* @__PURE__ */ x.forwardRef(function(t, n) {
  var o, l;
  const p = nt({
    props: t,
    name: "MuiCheckbox"
  }), {
    checkedIcon: c = Dn,
    color: i = "primary",
    icon: u = Vn,
    indeterminate: d = !1,
    indeterminateIcon: s = An,
    inputProps: a,
    size: m = "medium",
    className: I
  } = p, h = Le(p, kn), f = d ? s : u, g = d ? s : c, b = D({}, p, {
    color: i,
    indeterminate: d,
    size: m
  }), y = Pn(b);
  return /* @__PURE__ */ w(On, D({
    type: "checkbox",
    inputProps: D({
      "data-indeterminate": d
    }, a),
    icon: /* @__PURE__ */ x.cloneElement(f, {
      fontSize: (o = f.props.fontSize) != null ? o : m
    }),
    checkedIcon: /* @__PURE__ */ x.cloneElement(g, {
      fontSize: (l = g.props.fontSize) != null ? l : m
    }),
    ownerState: b,
    ref: n,
    className: Ie(y.root, I)
  }, h, {
    classes: y
  }));
});
process.env.NODE_ENV !== "production" && (at.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * If `true`, the component is checked.
   */
  checked: r.bool,
  /**
   * The icon to display when the component is checked.
   * @default <CheckBoxIcon />
   */
  checkedIcon: r.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: r.object,
  /**
   * @ignore
   */
  className: r.string,
  /**
   * The color of the component.
   * It supports both default and custom theme colors, which can be added as shown in the
   * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
   * @default 'primary'
   */
  color: r.oneOfType([r.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), r.string]),
  /**
   * The default checked state. Use when the component is not controlled.
   */
  defaultChecked: r.bool,
  /**
   * If `true`, the component is disabled.
   * @default false
   */
  disabled: r.bool,
  /**
   * If `true`, the ripple effect is disabled.
   * @default false
   */
  disableRipple: r.bool,
  /**
   * The icon to display when the component is unchecked.
   * @default <CheckBoxOutlineBlankIcon />
   */
  icon: r.node,
  /**
   * The id of the `input` element.
   */
  id: r.string,
  /**
   * If `true`, the component appears indeterminate.
   * This does not set the native input element to indeterminate due
   * to inconsistent behavior across browsers.
   * However, we set a `data-indeterminate` attribute on the `input`.
   * @default false
   */
  indeterminate: r.bool,
  /**
   * The icon to display when the component is indeterminate.
   * @default <IndeterminateCheckBoxIcon />
   */
  indeterminateIcon: r.node,
  /**
   * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
   */
  inputProps: r.object,
  /**
   * Pass a ref to the `input` element.
   */
  inputRef: it,
  /**
   * Callback fired when the state is changed.
   *
   * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
   * You can pull out the new checked state by accessing `event.target.checked` (boolean).
   */
  onChange: r.func,
  /**
   * If `true`, the `input` element is required.
   * @default false
   */
  required: r.bool,
  /**
   * The size of the component.
   * `small` is equivalent to the dense checkbox styling.
   * @default 'medium'
   */
  size: r.oneOfType([r.oneOf(["medium", "small"]), r.string]),
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
  /**
   * The value of the component. The DOM API casts this to a string.
   * The browser uses "on" as the default value.
   */
  value: r.any
});
const Fn = te(/* @__PURE__ */ w("path", {
  d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"
}), "Visibility"), $n = te(/* @__PURE__ */ w("path", {
  d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"
}), "VisibilityOff");
function E() {
  return E = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }, E.apply(null, arguments);
}
function ct(e) {
  return fn;
}
const et = /* @__PURE__ */ new Set();
function dt(e, t = "warning") {
  if (process.env.NODE_ENV === "production")
    return;
  const n = Array.isArray(e) ? e.join(`
`) : e;
  et.has(n) || (et.add(n), t === "error" ? console.error(n) : console.warn(n));
}
function Ln(e) {
  return fe("MuiSimpleTreeView", e);
}
me("MuiSimpleTreeView", ["root"]);
const Nn = (e, t) => {
  const n = x.useRef({}), [o, l] = x.useState(() => {
    const c = {};
    return e.forEach((i) => {
      i.models && Object.entries(i.models).forEach(([u, d]) => {
        n.current[u] = {
          isControlled: t[u] !== void 0,
          getDefaultValue: d.getDefaultValue
        }, c[u] = d.getDefaultValue(t);
      });
    }), c;
  }), p = Object.fromEntries(Object.entries(n.current).map(([c, i]) => {
    const u = t[c] ?? o[c];
    return [c, {
      value: u,
      setControlledValue: (d) => {
        i.isControlled || l((s) => E({}, s, {
          [c]: d
        }));
      }
    }];
  }));
  return process.env.NODE_ENV !== "production" && Object.entries(n.current).forEach(([c, i]) => {
    const u = t[c], d = i.getDefaultValue(t);
    x.useEffect(() => {
      i.isControlled !== (u !== void 0) && console.error([`MUI X: A component is changing the ${i.isControlled ? "" : "un"}controlled ${c} state of TreeView to be ${i.isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${c} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
`));
    }, [u]);
    const {
      current: s
    } = x.useRef(d);
    x.useEffect(() => {
      !i.isControlled && s !== d && console.error([`MUI X: A component is changing the default ${c} state of an uncontrolled TreeView after being initialized. To suppress this warning opt to use a controlled TreeView.`].join(`
`));
    }, [JSON.stringify(d)]);
  }), p;
};
class jn {
  constructor() {
    this.maxListeners = 20, this.warnOnce = !1, this.events = {};
  }
  on(t, n, o = {}) {
    let l = this.events[t];
    if (l || (l = {
      highPriority: /* @__PURE__ */ new Map(),
      regular: /* @__PURE__ */ new Map()
    }, this.events[t] = l), o.isFirst ? l.highPriority.set(n, !0) : l.regular.set(n, !0), process.env.NODE_ENV !== "production") {
      const p = l.highPriority.size + l.regular.size;
      p > this.maxListeners && !this.warnOnce && (this.warnOnce = !0, console.warn([`Possible EventEmitter memory leak detected. ${p} ${t} listeners added.`].join(`
`)));
    }
  }
  removeListener(t, n) {
    this.events[t] && (this.events[t].regular.delete(n), this.events[t].highPriority.delete(n));
  }
  removeAllListeners() {
    this.events = {};
  }
  emit(t, ...n) {
    const o = this.events[t];
    if (!o)
      return;
    const l = Array.from(o.highPriority.keys()), p = Array.from(o.regular.keys());
    for (let c = l.length - 1; c >= 0; c -= 1) {
      const i = l[c];
      o.highPriority.has(i) && i.apply(this, n);
    }
    for (let c = 0; c < p.length; c += 1) {
      const i = p[c];
      o.regular.has(i) && i.apply(this, n);
    }
  }
  once(t, n) {
    const o = this;
    this.on(t, function l(...p) {
      o.removeListener(t, l), n.apply(o, p);
    });
  }
}
const zn = (e) => e.isPropagationStopped !== void 0, ut = () => {
  const [e] = x.useState(() => new jn()), t = x.useCallback((...o) => {
    const [l, p, c = {}] = o;
    c.defaultMuiPrevented = !1, !(zn(c) && c.isPropagationStopped()) && e.emit(l, p, c);
  }, [e]), n = x.useCallback((o, l) => (e.on(o, l), () => {
    e.removeListener(o, l);
  }), [e]);
  return {
    instance: {
      $$publishEvent: t,
      $$subscribeEvent: n
    }
  };
};
ut.params = {};
const pt = ({
  plugins: e
}) => {
  const t = new Set(e);
  return {
    instance: {
      getAvailablePlugins: () => t
    }
  };
};
pt.params = {};
const ft = ({
  params: e
}) => {
  const t = tn(e.id), n = x.useCallback((o, l) => l ?? `${t}-${o}`, [t]);
  return {
    getRootProps: () => ({
      id: t
    }),
    instance: {
      getTreeItemIdAttribute: n
    }
  };
};
ft.params = {
  id: !0
};
const Bn = [ut, pt, ft];
function Q(e, t) {
  if (e == null) return {};
  var n = {};
  for (var o in e) if ({}.hasOwnProperty.call(e, o)) {
    if (t.includes(o)) continue;
    n[o] = e[o];
  }
  return n;
}
const _n = ["slots", "slotProps", "apiRef", "experimentalFeatures"], Un = (e) => {
  let {
    props: {
      slots: t,
      slotProps: n,
      apiRef: o,
      experimentalFeatures: l
    },
    plugins: p
  } = e, c = Q(e.props, _n);
  const i = {};
  p.forEach((a) => {
    Object.assign(i, a.params);
  });
  const u = {}, d = {};
  Object.keys(c).forEach((a) => {
    const m = c[a];
    i[a] ? u[a] = m : d[a] = m;
  });
  const s = p.reduce((a, m) => m.getDefaultizedParams ? m.getDefaultizedParams(a) : a, u);
  return {
    apiRef: o,
    forwardedProps: d,
    pluginParams: s,
    slots: t ?? {},
    slotProps: n ?? {},
    experimentalFeatures: l ?? {}
  };
}, Kn = ({
  plugins: e,
  instance: t,
  publicAPI: n,
  rootRef: o
}) => ({
  runItemPlugins: (i) => {
    let u = null, d = null;
    const s = [], a = {};
    e.forEach((h) => {
      if (!h.itemPlugin)
        return;
      const f = h.itemPlugin({
        props: i,
        rootRef: u,
        contentRef: d
      });
      f != null && f.rootRef && (u = f.rootRef), f != null && f.contentRef && (d = f.contentRef), f != null && f.propsEnhancers && (s.push(f.propsEnhancers), Object.keys(f.propsEnhancers).forEach((g) => {
        a[g] = !0;
      }));
    });
    const m = (h) => (f) => {
      const g = {};
      return s.forEach((b) => {
        const y = b[h];
        y != null && Object.assign(g, y(f));
      }), g;
    }, I = Object.fromEntries(Object.keys(a).map((h) => [h, m(h)]));
    return {
      contentRef: d,
      rootRef: u,
      propsEnhancers: I
    };
  },
  wrapItem: ({
    itemId: i,
    children: u
  }) => {
    let d = u;
    for (let s = e.length - 1; s >= 0; s -= 1) {
      const a = e[s];
      a.wrapItem && (d = a.wrapItem({
        itemId: i,
        children: d,
        instance: t
      }));
    }
    return d;
  },
  wrapRoot: ({
    children: i
  }) => {
    let u = i;
    for (let d = e.length - 1; d >= 0; d -= 1) {
      const s = e[d];
      s.wrapRoot && (u = s.wrapRoot({
        children: u,
        instance: t
      }));
    }
    return u;
  },
  instance: t,
  rootRef: o,
  publicAPI: n
});
function qn(e) {
  const t = x.useRef({});
  return e ? (e.current == null && (e.current = {}), e.current) : t.current;
}
const Xn = ({
  plugins: e,
  rootRef: t,
  props: n
}) => {
  const o = [...Bn, ...e], {
    pluginParams: l,
    forwardedProps: p,
    apiRef: c,
    experimentalFeatures: i,
    slots: u,
    slotProps: d
  } = Un({
    plugins: o,
    props: n
  }), s = Nn(o, l), m = x.useRef({}).current, I = qn(c), h = x.useRef(null), f = de(h, t), g = Kn({
    plugins: o,
    instance: m,
    publicAPI: I,
    rootRef: h
  }), [b, y] = x.useState(() => {
    const v = {};
    return o.forEach((M) => {
      M.getInitialState && Object.assign(v, M.getInitialState(l));
    }), v;
  }), C = [], k = (v) => {
    const M = v({
      instance: m,
      params: l,
      slots: u,
      slotProps: d,
      experimentalFeatures: i,
      state: b,
      setState: y,
      rootRef: h,
      models: s,
      plugins: o
    });
    M.getRootProps && C.push(M.getRootProps), M.publicAPI && Object.assign(I, M.publicAPI), M.instance && Object.assign(m, M.instance), M.contextValue && Object.assign(g, M.contextValue);
  };
  return o.forEach(k), {
    getRootProps: (v = {}) => {
      const M = E({
        role: "tree"
      }, p, v, {
        ref: f
      });
      return C.forEach((B) => {
        Object.assign(M, B(v));
      }), M;
    },
    rootRef: f,
    contextValue: g,
    instance: m
  };
}, je = /* @__PURE__ */ x.createContext(null);
process.env.NODE_ENV !== "production" && (je.displayName = "TreeViewContext");
function Wn(e) {
  const {
    value: t,
    children: n
  } = e;
  return /* @__PURE__ */ w(je.Provider, {
    value: t,
    children: t.wrapRoot({
      children: n
    })
  });
}
const le = () => {
  const e = x.useContext(je);
  if (e == null)
    throw new Error(["MUI X: Could not find the Tree View context.", "It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.", "This can also happen if you are bundling multiple versions of the Tree View."].join(`
`));
  return e;
}, mt = (e, t, n) => {
  e.$$publishEvent(t, n);
}, Z = "__TREE_VIEW_ROOT_PARENT_ID__", It = (e) => {
  const t = {};
  return e.forEach((n, o) => {
    t[n] = o;
  }), t;
}, se = /* @__PURE__ */ x.createContext(() => -1);
process.env.NODE_ENV !== "production" && (se.displayName = "TreeViewItemDepthContext");
const Jn = ["children"], gt = ({
  items: e,
  isItemDisabled: t,
  getItemLabel: n,
  getItemId: o
}) => {
  const l = {}, p = {}, c = {
    [Z]: []
  }, i = (d, s, a) => {
    var f, g;
    const m = o ? o(d) : d.id;
    if (m == null)
      throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", "An item was provided without id in the `items` prop:", JSON.stringify(d)].join(`
`));
    if (l[m] != null)
      throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", `Two items were provided with the same id in the \`items\` prop: "${m}"`].join(`
`));
    const I = n ? n(d) : d.label;
    if (I == null)
      throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.", "Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.", "An item was provided without label in the `items` prop:", JSON.stringify(d)].join(`
`));
    l[m] = {
      id: m,
      label: I,
      parentId: a,
      idAttribute: void 0,
      expandable: !!((f = d.children) != null && f.length),
      disabled: t ? t(d) : !1,
      depth: s
    }, p[m] = d;
    const h = a ?? Z;
    c[h] || (c[h] = []), c[h].push(m), (g = d.children) == null || g.forEach((b) => i(b, s + 1, m));
  };
  e.forEach((d) => i(d, 0, null));
  const u = {};
  return Object.keys(c).forEach((d) => {
    u[d] = It(c[d]);
  }), {
    itemMetaMap: l,
    itemMap: p,
    itemOrderedChildrenIds: c,
    itemChildrenIndexes: u
  };
}, he = ({
  instance: e,
  params: t,
  state: n,
  setState: o,
  experimentalFeatures: l
}) => {
  const p = x.useCallback((b) => n.items.itemMetaMap[b], [n.items.itemMetaMap]), c = x.useCallback((b) => n.items.itemMap[b], [n.items.itemMap]), i = x.useCallback(() => {
    const b = (y) => {
      const C = n.items.itemMap[y], k = Q(C, Jn), T = n.items.itemOrderedChildrenIds[y];
      return T && (k.children = T.map(b)), k;
    };
    return n.items.itemOrderedChildrenIds[Z].map(b);
  }, [n.items.itemMap, n.items.itemOrderedChildrenIds]), u = x.useCallback((b) => {
    if (b == null)
      return !1;
    let y = e.getItemMeta(b);
    if (!y)
      return !1;
    if (y.disabled)
      return !0;
    for (; y.parentId != null; )
      if (y = e.getItemMeta(y.parentId), y.disabled)
        return !0;
    return !1;
  }, [e]), d = x.useCallback((b) => {
    const y = e.getItemMeta(b).parentId ?? Z;
    return n.items.itemChildrenIndexes[y][b];
  }, [e, n.items.itemChildrenIndexes]), s = x.useCallback((b) => n.items.itemOrderedChildrenIds[b ?? Z] ?? [], [n.items.itemOrderedChildrenIds]), a = (b) => {
    const y = e.getItemMeta(b);
    return y == null ? null : document.getElementById(e.getTreeItemIdAttribute(b, y.idAttribute));
  }, m = (b) => t.disabledItemsFocusable ? !0 : !e.isItemDisabled(b), I = x.useRef(!1), h = x.useCallback(() => {
    I.current = !0;
  }, []), f = x.useCallback(() => I.current, []);
  return x.useEffect(() => {
    e.areItemUpdatesPrevented() || o((b) => {
      const y = gt({
        items: t.items,
        isItemDisabled: t.isItemDisabled,
        getItemId: t.getItemId,
        getItemLabel: t.getItemLabel
      });
      return Object.values(b.items.itemMetaMap).forEach((C) => {
        y.itemMetaMap[C.id] || mt(e, "removeItem", {
          id: C.id
        });
      }), E({}, b, {
        items: y
      });
    });
  }, [e, o, t.items, t.isItemDisabled, t.getItemId, t.getItemLabel]), {
    getRootProps: () => ({
      style: {
        "--TreeView-itemChildrenIndentation": typeof t.itemChildrenIndentation == "number" ? `${t.itemChildrenIndentation}px` : t.itemChildrenIndentation
      }
    }),
    publicAPI: {
      getItem: c,
      getItemDOMElement: a,
      getItemTree: i,
      getItemOrderedChildrenIds: s
    },
    instance: {
      getItemMeta: p,
      getItem: c,
      getItemTree: i,
      getItemsToRender: () => {
        const b = (y) => {
          var k;
          const C = n.items.itemMetaMap[y];
          return {
            label: C.label,
            itemId: C.id,
            id: C.idAttribute,
            children: (k = n.items.itemOrderedChildrenIds[y]) == null ? void 0 : k.map(b)
          };
        };
        return n.items.itemOrderedChildrenIds[Z].map(b);
      },
      getItemIndex: d,
      getItemDOMElement: a,
      getItemOrderedChildrenIds: s,
      isItemDisabled: u,
      isItemNavigable: m,
      preventItemUpdates: h,
      areItemUpdatesPrevented: f
    },
    contextValue: {
      items: {
        onItemClick: t.onItemClick,
        disabledItemsFocusable: t.disabledItemsFocusable,
        indentationAtItemLevel: l.indentationAtItemLevel ?? !1
      }
    }
  };
};
he.getInitialState = (e) => ({
  items: gt({
    items: e.items,
    isItemDisabled: e.isItemDisabled,
    getItemId: e.getItemId,
    getItemLabel: e.getItemLabel
  })
});
he.getDefaultizedParams = (e) => E({}, e, {
  disabledItemsFocusable: e.disabledItemsFocusable ?? !1,
  itemChildrenIndentation: e.itemChildrenIndentation ?? "12px"
});
he.wrapRoot = ({
  children: e,
  instance: t
}) => /* @__PURE__ */ w(se.Provider, {
  value: (n) => {
    var o;
    return ((o = t.getItemMeta(n)) == null ? void 0 : o.depth) ?? 0;
  },
  children: e
});
he.params = {
  disabledItemsFocusable: !0,
  items: !0,
  isItemDisabled: !0,
  getItemLabel: !0,
  getItemId: !0,
  onItemClick: !0,
  itemChildrenIndentation: !0
};
const Se = ({
  instance: e,
  params: t,
  models: n
}) => {
  const o = x.useMemo(() => {
    const a = /* @__PURE__ */ new Map();
    return n.expandedItems.value.forEach((m) => {
      a.set(m, !0);
    }), a;
  }, [n.expandedItems.value]), l = (a, m) => {
    var I;
    (I = t.onExpandedItemsChange) == null || I.call(t, a, m), n.expandedItems.setControlledValue(m);
  }, p = x.useCallback((a) => o.has(a), [o]), c = x.useCallback((a) => {
    var m;
    return !!((m = e.getItemMeta(a)) != null && m.expandable);
  }, [e]), i = G((a, m) => {
    const I = e.isItemExpanded(m);
    e.setItemExpansion(a, m, !I);
  }), u = G((a, m, I) => {
    if (e.isItemExpanded(m) === I)
      return;
    let f;
    I ? f = [m].concat(n.expandedItems.value) : f = n.expandedItems.value.filter((g) => g !== m), t.onItemExpansionToggle && t.onItemExpansionToggle(a, m, I), l(a, f);
  }), d = (a, m) => {
    const I = e.getItemMeta(m), f = e.getItemOrderedChildrenIds(I.parentId).filter((b) => e.isItemExpandable(b) && !e.isItemExpanded(b)), g = n.expandedItems.value.concat(f);
    f.length > 0 && (t.onItemExpansionToggle && f.forEach((b) => {
      t.onItemExpansionToggle(a, b, !0);
    }), l(a, g));
  }, s = x.useMemo(() => t.expansionTrigger ? t.expansionTrigger : e.isTreeViewEditable ? "iconContainer" : "content", [t.expansionTrigger, e.isTreeViewEditable]);
  return {
    publicAPI: {
      setItemExpansion: u
    },
    instance: {
      isItemExpanded: p,
      isItemExpandable: c,
      setItemExpansion: u,
      toggleItemExpansion: i,
      expandAllSiblings: d
    },
    contextValue: {
      expansion: {
        expansionTrigger: s
      }
    }
  };
};
Se.models = {
  expandedItems: {
    getDefaultValue: (e) => e.defaultExpandedItems
  }
};
const Gn = [];
Se.getDefaultizedParams = (e) => E({}, e, {
  defaultExpandedItems: e.defaultExpandedItems ?? Gn
});
Se.params = {
  expandedItems: !0,
  defaultExpandedItems: !0,
  onExpandedItemsChange: !0,
  onItemExpansionToggle: !0,
  expansionTrigger: !0
};
const ht = (e, t) => {
  let n = t.length - 1;
  for (; n >= 0 && !e.isItemNavigable(t[n]); )
    n -= 1;
  if (n !== -1)
    return t[n];
}, bt = (e, t) => {
  const n = e.getItemMeta(t), o = e.getItemOrderedChildrenIds(n.parentId), l = e.getItemIndex(t);
  if (l === 0)
    return n.parentId;
  let p = l - 1;
  for (; !e.isItemNavigable(o[p]) && p >= 0; )
    p -= 1;
  if (p === -1)
    return n.parentId == null ? null : bt(e, n.parentId);
  let c = o[p], i = ht(e, e.getItemOrderedChildrenIds(c));
  for (; e.isItemExpanded(c) && i != null; )
    c = i, i = e.getItemOrderedChildrenIds(c).find(e.isItemNavigable);
  return c;
}, Ce = (e, t) => {
  if (e.isItemExpanded(t)) {
    const o = e.getItemOrderedChildrenIds(t).find(e.isItemNavigable);
    if (o != null)
      return o;
  }
  let n = e.getItemMeta(t);
  for (; n != null; ) {
    const o = e.getItemOrderedChildrenIds(n.parentId), l = e.getItemIndex(n.id);
    if (l < o.length - 1) {
      let p = l + 1;
      for (; !e.isItemNavigable(o[p]) && p < o.length - 1; )
        p += 1;
      if (e.isItemNavigable(o[p]))
        return o[p];
    }
    n = e.getItemMeta(n.parentId);
  }
  return null;
}, yt = (e) => {
  let t = null;
  for (; t == null || e.isItemExpanded(t); ) {
    const n = e.getItemOrderedChildrenIds(t), o = ht(e, n);
    if (o == null)
      return t;
    t = o;
  }
  return t;
}, pe = (e) => e.getItemOrderedChildrenIds(null).find(e.isItemNavigable), xt = (e, t, n) => {
  if (t === n)
    return [t, n];
  const o = e.getItemMeta(t), l = e.getItemMeta(n);
  if (o.parentId === l.id || l.parentId === o.id)
    return l.parentId === o.id ? [o.id, l.id] : [l.id, o.id];
  const p = [o.id], c = [l.id];
  let i = o.parentId, u = l.parentId, d = c.indexOf(i) !== -1, s = p.indexOf(u) !== -1, a = !0, m = !0;
  for (; !s && !d; )
    a && (p.push(i), d = c.indexOf(i) !== -1, a = i !== null, !d && a && (i = e.getItemMeta(i).parentId)), m && !d && (c.push(u), s = p.indexOf(u) !== -1, m = u !== null, !s && m && (u = e.getItemMeta(u).parentId));
  const I = d ? i : u, h = e.getItemOrderedChildrenIds(I), f = p[p.indexOf(I) - 1], g = c[c.indexOf(I) - 1];
  return h.indexOf(f) < h.indexOf(g) ? [t, n] : [n, t];
}, Hn = (e, t, n) => {
  const o = (u) => {
    if (e.isItemExpandable(u) && e.isItemExpanded(u))
      return e.getItemOrderedChildrenIds(u)[0];
    let d = e.getItemMeta(u);
    for (; d != null; ) {
      const s = e.getItemOrderedChildrenIds(d.parentId), a = e.getItemIndex(d.id);
      if (a < s.length - 1)
        return s[a + 1];
      d = e.getItemMeta(d.parentId);
    }
    throw new Error("Invalid range");
  }, [l, p] = xt(e, t, n), c = [l];
  let i = l;
  for (; i !== p; )
    i = o(i), e.isItemDisabled(i) || c.push(i);
  return c;
}, Yn = (e) => {
  let t = pe(e);
  const n = [];
  for (; t != null; )
    n.push(t), t = Ce(e, t);
  return n;
}, $e = (e, t) => t !== e.closest('*[role="treeitem"]'), Te = (e) => Array.isArray(e) ? e : e != null ? [e] : [], Fe = (e) => {
  const t = {};
  return e.forEach((n) => {
    t[n] = !0;
  }), t;
}, Re = ({
  instance: e,
  params: t,
  models: n
}) => {
  const o = x.useRef(null), l = x.useRef({}), p = x.useMemo(() => {
    const f = /* @__PURE__ */ new Map();
    return Array.isArray(n.selectedItems.value) ? n.selectedItems.value.forEach((g) => {
      f.set(g, !0);
    }) : n.selectedItems.value != null && f.set(n.selectedItems.value, !0), f;
  }, [n.selectedItems.value]), c = (f, g) => {
    if (t.onItemSelectionToggle)
      if (t.multiSelect) {
        const b = g.filter((C) => !e.isItemSelected(C)), y = n.selectedItems.value.filter((C) => !g.includes(C));
        b.forEach((C) => {
          t.onItemSelectionToggle(f, C, !0);
        }), y.forEach((C) => {
          t.onItemSelectionToggle(f, C, !1);
        });
      } else g !== n.selectedItems.value && (n.selectedItems.value != null && t.onItemSelectionToggle(f, n.selectedItems.value, !1), g != null && t.onItemSelectionToggle(f, g, !0));
    t.onSelectedItemsChange && t.onSelectedItemsChange(f, g), n.selectedItems.setControlledValue(g);
  }, i = (f) => p.has(f), u = ({
    event: f,
    itemId: g,
    keepExistingSelection: b = !1,
    shouldBeSelected: y
  }) => {
    if (t.disableSelection)
      return;
    let C;
    if (b) {
      const k = Te(n.selectedItems.value), T = e.isItemSelected(g);
      T && (y === !1 || y == null) ? C = k.filter((v) => v !== g) : !T && (y === !0 || y == null) ? C = [g].concat(k) : C = k;
    } else
      y === !1 || y == null && e.isItemSelected(g) ? C = t.multiSelect ? [] : null : C = t.multiSelect ? [g] : g;
    c(f, C), o.current = g, l.current = {};
  }, d = (f, [g, b]) => {
    if (t.disableSelection || !t.multiSelect)
      return;
    let y = Te(n.selectedItems.value).slice();
    Object.keys(l.current).length > 0 && (y = y.filter((v) => !l.current[v]));
    const C = Fe(y), k = Hn(e, g, b), T = k.filter((v) => !C[v]);
    y = y.concat(T), c(f, y), l.current = Fe(k);
  };
  return {
    getRootProps: () => ({
      "aria-multiselectable": t.multiSelect
    }),
    publicAPI: {
      selectItem: u
    },
    instance: {
      isItemSelected: i,
      selectItem: u,
      selectAllNavigableItems: (f) => {
        if (t.disableSelection || !t.multiSelect)
          return;
        const g = Yn(e);
        c(f, g), l.current = Fe(g);
      },
      expandSelectionRange: (f, g) => {
        if (o.current != null) {
          const [b, y] = xt(e, g, o.current);
          d(f, [b, y]);
        }
      },
      selectRangeFromStartToItem: (f, g) => {
        d(f, [pe(e), g]);
      },
      selectRangeFromItemToEnd: (f, g) => {
        d(f, [g, yt(e)]);
      },
      selectItemFromArrowNavigation: (f, g, b) => {
        if (t.disableSelection || !t.multiSelect)
          return;
        let y = Te(n.selectedItems.value).slice();
        Object.keys(l.current).length === 0 ? (y.push(b), l.current = {
          [g]: !0,
          [b]: !0
        }) : (l.current[g] || (l.current = {}), l.current[b] ? (y = y.filter((C) => C !== g), delete l.current[g]) : (y.push(b), l.current[b] = !0)), c(f, y);
      }
    },
    contextValue: {
      selection: {
        multiSelect: t.multiSelect,
        checkboxSelection: t.checkboxSelection,
        disableSelection: t.disableSelection
      }
    }
  };
};
Re.models = {
  selectedItems: {
    getDefaultValue: (e) => e.defaultSelectedItems
  }
};
const Qn = [];
Re.getDefaultizedParams = (e) => E({}, e, {
  disableSelection: e.disableSelection ?? !1,
  multiSelect: e.multiSelect ?? !1,
  checkboxSelection: e.checkboxSelection ?? !1,
  defaultSelectedItems: e.defaultSelectedItems ?? (e.multiSelect ? Qn : null)
});
Re.params = {
  disableSelection: !0,
  multiSelect: !0,
  checkboxSelection: !0,
  defaultSelectedItems: !0,
  selectedItems: !0,
  onSelectedItemsChange: !0,
  onItemSelectionToggle: !0
};
const tt = 1e3;
class Zn {
  constructor(t = tt) {
    this.timeouts = /* @__PURE__ */ new Map(), this.cleanupTimeout = tt, this.cleanupTimeout = t;
  }
  register(t, n, o) {
    this.timeouts || (this.timeouts = /* @__PURE__ */ new Map());
    const l = setTimeout(() => {
      typeof n == "function" && n(), this.timeouts.delete(o.cleanupToken);
    }, this.cleanupTimeout);
    this.timeouts.set(o.cleanupToken, l);
  }
  unregister(t) {
    const n = this.timeouts.get(t.cleanupToken);
    n && (this.timeouts.delete(t.cleanupToken), clearTimeout(n));
  }
  reset() {
    this.timeouts && (this.timeouts.forEach((t, n) => {
      this.unregister({
        cleanupToken: n
      });
    }), this.timeouts = void 0);
  }
}
class eo {
  constructor() {
    this.registry = new FinalizationRegistry((t) => {
      typeof t == "function" && t();
    });
  }
  register(t, n, o) {
    this.registry.register(t, n, o);
  }
  unregister(t) {
    this.registry.unregister(t);
  }
  // eslint-disable-next-line class-methods-use-this
  reset() {
  }
}
class to {
}
function no(e) {
  let t = 0;
  return function(o, l, p) {
    e.registry === null && (e.registry = typeof FinalizationRegistry < "u" ? new eo() : new Zn());
    const [c] = x.useState(new to()), i = x.useRef(null), u = x.useRef();
    u.current = p;
    const d = x.useRef(null);
    if (!i.current && u.current) {
      const s = (a, m) => {
        var I;
        m.defaultMuiPrevented || (I = u.current) == null || I.call(u, a, m);
      };
      i.current = o.$$subscribeEvent(l, s), t += 1, d.current = {
        cleanupToken: t
      }, e.registry.register(
        c,
        // The callback below will be called once this reference stops being retained
        () => {
          var a;
          (a = i.current) == null || a.call(i), i.current = null, d.current = null;
        },
        d.current
      );
    } else !u.current && i.current && (i.current(), i.current = null, d.current && (e.registry.unregister(d.current), d.current = null));
    x.useEffect(() => {
      if (!i.current && u.current) {
        const s = (a, m) => {
          var I;
          m.defaultMuiPrevented || (I = u.current) == null || I.call(u, a, m);
        };
        i.current = o.$$subscribeEvent(l, s);
      }
      return d.current && e.registry && (e.registry.unregister(d.current), d.current = null), () => {
        var s;
        (s = i.current) == null || s.call(i), i.current = null;
      };
    }, [o, l]);
  };
}
const oo = {
  registry: null
}, ro = no(oo), Et = (e = document) => {
  const t = e.activeElement;
  return t ? t.shadowRoot ? Et(t.shadowRoot) : t : null;
};
function io(e) {
  return e.replace(/["\\]/g, "\\$&");
}
const so = (e, t) => {
  let n = Te(t).find((o) => {
    if (!e.isItemNavigable(o))
      return !1;
    const l = e.getItemMeta(o);
    return l && (l.parentId == null || e.isItemExpanded(l.parentId));
  });
  return n == null && (n = pe(e)), n;
}, ze = ({
  instance: e,
  params: t,
  state: n,
  setState: o,
  models: l,
  rootRef: p
}) => {
  const c = so(e, l.selectedItems.value), i = G((g) => {
    const b = typeof g == "function" ? g(n.focusedItemId) : g;
    n.focusedItemId !== b && o((y) => E({}, y, {
      focusedItemId: b
    }));
  }), u = x.useCallback(() => !!p.current && p.current.contains(Et(nn(p.current))), [p]), d = x.useCallback((g) => n.focusedItemId === g && u(), [n.focusedItemId, u]), s = (g) => {
    const b = e.getItemMeta(g);
    return b && (b.parentId == null || e.isItemExpanded(b.parentId));
  }, a = (g, b) => {
    const y = e.getItemDOMElement(b);
    y && y.focus(), i(b), t.onItemFocus && t.onItemFocus(g, b);
  }, m = G((g, b) => {
    s(b) && a(g, b);
  }), I = G(() => {
    if (n.focusedItemId == null)
      return;
    const g = e.getItemMeta(n.focusedItemId);
    if (g) {
      const b = document.getElementById(e.getTreeItemIdAttribute(n.focusedItemId, g.idAttribute));
      b && b.blur();
    }
    i(null);
  }), h = (g) => g === c;
  ro(e, "removeItem", ({
    id: g
  }) => {
    n.focusedItemId === g && a(null, c);
  });
  const f = (g) => (b) => {
    var y;
    (y = g.onFocus) == null || y.call(g, b), !b.defaultMuiPrevented && b.target === b.currentTarget && a(b, c);
  };
  return {
    getRootProps: (g) => ({
      onFocus: f(g)
    }),
    publicAPI: {
      focusItem: m
    },
    instance: {
      isItemFocused: d,
      canItemBeTabbed: h,
      focusItem: m,
      removeFocusedItem: I
    }
  };
};
ze.getInitialState = () => ({
  focusedItemId: null
});
ze.params = {
  onItemFocus: !0
};
const we = (e, t) => e.getAvailablePlugins().has(t), lo = ({
  props: e
}) => {
  const {
    instance: t
  } = le(), {
    label: n,
    itemId: o
  } = e, [l, p] = x.useState(n), c = t.isItemBeingEdited(o);
  return x.useEffect(() => {
    c || p(n);
  }, [c, n]), {
    propsEnhancers: {
      labelInput: ({
        externalEventHandlers: i,
        interactions: u
      }) => t.isItemEditable(o) ? {
        value: l ?? "",
        "data-element": "labelInput",
        onChange: (I) => {
          var h;
          (h = i.onChange) == null || h.call(i, I), p(I.target.value);
        },
        onKeyDown: (I) => {
          var f;
          if ((f = i.onKeyDown) == null || f.call(i, I), I.defaultMuiPrevented)
            return;
          const h = I.target;
          I.key === "Enter" && h.value ? u.handleSaveItemLabel(I, h.value) : I.key === "Escape" && u.handleCancelItemLabelEditing(I);
        },
        onBlur: (I) => {
          var h;
          (h = i.onBlur) == null || h.call(i, I), !I.defaultMuiPrevented && I.target.value && u.handleSaveItemLabel(I, I.target.value);
        },
        autoFocus: !0,
        type: "text"
      } : {}
    }
  };
}, ee = ({
  instance: e,
  state: t,
  setState: n,
  params: o,
  experimentalFeatures: l
}) => {
  process.env.NODE_ENV !== "production" && o.isItemEditable && !(l != null && l.labelEditing) && dt(["MUI X: The label editing feature requires the `labelEditing` experimental feature to be enabled.", "You can do it by passing `experimentalFeatures={{ labelEditing: true}}` to the `RichTreeViewPro` component.", "Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/editing/"]);
  const p = x.useRef(t.editedItemId), c = (m) => p.current === m, i = (m) => {
    n((I) => E({}, I, {
      editedItemId: m
    })), p.current = m;
  }, u = (m) => m === t.editedItemId, d = !!o.isItemEditable && !!l.labelEditing, s = (m) => {
    if (m == null || !d)
      return !1;
    const I = e.getItem(m);
    return I ? typeof o.isItemEditable == "function" ? o.isItemEditable(I) : !!o.isItemEditable : !1;
  }, a = (m, I) => {
    if (!I)
      throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.", "The label of an item cannot be empty.", m].join(`
`));
    n((h) => {
      const f = h.items.itemMetaMap[m];
      return f.label !== I ? E({}, h, {
        items: E({}, h.items, {
          itemMetaMap: E({}, h.items.itemMetaMap, {
            [m]: E({}, f, {
              label: I
            })
          })
        })
      }) : h;
    }), o.onItemLabelChange && o.onItemLabelChange(m, I);
  };
  return {
    instance: {
      setEditedItemId: i,
      isItemBeingEdited: u,
      updateItemLabel: a,
      isItemEditable: s,
      isTreeViewEditable: d,
      isItemBeingEditedRef: c
    },
    publicAPI: {
      updateItemLabel: a
    }
  };
};
ee.itemPlugin = lo;
ee.getInitialState = () => ({
  editedItemId: null
});
ee.params = {
  onItemLabelChange: !0,
  isItemEditable: !0
};
function ao(e) {
  return !!e && e.length === 1 && !!e.match(/\S/);
}
const Ct = ({
  instance: e,
  params: t,
  state: n
}) => {
  const o = on(), l = x.useRef({}), p = G((s) => {
    l.current = s(l.current);
  });
  x.useEffect(() => {
    if (e.areItemUpdatesPrevented())
      return;
    const s = {}, a = (m) => {
      s[m.id] = m.label.substring(0, 1).toLowerCase();
    };
    Object.values(n.items.itemMetaMap).forEach(a), l.current = s;
  }, [n.items.itemMetaMap, t.getItemId, e]);
  const c = (s, a) => {
    const m = a.toLowerCase(), I = (b) => {
      const y = Ce(e, b);
      return y === null ? pe(e) : y;
    };
    let h = null, f = I(s);
    const g = {};
    for (; h == null && !g[f]; )
      l.current[f] === m ? h = f : (g[f] = !0, f = I(f));
    return h;
  }, i = (s) => !t.disableSelection && !e.isItemDisabled(s), u = (s) => !e.isItemDisabled(s) && e.isItemExpandable(s);
  return {
    instance: {
      updateFirstCharMap: p,
      handleItemKeyDown: (s, a) => {
        if (s.defaultMuiPrevented || s.altKey || $e(s.target, s.currentTarget))
          return;
        const m = s.ctrlKey || s.metaKey, I = s.key;
        switch (!0) {
          case (I === " " && i(a)): {
            s.preventDefault(), t.multiSelect && s.shiftKey ? e.expandSelectionRange(s, a) : e.selectItem({
              event: s,
              itemId: a,
              keepExistingSelection: t.multiSelect,
              shouldBeSelected: t.multiSelect ? void 0 : !0
            });
            break;
          }
          case I === "Enter": {
            we(e, ee) && e.isItemEditable(a) && !e.isItemBeingEdited(a) ? e.setEditedItemId(a) : u(a) ? (e.toggleItemExpansion(s, a), s.preventDefault()) : i(a) && (t.multiSelect ? (s.preventDefault(), e.selectItem({
              event: s,
              itemId: a,
              keepExistingSelection: !0
            })) : e.isItemSelected(a) || (e.selectItem({
              event: s,
              itemId: a
            }), s.preventDefault()));
            break;
          }
          case I === "ArrowDown": {
            const h = Ce(e, a);
            h && (s.preventDefault(), e.focusItem(s, h), t.multiSelect && s.shiftKey && i(h) && e.selectItemFromArrowNavigation(s, a, h));
            break;
          }
          case I === "ArrowUp": {
            const h = bt(e, a);
            h && (s.preventDefault(), e.focusItem(s, h), t.multiSelect && s.shiftKey && i(h) && e.selectItemFromArrowNavigation(s, a, h));
            break;
          }
          case (I === "ArrowRight" && !o || I === "ArrowLeft" && o): {
            if (e.isItemExpanded(a)) {
              const h = Ce(e, a);
              h && (e.focusItem(s, h), s.preventDefault());
            } else u(a) && (e.toggleItemExpansion(s, a), s.preventDefault());
            break;
          }
          case (I === "ArrowLeft" && !o || I === "ArrowRight" && o): {
            if (u(a) && e.isItemExpanded(a))
              e.toggleItemExpansion(s, a), s.preventDefault();
            else {
              const h = e.getItemMeta(a).parentId;
              h && (e.focusItem(s, h), s.preventDefault());
            }
            break;
          }
          case I === "Home": {
            i(a) && t.multiSelect && m && s.shiftKey ? e.selectRangeFromStartToItem(s, a) : e.focusItem(s, pe(e)), s.preventDefault();
            break;
          }
          case I === "End": {
            i(a) && t.multiSelect && m && s.shiftKey ? e.selectRangeFromItemToEnd(s, a) : e.focusItem(s, yt(e)), s.preventDefault();
            break;
          }
          case I === "*": {
            e.expandAllSiblings(s, a), s.preventDefault();
            break;
          }
          case (I === "a" && m && t.multiSelect && !t.disableSelection): {
            e.selectAllNavigableItems(s), s.preventDefault();
            break;
          }
          case (!m && !s.shiftKey && ao(I)): {
            const h = c(a, I);
            h != null && (e.focusItem(s, h), s.preventDefault());
            break;
          }
        }
      }
    }
  };
};
Ct.params = {};
const Tt = ({
  slots: e,
  slotProps: t
}) => ({
  contextValue: {
    icons: {
      slots: {
        collapseIcon: e.collapseIcon,
        expandIcon: e.expandIcon,
        endIcon: e.endIcon
      },
      slotProps: {
        collapseIcon: t.collapseIcon,
        expandIcon: t.expandIcon,
        endIcon: t.endIcon
      }
    }
  }
});
Tt.params = {};
const Be = /* @__PURE__ */ x.createContext(null);
process.env.NODE_ENV !== "production" && (Be.displayName = "TreeViewChildrenItemContext");
function _e(e) {
  const {
    children: t,
    itemId: n = null
  } = e, {
    instance: o,
    rootRef: l
  } = le(), p = x.useRef(/* @__PURE__ */ new Map());
  x.useEffect(() => {
    if (!l.current)
      return;
    let i = null;
    if (n == null)
      i = l.current.id;
    else {
      const I = o.getItemMeta(n);
      I !== void 0 && (i = o.getTreeItemIdAttribute(n, I.idAttribute));
    }
    if (i == null)
      return;
    const u = o.getItemOrderedChildrenIds(n ?? null) ?? [], d = io(i), s = l.current.querySelectorAll(`${n == null ? "" : `*[id="${d}"] `}[role="treeitem"]:not(*[id="${d}"] [role="treeitem"] [role="treeitem"])`), a = Array.from(s).map((I) => p.current.get(I.id));
    (a.length !== u.length || a.some((I, h) => I !== u[h])) && o.setJSXItemsOrderedChildrenIds(n ?? null, a);
  });
  const c = x.useMemo(() => ({
    registerChild: (i, u) => p.current.set(i, u),
    unregisterChild: (i) => p.current.delete(i),
    parentId: n
  }), [n]);
  return /* @__PURE__ */ w(Be.Provider, {
    value: c,
    children: t
  });
}
process.env.NODE_ENV !== "production" && (_e.propTypes = {
  children: r.node,
  id: r.string
});
const be = ({
  instance: e,
  setState: t
}) => {
  e.preventItemUpdates();
  const n = G((p) => (t((c) => {
    if (c.items.itemMetaMap[p.id] != null)
      throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", `Two items were provided with the same id in the \`items\` prop: "${p.id}"`].join(`
`));
    return E({}, c, {
      items: E({}, c.items, {
        itemMetaMap: E({}, c.items.itemMetaMap, {
          [p.id]: p
        }),
        // For `SimpleTreeView`, we don't have a proper `item` object, so we create a very basic one.
        itemMap: E({}, c.items.itemMap, {
          [p.id]: {
            id: p.id,
            label: p.label
          }
        })
      })
    });
  }), () => {
    t((c) => {
      const i = E({}, c.items.itemMetaMap), u = E({}, c.items.itemMap);
      return delete i[p.id], delete u[p.id], E({}, c, {
        items: E({}, c.items, {
          itemMetaMap: i,
          itemMap: u
        })
      });
    }), mt(e, "removeItem", {
      id: p.id
    });
  })), o = (p, c) => {
    const i = p ?? Z;
    t((u) => E({}, u, {
      items: E({}, u.items, {
        itemOrderedChildrenIds: E({}, u.items.itemOrderedChildrenIds, {
          [i]: c
        }),
        itemChildrenIndexes: E({}, u.items.itemChildrenIndexes, {
          [i]: It(c)
        })
      })
    }));
  }, l = G((p, c) => (e.updateFirstCharMap((i) => (i[p] = c, i)), () => {
    e.updateFirstCharMap((i) => {
      const u = E({}, i);
      return delete u[p], u;
    });
  }));
  return {
    instance: {
      insertJSXItem: n,
      setJSXItemsOrderedChildrenIds: o,
      mapFirstCharFromJSX: l
    }
  };
}, wt = (e) => Array.isArray(e) ? e.length > 0 && e.some(wt) : !!e, co = ({
  props: e,
  rootRef: t,
  contentRef: n
}) => {
  const {
    instance: o
  } = le(), {
    children: l,
    disabled: p = !1,
    label: c,
    itemId: i,
    id: u
  } = e, d = x.useContext(Be);
  if (d == null)
    throw new Error(["MUI X: Could not find the Tree View Children Item context.", "It looks like you rendered your component outside of a SimpleTreeView parent component.", "This can also happen if you are bundling multiple versions of the Tree View."].join(`
`));
  const {
    registerChild: s,
    unregisterChild: a,
    parentId: m
  } = d, I = wt(l), h = x.useRef(null), f = de(h, n);
  return rn(() => {
    const g = o.getTreeItemIdAttribute(i, u);
    return s(g, i), () => {
      a(g);
    };
  }, [o, s, a, i, u]), x.useEffect(() => o.insertJSXItem({
    id: i,
    idAttribute: u,
    parentId: m,
    expandable: I,
    disabled: p
  }), [o, m, i, I, p, u]), x.useEffect(() => {
    var g;
    if (c)
      return o.mapFirstCharFromJSX(i, (((g = h.current) == null ? void 0 : g.textContent) ?? "").substring(0, 1).toLowerCase());
  }, [o, i, c]), {
    contentRef: f,
    rootRef: t
  };
};
be.itemPlugin = co;
be.wrapItem = ({
  children: e,
  itemId: t
}) => {
  const n = x.useContext(se);
  return /* @__PURE__ */ w(_e, {
    itemId: t,
    children: /* @__PURE__ */ w(se.Provider, {
      value: n + 1,
      children: e
    })
  });
};
be.wrapRoot = ({
  children: e
}) => /* @__PURE__ */ w(_e, {
  children: /* @__PURE__ */ w(se.Provider, {
    value: 0,
    children: e
  })
});
be.params = {};
const uo = [he, Se, Re, ze, Ct, Tt, be], po = ct(), fo = (e) => {
  const {
    classes: t
  } = e;
  return ge({
    root: ["root"]
  }, Ln, t);
}, mo = U("ul", {
  name: "MuiSimpleTreeView",
  slot: "Root",
  overridesResolver: (e, t) => t.root
})({
  padding: 0,
  margin: 0,
  listStyle: "none",
  outline: 0,
  position: "relative"
}), Io = [], vt = /* @__PURE__ */ x.forwardRef(function(t, n) {
  const o = po({
    props: t,
    name: "MuiSimpleTreeView"
  }), l = o;
  process.env.NODE_ENV !== "production" && o.items != null && dt(["MUI X: The `SimpleTreeView` component does not support the `items` prop.", "If you want to add items, you need to pass them as JSX children.", "Check the documentation for more details: https://mui.com/x/react-tree-view/simple-tree-view/items/."]);
  const {
    getRootProps: p,
    contextValue: c
  } = Xn({
    plugins: uo,
    rootRef: n,
    props: E({}, o, {
      items: Io
    })
  }), {
    slots: i,
    slotProps: u
  } = o, d = fo(o), s = (i == null ? void 0 : i.root) ?? mo, a = ce({
    elementType: s,
    externalSlotProps: u == null ? void 0 : u.root,
    className: d.root,
    getSlotProps: p,
    ownerState: l
  });
  return /* @__PURE__ */ w(Wn, {
    value: c,
    children: /* @__PURE__ */ w(s, E({}, a))
  });
});
process.env.NODE_ENV !== "production" && (vt.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // | To update them edit the TypeScript types and run "pnpm proptypes"  |
  // ----------------------------------------------------------------------
  /**
   * The ref object that allows Tree View manipulation. Can be instantiated with `useTreeViewApiRef()`.
   */
  apiRef: r.shape({
    current: r.shape({
      focusItem: r.func.isRequired,
      getItem: r.func.isRequired,
      getItemDOMElement: r.func.isRequired,
      getItemOrderedChildrenIds: r.func.isRequired,
      getItemTree: r.func.isRequired,
      selectItem: r.func.isRequired,
      setItemExpansion: r.func.isRequired
    })
  }),
  /**
   * If `true`, the tree view renders a checkbox at the left of its label that allows selecting it.
   * @default false
   */
  checkboxSelection: r.bool,
  /**
   * The content of the component.
   */
  children: r.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: r.object,
  className: r.string,
  /**
   * Expanded item ids.
   * Used when the item's expansion is not controlled.
   * @default []
   */
  defaultExpandedItems: r.arrayOf(r.string),
  /**
   * Selected item ids. (Uncontrolled)
   * When `multiSelect` is true this takes an array of strings; when false (default) a string.
   * @default []
   */
  defaultSelectedItems: r.any,
  /**
   * If `true`, will allow focus on disabled items.
   * @default false
   */
  disabledItemsFocusable: r.bool,
  /**
   * If `true` selection is disabled.
   * @default false
   */
  disableSelection: r.bool,
  /**
   * Expanded item ids.
   * Used when the item's expansion is controlled.
   */
  expandedItems: r.arrayOf(r.string),
  /**
   * The slot that triggers the item's expansion when clicked.
   * @default 'content'
   */
  expansionTrigger: r.oneOf(["content", "iconContainer"]),
  /**
   * Unstable features, breaking changes might be introduced.
   * For each feature, if the flag is not explicitly set to `true`,
   * the feature will be fully disabled and any property / method call will not have any effect.
   */
  experimentalFeatures: r.shape({
    indentationAtItemLevel: r.bool
  }),
  /**
   * This prop is used to help implement the accessibility logic.
   * If you don't provide this prop. It falls back to a randomly generated id.
   */
  id: r.string,
  /**
   * Horizontal indentation between an item and its children.
   * Examples: 24, "24px", "2rem", "2em".
   * @default 12px
   */
  itemChildrenIndentation: r.oneOfType([r.number, r.string]),
  /**
   * If `true`, `ctrl` and `shift` will trigger multiselect.
   * @default false
   */
  multiSelect: r.bool,
  /**
   * Callback fired when tree items are expanded/collapsed.
   * @param {React.SyntheticEvent} event The DOM event that triggered the change.
   * @param {array} itemIds The ids of the expanded items.
   */
  onExpandedItemsChange: r.func,
  /**
   * Callback fired when the `content` slot of a given tree item is clicked.
   * @param {React.MouseEvent} event The DOM event that triggered the change.
   * @param {string} itemId The id of the focused item.
   */
  onItemClick: r.func,
  /**
   * Callback fired when a tree item is expanded or collapsed.
   * @param {React.SyntheticEvent} event The DOM event that triggered the change.
   * @param {array} itemId The itemId of the modified item.
   * @param {array} isExpanded `true` if the item has just been expanded, `false` if it has just been collapsed.
   */
  onItemExpansionToggle: r.func,
  /**
   * Callback fired when a given tree item is focused.
   * @param {React.SyntheticEvent | null} event The DOM event that triggered the change. **Warning**: This is a generic event not a focus event.
   * @param {string} itemId The id of the focused item.
   */
  onItemFocus: r.func,
  /**
   * Callback fired when a tree item is selected or deselected.
   * @param {React.SyntheticEvent} event The DOM event that triggered the change.
   * @param {array} itemId The itemId of the modified item.
   * @param {array} isSelected `true` if the item has just been selected, `false` if it has just been deselected.
   */
  onItemSelectionToggle: r.func,
  /**
   * Callback fired when tree items are selected/deselected.
   * @param {React.SyntheticEvent} event The DOM event that triggered the change.
   * @param {string[] | string} itemIds The ids of the selected items.
   * When `multiSelect` is `true`, this is an array of strings; when false (default) a string.
   */
  onSelectedItemsChange: r.func,
  /**
   * Selected item ids. (Controlled)
   * When `multiSelect` is true this takes an array of strings; when false (default) a string.
   */
  selectedItems: r.any,
  /**
   * The props used for each component slot.
   */
  slotProps: r.object,
  /**
   * Overridable component slots.
   */
  slots: r.object,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object])
});
function St(e) {
  const {
    instance: t,
    items: {
      onItemClick: n
    },
    selection: {
      multiSelect: o,
      checkboxSelection: l,
      disableSelection: p
    },
    expansion: {
      expansionTrigger: c
    }
  } = le(), i = t.isItemExpandable(e), u = t.isItemExpanded(e), d = t.isItemFocused(e), s = t.isItemSelected(e), a = t.isItemDisabled(e), m = t != null && t.isItemBeingEdited ? t == null ? void 0 : t.isItemBeingEdited(e) : !1, I = t.isItemEditable ? t.isItemEditable(e) : !1, h = (T) => {
    if (!a) {
      d || t.focusItem(T, e);
      const v = o && (T.shiftKey || T.ctrlKey || T.metaKey);
      i && !(v && t.isItemExpanded(e)) && t.toggleItemExpansion(T, e);
    }
  }, f = (T) => {
    a || (d || t.focusItem(T, e), o && (T.shiftKey || T.ctrlKey || T.metaKey) ? T.shiftKey ? t.expandSelectionRange(T, e) : t.selectItem({
      event: T,
      itemId: e,
      keepExistingSelection: !0
    }) : t.selectItem({
      event: T,
      itemId: e,
      shouldBeSelected: !0
    }));
  }, g = (T) => {
    if (p || a)
      return;
    const v = T.nativeEvent.shiftKey;
    o && v ? t.expandSelectionRange(T, e) : t.selectItem({
      event: T,
      itemId: e,
      keepExistingSelection: o,
      shouldBeSelected: T.target.checked
    });
  }, b = (T) => {
    (T.shiftKey || T.ctrlKey || T.metaKey || a) && T.preventDefault();
  }, y = () => {
    we(t, ee) && t.isItemEditable(e) && (t.isItemBeingEdited(e) ? t.setEditedItemId(null) : t.setEditedItemId(e));
  };
  return {
    disabled: a,
    expanded: u,
    selected: s,
    focused: d,
    editable: I,
    editing: m,
    disableSelection: p,
    checkboxSelection: l,
    handleExpansion: h,
    handleSelection: f,
    handleCheckboxSelection: g,
    handleContentClick: n,
    preventSelection: b,
    expansionTrigger: c,
    toggleItemEditing: y,
    handleSaveItemLabel: (T, v) => {
      we(t, ee) && t.isItemBeingEditedRef(e) && (t.updateItemLabel(e, v), y(), t.focusItem(T, e));
    },
    handleCancelItemLabelEditing: (T) => {
      we(t, ee) && t.isItemBeingEditedRef(e) && (y(), t.focusItem(T, e));
    }
  };
}
const go = U("div", {
  name: "MuiTreeItem2DragAndDropOverlay",
  slot: "Root",
  overridesResolver: (e, t) => t.root,
  shouldForwardProp: (e) => sn(e) && e !== "action"
})(({
  theme: e
}) => ({
  position: "absolute",
  left: 0,
  display: "flex",
  top: 0,
  bottom: 0,
  right: 0,
  pointerEvents: "none",
  variants: [{
    props: {
      action: "make-child"
    },
    style: {
      marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
      borderRadius: e.shape.borderRadius,
      backgroundColor: X((e.vars || e).palette.primary.dark, 0.15)
    }
  }, {
    props: {
      action: "reorder-above"
    },
    style: E({
      marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
      borderTop: `1px solid ${X((e.vars || e).palette.grey[900], 0.6)}`
    }, e.applyStyles("dark", {
      borderTopColor: X((e.vars || e).palette.grey[100], 0.6)
    }))
  }, {
    props: {
      action: "reorder-below"
    },
    style: E({
      marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
      borderBottom: `1px solid ${X((e.vars || e).palette.grey[900], 0.6)}`
    }, e.applyStyles("dark", {
      borderBottomColor: X((e.vars || e).palette.grey[100], 0.6)
    }))
  }, {
    props: {
      action: "move-to-parent"
    },
    style: E({
      marginLeft: "calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",
      borderBottom: `1px solid ${X((e.vars || e).palette.grey[900], 0.6)}`
    }, e.applyStyles("dark", {
      borderBottomColor: X((e.vars || e).palette.grey[900], 0.6)
    }))
  }]
}));
function ho(e) {
  return e.action == null ? null : /* @__PURE__ */ w(go, E({}, e));
}
const bo = U("input", {
  name: "MuiTreeItem2",
  slot: "LabelInput",
  overridesResolver: (e, t) => t.labelInput
})(({
  theme: e
}) => E({}, e.typography.body1, {
  width: "100%",
  backgroundColor: e.palette.background.paper,
  borderRadius: e.shape.borderRadius,
  border: "none",
  padding: "0 2px",
  boxSizing: "border-box",
  "&:focus": {
    outline: `1px solid ${e.palette.primary.main}`
  }
})), yo = ["classes", "className", "displayIcon", "expansionIcon", "icon", "label", "itemId", "onClick", "onMouseDown", "dragAndDropOverlayProps", "labelInputProps"], Ue = /* @__PURE__ */ x.forwardRef(function(t, n) {
  const {
    classes: o,
    className: l,
    displayIcon: p,
    expansionIcon: c,
    icon: i,
    label: u,
    itemId: d,
    onClick: s,
    onMouseDown: a,
    dragAndDropOverlayProps: m,
    labelInputProps: I
  } = t, h = Q(t, yo), {
    disabled: f,
    expanded: g,
    selected: b,
    focused: y,
    editing: C,
    editable: k,
    disableSelection: T,
    checkboxSelection: v,
    handleExpansion: M,
    handleSelection: B,
    handleCheckboxSelection: K,
    handleContentClick: V,
    preventSelection: F,
    expansionTrigger: _,
    toggleItemEditing: j
  } = St(d), q = i || c || p, L = x.useRef(null), H = (P) => {
    F(P), a && a(P);
  }, N = (P) => {
    var O;
    V == null || V(P, d), !((O = L.current) != null && O.contains(P.target)) && (_ === "content" && M(P), v || B(P), s && s(P));
  }, W = (P) => {
    P.defaultMuiPrevented || j();
  };
  return (
    /* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
    /* @__PURE__ */ ve("div", E({}, h, {
      className: Ie(l, o.root, g && o.expanded, b && o.selected, y && o.focused, f && o.disabled, C && o.editing, k && o.editable),
      onClick: N,
      onMouseDown: H,
      ref: n,
      children: [/* @__PURE__ */ w("div", {
        className: o.iconContainer,
        children: q
      }), v && /* @__PURE__ */ w(at, {
        className: o.checkbox,
        checked: b,
        onChange: K,
        disabled: f || T,
        ref: L,
        tabIndex: -1
      }), C ? /* @__PURE__ */ w(bo, E({}, I, {
        className: o.labelInput
      })) : /* @__PURE__ */ w("div", E({
        className: o.label
      }, k && {
        onDoubleClick: W
      }, {
        children: u
      })), m && /* @__PURE__ */ w(ho, E({}, m))]
    }))
  );
});
process.env.NODE_ENV !== "production" && (Ue.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // | To update them edit the TypeScript types and run "pnpm proptypes"  |
  // ----------------------------------------------------------------------
  /**
   * Override or extend the styles applied to the component.
   */
  classes: r.object.isRequired,
  className: r.string,
  /**
   * The icon to display next to the tree item's label. Either a parent or end icon.
   */
  displayIcon: r.node,
  dragAndDropOverlayProps: r.shape({
    action: r.oneOf(["make-child", "move-to-parent", "reorder-above", "reorder-below"]),
    style: r.object
  }),
  /**
   * The icon to display next to the tree item's label. Either an expansion or collapse icon.
   */
  expansionIcon: r.node,
  /**
   * The icon to display next to the tree item's label.
   */
  icon: r.node,
  /**
   * The id of the item.
   */
  itemId: r.string.isRequired,
  /**
   * The tree item label.
   */
  label: r.node,
  labelInputProps: r.shape({
    autoFocus: r.oneOf([!0]),
    "data-element": r.oneOf(["labelInput"]),
    onBlur: r.func,
    onChange: r.func,
    onKeyDown: r.func,
    type: r.oneOf(["text"]),
    value: r.string
  })
});
function xo(e) {
  return fe("MuiTreeItem", e);
}
const J = me("MuiTreeItem", ["root", "groupTransition", "content", "expanded", "selected", "focused", "disabled", "iconContainer", "label", "checkbox", "labelInput", "editable", "editing", "dragAndDropOverlay"]), Eo = te(/* @__PURE__ */ w("path", {
  d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
}), "TreeViewExpandIcon"), Co = te(/* @__PURE__ */ w("path", {
  d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
}), "TreeViewCollapseIcon");
function Rt(e) {
  const {
    children: t,
    itemId: n
  } = e, {
    wrapItem: o,
    instance: l
  } = le();
  return o({
    children: t,
    itemId: n,
    instance: l
  });
}
Rt.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // | To update them edit the TypeScript types and run "pnpm proptypes"  |
  // ----------------------------------------------------------------------
  children: r.node,
  itemId: r.string.isRequired
};
const To = ["children", "className", "slots", "slotProps", "ContentComponent", "ContentProps", "itemId", "id", "label", "onClick", "onMouseDown", "onFocus", "onBlur", "onKeyDown"], wo = ["ownerState"], vo = ["ownerState"], So = ["ownerState"], Ro = ct(), Mo = (e) => {
  const {
    classes: t
  } = e;
  return ge({
    root: ["root"],
    content: ["content"],
    expanded: ["expanded"],
    selected: ["selected"],
    focused: ["focused"],
    disabled: ["disabled"],
    iconContainer: ["iconContainer"],
    checkbox: ["checkbox"],
    label: ["label"],
    labelInput: ["labelInput"],
    editing: ["editing"],
    editable: ["editable"],
    groupTransition: ["groupTransition"]
  }, xo, t);
}, ko = U("li", {
  name: "MuiTreeItem",
  slot: "Root",
  overridesResolver: (e, t) => t.root
})({
  listStyle: "none",
  margin: 0,
  padding: 0,
  outline: 0
}), Po = U(Ue, {
  name: "MuiTreeItem",
  slot: "Content",
  overridesResolver: (e, t) => [t.content, t.iconContainer && {
    [`& .${J.iconContainer}`]: t.iconContainer
  }, t.label && {
    [`& .${J.label}`]: t.label
  }],
  shouldForwardProp: (e) => st(e) && e !== "indentationAtItemLevel"
})(({
  theme: e
}) => ({
  padding: e.spacing(0.5, 1),
  borderRadius: e.shape.borderRadius,
  width: "100%",
  boxSizing: "border-box",
  // prevent width + padding to overflow
  position: "relative",
  display: "flex",
  alignItems: "center",
  gap: e.spacing(1),
  cursor: "pointer",
  WebkitTapHighlightColor: "transparent",
  "&:hover": {
    backgroundColor: (e.vars || e).palette.action.hover,
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: "transparent"
    }
  },
  [`&.${J.disabled}`]: {
    opacity: (e.vars || e).palette.action.disabledOpacity,
    backgroundColor: "transparent"
  },
  [`&.${J.focused}`]: {
    backgroundColor: (e.vars || e).palette.action.focus
  },
  [`&.${J.selected}`]: {
    backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : X(e.palette.primary.main, e.palette.action.selectedOpacity),
    "&:hover": {
      backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : X(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : X(e.palette.primary.main, e.palette.action.selectedOpacity)
      }
    },
    [`&.${J.focused}`]: {
      backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : X(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
    }
  },
  [`& .${J.iconContainer}`]: {
    width: 16,
    display: "flex",
    flexShrink: 0,
    justifyContent: "center",
    "& svg": {
      fontSize: 18
    }
  },
  [`& .${J.label}`]: E({
    width: "100%",
    boxSizing: "border-box",
    // prevent width + padding to overflow
    // fixes overflow - see https://github.com/mui/material-ui/issues/27372
    minWidth: 0,
    position: "relative"
  }, e.typography.body1),
  [`& .${J.checkbox}`]: {
    padding: 0
  },
  variants: [{
    props: {
      indentationAtItemLevel: !0
    },
    style: {
      paddingLeft: `calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`
    }
  }]
})), Oo = U(Ne, {
  name: "MuiTreeItem",
  slot: "GroupTransition",
  overridesResolver: (e, t) => t.groupTransition,
  shouldForwardProp: (e) => st(e) && e !== "indentationAtItemLevel"
})({
  margin: 0,
  padding: 0,
  paddingLeft: "var(--TreeView-itemChildrenIndentation)",
  variants: [{
    props: {
      indentationAtItemLevel: !0
    },
    style: {
      paddingLeft: 0
    }
  }]
}), Mt = /* @__PURE__ */ x.forwardRef(function(t, n) {
  var Xe, We, Je, Ge;
  const {
    icons: o,
    runItemPlugins: l,
    items: {
      disabledItemsFocusable: p,
      indentationAtItemLevel: c
    },
    selection: {
      multiSelect: i
    },
    expansion: {
      expansionTrigger: u
    },
    instance: d
  } = le(), s = x.useContext(se), a = Ro({
    props: t,
    name: "MuiTreeItem"
  }), {
    children: m,
    className: I,
    slots: h,
    slotProps: f,
    ContentComponent: g = Ue,
    ContentProps: b,
    itemId: y,
    id: C,
    label: k,
    onClick: T,
    onMouseDown: v,
    onBlur: M,
    onKeyDown: B
  } = a, K = Q(a, To), {
    expanded: V,
    focused: F,
    selected: _,
    disabled: j,
    editing: q,
    handleExpansion: L,
    handleCancelItemLabelEditing: H,
    handleSaveItemLabel: N
  } = St(y), {
    contentRef: W,
    rootRef: P,
    propsEnhancers: O
  } = l(a), ne = x.useRef(null), ye = x.useRef(null), Me = de(n, P, ne), ke = de(b == null ? void 0 : b.ref, W, ye), oe = {
    expandIcon: (h == null ? void 0 : h.expandIcon) ?? o.slots.expandIcon ?? Eo,
    collapseIcon: (h == null ? void 0 : h.collapseIcon) ?? o.slots.collapseIcon ?? Co,
    endIcon: (h == null ? void 0 : h.endIcon) ?? o.slots.endIcon,
    icon: h == null ? void 0 : h.icon,
    groupTransition: h == null ? void 0 : h.groupTransition
  }, S = (R) => Array.isArray(R) ? R.length > 0 && R.some(S) : !!R, $ = S(m), z = E({}, a, {
    expanded: V,
    focused: F,
    selected: _,
    disabled: j,
    indentationAtItemLevel: c
  }), A = Mo(z), Y = oe.groupTransition ?? void 0, xe = ce({
    elementType: Y,
    ownerState: {},
    externalSlotProps: f == null ? void 0 : f.groupTransition,
    additionalProps: E({
      unmountOnExit: !0,
      in: V,
      component: "ul",
      role: "group"
    }, c ? {
      indentationAtItemLevel: !0
    } : {}),
    className: A.groupTransition
  }), Pt = (R) => {
    u === "iconContainer" && L(R);
  }, Pe = V ? oe.collapseIcon : oe.expandIcon, Ot = ce({
    elementType: Pe,
    ownerState: {},
    externalSlotProps: (R) => V ? E({}, ie(o.slotProps.collapseIcon, R), ie(f == null ? void 0 : f.collapseIcon, R)) : E({}, ie(o.slotProps.expandIcon, R), ie(f == null ? void 0 : f.expandIcon, R)),
    additionalProps: {
      onClick: Pt
    }
  }), Dt = Q(Ot, wo), Vt = $ && Pe ? /* @__PURE__ */ w(Pe, E({}, Dt)) : null, Oe = $ ? void 0 : oe.endIcon, At = ce({
    elementType: Oe,
    ownerState: {},
    externalSlotProps: (R) => $ ? {} : E({}, ie(o.slotProps.endIcon, R), ie(f == null ? void 0 : f.endIcon, R))
  }), Ft = Q(At, vo), $t = Oe ? /* @__PURE__ */ w(Oe, E({}, Ft)) : null, De = oe.icon, Lt = ce({
    elementType: De,
    ownerState: {},
    externalSlotProps: f == null ? void 0 : f.icon
  }), Nt = Q(Lt, So), jt = De ? /* @__PURE__ */ w(De, E({}, Nt)) : null;
  let Ve;
  i ? Ve = _ : _ && (Ve = !0);
  function zt(R) {
    !F && (!j || p) && R.currentTarget === R.target && d.focusItem(R, y);
  }
  function Bt(R) {
    var re, ae, He, Ye;
    M == null || M(R), !(q || // we can exit the editing state by clicking outside the input (within the tree item) or by pressing Enter or Escape -> we don't want to remove the focused item from the state in these cases
    // we can also exit the editing state by clicking on the root itself -> want to remove the focused item from the state in this case
    R.relatedTarget && $e(R.relatedTarget, ne.current) && (R.target && ((ae = (re = R.target) == null ? void 0 : re.dataset) == null ? void 0 : ae.element) === "labelInput" && $e(R.target, ne.current) || ((Ye = (He = R.relatedTarget) == null ? void 0 : He.dataset) == null ? void 0 : Ye.element) === "labelInput")) && d.removeFocusedItem();
  }
  const _t = (R) => {
    var re, ae;
    B == null || B(R), ((ae = (re = R.target) == null ? void 0 : re.dataset) == null ? void 0 : ae.element) !== "labelInput" && d.handleItemKeyDown(R, y);
  }, Ut = d.getTreeItemIdAttribute(y, C), Kt = d.canItemBeTabbed(y) ? 0 : -1, Ee = {
    rootRefObject: ne,
    contentRefObject: ye,
    interactions: {
      handleSaveItemLabel: N,
      handleCancelItemLabelEditing: H
    }
  }, qt = ((Xe = O.root) == null ? void 0 : Xe.call(O, E({}, Ee, {
    externalEventHandlers: Ze(K)
  }))) ?? {}, Xt = ((We = O.content) == null ? void 0 : We.call(O, E({}, Ee, {
    externalEventHandlers: Ze(b)
  }))) ?? {}, Ke = ((Je = O.dragAndDropOverlay) == null ? void 0 : Je.call(O, E({}, Ee, {
    externalEventHandlers: {}
  }))) ?? {}, qe = ((Ge = O.labelInput) == null ? void 0 : Ge.call(O, E({}, Ee, {
    externalEventHandlers: {}
  }))) ?? {};
  return /* @__PURE__ */ w(Rt, {
    itemId: y,
    children: /* @__PURE__ */ ve(ko, E({
      className: Ie(A.root, I),
      role: "treeitem",
      "aria-expanded": $ ? V : void 0,
      "aria-selected": Ve,
      "aria-disabled": j || void 0,
      id: Ut,
      tabIndex: Kt
    }, K, {
      ownerState: z,
      onFocus: zt,
      onBlur: Bt,
      onKeyDown: _t,
      ref: Me,
      style: c ? E({}, K.style, {
        "--TreeView-itemDepth": typeof s == "function" ? s(y) : s
      }) : K.style
    }, qt, {
      children: [/* @__PURE__ */ w(Po, E({
        as: g,
        classes: {
          root: A.content,
          expanded: A.expanded,
          selected: A.selected,
          focused: A.focused,
          disabled: A.disabled,
          editable: A.editable,
          editing: A.editing,
          iconContainer: A.iconContainer,
          label: A.label,
          labelInput: A.labelInput,
          checkbox: A.checkbox
        },
        label: k,
        itemId: y,
        onClick: T,
        onMouseDown: v,
        icon: jt,
        expansionIcon: Vt,
        displayIcon: $t,
        ownerState: z
      }, b, Xt, Ke.action == null ? {} : {
        dragAndDropOverlayProps: Ke
      }, qe.value == null ? {} : {
        labelInputProps: qe
      }, {
        ref: ke
      })), m && /* @__PURE__ */ w(Oo, E({
        as: Y
      }, xe, {
        children: m
      }))]
    }))
  });
});
process.env.NODE_ENV !== "production" && (Mt.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // | To update them edit the TypeScript types and run "pnpm proptypes"  |
  // ----------------------------------------------------------------------
  /**
   * The content of the component.
   */
  children: r.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: r.object,
  className: r.string,
  /**
   * The component used to render the content of the item.
   * @default TreeItemContent
   */
  ContentComponent: ot,
  /**
   * Props applied to ContentComponent.
   */
  ContentProps: r.object,
  /**
   * If `true`, the item is disabled.
   * @default false
   */
  disabled: r.bool,
  /**
   * The id of the item.
   */
  itemId: r.string.isRequired,
  /**
   * The tree item label.
   */
  label: r.node,
  /**
   * This prop isn't supported.
   * Use the `onItemFocus` callback on the tree if you need to monitor a item's focus.
   */
  onFocus: ln,
  /**
   * Callback fired when a key of the keyboard is pressed on the item.
   */
  onKeyDown: r.func,
  /**
   * The props used for each component slot.
   * @default {}
   */
  slotProps: r.object,
  /**
   * Overridable component slots.
   * @default {}
   */
  slots: r.object,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object])
});
const Lo = ({
  items: e,
  handleCheck: t,
  width: n = "250px",
  height: o = "350px",
  expanded: l
}) => /* @__PURE__ */ w(an, { width: n, height: o, children: /* @__PURE__ */ w(vt, { expandedItems: l, children: kt(e, t) }) }), kt = (e, t) => e.map((n) => /* @__PURE__ */ Wt(Do, { ...n, key: n.id, handleCheck: t })), Do = ({
  id: e,
  checked: t,
  children: n,
  label: o,
  handleCheck: l
}) => /* @__PURE__ */ w(
  Mt,
  {
    itemId: e,
    label: /* @__PURE__ */ ve(cn, { flexDirection: "row", alignItems: "center", children: [
      /* @__PURE__ */ w(dn, { children: o }),
      l && /* @__PURE__ */ w(
        un,
        {
          disableRipple: !0,
          sx: { marginLeft: "auto" },
          onClick: (p) => {
            p.stopPropagation(), l(e, !t);
          },
          "data-testid": `toggle-visibility-${e}`,
          children: t ? /* @__PURE__ */ w(Fn, { "data-testid": `visibility-icon-${e}` }) : /* @__PURE__ */ w($n, { "data-testid": `visibility-off-icon-${e}` })
        }
      )
    ] }),
    children: n.length > 0 && kt(n, l)
  }
);
export {
  Ne as C,
  Lo as T,
  at as a
};
