import{M as p,N as d,w as v,x as u,j as y,O as k,k as x,P as E,Q as T,C as f,R as S,S as b,z as e,T as i,U as m,B as A,V as C}from"./utils.Bch77dSh.js";function g(t,n,r){u&&y();var c=t,a,s;p(()=>{a!==(a=n())&&(s&&(k(s),s=null),a&&(s=v(()=>r(c,a))))},d),u&&(c=x)}function l(t,n){return t===n||(t==null?void 0:t[b])===n}function w(t={},n,r,c){return E(()=>{var a,s;return T(()=>{a=s,s=[],f(()=>{t!==r(...s)&&(n(t,...s),a&&l(r(...a),t)&&n(null,...a))})}),()=>{S(()=>{s&&l(r(...s),t)&&n(null,...s)})}}),t}function M(t){e===null&&i(),m&&e.l!==null?P(e).m.push(t):A(()=>{const n=f(t);if(typeof n=="function")return n})}function B(t){e===null&&i(),M(()=>()=>f(t))}function N(t,n,{bubbles:r=!1,cancelable:c=!1}={}){return new CustomEvent(t,{detail:n,bubbles:r,cancelable:c})}function D(){const t=e;return t===null&&i(),(n,r,c)=>{var s;const a=(s=t.s.$$events)==null?void 0:s[n];if(a){const h=C(a)?a.slice():[a],o=N(n,r,c);for(const _ of h)_.call(t.x,o);return!o.defaultPrevented}return!0}}function P(t){var n=t.l;return n.u??(n.u={a:[],b:[],m:[]})}export{D as a,w as b,g as c,B as d,M as o};
