@jaabiri/bmad-studio 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/index.js +1996 -0
  2. package/package.json +53 -0
  3. package/ui-dist/assets/_baseUniq-B_n4QFRL.js +1 -0
  4. package/ui-dist/assets/_workflowId.lazy-FP56r40x.js +12 -0
  5. package/ui-dist/assets/arc-D8SlLs2L.js +1 -0
  6. package/ui-dist/assets/architectureDiagram-Q4EWVU46-BhKy9qBN.js +36 -0
  7. package/ui-dist/assets/blockDiagram-DXYQGD6D-DHQ9TuqQ.js +132 -0
  8. package/ui-dist/assets/c4Diagram-AHTNJAMY-BTPifryG.js +10 -0
  9. package/ui-dist/assets/channel-qsfw27Pz.js +1 -0
  10. package/ui-dist/assets/chevron-right-C3gMQbwP.js +1 -0
  11. package/ui-dist/assets/chunk-4BX2VUAB-DJJtjuLz.js +1 -0
  12. package/ui-dist/assets/chunk-4TB4RGXK-ONYWO0S_.js +206 -0
  13. package/ui-dist/assets/chunk-55IACEB6-CKub8aEM.js +1 -0
  14. package/ui-dist/assets/chunk-EDXVE4YY-c2zVzCwr.js +1 -0
  15. package/ui-dist/assets/chunk-FMBD7UC4-CnUcBH4x.js +15 -0
  16. package/ui-dist/assets/chunk-OYMX7WX6-DI7UEGCn.js +231 -0
  17. package/ui-dist/assets/chunk-QZHKN3VN-Dlq9g4FR.js +1 -0
  18. package/ui-dist/assets/chunk-YZCP3GAM-CpE3yTZs.js +1 -0
  19. package/ui-dist/assets/classDiagram-6PBFFD2Q-C6zNtups.js +1 -0
  20. package/ui-dist/assets/classDiagram-v2-HSJHXN6E-C6zNtups.js +1 -0
  21. package/ui-dist/assets/clone-lFRGLeBs.js +1 -0
  22. package/ui-dist/assets/cose-bilkent-S5V4N54A-BcwRulTx.js +1 -0
  23. package/ui-dist/assets/cytoscape.esm-5J0xJHOV.js +321 -0
  24. package/ui-dist/assets/dagre-KV5264BT-kD6LwyTY.js +4 -0
  25. package/ui-dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  26. package/ui-dist/assets/diagram-5BDNPKRD-7BtLyPf7.js +10 -0
  27. package/ui-dist/assets/diagram-G4DWMVQ6-BeU21gzV.js +24 -0
  28. package/ui-dist/assets/diagram-MMDJMWI5-BcZe7DAu.js +43 -0
  29. package/ui-dist/assets/diagram-TYMM5635-30qZErT6.js +24 -0
  30. package/ui-dist/assets/erDiagram-SMLLAGMA-DZzYsGd-.js +85 -0
  31. package/ui-dist/assets/flowDiagram-DWJPFMVM-CEyo_5fY.js +162 -0
  32. package/ui-dist/assets/ganttDiagram-T4ZO3ILL-CdxjNHta.js +292 -0
  33. package/ui-dist/assets/gitGraphDiagram-UUTBAWPF-OI6nqhRA.js +106 -0
  34. package/ui-dist/assets/graph-CJuDDeAK.js +1 -0
  35. package/ui-dist/assets/index-1QFQcLya.js +56 -0
  36. package/ui-dist/assets/index-BvVxlmMK.js +29 -0
  37. package/ui-dist/assets/index-DPA4A8ah.js +9 -0
  38. package/ui-dist/assets/index-DbkfLjQe.js +1 -0
  39. package/ui-dist/assets/index-cvXQBc8Y.css +1 -0
  40. package/ui-dist/assets/infoDiagram-42DDH7IO-Bgvk_VTG.js +2 -0
  41. package/ui-dist/assets/init-Gi6I4Gst.js +1 -0
  42. package/ui-dist/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
  43. package/ui-dist/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
  44. package/ui-dist/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
  45. package/ui-dist/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
  46. package/ui-dist/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
  47. package/ui-dist/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
  48. package/ui-dist/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
  49. package/ui-dist/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
  50. package/ui-dist/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
  51. package/ui-dist/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
  52. package/ui-dist/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
  53. package/ui-dist/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
  54. package/ui-dist/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
  55. package/ui-dist/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
  56. package/ui-dist/assets/ishikawaDiagram-UXIWVN3A-Cz2e8g4P.js +70 -0
  57. package/ui-dist/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  58. package/ui-dist/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
  59. package/ui-dist/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
  60. package/ui-dist/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  61. package/ui-dist/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  62. package/ui-dist/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  63. package/ui-dist/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  64. package/ui-dist/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
  65. package/ui-dist/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
  66. package/ui-dist/assets/journeyDiagram-VCZTEJTY-B7EdpiRX.js +139 -0
  67. package/ui-dist/assets/kanban-definition-6JOO6SKY-DiUf0qIs.js +89 -0
  68. package/ui-dist/assets/katex-BzTkCl_B.js +265 -0
  69. package/ui-dist/assets/layout-BhnDrrIT.js +1 -0
  70. package/ui-dist/assets/linear-BDwQpyTv.js +1 -0
  71. package/ui-dist/assets/mermaid.core-BR4XzyQe.js +303 -0
  72. package/ui-dist/assets/min-BJhF9j1-.js +1 -0
  73. package/ui-dist/assets/mindmap-definition-QFDTVHPH-D05ylhL6.js +96 -0
  74. package/ui-dist/assets/minus-M76p8_Mr.js +1 -0
  75. package/ui-dist/assets/ordinal-Cboi1Yqb.js +1 -0
  76. package/ui-dist/assets/pieDiagram-DEJITSTG-Bn-HlZLK.js +30 -0
  77. package/ui-dist/assets/proxy-B7DZsNQK.js +1 -0
  78. package/ui-dist/assets/quadrantDiagram-34T5L4WZ-BElRpUWb.js +7 -0
  79. package/ui-dist/assets/requirementDiagram-MS252O5E-CHPWxs3l.js +84 -0
  80. package/ui-dist/assets/sankeyDiagram-XADWPNL6-tlvafq0R.js +10 -0
  81. package/ui-dist/assets/sequenceDiagram-FGHM5R23-FgarYdCI.js +157 -0
  82. package/ui-dist/assets/sprint.lazy-CPHJj3lM.js +1 -0
  83. package/ui-dist/assets/stateDiagram-FHFEXIEX-BMEGKFsF.js +1 -0
  84. package/ui-dist/assets/stateDiagram-v2-QKLJ7IA2-BzoNePd4.js +1 -0
  85. package/ui-dist/assets/timeline-definition-GMOUNBTQ-REImLpEb.js +120 -0
  86. package/ui-dist/assets/timeline.lazy-BY5ZUkY-.js +1 -0
  87. package/ui-dist/assets/tooltip-DA8LKiqR.js +1 -0
  88. package/ui-dist/assets/validators-2LNt2eLU.js +1 -0
  89. package/ui-dist/assets/vennDiagram-DHZGUBPP-DcFGfj6d.js +34 -0
  90. package/ui-dist/assets/wardley-RL74JXVD-B9TLQgzI.js +162 -0
  91. package/ui-dist/assets/wardleyDiagram-NUSXRM2D-Hcgh3jSX.js +20 -0
  92. package/ui-dist/assets/x-CPRWsjef.js +1 -0
  93. package/ui-dist/assets/xychartDiagram-5P7HB3ND-BTe2ICiH.js +7 -0
  94. package/ui-dist/favicon.ico +0 -0
  95. package/ui-dist/index.html +32 -0
  96. package/ui-dist/logo192.png +0 -0
  97. package/ui-dist/logo512.png +0 -0
  98. package/ui-dist/manifest.json +25 -0
  99. package/ui-dist/robots.txt +3 -0
@@ -0,0 +1 @@
1
+ import{b,a as m,c as d,d as h,i as l}from"./_baseUniq-B_n4QFRL.js";import{aG as g,aH as o,aI as p}from"./mermaid.core-BR4XzyQe.js";function L(a){var n=a==null?0:a.length;return n?b(a):[]}function v(a,n){var s=-1,t=g(a)?Array(a.length):[];return m(a,function(f,i,e){t[++s]=n(f,i,e)}),t}function M(a,n){var s=o(a)?h:v;return s(a,d(n))}function x(a,n){return a<n}function A(a,n,s){for(var t=-1,f=a.length;++t<f;){var i=a[t],e=n(i);if(e!=null&&(r===void 0?e===e&&!l(e):s(e,r)))var r=e,u=i}return u}function k(a){return a&&a.length?A(a,p,x):void 0}export{x as a,A as b,v as c,k as d,L as f,M as m};
@@ -0,0 +1,96 @@
1
+ import{g as le}from"./chunk-55IACEB6-CKub8aEM.js";import{s as he}from"./chunk-EDXVE4YY-c2zVzCwr.js";import{_ as h,l as C,o as de,r as ge,D as ue,G as j,c as B,i as G,aF as pe,V as fe,W as me,X as ye}from"./mermaid.core-BR4XzyQe.js";import"./index-1QFQcLya.js";const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function Ee(t,e=0){return(_[t[e+0]]+_[t[e+1]]+_[t[e+2]]+_[t[e+3]]+"-"+_[t[e+4]]+_[t[e+5]]+"-"+_[t[e+6]]+_[t[e+7]]+"-"+_[t[e+8]]+_[t[e+9]]+"-"+_[t[e+10]]+_[t[e+11]]+_[t[e+12]]+_[t[e+13]]+_[t[e+14]]+_[t[e+15]]).toLowerCase()}let q;const _e=new Uint8Array(16);function be(){if(!q){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");q=crypto.getRandomValues.bind(crypto)}return q(_e)}const ke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ie={randomUUID:ke};function Se(t,e,a){if(ie.randomUUID&&!t)return ie.randomUUID();t=t||{};const l=t.random??t.rng?.()??be();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,Ee(l)}var J=(function(){var t=h(function(L,s,i,o){for(i=i||{},o=L.length;o--;i[L[o]]=s);return i},"o"),e=[1,4],a=[1,13],l=[1,12],n=[1,15],d=[1,16],f=[1,20],y=[1,19],E=[6,7,8],b=[1,26],v=[1,24],R=[1,25],g=[6,7,11],A=[1,6,13,15,16,19,22],K=[1,33],Q=[1,34],$=[1,6,7,11,13,15,16,19,22],H={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:h(function(s,i,o,c,p,r,U){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:a,7:[1,10],9:9,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:f,22:y},t(E,[2,3]),{1:[2,2]},t(E,[2,4]),t(E,[2,5]),{1:[2,6],6:a,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:f,22:y},{6:a,9:22,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:f,22:y},{6:b,7:v,10:23,11:R},t(g,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:y}),t(g,[2,18]),t(g,[2,19]),t(g,[2,20]),t(g,[2,21]),t(g,[2,23]),t(g,[2,24]),t(g,[2,26],{19:[1,30]}),{20:[1,31]},{6:b,7:v,10:32,11:R},{1:[2,7],6:a,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:f,22:y},t(A,[2,14],{7:K,11:Q}),t($,[2,8]),t($,[2,9]),t($,[2,10]),t(g,[2,15]),t(g,[2,16]),t(g,[2,17]),{20:[1,35]},{21:[1,36]},t(A,[2,13],{7:K,11:Q}),t($,[2,11]),t($,[2,12]),{21:[1,37]},t(g,[2,25]),t(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:h(function(s){var i=this,o=[0],c=[],p=[null],r=[],U=this.table,u="",M=0,Z=0,re=2,ee=1,oe=r.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(T.yy[W]=this.yy[W]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var X=m.yylloc;r.push(X);var ae=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(S){o.length=o.length-2*S,p.length=p.length-S,r.length=r.length-S}h(ce,"popStack");function te(){var S;return S=c.pop()||m.lex()||ee,typeof S!="number"&&(S instanceof Array&&(c=S,S=c.pop()),S=i.symbols_[S]||S),S}h(te,"lex");for(var k,O,x,z,I={},V,D,ne,F;;){if(O=o[o.length-1],this.defaultActions[O]?x=this.defaultActions[O]:((k===null||typeof k>"u")&&(k=te()),x=U[O]&&U[O][k]),typeof x>"u"||!x.length||!x[0]){var Y="";F=[];for(V in U[O])this.terminals_[V]&&V>re&&F.push("'"+this.terminals_[V]+"'");m.showPosition?Y="Parse error on line "+(M+1)+`:
2
+ `+m.showPosition()+`
3
+ Expecting `+F.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Y="Parse error on line "+(M+1)+": Unexpected "+(k==ee?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Y,{text:m.match,token:this.terminals_[k]||k,line:m.yylineno,loc:X,expected:F})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+k);switch(x[0]){case 1:o.push(k),p.push(m.yytext),r.push(m.yylloc),o.push(x[1]),k=null,Z=m.yyleng,u=m.yytext,M=m.yylineno,X=m.yylloc;break;case 2:if(D=this.productions_[x[1]][1],I.$=p[p.length-D],I._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},ae&&(I._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),z=this.performAction.apply(I,[u,Z,M,T.yy,x[1],p,r].concat(oe)),typeof z<"u")return z;D&&(o=o.slice(0,-1*D*2),p=p.slice(0,-1*D),r=r.slice(0,-1*D)),o.push(this.productions_[x[1]][0]),p.push(I.$),r.push(I._$),ne=U[o[o.length-2]][o[o.length-1]],o.push(ne);break;case 3:return!0}}return!0},"parse")},se=(function(){var L={EOF:1,parseError:h(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:h(function(s,i){return this.yy=i||this.yy||{},this._input=s,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},"setInput"),input:h(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:h(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=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),o.length-1&&(this.yylineno-=o.length-1);var p=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:o?(o.length===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(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).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(s){this.unput(this.match.slice(s))},"less"),pastInput:h(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
+ `+i+"^"},"showPosition"),test_match:h(function(s,i){var o,c,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),c=s[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var r in p)this[r]=p[r];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,i,o,c;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),r=0;r<p.length;r++)if(o=this._input.match(this.rules[p[r]]),o&&(!i||o[0].length>i[0].length)){if(i=o,c=r,this.options.backtrack_lexer){if(s=this.test_match(o,p[r]),s!==!1)return s;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(s=this.test_match(i,p[c]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var i=this.next();return i||this.lex()},"lex"),begin:h(function(i){this.conditionStack.push(i)},"begin"),popState:h(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:h(function(i){this.begin(i)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(i,o,c,p){switch(c){case 0:return i.getLogger().trace("Found comment",o.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",o.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),i.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 35:return i.getLogger().trace("Long description:",o.yytext),20;case 36:return i.getLogger().trace("Long description:",o.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return L})();H.lexer=se;function P(){this.yy={}}return h(P,"Parser"),P.prototype=H,H.Parser=P,new P})();J.parser=J;var xe=J,De=12,N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},w,Ne=(w=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=N,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let a=this.nodes.length-1;a>=0;a--)if(this.nodes[a].level<e)return this.nodes[a];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,a,l,n){C.info("addNode",e,a,l,n);let d=!1;this.nodes.length===0?(this.baseLevel=e,e=0,d=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,d=!1);const f=B();let y=f.mindmap?.padding??j.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}const E={id:this.count++,nodeId:G(a,f),level:e,descr:G(l,f),type:n,children:[],width:f.mindmap?.maxNodeWidth??j.mindmap.maxNodeWidth,padding:y,isRoot:d},b=this.getParent(e);if(b)b.children.push(E),this.nodes.push(E);else if(d)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,a){switch(C.debug("In get type",e,a),e){case"[":return this.nodeType.RECT;case"(":return a===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,a){this.elements[e]=a}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const a=B(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=G(e.icon,a)),e.class&&(l.class=G(e.class,a))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,a){if(e.level===0?e.section=void 0:e.section=a,e.children)for(const[l,n]of e.children.entries()){const d=e.level===0?l%(De-1):a;this.assignSections(n,d)}}flattenNodes(e,a){const l=B(),n=["mindmap-node"];e.isRoot===!0?n.push("section-root","section--1"):e.section!==void 0&&n.push(`section-${e.section}`),e.class&&n.push(e.class);const d=n.join(" "),f=h(E=>{const v=(l.theme?.toLowerCase()??"").includes("redux");switch(E){case N.CIRCLE:return"mindmapCircle";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexagon";case N.DEFAULT:return v?"rounded":"defaultMindmapNode";case N.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:f(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:d,cssStyles:[],look:l.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(a.push(y),e.children)for(const E of e.children)this.flattenNodes(E,a)}generateEdges(e,a){if(!e.children)return;const l=B();for(const n of e.children){let d="edge";n.section!==void 0&&(d+=` section-edge-${n.section}`);const f=e.level+1;d+=` edge-depth-${f}`;const y={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:l.look,classes:d,depth:e.level,section:n.section};a.push(y),this.generateEdges(n,a)}}getData(){const e=this.getMindmap(),a=B(),n=pe().layout!==void 0,d=a;if(n||(d.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:d};C.debug("getData: mindmapRoot",e,a),this.assignSections(e);const f=[],y=[];this.flattenNodes(e,f),this.generateEdges(e,y),C.debug(`getData: processed ${f.length} nodes and ${y.length} edges`);const E=new Map;for(const b of f)E.set(b.id,{shape:b.shape,width:b.width,height:b.height,padding:b.padding});return{nodes:f,edges:y,config:d,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+Se()}}getLogger(){return C}},h(w,"MindmapDB"),w),Le=h(async(t,e,a,l)=>{C.debug(`Rendering mindmap diagram
7
+ `+t);const n=l.db,d=n.getData(),f=le(e,d.config.securityLevel);if(d.type=l.type,d.layoutAlgorithm=de(d.config.layout,{fallback:"cose-bilkent"}),d.diagramId=e,!n.getMindmap())return;d.nodes.forEach(g=>{g.shape==="rounded"?(g.radius=15,g.taper=15,g.stroke="none",g.width=0,g.padding=15):g.shape==="circle"?g.padding=10:g.shape==="rect"?(g.width=0,g.padding=10):g.shape==="hexagon"&&(g.width=0,g.height=0)}),await ge(d,f);const{themeVariables:E}=ue(),{useGradient:b,gradientStart:v,gradientStop:R}=E;if(b&&v&&R){const g=f.attr("id"),A=f.append("defs").append("linearGradient").attr("id",`${g}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");A.append("stop").attr("offset","0%").attr("stop-color",v).attr("stop-opacity",1),A.append("stop").attr("offset","100%").attr("stop-color",R).attr("stop-opacity",1)}he(f,d.config.mindmap?.padding??j.mindmap.padding,"mindmapDiagram",d.config.mindmap?.useMaxWidth??j.mindmap.useMaxWidth)},"draw"),ve={draw:Le},Te=h(t=>{const{theme:e,look:a}=t;let l="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],fe(t["lineColor"+n])?t["lineColor"+n]=me(t["lineColor"+n],20):t["lineColor"+n]=ye(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const d=""+(a==="neo"?Math.max(10-(n-1)*2,2):17-3*n);l+=`
8
+ .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
9
+ fill: ${t["cScale"+n]};
10
+ }
11
+ .section-${n-1} text {
12
+ fill: ${t["cScaleLabel"+n]};
13
+ }
14
+ .section-${n-1} span {
15
+ color: ${t["cScaleLabel"+n]};
16
+ }
17
+ .node-icon-${n-1} {
18
+ font-size: 40px;
19
+ color: ${t["cScaleLabel"+n]};
20
+ }
21
+ .section-edge-${n-1}{
22
+ stroke: ${t["cScale"+n]};
23
+ }
24
+ .edge-depth-${n-1}{
25
+ stroke-width: ${d};
26
+ }
27
+ .section-${n-1} line {
28
+ stroke: ${t["cScaleInv"+n]} ;
29
+ stroke-width: 3;
30
+ }
31
+
32
+ .disabled, .disabled circle, .disabled text {
33
+ fill: lightgray;
34
+ }
35
+ .disabled text {
36
+ fill: #efefef;
37
+ }
38
+ [data-look="neo"].mindmap-node.section-${n-1} rect, [data-look="neo"].mindmap-node.section-${n-1} path, [data-look="neo"].mindmap-node.section-${n-1} circle, [data-look="neo"].mindmap-node.section-${n-1} polygon {
39
+ fill: ${e==="redux"||e==="redux-dark"||e==="neutral"?t.mainBkg:t["cScale"+n]};
40
+ stroke: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScale"+n]};
41
+ stroke-width: ${t.strokeWidth??2}px;
42
+ }
43
+ [data-look="neo"].section-edge-${n-1}{
44
+ stroke: ${e?.includes("redux")||e==="neo-dark"?t.nodeBorder:t["cScale"+n]};
45
+ }
46
+ [data-look="neo"].mindmap-node.section-${n-1} text {
47
+ fill: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:n)]};
48
+ }
49
+ `}return l},"genSections"),Oe=h((t,e,a)=>{let l="";for(let n=0;n<t;n++)l+=`
50
+ [data-look="neo"].mindmap-node.section-${n-1} rect, [data-look="neo"].mindmap-node.section-${n-1} path, [data-look="neo"].mindmap-node.section-${n-1} circle, [data-look="neo"].mindmap-node.section-${n-1} polygon {
51
+ stroke: url(${e}-gradient);
52
+ fill: ${a};
53
+ }
54
+ .section-${n-1} line {
55
+ stroke-width: 0;
56
+ }`;return l},"genGradient"),Ie=h(t=>{const{theme:e}=t,a=t.svgId,l=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none";return`
57
+ .edge {
58
+ stroke-width: 3;
59
+ }
60
+ ${Te(t)}
61
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
62
+ fill: ${t.git0};
63
+ }
64
+ .section-root text {
65
+ fill: ${t.gitBranchLabel0};
66
+ }
67
+ .section-root span {
68
+ color: ${e?.includes("redux")?t.nodeBorder:t.gitBranchLabel0};
69
+ }
70
+ .icon-container {
71
+ height:100%;
72
+ display: flex;
73
+ justify-content: center;
74
+ align-items: center;
75
+ }
76
+ .edge {
77
+ fill: none;
78
+ }
79
+ .mindmap-node-label {
80
+ dy: 1em;
81
+ alignment-baseline: middle;
82
+ text-anchor: middle;
83
+ dominant-baseline: middle;
84
+ text-align: center;
85
+ }
86
+ [data-look="neo"].mindmap-node {
87
+ filter: ${l};
88
+ }
89
+ [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
90
+ fill: ${e?.includes("redux")?t.mainBkg:t.git0};
91
+ }
92
+ [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
93
+ fill: ${e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]};
94
+ }
95
+ ${t.useGradient&&a&&t.mainBkg?Oe(t.THEME_COLOR_LIMIT,a,t.mainBkg):""}
96
+ `},"getStyles"),Ce=Ie,Ue={get db(){return new Ne},renderer:ve,parser:xe,styles:Ce};export{Ue as diagram};
@@ -0,0 +1 @@
1
+ import{c as o}from"./index-1QFQcLya.js";const c=[["path",{d:"M5 12h14",key:"1ays0h"}]],e=o("minus",c);export{e as M};
@@ -0,0 +1 @@
1
+ import{i as a}from"./init-Gi6I4Gst.js";class o extends Map{constructor(n,t=g){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(l(this,n),t)}delete(n){return super.delete(p(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function l({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function p({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(r),e.delete(r)),t}function g(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function h(){var e=new o,n=[],t=[],r=f;function s(u){let i=e.get(u);if(i===void 0){if(r!==f)return r;e.set(u,i=n.push(u)-1)}return t[i%t.length]}return s.domain=function(u){if(!arguments.length)return n.slice();n=[],e=new o;for(const i of u)e.has(i)||e.set(i,n.push(i)-1);return s},s.range=function(u){return arguments.length?(t=Array.from(u),s):t.slice()},s.unknown=function(u){return arguments.length?(r=u,s):r},s.copy=function(){return h(n,t).unknown(r)},a.apply(s,arguments),s}export{h as o};
@@ -0,0 +1,30 @@
1
+ import{a4 as S,a7 as R,aE as K,g as Q,s as Y,a as tt,b as et,q as at,p as rt,_ as p,l as z,c as nt,F as it,I as st,N as ot,e as lt,z as ct,G as ut}from"./mermaid.core-BR4XzyQe.js";import{p as pt}from"./chunk-4BX2VUAB-DJJtjuLz.js";import{p as dt}from"./wardley-RL74JXVD-B9TLQgzI.js";import{d as P}from"./arc-D8SlLs2L.js";import{o as gt}from"./ordinal-Cboi1Yqb.js";import"./index-1QFQcLya.js";import"./min-BJhF9j1-.js";import"./_baseUniq-B_n4QFRL.js";import"./init-Gi6I4Gst.js";function ft(t,a){return a<t?-1:a>t?1:a>=t?0:NaN}function ht(t){return t}function mt(){var t=ht,a=ft,f=null,y=S(0),s=S(R),d=S(0);function o(e){var n,l=(e=K(e)).length,g,h,v=0,c=new Array(l),i=new Array(l),x=+y.apply(this,arguments),w=Math.min(R,Math.max(-R,s.apply(this,arguments)-x)),m,D=Math.min(Math.abs(w)/l,d.apply(this,arguments)),$=D*(w<0?-1:1),u;for(n=0;n<l;++n)(u=i[c[n]=n]=+t(e[n],n,e))>0&&(v+=u);for(a!=null?c.sort(function(A,C){return a(i[A],i[C])}):f!=null&&c.sort(function(A,C){return f(e[A],e[C])}),n=0,h=v?(w-l*$)/v:0;n<l;++n,x=m)g=c[n],u=i[g],m=x+(u>0?u*h:0)+$,i[g]={data:e[g],index:n,value:u,startAngle:x,endAngle:m,padAngle:D};return i}return o.value=function(e){return arguments.length?(t=typeof e=="function"?e:S(+e),o):t},o.sortValues=function(e){return arguments.length?(a=e,f=null,o):a},o.sort=function(e){return arguments.length?(f=e,a=null,o):f},o.startAngle=function(e){return arguments.length?(y=typeof e=="function"?e:S(+e),o):y},o.endAngle=function(e){return arguments.length?(s=typeof e=="function"?e:S(+e),o):s},o.padAngle=function(e){return arguments.length?(d=typeof e=="function"?e:S(+e),o):d},o}var vt=ut.pie,F={sections:new Map,showData:!1},T=F.sections,W=F.showData,xt=structuredClone(vt),St=p(()=>structuredClone(xt),"getConfig"),yt=p(()=>{T=new Map,W=F.showData,ct()},"clear"),wt=p(({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.`);T.has(t)||(T.set(t,a),z.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),At=p(()=>T,"getSections"),Ct=p(t=>{W=t},"setShowData"),Dt=p(()=>W,"getShowData"),_={getConfig:St,clear:yt,setDiagramTitle:rt,getDiagramTitle:at,setAccTitle:et,getAccTitle:tt,setAccDescription:Y,getAccDescription:Q,addSection:wt,getSections:At,setShowData:Ct,getShowData:Dt},$t=p((t,a)=>{pt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Tt={parse:p(async t=>{const a=await dt("pie",t);z.debug(a),$t(a,_)},"parse")},Et=p(t=>`
2
+ .pieCircle{
3
+ stroke: ${t.pieStrokeColor};
4
+ stroke-width : ${t.pieStrokeWidth};
5
+ opacity : ${t.pieOpacity};
6
+ }
7
+ .pieOuterCircle{
8
+ stroke: ${t.pieOuterStrokeColor};
9
+ stroke-width: ${t.pieOuterStrokeWidth};
10
+ fill: none;
11
+ }
12
+ .pieTitleText {
13
+ text-anchor: middle;
14
+ font-size: ${t.pieTitleTextSize};
15
+ fill: ${t.pieTitleTextColor};
16
+ font-family: ${t.fontFamily};
17
+ }
18
+ .slice {
19
+ font-family: ${t.fontFamily};
20
+ fill: ${t.pieSectionTextColor};
21
+ font-size:${t.pieSectionTextSize};
22
+ // fill: white;
23
+ }
24
+ .legend text {
25
+ fill: ${t.pieLegendTextColor};
26
+ font-family: ${t.fontFamily};
27
+ font-size: ${t.pieLegendTextSize};
28
+ }
29
+ `,"getStyles"),bt=Et,kt=p(t=>{const a=[...t.values()].reduce((s,d)=>s+d,0),f=[...t.entries()].map(([s,d])=>({label:s,value:d})).filter(s=>s.value/a*100>=1);return mt().value(s=>s.value).sort(null)(f)},"createPieArcs"),Mt=p((t,a,f,y)=>{z.debug(`rendering pie chart
30
+ `+t);const s=y.db,d=nt(),o=it(s.getConfig(),d.pie),e=40,n=18,l=4,g=450,h=g,v=st(a),c=v.append("g");c.attr("transform","translate("+h/2+","+g/2+")");const{themeVariables:i}=d;let[x]=ot(i.pieOuterStrokeWidth);x??=2;const w=o.textPosition,m=Math.min(h,g)/2-e,D=P().innerRadius(0).outerRadius(m),$=P().innerRadius(m*w).outerRadius(m*w);c.append("circle").attr("cx",0).attr("cy",0).attr("r",m+x/2).attr("class","pieOuterCircle");const u=s.getSections(),A=kt(u),C=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let E=0;u.forEach(r=>{E+=r});const G=A.filter(r=>(r.data.value/E*100).toFixed(0)!=="0"),b=gt(C).domain([...u.keys()]);c.selectAll("mySlices").data(G).enter().append("path").attr("d",D).attr("fill",r=>b(r.data.label)).attr("class","pieCircle"),c.selectAll("mySlices").data(G).enter().append("text").text(r=>(r.data.value/E*100).toFixed(0)+"%").attr("transform",r=>"translate("+$.centroid(r)+")").style("text-anchor","middle").attr("class","slice");const V=c.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),N=[...u.entries()].map(([r,M])=>({label:r,value:M})),k=c.selectAll(".legend").data(N).enter().append("g").attr("class","legend").attr("transform",(r,M)=>{const O=n+l,Z=O*N.length/2,H=12*n,J=M*O-Z;return"translate("+H+","+J+")"});k.append("rect").attr("width",n).attr("height",n).style("fill",r=>b(r.label)).style("stroke",r=>b(r.label)),k.append("text").attr("x",n+l).attr("y",n-l).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const U=Math.max(...k.selectAll("text").nodes().map(r=>r?.getBoundingClientRect().width??0)),j=h+e+n+l+U,L=V.node()?.getBoundingClientRect().width??0,q=h/2-L/2,X=h/2+L/2,B=Math.min(0,q),I=Math.max(j,X)-B;v.attr("viewBox",`${B} 0 ${I} ${g}`),lt(v,g,I,o.useMaxWidth)},"draw"),Rt={draw:Mt},_t={parser:Tt,db:_,renderer:Rt,styles:bt};export{_t as diagram};