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