import{G as ee,l as ae,H as M,j as g,I as re,J as ne,g as X,K as ie,M as fe,N as B,O as b,u as N,P as le,Q as P,m as Q,R as se,S as k,T as W,U as F,V as G,W as ue,X as J,Y as te,Z as D,_ as ve,$ as _e,a0 as de,o as oe,a1 as O,a2 as ce,a3 as he,a4 as Z,F as Ee,a5 as pe}from"./AM9C8FsA.js";function xe(l,e){return e}function Te(l,e,a,u){for(var v=[],d=e.length,t=0;t<d;t++)ve(e[t].e,v,!0);var o=d>0&&v.length===0&&a!==null;if(o){var T=a.parentNode;_e(T),T.append(a),u.clear(),x(l,e[0].prev,e[d-1].next)}de(v,()=>{for(var h=0;h<d;h++){var _=e[h];o||(u.delete(_.k),x(l,_.prev,_.next)),oe(_.e,!o)}})}function ge(l,e,a,u,v,d=null){var t=l,o={flags:e,items:new Map,first:null},T=(e&Z)!==0;if(T){var h=l;t=g?M(re(h)):h.appendChild(ee())}g&&ne();var _=null,w=!1,i=ie(()=>{var s=a();return te(s)?s:s==null?[]:W(s)});ae(()=>{var s=X(i),r=s.length;if(w&&r===0)return;w=r===0;let I=!1;if(g){var E=t.data===fe;E!==(r===0)&&(t=B(),M(t),b(!1),I=!0)}if(g){for(var p=null,A,c=0;c<r;c++){if(N.nodeType===8&&N.data===le){t=N,I=!0,b(!1);break}var n=s[c],f=u(n,c);A=$(N,o,p,null,n,f,c,v,e,a),o.items.set(f,A),p=A}r>0&&M(B())}g||Ae(s,o,t,v,e,u,a),d!==null&&(r===0?_?P(_):_=Q(()=>d(t)):_!==null&&se(_,()=>{_=null})),I&&b(!0),X(i)}),g&&(t=N)}function Ae(l,e,a,u,v,d,t){var L,V,Y,q;var o=(v&pe)!==0,T=(v&(O|D))!==0,h=l.length,_=e.items,w=e.first,i=w,s,r=null,I,E=[],p=[],A,c,n,f;if(o)for(f=0;f<h;f+=1)A=l[f],c=d(A,f),n=_.get(c),n!==void 0&&((L=n.a)==null||L.measure(),(I??(I=new Set)).add(n));for(f=0;f<h;f+=1){if(A=l[f],c=d(A,f),n=_.get(c),n===void 0){var z=i?i.e.nodes_start:a;r=$(z,e,r,r===null?e.first:r.next,A,c,f,u,v,t),_.set(c,r),E=[],p=[],i=r.next;continue}if(T&&Ie(n,A,f,v),(n.e.f&k)!==0&&(P(n.e),o&&((V=n.a)==null||V.unfix(),(I??(I=new Set)).delete(n))),n!==i){if(s!==void 0&&s.has(n)){if(E.length<p.length){var H=p[0],m;r=H.prev;var y=E[0],R=E[E.length-1];for(m=0;m<E.length;m+=1)K(E[m],H,a);for(m=0;m<p.length;m+=1)s.delete(p[m]);x(e,y.prev,R.next),x(e,r,y),x(e,R,H),i=H,r=R,f-=1,E=[],p=[]}else s.delete(n),K(n,i,a),x(e,n.prev,n.next),x(e,n,r===null?e.first:r.next),x(e,r,n),r=n;continue}for(E=[],p=[];i!==null&&i.k!==c;)(i.e.f&k)===0&&(s??(s=new Set)).add(i),p.push(i),i=i.next;if(i===null)continue;n=i}E.push(n),r=n,i=n.next}if(i!==null||s!==void 0){for(var C=s===void 0?[]:W(s);i!==null;)(i.e.f&k)===0&&C.push(i),i=i.next;var S=C.length;if(S>0){var j=(v&Z)!==0&&h===0?a:null;if(o){for(f=0;f<S;f+=1)(Y=C[f].a)==null||Y.measure();for(f=0;f<S;f+=1)(q=C[f].a)==null||q.fix()}Te(e,C,j,_)}}o&&Ee(()=>{var U;if(I!==void 0)for(n of I)(U=n.a)==null||U.apply()}),F.first=e.first&&e.first.e,F.last=r&&r.e}function Ie(l,e,a,u){(u&O)!==0&&G(l.v,e),(u&D)!==0?G(l.i,a):l.i=a}function $(l,e,a,u,v,d,t,o,T,h){var _=(T&O)!==0,w=(T&ce)===0,i=_?w?ue(v):J(v):v,s=(T&D)===0?t:J(t),r={i:s,v:i,k:d,a:null,e:null,prev:a,next:u};try{return r.e=Q(()=>o(l,i,s,h),g),r.e.prev=a&&a.e,r.e.next=u&&u.e,a===null?e.first=r:(a.next=r,a.e.next=r.e),u!==null&&(u.prev=r,u.e.prev=r.e),r}finally{}}function K(l,e,a){for(var u=l.next?l.next.e.nodes_start:a,v=e?e.e.nodes_start:a,d=l.e.nodes_start;d!==u;){var t=he(d);v.before(d),d=t}}function x(l,e,a){e===null?l.first=a:(e.next=a,e.e.next=a&&a.e),a!==null&&(a.prev=e,a.e.prev=e&&e.e)}const we=globalThis.__sveltekit_wfgmlu.env;export{we as a,ge as e,xe as i};
