orbitchat 3.8.3 → 3.8.5

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 (107) hide show
  1. package/dist/assets/{ChartRenderer-DzIRvPxY.js → ChartRenderer-CsSmOeUS.js} +14 -14
  2. package/dist/assets/MermaidRenderer-DL5m_Hhz.js +312 -0
  3. package/dist/assets/{MusicRenderer-BwnX42th.js → MusicRenderer-CH3E0KH9.js} +2 -2
  4. package/dist/assets/SVGRenderer-B5HiQoJe.js +6 -0
  5. package/dist/assets/arc-DeiHBTsx.js +1 -0
  6. package/dist/assets/architectureDiagram-3BPJPVTR-B1ad2QoY.js +36 -0
  7. package/dist/assets/{band-CquvqAHh.js → band-BEGRCkg7.js} +1 -1
  8. package/dist/assets/blockDiagram-GPEHLZMM-BaaYuLLX.js +132 -0
  9. package/dist/assets/{c4Diagram-AHTNJAMY-BjSLTiBX.js → c4Diagram-AAUBKEIU-DJPHJtds.js} +1 -1
  10. package/dist/assets/channel-DDeCWDA1.js +1 -0
  11. package/dist/assets/chunk-2J33WTMH-BgKyXymK.js +1 -0
  12. package/dist/assets/{chunk-4BX2VUAB-CW_w7OX3.js → chunk-4BX2VUAB-B47fqcrV.js} +1 -1
  13. package/dist/assets/chunk-55IACEB6-mPPspevf.js +1 -0
  14. package/dist/assets/chunk-727SXJPM-D_UtOHAV.js +206 -0
  15. package/dist/assets/chunk-AQP2D5EJ-CuK_c5EV.js +231 -0
  16. package/dist/assets/{chunk-FMBD7UC4-DTCbHJhW.js → chunk-FMBD7UC4-CQ0E2DVU.js} +1 -1
  17. package/dist/assets/chunk-ND2GUHAM-Bs4KqGh8.js +1 -0
  18. package/dist/assets/{chunk-QZHKN3VN-myOJvS-u.js → chunk-QZHKN3VN-Ds5qvw-L.js} +1 -1
  19. package/dist/assets/classDiagram-4FO5ZUOK-CzusQi-i.js +1 -0
  20. package/dist/assets/classDiagram-v2-Q7XG4LA2-CzusQi-i.js +1 -0
  21. package/dist/assets/cose-bilkent-S5V4N54A-DtI7VR0m.js +1 -0
  22. package/dist/assets/cytoscape.esm-BHYC38rz.js +331 -0
  23. package/dist/assets/dagre-BM42HDAG-Dv9nzUP_.js +4 -0
  24. package/dist/assets/{defaultLocale-DX6XiGOO.js → defaultLocale-CrowFXzY.js} +1 -1
  25. package/dist/assets/diagram-2AECGRRQ-Bo72qc36.js +43 -0
  26. package/dist/assets/diagram-5GNKFQAL-CwfUjosP.js +10 -0
  27. package/dist/assets/diagram-KO2AKTUF-CfOTiGvD.js +3 -0
  28. package/dist/assets/diagram-LMA3HP47-CZhIRgOi.js +24 -0
  29. package/dist/assets/diagram-OG6HWLK6-juyail0b.js +24 -0
  30. package/dist/assets/docx-preview-1HZ2cBLf.js +38 -0
  31. package/dist/assets/{erDiagram-SMLLAGMA-CZeTEE4C.js → erDiagram-TEJ5UH35-DoFjAiB-.js} +2 -2
  32. package/dist/assets/{flowDiagram-DWJPFMVM-D0cOPhM6.js → flowDiagram-I6XJVG4X-i9Nk-RoE.js} +4 -4
  33. package/dist/assets/ganttDiagram-6RSMTGT7-D9FgT_n3.js +292 -0
  34. package/dist/assets/gitGraphDiagram-PVQCEYII-8T23BfbK.js +106 -0
  35. package/dist/assets/graph-Dqkl27Ch.js +1 -0
  36. package/dist/assets/{index--qPbXmBe.js → index-COrH62pB.js} +1 -1
  37. package/dist/assets/index-Chrzghtr.js +671 -0
  38. package/dist/assets/index-_tZnqtDb.css +1 -0
  39. package/dist/assets/index-mJaxTisw.js +13 -0
  40. package/dist/assets/infoDiagram-5YYISTIA-CSrQKxO4.js +2 -0
  41. package/dist/assets/{init-Dmth1JHB.js → init-BFKUnIhM.js} +1 -1
  42. package/dist/assets/{ishikawaDiagram-UXIWVN3A-Ki90st18.js → ishikawaDiagram-YF4QCWOH-C0RacBnx.js} +6 -6
  43. package/dist/assets/{journeyDiagram-VCZTEJTY-YwSMXxeX.js → journeyDiagram-JHISSGLW-fn_Wigeb.js} +3 -3
  44. package/dist/assets/{kanban-definition-6JOO6SKY-Vy7WFwaZ.js → kanban-definition-UN3LZRKU-BCU8kzDU.js} +7 -7
  45. package/dist/assets/layout-DO9UvE1P.js +1 -0
  46. package/dist/assets/{linear-CKzVTQ0r.js → linear-BFc7NSuB.js} +1 -1
  47. package/dist/assets/mindmap-definition-RKZ34NQL-3dDKU3Ah.js +96 -0
  48. package/dist/assets/ordinal-BQ3KlzSu.js +1 -0
  49. package/dist/assets/pieDiagram-4H26LBE5-DtE_Cy6e.js +30 -0
  50. package/dist/assets/purify.es-DxCUJf2h.js +3 -0
  51. package/dist/assets/quadrantDiagram-W4KKPZXB-T2BQZBW5.js +7 -0
  52. package/dist/assets/{requirementDiagram-MS252O5E-eGb4gzyY.js → requirementDiagram-4Y6WPE33-F5q9pqAd.js} +1 -1
  53. package/dist/assets/sankeyDiagram-5OEKKPKP-1f5jZgij.js +40 -0
  54. package/dist/assets/sequenceDiagram-3UESZ5HK-B8LfPZVJ.js +162 -0
  55. package/dist/assets/stateDiagram-AJRCARHV-DUJIZEbV.js +1 -0
  56. package/dist/assets/stateDiagram-v2-BHNVJYJU-jwVk2opC.js +1 -0
  57. package/dist/assets/{step-EjIQ8UIn.js → step-D_f8mI9d.js} +1 -1
  58. package/dist/assets/{time-h5EapSZu.js → time-C-HXPWjm.js} +1 -1
  59. package/dist/assets/{timeline-definition-GMOUNBTQ-BMIPAICW.js → timeline-definition-PNZ67QCA-B7mA_bMt.js} +3 -3
  60. package/dist/assets/vennDiagram-CIIHVFJN-eQ_va4zK.js +34 -0
  61. package/dist/assets/wardley-L42UT6IY-DSnXDyTD.js +173 -0
  62. package/dist/assets/wardleyDiagram-YWT4CUSO-DsZtL4gF.js +78 -0
  63. package/dist/assets/{xychartDiagram-5P7HB3ND-BkCris5N.js → xychartDiagram-2RQKCTM6-iPTd2JhY.js} +3 -3
  64. package/dist/index.html +2 -2
  65. package/package.json +3 -1
  66. package/dist/assets/MermaidRenderer-CmXoyqXC.js +0 -313
  67. package/dist/assets/SVGRenderer-DhgAIuO1.js +0 -6
  68. package/dist/assets/_baseUniq-DloMpWiC.js +0 -1
  69. package/dist/assets/arc-BSnyvXPh.js +0 -1
  70. package/dist/assets/architectureDiagram-Q4EWVU46-B8KMzkFt.js +0 -36
  71. package/dist/assets/blockDiagram-DXYQGD6D-BdL0TYPu.js +0 -132
  72. package/dist/assets/channel-DubFLvZS.js +0 -1
  73. package/dist/assets/chunk-4TB4RGXK-Ck4QqP3K.js +0 -206
  74. package/dist/assets/chunk-55IACEB6-DXdYcIT2.js +0 -1
  75. package/dist/assets/chunk-EDXVE4YY-TeBR2QKO.js +0 -1
  76. package/dist/assets/chunk-OYMX7WX6-1E0LKijl.js +0 -231
  77. package/dist/assets/chunk-YZCP3GAM-CCtc1vqk.js +0 -1
  78. package/dist/assets/classDiagram-6PBFFD2Q-CsFj_YsM.js +0 -1
  79. package/dist/assets/classDiagram-v2-HSJHXN6E-CsFj_YsM.js +0 -1
  80. package/dist/assets/clone-jZcgN-_G.js +0 -1
  81. package/dist/assets/cose-bilkent-S5V4N54A-B4rzpz-f.js +0 -1
  82. package/dist/assets/cytoscape.esm-BiciSPf8.js +0 -331
  83. package/dist/assets/dagre-KV5264BT-1iL4RYvS.js +0 -4
  84. package/dist/assets/diagram-5BDNPKRD-Xo_7fok6.js +0 -10
  85. package/dist/assets/diagram-G4DWMVQ6-C52EzwbV.js +0 -24
  86. package/dist/assets/diagram-MMDJMWI5-BukTxBI5.js +0 -43
  87. package/dist/assets/diagram-TYMM5635-CkBiNxnI.js +0 -24
  88. package/dist/assets/ganttDiagram-T4ZO3ILL-CSnn6uMq.js +0 -292
  89. package/dist/assets/gitGraphDiagram-UUTBAWPF-HrICfvGm.js +0 -106
  90. package/dist/assets/graph-BBTvQ5FI.js +0 -1
  91. package/dist/assets/index-9mqVdUba.js +0 -644
  92. package/dist/assets/index-D1X8PV1O.css +0 -1
  93. package/dist/assets/infoDiagram-42DDH7IO-Dw38VYFU.js +0 -2
  94. package/dist/assets/layout-Z9EF_Ub1.js +0 -1
  95. package/dist/assets/min-CgT8voI0.js +0 -1
  96. package/dist/assets/mindmap-definition-QFDTVHPH-B3Mpl_wP.js +0 -96
  97. package/dist/assets/ordinal-DILIJJjt.js +0 -1
  98. package/dist/assets/pieDiagram-DEJITSTG-Cs2Mu6Yg.js +0 -30
  99. package/dist/assets/purify.es-BlZidd4c.js +0 -2
  100. package/dist/assets/quadrantDiagram-34T5L4WZ-CUcOgh3E.js +0 -7
  101. package/dist/assets/sankeyDiagram-XADWPNL6-CJL3aIB5.js +0 -10
  102. package/dist/assets/sequenceDiagram-FGHM5R23-DghCZsr4.js +0 -157
  103. package/dist/assets/stateDiagram-FHFEXIEX-CEYXYE9a.js +0 -1
  104. package/dist/assets/stateDiagram-v2-QKLJ7IA2-BU1in3oP.js +0 -1
  105. package/dist/assets/vennDiagram-DHZGUBPP-BI2qFIdH.js +0 -34
  106. package/dist/assets/wardley-RL74JXVD-Cn_I5L_C.js +0 -162
  107. package/dist/assets/wardleyDiagram-NUSXRM2D-CAfUhUNM.js +0 -20
@@ -1,9 +1,9 @@
1
- import{g as gt}from"./chunk-FMBD7UC4-DTCbHJhW.js";import{a as mt,g as lt,h as xt,d as kt}from"./chunk-YZCP3GAM-CCtc1vqk.js";import{g as _t,s as vt,a as bt,b as wt,q as Tt,p as St,_ as s,c as R,d as G,e as $t,y as Mt}from"./MermaidRenderer-CmXoyqXC.js";import{d as it}from"./arc-BSnyvXPh.js";import"./index-9mqVdUba.js";import"./purify.es-BlZidd4c.js";import"./step-EjIQ8UIn.js";var U=function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={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(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},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(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var X="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?X="Parse error on line "+(C+1)+`:
1
+ import{g as gt}from"./chunk-FMBD7UC4-CQ0E2DVU.js";import{d as mt,g as lt,f as xt,e as kt}from"./chunk-ND2GUHAM-Bs4KqGh8.js";import{K as _t,aB as vt,L as bt,aC as wt,P as Tt,aE as St,a as s,O as R,az as G,w as $t,n as Mt}from"./MermaidRenderer-DL5m_Hhz.js";import{d as it}from"./arc-DeiHBTsx.js";import"./index-Chrzghtr.js";import"./purify.es-DxCUJf2h.js";import"./step-D_f8mI9d.js";var U=function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={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(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},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(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var X="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?X="Parse error on line "+(C+1)+`:
2
2
  `+_.showPosition()+`
3
3
  Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":X="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(X,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,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 r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=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),l.length-1&&(this.yylineno-=l.length-1);var d=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:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
5
  `+n+"^"},"showPosition"),test_match:s(function(r,n){var l,y,d;if(this.options.backtrack_lexer&&(d={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&&(d.yylloc.range=this.yylloc.range.slice(0))),y=r[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var c in d)this[c]=d[c];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,n,l,y;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),c=0;c<d.length;c++)if(l=this._input.match(this.rules[d[c]]),l&&(!n||l[0].length>n[0].length)){if(n=l,y=c,this.options.backtrack_lexer){if(r=this.test_match(l,d[c]),r!==!1)return r;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(r=this.test_match(n,d[y]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var n=this.next();return n||this.lex()},"lex"),begin:s(function(n){this.conditionStack.push(n)},"begin"),popState:s(function(){var n=this.conditionStack.length-1;return n>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),n>=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,l,y,d){switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return h}();g.lexer=m;function x(){this.yy={}}return s(x,"Parser"),x.prototype=g,g.Parser=x,new x}();U.parser=U;var Et=U,V="",J=[],L=[],B=[],Ct=s(function(){J.length=0,L.length=0,V="",B.length=0,Mt()},"clear"),Pt=s(function(t){V=t,J.push(t)},"addSection"),It=s(function(){return J},"getSections"),At=s(function(){let t=rt();const e=100;let a=0;for(;!t&&a<e;)t=rt(),a++;return L.push(...B),L},"getTasks"),Ft=s(function(){const t=[];return L.forEach(a=>{a.people&&t.push(...a.people)}),[...new Set(t)].sort()},"updateActors"),Vt=s(function(t,e){const a=e.substr(1).split(":");let f=0,i=[];a.length===1?(f=Number(a[0]),i=[]):(f=Number(a[0]),i=a[1].split(","));const u=i.map(o=>o.trim()),p={section:V,type:V,people:u,task:t,score:f};B.push(p)},"addTask"),Rt=s(function(t){const e={section:V,type:V,description:t,task:t,classes:[]};L.push(e)},"addTaskOrg"),rt=s(function(){const t=s(function(a){return B[a].processed},"compileTask");let e=!0;for(const[a,f]of B.entries())t(a),e=e&&f.processed;return e},"compileTasks"),Lt=s(function(){return Ft()},"getActors"),nt={getConfig:s(()=>R().journey,"getConfig"),clear:Ct,setDiagramTitle:St,getDiagramTitle:Tt,setAccTitle:wt,getAccTitle:bt,setAccDescription:vt,getAccDescription:_t,addSection:Pt,getSections:It,getTasks:At,addTask:Vt,addTaskOrg:Rt,getActors:Lt},Bt=s(t=>`.label {
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(){var n=this.conditionStack.length-1;return n>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),n>=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,l,y,d){switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return h}();g.lexer=m;function x(){this.yy={}}return s(x,"Parser"),x.prototype=g,g.Parser=x,new x}();U.parser=U;var Et=U,V="",Z=[],L=[],B=[],Ct=s(function(){Z.length=0,L.length=0,V="",B.length=0,Mt()},"clear"),Pt=s(function(t){V=t,Z.push(t)},"addSection"),It=s(function(){return Z},"getSections"),At=s(function(){let t=rt();const e=100;let a=0;for(;!t&&a<e;)t=rt(),a++;return L.push(...B),L},"getTasks"),Ft=s(function(){const t=[];return L.forEach(a=>{a.people&&t.push(...a.people)}),[...new Set(t)].sort()},"updateActors"),Vt=s(function(t,e){const a=e.substr(1).split(":");let f=0,i=[];a.length===1?(f=Number(a[0]),i=[]):(f=Number(a[0]),i=a[1].split(","));const u=i.map(o=>o.trim()),p={section:V,type:V,people:u,task:t,score:f};B.push(p)},"addTask"),Rt=s(function(t){const e={section:V,type:V,description:t,task:t,classes:[]};L.push(e)},"addTaskOrg"),rt=s(function(){const t=s(function(a){return B[a].processed},"compileTask");let e=!0;for(const[a,f]of B.entries())t(a),e=e&&f.processed;return e},"compileTasks"),Lt=s(function(){return Ft()},"getActors"),nt={getConfig:s(()=>R().journey,"getConfig"),clear:Ct,setDiagramTitle:St,getDiagramTitle:Tt,setAccTitle:wt,getAccTitle:bt,setAccDescription:vt,getAccDescription:_t,addSection:Pt,getSections:It,getTasks:At,addTask:Vt,addTaskOrg:Rt,getActors:Lt},Bt=s(t=>`.label {
7
7
  font-family: ${t.fontFamily};
8
8
  color: ${t.textColor};
9
9
  }
@@ -136,4 +136,4 @@ Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":X="Parse error on
136
136
  ${t.actor5?`fill: ${t.actor5}`:""};
137
137
  }
138
138
  ${gt()}
139
- `,"getStyles"),jt=Bt,K=s(function(t,e){return kt(t,e)},"drawRect"),Nt=s(function(t,e){const f=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");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(g){const m=it().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(u,"smile");function p(g){const m=it().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(p,"sad");function o(g){g.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(o,"ambivalent"),e.score>3?u(i):e.score<3?p(i):o(i),f},"drawFace"),ot=s(function(t,e){const a=t.append("circle");return a.attr("cx",e.cx),a.attr("cy",e.cy),a.attr("class","actor-"+e.pos),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("r",e.r),a.class!==void 0&&a.attr("class",a.class),e.title!==void 0&&a.append("title").text(e.title),a},"drawCircle"),ct=s(function(t,e){return xt(t,e)},"drawText"),zt=s(function(t,e){function a(i,u,p,o,g){return i+","+u+" "+(i+p)+","+u+" "+(i+p)+","+(u+o-g)+" "+(i+p-g*1.2)+","+(u+o)+" "+i+","+(u+o)}s(a,"genPoints");const f=t.append("polygon");f.attr("points",a(e.x,e.y,50,20,7)),f.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ct(t,e)},"drawLabel"),Wt=s(function(t,e,a){const f=t.append("g"),i=lt();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=a.width*e.taskCount+a.diagramMarginX*(e.taskCount-1),i.height=a.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,K(f,i),ht(a)(e.text,f,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},a,e.colour)},"drawSection"),Z=-1,Ot=s(function(t,e,a,f){const i=e.x+a.width/2,u=t.append("g");Z++;const p=300+5*30;u.append("line").attr("id",f+"-task"+Z).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",p).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Nt(u,{cx:i,cy:300+(5-e.score)*30,score:e.score});const o=lt();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=a.width,o.height=a.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,K(u,o);let g=e.x+14;e.people.forEach(m=>{const x=e.actors[m].color,h={cx:g,cy:e.y,r:7,fill:x,stroke:"#000",title:m,pos:e.actors[m].position};ot(u,h),g+=10}),ht(a)(e.task,u,o.x,o.y,o.width,o.height,{class:"task"},a,e.colour)},"drawTask"),Yt=s(function(t,e){mt(t,e)},"drawBackgroundRect"),ht=function(){function t(i,u,p,o,g,m,x,h){const r=u.append("text").attr("x",p+g/2).attr("y",o+m/2+5).style("font-color",h).style("text-anchor","middle").text(i);f(r,x)}s(t,"byText");function e(i,u,p,o,g,m,x,h,r){const{taskFontSize:n,taskFontFamily:l}=h,y=i.split(/<br\s*\/?>/gi);for(let d=0;d<y.length;d++){const c=d*n-n*(y.length-1)/2,v=u.append("text").attr("x",p+g/2).attr("y",o).attr("fill",r).style("text-anchor","middle").style("font-size",n).style("font-family",l);v.append("tspan").attr("x",p+g/2).attr("dy",c).text(y[d]),v.attr("y",o+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),f(v,x)}}s(e,"byTspan");function a(i,u,p,o,g,m,x,h){const r=u.append("switch"),l=r.append("foreignObject").attr("x",p).attr("y",o).attr("width",g).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,r,p,o,g,m,x,h),f(l,x)}s(a,"byFo");function f(i,u){for(const p in u)p in u&&i.attr(p,u[p])}return s(f,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?a:i.textPlacement==="old"?t:e}}(),qt=s(function(t,e){Z=-1,t.append("defs").append("marker").attr("id",e+"-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"),j={drawRect:K,drawCircle:ot,drawSection:Wt,drawText:ct,drawLabel:zt,drawTask:Ot,drawBackgroundRect:Yt,initGraphics:qt},Xt=s(function(t){Object.keys(t).forEach(function(a){$[a]=t[a]})},"setConf"),E={},W=0;function ut(t){const e=R().journey,a=e.maxLabelWidth;W=0;let f=60;Object.keys(E).forEach(i=>{const u=E[i].color,p={cx:20,cy:f,r:7,fill:u,stroke:"#000",pos:E[i].position};j.drawCircle(t,p);let o=t.append("text").attr("visibility","hidden").text(i);const g=o.node().getBoundingClientRect().width;o.remove();let m=[];if(g<=a)m=[i];else{const x=i.split(" ");let h="";o=t.append("text").attr("visibility","hidden"),x.forEach(r=>{const n=h?`${h} ${r}`:r;if(o.text(n),o.node().getBoundingClientRect().width>a){if(h&&m.push(h),h=r,o.text(r),o.node().getBoundingClientRect().width>a){let y="";for(const d of r)y+=d,o.text(y+"-"),o.node().getBoundingClientRect().width>a&&(m.push(y.slice(0,-1)+"-"),y=d);h=y}}else h=n}),h&&m.push(h),o.remove()}m.forEach((x,h)=>{const r={x:40,y:f+7+h*20,fill:"#666",text:x,textMargin:e.boxTextMargin??5},l=j.drawText(t,r).node().getBoundingClientRect().width;l>W&&l>e.leftMargin-l&&(W=l)}),f+=Math.max(20,m.length*20)})}s(ut,"drawActorLegend");var $=R().journey,P=0,Gt=s(function(t,e,a,f){const i=R(),u=i.journey.titleColor,p=i.journey.titleFontSize,o=i.journey.titleFontFamily,g=i.securityLevel;let m;g==="sandbox"&&(m=G("#i"+e));const x=g==="sandbox"?G(m.nodes()[0].contentDocument.body):G("body");S.init();const h=x.select("#"+e);j.initGraphics(h,e);const r=f.db.getTasks(),n=f.db.getDiagramTitle(),l=f.db.getActors();for(const C in E)delete E[C];let y=0;l.forEach(C=>{E[C]={color:$.actorColours[y%$.actorColours.length],position:y},y++}),ut(h),P=$.leftMargin+W,S.insert(0,0,P,Object.keys(E).length*50),Ht(h,r,0,e);const d=S.getBounds();n&&h.append("text").text(n).attr("x",P).attr("font-size",p).attr("font-weight","bold").attr("y",25).attr("fill",u).attr("font-family",o);const c=d.stopy-d.starty+2*$.diagramMarginY,v=P+d.stopx+2*$.diagramMarginX;$t(h,c,v,$.useMaxWidth),h.append("line").attr("x1",P).attr("y1",$.height*4).attr("x2",v-P-4).attr("y2",$.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const k=n?70:0;h.attr("viewBox",`${d.startx} -25 ${v} ${c+k}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",c+k+25)},"draw"),S={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,a,f){t[e]===void 0?t[e]=a:t[e]=f(a,t[e])},"updateVal"),updateBounds:s(function(t,e,a,f){const i=R().journey,u=this;let p=0;function o(g){return s(function(x){p++;const h=u.sequenceItems.length-p+1;u.updateVal(x,"starty",e-h*i.boxMargin,Math.min),u.updateVal(x,"stopy",f+h*i.boxMargin,Math.max),u.updateVal(S.data,"startx",t-h*i.boxMargin,Math.min),u.updateVal(S.data,"stopx",a+h*i.boxMargin,Math.max),g!=="activation"&&(u.updateVal(x,"startx",t-h*i.boxMargin,Math.min),u.updateVal(x,"stopx",a+h*i.boxMargin,Math.max),u.updateVal(S.data,"starty",e-h*i.boxMargin,Math.min),u.updateVal(S.data,"stopy",f+h*i.boxMargin,Math.max))},"updateItemBounds")}s(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:s(function(t,e,a,f){const i=Math.min(t,a),u=Math.max(t,a),p=Math.min(e,f),o=Math.max(e,f);this.updateVal(S.data,"startx",i,Math.min),this.updateVal(S.data,"starty",p,Math.min),this.updateVal(S.data,"stopx",u,Math.max),this.updateVal(S.data,"stopy",o,Math.max),this.updateBounds(i,p,u,o)},"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")},H=$.sectionFills,st=$.sectionColours,Ht=s(function(t,e,a,f){const i=R().journey;let u="";const p=i.height*2+i.diagramMarginY,o=a+p;let g=0,m="#CCC",x="black",h=0;for(const[r,n]of e.entries()){if(u!==n.section){m=H[g%H.length],h=g%H.length,x=st[g%st.length];let y=0;const d=n.section;for(let v=r;v<e.length&&e[v].section==d;v++)y=y+1;const c={x:r*i.taskMargin+r*i.width+P,y:50,text:n.section,fill:m,num:h,colour:x,taskCount:y};j.drawSection(t,c,i),u=n.section,g++}const l=n.people.reduce((y,d)=>(E[d]&&(y[d]=E[d]),y),{});n.x=r*i.taskMargin+r*i.width+P,n.y=o,n.width=i.diagramMarginX,n.height=i.diagramMarginY,n.colour=x,n.fill=m,n.num=h,n.actors=l,j.drawTask(t,n,i,f),S.insert(n.x,n.y,n.x+n.width+i.taskMargin,300+5*30)}},"drawTasks"),at={setConf:Xt,draw:Gt},ee={parser:Et,db:nt,renderer:at,styles:jt,init:s(t=>{at.setConf(t.journey),nt.clear()},"init")};export{ee as diagram};
139
+ `,"getStyles"),jt=Bt,J=s(function(t,e){return kt(t,e)},"drawRect"),Nt=s(function(t,e){const f=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");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(g){const m=it().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(u,"smile");function p(g){const m=it().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(p,"sad");function o(g){g.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(o,"ambivalent"),e.score>3?u(i):e.score<3?p(i):o(i),f},"drawFace"),ot=s(function(t,e){const a=t.append("circle");return a.attr("cx",e.cx),a.attr("cy",e.cy),a.attr("class","actor-"+e.pos),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("r",e.r),a.class!==void 0&&a.attr("class",a.class),e.title!==void 0&&a.append("title").text(e.title),a},"drawCircle"),ct=s(function(t,e){return xt(t,e)},"drawText"),zt=s(function(t,e){function a(i,u,p,o,g){return i+","+u+" "+(i+p)+","+u+" "+(i+p)+","+(u+o-g)+" "+(i+p-g*1.2)+","+(u+o)+" "+i+","+(u+o)}s(a,"genPoints");const f=t.append("polygon");f.attr("points",a(e.x,e.y,50,20,7)),f.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ct(t,e)},"drawLabel"),Wt=s(function(t,e,a){const f=t.append("g"),i=lt();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=a.width*e.taskCount+a.diagramMarginX*(e.taskCount-1),i.height=a.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,J(f,i),ht(a)(e.text,f,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},a,e.colour)},"drawSection"),K=-1,Ot=s(function(t,e,a,f){const i=e.x+a.width/2,u=t.append("g");K++;const p=300+5*30;u.append("line").attr("id",f+"-task"+K).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",p).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Nt(u,{cx:i,cy:300+(5-e.score)*30,score:e.score});const o=lt();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=a.width,o.height=a.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,J(u,o);let g=e.x+14;e.people.forEach(m=>{const x=e.actors[m].color,h={cx:g,cy:e.y,r:7,fill:x,stroke:"#000",title:m,pos:e.actors[m].position};ot(u,h),g+=10}),ht(a)(e.task,u,o.x,o.y,o.width,o.height,{class:"task"},a,e.colour)},"drawTask"),Yt=s(function(t,e){mt(t,e)},"drawBackgroundRect"),ht=function(){function t(i,u,p,o,g,m,x,h){const r=u.append("text").attr("x",p+g/2).attr("y",o+m/2+5).style("font-color",h).style("text-anchor","middle").text(i);f(r,x)}s(t,"byText");function e(i,u,p,o,g,m,x,h,r){const{taskFontSize:n,taskFontFamily:l}=h,y=i.split(/<br\s*\/?>/gi);for(let d=0;d<y.length;d++){const c=d*n-n*(y.length-1)/2,v=u.append("text").attr("x",p+g/2).attr("y",o).attr("fill",r).style("text-anchor","middle").style("font-size",n).style("font-family",l);v.append("tspan").attr("x",p+g/2).attr("dy",c).text(y[d]),v.attr("y",o+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),f(v,x)}}s(e,"byTspan");function a(i,u,p,o,g,m,x,h){const r=u.append("switch"),l=r.append("foreignObject").attr("x",p).attr("y",o).attr("width",g).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,r,p,o,g,m,x,h),f(l,x)}s(a,"byFo");function f(i,u){for(const p in u)p in u&&i.attr(p,u[p])}return s(f,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?a:i.textPlacement==="old"?t:e}}(),qt=s(function(t,e){K=-1,t.append("defs").append("marker").attr("id",e+"-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"),j={drawRect:J,drawCircle:ot,drawSection:Wt,drawText:ct,drawLabel:zt,drawTask:Ot,drawBackgroundRect:Yt,initGraphics:qt},Xt=s(function(t){Object.keys(t).forEach(function(a){$[a]=t[a]})},"setConf"),E={},W=0;function ut(t){const e=R().journey,a=e.maxLabelWidth;W=0;let f=60;Object.keys(E).forEach(i=>{const u=E[i].color,p={cx:20,cy:f,r:7,fill:u,stroke:"#000",pos:E[i].position};j.drawCircle(t,p);let o=t.append("text").attr("visibility","hidden").text(i);const g=o.node().getBoundingClientRect().width;o.remove();let m=[];if(g<=a)m=[i];else{const x=i.split(" ");let h="";o=t.append("text").attr("visibility","hidden"),x.forEach(r=>{const n=h?`${h} ${r}`:r;if(o.text(n),o.node().getBoundingClientRect().width>a){if(h&&m.push(h),h=r,o.text(r),o.node().getBoundingClientRect().width>a){let y="";for(const d of r)y+=d,o.text(y+"-"),o.node().getBoundingClientRect().width>a&&(m.push(y.slice(0,-1)+"-"),y=d);h=y}}else h=n}),h&&m.push(h),o.remove()}m.forEach((x,h)=>{const r={x:40,y:f+7+h*20,fill:"#666",text:x,textMargin:e.boxTextMargin??5},l=j.drawText(t,r).node().getBoundingClientRect().width;l>W&&l>e.leftMargin-l&&(W=l)}),f+=Math.max(20,m.length*20)})}s(ut,"drawActorLegend");var $=R().journey,P=0,Gt=s(function(t,e,a,f){const i=R(),u=i.journey.titleColor,p=i.journey.titleFontSize,o=i.journey.titleFontFamily,g=i.securityLevel;let m;g==="sandbox"&&(m=G("#i"+e));const x=g==="sandbox"?G(m.nodes()[0].contentDocument.body):G("body");S.init();const h=x.select("#"+e);j.initGraphics(h,e);const r=f.db.getTasks(),n=f.db.getDiagramTitle(),l=f.db.getActors();for(const C in E)delete E[C];let y=0;l.forEach(C=>{E[C]={color:$.actorColours[y%$.actorColours.length],position:y},y++}),ut(h),P=$.leftMargin+W,S.insert(0,0,P,Object.keys(E).length*50),Ht(h,r,0,e);const d=S.getBounds();n&&h.append("text").text(n).attr("x",P).attr("font-size",p).attr("font-weight","bold").attr("y",25).attr("fill",u).attr("font-family",o);const c=d.stopy-d.starty+2*$.diagramMarginY,v=P+d.stopx+2*$.diagramMarginX;$t(h,c,v,$.useMaxWidth),h.append("line").attr("x1",P).attr("y1",$.height*4).attr("x2",v-P-4).attr("y2",$.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const k=n?70:0;h.attr("viewBox",`${d.startx} -25 ${v} ${c+k}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",c+k+25)},"draw"),S={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,a,f){t[e]===void 0?t[e]=a:t[e]=f(a,t[e])},"updateVal"),updateBounds:s(function(t,e,a,f){const i=R().journey,u=this;let p=0;function o(g){return s(function(x){p++;const h=u.sequenceItems.length-p+1;u.updateVal(x,"starty",e-h*i.boxMargin,Math.min),u.updateVal(x,"stopy",f+h*i.boxMargin,Math.max),u.updateVal(S.data,"startx",t-h*i.boxMargin,Math.min),u.updateVal(S.data,"stopx",a+h*i.boxMargin,Math.max),g!=="activation"&&(u.updateVal(x,"startx",t-h*i.boxMargin,Math.min),u.updateVal(x,"stopx",a+h*i.boxMargin,Math.max),u.updateVal(S.data,"starty",e-h*i.boxMargin,Math.min),u.updateVal(S.data,"stopy",f+h*i.boxMargin,Math.max))},"updateItemBounds")}s(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:s(function(t,e,a,f){const i=Math.min(t,a),u=Math.max(t,a),p=Math.min(e,f),o=Math.max(e,f);this.updateVal(S.data,"startx",i,Math.min),this.updateVal(S.data,"starty",p,Math.min),this.updateVal(S.data,"stopx",u,Math.max),this.updateVal(S.data,"stopy",o,Math.max),this.updateBounds(i,p,u,o)},"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")},H=$.sectionFills,st=$.sectionColours,Ht=s(function(t,e,a,f){const i=R().journey;let u="";const p=i.height*2+i.diagramMarginY,o=a+p;let g=0,m="#CCC",x="black",h=0;for(const[r,n]of e.entries()){if(u!==n.section){m=H[g%H.length],h=g%H.length,x=st[g%st.length];let y=0;const d=n.section;for(let v=r;v<e.length&&e[v].section==d;v++)y=y+1;const c={x:r*i.taskMargin+r*i.width+P,y:50,text:n.section,fill:m,num:h,colour:x,taskCount:y};j.drawSection(t,c,i),u=n.section,g++}const l=n.people.reduce((y,d)=>(E[d]&&(y[d]=E[d]),y),{});n.x=r*i.taskMargin+r*i.width+P,n.y=o,n.width=i.diagramMarginX,n.height=i.diagramMarginY,n.colour=x,n.fill=m,n.num=h,n.actors=l,j.drawTask(t,n,i,f),S.insert(n.x,n.y,n.x+n.width+i.taskMargin,300+5*30)}},"drawTasks"),at={setConf:Xt,draw:Gt},ee={parser:Et,db:nt,renderer:at,styles:jt,init:s(t=>{at.setConf(t.journey),nt.clear()},"init")};export{ee as diagram};
@@ -1,14 +1,14 @@
1
- import{_ as c,l as te,c as W,H as fe,Y as ye,$ as be,a0 as me,W as _e,F as K,i as G,t as ke,J as Ee,T as Se,U as le,V as ce}from"./MermaidRenderer-CmXoyqXC.js";import{g as Ne}from"./chunk-FMBD7UC4-DTCbHJhW.js";import"./index-9mqVdUba.js";import"./purify.es-BlZidd4c.js";import"./step-EjIQ8UIn.js";var $=function(){var t=c(function(_,s,n,a){for(n=n||{},a=_.length;a--;n[_[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],k=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],U=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],H=[1,35],M=[1,36],A=[1,6,7,11,13,16,17,20,23],j=[1,38],V={trace:c(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:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){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: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:U}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},t(P,[2,14],{7:H,11:M}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:U}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:j}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:H,11:M}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:j}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),m=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]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var q=m.yylloc;e.push(q);var de=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||m.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var E,R,v,Q,F={},X,I,oe,Y;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((E===null||typeof E>"u")&&(E=ae()),v=B[R]&&B[R][E]),typeof v>"u"||!v.length||!v[0]){var Z="";Y=[];for(X in B[R])this.terminals_[X]&&X>ue&&Y.push("'"+this.terminals_[X]+"'");m.showPosition?Z="Parse error on line "+(z+1)+`:
1
+ import{a as c,ai as te,O as W,aA as fe,a3 as ye,a6 as be,aq as me,aH as ke,F as Y,ax as G,ah as Ee,J as _e,aa as Se,af as le,y as ce}from"./MermaidRenderer-DL5m_Hhz.js";import{g as Ne}from"./chunk-FMBD7UC4-CQ0E2DVU.js";import"./index-Chrzghtr.js";import"./purify.es-DxCUJf2h.js";import"./step-D_f8mI9d.js";var $=function(){var t=c(function(k,s,n,a){for(n=n||{},a=k.length;a--;n[k[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],E=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],H=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],M=[1,35],U=[1,36],A=[1,6,7,11,13,16,17,20,23],j=[1,38],V={trace:c(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:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){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: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:H}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(P,[2,14],{7:M,11:U}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:H}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:j}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:M,11:U}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:j}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),m=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]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var q=m.yylloc;e.push(q);var de=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||m.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var _,R,v,Q,F={},X,I,oe,K;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((_===null||typeof _>"u")&&(_=ae()),v=B[R]&&B[R][_]),typeof v>"u"||!v.length||!v[0]){var Z="";K=[];for(X in B[R])this.terminals_[X]&&X>ue&&K.push("'"+this.terminals_[X]+"'");m.showPosition?Z="Parse error on line "+(z+1)+`:
2
2
  `+m.showPosition()+`
3
- Expecting `+Y.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(E==re?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Z,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:q,expected:Y})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+E);switch(v[0]){case 1:a.push(E),u.push(m.yytext),e.push(m.yylloc),a.push(v[1]),E=null,ie=m.yyleng,l=m.yytext,z=m.yylineno,q=m.yylloc;break;case 2:if(I=this.productions_[v[1]][1],F.$=u[u.length-I],F._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(F._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Q=this.performAction.apply(F,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Q<"u")return Q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(F.$),e.push(F._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},y=function(){var _={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),a.length-1&&(this.yylineno-=a.length-1);var u=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===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
3
+ Expecting `+K.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(_==re?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Z,{text:m.match,token:this.terminals_[_]||_,line:m.yylineno,loc:q,expected:K})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+_);switch(v[0]){case 1:a.push(_),u.push(m.yytext),e.push(m.yylloc),a.push(v[1]),_=null,ie=m.yyleng,l=m.yytext,z=m.yylineno,q=m.yylloc;break;case 2:if(I=this.productions_[v[1]][1],F.$=u[u.length-I],F._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(F._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Q=this.performAction.apply(F,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Q<"u")return Q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(F.$),e.push(F._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},y=function(){var k={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),a.length-1&&(this.yylineno-=a.length-1);var u=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===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
5
  `+n+"^"},"showPosition"),test_match:c(function(s,n){var a,o,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),o=s[0].match(/(?:\r\n?|\n).*/g),o&&(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+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],a=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var e in u)this[e]=u[e];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,a,o;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),e=0;e<u.length;e++)if(a=this._input.match(this.rules[u[e]]),a&&(!n||a[0].length>n[0].length)){if(n=a,o=e,this.options.backtrack_lexer){if(s=this.test_match(a,u[e]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,u[o]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:c(function(){var n=this.next();return n||this.lex()},"lex"),begin:c(function(n){this.conditionStack.push(n)},"begin"),popState:c(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:c(function(n){this.begin(n)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(n,a,o,u){switch(o){case 0:return this.pushState("shapeData"),a.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const e=/\n\s*/g;return a.yytext=a.yytext.replace(e,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return n.getLogger().trace("Found comment",a.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return n.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:n.getLogger().trace("end icon"),this.popState();break;case 16:return n.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return n.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return n.getLogger().trace("description:",a.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),n.getLogger().trace("node end ...",a.yytext),"NODE_DEND";case 36:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 41:return n.getLogger().trace("Long description:",a.yytext),21;case 42:return n.getLogger().trace("Long description:",a.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return _}();V.lexer=y;function O(){this.yy={}}return c(O,"Parser"),O.prototype=V,V.Parser=O,new O}();$.parser=$;var xe=$,D=[],ne=[],ee=0,se={},ve=c(()=>{D=[],ne=[],ee=0,se={}},"clear"),De=c(t=>{if(D.length===0)return null;const g=D[0].level;let d=null;for(let r=D.length-1;r>=0;r--)if(D[r].level===g&&!d&&(d=D[r]),D[r].level<g)throw new Error('Items without section detected, found section ("'+D[r].label+'")');return t===(d==null?void 0:d.level)?null:d},"getSection"),he=c(function(){return ne},"getSections"),Le=c(function(){const t=[],g=[],d=he(),r=W();for(const p of d){const k={id:p.id,label:G(p.label??"",r),labelType:"markdown",isGroup:!0,ticket:p.ticket,shape:"kanbanSection",level:p.level,look:r.look};g.push(k);const f=D.filter(h=>h.parentId===p.id);for(const h of f){const L={id:h.id,parentId:p.id,label:G(h.label??"",r),labelType:"markdown",isGroup:!1,ticket:h==null?void 0:h.ticket,priority:h==null?void 0:h.priority,assigned:h==null?void 0:h.assigned,icon:h==null?void 0:h.icon,shape:"kanbanItem",level:h.level,rx:5,ry:5,cssStyles:["text-align: left"]};g.push(L)}}return{nodes:g,edges:t,other:{},config:W()}},"getData"),Oe=c((t,g,d,r,p)=>{var C,w;const k=W();let f=((C=k.mindmap)==null?void 0:C.padding)??K.mindmap.padding;switch(r){case b.ROUNDED_RECT:case b.RECT:case b.HEXAGON:f*=2}const h={id:G(g,k)||"kbn"+ee++,level:t,label:G(d,k),width:((w=k.mindmap)==null?void 0:w.maxNodeWidth)??K.mindmap.maxNodeWidth,padding:f,isGroup:!1};if(p!==void 0){let N;p.includes(`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:c(function(){var n=this.next();return n||this.lex()},"lex"),begin:c(function(n){this.conditionStack.push(n)},"begin"),popState:c(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:c(function(n){this.begin(n)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(n,a,o,u){switch(o){case 0:return this.pushState("shapeData"),a.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const e=/\n\s*/g;return a.yytext=a.yytext.replace(e,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return n.getLogger().trace("Found comment",a.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return n.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:n.getLogger().trace("end icon"),this.popState();break;case 16:return n.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return n.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return n.getLogger().trace("description:",a.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),n.getLogger().trace("node end ...",a.yytext),"NODE_DEND";case 36:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 41:return n.getLogger().trace("Long description:",a.yytext),21;case 42:return n.getLogger().trace("Long description:",a.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return k}();V.lexer=y;function O(){this.yy={}}return c(O,"Parser"),O.prototype=V,V.Parser=O,new O}();$.parser=$;var xe=$,D=[],ne=[],ee=0,se={},ve=c(()=>{D=[],ne=[],ee=0,se={}},"clear"),De=c(t=>{if(D.length===0)return null;const g=D[0].level;let d=null;for(let r=D.length-1;r>=0;r--)if(D[r].level===g&&!d&&(d=D[r]),D[r].level<g)throw new Error('Items without section detected, found section ("'+D[r].label+'")');return t===(d==null?void 0:d.level)?null:d},"getSection"),he=c(function(){return ne},"getSections"),Le=c(function(){const t=[],g=[],d=he(),r=W();for(const p of d){const E={id:p.id,label:G(p.label??"",r),labelType:"markdown",isGroup:!0,ticket:p.ticket,shape:"kanbanSection",level:p.level,look:r.look};g.push(E);const f=D.filter(h=>h.parentId===p.id);for(const h of f){const L={id:h.id,parentId:p.id,label:G(h.label??"",r),labelType:"markdown",isGroup:!1,ticket:h==null?void 0:h.ticket,priority:h==null?void 0:h.priority,assigned:h==null?void 0:h.assigned,icon:h==null?void 0:h.icon,shape:"kanbanItem",level:h.level,rx:5,ry:5,cssStyles:["text-align: left"]};g.push(L)}}return{nodes:g,edges:t,other:{},config:W()}},"getData"),Oe=c((t,g,d,r,p)=>{var C,w;const E=W();let f=((C=E.mindmap)==null?void 0:C.padding)??Y.mindmap.padding;switch(r){case b.ROUNDED_RECT:case b.RECT:case b.HEXAGON:f*=2}const h={id:G(g,E)||"kbn"+ee++,level:t,label:G(d,E),width:((w=E.mindmap)==null?void 0:w.maxNodeWidth)??Y.mindmap.maxNodeWidth,padding:f,isGroup:!1};if(p!==void 0){let N;p.includes(`
7
7
  `)?N=p+`
8
8
  `:N=`{
9
9
  `+p+`
10
- }`;const i=ke(N,{schema:Ee});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"&&(h.shape=i==null?void 0:i.shape),i!=null&&i.label&&(h.label=i==null?void 0:i.label),i!=null&&i.icon&&(h.icon=i==null?void 0:i.icon.toString()),i!=null&&i.assigned&&(h.assigned=i==null?void 0:i.assigned.toString()),i!=null&&i.ticket&&(h.ticket=i==null?void 0:i.ticket.toString()),i!=null&&i.priority&&(h.priority=i==null?void 0:i.priority)}const L=De(t);L?h.parentId=L.id||"kbn"+ee++:ne.push(h),D.push(h)},"addNode"),b={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Ie=c((t,g)=>{switch(te.debug("In get type",t,g),t){case"[":return b.RECT;case"(":return g===")"?b.ROUNDED_RECT:b.CLOUD;case"((":return b.CIRCLE;case")":return b.CLOUD;case"))":return b.BANG;case"{{":return b.HEXAGON;default:return b.DEFAULT}},"getType"),Ce=c((t,g)=>{se[t]=g},"setElementForId"),we=c(t=>{if(!t)return;const g=W(),d=D[D.length-1];t.icon&&(d.icon=G(t.icon,g)),t.class&&(d.cssClasses=G(t.class,g))},"decorateNode"),Ae=c(t=>{switch(t){case b.DEFAULT:return"no-border";case b.RECT:return"rect";case b.ROUNDED_RECT:return"rounded-rect";case b.CIRCLE:return"circle";case b.CLOUD:return"cloud";case b.BANG:return"bang";case b.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Te=c(()=>te,"getLogger"),Re=c(t=>se[t],"getElementById"),Pe={clear:ve,addNode:Oe,getSections:he,getData:Le,nodeType:b,getType:Ie,setElementForId:Ce,decorateNode:we,type2Str:Ae,getLogger:Te,getElementById:Re},Ve=Pe,Be=c(async(t,g,d,r)=>{var H,M,A,j,V;te.debug(`Rendering kanban diagram
11
- `+t);const k=r.db.getData(),f=W();f.htmlLabels=!1;const h=fe(g);for(const y of k.nodes)y.domId=`${g}-${y.id}`;const L=h.append("g");L.attr("class","sections");const C=h.append("g");C.attr("class","items");const w=k.nodes.filter(y=>y.isGroup);let N=0;const i=10,U=[];let x=25;for(const y of w){const O=((H=f==null?void 0:f.kanban)==null?void 0:H.sectionWidth)||200;N=N+1,y.x=O*N+(N-1)*i/2,y.width=O,y.y=0,y.height=O*3,y.rx=5,y.ry=5,y.cssClasses=y.cssClasses+" section-"+N;const _=await ye(L,y);x=Math.max(x,(M=_==null?void 0:_.labelBBox)==null?void 0:M.height),U.push(_)}let P=0;for(const y of w){const O=U[P];P=P+1;const _=((A=f==null?void 0:f.kanban)==null?void 0:A.sectionWidth)||200,s=-_*3/2+x;let n=s;const a=k.nodes.filter(e=>e.parentId===y.id);for(const e of a){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=y.x,e.width=_-1.5*i;const l=(await be(C,e,{config:f})).node().getBBox();e.y=n+l.height/2,await me(e),n=e.y+l.height/2+i/2}const o=O.cluster.select("rect"),u=Math.max(n-s+3*i,50)+(x-25);o.attr("height",u)}_e(void 0,h,((j=f.mindmap)==null?void 0:j.padding)??K.kanban.padding,((V=f.mindmap)==null?void 0:V.useMaxWidth)??K.kanban.useMaxWidth)},"draw"),Fe={draw:Be},Ge=c(t=>{let g="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],Se(t["lineColor"+r])?t["lineColor"+r]=le(t["lineColor"+r],20):t["lineColor"+r]=ce(t["lineColor"+r],20);const d=c((r,p)=>t.darkMode?ce(r,p):le(r,p),"adjuster");for(let r=0;r<t.THEME_COLOR_LIMIT;r++){const p=""+(17-3*r);g+=`
10
+ }`;const i=Ee(N,{schema:_e});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"&&(h.shape=i==null?void 0:i.shape),i!=null&&i.label&&(h.label=i==null?void 0:i.label),i!=null&&i.icon&&(h.icon=i==null?void 0:i.icon.toString()),i!=null&&i.assigned&&(h.assigned=i==null?void 0:i.assigned.toString()),i!=null&&i.ticket&&(h.ticket=i==null?void 0:i.ticket.toString()),i!=null&&i.priority&&(h.priority=i==null?void 0:i.priority)}const L=De(t);L?h.parentId=L.id||"kbn"+ee++:ne.push(h),D.push(h)},"addNode"),b={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Ie=c((t,g)=>{switch(te.debug("In get type",t,g),t){case"[":return b.RECT;case"(":return g===")"?b.ROUNDED_RECT:b.CLOUD;case"((":return b.CIRCLE;case")":return b.CLOUD;case"))":return b.BANG;case"{{":return b.HEXAGON;default:return b.DEFAULT}},"getType"),Ce=c((t,g)=>{se[t]=g},"setElementForId"),we=c(t=>{if(!t)return;const g=W(),d=D[D.length-1];t.icon&&(d.icon=G(t.icon,g)),t.class&&(d.cssClasses=G(t.class,g))},"decorateNode"),Ae=c(t=>{switch(t){case b.DEFAULT:return"no-border";case b.RECT:return"rect";case b.ROUNDED_RECT:return"rounded-rect";case b.CIRCLE:return"circle";case b.CLOUD:return"cloud";case b.BANG:return"bang";case b.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Te=c(()=>te,"getLogger"),Re=c(t=>se[t],"getElementById"),Pe={clear:ve,addNode:Oe,getSections:he,getData:Le,nodeType:b,getType:Ie,setElementForId:Ce,decorateNode:we,type2Str:Ae,getLogger:Te,getElementById:Re},Ve=Pe,Be=c(async(t,g,d,r)=>{var M,U,A,j,V;te.debug(`Rendering kanban diagram
11
+ `+t);const E=r.db.getData(),f=W();f.htmlLabels=!1;const h=fe(g);for(const y of E.nodes)y.domId=`${g}-${y.id}`;const L=h.append("g");L.attr("class","sections");const C=h.append("g");C.attr("class","items");const w=E.nodes.filter(y=>y.isGroup);let N=0;const i=10,H=[];let x=25;for(const y of w){const O=((M=f==null?void 0:f.kanban)==null?void 0:M.sectionWidth)||200;N=N+1,y.x=O*N+(N-1)*i/2,y.width=O,y.y=0,y.height=O*3,y.rx=5,y.ry=5,y.cssClasses=y.cssClasses+" section-"+N;const k=await ye(L,y);x=Math.max(x,(U=k==null?void 0:k.labelBBox)==null?void 0:U.height),H.push(k)}let P=0;for(const y of w){const O=H[P];P=P+1;const k=((A=f==null?void 0:f.kanban)==null?void 0:A.sectionWidth)||200,s=-k*3/2+x;let n=s;const a=E.nodes.filter(e=>e.parentId===y.id);for(const e of a){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=y.x,e.width=k-1.5*i;const l=(await be(C,e,{config:f})).node().getBBox();e.y=n+l.height/2,await me(e),n=e.y+l.height/2+i/2}const o=O.cluster.select("rect"),u=Math.max(n-s+3*i,50)+(x-25);o.attr("height",u)}ke(void 0,h,((j=f.mindmap)==null?void 0:j.padding)??Y.kanban.padding,((V=f.mindmap)==null?void 0:V.useMaxWidth)??Y.kanban.useMaxWidth)},"draw"),Fe={draw:Be},Ge=c(t=>{let g="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],Se(t["lineColor"+r])?t["lineColor"+r]=le(t["lineColor"+r],20):t["lineColor"+r]=ce(t["lineColor"+r],20);const d=c((r,p)=>t.darkMode?ce(r,p):le(r,p),"adjuster");for(let r=0;r<t.THEME_COLOR_LIMIT;r++){const p=""+(17-3*r);g+=`
12
12
  .section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path {
13
13
  fill: ${d(t["cScale"+r],10)};
14
14
  stroke: ${d(t["cScale"+r],10)};
@@ -54,7 +54,7 @@ Expecting `+Y.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Z="Parse error on
54
54
  stroke: ${t.nodeBorder};
55
55
  text-decoration: underline;
56
56
  }
57
- `}return g},"genSections"),Ue=c(t=>`
57
+ `}return g},"genSections"),He=c(t=>`
58
58
  .edge {
59
59
  stroke-width: 3;
60
60
  }
@@ -86,4 +86,4 @@ Expecting `+Y.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Z="Parse error on
86
86
  text-align: center;
87
87
  }
88
88
  ${Ne()}
89
- `,"getStyles"),He=Ue,Ye={db:Ve,renderer:Fe,parser:xe,styles:He};export{Ye as diagram};
89
+ `,"getStyles"),Me=He,Ke={db:Ve,renderer:Fe,parser:xe,styles:Me};export{Ke as diagram};
@@ -0,0 +1 @@
1
+ import{O as Y,L as O,t as Ee,u as q,F as K,K as Ke,o as fe,N as Xe,c as jn,h as He,Z as Mn,W as Rn,V as $n,M as de,m as Fn,R as se,Y as Bn,y as ze,_ as Gn,e as Dn,l as Yn,U as Te,a as Pe,z as ce,p as le,T as U,I as Je,S as Ze,b as Un,E as N,x as Vn,P as Wn,H as qn,D as Le,J as Kn,i as Qe,n as C,g as Xn,f as Hn,d as B,q as en,j as nn,B as zn,C as he,r as rn,$ as Jn,k as tn,A as Zn,a0 as Qn,G as E,w as c,s as er,Q as x,v as R,a1 as I,X}from"./graph-Dqkl27Ch.js";var nr=/\s/;function rr(e){for(var n=e.length;n--&&nr.test(e.charAt(n)););return n}var tr=/^\s+/;function ir(e){return e&&e.slice(0,rr(e)+1).replace(tr,"")}var Ne=NaN,ar=/^[-+]0x[0-9a-f]+$/i,or=/^0b[01]+$/i,ur=/^0o[0-7]+$/i,fr=parseInt;function dr(e){if(typeof e=="number")return e;if(Y(e))return Ne;if(O(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=O(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=ir(e);var r=or.test(e);return r||ur.test(e)?fr(e.slice(2),r?2:8):ar.test(e)?Ne:+e}var Ie=1/0,sr=17976931348623157e292;function G(e){if(!e)return e===0?e:0;if(e=dr(e),e===Ie||e===-Ie){var n=e<0?-1:1;return n*sr}return e===e?e:0}function cr(e){var n=G(e),r=n%1;return n===n?r?n-r:n:0}var _e=Object.create,lr=function(){function e(){}return function(n){if(!O(n))return{};if(_e)return _e(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}}();function an(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r<t;)n[r]=e[r];return n}function H(e,n,r){n=="__proto__"&&Ee?Ee(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}var hr=Object.prototype,vr=hr.hasOwnProperty;function z(e,n,r){var t=e[n];(!(vr.call(e,n)&&q(t,r))||r===void 0&&!(n in e))&&H(e,n,r)}function $(e,n,r,t){var i=!r;r||(r={});for(var o=-1,a=n.length;++o<a;){var u=n[o],f=void 0;f===void 0&&(f=e[u]),i?H(r,u,f):z(r,u,f)}return r}function S(e,n,r){if(!O(r))return!1;var t=typeof n;return(t=="number"?K(r)&&Ke(n,r.length):t=="string"&&n in r)?q(r[n],e):!1}function pr(e){return fe(function(n,r){var t=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&S(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),n=Object(n);++t<i;){var u=r[t];u&&e(n,u,t,o)}return n})}function br(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}var wr=Object.prototype,gr=wr.hasOwnProperty;function mr(e){if(!O(e))return br(e);var n=Xe(e),r=[];for(var t in e)t=="constructor"&&(n||!gr.call(e,t))||r.push(t);return r}function P(e){return K(e)?jn(e,!0):mr(e)}function A(e){var n=e==null?0:e.length;return n?He(e):[]}function yr(e){return Mn(Rn(e,void 0,A),e+"")}var ve=$n(Object.getPrototypeOf,Object),xr="[object Object]",Or=Function.prototype,Er=Object.prototype,on=Or.toString,Tr=Er.hasOwnProperty,Pr=on.call(Object);function Lr(e){if(!de(e)||Fn(e)!=xr)return!1;var n=ve(e);if(n===null)return!0;var r=Tr.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&on.call(r)==Pr}function Nr(e,n){return e&&$(n,se(n),e)}function Ir(e,n){return e&&$(n,P(n),e)}var un=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ce=un&&typeof module=="object"&&module&&!module.nodeType&&module,_r=Ce&&Ce.exports===un,Ae=_r?Bn.Buffer:void 0,ke=Ae?Ae.allocUnsafe:void 0;function fn(e,n){if(n)return e.slice();var r=e.length,t=ke?ke(r):new e.constructor(r);return e.copy(t),t}function Cr(e,n){return $(e,ze(e),n)}var Ar=Object.getOwnPropertySymbols,dn=Ar?function(e){for(var n=[];e;)Dn(n,ze(e)),e=ve(e);return n}:Gn;function kr(e,n){return $(e,dn(e),n)}function Sr(e){return Yn(e,P,dn)}var jr=Object.prototype,Mr=jr.hasOwnProperty;function Rr(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&Mr.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function pe(e){var n=new e.constructor(e.byteLength);return new Te(n).set(new Te(e)),n}function $r(e,n){var r=n?pe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Fr=/\w*$/;function Br(e){var n=new e.constructor(e.source,Fr.exec(e));return n.lastIndex=e.lastIndex,n}var Se=Pe?Pe.prototype:void 0,je=Se?Se.valueOf:void 0;function Gr(e){return je?Object(je.call(e)):{}}function sn(e,n){var r=n?pe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Dr="[object Boolean]",Yr="[object Date]",Ur="[object Map]",Vr="[object Number]",Wr="[object RegExp]",qr="[object Set]",Kr="[object String]",Xr="[object Symbol]",Hr="[object ArrayBuffer]",zr="[object DataView]",Jr="[object Float32Array]",Zr="[object Float64Array]",Qr="[object Int8Array]",et="[object Int16Array]",nt="[object Int32Array]",rt="[object Uint8Array]",tt="[object Uint8ClampedArray]",it="[object Uint16Array]",at="[object Uint32Array]";function ot(e,n,r){var t=e.constructor;switch(n){case Hr:return pe(e);case Dr:case Yr:return new t(+e);case zr:return $r(e,r);case Jr:case Zr:case Qr:case et:case nt:case rt:case tt:case it:case at:return sn(e,r);case Ur:return new t;case Vr:case Kr:return new t(e);case Wr:return Br(e);case qr:return new t;case Xr:return Gr(e)}}function cn(e){return typeof e.constructor=="function"&&!Xe(e)?lr(ve(e)):{}}var ut="[object Map]";function ft(e){return de(e)&&ce(e)==ut}var Me=U&&U.isMap,dt=Me?le(Me):ft,st="[object Set]";function ct(e){return de(e)&&ce(e)==st}var Re=U&&U.isSet,lt=Re?le(Re):ct,ht=1,vt=2,pt=4,ln="[object Arguments]",bt="[object Array]",wt="[object Boolean]",gt="[object Date]",mt="[object Error]",hn="[object Function]",yt="[object GeneratorFunction]",xt="[object Map]",Ot="[object Number]",vn="[object Object]",Et="[object RegExp]",Tt="[object Set]",Pt="[object String]",Lt="[object Symbol]",Nt="[object WeakMap]",It="[object ArrayBuffer]",_t="[object DataView]",Ct="[object Float32Array]",At="[object Float64Array]",kt="[object Int8Array]",St="[object Int16Array]",jt="[object Int32Array]",Mt="[object Uint8Array]",Rt="[object Uint8ClampedArray]",$t="[object Uint16Array]",Ft="[object Uint32Array]",b={};b[ln]=b[bt]=b[It]=b[_t]=b[wt]=b[gt]=b[Ct]=b[At]=b[kt]=b[St]=b[jt]=b[xt]=b[Ot]=b[vn]=b[Et]=b[Tt]=b[Pt]=b[Lt]=b[Mt]=b[Rt]=b[$t]=b[Ft]=!0;b[mt]=b[hn]=b[Nt]=!1;function D(e,n,r,t,i,o){var a,u=n&ht,f=n&vt,d=n&pt;if(a!==void 0)return a;if(!O(e))return e;var s=N(e);if(s){if(a=Rr(e),!u)return an(e,a)}else{var l=ce(e),h=l==hn||l==yt;if(Je(e))return fn(e,u);if(l==vn||l==ln||h&&!i){if(a=f||h?{}:cn(e),!u)return f?kr(e,Ir(a,e)):Cr(e,Nr(a,e))}else{if(!b[l])return i?e:{};a=ot(e,l,u)}}o||(o=new Ze);var v=o.get(e);if(v)return v;o.set(e,a),lt(e)?e.forEach(function(m){a.add(D(m,n,r,m,e,o))}):dt(e)&&e.forEach(function(m,y){a.set(y,D(m,n,r,y,e,o))});var p=d?f?Sr:Vn:f?P:se,w=s?void 0:p(e);return Un(w||e,function(m,y){w&&(y=m,m=e[y]),z(a,y,D(m,n,r,y,e,o))}),a}var Bt=1,Gt=4;function Dt(e){return D(e,Bt|Gt)}var pn=Object.prototype,Yt=pn.hasOwnProperty,Ut=fe(function(e,n){e=Object(e);var r=-1,t=n.length,i=t>2?n[2]:void 0;for(i&&S(n[0],n[1],i)&&(t=1);++r<t;)for(var o=n[r],a=P(o),u=-1,f=a.length;++u<f;){var d=a[u],s=e[d];(s===void 0||q(s,pn[d])&&!Yt.call(e,d))&&(e[d]=o[d])}return e});function ie(e,n,r){(r!==void 0&&!q(e[n],r)||r===void 0&&!(n in e))&&H(e,n,r)}function ae(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}function Vt(e){return $(e,P(e))}function Wt(e,n,r,t,i,o,a){var u=ae(e,r),f=ae(n,r),d=a.get(f);if(d){ie(e,r,d);return}var s=o?o(u,f,r+"",e,n,a):void 0,l=s===void 0;if(l){var h=N(f),v=!h&&Je(f),p=!h&&!v&&Wn(f);s=f,h||v||p?N(u)?s=u:qn(u)?s=an(u):v?(l=!1,s=fn(f,!0)):p?(l=!1,s=sn(f,!0)):s=[]:Lr(f)||Le(f)?(s=u,Le(u)?s=Vt(u):(!O(u)||Kn(u))&&(s=cn(f))):l=!1}l&&(a.set(f,s),i(s,f,t,o,a),a.delete(f)),ie(e,r,s)}function bn(e,n,r,t,i){e!==n&&Qe(n,function(o,a){if(i||(i=new Ze),O(o))Wt(e,n,a,r,bn,t,i);else{var u=t?t(ae(e,a),o,a+"",e,n,i):void 0;u===void 0&&(u=o),ie(e,a,u)}},P)}function V(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function qt(e){return function(n,r,t){var i=Object(n);if(!K(n)){var o=C(r);n=se(n),r=function(u){return o(i[u],u,i)}}var a=e(n,r,t);return a>-1?i[o?n[a]:a]:void 0}}var Kt=Math.max;function Xt(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:cr(r);return i<0&&(i=Kt(t+i,0)),Xn(e,C(n),i)}var be=qt(Xt);function wn(e,n){var r=-1,t=K(e)?Array(e.length):[];return Hn(e,function(i,o,a){t[++r]=n(i,o,a)}),t}function g(e,n){var r=N(e)?B:wn;return r(e,C(n))}function Ht(e,n){return e==null?e:Qe(e,en(n),P)}function zt(e,n){return e&&nn(e,en(n))}function Jt(e,n){return e>n}var Zt=Object.prototype,Qt=Zt.hasOwnProperty;function ei(e,n){return e!=null&&Qt.call(e,n)}function gn(e,n){return e!=null&&zn(e,n,ei)}function mn(e,n){return e<n}function J(e,n){var r={};return n=C(n),nn(e,function(t,i,o){H(r,i,n(t,i,o))}),r}function we(e,n,r){for(var t=-1,i=e.length;++t<i;){var o=e[t],a=n(o);if(a!=null&&(u===void 0?a===a&&!Y(a):r(a,u)))var u=a,f=o}return f}function T(e){return e&&e.length?we(e,he,Jt):void 0}var oe=pr(function(e,n,r){bn(e,n,r)});function j(e){return e&&e.length?we(e,he,mn):void 0}function ge(e,n){return e&&e.length?we(e,C(n),mn):void 0}function ni(e,n,r,t){if(!O(e))return e;n=rn(n,e);for(var i=-1,o=n.length,a=o-1,u=e;u!=null&&++i<o;){var f=Jn(n[i]),d=r;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(i!=a){var s=u[f];d=void 0,d===void 0&&(d=O(s)?s:Ke(n[i+1])?[]:{})}z(u,f,d),u=u[f]}return e}function ri(e,n,r){for(var t=-1,i=n.length,o={};++t<i;){var a=n[t],u=tn(e,a);r(u,a)&&ni(o,rn(a,e),u)}return o}function ti(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function ii(e,n){if(e!==n){var r=e!==void 0,t=e===null,i=e===e,o=Y(e),a=n!==void 0,u=n===null,f=n===n,d=Y(n);if(!u&&!d&&!o&&e>n||o&&a&&f&&!u&&!d||t&&a&&f||!r&&f||!i)return 1;if(!t&&!o&&!d&&e<n||d&&r&&i&&!t&&!o||u&&r&&i||!a&&i||!f)return-1}return 0}function ai(e,n,r){for(var t=-1,i=e.criteria,o=n.criteria,a=i.length,u=r.length;++t<a;){var f=ii(i[t],o[t]);if(f){if(t>=u)return f;var d=r[t];return f*(d=="desc"?-1:1)}}return e.index-n.index}function oi(e,n,r){n.length?n=B(n,function(o){return N(o)?function(a){return tn(a,o.length===1?o[0]:o)}:o}):n=[he];var t=-1;n=B(n,le(C));var i=wn(e,function(o,a,u){var f=B(n,function(d){return d(o)});return{criteria:f,index:++t,value:o}});return ti(i,function(o,a){return ai(o,a,r)})}function ui(e,n){return ri(e,n,function(r,t){return Zn(e,t)})}var W=yr(function(e,n){return e==null?{}:ui(e,n)}),fi=Math.ceil,di=Math.max;function si(e,n,r,t){for(var i=-1,o=di(fi((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function ci(e){return function(n,r,t){return t&&typeof t!="number"&&S(n,r,t)&&(r=t=void 0),n=G(n),r===void 0?(r=n,n=0):r=G(r),t=t===void 0?n<r?1:-1:G(t),si(n,r,t)}}var _=ci(),F=fe(function(e,n){if(e==null)return[];var r=n.length;return r>1&&S(e,n[0],n[1])?n=[]:r>2&&S(n[0],n[1],n[2])&&(n=[n[0]]),oi(e,He(n),[])}),li=0;function me(e){var n=++li;return Qn(e)+n}function hi(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t<i;){var u=t<o?n[t]:void 0;r(a,e[t],u)}return a}function vi(e,n){return hi(e||[],n||[],z)}class pi{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return $e(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&$e(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,bi)),t=t._prev;return"["+n.join(", ")+"]"}}function $e(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function bi(e,n){if(e!=="_next"&&e!=="_prev")return n}var wi=er(1);function gi(e,n){if(e.nodeCount()<=1)return[];var r=yi(e,n||wi),t=mi(r.graph,r.buckets,r.zeroIdx);return A(g(t,function(i){return e.outEdges(i.v,i.w)}))}function mi(e,n,r){for(var t=[],i=n[n.length-1],o=n[0],a;e.nodeCount();){for(;a=o.dequeue();)Q(e,n,r,a);for(;a=i.dequeue();)Q(e,n,r,a);if(e.nodeCount()){for(var u=n.length-2;u>0;--u)if(a=n[u].dequeue(),a){t=t.concat(Q(e,n,r,a,!0));break}}}return t}function Q(e,n,r,t,i){var o=i?[]:void 0;return c(e.inEdges(t.v),function(a){var u=e.edge(a),f=e.node(a.v);i&&o.push({v:a.v,w:a.w}),f.out-=u,ue(n,r,f)}),c(e.outEdges(t.v),function(a){var u=e.edge(a),f=a.w,d=e.node(f);d.in-=u,ue(n,r,d)}),e.removeNode(t.v),o}function yi(e,n){var r=new E,t=0,i=0;c(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),c(e.edges(),function(u){var f=r.edge(u.v,u.w)||0,d=n(u),s=f+d;r.setEdge(u.v,u.w,s),i=Math.max(i,r.node(u.v).out+=d),t=Math.max(t,r.node(u.w).in+=d)});var o=_(i+t+3).map(function(){return new pi}),a=t+1;return c(r.nodes(),function(u){ue(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function ue(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function xi(e){var n=e.graph().acyclicer==="greedy"?gi(e,r(e)):Oi(e);c(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,me("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function Oi(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,c(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return c(e.nodes(),i),n}function Ei(e){c(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function k(e,n,r,t){var i;do i=me(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function Ti(e){var n=new E().setGraph(e.graph());return c(e.nodes(),function(r){n.setNode(r,e.node(r))}),c(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function yn(e){var n=new E({multigraph:e.isMultigraph()}).setGraph(e.graph());return c(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),c(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Fe(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var f,d;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),f=u*i/o,d=u):(i<0&&(a=-a),f=a,d=a*o/i),{x:r+f,y:t+d}}function Z(e){var n=g(_(xn(e)+1),function(){return[]});return c(e.nodes(),function(r){var t=e.node(r),i=t.rank;x(i)||(n[i][t.order]=r)}),n}function Pi(e){var n=j(g(e.nodes(),function(r){return e.node(r).rank}));c(e.nodes(),function(r){var t=e.node(r);gn(t,"rank")&&(t.rank-=n)})}function Li(e){var n=j(g(e.nodes(),function(o){return e.node(o).rank})),r=[];c(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;c(r,function(o,a){x(o)&&a%i!==0?--t:t&&c(o,function(u){e.node(u).rank+=t})})}function Be(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),k(e,"border",i,n)}function xn(e){return T(g(e.nodes(),function(n){var r=e.node(n).rank;if(!x(r))return r}))}function Ni(e,n){var r={lhs:[],rhs:[]};return c(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Ii(e,n){return n()}function _i(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&c(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)Ge(e,"borderLeft","_bl",r,i,o),Ge(e,"borderRight","_br",r,i,o)}}c(e.children(),n)}function Ge(e,n,r,t,i,o){var a={width:0,height:0,rank:o,borderType:n},u=i[n][o-1],f=k(e,"border",a,r);i[n][o]=f,e.setParent(f,t),u&&e.setEdge(u,f,{weight:1})}function Ci(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&On(e)}function Ai(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&ki(e),(n==="lr"||n==="rl")&&(Si(e),On(e))}function On(e){c(e.nodes(),function(n){De(e.node(n))}),c(e.edges(),function(n){De(e.edge(n))})}function De(e){var n=e.width;e.width=e.height,e.height=n}function ki(e){c(e.nodes(),function(n){ee(e.node(n))}),c(e.edges(),function(n){var r=e.edge(n);c(r.points,ee),Object.prototype.hasOwnProperty.call(r,"y")&&ee(r)})}function ee(e){e.y=-e.y}function Si(e){c(e.nodes(),function(n){ne(e.node(n))}),c(e.edges(),function(n){var r=e.edge(n);c(r.points,ne),Object.prototype.hasOwnProperty.call(r,"x")&&ne(r)})}function ne(e){var n=e.x;e.x=e.y,e.y=n}function ji(e){e.graph().dummyChains=[],c(e.edges(),function(n){Mi(e,n)})}function Mi(e,n){var r=n.v,t=e.node(r).rank,i=n.w,o=e.node(i).rank,a=n.name,u=e.edge(n),f=u.labelRank;if(o!==t+1){e.removeEdge(n);var d=void 0,s,l;for(l=0,++t;t<o;++l,++t)u.points=[],d={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},s=k(e,"edge",d,"_d"),t===f&&(d.width=u.width,d.height=u.height,d.dummy="edge-label",d.labelpos=u.labelpos),e.setEdge(r,s,{weight:u.weight},a),l===0&&e.graph().dummyChains.push(s),r=s;e.setEdge(r,i,{weight:u.weight},a)}}function Ri(e){c(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,i;for(e.setEdge(r.edgeObj,t);r.dummy;)i=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=i,r=e.node(n)})}function ye(e){var n={};function r(t){var i=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return i.rank;n[t]=!0;var o=j(g(e.outEdges(t),function(a){return r(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}c(e.sources(),r)}function M(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function En(e){var n=new E({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var i,o;$i(n,e)<t;)i=Fi(n,e),o=n.hasNode(i.v)?M(e,i):-M(e,i),Bi(n,e,o);return n}function $i(e,n){function r(t){c(n.nodeEdges(t),function(i){var o=i.v,a=t===o?i.w:o;!e.hasNode(a)&&!M(n,i)&&(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}return c(e.nodes(),r),e.nodeCount()}function Fi(e,n){return ge(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return M(n,r)})}function Bi(e,n,r){c(e.nodes(),function(t){n.node(t).rank+=r})}function Gi(){}Gi.prototype=new Error;function Tn(e,n,r){N(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return c(n,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);Pn(e,a,r==="post",o,t,i)}),i}function Pn(e,n,r,t,i,o){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||o.push(n),c(i(n),function(a){Pn(e,a,r,t,i,o)}),r&&o.push(n))}function Di(e,n){return Tn(e,n,"post")}function Yi(e,n){return Tn(e,n,"pre")}L.initLowLimValues=Oe;L.initCutValues=xe;L.calcCutValue=Ln;L.leaveEdge=In;L.enterEdge=_n;L.exchangeEdges=Cn;function L(e){e=Ti(e),ye(e);var n=En(e);Oe(n),xe(n,e);for(var r,t;r=In(n);)t=_n(n,e,r),Cn(n,e,r,t)}function xe(e,n){var r=Di(e,e.nodes());r=r.slice(0,r.length-1),c(r,function(t){Ui(e,n,t)})}function Ui(e,n,r){var t=e.node(r),i=t.parent;e.edge(r,i).cutvalue=Ln(e,n,r)}function Ln(e,n,r){var t=e.node(r),i=t.parent,o=!0,a=n.edge(r,i),u=0;return a||(o=!1,a=n.edge(i,r)),u=a.weight,c(n.nodeEdges(r),function(f){var d=f.v===r,s=d?f.w:f.v;if(s!==i){var l=d===o,h=n.edge(f).weight;if(u+=l?h:-h,Wi(e,r,s)){var v=e.edge(r,s).cutvalue;u+=l?-v:v}}}),u}function Oe(e,n){arguments.length<2&&(n=e.nodes()[0]),Nn(e,{},1,n)}function Nn(e,n,r,t,i){var o=r,a=e.node(t);return n[t]=!0,c(e.neighbors(t),function(u){Object.prototype.hasOwnProperty.call(n,u)||(r=Nn(e,n,r,u,t))}),a.low=o,a.lim=r++,i?a.parent=i:delete a.parent,r}function In(e){return be(e.edges(),function(n){return e.edge(n).cutvalue<0})}function _n(e,n,r){var t=r.v,i=r.w;n.hasEdge(t,i)||(t=r.w,i=r.v);var o=e.node(t),a=e.node(i),u=o,f=!1;o.lim>a.lim&&(u=a,f=!0);var d=R(n.edges(),function(s){return f===Ye(e,e.node(s.v),u)&&f!==Ye(e,e.node(s.w),u)});return ge(d,function(s){return M(n,s)})}function Cn(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),Oe(e),xe(e,n),Vi(e,n)}function Vi(e,n){var r=be(e.nodes(),function(i){return!n.node(i).parent}),t=Yi(e,r);t=t.slice(1),c(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function Wi(e,n,r){return e.hasEdge(n,r)}function Ye(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function qi(e){switch(e.graph().ranker){case"network-simplex":Ue(e);break;case"tight-tree":Xi(e);break;case"longest-path":Ki(e);break;default:Ue(e)}}var Ki=ye;function Xi(e){ye(e),En(e)}function Ue(e){L(e)}function Hi(e){var n=k(e,"root",{},"_root"),r=zi(e),t=T(I(r))-1,i=2*t+1;e.graph().nestingRoot=n,c(e.edges(),function(a){e.edge(a).minlen*=i});var o=Ji(e)+1;c(e.children(),function(a){An(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function An(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var f=Be(e,"_bt"),d=Be(e,"_bb"),s=e.node(a);e.setParent(f,a),s.borderTop=f,e.setParent(d,a),s.borderBottom=d,c(u,function(l){An(e,n,r,t,i,o,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,w=h.borderTop?t:2*t,m=v!==p?1:i-o[a]+1;e.setEdge(f,v,{weight:w,minlen:m,nestingEdge:!0}),e.setEdge(p,d,{weight:w,minlen:m,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,f,{weight:0,minlen:i+o[a]})}function zi(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&c(o,function(a){r(a,i+1)}),n[t]=i}return c(e.children(),function(t){r(t,1)}),n}function Ji(e){return X(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Zi(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,c(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Qi(e,n,r){var t={},i;c(r,function(o){for(var a=e.parent(o),u,f;a;){if(u=e.parent(a),u?(f=t[u],t[u]=a):(f=i,i=a),f&&f!==a){n.setEdge(f,a);return}a=u}})}function ea(e,n,r){var t=na(e),i=new E({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return c(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),c(e[r](o),function(f){var d=f.v===o?f.w:f.v,s=i.edge(d,o),l=x(s)?0:s.weight;i.setEdge(d,o,{weight:e.edge(f).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function na(e){for(var n;e.hasNode(n=me("_root")););return n}function ra(e,n){for(var r=0,t=1;t<n.length;++t)r+=ta(e,n[t-1],n[t]);return r}function ta(e,n,r){for(var t=vi(r,g(r,function(d,s){return s})),i=A(g(n,function(d){return F(g(e.outEdges(d),function(s){return{pos:t[s.w],weight:e.edge(s).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var u=g(new Array(a),function(){return 0}),f=0;return c(i.forEach(function(d){var s=d.pos+o;u[s]+=d.weight;for(var l=0;s>0;)s%2&&(l+=u[s+1]),s=s-1>>1,u[s]+=d.weight;f+=d.weight*l})),f}function ia(e){var n={},r=R(e.nodes(),function(u){return!e.children(u).length}),t=T(g(r,function(u){return e.node(u).rank})),i=g(_(t+1),function(){return[]});function o(u){if(!gn(n,u)){n[u]=!0;var f=e.node(u);i[f.rank].push(u),c(e.successors(u),o)}}var a=F(r,function(u){return e.node(u).rank});return c(a,o),i}function aa(e,n){return g(n,function(r){var t=e.inEdges(r);if(t.length){var i=X(t,function(o,a){var u=e.edge(a),f=e.node(a.v);return{sum:o.sum+u.weight*f.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function oa(e,n){var r={};c(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};x(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),c(n.edges(),function(i){var o=r[i.v],a=r[i.w];!x(o)&&!x(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=R(r,function(i){return!i.indegree});return ua(t)}function ua(e){var n=[];function r(o){return function(a){a.merged||(x(a.barycenter)||x(o.barycenter)||a.barycenter>=o.barycenter)&&fa(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),c(i.in.reverse(),r(i)),c(i.out,t(i))}return g(R(n,function(o){return!o.merged}),function(o){return W(o,["vs","i","barycenter","weight"])})}function fa(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function da(e,n){var r=Ni(e,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),t=r.lhs,i=F(r.rhs,function(s){return-s.i}),o=[],a=0,u=0,f=0;t.sort(sa(!!n)),f=Ve(o,i,f),c(t,function(s){f+=s.vs.length,o.push(s.vs),a+=s.barycenter*s.weight,u+=s.weight,f=Ve(o,i,f)});var d={vs:A(o)};return u&&(d.barycenter=a/u,d.weight=u),d}function Ve(e,n,r){for(var t;n.length&&(t=V(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function sa(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function kn(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,f={};a&&(i=R(i,function(p){return p!==a&&p!==u}));var d=aa(e,i);c(d,function(p){if(e.children(p.v).length){var w=kn(e,p.v,r,t);f[p.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&la(p,w)}});var s=oa(d,r);ca(s,f);var l=da(s,t);if(a&&(l.vs=A([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),v=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function ca(e,n){c(e,function(r){r.vs=A(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function la(e,n){x(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function ha(e){var n=xn(e),r=We(e,_(1,n+1),"inEdges"),t=We(e,_(n-1,-1,-1),"outEdges"),i=ia(e);qe(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,f=0;f<4;++u,++f){va(u%2?r:t,u%4>=2),i=Z(e);var d=ra(e,i);d<o&&(f=0,a=Dt(i),o=d)}qe(e,a)}function We(e,n,r){return g(n,function(t){return ea(e,t,r)})}function va(e,n){var r=new E;c(e,function(t){var i=t.graph().root,o=kn(t,i,r,n);c(o.vs,function(a,u){t.node(a).order=u}),Qi(t,r,o.vs)})}function qe(e,n){c(n,function(r){c(r,function(t,i){e.node(t).order=i})})}function pa(e){var n=wa(e);c(e.graph().dummyChains,function(r){for(var t=e.node(r),i=t.edgeObj,o=ba(e,n,i.v,i.w),a=o.path,u=o.lca,f=0,d=a[f],s=!0;r!==i.w;){if(t=e.node(r),s){for(;(d=a[f])!==u&&e.node(d).maxRank<t.rank;)f++;d===u&&(s=!1)}if(!s){for(;f<a.length-1&&e.node(d=a[f+1]).minRank<=t.rank;)f++;d=a[f]}e.setParent(r,d),r=e.successors(r)[0]}})}function ba(e,n,r,t){var i=[],o=[],a=Math.min(n[r].low,n[t].low),u=Math.max(n[r].lim,n[t].lim),f,d;f=r;do f=e.parent(f),i.push(f);while(f&&(n[f].low>a||u>n[f].lim));for(d=f,f=t;(f=e.parent(f))!==d;)o.push(f);return{path:i.concat(o.reverse()),lca:d}}function wa(e){var n={},r=0;function t(i){var o=r;c(e.children(i),t),n[i]={low:o,lim:r++}}return c(e.children(),t),n}function ga(e,n){var r={};function t(i,o){var a=0,u=0,f=i.length,d=V(o);return c(o,function(s,l){var h=ya(e,s),v=h?e.node(h).order:f;(h||s===d)&&(c(o.slice(u,l+1),function(p){c(e.predecessors(p),function(w){var m=e.node(w),y=m.order;(y<a||v<y)&&!(m.dummy&&e.node(p).dummy)&&Sn(r,w,p)})}),u=l+1,a=v)}),o}return X(n,t),r}function ma(e,n){var r={};function t(o,a,u,f,d){var s;c(_(a,u),function(l){s=o[l],e.node(s).dummy&&c(e.predecessors(s),function(h){var v=e.node(h);v.dummy&&(v.order<f||v.order>d)&&Sn(r,h,s)})})}function i(o,a){var u=-1,f,d=0;return c(a,function(s,l){if(e.node(s).dummy==="border"){var h=e.predecessors(s);h.length&&(f=e.node(h[0]).order,t(a,d,l,u,f),d=l,u=f)}t(a,d,a.length,f,o.length)}),a}return X(n,i),r}function ya(e,n){if(e.node(n).dummy)return be(e.predecessors(n),function(r){return e.node(r).dummy})}function Sn(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function xa(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Oa(e,n,r,t){var i={},o={},a={};return c(n,function(u){c(u,function(f,d){i[f]=f,o[f]=f,a[f]=d})}),c(n,function(u){var f=-1;c(u,function(d){var s=t(d);if(s.length){s=F(s,function(w){return a[w]});for(var l=(s.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=s[h];o[d]===d&&f<a[p]&&!xa(r,d,p)&&(o[p]=d,o[d]=i[d]=i[p],f=a[p])}}})}),{root:i,align:o}}function Ea(e,n,r,t,i){var o={},a=Ta(e,n,r,i),u=i?"borderLeft":"borderRight";function f(l,h){for(var v=a.nodes(),p=v.pop(),w={};p;)w[p]?l(p):(w[p]=!0,v.push(p),v=v.concat(h(p))),p=v.pop()}function d(l){o[l]=a.inEdges(l).reduce(function(h,v){return Math.max(h,o[v.v]+a.edge(v))},0)}function s(l){var h=a.outEdges(l).reduce(function(p,w){return Math.min(p,o[w.w]-a.edge(w))},Number.POSITIVE_INFINITY),v=e.node(l);h!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(o[l]=Math.max(o[l],h))}return f(d,a.predecessors.bind(a)),f(s,a.successors.bind(a)),c(t,function(l){o[l]=o[r[l]]}),o}function Ta(e,n,r,t){var i=new E,o=e.graph(),a=_a(o.nodesep,o.edgesep,t);return c(n,function(u){var f;c(u,function(d){var s=r[d];if(i.setNode(s),f){var l=r[f],h=i.edge(l,s);i.setEdge(l,s,Math.max(a(e,d,f),h||0))}f=d})}),i}function Pa(e,n){return ge(I(n),function(r){var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Ht(r,function(o,a){var u=Ca(e,a)/2;t=Math.max(o+u,t),i=Math.min(o-u,i)}),t-i})}function La(e,n){var r=I(n),t=j(r),i=T(r);c(["u","d"],function(o){c(["l","r"],function(a){var u=o+a,f=e[u],d;if(f!==n){var s=I(f);d=a==="l"?t-j(s):i-T(s),d&&(e[u]=J(f,function(l){return l+d}))}})})}function Na(e,n){return J(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var i=F(g(e,t));return(i[1]+i[2])/2})}function Ia(e){var n=Z(e),r=oe(ga(e,n),ma(e,n)),t={},i;c(["u","d"],function(a){i=a==="u"?n:I(n).reverse(),c(["l","r"],function(u){u==="r"&&(i=g(i,function(l){return I(l).reverse()}));var f=(a==="u"?e.predecessors:e.successors).bind(e),d=Oa(e,i,r,f),s=Ea(e,i,d.root,d.align,u==="r");u==="r"&&(s=J(s,function(l){return-l})),t[a+u]=s})});var o=Pa(e,t);return La(t,o),Na(t,e.graph().align)}function _a(e,n,r){return function(t,i,o){var a=t.node(i),u=t.node(o),f=0,d;if(f+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":d=-a.width/2;break;case"r":d=a.width/2;break}if(d&&(f+=r?d:-d),d=0,f+=(a.dummy?n:e)/2,f+=(u.dummy?n:e)/2,f+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":d=u.width/2;break;case"r":d=-u.width/2;break}return d&&(f+=r?d:-d),d=0,f}}function Ca(e,n){return e.node(n).width}function Aa(e){e=yn(e),ka(e),zt(Ia(e),function(n,r){e.node(r).x=n})}function ka(e){var n=Z(e),r=e.graph().ranksep,t=0;c(n,function(i){var o=T(g(i,function(a){return e.node(a).height}));c(i,function(a){e.node(a).y=t+o/2}),t+=o+r})}function to(e,n){var r=Ii;r("layout",()=>{var t=r(" buildLayoutGraph",()=>Ua(e));r(" runLayout",()=>Sa(t,r)),r(" updateInputGraph",()=>ja(e,t))})}function Sa(e,n){n(" makeSpaceForEdgeLabels",()=>Va(e)),n(" removeSelfEdges",()=>Qa(e)),n(" acyclic",()=>xi(e)),n(" nestingGraph.run",()=>Hi(e)),n(" rank",()=>qi(yn(e))),n(" injectEdgeLabelProxies",()=>Wa(e)),n(" removeEmptyRanks",()=>Li(e)),n(" nestingGraph.cleanup",()=>Zi(e)),n(" normalizeRanks",()=>Pi(e)),n(" assignRankMinMax",()=>qa(e)),n(" removeEdgeLabelProxies",()=>Ka(e)),n(" normalize.run",()=>ji(e)),n(" parentDummyChains",()=>pa(e)),n(" addBorderSegments",()=>_i(e)),n(" order",()=>ha(e)),n(" insertSelfEdges",()=>eo(e)),n(" adjustCoordinateSystem",()=>Ci(e)),n(" position",()=>Aa(e)),n(" positionSelfEdges",()=>no(e)),n(" removeBorderNodes",()=>Za(e)),n(" normalize.undo",()=>Ri(e)),n(" fixupEdgeLabelCoords",()=>za(e)),n(" undoCoordinateSystem",()=>Ai(e)),n(" translateGraph",()=>Xa(e)),n(" assignNodeIntersects",()=>Ha(e)),n(" reversePoints",()=>Ja(e)),n(" acyclic.undo",()=>Ei(e))}function ja(e,n){c(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),c(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Ma=["nodesep","edgesep","ranksep","marginx","marginy"],Ra={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$a=["acyclicer","ranker","rankdir","align"],Fa=["width","height"],Ba={width:0,height:0},Ga=["minlen","weight","width","height","labeloffset"],Da={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ya=["labelpos"];function Ua(e){var n=new E({multigraph:!0,compound:!0}),r=te(e.graph());return n.setGraph(oe({},Ra,re(r,Ma),W(r,$a))),c(e.nodes(),function(t){var i=te(e.node(t));n.setNode(t,Ut(re(i,Fa),Ba)),n.setParent(t,e.parent(t))}),c(e.edges(),function(t){var i=te(e.edge(t));n.setEdge(t,oe({},Da,re(i,Ga),W(i,Ya)))}),n}function Va(e){var n=e.graph();n.ranksep/=2,c(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Wa(e){c(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};k(e,"edge-proxy",o,"_ep")}})}function qa(e){var n=0;c(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=T(n,t.maxRank))}),e.graph().maxRank=n}function Ka(e){c(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Xa(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function f(d){var s=d.x,l=d.y,h=d.width,v=d.height;n=Math.min(n,s-h/2),r=Math.max(r,s+h/2),t=Math.min(t,l-v/2),i=Math.max(i,l+v/2)}c(e.nodes(),function(d){f(e.node(d))}),c(e.edges(),function(d){var s=e.edge(d);Object.prototype.hasOwnProperty.call(s,"x")&&f(s)}),n-=a,t-=u,c(e.nodes(),function(d){var s=e.node(d);s.x-=n,s.y-=t}),c(e.edges(),function(d){var s=e.edge(d);c(s.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(s,"x")&&(s.x-=n),Object.prototype.hasOwnProperty.call(s,"y")&&(s.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Ha(e){c(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(Fe(t,o)),r.points.push(Fe(i,a))})}function za(e){c(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Ja(e){c(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Za(e){c(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(V(r.borderLeft)),a=e.node(V(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),c(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Qa(e){c(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function eo(e){var n=Z(e);c(n,function(r){var t=0;c(r,function(i,o){var a=e.node(i);a.order=o+t,c(a.selfEdges,function(u){k(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function no(e){c(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function re(e,n){return J(W(e,n),Number)}function te(e){var n={};return c(e,function(r,t){n[t.toLowerCase()]=r}),n}export{D as b,to as l,g as m};
@@ -1 +1 @@
1
- import{x as S,y as p,z as w,A as k,B as q}from"./step-EjIQ8UIn.js";import{i as z}from"./init-Dmth1JHB.js";import{e as g,f as B,a as D,b as F}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function x(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===x?n:I,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function I(){return 0}function P(n){return n===null?NaN:+n}function*hn(n,r){for(let t of n)t!=null&&(t=+t)>=t&&(yield t)}const V=R(M),$=V.right;R(P).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function E(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function G(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=N(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=N(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function N(n,r){var t=typeof r,e;return r==null||t==="boolean"?S(r):(t==="number"?p:t==="string"?(e=w(r))?(r=e,k):q:r instanceof w?k:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function d(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=d(u,e),f=t(a,f)):(e=d(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=d(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=$(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=N,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,j){return e=s,u=j,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=B(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),D(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return F(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},z.apply(n,arguments),on(n)}export{en as a,R as b,un as c,M as d,P as e,_ as f,on as g,tn as h,N as i,E as j,m as k,fn as l,$ as m,hn as n,U as o,an as p,G as t};
1
+ import{j as S,x as p,h as w,y as k,z as q}from"./step-D_f8mI9d.js";import{a as z}from"./init-BFKUnIhM.js";import{e as g,b as D,a as F,f as x}from"./defaultLocale-CrowFXzY.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function B(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function j(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===B?n:I,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function I(){return 0}function P(n){return n===null?NaN:+n}function*hn(n,r){for(let t of n)t!=null&&(t=+t)>=t&&(yield t)}const V=j(M),$=V.right;j(P).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function E(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function G(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=N(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=N(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function N(n,r){var t=typeof r,e;return r==null||t==="boolean"?S(r):(t==="number"?p:t==="string"?(e=w(r))?(r=e,k):q:r instanceof w?k:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function d(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=d(u,e),f=t(a,f)):(e=d(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=d(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=$(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=N,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,R){return e=s,u=R,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=D(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),F(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return x(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},z.apply(n,arguments),on(n)}export{M as a,$ as b,j as c,un as d,en as e,N as f,U as g,on as h,m as i,_ as j,hn as k,fn as l,G as m,P as n,E as o,tn as p,an as t};
@@ -0,0 +1,96 @@
1
+ import{g as oe}from"./chunk-55IACEB6-mPPspevf.js";import{s as ce}from"./chunk-2J33WTMH-BgKyXymK.js";import{a as h,ai as R,V as le,au as he,N as de,F as W,O as U,ax as H,a1 as ge,aa as ue,af as pe,y as fe}from"./MermaidRenderer-DL5m_Hhz.js";import"./index-Chrzghtr.js";import"./purify.es-DxCUJf2h.js";import"./step-D_f8mI9d.js";const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function me(t,e=0){return(_[t[e+0]]+_[t[e+1]]+_[t[e+2]]+_[t[e+3]]+"-"+_[t[e+4]]+_[t[e+5]]+"-"+_[t[e+6]]+_[t[e+7]]+"-"+_[t[e+8]]+_[t[e+9]]+"-"+_[t[e+10]]+_[t[e+11]]+_[t[e+12]]+_[t[e+13]]+_[t[e+14]]+_[t[e+15]]).toLowerCase()}const ye=new Uint8Array(16);function Ee(){return crypto.getRandomValues(ye)}function _e(t,e,o){return crypto.randomUUID?crypto.randomUUID():ke(t)}function ke(t,e,o){var n;t=t||{};const l=t.random??((n=t.rng)==null?void 0:n.call(t))??Ee();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,me(l)}var K=function(){var t=h(function(O,s,i,a){for(i=i||{},a=O.length;a--;i[O[a]]=s);return i},"o"),e=[1,4],o=[1,13],l=[1,12],n=[1,15],d=[1,16],p=[1,20],y=[1,19],E=[6,7,8],b=[1,26],L=[1,24],D=[1,25],k=[6,7,11],$=[1,6,13,15,16,19,22],f=[1,33],B=[1,34],P=[1,6,7,11,13,15,16,19,22],z={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:h(function(s,i,a,c,u,r,M){var g=r.length-1;switch(u){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[g].id),c.addNode(r[g-1].length,r[g].id,r[g].descr,r[g].type);break;case 16:c.getLogger().trace("Icon: ",r[g]),c.decorateNode({icon:r[g]});break;case 17:case 21:c.decorateNode({class:r[g]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[g].id),c.addNode(0,r[g].id,r[g].descr,r[g].type);break;case 20:c.decorateNode({icon:r[g]});break;case 25:c.getLogger().trace("node found ..",r[g-2]),this.$={id:r[g-1],descr:r[g-1],type:c.getType(r[g-2],r[g])};break;case 26:this.$={id:r[g],descr:r[g],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[g-3]),this.$={id:r[g-3],descr:r[g-1],type:c.getType(r[g-2],r[g])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:o,7:[1,10],9:9,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},t(E,[2,3]),{1:[2,2]},t(E,[2,4]),t(E,[2,5]),{1:[2,6],6:o,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},{6:o,9:22,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},{6:b,7:L,10:23,11:D},t(k,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:p,22:y}),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),t(k,[2,21]),t(k,[2,23]),t(k,[2,24]),t(k,[2,26],{19:[1,30]}),{20:[1,31]},{6:b,7:L,10:32,11:D},{1:[2,7],6:o,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},t($,[2,14],{7:f,11:B}),t(P,[2,8]),t(P,[2,9]),t(P,[2,10]),t(k,[2,15]),t(k,[2,16]),t(k,[2,17]),{20:[1,35]},{21:[1,36]},t($,[2,13],{7:f,11:B}),t(P,[2,11]),t(P,[2,12]),{21:[1,37]},t(k,[2,25]),t(k,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(s,i){if(i.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=i,a}},"parseError"),parse:h(function(s){var i=this,a=[0],c=[],u=[null],r=[],M=this.table,g="",F=0,Q=0,ie=2,Z=1,se=r.slice.call(arguments,1),m=Object.create(this.lexer),C={yy:{}};for(var X in this.yy)Object.prototype.hasOwnProperty.call(this.yy,X)&&(C.yy[X]=this.yy[X]);m.setInput(s,C.yy),C.yy.lexer=m,C.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Y=m.yylloc;r.push(Y);var re=m.options&&m.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(x){a.length=a.length-2*x,u.length=u.length-x,r.length=r.length-x}h(ae,"popStack");function ee(){var x;return x=c.pop()||m.lex()||Z,typeof x!="number"&&(x instanceof Array&&(c=x,x=c.pop()),x=i.symbols_[x]||x),x}h(ee,"lex");for(var S,I,N,q,w={},G,v,te,j;;){if(I=a[a.length-1],this.defaultActions[I]?N=this.defaultActions[I]:((S===null||typeof S>"u")&&(S=ee()),N=M[I]&&M[I][S]),typeof N>"u"||!N.length||!N[0]){var J="";j=[];for(G in M[I])this.terminals_[G]&&G>ie&&j.push("'"+this.terminals_[G]+"'");m.showPosition?J="Parse error on line "+(F+1)+`:
2
+ `+m.showPosition()+`
3
+ Expecting `+j.join(", ")+", got '"+(this.terminals_[S]||S)+"'":J="Parse error on line "+(F+1)+": Unexpected "+(S==Z?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(J,{text:m.match,token:this.terminals_[S]||S,line:m.yylineno,loc:Y,expected:j})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+S);switch(N[0]){case 1:a.push(S),u.push(m.yytext),r.push(m.yylloc),a.push(N[1]),S=null,Q=m.yyleng,g=m.yytext,F=m.yylineno,Y=m.yylloc;break;case 2:if(v=this.productions_[N[1]][1],w.$=u[u.length-v],w._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},re&&(w._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),q=this.performAction.apply(w,[g,Q,F,C.yy,N[1],u,r].concat(se)),typeof q<"u")return q;v&&(a=a.slice(0,-1*v*2),u=u.slice(0,-1*v),r=r.slice(0,-1*v)),a.push(this.productions_[N[1]][0]),u.push(w.$),r.push(w._$),te=M[a[a.length-2]][a[a.length-1]],a.push(te);break;case 3:return!0}}return!0},"parse")},ne=function(){var O={EOF:1,parseError:h(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:h(function(s,i){return this.yy=i||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:h(function(s){var i=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=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===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(s){this.unput(this.match.slice(s))},"less"),pastInput:h(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
+ `+i+"^"},"showPosition"),test_match:h(function(s,i){var a,c,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),c=s[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],a=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var r in u)this[r]=u[r];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,i,a,c;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),r=0;r<u.length;r++)if(a=this._input.match(this.rules[u[r]]),a&&(!i||a[0].length>i[0].length)){if(i=a,c=r,this.options.backtrack_lexer){if(s=this.test_match(a,u[r]),s!==!1)return s;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(s=this.test_match(i,u[c]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var i=this.next();return i||this.lex()},"lex"),begin:h(function(i){this.conditionStack.push(i)},"begin"),popState:h(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:h(function(i){this.begin(i)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(i,a,c,u){switch(c){case 0:return i.getLogger().trace("Found comment",a.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",a.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),i.getLogger().trace("node end ...",a.yytext),"NODE_DEND";case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 35:return i.getLogger().trace("Long description:",a.yytext),20;case 36:return i.getLogger().trace("Long description:",a.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return O}();z.lexer=ne;function V(){this.yy={}}return h(V,"Parser"),V.prototype=z,z.Parser=V,new V}();K.parser=K;var be=K,Se=12,T={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},A,xe=(A=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=T,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let o=this.nodes.length-1;o>=0;o--)if(this.nodes[o].level<e)return this.nodes[o];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,o,l,n){var L,D;R.info("addNode",e,o,l,n);let d=!1;this.nodes.length===0?(this.baseLevel=e,e=0,d=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,d=!1);const p=U();let y=((L=p.mindmap)==null?void 0:L.padding)??W.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}const E={id:this.count++,nodeId:H(o,p),level:e,descr:H(l,p),type:n,children:[],width:((D=p.mindmap)==null?void 0:D.maxNodeWidth)??W.mindmap.maxNodeWidth,padding:y,isRoot:d},b=this.getParent(e);if(b)b.children.push(E),this.nodes.push(E);else if(d)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,o){switch(R.debug("In get type",e,o),e){case"[":return this.nodeType.RECT;case"(":return o===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,o){this.elements[e]=o}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const o=U(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=H(e.icon,o)),e.class&&(l.class=H(e.class,o))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,o){if(e.level===0?e.section=void 0:e.section=o,e.children)for(const[l,n]of e.children.entries()){const d=e.level===0?l%(Se-1):o;this.assignSections(n,d)}}flattenNodes(e,o){const l=U(),n=["mindmap-node"];e.isRoot===!0?n.push("section-root","section--1"):e.section!==void 0&&n.push(`section-${e.section}`),e.class&&n.push(e.class);const d=n.join(" "),p=h(E=>{var D;const L=(((D=l.theme)==null?void 0:D.toLowerCase())??"").includes("redux");switch(E){case T.CIRCLE:return"mindmapCircle";case T.RECT:return"rect";case T.ROUNDED_RECT:return"rounded";case T.CLOUD:return"cloud";case T.BANG:return"bang";case T.HEXAGON:return"hexagon";case T.DEFAULT:return L?"rounded":"defaultMindmapNode";case T.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:p(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:d,cssStyles:[],look:l.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(o.push(y),e.children)for(const E of e.children)this.flattenNodes(E,o)}generateEdges(e,o){if(!e.children)return;const l=U();for(const n of e.children){let d="edge";n.section!==void 0&&(d+=` section-edge-${n.section}`);const p=e.level+1;d+=` edge-depth-${p}`;const y={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:l.look,classes:d,depth:e.level,section:n.section};o.push(y),this.generateEdges(n,o)}}getData(){const e=this.getMindmap(),o=U(),n=ge().layout!==void 0,d=o;if(n||(d.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:d};R.debug("getData: mindmapRoot",e,o),this.assignSections(e);const p=[],y=[];this.flattenNodes(e,p),this.generateEdges(e,y),R.debug(`getData: processed ${p.length} nodes and ${y.length} edges`);const E=new Map;for(const b of p)E.set(b.id,{shape:b.shape,width:b.width,height:b.height,padding:b.padding});return{nodes:p,edges:y,config:d,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+_e()}}getLogger(){return R}},h(A,"MindmapDB"),A),Ne=h(async(t,e,o,l)=>{var k,$;R.debug(`Rendering mindmap diagram
7
+ `+t);const n=l.db,d=n.getData(),p=oe(e,d.config.securityLevel);if(d.type=l.type,d.layoutAlgorithm=le(d.config.layout,{fallback:"cose-bilkent"}),d.diagramId=e,!n.getMindmap())return;d.nodes.forEach(f=>{f.shape==="rounded"?(f.radius=15,f.taper=15,f.stroke="none",f.width=0,f.padding=15):f.shape==="circle"?f.padding=10:f.shape==="rect"?(f.width=0,f.padding=10):f.shape==="hexagon"&&(f.width=0,f.height=0)}),await he(d,p);const{themeVariables:E}=de(),{useGradient:b,gradientStart:L,gradientStop:D}=E;if(b&&L&&D){const f=p.attr("id"),B=p.append("defs").append("linearGradient").attr("id",`${f}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");B.append("stop").attr("offset","0%").attr("stop-color",L).attr("stop-opacity",1),B.append("stop").attr("offset","100%").attr("stop-color",D).attr("stop-opacity",1)}ce(p,((k=d.config.mindmap)==null?void 0:k.padding)??W.mindmap.padding,"mindmapDiagram",(($=d.config.mindmap)==null?void 0:$.useMaxWidth)??W.mindmap.useMaxWidth)},"draw"),De={draw:Ne},Le=h(t=>{const{theme:e,look:o}=t;let l="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],ue(t["lineColor"+n])?t["lineColor"+n]=pe(t["lineColor"+n],20):t["lineColor"+n]=fe(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const d=""+(o==="neo"?Math.max(10-(n-1)*2,2):17-3*n);l+=`
8
+ .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
9
+ fill: ${t["cScale"+n]};
10
+ }
11
+ .section-${n-1} text {
12
+ fill: ${t["cScaleLabel"+n]};
13
+ }
14
+ .section-${n-1} span {
15
+ color: ${t["cScaleLabel"+n]};
16
+ }
17
+ .node-icon-${n-1} {
18
+ font-size: 40px;
19
+ color: ${t["cScaleLabel"+n]};
20
+ }
21
+ .section-edge-${n-1}{
22
+ stroke: ${t["cScale"+n]};
23
+ }
24
+ .edge-depth-${n-1}{
25
+ stroke-width: ${d};
26
+ }
27
+ .section-${n-1} line {
28
+ stroke: ${t["cScaleInv"+n]} ;
29
+ stroke-width: 3;
30
+ }
31
+
32
+ .disabled, .disabled circle, .disabled text {
33
+ fill: lightgray;
34
+ }
35
+ .disabled text {
36
+ fill: #efefef;
37
+ }
38
+ [data-look="neo"].mindmap-node.section-${n-1} rect, [data-look="neo"].mindmap-node.section-${n-1} path, [data-look="neo"].mindmap-node.section-${n-1} circle, [data-look="neo"].mindmap-node.section-${n-1} polygon {
39
+ fill: ${e==="redux"||e==="redux-dark"||e==="neutral"?t.mainBkg:t["cScale"+n]};
40
+ stroke: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScale"+n]};
41
+ stroke-width: ${t.strokeWidth??2}px;
42
+ }
43
+ [data-look="neo"].section-edge-${n-1}{
44
+ stroke: ${e!=null&&e.includes("redux")||e==="neo-dark"?t.nodeBorder:t["cScale"+n]};
45
+ }
46
+ [data-look="neo"].mindmap-node.section-${n-1} text {
47
+ fill: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:n)]};
48
+ }
49
+ `}return l},"genSections"),ve=h((t,e,o)=>{let l="";for(let n=0;n<t;n++)l+=`
50
+ [data-look="neo"].mindmap-node.section-${n-1} rect, [data-look="neo"].mindmap-node.section-${n-1} path, [data-look="neo"].mindmap-node.section-${n-1} circle, [data-look="neo"].mindmap-node.section-${n-1} polygon {
51
+ stroke: url(${e}-gradient);
52
+ fill: ${o};
53
+ }
54
+ .section-${n-1} line {
55
+ stroke-width: 0;
56
+ }`;return l},"genGradient"),Te=h(t=>{const{theme:e}=t,o=t.svgId,l=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none";return`
57
+ .edge {
58
+ stroke-width: 3;
59
+ }
60
+ ${Le(t)}
61
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
62
+ fill: ${t.git0};
63
+ }
64
+ .section-root text {
65
+ fill: ${t.gitBranchLabel0};
66
+ }
67
+ .section-root span {
68
+ color: ${e!=null&&e.includes("redux")?t.nodeBorder:t.gitBranchLabel0};
69
+ }
70
+ .icon-container {
71
+ height:100%;
72
+ display: flex;
73
+ justify-content: center;
74
+ align-items: center;
75
+ }
76
+ .edge {
77
+ fill: none;
78
+ }
79
+ .mindmap-node-label {
80
+ dy: 1em;
81
+ alignment-baseline: middle;
82
+ text-anchor: middle;
83
+ dominant-baseline: middle;
84
+ text-align: center;
85
+ }
86
+ [data-look="neo"].mindmap-node {
87
+ filter: ${l};
88
+ }
89
+ [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
90
+ fill: ${e!=null&&e.includes("redux")?t.mainBkg:t.git0};
91
+ }
92
+ [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
93
+ fill: ${e!=null&&e.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]};
94
+ }
95
+ ${t.useGradient&&o&&t.mainBkg?ve(t.THEME_COLOR_LIMIT,o,t.mainBkg):""}
96
+ `},"getStyles"),Oe=Te,Be={get db(){return new xe},renderer:De,parser:be,styles:Oe};export{Be as diagram};
@@ -0,0 +1 @@
1
+ import{a}from"./init-BFKUnIhM.js";class o extends Map{constructor(n,t=g){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(l(this,n),t)}delete(n){return super.delete(p(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function l({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function p({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(r),e.delete(r)),t}function g(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function h(){var e=new o,n=[],t=[],r=f;function s(u){let i=e.get(u);if(i===void 0){if(r!==f)return r;e.set(u,i=n.push(u)-1)}return t[i%t.length]}return s.domain=function(u){if(!arguments.length)return n.slice();n=[],e=new o;for(const i of u)e.has(i)||e.set(i,n.push(i)-1);return s},s.range=function(u){return arguments.length?(t=Array.from(u),s):t.slice()},s.unknown=function(u){return arguments.length?(r=u,s):r},s.copy=function(){return h(n,t).unknown(r)},a.apply(s,arguments),s}export{f as i,h as o};
@@ -0,0 +1,30 @@
1
+ import{K as Q,aB as Y,L as tt,aC as et,P as at,aE as rt,a as p,ai as F,O as nt,m as it,aA as st,an as ot,w as lt,n as ct,F as ut}from"./MermaidRenderer-DL5m_Hhz.js";import{p as pt}from"./chunk-4BX2VUAB-B47fqcrV.js";import{p as dt}from"./wardley-L42UT6IY-DSnXDyTD.js";import{d as _}from"./arc-DeiHBTsx.js";import{o as gt}from"./ordinal-BQ3KlzSu.js";import{i as S,P as R,c as ft}from"./step-D_f8mI9d.js";import"./index-Chrzghtr.js";import"./purify.es-DxCUJf2h.js";import"./init-BFKUnIhM.js";function ht(t,a){return a<t?-1:a>t?1:a>=t?0:NaN}function mt(t){return t}function vt(){var t=mt,a=ht,f=null,w=S(0),s=S(R),d=S(0);function o(e){var n,l=(e=ft(e)).length,g,h,v=0,c=new Array(l),i=new Array(l),x=+w.apply(this,arguments),y=Math.min(R,Math.max(-R,s.apply(this,arguments)-x)),m,D=Math.min(Math.abs(y)/l,d.apply(this,arguments)),$=D*(y<0?-1:1),u;for(n=0;n<l;++n)(u=i[c[n]=n]=+t(e[n],n,e))>0&&(v+=u);for(a!=null?c.sort(function(A,C){return a(i[A],i[C])}):f!=null&&c.sort(function(A,C){return f(e[A],e[C])}),n=0,h=v?(y-l*$)/v:0;n<l;++n,x=m)g=c[n],u=i[g],m=x+(u>0?u*h:0)+$,i[g]={data:e[g],index:n,value:u,startAngle:x,endAngle:m,padAngle:D};return i}return o.value=function(e){return arguments.length?(t=typeof e=="function"?e:S(+e),o):t},o.sortValues=function(e){return arguments.length?(a=e,f=null,o):a},o.sort=function(e){return arguments.length?(f=e,a=null,o):f},o.startAngle=function(e){return arguments.length?(w=typeof e=="function"?e:S(+e),o):w},o.endAngle=function(e){return arguments.length?(s=typeof e=="function"?e:S(+e),o):s},o.padAngle=function(e){return arguments.length?(d=typeof e=="function"?e:S(+e),o):d},o}var xt=ut.pie,W={sections:new Map,showData:!1},T=W.sections,z=W.showData,St=structuredClone(xt),wt=p(()=>structuredClone(St),"getConfig"),yt=p(()=>{T=new Map,z=W.showData,ct()},"clear"),At=p(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(t)||(T.set(t,a),F.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),Ct=p(()=>T,"getSections"),Dt=p(t=>{z=t},"setShowData"),$t=p(()=>z,"getShowData"),V={getConfig:wt,clear:yt,setDiagramTitle:rt,getDiagramTitle:at,setAccTitle:et,getAccTitle:tt,setAccDescription:Y,getAccDescription:Q,addSection:At,getSections:Ct,setShowData:Dt,getShowData:$t},Tt=p((t,a)=>{pt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Et={parse:p(async t=>{const a=await dt("pie",t);F.debug(a),Tt(a,V)},"parse")},kt=p(t=>`
2
+ .pieCircle{
3
+ stroke: ${t.pieStrokeColor};
4
+ stroke-width : ${t.pieStrokeWidth};
5
+ opacity : ${t.pieOpacity};
6
+ }
7
+ .pieOuterCircle{
8
+ stroke: ${t.pieOuterStrokeColor};
9
+ stroke-width: ${t.pieOuterStrokeWidth};
10
+ fill: none;
11
+ }
12
+ .pieTitleText {
13
+ text-anchor: middle;
14
+ font-size: ${t.pieTitleTextSize};
15
+ fill: ${t.pieTitleTextColor};
16
+ font-family: ${t.fontFamily};
17
+ }
18
+ .slice {
19
+ font-family: ${t.fontFamily};
20
+ fill: ${t.pieSectionTextColor};
21
+ font-size:${t.pieSectionTextSize};
22
+ // fill: white;
23
+ }
24
+ .legend text {
25
+ fill: ${t.pieLegendTextColor};
26
+ font-family: ${t.fontFamily};
27
+ font-size: ${t.pieLegendTextSize};
28
+ }
29
+ `,"getStyles"),Mt=kt,bt=p(t=>{const a=[...t.values()].reduce((s,d)=>s+d,0),f=[...t.entries()].map(([s,d])=>({label:s,value:d})).filter(s=>s.value/a*100>=1);return vt().value(s=>s.value).sort(null)(f)},"createPieArcs"),Rt=p((t,a,f,w)=>{var O;F.debug(`rendering pie chart
30
+ `+t);const s=w.db,d=nt(),o=it(s.getConfig(),d.pie),e=40,n=18,l=4,g=450,h=g,v=st(a),c=v.append("g");c.attr("transform","translate("+h/2+","+g/2+")");const{themeVariables:i}=d;let[x]=ot(i.pieOuterStrokeWidth);x??(x=2);const y=o.textPosition,m=Math.min(h,g)/2-e,D=_().innerRadius(0).outerRadius(m),$=_().innerRadius(m*y).outerRadius(m*y);c.append("circle").attr("cx",0).attr("cy",0).attr("r",m+x/2).attr("class","pieOuterCircle");const u=s.getSections(),A=bt(u),C=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let E=0;u.forEach(r=>{E+=r});const L=A.filter(r=>(r.data.value/E*100).toFixed(0)!=="0"),k=gt(C).domain([...u.keys()]);c.selectAll("mySlices").data(L).enter().append("path").attr("d",D).attr("fill",r=>k(r.data.label)).attr("class","pieCircle"),c.selectAll("mySlices").data(L).enter().append("text").text(r=>(r.data.value/E*100).toFixed(0)+"%").attr("transform",r=>"translate("+$.centroid(r)+")").style("text-anchor","middle").attr("class","slice");const U=c.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),P=[...u.entries()].map(([r,b])=>({label:r,value:b})),M=c.selectAll(".legend").data(P).enter().append("g").attr("class","legend").attr("transform",(r,b)=>{const I=n+l,q=I*P.length/2,H=12*n,J=b*I-q;return"translate("+H+","+J+")"});M.append("rect").attr("width",n).attr("height",n).style("fill",r=>k(r.label)).style("stroke",r=>k(r.label)),M.append("text").attr("x",n+l).attr("y",n-l).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const j=Math.max(...M.selectAll("text").nodes().map(r=>(r==null?void 0:r.getBoundingClientRect().width)??0)),K=h+e+n+l+j,B=((O=U.node())==null?void 0:O.getBoundingClientRect().width)??0,X=h/2-B/2,Z=h/2+B/2,G=Math.min(0,X),N=Math.max(K,Z)-G;v.attr("viewBox",`${G} 0 ${N} ${g}`),lt(v,g,N,o.useMaxWidth)},"draw"),Ft={draw:Rt},Vt={parser:Et,db:V,renderer:Ft,styles:Mt};export{Vt as diagram};