orbitchat 2.0.1 → 2.1.0

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 (56) hide show
  1. package/bin/orbitchat.js +8 -2
  2. package/dist/assets/api-BALsORF3.js +2 -0
  3. package/dist/assets/api-Co0BVmRJ.js +2 -0
  4. package/dist/assets/arc-CvECY7sY-Vr1TQguo.js +1 -0
  5. package/dist/assets/{blockDiagram-c4efeb88-BF2cqC5E-BkXQGexK.js → blockDiagram-c4efeb88-NvaZhZFT-dWMoZUAg.js} +8 -8
  6. package/dist/assets/{c4Diagram-c83219d4-D9AJbzWz-CNYGOFES.js → c4Diagram-c83219d4-gPr1eF38-Dm2gBVFn.js} +3 -3
  7. package/dist/assets/channel-6PI3wNcc-xC-uPvXz.js +1 -0
  8. package/dist/assets/classDiagram-beda092f-B8axaKGu-9rbEMdqe.js +2 -0
  9. package/dist/assets/classDiagram-v2-2358418a-DPdf2DxR-35t2Ulv3.js +2 -0
  10. package/dist/assets/clone-D01vUIhD-BmKLNBjy.js +1 -0
  11. package/dist/assets/{createText-1719965b-D5GExXUl-Ckz8tHz2.js → createText-1719965b-D9Y3vUMn-eo4dwQ-N.js} +1 -1
  12. package/dist/assets/edges-96097737-Zc6U9nQz-Bwo4-Nya.js +4 -0
  13. package/dist/assets/{erDiagram-0228fc6a-DNX6_tUA-DhPLx33M.js → erDiagram-0228fc6a-BLw8FsIp-DsFgy0ky.js} +4 -4
  14. package/dist/assets/{flowDb-c6c81e3f-DFROkPpA-B3HlgleO.js → flowDb-c6c81e3f-DXVkMlSE-d-bmpRIJ.js} +3 -3
  15. package/dist/assets/{flowDiagram-50d868cf-Cmwizbui-BeKU27fc.js → flowDiagram-50d868cf-mkkB0hFd-DQynJrQP.js} +3 -3
  16. package/dist/assets/flowDiagram-v2-4f6560a1-BRIhxQ3y-_eh8suKY.js +1 -0
  17. package/dist/assets/{flowchart-elk-definition-6af322e1-CNwLXR6A-DOFVWWCc.js → flowchart-elk-definition-6af322e1-D9IbjnSJ-CH_ATI7G.js} +1 -1
  18. package/dist/assets/{ganttDiagram-a2739b55-7uphPAFV-BP-Pmtkl.js → ganttDiagram-a2739b55-Cqs5_Zht-B6ML9yDB.js} +3 -3
  19. package/dist/assets/{gitGraphDiagram-82fe8481-DRDypp_x-D9EVaeSh.js → gitGraphDiagram-82fe8481-txBzFn40-DUSli1LH.js} +12 -12
  20. package/dist/assets/{graph-CvRY9YIM-BSWPV9Nr.js → graph-BZahQKIN-Dz7VTHix.js} +1 -1
  21. package/dist/assets/{index-5325376f-D7k5u-pg-BkjFLQrR.js → index-5325376f-DsNDppci-DrwAihmx.js} +1 -1
  22. package/dist/assets/index-CVXt7K8o.css +1 -0
  23. package/dist/assets/index-DQigKykq.js +1006 -0
  24. package/dist/assets/{infoDiagram-8eee0895-BcQBWTwp-B_L_58_Z.js → infoDiagram-8eee0895-SbmhgTjv-ZwwTvmHZ.js} +3 -3
  25. package/dist/assets/{journeyDiagram-c64418c1-CN5eh0M6-Cblzjpty.js → journeyDiagram-c64418c1-C7AiwbKr-Bw7dGrje.js} +4 -4
  26. package/dist/assets/layout-j-hMNqAM-CmCuPxH9.js +1 -0
  27. package/dist/assets/{mindmap-definition-8da855dc-BIK1yn9--Jo-NTSHi.js → mindmap-definition-8da855dc-B1WjnfxE-BOPG_kjQ.js} +13 -13
  28. package/dist/assets/{pieDiagram-a8764435-ikNRxsHY-DMvtPLAT.js → pieDiagram-a8764435-zrkaw4r--RAXG0v3L.js} +5 -5
  29. package/dist/assets/{quadrantDiagram-1e28029f-jvSP5gnQ-6wFt9EAe.js → quadrantDiagram-1e28029f-C2Wa5n16-9o-booOC.js} +5 -5
  30. package/dist/assets/{requirementDiagram-08caed73-FO_Z83qK-B12P_I-Z.js → requirementDiagram-08caed73-BtHxx079-DQorVNsC.js} +4 -4
  31. package/dist/assets/{sankeyDiagram-a04cb91d-DN0iWjES-D5WnyMp5.js → sankeyDiagram-a04cb91d-DXlmqTKB-5aKuzwPH.js} +5 -5
  32. package/dist/assets/{sequenceDiagram-c5b8d532-CGsjpH84-dYgkkktm.js → sequenceDiagram-c5b8d532-BVQF3vcA-yrjkg_KG.js} +1 -1
  33. package/dist/assets/{stateDiagram-1ecb1508-zuhKSs9y-jJmEXeoz.js → stateDiagram-1ecb1508-Dybc3i2m-C9YgXB_l.js} +1 -1
  34. package/dist/assets/stateDiagram-v2-c2b004d7-Bp8rRkv2-BdiRYE7p.js +1 -0
  35. package/dist/assets/{styles-b4e223ce-BOk_k5Y1-BRehazjg.js → styles-b4e223ce-BSiU4oYL-DANqzF8x.js} +3 -3
  36. package/dist/assets/{styles-ca3715f6-g0iC1zjD-137Q5E3Y.js → styles-ca3715f6-DU7x0doE-DHImZVjW.js} +4 -4
  37. package/dist/assets/{styles-d45a18b0-VfGWd52Q-CGigGBMU.js → styles-d45a18b0-B_CU21kM-CsfZzKcT.js} +3 -3
  38. package/dist/assets/{svgDrawCommon-b86b1483-BnVJ45aa-DzmeVj2M.js → svgDrawCommon-b86b1483-sbEe2n2v-C7sWJ9J5.js} +1 -1
  39. package/dist/assets/threadService-B9Db3n0J.js +1 -0
  40. package/dist/assets/{timeline-definition-faaaa080-BpDBXry4-BFWV_D1Z.js → timeline-definition-faaaa080-b82QCnJ9-DubraCW2.js} +5 -5
  41. package/dist/assets/{xychartDiagram-f5964ef8-CvN7DIQW-DQ0y-Ye4.js → xychartDiagram-f5964ef8-BtRcO0uy-BpoCAy-b.js} +4 -4
  42. package/dist/index.html +3 -6
  43. package/package.json +3 -3
  44. package/dist/assets/api-BHF9IxKN.js +0 -1
  45. package/dist/assets/api-BK67K_W_.js +0 -2
  46. package/dist/assets/arc-CVHSP1cu-BRo_NEw5.js +0 -1
  47. package/dist/assets/channel-BYhLgIow-BRybLlZc.js +0 -1
  48. package/dist/assets/classDiagram-beda092f-B88VjdUG-BbwMvv2v.js +0 -2
  49. package/dist/assets/classDiagram-v2-2358418a-BPyGCNOs-Cbd2QXtY.js +0 -2
  50. package/dist/assets/clone-C0MdfhAf-BMHvCdCo.js +0 -1
  51. package/dist/assets/edges-96097737-BnGLzlID-DglIvYsr.js +0 -4
  52. package/dist/assets/flowDiagram-v2-4f6560a1-LfQOA08G-CEF5LezR.js +0 -1
  53. package/dist/assets/index-BocEneU2.js +0 -983
  54. package/dist/assets/index-CfrvHiM_.css +0 -1
  55. package/dist/assets/layout-DSZZaifl-Dg6wRbVD.js +0 -1
  56. package/dist/assets/stateDiagram-v2-c2b004d7-CNnNRi3z-D_BHzNsc.js +0 -1
@@ -1,7 +1,7 @@
1
- import{O as U,ab as V,V as X}from"./index-BocEneU2.js";var O=function(){var c=function(a,t,n,e){for(n=n||{},e=a.length;e--;n[a[e]]=t);return n},f=[6,9,10],_={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(a,t,n,e,s,i,o){switch(i.length-1,s){case 1:return e;case 4:break;case 6:e.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},c(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},c(f,[2,3]),c(f,[2,4]),c(f,[2,5]),c(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(a,t){if(t.recoverable)this.trace(a);else{var n=new Error(a);throw n.hash=t,n}},parse:function(a){var t=this,n=[0],e=[],s=[null],i=[],o=this.table,P="",k=0,$=0,T=2,L=1,z=i.slice.call(arguments,1),r=Object.create(this.lexer),p={yy:{}};for(var I in this.yy)Object.prototype.hasOwnProperty.call(this.yy,I)&&(p.yy[I]=this.yy[I]);r.setInput(a,p.yy),p.yy.lexer=r,p.yy.parser=this,typeof r.yylloc>"u"&&(r.yylloc={});var w=r.yylloc;i.push(w);var F=r.options&&r.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(){var u;return u=e.pop()||r.lex()||L,typeof u!="number"&&(u instanceof Array&&(e=u,u=e.pop()),u=t.symbols_[u]||u),u}for(var h,g,l,E,m={},x,y,j,b;;){if(g=n[n.length-1],this.defaultActions[g]?l=this.defaultActions[g]:((h===null||typeof h>"u")&&(h=R()),l=o[g]&&o[g][h]),typeof l>"u"||!l.length||!l[0]){var S="";b=[];for(x in o[g])this.terminals_[x]&&x>T&&b.push("'"+this.terminals_[x]+"'");r.showPosition?S="Parse error on line "+(k+1)+`:
1
+ import{O as U,ab as J,J as X}from"./index-DQigKykq.js";var O=function(){var c=function(a,t,n,e){for(n=n||{},e=a.length;e--;n[a[e]]=t);return n},f=[6,9,10],_={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(a,t,n,e,s,i,o){switch(i.length-1,s){case 1:return e;case 4:break;case 6:e.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},c(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},c(f,[2,3]),c(f,[2,4]),c(f,[2,5]),c(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(a,t){if(t.recoverable)this.trace(a);else{var n=new Error(a);throw n.hash=t,n}},parse:function(a){var t=this,n=[0],e=[],s=[null],i=[],o=this.table,P="",k=0,$=0,T=2,j=1,z=i.slice.call(arguments,1),r=Object.create(this.lexer),p={yy:{}};for(var I in this.yy)Object.prototype.hasOwnProperty.call(this.yy,I)&&(p.yy[I]=this.yy[I]);r.setInput(a,p.yy),p.yy.lexer=r,p.yy.parser=this,typeof r.yylloc>"u"&&(r.yylloc={});var w=r.yylloc;i.push(w);var F=r.options&&r.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(){var u;return u=e.pop()||r.lex()||j,typeof u!="number"&&(u instanceof Array&&(e=u,u=e.pop()),u=t.symbols_[u]||u),u}for(var h,g,l,E,m={},x,y,L,b;;){if(g=n[n.length-1],this.defaultActions[g]?l=this.defaultActions[g]:((h===null||typeof h>"u")&&(h=R()),l=o[g]&&o[g][h]),typeof l>"u"||!l.length||!l[0]){var S="";b=[];for(x in o[g])this.terminals_[x]&&x>T&&b.push("'"+this.terminals_[x]+"'");r.showPosition?S="Parse error on line "+(k+1)+`:
2
2
  `+r.showPosition()+`
3
- Expecting `+b.join(", ")+", got '"+(this.terminals_[h]||h)+"'":S="Parse error on line "+(k+1)+": Unexpected "+(h==L?"end of input":"'"+(this.terminals_[h]||h)+"'"),this.parseError(S,{text:r.match,token:this.terminals_[h]||h,line:r.yylineno,loc:w,expected:b})}if(l[0]instanceof Array&&l.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+h);switch(l[0]){case 1:n.push(h),s.push(r.yytext),i.push(r.yylloc),n.push(l[1]),h=null,$=r.yyleng,P=r.yytext,k=r.yylineno,w=r.yylloc;break;case 2:if(y=this.productions_[l[1]][1],m.$=s[s.length-y],m._$={first_line:i[i.length-(y||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(y||1)].first_column,last_column:i[i.length-1].last_column},F&&(m._$.range=[i[i.length-(y||1)].range[0],i[i.length-1].range[1]]),E=this.performAction.apply(m,[P,$,k,p.yy,l[1],s,i].concat(z)),typeof E<"u")return E;y&&(n=n.slice(0,-1*y*2),s=s.slice(0,-1*y),i=i.slice(0,-1*y)),n.push(this.productions_[l[1]][0]),s.push(m.$),i.push(m._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0}},d=function(){var a={EOF:1,parseError:function(t,n){if(this.yy.parser)this.yy.parser.parseError(t,n);else throw new Error(t)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var n=t.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),t},unput:function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var s=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),e.length-1&&(this.yylineno-=e.length-1);var i=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
3
+ Expecting `+b.join(", ")+", got '"+(this.terminals_[h]||h)+"'":S="Parse error on line "+(k+1)+": Unexpected "+(h==j?"end of input":"'"+(this.terminals_[h]||h)+"'"),this.parseError(S,{text:r.match,token:this.terminals_[h]||h,line:r.yylineno,loc:w,expected:b})}if(l[0]instanceof Array&&l.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+h);switch(l[0]){case 1:n.push(h),s.push(r.yytext),i.push(r.yylloc),n.push(l[1]),h=null,$=r.yyleng,P=r.yytext,k=r.yylineno,w=r.yylloc;break;case 2:if(y=this.productions_[l[1]][1],m.$=s[s.length-y],m._$={first_line:i[i.length-(y||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(y||1)].first_column,last_column:i[i.length-1].last_column},F&&(m._$.range=[i[i.length-(y||1)].range[0],i[i.length-1].range[1]]),E=this.performAction.apply(m,[P,$,k,p.yy,l[1],s,i].concat(z)),typeof E<"u")return E;y&&(n=n.slice(0,-1*y*2),s=s.slice(0,-1*y),i=i.slice(0,-1*y)),n.push(this.productions_[l[1]][0]),s.push(m.$),i.push(m._$),L=o[n[n.length-2]][n[n.length-1]],n.push(L);break;case 3:return!0}}return!0}},d=function(){var a={EOF:1,parseError:function(t,n){if(this.yy.parser)this.yy.parser.parseError(t,n);else throw new Error(t)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var n=t.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),t},unput:function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var s=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),e.length-1&&(this.yylineno-=e.length-1);var i=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
5
5
  `+n+"^"},test_match:function(t,n){var e,s,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),s=t[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,n,e,s;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if(e=this._input.match(this.rules[i[o]]),e&&(!n||e[0].length>n[0].length)){if(n=e,s=o,this.options.backtrack_lexer){if(t=this.test_match(e,i[o]),t!==!1)return t;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(t=this.test_match(n,i[s]),t!==!1?t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
6
  `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,n,e,s){switch(e){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return a}();_.lexer=d;function v(){this.yy={}}return v.prototype=_,_.Parser=v,new v}();O.parser=O;const q=O,N={info:!1};let A=N.info;const B=c=>{A=c},C=()=>A,G=()=>{A=N.info},H={clear:G,setInfo:B,getInfo:C},K=(c,f,_)=>{U.debug(`rendering info diagram
7
- `+c);const d=V(f);X(d,100,400,!0),d.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${_}`)},M={draw:K},D={parser:q,db:H,renderer:M};export{D as diagram};
7
+ `+c);const d=J(f);X(d,100,400,!0),d.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${_}`)},M={draw:K},Y={parser:q,db:H,renderer:M};export{Y as diagram};
@@ -1,9 +1,9 @@
1
- import{x as ut,v as yt,y as pt,b as ft,j as dt,w as gt,g as I,P as z,V as mt,m as xt}from"./index-BocEneU2.js";import{x as kt,p as nt,d as _t,l as bt}from"./svgDrawCommon-b86b1483-BnVJ45aa-DzmeVj2M.js";import{h as J}from"./arc-CVHSP1cu-BRo_NEw5.js";var X=function(){var t=function(d,i,r,c){for(r=r||{},c=d.length;c--;r[d[c]]=i);return r},e=[6,8,10,11,12,14,16,17,18],s=[1,9],o=[1,10],n=[1,11],l=[1,12],u=[1,13],y=[1,14],p={trace:function(){},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:function(d,i,r,c,h,a,g){var x=a.length-1;switch(h){case 1:return a[x-1];case 2:this.$=[];break;case 3:a[x-1].push(a[x]),this.$=a[x-1];break;case 4:case 5:this.$=a[x];break;case 6:case 7:this.$=[];break;case 8:c.setDiagramTitle(a[x].substr(6)),this.$=a[x].substr(6);break;case 9:this.$=a[x].trim(),c.setAccTitle(this.$);break;case 10:case 11:this.$=a[x].trim(),c.setAccDescription(this.$);break;case 12:c.addSection(a[x].substr(8)),this.$=a[x].substr(8);break;case 13:c.addTask(a[x-1],a[x]),this.$="task";break}},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:s,12:o,14:n,16:l,17:u,18:y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:s,12:o,14:n,16:l,17:u,18:y},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:function(d,i){if(i.recoverable)this.trace(d);else{var r=new Error(d);throw r.hash=i,r}},parse:function(d){var i=this,r=[0],c=[],h=[null],a=[],g=this.table,x="",L=0,U=0,ot=2,Z=1,lt=a.slice.call(arguments,1),k=Object.create(this.lexer),T={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(T.yy[N]=this.yy[N]);k.setInput(d,T.yy),T.yy.lexer=k,T.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var R=k.yylloc;a.push(R);var ct=k.options&&k.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ht(){var $;return $=c.pop()||k.lex()||Z,typeof $!="number"&&($ instanceof Array&&(c=$,$=c.pop()),$=i.symbols_[$]||$),$}for(var _,S,b,B,C={},D,w,H,F;;){if(S=r[r.length-1],this.defaultActions[S]?b=this.defaultActions[S]:((_===null||typeof _>"u")&&(_=ht()),b=g[S]&&g[S][_]),typeof b>"u"||!b.length||!b[0]){var Y="";F=[];for(D in g[S])this.terminals_[D]&&D>ot&&F.push("'"+this.terminals_[D]+"'");k.showPosition?Y="Parse error on line "+(L+1)+`:
1
+ import{D as ut,R as yt,N as pt,I as ft,M as dt,L as gt,S as P,F as z,J as mt,j as xt}from"./index-DQigKykq.js";import{x as kt,p as nt,d as _t,l as bt}from"./svgDrawCommon-b86b1483-sbEe2n2v-C7sWJ9J5.js";import{h as H}from"./arc-CvECY7sY-Vr1TQguo.js";var X=function(){var t=function(d,i,r,c){for(r=r||{},c=d.length;c--;r[d[c]]=i);return r},e=[6,8,10,11,12,14,16,17,18],s=[1,9],o=[1,10],n=[1,11],l=[1,12],u=[1,13],y=[1,14],p={trace:function(){},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:function(d,i,r,c,h,a,g){var x=a.length-1;switch(h){case 1:return a[x-1];case 2:this.$=[];break;case 3:a[x-1].push(a[x]),this.$=a[x-1];break;case 4:case 5:this.$=a[x];break;case 6:case 7:this.$=[];break;case 8:c.setDiagramTitle(a[x].substr(6)),this.$=a[x].substr(6);break;case 9:this.$=a[x].trim(),c.setAccTitle(this.$);break;case 10:case 11:this.$=a[x].trim(),c.setAccDescription(this.$);break;case 12:c.addSection(a[x].substr(8)),this.$=a[x].substr(8);break;case 13:c.addTask(a[x-1],a[x]),this.$="task";break}},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:s,12:o,14:n,16:l,17:u,18:y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:s,12:o,14:n,16:l,17:u,18:y},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:function(d,i){if(i.recoverable)this.trace(d);else{var r=new Error(d);throw r.hash=i,r}},parse:function(d){var i=this,r=[0],c=[],h=[null],a=[],g=this.table,x="",L=0,J=0,ot=2,U=1,lt=a.slice.call(arguments,1),k=Object.create(this.lexer),T={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(T.yy[N]=this.yy[N]);k.setInput(d,T.yy),T.yy.lexer=k,T.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var R=k.yylloc;a.push(R);var ct=k.options&&k.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ht(){var $;return $=c.pop()||k.lex()||U,typeof $!="number"&&($ instanceof Array&&(c=$,$=c.pop()),$=i.symbols_[$]||$),$}for(var _,S,b,B,C={},D,w,Z,F;;){if(S=r[r.length-1],this.defaultActions[S]?b=this.defaultActions[S]:((_===null||typeof _>"u")&&(_=ht()),b=g[S]&&g[S][_]),typeof b>"u"||!b.length||!b[0]){var Y="";F=[];for(D in g[S])this.terminals_[D]&&D>ot&&F.push("'"+this.terminals_[D]+"'");k.showPosition?Y="Parse error on line "+(L+1)+`:
2
2
  `+k.showPosition()+`
3
- Expecting `+F.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on line "+(L+1)+": Unexpected "+(_==Z?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Y,{text:k.match,token:this.terminals_[_]||_,line:k.yylineno,loc:R,expected:F})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+_);switch(b[0]){case 1:r.push(_),h.push(k.yytext),a.push(k.yylloc),r.push(b[1]),_=null,U=k.yyleng,x=k.yytext,L=k.yylineno,R=k.yylloc;break;case 2:if(w=this.productions_[b[1]][1],C.$=h[h.length-w],C._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},ct&&(C._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),B=this.performAction.apply(C,[x,U,L,T.yy,b[1],h,a].concat(lt)),typeof B<"u")return B;w&&(r=r.slice(0,-1*w*2),h=h.slice(0,-1*w),a=a.slice(0,-1*w)),r.push(this.productions_[b[1]][0]),h.push(C.$),a.push(C._$),H=g[r[r.length-2]][r[r.length-1]],r.push(H);break;case 3:return!0}}return!0}},m=function(){var d={EOF:1,parseError:function(i,r){if(this.yy.parser)this.yy.parser.parseError(i,r);else throw new Error(i)},setInput:function(i,r){return this.yy=r||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var r=i.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var r=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var h=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),c.length-1&&(this.yylineno-=c.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===h.length?this.yylloc.first_column:0)+h[h.length-c.length].length-c[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
3
+ Expecting `+F.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on line "+(L+1)+": Unexpected "+(_==U?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Y,{text:k.match,token:this.terminals_[_]||_,line:k.yylineno,loc:R,expected:F})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+_);switch(b[0]){case 1:r.push(_),h.push(k.yytext),a.push(k.yylloc),r.push(b[1]),_=null,J=k.yyleng,x=k.yytext,L=k.yylineno,R=k.yylloc;break;case 2:if(w=this.productions_[b[1]][1],C.$=h[h.length-w],C._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},ct&&(C._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),B=this.performAction.apply(C,[x,J,L,T.yy,b[1],h,a].concat(lt)),typeof B<"u")return B;w&&(r=r.slice(0,-1*w*2),h=h.slice(0,-1*w),a=a.slice(0,-1*w)),r.push(this.productions_[b[1]][0]),h.push(C.$),a.push(C._$),Z=g[r[r.length-2]][r[r.length-1]],r.push(Z);break;case 3:return!0}}return!0}},m=function(){var d={EOF:1,parseError:function(i,r){if(this.yy.parser)this.yy.parser.parseError(i,r);else throw new Error(i)},setInput:function(i,r){return this.yy=r||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var r=i.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var r=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var h=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),c.length-1&&(this.yylineno-=c.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===h.length?this.yylloc.first_column:0)+h[h.length-c.length].length-c[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
5
  `+r+"^"},test_match:function(i,r){var c,h,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),h=i[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var g in a)this[g]=a[g];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,r,c,h;this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),g=0;g<a.length;g++)if(c=this._input.match(this.rules[a[g]]),c&&(!r||c[0].length>r[0].length)){if(r=c,h=g,this.options.backtrack_lexer){if(i=this.test_match(c,a[g]),i!==!1)return i;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(i=this.test_match(r,a[h]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var i=this.next();return i||this.lex()},begin:function(i){this.conditionStack.push(i)},popState:function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},pushState:function(i){this.begin(i)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(i,r,c,h){switch(c){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"}},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 d}();p.lexer=m;function f(){this.yy={}}return f.prototype=p,p.Parser=f,new f}();X.parser=X;const vt=X;let E="";const G=[],j=[],A=[],wt=function(){G.length=0,j.length=0,E="",A.length=0,xt()},$t=function(t){E=t,G.push(t)},Mt=function(){return G},Tt=function(){let t=Q();const e=100;let s=0;for(;!t&&s<e;)t=Q(),s++;return j.push(...A),j},St=function(){const t=[];return j.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},Pt=function(t,e){const s=e.substr(1).split(":");let o=0,n=[];s.length===1?(o=Number(s[0]),n=[]):(o=Number(s[0]),n=s[1].split(","));const l=n.map(y=>y.trim()),u={section:E,type:E,people:l,task:t,score:o};A.push(u)},It=function(t){const e={section:E,type:E,description:t,task:t,classes:[]};j.push(e)},Q=function(){const t=function(s){return A[s].processed};let e=!0;for(const[s,o]of A.entries())t(s),e=e&&o.processed;return e},Ct=function(){return St()},K={getConfig:()=>I().journey,clear:wt,setDiagramTitle:gt,getDiagramTitle:dt,setAccTitle:ft,getAccTitle:pt,setAccDescription:yt,getAccDescription:ut,addSection:$t,getSections:Mt,getTasks:Tt,addTask:Pt,addTaskOrg:It,getActors:Ct},Et=t=>`.label {
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var i=this.next();return i||this.lex()},begin:function(i){this.conditionStack.push(i)},popState:function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},pushState:function(i){this.begin(i)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(i,r,c,h){switch(c){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"}},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 d}();p.lexer=m;function f(){this.yy={}}return f.prototype=p,p.Parser=f,new f}();X.parser=X;const vt=X;let E="";const G=[],j=[],A=[],wt=function(){G.length=0,j.length=0,E="",A.length=0,xt()},$t=function(t){E=t,G.push(t)},Mt=function(){return G},Tt=function(){let t=Q();const e=100;let s=0;for(;!t&&s<e;)t=Q(),s++;return j.push(...A),j},St=function(){const t=[];return j.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},It=function(t,e){const s=e.substr(1).split(":");let o=0,n=[];s.length===1?(o=Number(s[0]),n=[]):(o=Number(s[0]),n=s[1].split(","));const l=n.map(y=>y.trim()),u={section:E,type:E,people:l,task:t,score:o};A.push(u)},Pt=function(t){const e={section:E,type:E,description:t,task:t,classes:[]};j.push(e)},Q=function(){const t=function(s){return A[s].processed};let e=!0;for(const[s,o]of A.entries())t(s),e=e&&o.processed;return e},Ct=function(){return St()},K={getConfig:()=>P().journey,clear:wt,setDiagramTitle:gt,getDiagramTitle:dt,setAccTitle:ft,getAccTitle:pt,setAccDescription:yt,getAccDescription:ut,addSection:$t,getSections:Mt,getTasks:Tt,addTask:It,addTaskOrg:Pt,getActors:Ct},Et=t=>`.label {
7
7
  font-family: 'trebuchet ms', verdana, arial, sans-serif;
8
8
  font-family: var(--mermaid-font-family);
9
9
  color: ${t.textColor};
@@ -136,4 +136,4 @@ Expecting `+F.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on
136
136
  .actor-5 {
137
137
  ${t.actor5?`fill: ${t.actor5}`:""};
138
138
  }
139
- `,jt=Et,q=function(t,e){return bt(t,e)},At=function(t,e){const s=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),o=t.append("g");o.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"),o.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function n(y){const p=J().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function l(y){const p=J().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function u(y){y.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?n(o):e.score<3?l(o):u(o),s},st=function(t,e){const s=t.append("circle");return s.attr("cx",e.cx),s.attr("cy",e.cy),s.attr("class","actor-"+e.pos),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("r",e.r),s.class!==void 0&&s.attr("class",s.class),e.title!==void 0&&s.append("title").text(e.title),s},rt=function(t,e){return _t(t,e)},Vt=function(t,e){function s(n,l,u,y,p){return n+","+l+" "+(n+u)+","+l+" "+(n+u)+","+(l+y-p)+" "+(n+u-p*1.2)+","+(l+y)+" "+n+","+(l+y)}const o=t.append("polygon");o.attr("points",s(e.x,e.y,50,20,7)),o.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,rt(t,e)},Lt=function(t,e,s){const o=t.append("g"),n=nt();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=s.width*e.taskCount+s.diagramMarginX*(e.taskCount-1),n.height=s.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,q(o,n),at(s)(e.text,o,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},s,e.colour)};let tt=-1;const Dt=function(t,e,s){const o=e.x+s.width/2,n=t.append("g");tt++,n.append("line").attr("id","task"+tt).attr("x1",o).attr("y1",e.y).attr("x2",o).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),At(n,{cx:o,cy:300+(5-e.score)*30,score:e.score});const l=nt();l.x=e.x,l.y=e.y,l.fill=e.fill,l.width=s.width,l.height=s.height,l.class="task task-type-"+e.num,l.rx=3,l.ry=3,q(n,l);let u=e.x+14;e.people.forEach(y=>{const p=e.actors[y].color,m={cx:u,cy:e.y,r:7,fill:p,stroke:"#000",title:y,pos:e.actors[y].position};st(n,m),u+=10}),at(s)(e.task,n,l.x,l.y,l.width,l.height,{class:"task"},s,e.colour)},Ft=function(t,e){kt(t,e)},at=function(){function t(n,l,u,y,p,m,f,d){const i=l.append("text").attr("x",u+p/2).attr("y",y+m/2+5).style("font-color",d).style("text-anchor","middle").text(n);o(i,f)}function e(n,l,u,y,p,m,f,d,i){const{taskFontSize:r,taskFontFamily:c}=d,h=n.split(/<br\s*\/?>/gi);for(let a=0;a<h.length;a++){const g=a*r-r*(h.length-1)/2,x=l.append("text").attr("x",u+p/2).attr("y",y).attr("fill",i).style("text-anchor","middle").style("font-size",r).style("font-family",c);x.append("tspan").attr("x",u+p/2).attr("dy",g).text(h[a]),x.attr("y",y+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),o(x,f)}}function s(n,l,u,y,p,m,f,d){const i=l.append("switch"),r=i.append("foreignObject").attr("x",u).attr("y",y).attr("width",p).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");r.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,i,u,y,p,m,f,d),o(r,f)}function o(n,l){for(const u in l)u in l&&n.attr(u,l[u])}return function(n){return n.textPlacement==="fo"?s:n.textPlacement==="old"?t:e}}(),Ot=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},V={drawRect:q,drawCircle:st,drawSection:Lt,drawText:rt,drawLabel:Vt,drawTask:Dt,drawBackgroundRect:Ft,initGraphics:Ot},Nt=function(t){Object.keys(t).forEach(function(e){O[e]=t[e]})},M={};function Rt(t){const e=I().journey;let s=60;Object.keys(M).forEach(o=>{const n=M[o].color,l={cx:20,cy:s,r:7,fill:n,stroke:"#000",pos:M[o].position};V.drawCircle(t,l);const u={x:40,y:s+7,fill:"#666",text:o,textMargin:e.boxTextMargin|5};V.drawText(t,u),s+=20})}const O=I().journey,P=O.leftMargin,Bt=function(t,e,s,o){const n=I().journey,l=I().securityLevel;let u;l==="sandbox"&&(u=z("#i"+e));const y=l==="sandbox"?z(u.nodes()[0].contentDocument.body):z("body");v.init();const p=y.select("#"+e);V.initGraphics(p);const m=o.db.getTasks(),f=o.db.getDiagramTitle(),d=o.db.getActors();for(const g in M)delete M[g];let i=0;d.forEach(g=>{M[g]={color:n.actorColours[i%n.actorColours.length],position:i},i++}),Rt(p),v.insert(0,0,P,Object.keys(M).length*50),Yt(p,m,0);const r=v.getBounds();f&&p.append("text").text(f).attr("x",P).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const c=r.stopy-r.starty+2*n.diagramMarginY,h=P+r.stopx+2*n.diagramMarginX;mt(p,c,h,n.useMaxWidth),p.append("line").attr("x1",P).attr("y1",n.height*4).attr("x2",h-P-4).attr("y2",n.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const a=f?70:0;p.attr("viewBox",`${r.startx} -25 ${h} ${c+a}`),p.attr("preserveAspectRatio","xMinYMin meet"),p.attr("height",c+a+25)},v={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,s,o){t[e]===void 0?t[e]=s:t[e]=o(s,t[e])},updateBounds:function(t,e,s,o){const n=I().journey,l=this;let u=0;function y(p){return function(m){u++;const f=l.sequenceItems.length-u+1;l.updateVal(m,"starty",e-f*n.boxMargin,Math.min),l.updateVal(m,"stopy",o+f*n.boxMargin,Math.max),l.updateVal(v.data,"startx",t-f*n.boxMargin,Math.min),l.updateVal(v.data,"stopx",s+f*n.boxMargin,Math.max),l.updateVal(m,"startx",t-f*n.boxMargin,Math.min),l.updateVal(m,"stopx",s+f*n.boxMargin,Math.max),l.updateVal(v.data,"starty",e-f*n.boxMargin,Math.min),l.updateVal(v.data,"stopy",o+f*n.boxMargin,Math.max)}}this.sequenceItems.forEach(y())},insert:function(t,e,s,o){const n=Math.min(t,s),l=Math.max(t,s),u=Math.min(e,o),y=Math.max(e,o);this.updateVal(v.data,"startx",n,Math.min),this.updateVal(v.data,"starty",u,Math.min),this.updateVal(v.data,"stopx",l,Math.max),this.updateVal(v.data,"stopy",y,Math.max),this.updateBounds(n,u,l,y)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},W=O.sectionFills,et=O.sectionColours,Yt=function(t,e,s){const o=I().journey;let n="";const l=o.height*2+o.diagramMarginY,u=s+l;let y=0,p="#CCC",m="black",f=0;for(const[d,i]of e.entries()){if(n!==i.section){p=W[y%W.length],f=y%W.length,m=et[y%et.length];let c=0;const h=i.section;for(let g=d;g<e.length&&e[g].section==h;g++)c=c+1;const a={x:d*o.taskMargin+d*o.width+P,y:50,text:i.section,fill:p,num:f,colour:m,taskCount:c};V.drawSection(t,a,o),n=i.section,y++}const r=i.people.reduce((c,h)=>(M[h]&&(c[h]=M[h]),c),{});i.x=d*o.taskMargin+d*o.width+P,i.y=u,i.width=o.diagramMarginX,i.height=o.diagramMarginY,i.colour=m,i.fill=p,i.num=f,i.actors=r,V.drawTask(t,i,o),v.insert(i.x,i.y,i.x+i.width+o.taskMargin,450)}},it={setConf:Nt,draw:Bt},Gt={parser:vt,db:K,renderer:it,styles:jt,init:t=>{it.setConf(t.journey),K.clear()}};export{Gt as diagram};
139
+ `,jt=Et,q=function(t,e){return bt(t,e)},At=function(t,e){const s=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),o=t.append("g");o.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"),o.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function n(y){const p=H().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function l(y){const p=H().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function u(y){y.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?n(o):e.score<3?l(o):u(o),s},st=function(t,e){const s=t.append("circle");return s.attr("cx",e.cx),s.attr("cy",e.cy),s.attr("class","actor-"+e.pos),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("r",e.r),s.class!==void 0&&s.attr("class",s.class),e.title!==void 0&&s.append("title").text(e.title),s},rt=function(t,e){return _t(t,e)},Vt=function(t,e){function s(n,l,u,y,p){return n+","+l+" "+(n+u)+","+l+" "+(n+u)+","+(l+y-p)+" "+(n+u-p*1.2)+","+(l+y)+" "+n+","+(l+y)}const o=t.append("polygon");o.attr("points",s(e.x,e.y,50,20,7)),o.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,rt(t,e)},Lt=function(t,e,s){const o=t.append("g"),n=nt();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=s.width*e.taskCount+s.diagramMarginX*(e.taskCount-1),n.height=s.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,q(o,n),at(s)(e.text,o,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},s,e.colour)};let tt=-1;const Dt=function(t,e,s){const o=e.x+s.width/2,n=t.append("g");tt++,n.append("line").attr("id","task"+tt).attr("x1",o).attr("y1",e.y).attr("x2",o).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),At(n,{cx:o,cy:300+(5-e.score)*30,score:e.score});const l=nt();l.x=e.x,l.y=e.y,l.fill=e.fill,l.width=s.width,l.height=s.height,l.class="task task-type-"+e.num,l.rx=3,l.ry=3,q(n,l);let u=e.x+14;e.people.forEach(y=>{const p=e.actors[y].color,m={cx:u,cy:e.y,r:7,fill:p,stroke:"#000",title:y,pos:e.actors[y].position};st(n,m),u+=10}),at(s)(e.task,n,l.x,l.y,l.width,l.height,{class:"task"},s,e.colour)},Ft=function(t,e){kt(t,e)},at=function(){function t(n,l,u,y,p,m,f,d){const i=l.append("text").attr("x",u+p/2).attr("y",y+m/2+5).style("font-color",d).style("text-anchor","middle").text(n);o(i,f)}function e(n,l,u,y,p,m,f,d,i){const{taskFontSize:r,taskFontFamily:c}=d,h=n.split(/<br\s*\/?>/gi);for(let a=0;a<h.length;a++){const g=a*r-r*(h.length-1)/2,x=l.append("text").attr("x",u+p/2).attr("y",y).attr("fill",i).style("text-anchor","middle").style("font-size",r).style("font-family",c);x.append("tspan").attr("x",u+p/2).attr("dy",g).text(h[a]),x.attr("y",y+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),o(x,f)}}function s(n,l,u,y,p,m,f,d){const i=l.append("switch"),r=i.append("foreignObject").attr("x",u).attr("y",y).attr("width",p).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");r.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,i,u,y,p,m,f,d),o(r,f)}function o(n,l){for(const u in l)u in l&&n.attr(u,l[u])}return function(n){return n.textPlacement==="fo"?s:n.textPlacement==="old"?t:e}}(),Ot=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},V={drawRect:q,drawCircle:st,drawSection:Lt,drawText:rt,drawLabel:Vt,drawTask:Dt,drawBackgroundRect:Ft,initGraphics:Ot},Nt=function(t){Object.keys(t).forEach(function(e){O[e]=t[e]})},M={};function Rt(t){const e=P().journey;let s=60;Object.keys(M).forEach(o=>{const n=M[o].color,l={cx:20,cy:s,r:7,fill:n,stroke:"#000",pos:M[o].position};V.drawCircle(t,l);const u={x:40,y:s+7,fill:"#666",text:o,textMargin:e.boxTextMargin|5};V.drawText(t,u),s+=20})}const O=P().journey,I=O.leftMargin,Bt=function(t,e,s,o){const n=P().journey,l=P().securityLevel;let u;l==="sandbox"&&(u=z("#i"+e));const y=l==="sandbox"?z(u.nodes()[0].contentDocument.body):z("body");v.init();const p=y.select("#"+e);V.initGraphics(p);const m=o.db.getTasks(),f=o.db.getDiagramTitle(),d=o.db.getActors();for(const g in M)delete M[g];let i=0;d.forEach(g=>{M[g]={color:n.actorColours[i%n.actorColours.length],position:i},i++}),Rt(p),v.insert(0,0,I,Object.keys(M).length*50),Yt(p,m,0);const r=v.getBounds();f&&p.append("text").text(f).attr("x",I).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const c=r.stopy-r.starty+2*n.diagramMarginY,h=I+r.stopx+2*n.diagramMarginX;mt(p,c,h,n.useMaxWidth),p.append("line").attr("x1",I).attr("y1",n.height*4).attr("x2",h-I-4).attr("y2",n.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const a=f?70:0;p.attr("viewBox",`${r.startx} -25 ${h} ${c+a}`),p.attr("preserveAspectRatio","xMinYMin meet"),p.attr("height",c+a+25)},v={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,s,o){t[e]===void 0?t[e]=s:t[e]=o(s,t[e])},updateBounds:function(t,e,s,o){const n=P().journey,l=this;let u=0;function y(p){return function(m){u++;const f=l.sequenceItems.length-u+1;l.updateVal(m,"starty",e-f*n.boxMargin,Math.min),l.updateVal(m,"stopy",o+f*n.boxMargin,Math.max),l.updateVal(v.data,"startx",t-f*n.boxMargin,Math.min),l.updateVal(v.data,"stopx",s+f*n.boxMargin,Math.max),l.updateVal(m,"startx",t-f*n.boxMargin,Math.min),l.updateVal(m,"stopx",s+f*n.boxMargin,Math.max),l.updateVal(v.data,"starty",e-f*n.boxMargin,Math.min),l.updateVal(v.data,"stopy",o+f*n.boxMargin,Math.max)}}this.sequenceItems.forEach(y())},insert:function(t,e,s,o){const n=Math.min(t,s),l=Math.max(t,s),u=Math.min(e,o),y=Math.max(e,o);this.updateVal(v.data,"startx",n,Math.min),this.updateVal(v.data,"starty",u,Math.min),this.updateVal(v.data,"stopx",l,Math.max),this.updateVal(v.data,"stopy",y,Math.max),this.updateBounds(n,u,l,y)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},W=O.sectionFills,et=O.sectionColours,Yt=function(t,e,s){const o=P().journey;let n="";const l=o.height*2+o.diagramMarginY,u=s+l;let y=0,p="#CCC",m="black",f=0;for(const[d,i]of e.entries()){if(n!==i.section){p=W[y%W.length],f=y%W.length,m=et[y%et.length];let c=0;const h=i.section;for(let g=d;g<e.length&&e[g].section==h;g++)c=c+1;const a={x:d*o.taskMargin+d*o.width+I,y:50,text:i.section,fill:p,num:f,colour:m,taskCount:c};V.drawSection(t,a,o),n=i.section,y++}const r=i.people.reduce((c,h)=>(M[h]&&(c[h]=M[h]),c),{});i.x=d*o.taskMargin+d*o.width+I,i.y=u,i.width=o.diagramMarginX,i.height=o.diagramMarginY,i.colour=m,i.fill=p,i.num=f,i.actors=r,V.drawTask(t,i,o),v.insert(i.x,i.y,i.x+i.width+o.taskMargin,450)}},it={setConf:Nt,draw:Bt},Gt={parser:vt,db:K,renderer:it,styles:jt,init:t=>{it.setConf(t.journey),K.clear()}};export{Gt as diagram};
@@ -0,0 +1 @@
1
+ import{a as T,B as O,E as Dn,k as Kn,b as bn,X as L,m as f,K as m,C as mn,c as x,P as b,$ as yn,d as kn,M as F,O as Hn,R,U as Qn,I as xn,G as Jn,e as Un,T as Wn,f as Xn}from"./graph-BZahQKIN-Dz7VTHix.js";import{aq as En,ar as Zn,as as nr,at as J,au as On,av as $,aw as Nn,ax as rr,ay as S,az as H,aA as U,aB as tr,aC as er,aD as or,aE as _n,aF as ir,aG as ur}from"./index-DQigKykq.js";var ar=/\s/;function cr(n){for(var r=n.length;r--&&ar.test(n.charAt(r)););return r}var dr=/^\s+/;function fr(n){return n&&n.slice(0,cr(n)+1).replace(dr,"")}var un=NaN,sr=/^[-+]0x[0-9a-f]+$/i,hr=/^0b[01]+$/i,vr=/^0o[0-7]+$/i,gr=parseInt;function lr(n){if(typeof n=="number")return n;if(L(n))return un;if(S(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=S(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=fr(n);var t=hr.test(n);return t||vr.test(n)?gr(n.slice(2),t?2:8):sr.test(n)?un:+n}var an=1/0,pr=17976931348623157e292;function C(n){if(!n)return n===0?n:0;if(n=lr(n),n===an||n===-an){var r=n<0?-1:1;return r*pr}return n===n?n:0}function wr(n){var r=C(n),t=r%1;return r===r?t?r-t:r:0}function N(n){var r=n==null?0:n.length;return r?bn(n):[]}function br(n){return Zn(nr(n,void 0,N),n+"")}var mr=1,yr=4;function kr(n){return Qn(n,mr|yr)}var In=Object.prototype,xr=In.hasOwnProperty,Er=En(function(n,r){n=Object(n);var t=-1,e=r.length,o=e>2?r[2]:void 0;for(o&&$(r[0],r[1],o)&&(e=1);++t<e;)for(var u=r[t],i=Nn(u),a=-1,c=i.length;++a<c;){var d=i[a],s=n[d];(s===void 0||rr(s,In[d])&&!xr.call(n,d))&&(n[d]=u[d])}return n});function B(n){var r=n==null?0:n.length;return r?n[r-1]:void 0}function Or(n){return function(r,t,e){var o=Object(r);if(!On(r)){var u=O(t);r=Un(r),t=function(a){return u(o[a],a,o)}}var i=n(r,t,e);return i>-1?o[u?r[i]:i]:void 0}}var Nr=Math.max;function _r(n,r,t){var e=n==null?0:n.length;if(!e)return-1;var o=t==null?0:wr(t);return o<0&&(o=Nr(e+o,0)),Xn(n,O(r),o)}var W=Or(_r);function Pn(n,r){var t=-1,e=On(n)?Array(n.length):[];return Kn(n,function(o,u,i){e[++t]=r(o,u,i)}),e}function p(n,r){var t=J(n)?T:Pn;return t(n,O(r))}function Ir(n,r){return n==null?n:ur(n,xn(r),Nn)}function Pr(n,r){return n&&yn(n,xn(r))}function jr(n,r){return n>r}var Rr=Object.prototype,Mr=Rr.hasOwnProperty;function Tr(n,r){return n!=null&&Mr.call(n,r)}function jn(n,r){return n!=null&&Hn(n,r,Tr)}function Rn(n,r){return n<r}function V(n,r){var t={};return r=O(r),yn(n,function(e,o,u){er(t,o,r(e,o,u))}),t}function X(n,r,t){for(var e=-1,o=n.length;++e<o;){var u=n[e],i=r(u);if(i!=null&&(a===void 0?i===i&&!L(i):t(i,a)))var a=i,c=u}return c}function y(n){return n&&n.length?X(n,U,jr):void 0}function P(n){return n&&n.length?X(n,U,Rn):void 0}function Z(n,r){return n&&n.length?X(n,O(r),Rn):void 0}function Cr(n,r,t,e){if(!S(n))return n;r=kn(r,n);for(var o=-1,u=r.length,i=u-1,a=n;a!=null&&++o<u;){var c=Jn(r[o]),d=t;if(c==="__proto__"||c==="constructor"||c==="prototype")return n;if(o!=i){var s=a[c];d=void 0,d===void 0&&(d=S(s)?s:or(r[o+1])?[]:{})}_n(a,c,d),a=a[c]}return n}function Lr(n,r,t){for(var e=-1,o=r.length,u={};++e<o;){var i=r[e],a=mn(n,i);t(a,i)&&Cr(u,kn(i,n),a)}return u}function $r(n,r){var t=n.length;for(n.sort(r);t--;)n[t]=n[t].value;return n}function Sr(n,r){if(n!==r){var t=n!==void 0,e=n===null,o=n===n,u=L(n),i=r!==void 0,a=r===null,c=r===r,d=L(r);if(!a&&!d&&!u&&n>r||u&&i&&c&&!a&&!d||e&&i&&c||!t&&c||!o)return 1;if(!e&&!u&&!d&&n<r||d&&t&&o&&!e&&!u||a&&t&&o||!i&&o||!c)return-1}return 0}function Br(n,r,t){for(var e=-1,o=n.criteria,u=r.criteria,i=o.length,a=t.length;++e<i;){var c=Sr(o[e],u[e]);if(c){if(e>=a)return c;var d=t[e];return c*(d=="desc"?-1:1)}}return n.index-r.index}function Gr(n,r,t){r.length?r=T(r,function(u){return J(u)?function(i){return mn(i,u.length===1?u[0]:u)}:u}):r=[U];var e=-1;r=T(r,tr(O));var o=Pn(n,function(u,i,a){var c=T(r,function(d){return d(u)});return{criteria:c,index:++e,value:u}});return $r(o,function(u,i){return Br(u,i,t)})}function Fr(n,r){return Lr(n,r,function(t,e){return Wn(n,e)})}var G=br(function(n,r){return n==null?{}:Fr(n,r)}),Vr=Math.ceil,qr=Math.max;function zr(n,r,t,e){for(var o=-1,u=qr(Vr((r-n)/(t||1)),0),i=Array(u);u--;)i[++o]=n,n+=t;return i}function Yr(n){return function(r,t,e){return e&&typeof e!="number"&&$(r,t,e)&&(t=e=void 0),r=C(r),t===void 0?(t=r,r=0):t=C(t),e=e===void 0?r<t?1:-1:C(e),zr(r,t,e)}}var E=Yr(),M=En(function(n,r){if(n==null)return[];var t=r.length;return t>1&&$(n,r[0],r[1])?r=[]:t>2&&$(r[0],r[1],r[2])&&(r=[r[0]]),Gr(n,bn(r),[])}),Ar=0;function nn(n){var r=++Ar;return Dn(n)+r}function Dr(n,r,t){for(var e=-1,o=n.length,u=r.length,i={};++e<o;){var a=e<u?r[e]:void 0;t(i,n[e],a)}return i}function Kr(n,r){return Dr(n||[],r||[],_n)}class Hr{constructor(){var r={};r._next=r._prev=r,this._sentinel=r}dequeue(){var r=this._sentinel,t=r._prev;if(t!==r)return cn(t),t}enqueue(r){var t=this._sentinel;r._prev&&r._next&&cn(r),r._next=t._next,t._next._prev=r,t._next=r,r._prev=t}toString(){for(var r=[],t=this._sentinel,e=t._prev;e!==t;)r.push(JSON.stringify(e,Qr)),e=e._prev;return"["+r.join(", ")+"]"}}function cn(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function Qr(n,r){if(n!=="_next"&&n!=="_prev")return r}var Jr=ir(1);function Ur(n,r){if(n.nodeCount()<=1)return[];var t=Xr(n,r||Jr),e=Wr(t.graph,t.buckets,t.zeroIdx);return N(p(e,function(o){return n.outEdges(o.v,o.w)}))}function Wr(n,r,t){for(var e=[],o=r[r.length-1],u=r[0],i;n.nodeCount();){for(;i=u.dequeue();)z(n,r,t,i);for(;i=o.dequeue();)z(n,r,t,i);if(n.nodeCount()){for(var a=r.length-2;a>0;--a)if(i=r[a].dequeue(),i){e=e.concat(z(n,r,t,i,!0));break}}}return e}function z(n,r,t,e,o){var u=o?[]:void 0;return f(n.inEdges(e.v),function(i){var a=n.edge(i),c=n.node(i.v);o&&u.push({v:i.v,w:i.w}),c.out-=a,Q(r,t,c)}),f(n.outEdges(e.v),function(i){var a=n.edge(i),c=i.w,d=n.node(c);d.in-=a,Q(r,t,d)}),n.removeNode(e.v),u}function Xr(n,r){var t=new m,e=0,o=0;f(n.nodes(),function(a){t.setNode(a,{v:a,in:0,out:0})}),f(n.edges(),function(a){var c=t.edge(a.v,a.w)||0,d=r(a),s=c+d;t.setEdge(a.v,a.w,s),o=Math.max(o,t.node(a.v).out+=d),e=Math.max(e,t.node(a.w).in+=d)});var u=E(o+e+3).map(function(){return new Hr}),i=e+1;return f(t.nodes(),function(a){Q(u,i,t.node(a))}),{graph:t,buckets:u,zeroIdx:i}}function Q(n,r,t){t.out?t.in?n[t.out-t.in+r].enqueue(t):n[n.length-1].enqueue(t):n[0].enqueue(t)}function Zr(n){var r=n.graph().acyclicer==="greedy"?Ur(n,t(n)):nt(n);f(r,function(e){var o=n.edge(e);n.removeEdge(e),o.forwardName=e.name,o.reversed=!0,n.setEdge(e.w,e.v,o,nn("rev"))});function t(e){return function(o){return e.edge(o).weight}}}function nt(n){var r=[],t={},e={};function o(u){Object.prototype.hasOwnProperty.call(e,u)||(e[u]=!0,t[u]=!0,f(n.outEdges(u),function(i){Object.prototype.hasOwnProperty.call(t,i.w)?r.push(i):o(i.w)}),delete t[u])}return f(n.nodes(),o),r}function rt(n){f(n.edges(),function(r){var t=n.edge(r);if(t.reversed){n.removeEdge(r);var e=t.forwardName;delete t.reversed,delete t.forwardName,n.setEdge(r.w,r.v,t,e)}})}function _(n,r,t,e){var o;do o=nn(e);while(n.hasNode(o));return t.dummy=r,n.setNode(o,t),o}function tt(n){var r=new m().setGraph(n.graph());return f(n.nodes(),function(t){r.setNode(t,n.node(t))}),f(n.edges(),function(t){var e=r.edge(t.v,t.w)||{weight:0,minlen:1},o=n.edge(t);r.setEdge(t.v,t.w,{weight:e.weight+o.weight,minlen:Math.max(e.minlen,o.minlen)})}),r}function Mn(n){var r=new m({multigraph:n.isMultigraph()}).setGraph(n.graph());return f(n.nodes(),function(t){n.children(t).length||r.setNode(t,n.node(t))}),f(n.edges(),function(t){r.setEdge(t,n.edge(t))}),r}function dn(n,r){var t=n.x,e=n.y,o=r.x-t,u=r.y-e,i=n.width/2,a=n.height/2;if(!o&&!u)throw new Error("Not possible to find intersection inside of the rectangle");var c,d;return Math.abs(u)*i>Math.abs(o)*a?(u<0&&(a=-a),c=a*o/u,d=a):(o<0&&(i=-i),c=i,d=i*u/o),{x:t+c,y:e+d}}function q(n){var r=p(E(Tn(n)+1),function(){return[]});return f(n.nodes(),function(t){var e=n.node(t),o=e.rank;b(o)||(r[o][e.order]=t)}),r}function et(n){var r=P(p(n.nodes(),function(t){return n.node(t).rank}));f(n.nodes(),function(t){var e=n.node(t);jn(e,"rank")&&(e.rank-=r)})}function ot(n){var r=P(p(n.nodes(),function(u){return n.node(u).rank})),t=[];f(n.nodes(),function(u){var i=n.node(u).rank-r;t[i]||(t[i]=[]),t[i].push(u)});var e=0,o=n.graph().nodeRankFactor;f(t,function(u,i){b(u)&&i%o!==0?--e:e&&f(u,function(a){n.node(a).rank+=e})})}function fn(n,r,t,e){var o={width:0,height:0};return arguments.length>=4&&(o.rank=t,o.order=e),_(n,"border",o,r)}function Tn(n){return y(p(n.nodes(),function(r){var t=n.node(r).rank;if(!b(t))return t}))}function it(n,r){var t={lhs:[],rhs:[]};return f(n,function(e){r(e)?t.lhs.push(e):t.rhs.push(e)}),t}function ut(n,r){return r()}function at(n){function r(t){var e=n.children(t),o=n.node(t);if(e.length&&f(e,r),Object.prototype.hasOwnProperty.call(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var u=o.minRank,i=o.maxRank+1;u<i;++u)sn(n,"borderLeft","_bl",t,o,u),sn(n,"borderRight","_br",t,o,u)}}f(n.children(),r)}function sn(n,r,t,e,o,u){var i={width:0,height:0,rank:u,borderType:r},a=o[r][u-1],c=_(n,"border",i,t);o[r][u]=c,n.setParent(c,e),a&&n.setEdge(a,c,{weight:1})}function ct(n){var r=n.graph().rankdir.toLowerCase();(r==="lr"||r==="rl")&&Cn(n)}function dt(n){var r=n.graph().rankdir.toLowerCase();(r==="bt"||r==="rl")&&ft(n),(r==="lr"||r==="rl")&&(st(n),Cn(n))}function Cn(n){f(n.nodes(),function(r){hn(n.node(r))}),f(n.edges(),function(r){hn(n.edge(r))})}function hn(n){var r=n.width;n.width=n.height,n.height=r}function ft(n){f(n.nodes(),function(r){Y(n.node(r))}),f(n.edges(),function(r){var t=n.edge(r);f(t.points,Y),Object.prototype.hasOwnProperty.call(t,"y")&&Y(t)})}function Y(n){n.y=-n.y}function st(n){f(n.nodes(),function(r){A(n.node(r))}),f(n.edges(),function(r){var t=n.edge(r);f(t.points,A),Object.prototype.hasOwnProperty.call(t,"x")&&A(t)})}function A(n){var r=n.x;n.x=n.y,n.y=r}function ht(n){n.graph().dummyChains=[],f(n.edges(),function(r){vt(n,r)})}function vt(n,r){var t=r.v,e=n.node(t).rank,o=r.w,u=n.node(o).rank,i=r.name,a=n.edge(r),c=a.labelRank;if(u!==e+1){n.removeEdge(r);var d=void 0,s,h;for(h=0,++e;e<u;++h,++e)a.points=[],d={width:0,height:0,edgeLabel:a,edgeObj:r,rank:e},s=_(n,"edge",d,"_d"),e===c&&(d.width=a.width,d.height=a.height,d.dummy="edge-label",d.labelpos=a.labelpos),n.setEdge(t,s,{weight:a.weight},i),h===0&&n.graph().dummyChains.push(s),t=s;n.setEdge(t,o,{weight:a.weight},i)}}function gt(n){f(n.graph().dummyChains,function(r){var t=n.node(r),e=t.edgeLabel,o;for(n.setEdge(t.edgeObj,e);t.dummy;)o=n.successors(r)[0],n.removeNode(r),e.points.push({x:t.x,y:t.y}),t.dummy==="edge-label"&&(e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height),r=o,t=n.node(r)})}function rn(n){var r={};function t(e){var o=n.node(e);if(Object.prototype.hasOwnProperty.call(r,e))return o.rank;r[e]=!0;var u=P(p(n.outEdges(e),function(i){return t(i.w)-n.edge(i).minlen}));return(u===Number.POSITIVE_INFINITY||u===void 0||u===null)&&(u=0),o.rank=u}f(n.sources(),t)}function j(n,r){return n.node(r.w).rank-n.node(r.v).rank-n.edge(r).minlen}function Ln(n){var r=new m({directed:!1}),t=n.nodes()[0],e=n.nodeCount();r.setNode(t,{});for(var o,u;lt(r,n)<e;)o=pt(r,n),u=r.hasNode(o.v)?j(n,o):-j(n,o),wt(r,n,u);return r}function lt(n,r){function t(e){f(r.nodeEdges(e),function(o){var u=o.v,i=e===u?o.w:u;!n.hasNode(i)&&!j(r,o)&&(n.setNode(i,{}),n.setEdge(e,i,{}),t(i))})}return f(n.nodes(),t),n.nodeCount()}function pt(n,r){return Z(r.edges(),function(t){if(n.hasNode(t.v)!==n.hasNode(t.w))return j(r,t)})}function wt(n,r,t){f(n.nodes(),function(e){r.node(e).rank+=t})}function $n(n,r,t){J(r)||(r=[r]);var e=(n.isDirected()?n.successors:n.neighbors).bind(n),o=[],u={};return f(r,function(i){if(!n.hasNode(i))throw new Error("Graph does not have node: "+i);Sn(n,i,t==="post",u,e,o)}),o}function Sn(n,r,t,e,o,u){Object.prototype.hasOwnProperty.call(e,r)||(e[r]=!0,t||u.push(r),f(o(r),function(i){Sn(n,i,t,e,o,u)}),t&&u.push(r))}function bt(n,r){return $n(n,r,"post")}function mt(n,r){return $n(n,r,"pre")}k.initLowLimValues=en;k.initCutValues=tn;k.calcCutValue=Bn;k.leaveEdge=Fn;k.enterEdge=Vn;k.exchangeEdges=qn;function k(n){n=tt(n),rn(n);var r=Ln(n);en(r),tn(r,n);for(var t,e;t=Fn(r);)e=Vn(r,n,t),qn(r,n,t,e)}function tn(n,r){var t=bt(n,n.nodes());t=t.slice(0,t.length-1),f(t,function(e){yt(n,r,e)})}function yt(n,r,t){var e=n.node(t),o=e.parent;n.edge(t,o).cutvalue=Bn(n,r,t)}function Bn(n,r,t){var e=n.node(t),o=e.parent,u=!0,i=r.edge(t,o),a=0;return i||(u=!1,i=r.edge(o,t)),a=i.weight,f(r.nodeEdges(t),function(c){var d=c.v===t,s=d?c.w:c.v;if(s!==o){var h=d===u,v=r.edge(c).weight;if(a+=h?v:-v,xt(n,t,s)){var g=n.edge(t,s).cutvalue;a+=h?-g:g}}}),a}function en(n,r){arguments.length<2&&(r=n.nodes()[0]),Gn(n,{},1,r)}function Gn(n,r,t,e,o){var u=t,i=n.node(e);return r[e]=!0,f(n.neighbors(e),function(a){Object.prototype.hasOwnProperty.call(r,a)||(t=Gn(n,r,t,a,e))}),i.low=u,i.lim=t++,o?i.parent=o:delete i.parent,t}function Fn(n){return W(n.edges(),function(r){return n.edge(r).cutvalue<0})}function Vn(n,r,t){var e=t.v,o=t.w;r.hasEdge(e,o)||(e=t.w,o=t.v);var u=n.node(e),i=n.node(o),a=u,c=!1;u.lim>i.lim&&(a=i,c=!0);var d=R(r.edges(),function(s){return c===vn(n,n.node(s.v),a)&&c!==vn(n,n.node(s.w),a)});return Z(d,function(s){return j(r,s)})}function qn(n,r,t,e){var o=t.v,u=t.w;n.removeEdge(o,u),n.setEdge(e.v,e.w,{}),en(n),tn(n,r),kt(n,r)}function kt(n,r){var t=W(n.nodes(),function(o){return!r.node(o).parent}),e=mt(n,t);e=e.slice(1),f(e,function(o){var u=n.node(o).parent,i=r.edge(o,u),a=!1;i||(i=r.edge(u,o),a=!0),r.node(o).rank=r.node(u).rank+(a?i.minlen:-i.minlen)})}function xt(n,r,t){return n.hasEdge(r,t)}function vn(n,r,t){return t.low<=r.lim&&r.lim<=t.lim}function Et(n){switch(n.graph().ranker){case"network-simplex":gn(n);break;case"tight-tree":Nt(n);break;case"longest-path":Ot(n);break;default:gn(n)}}var Ot=rn;function Nt(n){rn(n),Ln(n)}function gn(n){k(n)}function _t(n){var r=_(n,"root",{},"_root"),t=It(n),e=y(x(t))-1,o=2*e+1;n.graph().nestingRoot=r,f(n.edges(),function(i){n.edge(i).minlen*=o});var u=Pt(n)+1;f(n.children(),function(i){zn(n,r,o,u,e,t,i)}),n.graph().nodeRankFactor=o}function zn(n,r,t,e,o,u,i){var a=n.children(i);if(!a.length){i!==r&&n.setEdge(r,i,{weight:0,minlen:t});return}var c=fn(n,"_bt"),d=fn(n,"_bb"),s=n.node(i);n.setParent(c,i),s.borderTop=c,n.setParent(d,i),s.borderBottom=d,f(a,function(h){zn(n,r,t,e,o,u,h);var v=n.node(h),g=v.borderTop?v.borderTop:h,l=v.borderBottom?v.borderBottom:h,w=v.borderTop?e:2*e,I=g!==l?1:o-u[i]+1;n.setEdge(c,g,{weight:w,minlen:I,nestingEdge:!0}),n.setEdge(l,d,{weight:w,minlen:I,nestingEdge:!0})}),n.parent(i)||n.setEdge(r,c,{weight:0,minlen:o+u[i]})}function It(n){var r={};function t(e,o){var u=n.children(e);u&&u.length&&f(u,function(i){t(i,o+1)}),r[e]=o}return f(n.children(),function(e){t(e,1)}),r}function Pt(n){return F(n.edges(),function(r,t){return r+n.edge(t).weight},0)}function jt(n){var r=n.graph();n.removeNode(r.nestingRoot),delete r.nestingRoot,f(n.edges(),function(t){var e=n.edge(t);e.nestingEdge&&n.removeEdge(t)})}function Rt(n,r,t){var e={},o;f(t,function(u){for(var i=n.parent(u),a,c;i;){if(a=n.parent(i),a?(c=e[a],e[a]=i):(c=o,o=i),c&&c!==i){r.setEdge(c,i);return}i=a}})}function Mt(n,r,t){var e=Tt(n),o=new m({compound:!0}).setGraph({root:e}).setDefaultNodeLabel(function(u){return n.node(u)});return f(n.nodes(),function(u){var i=n.node(u),a=n.parent(u);(i.rank===r||i.minRank<=r&&r<=i.maxRank)&&(o.setNode(u),o.setParent(u,a||e),f(n[t](u),function(c){var d=c.v===u?c.w:c.v,s=o.edge(d,u),h=b(s)?0:s.weight;o.setEdge(d,u,{weight:n.edge(c).weight+h})}),Object.prototype.hasOwnProperty.call(i,"minRank")&&o.setNode(u,{borderLeft:i.borderLeft[r],borderRight:i.borderRight[r]}))}),o}function Tt(n){for(var r;n.hasNode(r=nn("_root")););return r}function Ct(n,r){for(var t=0,e=1;e<r.length;++e)t+=Lt(n,r[e-1],r[e]);return t}function Lt(n,r,t){for(var e=Kr(t,p(t,function(d,s){return s})),o=N(p(r,function(d){return M(p(n.outEdges(d),function(s){return{pos:e[s.w],weight:n.edge(s).weight}}),"pos")})),u=1;u<t.length;)u<<=1;var i=2*u-1;u-=1;var a=p(new Array(i),function(){return 0}),c=0;return f(o.forEach(function(d){var s=d.pos+u;a[s]+=d.weight;for(var h=0;s>0;)s%2&&(h+=a[s+1]),s=s-1>>1,a[s]+=d.weight;c+=d.weight*h})),c}function $t(n){var r={},t=R(n.nodes(),function(a){return!n.children(a).length}),e=y(p(t,function(a){return n.node(a).rank})),o=p(E(e+1),function(){return[]});function u(a){if(!jn(r,a)){r[a]=!0;var c=n.node(a);o[c.rank].push(a),f(n.successors(a),u)}}var i=M(t,function(a){return n.node(a).rank});return f(i,u),o}function St(n,r){return p(r,function(t){var e=n.inEdges(t);if(e.length){var o=F(e,function(u,i){var a=n.edge(i),c=n.node(i.v);return{sum:u.sum+a.weight*c.order,weight:u.weight+a.weight}},{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:t}})}function Bt(n,r){var t={};f(n,function(o,u){var i=t[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:u};b(o.barycenter)||(i.barycenter=o.barycenter,i.weight=o.weight)}),f(r.edges(),function(o){var u=t[o.v],i=t[o.w];!b(u)&&!b(i)&&(i.indegree++,u.out.push(t[o.w]))});var e=R(t,function(o){return!o.indegree});return Gt(e)}function Gt(n){var r=[];function t(u){return function(i){i.merged||(b(i.barycenter)||b(u.barycenter)||i.barycenter>=u.barycenter)&&Ft(u,i)}}function e(u){return function(i){i.in.push(u),--i.indegree===0&&n.push(i)}}for(;n.length;){var o=n.pop();r.push(o),f(o.in.reverse(),t(o)),f(o.out,e(o))}return p(R(r,function(u){return!u.merged}),function(u){return G(u,["vs","i","barycenter","weight"])})}function Ft(n,r){var t=0,e=0;n.weight&&(t+=n.barycenter*n.weight,e+=n.weight),r.weight&&(t+=r.barycenter*r.weight,e+=r.weight),n.vs=r.vs.concat(n.vs),n.barycenter=t/e,n.weight=e,n.i=Math.min(r.i,n.i),r.merged=!0}function Vt(n,r){var t=it(n,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),e=t.lhs,o=M(t.rhs,function(s){return-s.i}),u=[],i=0,a=0,c=0;e.sort(qt(!!r)),c=ln(u,o,c),f(e,function(s){c+=s.vs.length,u.push(s.vs),i+=s.barycenter*s.weight,a+=s.weight,c=ln(u,o,c)});var d={vs:N(u)};return a&&(d.barycenter=i/a,d.weight=a),d}function ln(n,r,t){for(var e;r.length&&(e=B(r)).i<=t;)r.pop(),n.push(e.vs),t++;return t}function qt(n){return function(r,t){return r.barycenter<t.barycenter?-1:r.barycenter>t.barycenter?1:n?t.i-r.i:r.i-t.i}}function Yn(n,r,t,e){var o=n.children(r),u=n.node(r),i=u?u.borderLeft:void 0,a=u?u.borderRight:void 0,c={};i&&(o=R(o,function(l){return l!==i&&l!==a}));var d=St(n,o);f(d,function(l){if(n.children(l.v).length){var w=Yn(n,l.v,t,e);c[l.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&Yt(l,w)}});var s=Bt(d,t);zt(s,c);var h=Vt(s,e);if(i&&(h.vs=N([i,h.vs,a]),n.predecessors(i).length)){var v=n.node(n.predecessors(i)[0]),g=n.node(n.predecessors(a)[0]);Object.prototype.hasOwnProperty.call(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+v.order+g.order)/(h.weight+2),h.weight+=2}return h}function zt(n,r){f(n,function(t){t.vs=N(t.vs.map(function(e){return r[e]?r[e].vs:e}))})}function Yt(n,r){b(n.barycenter)?(n.barycenter=r.barycenter,n.weight=r.weight):(n.barycenter=(n.barycenter*n.weight+r.barycenter*r.weight)/(n.weight+r.weight),n.weight+=r.weight)}function At(n){var r=Tn(n),t=pn(n,E(1,r+1),"inEdges"),e=pn(n,E(r-1,-1,-1),"outEdges"),o=$t(n);wn(n,o);for(var u=Number.POSITIVE_INFINITY,i,a=0,c=0;c<4;++a,++c){Dt(a%2?t:e,a%4>=2),o=q(n);var d=Ct(n,o);d<u&&(c=0,i=kr(o),u=d)}wn(n,i)}function pn(n,r,t){return p(r,function(e){return Mt(n,e,t)})}function Dt(n,r){var t=new m;f(n,function(e){var o=e.graph().root,u=Yn(e,o,t,r);f(u.vs,function(i,a){e.node(i).order=a}),Rt(e,t,u.vs)})}function wn(n,r){f(r,function(t){f(t,function(e,o){n.node(e).order=o})})}function Kt(n){var r=Qt(n);f(n.graph().dummyChains,function(t){for(var e=n.node(t),o=e.edgeObj,u=Ht(n,r,o.v,o.w),i=u.path,a=u.lca,c=0,d=i[c],s=!0;t!==o.w;){if(e=n.node(t),s){for(;(d=i[c])!==a&&n.node(d).maxRank<e.rank;)c++;d===a&&(s=!1)}if(!s){for(;c<i.length-1&&n.node(d=i[c+1]).minRank<=e.rank;)c++;d=i[c]}n.setParent(t,d),t=n.successors(t)[0]}})}function Ht(n,r,t,e){var o=[],u=[],i=Math.min(r[t].low,r[e].low),a=Math.max(r[t].lim,r[e].lim),c,d;c=t;do c=n.parent(c),o.push(c);while(c&&(r[c].low>i||a>r[c].lim));for(d=c,c=e;(c=n.parent(c))!==d;)u.push(c);return{path:o.concat(u.reverse()),lca:d}}function Qt(n){var r={},t=0;function e(o){var u=t;f(n.children(o),e),r[o]={low:u,lim:t++}}return f(n.children(),e),r}function Jt(n,r){var t={};function e(o,u){var i=0,a=0,c=o.length,d=B(u);return f(u,function(s,h){var v=Wt(n,s),g=v?n.node(v).order:c;(v||s===d)&&(f(u.slice(a,h+1),function(l){f(n.predecessors(l),function(w){var I=n.node(w),on=I.order;(on<i||g<on)&&!(I.dummy&&n.node(l).dummy)&&An(t,w,l)})}),a=h+1,i=g)}),u}return F(r,e),t}function Ut(n,r){var t={};function e(u,i,a,c,d){var s;f(E(i,a),function(h){s=u[h],n.node(s).dummy&&f(n.predecessors(s),function(v){var g=n.node(v);g.dummy&&(g.order<c||g.order>d)&&An(t,v,s)})})}function o(u,i){var a=-1,c,d=0;return f(i,function(s,h){if(n.node(s).dummy==="border"){var v=n.predecessors(s);v.length&&(c=n.node(v[0]).order,e(i,d,h,a,c),d=h,a=c)}e(i,d,i.length,c,u.length)}),i}return F(r,o),t}function Wt(n,r){if(n.node(r).dummy)return W(n.predecessors(r),function(t){return n.node(t).dummy})}function An(n,r,t){if(r>t){var e=r;r=t,t=e}Object.prototype.hasOwnProperty.call(n,r)||Object.defineProperty(n,r,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=n[r];Object.defineProperty(o,t,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Xt(n,r,t){if(r>t){var e=r;r=t,t=e}return!!n[r]&&Object.prototype.hasOwnProperty.call(n[r],t)}function Zt(n,r,t,e){var o={},u={},i={};return f(r,function(a){f(a,function(c,d){o[c]=c,u[c]=c,i[c]=d})}),f(r,function(a){var c=-1;f(a,function(d){var s=e(d);if(s.length){s=M(s,function(w){return i[w]});for(var h=(s.length-1)/2,v=Math.floor(h),g=Math.ceil(h);v<=g;++v){var l=s[v];u[d]===d&&c<i[l]&&!Xt(t,d,l)&&(u[l]=d,u[d]=o[d]=o[l],c=i[l])}}})}),{root:o,align:u}}function ne(n,r,t,e,o){var u={},i=re(n,r,t,o),a=o?"borderLeft":"borderRight";function c(h,v){for(var g=i.nodes(),l=g.pop(),w={};l;)w[l]?h(l):(w[l]=!0,g.push(l),g=g.concat(v(l))),l=g.pop()}function d(h){u[h]=i.inEdges(h).reduce(function(v,g){return Math.max(v,u[g.v]+i.edge(g))},0)}function s(h){var v=i.outEdges(h).reduce(function(l,w){return Math.min(l,u[w.w]-i.edge(w))},Number.POSITIVE_INFINITY),g=n.node(h);v!==Number.POSITIVE_INFINITY&&g.borderType!==a&&(u[h]=Math.max(u[h],v))}return c(d,i.predecessors.bind(i)),c(s,i.successors.bind(i)),f(e,function(h){u[h]=u[t[h]]}),u}function re(n,r,t,e){var o=new m,u=n.graph(),i=ue(u.nodesep,u.edgesep,e);return f(r,function(a){var c;f(a,function(d){var s=t[d];if(o.setNode(s),c){var h=t[c],v=o.edge(h,s);o.setEdge(h,s,Math.max(i(n,d,c),v||0))}c=d})}),o}function te(n,r){return Z(x(r),function(t){var e=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return Ir(t,function(u,i){var a=ae(n,i)/2;e=Math.max(u+a,e),o=Math.min(u-a,o)}),e-o})}function ee(n,r){var t=x(r),e=P(t),o=y(t);f(["u","d"],function(u){f(["l","r"],function(i){var a=u+i,c=n[a],d;if(c!==r){var s=x(c);d=i==="l"?e-P(s):o-y(s),d&&(n[a]=V(c,function(h){return h+d}))}})})}function oe(n,r){return V(n.ul,function(t,e){if(r)return n[r.toLowerCase()][e];var o=M(p(n,e));return(o[1]+o[2])/2})}function ie(n){var r=q(n),t=H(Jt(n,r),Ut(n,r)),e={},o;f(["u","d"],function(i){o=i==="u"?r:x(r).reverse(),f(["l","r"],function(a){a==="r"&&(o=p(o,function(h){return x(h).reverse()}));var c=(i==="u"?n.predecessors:n.successors).bind(n),d=Zt(n,o,t,c),s=ne(n,o,d.root,d.align,a==="r");a==="r"&&(s=V(s,function(h){return-h})),e[i+a]=s})});var u=te(n,e);return ee(e,u),oe(e,n.graph().align)}function ue(n,r,t){return function(e,o,u){var i=e.node(o),a=e.node(u),c=0,d;if(c+=i.width/2,Object.prototype.hasOwnProperty.call(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":d=-i.width/2;break;case"r":d=i.width/2;break}if(d&&(c+=t?d:-d),d=0,c+=(i.dummy?r:n)/2,c+=(a.dummy?r:n)/2,c+=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}return d&&(c+=t?d:-d),d=0,c}}function ae(n,r){return n.node(r).width}function ce(n){n=Mn(n),de(n),Pr(ie(n),function(r,t){n.node(t).x=r})}function de(n){var r=q(n),t=n.graph().ranksep,e=0;f(r,function(o){var u=y(p(o,function(i){return n.node(i).height}));f(o,function(i){n.node(i).y=e+u/2}),e+=u+t})}function $e(n,r){var t=ut;t("layout",()=>{var e=t(" buildLayoutGraph",()=>ye(n));t(" runLayout",()=>fe(e,t)),t(" updateInputGraph",()=>se(n,e))})}function fe(n,r){r(" makeSpaceForEdgeLabels",()=>ke(n)),r(" removeSelfEdges",()=>Re(n)),r(" acyclic",()=>Zr(n)),r(" nestingGraph.run",()=>_t(n)),r(" rank",()=>Et(Mn(n))),r(" injectEdgeLabelProxies",()=>xe(n)),r(" removeEmptyRanks",()=>ot(n)),r(" nestingGraph.cleanup",()=>jt(n)),r(" normalizeRanks",()=>et(n)),r(" assignRankMinMax",()=>Ee(n)),r(" removeEdgeLabelProxies",()=>Oe(n)),r(" normalize.run",()=>ht(n)),r(" parentDummyChains",()=>Kt(n)),r(" addBorderSegments",()=>at(n)),r(" order",()=>At(n)),r(" insertSelfEdges",()=>Me(n)),r(" adjustCoordinateSystem",()=>ct(n)),r(" position",()=>ce(n)),r(" positionSelfEdges",()=>Te(n)),r(" removeBorderNodes",()=>je(n)),r(" normalize.undo",()=>gt(n)),r(" fixupEdgeLabelCoords",()=>Ie(n)),r(" undoCoordinateSystem",()=>dt(n)),r(" translateGraph",()=>Ne(n)),r(" assignNodeIntersects",()=>_e(n)),r(" reversePoints",()=>Pe(n)),r(" acyclic.undo",()=>rt(n))}function se(n,r){f(n.nodes(),function(t){var e=n.node(t),o=r.node(t);e&&(e.x=o.x,e.y=o.y,r.children(t).length&&(e.width=o.width,e.height=o.height))}),f(n.edges(),function(t){var e=n.edge(t),o=r.edge(t);e.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(e.x=o.x,e.y=o.y)}),n.graph().width=r.graph().width,n.graph().height=r.graph().height}var he=["nodesep","edgesep","ranksep","marginx","marginy"],ve={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},ge=["acyclicer","ranker","rankdir","align"],le=["width","height"],pe={width:0,height:0},we=["minlen","weight","width","height","labeloffset"],be={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},me=["labelpos"];function ye(n){var r=new m({multigraph:!0,compound:!0}),t=K(n.graph());return r.setGraph(H({},ve,D(t,he),G(t,ge))),f(n.nodes(),function(e){var o=K(n.node(e));r.setNode(e,Er(D(o,le),pe)),r.setParent(e,n.parent(e))}),f(n.edges(),function(e){var o=K(n.edge(e));r.setEdge(e,H({},be,D(o,we),G(o,me)))}),r}function ke(n){var r=n.graph();r.ranksep/=2,f(n.edges(),function(t){var e=n.edge(t);e.minlen*=2,e.labelpos.toLowerCase()!=="c"&&(r.rankdir==="TB"||r.rankdir==="BT"?e.width+=e.labeloffset:e.height+=e.labeloffset)})}function xe(n){f(n.edges(),function(r){var t=n.edge(r);if(t.width&&t.height){var e=n.node(r.v),o=n.node(r.w),u={rank:(o.rank-e.rank)/2+e.rank,e:r};_(n,"edge-proxy",u,"_ep")}})}function Ee(n){var r=0;f(n.nodes(),function(t){var e=n.node(t);e.borderTop&&(e.minRank=n.node(e.borderTop).rank,e.maxRank=n.node(e.borderBottom).rank,r=y(r,e.maxRank))}),n.graph().maxRank=r}function Oe(n){f(n.nodes(),function(r){var t=n.node(r);t.dummy==="edge-proxy"&&(n.edge(t.e).labelRank=t.rank,n.removeNode(r))})}function Ne(n){var r=Number.POSITIVE_INFINITY,t=0,e=Number.POSITIVE_INFINITY,o=0,u=n.graph(),i=u.marginx||0,a=u.marginy||0;function c(d){var s=d.x,h=d.y,v=d.width,g=d.height;r=Math.min(r,s-v/2),t=Math.max(t,s+v/2),e=Math.min(e,h-g/2),o=Math.max(o,h+g/2)}f(n.nodes(),function(d){c(n.node(d))}),f(n.edges(),function(d){var s=n.edge(d);Object.prototype.hasOwnProperty.call(s,"x")&&c(s)}),r-=i,e-=a,f(n.nodes(),function(d){var s=n.node(d);s.x-=r,s.y-=e}),f(n.edges(),function(d){var s=n.edge(d);f(s.points,function(h){h.x-=r,h.y-=e}),Object.prototype.hasOwnProperty.call(s,"x")&&(s.x-=r),Object.prototype.hasOwnProperty.call(s,"y")&&(s.y-=e)}),u.width=t-r+i,u.height=o-e+a}function _e(n){f(n.edges(),function(r){var t=n.edge(r),e=n.node(r.v),o=n.node(r.w),u,i;t.points?(u=t.points[0],i=t.points[t.points.length-1]):(t.points=[],u=o,i=e),t.points.unshift(dn(e,u)),t.points.push(dn(o,i))})}function Ie(n){f(n.edges(),function(r){var t=n.edge(r);if(Object.prototype.hasOwnProperty.call(t,"x"))switch((t.labelpos==="l"||t.labelpos==="r")&&(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset;break}})}function Pe(n){f(n.edges(),function(r){var t=n.edge(r);t.reversed&&t.points.reverse()})}function je(n){f(n.nodes(),function(r){if(n.children(r).length){var t=n.node(r),e=n.node(t.borderTop),o=n.node(t.borderBottom),u=n.node(B(t.borderLeft)),i=n.node(B(t.borderRight));t.width=Math.abs(i.x-u.x),t.height=Math.abs(o.y-e.y),t.x=u.x+t.width/2,t.y=e.y+t.height/2}}),f(n.nodes(),function(r){n.node(r).dummy==="border"&&n.removeNode(r)})}function Re(n){f(n.edges(),function(r){if(r.v===r.w){var t=n.node(r.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:r,label:n.edge(r)}),n.removeEdge(r)}})}function Me(n){var r=q(n);f(r,function(t){var e=0;f(t,function(o,u){var i=n.node(o);i.order=u+e,f(i.selfEdges,function(a){_(n,"selfedge",{width:a.label.width,height:a.label.height,rank:i.rank,order:u+ ++e,e:a.e,label:a.label},"_se")}),delete i.selfEdges})})}function Te(n){f(n.nodes(),function(r){var t=n.node(r);if(t.dummy==="selfedge"){var e=n.node(t.e.v),o=e.x+e.width/2,u=e.y,i=t.x-o,a=e.height/2;n.setEdge(t.e,t.label),n.removeNode(r),t.label.points=[{x:o+2*i/3,y:u-a},{x:o+5*i/6,y:u-a},{x:o+i,y:u},{x:o+5*i/6,y:u+a},{x:o+2*i/3,y:u+a}],t.label.x=t.x,t.label.y=t.y}})}function D(n,r){return V(G(n,r),Number)}function K(n){var r={};return f(n,function(t,e){r[e.toLowerCase()]=t}),r}export{$e as A,E as a,nn as e,G as j,Er as k,p as w};