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