import{_ as A}from"./preload-helper.js";import{h as u,render as h,hydrate as E}from"preact";const v=({value:a,name:c,hydrate:t=!0})=>a?u(t?"astro-slot":"astro-static-slot",{name:c,dangerouslySetInnerHTML:{__html:a}}):null;v.shouldComponentUpdate=()=>!1;var m=v;const n=new Map;var V=a=>async(c,t,{default:i,...S},{client:y})=>{if(!a.hasAttribute("ssr"))return;for(const[e,f]of Object.entries(S))t[e]=u(m,{value:f,name:e});if(a.dataset.preactSignals){const{signal:e}=await A(async()=>{const{signal:s}=await import("./signals.module.js");return{signal:s}},[]);let f=JSON.parse(a.dataset.preactSignals);for(const[s,l]of Object.entries(f))if(Array.isArray(l))l.forEach(([r,o])=>{const g=t[s][o];let d=g;if(typeof o!="string"&&(d=g[0],o=g[1]),!n.has(r)){const w=e(d);n.set(r,w)}t[s][o]=n.get(r)});else{if(!n.has(l)){const r=e(t[s]);n.set(l,r)}t[s]=n.get(l)}}const _=u(c,t,i!=null?u(m,{value:i}):i);y==="only"?(a.innerHTML="",h(_,a)):E(_,a),a.addEventListener("astro:unmount",()=>h(null,a),{once:!0})};export{V as default};
