mermaid
Version:
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
149 lines (124 loc) • 117 kB
JavaScript
import{a as tr}from"./chunk-T5OCTHI4.mjs";import{a as $e,b as je}from"./chunk-7FYTHRHK.mjs";import{a as Je,b as Ze,d as Kt,e as Ft,f as lt,g as Pt}from"./chunk-LII3EMHJ.mjs";import{c as Qe,n as ae,p as X}from"./chunk-QA3QBVWF.mjs";import{a as xr}from"./chunk-KNLZD3CH.mjs";import{$ as Xe,A as St,B as We,D as Q,E as mt,F as re,G as k,O as Ke,S as Fe,T as se,U as qe,V as He,W as ze,X as Ue,Y as Ge,_ as $,a as Ye,t as wt}from"./chunk-67TQ5CYL.mjs";import{b as j,h as kt}from"./chunk-7W6UQGC5.mjs";import{a as x,d as gr}from"./chunk-AQ6EADP3.mjs";var ne=(function(){var e=x(function(ut,w,C,P){for(C=C||{},P=ut.length;P--;C[ut[P]]=w);return C},"o"),t=[1,2],s=[1,3],r=[1,4],n=[2,4],i=[1,9],a=[1,11],l=[1,12],E=[1,14],h=[1,15],c=[1,17],_=[1,18],u=[1,19],y=[1,25],T=[1,26],f=[1,27],g=[1,28],b=[1,29],R=[1,30],O=[1,31],A=[1,32],N=[1,33],S=[1,34],V=[1,35],v=[1,36],H=[1,37],U=[1,38],G=[1,39],J=[1,40],et=[1,42],z=[1,43],at=[1,44],rt=[1,45],nt=[1,46],Y=[1,47],M=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Bt=[1,74],L=[1,80],D=[1,81],dt=[1,82],st=[1,83],W=[1,84],he=[1,85],pe=[1,86],Te=[1,87],Ee=[1,88],ue=[1,89],fe=[1,90],ge=[1,91],xe=[1,92],_e=[1,93],be=[1,94],me=[1,95],Ie=[1,96],ye=[1,97],Re=[1,98],Oe=[1,99],Le=[1,100],Ne=[1,101],Ae=[1,102],we=[1,103],Se=[1,104],ke=[1,105],Pe=[2,78],Nt=[4,5,17,51,53,54],Vt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],De=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Gt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Ce=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Xt=[5,52],F=[70,71,72,73],ot=[1,151],Jt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(w,C,P,m,q,o,At){var p=o.length-1;switch(q){case 3:return m.apply(o[p]),o[p];break;case 4:case 10:this.$=[];break;case 5:case 11:o[p-1].push(o[p]),this.$=o[p-1];break;case 6:case 7:case 12:case 13:this.$=o[p];break;case 8:case 9:case 14:this.$=[];break;case 16:o[p].type="createParticipant",this.$=o[p];break;case 17:o[p-1].unshift({type:"boxStart",boxData:m.parseBoxData(o[p-2])}),o[p-1].push({type:"boxEnd",boxText:o[p-2]}),this.$=o[p-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(o[p-2]),sequenceIndexStep:Number(o[p-1]),sequenceVisible:!0,signalType:m.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(o[p-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:m.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:m.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:m.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:m.LINETYPE.ACTIVE_START,actor:o[p-1].actor};break;case 24:this.$={type:"activeEnd",signalType:m.LINETYPE.ACTIVE_END,actor:o[p-1].actor};break;case 30:m.setDiagramTitle(o[p].substring(6)),this.$=o[p].substring(6);break;case 31:m.setDiagramTitle(o[p].substring(7)),this.$=o[p].substring(7);break;case 32:this.$=o[p].trim(),m.setAccTitle(this.$);break;case 33:case 34:this.$=o[p].trim(),m.setAccDescription(this.$);break;case 35:o[p-1].unshift({type:"loopStart",loopText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.LOOP_START}),o[p-1].push({type:"loopEnd",loopText:o[p-2],signalType:m.LINETYPE.LOOP_END}),this.$=o[p-1];break;case 36:o[p-1].unshift({type:"rectStart",color:m.parseMessage(o[p-2]),signalType:m.LINETYPE.RECT_START}),o[p-1].push({type:"rectEnd",color:m.parseMessage(o[p-2]),signalType:m.LINETYPE.RECT_END}),this.$=o[p-1];break;case 37:o[p-1].unshift({type:"optStart",optText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.OPT_START}),o[p-1].push({type:"optEnd",optText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.OPT_END}),this.$=o[p-1];break;case 38:o[p-1].unshift({type:"altStart",altText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.ALT_START}),o[p-1].push({type:"altEnd",signalType:m.LINETYPE.ALT_END}),this.$=o[p-1];break;case 39:o[p-1].unshift({type:"parStart",parText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.PAR_START}),o[p-1].push({type:"parEnd",signalType:m.LINETYPE.PAR_END}),this.$=o[p-1];break;case 40:o[p-1].unshift({type:"parStart",parText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.PAR_OVER_START}),o[p-1].push({type:"parEnd",signalType:m.LINETYPE.PAR_END}),this.$=o[p-1];break;case 41:o[p-1].unshift({type:"criticalStart",criticalText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.CRITICAL_START}),o[p-1].push({type:"criticalEnd",signalType:m.LINETYPE.CRITICAL_END}),this.$=o[p-1];break;case 42:o[p-1].unshift({type:"breakStart",breakText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.BREAK_START}),o[p-1].push({type:"breakEnd",optText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.BREAK_END}),this.$=o[p-1];break;case 44:this.$=o[p-3].concat([{type:"option",optionText:m.parseMessage(o[p-1]),signalType:m.LINETYPE.CRITICAL_OPTION},o[p]]);break;case 46:this.$=o[p-3].concat([{type:"and",parText:m.parseMessage(o[p-1]),signalType:m.LINETYPE.PAR_AND},o[p]]);break;case 48:this.$=o[p-3].concat([{type:"else",altText:m.parseMessage(o[p-1]),signalType:m.LINETYPE.ALT_ELSE},o[p]]);break;case 49:o[p-3].draw="participant",o[p-3].type="addParticipant",o[p-3].description=m.parseMessage(o[p-1]),this.$=o[p-3];break;case 50:o[p-1].draw="participant",o[p-1].type="addParticipant",this.$=o[p-1];break;case 51:o[p-3].draw="actor",o[p-3].type="addParticipant",o[p-3].description=m.parseMessage(o[p-1]),this.$=o[p-3];break;case 52:case 57:o[p-1].draw="actor",o[p-1].type="addParticipant",this.$=o[p-1];break;case 53:o[p-1].type="destroyParticipant",this.$=o[p-1];break;case 54:o[p-3].draw="participant",o[p-3].type="addParticipant",o[p-3].description=m.parseMessage(o[p-1]),this.$=o[p-3];break;case 55:o[p-1].draw="participant",o[p-1].type="addParticipant",this.$=o[p-1];break;case 56:o[p-3].draw="actor",o[p-3].type="addParticipant",o[p-3].description=m.parseMessage(o[p-1]),this.$=o[p-3];break;case 58:this.$=[o[p-1],{type:"addNote",placement:o[p-2],actor:o[p-1].actor,text:o[p]}];break;case 59:o[p-2]=[].concat(o[p-1],o[p-1]).slice(0,2),o[p-2][0]=o[p-2][0].actor,o[p-2][1]=o[p-2][1].actor,this.$=[o[p-1],{type:"addNote",placement:m.PLACEMENT.OVER,actor:o[p-2].slice(0,2),text:o[p]}];break;case 60:this.$=[o[p-1],{type:"addLinks",actor:o[p-1].actor,text:o[p]}];break;case 61:this.$=[o[p-1],{type:"addALink",actor:o[p-1].actor,text:o[p]}];break;case 62:this.$=[o[p-1],{type:"addProperties",actor:o[p-1].actor,text:o[p]}];break;case 63:this.$=[o[p-1],{type:"addDetails",actor:o[p-1].actor,text:o[p]}];break;case 66:this.$=[o[p-2],o[p]];break;case 67:this.$=o[p];break;case 68:this.$=m.PLACEMENT.LEFTOF;break;case 69:this.$=m.PLACEMENT.RIGHTOF;break;case 70:this.$=[o[p-4],o[p-1],{type:"addMessage",from:o[p-4].actor,to:o[p-1].actor,signalType:o[p-3],msg:o[p],activate:!0},{type:"activeStart",signalType:m.LINETYPE.ACTIVE_START,actor:o[p-1].actor}];break;case 71:this.$=[o[p-4],o[p-1],{type:"addMessage",from:o[p-4].actor,to:o[p-1].actor,signalType:o[p-3],msg:o[p]},{type:"activeEnd",signalType:m.LINETYPE.ACTIVE_END,actor:o[p-4].actor}];break;case 72:this.$=[o[p-4],o[p-1],{type:"addMessage",from:o[p-4].actor,to:o[p-1].actor,signalType:o[p-3],msg:o[p],activate:!0,centralConnection:m.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:m.LINETYPE.CENTRAL_CONNECTION,actor:o[p-1].actor}];break;case 73:this.$=[o[p-4],o[p-1],{type:"addMessage",from:o[p-4].actor,to:o[p-1].actor,signalType:o[p-2],msg:o[p],activate:!1,centralConnection:m.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:m.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[p-4].actor}];break;case 74:this.$=[o[p-5],o[p-1],{type:"addMessage",from:o[p-5].actor,to:o[p-1].actor,signalType:o[p-3],msg:o[p],activate:!0,centralConnection:m.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:m.LINETYPE.CENTRAL_CONNECTION,actor:o[p-1].actor},{type:"centralConnectionReverse",signalType:m.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[p-5].actor}];break;case 75:this.$=[o[p-3],o[p-1],{type:"addMessage",from:o[p-3].actor,to:o[p-1].actor,signalType:o[p-2],msg:o[p]}];break;case 76:this.$={type:"addParticipant",actor:o[p-1],config:o[p]};break;case 77:this.$=o[p-1].trim();break;case 78:this.$={type:"addParticipant",actor:o[p]};break;case 79:this.$=m.LINETYPE.SOLID_OPEN;break;case 80:this.$=m.LINETYPE.DOTTED_OPEN;break;case 81:this.$=m.LINETYPE.SOLID;break;case 82:this.$=m.LINETYPE.SOLID_TOP;break;case 83:this.$=m.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=m.LINETYPE.STICK_TOP;break;case 85:this.$=m.LINETYPE.STICK_BOTTOM;break;case 86:this.$=m.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=m.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=m.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=m.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=m.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=m.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=m.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=m.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=m.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=m.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=m.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=m.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=m.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=m.LINETYPE.DOTTED;break;case 100:this.$=m.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=m.LINETYPE.SOLID_CROSS;break;case 102:this.$=m.LINETYPE.DOTTED_CROSS;break;case 103:this.$=m.LINETYPE.SOLID_POINT;break;case 104:this.$=m.LINETYPE.DOTTED_POINT;break;case 105:this.$=m.parseMessage(o[p].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:s,6:r},{1:[3]},{3:5,4:t,5:s,6:r},{3:6,4:t,5:s,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},e(M,[2,5]),{9:48,13:13,14:E,15:h,18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},e(M,[2,7]),e(M,[2,8]),e(M,[2,9]),e(M,[2,15]),{13:49,51:U,53:G,54:J},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(M,[2,30]),e(M,[2,31]),{33:[1,62]},{35:[1,63]},e(M,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Bt},{23:75,55:76,73:Bt},{23:77,73:Y},{69:78,72:[1,79],78:L,79:D,80:dt,81:st,82:W,83:he,84:pe,85:Te,86:Ee,87:ue,88:fe,89:ge,90:xe,91:_e,92:be,93:me,94:Ie,95:ye,96:Re,97:Oe,98:Le,99:Ne,100:Ae,101:we,102:Se,103:ke},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Pe),e(M,[2,6]),e(M,[2,16]),e(Nt,[2,10],{11:114}),e(M,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(M,[2,22]),{5:[1,118]},{5:[1,119]},e(M,[2,25]),e(M,[2,26]),e(M,[2,27]),e(M,[2,28]),e(M,[2,29]),e(M,[2,32]),e(M,[2,33]),e(Vt,n,{7:120}),e(Vt,n,{7:121}),e(Vt,n,{7:122}),e(De,n,{41:123,7:124}),e(Gt,n,{43:125,7:126}),e(Gt,n,{7:126,43:127}),e(Ce,n,{46:128,7:129}),e(Vt,n,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Xt,Pe,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:L,79:D,80:dt,81:st,82:W,83:he,84:pe,85:Te,86:Ee,87:ue,88:fe,89:ge,90:xe,91:_e,92:be,93:me,94:Ie,95:ye,96:Re,97:Oe,98:Le,99:Ne,100:Ae,101:we,102:Se,103:ke},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:J},{5:[1,160]},e(M,[2,20]),e(M,[2,21]),e(M,[2,23]),e(M,[2,24]),{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[1,161],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[1,162],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[1,163],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{17:[1,164]},{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[2,47],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,50:[1,165],51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{17:[1,166]},{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[2,45],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,49:[1,167],51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{17:[1,168]},{17:[1,169]},{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[2,43],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,48:[1,170],51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[1,171],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{16:[1,172]},e(M,[2,50]),{16:[1,173]},e(M,[2,55]),e(Xt,[2,76]),{76:[1,174]},{16:[1,175]},e(M,[2,52]),{16:[1,176]},e(M,[2,57]),e(M,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(M,[2,17]),e(Nt,[2,11]),{13:186,51:U,53:G,54:J},e(Nt,[2,13]),e(Nt,[2,14]),e(M,[2,19]),e(M,[2,35]),e(M,[2,36]),e(M,[2,37]),e(M,[2,38]),{16:[1,187]},e(M,[2,39]),{16:[1,188]},e(M,[2,40]),e(M,[2,41]),{16:[1,189]},e(M,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(Nt,[2,12]),e(De,n,{7:124,41:201}),e(Gt,n,{7:126,43:202}),e(Ce,n,{7:129,46:203}),e(M,[2,49]),e(M,[2,54]),e(Xt,[2,77]),e(M,[2,51]),e(M,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(w,C){if(C.recoverable)this.trace(w);else{var P=new Error(w);throw P.hash=C,P}},"parseError"),parse:x(function(w){var C=this,P=[0],m=[],q=[null],o=[],At=this.table,p="",vt=0,Me=0,Be=0,Tr=2,Ve=1,Er=o.slice.call(arguments,1),Z=Object.create(this.lexer),_t={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(_t.yy[Qt]=this.yy[Qt]);Z.setInput(w,_t.yy),_t.yy.lexer=Z,_t.yy.parser=this,typeof Z.yylloc>"u"&&(Z.yylloc={});var $t=Z.yylloc;o.push($t);var ur=Z.options&&Z.options.ranges;typeof _t.yy.parseError=="function"?this.parseError=_t.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Es(it){P.length=P.length-2*it,q.length=q.length-it,o.length=o.length-it}x(Es,"popStack");function fr(){var it;return it=m.pop()||Z.lex()||Ve,typeof it!="number"&&(it instanceof Array&&(m=it,it=m.pop()),it=C.symbols_[it]||it),it}x(fr,"lex");for(var tt,jt,bt,ct,us,te,Ot={},Yt,pt,ve,Wt;;){if(bt=P[P.length-1],this.defaultActions[bt]?ct=this.defaultActions[bt]:((tt===null||typeof tt>"u")&&(tt=fr()),ct=At[bt]&&At[bt][tt]),typeof ct>"u"||!ct.length||!ct[0]){var ee="";Wt=[];for(Yt in At[bt])this.terminals_[Yt]&&Yt>Tr&&Wt.push("'"+this.terminals_[Yt]+"'");Z.showPosition?ee="Parse error on line "+(vt+1)+`:
`+Z.showPosition()+`
Expecting `+Wt.join(", ")+", got '"+(this.terminals_[tt]||tt)+"'":ee="Parse error on line "+(vt+1)+": Unexpected "+(tt==Ve?"end of input":"'"+(this.terminals_[tt]||tt)+"'"),this.parseError(ee,{text:Z.match,token:this.terminals_[tt]||tt,line:Z.yylineno,loc:$t,expected:Wt})}if(ct[0]instanceof Array&&ct.length>1)throw new Error("Parse Error: multiple actions possible at state: "+bt+", token: "+tt);switch(ct[0]){case 1:P.push(tt),q.push(Z.yytext),o.push(Z.yylloc),P.push(ct[1]),tt=null,jt?(tt=jt,jt=null):(Me=Z.yyleng,p=Z.yytext,vt=Z.yylineno,$t=Z.yylloc,Be>0&&Be--);break;case 2:if(pt=this.productions_[ct[1]][1],Ot.$=q[q.length-pt],Ot._$={first_line:o[o.length-(pt||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(pt||1)].first_column,last_column:o[o.length-1].last_column},ur&&(Ot._$.range=[o[o.length-(pt||1)].range[0],o[o.length-1].range[1]]),te=this.performAction.apply(Ot,[p,Me,vt,_t.yy,ct[1],q,o].concat(Er)),typeof te<"u")return te;pt&&(P=P.slice(0,-1*pt*2),q=q.slice(0,-1*pt),o=o.slice(0,-1*pt)),P.push(this.productions_[ct[1]][0]),q.push(Ot.$),o.push(Ot._$),ve=At[P[P.length-2]][P[P.length-1]],P.push(ve);break;case 3:return!0}}return!0},"parse")},pr=(function(){var ut={EOF:1,parseError:x(function(C,P){if(this.yy.parser)this.yy.parser.parseError(C,P);else throw new Error(C)},"parseError"),setInput:x(function(w,C){return this.yy=C||this.yy||{},this._input=w,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:x(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var C=w.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:x(function(w){var C=w.length,P=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var m=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),P.length-1&&(this.yylineno-=P.length-1);var q=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:P?(P.length===m.length?this.yylloc.first_column:0)+m[m.length-P.length].length-P[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[q[0],q[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(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).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(w){this.unput(this.match.slice(w))},"less"),pastInput:x(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var w=this.pastInput(),C=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
`+C+"^"},"showPosition"),test_match:x(function(w,C){var P,m,q;if(this.options.backtrack_lexer&&(q={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&&(q.yylloc.range=this.yylloc.range.slice(0))),m=w[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,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(w[0].length),this.matched+=w[0],P=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),P)return P;if(this._backtrack){for(var o in q)this[o]=q[o];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,C,P,m;this._more||(this.yytext="",this.match="");for(var q=this._currentRules(),o=0;o<q.length;o++)if(P=this._input.match(this.rules[q[o]]),P&&(!C||P[0].length>C[0].length)){if(C=P,m=o,this.options.backtrack_lexer){if(w=this.test_match(P,q[o]),w!==!1)return w;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(w=this.test_match(C,q[m]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var C=this.next();return C||this.lex()},"lex"),begin:x(function(C){this.conditionStack.push(C)},"begin"),popState:x(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(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:x(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:x(function(C){this.begin(C)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(C,P,m,q){var o=q;switch(m){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;break;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;break;case 10:return this.popState(),this.popState(),77;break;case 11:return P.yytext=P.yytext.trim(),73;break;case 12:return P.yytext=P.yytext.trim(),this.begin("ALIAS"),73;break;case 13:return P.yytext=P.yytext.trim(),this.popState(),73;break;case 14:return this.popState(),10;break;case 15:return P.yytext=P.yytext.trim(),this.popState(),10;break;case 16:return this.begin("LINE"),15;break;case 17:return this.begin("ID"),51;break;case 18:return this.begin("ID"),53;break;case 19:return 14;case 20:return this.begin("ID"),54;break;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;break;case 22:return this.popState(),this.popState(),5;break;case 23:return this.begin("LINE"),37;break;case 24:return this.begin("LINE"),38;break;case 25:return this.begin("LINE"),39;break;case 26:return this.begin("LINE"),40;break;case 27:return this.begin("LINE"),50;break;case 28:return this.begin("LINE"),42;break;case 29:return this.begin("LINE"),44;break;case 30:return this.begin("LINE"),49;break;case 31:return this.begin("LINE"),45;break;case 32:return this.begin("LINE"),48;break;case 33:return this.begin("LINE"),47;break;case 34:return this.popState(),16;break;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;break;case 45:return this.begin("ID"),24;break;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;break;case 49:return this.popState(),"acc_title_value";break;case 50:return this.begin("acc_descr"),34;break;case 51:return this.popState(),"acc_descr_value";break;case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return P.yytext=P.yytext.trim(),73;break;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return ut})();Jt.lexer=pr;function Zt(){this.yy={}}return x(Zt,"Parser"),Zt.prototype=Jt,Jt.Parser=Zt,new Zt})();ne.parser=ne;var er=ne;var _r={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},br={FILLED:0,OPEN:1},mr={LEFTOF:0,RIGHTOF:1,OVER:2},Dt={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},qt=class{constructor(){this.state=new tr(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0}));this.setAccTitle=se;this.setAccDescription=He;this.setDiagramTitle=Ue;this.getAccTitle=qe;this.getAccDescription=ze;this.getDiagramTitle=Ge;this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap($().wrap),this.LINETYPE=_r,this.ARROWTYPE=br,this.PLACEMENT=mr}static{x(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,s,r,n,i){let a=this.state.records.currentBox,l;if(i!==void 0){let h;i.includes(`
`)?h=i+`
`:h=`{
`+i+`
}`,l=je(h,{schema:$e})}n=l?.type??n,l?.alias&&(!r||r.text===s)&&(r={text:l.alias,wrap:r?.wrap,type:n});let E=this.state.records.actors.get(t);if(E){if(this.state.records.currentBox&&E.box&&this.state.records.currentBox!==E.box)throw new Error(`A same participant should only be defined in one Box: ${E.name} can't be in '${E.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=E.box?E.box:this.state.records.currentBox,E.box=a,E&&s===E.name&&r==null)return}if(r?.text==null&&(r={text:s,type:n}),(n==null||r.text==null)&&(r={text:s,type:n}),this.state.records.actors.set(t,{box:a,name:s,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),this.state.records.prevActor){let h=this.state.records.actors.get(this.state.records.prevActor);h&&(h.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let s,r=0;if(!t)return 0;for(s=0;s<this.state.records.messages.length;s++)this.state.records.messages[s].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[s].from===t&&r++,this.state.records.messages[s].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[s].from===t&&r--;return r}addMessage(t,s,r,n){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:s,message:r.text,wrap:r.wrap??this.autoWrap(),answer:n})}addSignal(t,s,r,n,i=!1,a){if(n===this.LINETYPE.ACTIVE_END&&this.activationCount(t??"")<1){let E=new Error("Trying to inactivate an inactive participant ("+t+")");throw E.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},E}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:s,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:n,activate:i,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(t===void 0)return{};t=t.trim();let s=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(s===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:s}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:$().sequence?.wrap??!1}clear(){this.state.reset(),Fe()}parseMessage(t){let s=t.trim(),{wrap:r,cleanedText:n}=this.extractWrap(s),i={text:n,wrap:r};return j.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(t){let s=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),r=s?.[1]?s[1].trim():"transparent",n=s?.[2]?s[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",n=t.trim());else{let l=new Option().style;l.color=r,l.color!==r&&(r="transparent",n=t.trim())}let{wrap:i,cleanedText:a}=this.extractWrap(n);return{text:a?St(a,$()):void 0,color:r,wrap:i}}addNote(t,s,r){let n={actor:t,placement:s,message:r.text,wrap:r.wrap??this.autoWrap()},i=[].concat(t,t);this.state.records.notes.push(n),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:s})}addLinks(t,s){let r=this.getActor(t);try{let n=St(s.text,$());n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");let i=JSON.parse(n);this.insertLinks(r,i)}catch(n){j.error("error while parsing actor link text",n)}}addALink(t,s){let r=this.getActor(t);try{let n={},i=St(s.text,$()),a=i.indexOf("@");i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");let l=i.slice(0,a-1).trim(),E=i.slice(a+1).trim();n[l]=E,this.insertLinks(r,n)}catch(n){j.error("error while parsing actor link text",n)}}insertLinks(t,s){if(t.links==null)t.links=s;else for(let r in s)t.links[r]=s[r]}addProperties(t,s){let r=this.getActor(t);try{let n=St(s.text,$()),i=JSON.parse(n);this.insertProperties(r,i)}catch(n){j.error("error while parsing actor properties text",n)}}insertProperties(t,s){if(t.properties==null)t.properties=s;else for(let r in s)t.properties[r]=s[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,s){let r=this.getActor(t),n=document.getElementById(s.text);try{let i=n.innerHTML,a=JSON.parse(i);a.properties&&this.insertProperties(r,a.properties),a.links&&this.insertLinks(r,a.links)}catch(i){j.error("error while parsing actor details text",i)}}getActorProperty(t,s){if(t?.properties!==void 0)return t.properties[s]}apply(t){if(Array.isArray(t))t.forEach(s=>{this.apply(s)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnection":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnectionReverse":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":se(t.text);break;case"parStart":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break}}getConfig(){return $().sequence}};var Ir=x(e=>{let t=e.dropShadow??"none",{look:s}=$();return`.actor {
stroke: ${e.actorBorder};
fill: ${e.actorBkg};
stroke-width: ${e.strokeWidth??1};
}
rect.actor.outer-path[data-look="neo"] {
filter: ${t};
}
rect.note[data-look="neo"] {
stroke:${e.noteBorderColor};
fill:${e.noteBkgColor};
filter: ${t};
}
text.actor > tspan {
fill: ${e.actorTextColor};
stroke: none;
}
.actor-line {
stroke: ${e.actorLineColor};
}
.innerArc {
stroke-width: 1.5;
stroke-dasharray: none;
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: none;
stroke: ${e.signalColor};
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: 2, 2;
stroke: ${e.signalColor};
}
[id$="-arrowhead"] path {
fill: ${e.signalColor};
stroke: ${e.signalColor};
}
.sequenceNumber {
fill: ${e.sequenceNumberColor};
}
[id$="-sequencenumber"] {
fill: ${e.signalColor};
}
[id$="-crosshead"] path {
fill: ${e.signalColor};
stroke: ${e.signalColor};
}
.messageText {
fill: ${e.signalTextColor};
stroke: none;
}
.labelBox {
stroke: ${e.labelBoxBorderColor};
fill: ${e.labelBoxBkgColor};
filter: ${s==="neo"?t:"none"};
}
.labelText, .labelText > tspan {
fill: ${e.labelTextColor};
stroke: none;
}
.loopText, .loopText > tspan {
fill: ${e.loopTextColor};
stroke: none;
}
.sectionTitle, .sectionTitle > tspan {
fill: ${e.loopTextColor};
stroke: none;
}
.loopLine {
stroke-width: 2px;
stroke-dasharray: 2, 2;
stroke: ${e.labelBoxBorderColor};
fill: ${e.labelBoxBorderColor};
}
.note {
//stroke: #decc93;
stroke: ${e.noteBorderColor};
fill: ${e.noteBkgColor};
}
.noteText, .noteText > tspan {
fill: ${e.noteTextColor};
stroke: none;
${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:""}
}
.activation0 {
fill: ${e.activationBkgColor};
stroke: ${e.activationBorderColor};
}
.activation1 {
fill: ${e.activationBkgColor};
stroke: ${e.activationBorderColor};
}
.activation2 {
fill: ${e.activationBkgColor};
stroke: ${e.activationBorderColor};
}
.actorPopupMenu {
position: absolute;
}
.actorPopupMenuPanel {
position: absolute;
fill: ${e.actorBkg};
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
}
.actor-man circle, line {
fill: ${e.actorBkg};
stroke-width: 2px;
}
g rect.rect {
filter: ${t};
stroke: ${e.nodeBorder};
}
`},"getStyles"),rr=Ir;var ie=gr(xr(),1);var ft=36,gt="actor-top",xt="actor-bottom",Ht="actor-box",It="actor-man",Tt=new Set(["redux-color","redux-dark-color"]),Ct=x(function(e,t){let s=Je(e,t);return wt().look==="neo"&&s.attr("data-look","neo"),s},"drawRect"),Rr=x(function(e,t,s,r,n){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let i=t.links,a=t.actorCnt,l=t.rectData;var E="none";n&&(E="block !important");let h=e.append("g");h.attr("id","actor"+a+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",E);var c="";l.class!==void 0&&(c=" "+l.class);let _=l.width>s?l.width:s,u=h.append("rect");if(u.attr("class","actorPopupMenuPanel"+c),u.attr("x",l.x),u.attr("y",l.height),u.attr("fill",l.fill),u.attr("stroke",l.stroke),u.attr("width",_),u.attr("height",l.height),u.attr("rx",l.rx),u.attr("ry",l.ry),i!=null){var y=20;for(let g in i){var T=h.append("a"),f=(0,ie.sanitizeUrl)(i[g]);T.attr("xlink:href",f),T.attr("target","_blank"),Gr(r)(g,T,l.x+10,l.height+y,_,20,{class:"actor"},r),y+=30}}return u.attr("height",y),{height:l.height+y,width:_}},"drawPopup"),zt=x(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Mt=x(async function(e,t,s=null){let r=e.append("foreignObject"),n=await re(t.text,wt()),a=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(n).node().getBoundingClientRect();if(r.attr("height",Math.round(a.height)).attr("width",Math.round(a.width)),t.class==="noteText"){let l=e.node().firstChild;l.setAttribute("height",a.height+2*t.textMargin);let E=l.getBBox();r.attr("x",Math.round(E.x+E.width/2-a.width/2)).attr("y",Math.round(E.y+E.height/2-a.height/2))}else if(s){let{startx:l,stopx:E,starty:h}=s;if(l>E){let c=l;l=E,E=c}r.attr("x",Math.round(l+Math.abs(l-E)/2-a.width/2)),t.class==="loopText"?r.attr("y",Math.round(h)):r.attr("y",Math.round(h-a.height))}return[r]},"drawKatex"),yt=x(function(e,t){let s=0,r=0,n=t.text.split(k.lineBreakRegex),[i,a]=ae(t.fontSize),l=[],E=0,h=x(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":h=x(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":h=x(()=>Math.round(t.y+(s+r+t.textMargin)/2),"yfunc");break;case"bottom":case"end":h=x(()=>Math.round(t.y+(s+r+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[c,_]of n.entries()){t.textMargin!==void 0&&t.textMargin===0&&i!==void 0&&(E=c*i);let u=e.append("text");u.attr("x",t.x),u.attr("y",h()),t.anchor!==void 0&&u.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&u.style("font-family",t.fontFamily),a!==void 0&&u.style("font-size",a),t.fontWeight!==void 0&&u.style("font-weight",t.fontWeight),t.fill!==void 0&&u.attr("fill",t.fill),t.class!==void 0&&u.attr("class",t.class),t.dy!==void 0?u.attr("dy",t.dy):E!==0&&u.attr("dy",E);let y=_||Qe;if(t.tspan){let T=u.append("tspan");T.attr("x",t.x),t.fill!==void 0&&T.attr("fill",t.fill),T.text(y)}else u.text(y);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(u._groups||u)[0][0].getBBox().height,s=r),l.push(u)}return l},"drawText"),sr=x(function(e,t){function s(n,i,a,l,E){return n+","+i+" "+(n+a)+","+i+" "+(n+a)+","+(i+l-E)+" "+(n+a-E*1.2)+","+(i+l)+" "+n+","+(i+l)}x(s,"genPoints");let r=e.append("polygon");return r.attr("points",s(t.x,t.y,t.width,t.height,7)),r.attr("class","labelBox"),t.y=t.y+t.height/2,yt(e,t),r},"drawLabel"),B=-1,oe=x((e,t,s,r)=>{e.select&&s.forEach(n=>{let i=t.get(n),a=e.select("#actor"+i.actorCnt);!r.mirrorActors&&i.stopy?a.attr("y2",i.stopy+i.height/2):r.mirrorActors&&a.attr("y2",i.stopy)})},"fixLifeLineHeights"),Or=x(func