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