import{M as h,v as p,u as a,R as n,H as E,a as v,C as R,D as _,y as f}from"./iframe-I4S6H_qo.js";import{_ as y}from"./preload-helper-PPVm8Dsz.js";const w=Object.freeze(Object.defineProperty({__proto__:null,MDXProvider:h,useMDXComponents:f},Symbol.toStringTag,{value:"Module"}));var s={},m;function C(){if(m)return s;m=1;var e=p();return s.createRoot=e.createRoot,s.hydrateRoot=e.hydrateRoot,s}var D=C(),i=new Map;function M(){return globalThis.IS_REACT_ACT_ENVIRONMENT}var g=({callback:e,children:r})=>{let t=a.useRef();return a.useLayoutEffect(()=>{t.current!==e&&(t.current=e,e())},[e]),r};typeof Promise.withResolvers>"u"&&(Promise.withResolvers=()=>{let e=null,r=null;return{promise:new Promise((t,o)=>{e=t,r=o}),resolve:e,reject:r}});var x=async(e,r,t)=>{let o=await T(r,t);if(M()){o.render(e);return}let{promise:u,resolve:c}=Promise.withResolvers();return o.render(a.createElement(g,{callback:c},e)),u},P=(e,r)=>{let t=i.get(e);t&&(t.unmount(),i.delete(e))},T=async(e,r)=>{let t=i.get(e);return t||(t=D.createRoot(e,r),i.set(e,t)),t},A={code:R,a:v,...E},O=class extends a.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){let{showException:r}=this.props;r(e)}render(){let{hasError:e}=this.state,{children:r}=this.props;return e?null:n.createElement(n.Fragment,null,r)}},N=class{constructor(){this.render=async(e,r,t)=>{let o={...A,...r?.components},u=_;return new Promise((c,d)=>{y(async()=>{const{MDXProvider:l}=await Promise.resolve().then(()=>w);return{MDXProvider:l}},void 0,import.meta.url).then(({MDXProvider:l})=>x(n.createElement(O,{showException:d,key:Math.random()},n.createElement(l,{components:o},n.createElement(u,{context:e,docsParameter:r}))),t)).then(()=>c())})},this.unmount=e=>{P(e)}}};export{N as DocsRenderer,A as defaultComponents};
