import{$ as y,n as q,p as K,q as I,c as J,v as V,w as X,b as C,x as Y}from"./web.gEHESIx2.js";const L=Symbol("store-raw"),$=Symbol("store-node"),O=Symbol("store-has"),M=Symbol("store-self");function W(n){let e=n[y];if(!e&&(Object.defineProperty(n,y,{value:e=new Proxy(n,Q)}),!Array.isArray(n))){const r=Object.keys(n),f=Object.getOwnPropertyDescriptors(n);for(let o=0,i=r.length;on[y][e]),r}function H(n){I()&&N(R(n,$),M)()}function G(n){return H(n),Reflect.ownKeys(n)}const Q={get(n,e,r){if(e===L)return n;if(e===y)return r;if(e===K)return H(n),r;const f=R(n,$),o=f[e];let i=o?o():n[e];if(e===$||e===O||e==="__proto__")return i;if(!o){const l=Object.getOwnPropertyDescriptor(n,e);I()&&(typeof i!="function"||n.hasOwnProperty(e))&&!(l&&l.get)&&(i=N(f,e,i)())}return w(i)?W(i):i},has(n,e){return e===L||e===y||e===K||e===$||e===O||e==="__proto__"?!0:(I()&&N(R(n,O),e)(),e in n)},set(){return!0},deleteProperty(){return!0},ownKeys:G,getOwnPropertyDescriptor:B};function A(n,e,r,f=!1){if(!f&&n[e]===r)return;const o=n[e],i=n.length;r===void 0?(delete n[e],n[O]&&n[O][e]&&o!==void 0&&n[O][e].$()):(n[e]=r,n[O]&&n[O][e]&&o===void 0&&n[O][e].$());let l=R(n,$),d;if((d=N(l,e,o))&&d.$(()=>r),Array.isArray(n)&&n.length!==i){for(let t=n.length;t1){f=e.shift();const l=typeof f,d=Array.isArray(n);if(Array.isArray(f)){for(let t=0;t1){T(n[f],e,[f].concat(r));return}o=n[f],r=[f].concat(r)}let i=e[0];typeof i=="function"&&(i=i(o,r),i===o)||f===void 0&&i==null||(i=g(i),f===void 0||w(o)&&w(i)&&!Array.isArray(i)?z(o,i):A(n,f,i))}function Z(...[n,e]){const r=g(n||{}),f=Array.isArray(r),o=W(r);function i(...l){q(()=>{f&&l.length===1?U(r,l[0]):T(r,l)})}return[o,i]}const D=Symbol("store-root");function P(n,e,r,f,o){const i=e[r];if(n===i)return;const l=Array.isArray(n);if(r!==D&&(!w(n)||!w(i)||l!==Array.isArray(i)||o&&n[o]!==i[o])){A(e,r,n);return}if(l){if(n.length&&i.length&&(!f||o&&n[0]&&n[0][o]!=null)){let c,s,u,h,a,b,S,j;for(u=0,h=Math.min(i.length,n.length);u=u&&a>=u&&(i[h]===n[a]||o&&i[h]&&n[a]&&i[h][o]&&i[h][o]===n[a][o]);h--,a--)E[a]=i[h];if(u>a||u>h){for(s=u;s<=a;s++)A(i,s,n[s]);for(;sn.length&&A(i,"length",n.length);return}for(S=new Array(a+1),s=a;s>=u;s--)b=n[s],j=o&&b?b[o]:b,c=_.get(j),S[s]=c===void 0?-1:c,_.set(j,s);for(c=u;c<=h;c++)b=i[c],j=o&&b?b[o]:b,s=_.get(j),s!==void 0&&s!==-1&&(E[s]=i[c],s=S[s],_.set(j,s));for(s=u;sn.length&&A(i,"length",n.length);return}const d=Object.keys(n);for(let c=0,s=d.length;c{if(!w(i)||!w(o))return o;const l=P(o,{[D]:i},D,r,f);return l===void 0?i:l}}const F=new WeakMap;var k=n=>(e,r,f,{client:o})=>{if(!n.hasAttribute("ssr"))return;const i=o!=="only",l=i?V:X;let d,t={};if(Object.keys(f).length>0){if(o!=="only"){const h=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,a=>a===n?NodeFilter.FILTER_SKIP:a.nodeName==="ASTRO-SLOT"?NodeFilter.FILTER_ACCEPT:a.nodeName==="ASTRO-ISLAND"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP);for(;d=h.nextNode();)t[d.getAttribute("name")||"default"]=d}for(const[h,a]of Object.entries(f))t[h]||(t[h]=document.createElement("astro-slot"),h!=="default"&&t[h].setAttribute("name",h),t[h].innerHTML=a)}const{default:c,...s}=t,u=n.dataset.solidRenderId;if(F.has(n))F.get(n)(v({...r,...s,children:c}));else{const[h,a]=Z({...r,...s,children:c});F.set(n,a);const b=l(()=>{const S=()=>C(e,h);return i?C(Y,{get children(){return S()}}):S()},n,{renderId:u});n.addEventListener("astro:unmount",()=>b(),{once:!0})}};export{k as default};