var i,s,o;import{d as u,f as t,g as f,h as T,m as d,n as v,p as g,s as h,t as R}from"./chunk-TCCFYFTB-Pdx7j6Wx.js";var V=(i=class extends R{constructor(){super(["treemap"])}},t(i,"TreemapTokenBuilder"),i),C=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,S=(s=class extends v{runCustomConverter(r,e,n){if(r.name==="NUMBER2")return parseFloat(e.replace(/,/g,""));if(r.name==="SEPARATOR"||r.name==="STRING2")return e.substring(1,e.length-1);if(r.name==="INDENTATION")return e.length;if(r.name==="ClassDef"){if(typeof e!="string")return e;let a=C.exec(e);if(a)return{$type:"ClassDefStatement",className:a[1],styleText:a[2]||void 0}}}},t(s,"TreemapValueConverter"),s);function m(l){let r=l.validation.TreemapValidator,e=l.validation.ValidationRegistry;if(e){let n={Treemap:r.checkSingleRoot.bind(r)};e.register(n,r)}}t(m,"registerValidationChecks");var k=(o=class{checkSingleRoot(r,e){let n;for(let a of r.TreemapRows)a.item&&(n===void 0&&a.indent===void 0?n=0:(a.indent===void 0||n!==void 0&&n>=parseInt(a.indent,10))&&e("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}))}},t(o,"TreemapValidator"),o),p={parser:{TokenBuilder:t(()=>new V,"TokenBuilder"),ValueConverter:t(()=>new S,"ValueConverter")},validation:{TreemapValidator:t(()=>new k,"TreemapValidator")}};function c(l=g){let r=d(f(l),h),e=d(T({shared:r}),u,p);return r.ServiceRegistry.register(e),m(e),{shared:r,Treemap:e}}t(c,"createTreemapServices");export{c as n,p as t};
