@wandox/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -0
- package/dist/arc-BJMRTG9S.cjs +1 -0
- package/dist/arc-Vdco0qfw.js +83 -0
- package/dist/architectureDiagram-3BPJPVTR-BjEqcvey.js +4695 -0
- package/dist/architectureDiagram-3BPJPVTR-BvjJfAkh.cjs +36 -0
- package/dist/blockDiagram-GPEHLZMM-B1xf7RE9.js +2427 -0
- package/dist/blockDiagram-GPEHLZMM-B5VqovGY.cjs +132 -0
- package/dist/c4Diagram-AAUBKEIU-C4kjMRea.js +1578 -0
- package/dist/c4Diagram-AAUBKEIU-Ck5uEnJI.cjs +10 -0
- package/dist/channel-DlRtLuYv.js +5 -0
- package/dist/channel-Dm_yrRYJ.cjs +1 -0
- package/dist/chunk-2J33WTMH-CG2n_n4y.cjs +1 -0
- package/dist/chunk-2J33WTMH-CWvmGb4H.js +20 -0
- package/dist/chunk-4BX2VUAB-Bq3GzsD8.js +9 -0
- package/dist/chunk-4BX2VUAB-CdMctZeT.cjs +1 -0
- package/dist/chunk-55IACEB6-BdJhzL0d.js +8 -0
- package/dist/chunk-55IACEB6-sHyHtvg8.cjs +1 -0
- package/dist/chunk-727SXJPM-D-Vmam30.cjs +206 -0
- package/dist/chunk-727SXJPM-DmruCqjM.js +1529 -0
- package/dist/chunk-AQP2D5EJ-CWhKjcV3.cjs +231 -0
- package/dist/chunk-AQP2D5EJ-Ca0ak6w7.js +1399 -0
- package/dist/chunk-FMBD7UC4-CqV0NWQQ.js +19 -0
- package/dist/chunk-FMBD7UC4-DOxtd0OO.cjs +15 -0
- package/dist/chunk-ND2GUHAM-6EMX5Mu8.js +68 -0
- package/dist/chunk-ND2GUHAM-BXeDBtSC.cjs +1 -0
- package/dist/chunk-QZHKN3VN-B7FSI55w.js +15 -0
- package/dist/chunk-QZHKN3VN-CbbdNKnD.cjs +1 -0
- package/dist/classDiagram-4FO5ZUOK-0Kaf7WfA.js +16 -0
- package/dist/classDiagram-4FO5ZUOK-C4it2xBI.cjs +1 -0
- package/dist/classDiagram-v2-Q7XG4LA2-Byom5adL.js +16 -0
- package/dist/classDiagram-v2-Q7XG4LA2-C4it2xBI.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-CuUv9oIm.js +2606 -0
- package/dist/cose-bilkent-S5V4N54A-Dh6nTopA.cjs +1 -0
- package/dist/cytoscape.esm-Cp8cXbK2.js +18729 -0
- package/dist/cytoscape.esm-fcqEUasK.cjs +331 -0
- package/dist/dagre-BM42HDAG-CwxJjZ2n.cjs +4 -0
- package/dist/dagre-BM42HDAG-DMBidMxP.js +448 -0
- package/dist/defaultLocale-BDVPUiG2.js +171 -0
- package/dist/defaultLocale-k2G_58r6.cjs +1 -0
- package/dist/diagram-2AECGRRQ-B2a4nXgJ.js +221 -0
- package/dist/diagram-2AECGRRQ-r7De7taS.cjs +43 -0
- package/dist/diagram-5GNKFQAL-CDiO79WC.cjs +10 -0
- package/dist/diagram-5GNKFQAL-DrHBNZzF.js +123 -0
- package/dist/diagram-KO2AKTUF-BcjWCXZr.js +466 -0
- package/dist/diagram-KO2AKTUF-CDlJCxVO.cjs +3 -0
- package/dist/diagram-LMA3HP47-BXFSAyNV.cjs +24 -0
- package/dist/diagram-LMA3HP47-DJxmyqn0.js +143 -0
- package/dist/diagram-OG6HWLK6-ATK__ca8.js +531 -0
- package/dist/diagram-OG6HWLK6-CgIyEO8_.cjs +24 -0
- package/dist/erDiagram-TEJ5UH35-D4baWNzQ.js +900 -0
- package/dist/erDiagram-TEJ5UH35-Dyuc5EB6.cjs +85 -0
- package/dist/flowDiagram-I6XJVG4X-BMZOncyU.js +1635 -0
- package/dist/flowDiagram-I6XJVG4X-C45fICr4.cjs +162 -0
- package/dist/ganttDiagram-6RSMTGT7-CiYZmmke.js +2526 -0
- package/dist/ganttDiagram-6RSMTGT7-Cxoj6IK8.cjs +292 -0
- package/dist/gitGraphDiagram-PVQCEYII-CQ9bNuwN.js +828 -0
- package/dist/gitGraphDiagram-PVQCEYII-rlaY9dfj.cjs +106 -0
- package/dist/graph-CBizzZ7K.js +1545 -0
- package/dist/graph-V5BNIbHU.cjs +1 -0
- package/dist/index-jBRold1l.js +173159 -0
- package/dist/index-sFrjovbM.cjs +804 -0
- package/dist/index.d.ts +54 -0
- package/dist/infoDiagram-5YYISTIA-CAzYIvUX.js +24 -0
- package/dist/infoDiagram-5YYISTIA-zX5rQglQ.cjs +2 -0
- package/dist/init-CHZsXQcr.cjs +1 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/ishikawaDiagram-YF4QCWOH-09prKBsn.cjs +70 -0
- package/dist/ishikawaDiagram-YF4QCWOH-Co8BnN24.js +622 -0
- package/dist/journeyDiagram-JHISSGLW-DkdWRF_-.cjs +139 -0
- package/dist/journeyDiagram-JHISSGLW-riCLiMCC.js +836 -0
- package/dist/kanban-definition-UN3LZRKU-DWipOCsx.cjs +89 -0
- package/dist/kanban-definition-UN3LZRKU-SRyCSn2H.js +725 -0
- package/dist/katex-Cf_UVKIT.cjs +257 -0
- package/dist/katex-RNjvZ8pg.js +11681 -0
- package/dist/layout-CbksXFOD.js +1728 -0
- package/dist/layout-Dh52gsIJ.cjs +1 -0
- package/dist/linear-C3xSMJV8.cjs +1 -0
- package/dist/linear-CmUCzX9U.js +259 -0
- package/dist/mermaid.core-BzNKr-OJ.cjs +308 -0
- package/dist/mermaid.core-CdBIz6FY.js +15475 -0
- package/dist/mindmap-definition-RKZ34NQL-Cs63oyIX.cjs +96 -0
- package/dist/mindmap-definition-RKZ34NQL-Gcma5iTd.js +830 -0
- package/dist/ordinal-CagbB1m8.cjs +1 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/pieDiagram-4H26LBE5-CBGkD8dp.cjs +30 -0
- package/dist/pieDiagram-4H26LBE5-DSL8cVK1.js +164 -0
- package/dist/quadrantDiagram-W4KKPZXB-D3nCWRjF.cjs +7 -0
- package/dist/quadrantDiagram-W4KKPZXB-uod6bhUy.js +1026 -0
- package/dist/requirementDiagram-4Y6WPE33-Bc_6y7SM.js +884 -0
- package/dist/requirementDiagram-4Y6WPE33-D2mHlh5i.cjs +84 -0
- package/dist/sankeyDiagram-5OEKKPKP-DL_kXejW.cjs +40 -0
- package/dist/sankeyDiagram-5OEKKPKP-DMsjY4G4.js +847 -0
- package/dist/sequenceDiagram-3UESZ5HK-CBGalGOV.cjs +162 -0
- package/dist/sequenceDiagram-3UESZ5HK-CH2Z-Pis.js +2901 -0
- package/dist/stateDiagram-AJRCARHV-gEqlAI6t.js +263 -0
- package/dist/stateDiagram-AJRCARHV-rNMrAI-A.cjs +1 -0
- package/dist/stateDiagram-v2-BHNVJYJU-CDj7L1wi.js +16 -0
- package/dist/stateDiagram-v2-BHNVJYJU-LLlFJ1GM.cjs +1 -0
- package/dist/timeline-definition-PNZ67QCA-Bbuv3uu-.cjs +120 -0
- package/dist/timeline-definition-PNZ67QCA-DrGFbQdC.js +1068 -0
- package/dist/types.d.ts +295 -0
- package/dist/vennDiagram-CIIHVFJN-CGcAwVxU.js +1564 -0
- package/dist/vennDiagram-CIIHVFJN-DsSjXluJ.cjs +34 -0
- package/dist/wandox.cjs +1 -0
- package/dist/wandox.css +1 -0
- package/dist/wandox.js +6 -0
- package/dist/wandox.umd.js +4172 -0
- package/dist/wardley-L42UT6IY-DUnkyH_z.js +22539 -0
- package/dist/wardley-L42UT6IY-tDp0NbFW.cjs +165 -0
- package/dist/wardleyDiagram-YWT4CUSO-CB_Qa4lR.js +684 -0
- package/dist/wardleyDiagram-YWT4CUSO-D0BUmvVW.cjs +78 -0
- package/dist/xychartDiagram-2RQKCTM6-Bcq-ACuw.js +1342 -0
- package/dist/xychartDiagram-2RQKCTM6-BjeAPKLo.cjs +7 -0
- package/package.json +42 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
"use strict";const qt=require("./chunk-55IACEB6-sHyHtvg8.cjs"),Qt=require("./chunk-2J33WTMH-CG2n_n4y.cjs"),s=require("./mermaid.core-BzNKr-OJ.cjs");var bt=function(){var t=s.__name(function(V,l,u,o){for(u=u||{},o=V.length;o--;u[V[o]]=l);return u},"o"),e=[1,2],i=[1,3],n=[1,4],a=[2,4],c=[1,9],d=[1,11],p=[1,16],S=[1,17],y=[1,18],m=[1,19],E=[1,33],x=[1,20],k=[1,21],L=[1,22],N=[1,23],v=[1,24],f=[1,26],D=[1,27],w=[1,28],P=[1,29],O=[1,30],G=[1,31],$=[1,32],st=[1,35],it=[1,36],rt=[1,37],at=[1,38],H=[1,34],_=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],nt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],vt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],pt={trace:s.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:s.__name(function(l,u,o,g,T,r,B){var h=r.length-1;switch(T){case 3:return g.setRootDoc(r[h]),r[h];case 4:this.$=[];break;case 5:r[h]!="nl"&&(r[h-1].push(r[h]),this.$=r[h-1]);break;case 6:case 7:this.$=r[h];break;case 8:this.$="nl";break;case 12:this.$=r[h];break;case 13:const q=r[h-1];q.description=g.trimColon(r[h]),this.$=q;break;case 14:this.$={stmt:"relation",state1:r[h-2],state2:r[h]};break;case 15:const St=g.trimColon(r[h]);this.$={stmt:"relation",state1:r[h-3],state2:r[h-1],description:St};break;case 19:this.$={stmt:"state",id:r[h-3],type:"default",description:"",doc:r[h-1]};break;case 20:var F=r[h],z=r[h-2].trim();if(r[h].match(":")){var lt=r[h].split(":");F=lt[0],z=[z,lt[1]]}this.$={stmt:"state",id:F,type:"default",description:z};break;case 21:this.$={stmt:"state",id:r[h-3],type:"default",description:r[h-5],doc:r[h-1]};break;case 22:this.$={stmt:"state",id:r[h],type:"fork"};break;case 23:this.$={stmt:"state",id:r[h],type:"join"};break;case 24:this.$={stmt:"state",id:r[h],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[h-1].trim(),note:{position:r[h-2].trim(),text:r[h].trim()}};break;case 29:this.$=r[h].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=r[h].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[h-3],url:r[h-2],tooltip:r[h-1]};break;case 33:this.$={stmt:"click",id:r[h-3],url:r[h-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[h-1].trim(),classes:r[h].trim()};break;case 36:this.$={stmt:"style",id:r[h-1].trim(),styleClass:r[h].trim()};break;case 37:this.$={stmt:"applyClass",id:r[h-1].trim(),styleClass:r[h].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[h].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[h-2].trim(),classes:[r[h].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[h-2].trim(),classes:[r[h].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:i,6:n},{1:[3]},{3:5,4:e,5:i,6:n},{3:6,4:e,5:i,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:d,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:S,19:y,22:m,24:E,25:x,26:k,27:L,28:N,29:v,32:25,33:f,35:D,37:w,38:P,41:O,45:G,48:$,51:st,52:it,53:rt,54:at,57:H},t(_,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:p,17:S,19:y,22:m,24:E,25:x,26:k,27:L,28:N,29:v,32:25,33:f,35:D,37:w,38:P,41:O,45:G,48:$,51:st,52:it,53:rt,54:at,57:H},t(_,[2,7]),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(_,[2,11]),t(_,[2,12],{14:[1,40],15:[1,41]}),t(_,[2,16]),{18:[1,42]},t(_,[2,18],{20:[1,43]}),{23:[1,44]},t(_,[2,22]),t(_,[2,23]),t(_,[2,24]),t(_,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(_,[2,28]),{34:[1,49]},{36:[1,50]},t(_,[2,31]),{13:51,24:E,57:H},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(nt,[2,44],{58:[1,56]}),t(nt,[2,45],{58:[1,57]}),t(_,[2,38]),t(_,[2,39]),t(_,[2,40]),t(_,[2,41]),t(_,[2,6]),t(_,[2,13]),{13:58,24:E,57:H},t(_,[2,17]),t(vt,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(_,[2,29]),t(_,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(_,[2,14],{14:[1,71]}),{4:c,5:d,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:S,19:y,21:[1,72],22:m,24:E,25:x,26:k,27:L,28:N,29:v,32:25,33:f,35:D,37:w,38:P,41:O,45:G,48:$,51:st,52:it,53:rt,54:at,57:H},t(_,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(_,[2,34]),t(_,[2,35]),t(_,[2,36]),t(_,[2,37]),t(nt,[2,46]),t(nt,[2,47]),t(_,[2,15]),t(_,[2,19]),t(vt,a,{7:78}),t(_,[2,26]),t(_,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:d,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:S,19:y,21:[1,81],22:m,24:E,25:x,26:k,27:L,28:N,29:v,32:25,33:f,35:D,37:w,38:P,41:O,45:G,48:$,51:st,52:it,53:rt,54:at,57:H},t(_,[2,32]),t(_,[2,33]),t(_,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:s.__name(function(l,u){if(u.recoverable)this.trace(l);else{var o=new Error(l);throw o.hash=u,o}},"parseError"),parse:s.__name(function(l){var u=this,o=[0],g=[],T=[null],r=[],B=this.table,h="",F=0,z=0,lt=2,q=1,St=r.slice.call(arguments,1),b=Object.create(this.lexer),W={yy:{}};for(var _t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_t)&&(W.yy[_t]=this.yy[_t]);b.setInput(l,W.yy),W.yy.lexer=b,W.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var gt=b.yylloc;r.push(gt);var Xt=b.options&&b.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Jt(I){o.length=o.length-2*I,T.length=T.length-I,r.length=r.length-I}s.__name(Jt,"popStack");function Ct(){var I;return I=g.pop()||b.lex()||q,typeof I!="number"&&(I instanceof Array&&(g=I,I=g.pop()),I=u.symbols_[I]||I),I}s.__name(Ct,"lex");for(var A,U,R,yt,K={},ct,Y,At,ht;;){if(U=o[o.length-1],this.defaultActions[U]?R=this.defaultActions[U]:((A===null||typeof A>"u")&&(A=Ct()),R=B[U]&&B[U][A]),typeof R>"u"||!R.length||!R[0]){var mt="";ht=[];for(ct in B[U])this.terminals_[ct]&&ct>lt&&ht.push("'"+this.terminals_[ct]+"'");b.showPosition?mt="Parse error on line "+(F+1)+`:
|
|
2
|
+
`+b.showPosition()+`
|
|
3
|
+
Expecting `+ht.join(", ")+", got '"+(this.terminals_[A]||A)+"'":mt="Parse error on line "+(F+1)+": Unexpected "+(A==q?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(mt,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:gt,expected:ht})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+A);switch(R[0]){case 1:o.push(A),T.push(b.yytext),r.push(b.yylloc),o.push(R[1]),A=null,z=b.yyleng,h=b.yytext,F=b.yylineno,gt=b.yylloc;break;case 2:if(Y=this.productions_[R[1]][1],K.$=T[T.length-Y],K._$={first_line:r[r.length-(Y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(Y||1)].first_column,last_column:r[r.length-1].last_column},Xt&&(K._$.range=[r[r.length-(Y||1)].range[0],r[r.length-1].range[1]]),yt=this.performAction.apply(K,[h,z,F,W.yy,R[1],T,r].concat(St)),typeof yt<"u")return yt;Y&&(o=o.slice(0,-1*Y*2),T=T.slice(0,-1*Y),r=r.slice(0,-1*Y)),o.push(this.productions_[R[1]][0]),T.push(K.$),r.push(K._$),At=B[o[o.length-2]][o[o.length-1]],o.push(At);break;case 3:return!0}}return!0},"parse")},Kt=function(){var V={EOF:1,parseError:s.__name(function(u,o){if(this.yy.parser)this.yy.parser.parseError(u,o);else throw new Error(u)},"parseError"),setInput:s.__name(function(l,u){return this.yy=u||this.yy||{},this._input=l,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.__name(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var u=l.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:s.__name(function(l){var u=l.length,o=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var g=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 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:o?(o.length===g.length?this.yylloc.first_column:0)+g[g.length-o.length].length-o[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:s.__name(function(){return this._more=!0,this},"more"),reject:s.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s.__name(function(l){this.unput(this.match.slice(l))},"less"),pastInput:s.__name(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s.__name(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s.__name(function(){var l=this.pastInput(),u=new Array(l.length+1).join("-");return l+this.upcomingInput()+`
|
|
5
|
+
`+u+"^"},"showPosition"),test_match:s.__name(function(l,u){var o,g,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))),g=l[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,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(l[0].length),this.matched+=l[0],o=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var r in T)this[r]=T[r];return!1}return!1},"test_match"),next:s.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,u,o,g;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),r=0;r<T.length;r++)if(o=this._input.match(this.rules[T[r]]),o&&(!u||o[0].length>u[0].length)){if(u=o,g=r,this.options.backtrack_lexer){if(l=this.test_match(o,T[r]),l!==!1)return l;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(l=this.test_match(u,T[g]),l!==!1?l:!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.__name(function(){var u=this.next();return u||this.lex()},"lex"),begin:s.__name(function(u){this.conditionStack.push(u)},"begin"),popState:s.__name(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s.__name(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.__name(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:s.__name(function(u){this.begin(u)},"pushState"),stateStackSize:s.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s.__name(function(u,o,g,T){function r(){const B=o.yytext.indexOf("%%");if(B===0)return!1;if(B>0){const h=o.yytext.slice(0,B),F=o.yytext.slice(B);F&&u.lexer.unput(F),o.yytext=h}return!0}switch(s.__name(r,"processId"),g){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 33:return this.pushState("SCALE"),17;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),o.yytext=o.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),o.yytext=o.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),o.yytext=o.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),o.yytext=o.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),o.yytext=o.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),o.yytext=o.yytext.slice(0,-10).trim(),27;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:return r()?(this.popState(),"ID"):void 0;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:return 19;case 53:this.popState();break;case 54:return this.popState(),this.pushState("struct"),20;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),59;case 59:return this.popState(),this.pushState("NOTE_ID"),60;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return r()?(this.popState(),"ID"):void 0;case 65:return r()?(this.popState(),this.pushState("NOTE_TEXT"),24):void 0;case 66:return this.popState(),o.yytext=o.yytext.substr(2).trim(),31;case 67:return this.popState(),o.yytext=o.yytext.slice(0,-8).trim(),31;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 57;case 72:return r()?24:void 0;case 73:return o.yytext=o.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 58;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,55,56,57,71,72,73,74,75,76],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,54,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return V}();pt.lexer=Kt;function ot(){this.yy={}}return s.__name(ot,"Parser"),ot.prototype=pt,pt.Parser=ot,new ot}();bt.parser=bt;var Zt=bt,te="TB",$t="TB",xt="dir",J="state",X="root",Dt="relation",ee="classDef",se="style",ie="applyClass",tt="default",Pt="divider",Bt="fill:none",Ft="fill: #333",Gt="c",Yt="markdown",Vt="normal",Tt="rect",Et="rectWithTitle",re="stateStart",ae="stateEnd",Lt="divider",It="roundedWithTitle",ne="note",oe="noteGroup",et="statediagram",le="state",ce=`${et}-${le}`,Mt="transition",he="note",ue="note-edge",de=`${Mt} ${ue}`,fe=`${et}-${he}`,pe="cluster",Se=`${et}-${pe}`,_e="cluster-alt",ge=`${et}-${_e}`,Wt="parent",Ut="note",ye="state",kt="----",me=`${kt}${Ut}`,Ot=`${kt}${Wt}`,jt=s.__name((t,e=$t)=>{if(!t.doc)return e;let i=e;for(const n of t.doc)n.stmt==="dir"&&(i=n.value);return i},"getDir"),Te=s.__name(function(t,e){return e.db.getClasses()},"getClasses"),Ee=s.__name(async function(t,e,i,n){s.log.info("REF0:"),s.log.info("Drawing state diagram (v2)",e);const{securityLevel:a,state:c,layout:d}=s.getConfig2();n.db.extract(n.db.getRootDocV2());const p=n.db.getData(),S=qt.getDiagramElement(e,a);p.type=n.type,p.layoutAlgorithm=d,p.nodeSpacing=(c==null?void 0:c.nodeSpacing)||50,p.rankSpacing=(c==null?void 0:c.rankSpacing)||50,s.getConfig2().look==="neo"?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await s.render(p,S);const m=8;try{(typeof n.db.getLinks=="function"?n.db.getLinks():new Map).forEach((x,k)=>{var P;const L=typeof k=="string"?k:typeof(k==null?void 0:k.id)=="string"?k.id:"";if(!L){s.log.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(k));return}const N=(P=S.node())==null?void 0:P.querySelectorAll("g");let v;if(N==null||N.forEach(O=>{var $;(($=O.textContent)==null?void 0:$.trim())===L&&(v=O)}),!v){s.log.warn("⚠️ Could not find node matching text:",L);return}const f=v.parentNode;if(!f){s.log.warn("⚠️ Node has no parent, cannot wrap:",L);return}const D=document.createElementNS("http://www.w3.org/2000/svg","a"),w=x.url.replace(/^"+|"+$/g,"");if(D.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",w),D.setAttribute("target","_blank"),x.tooltip){const O=x.tooltip.replace(/^"+|"+$/g,"");D.setAttribute("title",O)}f.replaceChild(D,v),D.appendChild(v),s.log.info("🔗 Wrapped node in <a> tag for:",L,x.url)})}catch(E){s.log.error("❌ Error injecting clickable links:",E)}s.utils_default.insertTitle(S,"statediagramTitleText",(c==null?void 0:c.titleTopMargin)??25,n.db.getDiagramTitle()),Qt.setupViewPortForSVG(S,m,et,(c==null?void 0:c.useMaxWidth)??!0)},"draw"),be={getClasses:Te,draw:Ee,getDir:jt},dt=new Map,M=0;function ft(t="",e=0,i="",n=kt){const a=i!==null&&i.length>0?`${n}${i}`:"";return`${ye}-${t}${a}-${e}`}s.__name(ft,"stateDomId");var De=s.__name((t,e,i,n,a,c,d,p)=>{s.log.trace("items",e),e.forEach(S=>{switch(S.stmt){case J:Z(t,S,i,n,a,c,d,p);break;case tt:Z(t,S,i,n,a,c,d,p);break;case Dt:{Z(t,S.state1,i,n,a,c,d,p),Z(t,S.state2,i,n,a,c,d,p);const y=d==="neo",m={id:"edge"+M,start:S.state1.id,end:S.state2.id,arrowhead:"normal",arrowTypeEnd:y?"arrow_barb_neo":"arrow_barb",style:Bt,labelStyle:"",label:s.common_default.sanitizeText(S.description??"",s.getConfig2()),arrowheadStyle:Ft,labelpos:Gt,labelType:Yt,thickness:Vt,classes:Mt,look:d};a.push(m),M++}break}})},"setupDoc"),Rt=s.__name((t,e=$t)=>{let i=e;if(t.doc)for(const n of t.doc)n.stmt==="dir"&&(i=n.value);return i},"getDir");function Q(t,e,i){if(!e.id||e.id==="</join></fork>"||e.id==="</choice>")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(a=>{const c=i.get(a);c&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...c.styles])}));const n=t.find(a=>a.id===e.id);n?Object.assign(n,e):t.push(e)}s.__name(Q,"insertOrUpdateNode");function Ht(t){var e;return((e=t==null?void 0:t.classes)==null?void 0:e.join(" "))??""}s.__name(Ht,"getClassesFromDbInfo");function zt(t){return(t==null?void 0:t.styles)??[]}s.__name(zt,"getStylesFromDbInfo");var Z=s.__name((t,e,i,n,a,c,d,p)=>{var k,L,N;const S=e.id,y=i.get(S),m=Ht(y),E=zt(y),x=s.getConfig2();if(s.log.info("dataFetcher parsedItem",e,y,E),S!=="root"){let v=Tt;e.start===!0?v=re:e.start===!1&&(v=ae),e.type!==tt&&(v=e.type),dt.get(S)||dt.set(S,{id:S,shape:v,description:s.common_default.sanitizeText(S,x),cssClasses:`${m} ${ce}`,cssStyles:E});const f=dt.get(S);e.description&&(Array.isArray(f.description)?(f.shape=Et,f.description.push(e.description)):(k=f.description)!=null&&k.length&&f.description.length>0?(f.shape=Et,f.description===S?f.description=[e.description]:f.description=[f.description,e.description]):(f.shape=Tt,f.description=e.description),f.description=s.common_default.sanitizeTextOrArray(f.description,x)),((L=f.description)==null?void 0:L.length)===1&&f.shape===Et&&(f.type==="group"?f.shape=It:f.shape=Tt),!f.type&&e.doc&&(s.log.info("Setting cluster for XCX",S,Rt(e)),f.type="group",f.isGroup=!0,f.dir=Rt(e),f.shape=e.type===Pt?Lt:It,f.cssClasses=`${f.cssClasses} ${Se} ${c?ge:""}`);const D={labelStyle:"",shape:f.shape,label:f.description,cssClasses:f.cssClasses,cssCompiledStyles:[],cssStyles:f.cssStyles,id:S,dir:f.dir,domId:ft(S,M),type:f.type,isGroup:f.type==="group",padding:8,rx:10,ry:10,look:d,labelType:"markdown"};if(D.shape===Lt&&(D.label=""),t&&t.id!=="root"&&(s.log.trace("Setting node ",S," to be child of its parent ",t.id),D.parentId=t.id),D.centerLabel=!0,e.note){const w={labelStyle:"",shape:ne,label:e.note.text,labelType:"markdown",cssClasses:fe,cssStyles:[],cssCompiledStyles:[],id:S+me+"-"+M,domId:ft(S,M,Ut),type:f.type,isGroup:f.type==="group",padding:(N=x.flowchart)==null?void 0:N.padding,look:d,position:e.note.position},P=S+Ot,O={labelStyle:"",shape:oe,label:e.note.text,cssClasses:f.cssClasses,cssStyles:[],id:S+Ot,domId:ft(S,M,Wt),type:"group",isGroup:!0,padding:16,look:d,position:e.note.position};M++,O.id=P,w.parentId=P,Q(n,O,p),Q(n,w,p),Q(n,D,p);let G=S,$=w.id;e.note.position==="left of"&&(G=w.id,$=S),a.push({id:G+"-"+$,start:G,end:$,arrowhead:"none",arrowTypeEnd:"",style:Bt,labelStyle:"",classes:de,arrowheadStyle:Ft,labelpos:Gt,labelType:Yt,thickness:Vt,look:d})}else Q(n,D,p)}e.doc&&(s.log.trace("Adding nodes children "),De(e,e.doc,i,n,a,!c,d,p))},"dataFetcher"),ke=s.__name(()=>{dt.clear(),M=0},"reset"),C={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Nt=s.__name(()=>new Map,"newClassesList"),wt=s.__name(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),ut=s.__name(t=>JSON.parse(JSON.stringify(t)),"clone"),j,ve=(j=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Nt(),this.documents={root:wt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=s.getAccTitle,this.setAccTitle=s.setAccTitle,this.getAccDescription=s.getAccDescription,this.setAccDescription=s.setAccDescription,this.setDiagramTitle=s.setDiagramTitle,this.getDiagramTitle=s.getDiagramTitle,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}extract(e){this.clear(!0);for(const a of Array.isArray(e)?e:e.doc)switch(a.stmt){case J:this.addState(a.id.trim(),a.type,a.doc,a.description,a.note);break;case Dt:this.addRelation(a.state1,a.state2,a.description);break;case ee:this.addStyleClass(a.id.trim(),a.classes);break;case se:this.handleStyleDef(a);break;case ie:this.setCssClass(a.id.trim(),a.styleClass);break;case"click":this.addLink(a.id,a.url,a.tooltip);break}const i=this.getStates(),n=s.getConfig2();ke(),Z(void 0,this.getRootDocV2(),i,this.nodes,this.edges,!0,n.look,this.classes);for(const a of this.nodes)if(Array.isArray(a.label)){if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${a.id}]`);a.label=a.label[0]}}handleStyleDef(e){const i=e.id.trim().split(","),n=e.styleClass.split(",");for(const a of i){let c=this.getState(a);if(!c){const d=a.trim();this.addState(d),c=this.getState(d)}c&&(c.styles=n.map(d=>{var p;return(p=d.replace(/;/g,""))==null?void 0:p.trim()}))}}setRootDoc(e){s.log.info("Setting root doc",e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,i,n){if(i.stmt===Dt){this.docTranslator(e,i.state1,!0),this.docTranslator(e,i.state2,!1);return}if(i.stmt===J&&(i.id===C.START_NODE?(i.id=e.id+(n?"_start":"_end"),i.start=n):i.id=i.id.trim()),i.stmt!==X&&i.stmt!==J||!i.doc)return;const a=[];let c=[];for(const d of i.doc)if(d.type===Pt){const p=ut(d);p.doc=ut(c),a.push(p),c=[]}else c.push(d);if(a.length>0&&c.length>0){const d={stmt:J,id:s.generateId(),type:"divider",doc:ut(c)};a.push(ut(d)),i.doc=a}i.doc.forEach(d=>this.docTranslator(i,d,!0))}getRootDocV2(){return this.docTranslator({id:X,stmt:X},{id:X,stmt:X,doc:this.rootDoc},!0),{id:X,doc:this.rootDoc}}addState(e,i=tt,n=void 0,a=void 0,c=void 0,d=void 0,p=void 0,S=void 0){const y=e==null?void 0:e.trim();if(!this.currentDocument.states.has(y))s.log.info("Adding state ",y,a),this.currentDocument.states.set(y,{stmt:J,id:y,descriptions:[],type:i,doc:n,note:c,classes:[],styles:[],textStyles:[]});else{const m=this.currentDocument.states.get(y);if(!m)throw new Error(`State not found: ${y}`);m.doc||(m.doc=n),m.type||(m.type=i)}if(a&&(s.log.info("Setting state description",y,a),(Array.isArray(a)?a:[a]).forEach(E=>this.addDescription(y,E.trim()))),c){const m=this.currentDocument.states.get(y);if(!m)throw new Error(`State not found: ${y}`);m.note=c,m.note.text=s.common_default.sanitizeText(m.note.text,s.getConfig2())}d&&(s.log.info("Setting state classes",y,d),(Array.isArray(d)?d:[d]).forEach(E=>this.setCssClass(y,E.trim()))),p&&(s.log.info("Setting state styles",y,p),(Array.isArray(p)?p:[p]).forEach(E=>this.setStyle(y,E.trim()))),S&&(s.log.info("Setting state styles",y,p),(Array.isArray(S)?S:[S]).forEach(E=>this.setTextStyle(y,E.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:wt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Nt(),e||(this.links=new Map,s.clear())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){s.log.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,i,n){this.links.set(e,{url:i,tooltip:n}),s.log.warn("Adding link",e,i,n)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===C.START_NODE?(this.startEndCount++,`${C.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e="",i=tt){return e===C.START_NODE?C.START_TYPE:i}endIdIfNeeded(e=""){return e===C.END_NODE?(this.startEndCount++,`${C.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e="",i=tt){return e===C.END_NODE?C.END_TYPE:i}addRelationObjs(e,i,n=""){const a=this.startIdIfNeeded(e.id.trim()),c=this.startTypeIfNeeded(e.id.trim(),e.type),d=this.startIdIfNeeded(i.id.trim()),p=this.startTypeIfNeeded(i.id.trim(),i.type);this.addState(a,c,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(d,p,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles),this.currentDocument.relations.push({id1:a,id2:d,relationTitle:s.common_default.sanitizeText(n,s.getConfig2())})}addRelation(e,i,n){if(typeof e=="object"&&typeof i=="object")this.addRelationObjs(e,i,n);else if(typeof e=="string"&&typeof i=="string"){const a=this.startIdIfNeeded(e.trim()),c=this.startTypeIfNeeded(e),d=this.endIdIfNeeded(i.trim()),p=this.endTypeIfNeeded(i);this.addState(a,c),this.addState(d,p),this.currentDocument.relations.push({id1:a,id2:d,relationTitle:n?s.common_default.sanitizeText(n,s.getConfig2()):void 0})}}addDescription(e,i){var c;const n=this.currentDocument.states.get(e),a=i.startsWith(":")?i.replace(":","").trim():i;(c=n==null?void 0:n.descriptions)==null||c.push(s.common_default.sanitizeText(a,s.getConfig2()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,i=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});const n=this.classes.get(e);i&&n&&i.split(C.STYLECLASS_SEP).forEach(a=>{const c=a.replace(/([^;]*);/,"$1").trim();if(RegExp(C.COLOR_KEYWORD).exec(a)){const p=c.replace(C.FILL_KEYWORD,C.BG_FILL).replace(C.COLOR_KEYWORD,C.FILL_KEYWORD);n.textStyles.push(p)}n.styles.push(c)})}getClasses(){return this.classes}setCssClass(e,i){e.split(",").forEach(n=>{var c;let a=this.getState(n);if(!a){const d=n.trim();this.addState(d),a=this.getState(d)}(c=a==null?void 0:a.classes)==null||c.push(i)})}setStyle(e,i){var n,a;(a=(n=this.getState(e))==null?void 0:n.styles)==null||a.push(i)}setTextStyle(e,i){var n,a;(a=(n=this.getState(e))==null?void 0:n.textStyles)==null||a.push(i)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===xt)}getDirection(){var e;return((e=this.getDirectionStatement())==null?void 0:e.value)??te}setDirection(e){const i=this.getDirectionStatement();i?i.value=e:this.rootDoc.unshift({stmt:xt,value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){const e=s.getConfig2();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:jt(this.getRootDocV2())}}getConfig(){return s.getConfig2().state}},s.__name(j,"StateDB"),j.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},j),Ce=s.__name(t=>`
|
|
7
|
+
defs [id$="-barbEnd"] {
|
|
8
|
+
fill: ${t.transitionColor};
|
|
9
|
+
stroke: ${t.transitionColor};
|
|
10
|
+
}
|
|
11
|
+
g.stateGroup text {
|
|
12
|
+
fill: ${t.nodeBorder};
|
|
13
|
+
stroke: none;
|
|
14
|
+
font-size: 10px;
|
|
15
|
+
}
|
|
16
|
+
g.stateGroup text {
|
|
17
|
+
fill: ${t.textColor};
|
|
18
|
+
stroke: none;
|
|
19
|
+
font-size: 10px;
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
g.stateGroup .state-title {
|
|
23
|
+
font-weight: bolder;
|
|
24
|
+
fill: ${t.stateLabelColor};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
g.stateGroup rect {
|
|
28
|
+
fill: ${t.mainBkg};
|
|
29
|
+
stroke: ${t.nodeBorder};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
g.stateGroup line {
|
|
33
|
+
stroke: ${t.lineColor};
|
|
34
|
+
stroke-width: ${t.strokeWidth||1};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.transition {
|
|
38
|
+
stroke: ${t.transitionColor};
|
|
39
|
+
stroke-width: ${t.strokeWidth||1};
|
|
40
|
+
fill: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.stateGroup .composit {
|
|
44
|
+
fill: ${t.background};
|
|
45
|
+
border-bottom: 1px
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.stateGroup .alt-composit {
|
|
49
|
+
fill: #e0e0e0;
|
|
50
|
+
border-bottom: 1px
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.state-note {
|
|
54
|
+
stroke: ${t.noteBorderColor};
|
|
55
|
+
fill: ${t.noteBkgColor};
|
|
56
|
+
|
|
57
|
+
text {
|
|
58
|
+
fill: ${t.noteTextColor};
|
|
59
|
+
stroke: none;
|
|
60
|
+
font-size: 10px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.stateLabel .box {
|
|
65
|
+
stroke: none;
|
|
66
|
+
stroke-width: 0;
|
|
67
|
+
fill: ${t.mainBkg};
|
|
68
|
+
opacity: 0.5;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.edgeLabel .label rect {
|
|
72
|
+
fill: ${t.labelBackgroundColor};
|
|
73
|
+
opacity: 0.5;
|
|
74
|
+
}
|
|
75
|
+
.edgeLabel {
|
|
76
|
+
background-color: ${t.edgeLabelBackground};
|
|
77
|
+
p {
|
|
78
|
+
background-color: ${t.edgeLabelBackground};
|
|
79
|
+
}
|
|
80
|
+
rect {
|
|
81
|
+
opacity: 0.5;
|
|
82
|
+
background-color: ${t.edgeLabelBackground};
|
|
83
|
+
fill: ${t.edgeLabelBackground};
|
|
84
|
+
}
|
|
85
|
+
text-align: center;
|
|
86
|
+
}
|
|
87
|
+
.edgeLabel .label text {
|
|
88
|
+
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
89
|
+
}
|
|
90
|
+
.label div .edgeLabel {
|
|
91
|
+
color: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.stateLabel text {
|
|
95
|
+
fill: ${t.stateLabelColor};
|
|
96
|
+
font-size: 10px;
|
|
97
|
+
font-weight: bold;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.node circle.state-start {
|
|
101
|
+
fill: ${t.specialStateColor};
|
|
102
|
+
stroke: ${t.specialStateColor};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.node .fork-join {
|
|
106
|
+
fill: ${t.specialStateColor};
|
|
107
|
+
stroke: ${t.specialStateColor};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.node circle.state-end {
|
|
111
|
+
fill: ${t.innerEndBackground};
|
|
112
|
+
stroke: ${t.background};
|
|
113
|
+
stroke-width: 1.5
|
|
114
|
+
}
|
|
115
|
+
.end-state-inner {
|
|
116
|
+
fill: ${t.compositeBackground||t.background};
|
|
117
|
+
// stroke: ${t.background};
|
|
118
|
+
stroke-width: 1.5
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.node rect {
|
|
122
|
+
fill: ${t.stateBkg||t.mainBkg};
|
|
123
|
+
stroke: ${t.stateBorder||t.nodeBorder};
|
|
124
|
+
stroke-width: ${t.strokeWidth||1}px;
|
|
125
|
+
}
|
|
126
|
+
.node polygon {
|
|
127
|
+
fill: ${t.mainBkg};
|
|
128
|
+
stroke: ${t.stateBorder||t.nodeBorder};;
|
|
129
|
+
stroke-width: ${t.strokeWidth||1}px;
|
|
130
|
+
}
|
|
131
|
+
[id$="-barbEnd"] {
|
|
132
|
+
fill: ${t.lineColor};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.statediagram-cluster rect {
|
|
136
|
+
fill: ${t.compositeTitleBackground};
|
|
137
|
+
stroke: ${t.stateBorder||t.nodeBorder};
|
|
138
|
+
stroke-width: ${t.strokeWidth||1}px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.cluster-label, .nodeLabel {
|
|
142
|
+
color: ${t.stateLabelColor};
|
|
143
|
+
// line-height: 1;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.statediagram-cluster rect.outer {
|
|
147
|
+
rx: 5px;
|
|
148
|
+
ry: 5px;
|
|
149
|
+
}
|
|
150
|
+
.statediagram-state .divider {
|
|
151
|
+
stroke: ${t.stateBorder||t.nodeBorder};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.statediagram-state .title-state {
|
|
155
|
+
rx: 5px;
|
|
156
|
+
ry: 5px;
|
|
157
|
+
}
|
|
158
|
+
.statediagram-cluster.statediagram-cluster .inner {
|
|
159
|
+
fill: ${t.compositeBackground||t.background};
|
|
160
|
+
}
|
|
161
|
+
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
162
|
+
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.statediagram-cluster .inner {
|
|
166
|
+
rx:0;
|
|
167
|
+
ry:0;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.statediagram-state rect.basic {
|
|
171
|
+
rx: 5px;
|
|
172
|
+
ry: 5px;
|
|
173
|
+
}
|
|
174
|
+
.statediagram-state rect.divider {
|
|
175
|
+
stroke-dasharray: 10,10;
|
|
176
|
+
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.note-edge {
|
|
180
|
+
stroke-dasharray: 5;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.statediagram-note rect {
|
|
184
|
+
fill: ${t.noteBkgColor};
|
|
185
|
+
stroke: ${t.noteBorderColor};
|
|
186
|
+
stroke-width: 1px;
|
|
187
|
+
rx: 0;
|
|
188
|
+
ry: 0;
|
|
189
|
+
}
|
|
190
|
+
.statediagram-note rect {
|
|
191
|
+
fill: ${t.noteBkgColor};
|
|
192
|
+
stroke: ${t.noteBorderColor};
|
|
193
|
+
stroke-width: 1px;
|
|
194
|
+
rx: 0;
|
|
195
|
+
ry: 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.statediagram-note text {
|
|
199
|
+
fill: ${t.noteTextColor};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.statediagram-note .nodeLabel {
|
|
203
|
+
color: ${t.noteTextColor};
|
|
204
|
+
}
|
|
205
|
+
.statediagram .edgeLabel {
|
|
206
|
+
color: red; // ${t.noteTextColor};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
[id$="-dependencyStart"], [id$="-dependencyEnd"] {
|
|
210
|
+
fill: ${t.lineColor};
|
|
211
|
+
stroke: ${t.lineColor};
|
|
212
|
+
stroke-width: ${t.strokeWidth||1};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.statediagramTitleText {
|
|
216
|
+
text-anchor: middle;
|
|
217
|
+
font-size: 18px;
|
|
218
|
+
fill: ${t.textColor};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
[data-look="neo"].statediagram-cluster rect {
|
|
222
|
+
fill: ${t.mainBkg};
|
|
223
|
+
stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};
|
|
224
|
+
stroke-width: ${t.strokeWidth??1};
|
|
225
|
+
}
|
|
226
|
+
[data-look="neo"].statediagram-cluster rect.outer {
|
|
227
|
+
rx: ${t.radius}px;
|
|
228
|
+
ry: ${t.radius}px;
|
|
229
|
+
filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}
|
|
230
|
+
}
|
|
231
|
+
`,"getStyles"),Ae=Ce;exports.StateDB=ve;exports.stateDiagram_default=Zt;exports.stateRenderer_v3_unified_default=be;exports.styles_default=Ae;
|