const g={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return ie(this.context.count)},getNextContextId(){return ie(this.context.count++)}};function ie(e){const n=String(e),t=n.length-1;return g.context.id+(t?String.fromCharCode(96+t):"")+n}function I(e){g.context=e}function Te(){return{...g.context,id:g.getNextContextId(),count:0}}const Ne=!1,$e=(e,n)=>e===n,$=Symbol("solid-proxy"),le=Symbol("solid-track"),q={equals:$e};let Pe=be;const P=1,B=2,ue={owned:null,cleanups:null,context:null,owner:null};var y=null;let G=null,je=null,b=null,p=null,E=null,k=0;function ce(e,n){const t=b,s=y,i=e.length===0,l=n===void 0?s:n,o=i?ue:{owned:null,cleanups:null,context:l?l.context:null,owner:l},f=i?e:()=>e(()=>D(()=>K(o)));y=o,b=null;try{return R(f,!0)}finally{b=t,y=s}}function Q(e,n){n=n?Object.assign({},q,n):q;const t={value:e,observers:null,observerSlots:null,comparator:n.equals||void 0},s=i=>(typeof i=="function"&&(i=i(t.value)),ae(t,i));return[he.bind(t),s]}function W(e,n,t){const s=ge(e,n,!1,P);m(s)}function H(e,n,t){t=t?Object.assign({},q,t):q;const s=ge(e,n,!0,0);return s.observers=null,s.observerSlots=null,s.comparator=t.equals||void 0,m(s),he.bind(s)}function Fe(e){return R(e,!1)}function D(e){if(b===null)return e();const n=b;b=null;try{return e()}finally{b=n}}function Ie(e){return y===null||(y.cleanups===null?y.cleanups=[e]:y.cleanups.push(e)),e}function X(){return b}function ve(){return y}function _e(e){E.push.apply(E,e),e.length=0}function de(e,n){const t=Symbol("context");return{id:t,Provider:qe(t),defaultValue:e}}function Re(e){let n;return y&&y.context&&(n=y.context[e.id])!==void 0?n:e.defaultValue}function Le(e){const n=H(e),t=H(()=>Z(n()));return t.toArray=()=>{const s=t();return Array.isArray(s)?s:s!=null?[s]:[]},t}let oe;function He(){return oe||(oe=de())}function he(){if(this.sources&&this.state)if(this.state===P)m(this);else{const e=p;p=null,R(()=>U(this),!1),p=e}if(b){const e=this.observers?this.observers.length:0;b.sources?(b.sources.push(this),b.sourceSlots.push(e)):(b.sources=[this],b.sourceSlots=[e]),this.observers?(this.observers.push(b),this.observerSlots.push(b.sources.length-1)):(this.observers=[b],this.observerSlots=[b.sources.length-1])}return this.value}function ae(e,n,t){let s=e.value;return(!e.comparator||!e.comparator(s,n))&&(e.value=n,e.observers&&e.observers.length&&R(()=>{for(let i=0;i1e6)throw p=[],new Error},!1)),n}function m(e){if(!e.fn)return;K(e);const n=k;De(e,e.value,n)}function De(e,n,t){let s;const i=y,l=b;b=y=e;try{s=e.fn(n)}catch(o){return e.pure&&(e.state=P,e.owned&&e.owned.forEach(K),e.owned=null),e.updatedAt=t+1,pe(o)}finally{b=l,y=i}(!e.updatedAt||e.updatedAt<=t)&&(e.updatedAt!=null&&"observers"in e?ae(e,s):e.value=s,e.updatedAt=t)}function ge(e,n,t,s=P,i){const l={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:n,owner:y,context:y?y.context:null,pure:t};return y===null||y!==ue&&(y.owned?y.owned.push(l):y.owned=[l]),l}function ye(e){if(e.state===0)return;if(e.state===B)return U(e);if(e.suspense&&D(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;t--)if(e=n[t],e.state===P)m(e);else if(e.state===B){const s=p;p=null,R(()=>U(e,n[0]),!1),p=s}}function R(e,n){if(p)return e();let t=!1;n||(p=[]),E?t=!0:E=[],k++;try{const s=e();return Ke(t),s}catch(s){t||(E=null),p=null,pe(s)}}function Ke(e){if(p&&(be(p),p=null),e)return;const n=E;E=null,n.length&&R(()=>Pe(n),!1)}function be(e){for(let n=0;n=0;n--)K(e.tOwned[n]);delete e.tOwned}if(e.owned){for(n=e.owned.length-1;n>=0;n--)K(e.owned[n]);e.owned=null}if(e.cleanups){for(n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}e.state=0}function Me(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function pe(e,n=y){throw Me(e)}function Z(e){if(typeof e=="function"&&!e.length)return Z(e());if(Array.isArray(e)){const n=[];for(let t=0;ti=D(()=>(y.context={...y.context,[e]:s.value},Le(()=>s.children))),void 0),i}}let Ae=!1;function Be(){Ae=!0}function z(e,n){if(Ae&&g.context){const t=g.context;I(Te());const s=D(()=>e(n||{}));return I(t),s}return D(()=>e(n||{}))}const We=de();function Ue(e){let n=0,t,s,i,l,o;const[f,u]=Q(!1),c=He(),r={increment:()=>{++n===1&&u(!0)},decrement:()=>{--n===0&&u(!1)},inFallback:f,effects:[],resolved:!1},d=ve();if(g.context&&g.load){const w=g.getContextId();let A=g.load(w);if(A&&(typeof A!="object"||A.s!==1?i=A:g.gather(w)),i&&i!=="$$f"){const[C,x]=Q(void 0,{equals:!1});l=C,i.then(()=>{if(g.done)return x();g.gather(w),I(s),x(),I()},T=>{o=T,x()})}}const h=Re(We);h&&(t=h.register(r.inFallback));let a;return Ie(()=>a&&a()),z(c.Provider,{value:r,get children(){return H(()=>{if(o)throw o;if(s=g.context,l)return l(),l=void 0;s&&i==="$$f"&&I();const w=H(()=>e.children);return H(A=>{const C=r.inFallback(),{showContent:x=!0,showFallback:T=!0}=t?t():{};if((!C||i&&i!=="$$f")&&x)return r.resolved=!0,a&&a(),a=s=i=void 0,_e(r.effects),w();if(T)return a?A:ce(Ee=>(a=Ee,s&&(I({id:s.id+"F",count:0}),s=void 0),e.fallback),d)})})}})}const ee=Symbol("store-raw"),v=Symbol("store-node"),O=Symbol("store-has"),Se=Symbol("store-self");function xe(e){let n=e[$];if(!n&&(Object.defineProperty(e,$,{value:n=new Proxy(e,ke)}),!Array.isArray(e))){const t=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let i=0,l=t.length;ie[$][n]),t}function Ce(e){X()&&M(Y(e,v),Se)()}function Ve(e){return Ce(e),Reflect.ownKeys(e)}const ke={get(e,n,t){if(n===ee)return e;if(n===$)return t;if(n===le)return Ce(e),t;const s=Y(e,v),i=s[n];let l=i?i():e[n];if(n===v||n===O||n==="__proto__")return l;if(!i){const o=Object.getOwnPropertyDescriptor(e,n);X()&&(typeof l!="function"||e.hasOwnProperty(n))&&!(o&&o.get)&&(l=M(s,n,l)())}return N(l)?xe(l):l},has(e,n){return n===ee||n===$||n===le||n===v||n===O||n==="__proto__"?!0:(X()&&M(Y(e,O),n)(),n in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Ve,getOwnPropertyDescriptor:Ye};function S(e,n,t,s=!1){if(!s&&e[n]===t)return;const i=e[n],l=e.length;t===void 0?(delete e[n],e[O]&&e[O][n]&&i!==void 0&&e[O][n].$()):(e[n]=t,e[O]&&e[O][n]&&i===void 0&&e[O][n].$());let o=Y(e,v),f;if((f=M(o,n,i))&&f.$(()=>t),Array.isArray(e)&&e.length!==l){for(let u=e.length;u1){s=n.shift();const o=typeof s,f=Array.isArray(e);if(Array.isArray(s)){for(let u=0;u1){L(e[s],n,[s].concat(t));return}i=e[s],t=[s].concat(t)}let l=n[0];typeof l=="function"&&(l=l(i,t),l===i)||s===void 0&&l==null||(l=_(l),s===void 0||N(i)&&N(l)&&!Array.isArray(l)?Oe(i,l):S(e,s,l))}function Ge(...[e,n]){const t=_(e||{}),s=Array.isArray(t),i=xe(t);function l(...o){Fe(()=>{s&&o.length===1?me(t,o[0]):L(t,o)})}return[i,l]}const ne=Symbol("store-root");function F(e,n,t,s,i){const l=n[t];if(e===l)return;const o=Array.isArray(e);if(t!==ne&&(!N(e)||!N(l)||o!==Array.isArray(l)||i&&e[i]!==l[i])){S(n,t,e);return}if(o){if(e.length&&l.length&&(!s||i&&e[0]&&e[0][i]!=null)){let c,r,d,h,a,w,A,C;for(d=0,h=Math.min(l.length,e.length);d=d&&a>=d&&(l[h]===e[a]||i&&l[h]&&e[a]&&l[h][i]&&l[h][i]===e[a][i]);h--,a--)x[a]=l[h];if(d>a||d>h){for(r=d;r<=a;r++)S(l,r,e[r]);for(;re.length&&S(l,"length",e.length);return}for(A=new Array(a+1),r=a;r>=d;r--)w=e[r],C=i&&w?w[i]:w,c=T.get(C),A[r]=c===void 0?-1:c,T.set(C,r);for(c=d;c<=h;c++)w=l[c],C=i&&w?w[i]:w,r=T.get(C),r!==void 0&&r!==-1&&(x[r]=l[c],r=A[r],T.set(C,r));for(r=d;re.length&&S(l,"length",e.length);return}const f=Object.keys(e);for(let c=0,r=f.length;c{if(!N(l)||!N(i))return i;const o=F(i,{[ne]:l},ne,t,s);return o===void 0?l:o}}function Qe(e,n,t){let s=t.length,i=n.length,l=s,o=0,f=0,u=n[i-1].nextSibling,c=null;for(;or-f){const w=n[o];for(;f{i=l,n===document?e():Xe(n,e(),n.firstChild?null:void 0,t)},s.owner),()=>{i(),n.textContent=""}}function Xe(e,n,t,s){if(t!==void 0&&!s&&(s=[]),typeof n!="function")return V(e,n,s,t);W(i=>V(e,n(),i,t),s)}function Ze(e,n,t={}){if(globalThis._$HY.done)return te(e,n,[...n.childNodes],t);g.completed=globalThis._$HY.completed,g.events=globalThis._$HY.events,g.load=s=>globalThis._$HY.r[s],g.has=s=>s in globalThis._$HY.r,g.gather=s=>fe(n,s),g.registry=new Map,g.context={id:t.renderId||"",count:0};try{return fe(n,t.renderId),te(e,n,[...n.childNodes],t)}finally{g.context=null}}function ze(e){return!!g.context&&!g.done&&(!e||e.isConnected)}function V(e,n,t,s,i){const l=ze(e);if(l){!t&&(t=[...e.childNodes]);let u=[];for(let c=0;c{let u=n();for(;typeof u=="function";)u=u();t=V(e,u,t,s)}),()=>t;if(Array.isArray(n)){const u=[],c=t&&Array.isArray(t);if(se(u,n,t,i))return W(()=>t=V(e,u,t,s,!0)),()=>t;if(l){if(!u.length)return t;if(s===void 0)return t=[...e.childNodes];let r=u[0];if(r.parentNode!==e)return t;const d=[r];for(;(r=r.nextSibling)!==s;)d.push(r);return t=d}if(u.length===0){if(t=j(e,t,s),f)return t}else c?t.length===0?re(e,u,s):Qe(e,t,u):(t&&j(e),re(e,u));t=u}else if(n.nodeType){if(l&&n.parentNode)return t=f?[n]:n;if(Array.isArray(t)){if(f)return t=j(e,t,s,n);j(e,t,null,n)}else t==null||t===""||!e.firstChild?e.appendChild(n):e.replaceChild(n,e.firstChild);t=n}}return t}function se(e,n,t,s){let i=!1;for(let l=0,o=n.length;l=0;o--){const f=n[o];if(i!==f){const u=f.parentNode===e;!l&&!o?u?e.replaceChild(i,f):e.insertBefore(i,t):u&&f.remove()}else l=!0}}else e.insertBefore(i,t);return[i]}function fe(e,n){const t=e.querySelectorAll("*[data-hk]");for(let s=0;s(Be(),Ze(...e)),J=new WeakMap;var nn=e=>(n,t,s,{client:i})=>{if(!e.hasAttribute("ssr"))return;const l=i!=="only",o=l?en:te;let f,u={};if(Object.keys(s).length>0){if(i!=="only"){const h=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,a=>a===e?NodeFilter.FILTER_SKIP:a.nodeName==="ASTRO-SLOT"?NodeFilter.FILTER_ACCEPT:a.nodeName==="ASTRO-ISLAND"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP);for(;f=h.nextNode();)u[f.getAttribute("name")||"default"]=f}for(const[h,a]of Object.entries(s))u[h]||(u[h]=document.createElement("astro-slot"),h!=="default"&&u[h].setAttribute("name",h),u[h].innerHTML=a)}const{default:c,...r}=u,d=e.dataset.solidRenderId;if(J.has(e))J.get(e)(Je({...t,...r,children:c}));else{const[h,a]=Ge({...t,...r,children:c});J.set(e,a);const w=o(()=>{const A=()=>z(n,h);return l?z(Ue,{get children(){return A()}}):A()},e,{renderId:d});e.addEventListener("astro:unmount",()=>w(),{once:!0})}};export{nn as default};