1"use strict";(self.webpackChunkSlideSquad=self.webpackChunkSlideSquad||[]).push([[7394],{67394:(vt,y,s)=>{s.r(y),s.d(y,{diagram:()=>nt});var G=s(10467),b=s(39089),j=s(63088),M=s(78485),l=s(99317),i=s(26526),z=s(44756),g=s(53390),P=l.UI.pie,D={sections:new Map,showData:!1,config:P},_=D.sections,S=D.showData,N=structuredClone(P),$={getConfig:(0,i.K2)(()=>structuredClone(N),"getConfig"),clear:(0,i.K2)(()=>{_=new Map,S=D.showData,(0,l.IU)()},"clear"),setDiagramTitle:l.ke,getDiagramTitle:l.ab,setAccTitle:l.SV,getAccTitle:l.iN,setAccDescription:l.EI,getAccDescription:l.m7,addSection:(0,i.K2)(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);_.has(t)||(_.set(t,a),i.Rm.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),getSections:(0,i.K2)(()=>_,"getSections"),setShowData:(0,i.K2)(t=>{S=t},"setShowData"),getShowData:(0,i.K2)(()=>S,"getShowData")},Z=(0,i.K2)((t,a)=>{(0,j.S)(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),q={parse:(0,i.K2)(function(){var t=(0,G.A)(function*(a){const p=yield(0,z.qg)("pie",a);i.Rm.debug(p),Z(p,$)});return function(a){return t.apply(this,arguments)}}(),"parse")},et=(0,i.K2)(t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${t.pieOuterStrokeColor};\n stroke-width: ${t.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`,"getStyles"),at=(0,i.K2)(t=>{const a=[...t.values()].reduce((n,c)=>n+c,0),p=[...t.entries()].map(([n,c])=>({label:n,value:c})).filter(n=>n.value/a*100>=1);return(0,g.rLf)().value(n=>n.value).sort(null)(p)},"createPieArcs"),nt={parser:q,db:$,renderer:{draw:(0,i.K2)((t,a,p,w)=>{i.Rm.debug("rendering pie chart\n"+t);const n=w.db,c=(0,l.D7)(),O=(0,M.$t)(n.getConfig(),c.pie),E=(0,b.D)(a),h=E.append("g");h.attr("transform","translate(225,225)");const{themeVariables:r}=c;let[W]=(0,M.I5)(r.pieOuterStrokeWidth);W??=2;const B=O.textPosition,m=Math.min(450,450)/2-40,st=(0,g.JLW)().innerRadius(0).outerRadius(m),lt=(0,g.JLW)().innerRadius(m*B).outerRadius(m*B);h.append("circle").attr("cx",0).attr("cy",0).attr("r",m+W/2).attr("class","pieOuterCircle");const v=n.getSections(),ot=at(v),ct=[r.pie1,r.pie2,r.pie3,r.pie4,r.pie5,r.pie6,r.pie7,r.pie8,r.pie9,r.pie10,r.pie11,r.pie12];let C=0;v.forEach(e=>{C+=e});const I=ot.filter(e=>"0"!==(e.data.value/C*100).toFixed(0)),x=(0,g.UMr)(ct).domain([...v.keys()]);h.selectAll("mySlices").data(I).enter().append("path").attr("d",st).attr("fill",e=>x(e.data.label)).attr("class","pieCircle"),h.selectAll("mySlices").data(I).enter().append("text").text(e=>(e.data.value/C*100).toFixed(0)+"%").attr("transform",e=>"translate("+lt.centroid(e)+")").style("text-anchor","middle").attr("class","slice");const dt=h.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),K=[...v.entries()].map(([e,T])=>({label:e,value:T})),A=h.selectAll(".legend").data(K).enter().append("g").attr("class","legend").attr("transform",(e,T)=>"translate(216,"+(22*T-22*K.length/2)+")");A.append("rect").attr("width",18).attr("height",18).style("fill",e=>x(e.label)).style("stroke",e=>x(e.label)),A.append("text").attr("x",22).attr("y",14).text(e=>n.getShowData()?`${e.label} [${e.value}]`:e.label);const pt=512+Math.max(...A.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0)),L=dt.node()?.getBoundingClientRect().width??0,gt=225+L/2,U=Math.min(0,225-L/2),k=Math.max(pt,gt)-U;E.attr("viewBox",`${U} 0 ${k} 450`),(0,l.a$)(E,450,k,O.useMaxWidth)},"draw")},styles:et}}}]);
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.