import * as a from "react";
import { r as oe, m as re, u as _, a as ie, b as se, d as ae, T as le, g as ce, c as pe, e as ue, f as de, h as fe, i as he, j as me, s as P, k as ge, l as ye, n as H, o as Ee, P as e, p as we, q as k } from "./Stack-Bsa5WF4E.js";
import { jsx as y } from "react/jsx-runtime";
function Re(o, t, r, s, i) {
  if (process.env.NODE_ENV === "production")
    return null;
  const f = i || t;
  return typeof o[t] < "u" ? new Error(`The prop \`${f}\` is not supported. Please remove it.`) : null;
}
function $e({
  controlled: o,
  default: t,
  name: r,
  state: s = "value"
}) {
  const {
    current: i
  } = a.useRef(o !== void 0), [f, p] = a.useState(t), u = i ? o : f;
  if (process.env.NODE_ENV !== "production") {
    a.useEffect(() => {
      i !== (o !== void 0) && console.error([`MUI: A component is changing the ${i ? "" : "un"}controlled ${s} state of ${r} to be ${i ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${r} 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(`
`));
    }, [s, r, o]);
    const {
      current: d
    } = a.useRef(t);
    a.useEffect(() => {
      !i && !Object.is(d, t) && console.error([`MUI: A component is changing the default ${s} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
`));
    }, [JSON.stringify(t)]);
  }
  const E = a.useCallback((d) => {
    i || p(d);
  }, []);
  return [u, E];
}
function Ne(o) {
  var w;
  const {
    elementType: t,
    externalSlotProps: r,
    ownerState: s,
    skipResolvingSlotProps: i = !1,
    ...f
  } = o, p = i ? {} : oe(r, s), {
    props: u,
    internalRef: E
  } = re({
    ...f,
    externalSlotProps: p
  }), d = _(E, p == null ? void 0 : p.ref, (w = o.additionalProps) == null ? void 0 : w.ref);
  return ie(t, {
    ...u,
    ref: d
  }, s);
}
function De({
  props: o,
  name: t
}) {
  return se({
    props: o,
    name: t,
    defaultTheme: ae,
    themeId: le
  });
}
function xe(o) {
  return ce("MuiCollapse", o);
}
pe("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
const ve = (o) => {
  const {
    orientation: t,
    classes: r
  } = o, s = {
    root: ["root", `${t}`],
    entered: ["entered"],
    hidden: ["hidden"],
    wrapper: ["wrapper", `${t}`],
    wrapperInner: ["wrapperInner", `${t}`]
  };
  return ye(s, xe, r);
}, Ce = P("div", {
  name: "MuiCollapse",
  slot: "Root",
  overridesResolver: (o, t) => {
    const {
      ownerState: r
    } = o;
    return [t.root, t[r.orientation], r.state === "entered" && t.entered, r.state === "exited" && !r.in && r.collapsedSize === "0px" && t.hidden];
  }
})(Ee(({
  theme: o
}) => ({
  height: 0,
  overflow: "hidden",
  transition: o.transitions.create("height"),
  variants: [{
    props: {
      orientation: "horizontal"
    },
    style: {
      height: "auto",
      width: 0,
      transition: o.transitions.create("width")
    }
  }, {
    props: {
      state: "entered"
    },
    style: {
      height: "auto",
      overflow: "visible"
    }
  }, {
    props: {
      state: "entered",
      orientation: "horizontal"
    },
    style: {
      width: "auto"
    }
  }, {
    props: ({
      ownerState: t
    }) => t.state === "exited" && !t.in && t.collapsedSize === "0px",
    style: {
      visibility: "hidden"
    }
  }]
}))), Se = P("div", {
  name: "MuiCollapse",
  slot: "Wrapper",
  overridesResolver: (o, t) => t.wrapper
})({
  // Hack to get children with a negative margin to not falsify the height computation.
  display: "flex",
  width: "100%",
  variants: [{
    props: {
      orientation: "horizontal"
    },
    style: {
      width: "auto",
      height: "100%"
    }
  }]
}), Te = P("div", {
  name: "MuiCollapse",
  slot: "WrapperInner",
  overridesResolver: (o, t) => t.wrapperInner
})({
  width: "100%",
  variants: [{
    props: {
      orientation: "horizontal"
    },
    style: {
      width: "auto",
      height: "100%"
    }
  }]
}), M = /* @__PURE__ */ a.forwardRef(function(t, r) {
  const s = ue({
    props: t,
    name: "MuiCollapse"
  }), {
    addEndListener: i,
    children: f,
    className: p,
    collapsedSize: u = "0px",
    component: E,
    easing: d,
    in: R,
    onEnter: w,
    onEntered: I,
    onEntering: V,
    onExit: j,
    onExited: J,
    onExiting: F,
    orientation: A = "vertical",
    style: $,
    timeout: h = de.standard,
    // eslint-disable-next-line react/prop-types
    TransitionComponent: B = fe,
    ...G
  } = s, T = {
    ...s,
    orientation: A,
    collapsedSize: u
  }, x = ve(T), U = he(), K = me(), m = a.useRef(null), N = a.useRef(), b = typeof u == "number" ? `${u}px` : u, v = A === "horizontal", C = v ? "width" : "height", z = a.useRef(null), Q = _(r, z), g = (n) => (l) => {
    if (n) {
      const c = z.current;
      l === void 0 ? n(c) : n(c, l);
    }
  }, D = () => m.current ? m.current[v ? "clientWidth" : "clientHeight"] : 0, X = g((n, l) => {
    m.current && v && (m.current.style.position = "absolute"), n.style[C] = b, w && w(n, l);
  }), Y = g((n, l) => {
    const c = D();
    m.current && v && (m.current.style.position = "");
    const {
      duration: S,
      easing: O
    } = H({
      style: $,
      timeout: h,
      easing: d
    }, {
      mode: "enter"
    });
    if (h === "auto") {
      const W = U.transitions.getAutoHeightDuration(c);
      n.style.transitionDuration = `${W}ms`, N.current = W;
    } else
      n.style.transitionDuration = typeof S == "string" ? S : `${S}ms`;
    n.style[C] = `${c}px`, n.style.transitionTimingFunction = O, V && V(n, l);
  }), Z = g((n, l) => {
    n.style[C] = "auto", I && I(n, l);
  }), ee = g((n) => {
    n.style[C] = `${D()}px`, j && j(n);
  }), te = g(J), ne = g((n) => {
    const l = D(), {
      duration: c,
      easing: S
    } = H({
      style: $,
      timeout: h,
      easing: d
    }, {
      mode: "exit"
    });
    if (h === "auto") {
      const O = U.transitions.getAutoHeightDuration(l);
      n.style.transitionDuration = `${O}ms`, N.current = O;
    } else
      n.style.transitionDuration = typeof c == "string" ? c : `${c}ms`;
    n.style[C] = b, n.style.transitionTimingFunction = S, F && F(n);
  });
  return /* @__PURE__ */ y(B, {
    in: R,
    onEnter: X,
    onEntered: Z,
    onEntering: Y,
    onExit: ee,
    onExited: te,
    onExiting: ne,
    addEndListener: (n) => {
      h === "auto" && K.start(N.current || 0, n), i && i(z.current, n);
    },
    nodeRef: z,
    timeout: h === "auto" ? null : h,
    ...G,
    children: (n, {
      ownerState: l,
      ...c
    }) => /* @__PURE__ */ y(Ce, {
      as: E,
      className: ge(x.root, p, {
        entered: x.entered,
        exited: !R && b === "0px" && x.hidden
      }[n]),
      style: {
        [v ? "minWidth" : "minHeight"]: b,
        ...$
      },
      ref: Q,
      ownerState: {
        ...T,
        state: n
      },
      ...c,
      children: /* @__PURE__ */ y(Se, {
        ownerState: {
          ...T,
          state: n
        },
        className: x.wrapper,
        ref: m,
        children: /* @__PURE__ */ y(Te, {
          ownerState: {
            ...T,
            state: n
          },
          className: x.wrapperInner,
          children: f
        })
      })
    })
  });
});
process.env.NODE_ENV !== "production" && (M.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: e.func,
  /**
   * The content node to be collapsed.
   */
  children: e.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: e.object,
  /**
   * @ignore
   */
  className: e.string,
  /**
   * The width (horizontal) or height (vertical) of the container when collapsed.
   * @default '0px'
   */
  collapsedSize: e.oneOfType([e.number, e.string]),
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: we,
  /**
   * The transition timing function.
   * You may specify a single easing or a object containing enter and exit values.
   */
  easing: e.oneOfType([e.shape({
    enter: e.string,
    exit: e.string
  }), e.string]),
  /**
   * If `true`, the component will transition in.
   */
  in: e.bool,
  /**
   * @ignore
   */
  onEnter: e.func,
  /**
   * @ignore
   */
  onEntered: e.func,
  /**
   * @ignore
   */
  onEntering: e.func,
  /**
   * @ignore
   */
  onExit: e.func,
  /**
   * @ignore
   */
  onExited: e.func,
  /**
   * @ignore
   */
  onExiting: e.func,
  /**
   * The transition orientation.
   * @default 'vertical'
   */
  orientation: e.oneOf(["horizontal", "vertical"]),
  /**
   * @ignore
   */
  style: e.object,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.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: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
    appear: e.number,
    enter: e.number,
    exit: e.number
  })])
});
M && (M.muiSupportAuto = !0);
const q = /* @__PURE__ */ a.createContext(void 0);
process.env.NODE_ENV !== "production" && (q.displayName = "FormControlContext");
function Me() {
  return a.useContext(q);
}
const Pe = k(/* @__PURE__ */ y("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"), Ie = k(/* @__PURE__ */ y("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"), L = /* @__PURE__ */ new Set();
function Ve(o, t = "warning") {
  if (process.env.NODE_ENV === "production")
    return;
  const r = Array.isArray(o) ? o.join(`
`) : o;
  L.has(r) || (L.add(r), t === "error" ? console.error(r) : console.warn(r));
}
export {
  M as C,
  q as F,
  Pe as V,
  Me as a,
  De as b,
  Ne as c,
  Re as d,
  Ie as e,
  $e as u,
  Ve as w
};
