import{h as e}from"./src-D0l_EE0Y.js";import{b as t}from"./chunk-ABZYJK2D-Digu8l26.js";var s=e(e=>{const{handDrawnSeed:s}=t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:s}},"solidStateFill"),r=e(e=>{const t=a([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),a=e(e=>{const t=new Map;return e.forEach(e=>{const[s,r]=e.split(":");t.set(s.trim(),r?.trim())}),t},"styles2Map"),o=e(e=>"color"===e||"font-size"===e||"font-family"===e||"font-weight"===e||"font-style"===e||"text-decoration"===e||"text-align"===e||"text-transform"===e||"line-height"===e||"letter-spacing"===e||"word-spacing"===e||"text-shadow"===e||"text-overflow"===e||"white-space"===e||"word-wrap"===e||"word-break"===e||"overflow-wrap"===e||"hyphens"===e,"isLabelStyle"),i=e(e=>{const{stylesArray:t}=r(e),s=[],a=[],i=[],l=[];return t.forEach(e=>{const t=e[0];o(t)?s.push(e.join(":")+" !important"):(a.push(e.join(":")+" !important"),t.includes("stroke")&&i.push(e.join(":")+" !important"),"fill"===t&&l.push(e.join(":")+" !important"))}),{labelStyles:s.join(";"),nodeStyles:a.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:l}},"styles2String"),l=e((e,s)=>{const{themeVariables:a,handDrawnSeed:o}=t(),{nodeBorder:i,mainBkg:l}=a,{stylesMap:h}=r(e);return Object.assign({roughness:.7,fill:h.get("fill")||l,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:h.get("stroke")||i,seed:o,strokeWidth:h.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:n(h.get("stroke-dasharray"))},s)},"userNodeOverrides"),n=e(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(1===t.length){const e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},"getStrokeDashArray");export{l as a,i,o as n,s as r,r as t};