2026-03-09 21:20:57 +00:00
import { a as we , b as Xt , g as ct , d as ve , c as Jt , e as Qt } from "./chunk-TZMSLE5B-BzDureVr.js" ; import { _ as f , n as Ie , c as st , d as St , l as Q , j as re , e as Le , f as _e , k as I , b as se , s as Ae , p as ke , a as Pe , g as Ne , q as Se , t as Me , J as Re , y as De , i as Mt , u as W , a2 as z , a3 as _t , a4 as ie , a5 as Ce , a6 as Oe , a7 as ne , F as Ht } from "./mermaid.core-Bp72wBaC.js" ; import { I as Be } from "./chunk-QZHKN3VN-Bi1rVrMI.js" ; import "./index-BzKy-nNf.js" ; var Ut = ( function (){ var e = f ( function ( pt , v , A , L ){ for ( A = A || {}, L = pt . length ; L -- ; A [ pt [ L ]] = v ); return A }, "o" ), t = [ 1 , 2 ], n = [ 1 , 3 ], s = [ 1 , 4 ], r = [ 2 , 4 ], i = [ 1 , 9 ], c = [ 1 , 11 ], h = [ 1 , 13 ], o = [ 1 , 14 ], a = [ 1 , 16 ], p = [ 1 , 17 ], g = [ 1 , 18 ], x = [ 1 , 24 ], y = [ 1 , 25 ], m = [ 1 , 26 ], w = [ 1 , 27 ], k = [ 1 , 28 ], N = [ 1 , 29 ], S = [ 1 , 30 ], O = [ 1 , 31 ], B = [ 1 , 32 ], q = [ 1 , 33 ], H = [ 1 , 34 ], Z = [ 1 , 35 ], at = [ 1 , 36 ], U = [ 1 , 37 ], G = [ 1 , 38 ], F = [ 1 , 39 ], D = [ 1 , 41 ], $ = [ 1 , 42 ], K = [ 1 , 43 ], j = [ 1 , 44 ], rt = [ 1 , 45 ], R = [ 1 , 46 ], E = [ 1 , 4 , 5 , 13 , 14 , 16 , 18 , 21 , 23 , 29 , 30 , 31 , 33 , 35 , 36 , 37 , 38 , 39 , 41 , 43 , 44 , 46 , 47 , 48 , 49 , 50 , 52 , 53 , 55 , 60 , 61 , 62 , 63 , 71 ], _ = [ 2 , 71 ], X = [ 4 , 5 , 16 , 50 , 52 , 53 ], tt = [ 4 , 5 , 13 , 14 , 16 , 18 , 21 , 23 , 29 , 30 , 31 , 33 , 35 , 36 , 37 , 38 , 39 , 41 , 43 , 44 , 46 , 50 , 52 , 53 , 55 , 60 , 61 , 62 , 63 , 71 ], M = [ 4 , 5 , 13 , 14 , 16 , 18 , 21 , 23 , 29 , 30 , 31 , 33 , 35 , 36 , 37 , 38 , 39 , 41 , 43 , 44 , 46 , 49 , 50 , 52 , 53 , 55 , 60 , 61 , 62 , 63 , 71 ], Vt = [ 4 , 5 , 13 , 14 , 16 , 18 , 21 , 23 , 29 , 30 , 31 , 33 , 35 , 36 , 37 , 38 , 39 , 41 , 43 , 44 , 46 , 48 , 50 , 52 , 53 , 55 , 60 , 61 , 62 , 63 , 71 ], Zt = [ 4 , 5 , 13 , 14 , 16 , 18 , 21 , 23 , 29 , 30 , 31 , 33 , 35 , 36 , 37 , 38 , 39 , 41 , 43 , 44 , 46 , 47 , 50 , 52 , 53 , 55 , 60 , 61 , 62 , 63 , 71 ], ot = [ 69 , 70 , 71 ], lt = [ 1 , 127 ], Yt = { trace : f ( function (){}, "trace" ), yy : {}, symbols_ : { error : 2 , start : 3 , SPACE : 4 , NEWLINE : 5 , SD : 6 , document : 7 , line : 8 , statement : 9 , box_section : 10 , box_line : 11 , participant_statement : 12 , create : 13 , box : 14 , restOfLine : 15 , end : 16 , signal : 17 , autonumber : 18 , NUM : 19 , off : 20 , activate : 21 , actor : 22 , deactivate : 23 , note_statement : 24 , links_statement : 25 , link_statement : 26 , properties_statement : 27 , details_statement : 28 , title : 29 , legacy_title : 30 , acc_title : 31 , acc_title_value : 32 , acc_descr : 33 , acc_descr_value : 34 , acc_descr_multiline_value : 35 , loop : 36 , rect : 37 , opt : 38 , alt : 39 , else_sections : 40 , par : 41 , par_sections : 42 , par_over : 43 , critical : 44 , option_sections : 45 , break : 46 , option : 47 , and : 48 , else : 49 , participant : 50 , AS : 51 , participant_actor : 52 , destroy : 53 , actor_with_config : 54 , note : 55 , placement : 56 , text2 : 57 , over : 58 , actor_pair : 59 , links : 60 , link : 61 , properties : 62 , details : 63 , spaceList : 64 , "," : 65 , left_of : 66 , right_of : 67 , signaltype : 68 , "+" : 69 , "-" : 70 , ACTOR : 71 , config_object : 72 , CONFIG_START : 73 , CONFIG_CONTENT : 74 , CONFIG_END : 75 , SOLID_OPEN_ARROW : 76 , DOTTED_OPEN_ARROW : 77 , SOLID_ARROW : 78 , BIDIRECTIONAL_SOLID_ARROW : 79 , DOTTED_ARROW : 80 , BIDIRECTIONAL_DOTTED_ARROW : 81 , SOLID_CROSS : 82 , DOTTED_CROSS : 83 , SOLID_POINT : 84 , DOTTED_POINT : 85 , TXT : 86 , $accept : 0 , $end : 1 }, terminals_ : { 2 : "error" , 4 : "SPACE" , 5 : "NEWLINE" , 6 : "SD" , 13 : "create" , 14 : "box" , 15 : "restOfLine" , 16 : "end" , 18 : "autonumber" , 19 : "NUM" , 20 : "off" , 21 : "activate" , 23 : "deactivate" , 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" , 41 : "par" , 43 : "par_over" , 44 : "critical" , 46 : "break" , 47 : "option" , 48 : "and" , 49 : "else" , 50 : "participant" , 51 : "AS" , 52 : "participant_actor" , 53 : "destroy" , 55 : "note" , 58 : "over" , 60 : "links" , 61 : "link" , 62 : "properties" , 63 : "details" , 65 : "," , 66 : "left_of" , 67 : "right_of" , 69 : "+" , 70 : "-" , 71 : "ACTOR" , 73 : "CONFIG_START" , 74 : "CONFIG_CONTENT" , 75 : "CONFIG_END" , 76 : "SOLID_OPEN_ARROW" , 77 : "DOTTED_OPEN_ARROW" , 78 : "SOLID_ARROW" , 79 : "BIDIRECTIONAL_SOLID_ARROW" , 80 : "DOTTED_ARROW" , 81 : "BIDIRECTIONAL_DOTTED_ARROW" , 82 : "SOLID_CROSS" , 83 : "DOTTED_CROSS" , 84 : "SOLID_POINT" , 85 : "DOTTED_POINT" , 86 : "TXT" }, productions_ : [ 0 ,[ 3 , 2 ],[ 3 , 2 ],[ 3 , 2 ],[ 7 , 0 ],[ 7 , 2 ],[ 8 , 2 ],[ 8 , 1 ],[ 8 , 1 ],[ 10 , 0 ],[ 10 , 2 ],[ 11 , 2 ],[ 11 , 1 ],[ 11 , 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 ],[ 45 , 1 ],[ 45 , 4 ],[ 42 , 1 ],[ 42 , 4 ],[ 40 , 1 ],[ 40 , 4 ],[ 12 , 5 ],[ 12 , 3 ],[ 12 , 5 ],[ 12 , 3 ],[ 12 , 3 ],[ 12 , 3 ],[ 24 , 4 ],[ 24 , 4 ],[ 25 , 3 ],[ 26 , 3 ],[ 27 , 3 ],[ 28 , 3 ],[ 64 , 2 ],[ 64 , 1 ],[ 59 , 3 ],[ 59 , 1 ],[ 56 , 1 ],[ 56 , 1 ],[ 17 , 5 ],[ 17 , 5 ],[ 17 , 4 ],[ 54 , 2 ],[ 72 , 3 ],[ 22 , 1 ],[ 68 , 1 ],[ 68 , 1 ],[ 68 , 1 ],[ 68 , 1 ],[ 68 , 1 ],[ 68 , 1 ],[ 68 , 1 ],[ 68 , 1 ],[ 68 , 1 ],[ 68 , 1 ],[ 57 , 1 ]], performAction : f ( function ( v , A , L , b , C , d , It ){ var u = d . length - 1 ; switch ( C ){ case 3 : return b . apply ( d [ u ]), d [ u ]; case 4 : case 9 : this . $ = []; bre
2026-03-07 19:52:33 +00:00
`+Y.showPosition()+`
Expecting `+Nt.join(", ")+", got '"+(this.terminals_[J]||J)+"'":zt="Parse error on line "+(kt+1)+": Unexpected "+(J==jt?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(zt,{text:Y.match,token:this.terminals_[J]||J,line:Y.yylineno,loc:Ft,expected:Nt})}if(it[0]instanceof Array&&it.length>1)throw new Error("Parse Error: multiple actions possible at state: "+yt+", token: "+J);switch(it[0]){case 1:L.push(J),C.push(Y.yytext),d.push(Y.yylloc),L.push(it[1]),J=null,$t=Y.yyleng,u=Y.yytext,kt=Y.yylineno,Ft=Y.yylloc;break;case 2:if(ht=this.productions_[it[1]][1],bt.$=C[C.length-ht],bt._$={first_line:d[d.length-(ht||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(ht||1)].first_column,last_column:d[d.length-1].last_column},be&&(bt._$.range=[d[d.length-(ht||1)].range[0],d[d.length-1].range[1]]),qt=this.performAction.apply(bt,[u,$t,kt,ft.yy,it[1],C,d].concat(Ee)),typeof qt<"u")return qt;ht&&(L=L.slice(0,-1*ht*2),C=C.slice(0,-1*ht),d=d.slice(0,-1*ht)),L.push(this.productions_[it[1]][0]),C.push(bt.$),d.push(bt._$),ee=It[L[L.length-2]][L[L.length-1]],L.push(ee);break;case 3:return!0}}return!0},"parse")},ye=(function(){var pt={EOF:1,parseError:f(function(A,L){if(this.yy.parser)this.yy.parser.parseError(A,L);else throw new Error(A)},"parseError"),setInput:f(function(v,A){return this.yy=A||this.yy||{},this._input=v,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var A=v.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),v},"input"),unput:f(function(v){var A=v.length,L=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;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),L.length-1&&(this.yylineno-=L.length-1);var C=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:L?(L.length===b.length?this.yylloc.first_column:0)+b[b.length-L.length].length-L[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+` . You can only invoke reject () in the lexer when the lexer is of the backtracking persuasion ( options . backtrack_lexer = true ).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(v){this.unput(this.match.slice(v))},"less"),pastInput:f(function(){var v=this.matched.substr(0,this.matched.length-this.match.length);return(v.length>20?"...":"")+v.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var v=this.match;return v.length<20&&(v+=this._input.substr(0,20-v.length)),(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var v=this.pastInput(),A=new Array(v.length+1).join("-");return v+this.upcomingInput()+`
`+A+"^"},"showPosition"),test_match:f(function(v,A){var L,b,C;if(this.options.backtrack_lexer&&(C={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&&(C.yylloc.range=this.yylloc.range.slice(0))),b=v[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+v[0].length},this.yytext+=v[0],this.match+=v[0],this.matches=v,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(v[0].length),this.matched+=v[0],L=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),L)return L;if(this._backtrack){for(var d in C)this[d]=C[d];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var v,A,L,b;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),d=0;d<C.length;d++)if(L=this._input.match(this.rules[C[d]]),L&&(!A||L[0].length>A[0].length)){if(A=L,b=d,this.options.backtrack_lexer){if(v=this.test_match(L,C[d]),v!==!1)return v;if(this._backtrack){A=!1;continue}else return!1}else if(!this.options.flex)break}return A?(v=this.test_match(A,C[b]),v!==!1?v:!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:f(function(){var A=this.next();return A||this.lex()},"lex"),begin:f(function(A){this.conditionStack.push(A)},"begin"),popState:f(function(){var A=this.conditionStack.length-1;return A>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(A){return A=this.conditionStack.length-1-Math.abs(A||0),A>=0?this.conditionStack[A]:"INITIAL"},"topState"),pushState:f(function(A){this.begin(A)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(A,L,b,C){switch(b){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:return L.yytext=L.yytext.trim(),71;case 11:return L.yytext=L.yytext.trim(),this.begin("ALIAS"),71;case 12:return this.begin("LINE"),14;case 13:return this.begin("ID"),50;case 14:return this.begin("ID"),52;case 15:return 13;case 16:return this.begin("ID"),53;case 17:return L.yytext=L.yytext.trim(),this.begin("ALIAS"),71;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),36;case 21:return this.begin("LINE"),37;case 22:return this.begin("LINE"),38;case 23:return this.begin("LINE"),39;case 24:return this.begin("LINE"),49;case 25:return this.begin("LINE"),41;case 26:return this.begin("LINE"),43;case 27:return this.begin("LINE"),48;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),47;case 30:return this.begin("LINE"),46;case 31:return this.popState(),15;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;case 42:return this.begin("ID"),23;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),33;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 56:return 5;case 57:return L.yytext=L.yytext.trim(),71;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:return 86;case 69:return 86;case 70:return 69;case 71:return 70;case 72:return 5;case 73:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/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,/^(?:se
` ) ? a = i + `
` : a = `{
` + i + `
}` , h = Me ( a ,{ schema : Re })} r = h ? . type ?? r ; const o = this . state . records . actors . get ( t ); 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 ( c = o . box ? o . box : this . state . records . currentBox , o . box = c , o && n === o . name && s == null ) return } if ( s ? . text == null && ( s = { text : n , type : r }),( r == null || s . text == null ) && ( s = { text : n , type : r }), this . state . records . actors . set ( t ,{ box : c , name : n , description : s . text , wrap : s . wrap ?? this . autoWrap (), prevActor : this . state . records . prevActor , links : {}, properties : {}, actorCnt : null , rectData : null , type : r ?? "participant" }), this . state . records . prevActor ){ const a = this . state . records . actors . get ( this . state . records . prevActor ); a && ( a . nextActor = t )} this . state . records . currentBox && this . state . records . currentBox . actorKeys . push ( t ), this . state . records . prevActor = t } activationCount ( t ){ let n , s = 0 ; if ( ! t ) return 0 ; for ( n = 0 ; n < this . state . records . messages . length ; n ++ ) this . state . records . messages [ n ]. type === this . LINETYPE . ACTIVE_START && this . state . records . messages [ n ]. from === t && s ++ , this . state . records . messages [ n ]. type === this . LINETYPE . ACTIVE_END && this . state . records . messages [ n ]. from === t && s -- ; return s } addMessage ( t , n , s , r ){ this . state . records . messages . push ({ id : this . state . records . messages . length . toString (), from : t , to : n , message : s . text , wrap : s . wrap ?? this . autoWrap (), answer : r })} addSignal ( t , n , s , r , i =! 1 ){ if ( r === this . LINETYPE . ACTIVE_END && this . activationCount ( t ?? "" ) < 1 ){ const h = new Error ( "Trying to inactivate an inactive participant (" + t + ")" ); throw h . hash = { text : "->>-" , token : "->>-" , line : "1" , loc : { first_line : 1 , last_line : 1 , first_column : 1 , last_column : 1 }, expected : [ "'ACTIVE_PARTICIPANT'" ]}, h } return this . state . records . messages . push ({ id : this . state . records . messages . length . toString (), from : t , to : n , message : s ? . text ?? "" , wrap : s ? . wrap ?? this . autoWrap (), type : r , activate : i }), ! 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 (); const n = /^:?wrap:/ . exec ( t ) !== null ?! 0 : /^:?nowrap:/ . exec ( t ) !== null ?! 1 : void 0 ; return { cleanedText : ( n === void 0 ? t : t . replace ( /^:?(?:no)?wrap:/ , "" )). trim (), wrap : n }} autoWrap (){ return this . state . records . wrapEnabled !== void 0 ? this . state . records . wrapEnabled : st (). sequence ? . wrap ??! 1 } clear (){ this . state . reset (), De ()} parseMessage ( t ){ const n = t . trim (),{ wrap : s , cleanedText : r } = this . extractWrap ( n ), i = { text : r , wrap : s }; return Q . debug ( `parseMessage: ${ JSON . stringify ( i ) } ` ), i } parseBoxData ( t ){ const n = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/ . exec ( t ); let s = n ? .[ 1 ] ? n [ 1 ]. trim () : "transparent" , r = n ? .[ 2 ] ? n [ 2 ]. trim () : void 0 ; if ( window ? . CSS ) window . CSS . supports ( "color" , s ) || ( s = "transparent" , r = t . trim ()); else { const h = new Option (). style ; h . color = s , h . color !== s && ( s = "transparent" , r = t . trim ())} const { wrap : i , cleanedText : c } = this . extractWrap ( r ); return { text : c ? Mt ( c , st ()) : void 0 , color : s , wrap : i }} addNote ( t , n , s ){ const r = { actor : t , placement : n , message : s . text , wrap : s . wrap ?? this . autoWrap ()}, i = []. concat ( t , t ); this . state . records . notes . push ( r ), this . state . records . messages . push ({ id : this . state . records . messages . length . toString (), from : i [ 0 ], to : i [ 1 ], message : s . text , wrap : s . wrap ?? this . autoWrap (), type : this . LINETYPE . NOTE , placement : n })} addLinks ( t , n ){ const s = this . getActor ( t ); try { let r = Mt ( n . text , st ()); r = r . replace ( /=/g , "=" ), r = r . replace ( /&/g , "&" ); const i = JSON . parse ( r ); this . insertLinks ( s , i )} catch ( r ){ Q . error ( "error while parsing act
stroke: ${e.actorBorder};
fill: ${e.actorBkg};
}
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};
}
#arrowhead path {
fill: ${e.signalColor};
stroke: ${e.signalColor};
}
.sequenceNumber {
fill: ${e.sequenceNumberColor};
}
#sequencenumber {
fill: ${e.signalColor};
}
#crosshead path {
fill: ${e.signalColor};
stroke: ${e.signalColor};
}
.messageText {
fill: ${e.signalTextColor};
stroke: none;
}
.labelBox {
stroke: ${e.labelBoxBorderColor};
fill: ${e.labelBoxBkgColor};
}
.labelText, .labelText > tspan {
fill: ${e.labelTextColor};
stroke: none;
}
.loopText, .loopText > 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;
}
.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 line {
stroke: ${e.actorBorder};
fill: ${e.actorBkg};
}
.actor-man circle, line {
stroke: ${e.actorBorder};
fill: ${e.actorBkg};
stroke-width: 2px;
}
`," getStyles "),He=ze,Tt=36,gt=" actor - top ",xt=" actor - bottom ",Ct=" actor - box ",ut=" actor - man ",Lt=f(function(e,t){return ve(e,t)}," drawRect "),Ue=f(function(e,t,n,s,r){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const i=t.links,c=t.actorCnt,h=t.rectData;var o=" none ";r&&(o=" block ! important ");const a=e.append(" g ");a.attr(" id "," actor "+c+" _popup "),a.attr(" class "," actorPopupMenu "),a.attr(" display ",o);var p="";h.class!==void 0&&(p=" "+h.class);let g=h.width>n?h.width:n;const x=a.append(" rect ");if(x.attr(" class "," actorPopupMenuPanel "+p),x.attr(" x ",h.x),x.attr(" y ",h.height),x.attr(" fill ",h.fill),x.attr(" stroke ",h.stroke),x.attr(" width ",g),x.attr(" height ",h.height),x.attr(" rx ",h.rx),x.attr(" ry ",h.ry),i!=null){var y=20;for(let k in i){var m=a.append(" a "),w=re.sanitizeUrl(i[k]);m.attr(" xlink : href ",w),m.attr(" target "," _blank "),us(s)(k,m,h.x+10,h.height+y,g,20,{class:" actor "},s),y+=30}}return x.attr(" height ",y),{height:h.height+y,width:g}}," drawPopup "),Ot=f(function(e){return" var pu = document . getElementById ( '"+e+"' ); if ( pu != null ) { pu . style . display = pu . style . display == 'block' ? 'none' : 'block' ; } "}," popupMenuToggle "),Dt=f(async function(e,t,n=null){let s=e.append(" foreignObject ");const r=await ne(t.text,Ht()),c=s.append(" xhtml : div ").attr(" style "," width : fit - content ; ").attr(" xmlns "," http : //www.w3.org/1999/xhtml").html(r).node().getBoundingClientRect();if(s.attr("height",Math.round(c.height)).attr("width",Math.round(c.width)),t.class==="noteText"){const h=e.node().firstChild;h.setAttribute("height",c.height+2*t.textMargin);const o=h.getBBox();s.attr("x",Math.round(o.x+o.width/2-c.width/2)).attr("y",Math.round(o.y+o.height/2-c.height/2))}else if(n){let{startx:h,stopx:o,starty:a}=n;if(h>o){const p=h;h=o,o=p}s.attr("x",Math.round(h+Math.abs(h-o)/2-c.width/2)),t.class==="loopText"?s.attr("y",Math.round(a)):s.attr("y",Math.round(a-c.height))}return[s]},"drawKatex"),vt=f(function(e,t){let n=0,s=0;const r=t.text.split(I.lineBreakRegex),[i,c]=ie(t.fontSize);let h=[],o=0,a=f(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":a=f(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":a=f(()=>Math.round(t.y+(n+s+t.textMargin)/2),"yfunc");break;case"bottom":case"end":a=f(()=>Math.round(t.y+(n+s+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[p,g]of r.entries()){t.textMargin!==void 0&&t.textMargin===0&&i!==void 0&&(o=p*i);const x=e.append("text");x.attr("x",t.x),x.attr("y",a()),t.anchor!==void 0&&x.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&x.style("font-family",t.fontFamily),c!==void 0&&x.style("font-size",c),t.fontWeight!==void 0&&x.style("font-weight",t.fontWeight),t.fill!==void 0&&x.attr("fill",t.fill),t.class!==void 0&&x.attr("class",t.class),t.dy!==void 0?x.attr("dy",t.dy):o!==0&&x.attr("dy",o);const y=g||Ce;if(t.tspan){const m=x.append("tspan");m.attr("x",t.x),t.fill!==void 0&&m.attr("fill",t.fill),m.text(y)}else x.text(y);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(s+=(x._groups||x)[0][0].getBBox().height,n=s),h.push(x)}return h},"drawText"),oe=f(function(e,t){function n(r,i,c,h,o){return r+","+i+" "+(r+c)+","+i+" "+(r+c)+","+(i+h-o)+" "+(r+c-o*1.2)+","+(i+h)+" "+r+","+(i+h)}f(n,"genPoints");const s=e.append("polygon");return s.attr("points",n(t.x,t.y,t.width,t.height,7)),s.attr("class","labelBox"),t.y=t.y+t.height/2,vt(e,t),s},"drawLabel"),P=-1,ce=f((e,t,n,s)=>{e.select&&n.forEach(r=>{const i=t.get(r),c
a $ { x }, $ { g } 0 0 0 0 , $ { a . height }
h $ { a . width - 2 * x }
a $ { x }, $ { g } 0 0 0 0 , - $ { a . height }
Z
`).attr("class",p),m.append("path").attr("d",` M $ { a . x }, $ { a . y + g }
a $ { x }, $ { g } 0 0 0 0 , $ { a . height } `).attr("stroke","#666").attr("stroke-width","1px").attr("class",p),y.attr("transform",` translate ( $ { x }, $ { - ( a . height / 2 )}) `),m.attr("transform",` translate ( $ { a . width - x }, $ { - a . height / 2 }) `),t.rectData=a,t.properties?.icon){const N=t.properties.icon.trim(),S=a.x+a.width-20,O=a.y+10;N.charAt(0)==="@"?Jt(o,S,O,N.substr(1)):Qt(o,S,O,N)}dt(n,z(t.description))(t.description,o,a.x,a.y,a.width,a.height,{class:` actor $ { Ct } `},n);let w=t.height;const k=y.select("path:last-child");if(k.node()){const N=k.node().getBBox();t.height=N.height,w=N.height}return w},"drawActorTypeQueue"),Je=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+75,h=e.append("g").lower();s||(P++,h.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P);const o=e.append("g");let a=ut;s?a+=` $ { xt } `:a+=` $ { gt } `,o.attr("class",a),o.attr("name",t.name);const p=ct();p.x=t.x,p.y=r,p.fill="#eaeaea",p.width=t.width,p.height=t.height,p.class="actor";const g=t.x+t.width/2,x=r+30,y=18;o.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),o.append("circle").attr("cx",g).attr("cy",x).attr("r",y).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),o.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",` translate ( $ { g }, $ { x - y }) `);const m=o.node().getBBox();return t.height=m.height+2*(n?.sequence?.labelBoxHeight??0),dt(n,z(t.description))(t.description,o,p.x,p.y+y+(s?5:10),p.width,p.height,{class:` actor $ { ut } `},n),t.height},"drawActorTypeControl"),Qe=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+75,h=e.append("g").lower(),o=e.append("g");let a=ut;s?a+=` $ { xt } `:a+=` $ { gt } `,o.attr("class",a),o.attr("name",t.name);const p=ct();p.x=t.x,p.y=r,p.fill="#eaeaea",p.width=t.width,p.height=t.height,p.class="actor";const g=t.x+t.width/2,x=r+(s?10:25),y=18;o.append("circle").attr("cx",g).attr("cy",x).attr("r",y).attr("width",t.width).attr("height",t.height),o.append("line").attr("x1",g-y).attr("x2",g+y).attr("y1",x+y).attr("y2",x+y).attr("stroke","#333").attr("stroke-width",2);const m=o.node().getBBox();return t.height=m.height+(n?.sequence?.labelBoxHeight??0),s||(P++,h.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P),dt(n,z(t.description))(t.description,o,p.x,p.y+(s?(x-r+y-5)/2:(x+y-r)/2),p.width,p.height,{class:` actor $ { ut } `},n),s?o.attr("transform",` translate ( 0 , $ { y / 2 }) `):o.attr("transform",` translate ( 0 , $ { y / 2 }) `),t.height},"drawActorTypeEntity"),Ze=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+t.height+2*n.boxTextMargin,h=e.append("g").lower();let o=h;s||(P++,Object.keys(t.links||{}).length&&!n.forceMenus&&o.attr("onclick",Ot(` actor$ { P } _popup `)).attr("cursor","pointer"),o.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),o=h.append("g"),t.actorCnt=P,t.links!=null&&o.attr("id","root-"+P));const a=ct();let p="actor";t.properties?.class?p=t.properties.class:a.fill="#eaeaea",s?p+=` $ { xt } `:p+=` $ { gt } `,a.x=t.x,a.y=r,a.width=t.width,a.height=t.height,a.class=p,a.name=t.name,a.x=t.x,a.y=r;const g=a.width/4,x=a.width/4,y=g/2,m=y/(2.5+g/50),w=o.append("g"),k=`
M $ { a . x }, $ { a . y + m }
a $ { y }, $ { m } 0 0 0 $ { g }, 0
a $ { y }, $ { m } 0 0 0 - $ { g }, 0
l 0 , $ { x - 2 * m }
a $ { y }, $ { m } 0 0 0 $ { g }, 0
l 0 , - $ { x - 2 * m }
`;w.append("path").attr("d",k).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",p),s?w.attr("transform",` translate ( $ { g * 1.5 }, $ { a . height / 4 - 2 * m }) `):w.attr("transform",` translate ( $ { g * 1.5 }, $ {( a . height + m ) / 4 }) `),t.rectData=a,dt(n,z(t.description))(t.description,o,a.x,a.y+(s?(a.height+x)/4:(a.height+m)/2),a.width,a.height,{class:` actor $ { Ct } `},n);const N=w.select("path:last-child");if(N.node()){const S=N.node().getBBox();t.height=S.height+(n.sequence.labelBoxHeight??0)}return t.height},"drawActorTypeDatabase"),$e=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+80,h=30,o=e.append("g").lower();s||(P++,o.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P);const a=e.append("g");let p=ut;s?p+=` $ { xt } `:p+=` $ { gt } `,a.attr("class",p),a.attr("name",t.name);const g=ct();g.x=t.x,g.y=r,g.fill="#eaeaea",g.width=t.width,g.height=t.height,g.class="actor",a.append("line").attr("id","actor-man-torso"+P).attr("x1",t.x+t.width/2-h*2.5).attr("y1",r+10).attr("x2",t.x+t.width/2-15).attr("y2",r+10),a.append("line").attr("id","actor-man-arms"+P).attr("x1",t.x+t.width/2-h*2.5).attr("y1",r+0).attr("x2",t.x+t.width/2-h*2.5).attr("y2",r+20),a.append("circle").attr("cx",t.x+t.width/2).attr("cy",r+10).attr("r",h);const x=a.node().getBBox();return t.height=x.height+(n.sequence.labelBoxHeight??0),dt(n,z(t.description))(t.description,a,g.x,g.y+(s?h/2-4:h/2+3),g.width,g.height,{class:` actor $ { ut } `},n),s?a.attr("transform",` translate ( 0 , $ { h / 2 + 7 }) `):a.attr("transform",` translate ( 0 , $ { h / 2 + 7 }) `),t.height},"drawActorTypeBoundary"),je=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+80,h=e.append("g").lower();s||(P++,h.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P);const o=e.append("g");let a=ut;s?a+=` $ { xt } `:a+=` $ { gt } `,o.attr("class",a),o.attr("name",t.name);const p=ct();p.x=t.x,p.y=r,p.fill="#eaeaea",p.width=t.width,p.height=t.height,p.class="actor",p.rx=3,p.ry=3,o.append("line").attr("id","actor-man-torso"+P).attr("x1",i).attr("y1",r+25).attr("x2",i).attr("y2",r+45),o.append("line").attr("id","actor-man-arms"+P).attr("x1",i-Tt/2).attr("y1",r+33).attr("x2",i+Tt/2).attr("y2",r+33),o.append("line").attr("x1",i-Tt/2).attr("y1",r+60).attr("x2",i).attr("y2",r+45),o.append("line").attr("x1",i).attr("y1",r+45).attr("x2",i+Tt/2-2).attr("y2",r+60);const g=o.append("circle");g.attr("cx",t.x+t.width/2),g.attr("cy",r+10),g.attr("r",15),g.attr("width",t.width),g.attr("height",t.height);const x=o.node().getBBox();return t.height=x.height,dt(n,z(t.description))(t.description,o,p.x,p.y+35,p.width,p.height,{class:` actor $ { ut } `},n),t.height},"drawActorTypeActor"),ts=f(async function(e,t,n,s){switch(t.type){case"actor":return await je(e,t,n,s);case"participant":return await Ge(e,t,n,s);case"boundary":return await $e(e,t,n,s);case"control":return await Je(e,t,n,s);case"entity":return await Qe(e,t,n,s);case"database":return await Ze(e,t,n,s);case"collections":return await Ke(e,t,n,s);case"queue":return await Xe(e,t,n,s)}},"drawActor"),es=f(function(e,t,n){const r=e.append("g");le(r,t),t.name&&dt(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},n),r.lower()},"drawBox"),ss=f(function(e){return e.append("g")},"anchorElement"),as=f(function(e,t,n,s,r){const i=ct(),c=t.anchored;i.x=t.startx,i.y=t.starty,i.class="activation"+r%3,i.width=t.stopx-t.startx,i.height=n-t.starty,Lt(c,i)},"drawActivation"),rs=f(async function(e,t,n,s){const{boxMargin:r,boxTextMargin:i,labelBoxHeight:c,labelBoxWidth:h,messageFontFamily:o,messageFontSize:a,messageFontWeight:p}=s,g=e.append("g"),x=f(function(w,k,N,S){return g.append("line").attr("x1",w).attr("y1",k).attr("x2",N).attr("y2",S).attr("class","loopLine")},"drawLoopLine");x(t.startx,t.starty,t.stopx,t.starty),x(t.stopx,t.starty,t.stopx,t.stopy),x(