162 lines
113 KiB
JavaScript
162 lines
113 KiB
JavaScript
|
|
import{n as e,r as t}from"./chunk-AGHRB4JF-Fz9kp2Fp.js";import{A as n,F as r,G as i,H as a,K as o,O as s,U as c,a as l,b as u,c as d,i as f,r as p,s as m,v as h,w as g,x as _,y as v,z as y}from"./chunk-CSCIHK7Q-VDPd5eNJ.js";import{Q as b}from"./src-BrOGWJpF.js";import{g as x,p as S}from"./chunk-5ZQYHXKU-D-OgLpMs.js";import{n as C,t as w}from"./chunk-XPW4576I-SsWL9gHk.js";import{t as T}from"./dist-idVqPIzq.js";import{a as E,c as D,i as O,n as k,r as A,s as j}from"./chunk-ND2GUHAM-zGgwlxna.js";import{t as M}from"./chunk-QZHKN3VN-DmWvf513.js";var N=T(),P=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[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],L=[1,74],ee=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[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],be=[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],xe=[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],Se=[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],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:e(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:`C
|
|||
|
|
`+h.showPosition()+`
|
|||
|
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};we.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(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:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|||
|
|
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):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:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(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:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){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 t.yytext=t.yytext.trim(),73;case 12:return t.yytext=t.yytext.trim(),this.begin(`ALIAS`),73;case 13:return t.yytext=t.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return t.yytext=t.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 t.yytext=t.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,/^(?:(?:[
|
|||
|
|
`)?i+`
|
|||
|
|
`:`{
|
|||
|
|
`+i+`
|
|||
|
|
}`,o=C(e,{schema:w})}r=o?.type??r,o?.alias&&(!n||n.text===t)&&(n={text:o.alias,wrap:n?.wrap,type:r});let s=this.state.records.actors.get(e);if(s){if(this.state.records.currentBox&&s.box&&this.state.records.currentBox!==s.box)throw Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=s.box?s.box:this.state.records.currentBox,s.box=a,s&&t===s.name&&n==null)return}if(n?.text??(n={text:t,type:r}),(r==null||n.text==null)&&(n={text:t,type:r}),this.state.records.actors.set(e,{box:a,name:t,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??`participant`}),this.state.records.prevActor){let t=this.state.records.actors.get(this.state.records.prevActor);t&&(t.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,n=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&&n++,this.state.records.messages[t].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[t].from===e&&n--;return n}addMessage(e,t,n,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n.text,wrap:n.wrap??this.autoWrap(),answer:r})}addSignal(e,t,n,r,i=!1,a){if(r===this.LINETYPE.ACTIVE_END&&this.activationCount(e??``)<1){let t=Error(`Trying to inactivate an inactive participant (`+e+`)`);throw t.hash={text:`->>-`,token:`->>-`,line:`1`,loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[`'ACTIVE_PARTICIPANT'`]},t}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n?.text??``,wrap:n?.wrap??this.autoWrap(),type:r,activate:i,centralConnection:a??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();let t=/^:?wrap:/.exec(e)===null?/^:?nowrap:/.exec(e)===null?void 0:!1:!0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,``)).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled===void 0?_().sequence?.wrap??!1:this.state.records.wrapEnabled}clear(){this.state.reset(),l()}parseMessage(e){let n=e.trim(),{wrap:r,cleanedText:i}=this.extractWrap(n),a={text:i,wrap:r};return t.debug(`parseMessage: ${JSON.stringify(a)}`),a}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),n=t?.[1]?t[1].trim():`transparent`,r=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports(`color`,n)||(n=`transparent`,r=e.trim());else{let t=new Option().style;t.color=n,t.color!==n&&(n=`transparent`,r=e.trim())}let{wrap:i,cleanedText:a}=this.extractWrap(r);return{text:a?y(a,_()):void 0,color:n,wrap:i}}addNote(e,t,n){let r={actor:e,placement:t,message:n.text,wrap:n.wrap??this.autoWrap()},i=[].concat(e,e);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:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,n){let r=this.getActor(e);try{let e=y(n.text,_());e=e.replace(/=/g,`=`),e=e.replace(/&/g,`&`);let t=JSON.parse(e);this.insertLinks(r,
|
|||
|
|
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: ${n===`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`),z=36,B=`actor-top`,V=`actor-bottom`,re=`actor-box`,H=`actor-man`,U=new Set([`redux-color`,`redux-dark-color`]),W=e(function(e,t){let n=E(e,t);return u().look===`neo`&&n.attr(`data-look`,`neo`),n},`drawRect`),ie=e(function(e,t,n,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,o=t.actorCnt,s=t.rectData;var c=`none`;i&&(c=`block !important`);let l=e.append(`g`);l.attr(`id`,`actor`+o+`_popup`),l.attr(`class`,`actorPopupMenu`),l.attr(`display`,c);var u=``;s.class!==void 0&&(u=` `+s.class);let d=s.width>n?s.width:n,f=l.append(`rect`);if(f.attr(`class`,`actorPopupMenuPanel`+u),f.attr(`x`,s.x),f.attr(`y`,s.height),f.attr(`fill`,s.fill),f.attr(`stroke`,s.stroke),f.attr(`width`,d),f.attr(`height`,s.height),f.attr(`rx`,s.rx),f.attr(`ry`,s.ry),a!=null){var p=20;for(let e in a){var m=l.append(`a`),h=(0,N.sanitizeUrl)(a[e]);m.attr(`xlink:href`,h),m.attr(`target`,`_blank`),je(r)(e,m,s.x+10,s.height+p,d,20,{class:`actor`},r),p+=30}}return f.attr(`height`,p),{height:s.height+p,width:d}},`drawPopup`),ae=e(function(e){return`var pu = document.getElementById('`+e+`'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }`},`popupMenuToggle`),oe=e(async function(e,t,n=null){let i=e.append(`foreignObject`),a=await r(t.text,u()),o=i.append(`xhtml:div`).attr(`style`,`width: fit-content;`).attr(`xmlns`,`http://www.w3.org/1999/xhtml`).html(a).node().getBoundingClientRect();if(i.attr(`height`,Math.round(o.height)).attr(`width`,Math.round(o.width)),t.class===`noteText`){let n=e.node().firstChild;n.setAttribute(`height`,o.height+2*t.textMargin);let r=n.getBBox();i.attr(`x`,Math.round(r.x+r.width/2-o.width/2)).attr(`y`,Math.round(r.y+r.height/2-o.height/2))}else if(n){let{startx:e,stopx:r,starty:a}=n;if(e>r){let t=e;e=r,r=t}i.attr(`x`,Math.round(e+Math.abs(e-r)/2-o.width/2)),t.class===`loopText`?i.attr(`y`,Math.round(a)):i.attr(`y`,Math.round(a-o.height))}return[i]},`drawKatex`),G=e(function(t,n){let r=0,i=0,a=n.text.split(m.lineBreakRegex),[o,s]=S(n.fontSize),c=[],l=0,u=e(()=>n.y,`yfunc`);if(n.valign!==void 0&&n.textMargin!==void 0&&n.textMargin>0)switch(n.valign){case`top`:case`start`:u=e(()=>Math.round(n.y+n.textMargin),`yfunc`);break;case`middle`:case`center`:u=e(()=>Math.round(n.y+(r+i+n.textMargin)/2),`yfunc`);break;case`bottom`:case`end`:u=e(()=>Math.round(n.y+(r+i+2*n.textMargin)-n.textMargin),`yfunc`);break}if(n.anchor!==void 0&&n.textMargin!==void 0&&n.width!==void 0)switch(n.anchor){case`left`:case`start`:n.x=Math.round(n.x+n.textMargin),n.anchor=`start`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break;case`middle`:case`center`:n.x=Math.round(n.x+n.width/2),n.anchor=`middle`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break;case`right`:case`end`:n.x=Math.round(n.x+n.width-n.textMargin),n.anchor=`end`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break}for(let[e,d]of a.entries()){n.textMargin!==void 0&&n.textMargin===0&&o!==void 0&&(l=e*o);let a=t.append(`text`);a.attr(`x`,n.x),a.attr(`y`,u()),n.anchor!==void 0&&a.attr(`text-anchor`,n.anchor).attr(`dominant-baseline`,n.dominantBaseline).attr(`alignment-baseline`,n.alignmentBaseline),n.fontFamily!==void 0&&a.style(`font-family`,n.fontFamily),s!==void 0&&a.style(`font-size`,s),n.fontWeight!==void 0&&a.style(`font-weight`,n.fontWeight),n.fill!==void 0&&a.attr(`fill`,n.fill),n.class!==void 0&&a.attr(`class`,n.class),n.dy===void 0?l!==0&&a.attr(`dy`,l):a.attr(`dy`,n.dy);let f=d||``;if(n.tspan){let e=a.append(`tspan`);e.attr(`x`,n.x),n.fill!==void 0&&e.attr(`fill`,n.fill),e.text(f)}else a.text(f);n.valign!==void 0&&n.textMargin!==void 0&&n.textMargin>0&&(i+=(a._groups||a)[0][0].getBBox().height,r=i),c.push(a)}return c},`drawText`),se=e(function(t,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}e(r,`genPoints`);let i=t.append(`polygon`);return i.attr(`points`,r(n.x,n.y,n.width,n.height,7)),i.attr(`class`,`labelBox`),n.y+=n.height/2,G(t,n),i},`drawLabel`),K=-1,ce=e((e,t,n,r)
|
|||
|
|
a ${y},${v} 0 0 0 0,${g.height}
|
|||
|
|
h ${g.width-2*y}
|
|||
|
|
a ${y},${v} 0 0 0 0,-${g.height}
|
|||
|
|
Z
|
|||
|
|
`;b.append(`path`).attr(`d`,S),x.append(`path`).attr(`d`,`M ${g.x},${g.y+v}
|
|||
|
|
a ${y},${v} 0 0 0 0,${g.height}`),b.attr(`transform`,`translate(${y}, ${-(g.height/2)})`),x.attr(`transform`,`translate(${g.width-y}, ${-g.height/2})`),t.rectData=g,l===`neo`&&b.attr(`filter`,`url(#drop-shadow)`);let C=a.get(t.name)??0;if(U.has(u)&&(b.style(`stroke`,p[C%p.length]),b.style(`fill`,f[C%p.length]),x.style(`stroke`,p[C%p.length]),x.style(`fill`,f[C%p.length])),t.properties?.icon){let e=t.properties.icon.trim(),n=g.x+g.width-20,r=g.y+10;e.charAt(0)===`@`?A(h,n,r,e.substr(1)):O(h,n,r,e)}Y(r,n(t.description))(t.description,h,g.x,g.y,g.width,g.height,{class:`actor ${re}`},r);let w=t.height,T=b.select(`path:last-child`);if(T.node()){let e=T.node().getBBox();t.height=e.height,w=e.height}return i||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`queue`),h.attr(`data-id`,t.name)),w},`drawActorTypeQueue`),fe=e(function(e,t,r,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=s+75,{look:u,theme:d,themeVariables:f}=r,{bkgColorArray:p,borderColorArray:m,actorBorder:h,actorBkg:g}=f,_=e.append(`g`).lower();i||(K++,_.append(`line`).attr(`id`,`actor`+K).attr(`x1`,c).attr(`y1`,l).attr(`x2`,c).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let v=e.append(`g`),y=H;i?y+=` ${V}`:y+=` ${B}`,v.attr(`class`,y),v.attr(`name`,t.name);let b=j();b.x=t.x,b.y=s,b.fill=`#eaeaea`,b.width=t.width,b.height=t.height,b.class=`actor`;let x=t.x+t.width/2,S=s+32;v.append(`defs`).append(`marker`).attr(`id`,a+`-filled-head-control`).attr(`refX`,11).attr(`refY`,5.8).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`172.5`).attr(`stroke-width`,1.2).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`),v.append(`circle`).attr(`cx`,x).attr(`cy`,S).attr(`r`,22).attr(`filter`,`${u===`neo`?`url(#drop-shadow)`:``}`),v.append(`line`).attr(`marker-end`,`url(#`+a+`-filled-head-control)`).attr(`transform`,`translate(${x}, ${S-22})`);let C=o.get(t.name)??0;return U.has(d)?(v.style(`stroke`,m[C%m.length]),v.style(`fill`,p[C%m.length])):(v.style(`stroke`,h),v.style(`fill`,g)),t.height=v.node().getBBox().height+2*(r?.sequence?.labelBoxHeight??0),Y(r,n(t.description))(t.description,v,b.x,b.y+22+(i?5:12),b.width,b.height,{class:`actor ${H}`},r),i||(v.attr(`data-et`,`participant`),v.attr(`data-type`,`control`),v.attr(`data-id`,t.name)),t.height},`drawActorTypeControl`),pe=e(function(e,t,r,i,a){let o=i?t.stopy:t.starty,s=t.x+t.width/2,c=o+75,{look:l,theme:u,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower(),h=e.append(`g`),g=`actor`;i?g+=` ${V}`:g+=` ${B}`,h.attr(`class`,g),h.attr(`name`,t.name);let _=j();_.x=t.x,_.y=o,_.fill=`#eaeaea`,_.width=t.width,_.height=t.height,_.class=`actor`;let v=t.x+t.width/2,y=o+(i?10:25);h.append(`circle`).attr(`cx`,v).attr(`cy`,y).attr(`r`,22).attr(`width`,t.width).attr(`height`,t.height),h.append(`line`).attr(`x1`,v-22).attr(`x2`,v+22).attr(`y1`,y+22).attr(`y2`,y+22).attr(`stroke-width`,2),l===`neo`&&h.attr(`filter`,`url(#drop-shadow)`);let b=a.get(t.name)??0;return U.has(u)&&(h.style(`stroke`,p[b%p.length]),h.style(`fill`,f[b%p.length])),t.height=h.node().getBBox().height+(r?.sequence?.labelBoxHeight??0),i||(K++,m.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K),Y(r,n(t.description))(t.description,h,_.x,_.y+(i?15:30),_.width,_.height,{class:`actor ${H}`},r),i?h.attr(`transform`,`translate(0, 22)`):(h.attr(`transform`,`translate(0, ${22/2-5})`),h.attr(`data-et`,`participant`),h.attr(`data-type`,`entity`),h.attr(`data-id`,t.name)),t.height},`drawActorTypeEntity`),me=e(function(e,t,r,i,a){let o=i?t.stopy:t.starty,s=t.x+t.width/2,c=o+t.height+2*r.boxTextMargin,{theme:l,themeVariables:u,look:d}=r,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=u,h=e.append(`g`).lower(),g=h;i||(K++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.a
|
|||
|
|
M ${_.x},${_.y+S}
|
|||
|
|
a ${x},${S} 0 0 0 ${y},0
|
|||
|
|
a ${x},${S} 0 0 0 -${y},0
|
|||
|
|
l 0,${b-2*S}
|
|||
|
|
a ${x},${S} 0 0 0 ${y},0
|
|||
|
|
l 0,-${b-2*S}
|
|||
|
|
`;C.append(`path`).attr(`d`,w),d===`neo`&&C.attr(`filter`,`url(#drop-shadow)`);let T=a.get(t.name)??0;U.has(l)?(C.style(`stroke`,p[T%p.length]),C.style(`fill`,f[T%p.length])):C.style(`stroke`,m),C.attr(`transform`,`translate(${y}, ${S})`),t.rectData=_,Y(r,n(t.description))(t.description,g,_.x,_.y+35,_.width,_.height,{class:`actor ${re}`},r);let E=C.select(`path:last-child`);return E.node()&&(t.height=E.node().getBBox().height+(r.sequence.labelBoxHeight??0)),i||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`database`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeDatabase`),he=e(function(e,t,r,i,a){let o=i?t.stopy:t.starty,s=t.x+t.width/2,c=o+80,l=e.append(`g`).lower(),{look:u,theme:d,themeVariables:f}=r,{bkgColorArray:p,borderColorArray:m,actorBorder:h}=f;i||(K++,l.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let g=e.append(`g`),_=H;i?_+=` ${V}`:_+=` ${B}`,g.attr(`class`,_),g.attr(`name`,t.name);let v=j();v.x=t.x,v.y=o,v.fill=`#eaeaea`,v.width=t.width,v.height=t.height,v.class=`actor`,g.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,t.x+t.width/2-22*2.5).attr(`y1`,o+12).attr(`x2`,t.x+t.width/2-15).attr(`y2`,o+12),g.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,t.x+t.width/2-22*2.5).attr(`y1`,o+2).attr(`x2`,t.x+t.width/2-22*2.5).attr(`y2`,o+22),g.append(`circle`).attr(`cx`,t.x+t.width/2).attr(`cy`,o+12).attr(`r`,22),u===`neo`&&g.attr(`filter`,`url(#drop-shadow)`);let y=a.get(t.name)??0;return U.has(d)?(g.style(`stroke`,m[y%m.length]),g.style(`fill`,p[y%m.length])):g.style(`stroke`,h),t.height=g.node().getBBox().height+(r.sequence.labelBoxHeight??0),Y(r,n(t.description))(t.description,g,v.x,v.y+15,v.width,v.height,{class:`actor ${H}`},r),g.attr(`transform`,`translate(0,21)`),i||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`boundary`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeBoundary`),ge=e(function(e,t,r,i,a){let o=i?t.stopy:t.starty,s=t.x+t.width/2,c=o+80,{look:l,theme:u,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=d,h=e.append(`g`).lower();i||(K++,h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let g=e.append(`g`),_=H;i?_+=` ${V}`:_+=` ${B}`,g.attr(`class`,_),g.attr(`name`,t.name),i||g.attr(`data-et`,`participant`).attr(`data-type`,`actor`).attr(`data-id`,t.name);let v=l===`neo`?.5:1,y=l===`neo`?o+(1-v)*30:o;g.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,s).attr(`y1`,y+25*v).attr(`x2`,s).attr(`y2`,y+45*v),g.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,s-z/2*v).attr(`y1`,y+33*v).attr(`x2`,s+z/2*v).attr(`y2`,y+33*v),g.append(`line`).attr(`x1`,s-z/2*v).attr(`y1`,y+60*v).attr(`x2`,s).attr(`y2`,y+45*v),g.append(`line`).attr(`x1`,s).attr(`y1`,y+45*v).attr(`x2`,s+(z/2-2)*v).attr(`y2`,y+60*v);let b=g.append(`circle`);b.attr(`cx`,t.x+t.width/2),b.attr(`cy`,y+10*v),b.attr(`r`,15*v),b.attr(`width`,t.width*v),b.attr(`height`,t.height*v),t.height=g.node().getBBox().height;let x=j();x.x=t.x,x.y=y,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height/v,x.class=`actor`,x.rx=3,x.ry=3;let S=a.get(t.name)??0;return U.has(u)?(g.style(`stroke`,p[S%p.length]),g.style(`fill`,f[S%p.length])):g.style(`stroke`,m),Y(r,n(t.description))(t.description,g,x.x,y+35*v-(l===`neo`?10:0),x.width,x.height,{class:`actor ${H}`},r),t.height},`drawActorTypeActor`),_e=e(async function(e,t,n,r,i,a,o){let s=o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]));switch(t.type){case`actor`:return await ge(e,t,n,r,s);case`participant`:return await le(e,t,n,r,s);case`boundary`:return await he(e,t,n,r,s);case`control`:return await fe(e,t,n,r,i,s);case`entity`:return await pe(e,t,n,r,s);case`database`:return await me(e,t,n,r,s);case`collections`:return awai
|