import{k as f,o as B,q as D,v as H,w as b,H as g,x as C,y as S,z as p,A as q,B as c,C as E,D as G,E as L,F as R,G as U,I as N,U as z,m as T,J as F}from"./DXA5xaTu.mjs";import{B as J}from"./DZ_x5TWR.mjs";const k=0,A=1,M=2;function Y(v,w,_,r,n){f&&B();var m=D(),t=z,i=m?N(t):T(t,!1,!1),o=m?N(t):T(t,!1,!1),a=new J(v);H(()=>{var y=E,u=w(),h=!1;let d=f&&b(u)===(v.data===g);if(d&&(C(S()),p(!1)),b(u)){var x=F(),I=!1;const s=e=>{if(!h){I=!0,x(!1),E===y&&y.deactivate(),G.ensure();try{e()}finally{L(!1),R||U()}}};u.then(e=>{s(()=>{c(i,e),a.ensure(A,r&&(l=>r(l,i)))})},e=>{s(()=>{if(c(o,e),a.ensure(M,n&&(l=>n(l,o))),!n)throw o.v})}),f?a.ensure(k,_):q(()=>{I||s(()=>{a.ensure(k,_)})})}else c(i,u),a.ensure(A,r&&(s=>r(s,i)));return d&&p(!0),()=>{h=!0}})}export{Y as a};
