const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./register-BqqwIOLc-llieL4FY.js","./register-BqqwIOLc-B78Bmrit.js","./rolldown-runtime-BG2f4sTM.js","./app-initial~avatarOverlayCompositionSurface~index-9fQ9wihu~index-BFCcxPM5~mapbox-gl-DVWlwqb~kppdhley-CabsBVhy.js","./app-initial~avatarOverlayCompositionSurface~artifact-tab-content.electron~notebook-preview-~ngwudnyz-D_QFwR2V.js","./app-initial~avatarOverlayCompositionSurface~artifact-tab-content.electron~notebook-preview-~l16cgjx9-XwSLyHyz.js","./app-initial~avatarOverlayCompositionSurface~index~index-9fQ9wihu~index-BFCcxPM5~mapbox-gl-D~ch0na97m-DGJ4C9j8.js","./app-initial~avatarOverlayCompositionSurface~index-9fQ9wihu~index-BFCcxPM5~mapbox-gl-DVWlwqb~gsbyx6su-EGL8CaU9.js","./app-initial~avatarOverlayCompositionSurface~index-9fQ9wihu~index-BFCcxPM5~mapbox-gl-DVWlwqb~elr7dp2m-DG_7tMKE.js"])))=>i.map(i=>d[i]);
import{n as e,s as t}from"./rolldown-runtime-BG2f4sTM.js";import{dn as n,un as r,zt as i}from"./app-initial~avatarOverlayCompositionSurface~index-9fQ9wihu~index-BFCcxPM5~mapbox-gl-DVWlwqb~kppdhley-CabsBVhy.js";import{o as a,s as o}from"./app-initial~avatarOverlayCompositionSurface~index~index-9fQ9wihu~index-BFCcxPM5~mapbox-gl-D~ch0na97m-DGJ4C9j8.js";function s(e){let t=(0,u.c)(21),{widget:n,initialState:r,theme:i,dir:a,mapboxAccessToken:o,streaming:s,className:f,customCss:m,onAction:h,onError:g,onLoad:_}=e,v=(0,d.useRef)(null),y;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(y=[],t[0]=y):y=t[0],(0,d.useEffect)(c,y);let b,x;t[1]===_?(b=t[2],x=t[3]):(b=()=>{if(!v.current)return;let e=new AbortController;return v.current.addEventListener(`dil.load`,e=>{let{detail:t}=e;_?.(t.imperativeApi)},{signal:e.signal}),()=>{e.abort()}},x=[_],t[1]=_,t[2]=b,t[3]=x),(0,d.useEffect)(b,x);let S,C;t[4]===h?(S=t[5],C=t[6]):(S=()=>{if(!v.current||!h)return;let e=new AbortController;return v.current.addEventListener(`dil.action`,e=>{let{detail:t}=e,{action:n,resolve:r,reject:i}=t;h(n).then(r,i)},{signal:e.signal}),()=>{e.abort()}},C=[h],t[4]=h,t[5]=S,t[6]=C),(0,d.useEffect)(S,C);let w,T;t[7]===g?(w=t[8],T=t[9]):(w=()=>{if(!v.current||!g)return;let e=new AbortController;return v.current.addEventListener(`dil.error`,e=>{let{error:t}=e;g(t)},{signal:e.signal}),()=>{e.abort()}},T=[g],t[7]=g,t[8]=w,t[9]=T),(0,d.useEffect)(w,T);let E,D;t[10]!==m||t[11]!==a||t[12]!==r||t[13]!==o||t[14]!==s||t[15]!==i||t[16]!==n?(E=()=>{if(!v.current)return;let e=v.current;p().then(()=>{e.setState({widget:n,initialState:r,theme:i,streaming:s,mapboxAccessToken:o,dir:a,customCss:m})})},D=[n,r,i,s,o,a,m],t[10]=m,t[11]=a,t[12]=r,t[13]=o,t[14]=s,t[15]=i,t[16]=n,t[17]=E,t[18]=D):(E=t[17],D=t[18]),(0,d.useEffect)(E,D);let O;return t[19]===f?O=t[20]:(O=(0,l.jsx)(`dil-renderer`,{ref:v,className:f}),t[19]=f,t[20]=O),O}function c(){p()}var l,u,d,f,p;e((()=>{l=i(),u=r(),d=t(n(),1),o(),f=null,p=()=>(f??=a(()=>import(`./register-BqqwIOLc-llieL4FY.js`).then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url).then(e=>{e.registerTag()}),f)}))();export{s as DILRenderer};
//# sourceMappingURL=dist-BzfmOLQN.js.map