import{a7 as W,U as re,a8 as Z,a9 as g,j as S,a2 as ne,V as fe,m as G,y as le,aa as ie,ab as se,ac as K,ad as B,a1 as O,ae as ue,af as te,_ as X,ag as ve,ah as L,ai as V,a4 as de,aj as P,ak as _e,al as Q,am as $,J as oe,an as k,ao as ce,ap as he,aq as F,q as me,a0 as y,ar as pe,as as Ee,at as Te,au as Ae,av as Ie,w as we}from"./7RXv2Ffc.js";function Me(i,r){return r}function xe(i,r,e){for(var u=i.items,v=[],d=r.length,s=0;s<d;s++)Te(r[s].e,v,!0);var h=d>0&&v.length===0&&e!==null;if(h){var T=e.parentNode;Ae(T),T.append(e),u.clear(),x(i,r[0].prev,r[d-1].next)}Ie(v,()=>{for(var E=0;E<d;E++){var o=r[E];h||(u.delete(o.k),x(i,o.prev,o.next)),y(o.e,!h)}})}function De(i,r,e,u,v,d=null){var s=i,h={flags:r,items:new Map,first:null},T=(r&Z)!==0;if(T){var E=i;s=S?g(ne(E)):E.appendChild(W())}S&&fe();var o=null,N=!1,A=new Map,M=le(()=>{var _=e();return oe(_)?_:_==null?[]:$(_)}),n,t;function l(){Ce(t,n,h,A,s,v,r,u,e),d!==null&&(n.length===0?o?k(o):o=X(()=>d(s)):o!==null&&ce(o,()=>{o=null}))}re(()=>{t??=we,n=G(M);var _=n.length;if(N&&_===0)return;N=_===0;let p=!1;if(S){var I=ie(s)===se;I!==(_===0)&&(s=K(),g(s),B(!1),p=!0)}if(S){for(var C=null,c,a=0;a<_;a++){if(O.nodeType===ue&&O.data===te){s=O,p=!0,B(!1);break}var f=n[a],m=u(f,a);c=z(O,h,C,null,f,m,a,v,r,e),h.items.set(m,c),C=c}_>0&&g(K())}if(S)_===0&&d&&(o=X(()=>d(s)));else if(ve()){var H=new Set,b=de;for(a=0;a<_;a+=1){f=n[a],m=u(f,a);var D=h.items.get(m)??A.get(m);D?(r&(L|V))!==0&&j(D,f,a,r):(c=z(null,h,null,null,f,m,a,v,r,e,!0),A.set(m,c)),H.add(m)}for(const[w,q]of h.items)H.has(w)||b.skipped_effects.add(q.e);b.add_callback(l)}else l();p&&B(!0),G(M)}),S&&(s=O)}function Ce(i,r,e,u,v,d,s,h,T){var E=(s&pe)!==0,o=(s&(L|V))!==0,N=r.length,A=e.items,M=e.first,n=M,t,l=null,_,p=[],I=[],C,c,a,f;if(E)for(f=0;f<N;f+=1)C=r[f],c=h(C,f),a=A.get(c),a!==void 0&&(a.a?.measure(),(_??=new Set).add(a));for(f=0;f<N;f+=1){if(C=r[f],c=h(C,f),a=A.get(c),a===void 0){var m=u.get(c);if(m!==void 0){u.delete(c),A.set(c,m);var H=l?l.next:n;x(e,l,m),x(e,m,H),J(m,H,v),l=m}else{var b=n?n.e.nodes_start:v;l=z(b,e,l,l===null?e.first:l.next,C,c,f,d,s,T)}A.set(c,l),p=[],I=[],n=l.next;continue}if(o&&j(a,C,f,s),(a.e.f&F)!==0&&(k(a.e),E&&(a.a?.unfix(),(_??=new Set).delete(a))),a!==n){if(t!==void 0&&t.has(a)){if(p.length<I.length){var D=I[0],w;l=D.prev;var q=p[0],U=p[p.length-1];for(w=0;w<p.length;w+=1)J(p[w],D,v);for(w=0;w<I.length;w+=1)t.delete(I[w]);x(e,q.prev,U.next),x(e,l,q),x(e,U,D),n=D,l=U,f-=1,p=[],I=[]}else t.delete(a),J(a,n,v),x(e,a.prev,a.next),x(e,a,l===null?e.first:l.next),x(e,l,a),l=a;continue}for(p=[],I=[];n!==null&&n.k!==c;)(n.e.f&F)===0&&(t??=new Set).add(n),I.push(n),n=n.next;if(n===null)continue;a=n}p.push(a),l=a,n=a.next}if(n!==null||t!==void 0){for(var R=t===void 0?[]:$(t);n!==null;)(n.e.f&F)===0&&R.push(n),n=n.next;var Y=R.length;if(Y>0){var ee=(s&Z)!==0&&N===0?v:null;if(E){for(f=0;f<Y;f+=1)R[f].a?.measure();for(f=0;f<Y;f+=1)R[f].a?.fix()}xe(e,R,ee)}}E&&me(()=>{if(_!==void 0)for(a of _)a.a?.apply()}),i.first=e.first&&e.first.e,i.last=l&&l.e;for(var ae of u.values())y(ae.e);u.clear()}function j(i,r,e,u){(u&L)!==0&&P(i.v,r),(u&V)!==0?P(i.i,e):i.i=e}function z(i,r,e,u,v,d,s,h,T,E,o){var N=(T&L)!==0,A=(T&he)===0,M=N?A?_e(v,!1,!1):Q(v):v,n=(T&V)===0?s:Q(s),t={i:n,v:M,k:d,a:null,e:null,prev:e,next:u};try{if(i===null){var l=document.createDocumentFragment();l.append(i=W())}return t.e=X(()=>h(i,M,n,E),S),t.e.prev=e&&e.e,t.e.next=u&&u.e,e===null?o||(r.first=t):(e.next=t,e.e.next=t.e),u!==null&&(u.prev=t,u.e.prev=t.e),t}finally{}}function J(i,r,e){for(var u=i.next?i.next.e.nodes_start:e,v=r?r.e.nodes_start:e,d=i.e.nodes_start;d!==null&&d!==u;){var s=Ee(d);v.before(d),d=s}}function x(i,r,e){r===null?i.first=e:(r.next=e,r.e.next=e&&e.e),e!==null&&(e.prev=r,e.e.prev=r&&r.e)}export{De as e,Me as i};
