@marimo-team/frontend 0.14.11-dev48 → 0.14.11-dev5

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 (138) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-CUoL500U.js → ConnectedDataExplorerComponent-DMQ_fMA-.js} +3 -3
  2. package/dist/assets/{ImageComparisonComponent-DDHwIJ8Q.js → ImageComparisonComponent-CWmirTp9.js} +1 -1
  3. package/dist/assets/{VegaLite-Czmx_ECO.js → VegaLite-D0scTiCV.js} +1 -1
  4. package/dist/assets/_baseEach-BZRDjF1G.js +1 -0
  5. package/dist/assets/_baseMap-b6pESN37.js +1 -0
  6. package/dist/assets/_baseUniq-C6iB6ndc.js +1 -0
  7. package/dist/assets/{_createAggregator-CcihYROi.js → _createAggregator-CYc3R5V9.js} +1 -1
  8. package/dist/assets/{any-language-editor-bqVsHwiH.js → any-language-editor-BAyJi4sp.js} +1 -1
  9. package/dist/assets/architectureDiagram-IEHRJDOE-C7apm4Rb.js +36 -0
  10. package/dist/assets/blockDiagram-JOT3LUYC-fnbiDLBo.js +121 -0
  11. package/dist/assets/{c4Diagram-6F6E4RAY-m6sAlCzp.js → c4Diagram-VJAJSXHY-DhwC93OT.js} +2 -2
  12. package/dist/assets/channel-CJ0O_DEA.js +1 -0
  13. package/dist/assets/{chunk-353BL4L5-CnAx5AF0.js → chunk-4BMEZGHF-BDUQv6oo.js} +1 -1
  14. package/dist/assets/{chunk-QEP2MXWD-BxExN6Lp.js → chunk-A2AXSNBT-45GjZ4ep.js} +3 -4
  15. package/dist/assets/chunk-AEK57VVT-DvnWZ3xV.js +220 -0
  16. package/dist/assets/{chunk-67H74DCK-Cto_4Bir.js → chunk-D6G4REZN-DZQFfclG.js} +1 -1
  17. package/dist/assets/chunk-RZ5BOZE2-Dgp8VeSi.js +1 -0
  18. package/dist/assets/{chunk-AACKK3MU-B_HaHcJu.js → chunk-XZIHB7SX-CrsSaTFU.js} +1 -1
  19. package/dist/assets/{circle-play-8nMu2iYy.js → circle-play-CpQkb-K4.js} +2 -2
  20. package/dist/assets/classDiagram-GIVACNV2-CL3HbgQ3.js +1 -0
  21. package/dist/assets/classDiagram-v2-COTLJTTW-CL3HbgQ3.js +1 -0
  22. package/dist/assets/clone-De7T0DNm.js +1 -0
  23. package/dist/assets/compile-thtiZ0sF.js +10 -0
  24. package/dist/assets/dagre-OKDRZEBW-BIwMvEOu.js +4 -0
  25. package/dist/assets/{data-editor-BeWagiEI.js → data-editor-CeGjBq6K.js} +22 -22
  26. package/dist/assets/diagram-SSKATNLV-Db5IE1xf.js +43 -0
  27. package/dist/assets/diagram-VNBRO52H-CsZ5COnC.js +24 -0
  28. package/dist/assets/edit-page-BhCJ9cY3.js +144 -0
  29. package/dist/assets/{erDiagram-R3QVA2FD-3xyAvrIh.js → erDiagram-Q7BY3M3F-HfXYTOof.js} +1 -1
  30. package/dist/assets/flowDiagram-4HSFHLVR-D9XaWAut.js +161 -0
  31. package/dist/assets/ganttDiagram-APWFNJXF-B3PLwj3o.js +257 -0
  32. package/dist/assets/gitGraphDiagram-7IBYFJ6S-CFL0d9D_.js +65 -0
  33. package/dist/assets/{graph-C4PkZZxf.js → graph-DJZT7Xvd.js} +1 -1
  34. package/dist/assets/home-page-ui2vbJR1.js +9 -0
  35. package/dist/assets/index-8IZtaDUn.css +1 -0
  36. package/dist/assets/{index-CKQeO2Lm.js → index-B1_eV_Ov.js} +1 -1
  37. package/dist/assets/{index-DjpcQgUn.js → index-B7mnFA43.js} +1 -1
  38. package/dist/assets/{index-Dx9C9kBl.js → index-BAXMt0Rh.js} +1 -1
  39. package/dist/assets/{index--PV_n6OT.js → index-BE19tBFw.js} +1 -1
  40. package/dist/assets/{index-DnxVQzYt.js → index-B_D8Im33.js} +1 -1
  41. package/dist/assets/{index-CtmLvKwt.js → index-B_za8QUJ.js} +1 -1
  42. package/dist/assets/index-CDoIhryD.js +1 -0
  43. package/dist/assets/{index-BGwXzM6i.js → index-CIMxeTn1.js} +1 -1
  44. package/dist/assets/{index-B-zQMBKJ.js → index-Cz22vp8s.js} +1 -1
  45. package/dist/assets/{index-CqGB7278.js → index-D2cDVMJO.js} +1 -1
  46. package/dist/assets/index-DITk7HL4.js +501 -0
  47. package/dist/assets/{index-TLD151he.js → index-D_zHcGhe.js} +1 -1
  48. package/dist/assets/{index-hzUC1b41.js → index-Dw4a-6ZH.js} +1 -1
  49. package/dist/assets/{index-CEEx86Vd.js → index-Dwm3ogya.js} +1 -1
  50. package/dist/assets/{index-BU0kTvje.js → index-a27d4K8Z.js} +1 -1
  51. package/dist/assets/{index-DjJ-bG6v.js → index-d_s5QBbs.js} +1 -1
  52. package/dist/assets/{index-tWtqwKDR.js → index-fgCNABM6.js} +1 -1
  53. package/dist/assets/{index-grhOS4NZ.js → index-gxDVzpPY.js} +1 -1
  54. package/dist/assets/{index-DGXmlIKQ.js → index-xGgGiEvE.js} +1 -1
  55. package/dist/assets/infoDiagram-PH2N3AL5-BIjMI05t.js +2 -0
  56. package/dist/assets/journeyDiagram-U35MCT3I-B7TqIRu7.js +138 -0
  57. package/dist/assets/{kanban-definition-ILFWEQ3N-CcX8Odhv.js → kanban-definition-NDS4AKOZ-BHw2oIqf.js} +8 -9
  58. package/dist/assets/{layout-CMZskpMv.js → layout-CF1oc_e3.js} +1 -1
  59. package/dist/assets/linear-DaGXRWtq.js +1 -0
  60. package/dist/assets/loro_wasm_bg-DHBNbovs.wasm +0 -0
  61. package/dist/assets/mermaid-CwhZbs51.js +152 -0
  62. package/dist/assets/min-AWTPkpvW.js +1 -0
  63. package/dist/assets/{mindmap-definition-CZNETY7S-CxqCAn65.js → mindmap-definition-ALO5MXBD-D4vHkpON.js} +4 -4
  64. package/dist/assets/{pieDiagram-NIOCPIFQ-PRsPDCUf.js → pieDiagram-IB7DONF6-BE1yDg1G.js} +1 -1
  65. package/dist/assets/{quadrantDiagram-2OG54O6I-pLLKFYFN.js → quadrantDiagram-7GDLP6J5-BuwoLhkk.js} +1 -1
  66. package/dist/assets/radar-MK3ICKWK-Bxa1jhec.js +126 -0
  67. package/dist/assets/{react-plotly-O8CNh3yr.js → react-plotly-CKNiAnQY.js} +1 -1
  68. package/dist/assets/{requirementDiagram-SO3GGRV7-yjxijDDw.js → requirementDiagram-KVF5MWMF-esdDg5Gf.js} +3 -3
  69. package/dist/assets/run-page-Dv95FfWv.js +1 -0
  70. package/dist/assets/{sankeyDiagram-4UZDY2LN-7AVzF911.js → sankeyDiagram-QLVOVGJD-Dq4ECH57.js} +1 -1
  71. package/dist/assets/save-worker-DZnx0AG9.js +1 -0
  72. package/dist/assets/sequenceDiagram-X6HHIX6F-cjRet5DL.js +122 -0
  73. package/dist/assets/shutdown-button-C0QY_4_n.js +17 -0
  74. package/dist/assets/slides-component-wzTLBiyJ.js +1 -0
  75. package/dist/assets/sortBy-CcyoRC99.js +1 -0
  76. package/dist/assets/stateDiagram-DGXRK772-BPcptXup.js +1 -0
  77. package/dist/assets/stateDiagram-v2-YXO3MK2T-C8VwdSCg.js +1 -0
  78. package/dist/assets/storage-DDyP2Zol.js +27 -0
  79. package/dist/assets/{terminal-Dxa0NUTG.js → terminal-B7XD4iZk.js} +1 -1
  80. package/dist/assets/{time-D69fB1YD.js → time-Bn4pDW13.js} +1 -1
  81. package/dist/assets/timeline-definition-BDJGKUSR-Cz0Eii_m.js +61 -0
  82. package/dist/assets/tracing-9Co-DJfg.js +2 -0
  83. package/dist/assets/vega-component-BLnVJ-8J.js +1 -0
  84. package/dist/assets/worker-BbdB3qWL.js +1 -0
  85. package/dist/assets/worker-CnoOKJWk.js +1 -0
  86. package/dist/assets/xychartDiagram-VJFVF3MP-_9ixqRL2.js +7 -0
  87. package/dist/index.html +2 -2
  88. package/package.json +42 -42
  89. package/dist/assets/_baseEach-C52A37kN.js +0 -1
  90. package/dist/assets/_baseMap-CErDCA3r.js +0 -1
  91. package/dist/assets/_baseUniq-hliKyzdp.js +0 -1
  92. package/dist/assets/architectureDiagram-NQ2NVSRB-BLiKdlfK.js +0 -36
  93. package/dist/assets/blockDiagram-PHRCVELO-Dj7uU_bm.js +0 -122
  94. package/dist/assets/channel-eH-Wxlwg.js +0 -1
  95. package/dist/assets/chunk-6OLS64BW-CrFJnDjp.js +0 -220
  96. package/dist/assets/chunk-BFAMUDN2-Di38VBDn.js +0 -1
  97. package/dist/assets/chunk-E2GYISFI-CPwLrORh.js +0 -15
  98. package/dist/assets/chunk-SKB7J2MH-CZ1cNiyn.js +0 -1
  99. package/dist/assets/classDiagram-BGRH5UQR-BnjY0hFP.js +0 -1
  100. package/dist/assets/classDiagram-v2-O24JOBDK-BnjY0hFP.js +0 -1
  101. package/dist/assets/clone-BqBqvZp5.js +0 -1
  102. package/dist/assets/compile-BFoHfP_H.js +0 -10
  103. package/dist/assets/dagre-FFZHY6LT-B2xtEGm4.js +0 -4
  104. package/dist/assets/diagram-3EMPZRKU-DSUnwT8T.js +0 -24
  105. package/dist/assets/diagram-5UYTHUR4-BKm2hW4S.js +0 -24
  106. package/dist/assets/diagram-ZTM2IBQH-BQuWD834.js +0 -43
  107. package/dist/assets/edit-page-Dp71Rq_B.js +0 -144
  108. package/dist/assets/flowDiagram-PKI6S5ZS-ZMlsBCaU.js +0 -162
  109. package/dist/assets/ganttDiagram-EK5VF46D-BCKhVKFb.js +0 -267
  110. package/dist/assets/gitGraphDiagram-GW3U2K7C-pHdDh1du.js +0 -65
  111. package/dist/assets/home-page-CmEC47AR.js +0 -9
  112. package/dist/assets/index-BEQfoZiP.js +0 -1
  113. package/dist/assets/index-D2Z1hqrf.js +0 -1
  114. package/dist/assets/index-DDdlzLJw.js +0 -503
  115. package/dist/assets/index-DnCBJYuC.css +0 -1
  116. package/dist/assets/infoDiagram-RLU2ROGC-CQRQmWBF.js +0 -2
  117. package/dist/assets/journeyDiagram-EWQZEKCU-DoTMV7Ld.js +0 -139
  118. package/dist/assets/linear-RD9P-hfS.js +0 -1
  119. package/dist/assets/links-BddFPrre.js +0 -17
  120. package/dist/assets/loro_wasm_bg-bPYKkGLG.wasm +0 -0
  121. package/dist/assets/mermaid-CjHlE8Co.js +0 -152
  122. package/dist/assets/min-DrLXTftx.js +0 -1
  123. package/dist/assets/run-page-CxZg57Ra.js +0 -1
  124. package/dist/assets/save-worker-B8gk1S9x.js +0 -1
  125. package/dist/assets/sequenceDiagram-ZIKVLSP4-CYsC6JlV.js +0 -122
  126. package/dist/assets/slides-component-t8hWAw30.js +0 -1
  127. package/dist/assets/sortBy-6rZ1GeDf.js +0 -1
  128. package/dist/assets/stateDiagram-XX37X6EN-DkOa47Ba.js +0 -1
  129. package/dist/assets/stateDiagram-v2-GD6S3NHB-CtNUX2HF.js +0 -1
  130. package/dist/assets/storage-DFM0grbQ.js +0 -25
  131. package/dist/assets/timeline-definition-RI47OAVP-Cv4RoOGw.js +0 -61
  132. package/dist/assets/tracing-CYcKBnLY.js +0 -2
  133. package/dist/assets/treemap-FKARHQ26-DIAQw-dY.js +0 -126
  134. package/dist/assets/vega-component-CzIbLUf6.js +0 -1
  135. package/dist/assets/worker-BYA2ASe8.js +0 -1
  136. package/dist/assets/worker-Ch6cKXnI.js +0 -1
  137. package/dist/assets/xychartDiagram-H2YORKM3-pYUlM72N.js +0 -7
  138. /package/dist/assets/{links-C1rhMrxo.css → shutdown-button-C1rhMrxo.css} +0 -0
@@ -0,0 +1,138 @@
1
+ import{a as ut,g as J,f as pt,d as yt}from"./chunk-D6G4REZN-DZQFfclG.js";import{_ as s,g as dt,s as ft,a as gt,b as mt,q as xt,p as kt,c as A,d as _t,y as bt}from"./mermaid-CwhZbs51.js";import{s as K}from"./transform-DetRMEbJ.js";import{d as Q}from"./arc-CfyY4LWz.js";import"./index-DITk7HL4.js";import"./step-BwsUM5iJ.js";import"./timer-Bqd5yn_a.js";var z=function(){var t=s(function(n,p,a,u){for(a=a||{},u=n.length;u--;a[n[u]]=p);return a},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],l=[1,10],i=[1,11],o=[1,12],h=[1,13],d=[1,14],y={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(n,p,a,u,f,c,v){var x=c.length-1;switch(f){case 1:return c[x-1];case 2:case 6:case 7:this.$=[];break;case 3:c[x-1].push(c[x]),this.$=c[x-1];break;case 4:case 5:this.$=c[x];break;case 8:u.setDiagramTitle(c[x].substr(6)),this.$=c[x].substr(6);break;case 9:this.$=c[x].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=c[x].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(c[x].substr(8)),this.$=c[x].substr(8);break;case 13:u.addTask(c[x-1],c[x]),this.$="task"}},"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:i,16:o,17:h,18:d},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:l,14:i,16:o,17:h,18:d},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(n,p){if(!p.recoverable){var a=new Error(n);throw a.hash=p,a}this.trace(n)},"parseError"),parse:s(function(n){var p=this,a=[0],u=[],f=[null],c=[],v=this.table,x="",L=0,X=0,lt=c.slice.call(arguments,1),k=Object.create(this.lexer),M={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(M.yy[N]=this.yy[N]);k.setInput(n,M.yy),M.yy.lexer=k,M.yy.parser=this,k.yylloc===void 0&&(k.yylloc={});var R=k.yylloc;c.push(R);var ht=k.options&&k.options.ranges;function G(){var w;return typeof(w=u.pop()||k.lex()||1)!="number"&&(w instanceof Array&&(w=(u=w).pop()),w=p.symbols_[w]||w),w}typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s(function(w){a.length=a.length-2*w,f.length=f.length-w,c.length=c.length-w},"popStack"),s(G,"lex");for(var _,E,b,U,O,T,H,B,P={};;){if(E=a[a.length-1],this.defaultActions[E]?b=this.defaultActions[E]:(_==null&&(_=G()),b=v[E]&&v[E][_]),b===void 0||!b.length||!b[0]){var Z="";for(O in B=[],v[E])this.terminals_[O]&&O>2&&B.push("'"+this.terminals_[O]+"'");Z=k.showPosition?"Parse error on line "+(L+1)+`:
2
+ `+k.showPosition()+`
3
+ Expecting `+B.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(L+1)+": Unexpected "+(_==1?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Z,{text:k.match,token:this.terminals_[_]||_,line:k.yylineno,loc:R,expected:B})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(b[0]){case 1:a.push(_),f.push(k.yytext),c.push(k.yylloc),a.push(b[1]),_=null,X=k.yyleng,x=k.yytext,L=k.yylineno,R=k.yylloc;break;case 2:if(T=this.productions_[b[1]][1],P.$=f[f.length-T],P._$={first_line:c[c.length-(T||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(T||1)].first_column,last_column:c[c.length-1].last_column},ht&&(P._$.range=[c[c.length-(T||1)].range[0],c[c.length-1].range[1]]),(U=this.performAction.apply(P,[x,X,L,M.yy,b[1],f,c].concat(lt)))!==void 0)return U;T&&(a=a.slice(0,-1*T*2),f=f.slice(0,-1*T),c=c.slice(0,-1*T)),a.push(this.productions_[b[1]][0]),f.push(P.$),c.push(P._$),H=v[a[a.length-2]][a[a.length-1]],a.push(H);break;case 3:return!0}}return!0},"parse")},m=function(){return{EOF:1,parseError:s(function(n,p){if(!this.yy.parser)throw new Error(n);this.yy.parser.parseError(n,p)},"parseError"),setInput:s(function(n,p){return this.yy=p||this.yy||{},this._input=n,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 n=this._input[0];return this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n,n.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:s(function(n){var p=n.length,a=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var u=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),a.length-1&&(this.yylineno-=a.length-1);var f=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:a?(a.length===u.length?this.yylloc.first_column:0)+u[u.length-a.length].length-a[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:s(function(n){this.unput(this.match.slice(n))},"less"),pastInput:s(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var n=this.pastInput(),p=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
5
+ `+p+"^"},"showPosition"),test_match:s(function(n,p){var a,u,f;if(this.options.backtrack_lexer&&(f={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&&(f.yylloc.range=this.yylloc.range.slice(0))),(u=n[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],a=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var c in f)this[c]=f[c];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;var n,p,a,u;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),c=0;c<f.length;c++)if((a=this._input.match(this.rules[f[c]]))&&(!p||a[0].length>p[0].length)){if(p=a,u=c,this.options.backtrack_lexer){if((n=this.test_match(a,f[c]))!==!1)return n;if(this._backtrack){p=!1;continue}return!1}if(!this.options.flex)break}return p?(n=this.test_match(p,f[u]))!==!1&&n: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 n=this.next();return n||this.lex()},"lex"),begin:s(function(n){this.conditionStack.push(n)},"begin"),popState:s(function(){return this.conditionStack.length-1>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(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:s(function(n){this.begin(n)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(n,p,a,u){switch(a){case 0:case 1:case 3:case 4:break;case 2:return 10;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}}}}();function g(){this.yy={}}return y.lexer=m,s(g,"Parser"),g.prototype=y,y.Parser=g,new g}();z.parser=z;var wt=z,C="",Y=[],j=[],V=[],$t=s(function(){Y.length=0,j.length=0,C="",V.length=0,bt()},"clear"),vt=s(function(t){C=t,Y.push(t)},"addSection"),Tt=s(function(){return Y},"getSections"),St=s(function(){let t=tt(),e=0;for(;!t&&e<100;)t=tt(),e++;return j.push(...V),j},"getTasks"),Mt=s(function(){const t=[];return j.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),Et=s(function(t,e){const r=e.substr(1).split(":");let l=0,i=[];r.length===1?(l=Number(r[0]),i=[]):(l=Number(r[0]),i=r[1].split(","));const o=i.map(d=>d.trim()),h={section:C,type:C,people:o,task:t,score:l};V.push(h)},"addTask"),At=s(function(t){const e={section:C,type:C,description:t,task:t,classes:[]};j.push(e)},"addTaskOrg"),tt=s(function(){const t=s(function(r){return V[r].processed},"compileTask");let e=!0;for(const[r,l]of V.entries())t(r),e=e&&l.processed;return e},"compileTasks"),It=s(function(){return Mt()},"getActors"),et={getConfig:s(()=>A().journey,"getConfig"),clear:$t,setDiagramTitle:kt,getDiagramTitle:xt,setAccTitle:mt,getAccTitle:gt,setAccDescription:ft,getAccDescription:dt,addSection:vt,getSections:Tt,getTasks:St,addTask:Et,addTaskOrg:At,getActors:It},Pt=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
+ `,"getStyles"),q=s(function(t,e){return yt(t,e)},"drawRect"),Ct=s(function(t,e){const l=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function o(y){const m=Q().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function h(y){const m=Q().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function d(y){y.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 i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s(o,"smile"),s(h,"sad"),s(d,"ambivalent"),e.score>3?o(i):e.score<3?h(i):d(i),l},"drawFace"),nt=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"),it=s(function(t,e){return pt(t,e)},"drawText"),jt=s(function(t,e){function r(i,o,h,d,y){return i+","+o+" "+(i+h)+","+o+" "+(i+h)+","+(o+d-y)+" "+(i+h-1.2*y)+","+(o+d)+" "+i+","+(o+d)}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,it(t,e)},"drawLabel"),Vt=s(function(t,e,r){const l=t.append("g"),i=J();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,q(l,i),at(r)(e.text,l,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),st=-1,Ft=s(function(t,e,r){const l=e.x+r.width/2,i=t.append("g");st++,i.append("line").attr("id","task"+st).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"),Ct(i,{cx:l,cy:300+30*(5-e.score),score:e.score});const o=J();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,q(i,o);let h=e.x+14;e.people.forEach(d=>{const y=e.actors[d].color,m={cx:h,cy:e.y,r:7,fill:y,stroke:"#000",title:d,pos:e.actors[d].position};nt(i,m),h+=10}),at(r)(e.task,i,o.x,o.y,o.width,o.height,{class:"task"},r,e.colour)},"drawTask"),Lt=s(function(t,e){ut(t,e)},"drawBackgroundRect"),at=function(){function t(i,o,h,d,y,m,g,n){l(o.append("text").attr("x",h+y/2).attr("y",d+m/2+5).style("font-color",n).style("text-anchor","middle").text(i),g)}function e(i,o,h,d,y,m,g,n,p){const{taskFontSize:a,taskFontFamily:u}=n,f=i.split(/<br\s*\/?>/gi);for(let c=0;c<f.length;c++){const v=c*a-a*(f.length-1)/2,x=o.append("text").attr("x",h+y/2).attr("y",d).attr("fill",p).style("text-anchor","middle").style("font-size",a).style("font-family",u);x.append("tspan").attr("x",h+y/2).attr("dy",v).text(f[c]),x.attr("y",d+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(x,g)}}function r(i,o,h,d,y,m,g,n){const p=o.append("switch"),a=p.append("foreignObject").attr("x",h).attr("y",d).attr("width",y).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(i),e(i,p,h,d,y,m,g,n),l(a,g)}function l(i,o){for(const h in o)h in o&&i.attr(h,o[h])}return s(t,"byText"),s(e,"byTspan"),s(r,"byFo"),s(l,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),F={drawRect:q,drawCircle:nt,drawSection:Vt,drawText:it,drawLabel:jt,drawTask:Ft,drawBackgroundRect:Lt,initGraphics: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")},Ot=s(function(t){Object.keys(t).forEach(function(e){D[e]=t[e]})},"setConf"),S={};function rt(t){const e=A().journey;let r=60;Object.keys(S).forEach(l=>{const i=S[l].color,o={cx:20,cy:r,r:7,fill:i,stroke:"#000",pos:S[l].position};F.drawCircle(t,o);const h={x:40,y:r+7,fill:"#666",text:l,textMargin:5|e.boxTextMargin};F.drawText(t,h),r+=20})}s(rt,"drawActorLegend");var D=A().journey,I=D.leftMargin,Bt=s(function(t,e,r,l){const i=A().journey,o=A().securityLevel;let h;o==="sandbox"&&(h=K("#i"+e));const d=K(o==="sandbox"?h.nodes()[0].contentDocument.body:"body");$.init();const y=d.select("#"+e);F.initGraphics(y);const m=l.db.getTasks(),g=l.db.getDiagramTitle(),n=l.db.getActors();for(const v in S)delete S[v];let p=0;n.forEach(v=>{S[v]={color:i.actorColours[p%i.actorColours.length],position:p},p++}),rt(y),$.insert(0,0,I,50*Object.keys(S).length),Dt(y,m,0);const a=$.getBounds();g&&y.append("text").text(g).attr("x",I).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const u=a.stopy-a.starty+2*i.diagramMarginY,f=I+a.stopx+2*i.diagramMarginX;_t(y,u,f,i.useMaxWidth),y.append("line").attr("x1",I).attr("y1",4*i.height).attr("x2",f-I-4).attr("y2",4*i.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const c=g?70:0;y.attr("viewBox",`${a.startx} -25 ${f} ${u+c}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",u+c+25)},"draw"),$={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 i=A().journey,o=this;let h=0;function d(y){return s(function(m){h++;const g=o.sequenceItems.length-h+1;o.updateVal(m,"starty",e-g*i.boxMargin,Math.min),o.updateVal(m,"stopy",l+g*i.boxMargin,Math.max),o.updateVal($.data,"startx",t-g*i.boxMargin,Math.min),o.updateVal($.data,"stopx",r+g*i.boxMargin,Math.max),y!=="activation"&&(o.updateVal(m,"startx",t-g*i.boxMargin,Math.min),o.updateVal(m,"stopx",r+g*i.boxMargin,Math.max),o.updateVal($.data,"starty",e-g*i.boxMargin,Math.min),o.updateVal($.data,"stopy",l+g*i.boxMargin,Math.max))},"updateItemBounds")}s(d,"updateFn"),this.sequenceItems.forEach(d())},"updateBounds"),insert:s(function(t,e,r,l){const i=Math.min(t,r),o=Math.max(t,r),h=Math.min(e,l),d=Math.max(e,l);this.updateVal($.data,"startx",i,Math.min),this.updateVal($.data,"starty",h,Math.min),this.updateVal($.data,"stopx",o,Math.max),this.updateVal($.data,"stopy",d,Math.max),this.updateBounds(i,h,o,d)},"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")},W=D.sectionFills,ot=D.sectionColours,Dt=s(function(t,e,r){const l=A().journey;let i="";const o=r+(2*l.height+l.diagramMarginY);let h=0,d="#CCC",y="black",m=0;for(const[g,n]of e.entries()){if(i!==n.section){d=W[h%W.length],m=h%W.length,y=ot[h%ot.length];let a=0;const u=n.section;for(let c=g;c<e.length&&e[c].section==u;c++)a+=1;const f={x:g*l.taskMargin+g*l.width+I,y:50,text:n.section,fill:d,num:m,colour:y,taskCount:a};F.drawSection(t,f,l),i=n.section,h++}const p=n.people.reduce((a,u)=>(S[u]&&(a[u]=S[u]),a),{});n.x=g*l.taskMargin+g*l.width+I,n.y=o,n.width=l.diagramMarginX,n.height=l.diagramMarginY,n.colour=y,n.fill=d,n.num=m,n.actors=p,F.drawTask(t,n,l),$.insert(n.x,n.y,n.x+n.width+l.taskMargin,450)}},"drawTasks"),ct={setConf:Ot,draw:Bt},Nt={parser:wt,db:et,renderer:ct,styles:Pt,init:s(t=>{ct.setConf(t.journey),et.clear()},"init")};export{Nt as diagram};
@@ -1,14 +1,14 @@
1
- import{g as gt}from"./chunk-E2GYISFI-CPwLrORh.js";import{_ as a,l as Y,c as W,I as ut,$ as dt,a0 as pt,a1 as yt,T as ft,G as K,h as B,t as mt,J as bt,V as Et,W as rt,X as at}from"./mermaid-CjHlE8Co.js";import"./index-DDdlzLJw.js";import"./transform-DetRMEbJ.js";import"./timer-Bqd5yn_a.js";import"./step-BwsUM5iJ.js";var q=function(){var t=a(function(e,l,r,o){for(r=r||{},o=e.length;o--;r[e[o]]=l);return r},"o"),d=[1,4],u=[1,13],s=[1,12],f=[1,15],p=[1,16],g=[1,20],y=[1,19],D=[6,7,8],v=[1,26],N=[1,24],A=[1,25],i=[6,7,11],G=[1,31],L=[6,7,11,24],F=[1,6,13,16,17,20,23],U=[1,35],M=[1,36],w=[1,6,7,11,13,16,17,20,23],E=[1,38],I={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(e,l,r,o,h,n,j){var c=n.length-1;switch(h){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[c-1].id),o.addNode(n[c-2].length,n[c-1].id,n[c-1].descr,n[c-1].type,n[c]);break;case 16:o.getLogger().info("Node: ",n[c].id),o.addNode(n[c-1].length,n[c].id,n[c].descr,n[c].type);break;case 17:o.getLogger().trace("Icon: ",n[c]),o.decorateNode({icon:n[c]});break;case 18:case 23:o.decorateNode({class:n[c]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",n[c-1].id),o.addNode(0,n[c-1].id,n[c-1].descr,n[c-1].type,n[c]);break;case 21:o.getLogger().trace("Node: ",n[c].id),o.addNode(0,n[c].id,n[c].descr,n[c].type);break;case 22:o.decorateNode({icon:n[c]});break;case 27:o.getLogger().trace("node found ..",n[c-2]),this.$={id:n[c-1],descr:n[c-1],type:o.getType(n[c-2],n[c])};break;case 28:this.$={id:n[c],descr:n[c],type:0};break;case 29:o.getLogger().trace("node found ..",n[c-3]),this.$={id:n[c-3],descr:n[c-1],type:o.getType(n[c-2],n[c])};break;case 30:this.$=n[c-1]+n[c];break;case 31:this.$=n[c]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:u,7:[1,10],9:9,12:11,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},t(D,[2,3]),{1:[2,2]},t(D,[2,4]),t(D,[2,5]),{1:[2,6],6:u,12:21,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},{6:u,9:22,12:11,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},{6:v,7:N,10:23,11:A},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:g,23:y}),t(i,[2,19]),t(i,[2,21],{15:30,24:G}),t(i,[2,22]),t(i,[2,23]),t(L,[2,25]),t(L,[2,26]),t(L,[2,28],{20:[1,32]}),{21:[1,33]},{6:v,7:N,10:34,11:A},{1:[2,7],6:u,12:21,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},t(F,[2,14],{7:U,11:M}),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(i,[2,16],{15:37,24:G}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:E}),t(L,[2,31]),{21:[1,39]},{22:[1,40]},t(F,[2,13],{7:U,11:M}),t(w,[2,11]),t(w,[2,12]),t(i,[2,15],{24:E}),t(L,[2,30]),{22:[1,41]},t(L,[2,27]),t(L,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:a(function(e,l){if(!l.recoverable){var r=new Error(e);throw r.hash=l,r}this.trace(e)},"parseError"),parse:a(function(e){var l=this,r=[0],o=[],h=[null],n=[],j=this.table,c="",H=0,et=0,lt=n.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);b.setInput(e,T.yy),T.yy.lexer=b,T.yy.parser=this,b.yylloc===void 0&&(b.yylloc={});var V=b.yylloc;n.push(V);var ht=b.options&&b.options.ranges;function nt(){var S;return typeof(S=o.pop()||b.lex()||1)!="number"&&(S instanceof Array&&(S=(o=S).pop()),S=l.symbols_[S]||S),S}typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(S){r.length=r.length-2*S,h.length=h.length-S,n.length=n.length-S},"popStack"),a(nt,"lex");for(var _,R,k,it,X,C,st,z,P={};;){if(R=r[r.length-1],this.defaultActions[R]?k=this.defaultActions[R]:(_==null&&(_=nt()),k=j[R]&&j[R][_]),k===void 0||!k.length||!k[0]){var ot="";for(X in z=[],j[R])this.terminals_[X]&&X>2&&z.push("'"+this.terminals_[X]+"'");ot=b.showPosition?"Parse error on line "+(H+1)+`:
1
+ import{_ as a,l as V,c as W,I as gt,Y as ut,$ as dt,a0 as pt,S as yt,G as K,h as B,t as ft,J as mt,T as bt,V as rt,W as at}from"./mermaid-CwhZbs51.js";import"./index-DITk7HL4.js";import"./transform-DetRMEbJ.js";import"./timer-Bqd5yn_a.js";import"./step-BwsUM5iJ.js";var q=function(){var t=a(function(e,l,r,o){for(r=r||{},o=e.length;o--;r[e[o]]=l);return r},"o"),d=[1,4],u=[1,13],s=[1,12],f=[1,15],p=[1,16],g=[1,20],y=[1,19],D=[6,7,8],v=[1,26],N=[1,24],A=[1,25],i=[6,7,11],G=[1,31],L=[6,7,11,24],F=[1,6,13,16,17,20,23],U=[1,35],M=[1,36],w=[1,6,7,11,13,16,17,20,23],E=[1,38],I={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(e,l,r,o,h,n,j){var c=n.length-1;switch(h){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[c-1].id),o.addNode(n[c-2].length,n[c-1].id,n[c-1].descr,n[c-1].type,n[c]);break;case 16:o.getLogger().info("Node: ",n[c].id),o.addNode(n[c-1].length,n[c].id,n[c].descr,n[c].type);break;case 17:o.getLogger().trace("Icon: ",n[c]),o.decorateNode({icon:n[c]});break;case 18:case 23:o.decorateNode({class:n[c]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",n[c-1].id),o.addNode(0,n[c-1].id,n[c-1].descr,n[c-1].type,n[c]);break;case 21:o.getLogger().trace("Node: ",n[c].id),o.addNode(0,n[c].id,n[c].descr,n[c].type);break;case 22:o.decorateNode({icon:n[c]});break;case 27:o.getLogger().trace("node found ..",n[c-2]),this.$={id:n[c-1],descr:n[c-1],type:o.getType(n[c-2],n[c])};break;case 28:this.$={id:n[c],descr:n[c],type:0};break;case 29:o.getLogger().trace("node found ..",n[c-3]),this.$={id:n[c-3],descr:n[c-1],type:o.getType(n[c-2],n[c])};break;case 30:this.$=n[c-1]+n[c];break;case 31:this.$=n[c]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:u,7:[1,10],9:9,12:11,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},t(D,[2,3]),{1:[2,2]},t(D,[2,4]),t(D,[2,5]),{1:[2,6],6:u,12:21,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},{6:u,9:22,12:11,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},{6:v,7:N,10:23,11:A},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:g,23:y}),t(i,[2,19]),t(i,[2,21],{15:30,24:G}),t(i,[2,22]),t(i,[2,23]),t(L,[2,25]),t(L,[2,26]),t(L,[2,28],{20:[1,32]}),{21:[1,33]},{6:v,7:N,10:34,11:A},{1:[2,7],6:u,12:21,13:s,14:14,16:f,17:p,18:17,19:18,20:g,23:y},t(F,[2,14],{7:U,11:M}),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(i,[2,16],{15:37,24:G}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:E}),t(L,[2,31]),{21:[1,39]},{22:[1,40]},t(F,[2,13],{7:U,11:M}),t(w,[2,11]),t(w,[2,12]),t(i,[2,15],{24:E}),t(L,[2,30]),{22:[1,41]},t(L,[2,27]),t(L,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:a(function(e,l){if(!l.recoverable){var r=new Error(e);throw r.hash=l,r}this.trace(e)},"parseError"),parse:a(function(e){var l=this,r=[0],o=[],h=[null],n=[],j=this.table,c="",H=0,et=0,lt=n.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(T.yy[Y]=this.yy[Y]);b.setInput(e,T.yy),T.yy.lexer=b,T.yy.parser=this,b.yylloc===void 0&&(b.yylloc={});var J=b.yylloc;n.push(J);var ht=b.options&&b.options.ranges;function nt(){var S;return typeof(S=o.pop()||b.lex()||1)!="number"&&(S instanceof Array&&(S=(o=S).pop()),S=l.symbols_[S]||S),S}typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(S){r.length=r.length-2*S,h.length=h.length-S,n.length=n.length-S},"popStack"),a(nt,"lex");for(var _,R,k,it,z,C,st,X,P={};;){if(R=r[r.length-1],this.defaultActions[R]?k=this.defaultActions[R]:(_==null&&(_=nt()),k=j[R]&&j[R][_]),k===void 0||!k.length||!k[0]){var ot="";for(z in X=[],j[R])this.terminals_[z]&&z>2&&X.push("'"+this.terminals_[z]+"'");ot=b.showPosition?"Parse error on line "+(H+1)+`:
2
2
  `+b.showPosition()+`
3
- Expecting `+z.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(H+1)+": Unexpected "+(_==1?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(ot,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:V,expected:z})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+_);switch(k[0]){case 1:r.push(_),h.push(b.yytext),n.push(b.yylloc),r.push(k[1]),_=null,et=b.yyleng,c=b.yytext,H=b.yylineno,V=b.yylloc;break;case 2:if(C=this.productions_[k[1]][1],P.$=h[h.length-C],P._$={first_line:n[n.length-(C||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(C||1)].first_column,last_column:n[n.length-1].last_column},ht&&(P._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),(it=this.performAction.apply(P,[c,et,H,T.yy,k[1],h,n].concat(lt)))!==void 0)return it;C&&(r=r.slice(0,-1*C*2),h=h.slice(0,-1*C),n=n.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),h.push(P.$),n.push(P._$),st=j[r[r.length-2]][r[r.length-1]],r.push(st);break;case 3:return!0}}return!0},"parse")},O=function(){return{EOF:1,parseError:a(function(e,l){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,l)},"parseError"),setInput:a(function(e,l){return this.yy=l||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];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(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 l=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var o=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 h=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===o.length?this.yylloc.first_column:0)+o[o.length-r.length].length-r[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).
3
+ Expecting `+X.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(H+1)+": Unexpected "+(_==1?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(ot,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:J,expected:X})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+_);switch(k[0]){case 1:r.push(_),h.push(b.yytext),n.push(b.yylloc),r.push(k[1]),_=null,et=b.yyleng,c=b.yytext,H=b.yylineno,J=b.yylloc;break;case 2:if(C=this.productions_[k[1]][1],P.$=h[h.length-C],P._$={first_line:n[n.length-(C||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(C||1)].first_column,last_column:n[n.length-1].last_column},ht&&(P._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),(it=this.performAction.apply(P,[c,et,H,T.yy,k[1],h,n].concat(lt)))!==void 0)return it;C&&(r=r.slice(0,-1*C*2),h=h.slice(0,-1*C),n=n.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),h.push(P.$),n.push(P._$),st=j[r[r.length-2]][r[r.length-1]],r.push(st);break;case 3:return!0}}return!0},"parse")},O=function(){return{EOF:1,parseError:a(function(e,l){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,l)},"parseError"),setInput:a(function(e,l){return this.yy=l||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];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(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 l=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var o=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 h=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===o.length?this.yylloc.first_column:0)+o[o.length-r.length].length-r[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"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(),l=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
5
5
  `+l+"^"},"showPosition"),test_match:a(function(e,l){var r,o,h;if(this.options.backtrack_lexer&&(h={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&&(h.yylloc.range=this.yylloc.range.slice(0))),(o=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.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,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in h)this[n]=h[n];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;var e,l,r,o;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),n=0;n<h.length;n++)if((r=this._input.match(this.rules[h[n]]))&&(!l||r[0].length>l[0].length)){if(l=r,o=n,this.options.backtrack_lexer){if((e=this.test_match(r,h[n]))!==!1)return e;if(this._backtrack){l=!1;continue}return!1}if(!this.options.flex)break}return l?(e=this.test_match(l,h[o]))!==!1&&e: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(){return this.conditionStack.length-1>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))>=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,l,r,o){switch(r){case 0:return this.pushState("shapeData"),l.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const h=/\n\s*/g;return l.yytext=l.yytext.replace(h,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return e.getLogger().trace("Found comment",l.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;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:case 21:case 22: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 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",l.yytext),"NODE_DESCR";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 ...",l.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return e.getLogger().trace("Long description:",l.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}}}}();function $(){this.yy={}}return I.lexer=O,a($,"Parser"),$.prototype=I,I.Parser=$,new $}();q.parser=q;var _t=q,x=[],Q=[],Z=0,tt={},kt=a(()=>{x=[],Q=[],Z=0,tt={}},"clear"),St=a(t=>{if(x.length===0)return null;const d=x[0].level;let u=null;for(let s=x.length-1;s>=0;s--)if(x[s].level!==d||u||(u=x[s]),x[s].level<d)throw new Error('Items without section detected, found section ("'+x[s].label+'")');return t===(u==null?void 0:u.level)?null:u},"getSection"),ct=a(function(){return Q},"getSections"),xt=a(function(){const t=[],d=ct(),u=W();for(const s of d){const f={id:s.id,label:B(s.label??"",u),isGroup:!0,ticket:s.ticket,shape:"kanbanSection",level:s.level,look:u.look};t.push(f);const p=x.filter(g=>g.parentId===s.id);for(const g of p){const y={id:g.id,parentId:s.id,label:B(g.label??"",u),isGroup:!1,ticket:g==null?void 0:g.ticket,priority:g==null?void 0:g.priority,assigned:g==null?void 0:g.assigned,icon:g==null?void 0:g.icon,shape:"kanbanItem",level:g.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(y)}}return{nodes:t,edges:[],other:{},config:W()}},"getData"),Nt=a((t,d,u,s,f)=>{var v,N;const p=W();let g=((v=p.mindmap)==null?void 0:v.padding)??K.mindmap.padding;switch(s){case m.ROUNDED_RECT:case m.RECT:case m.HEXAGON:g*=2}const y={id:B(d,p)||"kbn"+Z++,level:t,label:B(u,p),width:((N=p.mindmap)==null?void 0:N.maxNodeWidth)??K.mindmap.maxNodeWidth,padding:g,isGroup:!1};if(f!==void 0){let A;A=f.includes(`
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(){return this.conditionStack.length-1>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))>=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,l,r,o){switch(r){case 0:return this.pushState("shapeData"),l.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const h=/\n\s*/g;return l.yytext=l.yytext.replace(h,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return e.getLogger().trace("Found comment",l.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;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:case 21:case 22: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 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",l.yytext),"NODE_DESCR";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 ...",l.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return e.getLogger().trace("Long description:",l.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}}}}();function $(){this.yy={}}return I.lexer=O,a($,"Parser"),$.prototype=I,I.Parser=$,new $}();q.parser=q;var Et=q,x=[],Q=[],Z=0,tt={},_t=a(()=>{x=[],Q=[],Z=0,tt={}},"clear"),kt=a(t=>{if(x.length===0)return null;const d=x[0].level;let u=null;for(let s=x.length-1;s>=0;s--)if(x[s].level!==d||u||(u=x[s]),x[s].level<d)throw new Error('Items without section detected, found section ("'+x[s].label+'")');return t===(u==null?void 0:u.level)?null:u},"getSection"),ct=a(function(){return Q},"getSections"),St=a(function(){const t=[],d=ct(),u=W();for(const s of d){const f={id:s.id,label:B(s.label??"",u),isGroup:!0,ticket:s.ticket,shape:"kanbanSection",level:s.level,look:u.look};t.push(f);const p=x.filter(g=>g.parentId===s.id);for(const g of p){const y={id:g.id,parentId:s.id,label:B(g.label??"",u),isGroup:!1,ticket:g==null?void 0:g.ticket,priority:g==null?void 0:g.priority,assigned:g==null?void 0:g.assigned,icon:g==null?void 0:g.icon,shape:"kanbanItem",level:g.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(y)}}return{nodes:t,edges:[],other:{},config:W()}},"getData"),xt=a((t,d,u,s,f)=>{var v,N;const p=W();let g=((v=p.mindmap)==null?void 0:v.padding)??K.mindmap.padding;switch(s){case m.ROUNDED_RECT:case m.RECT:case m.HEXAGON:g*=2}const y={id:B(d,p)||"kbn"+Z++,level:t,label:B(u,p),width:((N=p.mindmap)==null?void 0:N.maxNodeWidth)??K.mindmap.maxNodeWidth,padding:g,isGroup:!1};if(f!==void 0){let A;A=f.includes(`
7
7
  `)?f+`
8
8
  `:`{
9
9
  `+f+`
10
- }`;const i=mt(A,{schema:bt});if(i.shape&&(i.shape!==i.shape.toLowerCase()||i.shape.includes("_")))throw new Error(`No such shape: ${i.shape}. Shape names should be lowercase.`);i!=null&&i.shape&&i.shape==="kanbanItem"&&(y.shape=i==null?void 0:i.shape),i!=null&&i.label&&(y.label=i==null?void 0:i.label),i!=null&&i.icon&&(y.icon=i==null?void 0:i.icon.toString()),i!=null&&i.assigned&&(y.assigned=i==null?void 0:i.assigned.toString()),i!=null&&i.ticket&&(y.ticket=i==null?void 0:i.ticket.toString()),i!=null&&i.priority&&(y.priority=i==null?void 0:i.priority)}const D=St(t);D?y.parentId=D.id||"kbn"+Z++:Q.push(y),x.push(y)},"addNode"),m={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Lt={clear:kt,addNode:Nt,getSections:ct,getData:xt,nodeType:m,getType:a((t,d)=>{switch(Y.debug("In get type",t,d),t){case"[":return m.RECT;case"(":return d===")"?m.ROUNDED_RECT:m.CLOUD;case"((":return m.CIRCLE;case")":return m.CLOUD;case"))":return m.BANG;case"{{":return m.HEXAGON;default:return m.DEFAULT}},"getType"),setElementForId:a((t,d)=>{tt[t]=d},"setElementForId"),decorateNode:a(t=>{if(!t)return;const d=W(),u=x[x.length-1];t.icon&&(u.icon=B(t.icon,d)),t.class&&(u.cssClasses=B(t.class,d))},"decorateNode"),type2Str:a(t=>{switch(t){case m.DEFAULT:return"no-border";case m.RECT:return"rect";case m.ROUNDED_RECT:return"rounded-rect";case m.CIRCLE:return"circle";case m.CLOUD:return"cloud";case m.BANG:return"bang";case m.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:a(()=>Y,"getLogger"),getElementById:a(t=>tt[t],"getElementById")},Dt={draw:a(async(t,d,u,s)=>{var L,F,U,M,w;Y.debug(`Rendering kanban diagram
11
- `+t);const f=s.db.getData(),p=W();p.htmlLabels=!1;const g=ut(d),y=g.append("g");y.attr("class","sections");const D=g.append("g");D.attr("class","items");const v=f.nodes.filter(E=>E.isGroup);let N=0;const A=[];let i=25;for(const E of v){const I=((L=p==null?void 0:p.kanban)==null?void 0:L.sectionWidth)||200;N+=1,E.x=I*N+10*(N-1)/2,E.width=I,E.y=0,E.height=3*I,E.rx=5,E.ry=5,E.cssClasses=E.cssClasses+" section-"+N;const O=await dt(y,E);i=Math.max(i,(F=O==null?void 0:O.labelBBox)==null?void 0:F.height),A.push(O)}let G=0;for(const E of v){const I=A[G];G+=1;const O=((U=p==null?void 0:p.kanban)==null?void 0:U.sectionWidth)||200,$=3*-O/2+i;let e=$;const l=f.nodes.filter(h=>h.parentId===E.id);for(const h of l){if(h.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");h.x=E.x,h.width=O-15;const n=(await pt(D,h,{config:p})).node().getBBox();h.y=e+n.height/2,await yt(h),e=h.y+n.height/2+5}const r=I.cluster.select("rect"),o=Math.max(e-$+30,50)+(i-25);r.attr("height",o)}ft(void 0,g,((M=p.mindmap)==null?void 0:M.padding)??K.kanban.padding,((w=p.mindmap)==null?void 0:w.useMaxWidth)??K.kanban.useMaxWidth)},"draw")},It=a(t=>{let d="";for(let s=0;s<t.THEME_COLOR_LIMIT;s++)t["lineColor"+s]=t["lineColor"+s]||t["cScaleInv"+s],Et(t["lineColor"+s])?t["lineColor"+s]=rt(t["lineColor"+s],20):t["lineColor"+s]=at(t["lineColor"+s],20);const u=a((s,f)=>t.darkMode?at(s,f):rt(s,f),"adjuster");for(let s=0;s<t.THEME_COLOR_LIMIT;s++){const f=""+(17-3*s);d+=`
10
+ }`;const i=ft(A,{schema:mt});if(i.shape&&(i.shape!==i.shape.toLowerCase()||i.shape.includes("_")))throw new Error(`No such shape: ${i.shape}. Shape names should be lowercase.`);i!=null&&i.shape&&i.shape==="kanbanItem"&&(y.shape=i==null?void 0:i.shape),i!=null&&i.label&&(y.label=i==null?void 0:i.label),i!=null&&i.icon&&(y.icon=i==null?void 0:i.icon.toString()),i!=null&&i.assigned&&(y.assigned=i==null?void 0:i.assigned.toString()),i!=null&&i.ticket&&(y.ticket=i==null?void 0:i.ticket.toString()),i!=null&&i.priority&&(y.priority=i==null?void 0:i.priority)}const D=kt(t);D?y.parentId=D.id||"kbn"+Z++:Q.push(y),x.push(y)},"addNode"),m={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Nt={clear:_t,addNode:xt,getSections:ct,getData:St,nodeType:m,getType:a((t,d)=>{switch(V.debug("In get type",t,d),t){case"[":return m.RECT;case"(":return d===")"?m.ROUNDED_RECT:m.CLOUD;case"((":return m.CIRCLE;case")":return m.CLOUD;case"))":return m.BANG;case"{{":return m.HEXAGON;default:return m.DEFAULT}},"getType"),setElementForId:a((t,d)=>{tt[t]=d},"setElementForId"),decorateNode:a(t=>{if(!t)return;const d=W(),u=x[x.length-1];t.icon&&(u.icon=B(t.icon,d)),t.class&&(u.cssClasses=B(t.class,d))},"decorateNode"),type2Str:a(t=>{switch(t){case m.DEFAULT:return"no-border";case m.RECT:return"rect";case m.ROUNDED_RECT:return"rounded-rect";case m.CIRCLE:return"circle";case m.CLOUD:return"cloud";case m.BANG:return"bang";case m.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:a(()=>V,"getLogger"),getElementById:a(t=>tt[t],"getElementById")},Lt={draw:a(async(t,d,u,s)=>{var L,F,U,M,w;V.debug(`Rendering kanban diagram
11
+ `+t);const f=s.db.getData(),p=W();p.htmlLabels=!1;const g=gt(d),y=g.append("g");y.attr("class","sections");const D=g.append("g");D.attr("class","items");const v=f.nodes.filter(E=>E.isGroup);let N=0;const A=[];let i=25;for(const E of v){const I=((L=p==null?void 0:p.kanban)==null?void 0:L.sectionWidth)||200;N+=1,E.x=I*N+10*(N-1)/2,E.width=I,E.y=0,E.height=3*I,E.rx=5,E.ry=5,E.cssClasses=E.cssClasses+" section-"+N;const O=await ut(y,E);i=Math.max(i,(F=O==null?void 0:O.labelBBox)==null?void 0:F.height),A.push(O)}let G=0;for(const E of v){const I=A[G];G+=1;const O=((U=p==null?void 0:p.kanban)==null?void 0:U.sectionWidth)||200,$=3*-O/2+i;let e=$;const l=f.nodes.filter(h=>h.parentId===E.id);for(const h of l){if(h.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");h.x=E.x,h.width=O-15;const n=(await dt(D,h,{config:p})).node().getBBox();h.y=e+n.height/2,await pt(h),e=h.y+n.height/2+5}const r=I.cluster.select("rect"),o=Math.max(e-$+30,50)+(i-25);r.attr("height",o)}yt(void 0,g,((M=p.mindmap)==null?void 0:M.padding)??K.kanban.padding,((w=p.mindmap)==null?void 0:w.useMaxWidth)??K.kanban.useMaxWidth)},"draw")},Dt=a(t=>{let d="";for(let s=0;s<t.THEME_COLOR_LIMIT;s++)t["lineColor"+s]=t["lineColor"+s]||t["cScaleInv"+s],bt(t["lineColor"+s])?t["lineColor"+s]=rt(t["lineColor"+s],20):t["lineColor"+s]=at(t["lineColor"+s],20);const u=a((s,f)=>t.darkMode?at(s,f):rt(s,f),"adjuster");for(let s=0;s<t.THEME_COLOR_LIMIT;s++){const f=""+(17-3*s);d+=`
12
12
  .section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {
13
13
  fill: ${u(t["cScale"+s],10)};
14
14
  stroke: ${u(t["cScale"+s],10)};
@@ -54,11 +54,11 @@ Expecting `+z.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on l
54
54
  stroke: ${t.nodeBorder};
55
55
  text-decoration: underline;
56
56
  }
57
- `}return d},"genSections"),Ot={db:Lt,renderer:Dt,parser:_t,styles:a(t=>`
57
+ `}return d},"genSections"),It={db:Nt,renderer:Lt,parser:Et,styles:a(t=>`
58
58
  .edge {
59
59
  stroke-width: 3;
60
60
  }
61
- ${It(t)}
61
+ ${Dt(t)}
62
62
  .section-root rect, .section-root path, .section-root circle, .section-root polygon {
63
63
  fill: ${t.git0};
64
64
  }
@@ -85,5 +85,4 @@ Expecting `+z.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on l
85
85
  dominant-baseline: middle;
86
86
  text-align: center;
87
87
  }
88
- ${gt()}
89
- `,"getStyles")};export{Ot as diagram};
88
+ `,"getStyles")};export{It as diagram};
@@ -1 +1 @@
1
- import{G as R}from"./graph-C4PkZZxf.js";import{b as Cn,e as on,c as h,i as I,f as S,v as L,r as q}from"./_baseUniq-hliKyzdp.js";import{b as an,a as Sn,m as k,c as G,h as un,f as J,l as Y,d as Gn}from"./min-DrLXTftx.js";import{cp as Fn,bX as Vn,db as Bn,aD as qn,dc as Yn,d4 as zn,dd as F,de as M,O as Dn,Z as An,df as z,dg as X}from"./index-DDdlzLJw.js";import{c as dn,a as cn}from"./_baseEach-C52A37kN.js";import{s as V}from"./sortBy-6rZ1GeDf.js";function Jn(n){return Cn(n,5)}function Xn(n,t){return n>t}function D(n,t){var r={};return t=cn(t),dn(n,function(u,a,c){Bn(r,a,t(u,a,c))}),r}function T(n){return n&&n.length?an(n,qn,Xn):void 0}function Z(n,t){return n&&n.length?an(n,cn(t),Sn):void 0}var Zn=0;function H(n){var t=++Zn;return Yn(n)+t}class Hn{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return sn(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&sn(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,u=r._prev;u!==r;)t.push(JSON.stringify(u,Kn)),u=u._prev;return"["+t.join(", ")+"]"}}function sn(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function Kn(n,t){if(n!=="_next"&&n!=="_prev")return t}var Qn=Dn(1);function Un(n,t){if(n.nodeCount()<=1)return[];var r=function(a,c){var e=new R,i=0,o=0;h(a.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),h(a.edges(),function(s){var g=e.edge(s.v,s.w)||0,v=c(s),p=g+v;e.setEdge(s.v,s.w,p),o=Math.max(o,e.node(s.v).out+=v),i=Math.max(i,e.node(s.w).in+=v)});var d=M(o+i+3).map(function(){return new Hn}),f=i+1;return h(e.nodes(),function(s){Q(d,f,e.node(s))}),{graph:e,buckets:d,zeroIdx:f}}(n,t||Qn),u=function(a,c,e){for(var i,o=[],d=c[c.length-1],f=c[0];a.nodeCount();){for(;i=f.dequeue();)K(a,c,e,i);for(;i=d.dequeue();)K(a,c,e,i);if(a.nodeCount()){for(var s=c.length-2;s>0;--s)if(i=c[s].dequeue()){o=o.concat(K(a,c,e,i,!0));break}}}return o}(r.graph,r.buckets,r.zeroIdx);return F(k(u,function(a){return n.outEdges(a.v,a.w)}))}function K(n,t,r,u,a){var c=a?[]:void 0;return h(n.inEdges(u.v),function(e){var i=n.edge(e),o=n.node(e.v);a&&c.push({v:e.v,w:e.w}),o.out-=i,Q(t,r,o)}),h(n.outEdges(u.v),function(e){var i=n.edge(e),o=e.w,d=n.node(o);d.in-=i,Q(t,r,d)}),n.removeNode(u.v),c}function Q(n,t,r){r.out?r.in?n[r.out-r.in+t].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function Wn(n){var t=n.graph().acyclicer==="greedy"?Un(n,function(r){return function(u){return r.edge(u).weight}}(n)):function(r){var u=[],a={},c={};function e(i){Object.prototype.hasOwnProperty.call(c,i)||(c[i]=!0,a[i]=!0,h(r.outEdges(i),function(o){Object.prototype.hasOwnProperty.call(a,o.w)?u.push(o):e(o.w)}),delete a[i])}return h(r.nodes(),e),u}(n);h(t,function(r){var u=n.edge(r);n.removeEdge(r),u.forwardName=r.name,u.reversed=!0,n.setEdge(r.w,r.v,u,H("rev"))})}function C(n,t,r,u){var a;do a=H(u);while(n.hasNode(a));return r.dummy=t,n.setNode(a,r),a}function fn(n){var t=new R({multigraph:n.isMultigraph()}).setGraph(n.graph());return h(n.nodes(),function(r){n.children(r).length||t.setNode(r,n.node(r))}),h(n.edges(),function(r){t.setEdge(r,n.edge(r))}),t}function hn(n,t){var r,u,a=n.x,c=n.y,e=t.x-a,i=t.y-c,o=n.width/2,d=n.height/2;if(!e&&!i)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(i)*o>Math.abs(e)*d?(i<0&&(d=-d),r=d*e/i,u=d):(e<0&&(o=-o),r=o,u=o*i/e),{x:a+r,y:c+u}}function A(n){var t=k(M(vn(n)+1),function(){return[]});return h(n.nodes(),function(r){var u=n.node(r),a=u.rank;I(a)||(t[a][u.order]=r)}),t}function gn(n,t,r,u){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=u),C(n,"border",a,t)}function vn(n){return T(k(n.nodes(),function(t){var r=n.node(t).rank;if(!I(r))return r}))}function $n(n,t){return t()}function ln(n,t,r,u,a,c){var e={width:0,height:0,rank:c,borderType:t},i=a[t][c-1],o=C(n,"border",e,r);a[t][c]=o,n.setParent(o,u),i&&n.setEdge(i,o,{weight:1})}function ne(n){var t=n.graph().rankdir.toLowerCase();t!=="bt"&&t!=="rl"||function(r){h(r.nodes(),function(u){U(r.node(u))}),h(r.edges(),function(u){var a=r.edge(u);h(a.points,U),Object.prototype.hasOwnProperty.call(a,"y")&&U(a)})}(n),t!=="lr"&&t!=="rl"||(function(r){h(r.nodes(),function(u){W(r.node(u))}),h(r.edges(),function(u){var a=r.edge(u);h(a.points,W),Object.prototype.hasOwnProperty.call(a,"x")&&W(a)})}(n),pn(n))}function pn(n){h(n.nodes(),function(t){wn(n.node(t))}),h(n.edges(),function(t){wn(n.edge(t))})}function wn(n){var t=n.width;n.width=n.height,n.height=t}function U(n){n.y=-n.y}function W(n){var t=n.x;n.x=n.y,n.y=t}function ee(n){n.graph().dummyChains=[],h(n.edges(),function(t){(function(r,u){var a=u.v,c=r.node(a).rank,e=u.w,i=r.node(e).rank,o=u.name,d=r.edge(u),f=d.labelRank;if(i!==c+1){r.removeEdge(u);var s,g,v=void 0;for(g=0,++c;c<i;++g,++c)d.points=[],s=C(r,"edge",v={width:0,height:0,edgeLabel:d,edgeObj:u,rank:c},"_d"),c===f&&(v.width=d.width,v.height=d.height,v.dummy="edge-label",v.labelpos=d.labelpos),r.setEdge(a,s,{weight:d.weight},o),g===0&&r.graph().dummyChains.push(s),a=s;r.setEdge(a,e,{weight:d.weight},o)}})(n,t)})}function $(n){var t={};h(n.sources(),function r(u){var a=n.node(u);if(Object.prototype.hasOwnProperty.call(t,u))return a.rank;t[u]=!0;var c=G(k(n.outEdges(u),function(e){return r(e.w)-n.edge(e).minlen}));return c!==Number.POSITIVE_INFINITY&&c!=null||(c=0),a.rank=c})}function B(n,t){return n.node(t.w).rank-n.node(t.v).rank-n.edge(t).minlen}function mn(n){var t,r,u=new R({directed:!1}),a=n.nodes()[0],c=n.nodeCount();for(u.setNode(a,{});re(u,n)<c;)t=te(u,n),r=u.hasNode(t.v)?B(n,t):-B(n,t),oe(u,n,r);return u}function re(n,t){return h(n.nodes(),function r(u){h(t.nodeEdges(u),function(a){var c=a.v,e=u===c?a.w:c;n.hasNode(e)||B(t,a)||(n.setNode(e,{}),n.setEdge(u,e,{}),r(e))})}),n.nodeCount()}function te(n,t){return Z(t.edges(),function(r){if(n.hasNode(r.v)!==n.hasNode(r.w))return B(t,r)})}function oe(n,t,r){h(n.nodes(),function(u){t.node(u).rank+=r})}function bn(n,t,r){An(t)||(t=[t]);var u=(n.isDirected()?n.successors:n.neighbors).bind(n),a=[],c={};return h(t,function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);yn(n,e,r==="post",c,u,a)}),a}function yn(n,t,r,u,a,c){Object.prototype.hasOwnProperty.call(u,t)||(u[t]=!0,r||c.push(t),h(a(t),function(e){yn(n,e,r,u,a,c)}),r&&c.push(t))}function j(n){n=function(u){var a=new R().setGraph(u.graph());return h(u.nodes(),function(c){a.setNode(c,u.node(c))}),h(u.edges(),function(c){var e=a.edge(c.v,c.w)||{weight:0,minlen:1},i=u.edge(c);a.setEdge(c.v,c.w,{weight:e.weight+i.weight,minlen:Math.max(e.minlen,i.minlen)})}),a}(n),$(n);var t,r=mn(n);for(en(r),nn(r,n);t=En(r);)On(r,n,t,Nn(r,n,t))}function nn(n,t){var r=function(u,a){return bn(u,a,"post")}(n,n.nodes());r=r.slice(0,r.length-1),h(r,function(u){(function(a,c,e){var i=a.node(e),o=i.parent;a.edge(e,o).cutvalue=xn(a,c,e)})(n,t,u)})}function xn(n,t,r){var u=n.node(r).parent,a=!0,c=t.edge(r,u),e=0;return c||(a=!1,c=t.edge(u,r)),e=c.weight,h(t.nodeEdges(r),function(i){var o,d,f=i.v===r,s=f?i.w:i.v;if(s!==u){var g=f===a,v=t.edge(i).weight;if(e+=g?v:-v,o=r,d=s,n.hasEdge(o,d)){var p=n.edge(r,s).cutvalue;e+=g?-p:p}}}),e}function en(n,t){arguments.length<2&&(t=n.nodes()[0]),kn(n,{},1,t)}function kn(n,t,r,u,a){var c=r,e=n.node(u);return t[u]=!0,h(n.neighbors(u),function(i){Object.prototype.hasOwnProperty.call(t,i)||(r=kn(n,t,r,i,u))}),e.low=c,e.lim=r++,a?e.parent=a:delete e.parent,r}function En(n){return J(n.edges(),function(t){return n.edge(t).cutvalue<0})}function Nn(n,t,r){var u=r.v,a=r.w;t.hasEdge(u,a)||(u=r.w,a=r.v);var c=n.node(u),e=n.node(a),i=c,o=!1;c.lim>e.lim&&(i=e,o=!0);var d=S(t.edges(),function(f){return o===_n(n,n.node(f.v),i)&&o!==_n(n,n.node(f.w),i)});return Z(d,function(f){return B(t,f)})}function On(n,t,r,u){var a=r.v,c=r.w;n.removeEdge(a,c),n.setEdge(u.v,u.w,{}),en(n),nn(n,t),function(e,i){var o=J(e.nodes(),function(f){return!i.node(f).parent}),d=function(f,s){return bn(f,s,"pre")}(e,o);d=d.slice(1),h(d,function(f){var s=e.node(f).parent,g=i.edge(f,s),v=!1;g||(g=i.edge(s,f),v=!0),i.node(f).rank=i.node(s).rank+(v?g.minlen:-g.minlen)})}(n,t)}function _n(n,t,r){return r.low<=t.lim&&t.lim<=r.lim}function ie(n){switch(n.graph().ranker){case"network-simplex":default:ue(n);break;case"tight-tree":(function(t){$(t),mn(t)})(n);break;case"longest-path":ae(n)}}new Error,j.initLowLimValues=en,j.initCutValues=nn,j.calcCutValue=xn,j.leaveEdge=En,j.enterEdge=Nn,j.exchangeEdges=On;var ae=$;function ue(n){j(n)}function de(n){var t=C(n,"root",{},"_root"),r=function(e){var i={};function o(d,f){var s=e.children(d);s&&s.length&&h(s,function(g){o(g,f+1)}),i[d]=f}return h(e.children(),function(d){o(d,1)}),i}(n),u=T(L(r))-1,a=2*u+1;n.graph().nestingRoot=t,h(n.edges(),function(e){n.edge(e).minlen*=a});var c=function(e){return q(e.edges(),function(i,o){return i+e.edge(o).weight},0)}(n)+1;h(n.children(),function(e){In(n,t,a,c,u,r,e)}),n.graph().nodeRankFactor=a}function In(n,t,r,u,a,c,e){var i=n.children(e);if(i.length){var o=gn(n,"_bt"),d=gn(n,"_bb"),f=n.node(e);n.setParent(o,e),f.borderTop=o,n.setParent(d,e),f.borderBottom=d,h(i,function(s){In(n,t,r,u,a,c,s);var g=n.node(s),v=g.borderTop?g.borderTop:s,p=g.borderBottom?g.borderBottom:s,w=g.borderTop?u:2*u,l=v!==p?1:a-c[e]+1;n.setEdge(o,v,{weight:w,minlen:l,nestingEdge:!0}),n.setEdge(p,d,{weight:w,minlen:l,nestingEdge:!0})}),n.parent(e)||n.setEdge(t,o,{weight:0,minlen:a+c[e]})}else e!==t&&n.setEdge(t,e,{weight:0,minlen:r})}function ce(n,t,r){var u=function(c){for(var e;c.hasNode(e=H("_root")););return e}(n),a=new R({compound:!0}).setGraph({root:u}).setDefaultNodeLabel(function(c){return n.node(c)});return h(n.nodes(),function(c){var e=n.node(c),i=n.parent(c);(e.rank===t||e.minRank<=t&&t<=e.maxRank)&&(a.setNode(c),a.setParent(c,i||u),h(n[r](c),function(o){var d=o.v===c?o.w:o.v,f=a.edge(d,c),s=I(f)?0:f.weight;a.setEdge(d,c,{weight:n.edge(o).weight+s})}),Object.prototype.hasOwnProperty.call(e,"minRank")&&a.setNode(c,{borderLeft:e.borderLeft[t],borderRight:e.borderRight[t]}))}),a}function se(n,t){for(var r=0,u=1;u<t.length;++u)r+=fe(n,t[u-1],t[u]);return r}function fe(n,t,r){for(var u=function(d,f){return function(s,g,v){for(var p=-1,w=s.length,l=g.length,m={};++p<w;){var b=p<l?g[p]:void 0;v(m,s[p],b)}return m}(d||[],f||[],zn)}(r,k(r,function(d,f){return f})),a=F(k(t,function(d){return V(k(n.outEdges(d),function(f){return{pos:u[f.w],weight:n.edge(f).weight}}),"pos")})),c=1;c<r.length;)c<<=1;var e=2*c-1;c-=1;var i=k(new Array(e),function(){return 0}),o=0;return h(a.forEach(function(d){var f=d.pos+c;i[f]+=d.weight;for(var s=0;f>0;)f%2&&(s+=i[f+1]),i[f=f-1>>1]+=d.weight;o+=d.weight*s})),o}function he(n,t){var r={};return h(n,function(u,a){var c=r[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:a};I(u.barycenter)||(c.barycenter=u.barycenter,c.weight=u.weight)}),h(t.edges(),function(u){var a=r[u.v],c=r[u.w];I(a)||I(c)||(c.indegree++,a.out.push(r[u.w]))}),function(u){var a=[];function c(o){return function(d){d.merged||(I(d.barycenter)||I(o.barycenter)||d.barycenter>=o.barycenter)&&function(f,s){var g=0,v=0;f.weight&&(g+=f.barycenter*f.weight,v+=f.weight),s.weight&&(g+=s.barycenter*s.weight,v+=s.weight),f.vs=s.vs.concat(f.vs),f.barycenter=g/v,f.weight=v,f.i=Math.min(s.i,f.i),s.merged=!0}(o,d)}}function e(o){return function(d){d.in.push(o),--d.indegree===0&&u.push(d)}}for(;u.length;){var i=u.pop();a.push(i),h(i.in.reverse(),c(i)),h(i.out,e(i))}return k(S(a,function(o){return!o.merged}),function(o){return z(o,["vs","i","barycenter","weight"])})}(S(r,function(u){return!u.indegree}))}function ge(n,t){var r,u=function(s,g){var v={lhs:[],rhs:[]};return h(s,function(p){g(p)?v.lhs.push(p):v.rhs.push(p)}),v}(n,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),a=u.lhs,c=V(u.rhs,function(s){return-s.i}),e=[],i=0,o=0,d=0;a.sort((r=!!t,function(s,g){return s.barycenter<g.barycenter?-1:s.barycenter>g.barycenter?1:r?g.i-s.i:s.i-g.i})),d=Pn(e,c,d),h(a,function(s){d+=s.vs.length,e.push(s.vs),i+=s.barycenter*s.weight,o+=s.weight,d=Pn(e,c,d)});var f={vs:F(e)};return o&&(f.barycenter=i/o,f.weight=o),f}function Pn(n,t,r){for(var u;t.length&&(u=Y(t)).i<=r;)t.pop(),n.push(u.vs),r++;return r}function Rn(n,t,r,u){var a=n.children(t),c=n.node(t),e=c?c.borderLeft:void 0,i=c?c.borderRight:void 0,o={};e&&(a=S(a,function(p){return p!==e&&p!==i}));var d=function(p,w){return k(w,function(l){var m=p.inEdges(l);if(m.length){var b=q(m,function(y,x){var O=p.edge(x),E=p.node(x.v);return{sum:y.sum+O.weight*E.order,weight:y.weight+O.weight}},{sum:0,weight:0});return{v:l,barycenter:b.sum/b.weight,weight:b.weight}}return{v:l}})}(n,a);h(d,function(p){if(n.children(p.v).length){var w=Rn(n,p.v,r,u);o[p.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&(m=w,I((l=p).barycenter)?(l.barycenter=m.barycenter,l.weight=m.weight):(l.barycenter=(l.barycenter*l.weight+m.barycenter*m.weight)/(l.weight+m.weight),l.weight+=m.weight))}var l,m});var f=he(d,r);(function(p,w){h(p,function(l){l.vs=F(l.vs.map(function(m){return w[m]?w[m].vs:m}))})})(f,o);var s=ge(f,u);if(e&&(s.vs=F([e,s.vs,i]),n.predecessors(e).length)){var g=n.node(n.predecessors(e)[0]),v=n.node(n.predecessors(i)[0]);Object.prototype.hasOwnProperty.call(s,"barycenter")||(s.barycenter=0,s.weight=0),s.barycenter=(s.barycenter*s.weight+g.order+v.order)/(s.weight+2),s.weight+=2}return s}function ve(n){var t=vn(n),r=Tn(n,M(1,t+1),"inEdges"),u=Tn(n,M(t-1,-1,-1),"outEdges"),a=function(f){var s={},g=S(f.nodes(),function(l){return!f.children(l).length}),v=T(k(g,function(l){return f.node(l).rank})),p=k(M(v+1),function(){return[]}),w=V(g,function(l){return f.node(l).rank});return h(w,function l(m){if(!un(s,m)){s[m]=!0;var b=f.node(m);p[b.rank].push(m),h(f.successors(m),l)}}),p}(n);jn(n,a);for(var c,e=Number.POSITIVE_INFINITY,i=0,o=0;o<4;++i,++o){le(i%2?r:u,i%4>=2);var d=se(n,a=A(n));d<e&&(o=0,c=Jn(a),e=d)}jn(n,c)}function Tn(n,t,r){return k(t,function(u){return ce(n,u,r)})}function le(n,t){var r=new R;h(n,function(u){var a=u.graph().root,c=Rn(u,a,r,t);h(c.vs,function(e,i){u.node(e).order=i}),function(e,i,o){var d,f={};h(o,function(s){for(var g,v,p=e.parent(s);p;){if((g=e.parent(p))?(v=f[g],f[g]=p):(v=d,d=p),v&&v!==p)return void i.setEdge(v,p);p=g}})}(u,r,c.vs)})}function jn(n,t){h(t,function(r){h(r,function(u,a){n.node(u).order=a})})}function pe(n){var t=function(r){var u={},a=0;function c(e){var i=a;h(r.children(e),c),u[e]={low:i,lim:a++}}return h(r.children(),c),u}(n);h(n.graph().dummyChains,function(r){for(var u=n.node(r),a=u.edgeObj,c=function(s,g,v,p){var w,l,m=[],b=[],y=Math.min(g[v].low,g[p].low),x=Math.max(g[v].lim,g[p].lim);w=v;do w=s.parent(w),m.push(w);while(w&&(g[w].low>y||x>g[w].lim));for(l=w,w=p;(w=s.parent(w))!==l;)b.push(w);return{path:m.concat(b.reverse()),lca:l}}(n,t,a.v,a.w),e=c.path,i=c.lca,o=0,d=e[o],f=!0;r!==a.w;){if(u=n.node(r),f){for(;(d=e[o])!==i&&n.node(d).maxRank<u.rank;)o++;d===i&&(f=!1)}if(!f){for(;o<e.length-1&&n.node(d=e[o+1]).minRank<=u.rank;)o++;d=e[o]}n.setParent(r,d),r=n.successors(r)[0]}})}function we(n,t){var r={};return q(t,function(u,a){var c=0,e=0,i=u.length,o=Y(a);return h(a,function(d,f){var s=function(v,p){if(v.node(p).dummy)return J(v.predecessors(p),function(w){return v.node(w).dummy})}(n,d),g=s?n.node(s).order:i;(s||d===o)&&(h(a.slice(e,f+1),function(v){h(n.predecessors(v),function(p){var w=n.node(p),l=w.order;!(l<c||g<l)||w.dummy&&n.node(v).dummy||Ln(r,p,v)})}),e=f+1,c=g)}),a}),r}function Ln(n,t,r){if(t>r){var u=t;t=r,r=u}var a=n[t];a||(n[t]=a={}),a[r]=!0}function me(n,t,r){if(t>r){var u=t;t=r,r=u}return!!n[t]&&Object.prototype.hasOwnProperty.call(n[t],r)}function be(n,t,r,u,a){var c={},e=function(d,f,s,g){var v=new R,p=d.graph(),w=function(l,m,b){return function(y,x,O){var E,_=y.node(x),P=y.node(O),N=0;if(N+=_.width/2,Object.prototype.hasOwnProperty.call(_,"labelpos"))switch(_.labelpos.toLowerCase()){case"l":E=-_.width/2;break;case"r":E=_.width/2}if(E&&(N+=b?E:-E),E=0,N+=(_.dummy?m:l)/2,N+=(P.dummy?m:l)/2,N+=P.width/2,Object.prototype.hasOwnProperty.call(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":E=P.width/2;break;case"r":E=-P.width/2}return E&&(N+=b?E:-E),E=0,N}}(p.nodesep,p.edgesep,g);return h(f,function(l){var m;h(l,function(b){var y=s[b];if(v.setNode(y),m){var x=s[m],O=v.edge(x,y);v.setEdge(x,y,Math.max(w(d,b,m),O||0))}m=b})}),v}(n,t,r,a),i=a?"borderLeft":"borderRight";function o(d,f){for(var s=e.nodes(),g=s.pop(),v={};g;)v[g]?d(g):(v[g]=!0,s.push(g),s=s.concat(f(g))),g=s.pop()}return o(function(d){c[d]=e.inEdges(d).reduce(function(f,s){return Math.max(f,c[s.v]+e.edge(s))},0)},e.predecessors.bind(e)),o(function(d){var f=e.outEdges(d).reduce(function(g,v){return Math.min(g,c[v.w]-e.edge(v))},Number.POSITIVE_INFINITY),s=n.node(d);f!==Number.POSITIVE_INFINITY&&s.borderType!==i&&(c[d]=Math.max(c[d],f))},e.successors.bind(e)),h(u,function(d){c[d]=c[r[d]]}),c}function ye(n,t){return Z(L(t),function(r){var u,a,c=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY;return a=function(i,o){var d=function(f,s){return f.node(s).width}(n,o)/2;c=Math.max(i+d,c),e=Math.min(i-d,e)},(u=r)==null||Fn(u,on(a),Vn),c-e})}function xe(n){var t,r=A(n),u=X(we(n,r),function(e,i){var o={};function d(f,s,g,v,p){var w;h(M(s,g),function(l){w=f[l],e.node(w).dummy&&h(e.predecessors(w),function(m){var b=e.node(m);b.dummy&&(b.order<v||b.order>p)&&Ln(o,m,w)})})}return q(i,function(f,s){var g,v=-1,p=0;return h(s,function(w,l){if(e.node(w).dummy==="border"){var m=e.predecessors(w);m.length&&(g=e.node(m[0]).order,d(s,p,l,v,g),p=l,v=g)}d(s,p,s.length,g,f.length)}),s}),o}(n,r)),a={};h(["u","d"],function(e){t=e==="u"?r:L(r).reverse(),h(["l","r"],function(i){i==="r"&&(t=k(t,function(s){return L(s).reverse()}));var o=(e==="u"?n.predecessors:n.successors).bind(n),d=function(s,g,v,p){var w={},l={},m={};return h(g,function(b){h(b,function(y,x){w[y]=y,l[y]=y,m[y]=x})}),h(g,function(b){var y=-1;h(b,function(x){var O=p(x);if(O.length){O=V(O,function(Mn){return m[Mn]});for(var E=(O.length-1)/2,_=Math.floor(E),P=Math.ceil(E);_<=P;++_){var N=O[_];l[x]===x&&y<m[N]&&!me(v,x,N)&&(l[N]=x,l[x]=w[x]=w[N],y=m[N])}}})}),{root:w,align:l}}(0,t,u,o),f=be(n,t,d.root,d.align,i==="r");i==="r"&&(f=D(f,function(s){return-s})),a[e+i]=f})});var c=ye(n,a);return function(e,i){var o=L(i),d=G(o),f=T(o);h(["u","d"],function(s){h(["l","r"],function(g){var v,p=s+g,w=e[p];if(w!==i){var l=L(w);(v=g==="l"?d-G(l):f-T(l))&&(e[p]=D(w,function(m){return m+v}))}})})}(a,c),function(e,i){return D(e.ul,function(o,d){if(i)return e[i.toLowerCase()][d];var f=V(k(e,d));return(f[1]+f[2])/2})}(a,n.graph().align)}function ke(n){var t,r;(function(u){var a=A(u),c=u.graph().ranksep,e=0;h(a,function(i){var o=T(k(i,function(d){return u.node(d).height}));h(i,function(d){u.node(d).y=e+o/2}),e+=o+c})})(n=fn(n)),t=xe(n),r=function(u,a){n.node(a).x=u},t&&dn(t,on(r))}function Ee(n,t){var r=$n;r("layout",()=>{var u=r(" buildLayoutGraph",()=>function(a){var c=new R({multigraph:!0,compound:!0}),e=tn(a.graph());return c.setGraph(X({},Oe,rn(e,Ne),z(e,_e))),h(a.nodes(),function(i){var o=tn(a.node(i));c.setNode(i,Gn(rn(o,Ie),Pe)),c.setParent(i,a.parent(i))}),h(a.edges(),function(i){var o=tn(a.edge(i));c.setEdge(i,X({},Te,rn(o,Re),z(o,je)))}),c}(n));r(" runLayout",()=>function(a,c){c(" makeSpaceForEdgeLabels",()=>function(e){var i=e.graph();i.ranksep/=2,h(e.edges(),function(o){var d=e.edge(o);d.minlen*=2,d.labelpos.toLowerCase()!=="c"&&(i.rankdir==="TB"||i.rankdir==="BT"?d.width+=d.labeloffset:d.height+=d.labeloffset)})}(a)),c(" removeSelfEdges",()=>function(e){h(e.edges(),function(i){if(i.v===i.w){var o=e.node(i.v);o.selfEdges||(o.selfEdges=[]),o.selfEdges.push({e:i,label:e.edge(i)}),e.removeEdge(i)}})}(a)),c(" acyclic",()=>Wn(a)),c(" nestingGraph.run",()=>de(a)),c(" rank",()=>ie(fn(a))),c(" injectEdgeLabelProxies",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(o.width&&o.height){var d=e.node(i.v),f={rank:(e.node(i.w).rank-d.rank)/2+d.rank,e:i};C(e,"edge-proxy",f,"_ep")}})}(a)),c(" removeEmptyRanks",()=>function(e){var i=G(k(e.nodes(),function(s){return e.node(s).rank})),o=[];h(e.nodes(),function(s){var g=e.node(s).rank-i;o[g]||(o[g]=[]),o[g].push(s)});var d=0,f=e.graph().nodeRankFactor;h(o,function(s,g){I(s)&&g%f!==0?--d:d&&h(s,function(v){e.node(v).rank+=d})})}(a)),c(" nestingGraph.cleanup",()=>function(e){var i=e.graph();e.removeNode(i.nestingRoot),delete i.nestingRoot,h(e.edges(),function(o){e.edge(o).nestingEdge&&e.removeEdge(o)})}(a)),c(" normalizeRanks",()=>function(e){var i=G(k(e.nodes(),function(o){return e.node(o).rank}));h(e.nodes(),function(o){var d=e.node(o);un(d,"rank")&&(d.rank-=i)})}(a)),c(" assignRankMinMax",()=>function(e){var i=0;h(e.nodes(),function(o){var d=e.node(o);d.borderTop&&(d.minRank=e.node(d.borderTop).rank,d.maxRank=e.node(d.borderBottom).rank,i=T(i,d.maxRank))}),e.graph().maxRank=i}(a)),c(" removeEdgeLabelProxies",()=>function(e){h(e.nodes(),function(i){var o=e.node(i);o.dummy==="edge-proxy"&&(e.edge(o.e).labelRank=o.rank,e.removeNode(i))})}(a)),c(" normalize.run",()=>ee(a)),c(" parentDummyChains",()=>pe(a)),c(" addBorderSegments",()=>function(e){h(e.children(),function i(o){var d=e.children(o),f=e.node(o);if(d.length&&h(d,i),Object.prototype.hasOwnProperty.call(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var s=f.minRank,g=f.maxRank+1;s<g;++s)ln(e,"borderLeft","_bl",o,f,s),ln(e,"borderRight","_br",o,f,s)}})}(a)),c(" order",()=>ve(a)),c(" insertSelfEdges",()=>function(e){var i=A(e);h(i,function(o){var d=0;h(o,function(f,s){var g=e.node(f);g.order=s+d,h(g.selfEdges,function(v){C(e,"selfedge",{width:v.label.width,height:v.label.height,rank:g.rank,order:s+ ++d,e:v.e,label:v.label},"_se")}),delete g.selfEdges})})}(a)),c(" adjustCoordinateSystem",()=>function(e){var i=e.graph().rankdir.toLowerCase();i!=="lr"&&i!=="rl"||pn(e)}(a)),c(" position",()=>ke(a)),c(" positionSelfEdges",()=>function(e){h(e.nodes(),function(i){var o=e.node(i);if(o.dummy==="selfedge"){var d=e.node(o.e.v),f=d.x+d.width/2,s=d.y,g=o.x-f,v=d.height/2;e.setEdge(o.e,o.label),e.removeNode(i),o.label.points=[{x:f+2*g/3,y:s-v},{x:f+5*g/6,y:s-v},{x:f+g,y:s},{x:f+5*g/6,y:s+v},{x:f+2*g/3,y:s+v}],o.label.x=o.x,o.label.y=o.y}})}(a)),c(" removeBorderNodes",()=>function(e){h(e.nodes(),function(i){if(e.children(i).length){var o=e.node(i),d=e.node(o.borderTop),f=e.node(o.borderBottom),s=e.node(Y(o.borderLeft)),g=e.node(Y(o.borderRight));o.width=Math.abs(g.x-s.x),o.height=Math.abs(f.y-d.y),o.x=s.x+o.width/2,o.y=d.y+o.height/2}}),h(e.nodes(),function(i){e.node(i).dummy==="border"&&e.removeNode(i)})}(a)),c(" normalize.undo",()=>function(e){h(e.graph().dummyChains,function(i){var o,d=e.node(i),f=d.edgeLabel;for(e.setEdge(d.edgeObj,f);d.dummy;)o=e.successors(i)[0],e.removeNode(i),f.points.push({x:d.x,y:d.y}),d.dummy==="edge-label"&&(f.x=d.x,f.y=d.y,f.width=d.width,f.height=d.height),i=o,d=e.node(i)})}(a)),c(" fixupEdgeLabelCoords",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(Object.prototype.hasOwnProperty.call(o,"x"))switch(o.labelpos!=="l"&&o.labelpos!=="r"||(o.width-=o.labeloffset),o.labelpos){case"l":o.x-=o.width/2+o.labeloffset;break;case"r":o.x+=o.width/2+o.labeloffset}})}(a)),c(" undoCoordinateSystem",()=>ne(a)),c(" translateGraph",()=>function(e){var i=Number.POSITIVE_INFINITY,o=0,d=Number.POSITIVE_INFINITY,f=0,s=e.graph(),g=s.marginx||0,v=s.marginy||0;function p(w){var l=w.x,m=w.y,b=w.width,y=w.height;i=Math.min(i,l-b/2),o=Math.max(o,l+b/2),d=Math.min(d,m-y/2),f=Math.max(f,m+y/2)}h(e.nodes(),function(w){p(e.node(w))}),h(e.edges(),function(w){var l=e.edge(w);Object.prototype.hasOwnProperty.call(l,"x")&&p(l)}),i-=g,d-=v,h(e.nodes(),function(w){var l=e.node(w);l.x-=i,l.y-=d}),h(e.edges(),function(w){var l=e.edge(w);h(l.points,function(m){m.x-=i,m.y-=d}),Object.prototype.hasOwnProperty.call(l,"x")&&(l.x-=i),Object.prototype.hasOwnProperty.call(l,"y")&&(l.y-=d)}),s.width=o-i+g,s.height=f-d+v}(a)),c(" assignNodeIntersects",()=>function(e){h(e.edges(),function(i){var o,d,f=e.edge(i),s=e.node(i.v),g=e.node(i.w);f.points?(o=f.points[0],d=f.points[f.points.length-1]):(f.points=[],o=g,d=s),f.points.unshift(hn(s,o)),f.points.push(hn(g,d))})}(a)),c(" reversePoints",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);o.reversed&&o.points.reverse()})}(a)),c(" acyclic.undo",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(o.reversed){e.removeEdge(i);var d=o.forwardName;delete o.reversed,delete o.forwardName,e.setEdge(i.w,i.v,o,d)}})}(a))}(u,r)),r(" updateInputGraph",()=>function(a,c){h(a.nodes(),function(e){var i=a.node(e),o=c.node(e);i&&(i.x=o.x,i.y=o.y,c.children(e).length&&(i.width=o.width,i.height=o.height))}),h(a.edges(),function(e){var i=a.edge(e),o=c.edge(e);i.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(i.x=o.x,i.y=o.y)}),a.graph().width=c.graph().width,a.graph().height=c.graph().height}(n,u))})}var Ne=["nodesep","edgesep","ranksep","marginx","marginy"],Oe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_e=["acyclicer","ranker","rankdir","align"],Ie=["width","height"],Pe={width:0,height:0},Re=["minlen","weight","width","height","labeloffset"],Te={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},je=["labelpos"];function rn(n,t){return D(z(n,t),Number)}function tn(n){var t={};return h(n,function(r,u){t[u.toLowerCase()]=r}),t}export{Ee as l};
1
+ import{G as R}from"./graph-DJZT7Xvd.js";import{b as Cn,e as on,c as h,i as I,f as S,v as M,r as Y}from"./_baseUniq-C6iB6ndc.js";import{b as an,a as Sn,m as k,c as G,h as un,f as J,l as q,d as Gn}from"./min-AWTPkpvW.js";import{co as Fn,bW as Vn,db as Bn,aC as Yn,dc as qn,d4 as zn,dd as F,de as L,M as Dn,Y as An,df as z,dg as W}from"./index-DITk7HL4.js";import{c as dn,a as cn}from"./_baseEach-BZRDjF1G.js";import{s as V}from"./sortBy-CcyoRC99.js";function Jn(n){return Cn(n,5)}function Wn(n,t){return n>t}function D(n,t){var r={};return t=cn(t),dn(n,function(u,a,c){Bn(r,a,t(u,a,c))}),r}function T(n){return n&&n.length?an(n,Yn,Wn):void 0}function H(n,t){return n&&n.length?an(n,cn(t),Sn):void 0}var Hn=0;function K(n){var t=++Hn;return qn(n)+t}class Kn{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return sn(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&sn(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,u=r._prev;u!==r;)t.push(JSON.stringify(u,Qn)),u=u._prev;return"["+t.join(", ")+"]"}}function sn(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function Qn(n,t){if(n!=="_next"&&n!=="_prev")return t}var Un=Dn(1);function Xn(n,t){if(n.nodeCount()<=1)return[];var r=function(a,c){var e=new R,i=0,o=0;h(a.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),h(a.edges(),function(s){var g=e.edge(s.v,s.w)||0,v=c(s),p=g+v;e.setEdge(s.v,s.w,p),o=Math.max(o,e.node(s.v).out+=v),i=Math.max(i,e.node(s.w).in+=v)});var d=L(o+i+3).map(function(){return new Kn}),f=i+1;return h(e.nodes(),function(s){U(d,f,e.node(s))}),{graph:e,buckets:d,zeroIdx:f}}(n,t||Un),u=function(a,c,e){for(var i,o=[],d=c[c.length-1],f=c[0];a.nodeCount();){for(;i=f.dequeue();)Q(a,c,e,i);for(;i=d.dequeue();)Q(a,c,e,i);if(a.nodeCount()){for(var s=c.length-2;s>0;--s)if(i=c[s].dequeue()){o=o.concat(Q(a,c,e,i,!0));break}}}return o}(r.graph,r.buckets,r.zeroIdx);return F(k(u,function(a){return n.outEdges(a.v,a.w)}))}function Q(n,t,r,u,a){var c=a?[]:void 0;return h(n.inEdges(u.v),function(e){var i=n.edge(e),o=n.node(e.v);a&&c.push({v:e.v,w:e.w}),o.out-=i,U(t,r,o)}),h(n.outEdges(u.v),function(e){var i=n.edge(e),o=e.w,d=n.node(o);d.in-=i,U(t,r,d)}),n.removeNode(u.v),c}function U(n,t,r){r.out?r.in?n[r.out-r.in+t].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function Zn(n){var t=n.graph().acyclicer==="greedy"?Xn(n,function(r){return function(u){return r.edge(u).weight}}(n)):function(r){var u=[],a={},c={};function e(i){Object.prototype.hasOwnProperty.call(c,i)||(c[i]=!0,a[i]=!0,h(r.outEdges(i),function(o){Object.prototype.hasOwnProperty.call(a,o.w)?u.push(o):e(o.w)}),delete a[i])}return h(r.nodes(),e),u}(n);h(t,function(r){var u=n.edge(r);n.removeEdge(r),u.forwardName=r.name,u.reversed=!0,n.setEdge(r.w,r.v,u,K("rev"))})}function C(n,t,r,u){var a;do a=K(u);while(n.hasNode(a));return r.dummy=t,n.setNode(a,r),a}function fn(n){var t=new R({multigraph:n.isMultigraph()}).setGraph(n.graph());return h(n.nodes(),function(r){n.children(r).length||t.setNode(r,n.node(r))}),h(n.edges(),function(r){t.setEdge(r,n.edge(r))}),t}function hn(n,t){var r,u,a=n.x,c=n.y,e=t.x-a,i=t.y-c,o=n.width/2,d=n.height/2;if(!e&&!i)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(i)*o>Math.abs(e)*d?(i<0&&(d=-d),r=d*e/i,u=d):(e<0&&(o=-o),r=o,u=o*i/e),{x:a+r,y:c+u}}function A(n){var t=k(L(vn(n)+1),function(){return[]});return h(n.nodes(),function(r){var u=n.node(r),a=u.rank;I(a)||(t[a][u.order]=r)}),t}function gn(n,t,r,u){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=u),C(n,"border",a,t)}function vn(n){return T(k(n.nodes(),function(t){var r=n.node(t).rank;if(!I(r))return r}))}function $n(n,t){return t()}function ln(n,t,r,u,a,c){var e={width:0,height:0,rank:c,borderType:t},i=a[t][c-1],o=C(n,"border",e,r);a[t][c]=o,n.setParent(o,u),i&&n.setEdge(i,o,{weight:1})}function ne(n){var t=n.graph().rankdir.toLowerCase();t!=="bt"&&t!=="rl"||function(r){h(r.nodes(),function(u){X(r.node(u))}),h(r.edges(),function(u){var a=r.edge(u);h(a.points,X),Object.prototype.hasOwnProperty.call(a,"y")&&X(a)})}(n),t!=="lr"&&t!=="rl"||(function(r){h(r.nodes(),function(u){Z(r.node(u))}),h(r.edges(),function(u){var a=r.edge(u);h(a.points,Z),Object.prototype.hasOwnProperty.call(a,"x")&&Z(a)})}(n),pn(n))}function pn(n){h(n.nodes(),function(t){wn(n.node(t))}),h(n.edges(),function(t){wn(n.edge(t))})}function wn(n){var t=n.width;n.width=n.height,n.height=t}function X(n){n.y=-n.y}function Z(n){var t=n.x;n.x=n.y,n.y=t}function ee(n){n.graph().dummyChains=[],h(n.edges(),function(t){(function(r,u){var a=u.v,c=r.node(a).rank,e=u.w,i=r.node(e).rank,o=u.name,d=r.edge(u),f=d.labelRank;if(i!==c+1){r.removeEdge(u);var s,g,v=void 0;for(g=0,++c;c<i;++g,++c)d.points=[],s=C(r,"edge",v={width:0,height:0,edgeLabel:d,edgeObj:u,rank:c},"_d"),c===f&&(v.width=d.width,v.height=d.height,v.dummy="edge-label",v.labelpos=d.labelpos),r.setEdge(a,s,{weight:d.weight},o),g===0&&r.graph().dummyChains.push(s),a=s;r.setEdge(a,e,{weight:d.weight},o)}})(n,t)})}function $(n){var t={};h(n.sources(),function r(u){var a=n.node(u);if(Object.prototype.hasOwnProperty.call(t,u))return a.rank;t[u]=!0;var c=G(k(n.outEdges(u),function(e){return r(e.w)-n.edge(e).minlen}));return c!==Number.POSITIVE_INFINITY&&c!=null||(c=0),a.rank=c})}function B(n,t){return n.node(t.w).rank-n.node(t.v).rank-n.edge(t).minlen}function mn(n){var t,r,u=new R({directed:!1}),a=n.nodes()[0],c=n.nodeCount();for(u.setNode(a,{});re(u,n)<c;)t=te(u,n),r=u.hasNode(t.v)?B(n,t):-B(n,t),oe(u,n,r);return u}function re(n,t){return h(n.nodes(),function r(u){h(t.nodeEdges(u),function(a){var c=a.v,e=u===c?a.w:c;n.hasNode(e)||B(t,a)||(n.setNode(e,{}),n.setEdge(u,e,{}),r(e))})}),n.nodeCount()}function te(n,t){return H(t.edges(),function(r){if(n.hasNode(r.v)!==n.hasNode(r.w))return B(t,r)})}function oe(n,t,r){h(n.nodes(),function(u){t.node(u).rank+=r})}function bn(n,t,r){An(t)||(t=[t]);var u=(n.isDirected()?n.successors:n.neighbors).bind(n),a=[],c={};return h(t,function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);yn(n,e,r==="post",c,u,a)}),a}function yn(n,t,r,u,a,c){Object.prototype.hasOwnProperty.call(u,t)||(u[t]=!0,r||c.push(t),h(a(t),function(e){yn(n,e,r,u,a,c)}),r&&c.push(t))}function j(n){n=function(u){var a=new R().setGraph(u.graph());return h(u.nodes(),function(c){a.setNode(c,u.node(c))}),h(u.edges(),function(c){var e=a.edge(c.v,c.w)||{weight:0,minlen:1},i=u.edge(c);a.setEdge(c.v,c.w,{weight:e.weight+i.weight,minlen:Math.max(e.minlen,i.minlen)})}),a}(n),$(n);var t,r=mn(n);for(en(r),nn(r,n);t=En(r);)On(r,n,t,Nn(r,n,t))}function nn(n,t){var r=function(u,a){return bn(u,a,"post")}(n,n.nodes());r=r.slice(0,r.length-1),h(r,function(u){(function(a,c,e){var i=a.node(e),o=i.parent;a.edge(e,o).cutvalue=xn(a,c,e)})(n,t,u)})}function xn(n,t,r){var u=n.node(r).parent,a=!0,c=t.edge(r,u),e=0;return c||(a=!1,c=t.edge(u,r)),e=c.weight,h(t.nodeEdges(r),function(i){var o,d,f=i.v===r,s=f?i.w:i.v;if(s!==u){var g=f===a,v=t.edge(i).weight;if(e+=g?v:-v,o=r,d=s,n.hasEdge(o,d)){var p=n.edge(r,s).cutvalue;e+=g?-p:p}}}),e}function en(n,t){arguments.length<2&&(t=n.nodes()[0]),kn(n,{},1,t)}function kn(n,t,r,u,a){var c=r,e=n.node(u);return t[u]=!0,h(n.neighbors(u),function(i){Object.prototype.hasOwnProperty.call(t,i)||(r=kn(n,t,r,i,u))}),e.low=c,e.lim=r++,a?e.parent=a:delete e.parent,r}function En(n){return J(n.edges(),function(t){return n.edge(t).cutvalue<0})}function Nn(n,t,r){var u=r.v,a=r.w;t.hasEdge(u,a)||(u=r.w,a=r.v);var c=n.node(u),e=n.node(a),i=c,o=!1;c.lim>e.lim&&(i=e,o=!0);var d=S(t.edges(),function(f){return o===_n(n,n.node(f.v),i)&&o!==_n(n,n.node(f.w),i)});return H(d,function(f){return B(t,f)})}function On(n,t,r,u){var a=r.v,c=r.w;n.removeEdge(a,c),n.setEdge(u.v,u.w,{}),en(n),nn(n,t),function(e,i){var o=J(e.nodes(),function(f){return!i.node(f).parent}),d=function(f,s){return bn(f,s,"pre")}(e,o);d=d.slice(1),h(d,function(f){var s=e.node(f).parent,g=i.edge(f,s),v=!1;g||(g=i.edge(s,f),v=!0),i.node(f).rank=i.node(s).rank+(v?g.minlen:-g.minlen)})}(n,t)}function _n(n,t,r){return r.low<=t.lim&&t.lim<=r.lim}function ie(n){switch(n.graph().ranker){case"network-simplex":default:ue(n);break;case"tight-tree":(function(t){$(t),mn(t)})(n);break;case"longest-path":ae(n)}}new Error,j.initLowLimValues=en,j.initCutValues=nn,j.calcCutValue=xn,j.leaveEdge=En,j.enterEdge=Nn,j.exchangeEdges=On;var ae=$;function ue(n){j(n)}function de(n){var t=C(n,"root",{},"_root"),r=function(e){var i={};function o(d,f){var s=e.children(d);s&&s.length&&h(s,function(g){o(g,f+1)}),i[d]=f}return h(e.children(),function(d){o(d,1)}),i}(n),u=T(M(r))-1,a=2*u+1;n.graph().nestingRoot=t,h(n.edges(),function(e){n.edge(e).minlen*=a});var c=function(e){return Y(e.edges(),function(i,o){return i+e.edge(o).weight},0)}(n)+1;h(n.children(),function(e){In(n,t,a,c,u,r,e)}),n.graph().nodeRankFactor=a}function In(n,t,r,u,a,c,e){var i=n.children(e);if(i.length){var o=gn(n,"_bt"),d=gn(n,"_bb"),f=n.node(e);n.setParent(o,e),f.borderTop=o,n.setParent(d,e),f.borderBottom=d,h(i,function(s){In(n,t,r,u,a,c,s);var g=n.node(s),v=g.borderTop?g.borderTop:s,p=g.borderBottom?g.borderBottom:s,w=g.borderTop?u:2*u,l=v!==p?1:a-c[e]+1;n.setEdge(o,v,{weight:w,minlen:l,nestingEdge:!0}),n.setEdge(p,d,{weight:w,minlen:l,nestingEdge:!0})}),n.parent(e)||n.setEdge(t,o,{weight:0,minlen:a+c[e]})}else e!==t&&n.setEdge(t,e,{weight:0,minlen:r})}function ce(n,t,r){var u=function(c){for(var e;c.hasNode(e=K("_root")););return e}(n),a=new R({compound:!0}).setGraph({root:u}).setDefaultNodeLabel(function(c){return n.node(c)});return h(n.nodes(),function(c){var e=n.node(c),i=n.parent(c);(e.rank===t||e.minRank<=t&&t<=e.maxRank)&&(a.setNode(c),a.setParent(c,i||u),h(n[r](c),function(o){var d=o.v===c?o.w:o.v,f=a.edge(d,c),s=I(f)?0:f.weight;a.setEdge(d,c,{weight:n.edge(o).weight+s})}),Object.prototype.hasOwnProperty.call(e,"minRank")&&a.setNode(c,{borderLeft:e.borderLeft[t],borderRight:e.borderRight[t]}))}),a}function se(n,t){for(var r=0,u=1;u<t.length;++u)r+=fe(n,t[u-1],t[u]);return r}function fe(n,t,r){for(var u=function(d,f){return function(s,g,v){for(var p=-1,w=s.length,l=g.length,m={};++p<w;){var b=p<l?g[p]:void 0;v(m,s[p],b)}return m}(d||[],f||[],zn)}(r,k(r,function(d,f){return f})),a=F(k(t,function(d){return V(k(n.outEdges(d),function(f){return{pos:u[f.w],weight:n.edge(f).weight}}),"pos")})),c=1;c<r.length;)c<<=1;var e=2*c-1;c-=1;var i=k(new Array(e),function(){return 0}),o=0;return h(a.forEach(function(d){var f=d.pos+c;i[f]+=d.weight;for(var s=0;f>0;)f%2&&(s+=i[f+1]),i[f=f-1>>1]+=d.weight;o+=d.weight*s})),o}function he(n,t){var r={};return h(n,function(u,a){var c=r[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:a};I(u.barycenter)||(c.barycenter=u.barycenter,c.weight=u.weight)}),h(t.edges(),function(u){var a=r[u.v],c=r[u.w];I(a)||I(c)||(c.indegree++,a.out.push(r[u.w]))}),function(u){var a=[];function c(o){return function(d){d.merged||(I(d.barycenter)||I(o.barycenter)||d.barycenter>=o.barycenter)&&function(f,s){var g=0,v=0;f.weight&&(g+=f.barycenter*f.weight,v+=f.weight),s.weight&&(g+=s.barycenter*s.weight,v+=s.weight),f.vs=s.vs.concat(f.vs),f.barycenter=g/v,f.weight=v,f.i=Math.min(s.i,f.i),s.merged=!0}(o,d)}}function e(o){return function(d){d.in.push(o),--d.indegree===0&&u.push(d)}}for(;u.length;){var i=u.pop();a.push(i),h(i.in.reverse(),c(i)),h(i.out,e(i))}return k(S(a,function(o){return!o.merged}),function(o){return z(o,["vs","i","barycenter","weight"])})}(S(r,function(u){return!u.indegree}))}function ge(n,t){var r,u=function(s,g){var v={lhs:[],rhs:[]};return h(s,function(p){g(p)?v.lhs.push(p):v.rhs.push(p)}),v}(n,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),a=u.lhs,c=V(u.rhs,function(s){return-s.i}),e=[],i=0,o=0,d=0;a.sort((r=!!t,function(s,g){return s.barycenter<g.barycenter?-1:s.barycenter>g.barycenter?1:r?g.i-s.i:s.i-g.i})),d=Pn(e,c,d),h(a,function(s){d+=s.vs.length,e.push(s.vs),i+=s.barycenter*s.weight,o+=s.weight,d=Pn(e,c,d)});var f={vs:F(e)};return o&&(f.barycenter=i/o,f.weight=o),f}function Pn(n,t,r){for(var u;t.length&&(u=q(t)).i<=r;)t.pop(),n.push(u.vs),r++;return r}function Rn(n,t,r,u){var a=n.children(t),c=n.node(t),e=c?c.borderLeft:void 0,i=c?c.borderRight:void 0,o={};e&&(a=S(a,function(p){return p!==e&&p!==i}));var d=function(p,w){return k(w,function(l){var m=p.inEdges(l);if(m.length){var b=Y(m,function(y,x){var O=p.edge(x),E=p.node(x.v);return{sum:y.sum+O.weight*E.order,weight:y.weight+O.weight}},{sum:0,weight:0});return{v:l,barycenter:b.sum/b.weight,weight:b.weight}}return{v:l}})}(n,a);h(d,function(p){if(n.children(p.v).length){var w=Rn(n,p.v,r,u);o[p.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&(m=w,I((l=p).barycenter)?(l.barycenter=m.barycenter,l.weight=m.weight):(l.barycenter=(l.barycenter*l.weight+m.barycenter*m.weight)/(l.weight+m.weight),l.weight+=m.weight))}var l,m});var f=he(d,r);(function(p,w){h(p,function(l){l.vs=F(l.vs.map(function(m){return w[m]?w[m].vs:m}))})})(f,o);var s=ge(f,u);if(e&&(s.vs=F([e,s.vs,i]),n.predecessors(e).length)){var g=n.node(n.predecessors(e)[0]),v=n.node(n.predecessors(i)[0]);Object.prototype.hasOwnProperty.call(s,"barycenter")||(s.barycenter=0,s.weight=0),s.barycenter=(s.barycenter*s.weight+g.order+v.order)/(s.weight+2),s.weight+=2}return s}function ve(n){var t=vn(n),r=Tn(n,L(1,t+1),"inEdges"),u=Tn(n,L(t-1,-1,-1),"outEdges"),a=function(f){var s={},g=S(f.nodes(),function(l){return!f.children(l).length}),v=T(k(g,function(l){return f.node(l).rank})),p=k(L(v+1),function(){return[]}),w=V(g,function(l){return f.node(l).rank});return h(w,function l(m){if(!un(s,m)){s[m]=!0;var b=f.node(m);p[b.rank].push(m),h(f.successors(m),l)}}),p}(n);jn(n,a);for(var c,e=Number.POSITIVE_INFINITY,i=0,o=0;o<4;++i,++o){le(i%2?r:u,i%4>=2);var d=se(n,a=A(n));d<e&&(o=0,c=Jn(a),e=d)}jn(n,c)}function Tn(n,t,r){return k(t,function(u){return ce(n,u,r)})}function le(n,t){var r=new R;h(n,function(u){var a=u.graph().root,c=Rn(u,a,r,t);h(c.vs,function(e,i){u.node(e).order=i}),function(e,i,o){var d,f={};h(o,function(s){for(var g,v,p=e.parent(s);p;){if((g=e.parent(p))?(v=f[g],f[g]=p):(v=d,d=p),v&&v!==p)return void i.setEdge(v,p);p=g}})}(u,r,c.vs)})}function jn(n,t){h(t,function(r){h(r,function(u,a){n.node(u).order=a})})}function pe(n){var t=function(r){var u={},a=0;function c(e){var i=a;h(r.children(e),c),u[e]={low:i,lim:a++}}return h(r.children(),c),u}(n);h(n.graph().dummyChains,function(r){for(var u=n.node(r),a=u.edgeObj,c=function(s,g,v,p){var w,l,m=[],b=[],y=Math.min(g[v].low,g[p].low),x=Math.max(g[v].lim,g[p].lim);w=v;do w=s.parent(w),m.push(w);while(w&&(g[w].low>y||x>g[w].lim));for(l=w,w=p;(w=s.parent(w))!==l;)b.push(w);return{path:m.concat(b.reverse()),lca:l}}(n,t,a.v,a.w),e=c.path,i=c.lca,o=0,d=e[o],f=!0;r!==a.w;){if(u=n.node(r),f){for(;(d=e[o])!==i&&n.node(d).maxRank<u.rank;)o++;d===i&&(f=!1)}if(!f){for(;o<e.length-1&&n.node(d=e[o+1]).minRank<=u.rank;)o++;d=e[o]}n.setParent(r,d),r=n.successors(r)[0]}})}function we(n,t){var r={};return Y(t,function(u,a){var c=0,e=0,i=u.length,o=q(a);return h(a,function(d,f){var s=function(v,p){if(v.node(p).dummy)return J(v.predecessors(p),function(w){return v.node(w).dummy})}(n,d),g=s?n.node(s).order:i;(s||d===o)&&(h(a.slice(e,f+1),function(v){h(n.predecessors(v),function(p){var w=n.node(p),l=w.order;!(l<c||g<l)||w.dummy&&n.node(v).dummy||Mn(r,p,v)})}),e=f+1,c=g)}),a}),r}function Mn(n,t,r){if(t>r){var u=t;t=r,r=u}var a=n[t];a||(n[t]=a={}),a[r]=!0}function me(n,t,r){if(t>r){var u=t;t=r,r=u}return!!n[t]&&Object.prototype.hasOwnProperty.call(n[t],r)}function be(n,t,r,u,a){var c={},e=function(d,f,s,g){var v=new R,p=d.graph(),w=function(l,m,b){return function(y,x,O){var E,_=y.node(x),P=y.node(O),N=0;if(N+=_.width/2,Object.prototype.hasOwnProperty.call(_,"labelpos"))switch(_.labelpos.toLowerCase()){case"l":E=-_.width/2;break;case"r":E=_.width/2}if(E&&(N+=b?E:-E),E=0,N+=(_.dummy?m:l)/2,N+=(P.dummy?m:l)/2,N+=P.width/2,Object.prototype.hasOwnProperty.call(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":E=P.width/2;break;case"r":E=-P.width/2}return E&&(N+=b?E:-E),E=0,N}}(p.nodesep,p.edgesep,g);return h(f,function(l){var m;h(l,function(b){var y=s[b];if(v.setNode(y),m){var x=s[m],O=v.edge(x,y);v.setEdge(x,y,Math.max(w(d,b,m),O||0))}m=b})}),v}(n,t,r,a),i=a?"borderLeft":"borderRight";function o(d,f){for(var s=e.nodes(),g=s.pop(),v={};g;)v[g]?d(g):(v[g]=!0,s.push(g),s=s.concat(f(g))),g=s.pop()}return o(function(d){c[d]=e.inEdges(d).reduce(function(f,s){return Math.max(f,c[s.v]+e.edge(s))},0)},e.predecessors.bind(e)),o(function(d){var f=e.outEdges(d).reduce(function(g,v){return Math.min(g,c[v.w]-e.edge(v))},Number.POSITIVE_INFINITY),s=n.node(d);f!==Number.POSITIVE_INFINITY&&s.borderType!==i&&(c[d]=Math.max(c[d],f))},e.successors.bind(e)),h(u,function(d){c[d]=c[r[d]]}),c}function ye(n,t){return H(M(t),function(r){var u,a,c=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY;return a=function(i,o){var d=function(f,s){return f.node(s).width}(n,o)/2;c=Math.max(i+d,c),e=Math.min(i-d,e)},(u=r)==null||Fn(u,on(a),Vn),c-e})}function xe(n){var t,r=A(n),u=W(we(n,r),function(e,i){var o={};function d(f,s,g,v,p){var w;h(L(s,g),function(l){w=f[l],e.node(w).dummy&&h(e.predecessors(w),function(m){var b=e.node(m);b.dummy&&(b.order<v||b.order>p)&&Mn(o,m,w)})})}return Y(i,function(f,s){var g,v=-1,p=0;return h(s,function(w,l){if(e.node(w).dummy==="border"){var m=e.predecessors(w);m.length&&(g=e.node(m[0]).order,d(s,p,l,v,g),p=l,v=g)}d(s,p,s.length,g,f.length)}),s}),o}(n,r)),a={};h(["u","d"],function(e){t=e==="u"?r:M(r).reverse(),h(["l","r"],function(i){i==="r"&&(t=k(t,function(s){return M(s).reverse()}));var o=(e==="u"?n.predecessors:n.successors).bind(n),d=function(s,g,v,p){var w={},l={},m={};return h(g,function(b){h(b,function(y,x){w[y]=y,l[y]=y,m[y]=x})}),h(g,function(b){var y=-1;h(b,function(x){var O=p(x);if(O.length){O=V(O,function(Ln){return m[Ln]});for(var E=(O.length-1)/2,_=Math.floor(E),P=Math.ceil(E);_<=P;++_){var N=O[_];l[x]===x&&y<m[N]&&!me(v,x,N)&&(l[N]=x,l[x]=w[x]=w[N],y=m[N])}}})}),{root:w,align:l}}(0,t,u,o),f=be(n,t,d.root,d.align,i==="r");i==="r"&&(f=D(f,function(s){return-s})),a[e+i]=f})});var c=ye(n,a);return function(e,i){var o=M(i),d=G(o),f=T(o);h(["u","d"],function(s){h(["l","r"],function(g){var v,p=s+g,w=e[p];if(w!==i){var l=M(w);(v=g==="l"?d-G(l):f-T(l))&&(e[p]=D(w,function(m){return m+v}))}})})}(a,c),function(e,i){return D(e.ul,function(o,d){if(i)return e[i.toLowerCase()][d];var f=V(k(e,d));return(f[1]+f[2])/2})}(a,n.graph().align)}function ke(n){var t,r;(function(u){var a=A(u),c=u.graph().ranksep,e=0;h(a,function(i){var o=T(k(i,function(d){return u.node(d).height}));h(i,function(d){u.node(d).y=e+o/2}),e+=o+c})})(n=fn(n)),t=xe(n),r=function(u,a){n.node(a).x=u},t&&dn(t,on(r))}function Ee(n,t){var r=$n;r("layout",()=>{var u=r(" buildLayoutGraph",()=>function(a){var c=new R({multigraph:!0,compound:!0}),e=tn(a.graph());return c.setGraph(W({},Oe,rn(e,Ne),z(e,_e))),h(a.nodes(),function(i){var o=tn(a.node(i));c.setNode(i,Gn(rn(o,Ie),Pe)),c.setParent(i,a.parent(i))}),h(a.edges(),function(i){var o=tn(a.edge(i));c.setEdge(i,W({},Te,rn(o,Re),z(o,je)))}),c}(n));r(" runLayout",()=>function(a,c){c(" makeSpaceForEdgeLabels",()=>function(e){var i=e.graph();i.ranksep/=2,h(e.edges(),function(o){var d=e.edge(o);d.minlen*=2,d.labelpos.toLowerCase()!=="c"&&(i.rankdir==="TB"||i.rankdir==="BT"?d.width+=d.labeloffset:d.height+=d.labeloffset)})}(a)),c(" removeSelfEdges",()=>function(e){h(e.edges(),function(i){if(i.v===i.w){var o=e.node(i.v);o.selfEdges||(o.selfEdges=[]),o.selfEdges.push({e:i,label:e.edge(i)}),e.removeEdge(i)}})}(a)),c(" acyclic",()=>Zn(a)),c(" nestingGraph.run",()=>de(a)),c(" rank",()=>ie(fn(a))),c(" injectEdgeLabelProxies",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(o.width&&o.height){var d=e.node(i.v),f={rank:(e.node(i.w).rank-d.rank)/2+d.rank,e:i};C(e,"edge-proxy",f,"_ep")}})}(a)),c(" removeEmptyRanks",()=>function(e){var i=G(k(e.nodes(),function(s){return e.node(s).rank})),o=[];h(e.nodes(),function(s){var g=e.node(s).rank-i;o[g]||(o[g]=[]),o[g].push(s)});var d=0,f=e.graph().nodeRankFactor;h(o,function(s,g){I(s)&&g%f!==0?--d:d&&h(s,function(v){e.node(v).rank+=d})})}(a)),c(" nestingGraph.cleanup",()=>function(e){var i=e.graph();e.removeNode(i.nestingRoot),delete i.nestingRoot,h(e.edges(),function(o){e.edge(o).nestingEdge&&e.removeEdge(o)})}(a)),c(" normalizeRanks",()=>function(e){var i=G(k(e.nodes(),function(o){return e.node(o).rank}));h(e.nodes(),function(o){var d=e.node(o);un(d,"rank")&&(d.rank-=i)})}(a)),c(" assignRankMinMax",()=>function(e){var i=0;h(e.nodes(),function(o){var d=e.node(o);d.borderTop&&(d.minRank=e.node(d.borderTop).rank,d.maxRank=e.node(d.borderBottom).rank,i=T(i,d.maxRank))}),e.graph().maxRank=i}(a)),c(" removeEdgeLabelProxies",()=>function(e){h(e.nodes(),function(i){var o=e.node(i);o.dummy==="edge-proxy"&&(e.edge(o.e).labelRank=o.rank,e.removeNode(i))})}(a)),c(" normalize.run",()=>ee(a)),c(" parentDummyChains",()=>pe(a)),c(" addBorderSegments",()=>function(e){h(e.children(),function i(o){var d=e.children(o),f=e.node(o);if(d.length&&h(d,i),Object.prototype.hasOwnProperty.call(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var s=f.minRank,g=f.maxRank+1;s<g;++s)ln(e,"borderLeft","_bl",o,f,s),ln(e,"borderRight","_br",o,f,s)}})}(a)),c(" order",()=>ve(a)),c(" insertSelfEdges",()=>function(e){var i=A(e);h(i,function(o){var d=0;h(o,function(f,s){var g=e.node(f);g.order=s+d,h(g.selfEdges,function(v){C(e,"selfedge",{width:v.label.width,height:v.label.height,rank:g.rank,order:s+ ++d,e:v.e,label:v.label},"_se")}),delete g.selfEdges})})}(a)),c(" adjustCoordinateSystem",()=>function(e){var i=e.graph().rankdir.toLowerCase();i!=="lr"&&i!=="rl"||pn(e)}(a)),c(" position",()=>ke(a)),c(" positionSelfEdges",()=>function(e){h(e.nodes(),function(i){var o=e.node(i);if(o.dummy==="selfedge"){var d=e.node(o.e.v),f=d.x+d.width/2,s=d.y,g=o.x-f,v=d.height/2;e.setEdge(o.e,o.label),e.removeNode(i),o.label.points=[{x:f+2*g/3,y:s-v},{x:f+5*g/6,y:s-v},{x:f+g,y:s},{x:f+5*g/6,y:s+v},{x:f+2*g/3,y:s+v}],o.label.x=o.x,o.label.y=o.y}})}(a)),c(" removeBorderNodes",()=>function(e){h(e.nodes(),function(i){if(e.children(i).length){var o=e.node(i),d=e.node(o.borderTop),f=e.node(o.borderBottom),s=e.node(q(o.borderLeft)),g=e.node(q(o.borderRight));o.width=Math.abs(g.x-s.x),o.height=Math.abs(f.y-d.y),o.x=s.x+o.width/2,o.y=d.y+o.height/2}}),h(e.nodes(),function(i){e.node(i).dummy==="border"&&e.removeNode(i)})}(a)),c(" normalize.undo",()=>function(e){h(e.graph().dummyChains,function(i){var o,d=e.node(i),f=d.edgeLabel;for(e.setEdge(d.edgeObj,f);d.dummy;)o=e.successors(i)[0],e.removeNode(i),f.points.push({x:d.x,y:d.y}),d.dummy==="edge-label"&&(f.x=d.x,f.y=d.y,f.width=d.width,f.height=d.height),i=o,d=e.node(i)})}(a)),c(" fixupEdgeLabelCoords",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(Object.prototype.hasOwnProperty.call(o,"x"))switch(o.labelpos!=="l"&&o.labelpos!=="r"||(o.width-=o.labeloffset),o.labelpos){case"l":o.x-=o.width/2+o.labeloffset;break;case"r":o.x+=o.width/2+o.labeloffset}})}(a)),c(" undoCoordinateSystem",()=>ne(a)),c(" translateGraph",()=>function(e){var i=Number.POSITIVE_INFINITY,o=0,d=Number.POSITIVE_INFINITY,f=0,s=e.graph(),g=s.marginx||0,v=s.marginy||0;function p(w){var l=w.x,m=w.y,b=w.width,y=w.height;i=Math.min(i,l-b/2),o=Math.max(o,l+b/2),d=Math.min(d,m-y/2),f=Math.max(f,m+y/2)}h(e.nodes(),function(w){p(e.node(w))}),h(e.edges(),function(w){var l=e.edge(w);Object.prototype.hasOwnProperty.call(l,"x")&&p(l)}),i-=g,d-=v,h(e.nodes(),function(w){var l=e.node(w);l.x-=i,l.y-=d}),h(e.edges(),function(w){var l=e.edge(w);h(l.points,function(m){m.x-=i,m.y-=d}),Object.prototype.hasOwnProperty.call(l,"x")&&(l.x-=i),Object.prototype.hasOwnProperty.call(l,"y")&&(l.y-=d)}),s.width=o-i+g,s.height=f-d+v}(a)),c(" assignNodeIntersects",()=>function(e){h(e.edges(),function(i){var o,d,f=e.edge(i),s=e.node(i.v),g=e.node(i.w);f.points?(o=f.points[0],d=f.points[f.points.length-1]):(f.points=[],o=g,d=s),f.points.unshift(hn(s,o)),f.points.push(hn(g,d))})}(a)),c(" reversePoints",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);o.reversed&&o.points.reverse()})}(a)),c(" acyclic.undo",()=>function(e){h(e.edges(),function(i){var o=e.edge(i);if(o.reversed){e.removeEdge(i);var d=o.forwardName;delete o.reversed,delete o.forwardName,e.setEdge(i.w,i.v,o,d)}})}(a))}(u,r)),r(" updateInputGraph",()=>function(a,c){h(a.nodes(),function(e){var i=a.node(e),o=c.node(e);i&&(i.x=o.x,i.y=o.y,c.children(e).length&&(i.width=o.width,i.height=o.height))}),h(a.edges(),function(e){var i=a.edge(e),o=c.edge(e);i.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(i.x=o.x,i.y=o.y)}),a.graph().width=c.graph().width,a.graph().height=c.graph().height}(n,u))})}var Ne=["nodesep","edgesep","ranksep","marginx","marginy"],Oe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_e=["acyclicer","ranker","rankdir","align"],Ie=["width","height"],Pe={width:0,height:0},Re=["minlen","weight","width","height","labeloffset"],Te={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},je=["labelpos"];function rn(n,t){return D(z(n,t),Number)}function tn(n){var t={};return h(n,function(r,u){t[u.toLowerCase()]=r}),t}export{Ee as l};
@@ -0,0 +1 @@
1
+ import{c as K,i as v,a as w,b as G,f as A}from"./timer-Bqd5yn_a.js";import{by as d,cx as J,bH as L,cy as P,cz as Q,cA as U,cB as W,cC as X,cD as Y,cE as Z,cF as _}from"./index-DITk7HL4.js";import{i as $}from"./init-DLRA0X12.js";function k(n){return n===null?NaN:+n}function*nn(n,r){if(r===void 0)for(let t of n)t!=null&&(t=+t)>=t&&(yield t);else{let t=-1;for(let e of n)(e=r(e,++t,n))!=null&&(e=+e)>=e&&(yield e)}}const x=d(J),D=x.right,tn=x.left;function y(n,r){r||(r=[]);var t,e=n?Math.min(r.length,n.length):0,a=r.slice();return function(i){for(t=0;t<e;++t)a[t]=n[t]*(1-i)+r[t]*i;return a}}function j(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function rn(n,r){return(j(r)?y:B)(n,r)}function B(n,r){var t,e=r?r.length:0,a=n?Math.min(e,n.length):0,i=new Array(a),u=new Array(e);for(t=0;t<a;++t)i[t]=p(n[t],r[t]);for(;t<e;++t)u[t]=r[t];return function(c){for(t=0;t<a;++t)u[t]=i[t](c);return u}}function F(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function V(n,r){var t,e={},a={};for(t in n!==null&&typeof n=="object"||(n={}),r!==null&&typeof r=="object"||(r={}),r)t in n?e[t]=p(n[t],r[t]):a[t]=r[t];return function(i){for(t in e)a[t]=e[t](i);return a}}function p(n,r){var t,e=typeof r;return r==null||e==="boolean"?K(r):(e==="number"?v:e==="string"?(t=A(r))?(r=t,w):G:r instanceof A?w:r instanceof Date?F:j(r)?y:Array.isArray(r)?B:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?V:v)(n,r)}function q(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function z(n){return+n}d(k).center;var C=[0,1];function g(n){return n}function M(n,r){return(r-=n=+n)?function(e){return(e-n)/r}:(t=isNaN(r)?NaN:.5,function(){return t});var t}function en(n,r,t){var e=n[0],a=n[1],i=r[0],u=r[1];return a<e?(e=M(a,e),i=t(u,i)):(e=M(e,a),i=t(i,u)),function(c){return i(e(c))}}function an(n,r,t){var e=Math.min(n.length,r.length)-1,a=new Array(e),i=new Array(e),u=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++u<e;)a[u]=M(n[u],n[u+1]),i[u]=t(r[u],r[u+1]);return function(c){var f=D(n,c,1,e)-1;return i[f](a[f](c))}}function E(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function H(){var n,r,t,e,a,i,u=C,c=C,f=p,s=g;function h(){var o,m,N,b=Math.min(u.length,c.length);return s!==g&&(o=u[0],m=u[b-1],o>m&&(N=o,o=m,m=N),s=function(I){return Math.max(o,Math.min(m,I))}),e=b>2?an:en,a=i=null,l}function l(o){return o==null||isNaN(o=+o)?t:(a||(a=e(u.map(n),c,f)))(n(s(o)))}return l.invert=function(o){return s(r((i||(i=e(c,u.map(n),v)))(o)))},l.domain=function(o){return arguments.length?(u=Array.from(o,z),h()):u.slice()},l.range=function(o){return arguments.length?(c=Array.from(o),h()):c.slice()},l.rangeRound=function(o){return c=Array.from(o),f=q,h()},l.clamp=function(o){return arguments.length?(s=!!o||g,h()):s!==g},l.interpolate=function(o){return arguments.length?(f=o,h()):f},l.unknown=function(o){return arguments.length?(t=o,l):t},function(o,m){return n=o,r=m,h()}}function O(){return H()(g,g)}function R(n,r,t,e){var a,i=L(n,r,t);switch((e=P(e??",f")).type){case"s":var u=Math.max(Math.abs(n),Math.abs(r));return e.precision!=null||isNaN(a=W(i,u))||(e.precision=a),X(e,u);case"":case"e":case"g":case"p":case"r":e.precision!=null||isNaN(a=U(i,Math.max(Math.abs(n),Math.abs(r))))||(e.precision=a-(e.type==="e"));break;case"f":case"%":e.precision!=null||isNaN(a=Q(i))||(e.precision=a-2*(e.type==="%"))}return Y(e)}function S(n){var r=n.domain;return n.ticks=function(t){var e=r();return Z(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var a=r();return R(a[0],a[a.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e,a,i=r(),u=0,c=i.length-1,f=i[u],s=i[c],h=10;for(s<f&&(a=f,f=s,s=a,a=u,u=c,c=a);h-- >0;){if((a=_(f,s,t))===e)return i[u]=f,i[c]=s,r(i);if(a>0)f=Math.floor(f/a)*a,s=Math.ceil(s/a)*a;else{if(!(a<0))break;f=Math.ceil(f*a)/a,s=Math.floor(s*a)/a}e=a}return n},n}function T(){var n=O();return n.copy=function(){return E(n,T())},$.apply(n,arguments),S(n)}export{E as a,k as b,O as c,rn as d,F as e,y as f,q as g,z as h,p as i,S as j,g as k,T as l,D as m,nn as n,V as o,R as p,tn as q,H as t};