termbeam 1.18.0 → 1.19.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/package.json +4 -1
- package/public/assets/{_basePickBy-CVn0rIeA.js → _basePickBy-CPjv_JEU.js} +1 -1
- package/public/assets/{_baseUniq-D-ViDZI1.js → _baseUniq-BtieUu_k.js} +1 -1
- package/public/assets/{arc-BWX7iih_.js → arc-Op_Jfgj1.js} +1 -1
- package/public/assets/architectureDiagram-Q4EWVU46-BPBC-sFg.js +36 -0
- package/public/assets/{blockDiagram-WCTKOSBZ-RZQh_7bp.js → blockDiagram-DXYQGD6D-bhrY5jZb.js} +6 -6
- package/public/assets/c4Diagram-AHTNJAMY-Bbj59C07.js +10 -0
- package/public/assets/channel-BqlgTU2z.js +1 -0
- package/public/assets/{chunk-4BX2VUAB-Cz0Sexay.js → chunk-4BX2VUAB-NTfL5dnQ.js} +1 -1
- package/public/assets/chunk-4TB4RGXK-DI71V5fB.js +206 -0
- package/public/assets/{chunk-55IACEB6-DhjD4VKO.js → chunk-55IACEB6-DErzjt0v.js} +1 -1
- package/public/assets/{chunk-KX2RTZJC-BU-NTTwY.js → chunk-EDXVE4YY-D_8mpmH-.js} +1 -1
- package/public/assets/{chunk-FMBD7UC4-H_1l13Rz.js → chunk-FMBD7UC4-DxKx7vX-.js} +1 -1
- package/public/assets/chunk-OYMX7WX6-DWu1iUFO.js +231 -0
- package/public/assets/{chunk-QZHKN3VN-CrSItx1v.js → chunk-QZHKN3VN-Cnf_5dAG.js} +1 -1
- package/public/assets/{chunk-JSJVCQXG-D_GdzPQn.js → chunk-YZCP3GAM-mW6tkOzW.js} +1 -1
- package/public/assets/classDiagram-6PBFFD2Q-BUz6cVs_.js +1 -0
- package/public/assets/classDiagram-v2-HSJHXN6E-BUz6cVs_.js +1 -0
- package/public/assets/clone-RMCUsgPf.js +1 -0
- package/public/assets/{cose-bilkent-S5V4N54A-BNYNzK1p.js → cose-bilkent-S5V4N54A-913I4PUt.js} +1 -1
- package/public/assets/{dagre-KLK3FWXG-CvP5MaIU.js → dagre-KV5264BT-BDwVAKyX.js} +2 -2
- package/public/assets/diagram-5BDNPKRD-OcJJ0e9j.js +10 -0
- package/public/assets/diagram-G4DWMVQ6-Dm20tH1B.js +24 -0
- package/public/assets/diagram-MMDJMWI5-D-cm46Bv.js +43 -0
- package/public/assets/{diagram-P4PSJMXO-D7EqFseu.js → diagram-TYMM5635-CbPn6K5D.js} +1 -1
- package/public/assets/erDiagram-SMLLAGMA-4AUfKRLi.js +85 -0
- package/public/assets/flowDiagram-DWJPFMVM-BJ4qWDVH.js +162 -0
- package/public/assets/{ganttDiagram-A5KZAMGK-C55hiPqb.js → ganttDiagram-T4ZO3ILL-_q7m5Uo2.js} +4 -4
- package/public/assets/gitGraphDiagram-UUTBAWPF-Ctcn_coL.js +106 -0
- package/public/assets/{graph-mq5DkKwp.js → graph-mh6uBCte.js} +1 -1
- package/public/assets/index-2RolNYEW.css +32 -0
- package/public/assets/index-CuJ2Kdhb.js +447 -0
- package/public/assets/{infoDiagram-LFFYTUFH-Cisyfr_w.js → infoDiagram-42DDH7IO-Cbl2ZkB4.js} +1 -1
- package/public/assets/{ishikawaDiagram-PHBUUO56-BjaKmPoV.js → ishikawaDiagram-UXIWVN3A-Buq4uztC.js} +2 -2
- package/public/assets/journeyDiagram-VCZTEJTY-CLs6SdFG.js +139 -0
- package/public/assets/{kanban-definition-K7BYSVSG-D9TVNfL2.js → kanban-definition-6JOO6SKY-CflX5gNH.js} +8 -8
- package/public/assets/{layout-DIfi_3Cg.js → layout-e9E0SnY2.js} +1 -1
- package/public/assets/{linear-CNFortHj.js → linear-Bue4Zf_D.js} +1 -1
- package/public/assets/mindmap-definition-QFDTVHPH-B8iZj3K3.js +96 -0
- package/public/assets/pieDiagram-DEJITSTG-B5dciSBP.js +30 -0
- package/public/assets/{quadrantDiagram-337W2JSQ-Dcj0avLR.js → quadrantDiagram-34T5L4WZ-CZaQCVxe.js} +1 -1
- package/public/assets/requirementDiagram-MS252O5E-2wYKQi_y.js +84 -0
- package/public/assets/{sankeyDiagram-WA2Y5GQK-CpT1bDmZ.js → sankeyDiagram-XADWPNL6-CX5Cdm9d.js} +1 -1
- package/public/assets/sequenceDiagram-FGHM5R23-BUWxC38t.js +157 -0
- package/public/assets/stateDiagram-FHFEXIEX-85EGIrQk.js +1 -0
- package/public/assets/stateDiagram-v2-QKLJ7IA2-OKhwT9tv.js +1 -0
- package/public/assets/timeline-definition-GMOUNBTQ-C3BtHzdG.js +120 -0
- package/public/assets/{vennDiagram-LZ73GAT5-Ci8AKqD1.js → vennDiagram-DHZGUBPP-Chw5is4z.js} +5 -5
- package/public/assets/wardley-RL74JXVD-FEtUMcEE.js +162 -0
- package/public/assets/wardleyDiagram-NUSXRM2D-C_sFSy0G.js +20 -0
- package/public/assets/xychartDiagram-5P7HB3ND-C9Qs21NZ.js +7 -0
- package/public/index.html +2 -2
- package/public/sw.js +2 -2
- package/src/server/index.js +5 -49
- package/src/server/routes.js +59 -72
- package/src/server/sessions.js +20 -0
- package/src/tunnel/index.js +4 -6
- package/src/utils/agent-sessions.js +210 -0
- package/src/utils/agents.js +116 -0
- package/src/utils/update-check.js +19 -0
- package/public/assets/architectureDiagram-2XIMDMQ5-Dr3bqfT2.js +0 -36
- package/public/assets/c4Diagram-IC4MRINW-BM1jg1mo.js +0 -10
- package/public/assets/channel-N7LACYfb.js +0 -1
- package/public/assets/chunk-NQ4KR5QH-_X3IQmYu.js +0 -220
- package/public/assets/chunk-WL4C6EOR-XtpH4KKr.js +0 -189
- package/public/assets/classDiagram-VBA2DB6C-Ct_F3N6M.js +0 -1
- package/public/assets/classDiagram-v2-RAHNMMFH-Ct_F3N6M.js +0 -1
- package/public/assets/clone-DfaqXUXL.js +0 -1
- package/public/assets/diagram-E7M64L7V-C1ypW2kT.js +0 -24
- package/public/assets/diagram-IFDJBPK2-CH5mcu6V.js +0 -43
- package/public/assets/erDiagram-INFDFZHY-Dc_91GQC.js +0 -70
- package/public/assets/flowDiagram-PKNHOUZH-wUw5Mjvb.js +0 -162
- package/public/assets/gitGraphDiagram-K3NZZRJ6-D3HBxR11.js +0 -65
- package/public/assets/index-BxVq7AYs.js +0 -394
- package/public/assets/index-Cpm34cTy.css +0 -32
- package/public/assets/journeyDiagram-4ABVD52K-BNP3C6Ph.js +0 -139
- package/public/assets/mindmap-definition-YRQLILUH-CfNe7W8X.js +0 -68
- package/public/assets/pieDiagram-SKSYHLDU-C3T1FeFD.js +0 -30
- package/public/assets/requirementDiagram-Z7DCOOCP-D4yTZU0p.js +0 -73
- package/public/assets/sequenceDiagram-2WXFIKYE-CPsVjHHb.js +0 -145
- package/public/assets/stateDiagram-RAJIS63D-CbB0QqSa.js +0 -1
- package/public/assets/stateDiagram-v2-FVOUBMTO-CQnYvVz1.js +0 -1
- package/public/assets/timeline-definition-YZTLITO2-Bi12ioU0.js +0 -61
- package/public/assets/treemap-KZPCXAKY-Ct-pligZ.js +0 -162
- package/public/assets/xychartDiagram-JWTSCODW-BsOGuDAL.js +0 -7
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import{g as te}from"./chunk-55IACEB6-DErzjt0v.js";import{s as ee}from"./chunk-EDXVE4YY-D_8mpmH-.js";import{_ as f,l as b,c as F,r as se,u as ie,a as re,b as ae,g as ne,s as le,p as oe,q as ce,T as he,k as H,z as ue}from"./index-CuJ2Kdhb.js";var vt=(function(){var t=f(function(V,l,h,n){for(h=h||{},n=V.length;n--;h[V[n]]=l);return h},"o"),e=[1,2],s=[1,3],a=[1,4],i=[2,4],o=[1,9],u=[1,11],p=[1,16],S=[1,17],T=[1,18],E=[1,19],m=[1,33],L=[1,20],v=[1,21],O=[1,22],w=[1,23],C=[1,24],d=[1,26],D=[1,27],$=[1,28],B=[1,29],I=[1,30],G=[1,31],P=[1,32],at=[1,35],nt=[1,36],lt=[1,37],ot=[1,38],K=[1,34],y=[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],ct=[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],xt=[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],gt={trace:f(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:f(function(l,h,n,g,_,r,Z){var c=r.length-1;switch(_){case 3:return g.setRootDoc(r[c]),r[c];case 4:this.$=[];break;case 5:r[c]!="nl"&&(r[c-1].push(r[c]),this.$=r[c-1]);break;case 6:case 7:this.$=r[c];break;case 8:this.$="nl";break;case 12:this.$=r[c];break;case 13:const tt=r[c-1];tt.description=g.trimColon(r[c]),this.$=tt;break;case 14:this.$={stmt:"relation",state1:r[c-2],state2:r[c]};break;case 15:const Tt=g.trimColon(r[c]);this.$={stmt:"relation",state1:r[c-3],state2:r[c-1],description:Tt};break;case 19:this.$={stmt:"state",id:r[c-3],type:"default",description:"",doc:r[c-1]};break;case 20:var U=r[c],X=r[c-2].trim();if(r[c].match(":")){var ut=r[c].split(":");U=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:U,type:"default",description:X};break;case 21:this.$={stmt:"state",id:r[c-3],type:"default",description:r[c-5],doc:r[c-1]};break;case 22:this.$={stmt:"state",id:r[c],type:"fork"};break;case 23:this.$={stmt:"state",id:r[c],type:"join"};break;case 24:this.$={stmt:"state",id:r[c],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[c-1].trim(),note:{position:r[c-2].trim(),text:r[c].trim()}};break;case 29:this.$=r[c].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=r[c].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[c-3],url:r[c-2],tooltip:r[c-1]};break;case 33:this.$={stmt:"click",id:r[c-3],url:r[c-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[c-1].trim(),classes:r[c].trim()};break;case 36:this.$={stmt:"style",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 37:this.$={stmt:"applyClass",id:r[c-1].trim(),styleClass:r[c].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[c].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},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],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:u,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:S,19:T,22:E,24:m,25:L,26:v,27:O,28:w,29:C,32:25,33:d,35:D,37:$,38:B,41:I,45:G,48:P,51:at,52:nt,53:lt,54:ot,57:K},t(y,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:p,17:S,19:T,22:E,24:m,25:L,26:v,27:O,28:w,29:C,32:25,33:d,35:D,37:$,38:B,41:I,45:G,48:P,51:at,52:nt,53:lt,54:ot,57:K},t(y,[2,7]),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(y,[2,11]),t(y,[2,12],{14:[1,40],15:[1,41]}),t(y,[2,16]),{18:[1,42]},t(y,[2,18],{20:[1,43]}),{23:[1,44]},t(y,[2,22]),t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(y,[2,28]),{34:[1,49]},{36:[1,50]},t(y,[2,31]),{13:51,24:m,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ct,[2,44],{58:[1,56]}),t(ct,[2,45],{58:[1,57]}),t(y,[2,38]),t(y,[2,39]),t(y,[2,40]),t(y,[2,41]),t(y,[2,6]),t(y,[2,13]),{13:58,24:m,57:K},t(y,[2,17]),t(xt,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(y,[2,29]),t(y,[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(y,[2,14],{14:[1,71]}),{4:o,5:u,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:S,19:T,21:[1,72],22:E,24:m,25:L,26:v,27:O,28:w,29:C,32:25,33:d,35:D,37:$,38:B,41:I,45:G,48:P,51:at,52:nt,53:lt,54:ot,57:K},t(y,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),t(ct,[2,46]),t(ct,[2,47]),t(y,[2,15]),t(y,[2,19]),t(xt,i,{7:78}),t(y,[2,26]),t(y,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:u,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:S,19:T,21:[1,81],22:E,24:m,25:L,26:v,27:O,28:w,29:C,32:25,33:d,35:D,37:$,38:B,41:I,45:G,48:P,51:at,52:nt,53:lt,54:ot,57:K},t(y,[2,32]),t(y,[2,33]),t(y,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(l,h){if(h.recoverable)this.trace(l);else{var n=new Error(l);throw n.hash=h,n}},"parseError"),parse:f(function(l){var h=this,n=[0],g=[],_=[null],r=[],Z=this.table,c="",U=0,X=0,ut=2,tt=1,Tt=r.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(l,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;r.push(_t);var Qt=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(R){n.length=n.length-2*R,_.length=_.length-R,r.length=r.length-R}f(Zt,"popStack");function Lt(){var R;return R=g.pop()||k.lex()||tt,typeof R!="number"&&(R instanceof Array&&(g=R,R=g.pop()),R=h.symbols_[R]||R),R}f(Lt,"lex");for(var x,j,N,mt,J={},dt,Y,Ot,ft;;){if(j=n[n.length-1],this.defaultActions[j]?N=this.defaultActions[j]:((x===null||typeof x>"u")&&(x=Lt()),N=Z[j]&&Z[j][x]),typeof N>"u"||!N.length||!N[0]){var bt="";ft=[];for(dt in Z[j])this.terminals_[dt]&&dt>ut&&ft.push("'"+this.terminals_[dt]+"'");k.showPosition?bt="Parse error on line "+(U+1)+`:
|
|
2
|
+
`+k.showPosition()+`
|
|
3
|
+
Expecting `+ft.join(", ")+", got '"+(this.terminals_[x]||x)+"'":bt="Parse error on line "+(U+1)+": Unexpected "+(x==tt?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(bt,{text:k.match,token:this.terminals_[x]||x,line:k.yylineno,loc:_t,expected:ft})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+x);switch(N[0]){case 1:n.push(x),_.push(k.yytext),r.push(k.yylloc),n.push(N[1]),x=null,X=k.yyleng,c=k.yytext,U=k.yylineno,_t=k.yylloc;break;case 2:if(Y=this.productions_[N[1]][1],J.$=_[_.length-Y],J._$={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},Qt&&(J._$.range=[r[r.length-(Y||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(J,[c,X,U,W.yy,N[1],_,r].concat(Tt)),typeof mt<"u")return mt;Y&&(n=n.slice(0,-1*Y*2),_=_.slice(0,-1*Y),r=r.slice(0,-1*Y)),n.push(this.productions_[N[1]][0]),_.push(J.$),r.push(J._$),Ot=Z[n[n.length-2]][n[n.length-1]],n.push(Ot);break;case 3:return!0}}return!0},"parse")},qt=(function(){var V={EOF:1,parseError:f(function(h,n){if(this.yy.parser)this.yy.parser.parseError(h,n);else throw new Error(h)},"parseError"),setInput:f(function(l,h){return this.yy=h||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:f(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var h=l.match(/(?:\r\n?|\n).*/g);return h?(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:f(function(l){var h=l.length,n=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;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),n.length-1&&(this.yylineno-=n.length-1);var _=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:n?(n.length===g.length?this.yylloc.first_column:0)+g[g.length-n.length].length-n[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(l){this.unput(this.match.slice(l))},"less"),pastInput:f(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:f(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:f(function(){var l=this.pastInput(),h=new Array(l.length+1).join("-");return l+this.upcomingInput()+`
|
|
5
|
+
`+h+"^"},"showPosition"),test_match:f(function(l,h){var n,g,_;if(this.options.backtrack_lexer&&(_={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&&(_.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],n=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in _)this[r]=_[r];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,h,n,g;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),r=0;r<_.length;r++)if(n=this._input.match(this.rules[_[r]]),n&&(!h||n[0].length>h[0].length)){if(h=n,g=r,this.options.backtrack_lexer){if(l=this.test_match(n,_[r]),l!==!1)return l;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(l=this.test_match(h,_[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:f(function(){var h=this.next();return h||this.lex()},"lex"),begin:f(function(h){this.conditionStack.push(h)},"begin"),popState:f(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(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:f(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:f(function(h){this.begin(h)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(h,n,g,_){switch(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:break;case 9:break;case 10:return 5;case 11:break;case 12:break;case 13:break;case 14:break;case 15:return this.pushState("SCALE"),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 35:return this.pushState("SCALE"),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:return this.popState(),"ID";case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 70:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 71:return 6;case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return n.yytext=n.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81: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,/^(?:[^\}]%%[^\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,/^(?:%%(?!\{)[^\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;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78,79],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};return V})();gt.lexer=qt;function ht(){this.yy={}}return f(ht,"Parser"),ht.prototype=gt,gt.Parser=ht,new ht})();vt.parser=vt;var Ye=vt,de="TB",Bt="TB",Rt="dir",Q="state",q="root",Ct="relation",fe="classDef",pe="style",Se="applyClass",it="default",Gt="divider",Yt="fill:none",Vt="fill: #333",Mt="c",Ut="markdown",Wt="normal",kt="rect",Dt="rectWithTitle",ye="stateStart",ge="stateEnd",It="divider",Nt="roundedWithTitle",Te="note",Ee="noteGroup",rt="statediagram",_e="state",me=`${rt}-${_e}`,jt="transition",be="note",ke="note-edge",De=`${jt} ${ke}`,ve=`${rt}-${be}`,Ce="cluster",Ae=`${rt}-${Ce}`,xe="cluster-alt",Le=`${rt}-${xe}`,Ht="parent",zt="note",Oe="state",At="----",Re=`${At}${zt}`,wt=`${At}${Ht}`,Kt=f((t,e=Bt)=>{if(!t.doc)return e;let s=e;for(const a of t.doc)a.stmt==="dir"&&(s=a.value);return s},"getDir"),Ie=f(function(t,e){return e.db.getClasses()},"getClasses"),Ne=f(async function(t,e,s,a){b.info("REF0:"),b.info("Drawing state diagram (v2)",e);const{securityLevel:i,state:o,layout:u}=F();a.db.extract(a.db.getRootDocV2());const p=a.db.getData(),S=te(e,i);p.type=a.type,p.layoutAlgorithm=u,p.nodeSpacing=(o==null?void 0:o.nodeSpacing)||50,p.rankSpacing=(o==null?void 0:o.rankSpacing)||50,F().look==="neo"?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await se(p,S);const E=8;try{(typeof a.db.getLinks=="function"?a.db.getLinks():new Map).forEach((L,v)=>{var B;const O=typeof v=="string"?v:typeof(v==null?void 0:v.id)=="string"?v.id:"";if(!O){b.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(v));return}const w=(B=S.node())==null?void 0:B.querySelectorAll("g");let C;if(w==null||w.forEach(I=>{var P;((P=I.textContent)==null?void 0:P.trim())===O&&(C=I)}),!C){b.warn("⚠️ Could not find node matching text:",O);return}const d=C.parentNode;if(!d){b.warn("⚠️ Node has no parent, cannot wrap:",O);return}const D=document.createElementNS("http://www.w3.org/2000/svg","a"),$=L.url.replace(/^"+|"+$/g,"");if(D.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",$),D.setAttribute("target","_blank"),L.tooltip){const I=L.tooltip.replace(/^"+|"+$/g,"");D.setAttribute("title",I)}d.replaceChild(D,C),D.appendChild(C),b.info("🔗 Wrapped node in <a> tag for:",O,L.url)})}catch(m){b.error("❌ Error injecting clickable links:",m)}ie.insertTitle(S,"statediagramTitleText",(o==null?void 0:o.titleTopMargin)??25,a.db.getDiagramTitle()),ee(S,E,rt,(o==null?void 0:o.useMaxWidth)??!0)},"draw"),Ve={getClasses:Ie,draw:Ne,getDir:Kt},St=new Map,M=0;function yt(t="",e=0,s="",a=At){const i=s!==null&&s.length>0?`${a}${s}`:"";return`${Oe}-${t}${i}-${e}`}f(yt,"stateDomId");var we=f((t,e,s,a,i,o,u,p)=>{b.trace("items",e),e.forEach(S=>{switch(S.stmt){case Q:st(t,S,s,a,i,o,u,p);break;case it:st(t,S,s,a,i,o,u,p);break;case Ct:{st(t,S.state1,s,a,i,o,u,p),st(t,S.state2,s,a,i,o,u,p);const T=u==="neo",E={id:"edge"+M,start:S.state1.id,end:S.state2.id,arrowhead:"normal",arrowTypeEnd:T?"arrow_barb_neo":"arrow_barb",style:Yt,labelStyle:"",label:H.sanitizeText(S.description??"",F()),arrowheadStyle:Vt,labelpos:Mt,labelType:Ut,thickness:Wt,classes:jt,look:u};i.push(E),M++}break}})},"setupDoc"),$t=f((t,e=Bt)=>{let s=e;if(t.doc)for(const a of t.doc)a.stmt==="dir"&&(s=a.value);return s},"getDir");function et(t,e,s){if(!e.id||e.id==="</join></fork>"||e.id==="</choice>")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(i=>{const o=s.get(i);o&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...o.styles])}));const a=t.find(i=>i.id===e.id);a?Object.assign(a,e):t.push(e)}f(et,"insertOrUpdateNode");function Xt(t){var e;return((e=t==null?void 0:t.classes)==null?void 0:e.join(" "))??""}f(Xt,"getClassesFromDbInfo");function Jt(t){return(t==null?void 0:t.styles)??[]}f(Jt,"getStylesFromDbInfo");var st=f((t,e,s,a,i,o,u,p)=>{var v,O,w;const S=e.id,T=s.get(S),E=Xt(T),m=Jt(T),L=F();if(b.info("dataFetcher parsedItem",e,T,m),S!=="root"){let C=kt;e.start===!0?C=ye:e.start===!1&&(C=ge),e.type!==it&&(C=e.type),St.get(S)||St.set(S,{id:S,shape:C,description:H.sanitizeText(S,L),cssClasses:`${E} ${me}`,cssStyles:m});const d=St.get(S);e.description&&(Array.isArray(d.description)?(d.shape=Dt,d.description.push(e.description)):(v=d.description)!=null&&v.length&&d.description.length>0?(d.shape=Dt,d.description===S?d.description=[e.description]:d.description=[d.description,e.description]):(d.shape=kt,d.description=e.description),d.description=H.sanitizeTextOrArray(d.description,L)),((O=d.description)==null?void 0:O.length)===1&&d.shape===Dt&&(d.type==="group"?d.shape=Nt:d.shape=kt),!d.type&&e.doc&&(b.info("Setting cluster for XCX",S,$t(e)),d.type="group",d.isGroup=!0,d.dir=$t(e),d.shape=e.type===Gt?It:Nt,d.cssClasses=`${d.cssClasses} ${Ae} ${o?Le:""}`);const D={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:S,dir:d.dir,domId:yt(S,M),type:d.type,isGroup:d.type==="group",padding:8,rx:10,ry:10,look:u,labelType:"markdown"};if(D.shape===It&&(D.label=""),t&&t.id!=="root"&&(b.trace("Setting node ",S," to be child of its parent ",t.id),D.parentId=t.id),D.centerLabel=!0,e.note){const $={labelStyle:"",shape:Te,label:e.note.text,labelType:"markdown",cssClasses:ve,cssStyles:[],cssCompiledStyles:[],id:S+Re+"-"+M,domId:yt(S,M,zt),type:d.type,isGroup:d.type==="group",padding:(w=L.flowchart)==null?void 0:w.padding,look:u,position:e.note.position},B=S+wt,I={labelStyle:"",shape:Ee,label:e.note.text,cssClasses:d.cssClasses,cssStyles:[],id:S+wt,domId:yt(S,M,Ht),type:"group",isGroup:!0,padding:16,look:u,position:e.note.position};M++,I.id=B,$.parentId=B,et(a,I,p),et(a,$,p),et(a,D,p);let G=S,P=$.id;e.note.position==="left of"&&(G=$.id,P=S),i.push({id:G+"-"+P,start:G,end:P,arrowhead:"none",arrowTypeEnd:"",style:Yt,labelStyle:"",classes:De,arrowheadStyle:Vt,labelpos:Mt,labelType:Ut,thickness:Wt,look:u})}else et(a,D,p)}e.doc&&(b.trace("Adding nodes children "),we(e,e.doc,s,a,i,!o,u,p))},"dataFetcher"),$e=f(()=>{St.clear(),M=0},"reset"),A={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Pt=f(()=>new Map,"newClassesList"),Ft=f(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),pt=f(t=>JSON.parse(JSON.stringify(t)),"clone"),z,Me=(z=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Pt(),this.documents={root:Ft()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=re,this.setAccTitle=ae,this.getAccDescription=ne,this.setAccDescription=le,this.setDiagramTitle=oe,this.getDiagramTitle=ce,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 i of Array.isArray(e)?e:e.doc)switch(i.stmt){case Q:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case Ct:this.addRelation(i.state1,i.state2,i.description);break;case fe:this.addStyleClass(i.id.trim(),i.classes);break;case pe:this.handleStyleDef(i);break;case Se:this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip);break}const s=this.getStates(),a=F();$e(),st(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,a.look,this.classes);for(const i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(e){const s=e.id.trim().split(","),a=e.styleClass.split(",");for(const i of s){let o=this.getState(i);if(!o){const u=i.trim();this.addState(u),o=this.getState(u)}o&&(o.styles=a.map(u=>{var p;return(p=u.replace(/;/g,""))==null?void 0:p.trim()}))}}setRootDoc(e){b.info("Setting root doc",e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,s,a){if(s.stmt===Ct){this.docTranslator(e,s.state1,!0),this.docTranslator(e,s.state2,!1);return}if(s.stmt===Q&&(s.id===A.START_NODE?(s.id=e.id+(a?"_start":"_end"),s.start=a):s.id=s.id.trim()),s.stmt!==q&&s.stmt!==Q||!s.doc)return;const i=[];let o=[];for(const u of s.doc)if(u.type===Gt){const p=pt(u);p.doc=pt(o),i.push(p),o=[]}else o.push(u);if(i.length>0&&o.length>0){const u={stmt:Q,id:he(),type:"divider",doc:pt(o)};i.push(pt(u)),s.doc=i}s.doc.forEach(u=>this.docTranslator(s,u,!0))}getRootDocV2(){return this.docTranslator({id:q,stmt:q},{id:q,stmt:q,doc:this.rootDoc},!0),{id:q,doc:this.rootDoc}}addState(e,s=it,a=void 0,i=void 0,o=void 0,u=void 0,p=void 0,S=void 0){const T=e==null?void 0:e.trim();if(!this.currentDocument.states.has(T))b.info("Adding state ",T,i),this.currentDocument.states.set(T,{stmt:Q,id:T,descriptions:[],type:s,doc:a,note:o,classes:[],styles:[],textStyles:[]});else{const E=this.currentDocument.states.get(T);if(!E)throw new Error(`State not found: ${T}`);E.doc||(E.doc=a),E.type||(E.type=s)}if(i&&(b.info("Setting state description",T,i),(Array.isArray(i)?i:[i]).forEach(m=>this.addDescription(T,m.trim()))),o){const E=this.currentDocument.states.get(T);if(!E)throw new Error(`State not found: ${T}`);E.note=o,E.note.text=H.sanitizeText(E.note.text,F())}u&&(b.info("Setting state classes",T,u),(Array.isArray(u)?u:[u]).forEach(m=>this.setCssClass(T,m.trim()))),p&&(b.info("Setting state styles",T,p),(Array.isArray(p)?p:[p]).forEach(m=>this.setStyle(T,m.trim()))),S&&(b.info("Setting state styles",T,p),(Array.isArray(S)?S:[S]).forEach(m=>this.setTextStyle(T,m.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:Ft()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Pt(),e||(this.links=new Map,ue())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){b.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,s,a){this.links.set(e,{url:s,tooltip:a}),b.warn("Adding link",e,s,a)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===A.START_NODE?(this.startEndCount++,`${A.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e="",s=it){return e===A.START_NODE?A.START_TYPE:s}endIdIfNeeded(e=""){return e===A.END_NODE?(this.startEndCount++,`${A.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e="",s=it){return e===A.END_NODE?A.END_TYPE:s}addRelationObjs(e,s,a=""){const i=this.startIdIfNeeded(e.id.trim()),o=this.startTypeIfNeeded(e.id.trim(),e.type),u=this.startIdIfNeeded(s.id.trim()),p=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(i,o,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(u,p,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:i,id2:u,relationTitle:H.sanitizeText(a,F())})}addRelation(e,s,a){if(typeof e=="object"&&typeof s=="object")this.addRelationObjs(e,s,a);else if(typeof e=="string"&&typeof s=="string"){const i=this.startIdIfNeeded(e.trim()),o=this.startTypeIfNeeded(e),u=this.endIdIfNeeded(s.trim()),p=this.endTypeIfNeeded(s);this.addState(i,o),this.addState(u,p),this.currentDocument.relations.push({id1:i,id2:u,relationTitle:a?H.sanitizeText(a,F()):void 0})}}addDescription(e,s){var o;const a=this.currentDocument.states.get(e),i=s.startsWith(":")?s.replace(":","").trim():s;(o=a==null?void 0:a.descriptions)==null||o.push(H.sanitizeText(i,F()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,s=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});const a=this.classes.get(e);s&&a&&s.split(A.STYLECLASS_SEP).forEach(i=>{const o=i.replace(/([^;]*);/,"$1").trim();if(RegExp(A.COLOR_KEYWORD).exec(i)){const p=o.replace(A.FILL_KEYWORD,A.BG_FILL).replace(A.COLOR_KEYWORD,A.FILL_KEYWORD);a.textStyles.push(p)}a.styles.push(o)})}getClasses(){return this.classes}setCssClass(e,s){e.split(",").forEach(a=>{var o;let i=this.getState(a);if(!i){const u=a.trim();this.addState(u),i=this.getState(u)}(o=i==null?void 0:i.classes)==null||o.push(s)})}setStyle(e,s){var a,i;(i=(a=this.getState(e))==null?void 0:a.styles)==null||i.push(s)}setTextStyle(e,s){var a,i;(i=(a=this.getState(e))==null?void 0:a.textStyles)==null||i.push(s)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===Rt)}getDirection(){var e;return((e=this.getDirectionStatement())==null?void 0:e.value)??de}setDirection(e){const s=this.getDirectionStatement();s?s.value=e:this.rootDoc.unshift({stmt:Rt,value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){const e=F();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:Kt(this.getRootDocV2())}}getConfig(){return F().state}},f(z,"StateDB"),z.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},z),Pe=f(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"),Ue=Pe;export{Me as S,Ye as a,Ve as b,Ue as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s}from"./index-
|
|
1
|
+
import{_ as s}from"./index-CuJ2Kdhb.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as i,d as l,U as d,j as o}from"./index-
|
|
1
|
+
import{_ as i,d as l,U as d,j as o}from"./index-CuJ2Kdhb.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,f as b,w as c,x as d,g as e,m as f,h as g,y as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-DI71V5fB.js";import{_ as i}from"./index-CuJ2Kdhb.js";import"./chunk-FMBD7UC4-DxKx7vX-.js";import"./chunk-YZCP3GAM-mW6tkOzW.js";import"./chunk-55IACEB6-DErzjt0v.js";import"./chunk-EDXVE4YY-D_8mpmH-.js";var u={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-DI71V5fB.js";import{_ as i}from"./index-CuJ2Kdhb.js";import"./chunk-FMBD7UC4-DxKx7vX-.js";import"./chunk-YZCP3GAM-mW6tkOzW.js";import"./chunk-55IACEB6-DErzjt0v.js";import"./chunk-EDXVE4YY-D_8mpmH-.js";var u={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as r}from"./_baseUniq-BtieUu_k.js";var e=4;function a(o){return r(o,e)}export{a as c};
|