import{b as S,g as s,h as b}from"./chunk-CX23ZL4L.js";import{B as d,P as o,X as u,ea as v,h,ha as a,p as m,pa as n,ua as c,va as l}from"./chunk-IYD54RT7.js";var j=(()=>{let e=class e{constructor(i,t){this.diffService=i,this.branchInfoService=t}differences(i){return this.branchInfoService.parentBranch.pipe(o(1),a(t=>this.diffService.getDifferences(t,i)))}};e.\u0275fac=function(t){return new(t||e)(c(S),c(b))},e.\u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var M=(()=>{let e=class e{constructor(i,t){this.differenceService=i,this.uiService=t}get differences(){return this.uiService.id.pipe(o(1),a(i=>this.differenceService.differences(i).pipe(v({bufferSize:5,refCount:!0}))))}};e.\u0275fac=function(t){return new(t||e)(c(j),c(s))},e.\u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var g=(()=>{let e=class e{constructor(i,t){this.uiService=i,this.diffService=t,this._diff=this.uiService.isInDiff.pipe(o(1),a(x=>d(()=>x,this.diffService.differences,m(void 0))))}get diff(){return this._diff}get id(){return this.uiService.id.getValue()}get type(){return this.uiService.type.getValue()}set DiffMode(i){this.uiService.diffMode=i}set branchId(i){this.uiService.idValue=i}set branchType(i){this.uiService.typeValue=i}};e.\u0275fac=function(t){return new(t||e)(c(s),c(M))},e.\u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var w=new h(1),p=!1,A=r=>{let e=l(g),f=r;for(;!f.paramMap.has("branchId")&&!f.paramMap.has("branchType")&&f.parent!==null;)f=f.parent;return e.id!==f.paramMap.get("branchId")&&(p=!1,e.branchId=f.paramMap.get("branchId")||""),e.type!==f.paramMap.get("branchType")&&(p=!1,e.branchType=f.paramMap.get("branchType")||""),e.DiffMode=r.url.some(i=>i.path==="diff"),p||(p=!0,e.diff.subscribe(i=>{w.next(i)})),w.pipe(u())};export{A as a};
