interactive-drawer 0.4.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 +255 -0
- package/dist/checkpoint-store.d.ts +39 -0
- package/dist/index.js +1606 -0
- package/dist/mcp-app.html +124 -0
- package/dist/server.d.ts +12 -0
- package/dist/server.js +698 -0
- package/dist/shared.d.ts +32 -0
- package/dist/viewer/assets/Assistant-Bold-gm-uSS1B.woff2 +0 -0
- package/dist/viewer/assets/Assistant-Medium-DrcxCXg3.woff2 +0 -0
- package/dist/viewer/assets/Assistant-Regular-DVxZuzxb.woff2 +0 -0
- package/dist/viewer/assets/Assistant-SemiBold-SCI4bEL9.woff2 +0 -0
- package/dist/viewer/assets/Tableau10-B-NsZVaP.js +1 -0
- package/dist/viewer/assets/_commonjs-dynamic-modules-TDtrdbi3.js +1 -0
- package/dist/viewer/assets/ar-SA-G6X2FPQ2-DadQCH2-.js +10 -0
- package/dist/viewer/assets/arc-CQgrOt5x.js +1 -0
- package/dist/viewer/assets/array-BKyUJesY.js +1 -0
- package/dist/viewer/assets/az-AZ-76LH7QW2-DQfUuqqi.js +1 -0
- package/dist/viewer/assets/bg-BG-XCXSNQG7-BB40UBFK.js +5 -0
- package/dist/viewer/assets/blockDiagram-c4efeb88-BaF5AmVI.js +118 -0
- package/dist/viewer/assets/bn-BD-2XOGV67Q-uzDHfiqC.js +5 -0
- package/dist/viewer/assets/c4Diagram-c83219d4-hWhr-GlJ.js +10 -0
- package/dist/viewer/assets/ca-ES-6MX7JW3Y-BW7AckRl.js +8 -0
- package/dist/viewer/assets/channel-CXejbLtU.js +1 -0
- package/dist/viewer/assets/classDiagram-beda092f-CymCu8CT.js +2 -0
- package/dist/viewer/assets/classDiagram-v2-2358418a-DJAISyxA.js +2 -0
- package/dist/viewer/assets/clone-CfbodbqL.js +1 -0
- package/dist/viewer/assets/createText-1719965b-BnEANXd0.js +7 -0
- package/dist/viewer/assets/cs-CZ-2BRQDIVT-DuVk-qPr.js +11 -0
- package/dist/viewer/assets/da-DK-5WZEPLOC-DFahLFHr.js +5 -0
- package/dist/viewer/assets/de-DE-XR44H4JA-DoRzoyVr.js +8 -0
- package/dist/viewer/assets/directory-open-01563666-DWU9wJ6I.js +1 -0
- package/dist/viewer/assets/directory-open-4ed118d0-CunoC1EB.js +1 -0
- package/dist/viewer/assets/edges-96097737-BaZooScF.js +4 -0
- package/dist/viewer/assets/el-GR-BZB4AONW--pwLECF8.js +10 -0
- package/dist/viewer/assets/erDiagram-0228fc6a-57itH3DJ.js +51 -0
- package/dist/viewer/assets/es-ES-U4NZUMDT-C1NjAcMt.js +9 -0
- package/dist/viewer/assets/eu-ES-A7QVB2H4-Ck1DCJa4.js +11 -0
- package/dist/viewer/assets/fa-IR-HGAKTJCU-tLLl_5WD.js +8 -0
- package/dist/viewer/assets/fi-FI-Z5N7JZ37-DVtDP0gn.js +6 -0
- package/dist/viewer/assets/file-open-002ab408-DIuFHtCF.js +1 -0
- package/dist/viewer/assets/file-open-7c801643-684qeFg4.js +1 -0
- package/dist/viewer/assets/file-save-3189631c-C1wFhQhH.js +1 -0
- package/dist/viewer/assets/file-save-745eba88-Bb9F9Kg7.js +1 -0
- package/dist/viewer/assets/flowDb-c6c81e3f-C7AEsokK.js +10 -0
- package/dist/viewer/assets/flowDiagram-50d868cf-CssTUsiu.js +4 -0
- package/dist/viewer/assets/flowDiagram-v2-4f6560a1-D0GG9NIT.js +1 -0
- package/dist/viewer/assets/flowchart-elk-definition-6af322e1-CRyPEh1i.js +139 -0
- package/dist/viewer/assets/fr-FR-RHASNOE6-T_qZ0zEK.js +9 -0
- package/dist/viewer/assets/ganttDiagram-a2739b55-DsyTeswu.js +257 -0
- package/dist/viewer/assets/gitGraphDiagram-82fe8481-D85sePVV.js +70 -0
- package/dist/viewer/assets/gl-ES-HMX3MZ6V-IW3daBzE.js +10 -0
- package/dist/viewer/assets/graph-i-2SK2w1.js +1 -0
- package/dist/viewer/assets/he-IL-6SHJWFNN-CUxTwbdR.js +10 -0
- package/dist/viewer/assets/hi-IN-IWLTKZ5I-DvQFf43e.js +4 -0
- package/dist/viewer/assets/hu-HU-A5ZG7DT2-CO4Q4G1z.js +7 -0
- package/dist/viewer/assets/id-ID-SAP4L64H-Bf_UXdp6.js +10 -0
- package/dist/viewer/assets/image-blob-reduce.esm-D6s-rqMO.js +7 -0
- package/dist/viewer/assets/index-5325376f-BRzpdHqA.js +1 -0
- package/dist/viewer/assets/index-BDC2daNC.js +275 -0
- package/dist/viewer/assets/index-BcAUh2Nm.css +1 -0
- package/dist/viewer/assets/index-rEzfVlKD.js +97 -0
- package/dist/viewer/assets/infoDiagram-8eee0895-BkRxMuec.js +7 -0
- package/dist/viewer/assets/init-Gi6I4Gst.js +1 -0
- package/dist/viewer/assets/it-IT-JPQ66NNP-AwjkJc7y.js +11 -0
- package/dist/viewer/assets/ja-JP-DBVTYXUO-07sucMhN.js +8 -0
- package/dist/viewer/assets/journeyDiagram-c64418c1-6-ZVFaXG.js +139 -0
- package/dist/viewer/assets/kaa-6HZHGXH3-CXk_Wo6h.js +1 -0
- package/dist/viewer/assets/kab-KAB-ZGHBKWFO-D88OOW68.js +8 -0
- package/dist/viewer/assets/katex-BkgLa5T_.js +261 -0
- package/dist/viewer/assets/kk-KZ-P5N5QNE5-TzX_GmjC.js +1 -0
- package/dist/viewer/assets/km-KH-HSX4SM5Z-Dy-luINx.js +11 -0
- package/dist/viewer/assets/ko-KR-MTYHY66A-Bno63g5m.js +9 -0
- package/dist/viewer/assets/ku-TR-6OUDTVRD-Daw-B1bN.js +9 -0
- package/dist/viewer/assets/layout-BSQSdjji.js +1 -0
- package/dist/viewer/assets/line-DajA25FK.js +1 -0
- package/dist/viewer/assets/linear-BUWo07xp.js +1 -0
- package/dist/viewer/assets/lt-LT-XHIRWOB4-C3_9a2Cz.js +3 -0
- package/dist/viewer/assets/lv-LV-5QDEKY6T-3H9zX9pi.js +7 -0
- package/dist/viewer/assets/mindmap-definition-8da855dc-DIeJ0MUj.js +425 -0
- package/dist/viewer/assets/mr-IN-CRQNXWMA-DLf6m35n.js +13 -0
- package/dist/viewer/assets/my-MM-5M5IBNSE-CW_RWZBw.js +1 -0
- package/dist/viewer/assets/nb-NO-T6EIAALU-B0ZpuoZJ.js +10 -0
- package/dist/viewer/assets/nl-NL-IS3SIHDZ-nZ0JmIIM.js +8 -0
- package/dist/viewer/assets/nn-NO-6E72VCQL-C_dDeYAp.js +8 -0
- package/dist/viewer/assets/oc-FR-POXYY2M6-CsidHxkc.js +8 -0
- package/dist/viewer/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/viewer/assets/pa-IN-N4M65BXN-DuEUGA-r.js +4 -0
- package/dist/viewer/assets/path-CbwjOpE9.js +1 -0
- package/dist/viewer/assets/pica-B90j7hbh.js +7 -0
- package/dist/viewer/assets/pieDiagram-a8764435-CY0HndHR.js +35 -0
- package/dist/viewer/assets/pl-PL-T2D74RX3-D87DC8D9.js +9 -0
- package/dist/viewer/assets/pt-BR-5N22H2LF-BtSoEeex.js +9 -0
- package/dist/viewer/assets/pt-PT-UZXXM6DQ-D4bk4PLe.js +9 -0
- package/dist/viewer/assets/quadrantDiagram-1e28029f-DGki2tT-.js +7 -0
- package/dist/viewer/assets/requirementDiagram-08caed73-BkzKWnbZ.js +52 -0
- package/dist/viewer/assets/ro-RO-JPDTUUEW-Ra2U-BVb.js +11 -0
- package/dist/viewer/assets/roundRect-0PYZxl1G.js +1 -0
- package/dist/viewer/assets/ru-RU-B4JR7IUQ-DAMFn0BJ.js +9 -0
- package/dist/viewer/assets/sankeyDiagram-a04cb91d-C1WQeKAS.js +8 -0
- package/dist/viewer/assets/sequenceDiagram-c5b8d532-BQy1AIyh.js +122 -0
- package/dist/viewer/assets/si-LK-N5RQ5JYF-DtRsuwQ6.js +1 -0
- package/dist/viewer/assets/sk-SK-C5VTKIMK-Dph_9bOP.js +6 -0
- package/dist/viewer/assets/sl-SI-NN7IZMDC-CzYryWZd.js +6 -0
- package/dist/viewer/assets/stateDiagram-1ecb1508-f7QEpJSj.js +1 -0
- package/dist/viewer/assets/stateDiagram-v2-c2b004d7-B8MjoGqH.js +1 -0
- package/dist/viewer/assets/styles-b4e223ce-DfLT12Nx.js +160 -0
- package/dist/viewer/assets/styles-ca3715f6-CnuYZzQT.js +207 -0
- package/dist/viewer/assets/styles-d45a18b0-Ci9tlpxY.js +116 -0
- package/dist/viewer/assets/subset-shared.chunk-B9IoriSA.js +84 -0
- package/dist/viewer/assets/subset-worker.chunk-Bpe7TPYu.js +1 -0
- package/dist/viewer/assets/sv-SE-XGPEYMSR-B4Y9n4LB.js +10 -0
- package/dist/viewer/assets/svgDrawCommon-b86b1483-4HzjGm6B.js +1 -0
- package/dist/viewer/assets/ta-IN-2NMHFXQM-DE7pdoSM.js +9 -0
- package/dist/viewer/assets/th-TH-HPSO5L25-Dd8iADEt.js +2 -0
- package/dist/viewer/assets/timeline-definition-faaaa080-DYgcS_Y5.js +61 -0
- package/dist/viewer/assets/tr-TR-DEFEU3FU-DTOmyIrt.js +7 -0
- package/dist/viewer/assets/uk-UA-QMV73CPH-B05zHRYx.js +6 -0
- package/dist/viewer/assets/vi-VN-M7AON7JQ-ChW6Q5sn.js +5 -0
- package/dist/viewer/assets/xychartDiagram-f5964ef8-BrW97HI1.js +7 -0
- package/dist/viewer/assets/zh-CN-LNUGB5OW-DF3LdZpE.js +10 -0
- package/dist/viewer/assets/zh-HK-E62DVLB3-C3QgGFS0.js +1 -0
- package/dist/viewer/assets/zh-TW-RAJ6MFWO-ciUClBxf.js +9 -0
- package/dist/viewer/index.html +13 -0
- package/package.json +67 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import{n as Ut,o as zt,s as Mt,g as Ht,b as Xt,a as Kt,c as Y,j as ot,l as D,q as Wt,a1 as Jt}from"./index-rEzfVlKD.js";var gt=(function(){var t=function(C,r,n,i){for(n=n||{},i=C.length;i--;n[C[i]]=r);return n},s=[1,2],a=[1,3],h=[1,4],f=[2,4],d=[1,9],y=[1,11],k=[1,15],u=[1,16],E=[1,17],T=[1,18],R=[1,30],G=[1,19],j=[1,20],U=[1,21],z=[1,22],M=[1,23],H=[1,25],X=[1,26],K=[1,27],W=[1,28],J=[1,29],q=[1,32],Q=[1,33],Z=[1,34],tt=[1,35],w=[1,31],c=[1,4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],et=[1,4,5,13,14,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],Dt=[4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],ht={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,cssClassStatement:11,idStatement:12,DESCR:13,"-->":14,HIDE_EMPTY:15,scale:16,WIDTH:17,COMPOSIT_STATE:18,STRUCT_START:19,STRUCT_STOP:20,STATE_DESCR:21,AS:22,ID:23,FORK:24,JOIN:25,CHOICE:26,CONCURRENT:27,note:28,notePosition:29,NOTE_TEXT:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,classDef:37,CLASSDEF_ID:38,CLASSDEF_STYLEOPTS:39,DEFAULT:40,class:41,CLASSENTITY_IDS:42,STYLECLASS:43,direction_tb:44,direction_bt:45,direction_rl:46,direction_lr:47,eol:48,";":49,EDGE_STATE:50,STYLE_SEPARATOR:51,left_of:52,right_of:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",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",30:"NOTE_TEXT",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"classDef",38:"CLASSDEF_ID",39:"CLASSDEF_STYLEOPTS",40:"DEFAULT",41:"class",42:"CLASSENTITY_IDS",43:"STYLECLASS",44:"direction_tb",45:"direction_bt",46:"direction_rl",47:"direction_lr",49:";",50:"EDGE_STATE",51:"STYLE_SEPARATOR",52:"left_of",53:"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,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],[10,3],[10,3],[11,3],[31,1],[31,1],[31,1],[31,1],[48,1],[48,1],[12,1],[12,1],[12,3],[12,3],[29,1],[29,1]],performAction:function(r,n,i,o,p,e,$){var l=e.length-1;switch(p){case 3:return o.setRootDoc(e[l]),e[l];case 4:this.$=[];break;case 5:e[l]!="nl"&&(e[l-1].push(e[l]),this.$=e[l-1]);break;case 6:case 7:this.$=e[l];break;case 8:this.$="nl";break;case 11:this.$=e[l];break;case 12:const B=e[l-1];B.description=o.trimColon(e[l]),this.$=B;break;case 13:this.$={stmt:"relation",state1:e[l-2],state2:e[l]};break;case 14:const ft=o.trimColon(e[l]);this.$={stmt:"relation",state1:e[l-3],state2:e[l-1],description:ft};break;case 18:this.$={stmt:"state",id:e[l-3],type:"default",description:"",doc:e[l-1]};break;case 19:var v=e[l],O=e[l-2].trim();if(e[l].match(":")){var st=e[l].split(":");v=st[0],O=[O,st[1]]}this.$={stmt:"state",id:v,type:"default",description:O};break;case 20:this.$={stmt:"state",id:e[l-3],type:"default",description:e[l-5],doc:e[l-1]};break;case 21:this.$={stmt:"state",id:e[l],type:"fork"};break;case 22:this.$={stmt:"state",id:e[l],type:"join"};break;case 23:this.$={stmt:"state",id:e[l],type:"choice"};break;case 24:this.$={stmt:"state",id:o.getDividerId(),type:"divider"};break;case 25:this.$={stmt:"state",id:e[l-1].trim(),note:{position:e[l-2].trim(),text:e[l].trim()}};break;case 28:this.$=e[l].trim(),o.setAccTitle(this.$);break;case 29:case 30:this.$=e[l].trim(),o.setAccDescription(this.$);break;case 31:case 32:this.$={stmt:"classDef",id:e[l-1].trim(),classes:e[l].trim()};break;case 33:this.$={stmt:"applyClass",id:e[l-1].trim(),styleClass:e[l].trim()};break;case 34:o.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 35:o.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 36:o.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 37:o.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:case 41:this.$={stmt:"state",id:e[l].trim(),type:"default",description:""};break;case 42:this.$={stmt:"state",id:e[l-2].trim(),classes:[e[l].trim()],type:"default",description:""};break;case 43:this.$={stmt:"state",id:e[l-2].trim(),classes:[e[l].trim()],type:"default",description:""};break}},table:[{3:1,4:s,5:a,6:h},{1:[3]},{3:5,4:s,5:a,6:h},{3:6,4:s,5:a,6:h},t([1,4,5,15,16,18,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],f,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:d,5:y,8:8,9:10,10:12,11:13,12:14,15:k,16:u,18:E,21:T,23:R,24:G,25:j,26:U,27:z,28:M,31:24,32:H,34:X,36:K,37:W,41:J,44:q,45:Q,46:Z,47:tt,50:w},t(c,[2,5]),{9:36,10:12,11:13,12:14,15:k,16:u,18:E,21:T,23:R,24:G,25:j,26:U,27:z,28:M,31:24,32:H,34:X,36:K,37:W,41:J,44:q,45:Q,46:Z,47:tt,50:w},t(c,[2,7]),t(c,[2,8]),t(c,[2,9]),t(c,[2,10]),t(c,[2,11],{13:[1,37],14:[1,38]}),t(c,[2,15]),{17:[1,39]},t(c,[2,17],{19:[1,40]}),{22:[1,41]},t(c,[2,21]),t(c,[2,22]),t(c,[2,23]),t(c,[2,24]),{29:42,30:[1,43],52:[1,44],53:[1,45]},t(c,[2,27]),{33:[1,46]},{35:[1,47]},t(c,[2,30]),{38:[1,48],40:[1,49]},{42:[1,50]},t(et,[2,40],{51:[1,51]}),t(et,[2,41],{51:[1,52]}),t(c,[2,34]),t(c,[2,35]),t(c,[2,36]),t(c,[2,37]),t(c,[2,6]),t(c,[2,12]),{12:53,23:R,50:w},t(c,[2,16]),t(Dt,f,{7:54}),{23:[1,55]},{23:[1,56]},{22:[1,57]},{23:[2,44]},{23:[2,45]},t(c,[2,28]),t(c,[2,29]),{39:[1,58]},{39:[1,59]},{43:[1,60]},{23:[1,61]},{23:[1,62]},t(c,[2,13],{13:[1,63]}),{4:d,5:y,8:8,9:10,10:12,11:13,12:14,15:k,16:u,18:E,20:[1,64],21:T,23:R,24:G,25:j,26:U,27:z,28:M,31:24,32:H,34:X,36:K,37:W,41:J,44:q,45:Q,46:Z,47:tt,50:w},t(c,[2,19],{19:[1,65]}),{30:[1,66]},{23:[1,67]},t(c,[2,31]),t(c,[2,32]),t(c,[2,33]),t(et,[2,42]),t(et,[2,43]),t(c,[2,14]),t(c,[2,18]),t(Dt,f,{7:68}),t(c,[2,25]),t(c,[2,26]),{4:d,5:y,8:8,9:10,10:12,11:13,12:14,15:k,16:u,18:E,20:[1,69],21:T,23:R,24:G,25:j,26:U,27:z,28:M,31:24,32:H,34:X,36:K,37:W,41:J,44:q,45:Q,46:Z,47:tt,50:w},t(c,[2,20])],defaultActions:{5:[2,1],6:[2,2],44:[2,44],45:[2,45]},parseError:function(r,n){if(n.recoverable)this.trace(r);else{var i=new Error(r);throw i.hash=n,i}},parse:function(r){var n=this,i=[0],o=[],p=[null],e=[],$=this.table,l="",v=0,O=0,st=2,B=1,ft=e.slice.call(arguments,1),S=Object.create(this.lexer),A={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(A.yy[dt]=this.yy[dt]);S.setInput(r,A.yy),A.yy.lexer=S,A.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var yt=S.yylloc;e.push(yt);var Gt=S.options&&S.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function jt(){var x;return x=o.pop()||S.lex()||B,typeof x!="number"&&(x instanceof Array&&(o=x,x=o.pop()),x=n.symbols_[x]||x),x}for(var _,L,m,pt,N={},it,b,Ct,rt;;){if(L=i[i.length-1],this.defaultActions[L]?m=this.defaultActions[L]:((_===null||typeof _>"u")&&(_=jt()),m=$[L]&&$[L][_]),typeof m>"u"||!m.length||!m[0]){var St="";rt=[];for(it in $[L])this.terminals_[it]&&it>st&&rt.push("'"+this.terminals_[it]+"'");S.showPosition?St="Parse error on line "+(v+1)+`:
|
|
2
|
+
`+S.showPosition()+`
|
|
3
|
+
Expecting `+rt.join(", ")+", got '"+(this.terminals_[_]||_)+"'":St="Parse error on line "+(v+1)+": Unexpected "+(_==B?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(St,{text:S.match,token:this.terminals_[_]||_,line:S.yylineno,loc:yt,expected:rt})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+_);switch(m[0]){case 1:i.push(_),p.push(S.yytext),e.push(S.yylloc),i.push(m[1]),_=null,O=S.yyleng,l=S.yytext,v=S.yylineno,yt=S.yylloc;break;case 2:if(b=this.productions_[m[1]][1],N.$=p[p.length-b],N._$={first_line:e[e.length-(b||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(b||1)].first_column,last_column:e[e.length-1].last_column},Gt&&(N._$.range=[e[e.length-(b||1)].range[0],e[e.length-1].range[1]]),pt=this.performAction.apply(N,[l,O,v,A.yy,m[1],p,e].concat(ft)),typeof pt<"u")return pt;b&&(i=i.slice(0,-1*b*2),p=p.slice(0,-1*b),e=e.slice(0,-1*b)),i.push(this.productions_[m[1]][0]),p.push(N.$),e.push(N._$),Ct=$[i[i.length-2]][i[i.length-1]],i.push(Ct);break;case 3:return!0}}return!0}},Yt=(function(){var C={EOF:1,parseError:function(n,i){if(this.yy.parser)this.yy.parser.parseError(n,i);else throw new Error(n)},setInput:function(r,n){return this.yy=n||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var n=r.length,i=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var p=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:i?(i.length===o.length?this.yylloc.first_column:0)+o[o.length-i.length].length-i[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
|
+
`+n+"^"},test_match:function(r,n){var i,o,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),o=r[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],i=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var e in p)this[e]=p[e];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,n,i,o;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),e=0;e<p.length;e++)if(i=this._input.match(this.rules[p[e]]),i&&(!n||i[0].length>n[0].length)){if(n=i,o=e,this.options.backtrack_lexer){if(r=this.test_match(i,p[e]),r!==!1)return r;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(r=this.test_match(n,p[o]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var n=this.next();return n||this.lex()},begin:function(n){this.conditionStack.push(n)},popState:function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},pushState:function(n){this.begin(n)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(n,i,o,p){switch(o){case 0:return 40;case 1:return 44;case 2:return 45;case 3:return 46;case 4:return 47;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),16;case 13:return 17;case 14:this.popState();break;case 15:return this.begin("acc_title"),32;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),34;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),37;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),38;case 25:return this.popState(),39;case 26:return this.pushState("CLASS"),41;case 27:return this.popState(),this.pushState("CLASS_STYLE"),42;case 28:return this.popState(),43;case 29:return this.pushState("SCALE"),16;case 30:return 17;case 31:this.popState();break;case 32:this.pushState("STATE");break;case 33:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),24;case 34:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;case 35:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),26;case 36:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),24;case 37:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),26;case 39:return 44;case 40:return 45;case 41:return 46;case 42:return 47;case 43:this.pushState("STATE_STRING");break;case 44:return this.pushState("STATE_ID"),"AS";case 45:return this.popState(),"ID";case 46:this.popState();break;case 47:return"STATE_DESCR";case 48:return 18;case 49:this.popState();break;case 50:return this.popState(),this.pushState("struct"),19;case 51:break;case 52:return this.popState(),20;case 53:break;case 54:return this.begin("NOTE"),28;case 55:return this.popState(),this.pushState("NOTE_ID"),52;case 56:return this.popState(),this.pushState("NOTE_ID"),53;case 57:this.popState(),this.pushState("FLOATING_NOTE");break;case 58:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 59:break;case 60:return"NOTE_TEXT";case 61:return this.popState(),"ID";case 62:return this.popState(),this.pushState("NOTE_TEXT"),23;case 63:return this.popState(),i.yytext=i.yytext.substr(2).trim(),30;case 64:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),30;case 65:return 6;case 66:return 6;case 67:return 15;case 68:return 50;case 69:return 23;case 70:return i.yytext=i.yytext.trim(),13;case 71:return 14;case 72:return 27;case 73:return 51;case 74:return 5;case 75:return"INVALID"}},rules:[/^(?: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,/^(?:[^\}]%%[^\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,/^(?: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,/^(?:%%(?!\{)[^\n]*)/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]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,32,39,40,41,42,51,52,53,54,68,69,70,71,72],inclusive:!1},FLOATING_NOTE_ID:{rules:[61],inclusive:!1},FLOATING_NOTE:{rules:[58,59,60],inclusive:!1},NOTE_TEXT:{rules:[63,64],inclusive:!1},NOTE_ID:{rules:[62],inclusive:!1},NOTE:{rules:[55,56,57],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,30,31],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[45],inclusive:!1},STATE_STRING:{rules:[46,47],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,33,34,35,36,37,38,43,44,48,49,50],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,50,54,65,66,67,68,69,70,71,73,74,75],inclusive:!0}}};return C})();ht.lexer=Yt;function ut(){this.yy={}}return ut.prototype=ht,ht.Parser=ut,new ut})();gt.parser=gt;const De=gt,qt="LR",Ce="TB",_t="state",It="relation",Qt="classDef",Zt="applyClass",Et="default",te="divider",bt="[*]",Ot="start",Nt=bt,Rt="end",vt="color",At="fill",ee="bgFill",se=",";function wt(){return{}}let $t=qt,lt=[],P=wt();const Bt=()=>({relations:[],states:{},documents:{}});let ct={root:Bt()},g=ct.root,F=0,Lt=0;const ie={LINE:0,DOTTED_LINE:1},re={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},nt=t=>JSON.parse(JSON.stringify(t)),ne=t=>{D.info("Setting root doc",t),lt=t},ae=()=>lt,at=(t,s,a)=>{if(s.stmt===It)at(t,s.state1,!0),at(t,s.state2,!1);else if(s.stmt===_t&&(s.id==="[*]"?(s.id=a?t.id+"_start":t.id+"_end",s.start=a):s.id=s.id.trim()),s.doc){const h=[];let f=[],d;for(d=0;d<s.doc.length;d++)if(s.doc[d].type===te){const y=nt(s.doc[d]);y.doc=nt(f),h.push(y),f=[]}else f.push(s.doc[d]);if(h.length>0&&f.length>0){const y={stmt:_t,id:Jt(),type:"divider",doc:nt(f)};h.push(nt(y)),s.doc=h}s.doc.forEach(y=>at(s,y,!0))}},le=()=>(at({id:"root"},{id:"root",doc:lt},!0),{id:"root",doc:lt}),ce=t=>{let s;t.doc?s=t.doc:s=t,D.info(s),Pt(!0),D.info("Extract",s),s.forEach(a=>{switch(a.stmt){case _t:I(a.id.trim(),a.type,a.doc,a.description,a.note,a.classes,a.styles,a.textStyles);break;case It:Ft(a.state1,a.state2,a.description);break;case Qt:Vt(a.id.trim(),a.classes);break;case Zt:xt(a.id.trim(),a.styleClass);break}})},I=function(t,s=Et,a=null,h=null,f=null,d=null,y=null,k=null){const u=t==null?void 0:t.trim();g.states[u]===void 0?(D.info("Adding state ",u,h),g.states[u]={id:u,descriptions:[],type:s,doc:a,note:f,classes:[],styles:[],textStyles:[]}):(g.states[u].doc||(g.states[u].doc=a),g.states[u].type||(g.states[u].type=s)),h&&(D.info("Setting state description",u,h),typeof h=="string"&&kt(u,h.trim()),typeof h=="object"&&h.forEach(E=>kt(u,E.trim()))),f&&(g.states[u].note=f,g.states[u].note.text=ot.sanitizeText(g.states[u].note.text,Y())),d&&(D.info("Setting state classes",u,d),(typeof d=="string"?[d]:d).forEach(T=>xt(u,T.trim()))),y&&(D.info("Setting state styles",u,y),(typeof y=="string"?[y]:y).forEach(T=>_e(u,T.trim()))),k&&(D.info("Setting state styles",u,y),(typeof k=="string"?[k]:k).forEach(T=>me(u,T.trim())))},Pt=function(t){ct={root:Bt()},g=ct.root,F=0,P=wt(),t||Wt()},V=function(t){return g.states[t]},oe=function(){return g.states},he=function(){D.info("Documents = ",ct)},ue=function(){return g.relations};function mt(t=""){let s=t;return t===bt&&(F++,s=`${Ot}${F}`),s}function Tt(t="",s=Et){return t===bt?Ot:s}function fe(t=""){let s=t;return t===Nt&&(F++,s=`${Rt}${F}`),s}function de(t="",s=Et){return t===Nt?Rt:s}function ye(t,s,a){let h=mt(t.id.trim()),f=Tt(t.id.trim(),t.type),d=mt(s.id.trim()),y=Tt(s.id.trim(),s.type);I(h,f,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),I(d,y,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),g.relations.push({id1:h,id2:d,relationTitle:ot.sanitizeText(a,Y())})}const Ft=function(t,s,a){if(typeof t=="object")ye(t,s,a);else{const h=mt(t.trim()),f=Tt(t),d=fe(s.trim()),y=de(s);I(h,f),I(d,y),g.relations.push({id1:h,id2:d,title:ot.sanitizeText(a,Y())})}},kt=function(t,s){const a=g.states[t],h=s.startsWith(":")?s.replace(":","").trim():s;a.descriptions.push(ot.sanitizeText(h,Y()))},pe=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},Se=()=>(Lt++,"divider-id-"+Lt),Vt=function(t,s=""){P[t]===void 0&&(P[t]={id:t,styles:[],textStyles:[]});const a=P[t];s!=null&&s.split(se).forEach(h=>{const f=h.replace(/([^;]*);/,"$1").trim();if(h.match(vt)){const y=f.replace(At,ee).replace(vt,At);a.textStyles.push(y)}a.styles.push(f)})},ge=function(){return P},xt=function(t,s){t.split(",").forEach(function(a){let h=V(a);if(h===void 0){const f=a.trim();I(f),h=V(f)}h.classes.push(s)})},_e=function(t,s){const a=V(t);a!==void 0&&a.textStyles.push(s)},me=function(t,s){const a=V(t);a!==void 0&&a.textStyles.push(s)},Te=()=>$t,ke=t=>{$t=t},Ee=t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),ve={getConfig:()=>Y().state,addState:I,clear:Pt,getState:V,getStates:oe,getRelations:ue,getClasses:ge,getDirection:Te,addRelation:Ft,getDividerId:Se,setDirection:ke,cleanupLabel:pe,lineType:ie,relationType:re,logDocuments:he,getRootDoc:ae,setRootDoc:ne,getRootDocV2:le,extract:ce,trimColon:Ee,getAccTitle:Kt,setAccTitle:Xt,getAccDescription:Ht,setAccDescription:Mt,addStyleClass:Vt,setCssClass:xt,addDescription:kt,setDiagramTitle:zt,getDiagramTitle:Ut},be=t=>`
|
|
7
|
+
defs #statediagram-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: 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.transition {
|
|
38
|
+
stroke: ${t.transitionColor};
|
|
39
|
+
stroke-width: 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 .label text {
|
|
76
|
+
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
77
|
+
}
|
|
78
|
+
.label div .edgeLabel {
|
|
79
|
+
color: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.stateLabel text {
|
|
83
|
+
fill: ${t.stateLabelColor};
|
|
84
|
+
font-size: 10px;
|
|
85
|
+
font-weight: bold;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.node circle.state-start {
|
|
89
|
+
fill: ${t.specialStateColor};
|
|
90
|
+
stroke: ${t.specialStateColor};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.node .fork-join {
|
|
94
|
+
fill: ${t.specialStateColor};
|
|
95
|
+
stroke: ${t.specialStateColor};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.node circle.state-end {
|
|
99
|
+
fill: ${t.innerEndBackground};
|
|
100
|
+
stroke: ${t.background};
|
|
101
|
+
stroke-width: 1.5
|
|
102
|
+
}
|
|
103
|
+
.end-state-inner {
|
|
104
|
+
fill: ${t.compositeBackground||t.background};
|
|
105
|
+
// stroke: ${t.background};
|
|
106
|
+
stroke-width: 1.5
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.node rect {
|
|
110
|
+
fill: ${t.stateBkg||t.mainBkg};
|
|
111
|
+
stroke: ${t.stateBorder||t.nodeBorder};
|
|
112
|
+
stroke-width: 1px;
|
|
113
|
+
}
|
|
114
|
+
.node polygon {
|
|
115
|
+
fill: ${t.mainBkg};
|
|
116
|
+
stroke: ${t.stateBorder||t.nodeBorder};;
|
|
117
|
+
stroke-width: 1px;
|
|
118
|
+
}
|
|
119
|
+
#statediagram-barbEnd {
|
|
120
|
+
fill: ${t.lineColor};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.statediagram-cluster rect {
|
|
124
|
+
fill: ${t.compositeTitleBackground};
|
|
125
|
+
stroke: ${t.stateBorder||t.nodeBorder};
|
|
126
|
+
stroke-width: 1px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.cluster-label, .nodeLabel {
|
|
130
|
+
color: ${t.stateLabelColor};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.statediagram-cluster rect.outer {
|
|
134
|
+
rx: 5px;
|
|
135
|
+
ry: 5px;
|
|
136
|
+
}
|
|
137
|
+
.statediagram-state .divider {
|
|
138
|
+
stroke: ${t.stateBorder||t.nodeBorder};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.statediagram-state .title-state {
|
|
142
|
+
rx: 5px;
|
|
143
|
+
ry: 5px;
|
|
144
|
+
}
|
|
145
|
+
.statediagram-cluster.statediagram-cluster .inner {
|
|
146
|
+
fill: ${t.compositeBackground||t.background};
|
|
147
|
+
}
|
|
148
|
+
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
149
|
+
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.statediagram-cluster .inner {
|
|
153
|
+
rx:0;
|
|
154
|
+
ry:0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.statediagram-state rect.basic {
|
|
158
|
+
rx: 5px;
|
|
159
|
+
ry: 5px;
|
|
160
|
+
}
|
|
161
|
+
.statediagram-state rect.divider {
|
|
162
|
+
stroke-dasharray: 10,10;
|
|
163
|
+
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.note-edge {
|
|
167
|
+
stroke-dasharray: 5;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.statediagram-note rect {
|
|
171
|
+
fill: ${t.noteBkgColor};
|
|
172
|
+
stroke: ${t.noteBorderColor};
|
|
173
|
+
stroke-width: 1px;
|
|
174
|
+
rx: 0;
|
|
175
|
+
ry: 0;
|
|
176
|
+
}
|
|
177
|
+
.statediagram-note rect {
|
|
178
|
+
fill: ${t.noteBkgColor};
|
|
179
|
+
stroke: ${t.noteBorderColor};
|
|
180
|
+
stroke-width: 1px;
|
|
181
|
+
rx: 0;
|
|
182
|
+
ry: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.statediagram-note text {
|
|
186
|
+
fill: ${t.noteTextColor};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.statediagram-note .nodeLabel {
|
|
190
|
+
color: ${t.noteTextColor};
|
|
191
|
+
}
|
|
192
|
+
.statediagram .edgeLabel {
|
|
193
|
+
color: red; // ${t.noteTextColor};
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
#dependencyStart, #dependencyEnd {
|
|
197
|
+
fill: ${t.lineColor};
|
|
198
|
+
stroke: ${t.lineColor};
|
|
199
|
+
stroke-width: 1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.statediagramTitleText {
|
|
203
|
+
text-anchor: middle;
|
|
204
|
+
font-size: 18px;
|
|
205
|
+
fill: ${t.textColor};
|
|
206
|
+
}
|
|
207
|
+
`,Ae=be;export{Ce as D,It as S,Et as a,te as b,_t as c,ve as d,De as p,Ae as s};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import{a8 as z,a9 as R,aa as F,ab as j,ac as U,l as g,c as S,d as $,u as H,Y as K,_ as A,$ as E,a0 as L,V as G,j as V,t as W,a6 as X}from"./index-rEzfVlKD.js";import{G as Y}from"./graph-i-2SK2w1.js";import{r as J}from"./index-5325376f-BRzpdHqA.js";import{c as Q}from"./channel-CXejbLtU.js";function Z(e){return typeof e=="string"?new z([document.querySelectorAll(e)],[document.documentElement]):new z([F(e)],R)}function pe(e,l){return!!e.children(l).length}function be(e){return N(e.v)+":"+N(e.w)+":"+N(e.name)}var O=/:/g;function N(e){return e?String(e).replace(O,"\\:"):""}function ee(e,l){l&&e.attr("style",l)}function fe(e,l,c){l&&e.attr("class",l).attr("class",c+" "+e.attr("class"))}function ue(e,l){var c=l.graph();if(j(c)){var a=c.transition;if(U(a))return a(e)}return e}function te(e,l){var c=e.append("foreignObject").attr("width","100000"),a=c.append("xhtml:div");a.attr("xmlns","http://www.w3.org/1999/xhtml");var i=l.label;switch(typeof i){case"function":a.insert(i);break;case"object":a.insert(function(){return i});break;default:a.html(i)}ee(a,l.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap");var d=a.node().getBoundingClientRect();return c.attr("width",d.width).attr("height",d.height),c}const P={},re=function(e){const l=Object.keys(e);for(const c of l)P[c]=e[c]},q=async function(e,l,c,a,i,d){const u=a.select(`[id="${c}"]`),n=Object.keys(e);for(const p of n){const r=e[p];let y="default";r.classes.length>0&&(y=r.classes.join(" ")),y=y+" flowchart-label";const w=A(r.styles);let t=r.text!==void 0?r.text:r.id,s;if(g.info("vertex",r,r.labelType),r.labelType==="markdown")g.info("vertex",r,r.labelType);else if(W(S().flowchart.htmlLabels))s=te(u,{label:t}).node(),s.parentNode.removeChild(s);else{const k=i.createElementNS("http://www.w3.org/2000/svg","text");k.setAttribute("style",w.labelStyle.replace("color:","fill:"));const _=t.split(V.lineBreakRegex);for(const C of _){const v=i.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),v.setAttribute("dy","1em"),v.setAttribute("x","1"),v.textContent=C,k.appendChild(v)}s=k}let b=0,o="";switch(r.type){case"round":b=5,o="rect";break;case"square":o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"odd":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"odd_right":o="rect_left_inv_arrow";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"group":o="rect";break;case"doublecircle":o="doublecircle";break;default:o="rect"}const T=await G(t,S());l.setNode(r.id,{labelStyle:w.labelStyle,shape:o,labelText:T,labelType:r.labelType,rx:b,ry:b,class:y,style:w.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:d.db.getTooltip(r.id)||"",domId:d.db.lookUpDomId(r.id),haveCallback:r.haveCallback,width:r.type==="group"?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:S().flowchart.padding}),g.info("setNode",{labelStyle:w.labelStyle,labelType:r.labelType,shape:o,labelText:T,rx:b,ry:b,class:y,style:w.style,id:r.id,domId:d.db.lookUpDomId(r.id),width:r.type==="group"?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:S().flowchart.padding})}},M=async function(e,l,c){g.info("abc78 edges = ",e);let a=0,i={},d,u;if(e.defaultStyle!==void 0){const n=A(e.defaultStyle);d=n.style,u=n.labelStyle}for(const n of e){a++;const p="L-"+n.start+"-"+n.end;i[p]===void 0?(i[p]=0,g.info("abc78 new entry",p,i[p])):(i[p]++,g.info("abc78 new entry",p,i[p]));let r=p+"-"+i[p];g.info("abc78 new link id to be used is",p,r,i[p]);const y="LS-"+n.start,w="LE-"+n.end,t={style:"",labelStyle:""};switch(t.minlen=n.length||1,n.type==="arrow_open"?t.arrowhead="none":t.arrowhead="normal",t.arrowTypeStart="arrow_open",t.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":t.arrowTypeStart="arrow_cross";case"arrow_cross":t.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":t.arrowTypeStart="arrow_point";case"arrow_point":t.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":t.arrowTypeStart="arrow_circle";case"arrow_circle":t.arrowTypeEnd="arrow_circle";break}let s="",b="";switch(n.stroke){case"normal":s="fill:none;",d!==void 0&&(s=d),u!==void 0&&(b=u),t.thickness="normal",t.pattern="solid";break;case"dotted":t.thickness="normal",t.pattern="dotted",t.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":t.thickness="thick",t.pattern="solid",t.style="stroke-width: 3.5px;fill:none;";break;case"invisible":t.thickness="invisible",t.pattern="solid",t.style="stroke-width: 0;fill:none;";break}if(n.style!==void 0){const o=A(n.style);s=o.style,b=o.labelStyle}t.style=t.style+=s,t.labelStyle=t.labelStyle+=b,n.interpolate!==void 0?t.curve=E(n.interpolate,L):e.defaultInterpolate!==void 0?t.curve=E(e.defaultInterpolate,L):t.curve=E(P.curve,L),n.text===void 0?n.style!==void 0&&(t.arrowheadStyle="fill: #333"):(t.arrowheadStyle="fill: #333",t.labelpos="c"),t.labelType=n.labelType,t.label=await G(n.text.replace(V.lineBreakRegex,`
|
|
2
|
+
`),S()),n.style===void 0&&(t.style=t.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),t.labelStyle=t.labelStyle.replace("color:","fill:"),t.id=r,t.classes="flowchart-link "+y+" "+w,l.setEdge(n.start,n.end,t,a)}},le=function(e,l){return l.db.getClasses()},ae=async function(e,l,c,a){g.info("Drawing flowchart");let i=a.db.getDirection();i===void 0&&(i="TD");const{securityLevel:d,flowchart:u}=S(),n=u.nodeSpacing||50,p=u.rankSpacing||50;let r;d==="sandbox"&&(r=$("#i"+l));const y=d==="sandbox"?$(r.nodes()[0].contentDocument.body):$("body"),w=d==="sandbox"?r.nodes()[0].contentDocument:document,t=new Y({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:n,ranksep:p,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let s;const b=a.db.getSubGraphs();g.info("Subgraphs - ",b);for(let f=b.length-1;f>=0;f--)s=b[f],g.info("Subgraph - ",s),a.db.addVertex(s.id,{text:s.title,type:s.labelType},"group",void 0,s.classes,s.dir);const o=a.db.getVertices(),T=a.db.getEdges();g.info("Edges",T);let k=0;for(k=b.length-1;k>=0;k--){s=b[k],Z("cluster").append("text");for(let f=0;f<s.nodes.length;f++)g.info("Setting up subgraphs",s.nodes[f],s.id),t.setParent(s.nodes[f],s.id)}await q(o,t,l,y,w,a),await M(T,t);const _=y.select(`[id="${l}"]`),C=y.select("#"+l+" g");if(await J(C,t,["point","circle","cross"],"flowchart",l),H.insertTitle(_,"flowchartTitleText",u.titleTopMargin,a.db.getDiagramTitle()),K(t,_,u.diagramPadding,u.useMaxWidth),a.db.indexNodes("subGraph"+k),!u.htmlLabels){const f=w.querySelectorAll('[id="'+l+'"] .edgeLabel .label');for(const x of f){const m=x.getBBox(),h=w.createElementNS("http://www.w3.org/2000/svg","rect");h.setAttribute("rx",0),h.setAttribute("ry",0),h.setAttribute("width",m.width),h.setAttribute("height",m.height),x.insertBefore(h,x.firstChild)}}Object.keys(o).forEach(function(f){const x=o[f];if(x.link){const m=$("#"+l+' [id="'+f+'"]');if(m){const h=w.createElementNS("http://www.w3.org/2000/svg","a");h.setAttributeNS("http://www.w3.org/2000/svg","class",x.classes.join(" ")),h.setAttributeNS("http://www.w3.org/2000/svg","href",x.link),h.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),d==="sandbox"?h.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):x.linkTarget&&h.setAttributeNS("http://www.w3.org/2000/svg","target",x.linkTarget);const B=m.insert(function(){return h},":first-child"),I=m.select(".label-container");I&&B.append(function(){return I.node()});const D=m.select(".label");D&&B.append(function(){return D.node()})}}})},we={setConf:re,addVertices:q,addEdges:M,getClasses:le,draw:ae},oe=(e,l)=>{const c=Q,a=c(e,"r"),i=c(e,"g"),d=c(e,"b");return X(a,i,d,l)},ne=e=>`.label {
|
|
3
|
+
font-family: ${e.fontFamily};
|
|
4
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
5
|
+
}
|
|
6
|
+
.cluster-label text {
|
|
7
|
+
fill: ${e.titleColor};
|
|
8
|
+
}
|
|
9
|
+
.cluster-label span,p {
|
|
10
|
+
color: ${e.titleColor};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.label text,span,p {
|
|
14
|
+
fill: ${e.nodeTextColor||e.textColor};
|
|
15
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.node rect,
|
|
19
|
+
.node circle,
|
|
20
|
+
.node ellipse,
|
|
21
|
+
.node polygon,
|
|
22
|
+
.node path {
|
|
23
|
+
fill: ${e.mainBkg};
|
|
24
|
+
stroke: ${e.nodeBorder};
|
|
25
|
+
stroke-width: 1px;
|
|
26
|
+
}
|
|
27
|
+
.flowchart-label text {
|
|
28
|
+
text-anchor: middle;
|
|
29
|
+
}
|
|
30
|
+
// .flowchart-label .text-outer-tspan {
|
|
31
|
+
// text-anchor: middle;
|
|
32
|
+
// }
|
|
33
|
+
// .flowchart-label .text-inner-tspan {
|
|
34
|
+
// text-anchor: start;
|
|
35
|
+
// }
|
|
36
|
+
|
|
37
|
+
.node .katex path {
|
|
38
|
+
fill: #000;
|
|
39
|
+
stroke: #000;
|
|
40
|
+
stroke-width: 1px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.node .label {
|
|
44
|
+
text-align: center;
|
|
45
|
+
}
|
|
46
|
+
.node.clickable {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.arrowheadPath {
|
|
51
|
+
fill: ${e.arrowheadColor};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.edgePath .path {
|
|
55
|
+
stroke: ${e.lineColor};
|
|
56
|
+
stroke-width: 2.0px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.flowchart-link {
|
|
60
|
+
stroke: ${e.lineColor};
|
|
61
|
+
fill: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.edgeLabel {
|
|
65
|
+
background-color: ${e.edgeLabelBackground};
|
|
66
|
+
rect {
|
|
67
|
+
opacity: 0.5;
|
|
68
|
+
background-color: ${e.edgeLabelBackground};
|
|
69
|
+
fill: ${e.edgeLabelBackground};
|
|
70
|
+
}
|
|
71
|
+
text-align: center;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* For html labels only */
|
|
75
|
+
.labelBkg {
|
|
76
|
+
background-color: ${oe(e.edgeLabelBackground,.5)};
|
|
77
|
+
// background-color:
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.cluster rect {
|
|
81
|
+
fill: ${e.clusterBkg};
|
|
82
|
+
stroke: ${e.clusterBorder};
|
|
83
|
+
stroke-width: 1px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cluster text {
|
|
87
|
+
fill: ${e.titleColor};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.cluster span,p {
|
|
91
|
+
color: ${e.titleColor};
|
|
92
|
+
}
|
|
93
|
+
/* .cluster div {
|
|
94
|
+
color: ${e.titleColor};
|
|
95
|
+
} */
|
|
96
|
+
|
|
97
|
+
div.mermaidTooltip {
|
|
98
|
+
position: absolute;
|
|
99
|
+
text-align: center;
|
|
100
|
+
max-width: 200px;
|
|
101
|
+
padding: 2px;
|
|
102
|
+
font-family: ${e.fontFamily};
|
|
103
|
+
font-size: 12px;
|
|
104
|
+
background: ${e.tertiaryColor};
|
|
105
|
+
border: 1px solid ${e.border2};
|
|
106
|
+
border-radius: 2px;
|
|
107
|
+
pointer-events: none;
|
|
108
|
+
z-index: 100;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.flowchartTitleText {
|
|
112
|
+
text-anchor: middle;
|
|
113
|
+
font-size: 18px;
|
|
114
|
+
fill: ${e.textColor};
|
|
115
|
+
}
|
|
116
|
+
`,he=ne;export{we as a,ee as b,te as c,ue as d,be as e,he as f,fe as g,pe as i,Z as s};
|