"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["vendors-node_modules_mermaid_dist_pieDiagram-ed51bc52_js"],{"./node_modules/mermaid/dist/pieDiagram-ed51bc52.js":function(mt,it,C){C.d(it,{diagram:function(){return dt}});var c=C("./node_modules/mermaid/dist/mermaid-0d192ec3.js"),z=C("./node_modules/d3/src/index.js"),bt=C("./node_modules/dayjs/dayjs.min.js"),vt=C("./node_modules/@braintree/sanitize-url/dist/index.js"),kt=C("./node_modules/dompurify/dist/purify.js"),Y=function(){var i=function(y,t,e,s){for(e=e||{},s=y.length;s--;e[y[s]]=t);return e},g=[1,3],F=[1,4],p=[1,5],E=[1,6],$=[1,10,12,14,16,18,19,20,21,22],D=[2,4],j=[1,5,10,12,14,16,18,19,20,21,22],d=[20,21,22],S=[2,7],A=[1,12],L=[1,13],U=[1,14],m=[1,15],R=[1,16],b=[1,17],o={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,PIE:5,document:6,showData:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,section:19,NEWLINE:20,";":21,EOF:22,$accept:0,$end:1},terminals_:{2:"error",5:"PIE",7:"showData",10:"txt",11:"value",12:"title",13:"title_value",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"section",20:"NEWLINE",21:";",22:"EOF"},productions_:[0,[3,2],[3,2],[3,3],[6,0],[6,2],[8,2],[9,0],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[4,1],[4,1],[4,1]],performAction:function(t,e,s,r,a,n,w){var h=n.length-1;switch(a){case 3:r.setShowData(!0);break;case 6:this.$=n[h-1];break;case 8:r.addSection(n[h-1],r.cleanupValue(n[h]));break;case 9:this.$=n[h].trim(),r.setDiagramTitle(this.$);break;case 10:this.$=n[h].trim(),r.setAccTitle(this.$);break;case 11:case 12:this.$=n[h].trim(),r.setAccDescription(this.$);break;case 13:r.addSection(n[h].substr(8)),this.$=n[h].substr(8);break}},table:[{3:1,4:2,5:g,20:F,21:p,22:E},{1:[3]},{3:7,4:2,5:g,20:F,21:p,22:E},i($,D,{6:8,7:[1,9]}),i(j,[2,14]),i(j,[2,15]),i(j,[2,16]),{1:[2,1]},i(d,S,{8:10,9:11,1:[2,2],10:A,12:L,14:U,16:m,18:R,19:b}),i($,D,{6:18}),i($,[2,5]),{4:19,20:F,21:p,22:E},{11:[1,20]},{13:[1,21]},{15:[1,22]},{17:[1,23]},i(d,[2,12]),i(d,[2,13]),i(d,S,{8:10,9:11,1:[2,3],10:A,12:L,14:U,16:m,18:R,19:b}),i($,[2,6]),i(d,[2,8]),i(d,[2,9]),i(d,[2,10]),i(d,[2,11])],defaultActions:{7:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var s=new Error(t);throw s.hash=e,s}},parse:function(t){var e=this,s=[0],r=[],a=[null],n=[],w=this.table,h="",I=0,f=0,N=2,O=1,H=n.slice.call(arguments,1),l=Object.create(this.lexer),v={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(v.yy[J]=this.yy[J]);l.setInput(t,v.yy),v.yy.lexer=l,v.yy.parser=this,typeof l.yylloc=="undefined"&&(l.yylloc={});var Q=l.yylloc;n.push(Q);var _t=l.options&&l.options.ranges;typeof v.yy.parseError=="function"?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gt(){var x;return x=r.pop()||l.lex()||O,typeof x!="number"&&(x instanceof Array&&(r=x,x=r.pop()),x=e.symbols_[x]||x),x}for(var u,P,_,X,M={},G,k,et,K;;){if(P=s[s.length-1],this.defaultActions[P]?_=this.defaultActions[P]:((u===null||typeof u=="undefined")&&(u=gt()),_=w[P]&&w[P][u]),typeof _=="undefined"||!_.length||!_[0]){var q="";K=[];for(G in w[P])this.terminals_[G]&&G>N&&K.push("'"+this.terminals_[G]+"'");l.showPosition?q="Parse error on line "+(I+1)+`:
`+l.showPosition()+`
Expecting `+K.join(", ")+", got '"+(this.terminals_[u]||u)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(u==O?"end of input":"'"+(this.terminals_[u]||u)+"'"),this.parseError(q,{text:l.match,token:this.terminals_[u]||u,line:l.yylineno,loc:Q,expected:K})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+u);switch(_[0]){case 1:s.push(u),a.push(l.yytext),n.push(l.yylloc),s.push(_[1]),u=null,f=l.yyleng,h=l.yytext,I=l.yylineno,Q=l.yylloc;break;case 2:if(k=this.productions_[_[1]][1],M.$=a[a.length-k],M._$={first_line:n[n.length-(k||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(k||1)].first_column,last_column:n[n.length-1].last_column},_t&&(M._$.range=[n[n.length-(k||1)].range[0],n[n.length-1].range[1]]),X=this.performAction.apply(M,[h,f,I,v.yy,_[1],a,n].concat(H)),typeof X!="undefined")return X;k&&(s=s.slice(0,-1*k*2),a=a.slice(0,-1*k),n=n.slice(0,-1*k)),s.push(this.productions_[_[1]][0]),a.push(M.$),n.push(M._$),et=w[s[s.length-2]][s[s.length-1]],s.push(et);break;case 3:return!0}}return!0}},T=function(){var y={EOF:1,parseError:function(e,s){if(this.yy.parser)this.yy.parser.parseError(e,s);else throw new Error(e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===r.length?this.yylloc.first_column:0)+r[r.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},test_match:function(t,e){var s,r,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,s,r;this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if(s=this._input.match(this.rules[a[n]]),s&&(!e||s[0].length>e[0].length)){if(e=s,r=n,this.options.backtrack_lexer){if(t=this.test_match(s,a[n]),t!==!1)return t;if(this._backtrack){e=!1;continue}else return!1}else if(!this.options.flex)break}return e?(t=this.test_match(e,a[r]),t!==!1?t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,s,r,a){switch(r){case 0:break;case 1:break;case 2:return 20;case 3:break;case 4:break;case 5:return this.begin("title"),12;case 6:return this.popState(),"title_value";case 7:return this.begin("acc_title"),14;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),16;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"txt";case 17:return 5;case 18:return 7;case 19:return"value";case 20:return 22}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[6],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,7,9,11,14,17,18,19,20],inclusive:!0}}};return y}();o.lexer=T;function V(){this.yy={}}return V.prototype=o,o.Parser=V,new V}();Y.parser=Y;const st=Y,tt=c.B.pie,W={sections:{},showData:!1,config:tt};let B=W.sections,Z=W.showData;const nt=structuredClone(tt),rt=()=>structuredClone(nt),at=()=>{B=structuredClone(W.sections),Z=W.showData,(0,c.t)()},lt=(i,g)=>{i=(0,c.d)(i,(0,c.c)()),B[i]===void 0&&(B[i]=g,c.l.debug(`added new section: ${i}, with value: ${g}`))},ct=()=>B,ot=i=>(i.substring(0,1)===":"&&(i=i.substring(1).trim()),Number(i.trim())),ht=i=>{Z=i},ut=()=>Z,yt={getConfig:rt,clear:at,setDiagramTitle:c.q,getDiagramTitle:c.r,setAccTitle:c.s,getAccTitle:c.g,setAccDescription:c.b,getAccDescription:c.a,addSection:lt,getSections:ct,cleanupValue:ot,setShowData:ht,getShowData:ut},ft=i=>`
  .pieCircle{
    stroke: ${i.pieStrokeColor};
    stroke-width : ${i.pieStrokeWidth};
    opacity : ${i.pieOpacity};
  }
  .pieOuterCircle{
    stroke: ${i.pieOuterStrokeColor};
    stroke-width: ${i.pieOuterStrokeWidth};
    fill: none;
  }
  .pieTitleText {
    text-anchor: middle;
    font-size: ${i.pieTitleTextSize};
    fill: ${i.pieTitleTextColor};
    font-family: ${i.fontFamily};
  }
  .slice {
    font-family: ${i.fontFamily};
    fill: ${i.pieSectionTextColor};
    font-size:${i.pieSectionTextSize};
    // fill: white;
  }
  .legend text {
    fill: ${i.pieLegendTextColor};
    font-family: ${i.fontFamily};
    font-size: ${i.pieLegendTextSize};
  }
`,pt=i=>{const g=Object.entries(i).map(p=>({label:p[0],value:p[1]})).sort((p,E)=>E.value-p.value);return(0,z.ve8)().value(p=>p.value)(g)},dt={parser:st,db:yt,renderer:{draw:(i,g,F,p)=>{var I;var E,$;c.l.debug(`rendering pie chart
`+i);const D=p.db,j=(0,c.c)(),d=(0,c.C)(D.getConfig(),j.pie),S=450,A=(I=($=(E=document.getElementById(g))==null?void 0:E.parentElement)==null?void 0:$.offsetWidth)!=null?I:d.useWidth,L=(0,c.A)(g);L.attr("viewBox",`0 0 ${A} ${S}`),(0,c.i)(L,S,A,d.useMaxWidth);const U=40,m=18,R=4,b=L.append("g");b.attr("transform","translate("+A/2+","+S/2+")");const{themeVariables:o}=j;let[T]=(0,c.D)(o.pieOuterStrokeWidth);T!=null||(T=2);const V=d.textPosition,y=Math.min(A,S)/2-U,t=(0,z.Nb1)().innerRadius(0).outerRadius(y),e=(0,z.Nb1)().innerRadius(y*V).outerRadius(y*V);b.append("circle").attr("cx",0).attr("cy",0).attr("r",y+T/2).attr("class","pieOuterCircle");const s=D.getSections(),r=pt(s),a=[o.pie1,o.pie2,o.pie3,o.pie4,o.pie5,o.pie6,o.pie7,o.pie8,o.pie9,o.pie10,o.pie11,o.pie12],n=(0,z.PKp)(a);b.selectAll("mySlices").data(r).enter().append("path").attr("d",t).attr("fill",f=>n(f.data.label)).attr("class","pieCircle");let w=0;Object.keys(s).forEach(f=>{w+=s[f]}),b.selectAll("mySlices").data(r).enter().append("text").text(f=>(f.data.value/w*100).toFixed(0)+"%").attr("transform",f=>"translate("+e.centroid(f)+")").style("text-anchor","middle").attr("class","slice"),b.append("text").text(D.getDiagramTitle()).attr("x",0).attr("y",-(S-50)/2).attr("class","pieTitleText");const h=b.selectAll(".legend").data(n.domain()).enter().append("g").attr("class","legend").attr("transform",(f,N)=>{const O=m+R,H=O*n.domain().length/2,l=12*m,v=N*O-H;return"translate("+l+","+v+")"});h.append("rect").attr("width",m).attr("height",m).style("fill",n).style("stroke",n),h.data(r).append("text").attr("x",m+R).attr("y",m-R).text(f=>{const{label:N,value:O}=f.data;return D.getShowData()?`${N} [${O}]`:N})}},styles:ft}}}]);
