import{n as e}from"./rolldown-runtime-BG2f4sTM.js";import{dgt as t,lgt as n,npt as r}from"./app-initial-BHB6SClA.js";function i({line:e,path:t,payload:r,title:i}){switch(r.target.type){case`presentation-element-selection`:case`presentation-region`:case`workbook-floating-element`:case`workbook-range`:return n({annotationId:r.annotationId,artifactKind:r.artifactKind,body:r.body,label:r.label,line:e,metadata:{target:r.target},path:t,title:i})}}function a(e,n){return e.filter(e=>t(e)&&e.localArtifactAnnotationContext?.path===n)}function o({currentComments:e,path:t,previousComments:n}){let r=new Set;for(let n of a(e,t)){let e=n.localArtifactAnnotationContext?.annotationId;e!=null&&r.add(e)}let i=[];for(let e of a(n,t)){let t=e.localArtifactAnnotationContext?.annotationId;t!=null&&!r.has(t)&&i.push(t)}return i}function s(e,n){let r=e.filter(e=>!t(e)||e.localArtifactAnnotationContext?.path!==n);return r.length===e.length?e:r}function c(e){return Math.max(0,...e.map(e=>e.position.line))+1}var l=e((()=>{r()}));export{l as a,o as i,a as n,s as o,c as r,i as t};
//# sourceMappingURL=artifact-annotation-comment-CYq-DIFd.js.map