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