const c={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Z(this.context.count)},getNextContextId(){return Z(this.context.count++)}};function Z(e){const t=String(e),n=t.length-1;return c.context.id+(n?String.fromCharCode(96+n):"")+t}function O(e){c.context=e}function Ae(){return{...c.context,id:c.getNextContextId(),count:0}}const Se=!1,Ee=(e,t)=>e===t,K=Symbol("solid-proxy"),Ce=typeof Proxy=="function",$e=Symbol("solid-track"),V={equals:Ee};let fe=ye;const k=1,_=2,ce={owned:null,cleanups:null,context:null,owner:null};var h=null;let q=null,Pe=null,b=null,w=null,C=null,Y=0;function F(e,t){const n=b,s=h,i=e.length===0,r=t===void 0?s:t,l=i?ce:{owned:null,cleanups:null,context:r?r.context:null,owner:r},o=i?e:()=>e(()=>E(()=>j(l)));h=l,b=null;try{return D(o,!0)}finally{b=n,h=s}}function X(e,t){t=t?Object.assign({},V,t):V;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},s=i=>(typeof i=="function"&&(i=i(n.value)),ge(n,i));return[he.bind(n),s]}function I(e,t,n){const s=J(e,t,!1,k);H(s)}function Te(e,t,n){fe=De;const s=J(e,t,!1,k),i=U&&de(U);i&&(s.suspense=i),s.user=!0,C?C.push(s):H(s)}function S(e,t,n){n=n?Object.assign({},V,n):V;const s=J(e,t,!0,0);return s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,H(s),he.bind(s)}function mt(e){return D(e,!1)}function E(e){if(b===null)return e();const t=b;b=null;try{return e()}finally{b=t}}function pt(e){Te(()=>E(e))}function ue(e){return h===null||(h.cleanups===null?h.cleanups=[e]:h.cleanups.push(e)),e}function xt(){return b}function Ne(){return h}function ke(e){C.push.apply(C,e),e.length=0}function ae(e,t){const n=Symbol("context");return{id:n,Provider:je(n),defaultValue:e}}function de(e){let t;return h&&h.context&&(t=h.context[e.id])!==void 0?t:e.defaultValue}function Oe(e){const t=S(e),n=S(()=>W(t()));return n.toArray=()=>{const s=n();return Array.isArray(s)?s:s!=null?[s]:[]},n}let U;function Ie(){return U||(U=ae())}function he(){if(this.sources&&this.state)if(this.state===k)H(this);else{const e=w;w=null,D(()=>G(this),!1),w=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 ge(e,t,n){let s=e.value;return(!e.comparator||!e.comparator(s,t))&&(e.value=t,e.observers&&e.observers.length&&D(()=>{for(let i=0;i1e6)throw w=[],new Error},!1)),t}function H(e){if(!e.fn)return;j(e);const t=Y;Le(e,e.value,t)}function Le(e,t,n){let s;const i=h,r=b;b=h=e;try{s=e.fn(t)}catch(l){return e.pure&&(e.state=k,e.owned&&e.owned.forEach(j),e.owned=null),e.updatedAt=n+1,we(l)}finally{b=r,h=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?ge(e,s):e.value=s,e.updatedAt=n)}function J(e,t,n,s=k,i){const r={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:h,context:h?h.context:null,pure:n};return h===null||h!==ce&&(h.owned?h.owned.push(r):h.owned=[r]),r}function B(e){if(e.state===0)return;if(e.state===_)return G(e);if(e.suspense&&E(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;n--)if(e=t[n],e.state===k)H(e);else if(e.state===_){const s=w;w=null,D(()=>G(e,t[0]),!1),w=s}}function D(e,t){if(w)return e();let n=!1;t||(w=[]),C?n=!0:C=[],Y++;try{const s=e();return Me(n),s}catch(s){n||(C=null),w=null,we(s)}}function Me(e){if(w&&(ye(w),w=null),e)return;const t=C;C=null,t.length&&D(()=>fe(t),!1)}function ye(e){for(let t=0;t=0;t--)j(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)j(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Fe(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function we(e,t=h){throw Fe(e)}function W(e){if(typeof e=="function"&&!e.length)return W(e());if(Array.isArray(e)){const t=[];for(let n=0;ni=E(()=>(h.context={...h.context,[e]:s.value},Oe(()=>s.children))),void 0),i}}const Re=Symbol("fallback");function ee(e){for(let t=0;t1?[]:null;return ue(()=>ee(r)),()=>{let f=e()||[],d=f.length,a,u;return f[$e],E(()=>{let y,m,p,N,$,x,A,P,L;if(d===0)l!==0&&(ee(r),r=[],s=[],i=[],l=0,o&&(o=[])),n.fallback&&(s=[Re],i[0]=F(xe=>(r[0]=xe,n.fallback())),l=1);else if(l===0){for(i=new Array(d),u=0;u=x&&P>=x&&s[A]===f[P];A--,P--)p[P]=i[A],N[P]=r[A],o&&($[P]=o[A]);for(y=new Map,m=new Array(P+1),u=P;u>=x;u--)L=f[u],a=y.get(L),m[u]=a===void 0?-1:a,y.set(L,u);for(a=x;a<=A;a++)L=s[a],u=y.get(L),u!==void 0&&u!==-1?(p[u]=i[a],N[u]=r[a],o&&($[u]=o[a]),u=m[u],y.set(L,u)):r[a]();for(u=x;ue(t||{}));return O(n),s}return E(()=>e(t||{}))}function v(){return!0}const te={get(e,t,n){return t===K?n:e.get(t)},has(e,t){return t===K?!0:e.has(t)},set:v,deleteProperty:v,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:v,deleteProperty:v}},ownKeys(e){return e.keys()}};function _e(e,...t){if(Ce&&K in e){const i=new Set(t.length>1?t.flat():t[0]),r=t.map(l=>new Proxy({get(o){return l.includes(o)?e[o]:void 0},has(o){return l.includes(o)&&o in e},keys(){return l.filter(o=>o in e)}},te));return r.push(new Proxy({get(l){return i.has(l)?void 0:e[l]},has(l){return i.has(l)?!1:l in e},keys(){return Object.keys(e).filter(l=>!i.has(l))}},te)),r}const n={},s=t.map(()=>({}));for(const i of Object.getOwnPropertyNames(e)){const r=Object.getOwnPropertyDescriptor(e,i),l=!r.get&&!r.set&&r.enumerable&&r.writable&&r.configurable;let o=!1,f=0;for(const d of t)d.includes(i)&&(o=!0,l?s[f][i]=r.value:Object.defineProperty(s[f],i,r)),++f;o||(l?n[i]=r.value:Object.defineProperty(n,i,r))}return[...s,n]}const Ue=e=>`Stale read from <${e}>.`;function At(e){const t="fallback"in e&&{fallback:()=>e.fallback};return S(He(()=>e.each,e.children,t||void 0))}function St(e){const t=e.keyed,n=S(()=>e.when,void 0,void 0),s=t?n:S(n,void 0,{equals:(i,r)=>!i==!r});return S(()=>{const i=s();if(i){const r=e.children;return typeof r=="function"&&r.length>0?E(()=>r(t?i:()=>{if(!E(s))throw Ue("Show");return n()})):r}return e.fallback},void 0,void 0)}const Be=ae();function Et(e){let t=0,n,s,i,r,l;const[o,f]=X(!1),d=Ie(),a={increment:()=>{++t===1&&f(!0)},decrement:()=>{--t===0&&f(!1)},inFallback:o,effects:[],resolved:!1},u=Ne();if(c.context&&c.load){const m=c.getContextId();let p=c.load(m);if(p&&(typeof p!="object"||p.s!==1?i=p:c.gather(m)),i&&i!=="$$f"){const[N,$]=X(void 0,{equals:!1});r=N,i.then(()=>{if(c.done)return $();c.gather(m),O(s),$(),O()},x=>{l=x,$()})}}const g=de(Be);g&&(n=g.register(a.inFallback));let y;return ue(()=>y&&y()),Ve(d.Provider,{value:a,get children(){return S(()=>{if(l)throw l;if(s=c.context,r)return r(),r=void 0;s&&i==="$$f"&&O();const m=S(()=>e.children);return S(p=>{const N=a.inFallback(),{showContent:$=!0,showFallback:x=!0}=n?n():{};if((!N||i&&i!=="$$f")&&$)return a.resolved=!0,y&&y(),y=s=i=void 0,ke(a.effects),m();if(x)return y?p:F(A=>(y=A,s&&(O({id:s.id+"F",count:0}),s=void 0),e.fallback),u)})})}})}const Ge=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Ye=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Ge]),qe=new Set(["innerHTML","textContent","innerText","children"]),Ke=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Xe=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function We(e,t){const n=Xe[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Qe=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),ze=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Je={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Ct=e=>S(()=>e());function Ze(e,t,n){let s=n.length,i=t.length,r=s,l=0,o=0,f=t[i-1].nextSibling,d=null;for(;la-o){const m=t[l];for(;o{i=r,t===document?e():ct(t,e(),t.firstChild?null:void 0,n)},s.owner),()=>{i(),t.textContent=""}}function $t(e,t,n,s){let i;const r=()=>{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},l=()=>(i||(i=r())).cloneNode(!0);return l.cloneNode=l,l}function et(e,t=window.document){const n=t[ne]||(t[ne]=new Set);for(let s=0,i=e.length;si.call(e,n[1],r))}else e.addEventListener(t,n,typeof n!="function"&&n)}function rt(e,t,n={}){const s=Object.keys(t||{}),i=Object.keys(n);let r,l;for(r=0,l=i.length;ri.children=R(e,t.children,i.children)),I(()=>typeof t.ref=="function"&&ft(t.ref,e)),I(()=>ut(e,t,n,!0,i,!0)),i}function ft(e,t,n){return E(()=>e(t,n))}function ct(e,t,n,s){if(n!==void 0&&!s&&(s=[]),typeof t!="function")return R(e,t,s,n);I(i=>R(e,t(),i,n),s)}function ut(e,t,n,s,i={},r=!1){t||(t={});for(const l in i)if(!(l in t)){if(l==="children")continue;i[l]=re(e,l,null,i[l],n,r,t)}for(const l in t){if(l==="children")continue;const o=t[l];i[l]=re(e,l,o,i[l],n,r,t)}}function at(e,t,n={}){if(globalThis._$HY.done)return se(e,t,[...t.childNodes],n);c.completed=globalThis._$HY.completed,c.events=globalThis._$HY.events,c.load=s=>globalThis._$HY.r[s],c.has=s=>s in globalThis._$HY.r,c.gather=s=>le(t,s),c.registry=new Map,c.context={id:n.renderId||"",count:0};try{return le(t,n.renderId),se(e,t,[...t.childNodes],n)}finally{c.context=null}}function dt(e){let t,n;return!T()||!(t=c.registry.get(n=gt()))?e():(c.completed&&c.completed.add(t),c.registry.delete(n),t)}function Nt(e){let t=e,n=0,s=[];if(T(e))for(;t;){if(t.nodeType===8){const i=t.nodeValue;if(i==="$")n++;else if(i==="/"){if(n===0)return[t,s];n--}}s.push(t),t=t.nextSibling}return[t,s]}function kt(){c.events&&!c.events.queued&&(queueMicrotask(()=>{const{completed:e,events:t}=c;if(t){for(t.queued=!1;t.length;){const[n,s]=t[0];if(!e.has(n))return;t.shift(),pe(s)}c.done&&(c.events=_$HY.events=null,c.completed=_$HY.completed=null)}}),c.events.queued=!0)}function T(e){return!!c.context&&!c.done&&(!e||e.isConnected)}function ht(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function ie(e,t,n){const s=t.trim().split(/\s+/);for(let i=0,r=s.length;i-1&&Je[t.split(":")[0]];g?tt(e,g,t,n):Q(e,Ke[t]||t,n)}return n}function pe(e){if(c.registry&&c.events&&c.events.find(([f,d])=>d===e))return;let t=e.target;const n=`$$${e.type}`,s=e.target,i=e.currentTarget,r=f=>Object.defineProperty(e,"target",{configurable:!0,value:f}),l=()=>{const f=t[n];if(f&&!t.disabled){const d=t[`${n}Data`];if(d!==void 0?f.call(t,d,e):f.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&r(t.host),!0},o=()=>{for(;l()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),c.registry&&!c.done&&(c.done=_$HY.done=!0),e.composedPath){const f=e.composedPath();r(f[0]);for(let d=0;d{let f=t();for(;typeof f=="function";)f=f();n=R(e,f,n,s)}),()=>n;if(Array.isArray(t)){const f=[],d=n&&Array.isArray(n);if(z(f,t,n,i))return I(()=>n=R(e,f,n,s,!0)),()=>n;if(r){if(!f.length)return n;if(s===void 0)return n=[...e.childNodes];let a=f[0];if(a.parentNode!==e)return n;const u=[a];for(;(a=a.nextSibling)!==s;)u.push(a);return n=u}if(f.length===0){if(n=M(e,n,s),o)return n}else d?n.length===0?oe(e,f,s):Ze(e,n,f):(n&&M(e),oe(e,f));n=f}else if(t.nodeType){if(r&&t.parentNode)return n=o?[t]:t;if(Array.isArray(n)){if(o)return n=M(e,n,s,t);M(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function z(e,t,n,s){let i=!1;for(let r=0,l=t.length;r=0;l--){const o=t[l];if(i!==o){const f=o.parentNode===e;!r&&!l?f?e.replaceChild(i,o):e.insertBefore(i,n):f&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function le(e,t){const n=e.querySelectorAll("*[data-hk]");for(let s=0;s(ve(),at(...e));function wt(e,t){const n=S(e);return S(()=>{const s=n();switch(typeof s){case"function":return E(()=>s(t));case"string":const i=ze.has(s),r=c.context?dt():bt(s,i,E(()=>t.is));return lt(r,t,i),r}})}function It(e){const[,t]=_e(e,["component"]);return wt(()=>e.component,t)}export{K as $,It as D,At as F,St as S,Nt as a,Ve as b,X as c,et as d,I as e,Pt as f,dt as g,ue as h,ct as i,S as j,Q as k,Te as l,Ct as m,mt as n,pt as o,$e as p,xt as q,kt as r,Tt as s,$t as t,ft as u,Ot as v,se as w,Et as x};