import { g as x, b as f, a as I, o as P, r as H, p as W, c as j, d as N, T as B } from "./AppTheme-wAxlNjgN.js";
import { A as Do, e as Ao, s as Io, t as Po, u as Ho } from "./AppTheme-wAxlNjgN.js";
import * as v from "react";
import { alpha as e, lighten as T, darken as E, createTheme as U } from "@mui/material/styles";
import { outlinedInputClasses as u } from "@mui/material/OutlinedInput";
import { toggleButtonGroupClasses as F } from "@mui/material/ToggleButtonGroup";
import { toggleButtonClasses as D } from "@mui/material/ToggleButton";
import X from "@mui/icons-material/CheckBoxOutlineBlankRounded";
import q from "@mui/icons-material/CheckRounded";
import J from "@mui/icons-material/RemoveRounded";
import { jsx as K } from "react/jsx-runtime";
import { buttonBaseClasses as $ } from "@mui/material/ButtonBase";
import { dividerClasses as Q } from "@mui/material/Divider";
import { menuItemClasses as S } from "@mui/material/MenuItem";
import { tabClasses as A } from "@mui/material/Tab";
import Y from "@mui/icons-material/UnfoldMoreRounded";
import { svgIconClasses as m } from "@mui/material/SvgIcon";
import { typographyClasses as Z } from "@mui/material/Typography";
import { chipClasses as n } from "@mui/material/Chip";
import { iconButtonClasses as _ } from "@mui/material/IconButton";
function w(i) {
  const o = i?.gray ?? x, a = i?.brand ?? f;
  return {
    MuiButtonBase: {
      defaultProps: {
        disableTouchRipple: !0,
        disableRipple: !0
      },
      styleOverrides: {
        root: ({ theme: r }) => ({
          boxSizing: "border-box",
          transition: "color 80ms cubic-bezier(0.33,1,0.68,1), background-color 80ms cubic-bezier(0.33,1,0.68,1), border-color 80ms cubic-bezier(0.33,1,0.68,1), box-shadow 80ms cubic-bezier(0.33,1,0.68,1)",
          "&:focus-visible": {
            outline: `3px solid ${e(r.palette.primary.main, 0.5)}`,
            outlineOffset: "2px"
          }
        })
      }
    },
    MuiButton: {
      defaultProps: {
        disableElevation: !0
      },
      styleOverrides: {
        root: ({ theme: r }) => {
          const d = [
            ["primary", r.palette.primary],
            ["secondary", r.palette.secondary],
            ["success", r.palette.success],
            ["warning", r.palette.warning],
            ["error", r.palette.error],
            ["info", r.palette.info]
          ], p = d.map(([b, l]) => ({
            props: { color: b, variant: "contained" },
            style: {
              backgroundColor: l.main,
              color: l.contrastText || "#fff",
              "&:hover": {
                backgroundColor: E(l.main, 0.12)
              },
              "&:active": {
                backgroundColor: E(l.main, 0.2)
              },
              ...r.applyStyles("dark", {
                backgroundColor: l.main,
                color: l.contrastText || "#fff",
                "&:hover": {
                  backgroundColor: T(l.main, 0.12)
                },
                "&:active": {
                  backgroundColor: T(l.main, 0.04)
                }
              })
            }
          })), c = d.map(([b, l]) => ({
            props: { color: b, variant: "outlined" },
            style: {
              color: l.main,
              borderColor: e(l.main, 0.5),
              backgroundColor: "transparent",
              "&:hover": { backgroundColor: e(l.main, 0.06), borderColor: l.main },
              "&:active": { backgroundColor: e(l.main, 0.12) },
              ...r.applyStyles("dark", {
                color: l.light,
                borderColor: e(l.light, 0.4),
                "&:hover": { backgroundColor: e(l.main, 0.12), borderColor: l.light },
                "&:active": { backgroundColor: e(l.main, 0.2) }
              })
            }
          })), t = d.map(([b, l]) => ({
            props: { color: b, variant: "text" },
            style: {
              color: l.main,
              "&:hover": { backgroundColor: e(l.main, 0.06) },
              "&:active": { backgroundColor: e(l.main, 0.12) },
              ...r.applyStyles("dark", {
                color: l.light,
                "&:hover": { backgroundColor: e(l.main, 0.12) },
                "&:active": { backgroundColor: e(l.main, 0.2) }
              })
            }
          })), V = d.map(([b, l]) => ({
            props: { color: b, variant: "soft" },
            style: {
              color: l.main,
              backgroundColor: e(l.main, 0.1),
              "&:hover": { backgroundColor: e(l.main, 0.18) },
              "&:active": { backgroundColor: e(l.main, 0.26) },
              ...r.applyStyles("dark", {
                color: l.light,
                backgroundColor: e(l.main, 0.15),
                "&:hover": { backgroundColor: e(l.main, 0.25) },
                "&:active": { backgroundColor: e(l.main, 0.32) }
              })
            }
          })), G = d.map(([b, l]) => ({
            props: { color: b, variant: "link" },
            style: {
              color: l.main,
              ...r.applyStyles("dark", { color: l.light })
            }
          }));
          return {
            boxShadow: "none",
            borderRadius: r.shape.borderRadius,
            textTransform: "none",
            whiteSpace: "nowrap",
            // GitHub Primer-style fast, smooth transition on bg-color
            transition: "color 80ms cubic-bezier(0.33,1,0.68,1), background-color 80ms cubic-bezier(0.33,1,0.68,1), border-color 80ms cubic-bezier(0.33,1,0.68,1), box-shadow 80ms cubic-bezier(0.33,1,0.68,1)",
            variants: [
              // === Sizes ===
              { props: { size: "small" }, style: { minHeight: "2rem", padding: "6px 12px" } },
              { props: { size: "medium" }, style: { minHeight: "2.25rem", padding: "8px 16px" } },
              { props: { size: "large" }, style: { minHeight: "2.75rem", padding: "10px 20px" } },
              { props: { size: "xs" }, style: { minHeight: "1.5rem", padding: "2px 8px", fontSize: "0.6875rem" } },
              { props: { size: "xl" }, style: { minHeight: "3.25rem", padding: "12px 24px", fontSize: "1rem" } },
              // === Contained: flat solid ===
              // Default/neutral: gray solid
              {
                props: { variant: "contained" },
                style: {
                  boxShadow: "none",
                  "&:hover": { boxShadow: "none" }
                }
              },
              ...p,
              // === Outlined: default/neutral gets gray ===
              {
                props: { variant: "outlined" },
                style: {
                  color: o[700],
                  border: "1px solid",
                  borderColor: o[200],
                  backgroundColor: e(o[50], 0.3),
                  "&:hover": { backgroundColor: o[100], borderColor: o[300] },
                  "&:active": { backgroundColor: o[200] },
                  ...r.applyStyles("dark", {
                    color: o[200],
                    backgroundColor: e(o[800], 0.3),
                    borderColor: o[600],
                    "&:hover": { backgroundColor: e(o[700], 0.5), borderColor: o[500] },
                    "&:active": { backgroundColor: o[700] }
                  })
                }
              },
              ...c,
              // === Text (ghost): default/neutral gets gray ===
              {
                props: { variant: "text" },
                style: {
                  color: o[600],
                  "&:hover": { backgroundColor: e(o[500], 0.08) },
                  "&:active": { backgroundColor: e(o[500], 0.16) },
                  ...r.applyStyles("dark", {
                    color: o[300],
                    "&:hover": { backgroundColor: e(o[500], 0.12) },
                    "&:active": { backgroundColor: e(o[500], 0.2) }
                  })
                }
              },
              ...t,
              // === Soft (custom): default/neutral gets gray ===
              {
                props: { variant: "soft" },
                style: {
                  color: o[700],
                  backgroundColor: e(o[500], 0.08),
                  "&:hover": { backgroundColor: e(o[500], 0.16) },
                  "&:active": { backgroundColor: e(o[500], 0.24) },
                  ...r.applyStyles("dark", {
                    color: o[200],
                    backgroundColor: e(o[500], 0.12),
                    "&:hover": { backgroundColor: e(o[500], 0.2) },
                    "&:active": { backgroundColor: e(o[500], 0.28) }
                  })
                }
              },
              ...V,
              // === Link (custom): base ===
              {
                props: { variant: "link" },
                style: {
                  color: o[600],
                  backgroundColor: "transparent",
                  padding: "0 4px",
                  minWidth: "auto",
                  textDecoration: "none",
                  "&:hover": {
                    backgroundColor: "transparent",
                    textDecoration: "underline"
                  },
                  ...r.applyStyles("dark", {
                    color: o[300]
                  })
                }
              },
              ...G
            ]
          };
        }
      }
    },
    MuiIconButton: {
      styleOverrides: {
        root: ({ theme: r }) => ({
          boxSizing: "border-box",
          borderRadius: r.shape.borderRadius,
          color: o[600],
          "&:hover": { backgroundColor: e(o[500], 0.1) },
          ...r.applyStyles("dark", {
            color: o[300],
            "&:hover": { backgroundColor: e(o[500], 0.2) }
          }),
          variants: [
            { props: { size: "small" }, style: { width: "2rem", height: "2rem", padding: "0.25rem" } },
            { props: { size: "medium" }, style: { width: "2.5rem", height: "2.5rem" } },
            {
              props: { color: "primary" },
              style: {
                color: a[600],
                "&:hover": { backgroundColor: e(a[500], 0.1) },
                ...r.applyStyles("dark", {
                  color: a[300],
                  "&:hover": { backgroundColor: e(a[500], 0.2) }
                })
              }
            }
          ]
        })
      }
    },
    MuiToggleButtonGroup: {
      styleOverrides: {
        root: ({ theme: r }) => ({
          borderRadius: r.shape.borderRadius,
          backgroundColor: o[100],
          border: `1px solid ${o[200]}`,
          boxShadow: "none",
          [`& .${F.grouped}`]: {
            border: "none",
            "&:not(:first-of-type)": { marginLeft: 0, borderLeft: "1px solid", borderLeftColor: o[300] }
          },
          ...r.applyStyles("dark", {
            backgroundColor: e(o[800], 0.5),
            border: `1px solid ${o[700]}`,
            [`& .${F.grouped}`]: {
              "&:not(:first-of-type)": { borderLeftColor: o[700] }
            }
          })
        })
      }
    },
    MuiToggleButton: {
      styleOverrides: {
        root: ({ theme: r }) => ({
          padding: "8px 16px",
          fontWeight: 500,
          color: o[600],
          textTransform: "none",
          border: "none",
          borderRadius: r.shape.borderRadius,
          "&:hover": { backgroundColor: e(o[500], 0.1) },
          [`&.${D.selected}`]: {
            color: a[600],
            backgroundColor: e(a[500], 0.1),
            "&:hover": { backgroundColor: e(a[500], 0.15) }
          },
          ...r.applyStyles("dark", {
            color: o[400],
            "&:hover": { backgroundColor: e(o[500], 0.15) },
            [`&.${D.selected}`]: {
              color: a[300],
              backgroundColor: e(a[500], 0.2),
              "&:hover": { backgroundColor: e(a[500], 0.25) }
            }
          })
        })
      }
    },
    MuiCheckbox: {
      defaultProps: {
        disableRipple: !0,
        icon: v.createElement(X, { sx: { color: "hsla(210, 0%, 0%, 0.0)" } }),
        checkedIcon: v.createElement(q, { sx: { height: 14, width: 14 } }),
        indeterminateIcon: v.createElement(J, { sx: { height: 14, width: 14 } })
      },
      styleOverrides: {
        root: ({ theme: r }) => ({
          margin: 10,
          height: 16,
          width: 16,
          borderRadius: 5,
          border: "1px solid",
          borderColor: e(o[300], 0.8),
          boxShadow: "0 0 0 1.5px hsla(210, 0%, 0%, 0.04) inset",
          backgroundColor: e(o[100], 0.4),
          transition: "border-color, background-color, 120ms ease-in",
          "&:hover": { borderColor: a[300] },
          "&.Mui-checked": {
            color: "white",
            backgroundColor: a[500],
            borderColor: a[500],
            boxShadow: "none",
            "&:hover": { backgroundColor: a[600] }
          },
          ...r.applyStyles("dark", {
            borderColor: e(o[700], 0.8),
            boxShadow: "0 0 0 1.5px hsl(210, 0%, 0%) inset",
            backgroundColor: e(o[900], 0.8),
            "&:hover": { borderColor: a[300] }
          })
        })
      }
    },
    MuiSelect: {
      styleOverrides: {
        select: {
          // Prevent chips from wrapping to multiple lines.
          display: "flex",
          alignItems: "center",
          overflow: "hidden",
          "& > .MuiBox-root": {
            flexWrap: "nowrap",
            overflow: "hidden"
          }
        }
      }
    },
    MuiAutocomplete: {
      styleOverrides: {
        inputRoot: {
          // Prevent the tag container from wrapping and keep fixed height.
          flexWrap: "nowrap !important",
          overflow: "hidden"
        },
        tag: {
          // Constrain chip tags to match the input line-height.
          maxHeight: 20
        }
      }
    },
    MuiFormControl: {
      styleOverrides: {
        root: () => ({
          // Input height token — read by OutlinedInput (height) and
          // InputLabel (vertical centering).  Our wrapper components
          // override this for the full xs/sm/md/lg/xl range.
          "--ov-input-height": "2.75rem",
          variants: [
            { props: { size: "small" }, style: { "--ov-input-height": "2.25rem" } }
          ]
        })
      }
    },
    MuiInputLabel: {
      styleOverrides: {
        root: {
          // Shrunk (floating) label — centered on the top border
          "&.MuiInputLabel-shrink": {
            transform: "translate(14px, -6px) scale(0.75)"
          },
          // Non-shrunk label — auto-center vertically using calc().
          // 1.4375em = the label's line-height (unitless 1.4375 × font-size),
          // expressed in em so it auto-adapts to both small and medium labels.
          "&.MuiInputLabel-outlined:not(.MuiInputLabel-shrink)": {
            transform: "translate(14px, calc((var(--ov-input-height) - 1.4375em) / 2)) scale(1)"
          }
        }
      }
    },
    MuiInputBase: {
      defaultProps: {
        autoCapitalize: "off",
        autoCorrect: "off",
        spellCheck: !1
      },
      styleOverrides: {
        root: ({ theme: r }) => ({
          border: "none",
          ...r.applyStyles("dark", { "&.Mui-disabled": { color: o[600] } })
        }),
        input: ({ theme: r }) => ({
          // Disable WebKit auto-capitalize / auto-correct text transformations
          textTransform: "none",
          WebkitTextSecurity: "none",
          "&::placeholder": { opacity: 0.7, color: o[500] },
          ...r.applyStyles("dark", { "&::placeholder": { color: o[500] } })
        })
      }
    },
    MuiOutlinedInput: {
      styleOverrides: {
        input: { padding: "10px 14px" },
        inputMultiline: { padding: 0 },
        root: ({ theme: r }) => ({
          borderRadius: r.shape.borderRadius,
          backgroundColor: o[50],
          transition: "background-color 120ms ease-in",
          // Fixed height from the --ov-input-height CSS variable
          // (set on the parent FormControl).  Multiline inputs use
          // minHeight so they can grow.
          "&:not(.MuiInputBase-multiline)": {
            boxSizing: "border-box",
            height: "var(--ov-input-height)"
          },
          "&.MuiInputBase-multiline": {
            padding: "10px 14px",
            minHeight: "var(--ov-input-height)"
          },
          "&:hover": {
            backgroundColor: o[100],
            [`& .${u.notchedOutline}`]: { borderColor: o[400] }
          },
          [`&.${u.focused}`]: {
            [`& .${u.notchedOutline}`]: { borderColor: a[500], borderWidth: 2 }
          },
          [`&.${u.disabled}`]: {
            backgroundColor: o[100],
            [`& .${u.notchedOutline}`]: { borderColor: o[200] }
          },
          ...r.applyStyles("dark", {
            backgroundColor: e(o[800], 0.8),
            "&:hover": {
              backgroundColor: e(o[800], 0.9),
              [`& .${u.notchedOutline}`]: { borderColor: o[500] }
            },
            [`&.${u.focused}`]: {
              backgroundColor: e(o[800], 0.9),
              [`& .${u.notchedOutline}`]: { borderColor: a[400] }
            },
            [`&.${u.disabled}`]: {
              backgroundColor: e(o[900], 0.6),
              [`& .${u.notchedOutline}`]: { borderColor: o[800] }
            }
          })
        }),
        notchedOutline: ({ theme: r }) => ({
          borderColor: o[300],
          transition: "border-color 120ms ease-in",
          ...r.applyStyles("dark", { borderColor: o[700] })
        })
      }
    },
    MuiInputAdornment: {
      styleOverrides: {
        root: ({ theme: r }) => ({
          color: r.palette.grey[500],
          ...r.applyStyles("dark", { color: r.palette.grey[400] })
        })
      }
    },
    MuiSwitch: {
      styleOverrides: {
        // Track: 44×24 pill (shadcn/Radix proportions).
        root: { width: 44, height: 24, padding: 0 },
        switchBase: ({ theme: r }) => ({
          padding: 0,
          margin: 2,
          // Radix-style snappy thumb slide.
          transitionDuration: "140ms",
          transitionTimingFunction: "cubic-bezier(0.45, 0.05, 0.55, 0.95)",
          transitionProperty: "transform",
          "&.Mui-checked": {
            // translateX = trackWidth - thumbDiameter - 2*margin = 44 - 20 - 4 = 20
            transform: "translateX(20px)",
            color: "#fff",
            "& + .MuiSwitch-track": {
              backgroundColor: a[500],
              opacity: 1,
              border: 0
            }
          },
          "&.Mui-focusVisible + .MuiSwitch-track": {
            outline: `2px solid ${e(a[500], 0.5)}`,
            outlineOffset: 2
          },
          "&.Mui-disabled + .MuiSwitch-track": { opacity: 0.4 },
          "&.Mui-disabled .MuiSwitch-thumb": { opacity: 0.7 },
          ...r.applyStyles("dark", {
            "&.Mui-checked": {
              "& + .MuiSwitch-track": { backgroundColor: a[400] }
            }
          })
        }),
        // Thumb: 20px circle with layered shadow for depth (key polish factor).
        thumb: {
          boxSizing: "border-box",
          width: 20,
          height: 20,
          boxShadow: "0 0 0 1px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.08)"
        },
        // Track: full pill with fast color transition.
        track: ({ theme: r }) => ({
          borderRadius: 9999,
          backgroundColor: o[300],
          opacity: 1,
          transition: "background-color 120ms linear",
          ...r.applyStyles("dark", { backgroundColor: o[600] })
        })
      }
    }
  };
}
const Mo = w();
function O(i) {
  const o = i?.gray ?? x, a = i?.brand ?? f;
  return {
    MuiMenuItem: {
      styleOverrides: {
        root: ({ theme: r }) => ({
          borderRadius: r.shape.borderRadius,
          padding: "6px 8px",
          [`&.${S.focusVisible}`]: { backgroundColor: "transparent" },
          [`&.${S.selected}`]: {
            [`&.${S.focusVisible}`]: {
              backgroundColor: e(r.palette.action.selected, 0.3)
            }
          }
        })
      }
    },
    MuiMenu: {
      styleOverrides: {
        list: {
          gap: "0px",
          padding: "4px",
          [`&.${Q.root}`]: { margin: "0 -8px" }
        },
        paper: ({ theme: r }) => ({
          marginTop: "4px",
          borderRadius: r.shape.borderRadius,
          border: `1px solid ${r.palette.divider}`,
          backgroundImage: "none",
          background: o[50],
          boxShadow: "hsla(220, 30%, 5%, 0.07) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.07) 0px 8px 16px -5px",
          [`& .${$.root}`]: {
            "&.Mui-selected": { backgroundColor: e(r.palette.action.selected, 0.3) }
          },
          ...r.applyStyles("dark", {
            background: o[900],
            boxShadow: "hsla(220, 30%, 5%, 0.7) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.8) 0px 8px 16px -5px"
          })
        })
      }
    },
    MuiSelect: {
      defaultProps: {
        IconComponent: v.forwardRef((r, d) => /* @__PURE__ */ K(Y, { fontSize: "small", ...r, ref: d }))
      },
      styleOverrides: {
        select: { display: "flex", alignItems: "center" }
      }
    },
    MuiLink: {
      defaultProps: { underline: "none" },
      styleOverrides: {
        root: ({ theme: r }) => ({
          color: o[800],
          fontWeight: 500,
          position: "relative",
          textDecoration: "none",
          width: "fit-content",
          "&::before": {
            content: '""',
            position: "absolute",
            width: "100%",
            height: "1px",
            bottom: 0,
            left: 0,
            backgroundColor: o[600],
            opacity: 0.3,
            transition: "width 0.3s ease, opacity 0.3s ease"
          },
          "&:hover::before": { width: 0 },
          "&:focus-visible": {
            outline: `3px solid ${e(a[500], 0.5)}`,
            outlineOffset: "4px",
            borderRadius: "2px"
          },
          ...r.applyStyles("dark", {
            color: o[100],
            "&::before": { backgroundColor: o[400] }
          })
        })
      }
    },
    MuiDrawer: {
      styleOverrides: {
        paper: ({ theme: r }) => ({ backgroundColor: r.palette.background.default })
      }
    },
    MuiListItemButton: {
      styleOverrides: {
        root: ({ theme: r }) => ({
          borderRadius: r.shape.borderRadius,
          padding: "8px 12px",
          gap: 12,
          border: "1px solid transparent",
          transition: "all 100ms ease-in",
          "&:hover": { backgroundColor: e(o[500], 0.08) },
          "&.Mui-selected": {
            backgroundColor: e(a[500], 0.08),
            border: `1px solid ${e(a[500], 0.2)}`,
            "&:hover": { backgroundColor: e(a[500], 0.12) }
          },
          ...r.applyStyles("dark", {
            "&:hover": { backgroundColor: e(o[500], 0.12) },
            "&.Mui-selected": {
              backgroundColor: e(a[400], 0.12),
              border: `1px solid ${e(a[400], 0.25)}`,
              "&:hover": { backgroundColor: e(a[400], 0.16) }
            }
          })
        })
      }
    },
    MuiTabs: {
      styleOverrides: {
        root: { minHeight: "fit-content" },
        indicator: ({ theme: r }) => ({
          backgroundColor: r.palette.grey[800],
          ...r.applyStyles("dark", { backgroundColor: r.palette.grey[200] })
        })
      }
    },
    MuiTab: {
      styleOverrides: {
        root: ({ theme: r }) => ({
          padding: "6px 8px",
          marginBottom: "8px",
          textTransform: "none",
          minWidth: "fit-content",
          minHeight: "fit-content",
          color: o[600],
          borderRadius: r.shape.borderRadius,
          border: "1px solid transparent",
          ":hover": { color: o[800], backgroundColor: o[100], borderColor: o[200] },
          [`&.${A.selected}`]: { color: o[900] },
          ...r.applyStyles("dark", {
            color: o[400],
            ":hover": { color: o[100], backgroundColor: o[800], borderColor: o[700] },
            [`&.${A.selected}`]: { color: "#fff" }
          })
        })
      }
    }
  };
}
const wo = O();
function z(i) {
  const o = i?.gray ?? x;
  return {
    MuiAlert: {
      styleOverrides: {
        root: {}
      }
    },
    MuiDialog: {
      styleOverrides: {
        root: ({ theme: a }) => ({
          "& .MuiDialog-paper": {
            borderRadius: "10px",
            border: "1px solid",
            borderColor: a.palette.divider,
            backgroundColor: o[50],
            ...a.applyStyles("dark", {
              backgroundColor: o[900],
              borderColor: e(o[700], 0.6)
            })
          }
        })
      }
    },
    MuiPopover: {
      styleOverrides: {
        paper: ({ theme: a }) => ({
          borderRadius: "10px",
          border: "1px solid",
          borderColor: a.palette.divider,
          backgroundImage: "none",
          backgroundColor: o[50],
          boxShadow: "0 4px 20px rgba(0, 0, 0, 0.08)",
          ...a.applyStyles("dark", {
            backgroundColor: o[900],
            borderColor: e(o[700], 0.6),
            boxShadow: "0 4px 20px rgba(0, 0, 0, 0.5)"
          })
        })
      }
    },
    MuiLinearProgress: {
      styleOverrides: {
        root: ({ theme: a }) => ({
          height: 8,
          borderRadius: 8,
          backgroundColor: o[200],
          ...a.applyStyles("dark", { backgroundColor: o[800] })
        })
      }
    }
  };
}
const Oo = z();
function R(i) {
  const o = i?.gray ?? x, a = i?.brand ?? f, r = i?.green ?? I, d = i?.orange ?? P, p = i?.red ?? H, c = i?.purple ?? W;
  return {
    MuiList: {
      styleOverrides: {
        root: { padding: "8px", display: "flex", flexDirection: "column", gap: 0 }
      }
    },
    MuiListItem: {
      styleOverrides: {
        root: ({ theme: t }) => ({
          [`& > .${m.root}`]: { width: "1rem", height: "1rem", color: o[600] },
          [`& .${Z.root}`]: { fontWeight: 500 },
          [`& .${$.root}`]: {
            display: "flex",
            gap: 8,
            padding: "2px 8px",
            borderRadius: t.shape.borderRadius,
            opacity: 0.7,
            "&.Mui-selected": {
              opacity: 1,
              backgroundColor: e(o[200], 0.6),
              [`& .${m.root}`]: { color: o[800] },
              "&:hover": { backgroundColor: e(o[200], 0.8) }
            }
          },
          ...t.applyStyles("dark", {
            [`& > .${m.root}`]: { color: o[400] },
            [`& .${$.root}`]: {
              "&.Mui-selected": {
                backgroundColor: e(o[600], 0.3),
                [`& .${m.root}`]: { color: o[100] },
                "&:hover": { backgroundColor: e(o[600], 0.5) }
              }
            }
          })
        })
      }
    },
    MuiListItemText: {
      styleOverrides: {
        primary: ({ theme: t }) => ({
          fontSize: t.typography.body2.fontSize,
          fontWeight: 500,
          lineHeight: t.typography.body2.lineHeight
        }),
        secondary: ({ theme: t }) => ({
          fontSize: t.typography.caption.fontSize,
          lineHeight: t.typography.caption.lineHeight
        })
      }
    },
    MuiListSubheader: {
      styleOverrides: {
        root: ({ theme: t }) => ({
          backgroundColor: "transparent",
          padding: "4px 8px",
          fontSize: t.typography.caption.fontSize,
          fontWeight: 500,
          lineHeight: t.typography.caption.lineHeight
        })
      }
    },
    MuiListItemIcon: {
      styleOverrides: { root: { minWidth: 0 } }
    },
    MuiCard: {
      defaultProps: { elevation: 0 },
      styleOverrides: {
        root: ({ theme: t }) => ({
          display: "flex",
          flexDirection: "column",
          padding: 16,
          gap: 16,
          overflow: "visible",
          transition: "all 150ms ease-in-out",
          backgroundColor: o[50],
          borderRadius: t.shape.borderRadius,
          border: `1px solid ${t.palette.divider}`,
          boxShadow: "none",
          "&:hover": {
            borderColor: o[300],
            boxShadow: "0 2px 8px 0 rgba(0, 0, 0, 0.08)"
          },
          ...t.applyStyles("dark", {
            backgroundColor: o[800],
            "&:hover": {
              borderColor: o[600],
              boxShadow: "0 2px 8px 0 rgba(0, 0, 0, 0.3)"
            }
          }),
          variants: [
            {
              props: { variant: "outlined" },
              style: {
                border: `1px solid ${t.palette.divider}`,
                boxShadow: "none",
                background: o[50],
                "&:hover": {
                  borderColor: o[300],
                  boxShadow: "0 2px 8px 0 rgba(0, 0, 0, 0.08)"
                },
                ...t.applyStyles("dark", {
                  background: e(o[900], 0.4),
                  "&:hover": {
                    borderColor: o[600],
                    boxShadow: "0 2px 8px 0 rgba(0, 0, 0, 0.3)"
                  }
                })
              }
            }
          ]
        })
      }
    },
    MuiCardContent: {
      styleOverrides: { root: { padding: 0, "&:last-child": { paddingBottom: 0 } } }
    },
    MuiCardHeader: {
      styleOverrides: { root: { padding: 0 } }
    },
    MuiCardActions: {
      styleOverrides: { root: { padding: 0 } }
    },
    MuiPaper: {
      defaultProps: { elevation: 0 },
      styleOverrides: {
        root: ({ theme: t }) => ({
          backgroundImage: "none",
          ...t.applyStyles("dark", { backgroundColor: o[800] })
        })
      }
    },
    MuiChip: {
      defaultProps: { size: "small" },
      styleOverrides: {
        root: ({ theme: t }) => ({
          border: "1px solid",
          borderRadius: 6,
          [`& .${n.label}`]: { fontWeight: 600 },
          variants: [
            {
              props: { color: "default" },
              style: {
                borderColor: o[200],
                backgroundColor: o[100],
                [`& .${n.label}`]: { color: o[500] },
                [`& .${n.icon}`]: { color: o[500] },
                [`& .${n.deleteIcon}`]: { color: o[400], "&:hover": { color: o[600] } },
                ...t.applyStyles("dark", {
                  borderColor: o[600],
                  backgroundColor: e(o[600], 0.3),
                  [`& .${n.label}`]: { color: o[200] },
                  [`& .${n.icon}`]: { color: o[200] },
                  [`& .${n.deleteIcon}`]: { color: o[400], "&:hover": { color: o[200] } }
                })
              }
            },
            {
              props: { color: "success" },
              style: {
                borderColor: r[200],
                backgroundColor: r[50],
                [`& .${n.label}`]: { color: r[500] },
                [`& .${n.icon}`]: { color: r[500] },
                ...t.applyStyles("dark", {
                  borderColor: r[800],
                  backgroundColor: r[900],
                  [`& .${n.label}`]: { color: r[200] },
                  [`& .${n.icon}`]: { color: r[200] }
                })
              }
            },
            {
              props: { color: "error" },
              style: {
                borderColor: p[100],
                backgroundColor: p[50],
                [`& .${n.label}`]: { color: p[500] },
                [`& .${n.icon}`]: { color: p[500] },
                ...t.applyStyles("dark", {
                  borderColor: p[800],
                  backgroundColor: p[900],
                  [`& .${n.label}`]: { color: p[100] },
                  [`& .${n.icon}`]: { color: p[100] }
                })
              }
            },
            {
              props: { color: "warning" },
              style: {
                borderColor: d[200],
                backgroundColor: d[50],
                [`& .${n.label}`]: { color: d[500] },
                [`& .${n.icon}`]: { color: d[500] },
                ...t.applyStyles("dark", {
                  borderColor: d[800],
                  backgroundColor: d[900],
                  [`& .${n.label}`]: { color: d[200] },
                  [`& .${n.icon}`]: { color: d[200] }
                })
              }
            },
            {
              props: { color: "primary" },
              style: {
                borderColor: a[200],
                backgroundColor: a[50],
                [`& .${n.label}`]: { color: a[500] },
                [`& .${n.icon}`]: { color: a[500] },
                ...t.applyStyles("dark", {
                  borderColor: a[800],
                  backgroundColor: a[900],
                  [`& .${n.label}`]: { color: a[100] },
                  [`& .${n.icon}`]: { color: a[100] }
                })
              }
            },
            {
              props: { color: "secondary" },
              style: {
                borderColor: c[200],
                backgroundColor: c[50],
                [`& .${n.label}`]: { color: c[500] },
                [`& .${n.icon}`]: { color: c[500] },
                ...t.applyStyles("dark", {
                  borderColor: c[700],
                  backgroundColor: c[900],
                  [`& .${n.label}`]: { color: c[100] },
                  [`& .${n.icon}`]: { color: c[100] }
                })
              }
            },
            {
              props: { variant: "outlined", color: "default" },
              style: {
                backgroundColor: "transparent",
                borderColor: o[300],
                [`& .${n.label}`]: { color: o[500] },
                ...t.applyStyles("dark", {
                  backgroundColor: "transparent",
                  borderColor: o[500],
                  [`& .${n.label}`]: { color: o[200] }
                })
              }
            },
            {
              props: { size: "small" },
              style: {
                height: 20,
                borderRadius: 6,
                [`& .${n.label}`]: { fontSize: t.typography.caption.fontSize, padding: "0 6px" }
              }
            },
            {
              props: { size: "medium" },
              style: {
                height: 28,
                borderRadius: 8,
                [`& .${n.label}`]: { fontSize: t.typography.caption.fontSize }
              }
            }
          ]
        })
      }
    },
    MuiTablePagination: {
      styleOverrides: {
        actions: {
          display: "flex",
          gap: 8,
          marginRight: 6,
          [`& .${_.root}`]: { minWidth: 0, width: 36, height: 36 }
        }
      }
    },
    MuiAvatar: {
      styleOverrides: {
        root: {
          color: "#ffffff",
          fontWeight: 600
        }
      }
    },
    MuiDivider: {
      styleOverrides: {
        root: ({ theme: t }) => ({
          borderColor: o[200],
          ...t.applyStyles("dark", { borderColor: o[700] })
        })
      }
    },
    MuiTable: {
      styleOverrides: { root: { borderCollapse: "separate", borderSpacing: 0 } }
    },
    MuiTableHead: {
      styleOverrides: {
        root: ({ theme: t }) => ({
          backgroundColor: o[50],
          ...t.applyStyles("dark", { backgroundColor: o[900] })
        })
      }
    },
    MuiTableCell: {
      styleOverrides: {
        root: ({ theme: t }) => ({
          borderColor: o[200],
          padding: "0.75rem 1rem",
          ...t.applyStyles("dark", { borderColor: o[700] })
        }),
        head: ({ theme: t }) => ({
          fontWeight: 600,
          color: o[700],
          ...t.applyStyles("dark", { color: o[300] })
        })
      }
    },
    MuiTableRow: {
      styleOverrides: {
        root: ({ theme: t }) => ({
          "&:hover": { backgroundColor: e(o[100], 0.5) },
          "&.Mui-selected": {
            backgroundColor: e(a[500], 0.08),
            "&:hover": { backgroundColor: e(a[500], 0.12) }
          },
          ...t.applyStyles("dark", {
            "&:hover": { backgroundColor: e(o[700], 0.3) },
            "&.Mui-selected": {
              backgroundColor: e(a[400], 0.15),
              "&:hover": { backgroundColor: e(a[400], 0.2) }
            }
          })
        })
      }
    },
    MuiAccordion: {
      styleOverrides: {
        root: ({ theme: t }) => ({
          border: `1px solid ${o[200]}`,
          borderRadius: t.shape.borderRadius,
          "&:before": { display: "none" },
          "&.Mui-expanded": { margin: 0 },
          ...t.applyStyles("dark", {
            border: `1px solid ${o[700]}`,
            backgroundColor: o[800]
          })
        })
      }
    },
    MuiAccordionSummary: {
      styleOverrides: {
        root: ({ theme: t }) => ({
          borderRadius: t.shape.borderRadius,
          fontWeight: 600,
          "&.Mui-expanded": { minHeight: 48 }
        }),
        content: { "&.Mui-expanded": { margin: "12px 0" } }
      }
    },
    MuiAccordionDetails: {
      styleOverrides: {
        root: ({ theme: t }) => ({
          borderTop: `1px solid ${o[200]}`,
          ...t.applyStyles("dark", { borderTop: `1px solid ${o[700]}` })
        })
      }
    },
    MuiTypography: {
      styleOverrides: {
        root: { WebkitFontSmoothing: "antialiased", MozOsxFontSmoothing: "grayscale" }
      }
    }
  };
}
const zo = R(), oo = { gray: x, brand: f, green: I, orange: P, red: H, purple: W }, ro = {
  palettes: oo,
  getDesignTokens: N,
  getShadows: j,
  getCustomizations: () => ({
    ...w(),
    ...O(),
    ...z(),
    ...R()
  })
}, eo = U(), M = {
  50: "#EEE8D5",
  // base2
  100: "#93A1A1",
  // base1
  200: "#839496",
  // base0
  300: "#657B83",
  // base00
  400: "#586E75",
  // base01
  500: "#4C666E",
  600: "#35565F",
  700: "#1E4651",
  800: "#073642",
  // base02
  900: "#002B36"
  // base03
}, s = {
  50: "#E4F1FB",
  100: "#C6E2F8",
  200: "#7CBCE8",
  300: "#4FA3DD",
  400: "#268BD2",
  500: "#1A73AD",
  600: "#155F94",
  700: "#0F4E7A",
  800: "#07354F",
  900: "#032A40"
}, y = {
  50: "#F2F7E8",
  100: "#DCEBC4",
  200: "#8FBB4D",
  300: "#84B86A",
  400: "#7A9B00",
  500: "#5E7F00",
  600: "#4D6B06",
  700: "#384F04",
  800: "#0F3D2A",
  900: "#083320"
}, k = {
  50: "#FEF8E6",
  100: "#FAECBA",
  200: "#DFB540",
  300: "#B89A4A",
  400: "#B58900",
  500: "#997300",
  600: "#9B4A08",
  700: "#6E5302",
  800: "#2A1E06",
  900: "#1A1204"
}, C = {
  50: "#FBECEC",
  100: "#F5CECE",
  200: "#EA9695",
  300: "#DE6462",
  400: "#DC322F",
  500: "#BC2320",
  600: "#981D1B",
  700: "#701411",
  800: "#4A0B09",
  900: "#2F0504"
}, g = {
  50: "#EEEEF9",
  100: "#D1D2F0",
  200: "#A4A7DD",
  300: "#8387CF",
  400: "#6C71C4",
  500: "#5559AC",
  600: "#474A92",
  700: "#363972",
  800: "#232547",
  900: "#14152D"
}, L = (i) => i === "dark" ? "0 4px 12px rgba(0, 20, 26, 0.35), 0 2px 4px rgba(0, 20, 26, 0.25)" : "0 4px 12px rgba(88, 110, 117, 0.12), 0 2px 4px rgba(88, 110, 117, 0.08)", ao = (i) => ({
  palette: {
    mode: i,
    primary: {
      light: s[200],
      main: s[400],
      dark: s[700],
      contrastText: s[50],
      ...i === "dark" && {
        light: s[300],
        dark: s[700]
      }
    },
    info: {
      light: s[100],
      main: s[300],
      dark: s[600],
      contrastText: M[50],
      ...i === "dark" && {
        contrastText: s[300],
        light: s[500],
        main: s[700],
        dark: s[900]
      }
    },
    warning: {
      light: k[300],
      main: k[400],
      dark: k[800],
      ...i === "dark" && {
        light: k[400],
        main: k[500],
        dark: k[700]
      }
    },
    error: {
      light: C[300],
      main: C[400],
      dark: C[800],
      ...i === "dark" && {
        light: C[400],
        main: C[500],
        dark: C[700]
      }
    },
    success: {
      light: y[300],
      main: y[400],
      dark: y[800],
      ...i === "dark" && {
        light: y[400],
        main: y[500],
        dark: y[700]
      }
    },
    secondary: {
      light: g[300],
      main: g[400],
      dark: g[700],
      contrastText: g[50],
      ...i === "dark" && {
        light: g[300],
        main: g[400],
        dark: g[800]
      }
    },
    grey: M,
    divider: i === "dark" ? "rgba(76, 102, 110, 0.6)" : "rgba(201, 194, 175, 0.6)",
    background: {
      default: i === "dark" ? "#002B36" : "#FDF6E3",
      paper: i === "dark" ? "#073642" : "#EEE8D5"
    },
    text: {
      primary: i === "dark" ? "rgba(147, 161, 161, 0.92)" : "rgba(88, 110, 117, 0.92)",
      secondary: i === "dark" ? "rgba(147, 161, 161, 0.64)" : "rgba(88, 110, 117, 0.64)"
    },
    action: {
      hover: i === "dark" ? "rgba(147, 161, 161, 0.04)" : "rgba(88, 110, 117, 0.04)",
      selected: "rgba(38, 139, 210, 0.10)"
    },
    baseShadow: L(i)
  }
}), to = (i) => {
  const o = L(i), a = [...eo.shadows];
  return a[1] = o, a;
}, h = {
  gray: M,
  brand: s,
  green: y,
  orange: k,
  red: C,
  purple: g
}, io = {
  palettes: h,
  getDesignTokens: ao,
  getShadows: to,
  getCustomizations: () => ({
    ...w(h),
    ...O(h),
    ...z(h),
    ...R(h)
  })
};
function Ro() {
  B.register("default", ro), B.register("solarized", io);
}
function Bo(i) {
  const o = document.documentElement;
  o.setAttribute("data-ov-theme", i.type);
  for (const [a, r] of Object.entries(i.colors)) {
    const d = `--ov-${a.replace(/\./g, "-")}`;
    o.style.setProperty(d, r);
  }
  i.typography?.fontFamily && o.style.setProperty("--ov-font-ui", i.typography.fontFamily), i.typography?.monoFontFamily && o.style.setProperty("--ov-font-mono", i.typography.monoFontFamily), i.typography?.fontSize && o.style.setProperty(
    "--ov-text-base",
    `${i.typography.fontSize / 16}rem`
  );
}
function To(i = "dark") {
  const o = document.documentElement;
  o.setAttribute("data-ov-theme", i), o.removeAttribute("style");
}
export {
  Do as AppTheme,
  B as ThemeRegistry,
  Ao as ThemeVariantContext,
  Bo as applyTheme,
  f as brand,
  R as createDataDisplayCustomizations,
  z as createFeedbackCustomizations,
  w as createInputsCustomizations,
  O as createNavigationCustomizations,
  j as customShadows,
  zo as dataDisplayCustomizations,
  Oo as feedbackCustomizations,
  N as getDesignTokens,
  ao as getSolarizedDesignTokens,
  x as gray,
  I as green,
  Ro as initThemeRegistry,
  Mo as inputsCustomizations,
  wo as navigationCustomizations,
  P as orange,
  W as purple,
  H as red,
  To as resetTheme,
  Io as shape,
  s as solarizedBrand,
  to as solarizedCustomShadows,
  M as solarizedGray,
  y as solarizedGreen,
  k as solarizedOrange,
  g as solarizedPurple,
  C as solarizedRed,
  Po as typography,
  Ho as useThemeVariant
};
