import{u as h,R as e}from"./rpcWorker-CVTx5FIM.js";function d(t){return`arc-clip-${typeof jest>"u"?t:"jest"}`}async function m(t,a,o){const n=h.getContainingView(t).dynamicBlocks.totalWidthPx,i=t.height;if(a.rasterizeLayers){const c=document.createElement("canvas");c.width=n*2,c.height=i*2;const r=c.getContext("2d");return r?(r.scale(2,2),o(t,r,n,i),e.createElement("image",{width:n,height:i,xlinkHref:c.toDataURL("image/png")})):void 0}else{const c=await import("./canvas2svg-4Et896yo.js").then(function(l){return l.c}),r=new c.default(n,i);o(t,r,n,i);const s=d(t.id);return e.createElement(e.Fragment,null,e.createElement("defs",null,e.createElement("clipPath",{id:s},e.createElement("rect",{x:0,y:0,width:n,height:i}))),e.createElement("g",{dangerouslySetInnerHTML:{__html:r.getSvg().innerHTML},clipPath:`url(#${s})`}))}}export{m as renderSvg};
