(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="315aa7f8-79d3-4a37-b8d8-5b1f1cf54b9f",e._sentryDebugIdIdentifier="sentry-dbid-315aa7f8-79d3-4a37-b8d8-5b1f1cf54b9f")}catch{}})();const a={context:void 0,registry:void 0};function F(e){a.context=e}function me(){return{...a.context,id:`${a.context.id}${a.context.count++}-`,count:0}}const ke=(e,t)=>e===t,q=Symbol("solid-proxy"),fe=Symbol("solid-track"),H={equals:ke};let ce=pe;const N=1,K=2,ae={owned:null,cleanups:null,context:null,owner:null},ee={};var d=null;let V=null,g=null,k=null,I=null,Q=0;function _(e,t){const s=g,n=d,i=e.length===0,r=t===void 0?n:t,u=i?ae:{owned:null,cleanups:null,context:r?r.context:null,owner:r},o=i?e:()=>e(()=>A(()=>Y(u)));d=u,g=null;try{return L(o,!0)}finally{g=s,d=n}}function D(e,t){t=t?Object.assign({},H,t):H;const s={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=i=>(typeof i=="function"&&(i=i(s.value)),be(s,i));return[ge.bind(s),n]}function oe(e,t,s){const n=X(e,t,!0,N);U(n)}function Se(e,t,s){const n=X(e,t,!1,N);U(n)}function Ae(e,t,s){ce=$e;const n=X(e,t,!1,N),i=T&&ie(T);i&&(n.suspense=i),(!s||!s.render)&&(n.user=!0),I?I.push(n):U(n)}function C(e,t,s){s=s?Object.assign({},H,s):H;const n=X(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=s.equals||void 0,U(n),ge.bind(n)}function Oe(e){return e&&typeof e=="object"&&"then"in e}function Ue(e,t,s){let n,i,r;arguments.length===2&&typeof t=="object"||arguments.length===1?(n=!0,i=e,r=t||{}):(n=e,i=t,r={});let u=null,o=ee,f=null,c=!1,l="initialValue"in r,b=typeof n=="function"&&C(n);const h=new Set,[p,O]=(r.storage||D)(r.initialValue),[m,$]=D(void 0),[j,v]=D(void 0,{equals:!1}),[S,E]=D(l?"ready":"unresolved");if(a.context){f=`${a.context.id}${a.context.count++}`;let w;r.ssrLoadFrom==="initial"?o=r.initialValue:a.load&&(w=a.load(f))&&(o=w)}function P(w,y,x,M){return u===w&&(u=null,M!==void 0&&(l=!0),(w===o||y===o)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(M,{value:y})),o=ee,z(y,x)),y}function z(w,y){L(()=>{y===void 0&&O(()=>w),E(y!==void 0?"errored":l?"ready":"unresolved"),$(y);for(const x of h.keys())x.decrement();h.clear()},!1)}function J(){const w=T&&ie(T),y=p(),x=m();if(x!==void 0&&!u)throw x;return g&&!g.user&&w&&oe(()=>{j(),u&&(w.resolved&&V||h.has(w)||(w.increment(),h.add(w)))}),y}function Z(w=!0){if(w!==!1&&c)return;c=!1;const y=b?b():n;if(y==null||y===!1){P(u,A(p));return}const x=o!==ee?o:A(()=>i(y,{value:p(),refetching:w}));return Oe(x)?(u=x,"value"in x?(x.status==="success"?P(u,x.value,void 0,y):P(u,void 0,void 0,y),x):(c=!0,queueMicrotask(()=>c=!1),L(()=>{E(l?"refreshing":"pending"),v()},!1),x.then(M=>P(x,M,void 0,y),M=>P(x,void 0,ye(M),y)))):(P(u,x,void 0,y),x)}return Object.defineProperties(J,{state:{get:()=>S()},error:{get:()=>m()},loading:{get(){const w=S();return w==="pending"||w==="refreshing"}},latest:{get(){if(!l)return J();const w=m();if(w&&!u)throw w;return p()}}}),b?oe(()=>Z(!1)):Z(!1),[J,{refetch:Z,mutate:O}]}function Re(e){return L(e,!1)}function A(e){if(g===null)return e();const t=g;g=null;try{return e()}finally{g=t}}function Ve(e){Ae(()=>A(e))}function ue(e){return d===null||(d.cleanups===null?d.cleanups=[e]:d.cleanups.push(e)),e}function qe(){return g}function Pe(){return d}function He(e,t){const s=d,n=g;d=e,g=null;try{return L(t,!0)}catch(i){le(i)}finally{d=s,g=n}}const[Ke,We]=D(!1);function Ce(e){I.push.apply(I,e),e.length=0}function de(e,t){const s=Symbol("context");return{id:s,Provider:De(s),defaultValue:e}}function ie(e){return d&&d.context&&d.context[e.id]!==void 0?d.context[e.id]:e.defaultValue}function he(e){const t=C(e),s=C(()=>ne(t()));return s.toArray=()=>{const n=s();return Array.isArray(n)?n:n!=null?[n]:[]},s}let T;function Ee(){return T||(T=de())}function ge(){if(this.sources&&this.state)if(this.state===N)U(this);else{const e=k;k=null,L(()=>B(this),!1),k=e}if(g){const e=this.observers?this.observers.length:0;g.sources?(g.sources.push(this),g.sourceSlots.push(e)):(g.sources=[this],g.sourceSlots=[e]),this.observers?(this.observers.push(g),this.observerSlots.push(g.sources.length-1)):(this.observers=[g],this.observerSlots=[g.sources.length-1])}return this.value}function be(e,t,s){let n=e.value;return(!e.comparator||!e.comparator(n,t))&&(e.value=t,e.observers&&e.observers.length&&L(()=>{for(let i=0;i1e6)throw k=[],new Error},!1)),t}function U(e){if(!e.fn)return;Y(e);const t=Q;je(e,e.value,t)}function je(e,t,s){let n;const i=d,r=g;g=d=e;try{n=e.fn(t)}catch(u){return e.pure&&(e.state=N,e.owned&&e.owned.forEach(Y),e.owned=null),e.updatedAt=s+1,le(u)}finally{g=r,d=i}(!e.updatedAt||e.updatedAt<=s)&&(e.updatedAt!=null&&"observers"in e?be(e,n):e.value=n,e.updatedAt=s)}function X(e,t,s,n=N,i){const r={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:d,context:d?d.context:null,pure:s};return d===null||d!==ae&&(d.owned?d.owned.push(r):d.owned=[r]),r}function W(e){if(e.state===0)return;if(e.state===K)return B(e);if(e.suspense&&A(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;s--)if(e=t[s],e.state===N)U(e);else if(e.state===K){const n=k;k=null,L(()=>B(e,t[0]),!1),k=n}}function L(e,t){if(k)return e();let s=!1;t||(k=[]),I?s=!0:I=[],Q++;try{const n=e();return Ie(s),n}catch(n){s||(I=null),k=null,le(n)}}function Ie(e){if(k&&(pe(k),k=null),e)return;const t=I;I=null,t.length&&L(()=>ce(t),!1)}function pe(e){for(let t=0;t=0;t--)Y(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 ye(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function le(e,t=d){throw ye(e)}function ne(e){if(typeof e=="function"&&!e.length)return ne(e());if(Array.isArray(e)){const t=[];for(let s=0;si=A(()=>(d.context={...d.context,[e]:n.value},he(()=>n.children))),void 0),i}}const re=Symbol("fallback");function G(e){for(let t=0;t1?[]:null;return ue(()=>G(r)),()=>{let f=e()||[],c,l;return f[fe],A(()=>{let h=f.length,p,O,m,$,j,v,S,E,P;if(h===0)u!==0&&(G(r),r=[],n=[],i=[],u=0,o&&(o=[])),s.fallback&&(n=[re],i[0]=_(z=>(r[0]=z,s.fallback())),u=1);else if(u===0){for(i=new Array(h),l=0;l=v&&E>=v&&n[S]===f[E];S--,E--)m[E]=i[S],$[E]=r[S],o&&(j[E]=o[S]);for(p=new Map,O=new Array(E+1),l=E;l>=v;l--)P=f[l],c=p.get(P),O[l]=c===void 0?-1:c,p.set(P,l);for(c=v;c<=S;c++)P=n[c],l=p.get(P),l!==void 0&&l!==-1?(m[l]=i[c],$[l]=r[c],o&&(j[l]=o[c]),l=O[l],p.set(P,l)):r[c]();for(l=v;lG(r)),()=>{const c=e()||[];return c[fe],A(()=>{if(c.length===0)return o!==0&&(G(r),r=[],n=[],i=[],o=0,u=[]),s.fallback&&(n=[re],i[0]=_(b=>(r[0]=b,s.fallback())),o=1),i;for(n[0]===re&&(r[0](),r=[],n=[],i=[],o=0),f=0;fc[f]):f>=n.length&&(i[f]=_(l));for(;fe(t||{}));return F(s),n}return A(()=>e(t||{}))}function R(){return!0}const se={get(e,t,s){return t===q?s:e.get(t)},has(e,t){return t===q?!0:e.has(t)},set:R,deleteProperty:R,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:R,deleteProperty:R}},ownKeys(e){return e.keys()}};function te(e){return(e=typeof e=="function"?e():e)?e:{}}function Me(){for(let e=0,t=this.length;e=0;u--){const o=te(e[u])[r];if(o!==void 0)return o}},has(r){for(let u=e.length-1;u>=0;u--)if(r in te(e[u]))return!0;return!1},keys(){const r=[];for(let u=0;u=0;r--){const u=e[r];if(!u)continue;const o=Object.getOwnPropertyNames(u);for(let f=0,c=o.length;fb.value):s[l]===void 0&&(s[l]=b.value)}}}return s}function Qe(e,...t){if(q in e){const i=new Set(t.length>1?t.flat():t[0]),r=t.map(u=>new Proxy({get(o){return u.includes(o)?e[o]:void 0},has(o){return u.includes(o)&&o in e},keys(){return u.filter(o=>o in e)}},se));return r.push(new Proxy({get(u){return i.has(u)?void 0:e[u]},has(u){return i.has(u)?!1:u in e},keys(){return Object.keys(e).filter(u=>!i.has(u))}},se)),r}const s={},n=t.map(()=>({}));for(const i of Object.getOwnPropertyNames(e)){const r=Object.getOwnPropertyDescriptor(e,i),u=!r.get&&!r.set&&r.enumerable&&r.writable&&r.configurable;let o=!1,f=0;for(const c of t)c.includes(i)&&(o=!0,u?n[f][i]=r.value:Object.defineProperty(n[f],i,r)),++f;o||(u?s[i]=r.value:Object.defineProperty(s,i,r))}return[...n,s]}let _e=0;function Xe(){const e=a.context;return e?`${e.id}${e.count++}`:`cl-${_e++}`}const xe=e=>`Stale read from <${e}>.`;function Ye(e){const t="fallback"in e&&{fallback:()=>e.fallback};return C(Le(()=>e.each,e.children,t||void 0))}function ze(e){const t="fallback"in e&&{fallback:()=>e.fallback};return C(Ne(()=>e.each,e.children,t||void 0))}function Je(e){const t=e.keyed,s=C(()=>e.when,void 0,{equals:(n,i)=>t?n===i:!n==!i});return C(()=>{const n=s();if(n){const i=e.children;return typeof i=="function"&&i.length>0?A(()=>i(t?n:()=>{if(!A(s))throw xe("Show");return e.when})):i}return e.fallback},void 0,void 0)}function Ze(e){let t=!1;const s=(r,u)=>r[0]===u[0]&&(t?r[1]===u[1]:!r[1]==!u[1])&&r[2]===u[2],n=he(()=>e.children),i=C(()=>{let r=n();Array.isArray(r)||(r=[r]);for(let u=0;u{const[r,u,o]=i();if(r<0)return e.fallback;const f=o.children;return typeof f=="function"&&f.length>0?A(()=>f(t?u:()=>{if(A(i)[0]!==r)throw xe("Match");return o.when})):f},void 0,void 0)}function et(e){return e}const Te=de();function tt(e){let t=0,s,n,i,r,u;const[o,f]=D(!1),c=Ee(),l={increment:()=>{++t===1&&f(!0)},decrement:()=>{--t===0&&f(!1)},inFallback:o,effects:[],resolved:!1},b=Pe();if(a.context&&a.load){const O=a.context.id+a.context.count;let m=a.load(O);if(m&&(typeof m!="object"||m.status!=="success")&&(i=m),i&&i!=="$$f"){const[$,j]=D(void 0,{equals:!1});r=$,i.then(()=>{a.gather(O),F(n),j(),F()}).catch(v=>{if(v||a.done)return v&&(u=v),j()})}}const h=ie(Te);h&&(s=h.register(l.inFallback));let p;return ue(()=>p&&p()),Fe(c.Provider,{value:l,get children(){return C(()=>{if(u)throw u;if(n=a.context,r)return r(),r=void 0;n&&i==="$$f"&&F();const O=C(()=>e.children);return C(m=>{const $=l.inFallback(),{showContent:j=!0,showFallback:v=!0}=s?s():{};if((!$||i&&i!=="$$f")&&j)return l.resolved=!0,p&&p(),p=n=i=void 0,Ce(l.effects),O();if(v)return p?m:_(S=>(p=S,n&&(F({id:n.id+"f",count:0}),n=void 0),e.fallback),b)})})}})}export{q as $,Ye as F,ze as I,et as M,Je as S,Fe as a,C as b,Ae as c,Se as d,ue as e,D as f,Pe as g,a as h,_ as i,Be as j,Xe as k,Re as l,Ge as m,fe as n,Ve as o,qe as p,tt as q,He as r,Qe as s,he as t,A as u,Ue as v,Ze as w,ie as x,de as y}; //# sourceMappingURL=solid.C2pQeiPA.js.map