docusaurus/assets/js/51508.4d02d2a3.js
2024-09-02 15:57:26 +00:00

117 lines
No EOL
81 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[51508],{51508:(t,e,a)=>{let r,i,s,n,o;a.d(e,{diagram:()=>tu});var c=a(17367),l=a(93126),h=a(12441),d=a(31546);a(95285),a(31234);var p=function(){var t=function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},e=[1,2],a=[1,3],r=[1,5],i=[1,7],s=[2,5],n=[1,15],o=[1,17],c=[1,19],l=[1,20],h=[1,22],d=[1,23],p=[1,24],g=[1,30],u=[1,31],x=[1,32],y=[1,33],m=[1,34],f=[1,35],b=[1,36],T=[1,37],E=[1,38],w=[1,39],_=[1,40],v=[1,41],P=[1,42],k=[1,44],L=[1,45],I=[1,46],M=[1,48],N=[1,49],A=[1,50],S=[1,51],O=[1,52],D=[1,53],R=[1,56],C=[1,4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,53,54,55,56,58,59,60,65,66,67,68,76,86],$=[4,5,22,56,58,59],Y=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,56,58,59,60,65,66,67,68,76,86],B=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,55,56,58,59,60,65,66,67,68,76,86],V=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,54,56,58,59,60,65,66,67,68,76,86],F=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,53,56,58,59,60,65,66,67,68,76,86],q=[74,75,76],W=[1,133],z=[1,4,5,7,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,53,54,55,56,58,59,60,65,66,67,68,76,86],H={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,box_section:11,box_line:12,participant_statement:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,create:19,box:20,restOfLine:21,end:22,signal:23,autonumber:24,NUM:25,off:26,activate:27,actor:28,deactivate:29,note_statement:30,links_statement:31,link_statement:32,properties_statement:33,details_statement:34,title:35,legacy_title:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,loop:42,rect:43,opt:44,alt:45,else_sections:46,par:47,par_sections:48,par_over:49,critical:50,option_sections:51,break:52,option:53,and:54,else:55,participant:56,AS:57,participant_actor:58,destroy:59,note:60,placement:61,text2:62,over:63,actor_pair:64,links:65,link:66,properties:67,details:68,spaceList:69,",":70,left_of:71,right_of:72,signaltype:73,"+":74,"-":75,ACTOR:76,SOLID_OPEN_ARROW:77,DOTTED_OPEN_ARROW:78,SOLID_ARROW:79,DOTTED_ARROW:80,SOLID_CROSS:81,DOTTED_CROSS:82,SOLID_POINT:83,DOTTED_POINT:84,TXT:85,open_directive:86,type_directive:87,arg_directive:88,close_directive:89,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",17:":",19:"create",20:"box",21:"restOfLine",22:"end",24:"autonumber",25:"NUM",26:"off",27:"activate",29:"deactivate",35:"title",36:"legacy_title",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"loop",43:"rect",44:"opt",45:"alt",47:"par",49:"par_over",50:"critical",52:"break",53:"option",54:"and",55:"else",56:"participant",57:"AS",58:"participant_actor",59:"destroy",60:"note",63:"over",65:"links",66:"link",67:"properties",68:"details",70:",",71:"left_of",72:"right_of",74:"+",75:"-",76:"ACTOR",77:"SOLID_OPEN_ARROW",78:"DOTTED_OPEN_ARROW",79:"SOLID_ARROW",80:"DOTTED_ARROW",81:"SOLID_CROSS",82:"DOTTED_CROSS",83:"SOLID_POINT",84:"DOTTED_POINT",85:"TXT",86:"open_directive",87:"type_directive",88:"arg_directive",89:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[11,0],[11,2],[12,2],[12,1],[12,1],[6,4],[6,6],[10,1],[10,2],[10,4],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[51,1],[51,4],[48,1],[48,4],[46,1],[46,4],[13,5],[13,3],[13,5],[13,3],[13,3],[30,4],[30,4],[31,3],[32,3],[33,3],[34,3],[69,2],[69,1],[64,3],[64,1],[61,1],[61,1],[23,5],[23,5],[23,4],[28,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[62,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(t,e,a,r,i,s,n){var o=s.length-1;switch(i){case 4:return r.apply(s[o]),s[o];case 5:case 10:case 9:case 14:this.$=[];break;case 6:case 11:s[o-1].push(s[o]),this.$=s[o-1];break;case 7:case 8:case 12:case 13:case 66:this.$=s[o];break;case 18:s[o].type="createParticipant",this.$=s[o];break;case 19:s[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(s[o-2])}),s[o-1].push({type:"boxEnd",boxText:s[o-2]}),this.$=s[o-1];break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-2]),sequenceIndexStep:Number(s[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 24:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 25:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:s[o-1]};break;case 26:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:s[o-1]};break;case 32:r.setDiagramTitle(s[o].substring(6)),this.$=s[o].substring(6);break;case 33:r.setDiagramTitle(s[o].substring(7)),this.$=s[o].substring(7);break;case 34:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 35:case 36:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 37:s[o-1].unshift({type:"loopStart",loopText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.LOOP_START}),s[o-1].push({type:"loopEnd",loopText:s[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=s[o-1];break;case 38:s[o-1].unshift({type:"rectStart",color:r.parseMessage(s[o-2]),signalType:r.LINETYPE.RECT_START}),s[o-1].push({type:"rectEnd",color:r.parseMessage(s[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=s[o-1];break;case 39:s[o-1].unshift({type:"optStart",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.OPT_START}),s[o-1].push({type:"optEnd",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=s[o-1];break;case 40:s[o-1].unshift({type:"altStart",altText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.ALT_START}),s[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=s[o-1];break;case 41:s[o-1].unshift({type:"parStart",parText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.PAR_START}),s[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=s[o-1];break;case 42:s[o-1].unshift({type:"parStart",parText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),s[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=s[o-1];break;case 43:s[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.CRITICAL_START}),s[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=s[o-1];break;case 44:s[o-1].unshift({type:"breakStart",breakText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.BREAK_START}),s[o-1].push({type:"breakEnd",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=s[o-1];break;case 47:this.$=s[o-3].concat([{type:"option",optionText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},s[o]]);break;case 49:this.$=s[o-3].concat([{type:"and",parText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.PAR_AND},s[o]]);break;case 51:this.$=s[o-3].concat([{type:"else",altText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.ALT_ELSE},s[o]]);break;case 52:s[o-3].draw="participant",s[o-3].type="addParticipant",s[o-3].description=r.parseMessage(s[o-1]),this.$=s[o-3];break;case 53:s[o-1].draw="participant",s[o-1].type="addParticipant",this.$=s[o-1];break;case 54:s[o-3].draw="actor",s[o-3].type="addParticipant",s[o-3].description=r.parseMessage(s[o-1]),this.$=s[o-3];break;case 55:s[o-1].draw="actor",s[o-1].type="addParticipant",this.$=s[o-1];break;case 56:s[o-1].type="destroyParticipant",this.$=s[o-1];break;case 57:this.$=[s[o-1],{type:"addNote",placement:s[o-2],actor:s[o-1].actor,text:s[o]}];break;case 58:s[o-2]=[].concat(s[o-1],s[o-1]).slice(0,2),s[o-2][0]=s[o-2][0].actor,s[o-2][1]=s[o-2][1].actor,this.$=[s[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:s[o-2].slice(0,2),text:s[o]}];break;case 59:this.$=[s[o-1],{type:"addLinks",actor:s[o-1].actor,text:s[o]}];break;case 60:this.$=[s[o-1],{type:"addALink",actor:s[o-1].actor,text:s[o]}];break;case 61:this.$=[s[o-1],{type:"addProperties",actor:s[o-1].actor,text:s[o]}];break;case 62:this.$=[s[o-1],{type:"addDetails",actor:s[o-1].actor,text:s[o]}];break;case 65:this.$=[s[o-2],s[o]];break;case 67:this.$=r.PLACEMENT.LEFTOF;break;case 68:this.$=r.PLACEMENT.RIGHTOF;break;case 69:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:s[o-1]}];break;case 70:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:s[o-4]}];break;case 71:this.$=[s[o-3],s[o-1],{type:"addMessage",from:s[o-3].actor,to:s[o-1].actor,signalType:s[o-2],msg:s[o]}];break;case 72:this.$={type:"addParticipant",actor:s[o]};break;case 73:this.$=r.LINETYPE.SOLID_OPEN;break;case 74:this.$=r.LINETYPE.DOTTED_OPEN;break;case 75:this.$=r.LINETYPE.SOLID;break;case 76:this.$=r.LINETYPE.DOTTED;break;case 77:this.$=r.LINETYPE.SOLID_CROSS;break;case 78:this.$=r.LINETYPE.DOTTED_CROSS;break;case 79:this.$=r.LINETYPE.SOLID_POINT;break;case 80:this.$=r.LINETYPE.DOTTED_POINT;break;case 81:this.$=r.parseMessage(s[o].trim().substring(1));break;case 82:r.parseDirective("%%{","open_directive");break;case 83:r.parseDirective(s[o],"type_directive");break;case 84:s[o]=s[o].trim().replace(/'/g,'"'),r.parseDirective(s[o],"arg_directive");break;case 85:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:a,6:4,7:r,14:6,86:i},{1:[3]},{3:8,4:e,5:a,6:4,7:r,14:6,86:i},{3:9,4:e,5:a,6:4,7:r,14:6,86:i},{3:10,4:e,5:a,6:4,7:r,14:6,86:i},t([1,4,5,19,20,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,56,58,59,60,65,66,67,68,76,86],s,{8:11}),{15:12,87:[1,13]},{87:[2,82]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:i},{16:54,17:[1,55],89:R},t([17,89],[2,83]),t(C,[2,6]),{6:43,10:57,13:18,14:6,19:c,20:l,23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:i},t(C,[2,8]),t(C,[2,9]),t(C,[2,17]),{13:58,56:k,58:L,59:I},{21:[1,59]},{5:[1,60]},{5:[1,63],25:[1,61],26:[1,62]},{28:64,76:D},{28:65,76:D},{5:[1,66]},{5:[1,67]},{5:[1,68]},{5:[1,69]},{5:[1,70]},t(C,[2,32]),t(C,[2,33]),{38:[1,71]},{40:[1,72]},t(C,[2,36]),{21:[1,73]},{21:[1,74]},{21:[1,75]},{21:[1,76]},{21:[1,77]},{21:[1,78]},{21:[1,79]},{21:[1,80]},t(C,[2,45]),{28:81,76:D},{28:82,76:D},{28:83,76:D},{73:84,77:[1,85],78:[1,86],79:[1,87],80:[1,88],81:[1,89],82:[1,90],83:[1,91],84:[1,92]},{61:93,63:[1,94],71:[1,95],72:[1,96]},{28:97,76:D},{28:98,76:D},{28:99,76:D},{28:100,76:D},t([5,57,70,77,78,79,80,81,82,83,84,85],[2,72]),{5:[1,101]},{18:102,88:[1,103]},{5:[2,85]},t(C,[2,7]),t(C,[2,18]),t($,[2,10],{11:104}),t(C,[2,20]),{5:[1,106],25:[1,105]},{5:[1,107]},t(C,[2,24]),{5:[1,108]},{5:[1,109]},t(C,[2,27]),t(C,[2,28]),t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,34]),t(C,[2,35]),t(Y,s,{8:110}),t(Y,s,{8:111}),t(Y,s,{8:112}),t(B,s,{46:113,8:114}),t(V,s,{48:115,8:116}),t(V,s,{8:116,48:117}),t(F,s,{51:118,8:119}),t(Y,s,{8:120}),{5:[1,122],57:[1,121]},{5:[1,124],57:[1,123]},{5:[1,125]},{28:128,74:[1,126],75:[1,127],76:D},t(q,[2,73]),t(q,[2,74]),t(q,[2,75]),t(q,[2,76]),t(q,[2,77]),t(q,[2,78]),t(q,[2,79]),t(q,[2,80]),{28:129,76:D},{28:131,64:130,76:D},{76:[2,67]},{76:[2,68]},{62:132,85:W},{62:134,85:W},{62:135,85:W},{62:136,85:W},t(z,[2,15]),{16:137,89:R},{89:[2,84]},{4:[1,140],5:[1,142],12:139,13:141,22:[1,138],56:k,58:L,59:I},{5:[1,143]},t(C,[2,22]),t(C,[2,23]),t(C,[2,25]),t(C,[2,26]),{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[1,144],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:i},{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[1,145],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:i},{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[1,146],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:i},{22:[1,147]},{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[2,50],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,55:[1,148],56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:i},{22:[1,149]},{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[2,48],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,54:[1,150],56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:i},{22:[1,151]},{22:[1,152]},{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[2,46],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,53:[1,153],56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:i},{4:n,5:o,6:43,9:14,10:16,13:18,14:6,19:c,20:l,22:[1,154],23:21,24:h,27:d,28:47,29:p,30:25,31:26,32:27,33:28,34:29,35:g,36:u,37:x,39:y,41:m,42:f,43:b,44:T,45:E,47:w,49:_,50:v,52:P,56:k,58:L,59:I,60:M,65:N,66:A,67:S,68:O,76:D,86:i},{21:[1,155]},t(C,[2,53]),{21:[1,156]},t(C,[2,55]),t(C,[2,56]),{28:157,76:D},{28:158,76:D},{62:159,85:W},{62:160,85:W},{62:161,85:W},{70:[1,162],85:[2,66]},{5:[2,59]},{5:[2,81]},{5:[2,60]},{5:[2,61]},{5:[2,62]},{5:[1,163]},t(C,[2,19]),t($,[2,11]),{13:164,56:k,58:L,59:I},t($,[2,13]),t($,[2,14]),t(C,[2,21]),t(C,[2,37]),t(C,[2,38]),t(C,[2,39]),t(C,[2,40]),{21:[1,165]},t(C,[2,41]),{21:[1,166]},t(C,[2,42]),t(C,[2,43]),{21:[1,167]},t(C,[2,44]),{5:[1,168]},{5:[1,169]},{62:170,85:W},{62:171,85:W},{5:[2,71]},{5:[2,57]},{5:[2,58]},{28:172,76:D},t(z,[2,16]),t($,[2,12]),t(B,s,{8:114,46:173}),t(V,s,{8:116,48:174}),t(F,s,{8:119,51:175}),t(C,[2,52]),t(C,[2,54]),{5:[2,69]},{5:[2,70]},{85:[2,65]},{22:[2,51]},{22:[2,49]},{22:[2,47]}],defaultActions:{7:[2,82],8:[2,1],9:[2,2],10:[2,3],56:[2,85],95:[2,67],96:[2,68],103:[2,84],132:[2,59],133:[2,81],134:[2,60],135:[2,61],136:[2,62],159:[2,71],160:[2,57],161:[2,58],170:[2,69],171:[2,70],172:[2,65],173:[2,51],174:[2,49],175:[2,47]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var a=Error(t);throw a.hash=e,a}},parse:function(t){var e=this,a=[0],r=[],i=[null],s=[],n=this.table,o="",c=0,l=0,h=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var u=d.yylloc;s.push(u);var x=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,m,f,b,T,E,w,_,v={};;){if(m=a[a.length-1],this.defaultActions[m]?f=this.defaultActions[m]:(null==y&&(y=function(){var t;return"number"!=typeof(t=r.pop()||d.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}()),f=n[m]&&n[m][y]),void 0===f||!f.length||!f[0]){var P="";for(T in _=[],n[m])this.terminals_[T]&&T>2&&_.push("'"+this.terminals_[T]+"'");P=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(P,{text:d.match,token:this.terminals_[y]||y,line:d.yylineno,loc:u,expected:_})}if(f[0]instanceof Array&&f.length>1)throw Error("Parse Error: multiple actions possible at state: "+m+", token: "+y);switch(f[0]){case 1:a.push(y),i.push(d.yytext),s.push(d.yylloc),a.push(f[1]),y=null,l=d.yyleng,o=d.yytext,c=d.yylineno,u=d.yylloc;break;case 2:if(E=this.productions_[f[1]][1],v.$=i[i.length-E],v._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},x&&(v._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),void 0!==(b=this.performAction.apply(v,[o,l,c,p.yy,f[1],i,s].concat(h))))return b;E&&(a=a.slice(0,-1*E*2),i=i.slice(0,-1*E),s=s.slice(0,-1*E)),a.push(this.productions_[f[1]][0]),i.push(v.$),s.push(v._$),w=n[a[a.length-2]][a[a.length-1]],a.push(w);break;case 3:return!0}}return!0}};function U(){this.yy={}}return H.lexer={EOF:1,parseError:function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,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},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},unput:function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;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),a.length-1&&(this.yylineno-=a.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:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var a,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=t[0].match(/(?:\r\n?|\n).*/g))&&(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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var s in i)this[s]=i[s];return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,a,r,i=this._currentRules(),s=0;s<i.length;s++)if((a=this._input.match(this.rules[i[s]]))&&(!e||a[0].length>e[0].length)){if(e=a,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[s])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,a,r){switch(a){case 0:return this.begin("open_directive"),86;case 1:return this.begin("type_directive"),87;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),89;case 4:return 88;case 5:case 56:case 69:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 25;case 12:return this.begin("LINE"),20;case 13:return this.begin("ID"),56;case 14:return this.begin("ID"),58;case 15:return 19;case 16:return this.begin("ID"),59;case 17:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),76;case 18:return this.popState(),this.popState(),this.begin("LINE"),57;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),42;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),44;case 23:return this.begin("LINE"),45;case 24:return this.begin("LINE"),55;case 25:return this.begin("LINE"),47;case 26:return this.begin("LINE"),49;case 27:return this.begin("LINE"),54;case 28:return this.begin("LINE"),50;case 29:return this.begin("LINE"),53;case 30:return this.begin("LINE"),52;case 31:return this.popState(),21;case 32:return 22;case 33:return 71;case 34:return 72;case 35:return 65;case 36:return 66;case 37:return 67;case 38:return 68;case 39:return 63;case 40:return 60;case 41:return this.begin("ID"),27;case 42:return this.begin("ID"),29;case 43:return 35;case 44:return 36;case 45:return this.begin("acc_title"),37;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),39;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 7;case 53:return 24;case 54:return 26;case 55:return 70;case 57:return e.yytext=e.yytext.trim(),76;case 58:return 79;case 59:return 80;case 60:return 77;case 61:return 78;case 62:return 81;case 63:return 82;case 64:return 83;case 65:return 84;case 66:return 85;case 67:return 74;case 68:return 75;case 70:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \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,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,17],inclusive:!1},ALIAS:{rules:[7,8,18,19],inclusive:!1},LINE:{rules:[7,8,31],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70],inclusive:!0}}},U.prototype=H,H.Parser=U,new U}();p.parser=p;let g={},u={},x={},y=[],m=[],f=!1,b=function(t){y.push({name:t.text,wrap:void 0===t.wrap&&v()||!!t.wrap,fill:t.color,actorKeys:[]}),s=y.slice(-1)[0]},T=function(t,e,a,r){let n=s,o=g[t];if(o){if(s&&o.box&&s!==o.box)throw Error("A same participant should only be defined in one Box: "+o.name+" can't be in '"+o.box.name+"' and in '"+s.name+"' at the same time.");if(n=o.box?o.box:s,o.box=n,o&&e===o.name&&null==a)return}(null==a||null==a.text)&&(a={text:e,wrap:null,type:r}),(null==r||null==a.text)&&(a={text:e,wrap:null,type:r}),g[t]={box:n,name:e,description:a.text,wrap:void 0===a.wrap&&v()||!!a.wrap,prevActor:i,links:{},properties:{},actorCnt:null,rectData:null,type:r||"participant"},i&&g[i]&&(g[i].nextActor=t),s&&s.actorKeys.push(t),i=t},E=t=>{let e;let a=0;for(e=0;e<m.length;e++)m[e].type===P.ACTIVE_START&&m[e].from.actor===t&&a++,m[e].type===P.ACTIVE_END&&m[e].from.actor===t&&a--;return a},w=function(t,e,a={text:void 0,wrap:void 0},r){if(r===P.ACTIVE_END&&1>E(t.actor)){let e=Error("Trying to inactivate an inactive participant ("+t.actor+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}return m.push({from:t,to:e,message:a.text,wrap:void 0===a.wrap&&v()||!!a.wrap,type:r}),!0},_=function(t){return g[t]},v=()=>void 0!==r?r:(0,c.c)().sequence.wrap,P={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},k=function(t,e,a){a.text,void 0===a.wrap&&v()||a.wrap;let r=[].concat(t,t);m.push({from:r[0],to:r[1],message:a.text,wrap:void 0===a.wrap&&v()||!!a.wrap,type:P.NOTE,placement:e})},L=function(t,e){let a=_(t);try{let t=(0,c.d)(e.text,(0,c.c)());t=(t=t.replace(/&amp;/g,"&")).replace(/&equals;/g,"=");let r=JSON.parse(t);M(a,r)}catch(t){c.l.error("error while parsing actor link text",t)}},I=function(t,e){let a=_(t);try{let t={},n=(0,c.d)(e.text,(0,c.c)());var r=n.indexOf("@"),i=(n=(n=n.replace(/&amp;/g,"&")).replace(/&equals;/g,"=")).slice(0,r-1).trim(),s=n.slice(r+1).trim();t[i]=s,M(a,t)}catch(t){c.l.error("error while parsing actor link text",t)}};function M(t,e){if(null==t.links)t.links=e;else for(let a in e)t.links[a]=e[a]}let N=function(t,e){let a=_(t);try{let t=(0,c.d)(e.text,(0,c.c)()),r=JSON.parse(t);A(a,r)}catch(t){c.l.error("error while parsing actor properties text",t)}};function A(t,e){if(null==t.properties)t.properties=e;else for(let a in e)t.properties[a]=e[a]}let S=function(t,e){let a=_(t),r=document.getElementById(e.text);try{let t=r.innerHTML,e=JSON.parse(t);e.properties&&A(a,e.properties),e.links&&M(a,e.links)}catch(t){c.l.error("error while parsing actor details text",t)}},O=function(t){if(Array.isArray(t))t.forEach(function(t){O(t)});else switch(t.type){case"sequenceIndex":m.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":T(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(g[t.actor])throw 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");n=t.actor,T(t.actor,t.actor,t.description,t.draw),u[t.actor]=m.length;break;case"destroyParticipant":o=t.actor,x[t.actor]=m.length;break;case"activeStart":case"activeEnd":w(t.actor,void 0,void 0,t.signalType);break;case"addNote":k(t.actor,t.placement,t.text);break;case"addLinks":L(t.actor,t.text);break;case"addALink":I(t.actor,t.text);break;case"addProperties":N(t.actor,t.text);break;case"addDetails":S(t.actor,t.text);break;case"addMessage":if(n){if(t.to!==n)throw Error("The created participant "+n+" does not have an associated creating message after its declaration. Please check the sequence diagram.");n=void 0}else if(o){if(t.to!==o&&t.from!==o)throw Error("The destroyed participant "+o+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");o=void 0}w(t.from,t.to,t.msg,t.signalType);break;case"boxStart":b(t.boxData);break;case"boxEnd":s=void 0;break;case"loopStart":w(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":w(void 0,void 0,void 0,t.signalType);break;case"rectStart":w(void 0,void 0,t.color,t.signalType);break;case"optStart":w(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":w(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,c.s)(t.text);break;case"parStart":case"and":w(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":w(void 0,void 0,t.criticalText,t.signalType);break;case"option":w(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":w(void 0,void 0,t.breakText,t.signalType)}},D={addActor:T,addMessage:function(t,e,a,r){m.push({from:t,to:e,message:a.text,wrap:void 0===a.wrap&&v()||!!a.wrap,answer:r})},addSignal:w,addLinks:L,addDetails:S,addProperties:N,autoWrap:v,setWrap:function(t){r=t},enableSequenceNumbers:function(){f=!0},disableSequenceNumbers:function(){f=!1},showSequenceNumbers:()=>f,getMessages:function(){return m},getActors:function(){return g},getCreatedActors:function(){return u},getDestroyedActors:function(){return x},getActor:_,getActorKeys:function(){return Object.keys(g)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getAccTitle:c.g,getBoxes:function(){return y},getDiagramTitle:c.t,setDiagramTitle:c.r,parseDirective:function(t,e,a){c.m.parseDirective(this,t,e,a)},getConfig:()=>(0,c.c)().sequence,clear:function(){g={},u={},x={},y=[],m=[],f=!1,(0,c.v)()},parseMessage:function(t){let e=t.trim(),a={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^:?wrap:/)||null===e.match(/^:?nowrap:/)&&void 0};return c.l.debug("parseMessage:",a),a},parseBoxData:function(t){let e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/),a=null!=e&&e[1]?e[1].trim():"transparent",r=null!=e&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{let e=new Option().style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}return{color:a,text:void 0!==r?(0,c.d)(r.replace(/^:?(?:no)?wrap:/,""),(0,c.c)()):void 0,wrap:void 0!==r?null!==r.match(/^:?wrap:/)||null===r.match(/^:?nowrap:/)&&void 0:void 0}},LINETYPE:P,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:k,setAccTitle:c.s,apply:O,setAccDescription:c.b,getAccDescription:c.a,hasAtLeastOneBox:function(){return y.length>0},hasAtLeastOneBoxWithTitle:function(){return y.some(t=>t.name)}},R=function(t,e){return(0,h.d)(t,e)},C=(t,e)=>{(0,c.H)(()=>{let a=document.querySelectorAll(t);0!==a.length&&(a[0].addEventListener("mouseover",function(){$("actor"+e+"_popup")}),a[0].addEventListener("mouseout",function(){Y("actor"+e+"_popup")}))})},$=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="block")},Y=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="none")},B=function(t,e){let a=0,r=0,i=e.text.split(c.e.lineBreakRegex),[s,n]=(0,c.F)(e.fontSize),o=[],l=0,h=()=>e.y;if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":h=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":h=()=>Math.round(e.y+(a+r+e.textMargin)/2);break;case"bottom":case"end":h=()=>Math.round(e.y+(a+r+2*e.textMargin)-e.textMargin)}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[d,p]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==s&&(l=d*s);let i=t.append("text");i.attr("x",e.x),i.attr("y",h()),void 0!==e.anchor&&i.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&i.style("font-family",e.fontFamily),void 0!==n&&i.style("font-size",n),void 0!==e.fontWeight&&i.style("font-weight",e.fontWeight),void 0!==e.fill&&i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class),void 0!==e.dy?i.attr("dy",e.dy):0!==l&&i.attr("dy",l);let g=p||c.Z;if(e.tspan){let t=i.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(g)}else i.text(g);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(i._groups||i)[0][0].getBBox().height,a=r),o.push(i)}return o},V=function(t,e){var a,r,i,s;let n=t.append("polygon");return n.attr("points",(a=e.x,r=e.y,a+","+r+" "+(a+(i=e.width))+","+r+" "+(a+i)+","+(r+(s=e.height)-7)+" "+(a+i-8.4)+","+(r+s)+" "+a+","+(r+s))),n.attr("class","labelBox"),e.y=e.y+e.height/2,B(t,e),n},F=-1,q=(t,e,a,r)=>{t.select&&a.forEach(a=>{let i=e[a],s=t.select("#actor"+i.actorCnt);!r.mirrorActors&&i.stopy?s.attr("y2",i.stopy+i.height/2):r.mirrorActors&&s.attr("y2",i.stopy)})},W=function(t,e,a,r){let i=r?e.stopy:e.starty,s=e.x+e.width/2,n=i+5,o=t.append("g").lower();var c=o;r||(F++,c.append("line").attr("id","actor"+F).attr("x1",s).attr("y1",n).attr("x2",s).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),c=o.append("g"),e.actorCnt=F,null!=e.links&&(c.attr("id","root-"+F),C("#root-"+F,F)));let l=(0,h.g)();var d="actor";null!=e.properties&&e.properties.class?d=e.properties.class:l.fill="#eaeaea",l.x=e.x,l.y=i,l.width=e.width,l.height=e.height,l.class=d,l.rx=3,l.ry=3;let p=R(c,l);if(e.rectData=l,null!=e.properties&&e.properties.icon){let t=e.properties.icon.trim();"@"===t.charAt(0)?(0,h.b)(c,l.x+l.width-20,l.y+10,t.substr(1)):(0,h.c)(c,l.x+l.width-20,l.y+10,t)}j(a)(e.description,c,l.x,l.y,l.width,l.height,{class:"actor"},a);let g=e.height;if(p.node){let t=p.node().getBBox();e.height=t.height,g=t.height}return g},z=function(t,e,a,r){let i=r?e.stopy:e.starty,s=e.x+e.width/2,n=i+80;t.lower(),r||(F++,t.append("line").attr("id","actor"+F).attr("x1",s).attr("y1",n).attr("x2",s).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),e.actorCnt=F);let o=t.append("g");o.attr("class","actor-man");let c=(0,h.g)();c.x=e.x,c.y=i,c.fill="#eaeaea",c.width=e.width,c.height=e.height,c.class="actor",c.rx=3,c.ry=3,o.append("line").attr("id","actor-man-torso"+F).attr("x1",s).attr("y1",i+25).attr("x2",s).attr("y2",i+45),o.append("line").attr("id","actor-man-arms"+F).attr("x1",s-18).attr("y1",i+33).attr("x2",s+18).attr("y2",i+33),o.append("line").attr("x1",s-18).attr("y1",i+60).attr("x2",s).attr("y2",i+45),o.append("line").attr("x1",s).attr("y1",i+45).attr("x2",s+18-2).attr("y2",i+60);let l=o.append("circle");l.attr("cx",e.x+e.width/2),l.attr("cy",i+10),l.attr("r",15),l.attr("width",e.width),l.attr("height",e.height);let d=o.node().getBBox();return e.height=d.height,j(a)(e.description,o,c.x,c.y+35,c.width,c.height,{class:"actor"},a),e.height},H=function(t,e){(0,h.a)(t,e)},U=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},j=function(){function t(t,e,a,i,s,n,o){r(e.append("text").attr("x",a+s/2).attr("y",i+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,i,s,n,o,l){let{actorFontSize:h,actorFontFamily:d,actorFontWeight:p}=l,[g,u]=(0,c.F)(h),x=t.split(c.e.lineBreakRegex);for(let t=0;t<x.length;t++){let c=t*g-g*(x.length-1)/2,l=e.append("text").attr("x",a+s/2).attr("y",i).style("text-anchor","middle").style("font-size",u).style("font-weight",p).style("font-family",d);l.append("tspan").attr("x",a+s/2).attr("dy",c).text(x[t]),l.attr("y",i+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(l,o)}}function a(t,a,i,s,n,o,c,l){let h=a.append("switch"),d=h.append("foreignObject").attr("x",i).attr("y",s).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,s,n,o,c,l),r(d,c)}function r(t,e){for(let a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return function(r){return"fo"===r.textPlacement?a:"old"===r.textPlacement?t:e}}(),K=function(){function t(t,e,a,i,s,n,o){r(e.append("text").attr("x",a).attr("y",i).style("text-anchor","start").text(t),o)}function e(t,e,a,i,s,n,o,l){let{actorFontSize:h,actorFontFamily:d,actorFontWeight:p}=l,g=t.split(c.e.lineBreakRegex);for(let t=0;t<g.length;t++){let s=t*h-h*(g.length-1)/2,c=e.append("text").attr("x",a).attr("y",i).style("text-anchor","start").style("font-size",h).style("font-weight",p).style("font-family",d);c.append("tspan").attr("x",a).attr("dy",s).text(g[t]),c.attr("y",i+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(c,o)}}function a(t,a,i,s,n,o,c,l){let h=a.append("switch"),d=h.append("foreignObject").attr("x",i).attr("y",s).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,s,n,o,c,l),r(d,c)}function r(t,e){for(let a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return function(r){return"fo"===r.textPlacement?a:"old"===r.textPlacement?t:e}}(),X={drawRect:R,drawText:B,drawLabel:V,drawActor:function(t,e,a,r){switch(e.type){case"actor":return z(t,e,a,r);case"participant":return W(t,e,a,r)}},drawBox:function(t,e,a){let r=t.append("g");H(r,e),e.name&&j(a)(e.name,r,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),r.lower()},drawPopup:function(t,e,a,r,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};let s=e.links,n=e.actorCnt,o=e.rectData;var c="none";i&&(c="block !important");let l=t.append("g");l.attr("id","actor"+n+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",c),C("#actor"+n+"_popup",n);var h="";void 0!==o.class&&(h=" "+o.class);let p=o.width>a?o.width:a,g=l.append("rect");if(g.attr("class","actorPopupMenuPanel"+h),g.attr("x",o.x),g.attr("y",o.height),g.attr("fill",o.fill),g.attr("stroke",o.stroke),g.attr("width",p),g.attr("height",o.height),g.attr("rx",o.rx),g.attr("ry",o.ry),null!=s){var u=20;for(let t in s){var x=l.append("a"),y=(0,d.Jf)(s[t]);x.attr("xlink:href",y),x.attr("target","_blank"),K(r)(t,x,o.x+10,o.height+u,p,20,{class:"actor"},r),u+=30}}return g.attr("height",u),{height:o.height+u,width:p}},anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,a,r,i){let s=(0,h.g)(),n=e.anchored;s.x=e.startx,s.y=e.starty,s.class="activation"+i%3,s.width=e.stopx-e.startx,s.height=a-e.starty,R(n,s)},drawLoop:function(t,e,a,r){let{boxMargin:i,boxTextMargin:s,labelBoxHeight:n,labelBoxWidth:o,messageFontFamily:c,messageFontSize:l,messageFontWeight:d}=r,p=t.append("g"),g=function(t,e,a,r){return p.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")};g(e.startx,e.starty,e.stopx,e.starty),g(e.stopx,e.starty,e.stopx,e.stopy),g(e.startx,e.stopy,e.stopx,e.stopy),g(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){g(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")});let u=(0,h.e)();return u.text=a,u.x=e.startx,u.y=e.starty,u.fontFamily=c,u.fontSize=l,u.fontWeight=d,u.anchor="middle",u.valign="middle",u.tspan=!1,u.width=o||50,u.height=n||20,u.textMargin=s,u.class="labelText",V(p,u),(u=U()).text=e.title,u.x=e.startx+o/2+(e.stopx-e.startx)/2,u.y=e.starty+i+s,u.anchor="middle",u.valign="middle",u.textMargin=s,u.class="loopText",u.fontFamily=c,u.fontSize=l,u.fontWeight=d,u.wrap=!0,B(p,u),void 0!==e.sectionTitles&&e.sectionTitles.forEach(function(t,a){if(t.message){u.text=t.message,u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.sections[a].y+i+s,u.class="loopText",u.anchor="middle",u.valign="middle",u.tspan=!1,u.fontFamily=c,u.fontSize=l,u.fontWeight=d,u.wrap=e.wrap;let r=Math.round(B(p,u).map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));e.sections[a].height+=r-(i+s)}}),e.height=Math.round(e.stopy-e.starty),p},drawBackgroundRect:H,insertArrowHead:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},insertArrowFilledHead:function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},insertSequenceNumber:function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead:function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},insertDatabaseIcon:function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},insertComputerIcon:function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},insertClockIcon:function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},getTextObj:U,getNoteRect:function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},popupMenu:function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},popdownMenu:function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},fixLifeLineHeights:q,sanitizeUrl:d.Jf},J={},G={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(t=>t.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,tn((0,c.c)())},updateVal:function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])},updateBounds:function(t,e,a,r){let i=this,s=0;function n(n){return function(o){s++;let c=i.sequenceItems.length-s+1;i.updateVal(o,"starty",e-c*J.boxMargin,Math.min),i.updateVal(o,"stopy",r+c*J.boxMargin,Math.max),i.updateVal(G.data,"startx",t-c*J.boxMargin,Math.min),i.updateVal(G.data,"stopx",a+c*J.boxMargin,Math.max),"activation"!==n&&(i.updateVal(o,"startx",t-c*J.boxMargin,Math.min),i.updateVal(o,"stopx",a+c*J.boxMargin,Math.max),i.updateVal(G.data,"starty",e-c*J.boxMargin,Math.min),i.updateVal(G.data,"stopy",r+c*J.boxMargin,Math.max))}}this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))},insert:function(t,e,a,r){let i=c.e.getMin(t,a),s=c.e.getMax(t,a),n=c.e.getMin(e,r),o=c.e.getMax(e,r);this.updateVal(G.data,"startx",i,Math.min),this.updateVal(G.data,"starty",n,Math.min),this.updateVal(G.data,"stopx",s,Math.max),this.updateVal(G.data,"stopy",o,Math.max),this.updateBounds(i,n,s,o)},newActivation:function(t,e,a){let r=a[t.from.actor],i=to(t.from.actor).length||0,s=r.x+r.width/2+(i-1)*J.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+J.activationWidth,stopy:void 0,actor:t.from.actor,anchored:X.anchorElement(e)})},endActivation:function(t){let e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},isLoopOverlap:function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},addSectionToLoop:function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:G.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},saveVerticalPos:function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},resetVerticalPos:function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=c.e.getMax(this.data.stopy,this.verticalPos)},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},Z=function(t,e){G.bumpVerticalPos(J.boxMargin),e.height=J.boxMargin,e.starty=G.getVerticalPos();let a=(0,h.g)();a.x=e.startx,a.y=e.starty,a.width=e.width||J.width,a.class="note";let r=t.append("g"),i=X.drawRect(r,a),s=(0,h.e)();s.x=e.startx,s.y=e.starty,s.width=a.width,s.dy="1em",s.text=e.message,s.class="noteText",s.fontFamily=J.noteFontFamily,s.fontSize=J.noteFontSize,s.fontWeight=J.noteFontWeight,s.anchor=J.noteAlign,s.textMargin=J.noteMargin,s.valign="center";let n=Math.round(B(r,s).map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));i.attr("height",n+2*J.noteMargin),e.height+=n+2*J.noteMargin,G.bumpVerticalPos(n+2*J.noteMargin),e.stopy=e.starty+n+2*J.noteMargin,e.stopx=e.startx+a.width,G.insert(e.startx,e.starty,e.stopx,e.stopy),G.models.addNote(e)},Q=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),tt=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),te=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),ta=function(t,e,a,r){let i;let{startx:s,stopx:n,starty:o,message:l,type:d,sequenceIndex:p,sequenceVisible:g}=e,u=c.u.calculateTextDimensions(l,Q(J)),x=(0,h.e)();x.x=s,x.y=o+10,x.width=n-s,x.class="messageText",x.dy="1em",x.text=l,x.fontFamily=J.messageFontFamily,x.fontSize=J.messageFontSize,x.fontWeight=J.messageFontWeight,x.anchor=J.messageAlign,x.valign="center",x.textMargin=J.wrapPadding,x.tspan=!1,B(t,x);let y=u.width;s===n?i=J.rightAngles?t.append("path").attr("d",`M ${s},${a} H ${s+c.e.getMax(J.width/2,y/2)} V ${a+25} H ${s}`):t.append("path").attr("d","M "+s+","+a+" C "+(s+60)+","+(a-10)+" "+(s+60)+","+(a+30)+" "+s+","+(a+20)):((i=t.append("line")).attr("x1",s),i.attr("y1",a),i.attr("x2",n),i.attr("y2",a)),d===r.db.LINETYPE.DOTTED||d===r.db.LINETYPE.DOTTED_CROSS||d===r.db.LINETYPE.DOTTED_POINT||d===r.db.LINETYPE.DOTTED_OPEN?(i.style("stroke-dasharray","3, 3"),i.attr("class","messageLine1")):i.attr("class","messageLine0");let m="";J.arrowMarkerAbsolute&&(m=(m=(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),i.attr("stroke-width",2),i.attr("stroke","none"),i.style("fill","none"),(d===r.db.LINETYPE.SOLID||d===r.db.LINETYPE.DOTTED)&&i.attr("marker-end","url("+m+"#arrowhead)"),(d===r.db.LINETYPE.SOLID_POINT||d===r.db.LINETYPE.DOTTED_POINT)&&i.attr("marker-end","url("+m+"#filled-head)"),(d===r.db.LINETYPE.SOLID_CROSS||d===r.db.LINETYPE.DOTTED_CROSS)&&i.attr("marker-end","url("+m+"#crosshead)"),(g||J.showSequenceNumbers)&&(i.attr("marker-start","url("+m+"#sequencenumber)"),t.append("text").attr("x",s).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(p))},tr=function(t,e,a,r,i,s,n){let o,l=0,h=0,d=0;for(let t of r){let r=e[t],s=r.box;o&&o!=s&&(n||G.models.addBox(o),h+=J.boxMargin+o.margin),s&&s!=o&&(n||(s.x=l+h,s.y=i),h+=s.margin),r.width=r.width||J.width,r.height=c.e.getMax(r.height||J.height,J.height),r.margin=r.margin||J.actorMargin,d=c.e.getMax(d,r.height),a[r.name]&&(h+=r.width/2),r.x=l+h,r.starty=G.getVerticalPos(),G.insert(r.x,i,r.x+r.width,r.height),l+=r.width+h,r.box&&(r.box.width=l+s.margin-r.box.x),h=r.margin,o=r.box,G.models.addActor(r)}o&&!n&&G.models.addBox(o),G.bumpVerticalPos(d)},ti=function(t,e,a,r){if(r){let r=0;for(let i of(G.bumpVerticalPos(2*J.boxMargin),a)){let a=e[i];a.stopy||(a.stopy=G.getVerticalPos());let s=X.drawActor(t,a,J,!0);r=c.e.getMax(r,s)}G.bumpVerticalPos(r+J.boxMargin)}else for(let r of a){let a=e[r];X.drawActor(t,a,J,!1)}},ts=function(t,e,a,r){let i=0,s=0;for(let n of a){let a=e[n],o=th(a),c=X.drawPopup(t,a,o,J,J.forceMenus,r);c.height>i&&(i=c.height),c.width+a.x>s&&(s=c.width+a.x)}return{maxHeight:i,maxWidth:s}},tn=function(t){(0,c.f)(J,t),t.fontFamily&&(J.actorFontFamily=J.noteFontFamily=J.messageFontFamily=t.fontFamily),t.fontSize&&(J.actorFontSize=J.noteFontSize=J.messageFontSize=t.fontSize),t.fontWeight&&(J.actorFontWeight=J.noteFontWeight=J.messageFontWeight=t.fontWeight)},to=function(t){return G.activations.filter(function(e){return e.actor===t})},tc=function(t,e){let a=e[t],r=to(t);return[r.reduce(function(t,e){return c.e.getMin(t,e.startx)},a.x+a.width/2),r.reduce(function(t,e){return c.e.getMax(t,e.stopx)},a.x+a.width/2)]};function tl(t,e,a,r,i){G.bumpVerticalPos(a);let s=r;if(e.id&&e.message&&t[e.id]){let a=t[e.id].width,i=Q(J);e.message=c.u.wrapLabel(`[${e.message}]`,a-2*J.wrapPadding,i),e.width=a,e.wrap=!0;let n=c.u.calculateTextDimensions(e.message,i),o=c.e.getMax(n.height,J.labelBoxHeight);s=r+o,c.l.debug(`${o} - ${e.message}`)}i(e),G.bumpVerticalPos(s)}let th=function(t){let e=0,a=te(J);for(let r in t.links){let t=c.u.calculateTextDimensions(r,a).width+2*J.wrapPadding+2*J.boxMargin;e<t&&(e=t)}return e},td=function(t,e,a){let r=e[t.from].x,i=e[t.to].x,s=t.wrap&&t.message,n=c.u.calculateTextDimensions(s?c.u.wrapLabel(t.message,J.width,tt(J)):t.message,tt(J)),o={width:s?J.width:c.e.getMax(J.width,n.width+2*J.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(o.width=s?c.e.getMax(J.width,n.width):c.e.getMax(e[t.from].width/2+e[t.to].width/2,n.width+2*J.noteMargin),o.startx=r+(e[t.from].width+J.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(o.width=s?c.e.getMax(J.width,n.width+2*J.noteMargin):c.e.getMax(e[t.from].width/2+e[t.to].width/2,n.width+2*J.noteMargin),o.startx=r-o.width+(e[t.from].width-J.actorMargin)/2):t.to===t.from?(n=c.u.calculateTextDimensions(s?c.u.wrapLabel(t.message,c.e.getMax(J.width,e[t.from].width),tt(J)):t.message,tt(J)),o.width=s?c.e.getMax(J.width,e[t.from].width):c.e.getMax(e[t.from].width,J.width,n.width+2*J.noteMargin),o.startx=r+(e[t.from].width-o.width)/2):(o.width=Math.abs(r+e[t.from].width/2-(i+e[t.to].width/2))+J.actorMargin,o.startx=r<i?r+e[t.from].width/2-J.actorMargin/2:i+e[t.to].width/2-J.actorMargin/2),s&&(o.message=c.u.wrapLabel(t.message,o.width-2*J.wrapPadding,tt(J))),c.l.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o},tp=function(t,e,a){let r=!1;if([a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(r=!0),!r)return{};let i=tc(t.from,e),s=tc(t.to,e),n=i[0]<=s[0]?1:0,o=i[0]<s[0]?0:1,l=[...i,...s],h=Math.abs(s[o]-i[n]);t.wrap&&t.message&&(t.message=c.u.wrapLabel(t.message,c.e.getMax(h+2*J.wrapPadding,J.width),Q(J)));let d=c.u.calculateTextDimensions(t.message,Q(J));return{width:c.e.getMax(t.wrap?0:d.width+2*J.wrapPadding,h+2*J.wrapPadding,J.width),height:0,startx:i[n],stopx:s[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}},tg=function(t,e,a,r){let i,s,n;let o={},l=[];return t.forEach(function(t){switch(t.id=c.u.random({length:10}),t.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:l.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:t.message&&(o[(i=l.pop()).id]=i,o[t.id]=i,l.push(i));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:o[(i=l.pop()).id]=i;break;case r.db.LINETYPE.ACTIVE_START:{let a=e[t.from?t.from.actor:t.to.actor],r=to(t.from?t.from.actor:t.to.actor).length,i=a.x+a.width/2+(r-1)*J.activationWidth/2,s={startx:i,stopx:i+J.activationWidth,actor:t.from.actor,enabled:!0};G.activations.push(s)}break;case r.db.LINETYPE.ACTIVE_END:{let e=G.activations.map(t=>t.actor).lastIndexOf(t.from.actor);delete G.activations.splice(e,1)[0]}}void 0!==t.placement?(s=td(t,e,r),t.noteModel=s,l.forEach(t=>{(i=t).from=c.e.getMin(i.from,s.startx),i.to=c.e.getMax(i.to,s.startx+s.width),i.width=c.e.getMax(i.width,Math.abs(i.from-i.to))-J.labelBoxWidth})):(n=tp(t,e,r),t.msgModel=n,n.startx&&n.stopx&&l.length>0&&l.forEach(a=>{if(i=a,n.startx===n.stopx){let a=e[t.from],r=e[t.to];i.from=c.e.getMin(a.x-n.width/2,a.x-a.width/2,i.from),i.to=c.e.getMax(r.x+n.width/2,r.x+a.width/2,i.to),i.width=c.e.getMax(i.width,Math.abs(i.to-i.from))-J.labelBoxWidth}else i.from=c.e.getMin(n.startx,i.from),i.to=c.e.getMax(n.stopx,i.to),i.width=c.e.getMax(i.width,n.width)-J.labelBoxWidth}))}),G.activations=[],c.l.debug("Loop type widths:",o),o},tu={parser:p,db:D,renderer:{bounds:G,drawActors:ti,drawActorsPopup:ts,setConf:tn,draw:function(t,e,a,r){let i;let{securityLevel:s,sequence:n}=(0,c.c)();J=n,"sandbox"===s&&(i=(0,l.Ltv)("#i"+e));let o="sandbox"===s?(0,l.Ltv)(i.nodes()[0].contentDocument.body):(0,l.Ltv)("body"),h="sandbox"===s?i.nodes()[0].contentDocument:document;G.init(),c.l.debug(r.db);let d="sandbox"===s?o.select(`[id="${e}"]`):(0,l.Ltv)(`[id="${e}"]`),p=r.db.getActors(),g=r.db.getCreatedActors(),u=r.db.getDestroyedActors(),x=r.db.getBoxes(),y=r.db.getActorKeys(),m=r.db.getMessages(),f=r.db.getDiagramTitle(),b=r.db.hasAtLeastOneBox(),T=r.db.hasAtLeastOneBoxWithTitle(),E=function(t,e,a){let r={};return e.forEach(function(e){if(t[e.to]&&t[e.from]){let i=t[e.to];if(e.placement===a.db.PLACEMENT.LEFTOF&&!i.prevActor||e.placement===a.db.PLACEMENT.RIGHTOF&&!i.nextActor)return;let s=void 0!==e.placement,n=!s,o=s?tt(J):Q(J),l=e.wrap?c.u.wrapLabel(e.message,J.width-2*J.wrapPadding,o):e.message,h=c.u.calculateTextDimensions(l,o).width+2*J.wrapPadding;n&&e.from===i.nextActor?r[e.to]=c.e.getMax(r[e.to]||0,h):n&&e.from===i.prevActor?r[e.from]=c.e.getMax(r[e.from]||0,h):n&&e.from===e.to?(r[e.from]=c.e.getMax(r[e.from]||0,h/2),r[e.to]=c.e.getMax(r[e.to]||0,h/2)):e.placement===a.db.PLACEMENT.RIGHTOF?r[e.from]=c.e.getMax(r[e.from]||0,h):e.placement===a.db.PLACEMENT.LEFTOF?r[i.prevActor]=c.e.getMax(r[i.prevActor]||0,h):e.placement===a.db.PLACEMENT.OVER&&(i.prevActor&&(r[i.prevActor]=c.e.getMax(r[i.prevActor]||0,h/2)),i.nextActor&&(r[e.from]=c.e.getMax(r[e.from]||0,h/2)))}}),c.l.debug("maxMessageWidthPerActor:",r),r}(p,m,r);if(J.height=function(t,e,a){let r=0;for(let a in Object.keys(t).forEach(e=>{let a=t[e];a.wrap&&(a.description=c.u.wrapLabel(a.description,J.width-2*J.wrapPadding,te(J)));let i=c.u.calculateTextDimensions(a.description,te(J));a.width=a.wrap?J.width:c.e.getMax(J.width,i.width+2*J.wrapPadding),a.height=a.wrap?c.e.getMax(i.height,J.height):J.height,r=c.e.getMax(r,a.height)}),e){let r=t[a];if(!r)continue;let i=t[r.nextActor];if(!i){let t=e[a]+J.actorMargin-r.width/2;r.margin=c.e.getMax(t,J.actorMargin);continue}let s=e[a]+J.actorMargin-r.width/2-i.width/2;r.margin=c.e.getMax(s,J.actorMargin)}let i=0;return a.forEach(e=>{let a=Q(J),r=e.actorKeys.reduce((e,a)=>e+=t[a].width+(t[a].margin||0),0);r-=2*J.boxTextMargin,e.wrap&&(e.name=c.u.wrapLabel(e.name,r-2*J.wrapPadding,a));let s=c.u.calculateTextDimensions(e.name,a);i=c.e.getMax(s.height,i);let n=c.e.getMax(r,s.width+2*J.wrapPadding);if(e.margin=J.boxTextMargin,r<n){let t=(n-r)/2;e.margin+=t}}),a.forEach(t=>t.textMaxHeight=i),c.e.getMax(r,J.height)}(p,E,x),X.insertComputerIcon(d),X.insertDatabaseIcon(d),X.insertClockIcon(d),b&&(G.bumpVerticalPos(J.boxMargin),T&&G.bumpVerticalPos(x[0].textMaxHeight)),!0===J.hideUnusedParticipants){let t=new Set;m.forEach(e=>{t.add(e.from),t.add(e.to)}),y=y.filter(e=>t.has(e))}tr(d,p,g,y,0,m,!1);let w=tg(m,p,E,r);X.insertArrowHead(d),X.insertArrowCrossHead(d),X.insertArrowFilledHead(d),X.insertSequenceNumber(d);let _=1,v=1,P=[],k=[];m.forEach(function(t,e){let a,i;switch(t.type){case r.db.LINETYPE.NOTE:G.resetVerticalPos(),Z(d,t.noteModel);break;case r.db.LINETYPE.ACTIVE_START:G.newActivation(t,d,p);break;case r.db.LINETYPE.ACTIVE_END:!function(t,e){let a=G.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),X.drawActivation(d,a,e,J,to(t.from.actor).length),G.insert(a.startx,e-10,a.stopx,e)}(t,G.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:tl(w,t,J.boxMargin,J.boxMargin+J.boxTextMargin,t=>G.newLoop(t));break;case r.db.LINETYPE.LOOP_END:a=G.endLoop(),X.drawLoop(d,a,"loop",J),G.bumpVerticalPos(a.stopy-G.getVerticalPos()),G.models.addLoop(a);break;case r.db.LINETYPE.RECT_START:tl(w,t,J.boxMargin,J.boxMargin,t=>G.newLoop(void 0,t.message));break;case r.db.LINETYPE.RECT_END:a=G.endLoop(),k.push(a),G.models.addLoop(a),G.bumpVerticalPos(a.stopy-G.getVerticalPos());break;case r.db.LINETYPE.OPT_START:tl(w,t,J.boxMargin,J.boxMargin+J.boxTextMargin,t=>G.newLoop(t));break;case r.db.LINETYPE.OPT_END:a=G.endLoop(),X.drawLoop(d,a,"opt",J),G.bumpVerticalPos(a.stopy-G.getVerticalPos()),G.models.addLoop(a);break;case r.db.LINETYPE.ALT_START:tl(w,t,J.boxMargin,J.boxMargin+J.boxTextMargin,t=>G.newLoop(t));break;case r.db.LINETYPE.ALT_ELSE:tl(w,t,J.boxMargin+J.boxTextMargin,J.boxMargin,t=>G.addSectionToLoop(t));break;case r.db.LINETYPE.ALT_END:a=G.endLoop(),X.drawLoop(d,a,"alt",J),G.bumpVerticalPos(a.stopy-G.getVerticalPos()),G.models.addLoop(a);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:tl(w,t,J.boxMargin,J.boxMargin+J.boxTextMargin,t=>G.newLoop(t)),G.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:tl(w,t,J.boxMargin+J.boxTextMargin,J.boxMargin,t=>G.addSectionToLoop(t));break;case r.db.LINETYPE.PAR_END:a=G.endLoop(),X.drawLoop(d,a,"par",J),G.bumpVerticalPos(a.stopy-G.getVerticalPos()),G.models.addLoop(a);break;case r.db.LINETYPE.AUTONUMBER:_=t.message.start||_,v=t.message.step||v,t.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:tl(w,t,J.boxMargin,J.boxMargin+J.boxTextMargin,t=>G.newLoop(t));break;case r.db.LINETYPE.CRITICAL_OPTION:tl(w,t,J.boxMargin+J.boxTextMargin,J.boxMargin,t=>G.addSectionToLoop(t));break;case r.db.LINETYPE.CRITICAL_END:a=G.endLoop(),X.drawLoop(d,a,"critical",J),G.bumpVerticalPos(a.stopy-G.getVerticalPos()),G.models.addLoop(a);break;case r.db.LINETYPE.BREAK_START:tl(w,t,J.boxMargin,J.boxMargin+J.boxTextMargin,t=>G.newLoop(t));break;case r.db.LINETYPE.BREAK_END:a=G.endLoop(),X.drawLoop(d,a,"break",J),G.bumpVerticalPos(a.stopy-G.getVerticalPos()),G.models.addLoop(a);break;default:try{(i=t.msgModel).starty=G.getVerticalPos(),i.sequenceIndex=_,i.sequenceVisible=r.db.showSequenceNumbers();let a=function(t,e){let a;G.bumpVerticalPos(10);let{startx:r,stopx:i,message:s}=e,n=c.e.splitBreaks(s).length,o=c.u.calculateTextDimensions(s,Q(J)),l=o.height/n;e.height+=l,G.bumpVerticalPos(l);let h=o.height-10,d=o.width;if(r===i){a=G.getVerticalPos()+h,J.rightAngles||(h+=J.boxMargin,a=G.getVerticalPos()+h),h+=30;let t=c.e.getMax(d/2,J.width/2);G.insert(r-t,G.getVerticalPos()-10+h,i+t,G.getVerticalPos()+30+h)}else h+=J.boxMargin,a=G.getVerticalPos()+h,G.insert(r,a-10,i,a);return G.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,G.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),a}(0,i);(function(t,e,a,r,i,s,n){function o(a,r){a.x<i[t.from].x?(G.insert(e.stopx-r,e.starty,e.startx,e.stopy+a.height/2+J.noteMargin),e.stopx=e.stopx+r):(G.insert(e.startx,e.starty,e.stopx+r,e.stopy+a.height/2+J.noteMargin),e.stopx=e.stopx-r)}if(s[t.to]==r){let e=i[t.to],r="actor"==e.type?21:e.width/2+3;o(e,r),e.starty=a-e.height/2,G.bumpVerticalPos(e.height/2)}else if(n[t.from]==r){let r=i[t.from];if(J.mirrorActors){let a="actor"==r.type?18:r.width/2;r.x<i[t.to].x?(G.insert(e.startx-a,e.starty,e.stopx,e.stopy+r.height/2+J.noteMargin),e.startx=e.startx+a):(G.insert(e.stopx,e.starty,e.startx+a,e.stopy+r.height/2+J.noteMargin),e.startx=e.startx-a)}r.stopy=a-r.height/2,G.bumpVerticalPos(r.height/2)}else if(n[t.to]==r){let e=i[t.to];if(J.mirrorActors){let t="actor"==e.type?21:e.width/2+3;o(e,t)}e.stopy=a-e.height/2,G.bumpVerticalPos(e.height/2)}})(t,i,a,e,p,g,u),P.push({messageModel:i,lineStartY:a}),G.models.addMessage(i)}catch(t){c.l.error("error while drawing message",t)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(_+=v)}),c.l.debug("createdActors",g),c.l.debug("destroyedActors",u),ti(d,p,y,!1),P.forEach(t=>ta(d,t.messageModel,t.lineStartY,r)),J.mirrorActors&&ti(d,p,y,!0),k.forEach(t=>X.drawBackgroundRect(d,t)),q(d,p,y,J),G.models.boxes.forEach(function(t){t.height=G.getVerticalPos()-t.y,G.insert(t.x,t.y,t.x+t.width,t.height),t.startx=t.x,t.starty=t.y,t.stopx=t.startx+t.width,t.stopy=t.starty+t.height,t.stroke="rgb(0,0,0, 0.5)",X.drawBox(d,t,J)}),b&&G.bumpVerticalPos(J.boxMargin);let L=ts(d,p,y,h),{bounds:I}=G.getBounds(),M=I.stopy-I.starty;M<L.maxHeight&&(M=L.maxHeight);let N=M+2*J.diagramMarginY;J.mirrorActors&&(N=N-J.boxMargin+J.bottomMarginAdj);let A=I.stopx-I.startx;A<L.maxWidth&&(A=L.maxWidth);let S=A+2*J.diagramMarginX;f&&d.append("text").text(f).attr("x",(I.stopx-I.startx)/2-2*J.diagramMarginX).attr("y",-25),(0,c.i)(d,N,S,J.useMaxWidth);let O=f?40:0;d.attr("viewBox",I.startx-J.diagramMarginX+" -"+(J.diagramMarginY+O)+" "+S+" "+(N+O)),c.l.debug("models:",G.models)}},styles:t=>`.actor {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
text.actor > tspan {
fill: ${t.actorTextColor};
stroke: none;
}
.actor-line {
stroke: ${t.actorLineColor};
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: none;
stroke: ${t.signalColor};
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: 2, 2;
stroke: ${t.signalColor};
}
#arrowhead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.sequenceNumber {
fill: ${t.sequenceNumberColor};
}
#sequencenumber {
fill: ${t.signalColor};
}
#crosshead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.messageText {
fill: ${t.signalTextColor};
stroke: none;
}
.labelBox {
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBkgColor};
}
.labelText, .labelText > tspan {
fill: ${t.labelTextColor};
stroke: none;
}
.loopText, .loopText > tspan {
fill: ${t.loopTextColor};
stroke: none;
}
.loopLine {
stroke-width: 2px;
stroke-dasharray: 2, 2;
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBorderColor};
}
.note {
//stroke: #decc93;
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
}
.noteText, .noteText > tspan {
fill: ${t.noteTextColor};
stroke: none;
}
.activation0 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation1 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation2 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.actorPopupMenu {
position: absolute;
}
.actorPopupMenuPanel {
position: absolute;
fill: ${t.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: ${t.actorBorder};
fill: ${t.actorBkg};
}
.actor-man circle, line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
stroke-width: 2px;
}
`}},12441:(t,e,a)=>{a.d(e,{a:()=>n,b:()=>l,c:()=>c,d:()=>s,e:()=>d,f:()=>o,g:()=>h});var r=a(31546),i=a(17367);let s=(t,e)=>{let a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),void 0!==e.rx&&a.attr("rx",e.rx),void 0!==e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)a.attr(t,e.attrs[t]);return void 0!==e.class&&a.attr("class",e.class),a},n=(t,e)=>{s(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},o=(t,e)=>{let a=e.text.replace(i.J," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);let s=r.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.text(a),r},c=(t,e,a,i)=>{let s=t.append("image");s.attr("x",e),s.attr("y",a);let n=(0,r.Jf)(i);s.attr("xlink:href",n)},l=(t,e,a,i)=>{let s=t.append("use");s.attr("x",e),s.attr("y",a);let n=(0,r.Jf)(i);s.attr("xlink:href",`#${n}`)},h=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),d=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})}}]);