import{_ as e,f as t,g as n,h as r,m as i,n as a,s as o,t as s,v as c}from"./chunk-K5T4RW27.xD_8cOTh.js";var l,u,d,f=(l=class extends s{constructor(){super([`treemap`])}},i(l,`TreemapTokenBuilder`),l),p=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,m=(u=class extends a{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=p.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}},i(u,`TreemapValueConverter`),u);function h(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}i(h,`registerValidationChecks`);var g=(d=class{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`}))}},i(d,`TreemapValidator`),d),_={parser:{TokenBuilder:i(()=>new f,`TokenBuilder`),ValueConverter:i(()=>new m,`ValueConverter`)},validation:{TreemapValidator:i(()=>new g,`TreemapValidator`)}};function v(i=r){let a=n(c(i),o),s=n(e({shared:a}),t,_);return a.ServiceRegistry.register(s),h(s),{shared:a,Treemap:s}}i(v,`createTreemapServices`);export{v as n,_ as t};
//# sourceMappingURL=chunk-LIHQZDEY.C-AVOVsi.js.map