orbitchat 2.2.4 → 2.2.6

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 (87) hide show
  1. package/bin/orbitchat.js +46 -58
  2. package/dist/assets/_basePickBy-BjEly54R-XZ-uT-Uj.js +1 -0
  3. package/dist/assets/_baseUniq-DRc_T5HB-BsnuNSgv.js +1 -0
  4. package/dist/assets/{api-CIgnRago.js → api-RpN2_Bta.js} +1 -1
  5. package/dist/assets/arc-CZCQSTaI-C-VU_J9B.js +1 -0
  6. package/dist/assets/architectureDiagram-VXUJARFQ-Cfm45ePu-CSKO1yu3.js +36 -0
  7. package/dist/assets/blockDiagram-VD42YOAC-BRbgLESd-Bbm-oCAg.js +122 -0
  8. package/dist/assets/c4Diagram-YG6GDRKO-DLei6MnZ-SeObXeAe.js +10 -0
  9. package/dist/assets/channel-DkFrLL9m-oLu-Ehez.js +1 -0
  10. package/dist/assets/chunk-4BX2VUAB-DeMNg1Xd-CMa4zZ7K.js +1 -0
  11. package/dist/assets/chunk-55IACEB6-_r7qMy9s-Dy635JXO.js +1 -0
  12. package/dist/assets/chunk-B4BG7PRW-CIxgz8SC-Cg2SKJYD.js +165 -0
  13. package/dist/assets/chunk-DI55MBZ5-i035IDz6-DxyMtoDb.js +220 -0
  14. package/dist/assets/chunk-FMBD7UC4-Bm0ev8jq-DBEEbKOi.js +15 -0
  15. package/dist/assets/chunk-QN33PNHL-C8-RyAc3-Bziqpynq.js +1 -0
  16. package/dist/assets/chunk-QZHKN3VN-DMEEp6GB-NSbjkrZ8.js +1 -0
  17. package/dist/assets/chunk-TZMSLE5B-CNFsEzOl-DVds0hZJ.js +1 -0
  18. package/dist/assets/classDiagram-2ON5EDUG-DnsiOvOV-O_0UXE1J.js +1 -0
  19. package/dist/assets/classDiagram-v2-WZHVMYZB-DnsiOvOV-O_0UXE1J.js +1 -0
  20. package/dist/assets/clone-DduvFCk3-BjQT37Sj.js +1 -0
  21. package/dist/assets/cose-bilkent-S5V4N54A-VxeRCpgs-DsXa8Zq3.js +1 -0
  22. package/dist/assets/cytoscape.esm-CjI2IsL8-Da6dFVsf.js +331 -0
  23. package/dist/assets/dagre-6UL2VRFP-B-o0qgxK-DfZm7xId.js +4 -0
  24. package/dist/assets/diagram-PSM6KHXK-CoKmJ9sN-rwg0eDKT.js +24 -0
  25. package/dist/assets/diagram-QEK2KX5R-ETMfkzYL-Bawb4i2Y.js +43 -0
  26. package/dist/assets/diagram-S2PKOQOG-BgLbl6rv-fjzP4qrY.js +24 -0
  27. package/dist/assets/erDiagram-Q2GNP2WA-Swwdy5pk-TsPzHVEQ.js +60 -0
  28. package/dist/assets/flowDiagram-NV44I4VS-DXJdBBSZ-DNo_92-L.js +162 -0
  29. package/dist/assets/ganttDiagram-LVOFAZNH-DmRbHwxf-Cwvlwlkm.js +267 -0
  30. package/dist/assets/gitGraphDiagram-NY62KEGX-D30uHfXn-C_O3r_x5.js +65 -0
  31. package/dist/assets/graph-ClfIprSM-BZwHPDDo.js +1 -0
  32. package/dist/assets/{index-DlFdZiHl-BLKmE08A.js → index-Bny2bm5_-BBHjCfey.js} +1 -1
  33. package/dist/assets/index-Dwfg9sR1.js +1184 -0
  34. package/dist/assets/infoDiagram-ER5ION4S-C0DTNQfZ-DOapqc3o.js +2 -0
  35. package/dist/assets/journeyDiagram-XKPGCS4Q-53CUbf20-Dh7OAcXv.js +139 -0
  36. package/dist/assets/kanban-definition-3W4ZIXB7-B-HAgUf7-KfKbtZ09.js +89 -0
  37. package/dist/assets/layout-DoRwGyA9-CrmvCQM-.js +1 -0
  38. package/dist/assets/mindmap-definition-VGOIOE7T-JxieKS1D-DwQCKBi2.js +68 -0
  39. package/dist/assets/pieDiagram-ADFJNKIX-vEsBIPBi-BNA3SacN.js +30 -0
  40. package/dist/assets/quadrantDiagram-AYHSOK5B-DuNXQUnS-DiYTe8-4.js +7 -0
  41. package/dist/assets/requirementDiagram-UZGBJVZJ-Ajt9-U96-CaUedp2k.js +64 -0
  42. package/dist/assets/sankeyDiagram-TZEHDZUN-BNMEPupP-CoW39JHu.js +10 -0
  43. package/dist/assets/sequenceDiagram-WL72ISMW-D2j881gi-CpM-9Ot5.js +145 -0
  44. package/dist/assets/stateDiagram-FKZM4ZOC-D9G5SS9f-DyhUPTNH.js +1 -0
  45. package/dist/assets/stateDiagram-v2-4FDKWEC3-D0cjqibA-Db7olDTG.js +1 -0
  46. package/dist/assets/timeline-definition-IT6M3QCI-B95452nE-BtUwy1tt.js +61 -0
  47. package/dist/assets/treemap-KMMF4GRG-Dfxm7cSf-Dp6bDrrM.js +128 -0
  48. package/dist/assets/xychartDiagram-PRI3JC2R-CZX71UOJ-DZlx6d4_.js +7 -0
  49. package/dist/index.html +1 -1
  50. package/package.json +2 -2
  51. package/dist/assets/Tableau10-D7jGxypv-Cyu9clx1.js +0 -1
  52. package/dist/assets/arc-m8RC5oDD-BI3Pqtzd.js +0 -1
  53. package/dist/assets/blockDiagram-c4efeb88-CZ2mpei3-DPM4cmd2.js +0 -118
  54. package/dist/assets/c4Diagram-c83219d4-DL2EmCLj-rErxymwv.js +0 -10
  55. package/dist/assets/channel-BKp1WYnX--xyS6HN9.js +0 -1
  56. package/dist/assets/classDiagram-beda092f-vKbJ2bcD-DMwCR7T_.js +0 -2
  57. package/dist/assets/classDiagram-v2-2358418a-BHXpn1Du-DOszq8XM.js +0 -2
  58. package/dist/assets/clone-B1V2003j-M2W86SX2.js +0 -1
  59. package/dist/assets/createText-1719965b-C2-AT0ab-BCTwBNRp.js +0 -7
  60. package/dist/assets/edges-96097737-Zk-qG_8u-CqVniuPy.js +0 -4
  61. package/dist/assets/erDiagram-0228fc6a-B94anMjz-CSeBke6-.js +0 -51
  62. package/dist/assets/flowDb-c6c81e3f-CRRW-bQO-BPM2pZ7q.js +0 -10
  63. package/dist/assets/flowDiagram-50d868cf-DPzQMhJv-WdLQi3xJ.js +0 -4
  64. package/dist/assets/flowDiagram-v2-4f6560a1-Si9enBmB-DPq3OGPp.js +0 -1
  65. package/dist/assets/flowchart-elk-definition-6af322e1-CULhtvD--DcEXRJ9c.js +0 -139
  66. package/dist/assets/ganttDiagram-a2739b55-Bp8yOLEz-BVSxz7oy.js +0 -257
  67. package/dist/assets/gitGraphDiagram-82fe8481-BYtOQJl0-vjj_Vh2i.js +0 -70
  68. package/dist/assets/graph-BV6jB5rk-Cz0bLK4A.js +0 -1
  69. package/dist/assets/index-5325376f-DrY72DrM-fDm8gtOg.js +0 -1
  70. package/dist/assets/index-CMOim5TQ.js +0 -1008
  71. package/dist/assets/infoDiagram-8eee0895-C6GFnrZ7-Cki4Deww.js +0 -7
  72. package/dist/assets/journeyDiagram-c64418c1-daS1W8qe-BNPtXbHr.js +0 -139
  73. package/dist/assets/layout-LXMv3mSS-Y67qlTVT.js +0 -1
  74. package/dist/assets/mindmap-definition-8da855dc-DmNQYVT1-DTzRqC2x.js +0 -425
  75. package/dist/assets/pieDiagram-a8764435-381urBY5-BhhVYaft.js +0 -35
  76. package/dist/assets/quadrantDiagram-1e28029f-hgRmK2bX-UfmuMa3v.js +0 -7
  77. package/dist/assets/requirementDiagram-08caed73-BB0Q-cI9-DwSrK8CT.js +0 -52
  78. package/dist/assets/sankeyDiagram-a04cb91d-BpsipZNt-CK3vlM3e.js +0 -8
  79. package/dist/assets/sequenceDiagram-c5b8d532-xoAvPcQJ-DTwebeTQ.js +0 -122
  80. package/dist/assets/stateDiagram-1ecb1508-b721R49K-CEYsxSXw.js +0 -1
  81. package/dist/assets/stateDiagram-v2-c2b004d7-BmSbrbqZ-CFOTq05F.js +0 -1
  82. package/dist/assets/styles-b4e223ce-TYmJC5IN-D3PIGnZK.js +0 -160
  83. package/dist/assets/styles-ca3715f6-CfJZu0Yn-DF9IC26s.js +0 -207
  84. package/dist/assets/styles-d45a18b0-DZ8oSYcV-CwTN_cwl.js +0 -116
  85. package/dist/assets/svgDrawCommon-b86b1483-CXPkN8HW-DkWtBwlM.js +0 -1
  86. package/dist/assets/timeline-definition-faaaa080-LDFf1jfb-CrJhn17D.js +0 -61
  87. package/dist/assets/xychartDiagram-f5964ef8-DdhO5-Bp-By6MFGsG.js +0 -7
@@ -0,0 +1,2 @@
1
+ import{R as e,O as s,am as i,B as n,an as d}from"./index-Dwfg9sR1.js";import{N as p}from"./treemap-KMMF4GRG-Dfxm7cSf-Dp6bDrrM.js";import"./_baseUniq-DRc_T5HB-BsnuNSgv.js";import"./_basePickBy-BjEly54R-XZ-uT-Uj.js";import"./clone-DduvFCk3-BjQT37Sj.js";var m={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},g={version:d.version+""},v=e(()=>g.version,"getVersion"),c={getVersion:v},f=e((r,a,o)=>{s.debug(`rendering info diagram
2
+ `+r);const t=i(a);n(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),x={draw:f},N={parser:m,db:c,renderer:x};export{N as diagram};
@@ -0,0 +1,139 @@
1
+ import{d as ft,y as rt,g as gt,x as mt}from"./chunk-TZMSLE5B-CNFsEzOl-DVds0hZJ.js";import{l as xt}from"./chunk-FMBD7UC4-Bm0ev8jq-DBEEbKOi.js";import{R as s,u as kt,f as _t,l as bt,s as wt,o as $t,n as vt,c as V,e as X,B as St,t as Mt}from"./index-Dwfg9sR1.js";import{h as tt}from"./arc-CZCQSTaI-C-VU_J9B.js";var U=function(){var t=s(function(y,i,a,u){for(a=a||{},u=y.length;u--;a[y[u]]=i);return a},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],l=[1,10],n=[1,11],c=[1,12],d=[1,13],h=[1,14],f={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(y,i,a,u,p,o,x){var k=o.length-1;switch(p){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:u.addTask(o[k-1],o[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:l,14:n,16:c,17:d,18:h},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:l,14:n,16:c,17:d,18:h},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(y,i){if(i.recoverable)this.trace(y);else{var a=new Error(y);throw a.hash=i,a}},"parseError"),parse:s(function(y){var i=this,a=[0],u=[],p=[null],o=[],x=this.table,k="",T=0,A=0,ut=2,Z=1,pt=o.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(I.yy[Y]=this.yy[Y]);_.setInput(y,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var z=_.yylloc;o.push(z);var yt=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function dt(w){a.length=a.length-2*w,p.length=p.length-w,o.length=o.length-w}s(dt,"popStack");function J(){var w;return w=u.pop()||_.lex()||Z,typeof w!="number"&&(w instanceof Array&&(u=w,w=u.pop()),w=i.symbols_[w]||w),w}s(J,"lex");for(var b,P,$,W,j={},D,M,H,O;;){if(P=a[a.length-1],this.defaultActions[P]?$=this.defaultActions[P]:((b===null||typeof b>"u")&&(b=J()),$=x[P]&&x[P][b]),typeof $>"u"||!$.length||!$[0]){var G="";O=[];for(D in x[P])this.terminals_[D]&&D>ut&&O.push("'"+this.terminals_[D]+"'");_.showPosition?G="Parse error on line "+(T+1)+`:
2
+ `+_.showPosition()+`
3
+ Expecting `+O.join(", ")+", got '"+(this.terminals_[b]||b)+"'":G="Parse error on line "+(T+1)+": Unexpected "+(b==Z?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(G,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:z,expected:O})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+b);switch($[0]){case 1:a.push(b),p.push(_.yytext),o.push(_.yylloc),a.push($[1]),b=null,A=_.yyleng,k=_.yytext,T=_.yylineno,z=_.yylloc;break;case 2:if(M=this.productions_[$[1]][1],j.$=p[p.length-M],j._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},yt&&(j._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),W=this.performAction.apply(j,[k,A,T,I.yy,$[1],p,o].concat(pt)),typeof W<"u")return W;M&&(a=a.slice(0,-1*M*2),p=p.slice(0,-1*M),o=o.slice(0,-1*M)),a.push(this.productions_[$[1]][0]),p.push(j.$),o.push(j._$),H=x[a[a.length-2]][a[a.length-1]],a.push(H);break;case 3:return!0}}return!0},"parse")},m=function(){var y={EOF:1,parseError:s(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,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:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,u=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=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),u.length-1&&(this.yylineno-=u.length-1);var o=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:u?(u.length===p.length?this.yylloc.first_column:0)+p[p.length-u.length].length-u[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
+ `+a+"^"},"showPosition"),test_match:s(function(i,a){var u,p,o;if(this.options.backtrack_lexer&&(o={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&&(o.yylloc.range=this.yylloc.range.slice(0))),p=i[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],u=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var x in o)this[x]=o[x];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,u,p;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),x=0;x<o.length;x++)if(u=this._input.match(this.rules[o[x]]),u&&(!a||u[0].length>a[0].length)){if(a=u,p=x,this.options.backtrack_lexer){if(i=this.test_match(u,o[x]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,o[p]),i!==!1?i:!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:s(function(){var i=this.next();return i||this.lex()},"lex"),begin:s(function(i){this.conditionStack.push(i)},"begin"),popState:s(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:s(function(i){this.begin(i)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(i,a,u,p){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;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:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return y}();f.lexer=m;function g(){this.yy={}}return s(g,"Parser"),g.prototype=f,f.Parser=g,new g}();U.parser=U;var Ct=U,B="",K=[],L=[],R=[],Et=s(function(){K.length=0,L.length=0,B="",R.length=0,Mt()},"clear"),Tt=s(function(t){B=t,K.push(t)},"addSection"),It=s(function(){return K},"getSections"),Pt=s(function(){let t=et();const e=100;let r=0;for(;!t&&r<e;)t=et(),r++;return L.push(...R),L},"getTasks"),At=s(function(){const t=[];return L.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),jt=s(function(t,e){const r=e.substr(1).split(":");let l=0,n=[];r.length===1?(l=Number(r[0]),n=[]):(l=Number(r[0]),n=r[1].split(","));const c=n.map(h=>h.trim()),d={section:B,type:B,people:c,task:t,score:l};R.push(d)},"addTask"),Bt=s(function(t){const e={section:B,type:B,description:t,task:t,classes:[]};L.push(e)},"addTaskOrg"),et=s(function(){const t=s(function(r){return R[r].processed},"compileTask");let e=!0;for(const[r,l]of R.entries())t(r),e=e&&l.processed;return e},"compileTasks"),Vt=s(function(){return At()},"getActors"),it={getConfig:s(()=>V().journey,"getConfig"),clear:Et,setDiagramTitle:vt,getDiagramTitle:$t,setAccTitle:wt,getAccTitle:bt,setAccDescription:_t,getAccDescription:kt,addSection:Tt,getSections:It,getTasks:Pt,addTask:jt,addTaskOrg:Bt,getActors:Vt},Lt=s(t=>`.label {
7
+ font-family: ${t.fontFamily};
8
+ color: ${t.textColor};
9
+ }
10
+ .mouth {
11
+ stroke: #666;
12
+ }
13
+
14
+ line {
15
+ stroke: ${t.textColor}
16
+ }
17
+
18
+ .legend {
19
+ fill: ${t.textColor};
20
+ font-family: ${t.fontFamily};
21
+ }
22
+
23
+ .label text {
24
+ fill: #333;
25
+ }
26
+ .label {
27
+ color: ${t.textColor}
28
+ }
29
+
30
+ .face {
31
+ ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
32
+ stroke: #999;
33
+ }
34
+
35
+ .node rect,
36
+ .node circle,
37
+ .node ellipse,
38
+ .node polygon,
39
+ .node path {
40
+ fill: ${t.mainBkg};
41
+ stroke: ${t.nodeBorder};
42
+ stroke-width: 1px;
43
+ }
44
+
45
+ .node .label {
46
+ text-align: center;
47
+ }
48
+ .node.clickable {
49
+ cursor: pointer;
50
+ }
51
+
52
+ .arrowheadPath {
53
+ fill: ${t.arrowheadColor};
54
+ }
55
+
56
+ .edgePath .path {
57
+ stroke: ${t.lineColor};
58
+ stroke-width: 1.5px;
59
+ }
60
+
61
+ .flowchart-link {
62
+ stroke: ${t.lineColor};
63
+ fill: none;
64
+ }
65
+
66
+ .edgeLabel {
67
+ background-color: ${t.edgeLabelBackground};
68
+ rect {
69
+ opacity: 0.5;
70
+ }
71
+ text-align: center;
72
+ }
73
+
74
+ .cluster rect {
75
+ }
76
+
77
+ .cluster text {
78
+ fill: ${t.titleColor};
79
+ }
80
+
81
+ div.mermaidTooltip {
82
+ position: absolute;
83
+ text-align: center;
84
+ max-width: 200px;
85
+ padding: 2px;
86
+ font-family: ${t.fontFamily};
87
+ font-size: 12px;
88
+ background: ${t.tertiaryColor};
89
+ border: 1px solid ${t.border2};
90
+ border-radius: 2px;
91
+ pointer-events: none;
92
+ z-index: 100;
93
+ }
94
+
95
+ .task-type-0, .section-type-0 {
96
+ ${t.fillType0?`fill: ${t.fillType0}`:""};
97
+ }
98
+ .task-type-1, .section-type-1 {
99
+ ${t.fillType0?`fill: ${t.fillType1}`:""};
100
+ }
101
+ .task-type-2, .section-type-2 {
102
+ ${t.fillType0?`fill: ${t.fillType2}`:""};
103
+ }
104
+ .task-type-3, .section-type-3 {
105
+ ${t.fillType0?`fill: ${t.fillType3}`:""};
106
+ }
107
+ .task-type-4, .section-type-4 {
108
+ ${t.fillType0?`fill: ${t.fillType4}`:""};
109
+ }
110
+ .task-type-5, .section-type-5 {
111
+ ${t.fillType0?`fill: ${t.fillType5}`:""};
112
+ }
113
+ .task-type-6, .section-type-6 {
114
+ ${t.fillType0?`fill: ${t.fillType6}`:""};
115
+ }
116
+ .task-type-7, .section-type-7 {
117
+ ${t.fillType0?`fill: ${t.fillType7}`:""};
118
+ }
119
+
120
+ .actor-0 {
121
+ ${t.actor0?`fill: ${t.actor0}`:""};
122
+ }
123
+ .actor-1 {
124
+ ${t.actor1?`fill: ${t.actor1}`:""};
125
+ }
126
+ .actor-2 {
127
+ ${t.actor2?`fill: ${t.actor2}`:""};
128
+ }
129
+ .actor-3 {
130
+ ${t.actor3?`fill: ${t.actor3}`:""};
131
+ }
132
+ .actor-4 {
133
+ ${t.actor4?`fill: ${t.actor4}`:""};
134
+ }
135
+ .actor-5 {
136
+ ${t.actor5?`fill: ${t.actor5}`:""};
137
+ }
138
+ ${xt()}
139
+ `,"getStyles"),Rt=Lt,Q=s(function(t,e){return mt(t,e)},"drawRect"),Ft=s(function(t,e){const r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),l=t.append("g");l.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),l.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function n(h){const f=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(n,"smile");function c(h){const f=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(c,"sad");function d(h){h.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(d,"ambivalent"),e.score>3?n(l):e.score<3?c(l):d(l),r},"drawFace"),ot=s(function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),lt=s(function(t,e){return gt(t,e)},"drawText"),Dt=s(function(t,e){function r(n,c,d,h,f){return n+","+c+" "+(n+d)+","+c+" "+(n+d)+","+(c+h-f)+" "+(n+d-f*1.2)+","+(c+h)+" "+n+","+(c+h)}s(r,"genPoints");const l=t.append("polygon");l.attr("points",r(e.x,e.y,50,20,7)),l.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,lt(t,e)},"drawLabel"),Ot=s(function(t,e,r){const l=t.append("g"),n=rt();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,Q(l,n),ct(r)(e.text,l,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),nt=-1,Nt=s(function(t,e,r){const l=e.x+r.width/2,n=t.append("g");nt++,n.append("line").attr("id","task"+nt).attr("x1",l).attr("y1",e.y).attr("x2",l).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Ft(n,{cx:l,cy:300+(5-e.score)*30,score:e.score});const c=rt();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=r.width,c.height=r.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,Q(n,c);let d=e.x+14;e.people.forEach(h=>{const f=e.actors[h].color,m={cx:d,cy:e.y,r:7,fill:f,stroke:"#000",title:h,pos:e.actors[h].position};ot(n,m),d+=10}),ct(r)(e.task,n,c.x,c.y,c.width,c.height,{class:"task"},r,e.colour)},"drawTask"),Yt=s(function(t,e){ft(t,e)},"drawBackgroundRect"),ct=function(){function t(n,c,d,h,f,m,g,y){const i=c.append("text").attr("x",d+f/2).attr("y",h+m/2+5).style("font-color",y).style("text-anchor","middle").text(n);l(i,g)}s(t,"byText");function e(n,c,d,h,f,m,g,y,i){const{taskFontSize:a,taskFontFamily:u}=y,p=n.split(/<br\s*\/?>/gi);for(let o=0;o<p.length;o++){const x=o*a-a*(p.length-1)/2,k=c.append("text").attr("x",d+f/2).attr("y",h).attr("fill",i).style("text-anchor","middle").style("font-size",a).style("font-family",u);k.append("tspan").attr("x",d+f/2).attr("dy",x).text(p[o]),k.attr("y",h+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(k,g)}}s(e,"byTspan");function r(n,c,d,h,f,m,g,y){const i=c.append("switch"),a=i.append("foreignObject").attr("x",d).attr("y",h).attr("width",f).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");a.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,i,d,h,f,m,g,y),l(a,g)}s(r,"byFo");function l(n,c){for(const d in c)d in c&&n.attr(d,c[d])}return s(l,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),zt=s(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),F={drawRect:Q,drawCircle:ot,drawSection:Ot,drawText:lt,drawLabel:Dt,drawTask:Nt,drawBackgroundRect:Yt,initGraphics:zt},Wt=s(function(t){Object.keys(t).forEach(function(e){S[e]=t[e]})},"setConf"),C={},N=0;function ht(t){const e=V().journey,r=e.maxLabelWidth;N=0;let l=60;Object.keys(C).forEach(n=>{const c=C[n].color,d={cx:20,cy:l,r:7,fill:c,stroke:"#000",pos:C[n].position};F.drawCircle(t,d);let h=t.append("text").attr("visibility","hidden").text(n);const f=h.node().getBoundingClientRect().width;h.remove();let m=[];if(f<=r)m=[n];else{const g=n.split(" ");let y="";h=t.append("text").attr("visibility","hidden"),g.forEach(i=>{const a=y?`${y} ${i}`:i;if(h.text(a),h.node().getBoundingClientRect().width>r){if(y&&m.push(y),y=i,h.text(i),h.node().getBoundingClientRect().width>r){let u="";for(const p of i)u+=p,h.text(u+"-"),h.node().getBoundingClientRect().width>r&&(m.push(u.slice(0,-1)+"-"),u=p);y=u}}else y=a}),y&&m.push(y),h.remove()}m.forEach((g,y)=>{const i={x:40,y:l+7+y*20,fill:"#666",text:g,textMargin:e.boxTextMargin??5},a=F.drawText(t,i).node().getBoundingClientRect().width;a>N&&a>e.leftMargin-a&&(N=a)}),l+=Math.max(20,m.length*20)})}s(ht,"drawActorLegend");var S=V().journey,E=0,Gt=s(function(t,e,r,l){const n=V(),c=n.journey.titleColor,d=n.journey.titleFontSize,h=n.journey.titleFontFamily,f=n.securityLevel;let m;f==="sandbox"&&(m=X("#i"+e));const g=f==="sandbox"?X(m.nodes()[0].contentDocument.body):X("body");v.init();const y=g.select("#"+e);F.initGraphics(y);const i=l.db.getTasks(),a=l.db.getDiagramTitle(),u=l.db.getActors();for(const A in C)delete C[A];let p=0;u.forEach(A=>{C[A]={color:S.actorColours[p%S.actorColours.length],position:p},p++}),ht(y),E=S.leftMargin+N,v.insert(0,0,E,Object.keys(C).length*50),Xt(y,i,0);const o=v.getBounds();a&&y.append("text").text(a).attr("x",E).attr("font-size",d).attr("font-weight","bold").attr("y",25).attr("fill",c).attr("font-family",h);const x=o.stopy-o.starty+2*S.diagramMarginY,k=E+o.stopx+2*S.diagramMarginX;St(y,x,k,S.useMaxWidth),y.append("line").attr("x1",E).attr("y1",S.height*4).attr("x2",k-E-4).attr("y2",S.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const T=a?70:0;y.attr("viewBox",`${o.startx} -25 ${k} ${x+T}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",x+T+25)},"draw"),v={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,r,l){t[e]===void 0?t[e]=r:t[e]=l(r,t[e])},"updateVal"),updateBounds:s(function(t,e,r,l){const n=V().journey,c=this;let d=0;function h(f){return s(function(m){d++;const g=c.sequenceItems.length-d+1;c.updateVal(m,"starty",e-g*n.boxMargin,Math.min),c.updateVal(m,"stopy",l+g*n.boxMargin,Math.max),c.updateVal(v.data,"startx",t-g*n.boxMargin,Math.min),c.updateVal(v.data,"stopx",r+g*n.boxMargin,Math.max),f!=="activation"&&(c.updateVal(m,"startx",t-g*n.boxMargin,Math.min),c.updateVal(m,"stopx",r+g*n.boxMargin,Math.max),c.updateVal(v.data,"starty",e-g*n.boxMargin,Math.min),c.updateVal(v.data,"stopy",l+g*n.boxMargin,Math.max))},"updateItemBounds")}s(h,"updateFn"),this.sequenceItems.forEach(h())},"updateBounds"),insert:s(function(t,e,r,l){const n=Math.min(t,r),c=Math.max(t,r),d=Math.min(e,l),h=Math.max(e,l);this.updateVal(v.data,"startx",n,Math.min),this.updateVal(v.data,"starty",d,Math.min),this.updateVal(v.data,"stopx",c,Math.max),this.updateVal(v.data,"stopy",h,Math.max),this.updateBounds(n,d,c,h)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},q=S.sectionFills,st=S.sectionColours,Xt=s(function(t,e,r){const l=V().journey;let n="";const c=l.height*2+l.diagramMarginY,d=r+c;let h=0,f="#CCC",m="black",g=0;for(const[y,i]of e.entries()){if(n!==i.section){f=q[h%q.length],g=h%q.length,m=st[h%st.length];let u=0;const p=i.section;for(let x=y;x<e.length&&e[x].section==p;x++)u=u+1;const o={x:y*l.taskMargin+y*l.width+E,y:50,text:i.section,fill:f,num:g,colour:m,taskCount:u};F.drawSection(t,o,l),n=i.section,h++}const a=i.people.reduce((u,p)=>(C[p]&&(u[p]=C[p]),u),{});i.x=y*l.taskMargin+y*l.width+E,i.y=d,i.width=l.diagramMarginX,i.height=l.diagramMarginY,i.colour=m,i.fill=f,i.num=g,i.actors=a,F.drawTask(t,i,l),v.insert(i.x,i.y,i.x+i.width+l.taskMargin,450)}},"drawTasks"),at={setConf:Wt,draw:Gt},Zt={parser:Ct,db:it,renderer:at,styles:Rt,init:s(t=>{at.setConf(t.journey),it.clear()},"init")};export{Zt as diagram};
@@ -0,0 +1,89 @@
1
+ import{R as a,O as ee,c as W,am as pe,b as ye,m as fe,Y as me,aT as be,M as K,w as G,v as _e,y as Ee,aU as Se,aV as ae,aW as le}from"./index-Dwfg9sR1.js";import{l as ke}from"./chunk-FMBD7UC4-Bm0ev8jq-DBEEbKOi.js";var Q=function(){var i=a(function(k,e,n,r){for(n=n||{},r=k.length;r--;n[k[r]]=e);return n},"o"),u=[1,4],d=[1,13],s=[1,12],g=[1,15],D=[1,16],S=[1,20],h=[1,19],O=[6,7,8],b=[1,26],_=[1,24],C=[1,25],o=[6,7,11],M=[1,31],w=[6,7,11,24],T=[1,6,13,16,17,20,23],$=[1,35],H=[1,36],I=[1,6,7,11,13,16,17,20,23],U=[1,38],y={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},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,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:a(function(k,e,n,r,c,t,m){var l=t.length-1;switch(c){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",t[l-1].id),r.addNode(t[l-2].length,t[l-1].id,t[l-1].descr,t[l-1].type,t[l]);break;case 16:r.getLogger().info("Node: ",t[l].id),r.addNode(t[l-1].length,t[l].id,t[l].descr,t[l].type);break;case 17:r.getLogger().trace("Icon: ",t[l]),r.decorateNode({icon:t[l]});break;case 18:case 23:r.decorateNode({class:t[l]});break;case 19:r.getLogger().trace("SPACELIST");break;case 20:r.getLogger().trace("Node: ",t[l-1].id),r.addNode(0,t[l-1].id,t[l-1].descr,t[l-1].type,t[l]);break;case 21:r.getLogger().trace("Node: ",t[l].id),r.addNode(0,t[l].id,t[l].descr,t[l].type);break;case 22:r.decorateNode({icon:t[l]});break;case 27:r.getLogger().trace("node found ..",t[l-2]),this.$={id:t[l-1],descr:t[l-1],type:r.getType(t[l-2],t[l])};break;case 28:this.$={id:t[l],descr:t[l],type:0};break;case 29:r.getLogger().trace("node found ..",t[l-3]),this.$={id:t[l-3],descr:t[l-1],type:r.getType(t[l-2],t[l])};break;case 30:this.$=t[l-1]+t[l];break;case 31:this.$=t[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:u},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:u},{6:d,7:[1,10],9:9,12:11,13:s,14:14,16:g,17:D,18:17,19:18,20:S,23:h},i(O,[2,3]),{1:[2,2]},i(O,[2,4]),i(O,[2,5]),{1:[2,6],6:d,12:21,13:s,14:14,16:g,17:D,18:17,19:18,20:S,23:h},{6:d,9:22,12:11,13:s,14:14,16:g,17:D,18:17,19:18,20:S,23:h},{6:b,7:_,10:23,11:C},i(o,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:S,23:h}),i(o,[2,19]),i(o,[2,21],{15:30,24:M}),i(o,[2,22]),i(o,[2,23]),i(w,[2,25]),i(w,[2,26]),i(w,[2,28],{20:[1,32]}),{21:[1,33]},{6:b,7:_,10:34,11:C},{1:[2,7],6:d,12:21,13:s,14:14,16:g,17:D,18:17,19:18,20:S,23:h},i(T,[2,14],{7:$,11:H}),i(I,[2,8]),i(I,[2,9]),i(I,[2,10]),i(o,[2,16],{15:37,24:M}),i(o,[2,17]),i(o,[2,18]),i(o,[2,20],{24:U}),i(w,[2,31]),{21:[1,39]},{22:[1,40]},i(T,[2,13],{7:$,11:H}),i(I,[2,11]),i(I,[2,12]),i(o,[2,15],{24:U}),i(w,[2,30]),{22:[1,41]},i(w,[2,27]),i(w,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:a(function(k,e){if(e.recoverable)this.trace(k);else{var n=new Error(k);throw n.hash=e,n}},"parseError"),parse:a(function(k){var e=this,n=[0],r=[],c=[null],t=[],m=this.table,l="",F=0,ne=0,he=2,se=1,ue=t.slice.call(arguments,1),f=Object.create(this.lexer),P={yy:{}};for(var q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,q)&&(P.yy[q]=this.yy[q]);f.setInput(k,P.yy),P.yy.lexer=f,P.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var X=f.yylloc;t.push(X);var ge=f.options&&f.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function de(N){n.length=n.length-2*N,c.length=c.length-N,t.length=t.length-N}a(de,"popStack");function re(){var N;return N=r.pop()||f.lex()||se,typeof N!="number"&&(N instanceof Array&&(r=N,N=r.pop()),N=e.symbols_[N]||N),N}a(re,"lex");for(var E,B,x,Y,j={},z,A,oe,V;;){if(B=n[n.length-1],this.defaultActions[B]?x=this.defaultActions[B]:((E===null||typeof E>"u")&&(E=re()),x=m[B]&&m[B][E]),typeof x>"u"||!x.length||!x[0]){var J="";V=[];for(z in m[B])this.terminals_[z]&&z>he&&V.push("'"+this.terminals_[z]+"'");f.showPosition?J="Parse error on line "+(F+1)+`:
2
+ `+f.showPosition()+`
3
+ Expecting `+V.join(", ")+", got '"+(this.terminals_[E]||E)+"'":J="Parse error on line "+(F+1)+": Unexpected "+(E==se?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(J,{text:f.match,token:this.terminals_[E]||E,line:f.yylineno,loc:X,expected:V})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+E);switch(x[0]){case 1:n.push(E),c.push(f.yytext),t.push(f.yylloc),n.push(x[1]),E=null,ne=f.yyleng,l=f.yytext,F=f.yylineno,X=f.yylloc;break;case 2:if(A=this.productions_[x[1]][1],j.$=c[c.length-A],j._$={first_line:t[t.length-(A||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(A||1)].first_column,last_column:t[t.length-1].last_column},ge&&(j._$.range=[t[t.length-(A||1)].range[0],t[t.length-1].range[1]]),Y=this.performAction.apply(j,[l,ne,F,P.yy,x[1],c,t].concat(ue)),typeof Y<"u")return Y;A&&(n=n.slice(0,-1*A*2),c=c.slice(0,-1*A),t=t.slice(0,-1*A)),n.push(this.productions_[x[1]][0]),c.push(j.$),t.push(j._$),oe=m[n[n.length-2]][n[n.length-1]],n.push(oe);break;case 3:return!0}}return!0},"parse")},R=function(){var k={EOF:1,parseError:a(function(e,n){if(this.yy.parser)this.yy.parser.parseError(e,n);else throw new Error(e)},"parseError"),setInput:a(function(e,n){return this.yy=n||this.yy||{},this._input=e,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:a(function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var n=e.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:a(function(e){var n=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),r.length-1&&(this.yylineno-=r.length-1);var t=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:r?(r.length===c.length?this.yylloc.first_column:0)+c[c.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[t[0],t[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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:a(function(e){this.unput(this.match.slice(e))},"less"),pastInput:a(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var e=this.pastInput(),n=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
5
+ `+n+"^"},"showPosition"),test_match:a(function(e,n){var r,c,t;if(this.options.backtrack_lexer&&(t={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&&(t.yylloc.range=this.yylloc.range.slice(0))),c=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var m in t)this[m]=t[m];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,n,r,c;this._more||(this.yytext="",this.match="");for(var t=this._currentRules(),m=0;m<t.length;m++)if(r=this._input.match(this.rules[t[m]]),r&&(!n||r[0].length>n[0].length)){if(n=r,c=m,this.options.backtrack_lexer){if(e=this.test_match(r,t[m]),e!==!1)return e;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(e=this.test_match(n,t[c]),e!==!1?e:!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:a(function(){var e=this.next();return e||this.lex()},"lex"),begin:a(function(e){this.conditionStack.push(e)},"begin"),popState:a(function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:a(function(e){this.begin(e)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(e,n,r,c){switch(r){case 0:return this.pushState("shapeData"),n.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const t=/\n\s*/g;return n.yytext=n.yytext.replace(t,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace("Found comment",n.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",n.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",n.yytext),"NODE_DEND";case 36:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 41:return e.getLogger().trace("Long description:",n.yytext),21;case 42:return e.getLogger().trace("Long description:",n.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\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:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return k}();y.lexer=R;function v(){this.yy={}}return a(v,"Parser"),v.prototype=y,y.Parser=v,new v}();Q.parser=Q;var Ne=Q,L=[],te=[],Z=0,ie={},De=a(()=>{L=[],te=[],Z=0,ie={}},"clear"),xe=a(i=>{if(L.length===0)return null;const u=L[0].level;let d=null;for(let s=L.length-1;s>=0;s--)if(L[s].level===u&&!d&&(d=L[s]),L[s].level<u)throw new Error('Items without section detected, found section ("'+L[s].label+'")');return i===(d==null?void 0:d.level)?null:d},"getSection"),ce=a(function(){return te},"getSections"),Le=a(function(){const i=[],u=[],d=ce(),s=W();for(const g of d){const D={id:g.id,label:G(g.label??"",s),isGroup:!0,ticket:g.ticket,shape:"kanbanSection",level:g.level,look:s.look};u.push(D);const S=L.filter(h=>h.parentId===g.id);for(const h of S){const O={id:h.id,parentId:g.id,label:G(h.label??"",s),isGroup:!1,ticket:h==null?void 0:h.ticket,priority:h==null?void 0:h.priority,assigned:h==null?void 0:h.assigned,icon:h==null?void 0:h.icon,shape:"kanbanItem",level:h.level,rx:5,ry:5,cssStyles:["text-align: left"]};u.push(O)}}return{nodes:u,edges:i,other:{},config:W()}},"getData"),Oe=a((i,u,d,s,g)=>{var D,S;const h=W();let O=((D=h.mindmap)==null?void 0:D.padding)??K.mindmap.padding;switch(s){case p.ROUNDED_RECT:case p.RECT:case p.HEXAGON:O*=2}const b={id:G(u,h)||"kbn"+Z++,level:i,label:G(d,h),width:((S=h.mindmap)==null?void 0:S.maxNodeWidth)??K.mindmap.maxNodeWidth,padding:O,isGroup:!1};if(g!==void 0){let C;g.includes(`
7
+ `)?C=g+`
8
+ `:C=`{
9
+ `+g+`
10
+ }`;const o=_e(C,{schema:Ee});if(o.shape&&(o.shape!==o.shape.toLowerCase()||o.shape.includes("_")))throw new Error(`No such shape: ${o.shape}. Shape names should be lowercase.`);o!=null&&o.shape&&o.shape==="kanbanItem"&&(b.shape=o==null?void 0:o.shape),o!=null&&o.label&&(b.label=o==null?void 0:o.label),o!=null&&o.icon&&(b.icon=o==null?void 0:o.icon.toString()),o!=null&&o.assigned&&(b.assigned=o==null?void 0:o.assigned.toString()),o!=null&&o.ticket&&(b.ticket=o==null?void 0:o.ticket.toString()),o!=null&&o.priority&&(b.priority=o==null?void 0:o.priority)}const _=xe(i);_?b.parentId=_.id||"kbn"+Z++:te.push(b),L.push(b)},"addNode"),p={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ve=a((i,u)=>{switch(ee.debug("In get type",i,u),i){case"[":return p.RECT;case"(":return u===")"?p.ROUNDED_RECT:p.CLOUD;case"((":return p.CIRCLE;case")":return p.CLOUD;case"))":return p.BANG;case"{{":return p.HEXAGON;default:return p.DEFAULT}},"getType"),Ce=a((i,u)=>{ie[i]=u},"setElementForId"),we=a(i=>{if(!i)return;const u=W(),d=L[L.length-1];i.icon&&(d.icon=G(i.icon,u)),i.class&&(d.cssClasses=G(i.class,u))},"decorateNode"),Ie=a(i=>{switch(i){case p.DEFAULT:return"no-border";case p.RECT:return"rect";case p.ROUNDED_RECT:return"rounded-rect";case p.CIRCLE:return"circle";case p.CLOUD:return"cloud";case p.BANG:return"bang";case p.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Ae=a(()=>ee,"getLogger"),Te=a(i=>ie[i],"getElementById"),$e={clear:De,addNode:Oe,getSections:ce,getData:Le,nodeType:p,getType:ve,setElementForId:Ce,decorateNode:we,type2Str:Ie,getLogger:Ae,getElementById:Te},Re=$e,Pe=a(async(i,u,d,s)=>{var g,D,S,h,O;ee.debug(`Rendering kanban diagram
11
+ `+i);const b=s.db.getData(),_=W();_.htmlLabels=!1;const C=pe(u),o=C.append("g");o.attr("class","sections");const M=C.append("g");M.attr("class","items");const w=b.nodes.filter(y=>y.isGroup);let T=0;const $=10,H=[];let I=25;for(const y of w){const R=((g=_==null?void 0:_.kanban)==null?void 0:g.sectionWidth)||200;T=T+1,y.x=R*T+(T-1)*$/2,y.width=R,y.y=0,y.height=R*3,y.rx=5,y.ry=5,y.cssClasses=y.cssClasses+" section-"+T;const v=await ye(o,y);I=Math.max(I,(D=v==null?void 0:v.labelBBox)==null?void 0:D.height),H.push(v)}let U=0;for(const y of w){const R=H[U];U=U+1;const v=((S=_==null?void 0:_.kanban)==null?void 0:S.sectionWidth)||200,k=-v*3/2+I;let e=k;const n=b.nodes.filter(t=>t.parentId===y.id);for(const t of n){if(t.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");t.x=y.x,t.width=v-1.5*$;const m=(await fe(M,t,{config:_})).node().getBBox();t.y=e+m.height/2,await me(t),e=t.y+m.height/2+$/2}const r=R.cluster.select("rect"),c=Math.max(e-k+3*$,50)+(I-25);r.attr("height",c)}be(void 0,C,((h=_.mindmap)==null?void 0:h.padding)??K.kanban.padding,((O=_.mindmap)==null?void 0:O.useMaxWidth)??K.kanban.useMaxWidth)},"draw"),Be={draw:Pe},Ue=a(i=>{let u="";for(let s=0;s<i.THEME_COLOR_LIMIT;s++)i["lineColor"+s]=i["lineColor"+s]||i["cScaleInv"+s],Se(i["lineColor"+s])?i["lineColor"+s]=ae(i["lineColor"+s],20):i["lineColor"+s]=le(i["lineColor"+s],20);const d=a((s,g)=>i.darkMode?le(s,g):ae(s,g),"adjuster");for(let s=0;s<i.THEME_COLOR_LIMIT;s++){const g=""+(17-3*s);u+=`
12
+ .section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {
13
+ fill: ${d(i["cScale"+s],10)};
14
+ stroke: ${d(i["cScale"+s],10)};
15
+
16
+ }
17
+ .section-${s-1} text {
18
+ fill: ${i["cScaleLabel"+s]};
19
+ }
20
+ .node-icon-${s-1} {
21
+ font-size: 40px;
22
+ color: ${i["cScaleLabel"+s]};
23
+ }
24
+ .section-edge-${s-1}{
25
+ stroke: ${i["cScale"+s]};
26
+ }
27
+ .edge-depth-${s-1}{
28
+ stroke-width: ${g};
29
+ }
30
+ .section-${s-1} line {
31
+ stroke: ${i["cScaleInv"+s]} ;
32
+ stroke-width: 3;
33
+ }
34
+
35
+ .disabled, .disabled circle, .disabled text {
36
+ fill: lightgray;
37
+ }
38
+ .disabled text {
39
+ fill: #efefef;
40
+ }
41
+
42
+ .node rect,
43
+ .node circle,
44
+ .node ellipse,
45
+ .node polygon,
46
+ .node path {
47
+ fill: ${i.background};
48
+ stroke: ${i.nodeBorder};
49
+ stroke-width: 1px;
50
+ }
51
+
52
+ .kanban-ticket-link {
53
+ fill: ${i.background};
54
+ stroke: ${i.nodeBorder};
55
+ text-decoration: underline;
56
+ }
57
+ `}return u},"genSections"),je=a(i=>`
58
+ .edge {
59
+ stroke-width: 3;
60
+ }
61
+ ${Ue(i)}
62
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
63
+ fill: ${i.git0};
64
+ }
65
+ .section-root text {
66
+ fill: ${i.gitBranchLabel0};
67
+ }
68
+ .icon-container {
69
+ height:100%;
70
+ display: flex;
71
+ justify-content: center;
72
+ align-items: center;
73
+ }
74
+ .edge {
75
+ fill: none;
76
+ }
77
+ .cluster-label, .label {
78
+ color: ${i.textColor};
79
+ fill: ${i.textColor};
80
+ }
81
+ .kanban-label {
82
+ dy: 1em;
83
+ alignment-baseline: middle;
84
+ text-anchor: middle;
85
+ dominant-baseline: middle;
86
+ text-align: center;
87
+ }
88
+ ${ke()}
89
+ `,"getStyles"),Ge=je,We={db:Re,renderer:Be,parser:Ne,styles:Ge};export{We as diagram};
@@ -0,0 +1 @@
1
+ import{L as m}from"./graph-ClfIprSM-BZwHPDDo.js";import{O as Mn,$ as s,b as $,y as Tn,L as H,E as x,S as b,l as hn,a as Sn,I as T,_ as L,m as Cn,c as gn,i as $n,N as nn}from"./_baseUniq-DRc_T5HB-BsnuNSgv.js";import{d as Gn,u as j,f as N,V as Fn,m as _,b as p,g as vn,t as ln,X as G,o as Vn,h as J,r as Bn}from"./_basePickBy-BjEly54R-XZ-uT-Uj.js";import{aE as Yn,aF as z,aG as A,aH as qn,aI as zn,aJ as pn,aK as wn,aL as An,aM as Dn,aN as Hn,aO as Jn,aP as Qn,aQ as Kn}from"./index-Dwfg9sR1.js";function Un(n){return qn(zn(n,void 0,N),n+"")}var Zn=1,Xn=4;function Wn(n){return Cn(n,Zn|Xn)}function nr(n,r){return n==null?n:Qn(n,gn(r),Kn)}function rr(n,r){return n&&hn(n,gn(r))}function er(n,r){return n>r}function S(n,r){var e={};return r=H(r),hn(n,function(t,o,i){Dn(e,o,r(t,o,i))}),e}function y(n){return n&&n.length?ln(n,wn,er):void 0}function Q(n,r){return n&&n.length?ln(n,H(r),Bn):void 0}function tr(n,r){var e=n.length;for(n.sort(r);e--;)n[e]=n[e].value;return n}function or(n,r){if(n!==r){var e=n!==void 0,t=n===null,o=n===n,i=nn(n),a=r!==void 0,u=r===null,d=r===r,c=nn(r);if(!u&&!c&&!i&&n>r||i&&a&&d&&!u&&!c||t&&a&&d||!e&&d||!o)return 1;if(!t&&!i&&!c&&n<r||c&&e&&o&&!t&&!i||u&&e&&o||!a&&o||!d)return-1}return 0}function ir(n,r,e){for(var t=-1,o=n.criteria,i=r.criteria,a=o.length,u=e.length;++t<a;){var d=or(o[t],i[t]);if(d){if(t>=u)return d;var c=e[t];return d*(c=="desc"?-1:1)}}return n.index-r.index}function ar(n,r,e){r.length?r=$(r,function(i){return pn(i)?function(a){return Tn(a,i.length===1?i[0]:i)}:i}):r=[wn];var t=-1;r=$(r,An(H));var o=Fn(n,function(i,a,u){var d=$(r,function(c){return c(i)});return{criteria:d,index:++t,value:i}});return tr(o,function(i,a){return ir(i,a,e)})}function ur(n,r){return Vn(n,r,function(e,t){return $n(n,t)})}var M=Un(function(n,r){return n==null?{}:ur(n,r)}),dr=Math.ceil,cr=Math.max;function sr(n,r,e,t){for(var o=-1,i=cr(dr((r-n)/(e||1)),0),a=Array(i);i--;)a[++o]=n,n+=e;return a}function fr(n){return function(r,e,t){return t&&typeof t!="number"&&z(r,e,t)&&(e=t=void 0),r=G(r),e===void 0?(e=r,r=0):e=G(e),t=t===void 0?r<e?1:-1:G(t),sr(r,e,t)}}var E=fr(),R=Yn(function(n,r){if(n==null)return[];var e=r.length;return e>1&&z(n,r[0],r[1])?r=[]:e>2&&z(r[0],r[1],r[2])&&(r=[r[0]]),ar(n,Mn(r),[])}),hr=0;function K(n){var r=++hr;return Sn(n)+r}function gr(n,r,e){for(var t=-1,o=n.length,i=r.length,a={};++t<o;){var u=t<i?r[t]:void 0;e(a,n[t],u)}return a}function vr(n,r){return gr(n||[],r||[],Jn)}class lr{constructor(){var r={};r._next=r._prev=r,this._sentinel=r}dequeue(){var r=this._sentinel,e=r._prev;if(e!==r)return rn(e),e}enqueue(r){var e=this._sentinel;r._prev&&r._next&&rn(r),r._next=e._next,e._next._prev=r,e._next=r,r._prev=e}toString(){for(var r=[],e=this._sentinel,t=e._prev;t!==e;)r.push(JSON.stringify(t,pr)),t=t._prev;return"["+r.join(", ")+"]"}}function rn(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function pr(n,r){if(n!=="_next"&&n!=="_prev")return r}var wr=Hn(1);function br(n,r){if(n.nodeCount()<=1)return[];var e=yr(n,r||wr),t=mr(e.graph,e.buckets,e.zeroIdx);return N(p(t,function(o){return n.outEdges(o.v,o.w)}))}function mr(n,r,e){for(var t=[],o=r[r.length-1],i=r[0],a;n.nodeCount();){for(;a=i.dequeue();)F(n,r,e,a);for(;a=o.dequeue();)F(n,r,e,a);if(n.nodeCount()){for(var u=r.length-2;u>0;--u)if(a=r[u].dequeue(),a){t=t.concat(F(n,r,e,a,!0));break}}}return t}function F(n,r,e,t,o){var i=o?[]:void 0;return s(n.inEdges(t.v),function(a){var u=n.edge(a),d=n.node(a.v);o&&i.push({v:a.v,w:a.w}),d.out-=u,D(r,e,d)}),s(n.outEdges(t.v),function(a){var u=n.edge(a),d=a.w,c=n.node(d);c.in-=u,D(r,e,c)}),n.removeNode(t.v),i}function yr(n,r){var e=new m,t=0,o=0;s(n.nodes(),function(u){e.setNode(u,{v:u,in:0,out:0})}),s(n.edges(),function(u){var d=e.edge(u.v,u.w)||0,c=r(u),f=d+c;e.setEdge(u.v,u.w,f),o=Math.max(o,e.node(u.v).out+=c),t=Math.max(t,e.node(u.w).in+=c)});var i=E(o+t+3).map(function(){return new lr}),a=t+1;return s(e.nodes(),function(u){D(i,a,e.node(u))}),{graph:e,buckets:i,zeroIdx:a}}function D(n,r,e){e.out?e.in?n[e.out-e.in+r].enqueue(e):n[n.length-1].enqueue(e):n[0].enqueue(e)}function kr(n){var r=n.graph().acyclicer==="greedy"?br(n,e(n)):xr(n);s(r,function(t){var o=n.edge(t);n.removeEdge(t),o.forwardName=t.name,o.reversed=!0,n.setEdge(t.w,t.v,o,K("rev"))});function e(t){return function(o){return t.edge(o).weight}}}function xr(n){var r=[],e={},t={};function o(i){Object.prototype.hasOwnProperty.call(t,i)||(t[i]=!0,e[i]=!0,s(n.outEdges(i),function(a){Object.prototype.hasOwnProperty.call(e,a.w)?r.push(a):o(a.w)}),delete e[i])}return s(n.nodes(),o),r}function Er(n){s(n.edges(),function(r){var e=n.edge(r);if(e.reversed){n.removeEdge(r);var t=e.forwardName;delete e.reversed,delete e.forwardName,n.setEdge(r.w,r.v,e,t)}})}function O(n,r,e,t){var o;do o=K(t);while(n.hasNode(o));return e.dummy=r,n.setNode(o,e),o}function Nr(n){var r=new m().setGraph(n.graph());return s(n.nodes(),function(e){r.setNode(e,n.node(e))}),s(n.edges(),function(e){var t=r.edge(e.v,e.w)||{weight:0,minlen:1},o=n.edge(e);r.setEdge(e.v,e.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),r}function bn(n){var r=new m({multigraph:n.isMultigraph()}).setGraph(n.graph());return s(n.nodes(),function(e){n.children(e).length||r.setNode(e,n.node(e))}),s(n.edges(),function(e){r.setEdge(e,n.edge(e))}),r}function en(n,r){var e=n.x,t=n.y,o=r.x-e,i=r.y-t,a=n.width/2,u=n.height/2;if(!o&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var d,c;return Math.abs(i)*a>Math.abs(o)*u?(i<0&&(u=-u),d=u*o/i,c=u):(o<0&&(a=-a),d=a,c=a*i/o),{x:e+d,y:t+c}}function C(n){var r=p(E(mn(n)+1),function(){return[]});return s(n.nodes(),function(e){var t=n.node(e),o=t.rank;b(o)||(r[o][t.order]=e)}),r}function Or(n){var r=_(p(n.nodes(),function(e){return n.node(e).rank}));s(n.nodes(),function(e){var t=n.node(e);vn(t,"rank")&&(t.rank-=r)})}function Ir(n){var r=_(p(n.nodes(),function(i){return n.node(i).rank})),e=[];s(n.nodes(),function(i){var a=n.node(i).rank-r;e[a]||(e[a]=[]),e[a].push(i)});var t=0,o=n.graph().nodeRankFactor;s(e,function(i,a){b(i)&&a%o!==0?--t:t&&s(i,function(u){n.node(u).rank+=t})})}function tn(n,r,e,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=e,o.order=t),O(n,"border",o,r)}function mn(n){return y(p(n.nodes(),function(r){var e=n.node(r).rank;if(!b(e))return e}))}function _r(n,r){var e={lhs:[],rhs:[]};return s(n,function(t){r(t)?e.lhs.push(t):e.rhs.push(t)}),e}function Pr(n,r){return r()}function Lr(n){function r(e){var t=n.children(e),o=n.node(e);if(t.length&&s(t,r),Object.prototype.hasOwnProperty.call(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,a=o.maxRank+1;i<a;++i)on(n,"borderLeft","_bl",e,o,i),on(n,"borderRight","_br",e,o,i)}}s(n.children(),r)}function on(n,r,e,t,o,i){var a={width:0,height:0,rank:i,borderType:r},u=o[r][i-1],d=O(n,"border",a,e);o[r][i]=d,n.setParent(d,t),u&&n.setEdge(u,d,{weight:1})}function Rr(n){var r=n.graph().rankdir.toLowerCase();(r==="lr"||r==="rl")&&yn(n)}function jr(n){var r=n.graph().rankdir.toLowerCase();(r==="bt"||r==="rl")&&Mr(n),(r==="lr"||r==="rl")&&(Tr(n),yn(n))}function yn(n){s(n.nodes(),function(r){an(n.node(r))}),s(n.edges(),function(r){an(n.edge(r))})}function an(n){var r=n.width;n.width=n.height,n.height=r}function Mr(n){s(n.nodes(),function(r){V(n.node(r))}),s(n.edges(),function(r){var e=n.edge(r);s(e.points,V),Object.prototype.hasOwnProperty.call(e,"y")&&V(e)})}function V(n){n.y=-n.y}function Tr(n){s(n.nodes(),function(r){B(n.node(r))}),s(n.edges(),function(r){var e=n.edge(r);s(e.points,B),Object.prototype.hasOwnProperty.call(e,"x")&&B(e)})}function B(n){var r=n.x;n.x=n.y,n.y=r}function Sr(n){n.graph().dummyChains=[],s(n.edges(),function(r){Cr(n,r)})}function Cr(n,r){var e=r.v,t=n.node(e).rank,o=r.w,i=n.node(o).rank,a=r.name,u=n.edge(r),d=u.labelRank;if(i!==t+1){n.removeEdge(r);var c=void 0,f,h;for(h=0,++t;t<i;++h,++t)u.points=[],c={width:0,height:0,edgeLabel:u,edgeObj:r,rank:t},f=O(n,"edge",c,"_d"),t===d&&(c.width=u.width,c.height=u.height,c.dummy="edge-label",c.labelpos=u.labelpos),n.setEdge(e,f,{weight:u.weight},a),h===0&&n.graph().dummyChains.push(f),e=f;n.setEdge(e,o,{weight:u.weight},a)}}function $r(n){s(n.graph().dummyChains,function(r){var e=n.node(r),t=e.edgeLabel,o;for(n.setEdge(e.edgeObj,t);e.dummy;)o=n.successors(r)[0],n.removeNode(r),t.points.push({x:e.x,y:e.y}),e.dummy==="edge-label"&&(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height),r=o,e=n.node(r)})}function U(n){var r={};function e(t){var o=n.node(t);if(Object.prototype.hasOwnProperty.call(r,t))return o.rank;r[t]=!0;var i=_(p(n.outEdges(t),function(a){return e(a.w)-n.edge(a).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),o.rank=i}s(n.sources(),e)}function P(n,r){return n.node(r.w).rank-n.node(r.v).rank-n.edge(r).minlen}function kn(n){var r=new m({directed:!1}),e=n.nodes()[0],t=n.nodeCount();r.setNode(e,{});for(var o,i;Gr(r,n)<t;)o=Fr(r,n),i=r.hasNode(o.v)?P(n,o):-P(n,o),Vr(r,n,i);return r}function Gr(n,r){function e(t){s(r.nodeEdges(t),function(o){var i=o.v,a=t===i?o.w:i;!n.hasNode(a)&&!P(r,o)&&(n.setNode(a,{}),n.setEdge(t,a,{}),e(a))})}return s(n.nodes(),e),n.nodeCount()}function Fr(n,r){return Q(r.edges(),function(e){if(n.hasNode(e.v)!==n.hasNode(e.w))return P(r,e)})}function Vr(n,r,e){s(n.nodes(),function(t){r.node(t).rank+=e})}function xn(n,r,e){pn(r)||(r=[r]);var t=(n.isDirected()?n.successors:n.neighbors).bind(n),o=[],i={};return s(r,function(a){if(!n.hasNode(a))throw new Error("Graph does not have node: "+a);En(n,a,e==="post",i,t,o)}),o}function En(n,r,e,t,o,i){Object.prototype.hasOwnProperty.call(t,r)||(t[r]=!0,e||i.push(r),s(o(r),function(a){En(n,a,e,t,o,i)}),e&&i.push(r))}function Br(n,r){return xn(n,r,"post")}function Yr(n,r){return xn(n,r,"pre")}k.initLowLimValues=X;k.initCutValues=Z;k.calcCutValue=Nn;k.leaveEdge=In;k.enterEdge=_n;k.exchangeEdges=Pn;function k(n){n=Nr(n),U(n);var r=kn(n);X(r),Z(r,n);for(var e,t;e=In(r);)t=_n(r,n,e),Pn(r,n,e,t)}function Z(n,r){var e=Br(n,n.nodes());e=e.slice(0,e.length-1),s(e,function(t){qr(n,r,t)})}function qr(n,r,e){var t=n.node(e),o=t.parent;n.edge(e,o).cutvalue=Nn(n,r,e)}function Nn(n,r,e){var t=n.node(e),o=t.parent,i=!0,a=r.edge(e,o),u=0;return a||(i=!1,a=r.edge(o,e)),u=a.weight,s(r.nodeEdges(e),function(d){var c=d.v===e,f=c?d.w:d.v;if(f!==o){var h=c===i,g=r.edge(d).weight;if(u+=h?g:-g,Ar(n,e,f)){var v=n.edge(e,f).cutvalue;u+=h?-v:v}}}),u}function X(n,r){arguments.length<2&&(r=n.nodes()[0]),On(n,{},1,r)}function On(n,r,e,t,o){var i=e,a=n.node(t);return r[t]=!0,s(n.neighbors(t),function(u){Object.prototype.hasOwnProperty.call(r,u)||(e=On(n,r,e,u,t))}),a.low=i,a.lim=e++,o?a.parent=o:delete a.parent,e}function In(n){return J(n.edges(),function(r){return n.edge(r).cutvalue<0})}function _n(n,r,e){var t=e.v,o=e.w;r.hasEdge(t,o)||(t=e.w,o=e.v);var i=n.node(t),a=n.node(o),u=i,d=!1;i.lim>a.lim&&(u=a,d=!0);var c=L(r.edges(),function(f){return d===un(n,n.node(f.v),u)&&d!==un(n,n.node(f.w),u)});return Q(c,function(f){return P(r,f)})}function Pn(n,r,e,t){var o=e.v,i=e.w;n.removeEdge(o,i),n.setEdge(t.v,t.w,{}),X(n),Z(n,r),zr(n,r)}function zr(n,r){var e=J(n.nodes(),function(o){return!r.node(o).parent}),t=Yr(n,e);t=t.slice(1),s(t,function(o){var i=n.node(o).parent,a=r.edge(o,i),u=!1;a||(a=r.edge(i,o),u=!0),r.node(o).rank=r.node(i).rank+(u?a.minlen:-a.minlen)})}function Ar(n,r,e){return n.hasEdge(r,e)}function un(n,r,e){return e.low<=r.lim&&r.lim<=e.lim}function Dr(n){switch(n.graph().ranker){case"network-simplex":dn(n);break;case"tight-tree":Jr(n);break;case"longest-path":Hr(n);break;default:dn(n)}}var Hr=U;function Jr(n){U(n),kn(n)}function dn(n){k(n)}function Qr(n){var r=O(n,"root",{},"_root"),e=Kr(n),t=y(x(e))-1,o=2*t+1;n.graph().nestingRoot=r,s(n.edges(),function(a){n.edge(a).minlen*=o});var i=Ur(n)+1;s(n.children(),function(a){Ln(n,r,o,i,t,e,a)}),n.graph().nodeRankFactor=o}function Ln(n,r,e,t,o,i,a){var u=n.children(a);if(!u.length){a!==r&&n.setEdge(r,a,{weight:0,minlen:e});return}var d=tn(n,"_bt"),c=tn(n,"_bb"),f=n.node(a);n.setParent(d,a),f.borderTop=d,n.setParent(c,a),f.borderBottom=c,s(u,function(h){Ln(n,r,e,t,o,i,h);var g=n.node(h),v=g.borderTop?g.borderTop:h,l=g.borderBottom?g.borderBottom:h,w=g.borderTop?t:2*t,I=v!==l?1:o-i[a]+1;n.setEdge(d,v,{weight:w,minlen:I,nestingEdge:!0}),n.setEdge(l,c,{weight:w,minlen:I,nestingEdge:!0})}),n.parent(a)||n.setEdge(r,d,{weight:0,minlen:o+i[a]})}function Kr(n){var r={};function e(t,o){var i=n.children(t);i&&i.length&&s(i,function(a){e(a,o+1)}),r[t]=o}return s(n.children(),function(t){e(t,1)}),r}function Ur(n){return T(n.edges(),function(r,e){return r+n.edge(e).weight},0)}function Zr(n){var r=n.graph();n.removeNode(r.nestingRoot),delete r.nestingRoot,s(n.edges(),function(e){var t=n.edge(e);t.nestingEdge&&n.removeEdge(e)})}function Xr(n,r,e){var t={},o;s(e,function(i){for(var a=n.parent(i),u,d;a;){if(u=n.parent(a),u?(d=t[u],t[u]=a):(d=o,o=a),d&&d!==a){r.setEdge(d,a);return}a=u}})}function Wr(n,r,e){var t=ne(n),o=new m({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(i){return n.node(i)});return s(n.nodes(),function(i){var a=n.node(i),u=n.parent(i);(a.rank===r||a.minRank<=r&&r<=a.maxRank)&&(o.setNode(i),o.setParent(i,u||t),s(n[e](i),function(d){var c=d.v===i?d.w:d.v,f=o.edge(c,i),h=b(f)?0:f.weight;o.setEdge(c,i,{weight:n.edge(d).weight+h})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&o.setNode(i,{borderLeft:a.borderLeft[r],borderRight:a.borderRight[r]}))}),o}function ne(n){for(var r;n.hasNode(r=K("_root")););return r}function re(n,r){for(var e=0,t=1;t<r.length;++t)e+=ee(n,r[t-1],r[t]);return e}function ee(n,r,e){for(var t=vr(e,p(e,function(c,f){return f})),o=N(p(r,function(c){return R(p(n.outEdges(c),function(f){return{pos:t[f.w],weight:n.edge(f).weight}}),"pos")})),i=1;i<e.length;)i<<=1;var a=2*i-1;i-=1;var u=p(new Array(a),function(){return 0}),d=0;return s(o.forEach(function(c){var f=c.pos+i;u[f]+=c.weight;for(var h=0;f>0;)f%2&&(h+=u[f+1]),f=f-1>>1,u[f]+=c.weight;d+=c.weight*h})),d}function te(n){var r={},e=L(n.nodes(),function(u){return!n.children(u).length}),t=y(p(e,function(u){return n.node(u).rank})),o=p(E(t+1),function(){return[]});function i(u){if(!vn(r,u)){r[u]=!0;var d=n.node(u);o[d.rank].push(u),s(n.successors(u),i)}}var a=R(e,function(u){return n.node(u).rank});return s(a,i),o}function oe(n,r){return p(r,function(e){var t=n.inEdges(e);if(t.length){var o=T(t,function(i,a){var u=n.edge(a),d=n.node(a.v);return{sum:i.sum+u.weight*d.order,weight:i.weight+u.weight}},{sum:0,weight:0});return{v:e,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:e}})}function ie(n,r){var e={};s(n,function(o,i){var a=e[o.v]={indegree:0,in:[],out:[],vs:[o.v],i};b(o.barycenter)||(a.barycenter=o.barycenter,a.weight=o.weight)}),s(r.edges(),function(o){var i=e[o.v],a=e[o.w];!b(i)&&!b(a)&&(a.indegree++,i.out.push(e[o.w]))});var t=L(e,function(o){return!o.indegree});return ae(t)}function ae(n){var r=[];function e(i){return function(a){a.merged||(b(a.barycenter)||b(i.barycenter)||a.barycenter>=i.barycenter)&&ue(i,a)}}function t(i){return function(a){a.in.push(i),--a.indegree===0&&n.push(a)}}for(;n.length;){var o=n.pop();r.push(o),s(o.in.reverse(),e(o)),s(o.out,t(o))}return p(L(r,function(i){return!i.merged}),function(i){return M(i,["vs","i","barycenter","weight"])})}function ue(n,r){var e=0,t=0;n.weight&&(e+=n.barycenter*n.weight,t+=n.weight),r.weight&&(e+=r.barycenter*r.weight,t+=r.weight),n.vs=r.vs.concat(n.vs),n.barycenter=e/t,n.weight=t,n.i=Math.min(r.i,n.i),r.merged=!0}function de(n,r){var e=_r(n,function(f){return Object.prototype.hasOwnProperty.call(f,"barycenter")}),t=e.lhs,o=R(e.rhs,function(f){return-f.i}),i=[],a=0,u=0,d=0;t.sort(ce(!!r)),d=cn(i,o,d),s(t,function(f){d+=f.vs.length,i.push(f.vs),a+=f.barycenter*f.weight,u+=f.weight,d=cn(i,o,d)});var c={vs:N(i)};return u&&(c.barycenter=a/u,c.weight=u),c}function cn(n,r,e){for(var t;r.length&&(t=j(r)).i<=e;)r.pop(),n.push(t.vs),e++;return e}function ce(n){return function(r,e){return r.barycenter<e.barycenter?-1:r.barycenter>e.barycenter?1:n?e.i-r.i:r.i-e.i}}function Rn(n,r,e,t){var o=n.children(r),i=n.node(r),a=i?i.borderLeft:void 0,u=i?i.borderRight:void 0,d={};a&&(o=L(o,function(l){return l!==a&&l!==u}));var c=oe(n,o);s(c,function(l){if(n.children(l.v).length){var w=Rn(n,l.v,e,t);d[l.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&fe(l,w)}});var f=ie(c,e);se(f,d);var h=de(f,t);if(a&&(h.vs=N([a,h.vs,u]),n.predecessors(a).length)){var g=n.node(n.predecessors(a)[0]),v=n.node(n.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+g.order+v.order)/(h.weight+2),h.weight+=2}return h}function se(n,r){s(n,function(e){e.vs=N(e.vs.map(function(t){return r[t]?r[t].vs:t}))})}function fe(n,r){b(n.barycenter)?(n.barycenter=r.barycenter,n.weight=r.weight):(n.barycenter=(n.barycenter*n.weight+r.barycenter*r.weight)/(n.weight+r.weight),n.weight+=r.weight)}function he(n){var r=mn(n),e=sn(n,E(1,r+1),"inEdges"),t=sn(n,E(r-1,-1,-1),"outEdges"),o=te(n);fn(n,o);for(var i=Number.POSITIVE_INFINITY,a,u=0,d=0;d<4;++u,++d){ge(u%2?e:t,u%4>=2),o=C(n);var c=re(n,o);c<i&&(d=0,a=Wn(o),i=c)}fn(n,a)}function sn(n,r,e){return p(r,function(t){return Wr(n,t,e)})}function ge(n,r){var e=new m;s(n,function(t){var o=t.graph().root,i=Rn(t,o,e,r);s(i.vs,function(a,u){t.node(a).order=u}),Xr(t,e,i.vs)})}function fn(n,r){s(r,function(e){s(e,function(t,o){n.node(t).order=o})})}function ve(n){var r=pe(n);s(n.graph().dummyChains,function(e){for(var t=n.node(e),o=t.edgeObj,i=le(n,r,o.v,o.w),a=i.path,u=i.lca,d=0,c=a[d],f=!0;e!==o.w;){if(t=n.node(e),f){for(;(c=a[d])!==u&&n.node(c).maxRank<t.rank;)d++;c===u&&(f=!1)}if(!f){for(;d<a.length-1&&n.node(c=a[d+1]).minRank<=t.rank;)d++;c=a[d]}n.setParent(e,c),e=n.successors(e)[0]}})}function le(n,r,e,t){var o=[],i=[],a=Math.min(r[e].low,r[t].low),u=Math.max(r[e].lim,r[t].lim),d,c;d=e;do d=n.parent(d),o.push(d);while(d&&(r[d].low>a||u>r[d].lim));for(c=d,d=t;(d=n.parent(d))!==c;)i.push(d);return{path:o.concat(i.reverse()),lca:c}}function pe(n){var r={},e=0;function t(o){var i=e;s(n.children(o),t),r[o]={low:i,lim:e++}}return s(n.children(),t),r}function we(n,r){var e={};function t(o,i){var a=0,u=0,d=o.length,c=j(i);return s(i,function(f,h){var g=me(n,f),v=g?n.node(g).order:d;(g||f===c)&&(s(i.slice(u,h+1),function(l){s(n.predecessors(l),function(w){var I=n.node(w),W=I.order;(W<a||v<W)&&!(I.dummy&&n.node(l).dummy)&&jn(e,w,l)})}),u=h+1,a=v)}),i}return T(r,t),e}function be(n,r){var e={};function t(i,a,u,d,c){var f;s(E(a,u),function(h){f=i[h],n.node(f).dummy&&s(n.predecessors(f),function(g){var v=n.node(g);v.dummy&&(v.order<d||v.order>c)&&jn(e,g,f)})})}function o(i,a){var u=-1,d,c=0;return s(a,function(f,h){if(n.node(f).dummy==="border"){var g=n.predecessors(f);g.length&&(d=n.node(g[0]).order,t(a,c,h,u,d),c=h,u=d)}t(a,c,a.length,d,i.length)}),a}return T(r,o),e}function me(n,r){if(n.node(r).dummy)return J(n.predecessors(r),function(e){return n.node(e).dummy})}function jn(n,r,e){if(r>e){var t=r;r=e,e=t}Object.prototype.hasOwnProperty.call(n,r)||Object.defineProperty(n,r,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=n[r];Object.defineProperty(o,e,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function ye(n,r,e){if(r>e){var t=r;r=e,e=t}return!!n[r]&&Object.prototype.hasOwnProperty.call(n[r],e)}function ke(n,r,e,t){var o={},i={},a={};return s(r,function(u){s(u,function(d,c){o[d]=d,i[d]=d,a[d]=c})}),s(r,function(u){var d=-1;s(u,function(c){var f=t(c);if(f.length){f=R(f,function(w){return a[w]});for(var h=(f.length-1)/2,g=Math.floor(h),v=Math.ceil(h);g<=v;++g){var l=f[g];i[c]===c&&d<a[l]&&!ye(e,c,l)&&(i[l]=c,i[c]=o[c]=o[l],d=a[l])}}})}),{root:o,align:i}}function xe(n,r,e,t,o){var i={},a=Ee(n,r,e,o),u=o?"borderLeft":"borderRight";function d(h,g){for(var v=a.nodes(),l=v.pop(),w={};l;)w[l]?h(l):(w[l]=!0,v.push(l),v=v.concat(g(l))),l=v.pop()}function c(h){i[h]=a.inEdges(h).reduce(function(g,v){return Math.max(g,i[v.v]+a.edge(v))},0)}function f(h){var g=a.outEdges(h).reduce(function(l,w){return Math.min(l,i[w.w]-a.edge(w))},Number.POSITIVE_INFINITY),v=n.node(h);g!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(i[h]=Math.max(i[h],g))}return d(c,a.predecessors.bind(a)),d(f,a.successors.bind(a)),s(t,function(h){i[h]=i[e[h]]}),i}function Ee(n,r,e,t){var o=new m,i=n.graph(),a=Pe(i.nodesep,i.edgesep,t);return s(r,function(u){var d;s(u,function(c){var f=e[c];if(o.setNode(f),d){var h=e[d],g=o.edge(h,f);o.setEdge(h,f,Math.max(a(n,c,d),g||0))}d=c})}),o}function Ne(n,r){return Q(x(r),function(e){var t=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return nr(e,function(i,a){var u=Le(n,a)/2;t=Math.max(i+u,t),o=Math.min(i-u,o)}),t-o})}function Oe(n,r){var e=x(r),t=_(e),o=y(e);s(["u","d"],function(i){s(["l","r"],function(a){var u=i+a,d=n[u],c;if(d!==r){var f=x(d);c=a==="l"?t-_(f):o-y(f),c&&(n[u]=S(d,function(h){return h+c}))}})})}function Ie(n,r){return S(n.ul,function(e,t){if(r)return n[r.toLowerCase()][t];var o=R(p(n,t));return(o[1]+o[2])/2})}function _e(n){var r=C(n),e=A(we(n,r),be(n,r)),t={},o;s(["u","d"],function(a){o=a==="u"?r:x(r).reverse(),s(["l","r"],function(u){u==="r"&&(o=p(o,function(h){return x(h).reverse()}));var d=(a==="u"?n.predecessors:n.successors).bind(n),c=ke(n,o,e,d),f=xe(n,o,c.root,c.align,u==="r");u==="r"&&(f=S(f,function(h){return-h})),t[a+u]=f})});var i=Ne(n,t);return Oe(t,i),Ie(t,n.graph().align)}function Pe(n,r,e){return function(t,o,i){var a=t.node(o),u=t.node(i),d=0,c;if(d+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":c=-a.width/2;break;case"r":c=a.width/2;break}if(c&&(d+=e?c:-c),c=0,d+=(a.dummy?r:n)/2,d+=(u.dummy?r:n)/2,d+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":c=u.width/2;break;case"r":c=-u.width/2;break}return c&&(d+=e?c:-c),c=0,d}}function Le(n,r){return n.node(r).width}function Re(n){n=bn(n),je(n),rr(_e(n),function(r,e){n.node(e).x=r})}function je(n){var r=C(n),e=n.graph().ranksep,t=0;s(r,function(o){var i=y(p(o,function(a){return n.node(a).height}));s(o,function(a){n.node(a).y=t+i/2}),t+=i+e})}function it(n,r){var e=Pr;e("layout",()=>{var t=e(" buildLayoutGraph",()=>qe(n));e(" runLayout",()=>Me(t,e)),e(" updateInputGraph",()=>Te(n,t))})}function Me(n,r){r(" makeSpaceForEdgeLabels",()=>ze(n)),r(" removeSelfEdges",()=>Xe(n)),r(" acyclic",()=>kr(n)),r(" nestingGraph.run",()=>Qr(n)),r(" rank",()=>Dr(bn(n))),r(" injectEdgeLabelProxies",()=>Ae(n)),r(" removeEmptyRanks",()=>Ir(n)),r(" nestingGraph.cleanup",()=>Zr(n)),r(" normalizeRanks",()=>Or(n)),r(" assignRankMinMax",()=>De(n)),r(" removeEdgeLabelProxies",()=>He(n)),r(" normalize.run",()=>Sr(n)),r(" parentDummyChains",()=>ve(n)),r(" addBorderSegments",()=>Lr(n)),r(" order",()=>he(n)),r(" insertSelfEdges",()=>We(n)),r(" adjustCoordinateSystem",()=>Rr(n)),r(" position",()=>Re(n)),r(" positionSelfEdges",()=>nt(n)),r(" removeBorderNodes",()=>Ze(n)),r(" normalize.undo",()=>$r(n)),r(" fixupEdgeLabelCoords",()=>Ke(n)),r(" undoCoordinateSystem",()=>jr(n)),r(" translateGraph",()=>Je(n)),r(" assignNodeIntersects",()=>Qe(n)),r(" reversePoints",()=>Ue(n)),r(" acyclic.undo",()=>Er(n))}function Te(n,r){s(n.nodes(),function(e){var t=n.node(e),o=r.node(e);t&&(t.x=o.x,t.y=o.y,r.children(e).length&&(t.width=o.width,t.height=o.height))}),s(n.edges(),function(e){var t=n.edge(e),o=r.edge(e);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),n.graph().width=r.graph().width,n.graph().height=r.graph().height}var Se=["nodesep","edgesep","ranksep","marginx","marginy"],Ce={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$e=["acyclicer","ranker","rankdir","align"],Ge=["width","height"],Fe={width:0,height:0},Ve=["minlen","weight","width","height","labeloffset"],Be={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ye=["labelpos"];function qe(n){var r=new m({multigraph:!0,compound:!0}),e=q(n.graph());return r.setGraph(A({},Ce,Y(e,Se),M(e,$e))),s(n.nodes(),function(t){var o=q(n.node(t));r.setNode(t,Gn(Y(o,Ge),Fe)),r.setParent(t,n.parent(t))}),s(n.edges(),function(t){var o=q(n.edge(t));r.setEdge(t,A({},Be,Y(o,Ve),M(o,Ye)))}),r}function ze(n){var r=n.graph();r.ranksep/=2,s(n.edges(),function(e){var t=n.edge(e);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(r.rankdir==="TB"||r.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Ae(n){s(n.edges(),function(r){var e=n.edge(r);if(e.width&&e.height){var t=n.node(r.v),o=n.node(r.w),i={rank:(o.rank-t.rank)/2+t.rank,e:r};O(n,"edge-proxy",i,"_ep")}})}function De(n){var r=0;s(n.nodes(),function(e){var t=n.node(e);t.borderTop&&(t.minRank=n.node(t.borderTop).rank,t.maxRank=n.node(t.borderBottom).rank,r=y(r,t.maxRank))}),n.graph().maxRank=r}function He(n){s(n.nodes(),function(r){var e=n.node(r);e.dummy==="edge-proxy"&&(n.edge(e.e).labelRank=e.rank,n.removeNode(r))})}function Je(n){var r=Number.POSITIVE_INFINITY,e=0,t=Number.POSITIVE_INFINITY,o=0,i=n.graph(),a=i.marginx||0,u=i.marginy||0;function d(c){var f=c.x,h=c.y,g=c.width,v=c.height;r=Math.min(r,f-g/2),e=Math.max(e,f+g/2),t=Math.min(t,h-v/2),o=Math.max(o,h+v/2)}s(n.nodes(),function(c){d(n.node(c))}),s(n.edges(),function(c){var f=n.edge(c);Object.prototype.hasOwnProperty.call(f,"x")&&d(f)}),r-=a,t-=u,s(n.nodes(),function(c){var f=n.node(c);f.x-=r,f.y-=t}),s(n.edges(),function(c){var f=n.edge(c);s(f.points,function(h){h.x-=r,h.y-=t}),Object.prototype.hasOwnProperty.call(f,"x")&&(f.x-=r),Object.prototype.hasOwnProperty.call(f,"y")&&(f.y-=t)}),i.width=e-r+a,i.height=o-t+u}function Qe(n){s(n.edges(),function(r){var e=n.edge(r),t=n.node(r.v),o=n.node(r.w),i,a;e.points?(i=e.points[0],a=e.points[e.points.length-1]):(e.points=[],i=o,a=t),e.points.unshift(en(t,i)),e.points.push(en(o,a))})}function Ke(n){s(n.edges(),function(r){var e=n.edge(r);if(Object.prototype.hasOwnProperty.call(e,"x"))switch((e.labelpos==="l"||e.labelpos==="r")&&(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset;break}})}function Ue(n){s(n.edges(),function(r){var e=n.edge(r);e.reversed&&e.points.reverse()})}function Ze(n){s(n.nodes(),function(r){if(n.children(r).length){var e=n.node(r),t=n.node(e.borderTop),o=n.node(e.borderBottom),i=n.node(j(e.borderLeft)),a=n.node(j(e.borderRight));e.width=Math.abs(a.x-i.x),e.height=Math.abs(o.y-t.y),e.x=i.x+e.width/2,e.y=t.y+e.height/2}}),s(n.nodes(),function(r){n.node(r).dummy==="border"&&n.removeNode(r)})}function Xe(n){s(n.edges(),function(r){if(r.v===r.w){var e=n.node(r.v);e.selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:r,label:n.edge(r)}),n.removeEdge(r)}})}function We(n){var r=C(n);s(r,function(e){var t=0;s(e,function(o,i){var a=n.node(o);a.order=i+t,s(a.selfEdges,function(u){O(n,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:i+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function nt(n){s(n.nodes(),function(r){var e=n.node(r);if(e.dummy==="selfedge"){var t=n.node(e.e.v),o=t.x+t.width/2,i=t.y,a=e.x-o,u=t.height/2;n.setEdge(e.e,e.label),n.removeNode(r),e.label.points=[{x:o+2*a/3,y:i-u},{x:o+5*a/6,y:i-u},{x:o+a,y:i},{x:o+5*a/6,y:i+u},{x:o+2*a/3,y:i+u}],e.label.x=e.x,e.label.y=e.y}})}function Y(n,r){return S(M(n,r),Number)}function q(n){var r={};return s(n,function(e,t){r[t.toLowerCase()]=e}),r}export{it as o};
@@ -0,0 +1,68 @@
1
+ import{d as ce}from"./chunk-55IACEB6-_r7qMy9s-Dy635JXO.js";import{d as he}from"./chunk-QN33PNHL-C8-RyAc3-Bziqpynq.js";import{R as a,O as I,Z as le,X as de,M,c as X,w as P,b9 as ge,aU as ue,aV as pe,aW as ye}from"./index-Dwfg9sR1.js";const m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function fe(e,s=0){return(m[e[s+0]]+m[e[s+1]]+m[e[s+2]]+m[e[s+3]]+"-"+m[e[s+4]]+m[e[s+5]]+"-"+m[e[s+6]]+m[e[s+7]]+"-"+m[e[s+8]]+m[e[s+9]]+"-"+m[e[s+10]]+m[e[s+11]]+m[e[s+12]]+m[e[s+13]]+m[e[s+14]]+m[e[s+15]]).toLowerCase()}let W;const me=new Uint8Array(16);function Ee(){if(!W){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");W=crypto.getRandomValues.bind(crypto)}return W(me)}const _e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ne={randomUUID:_e};function be(e,s,i){var c;if(ne.randomUUID&&!e)return ne.randomUUID();e=e||{};const h=e.random??((c=e.rng)==null?void 0:c.call(e))??Ee();if(h.length<16)throw new Error("Random bytes length must be >= 16");return h[6]=h[6]&15|64,h[8]=h[8]&63|128,fe(h)}var q=function(){var e=a(function(S,t,r,o){for(r=r||{},o=S.length;o--;r[S[o]]=t);return r},"o"),s=[1,4],i=[1,13],c=[1,12],h=[1,15],y=[1,16],u=[1,20],g=[1,19],L=[6,7,8],p=[1,26],C=[1,24],z=[1,25],b=[6,7,11],Y=[1,6,13,15,16,19,22],J=[1,33],K=[1,34],R=[1,6,7,11,13,15,16,19,22],B={trace:a(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:a(function(S,t,r,o,l,n,E){var d=n.length-1;switch(l){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",n[d].id),o.addNode(n[d-1].length,n[d].id,n[d].descr,n[d].type);break;case 16:o.getLogger().trace("Icon: ",n[d]),o.decorateNode({icon:n[d]});break;case 17:case 21:o.decorateNode({class:n[d]});break;case 18:o.getLogger().trace("SPACELIST");break;case 19:o.getLogger().trace("Node: ",n[d].id),o.addNode(0,n[d].id,n[d].descr,n[d].type);break;case 20:o.decorateNode({icon:n[d]});break;case 25:o.getLogger().trace("node found ..",n[d-2]),this.$={id:n[d-1],descr:n[d-1],type:o.getType(n[d-2],n[d])};break;case 26:this.$={id:n[d],descr:n[d],type:o.nodeType.DEFAULT};break;case 27:o.getLogger().trace("node found ..",n[d-3]),this.$={id:n[d-3],descr:n[d-1],type:o.getType(n[d-2],n[d])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:s},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:s},{6:i,7:[1,10],9:9,12:11,13:c,14:14,15:h,16:y,17:17,18:18,19:u,22:g},e(L,[2,3]),{1:[2,2]},e(L,[2,4]),e(L,[2,5]),{1:[2,6],6:i,12:21,13:c,14:14,15:h,16:y,17:17,18:18,19:u,22:g},{6:i,9:22,12:11,13:c,14:14,15:h,16:y,17:17,18:18,19:u,22:g},{6:p,7:C,10:23,11:z},e(b,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:u,22:g}),e(b,[2,18]),e(b,[2,19]),e(b,[2,20]),e(b,[2,21]),e(b,[2,23]),e(b,[2,24]),e(b,[2,26],{19:[1,30]}),{20:[1,31]},{6:p,7:C,10:32,11:z},{1:[2,7],6:i,12:21,13:c,14:14,15:h,16:y,17:17,18:18,19:u,22:g},e(Y,[2,14],{7:J,11:K}),e(R,[2,8]),e(R,[2,9]),e(R,[2,10]),e(b,[2,15]),e(b,[2,16]),e(b,[2,17]),{20:[1,35]},{21:[1,36]},e(Y,[2,13],{7:J,11:K}),e(R,[2,11]),e(R,[2,12]),{21:[1,37]},e(b,[2,25]),e(b,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:a(function(S,t){if(t.recoverable)this.trace(S);else{var r=new Error(S);throw r.hash=t,r}},"parseError"),parse:a(function(S){var t=this,r=[0],o=[],l=[null],n=[],E=this.table,d="",A=0,Q=0,se=2,V=1,re=n.slice.call(arguments,1),f=Object.create(this.lexer),x={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(x.yy[j]=this.yy[j]);f.setInput(S,x.yy),x.yy.lexer=f,x.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var F=f.yylloc;n.push(F);var oe=f.options&&f.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(N){r.length=r.length-2*N,l.length=l.length-N,n.length=n.length-N}a(ae,"popStack");function ee(){var N;return N=o.pop()||f.lex()||V,typeof N!="number"&&(N instanceof Array&&(o=N,N=o.pop()),N=t.symbols_[N]||N),N}a(ee,"lex");for(var _,T,D,G,O={},$,k,te,U;;){if(T=r[r.length-1],this.defaultActions[T]?D=this.defaultActions[T]:((_===null||typeof _>"u")&&(_=ee()),D=E[T]&&E[T][_]),typeof D>"u"||!D.length||!D[0]){var H="";U=[];for($ in E[T])this.terminals_[$]&&$>se&&U.push("'"+this.terminals_[$]+"'");f.showPosition?H="Parse error on line "+(A+1)+`:
2
+ `+f.showPosition()+`
3
+ Expecting `+U.join(", ")+", got '"+(this.terminals_[_]||_)+"'":H="Parse error on line "+(A+1)+": Unexpected "+(_==V?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(H,{text:f.match,token:this.terminals_[_]||_,line:f.yylineno,loc:F,expected:U})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+_);switch(D[0]){case 1:r.push(_),l.push(f.yytext),n.push(f.yylloc),r.push(D[1]),_=null,Q=f.yyleng,d=f.yytext,A=f.yylineno,F=f.yylloc;break;case 2:if(k=this.productions_[D[1]][1],O.$=l[l.length-k],O._$={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},oe&&(O._$.range=[n[n.length-(k||1)].range[0],n[n.length-1].range[1]]),G=this.performAction.apply(O,[d,Q,A,x.yy,D[1],l,n].concat(re)),typeof G<"u")return G;k&&(r=r.slice(0,-1*k*2),l=l.slice(0,-1*k),n=n.slice(0,-1*k)),r.push(this.productions_[D[1]][0]),l.push(O.$),n.push(O._$),te=E[r[r.length-2]][r[r.length-1]],r.push(te);break;case 3:return!0}}return!0},"parse")},ie=function(){var S={EOF:1,parseError:a(function(t,r){if(this.yy.parser)this.yy.parser.parseError(t,r);else throw new Error(t)},"parseError"),setInput:a(function(t,r){return this.yy=r||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},"setInput"),input:a(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var r=t.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:a(function(t){var r=t.length,o=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var l=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 n=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===l.length?this.yylloc.first_column:0)+l[l.length-o.length].length-o[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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:a(function(t){this.unput(this.match.slice(t))},"less"),pastInput:a(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(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,"")},"upcomingInput"),showPosition:a(function(){var t=this.pastInput(),r=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
5
+ `+r+"^"},"showPosition"),test_match:a(function(t,r){var o,l,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),l=t[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.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],o=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var E in n)this[E]=n[E];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,r,o,l;this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),E=0;E<n.length;E++)if(o=this._input.match(this.rules[n[E]]),o&&(!r||o[0].length>r[0].length)){if(r=o,l=E,this.options.backtrack_lexer){if(t=this.test_match(o,n[E]),t!==!1)return t;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(t=this.test_match(r,n[l]),t!==!1?t:!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:a(function(){var t=this.next();return t||this.lex()},"lex"),begin:a(function(t){this.conditionStack.push(t)},"begin"),popState:a(function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a(function(t){this.begin(t)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(t,r,o,l){switch(o){case 0:return t.getLogger().trace("Found comment",r.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:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.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:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",r.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",r.yytext),"NODE_DEND";case 30:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 35:return t.getLogger().trace("Long description:",r.yytext),20;case 36:return t.getLogger().trace("Long description:",r.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 S}();B.lexer=ie;function w(){this.yy={}}return a(w,"Parser"),w.prototype=B,B.Parser=w,new w}();q.parser=q;var Ne=q,v={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Z,De=(Z=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=v,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 s=this.nodes.length-1;s>=0;s--)if(this.nodes[s].level<e)return this.nodes[s];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,s,i,c){var h,y;I.info("addNode",e,s,i,c);let u=!1;this.nodes.length===0?(this.baseLevel=e,e=0,u=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,u=!1);const g=X();let L=((h=g.mindmap)==null?void 0:h.padding)??M.mindmap.padding;switch(c){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:L*=2;break}const p={id:this.count++,nodeId:P(s,g),level:e,descr:P(i,g),type:c,children:[],width:((y=g.mindmap)==null?void 0:y.maxNodeWidth)??M.mindmap.maxNodeWidth,padding:L,isRoot:u},C=this.getParent(e);if(C)C.children.push(p),this.nodes.push(p);else if(u)this.nodes.push(p);else throw new Error(`There can be only one root. No parent could be found for ("${p.descr}")`)}getType(e,s){switch(I.debug("In get type",e,s),e){case"[":return this.nodeType.RECT;case"(":return s===")"?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,s){this.elements[e]=s}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const s=X(),i=this.nodes[this.nodes.length-1];e.icon&&(i.icon=P(e.icon,s)),e.class&&(i.class=P(e.class,s))}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,s){if(e.level===0?e.section=void 0:e.section=s,e.children)for(const[i,c]of e.children.entries()){const h=e.level===0?i:s;this.assignSections(c,h)}}flattenNodes(e,s){const i=["mindmap-node"];e.isRoot===!0?i.push("section-root","section--1"):e.section!==void 0&&i.push(`section-${e.section}`),e.class&&i.push(e.class);const c=i.join(" "),h=a(u=>{switch(u){case v.CIRCLE:return"mindmapCircle";case v.RECT:return"rect";case v.ROUNDED_RECT:return"rounded";case v.CLOUD:return"cloud";case v.BANG:return"bang";case v.HEXAGON:return"hexagon";case v.DEFAULT:return"defaultMindmapNode";case v.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,isGroup:!1,shape:h(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:c,cssStyles:[],look:"default",icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(s.push(y),e.children)for(const u of e.children)this.flattenNodes(u,s)}generateEdges(e,s){if(e.children)for(const i of e.children){let c="edge";i.section!==void 0&&(c+=` section-edge-${i.section}`);const h=e.level+1;c+=` edge-depth-${h}`;const y={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:c,depth:e.level,section:i.section};s.push(y),this.generateEdges(i,s)}}getData(){const e=this.getMindmap(),s=X(),i=ge().layout!==void 0,c=s;if(i||(c.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:c};I.debug("getData: mindmapRoot",e,s),this.assignSections(e);const h=[],y=[];this.flattenNodes(e,h),this.generateEdges(e,y),I.debug(`getData: processed ${h.length} nodes and ${y.length} edges`);const u=new Map;for(const g of h)u.set(g.id,{shape:g.shape,width:g.width,height:g.height,padding:g.padding});return{nodes:h,edges:y,config:c,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(u),type:"mindmap",diagramId:"mindmap-"+be()}}getLogger(){return I}},a(Z,"MindmapDB"),Z),Se=a(async(e,s,i,c)=>{var h,y;I.debug(`Rendering mindmap diagram
7
+ `+e);const u=c.db,g=u.getData(),L=ce(s,g.config.securityLevel);g.type=c.type,g.layoutAlgorithm=le(g.config.layout,{fallback:"cose-bilkent"}),g.diagramId=s,u.getMindmap()&&(g.nodes.forEach(p=>{p.shape==="rounded"?(p.radius=15,p.taper=15,p.stroke="none",p.width=0,p.padding=15):p.shape==="circle"?p.padding=10:p.shape==="rect"&&(p.width=0,p.padding=10)}),await de(g,L),he(L,((h=g.config.mindmap)==null?void 0:h.padding)??M.mindmap.padding,"mindmapDiagram",((y=g.config.mindmap)==null?void 0:y.useMaxWidth)??M.mindmap.useMaxWidth))},"draw"),Le={draw:Se},ke=a(e=>{let s="";for(let i=0;i<e.THEME_COLOR_LIMIT;i++)e["lineColor"+i]=e["lineColor"+i]||e["cScaleInv"+i],ue(e["lineColor"+i])?e["lineColor"+i]=pe(e["lineColor"+i],20):e["lineColor"+i]=ye(e["lineColor"+i],20);for(let i=0;i<e.THEME_COLOR_LIMIT;i++){const c=""+(17-3*i);s+=`
8
+ .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {
9
+ fill: ${e["cScale"+i]};
10
+ }
11
+ .section-${i-1} text {
12
+ fill: ${e["cScaleLabel"+i]};
13
+ }
14
+ .node-icon-${i-1} {
15
+ font-size: 40px;
16
+ color: ${e["cScaleLabel"+i]};
17
+ }
18
+ .section-edge-${i-1}{
19
+ stroke: ${e["cScale"+i]};
20
+ }
21
+ .edge-depth-${i-1}{
22
+ stroke-width: ${c};
23
+ }
24
+ .section-${i-1} line {
25
+ stroke: ${e["cScaleInv"+i]} ;
26
+ stroke-width: 3;
27
+ }
28
+
29
+ .disabled, .disabled circle, .disabled text {
30
+ fill: lightgray;
31
+ }
32
+ .disabled text {
33
+ fill: #efefef;
34
+ }
35
+ `}return s},"genSections"),ve=a(e=>`
36
+ .edge {
37
+ stroke-width: 3;
38
+ }
39
+ ${ke(e)}
40
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
41
+ fill: ${e.git0};
42
+ }
43
+ .section-root text {
44
+ fill: ${e.gitBranchLabel0};
45
+ }
46
+ .section-root span {
47
+ color: ${e.gitBranchLabel0};
48
+ }
49
+ .section-2 span {
50
+ color: ${e.gitBranchLabel0};
51
+ }
52
+ .icon-container {
53
+ height:100%;
54
+ display: flex;
55
+ justify-content: center;
56
+ align-items: center;
57
+ }
58
+ .edge {
59
+ fill: none;
60
+ }
61
+ .mindmap-node-label {
62
+ dy: 1em;
63
+ alignment-baseline: middle;
64
+ text-anchor: middle;
65
+ dominant-baseline: middle;
66
+ text-align: center;
67
+ }
68
+ `,"getStyles"),xe=ve,Ce={get db(){return new De},renderer:Le,parser:Ne,styles:xe};export{Ce as diagram};
@@ -0,0 +1,30 @@
1
+ import{R as p,u as U,f as Z,l as _,s as j,o as H,n as K,O as z,c as Q,J as X,am as Y,ao as ee,ap as te,B as ae,t as ne,M as ie,aq as w,ar as re,as as R}from"./index-Dwfg9sR1.js";import{m as le}from"./chunk-4BX2VUAB-DeMNg1Xd-CMa4zZ7K.js";import{N as se}from"./treemap-KMMF4GRG-Dfxm7cSf-Dp6bDrrM.js";import{h as L}from"./arc-CZCQSTaI-C-VU_J9B.js";import"./_baseUniq-DRc_T5HB-BsnuNSgv.js";import"./_basePickBy-BjEly54R-XZ-uT-Uj.js";import"./clone-DduvFCk3-BjQT37Sj.js";function oe(e,a){return a<e?-1:a>e?1:a>=e?0:NaN}function ce(e){return e}function ue(){var e=ce,a=oe,f=null,s=w(0),o=w(R),y=w(0);function l(t){var i,c=(t=re(t)).length,d,v,x=0,u=new Array(c),r=new Array(c),h=+s.apply(this,arguments),S=Math.min(R,Math.max(-R,o.apply(this,arguments)-h)),m,b=Math.min(Math.abs(S)/c,y.apply(this,arguments)),C=b*(S<0?-1:1),g;for(i=0;i<c;++i)(g=r[u[i]=i]=+e(t[i],i,t))>0&&(x+=g);for(a!=null?u.sort(function($,A){return a(r[$],r[A])}):f!=null&&u.sort(function($,A){return f(t[$],t[A])}),i=0,v=x?(S-c*C)/x:0;i<c;++i,h=m)d=u[i],g=r[d],m=h+(g>0?g*v:0)+C,r[d]={data:t[d],index:i,value:g,startAngle:h,endAngle:m,padAngle:b};return r}return l.value=function(t){return arguments.length?(e=typeof t=="function"?t:w(+t),l):e},l.sortValues=function(t){return arguments.length?(a=t,f=null,l):a},l.sort=function(t){return arguments.length?(f=t,a=null,l):f},l.startAngle=function(t){return arguments.length?(s=typeof t=="function"?t:w(+t),l):s},l.endAngle=function(t){return arguments.length?(o=typeof t=="function"?t:w(+t),l):o},l.padAngle=function(t){return arguments.length?(y=typeof t=="function"?t:w(+t),l):y},l}var pe=ie.pie,N={sections:new Map,showData:!1},D=N.sections,B=N.showData,de=structuredClone(pe),ge=p(()=>structuredClone(de),"getConfig"),fe=p(()=>{D=new Map,B=N.showData,ne()},"clear"),he=p(({label:e,value:a})=>{if(a<0)throw new Error(`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(e)||(D.set(e,a),z.debug(`added new section: ${e}, with value: ${a}`))},"addSection"),me=p(()=>D,"getSections"),xe=p(e=>{B=e},"setShowData"),we=p(()=>B,"getShowData"),V={getConfig:ge,clear:fe,setDiagramTitle:K,getDiagramTitle:H,setAccTitle:j,getAccTitle:_,setAccDescription:Z,getAccDescription:U,addSection:he,getSections:me,setShowData:xe,getShowData:we},ye=p((e,a)=>{le(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),ve={parse:p(async e=>{const a=await se("pie",e);z.debug(a),ye(a,V)},"parse")},Se=p(e=>`
2
+ .pieCircle{
3
+ stroke: ${e.pieStrokeColor};
4
+ stroke-width : ${e.pieStrokeWidth};
5
+ opacity : ${e.pieOpacity};
6
+ }
7
+ .pieOuterCircle{
8
+ stroke: ${e.pieOuterStrokeColor};
9
+ stroke-width: ${e.pieOuterStrokeWidth};
10
+ fill: none;
11
+ }
12
+ .pieTitleText {
13
+ text-anchor: middle;
14
+ font-size: ${e.pieTitleTextSize};
15
+ fill: ${e.pieTitleTextColor};
16
+ font-family: ${e.fontFamily};
17
+ }
18
+ .slice {
19
+ font-family: ${e.fontFamily};
20
+ fill: ${e.pieSectionTextColor};
21
+ font-size:${e.pieSectionTextSize};
22
+ // fill: white;
23
+ }
24
+ .legend text {
25
+ fill: ${e.pieLegendTextColor};
26
+ font-family: ${e.fontFamily};
27
+ font-size: ${e.pieLegendTextSize};
28
+ }
29
+ `,"getStyles"),$e=Se,Ae=p(e=>{const a=[...e.values()].reduce((s,o)=>s+o,0),f=[...e.entries()].map(([s,o])=>({label:s,value:o})).filter(s=>s.value/a*100>=1).sort((s,o)=>o.value-s.value);return ue().value(s=>s.value)(f)},"createPieArcs"),be=p((e,a,f,s)=>{z.debug(`rendering pie chart
30
+ `+e);const o=s.db,y=Q(),l=X(o.getConfig(),y.pie),t=40,i=18,c=4,d=450,v=d,x=Y(a),u=x.append("g");u.attr("transform","translate("+v/2+","+d/2+")");const{themeVariables:r}=y;let[h]=ee(r.pieOuterStrokeWidth);h??(h=2);const S=l.textPosition,m=Math.min(v,d)/2-t,b=L().innerRadius(0).outerRadius(m),C=L().innerRadius(m*S).outerRadius(m*S);u.append("circle").attr("cx",0).attr("cy",0).attr("r",m+h/2).attr("class","pieOuterCircle");const g=o.getSections(),$=Ae(g),A=[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 T=0;g.forEach(n=>{T+=n});const F=$.filter(n=>(n.data.value/T*100).toFixed(0)!=="0"),M=te(A);u.selectAll("mySlices").data(F).enter().append("path").attr("d",b).attr("fill",n=>M(n.data.label)).attr("class","pieCircle"),u.selectAll("mySlices").data(F).enter().append("text").text(n=>(n.data.value/T*100).toFixed(0)+"%").attr("transform",n=>"translate("+C.centroid(n)+")").style("text-anchor","middle").attr("class","slice"),u.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const W=[...g.entries()].map(([n,O])=>({label:n,value:O})),k=u.selectAll(".legend").data(W).enter().append("g").attr("class","legend").attr("transform",(n,O)=>{const E=i+c,G=E*W.length/2,I=12*i,J=O*E-G;return"translate("+I+","+J+")"});k.append("rect").attr("width",i).attr("height",i).style("fill",n=>M(n.label)).style("stroke",n=>M(n.label)),k.append("text").attr("x",i+c).attr("y",i-c).text(n=>o.getShowData()?`${n.label} [${n.value}]`:n.label);const P=Math.max(...k.selectAll("text").nodes().map(n=>(n==null?void 0:n.getBoundingClientRect().width)??0)),q=v+t+i+c+P;x.attr("viewBox",`0 0 ${q} ${d}`),ae(x,d,q,l.useMaxWidth)},"draw"),Ce={draw:be},Ne={parser:ve,db:V,renderer:Ce,styles:$e};export{Ne as diagram};