import{a as n}from"./chunk-AQ6EADP3.mjs";function a(){if(!(typeof globalThis>"u"))return globalThis}n(a,"getCaptureGlobal");function l(){return!!a()?.mermaidCaptureSizes}n(l,"shouldCaptureSizes");function s(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}n(s,"capturedFromLocation");function p(r,i){let t=a();if(!t)return;let e=i.node(),d=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];let o={svgId:d,sizes:r};t.mermaidCapturedSizes.push(o),t.mermaidLastCapturedSizes=o}n(p,"emitCapturedSizes");function f(r,i){let t=[];for(let e of i.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&p({metadata:{captureVersion:1,capturedAt:new Date().toISOString(),capturedFrom:s()},nodes:t},r)}n(f,"captureNodeSizes");export{f as captureNodeSizes,l as shouldCaptureSizes};
