1import{p as at}from"./chunk-JWPE2WC7-f5sJVn9t.js";import{_ as g,g as nt,s as rt,a as it,b as ot,p as st,o as lt,l as B,c as ct,B as dt,F as ut,M as gt,e as ft,q as pt,D as ht}from"./mermaid.core-D_ax936U.js";import{p as mt}from"./cynefin-VYW2F7L2-D9vLyzA2.js";import{d as Y}from"./arc-DryhIm0M.js";import{o as vt}from"./ordinal-BEOoIcdz.js";import{a as $,t as P,n as yt}from"./step-Cb_q5KcS.js";import"./crdt-BucyUbPf.js";import"./vendor-DlQ3_EJQ.js";import"./init-CNuy7lMP.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"04c7456d3"};var a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="9fbe2b42-e8b9-4f63-a0f0-5325280dd2af",t._sentryDebugIdIdentifier="sentry-dbid-9fbe2b42-e8b9-4f63-a0f0-5325280dd2af")}catch{}})();function wt(t,a){return a<t?-1:a>t?1:a>=t?0:NaN}function St(t){return t}function xt(){var t=St,a=wt,p=null,T=$(0),l=$(P),f=$(0);function i(e){var r,s=(e=yt(e)).length,h,x,D=0,m=new Array(s),o=new Array(s),C=+T.apply(this,arguments),_=Math.min(P,Math.max(-P,l.apply(this,arguments)-C)),k,R=Math.min(Math.abs(_)/s,f.apply(this,arguments)),d=R*(_<0?-1:1),b;for(r=0;r<s;++r)(b=o[m[r]=r]=+t(e[r],r,e))>0&&(D+=b);for(a!=null?m.sort(function(M,v){return a(o[M],o[v])}):p!=null&&m.sort(function(M,v){return p(e[M],e[v])}),r=0,x=D?(_-s*d)/D:0;r<s;++r,C=k)h=m[r],b=o[h],k=C+(b>0?b*x:0)+d,o[h]={data:e[h],index:r,value:b,startAngle:C,endAngle:k,padAngle:R};return o}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:$(+e),i):t},i.sortValues=function(e){return arguments.length?(a=e,p=null,i):a},i.sort=function(e){return arguments.length?(p=e,a=null,i):p},i.startAngle=function(e){return arguments.length?(T=typeof e=="function"?e:$(+e),i):T},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:$(+e),i):l},i.padAngle=function(e){return arguments.length?(f=typeof e=="function"?e:$(+e),i):f},i}var bt=ht.pie,G={sections:new Map,showData:!1},F=G.sections,V=G.showData,At=structuredClone(bt),Dt=g(()=>structuredClone(At),"getConfig"),Ct=g(()=>{F=new Map,V=G.showData,pt()}
1,"clear"),$t=g(({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.`);F.has(t)||(F.set(t,a),B.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),Tt=g(()=>F,"getSections"),kt=g(t=>{V=t},"setShowData"),Et=g(()=>V,"getShowData"),Z={getConfig:Dt,clear:Ct,setDiagramTitle:lt,getDiagramTitle:st,setAccTitle:ot,getAccTitle:it,setAccDescription:rt,getAccDescription:nt,addSection:$t,getSections:Tt,setShowData:kt,getShowData:Et},_t=g((t,a)=>{at(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Mt={parse:g(async t=>{const a=await mt("pie",t);B.debug(a),_t(a,Z)},"parse")},zt=g(t=>` 2 .pieCircle{ 3 stroke: ${t.pieStrokeColor}; 4 stroke-width : ${t.pieStrokeWidth}; 5 opacity : ${t.pieOpacity}; 6 } 7 .pieCircle.highlighted{ 8 scale: 1.05; 9 opacity: 1; 10 } 11 .pieCircle.highlightedOnHover:hover{ 12 transition-duration: 250ms; 13 scale: 1.05; 14 opacity: 1; 15 } 16 .pieOuterCircle{ 17 stroke: ${t.pieOuterStrokeColor}; 18 stroke-width: ${t.pieOuterStrokeWidth}; 19 fill: none; 20 } 21 .pieTitleText { 22 text-anchor: middle; 23 font-size: ${t.pieTitleTextSize}; 24 fill: ${t.pieTitleTextColor}; 25 font-family: ${t.fontFamily}; 26 } 27 .slice { 28 font-family: ${t.fontFamily}; 29 fill: ${t.pieSectionTextColor}; 30 font-size:${t.pieSectionTextSize}; 31 // fill: white; 32 } 33 .legend text { 34 fill: ${t.pieLegendTextColor}; 35 font-family: ${t.fontFamily}; 36 font-size: ${t.pieLegendTextSize}; 37 } 38`,"getStyles"),Rt=zt,It=g(t=>{const a=[...t.values()].reduce((l,f)=>l+f,0),p=[...t.entries()].map(([l,f])=>({label:l,value:f})).filter(l=>l.value/a*100>=1);return xt().value(l=>l.value).sort(null)(p)},"createPieArcs"),Lt=g((t,a,p,T)=>{B.debug(`rendering pie chart 39`+t);const l=T.db,f=ct(),i=dt(l.getConfig(),f.pie),e=40,r=18,s=4,h=450,x=h,D=ut(a),m=D.append("g");m.attr("transform","translate("+x/2+","+h/2+")");const{themeVariables:o}=f;let[C]=gt(o.pieOuterStrokeWidth);C??=2;const _=i.legendPosition,k=i.textPosition,R=i.donutHole>0&&i.donutHole<=.9?i.donutHole:0,d=Math.min(x,h)/2-e,b=Y().innerRadius(R*d).outerRadius(d),M=Y().innerRadius(d*k).outerRadius(d*k),v=m.append("g");v.append("circle").attr("cx",0).attr("cy",0).attr("r",d+C/2).attr("class","pieOuterCircle");const I=l.getSections(),J=It(I),K=[o.pie1,o.pie2,o.pie3,o.pie4,o.pie5,o.pie6,o.pie7,o.pie8,o.pie9,o.pie10,o.pie11,o.pie12];let N=0;I.forEach(n=>{N+=n});const U=J.filter(n=>(n.data.value/N*100).toFixed(0)!=="0"),W=vt(K).domain([...I.keys()]);v.selectAll("mySlices").data(U).enter().append("path").attr("d",b).attr("fill",n=>W(n.data.label)).attr("class",n=>{let c="pieCircle";return i.highlightSlice==="hover"?c+=" highlightedOnHover":i.highlightSlice===n.data.label&&(c+=" highlighted"),c}),v.selectAll("mySlices").data(U).enter().append("text").text(n=>(n.data.value/N*100).toFixed(0)+"%").attr("transform",n=>"translate("+M.centroid(n)+")").style("text-anchor","middle").attr("class","slice");const Q=m.append("text").text(l.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),z=[...I.entries()].map(([n,c])=>({label:n,value:c})),A=m.selectAll(".legend").data(z).enter().append("g").attr("class","legend");A.append("rect").attr("width",r).attr("height",r).style("fill",n=>W(n.label)).style("stroke",n=>W(n.label)),A.append("text").attr("x",r+s).attr("y",r-s).text(n=>l.getShowData()?`${n.label} [${n.value}]`:n.label);const E=Math.max(...A.selectAll("text").nodes().map(n=>n?.getBoundingClientRect().width??0));let L=h,H=x+e;const u=r+s,O=z.length*u;switch(_){case"center":A.attr("transform",(n,c)=>{const y=u*z.length/2,w=-E/2-(r+s),S=c*u-y;return"translate("+w+","+S+")"});break;case"top":L+=O,A.attr("transform",(n,c)=>{const y=d,w=-E/2-(r+s),S=c*u-y;return`translate(${w}, ${S})`}),v.attr("transform",()=>`translate(0, ${O+u})`);break;case"bottom":L+=O,A.attr("transform",(n,c)=>{const y=-d-u,w=-E/2-(r+s),S=c*u-y;return"translate("+w+","+S+")"});break;case"left":H+=r+s+E,A.attr("transform",(n,c)=>{const y=u*z.length/2,w=-d-(r+s),S=c*u-y;return"translate("+w+","+S+")"}),v.attr("transform",()=>`translate(${E+r+s}, 0)`);break;default:H+=r+s+E,A.attr("transform",(n,c)=>{const y=u*z.length/2,w=12*r,S=c*u-y;return"translate("+w+","+S+")"});break}const j=Q.node()?.getBoundingClientRect().width??0,tt=x/2-j/2,et=x/2+j/2,q=Math.min(0,tt),X=Math.max(H,et)-q;D.attr("viewBox",`${q} 0 ${X} ${L}`),ft(D,L,X,i.useMaxWidth)},"draw"),Ft={draw:Lt},qt={parser:Mt,db:Z,renderer:Ft,styles:Rt};export{qt 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.