"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./Text-Mk6Uyg1w.cjs"),i=require("react/jsx-runtime"),v=require("@mui/material/Typography"),s=require("@mui/material/Box"),y=require("@mui/icons-material/Link"),h=require("./CodeBlock-DTB_WsXQ.cjs"),m=require("@mui/material/Link"),x=require("./types.cjs"),b={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"};function l({children:n,level:o=2,id:e,copyLink:t=!1,sx:r}){const a=typeof o=="string"?parseInt(o.replace("h",""),10):o,c=b[a],u=()=>{if(e){const f=`${window.location.origin}${window.location.pathname}#${e}`;navigator.clipboard.writeText(f)}};return i.jsxs(v,{variant:c,id:e,sx:{color:"var(--ov-fg-base)",fontWeight:"var(--ov-weight-semibold)",display:"flex",alignItems:"center",gap:.5,"&:hover .ov-heading-anchor":{opacity:1},...typeof r=="object"&&!Array.isArray(r)?r:{}},children:[n,t&&e&&i.jsx(s,{component:"button",className:"ov-heading-anchor",onClick:u,sx:{opacity:0,transition:"opacity 150ms",background:"none",border:"none",cursor:"pointer",color:"var(--ov-fg-faint)",display:"inline-flex",p:0,"&:hover":{color:"var(--ov-fg-default)"}},children:i.jsx(y,{sx:{fontSize:"0.7em"}})})]})}l.displayName="Heading";function d({children:n,sx:o}){return i.jsx(s,{component:"code",sx:{fontFamily:"var(--ov-font-mono)",fontSize:"0.85em",backgroundColor:"var(--ov-bg-surface-inset)",color:"var(--ov-fg-default)",padding:"2px 6px",borderRadius:"3px",whiteSpace:"nowrap",...typeof o=="object"&&!Array.isArray(o)?o:{}},children:n})}d.displayName="CodeInline";function p({children:n,href:o,color:e="primary",underline:t="hover",external:r=!1,onClick:a,sx:c}){return i.jsx(m,{href:o,color:x.toMuiColor(e),underline:t,onClick:a,...r?{target:"_blank",rel:"noopener noreferrer"}:{},sx:c,children:n})}p.displayName="Link";exports.Text=g.Text;exports.CodeBlock=h.CodeBlock;exports.CodeInline=d;exports.Heading=l;exports.Link=p;
