vendor: 4,723 bytes, line 1
1import{p as re}from"./chunk-K2ZEYYM2-CGGn5sFU.js";import{p as oe}from"./treemap-KMMF4GRG-YVX6V4UE-CdKLy3dC.js";import{_ as h,G as U,H as q,aN as ie,e as ce,br as D,l as I,aR as B,bs as pe,bt as de,bu as L,d as E,b as he,a as me,t as ue,v as fe,g as ye,s as ge,I as Se,bv as xe,A as be}from"./md-D5anl49x.js";import{s as ve}from"./chunk-WDWNAAEG-DzdB4d-t.js";import"./chunk-ZZTYOBSU-BSaXUwzf.js";import"./index-DCfA-xrU.js";import"./modules/vue-CynRjMpH.js";import"./modules/shiki-CCaIuvDs.js";import"./modules/unplugin-icons-D3Nw-66L.js";import"./modules/file-saver-B7oFTzqn.js";import"./slidev/default-X5cGuVg9.js";import"./slidev/context-zDDIoJ0W.js";var F,J=(F=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=he,this.getAccTitle=me,this.setDiagramTitle=ue,this.getDiagramTitle=fe,this.getAccDescription=ye,this.setAccDescription=ge}getNodes(){return this.nodes}getConfig(){const a=Se,o=q();return U({...a.treemap,...o.treemap??{}})}addNode(a,o){this.nodes.push(a),this.levels.set(a,o),o===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,o){const r=this.classes.get(a)??{id:a,styles:[],textStyles:[]},c=o.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(s=>{xe(s)&&(r?.textStyles?r.textStyles.push(s):r.textStyles=[s]),r?.styles?r.styles.push(s):r.styles=[s]}),this.classes.set(a,r)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){be(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},h(F,"TreeMapDB"),F);function K(p){if(!p.length)return[];const a=[],o=[];return p.forEach(r=>{const c={name:r.name,children:r.type==="Leaf"?void 0:[]};for(c.classSelector=r?.classSelector,r?.cssCompiledStyles&&(c.cssCompiledStyles=[r.cssCompiledStyles]),r.type==="Leaf"&&r.value!==void 0&&(c.value=r.value);o.length>0&&o[o.length-1].level>=r.level;)o.pop();if(o.length===0)a.push(c);else{const s=o[o.length-1].node;s.children?s.children.push(c):s.children=[c]}r.type!=="Leaf"&&o.push({node:c,level:r.level})}),a}h(K,"buildHierarchy");var Ce=h((p,a)=>{re(p,a);const o=[];for(const s of p.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of p.TreemapRows??[]){const d=s.item;if(!d)continue;const u=s.indent?parseInt(s.indent):0,V=we(d),l=d.classSelector?a.getStylesForClass(d.classSelector):[],N=l.length>0?l.join(";"):void 0,b={level:u,name:V,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:N};o.push(b)}const r=K(o),c=h((s,d)=>{for(const u of s)a.addNode(u,d),u.children&&u.children.length>0&&c(u.children,d+1)},"addNodesRecursively");c(r,0)},"populate"),we=h(p=>p.name?String(p.name):"","getItemName"),Q={parser:{yy:void 0},parse:h(async p=>{try{const o=await oe("treemap",p);I.debug("Treemap AST:",o);const r=Q.parser?.yy;if(!(r instanceof J))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ce(o,r)}catch(a){throw I.error("Error parsing treemap:",a),a}},"parse")},Te=10,$=10,M=25,Le=h((p,a,o,r)=>{const c=r.db,s=c.getConfig(),d=s.padding??Te,u=c.getDiagramTitle(),V=c.getRoot(),{themeVariables:l}=q();if(!V)return;const N=u?30:0,b=ie(a),G=s.nodeWidth?s.nodeWidth*$:960,O=s.nodeHeight?s.nodeHeight*$:500,H=G,X=O+N;b.attr("viewBox",`0 0 ${H} ${X}`),ce(b,X,H,s.useMaxWidth);let v;try{const e=s.valueFormat||",";if(e==="$0,0")v=h(t=>"$"+D(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),n=t?t[0]:"";v=h(m=>"$"+D(","+n)(m),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);v=h(n=>"$"+D(t||"")(n),"valueFormat")}else v=D(e)}catch(e){I.error("Error creating format function:",e),v=D(",")}const z=B().range(["transparent",l.cScale0,l.cScale1,l.cScale2,l.cScale3,l.cScale4,l.cScale5,l.cScale6,l.cScale7,l.cScale8,l.cScale9,l.cScale10,l.cScale11]),Z=B().range(["transparent",l.cScalePeer0,l.cScalePeer1,l.cScalePeer2,l.cScalePeer3,l.cScalePeer4,l.cScalePeer5,l.cScalePeer6,l.cScalePeer7,l.cScalePeer8,l.cScalePeer9,l.cScalePeer10,l.cScalePeer11]),W=B().range([l.cScaleLabel0,l.cScaleLabel1,l.cScaleLabel2,l.cScaleLabel3,l.cScaleLabel4,l.cScaleLabel5,l.cScaleLabel6,l.cScaleLabel7,l.cScaleLabel8,l.cScaleLabel9,l.cScaleLabel10,l.cScaleLabel11]);u&&b.append("text").attr("x",H/2).attr("y",N/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(u);const Y=b.append("g").attr("transform",`translate(0, ${N})`).attr("class","treemapContainer"),ee=pe(V).sum(e=>e.value??0).sort((e,t)=>
vendor: 3,305 bytes, line 1
1(t.value??0)-(e.value??0)),j=de().size([G,O]).paddingTop(e=>e.children&&e.children.length>0?M+$:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?$:0).paddingRight(e=>e.children&&e.children.length>0?$:0).paddingBottom(e=>e.children&&e.children.length>0?$:0).round(!0)(ee),te=j.descendants().filter(e=>e.children&&e.children.length>0),A=Y.selectAll(".treemapSection").data(te).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",M).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),A.append("clipPath").attr("id",(e,t)=>`clip-section-${a}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",M),A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>z(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>Z(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),A.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",M/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=E(this),n=e.data.name;t.text(n);const m=e.x1-e.x0,y=6;let g;s.showValues!==!1&&e.value?g=m-10-30-10-y:g=m-y-6;const S=Math.max(15,g),i=t.node();if(i.getComputedTextLength()>S){let f=n;for(;f.length>0;){if(f=n.substring(0,f.length-1),f.length===0){t.text("..."),i.getComputedTextLength()>S&&t.text("");break}if(t.text(f+"..."),i.getComputedTextLength()<=S)break}}}),s.showValues!==!1&&A.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",M/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?v(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")});const ae=j.leaves(),_=Y.selectAll(".treemapLeafGroup").data(ae).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);_.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("stroke-width",3),_.a
vendor: 3,145 bytes, lines 1-24
1ppend("clipPath").attr("id",(e,t)=>`clip-${a}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),_.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+W(e.data.name)+";",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.data.name).each(function(e){const t=E(this),n=e.x1-e.x0,m=e.y1-e.y0,y=t.node(),g=4,T=n-2*g,S=m-2*g;if(T<10||S<10){t.style("display","none");return}let i=parseInt(t.style("font-size"),10);const C=8,x=28,f=.6,w=6,k=2;for(;y.getComputedTextLength()>T&&i>C;)i--,t.style("font-size",`${i}px`);let P=Math.max(w,Math.min(x,Math.round(i*f))),R=i+k+P;for(;R>S&&i>C&&(i--,P=Math.max(w,Math.min(x,Math.round(i*f))),!(P<w&&i===C));)t.style("font-size",`${i}px`),R=i+k+P;t.style("font-size",`${i}px`),(y.getComputedTextLength()>T||i<C||S<i)&&t.style("display","none")}),s.showValues!==!1&&_.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const n="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+W(t.data.name)+";",m=L({cssCompiledStyles:t.data.cssCompiledStyles});return n+m.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,n)=>`url(#clip-${a}-${n})`).text(t=>t.value?v(t.value):"").each(function(t){const n=E(this),m=this.parentNode;if(!m){n.style("display","none");return}const y=E(m).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){n.style("display","none");return}const g=parseFloat(y.style("font-size")),T=28,S=.6,i=6,C=2,x=Math.max(i,Math.min(T,Math.round(g*S)));n.style("font-size",`${x}px`);const w=(t.y1-t.y0)/2+g/2+C;n.attr("y",w);const k=t.x1-t.x0,se=t.y1-t.y0-4,ne=k-8;n.node().getComputedTextLength()>ne||w+x>se||x<i?n.style("display","none"):n.style("display",null)});const le=s.diagramPadding??8;ve(b,le,"flowchart",s?.useMaxWidth||!1)},"draw"),$e=h(function(p,a){return a.db.getClasses()},"getClasses"),Fe={draw:Le,getClasses:$e},Ne={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},ze=h(({treemap:p}={})=>{const a=U(Ne,p);return` 2 .treemapNode.section { 3 stroke: ${a.sectionStrokeColor}; 4 stroke-width: ${a.sectionStrokeWidth}; 5 fill: ${a.sectionFillColor}; 6 } 7 .treemapNode.leaf { 8 stroke: ${a.leafStrokeColor}; 9 stroke-width: ${a.leafStrokeWidth}; 10 fill: ${a.leafFillColor}; 11 } 12 .treemapLabel { 13 fill: ${a.labelColor}; 14 font-size: ${a.labelFontSize}; 15 } 16 .treemapValue { 17 fill: ${a.valueColor}; 18 font-size: ${a.valueFontSize}; 19 } 20 .treemapTitle { 21 fill: ${a.titleColor}; 22 font-size: ${a.titleFontSize}; 23 } 24 `},"getStyles"),Ae=ze,Xe={parser:Q,get db(){return new J},renderer:Fe,styles:Ae};export{Xe as diagram};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.