orbitchat 2.3.10 → 2.5.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.
- package/bin/orbitchat.js +14 -0
- package/dist/assets/_baseUniq-D5Eo-o17-Dkf2eEoL.js +1 -0
- package/dist/assets/{api-CSrrt4Hm.js → api-BBbZ-wzb.js} +1 -1
- package/dist/assets/arc-C_KK8p3_-DPqj8zOp.js +1 -0
- package/dist/assets/architectureDiagram-VXUJARFQ-ZhthiBXw-6jLb3PI4.js +36 -0
- package/dist/assets/{blockDiagram-VD42YOAC-D-In4h7h-DDWWtiEg.js → blockDiagram-VD42YOAC-2RvSKzzb-CekR3NQa.js} +4 -4
- package/dist/assets/{c4Diagram-YG6GDRKO-DBs8r9gh-DD_frv7O.js → c4Diagram-YG6GDRKO-iYNAbGgt-BwzskMHt.js} +4 -4
- package/dist/assets/channel-pHWSbwHm-CxOaJbm2.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-BqD7w0AR-ZAOe8ORu.js → chunk-4BX2VUAB-BI1eieHX-BcH4s9g3.js} +1 -1
- package/dist/assets/chunk-55IACEB6-BpoJKKfJ-bOzouDoX.js +1 -0
- package/dist/assets/{chunk-B4BG7PRW-Dwma1pSy-Bl0-nntv.js → chunk-B4BG7PRW-B_gbgJ8Z-CmKgjHYB.js} +4 -4
- package/dist/assets/{chunk-DI55MBZ5-BY2XXvZz-CQ0Injrx.js → chunk-DI55MBZ5-2NtB5tR9-g5uXuUGc.js} +3 -3
- package/dist/assets/{chunk-FMBD7UC4-BeiLbQ8U-CNPiePZa.js → chunk-FMBD7UC4-RlKniDBQ-B__CYUwz.js} +1 -1
- package/dist/assets/chunk-QN33PNHL-DFknLKOq-B_TRwG-U.js +1 -0
- package/dist/assets/{chunk-QZHKN3VN-Cwlo2qTG-BR9WJWUk.js → chunk-QZHKN3VN-1GW3GHKe-C9vGZ5SL.js} +1 -1
- package/dist/assets/chunk-TZMSLE5B-BTJEzWgP-DqiAu4KT.js +1 -0
- package/dist/assets/classDiagram-2ON5EDUG-dl-fP_NJ-DmLd9UEu.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-dl-fP_NJ-DmLd9UEu.js +1 -0
- package/dist/assets/clone-CYv9ip75-CjM9sz61.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-DKeVcPDK-BMWgmO-w.js → cose-bilkent-S5V4N54A-LTD5cwdk-BcWDZjn0.js} +1 -1
- package/dist/assets/dagre-6UL2VRFP-oAHH3NGz-C-dq50GC.js +4 -0
- package/dist/assets/diagram-PSM6KHXK-CE9xld4H-mRc14ET5.js +24 -0
- package/dist/assets/diagram-QEK2KX5R-BueFGLn5-BlCxBbOv.js +43 -0
- package/dist/assets/diagram-S2PKOQOG-C1iE4SNs-z2q-4hhl.js +24 -0
- package/dist/assets/{erDiagram-Q2GNP2WA-DgUeO5_h-DwFRPpc-.js → erDiagram-Q2GNP2WA-Cjwgn5O1-_ffXliWU.js} +5 -5
- package/dist/assets/{flowDiagram-NV44I4VS-C5HQUzU9-Dd1QnMCu.js → flowDiagram-NV44I4VS-DhL_LF5y-DRuINGle.js} +6 -6
- package/dist/assets/{ganttDiagram-JELNMOA3-DgSZ1ixF-CbDSqz2k.js → ganttDiagram-JELNMOA3-B9BkzPjc-BXIfYkGx.js} +5 -5
- package/dist/assets/gitGraphDiagram-NY62KEGX-BMn7vaQV-Bfy7yuMv.js +65 -0
- package/dist/assets/graph-DO7yB5fn-iHvIIoGD.js +1 -0
- package/dist/assets/index-B54jsFJy.css +1 -0
- package/dist/assets/{index-BAOVR-xx-DMdNPSDP.js → index-BqpsNXVI-BztRLboM.js} +1 -1
- package/dist/assets/{index-BTPuzWr4.js → index-Ga9tZhFZ.js} +233 -233
- package/dist/assets/infoDiagram-WHAUD3N6-Cb76h7mD-s5ySGBI1.js +2 -0
- package/dist/assets/{journeyDiagram-XKPGCS4Q-DXjg3S3r-fxMbaXJ-.js → journeyDiagram-XKPGCS4Q-CKTjKgpD-DCt-FJ9q.js} +4 -4
- package/dist/assets/{kanban-definition-3W4ZIXB7-Uxt7Am6n-CPmibytu.js → kanban-definition-3W4ZIXB7-CavBl09t-D5mhKSSQ.js} +8 -8
- package/dist/assets/layout-kX0D0crf-x5N-fcnG.js +1 -0
- package/dist/assets/min-rCpHWDFS-Bpi4dGNR.js +1 -0
- package/dist/assets/{mindmap-definition-VGOIOE7T-DXwVuAPE-Dht-jd7k.js → mindmap-definition-VGOIOE7T-atjBunOF-DuLlAK7g.js} +6 -6
- package/dist/assets/pieDiagram-ADFJNKIX-vuHwyssH-CjkF3vHE.js +30 -0
- package/dist/assets/{quadrantDiagram-AYHSOK5B-CnLDz007-C6jk9kv5.js → quadrantDiagram-AYHSOK5B-CDM1Rm_m-CEOhVdQI.js} +5 -5
- package/dist/assets/{requirementDiagram-UZGBJVZJ-rDaI-8Be-DXBijE3z.js → requirementDiagram-UZGBJVZJ-oAoTJrMw-Co7f_Whe.js} +4 -4
- package/dist/assets/{sankeyDiagram-TZEHDZUN-A0YO8ixs-C0T9TEUN.js → sankeyDiagram-TZEHDZUN-BcBwWOvE-NUCVToCj.js} +4 -4
- package/dist/assets/{sequenceDiagram-WL72ISMW-BFF7TtP7-BH1-yKSJ.js → sequenceDiagram-WL72ISMW-DfYfiNEc-DAem8LrU.js} +7 -7
- package/dist/assets/stateDiagram-FKZM4ZOC-Bc8gN8qV-tvcraH7m.js +1 -0
- package/dist/assets/stateDiagram-v2-4FDKWEC3-D_sncagZ-BEb1odG9.js +1 -0
- package/dist/assets/{timeline-definition-IT6M3QCI-5W361ZNm-Db1Pcnuj.js → timeline-definition-IT6M3QCI-D-4DkSGs-igqgXYJA.js} +5 -5
- package/dist/assets/treemap-KMMF4GRG-D_CgoaQq-1cg8_rRW.js +128 -0
- package/dist/assets/{xychartDiagram-PRI3JC2R-CSr0GxaP-DUYBQL3l.js → xychartDiagram-PRI3JC2R-Cs63yrks-CcEeZ1Qx.js} +4 -4
- package/dist/index.html +2 -2
- package/package.json +2 -2
- package/dist/assets/_basePickBy-C3-QE0dl-CwiFWMf5.js +0 -1
- package/dist/assets/_baseUniq-CstiM9Lp-CC1X3VG7.js +0 -1
- package/dist/assets/arc-W3NKKXLI-sVig9pa3.js +0 -1
- package/dist/assets/architectureDiagram-VXUJARFQ-zzJsgPC6-DQrwRYmT.js +0 -36
- package/dist/assets/channel-RBWQyMSg-gUi1KlXM.js +0 -1
- package/dist/assets/chunk-55IACEB6-D8pvDVEJ-DtIWMMVI.js +0 -1
- package/dist/assets/chunk-QN33PNHL-BkO3hOeq-A514DihW.js +0 -1
- package/dist/assets/chunk-TZMSLE5B-BnXK-OiF-BznO8Gf9.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-Crd6O69V-BJZxOA2r.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-Crd6O69V-BJZxOA2r.js +0 -1
- package/dist/assets/clone-CfLgyC8S-aIeHeX4K.js +0 -1
- package/dist/assets/dagre-6UL2VRFP-BPf604Df-DxeDFC4-.js +0 -4
- package/dist/assets/diagram-PSM6KHXK-DeLcpEV3-Dp0SFmxC.js +0 -24
- package/dist/assets/diagram-QEK2KX5R-C_5RR1NJ-DrXMkUTb.js +0 -43
- package/dist/assets/diagram-S2PKOQOG-DVx43aon-hz6TGdjP.js +0 -24
- package/dist/assets/gitGraphDiagram-NY62KEGX-DY5loT9K-C87Bfc0h.js +0 -65
- package/dist/assets/graph-BfwqPHx6-CIM8yILX.js +0 -1
- package/dist/assets/index-CRlGDTqI.css +0 -1
- package/dist/assets/infoDiagram-WHAUD3N6-DIqQ6vCk-BZ9DbUbX.js +0 -2
- package/dist/assets/layout-CSfkE668-r0g3o8WB.js +0 -1
- package/dist/assets/pieDiagram-ADFJNKIX-Cj0EHHtj-DzS4Pas7.js +0 -30
- package/dist/assets/stateDiagram-FKZM4ZOC-ofFsB7HJ-DBSNOl-_.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-CEZFbksU-CN3dwWvk.js +0 -1
- package/dist/assets/treemap-KMMF4GRG-pGRoYcSn-CJVJfOHv.js +0 -128
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{D as e,x as s,am as o,u as i,an as d}from"./index-Ga9tZhFZ.js";import{j as p}from"./treemap-KMMF4GRG-D_CgoaQq-1cg8_rRW.js";import"./min-rCpHWDFS-Bpi4dGNR.js";import"./_baseUniq-D5Eo-o17-Dkf2eEoL.js";var m={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},g={version:d.version+""},v=e(()=>g.version,"getVersion"),x={getVersion:v},c=e((r,a,n)=>{s.debug(`rendering info diagram
|
|
2
|
+
`+r);const t=o(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),f={draw:c},y={parser:m,db:x,renderer:f};export{y as diagram};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{d as ft,y as rt,g as gt,x as mt}from"./chunk-TZMSLE5B-
|
|
1
|
+
import{d as ft,y as rt,g as gt,x as mt}from"./chunk-TZMSLE5B-BTJEzWgP-DqiAu4KT.js";import{l as xt}from"./chunk-FMBD7UC4-RlKniDBQ-B__CYUwz.js";import{D as s,W as kt,O as _t,f as bt,H as wt,l as $t,P as vt,w as B,t as X,u as St,y as Mt}from"./index-Ga9tZhFZ.js";import{h as tt}from"./arc-C_KK8p3_-DPqj8zOp.js";var J=function(){var t=s(function(y,i,a,u){for(a=a||{},u=y.length;u--;a[y[u]]=i);return a},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],l=[1,10],n=[1,11],c=[1,12],d=[1,13],h=[1,14],f={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(y,i,a,u,p,o,x){var k=o.length-1;switch(p){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:u.addTask(o[k-1],o[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:l,14:n,16:c,17:d,18:h},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:l,14:n,16:c,17:d,18:h},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(y,i){if(i.recoverable)this.trace(y);else{var a=new Error(y);throw a.hash=i,a}},"parseError"),parse:s(function(y){var i=this,a=[0],u=[],p=[null],o=[],x=this.table,k="",T=0,j=0,ut=2,K=1,pt=o.slice.call(arguments,1),_=Object.create(this.lexer),P={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(P.yy[W]=this.yy[W]);_.setInput(y,P.yy),P.yy.lexer=_,P.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;o.push(Y);var yt=_.options&&_.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function dt(w){a.length=a.length-2*w,p.length=p.length-w,o.length=o.length-w}s(dt,"popStack");function Q(){var w;return w=u.pop()||_.lex()||K,typeof w!="number"&&(w instanceof Array&&(u=w,w=u.pop()),w=i.symbols_[w]||w),w}s(Q,"lex");for(var b,I,$,z,A={},O,M,Z,D;;){if(I=a[a.length-1],this.defaultActions[I]?$=this.defaultActions[I]:((b===null||typeof b>"u")&&(b=Q()),$=x[I]&&x[I][b]),typeof $>"u"||!$.length||!$[0]){var G="";D=[];for(O in x[I])this.terminals_[O]&&O>ut&&D.push("'"+this.terminals_[O]+"'");_.showPosition?G="Parse error on line "+(T+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
|
-
Expecting `+
|
|
3
|
+
Expecting `+D.join(", ")+", got '"+(this.terminals_[b]||b)+"'":G="Parse error on line "+(T+1)+": Unexpected "+(b==K?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(G,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:D})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+b);switch($[0]){case 1:a.push(b),p.push(_.yytext),o.push(_.yylloc),a.push($[1]),b=null,j=_.yyleng,k=_.yytext,T=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[$[1]][1],A.$=p[p.length-M],A._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},yt&&(A._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),z=this.performAction.apply(A,[k,j,T,P.yy,$[1],p,o].concat(pt)),typeof z<"u")return z;M&&(a=a.slice(0,-1*M*2),p=p.slice(0,-1*M),o=o.slice(0,-1*M)),a.push(this.productions_[$[1]][0]),p.push(A.$),o.push(A._$),Z=x[a[a.length-2]][a[a.length-1]],a.push(Z);break;case 3:return!0}}return!0},"parse")},m=function(){var y={EOF:1,parseError:s(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,u=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===p.length?this.yylloc.first_column:0)+p[p.length-u.length].length-u[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
5
|
`+a+"^"},"showPosition"),test_match:s(function(i,a){var u,p,o;if(this.options.backtrack_lexer&&(o={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(o.yylloc.range=this.yylloc.range.slice(0))),p=i[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],u=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var x in o)this[x]=o[x];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,u,p;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),x=0;x<o.length;x++)if(u=this._input.match(this.rules[o[x]]),u&&(!a||u[0].length>a[0].length)){if(a=u,p=x,this.options.backtrack_lexer){if(i=this.test_match(u,o[x]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,o[p]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var i=this.next();return i||this.lex()},"lex"),begin:s(function(i){this.conditionStack.push(i)},"begin"),popState:s(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:s(function(i){this.begin(i)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(i,a,u,p){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return y}();f.lexer=m;function g(){this.yy={}}return s(g,"Parser"),g.prototype=f,f.Parser=g,new g}();
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var i=this.next();return i||this.lex()},"lex"),begin:s(function(i){this.conditionStack.push(i)},"begin"),popState:s(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:s(function(i){this.begin(i)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(i,a,u,p){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return y}();f.lexer=m;function g(){this.yy={}}return s(g,"Parser"),g.prototype=f,f.Parser=g,new g}();J.parser=J;var Ct=J,V="",U=[],L=[],R=[],Et=s(function(){U.length=0,L.length=0,V="",R.length=0,Mt()},"clear"),Tt=s(function(t){V=t,U.push(t)},"addSection"),Pt=s(function(){return U},"getSections"),It=s(function(){let t=et();const e=100;let r=0;for(;!t&&r<e;)t=et(),r++;return L.push(...R),L},"getTasks"),jt=s(function(){const t=[];return L.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),At=s(function(t,e){const r=e.substr(1).split(":");let l=0,n=[];r.length===1?(l=Number(r[0]),n=[]):(l=Number(r[0]),n=r[1].split(","));const c=n.map(h=>h.trim()),d={section:V,type:V,people:c,task:t,score:l};R.push(d)},"addTask"),Vt=s(function(t){const e={section:V,type:V,description:t,task:t,classes:[]};L.push(e)},"addTaskOrg"),et=s(function(){const t=s(function(r){return R[r].processed},"compileTask");let e=!0;for(const[r,l]of R.entries())t(r),e=e&&l.processed;return e},"compileTasks"),Bt=s(function(){return jt()},"getActors"),it={getConfig:s(()=>B().journey,"getConfig"),clear:Et,setDiagramTitle:vt,getDiagramTitle:$t,setAccTitle:wt,getAccTitle:bt,setAccDescription:_t,getAccDescription:kt,addSection:Tt,getSections:Pt,getTasks:It,addTask:At,addTaskOrg:Vt,getActors:Bt},Lt=s(t=>`.label {
|
|
7
7
|
font-family: ${t.fontFamily};
|
|
8
8
|
color: ${t.textColor};
|
|
9
9
|
}
|
|
@@ -136,4 +136,4 @@ Expecting `+O.join(", ")+", got '"+(this.terminals_[b]||b)+"'":W="Parse error on
|
|
|
136
136
|
${t.actor5?`fill: ${t.actor5}`:""};
|
|
137
137
|
}
|
|
138
138
|
${xt()}
|
|
139
|
-
`,"getStyles"),Rt=Lt,
|
|
139
|
+
`,"getStyles"),Rt=Lt,H=s(function(t,e){return mt(t,e)},"drawRect"),Ft=s(function(t,e){const r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),l=t.append("g");l.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),l.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function n(h){const f=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(n,"smile");function c(h){const f=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(c,"sad");function d(h){h.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(d,"ambivalent"),e.score>3?n(l):e.score<3?c(l):d(l),r},"drawFace"),ot=s(function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),lt=s(function(t,e){return gt(t,e)},"drawText"),Ot=s(function(t,e){function r(n,c,d,h,f){return n+","+c+" "+(n+d)+","+c+" "+(n+d)+","+(c+h-f)+" "+(n+d-f*1.2)+","+(c+h)+" "+n+","+(c+h)}s(r,"genPoints");const l=t.append("polygon");l.attr("points",r(e.x,e.y,50,20,7)),l.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,lt(t,e)},"drawLabel"),Dt=s(function(t,e,r){const l=t.append("g"),n=rt();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,H(l,n),ct(r)(e.text,l,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),nt=-1,Nt=s(function(t,e,r){const l=e.x+r.width/2,n=t.append("g");nt++,n.append("line").attr("id","task"+nt).attr("x1",l).attr("y1",e.y).attr("x2",l).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Ft(n,{cx:l,cy:300+(5-e.score)*30,score:e.score});const c=rt();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=r.width,c.height=r.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,H(n,c);let d=e.x+14;e.people.forEach(h=>{const f=e.actors[h].color,m={cx:d,cy:e.y,r:7,fill:f,stroke:"#000",title:h,pos:e.actors[h].position};ot(n,m),d+=10}),ct(r)(e.task,n,c.x,c.y,c.width,c.height,{class:"task"},r,e.colour)},"drawTask"),Wt=s(function(t,e){ft(t,e)},"drawBackgroundRect"),ct=function(){function t(n,c,d,h,f,m,g,y){const i=c.append("text").attr("x",d+f/2).attr("y",h+m/2+5).style("font-color",y).style("text-anchor","middle").text(n);l(i,g)}s(t,"byText");function e(n,c,d,h,f,m,g,y,i){const{taskFontSize:a,taskFontFamily:u}=y,p=n.split(/<br\s*\/?>/gi);for(let o=0;o<p.length;o++){const x=o*a-a*(p.length-1)/2,k=c.append("text").attr("x",d+f/2).attr("y",h).attr("fill",i).style("text-anchor","middle").style("font-size",a).style("font-family",u);k.append("tspan").attr("x",d+f/2).attr("dy",x).text(p[o]),k.attr("y",h+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(k,g)}}s(e,"byTspan");function r(n,c,d,h,f,m,g,y){const i=c.append("switch"),a=i.append("foreignObject").attr("x",d).attr("y",h).attr("width",f).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");a.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,i,d,h,f,m,g,y),l(a,g)}s(r,"byFo");function l(n,c){for(const d in c)d in c&&n.attr(d,c[d])}return s(l,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),Yt=s(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),F={drawRect:H,drawCircle:ot,drawSection:Dt,drawText:lt,drawLabel:Ot,drawTask:Nt,drawBackgroundRect:Wt,initGraphics:Yt},zt=s(function(t){Object.keys(t).forEach(function(e){S[e]=t[e]})},"setConf"),C={},N=0;function ht(t){const e=B().journey,r=e.maxLabelWidth;N=0;let l=60;Object.keys(C).forEach(n=>{const c=C[n].color,d={cx:20,cy:l,r:7,fill:c,stroke:"#000",pos:C[n].position};F.drawCircle(t,d);let h=t.append("text").attr("visibility","hidden").text(n);const f=h.node().getBoundingClientRect().width;h.remove();let m=[];if(f<=r)m=[n];else{const g=n.split(" ");let y="";h=t.append("text").attr("visibility","hidden"),g.forEach(i=>{const a=y?`${y} ${i}`:i;if(h.text(a),h.node().getBoundingClientRect().width>r){if(y&&m.push(y),y=i,h.text(i),h.node().getBoundingClientRect().width>r){let u="";for(const p of i)u+=p,h.text(u+"-"),h.node().getBoundingClientRect().width>r&&(m.push(u.slice(0,-1)+"-"),u=p);y=u}}else y=a}),y&&m.push(y),h.remove()}m.forEach((g,y)=>{const i={x:40,y:l+7+y*20,fill:"#666",text:g,textMargin:e.boxTextMargin??5},a=F.drawText(t,i).node().getBoundingClientRect().width;a>N&&a>e.leftMargin-a&&(N=a)}),l+=Math.max(20,m.length*20)})}s(ht,"drawActorLegend");var S=B().journey,E=0,Gt=s(function(t,e,r,l){const n=B(),c=n.journey.titleColor,d=n.journey.titleFontSize,h=n.journey.titleFontFamily,f=n.securityLevel;let m;f==="sandbox"&&(m=X("#i"+e));const g=f==="sandbox"?X(m.nodes()[0].contentDocument.body):X("body");v.init();const y=g.select("#"+e);F.initGraphics(y);const i=l.db.getTasks(),a=l.db.getDiagramTitle(),u=l.db.getActors();for(const j in C)delete C[j];let p=0;u.forEach(j=>{C[j]={color:S.actorColours[p%S.actorColours.length],position:p},p++}),ht(y),E=S.leftMargin+N,v.insert(0,0,E,Object.keys(C).length*50),Xt(y,i,0);const o=v.getBounds();a&&y.append("text").text(a).attr("x",E).attr("font-size",d).attr("font-weight","bold").attr("y",25).attr("fill",c).attr("font-family",h);const x=o.stopy-o.starty+2*S.diagramMarginY,k=E+o.stopx+2*S.diagramMarginX;St(y,x,k,S.useMaxWidth),y.append("line").attr("x1",E).attr("y1",S.height*4).attr("x2",k-E-4).attr("y2",S.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const T=a?70:0;y.attr("viewBox",`${o.startx} -25 ${k} ${x+T}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",x+T+25)},"draw"),v={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,r,l){t[e]===void 0?t[e]=r:t[e]=l(r,t[e])},"updateVal"),updateBounds:s(function(t,e,r,l){const n=B().journey,c=this;let d=0;function h(f){return s(function(m){d++;const g=c.sequenceItems.length-d+1;c.updateVal(m,"starty",e-g*n.boxMargin,Math.min),c.updateVal(m,"stopy",l+g*n.boxMargin,Math.max),c.updateVal(v.data,"startx",t-g*n.boxMargin,Math.min),c.updateVal(v.data,"stopx",r+g*n.boxMargin,Math.max),f!=="activation"&&(c.updateVal(m,"startx",t-g*n.boxMargin,Math.min),c.updateVal(m,"stopx",r+g*n.boxMargin,Math.max),c.updateVal(v.data,"starty",e-g*n.boxMargin,Math.min),c.updateVal(v.data,"stopy",l+g*n.boxMargin,Math.max))},"updateItemBounds")}s(h,"updateFn"),this.sequenceItems.forEach(h())},"updateBounds"),insert:s(function(t,e,r,l){const n=Math.min(t,r),c=Math.max(t,r),d=Math.min(e,l),h=Math.max(e,l);this.updateVal(v.data,"startx",n,Math.min),this.updateVal(v.data,"starty",d,Math.min),this.updateVal(v.data,"stopx",c,Math.max),this.updateVal(v.data,"stopy",h,Math.max),this.updateBounds(n,d,c,h)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},q=S.sectionFills,st=S.sectionColours,Xt=s(function(t,e,r){const l=B().journey;let n="";const c=l.height*2+l.diagramMarginY,d=r+c;let h=0,f="#CCC",m="black",g=0;for(const[y,i]of e.entries()){if(n!==i.section){f=q[h%q.length],g=h%q.length,m=st[h%st.length];let u=0;const p=i.section;for(let x=y;x<e.length&&e[x].section==p;x++)u=u+1;const o={x:y*l.taskMargin+y*l.width+E,y:50,text:i.section,fill:f,num:g,colour:m,taskCount:u};F.drawSection(t,o,l),n=i.section,h++}const a=i.people.reduce((u,p)=>(C[p]&&(u[p]=C[p]),u),{});i.x=y*l.taskMargin+y*l.width+E,i.y=d,i.width=l.diagramMarginX,i.height=l.diagramMarginY,i.colour=m,i.fill=f,i.num=g,i.actors=a,F.drawTask(t,i,l),v.insert(i.x,i.y,i.x+i.width+l.taskMargin,450)}},"drawTasks"),at={setConf:zt,draw:Gt},Kt={parser:Ct,db:it,renderer:at,styles:Rt,init:s(t=>{at.setConf(t.journey),it.clear()},"init")};export{Kt as diagram};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as a,x as ee,w as F,am as pe,d as ye,J as fe,Z as me,aX as be,G as V,Q as M,m as _e,p as Ee,aY as Se,aZ as ae,a_ as le}from"./index-Ga9tZhFZ.js";import{l as ke}from"./chunk-FMBD7UC4-RlKniDBQ-B__CYUwz.js";var Z=function(){var i=a(function(k,e,n,r){for(n=n||{},r=k.length;r--;n[k[r]]=e);return n},"o"),u=[1,4],d=[1,13],s=[1,12],g=[1,15],D=[1,16],S=[1,20],h=[1,19],O=[6,7,8],b=[1,26],_=[1,24],C=[1,25],o=[6,7,11],j=[1,31],w=[6,7,11,24],$=[1,6,13,16,17,20,23],T=[1,35],H=[1,36],A=[1,6,7,11,13,16,17,20,23],G=[1,38],y={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:a(function(k,e,n,r,c,t,m){var l=t.length-1;switch(c){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",t[l-1].id),r.addNode(t[l-2].length,t[l-1].id,t[l-1].descr,t[l-1].type,t[l]);break;case 16:r.getLogger().info("Node: ",t[l].id),r.addNode(t[l-1].length,t[l].id,t[l].descr,t[l].type);break;case 17:r.getLogger().trace("Icon: ",t[l]),r.decorateNode({icon:t[l]});break;case 18:case 23:r.decorateNode({class:t[l]});break;case 19:r.getLogger().trace("SPACELIST");break;case 20:r.getLogger().trace("Node: ",t[l-1].id),r.addNode(0,t[l-1].id,t[l-1].descr,t[l-1].type,t[l]);break;case 21:r.getLogger().trace("Node: ",t[l].id),r.addNode(0,t[l].id,t[l].descr,t[l].type);break;case 22:r.decorateNode({icon:t[l]});break;case 27:r.getLogger().trace("node found ..",t[l-2]),this.$={id:t[l-1],descr:t[l-1],type:r.getType(t[l-2],t[l])};break;case 28:this.$={id:t[l],descr:t[l],type:0};break;case 29:r.getLogger().trace("node found ..",t[l-3]),this.$={id:t[l-3],descr:t[l-1],type:r.getType(t[l-2],t[l])};break;case 30:this.$=t[l-1]+t[l];break;case 31:this.$=t[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:u},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:u},{6:d,7:[1,10],9:9,12:11,13:s,14:14,16:g,17:D,18:17,19:18,20:S,23:h},i(O,[2,3]),{1:[2,2]},i(O,[2,4]),i(O,[2,5]),{1:[2,6],6:d,12:21,13:s,14:14,16:g,17:D,18:17,19:18,20:S,23:h},{6:d,9:22,12:11,13:s,14:14,16:g,17:D,18:17,19:18,20:S,23:h},{6:b,7:_,10:23,11:C},i(o,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:S,23:h}),i(o,[2,19]),i(o,[2,21],{15:30,24:j}),i(o,[2,22]),i(o,[2,23]),i(w,[2,25]),i(w,[2,26]),i(w,[2,28],{20:[1,32]}),{21:[1,33]},{6:b,7:_,10:34,11:C},{1:[2,7],6:d,12:21,13:s,14:14,16:g,17:D,18:17,19:18,20:S,23:h},i($,[2,14],{7:T,11:H}),i(A,[2,8]),i(A,[2,9]),i(A,[2,10]),i(o,[2,16],{15:37,24:j}),i(o,[2,17]),i(o,[2,18]),i(o,[2,20],{24:G}),i(w,[2,31]),{21:[1,39]},{22:[1,40]},i($,[2,13],{7:T,11:H}),i(A,[2,11]),i(A,[2,12]),i(o,[2,15],{24:G}),i(w,[2,30]),{22:[1,41]},i(w,[2,27]),i(w,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:a(function(k,e){if(e.recoverable)this.trace(k);else{var n=new Error(k);throw n.hash=e,n}},"parseError"),parse:a(function(k){var e=this,n=[0],r=[],c=[null],t=[],m=this.table,l="",W=0,ne=0,he=2,se=1,ue=t.slice.call(arguments,1),f=Object.create(this.lexer),P={yy:{}};for(var X in this.yy)Object.prototype.hasOwnProperty.call(this.yy,X)&&(P.yy[X]=this.yy[X]);f.setInput(k,P.yy),P.yy.lexer=f,P.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var q=f.yylloc;t.push(q);var ge=f.options&&f.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function de(N){n.length=n.length-2*N,c.length=c.length-N,t.length=t.length-N}a(de,"popStack");function re(){var N;return N=r.pop()||f.lex()||se,typeof N!="number"&&(N instanceof Array&&(r=N,N=r.pop()),N=e.symbols_[N]||N),N}a(re,"lex");for(var E,B,x,J,U={},z,I,oe,K;;){if(B=n[n.length-1],this.defaultActions[B]?x=this.defaultActions[B]:((E===null||typeof E>"u")&&(E=re()),x=m[B]&&m[B][E]),typeof x>"u"||!x.length||!x[0]){var Q="";K=[];for(z in m[B])this.terminals_[z]&&z>he&&K.push("'"+this.terminals_[z]+"'");f.showPosition?Q="Parse error on line "+(W+1)+`:
|
|
2
2
|
`+f.showPosition()+`
|
|
3
|
-
Expecting `+K.join(", ")+", got '"+(this.terminals_[E]||E)+"'":
|
|
3
|
+
Expecting `+K.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Q="Parse error on line "+(W+1)+": Unexpected "+(E==se?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Q,{text:f.match,token:this.terminals_[E]||E,line:f.yylineno,loc:q,expected:K})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+E);switch(x[0]){case 1:n.push(E),c.push(f.yytext),t.push(f.yylloc),n.push(x[1]),E=null,ne=f.yyleng,l=f.yytext,W=f.yylineno,q=f.yylloc;break;case 2:if(I=this.productions_[x[1]][1],U.$=c[c.length-I],U._$={first_line:t[t.length-(I||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(I||1)].first_column,last_column:t[t.length-1].last_column},ge&&(U._$.range=[t[t.length-(I||1)].range[0],t[t.length-1].range[1]]),J=this.performAction.apply(U,[l,ne,W,P.yy,x[1],c,t].concat(ue)),typeof J<"u")return J;I&&(n=n.slice(0,-1*I*2),c=c.slice(0,-1*I),t=t.slice(0,-1*I)),n.push(this.productions_[x[1]][0]),c.push(U.$),t.push(U._$),oe=m[n[n.length-2]][n[n.length-1]],n.push(oe);break;case 3:return!0}}return!0},"parse")},R=function(){var k={EOF:1,parseError:a(function(e,n){if(this.yy.parser)this.yy.parser.parseError(e,n);else throw new Error(e)},"parseError"),setInput:a(function(e,n){return this.yy=n||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var n=e.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:a(function(e){var n=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var t=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===c.length?this.yylloc.first_column:0)+c[c.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[t[0],t[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(e){this.unput(this.match.slice(e))},"less"),pastInput:a(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var e=this.pastInput(),n=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
|
5
5
|
`+n+"^"},"showPosition"),test_match:a(function(e,n){var r,c,t;if(this.options.backtrack_lexer&&(t={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(t.yylloc.range=this.yylloc.range.slice(0))),c=e[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var m in t)this[m]=t[m];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,n,r,c;this._more||(this.yytext="",this.match="");for(var t=this._currentRules(),m=0;m<t.length;m++)if(r=this._input.match(this.rules[t[m]]),r&&(!n||r[0].length>n[0].length)){if(n=r,c=m,this.options.backtrack_lexer){if(e=this.test_match(r,t[m]),e!==!1)return e;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(e=this.test_match(n,t[c]),e!==!1?e:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var e=this.next();return e||this.lex()},"lex"),begin:a(function(e){this.conditionStack.push(e)},"begin"),popState:a(function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:a(function(e){this.begin(e)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(e,n,r,c){switch(r){case 0:return this.pushState("shapeData"),n.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const t=/\n\s*/g;return n.yytext=n.yytext.replace(t,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace("Found comment",n.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",n.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",n.yytext),"NODE_DEND";case 36:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 41:return e.getLogger().trace("Long description:",n.yytext),21;case 42:return e.getLogger().trace("Long description:",n.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return k}();y.lexer=R;function v(){this.yy={}}return a(v,"Parser"),v.prototype=y,y.Parser=v,new v}();
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var e=this.next();return e||this.lex()},"lex"),begin:a(function(e){this.conditionStack.push(e)},"begin"),popState:a(function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:a(function(e){this.begin(e)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(e,n,r,c){switch(r){case 0:return this.pushState("shapeData"),n.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const t=/\n\s*/g;return n.yytext=n.yytext.replace(t,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace("Found comment",n.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",n.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",n.yytext),"NODE_DEND";case 36:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 41:return e.getLogger().trace("Long description:",n.yytext),21;case 42:return e.getLogger().trace("Long description:",n.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return k}();y.lexer=R;function v(){this.yy={}}return a(v,"Parser"),v.prototype=y,y.Parser=v,new v}();Z.parser=Z;var Ne=Z,L=[],te=[],Y=0,ie={},De=a(()=>{L=[],te=[],Y=0,ie={}},"clear"),xe=a(i=>{if(L.length===0)return null;const u=L[0].level;let d=null;for(let s=L.length-1;s>=0;s--)if(L[s].level===u&&!d&&(d=L[s]),L[s].level<u)throw new Error('Items without section detected, found section ("'+L[s].label+'")');return i===(d==null?void 0:d.level)?null:d},"getSection"),ce=a(function(){return te},"getSections"),Le=a(function(){const i=[],u=[],d=ce(),s=F();for(const g of d){const D={id:g.id,label:M(g.label??"",s),isGroup:!0,ticket:g.ticket,shape:"kanbanSection",level:g.level,look:s.look};u.push(D);const S=L.filter(h=>h.parentId===g.id);for(const h of S){const O={id:h.id,parentId:g.id,label:M(h.label??"",s),isGroup:!1,ticket:h==null?void 0:h.ticket,priority:h==null?void 0:h.priority,assigned:h==null?void 0:h.assigned,icon:h==null?void 0:h.icon,shape:"kanbanItem",level:h.level,rx:5,ry:5,cssStyles:["text-align: left"]};u.push(O)}}return{nodes:u,edges:i,other:{},config:F()}},"getData"),Oe=a((i,u,d,s,g)=>{var D,S;const h=F();let O=((D=h.mindmap)==null?void 0:D.padding)??V.mindmap.padding;switch(s){case p.ROUNDED_RECT:case p.RECT:case p.HEXAGON:O*=2}const b={id:M(u,h)||"kbn"+Y++,level:i,label:M(d,h),width:((S=h.mindmap)==null?void 0:S.maxNodeWidth)??V.mindmap.maxNodeWidth,padding:O,isGroup:!1};if(g!==void 0){let C;g.includes(`
|
|
7
7
|
`)?C=g+`
|
|
8
8
|
`:C=`{
|
|
9
9
|
`+g+`
|
|
10
|
-
}`;const o=_e(C,{schema:Ee});if(o.shape&&(o.shape!==o.shape.toLowerCase()||o.shape.includes("_")))throw new Error(`No such shape: ${o.shape}. Shape names should be lowercase.`);o!=null&&o.shape&&o.shape==="kanbanItem"&&(b.shape=o==null?void 0:o.shape),o!=null&&o.label&&(b.label=o==null?void 0:o.label),o!=null&&o.icon&&(b.icon=o==null?void 0:o.icon.toString()),o!=null&&o.assigned&&(b.assigned=o==null?void 0:o.assigned.toString()),o!=null&&o.ticket&&(b.ticket=o==null?void 0:o.ticket.toString()),o!=null&&o.priority&&(b.priority=o==null?void 0:o.priority)}const _=xe(i);_?b.parentId=_.id||"kbn"+
|
|
11
|
-
`+i);const b=s.db.getData(),_=
|
|
10
|
+
}`;const o=_e(C,{schema:Ee});if(o.shape&&(o.shape!==o.shape.toLowerCase()||o.shape.includes("_")))throw new Error(`No such shape: ${o.shape}. Shape names should be lowercase.`);o!=null&&o.shape&&o.shape==="kanbanItem"&&(b.shape=o==null?void 0:o.shape),o!=null&&o.label&&(b.label=o==null?void 0:o.label),o!=null&&o.icon&&(b.icon=o==null?void 0:o.icon.toString()),o!=null&&o.assigned&&(b.assigned=o==null?void 0:o.assigned.toString()),o!=null&&o.ticket&&(b.ticket=o==null?void 0:o.ticket.toString()),o!=null&&o.priority&&(b.priority=o==null?void 0:o.priority)}const _=xe(i);_?b.parentId=_.id||"kbn"+Y++:te.push(b),L.push(b)},"addNode"),p={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ve=a((i,u)=>{switch(ee.debug("In get type",i,u),i){case"[":return p.RECT;case"(":return u===")"?p.ROUNDED_RECT:p.CLOUD;case"((":return p.CIRCLE;case")":return p.CLOUD;case"))":return p.BANG;case"{{":return p.HEXAGON;default:return p.DEFAULT}},"getType"),Ce=a((i,u)=>{ie[i]=u},"setElementForId"),we=a(i=>{if(!i)return;const u=F(),d=L[L.length-1];i.icon&&(d.icon=M(i.icon,u)),i.class&&(d.cssClasses=M(i.class,u))},"decorateNode"),Ae=a(i=>{switch(i){case p.DEFAULT:return"no-border";case p.RECT:return"rect";case p.ROUNDED_RECT:return"rounded-rect";case p.CIRCLE:return"circle";case p.CLOUD:return"cloud";case p.BANG:return"bang";case p.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Ie=a(()=>ee,"getLogger"),$e=a(i=>ie[i],"getElementById"),Te={clear:De,addNode:Oe,getSections:ce,getData:Le,nodeType:p,getType:ve,setElementForId:Ce,decorateNode:we,type2Str:Ae,getLogger:Ie,getElementById:$e},Re=Te,Pe=a(async(i,u,d,s)=>{var g,D,S,h,O;ee.debug(`Rendering kanban diagram
|
|
11
|
+
`+i);const b=s.db.getData(),_=F();_.htmlLabels=!1;const C=pe(u),o=C.append("g");o.attr("class","sections");const j=C.append("g");j.attr("class","items");const w=b.nodes.filter(y=>y.isGroup);let $=0;const T=10,H=[];let A=25;for(const y of w){const R=((g=_==null?void 0:_.kanban)==null?void 0:g.sectionWidth)||200;$=$+1,y.x=R*$+($-1)*T/2,y.width=R,y.y=0,y.height=R*3,y.rx=5,y.ry=5,y.cssClasses=y.cssClasses+" section-"+$;const v=await ye(o,y);A=Math.max(A,(D=v==null?void 0:v.labelBBox)==null?void 0:D.height),H.push(v)}let G=0;for(const y of w){const R=H[G];G=G+1;const v=((S=_==null?void 0:_.kanban)==null?void 0:S.sectionWidth)||200,k=-v*3/2+A;let e=k;const n=b.nodes.filter(t=>t.parentId===y.id);for(const t of n){if(t.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");t.x=y.x,t.width=v-1.5*T;const m=(await fe(j,t,{config:_})).node().getBBox();t.y=e+m.height/2,await me(t),e=t.y+m.height/2+T/2}const r=R.cluster.select("rect"),c=Math.max(e-k+3*T,50)+(A-25);r.attr("height",c)}be(void 0,C,((h=_.mindmap)==null?void 0:h.padding)??V.kanban.padding,((O=_.mindmap)==null?void 0:O.useMaxWidth)??V.kanban.useMaxWidth)},"draw"),Be={draw:Pe},Ge=a(i=>{let u="";for(let s=0;s<i.THEME_COLOR_LIMIT;s++)i["lineColor"+s]=i["lineColor"+s]||i["cScaleInv"+s],Se(i["lineColor"+s])?i["lineColor"+s]=ae(i["lineColor"+s],20):i["lineColor"+s]=le(i["lineColor"+s],20);const d=a((s,g)=>i.darkMode?le(s,g):ae(s,g),"adjuster");for(let s=0;s<i.THEME_COLOR_LIMIT;s++){const g=""+(17-3*s);u+=`
|
|
12
12
|
.section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {
|
|
13
13
|
fill: ${d(i["cScale"+s],10)};
|
|
14
14
|
stroke: ${d(i["cScale"+s],10)};
|
|
@@ -54,11 +54,11 @@ Expecting `+K.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Y="Parse error on
|
|
|
54
54
|
stroke: ${i.nodeBorder};
|
|
55
55
|
text-decoration: underline;
|
|
56
56
|
}
|
|
57
|
-
`}return u},"genSections"),
|
|
57
|
+
`}return u},"genSections"),Ue=a(i=>`
|
|
58
58
|
.edge {
|
|
59
59
|
stroke-width: 3;
|
|
60
60
|
}
|
|
61
|
-
${
|
|
61
|
+
${Ge(i)}
|
|
62
62
|
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
63
63
|
fill: ${i.git0};
|
|
64
64
|
}
|
|
@@ -86,4 +86,4 @@ Expecting `+K.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Y="Parse error on
|
|
|
86
86
|
text-align: center;
|
|
87
87
|
}
|
|
88
88
|
${ke()}
|
|
89
|
-
`,"getStyles"),
|
|
89
|
+
`,"getStyles"),Me=Ue,Fe={db:Re,renderer:Be,parser:Ne,styles:Me};export{Fe as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Q as m,A as k,_ as b,O as An}from"./graph-DO7yB5fn-iHvIIoGD.js";import{B as Vn,q as f,v as q,n as ln,a as j,$ as pn,G as Yn,Y as S,T as zn,Z as M,F as wn,j as bn,x as Q,I as Dn,M as Qn,b as Un,c as Wn}from"./_baseUniq-D5Eo-o17-Dkf2eEoL.js";import{L as O,v as Jn,k as I,M as p,A as mn,x as Zn}from"./min-rCpHWDFS-Bpi4dGNR.js";import{aE as yn,aF as L,aG as xn,aH as Hn,aI as U,aJ as Kn,aK as Xn,aL as kn,aM as En,aN as nr,aO as rr,aP as tr,aQ as $,aR as er,aS as On,aT as or,aU as ir}from"./index-Ga9tZhFZ.js";var ar=/\s/;function ur(n){for(var r=n.length;r--&&ar.test(n.charAt(r)););return r}var cr=/^\s+/;function dr(n){return n&&n.slice(0,ur(n)+1).replace(cr,"")}var tn=NaN,fr=/^[-+]0x[0-9a-f]+$/i,sr=/^0b[01]+$/i,hr=/^0o[0-7]+$/i,vr=parseInt;function gr(n){if(typeof n=="number")return n;if(Q(n))return tn;if($(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=$(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=dr(n);var t=sr.test(n);return t||hr.test(n)?vr(n.slice(2),t?2:8):fr.test(n)?tn:+n}var en=1/0,lr=17976931348623157e292;function T(n){if(!n)return n===0?n:0;if(n=gr(n),n===en||n===-en){var r=n<0?-1:1;return r*lr}return n===n?n:0}function pr(n){var r=T(n),t=r%1;return r===r?t?r-t:r:0}function wr(n){return Kn(Xn(n,void 0,O),n+"")}var br=1,mr=4;function yr(n){return An(n,br|mr)}var Nn=Object.prototype,xr=Nn.hasOwnProperty,kr=yn(function(n,r){n=Object(n);var t=-1,e=r.length,o=e>2?r[2]:void 0;for(o&&L(r[0],r[1],o)&&(e=1);++t<e;)for(var a=r[t],i=xn(a),u=-1,c=i.length;++u<c;){var d=i[u],s=n[d];(s===void 0||Hn(s,Nn[d])&&!xr.call(n,d))&&(n[d]=a[d])}return n});function C(n){var r=n==null?0:n.length;return r?n[r-1]:void 0}function Er(n){return function(r,t,e){var o=Object(r);if(!or(r)){var a=j(t);r=Qn(r),t=function(u){return a(o[u],u,o)}}var i=n(r,t,e);return i>-1?o[a?r[i]:i]:void 0}}var Or=Math.max;function Nr(n,r,t){var e=n==null?0:n.length;if(!e)return-1;var o=t==null?0:pr(t);return o<0&&(o=Or(e+o,0)),Wn(n,j(r),o)}var J=Er(Nr);function _r(n,r){return n==null?n:ir(n,wn(r),xn)}function Ir(n,r){return n&&pn(n,wn(r))}function Pr(n,r){return n>r}var jr=Object.prototype,Mr=jr.hasOwnProperty;function Rr(n,r){return n!=null&&Mr.call(n,r)}function _n(n,r){return n!=null&&zn(n,r,Rr)}function B(n,r){var t={};return r=j(r),pn(n,function(e,o,a){rr(t,o,r(e,o,a))}),t}function y(n){return n&&n.length?mn(n,En,Pr):void 0}function Z(n,r){return n&&n.length?mn(n,j(r),Zn):void 0}function Tr(n,r,t,e){if(!$(n))return n;r=bn(r,n);for(var o=-1,a=r.length,i=a-1,u=n;u!=null&&++o<a;){var c=Dn(r[o]),d=t;if(c==="__proto__"||c==="constructor"||c==="prototype")return n;if(o!=i){var s=u[c];d=void 0,d===void 0&&(d=$(s)?s:er(r[o+1])?[]:{})}On(u,c,d),u=u[c]}return n}function Lr(n,r,t){for(var e=-1,o=r.length,a={};++e<o;){var i=r[e],u=ln(n,i);t(u,i)&&Tr(a,bn(i,n),u)}return a}function $r(n,r){var t=n.length;for(n.sort(r);t--;)n[t]=n[t].value;return n}function Cr(n,r){if(n!==r){var t=n!==void 0,e=n===null,o=n===n,a=Q(n),i=r!==void 0,u=r===null,c=r===r,d=Q(r);if(!u&&!d&&!a&&n>r||a&&i&&c&&!u&&!d||e&&i&&c||!t&&c||!o)return 1;if(!e&&!a&&!d&&n<r||d&&t&&o&&!e&&!a||u&&t&&o||!i&&o||!c)return-1}return 0}function Fr(n,r,t){for(var e=-1,o=n.criteria,a=r.criteria,i=o.length,u=t.length;++e<i;){var c=Cr(o[e],a[e]);if(c){if(e>=u)return c;var d=t[e];return c*(d=="desc"?-1:1)}}return n.index-r.index}function Sr(n,r,t){r.length?r=q(r,function(a){return kn(a)?function(i){return ln(i,a.length===1?a[0]:a)}:a}):r=[En];var e=-1;r=q(r,nr(j));var o=Jn(n,function(a,i,u){var c=q(r,function(d){return d(a)});return{criteria:c,index:++e,value:a}});return $r(o,function(a,i){return Fr(a,i,t)})}function Br(n,r){return Lr(n,r,function(t,e){return Un(n,e)})}var F=wr(function(n,r){return n==null?{}:Br(n,r)}),Gr=Math.ceil,qr=Math.max;function Ar(n,r,t,e){for(var o=-1,a=qr(Gr((r-n)/(t||1)),0),i=Array(a);a--;)i[++o]=n,n+=t;return i}function Vr(n){return function(r,t,e){return e&&typeof e!="number"&&L(r,t,e)&&(t=e=void 0),r=T(r),t===void 0?(t=r,r=0):t=T(t),e=e===void 0?r<t?1:-1:T(e),Ar(r,t,e)}}var E=Vr(),R=yn(function(n,r){if(n==null)return[];var t=r.length;return t>1&&L(n,r[0],r[1])?r=[]:t>2&&L(r[0],r[1],r[2])&&(r=[r[0]]),Sr(n,Vn(r),[])}),Yr=0;function H(n){var r=++Yr;return Yn(n)+r}function zr(n,r,t){for(var e=-1,o=n.length,a=r.length,i={};++e<o;){var u=e<a?r[e]:void 0;t(i,n[e],u)}return i}function Dr(n,r){return zr(n||[],r||[],On)}class Qr{constructor(){var r={};r._next=r._prev=r,this._sentinel=r}dequeue(){var r=this._sentinel,t=r._prev;if(t!==r)return on(t),t}enqueue(r){var t=this._sentinel;r._prev&&r._next&&on(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,Ur)),e=e._prev;return"["+r.join(", ")+"]"}}function on(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function Ur(n,r){if(n!=="_next"&&n!=="_prev")return r}var Wr=tr(1);function Jr(n,r){if(n.nodeCount()<=1)return[];var t=Hr(n,r||Wr),e=Zr(t.graph,t.buckets,t.zeroIdx);return O(p(e,function(o){return n.outEdges(o.v,o.w)}))}function Zr(n,r,t){for(var e=[],o=r[r.length-1],a=r[0],i;n.nodeCount();){for(;i=a.dequeue();)A(n,r,t,i);for(;i=o.dequeue();)A(n,r,t,i);if(n.nodeCount()){for(var u=r.length-2;u>0;--u)if(i=r[u].dequeue(),i){e=e.concat(A(n,r,t,i,!0));break}}}return e}function A(n,r,t,e,o){var a=o?[]:void 0;return f(n.inEdges(e.v),function(i){var u=n.edge(i),c=n.node(i.v);o&&a.push({v:i.v,w:i.w}),c.out-=u,W(r,t,c)}),f(n.outEdges(e.v),function(i){var u=n.edge(i),c=i.w,d=n.node(c);d.in-=u,W(r,t,d)}),n.removeNode(e.v),a}function Hr(n,r){var t=new m,e=0,o=0;f(n.nodes(),function(u){t.setNode(u,{v:u,in:0,out:0})}),f(n.edges(),function(u){var c=t.edge(u.v,u.w)||0,d=r(u),s=c+d;t.setEdge(u.v,u.w,s),o=Math.max(o,t.node(u.v).out+=d),e=Math.max(e,t.node(u.w).in+=d)});var a=E(o+e+3).map(function(){return new Qr}),i=e+1;return f(t.nodes(),function(u){W(a,i,t.node(u))}),{graph:t,buckets:a,zeroIdx:i}}function W(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 Kr(n){var r=n.graph().acyclicer==="greedy"?Jr(n,t(n)):Xr(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,H("rev"))});function t(e){return function(o){return e.edge(o).weight}}}function Xr(n){var r=[],t={},e={};function o(a){Object.prototype.hasOwnProperty.call(e,a)||(e[a]=!0,t[a]=!0,f(n.outEdges(a),function(i){Object.prototype.hasOwnProperty.call(t,i.w)?r.push(i):o(i.w)}),delete t[a])}return f(n.nodes(),o),r}function nt(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(n,r,t,e){var o;do o=H(e);while(n.hasNode(o));return t.dummy=r,n.setNode(o,t),o}function rt(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 In(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 an(n,r){var t=n.x,e=n.y,o=r.x-t,a=r.y-e,i=n.width/2,u=n.height/2;if(!o&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var c,d;return Math.abs(a)*i>Math.abs(o)*u?(a<0&&(u=-u),c=u*o/a,d=u):(o<0&&(i=-i),c=i,d=i*a/o),{x:t+c,y:e+d}}function G(n){var r=p(E(Pn(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 tt(n){var r=I(p(n.nodes(),function(t){return n.node(t).rank}));f(n.nodes(),function(t){var e=n.node(t);_n(e,"rank")&&(e.rank-=r)})}function et(n){var r=I(p(n.nodes(),function(a){return n.node(a).rank})),t=[];f(n.nodes(),function(a){var i=n.node(a).rank-r;t[i]||(t[i]=[]),t[i].push(a)});var e=0,o=n.graph().nodeRankFactor;f(t,function(a,i){b(a)&&i%o!==0?--e:e&&f(a,function(u){n.node(u).rank+=e})})}function un(n,r,t,e){var o={width:0,height:0};return arguments.length>=4&&(o.rank=t,o.order=e),N(n,"border",o,r)}function Pn(n){return y(p(n.nodes(),function(r){var t=n.node(r).rank;if(!b(t))return t}))}function ot(n,r){var t={lhs:[],rhs:[]};return f(n,function(e){r(e)?t.lhs.push(e):t.rhs.push(e)}),t}function it(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 a=o.minRank,i=o.maxRank+1;a<i;++a)cn(n,"borderLeft","_bl",t,o,a),cn(n,"borderRight","_br",t,o,a)}}f(n.children(),r)}function cn(n,r,t,e,o,a){var i={width:0,height:0,rank:a,borderType:r},u=o[r][a-1],c=N(n,"border",i,t);o[r][a]=c,n.setParent(c,e),u&&n.setEdge(u,c,{weight:1})}function ut(n){var r=n.graph().rankdir.toLowerCase();(r==="lr"||r==="rl")&&jn(n)}function ct(n){var r=n.graph().rankdir.toLowerCase();(r==="bt"||r==="rl")&&dt(n),(r==="lr"||r==="rl")&&(ft(n),jn(n))}function jn(n){f(n.nodes(),function(r){dn(n.node(r))}),f(n.edges(),function(r){dn(n.edge(r))})}function dn(n){var r=n.width;n.width=n.height,n.height=r}function dt(n){f(n.nodes(),function(r){V(n.node(r))}),f(n.edges(),function(r){var t=n.edge(r);f(t.points,V),Object.prototype.hasOwnProperty.call(t,"y")&&V(t)})}function V(n){n.y=-n.y}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,"x")&&Y(t)})}function Y(n){var r=n.x;n.x=n.y,n.y=r}function st(n){n.graph().dummyChains=[],f(n.edges(),function(r){ht(n,r)})}function ht(n,r){var t=r.v,e=n.node(t).rank,o=r.w,a=n.node(o).rank,i=r.name,u=n.edge(r),c=u.labelRank;if(a!==e+1){n.removeEdge(r);var d=void 0,s,h;for(h=0,++e;e<a;++h,++e)u.points=[],d={width:0,height:0,edgeLabel:u,edgeObj:r,rank:e},s=N(n,"edge",d,"_d"),e===c&&(d.width=u.width,d.height=u.height,d.dummy="edge-label",d.labelpos=u.labelpos),n.setEdge(t,s,{weight:u.weight},i),h===0&&n.graph().dummyChains.push(s),t=s;n.setEdge(t,o,{weight:u.weight},i)}}function vt(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 K(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 a=I(p(n.outEdges(e),function(i){return t(i.w)-n.edge(i).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),o.rank=a}f(n.sources(),t)}function P(n,r){return n.node(r.w).rank-n.node(r.v).rank-n.edge(r).minlen}function Mn(n){var r=new m({directed:!1}),t=n.nodes()[0],e=n.nodeCount();r.setNode(t,{});for(var o,a;gt(r,n)<e;)o=lt(r,n),a=r.hasNode(o.v)?P(n,o):-P(n,o),pt(r,n,a);return r}function gt(n,r){function t(e){f(r.nodeEdges(e),function(o){var a=o.v,i=e===a?o.w:a;!n.hasNode(i)&&!P(r,o)&&(n.setNode(i,{}),n.setEdge(e,i,{}),t(i))})}return f(n.nodes(),t),n.nodeCount()}function lt(n,r){return Z(r.edges(),function(t){if(n.hasNode(t.v)!==n.hasNode(t.w))return P(r,t)})}function pt(n,r,t){f(n.nodes(),function(e){r.node(e).rank+=t})}function Rn(n,r,t){kn(r)||(r=[r]);var e=(n.isDirected()?n.successors:n.neighbors).bind(n),o=[],a={};return f(r,function(i){if(!n.hasNode(i))throw new Error("Graph does not have node: "+i);Tn(n,i,t==="post",a,e,o)}),o}function Tn(n,r,t,e,o,a){Object.prototype.hasOwnProperty.call(e,r)||(e[r]=!0,t||a.push(r),f(o(r),function(i){Tn(n,i,t,e,o,a)}),t&&a.push(r))}function wt(n,r){return Rn(n,r,"post")}function bt(n,r){return Rn(n,r,"pre")}x.initLowLimValues=nn;x.initCutValues=X;x.calcCutValue=Ln;x.leaveEdge=Cn;x.enterEdge=Fn;x.exchangeEdges=Sn;function x(n){n=rt(n),K(n);var r=Mn(n);nn(r),X(r,n);for(var t,e;t=Cn(r);)e=Fn(r,n,t),Sn(r,n,t,e)}function X(n,r){var t=wt(n,n.nodes());t=t.slice(0,t.length-1),f(t,function(e){mt(n,r,e)})}function mt(n,r,t){var e=n.node(t),o=e.parent;n.edge(t,o).cutvalue=Ln(n,r,t)}function Ln(n,r,t){var e=n.node(t),o=e.parent,a=!0,i=r.edge(t,o),u=0;return i||(a=!1,i=r.edge(o,t)),u=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===a,v=r.edge(c).weight;if(u+=h?v:-v,xt(n,t,s)){var g=n.edge(t,s).cutvalue;u+=h?-g:g}}}),u}function nn(n,r){arguments.length<2&&(r=n.nodes()[0]),$n(n,{},1,r)}function $n(n,r,t,e,o){var a=t,i=n.node(e);return r[e]=!0,f(n.neighbors(e),function(u){Object.prototype.hasOwnProperty.call(r,u)||(t=$n(n,r,t,u,e))}),i.low=a,i.lim=t++,o?i.parent=o:delete i.parent,t}function Cn(n){return J(n.edges(),function(r){return n.edge(r).cutvalue<0})}function Fn(n,r,t){var e=t.v,o=t.w;r.hasEdge(e,o)||(e=t.w,o=t.v);var a=n.node(e),i=n.node(o),u=a,c=!1;a.lim>i.lim&&(u=i,c=!0);var d=M(r.edges(),function(s){return c===fn(n,n.node(s.v),u)&&c!==fn(n,n.node(s.w),u)});return Z(d,function(s){return P(r,s)})}function Sn(n,r,t,e){var o=t.v,a=t.w;n.removeEdge(o,a),n.setEdge(e.v,e.w,{}),nn(n),X(n,r),yt(n,r)}function yt(n,r){var t=J(n.nodes(),function(o){return!r.node(o).parent}),e=bt(n,t);e=e.slice(1),f(e,function(o){var a=n.node(o).parent,i=r.edge(o,a),u=!1;i||(i=r.edge(a,o),u=!0),r.node(o).rank=r.node(a).rank+(u?i.minlen:-i.minlen)})}function xt(n,r,t){return n.hasEdge(r,t)}function fn(n,r,t){return t.low<=r.lim&&r.lim<=t.lim}function kt(n){switch(n.graph().ranker){case"network-simplex":sn(n);break;case"tight-tree":Ot(n);break;case"longest-path":Et(n);break;default:sn(n)}}var Et=K;function Ot(n){K(n),Mn(n)}function sn(n){x(n)}function Nt(n){var r=N(n,"root",{},"_root"),t=_t(n),e=y(k(t))-1,o=2*e+1;n.graph().nestingRoot=r,f(n.edges(),function(i){n.edge(i).minlen*=o});var a=It(n)+1;f(n.children(),function(i){Bn(n,r,o,a,e,t,i)}),n.graph().nodeRankFactor=o}function Bn(n,r,t,e,o,a,i){var u=n.children(i);if(!u.length){i!==r&&n.setEdge(r,i,{weight:0,minlen:t});return}var c=un(n,"_bt"),d=un(n,"_bb"),s=n.node(i);n.setParent(c,i),s.borderTop=c,n.setParent(d,i),s.borderBottom=d,f(u,function(h){Bn(n,r,t,e,o,a,h);var v=n.node(h),g=v.borderTop?v.borderTop:h,l=v.borderBottom?v.borderBottom:h,w=v.borderTop?e:2*e,_=g!==l?1:o-a[i]+1;n.setEdge(c,g,{weight:w,minlen:_,nestingEdge:!0}),n.setEdge(l,d,{weight:w,minlen:_,nestingEdge:!0})}),n.parent(i)||n.setEdge(r,c,{weight:0,minlen:o+a[i]})}function _t(n){var r={};function t(e,o){var a=n.children(e);a&&a.length&&f(a,function(i){t(i,o+1)}),r[e]=o}return f(n.children(),function(e){t(e,1)}),r}function It(n){return S(n.edges(),function(r,t){return r+n.edge(t).weight},0)}function Pt(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 jt(n,r,t){var e={},o;f(t,function(a){for(var i=n.parent(a),u,c;i;){if(u=n.parent(i),u?(c=e[u],e[u]=i):(c=o,o=i),c&&c!==i){r.setEdge(c,i);return}i=u}})}function Mt(n,r,t){var e=Rt(n),o=new m({compound:!0}).setGraph({root:e}).setDefaultNodeLabel(function(a){return n.node(a)});return f(n.nodes(),function(a){var i=n.node(a),u=n.parent(a);(i.rank===r||i.minRank<=r&&r<=i.maxRank)&&(o.setNode(a),o.setParent(a,u||e),f(n[t](a),function(c){var d=c.v===a?c.w:c.v,s=o.edge(d,a),h=b(s)?0:s.weight;o.setEdge(d,a,{weight:n.edge(c).weight+h})}),Object.prototype.hasOwnProperty.call(i,"minRank")&&o.setNode(a,{borderLeft:i.borderLeft[r],borderRight:i.borderRight[r]}))}),o}function Rt(n){for(var r;n.hasNode(r=H("_root")););return r}function Tt(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=Dr(t,p(t,function(d,s){return s})),o=O(p(r,function(d){return R(p(n.outEdges(d),function(s){return{pos:e[s.w],weight:n.edge(s).weight}}),"pos")})),a=1;a<t.length;)a<<=1;var i=2*a-1;a-=1;var u=p(new Array(i),function(){return 0}),c=0;return f(o.forEach(function(d){var s=d.pos+a;u[s]+=d.weight;for(var h=0;s>0;)s%2&&(h+=u[s+1]),s=s-1>>1,u[s]+=d.weight;c+=d.weight*h})),c}function $t(n){var r={},t=M(n.nodes(),function(u){return!n.children(u).length}),e=y(p(t,function(u){return n.node(u).rank})),o=p(E(e+1),function(){return[]});function a(u){if(!_n(r,u)){r[u]=!0;var c=n.node(u);o[c.rank].push(u),f(n.successors(u),a)}}var i=R(t,function(u){return n.node(u).rank});return f(i,a),o}function Ct(n,r){return p(r,function(t){var e=n.inEdges(t);if(e.length){var o=S(e,function(a,i){var u=n.edge(i),c=n.node(i.v);return{sum:a.sum+u.weight*c.order,weight:a.weight+u.weight}},{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:t}})}function Ft(n,r){var t={};f(n,function(o,a){var i=t[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:a};b(o.barycenter)||(i.barycenter=o.barycenter,i.weight=o.weight)}),f(r.edges(),function(o){var a=t[o.v],i=t[o.w];!b(a)&&!b(i)&&(i.indegree++,a.out.push(t[o.w]))});var e=M(t,function(o){return!o.indegree});return St(e)}function St(n){var r=[];function t(a){return function(i){i.merged||(b(i.barycenter)||b(a.barycenter)||i.barycenter>=a.barycenter)&&Bt(a,i)}}function e(a){return function(i){i.in.push(a),--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(M(r,function(a){return!a.merged}),function(a){return F(a,["vs","i","barycenter","weight"])})}function Bt(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 Gt(n,r){var t=ot(n,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),e=t.lhs,o=R(t.rhs,function(s){return-s.i}),a=[],i=0,u=0,c=0;e.sort(qt(!!r)),c=hn(a,o,c),f(e,function(s){c+=s.vs.length,a.push(s.vs),i+=s.barycenter*s.weight,u+=s.weight,c=hn(a,o,c)});var d={vs:O(a)};return u&&(d.barycenter=i/u,d.weight=u),d}function hn(n,r,t){for(var e;r.length&&(e=C(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 Gn(n,r,t,e){var o=n.children(r),a=n.node(r),i=a?a.borderLeft:void 0,u=a?a.borderRight:void 0,c={};i&&(o=M(o,function(l){return l!==i&&l!==u}));var d=Ct(n,o);f(d,function(l){if(n.children(l.v).length){var w=Gn(n,l.v,t,e);c[l.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&Vt(l,w)}});var s=Ft(d,t);At(s,c);var h=Gt(s,e);if(i&&(h.vs=O([i,h.vs,u]),n.predecessors(i).length)){var v=n.node(n.predecessors(i)[0]),g=n.node(n.predecessors(u)[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 At(n,r){f(n,function(t){t.vs=O(t.vs.map(function(e){return r[e]?r[e].vs:e}))})}function Vt(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 Yt(n){var r=Pn(n),t=vn(n,E(1,r+1),"inEdges"),e=vn(n,E(r-1,-1,-1),"outEdges"),o=$t(n);gn(n,o);for(var a=Number.POSITIVE_INFINITY,i,u=0,c=0;c<4;++u,++c){zt(u%2?t:e,u%4>=2),o=G(n);var d=Tt(n,o);d<a&&(c=0,i=yr(o),a=d)}gn(n,i)}function vn(n,r,t){return p(r,function(e){return Mt(n,e,t)})}function zt(n,r){var t=new m;f(n,function(e){var o=e.graph().root,a=Gn(e,o,t,r);f(a.vs,function(i,u){e.node(i).order=u}),jt(e,t,a.vs)})}function gn(n,r){f(r,function(t){f(t,function(e,o){n.node(e).order=o})})}function Dt(n){var r=Ut(n);f(n.graph().dummyChains,function(t){for(var e=n.node(t),o=e.edgeObj,a=Qt(n,r,o.v,o.w),i=a.path,u=a.lca,c=0,d=i[c],s=!0;t!==o.w;){if(e=n.node(t),s){for(;(d=i[c])!==u&&n.node(d).maxRank<e.rank;)c++;d===u&&(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 Qt(n,r,t,e){var o=[],a=[],i=Math.min(r[t].low,r[e].low),u=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||u>r[c].lim));for(d=c,c=e;(c=n.parent(c))!==d;)a.push(c);return{path:o.concat(a.reverse()),lca:d}}function Ut(n){var r={},t=0;function e(o){var a=t;f(n.children(o),e),r[o]={low:a,lim:t++}}return f(n.children(),e),r}function Wt(n,r){var t={};function e(o,a){var i=0,u=0,c=o.length,d=C(a);return f(a,function(s,h){var v=Zt(n,s),g=v?n.node(v).order:c;(v||s===d)&&(f(a.slice(u,h+1),function(l){f(n.predecessors(l),function(w){var _=n.node(w),rn=_.order;(rn<i||g<rn)&&!(_.dummy&&n.node(l).dummy)&&qn(t,w,l)})}),u=h+1,i=g)}),a}return S(r,e),t}function Jt(n,r){var t={};function e(a,i,u,c,d){var s;f(E(i,u),function(h){s=a[h],n.node(s).dummy&&f(n.predecessors(s),function(v){var g=n.node(v);g.dummy&&(g.order<c||g.order>d)&&qn(t,v,s)})})}function o(a,i){var u=-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,u,c),d=h,u=c)}e(i,d,i.length,c,a.length)}),i}return S(r,o),t}function Zt(n,r){if(n.node(r).dummy)return J(n.predecessors(r),function(t){return n.node(t).dummy})}function qn(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 Ht(n,r,t){if(r>t){var e=r;r=t,t=e}return!!n[r]&&Object.prototype.hasOwnProperty.call(n[r],t)}function Kt(n,r,t,e){var o={},a={},i={};return f(r,function(u){f(u,function(c,d){o[c]=c,a[c]=c,i[c]=d})}),f(r,function(u){var c=-1;f(u,function(d){var s=e(d);if(s.length){s=R(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];a[d]===d&&c<i[l]&&!Ht(t,d,l)&&(a[l]=d,a[d]=o[d]=o[l],c=i[l])}}})}),{root:o,align:a}}function Xt(n,r,t,e,o){var a={},i=ne(n,r,t,o),u=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){a[h]=i.inEdges(h).reduce(function(v,g){return Math.max(v,a[g.v]+i.edge(g))},0)}function s(h){var v=i.outEdges(h).reduce(function(l,w){return Math.min(l,a[w.w]-i.edge(w))},Number.POSITIVE_INFINITY),g=n.node(h);v!==Number.POSITIVE_INFINITY&&g.borderType!==u&&(a[h]=Math.max(a[h],v))}return c(d,i.predecessors.bind(i)),c(s,i.successors.bind(i)),f(e,function(h){a[h]=a[t[h]]}),a}function ne(n,r,t,e){var o=new m,a=n.graph(),i=ie(a.nodesep,a.edgesep,e);return f(r,function(u){var c;f(u,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 re(n,r){return Z(k(r),function(t){var e=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return _r(t,function(a,i){var u=ae(n,i)/2;e=Math.max(a+u,e),o=Math.min(a-u,o)}),e-o})}function te(n,r){var t=k(r),e=I(t),o=y(t);f(["u","d"],function(a){f(["l","r"],function(i){var u=a+i,c=n[u],d;if(c!==r){var s=k(c);d=i==="l"?e-I(s):o-y(s),d&&(n[u]=B(c,function(h){return h+d}))}})})}function ee(n,r){return B(n.ul,function(t,e){if(r)return n[r.toLowerCase()][e];var o=R(p(n,e));return(o[1]+o[2])/2})}function oe(n){var r=G(n),t=U(Wt(n,r),Jt(n,r)),e={},o;f(["u","d"],function(i){o=i==="u"?r:k(r).reverse(),f(["l","r"],function(u){u==="r"&&(o=p(o,function(h){return k(h).reverse()}));var c=(i==="u"?n.predecessors:n.successors).bind(n),d=Kt(n,o,t,c),s=Xt(n,o,d.root,d.align,u==="r");u==="r"&&(s=B(s,function(h){return-h})),e[i+u]=s})});var a=re(n,e);return te(e,a),ee(e,n.graph().align)}function ie(n,r,t){return function(e,o,a){var i=e.node(o),u=e.node(a),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+=(u.dummy?r:n)/2,c+=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&&(c+=t?d:-d),d=0,c}}function ae(n,r){return n.node(r).width}function ue(n){n=In(n),ce(n),Ir(oe(n),function(r,t){n.node(t).x=r})}function ce(n){var r=G(n),t=n.graph().ranksep,e=0;f(r,function(o){var a=y(p(o,function(i){return n.node(i).height}));f(o,function(i){n.node(i).y=e+a/2}),e+=a+t})}function Fe(n,r){var t=it;t("layout",()=>{var e=t(" buildLayoutGraph",()=>me(n));t(" runLayout",()=>de(e,t)),t(" updateInputGraph",()=>fe(n,e))})}function de(n,r){r(" makeSpaceForEdgeLabels",()=>ye(n)),r(" removeSelfEdges",()=>je(n)),r(" acyclic",()=>Kr(n)),r(" nestingGraph.run",()=>Nt(n)),r(" rank",()=>kt(In(n))),r(" injectEdgeLabelProxies",()=>xe(n)),r(" removeEmptyRanks",()=>et(n)),r(" nestingGraph.cleanup",()=>Pt(n)),r(" normalizeRanks",()=>tt(n)),r(" assignRankMinMax",()=>ke(n)),r(" removeEdgeLabelProxies",()=>Ee(n)),r(" normalize.run",()=>st(n)),r(" parentDummyChains",()=>Dt(n)),r(" addBorderSegments",()=>at(n)),r(" order",()=>Yt(n)),r(" insertSelfEdges",()=>Me(n)),r(" adjustCoordinateSystem",()=>ut(n)),r(" position",()=>ue(n)),r(" positionSelfEdges",()=>Re(n)),r(" removeBorderNodes",()=>Pe(n)),r(" normalize.undo",()=>vt(n)),r(" fixupEdgeLabelCoords",()=>_e(n)),r(" undoCoordinateSystem",()=>ct(n)),r(" translateGraph",()=>Oe(n)),r(" assignNodeIntersects",()=>Ne(n)),r(" reversePoints",()=>Ie(n)),r(" acyclic.undo",()=>nt(n))}function fe(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 se=["nodesep","edgesep","ranksep","marginx","marginy"],he={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},ve=["acyclicer","ranker","rankdir","align"],ge=["width","height"],le={width:0,height:0},pe=["minlen","weight","width","height","labeloffset"],we={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},be=["labelpos"];function me(n){var r=new m({multigraph:!0,compound:!0}),t=D(n.graph());return r.setGraph(U({},he,z(t,se),F(t,ve))),f(n.nodes(),function(e){var o=D(n.node(e));r.setNode(e,kr(z(o,ge),le)),r.setParent(e,n.parent(e))}),f(n.edges(),function(e){var o=D(n.edge(e));r.setEdge(e,U({},we,z(o,pe),F(o,be)))}),r}function ye(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),a={rank:(o.rank-e.rank)/2+e.rank,e:r};N(n,"edge-proxy",a,"_ep")}})}function ke(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 Ee(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 Oe(n){var r=Number.POSITIVE_INFINITY,t=0,e=Number.POSITIVE_INFINITY,o=0,a=n.graph(),i=a.marginx||0,u=a.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-=u,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)}),a.width=t-r+i,a.height=o-e+u}function Ne(n){f(n.edges(),function(r){var t=n.edge(r),e=n.node(r.v),o=n.node(r.w),a,i;t.points?(a=t.points[0],i=t.points[t.points.length-1]):(t.points=[],a=o,i=e),t.points.unshift(an(e,a)),t.points.push(an(o,i))})}function _e(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 Ie(n){f(n.edges(),function(r){var t=n.edge(r);t.reversed&&t.points.reverse()})}function Pe(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),a=n.node(C(t.borderLeft)),i=n.node(C(t.borderRight));t.width=Math.abs(i.x-a.x),t.height=Math.abs(o.y-e.y),t.x=a.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 je(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=G(n);f(r,function(t){var e=0;f(t,function(o,a){var i=n.node(o);i.order=a+e,f(i.selfEdges,function(u){N(n,"selfedge",{width:u.label.width,height:u.label.height,rank:i.rank,order:a+ ++e,e:u.e,label:u.label},"_se")}),delete i.selfEdges})})}function Re(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,a=e.y,i=t.x-o,u=e.height/2;n.setEdge(t.e,t.label),n.removeNode(r),t.label.points=[{x:o+2*i/3,y:a-u},{x:o+5*i/6,y:a-u},{x:o+i,y:a},{x:o+5*i/6,y:a+u},{x:o+2*i/3,y:a+u}],t.label.x=t.x,t.label.y=t.y}})}function z(n,r){return B(F(n,r),Number)}function D(n){var r={};return f(n,function(t,e){r[e.toLowerCase()]=t}),r}export{Fe as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as s,a as l,g as c,B as e,x as g}from"./_baseUniq-D5Eo-o17-Dkf2eEoL.js";import{aL as h,aT as m,aM as p}from"./index-Ga9tZhFZ.js";function M(n){var r=n==null?0:n.length;return r?e(n):[]}function x(n,r){var o=-1,u=m(n)?Array(n.length):[];return c(n,function(f,a,t){u[++o]=r(f,a,t)}),u}function j(n,r){var o=h(n)?s:x;return o(n,l(r))}function B(n,r){return n<r}function d(n,r,o){for(var u=-1,f=n.length;++u<f;){var a=n[u],t=r(a);if(t!=null&&(i===void 0?t===t&&!g(t):o(t,i)))var i=t,v=a}return v}function k(n){return n&&n.length?d(n,p,B):void 0}export{d as A,M as L,j as M,k,x as v,B as x};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{d as ce}from"./chunk-55IACEB6-
|
|
1
|
+
import{d as ce}from"./chunk-55IACEB6-BpoJKKfJ-bOzouDoX.js";import{d as he}from"./chunk-QN33PNHL-DFknLKOq-B_TRwG-U.js";import{D as a,x as I,$ as le,j as de,G as M,w as X,Q as P,bd as ge,aY as ue,aZ as pe,a_ as ye}from"./index-Ga9tZhFZ.js";const m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function fe(e,s=0){return(m[e[s+0]]+m[e[s+1]]+m[e[s+2]]+m[e[s+3]]+"-"+m[e[s+4]]+m[e[s+5]]+"-"+m[e[s+6]]+m[e[s+7]]+"-"+m[e[s+8]]+m[e[s+9]]+"-"+m[e[s+10]]+m[e[s+11]]+m[e[s+12]]+m[e[s+13]]+m[e[s+14]]+m[e[s+15]]).toLowerCase()}let W;const me=new Uint8Array(16);function _e(){if(!W){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");W=crypto.getRandomValues.bind(crypto)}return W(me)}const Ee=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ne={randomUUID:Ee};function be(e,s,i){var c;if(ne.randomUUID&&!e)return ne.randomUUID();e=e||{};const h=e.random??((c=e.rng)==null?void 0:c.call(e))??_e();if(h.length<16)throw new Error("Random bytes length must be >= 16");return h[6]=h[6]&15|64,h[8]=h[8]&63|128,fe(h)}var Y=function(){var e=a(function(S,t,r,o){for(r=r||{},o=S.length;o--;r[S[o]]=t);return r},"o"),s=[1,4],i=[1,13],c=[1,12],h=[1,15],y=[1,16],u=[1,20],g=[1,19],L=[6,7,8],p=[1,26],C=[1,24],z=[1,25],b=[6,7,11],J=[1,6,13,15,16,19,22],Z=[1,33],q=[1,34],w=[1,6,7,11,13,15,16,19,22],B={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:a(function(S,t,r,o,l,n,_){var d=n.length-1;switch(l){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",n[d].id),o.addNode(n[d-1].length,n[d].id,n[d].descr,n[d].type);break;case 16:o.getLogger().trace("Icon: ",n[d]),o.decorateNode({icon:n[d]});break;case 17:case 21:o.decorateNode({class:n[d]});break;case 18:o.getLogger().trace("SPACELIST");break;case 19:o.getLogger().trace("Node: ",n[d].id),o.addNode(0,n[d].id,n[d].descr,n[d].type);break;case 20:o.decorateNode({icon:n[d]});break;case 25:o.getLogger().trace("node found ..",n[d-2]),this.$={id:n[d-1],descr:n[d-1],type:o.getType(n[d-2],n[d])};break;case 26:this.$={id:n[d],descr:n[d],type:o.nodeType.DEFAULT};break;case 27:o.getLogger().trace("node found ..",n[d-3]),this.$={id:n[d-3],descr:n[d-1],type:o.getType(n[d-2],n[d])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:s},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:s},{6:i,7:[1,10],9:9,12:11,13:c,14:14,15:h,16:y,17:17,18:18,19:u,22:g},e(L,[2,3]),{1:[2,2]},e(L,[2,4]),e(L,[2,5]),{1:[2,6],6:i,12:21,13:c,14:14,15:h,16:y,17:17,18:18,19:u,22:g},{6:i,9:22,12:11,13:c,14:14,15:h,16:y,17:17,18:18,19:u,22:g},{6:p,7:C,10:23,11:z},e(b,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:u,22:g}),e(b,[2,18]),e(b,[2,19]),e(b,[2,20]),e(b,[2,21]),e(b,[2,23]),e(b,[2,24]),e(b,[2,26],{19:[1,30]}),{20:[1,31]},{6:p,7:C,10:32,11:z},{1:[2,7],6:i,12:21,13:c,14:14,15:h,16:y,17:17,18:18,19:u,22:g},e(J,[2,14],{7:Z,11:q}),e(w,[2,8]),e(w,[2,9]),e(w,[2,10]),e(b,[2,15]),e(b,[2,16]),e(b,[2,17]),{20:[1,35]},{21:[1,36]},e(J,[2,13],{7:Z,11:q}),e(w,[2,11]),e(w,[2,12]),{21:[1,37]},e(b,[2,25]),e(b,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:a(function(S,t){if(t.recoverable)this.trace(S);else{var r=new Error(S);throw r.hash=t,r}},"parseError"),parse:a(function(S){var t=this,r=[0],o=[],l=[null],n=[],_=this.table,d="",A=0,K=0,se=2,V=1,re=n.slice.call(arguments,1),f=Object.create(this.lexer),x={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(x.yy[j]=this.yy[j]);f.setInput(S,x.yy),x.yy.lexer=f,x.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var F=f.yylloc;n.push(F);var oe=f.options&&f.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(N){r.length=r.length-2*N,l.length=l.length-N,n.length=n.length-N}a(ae,"popStack");function ee(){var N;return N=o.pop()||f.lex()||V,typeof N!="number"&&(N instanceof Array&&(o=N,N=o.pop()),N=t.symbols_[N]||N),N}a(ee,"lex");for(var E,T,D,G,O={},$,k,te,U;;){if(T=r[r.length-1],this.defaultActions[T]?D=this.defaultActions[T]:((E===null||typeof E>"u")&&(E=ee()),D=_[T]&&_[T][E]),typeof D>"u"||!D.length||!D[0]){var H="";U=[];for($ in _[T])this.terminals_[$]&&$>se&&U.push("'"+this.terminals_[$]+"'");f.showPosition?H="Parse error on line "+(A+1)+`:
|
|
2
2
|
`+f.showPosition()+`
|
|
3
|
-
Expecting `+U.join(", ")+", got '"+(this.terminals_[
|
|
3
|
+
Expecting `+U.join(", ")+", got '"+(this.terminals_[E]||E)+"'":H="Parse error on line "+(A+1)+": Unexpected "+(E==V?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(H,{text:f.match,token:this.terminals_[E]||E,line:f.yylineno,loc:F,expected:U})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+E);switch(D[0]){case 1:r.push(E),l.push(f.yytext),n.push(f.yylloc),r.push(D[1]),E=null,K=f.yyleng,d=f.yytext,A=f.yylineno,F=f.yylloc;break;case 2:if(k=this.productions_[D[1]][1],O.$=l[l.length-k],O._$={first_line:n[n.length-(k||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(k||1)].first_column,last_column:n[n.length-1].last_column},oe&&(O._$.range=[n[n.length-(k||1)].range[0],n[n.length-1].range[1]]),G=this.performAction.apply(O,[d,K,A,x.yy,D[1],l,n].concat(re)),typeof G<"u")return G;k&&(r=r.slice(0,-1*k*2),l=l.slice(0,-1*k),n=n.slice(0,-1*k)),r.push(this.productions_[D[1]][0]),l.push(O.$),n.push(O._$),te=_[r[r.length-2]][r[r.length-1]],r.push(te);break;case 3:return!0}}return!0},"parse")},ie=function(){var S={EOF:1,parseError:a(function(t,r){if(this.yy.parser)this.yy.parser.parseError(t,r);else throw new Error(t)},"parseError"),setInput:a(function(t,r){return this.yy=r||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var r=t.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:a(function(t){var r=t.length,o=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===l.length?this.yylloc.first_column:0)+l[l.length-o.length].length-o[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(t){this.unput(this.match.slice(t))},"less"),pastInput:a(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var t=this.pastInput(),r=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
5
|
-
`+r+"^"},"showPosition"),test_match:a(function(t,r){var o,l,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),l=t[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],o=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var t=this.next();return t||this.lex()},"lex"),begin:a(function(t){this.conditionStack.push(t)},"begin"),popState:a(function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a(function(t){this.begin(t)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(t,r,o,l){switch(o){case 0:return t.getLogger().trace("Found comment",r.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",r.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",r.yytext),"NODE_DEND";case 30:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 35:return t.getLogger().trace("Long description:",r.yytext),20;case 36:return t.getLogger().trace("Long description:",r.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return S}();B.lexer=ie;function
|
|
5
|
+
`+r+"^"},"showPosition"),test_match:a(function(t,r){var o,l,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),l=t[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],o=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var _ in n)this[_]=n[_];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,r,o,l;this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),_=0;_<n.length;_++)if(o=this._input.match(this.rules[n[_]]),o&&(!r||o[0].length>r[0].length)){if(r=o,l=_,this.options.backtrack_lexer){if(t=this.test_match(o,n[_]),t!==!1)return t;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(t=this.test_match(r,n[l]),t!==!1?t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var t=this.next();return t||this.lex()},"lex"),begin:a(function(t){this.conditionStack.push(t)},"begin"),popState:a(function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a(function(t){this.begin(t)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(t,r,o,l){switch(o){case 0:return t.getLogger().trace("Found comment",r.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",r.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",r.yytext),"NODE_DEND";case 30:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 35:return t.getLogger().trace("Long description:",r.yytext),20;case 36:return t.getLogger().trace("Long description:",r.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return S}();B.lexer=ie;function R(){this.yy={}}return a(R,"Parser"),R.prototype=B,B.Parser=R,new R}();Y.parser=Y;var Ne=Y,v={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Q,De=(Q=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=v,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let s=this.nodes.length-1;s>=0;s--)if(this.nodes[s].level<e)return this.nodes[s];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,s,i,c){var h,y;I.info("addNode",e,s,i,c);let u=!1;this.nodes.length===0?(this.baseLevel=e,e=0,u=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,u=!1);const g=X();let L=((h=g.mindmap)==null?void 0:h.padding)??M.mindmap.padding;switch(c){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:L*=2;break}const p={id:this.count++,nodeId:P(s,g),level:e,descr:P(i,g),type:c,children:[],width:((y=g.mindmap)==null?void 0:y.maxNodeWidth)??M.mindmap.maxNodeWidth,padding:L,isRoot:u},C=this.getParent(e);if(C)C.children.push(p),this.nodes.push(p);else if(u)this.nodes.push(p);else throw new Error(`There can be only one root. No parent could be found for ("${p.descr}")`)}getType(e,s){switch(I.debug("In get type",e,s),e){case"[":return this.nodeType.RECT;case"(":return s===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,s){this.elements[e]=s}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const s=X(),i=this.nodes[this.nodes.length-1];e.icon&&(i.icon=P(e.icon,s)),e.class&&(i.class=P(e.class,s))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,s){if(e.level===0?e.section=void 0:e.section=s,e.children)for(const[i,c]of e.children.entries()){const h=e.level===0?i:s;this.assignSections(c,h)}}flattenNodes(e,s){const i=["mindmap-node"];e.isRoot===!0?i.push("section-root","section--1"):e.section!==void 0&&i.push(`section-${e.section}`),e.class&&i.push(e.class);const c=i.join(" "),h=a(u=>{switch(u){case v.CIRCLE:return"mindmapCircle";case v.RECT:return"rect";case v.ROUNDED_RECT:return"rounded";case v.CLOUD:return"cloud";case v.BANG:return"bang";case v.HEXAGON:return"hexagon";case v.DEFAULT:return"defaultMindmapNode";case v.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,isGroup:!1,shape:h(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:c,cssStyles:[],look:"default",icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(s.push(y),e.children)for(const u of e.children)this.flattenNodes(u,s)}generateEdges(e,s){if(e.children)for(const i of e.children){let c="edge";i.section!==void 0&&(c+=` section-edge-${i.section}`);const h=e.level+1;c+=` edge-depth-${h}`;const y={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:c,depth:e.level,section:i.section};s.push(y),this.generateEdges(i,s)}}getData(){const e=this.getMindmap(),s=X(),i=ge().layout!==void 0,c=s;if(i||(c.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:c};I.debug("getData: mindmapRoot",e,s),this.assignSections(e);const h=[],y=[];this.flattenNodes(e,h),this.generateEdges(e,y),I.debug(`getData: processed ${h.length} nodes and ${y.length} edges`);const u=new Map;for(const g of h)u.set(g.id,{shape:g.shape,width:g.width,height:g.height,padding:g.padding});return{nodes:h,edges:y,config:c,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(u),type:"mindmap",diagramId:"mindmap-"+be()}}getLogger(){return I}},a(Q,"MindmapDB"),Q),Se=a(async(e,s,i,c)=>{var h,y;I.debug(`Rendering mindmap diagram
|
|
7
7
|
`+e);const u=c.db,g=u.getData(),L=ce(s,g.config.securityLevel);g.type=c.type,g.layoutAlgorithm=le(g.config.layout,{fallback:"cose-bilkent"}),g.diagramId=s,u.getMindmap()&&(g.nodes.forEach(p=>{p.shape==="rounded"?(p.radius=15,p.taper=15,p.stroke="none",p.width=0,p.padding=15):p.shape==="circle"?p.padding=10:p.shape==="rect"&&(p.width=0,p.padding=10)}),await de(g,L),he(L,((h=g.config.mindmap)==null?void 0:h.padding)??M.mindmap.padding,"mindmapDiagram",((y=g.config.mindmap)==null?void 0:y.useMaxWidth)??M.mindmap.useMaxWidth))},"draw"),Le={draw:Se},ke=a(e=>{let s="";for(let i=0;i<e.THEME_COLOR_LIMIT;i++)e["lineColor"+i]=e["lineColor"+i]||e["cScaleInv"+i],ue(e["lineColor"+i])?e["lineColor"+i]=pe(e["lineColor"+i],20):e["lineColor"+i]=ye(e["lineColor"+i],20);for(let i=0;i<e.THEME_COLOR_LIMIT;i++){const c=""+(17-3*i);s+=`
|
|
8
8
|
.section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {
|
|
9
9
|
fill: ${e["cScale"+i]};
|
|
@@ -32,7 +32,7 @@ Expecting `+U.join(", ")+", got '"+(this.terminals_[_]||_)+"'":H="Parse error on
|
|
|
32
32
|
.disabled text {
|
|
33
33
|
fill: #efefef;
|
|
34
34
|
}
|
|
35
|
-
`}return s},"genSections"),
|
|
35
|
+
`}return s},"genSections"),ve=a(e=>`
|
|
36
36
|
.edge {
|
|
37
37
|
stroke-width: 3;
|
|
38
38
|
}
|
|
@@ -65,4 +65,4 @@ Expecting `+U.join(", ")+", got '"+(this.terminals_[_]||_)+"'":H="Parse error on
|
|
|
65
65
|
dominant-baseline: middle;
|
|
66
66
|
text-align: center;
|
|
67
67
|
}
|
|
68
|
-
`,"getStyles"),ve
|
|
68
|
+
`,"getStyles"),xe=ve,Ce={get db(){return new De},renderer:Le,parser:Ne,styles:xe};export{Ce as diagram};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{D as p,W as K,O as q,f as U,H as _,l as I,P as Q,x as W,w as X,E as Y,am as Z,ao as ee,ap as te,u as ae,y as ne,G as ie,aq as w,ar as re,as as z}from"./index-Ga9tZhFZ.js";import{m as le}from"./chunk-4BX2VUAB-BI1eieHX-BcH4s9g3.js";import{j as se}from"./treemap-KMMF4GRG-D_CgoaQq-1cg8_rRW.js";import{h as B}from"./arc-C_KK8p3_-DPqj8zOp.js";import"./min-rCpHWDFS-Bpi4dGNR.js";import"./_baseUniq-D5Eo-o17-Dkf2eEoL.js";function oe(e,a){return a<e?-1:a>e?1:a>=e?0:NaN}function ce(e){return e}function ue(){var e=ce,a=oe,g=null,s=w(0),o=w(z),y=w(0);function l(t){var i,c=(t=re(t)).length,d,v,x=0,u=new Array(c),r=new Array(c),h=+s.apply(this,arguments),S=Math.min(z,Math.max(-z,o.apply(this,arguments)-h)),m,C=Math.min(Math.abs(S)/c,y.apply(this,arguments)),D=C*(S<0?-1:1),f;for(i=0;i<c;++i)(f=r[u[i]=i]=+e(t[i],i,t))>0&&(x+=f);for(a!=null?u.sort(function($,A){return a(r[$],r[A])}):g!=null&&u.sort(function($,A){return g(t[$],t[A])}),i=0,v=x?(S-c*D)/x:0;i<c;++i,h=m)d=u[i],f=r[d],m=h+(f>0?f*v:0)+D,r[d]={data:t[d],index:i,value:f,startAngle:h,endAngle:m,padAngle:C};return r}return l.value=function(t){return arguments.length?(e=typeof t=="function"?t:w(+t),l):e},l.sortValues=function(t){return arguments.length?(a=t,g=null,l):a},l.sort=function(t){return arguments.length?(g=t,a=null,l):g},l.startAngle=function(t){return arguments.length?(s=typeof t=="function"?t:w(+t),l):s},l.endAngle=function(t){return arguments.length?(o=typeof t=="function"?t:w(+t),l):o},l.padAngle=function(t){return arguments.length?(y=typeof t=="function"?t:w(+t),l):y},l}var pe=ie.pie,N={sections:new Map,showData:!1},b=N.sections,R=N.showData,de=structuredClone(pe),fe=p(()=>structuredClone(de),"getConfig"),ge=p(()=>{b=new Map,R=N.showData,ne()},"clear"),he=p(({label:e,value:a})=>{if(a<0)throw new Error(`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);b.has(e)||(b.set(e,a),W.debug(`added new section: ${e}, with value: ${a}`))},"addSection"),me=p(()=>b,"getSections"),xe=p(e=>{R=e},"setShowData"),we=p(()=>R,"getShowData"),J={getConfig:fe,clear:ge,setDiagramTitle:Q,getDiagramTitle:I,setAccTitle:_,getAccTitle:U,setAccDescription:q,getAccDescription:K,addSection:he,getSections:me,setShowData:xe,getShowData:we},ye=p((e,a)=>{le(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),ve={parse:p(async e=>{const a=await se("pie",e);W.debug(a),ye(a,J)},"parse")},Se=p(e=>`
|
|
2
|
+
.pieCircle{
|
|
3
|
+
stroke: ${e.pieStrokeColor};
|
|
4
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
5
|
+
opacity : ${e.pieOpacity};
|
|
6
|
+
}
|
|
7
|
+
.pieOuterCircle{
|
|
8
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
9
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
10
|
+
fill: none;
|
|
11
|
+
}
|
|
12
|
+
.pieTitleText {
|
|
13
|
+
text-anchor: middle;
|
|
14
|
+
font-size: ${e.pieTitleTextSize};
|
|
15
|
+
fill: ${e.pieTitleTextColor};
|
|
16
|
+
font-family: ${e.fontFamily};
|
|
17
|
+
}
|
|
18
|
+
.slice {
|
|
19
|
+
font-family: ${e.fontFamily};
|
|
20
|
+
fill: ${e.pieSectionTextColor};
|
|
21
|
+
font-size:${e.pieSectionTextSize};
|
|
22
|
+
// fill: white;
|
|
23
|
+
}
|
|
24
|
+
.legend text {
|
|
25
|
+
fill: ${e.pieLegendTextColor};
|
|
26
|
+
font-family: ${e.fontFamily};
|
|
27
|
+
font-size: ${e.pieLegendTextSize};
|
|
28
|
+
}
|
|
29
|
+
`,"getStyles"),$e=Se,Ae=p(e=>{const a=[...e.values()].reduce((s,o)=>s+o,0),g=[...e.entries()].map(([s,o])=>({label:s,value:o})).filter(s=>s.value/a*100>=1).sort((s,o)=>o.value-s.value);return ue().value(s=>s.value)(g)},"createPieArcs"),Ce=p((e,a,g,s)=>{W.debug(`rendering pie chart
|
|
30
|
+
`+e);const o=s.db,y=X(),l=Y(o.getConfig(),y.pie),t=40,i=18,c=4,d=450,v=d,x=Z(a),u=x.append("g");u.attr("transform","translate("+v/2+","+d/2+")");const{themeVariables:r}=y;let[h]=ee(r.pieOuterStrokeWidth);h??(h=2);const S=l.textPosition,m=Math.min(v,d)/2-t,C=B().innerRadius(0).outerRadius(m),D=B().innerRadius(m*S).outerRadius(m*S);u.append("circle").attr("cx",0).attr("cy",0).attr("r",m+h/2).attr("class","pieOuterCircle");const f=o.getSections(),$=Ae(f),A=[r.pie1,r.pie2,r.pie3,r.pie4,r.pie5,r.pie6,r.pie7,r.pie8,r.pie9,r.pie10,r.pie11,r.pie12];let T=0;f.forEach(n=>{T+=n});const F=$.filter(n=>(n.data.value/T*100).toFixed(0)!=="0"),k=te(A);u.selectAll("mySlices").data(F).enter().append("path").attr("d",C).attr("fill",n=>k(n.data.label)).attr("class","pieCircle"),u.selectAll("mySlices").data(F).enter().append("text").text(n=>(n.data.value/T*100).toFixed(0)+"%").attr("transform",n=>"translate("+D.centroid(n)+")").style("text-anchor","middle").attr("class","slice"),u.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const P=[...f.entries()].map(([n,O])=>({label:n,value:O})),M=u.selectAll(".legend").data(P).enter().append("g").attr("class","legend").attr("transform",(n,O)=>{const j=i+c,V=j*P.length/2,G=12*i,H=O*j-V;return"translate("+G+","+H+")"});M.append("rect").attr("width",i).attr("height",i).style("fill",n=>k(n.label)).style("stroke",n=>k(n.label)),M.append("text").attr("x",i+c).attr("y",i-c).text(n=>o.getShowData()?`${n.label} [${n.value}]`:n.label);const L=Math.max(...M.selectAll("text").nodes().map(n=>(n==null?void 0:n.getBoundingClientRect().width)??0)),E=v+t+i+c+L;x.attr("viewBox",`0 0 ${E} ${d}`),ae(x,d,E,l.useMaxWidth)},"draw"),De={draw:Ce},We={parser:ve,db:J,renderer:De,styles:$e};export{We as diagram};
|