ranui
Version:
A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.
149 lines (124 loc) • 120 kB
JavaScript
const g=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),j=require("./src-C9EhKhbk.cjs"),I=require("./chunk-WYO6CB5R-u4mJNOcO.cjs"),He=require("./dist-C20XxSsP.cjs"),Q=require("./chunk-ICXQ74PX-BbT9JaEW.cjs"),X=require("./chunk-32BRIVSS-BXVdG_nV.cjs"),ze=require("./chunk-2Q5K7J3B-CTMy5FII.cjs"),Le=require("./chunk-ZIRB5QZD-aLu-4ITN.cjs");var Ae=He.require_dist(),Jt=(function(){var e=g.__name(function(N,v,M,B){for(M=M||{},B=N.length;B--;M[N[B]]=v);return M},"o"),t=[1,2],r=[1,3],a=[1,4],n=[2,4],i=[1,9],s=[1,11],o=[1,12],_=[1,14],T=[1,15],d=[1,17],m=[1,18],E=[1,19],L=[1,25],p=[1,26],f=[1,27],u=[1,28],x=[1,29],O=[1,30],b=[1,31],A=[1,32],P=[1,33],k=[1,34],C=[1,35],W=[1,36],K=[1,37],U=[1,38],G=[1,39],Z=[1,40],nt=[1,42],et=[1,43],z=[1,44],st=[1,45],at=[1,46],Y=[1,47],D=[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],Lt=[1,74],Nt=[1,80],S=[1,81],w=[1,82],lt=[1,83],rt=[1,84],q=[1,85],It=[1,86],$t=[1,87],jt=[1,88],te=[1,89],ee=[1,90],ae=[1,91],re=[1,92],se=[1,93],ne=[1,94],ie=[1,95],oe=[1,96],ce=[1,97],le=[1,98],de=[1,99],he=[1,100],Te=[1,101],pe=[1,102],Ee=[1,103],_e=[1,104],ue=[1,105],fe=[2,78],bt=[4,5,17,51,53,54],wt=[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],ge=[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],Wt=[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],me=[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],Kt=[5,52],F=[70,71,72,73],it=[1,151],qt={trace:g.__name(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:g.__name(function(v,M,B,y,J,c,St){var h=c.length-1;switch(J){case 3:return y.apply(c[h]),c[h];case 4:case 10:this.$=[];break;case 5:case 11:c[h-1].push(c[h]),this.$=c[h-1];break;case 6:case 7:case 12:case 13:this.$=c[h];break;case 8:case 9:case 14:this.$=[];break;case 16:c[h].type="createParticipant",this.$=c[h];break;case 17:c[h-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[h-2])}),c[h-1].push({type:"boxEnd",boxText:c[h-2]}),this.$=c[h-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-2]),sequenceIndexStep:Number(c[h-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-1].actor};break;case 30:y.setDiagramTitle(c[h].substring(6)),this.$=c[h].substring(6);break;case 31:y.setDiagramTitle(c[h].substring(7)),this.$=c[h].substring(7);break;case 32:this.$=c[h].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[h].trim(),y.setAccDescription(this.$);break;case 35:c[h-1].unshift({type:"loopStart",loopText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.LOOP_START}),c[h-1].push({type:"loopEnd",loopText:c[h-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[h-1];break;case 36:c[h-1].unshift({type:"rectStart",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_START}),c[h-1].push({type:"rectEnd",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[h-1];break;case 37:c[h-1].unshift({type:"optStart",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_START}),c[h-1].push({type:"optEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[h-1];break;case 38:c[h-1].unshift({type:"altStart",altText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.ALT_START}),c[h-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[h-1];break;case 39:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 40:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 41:c[h-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.CRITICAL_START}),c[h-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[h-1];break;case 42:c[h-1].unshift({type:"breakStart",breakText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_START}),c[h-1].push({type:"breakEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[h-1];break;case 44:this.$=c[h-3].concat([{type:"option",optionText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[h]]);break;case 46:this.$=c[h-3].concat([{type:"and",parText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.PAR_AND},c[h]]);break;case 48:this.$=c[h-3].concat([{type:"else",altText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.ALT_ELSE},c[h]]);break;case 49:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 50:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 51:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 52:case 57:c[h-1].draw="actor",c[h-1].type="addParticipant",this.$=c[h-1];break;case 53:c[h-1].type="destroyParticipant",this.$=c[h-1];break;case 54:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 55:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 56:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 58:this.$=[c[h-1],{type:"addNote",placement:c[h-2],actor:c[h-1].actor,text:c[h]}];break;case 59:c[h-2]=[].concat(c[h-1],c[h-1]).slice(0,2),c[h-2][0]=c[h-2][0].actor,c[h-2][1]=c[h-2][1].actor,this.$=[c[h-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[h-2].slice(0,2),text:c[h]}];break;case 60:this.$=[c[h-1],{type:"addLinks",actor:c[h-1].actor,text:c[h]}];break;case 61:this.$=[c[h-1],{type:"addALink",actor:c[h-1].actor,text:c[h]}];break;case 62:this.$=[c[h-1],{type:"addProperties",actor:c[h-1].actor,text:c[h]}];break;case 63:this.$=[c[h-1],{type:"addDetails",actor:c[h-1].actor,text:c[h]}];break;case 66:this.$=[c[h-2],c[h]];break;case 67:this.$=c[h];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor}];break;case 71:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-4].actor}];break;case 72:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor}];break;case 73:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-4].actor}];break;case 74:this.$=[c[h-5],c[h-1],{type:"addMessage",from:c[h-5].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-5].actor}];break;case 75:this.$=[c[h-3],c[h-1],{type:"addMessage",from:c[h-3].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h]}];break;case 76:this.$={type:"addParticipant",actor:c[h-1],config:c[h]};break;case 77:this.$=c[h-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[h]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[h].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:r,6:a},{1:[3]},{3:5,4:t,5:r,6:a},{3:6,4:t,5:r,6:a},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:s,8:8,9:10,10:o,13:13,14:_,15:T,18:16,19:d,22:m,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:L,31:p,32:f,34:u,36:x,37:O,38:b,39:A,40:P,42:k,44:C,45:W,47:K,51:U,53:G,54:Z,56:nt,61:et,62:z,63:st,64:at,73:Y},e(D,[2,5]),{9:48,13:13,14:_,15:T,18:16,19:d,22:m,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:L,31:p,32:f,34:u,36:x,37:O,38:b,39:A,40:P,42:k,44:C,45:W,47:K,51:U,53:G,54:Z,56:nt,61:et,62:z,63:st,64:at,73:Y},e(D,[2,7]),e(D,[2,8]),e(D,[2,9]),e(D,[2,15]),{13:49,51:U,53:G,54:Z},{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(D,[2,30]),e(D,[2,31]),{33:[1,62]},{35:[1,63]},e(D,[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:Lt},{23:75,55:76,73:Lt},{23:77,73:Y},{69:78,72:[1,79],78:Nt,79:S,80:w,81:lt,82:rt,83:q,84:It,85:$t,86:jt,87:te,88:ee,89:ae,90:re,91:se,92:ne,93:ie,94:oe,95:ce,96:le,97:de,98:he,99:Te,100:pe,101:Ee,102:_e,103:ue},{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],fe),e(D,[2,6]),e(D,[2,16]),e(bt,[2,10],{11:114}),e(D,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(D,[2,22]),{5:[1,118]},{5:[1,119]},e(D,[2,25]),e(D,[2,26]),e(D,[2,27]),e(D,[2,28]),e(D,[2,29]),e(D,[2,32]),e(D,[2,33]),e(wt,n,{7:120}),e(wt,n,{7:121}),e(wt,n,{7:122}),e(ge,n,{41:123,7:124}),e(Wt,n,{43:125,7:126}),e(Wt,n,{7:126,43:127}),e(me,n,{46:128,7:129}),e(wt,n,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Kt,fe,{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:Nt,79:S,80:w,81:lt,82:rt,83:q,84:It,85:$t,86:jt,87:te,88:ee,89:ae,90:re,91:se,92:ne,93:ie,94:oe,95:ce,96:le,97:de,98:he,99:Te,100:pe,101:Ee,102:_e,103:ue},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:it},{58:152,104:it},{58:153,104:it},{58:154,104:it},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:Z},{5:[1,160]},e(D,[2,20]),e(D,[2,21]),e(D,[2,23]),e(D,[2,24]),{4:i,5:s,8:8,9:10,10:o,13:13,14:_,15:T,17:[1,161],18:16,19:d,22:m,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:L,31:p,32:f,34:u,36:x,37:O,38:b,39:A,40:P,42:k,44:C,45:W,47:K,51:U,53:G,54:Z,56:nt,61:et,62:z,63:st,64:at,73:Y},{4:i,5:s,8:8,9:10,10:o,13:13,14:_,15:T,17:[1,162],18:16,19:d,22:m,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:L,31:p,32:f,34:u,36:x,37:O,38:b,39:A,40:P,42:k,44:C,45:W,47:K,51:U,53:G,54:Z,56:nt,61:et,62:z,63:st,64:at,73:Y},{4:i,5:s,8:8,9:10,10:o,13:13,14:_,15:T,17:[1,163],18:16,19:d,22:m,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:L,31:p,32:f,34:u,36:x,37:O,38:b,39:A,40:P,42:k,44:C,45:W,47:K,51:U,53:G,54:Z,56:nt,61:et,62:z,63:st,64:at,73:Y},{17:[1,164]},{4:i,5:s,8:8,9:10,10:o,13:13,14:_,15:T,17:[2,47],18:16,19:d,22:m,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:L,31:p,32:f,34:u,36:x,37:O,38:b,39:A,40:P,42:k,44:C,45:W,47:K,50:[1,165],51:U,53:G,54:Z,56:nt,61:et,62:z,63:st,64:at,73:Y},{17:[1,166]},{4:i,5:s,8:8,9:10,10:o,13:13,14:_,15:T,17:[2,45],18:16,19:d,22:m,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:L,31:p,32:f,34:u,36:x,37:O,38:b,39:A,40:P,42:k,44:C,45:W,47:K,49:[1,167],51:U,53:G,54:Z,56:nt,61:et,62:z,63:st,64:at,73:Y},{17:[1,168]},{17:[1,169]},{4:i,5:s,8:8,9:10,10:o,13:13,14:_,15:T,17:[2,43],18:16,19:d,22:m,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:L,31:p,32:f,34:u,36:x,37:O,38:b,39:A,40:P,42:k,44:C,45:W,47:K,48:[1,170],51:U,53:G,54:Z,56:nt,61:et,62:z,63:st,64:at,73:Y},{4:i,5:s,8:8,9:10,10:o,13:13,14:_,15:T,17:[1,171],18:16,19:d,22:m,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:L,31:p,32:f,34:u,36:x,37:O,38:b,39:A,40:P,42:k,44:C,45:W,47:K,51:U,53:G,54:Z,56:nt,61:et,62:z,63:st,64:at,73:Y},{16:[1,172]},e(D,[2,50]),{16:[1,173]},e(D,[2,55]),e(Kt,[2,76]),{76:[1,174]},{16:[1,175]},e(D,[2,52]),{16:[1,176]},e(D,[2,57]),e(D,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:it},{23:181,72:[1,182],73:Y},{58:183,104:it},{58:184,104:it},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(D,[2,17]),e(bt,[2,11]),{13:186,51:U,53:G,54:Z},e(bt,[2,13]),e(bt,[2,14]),e(D,[2,19]),e(D,[2,35]),e(D,[2,36]),e(D,[2,37]),e(D,[2,38]),{16:[1,187]},e(D,[2,39]),{16:[1,188]},e(D,[2,40]),e(D,[2,41]),{16:[1,189]},e(D,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:it},{58:196,104:it},{58:197,104:it},{5:[2,75]},{58:198,104:it},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(bt,[2,12]),e(ge,n,{7:124,41:201}),e(Wt,n,{7:126,43:202}),e(me,n,{7:129,46:203}),e(D,[2,49]),e(D,[2,54]),e(Kt,[2,77]),e(D,[2,51]),e(D,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:it},{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:g.__name(function(v,M){if(M.recoverable)this.trace(v);else{var B=new Error(v);throw B.hash=M,B}},"parseError"),parse:g.__name(function(v){var M=this,B=[0],y=[],J=[null],c=[],St=this.table,h="",kt=0,xe=0,Ie=0,We=2,ye=1,Ke=c.slice.call(arguments,1),$=Object.create(this.lexer),ut={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(ut.yy[Ft]=this.yy[Ft]);$.setInput(v,ut.yy),ut.yy.lexer=$,ut.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var Ht=$.yylloc;c.push(Ht);var qe=$.options&&$.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Fe(ct){B.length=B.length-2*ct,J.length=J.length-ct,c.length=c.length-ct}g.__name(Fe,"popStack");function Re(){var ct=y.pop()||$.lex()||ye;return typeof ct!="number"&&(ct instanceof Array&&(y=ct,ct=y.pop()),ct=M.symbols_[ct]||ct),ct}g.__name(Re,"lex");for(var tt,zt,ft,ot,Ut,yt={},Dt,ht,Oe,Ct;;){if(ft=B[B.length-1],this.defaultActions[ft]?ot=this.defaultActions[ft]:((tt===null||typeof tt>"u")&&(tt=Re()),ot=St[ft]&&St[ft][tt]),typeof ot>"u"||!ot.length||!ot[0]){var Gt="";Ct=[];for(Dt in St[ft])this.terminals_[Dt]&&Dt>We&&Ct.push("'"+this.terminals_[Dt]+"'");$.showPosition?Gt="Parse error on line "+(kt+1)+`:
`+$.showPosition()+`
Expecting `+Ct.join(", ")+", got '"+(this.terminals_[tt]||tt)+"'":Gt="Parse error on line "+(kt+1)+": Unexpected "+(tt==ye?"end of input":"'"+(this.terminals_[tt]||tt)+"'"),this.parseError(Gt,{text:$.match,token:this.terminals_[tt]||tt,line:$.yylineno,loc:Ht,expected:Ct})}if(ot[0]instanceof Array&&ot.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ft+", token: "+tt);switch(ot[0]){case 1:B.push(tt),J.push($.yytext),c.push($.yylloc),B.push(ot[1]),tt=null,zt?(tt=zt,zt=null):(xe=$.yyleng,h=$.yytext,kt=$.yylineno,Ht=$.yylloc,Ie>0&&Ie--);break;case 2:if(ht=this.productions_[ot[1]][1],yt.$=J[J.length-ht],yt._$={first_line:c[c.length-(ht||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(ht||1)].first_column,last_column:c[c.length-1].last_column},qe&&(yt._$.range=[c[c.length-(ht||1)].range[0],c[c.length-1].range[1]]),Ut=this.performAction.apply(yt,[h,xe,kt,ut.yy,ot[1],J,c].concat(Ke)),typeof Ut<"u")return Ut;ht&&(B=B.slice(0,-1*ht*2),J=J.slice(0,-1*ht),c=c.slice(0,-1*ht)),B.push(this.productions_[ot[1]][0]),J.push(yt.$),c.push(yt._$),Oe=St[B[B.length-2]][B[B.length-1]],B.push(Oe);break;case 3:return!0}}return!0},"parse")};qt.lexer=(function(){return{EOF:1,parseError:g.__name(function(v,M){if(this.yy.parser)this.yy.parser.parseError(v,M);else throw new Error(v)},"parseError"),setInput:g.__name(function(N,v){return this.yy=v||this.yy||{},this._input=N,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:g.__name(function(){var N=this._input[0];return this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N,N.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},"input"),unput:g.__name(function(N){var v=N.length,M=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var B=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),M.length-1&&(this.yylineno-=M.length-1);var y=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:M?(M.length===B.length?this.yylloc.first_column:0)+B[B.length-M.length].length-M[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:g.__name(function(){return this._more=!0,this},"more"),reject:g.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g.__name(function(N){this.unput(this.match.slice(N))},"less"),pastInput:g.__name(function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g.__name(function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g.__name(function(){var N=this.pastInput(),v=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
`+v+"^"},"showPosition"),test_match:g.__name(function(N,v){var M,B,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),B=N[0].match(/(?:\r\n?|\n).*/g),B&&(this.yylineno+=B.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:B?B[B.length-1].length-B[B.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,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(N[0].length),this.matched+=N[0],M=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),M)return M;if(this._backtrack){for(var J in y)this[J]=y[J];return!1}return!1},"test_match"),next:g.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,v,M,B;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),J=0;J<y.length;J++)if(M=this._input.match(this.rules[y[J]]),M&&(!v||M[0].length>v[0].length)){if(v=M,B=J,this.options.backtrack_lexer){if(N=this.test_match(M,y[J]),N!==!1)return N;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(N=this.test_match(v,y[B]),N!==!1?N:!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:g.__name(function(){var v=this.next();return v||this.lex()},"lex"),begin:g.__name(function(v){this.conditionStack.push(v)},"begin"),popState:g.__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g.__name(function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},"topState"),pushState:g.__name(function(v){this.begin(v)},"pushState"),stateStackSize:g.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:g.__name(function(v,M,B,y){switch(B){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;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:return M.yytext=M.yytext.trim(),73;case 12:return M.yytext=M.yytext.trim(),this.begin("ALIAS"),73;case 13:return M.yytext=M.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return M.yytext=M.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;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;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";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 M.yytext=M.yytext.trim(),73;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}}}})();function Pt(){this.yy={}}return g.__name(Pt,"Parser"),Pt.prototype=qt,qt.Parser=Pt,new Pt})();Jt.parser=Jt;var Ue=Jt,Ge={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},Xe={FILLED:0,OPEN:1},Je={LEFTOF:0,RIGHTOF:1,OVER:2},vt={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},Qe=class{constructor(){this.state=new ze.ImperativeState(()=>({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=I.setAccTitle,this.setAccDescription=I.setAccDescription,this.setDiagramTitle=I.setDiagramTitle,this.getAccTitle=I.getAccTitle,this.getAccDescription=I.getAccDescription,this.getDiagramTitle=I.getDiagramTitle,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(I.getConfig2().wrap),this.LINETYPE=Ge,this.ARROWTYPE=Xe,this.PLACEMENT=Je}static{g.__name(this,"SequenceDB")}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,r,a,n){let i=this.state.records.currentBox,s;if(n!==void 0){let _;n.includes(`
`)?_=n+`
`:_=`{
`+n+`
}`,s=Le.load(_,{schema:Le.JSON_SCHEMA})}a=s?.type??a,s?.alias&&(!r||r.text===t)&&(r={text:s.alias,wrap:r?.wrap,type:a});const o=this.state.records.actors.get(e);if(o){if(this.state.records.currentBox&&o.box&&this.state.records.currentBox!==o.box)throw new Error(`A same participant should only be defined in one Box: ${o.name} can't be in '${o.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(i=o.box?o.box:this.state.records.currentBox,o.box=i,o&&t===o.name&&r==null)return}if(r?.text==null&&(r={text:t,type:a}),(a==null||r.text==null)&&(r={text:t,type:a}),this.state.records.actors.set(e,{box:i,name:t,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:a??"participant"}),this.state.records.prevActor){const _=this.state.records.actors.get(this.state.records.prevActor);_&&(_.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,r=0;if(!e)return 0;for(t=0;t<this.state.records.messages.length;t++)this.state.records.messages[t].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[t].from===e&&r++,this.state.records.messages[t].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[t].from===e&&r--;return r}addMessage(e,t,r,a){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:r.text,wrap:r.wrap??this.autoWrap(),answer:a})}addSignal(e,t,r,a,n=!1,i){if(a===this.LINETYPE.ACTIVE_END&&this.activationCount(e??"")<1){const s=new Error("Trying to inactivate an inactive participant ("+e+")");throw s.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},s}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:a,activate:n,centralConnection:i??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.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(e){return this.state.records.actors.get(e)}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(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();const t=/^:?wrap:/.exec(e)!==null?!0:/^:?nowrap:/.exec(e)!==null?!1:void 0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:I.getConfig2().sequence?.wrap??!1}clear(){this.state.reset(),I.clear()}parseMessage(e){const t=e.trim(),{wrap:r,cleanedText:a}=this.extractWrap(t),n={text:a,wrap:r};return j.log.debug(`parseMessage: ${JSON.stringify(n)}`),n}parseBoxData(e){const t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e);let r=t?.[1]?t[1].trim():"transparent",a=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",a=e.trim());else{const s=new Option().style;s.color=r,s.color!==r&&(r="transparent",a=e.trim())}const{wrap:n,cleanedText:i}=this.extractWrap(a);return{text:i?I.sanitizeText(i,I.getConfig2()):void 0,color:r,wrap:n}}addNote(e,t,r){const a={actor:e,placement:t,message:r.text,wrap:r.wrap??this.autoWrap()},n=[].concat(e,e);this.state.records.notes.push(a),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:n[0],to:n[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,t){const r=this.getActor(e);try{let a=I.sanitizeText(t.text,I.getConfig2());a=a.replace(/=/g,"="),a=a.replace(/&/g,"&");const n=JSON.parse(a);this.insertLinks(r,n)}catch(a){j.log.error("error while parsing actor link text",a)}}addALink(e,t){const r=this.getActor(e);try{const a={};let n=I.sanitizeText(t.text,I.getConfig2());const i=n.indexOf("@");n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");const s=n.slice(0,i-1).trim();a[s]=n.slice(i+1).trim(),this.insertLinks(r,a)}catch(a){j.log.error("error while parsing actor link text",a)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(const r in t)e.links[r]=t[r]}addProperties(e,t){const r=this.getActor(e);try{const a=I.sanitizeText(t.text,I.getConfig2()),n=JSON.parse(a);this.insertProperties(r,n)}catch(a){j.log.error("error while parsing actor properties text",a)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(const r in t)e.properties[r]=t[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){const r=this.getActor(e),a=document.getElementById(t.text);try{const n=a.innerHTML,i=JSON.parse(n);i.properties&&this.insertProperties(r,i.properties),i.links&&this.insertLinks(r,i.links)}catch(n){j.log.error("error while parsing actor details text",n)}}getActorProperty(e,t){if(e?.properties!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(t=>{this.apply(t)});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case"createParticipant":if(this.state.records.actors.has(e.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=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"centralConnection":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"centralConnectionReverse":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.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(e.to!==this.state.records.lastDestroyed&&e.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(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":I.setAccTitle(e.text);break;case"parStart":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return I.getConfig2().sequence}},Ze=g.__name(e=>{const t=e.dropShadow??"none",{look:r}=I.getConfig2();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: ${r==="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"),gt=36,Et="actor-top",_t="actor-bottom",Bt="actor-box",mt="actor-man",Tt=new Set(["redux-color","redux-dark-color"]),At=g.__name(function(e,t){const r=X.drawRect(e,t);return I.getConfig().look==="neo"&&r.attr("data-look","neo"),r},"drawRect"),$e=g.__name(function(e,t,r,a,n){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const i=t.links,s=t.actorCnt,o=t.rectData;var _="none";n&&(_="block !important");const T=e.append("g");T.attr("id","actor"+s+"_popup"),T.attr("class","actorPopupMenu"),T.attr("display",_);var d="";o.class!==void 0&&(d=" "+o.class);let m=o.width>r?o.width:r;const E=T.append("rect");if(E.attr("class","actorPopupMenuPanel"+d),E.attr("x",o.x),E.attr("y",o.height),E.attr("fill",o.fill),E.attr("stroke",o.stroke),E.attr("width",m),E.attr("height",o.height),E.attr("rx",o.rx),E.attr("ry",o.ry),i!=null){var L=20;for(let u in i){var p=T.append("a"),f=(0,Ae.sanitizeUrl)(i[u]);p.attr("xlink:href",f),p.attr("target","_blank"),Ia(a)(u,p,o.x+10,o.height+L,m,20,{class:"actor"},a),L+=30}}return E.attr("height",L),{height:o.height+L,width:m}},"drawPopup"),Vt=g.__name(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Mt=g.__name(async function(e,t,r=null){let a=e.append("foreignObject");const n=await I.renderKatexSanitized(t.text,I.getConfig()),i=a.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(n).node().getBoundingClientRect();if(a.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),t.class==="noteText"){const s=e.node().firstChild;s.setAttribute("height",i.height+2*t.textMargin);const o=s.getBBox();a.attr("x",Math.round(o.x+o.width/2-i.width/2)).attr("y",Math.round(o.y+o.height/2-i.height/2))}else if(r){let{startx:s,stopx:o,starty:_}=r;if(s>o){const T=s;s=o,o=T}a.attr("x",Math.round(s+Math.abs(s-o)/2-i.width/2)),t.class==="loopText"?a.attr("y",Math.round(_)):a.attr("y",Math.round(_-i.height))}return[a]},"drawKatex"),Ot=g.__name(function(e,t){let r=0,a=0;const n=t.text.split(I.common_default.lineBreakRegex),[i,s]=Q.parseFontSize(t.fontSize);let o=[],_=0,T=g.__name(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":T=g.__name(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":T=g.__name(()=>Math.round(t.y+(r+a+t.textMargin)/2),"yfunc");break;case"bottom":case"end":T=g.__name(()=>Math.round(t.y+(r+a+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[d,m]of n.entries()){t.textMargin!==void 0&&t.textMargin===0&&i!==void 0&&(_=d*i);const E=e.append("text");E.attr("x",t.x),E.attr("y",T()),t.anchor!==void 0&&E.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&E.style("font-family",t.fontFamily),s!==void 0&&E.style("font-size",s),t.fontWeight!==void 0&&E.style("font-weight",t.fontWeight),t.fill!==void 0&&E.attr("fill",t.fill),t.class!==void 0&&E.attr("class",t.class),t.dy!==void 0?E.attr("dy",t.dy):_!==0&&E.attr("dy",_);const L=m||"";if(t.tspan){const p=E.append("tspan");p.attr("x",t.x),t.fill!==void 0&&p.attr("fill",t.fill),p.text(L)}else E.text(L);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(a+=(E._groups||E)[0][0].getBBox().height,r=a),o.push(E)}return o},"drawText"),Ne=g.__name(function(e,t){function r(n,i,s,o,_){return n+","+i+" "+(n+s)+","+i+" "+(n+s)+","+(i+o-_)+" "+(n+s-_*1.2)+","+(i+o)+" "+n+","+(i+o)}g.__name(r,"genPoints");const a=e.append("polygon");return a.attr("points",r(t.x,t.y,t.width,t.height,7)),a.attr("class","labelBox"),