import{d as A,h as b,e as E,E as S,r as _,H as R,f as d,s as g,g as v,i as l,j as N,k as B,b as H,q as I,S as O}from"./TwTPH6iZ.js";import{B as Y}from"./CFFbbuus.js";function q(s,r,n=!1){b&&E();var u=new Y(s),i=n?S:0;function a(f,c){if(b){const T=_(s);var t;if(T===R?t=0:T===d?t=!1:t=parseInt(T.substring(1)),f!==t){var h=g();v(h),u.anchor=h,l(!1),u.ensure(f,c),l(!0);return}}u.ensure(f,c)}A(()=>{var f=!1;r((c,t=0)=>{f=!0,a(t,c)}),f||a(!1,null)},i)}function e(s,r){return s===r||s?.[O]===r}function x(s={},r,n,u){return N(()=>{var i,a;return B(()=>{i=a,a=[],H(()=>{s!==n(...a)&&(r(s,...a),i&&e(n(...i),s)&&r(null,...i))})}),()=>{I(()=>{a&&e(n(...a),s)&&r(null,...a)})}}),s}export{x as b,q as i};
