import{Kd as u,Q as r,Z as p,Zc as m,ba as a,f as n,fa as s,ma as f,vc as d,z as l}from"./chunk-GSMBWWWB.js";var h=(()=>{let e=class e{constructor(){this.active$=l(()=>this.locked).pipe(r()),this.locks=new Set,this.locked=new n(!1)}connect(i){let o=new Object;return i.pipe(p({next:c=>{c?this.addLock(o):this.removeLock(o)},unsubscribe:()=>this.removeLock(o),complete:()=>this.removeLock(o),error:()=>this.removeLock(o)}))}addLock(i){this.locks.add(i),this.update()}removeLock(i){this.locks.delete(i),this.update()}update(){this.locked.next(this.locks.size>0)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var C=(()=>{let e=class e{constructor(){if(!s(u))return;let o=s(d);s(h).active$.pipe(r()).pipe(m()).subscribe(k=>{k?b(o):v(o)})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275dir=f({type:e,selectors:[["","b04ScrollLock",""]],standalone:!0});let t=e;return t})();function b(t){t.body.style.top="-".concat(t.defaultView.scrollY,"px"),t.body.style.position="fixed",t.body.style.overflow="hidden"}function v(t){let e=t.body.style.top;e&&(t.body.style.overflow="",t.body.style.position="",t.body.style.top="",t.defaultView.scrollTo({left:0,top:parseInt(e||"0")*-1,behavior:"instant"}))}export{h as a,C as b};