import{X as T,Y,O as x,u as E,Z as k,_ as A,$ as B}from"./Dpn8_Hnn.mjs";function h(f,i){return f===i||(f==null?void 0:f[B])===i}function G(f={},i,c,t){var w=T.r,O=k;return Y(()=>{var a,r;return x(()=>{a=r,r=(t==null?void 0:t())||[],E(()=>{h(c(...r),f)||(i(f,...r),a&&h(c(...a),f)&&i(null,...a))})}),()=>{let s=O;for(;s!==w&&s.parent!==null&&s.parent.f&A;)s=s.parent;const S=()=>{r&&h(c(...r),f)&&i(null,...r)},n=s.teardown;s.teardown=()=>{S(),n==null||n()}}}),f}export{G as b};
