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