/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
import{v as t}from"./p-Tvs4yxd5.js";import{E as s,b as e}from"./p-Dc9KNUUp.js";class r{constructor(){this.overlays=new Map;this.overlaysChanged=new s}addLineFromResult(t){return this.addLine(t.point1,t.point2)}addLine(t,s){const r=e.create();const n={type:"line",id:r,start:t,end:s,dispose:()=>this.remove(r)};this.addOverlay(n);return n}addDistanceVectorFromResult(t){return this.addDistanceVector(t.point1,t.point2)}addDistanceVector(s,r){const n=e.create();const i=t.subtract(s,r);const o=t.add(s,t.create(0,-i.y,0));const a={start:s,end:o};const c=t.add(o,t.create(0,0,-i.z));const d={start:o,end:c};const h=t.add(c,t.create(-i.x,0,0));const u={start:c,end:h};const p={type:"distance-vector",id:n,x:u,y:a,z:d,dispose:()=>this.remove(n)};this.addOverlay(p);return p}addOverlay(t){if(!this.overlays.has(t.id)){this.overlays.set(t.id,t);this.overlaysChanged.emit(this.getOverlays())}}getOverlays(){return Array.from(this.overlays.values())}remove(t){if(this.overlays.has(t)){this.overlays.delete(t);this.overlaysChanged.emit(this.getOverlays());return true}else{return false}}onOverlaysChanged(t){return this.overlaysChanged.on(t)}}export{r as M};
//# sourceMappingURL=p-CI-uemp_.js.map