2024-09-29 10:14:52 +08:00
import { g as St , a as Kt , d as Se , b as Me , c as Re , e as De } from "./chunk-XVOYOM2C-CA-blj1r.js" ; import { I as Ce } from "./chunk-2RYQ3QTB-BFh7WTDM.js" ; import { _ as d , g as Oe , q as Be , p as Ve , d as at , s as se , c as Ye , b as Fe , e as _ , I as lt , J as wt , u as F , l as J , r as We , i as Mt , a as qe , j as kt , k as ze , m as ae , K as ie , B as Ft , L as ne , Z as He } from "./index-C-KGFJzk.js" ; var Wt = function ( ) { var t = d ( function ( pt , I , L , A ) { for ( L = L || { } , A = pt . length ; A -- ; L [ pt [ A ] ] = I ) ; return L } , "o" ) , e = [ 1 , 2 ] , o = [ 1 , 3 ] , r = [ 1 , 4 ] , a = [ 2 , 4 ] , i = [ 1 , 9 ] , c = [ 1 , 11 ] , h = [ 1 , 13 ] , p = [ 1 , 14 ] , s = [ 1 , 16 ] , f = [ 1 , 17 ] , E = [ 1 , 18 ] , g = [ 1 , 24 ] , T = [ 1 , 25 ] , m = [ 1 , 26 ] , w = [ 1 , 27 ] , k = [ 1 , 28 ] , V = [ 1 , 29 ] , M = [ 1 , 30 ] , Y = [ 1 , 31 ] , C = [ 1 , 32 ] , z = [ 1 , 33 ] , H = [ 1 , 34 ] , Z = [ 1 , 35 ] , et = [ 1 , 36 ] , K = [ 1 , 37 ] , U = [ 1 , 38 ] , q = [ 1 , 39 ] , R = [ 1 , 41 ] , Q = [ 1 , 42 ] , G = [ 1 , 43 ] , j = [ 1 , 44 ] , rt = [ 1 , 45 ] , S = [ 1 , 46 ] , y = [ 1 , 4 , 5 , 13 , 14 , 16 , 18 , 21 , 23 , 29 , 30 , 31 , 33 , 35 , 36 , 37 , 38 , 39 , 41 , 43 , 44 , 46 , 47 , 48 , 49 , 50 , 52 , 53 , 54 , 59 , 60 , 61 , 62 , 70 ] , P = [ 4 , 5 , 16 , 50 , 52 , 53 ] , $ = [ 4 , 5 , 13 , 14 , 16 , 18 , 21 , 23 , 29 , 30 , 31 , 33 , 35 , 36 , 37 , 38 , 39 , 41 , 43 , 44 , 46 , 50 , 52 , 53 , 54 , 59 , 60 , 61 , 62 , 70 ] , it = [ 4 , 5 , 13 , 14 , 16 , 18 , 21 , 23 , 29 , 30 , 31 , 33 , 35 , 36 , 37 , 38 , 39 , 41 , 43 , 44 , 46 , 49 , 50 , 52 , 53 , 54 , 59 , 60 , 61 , 62 , 70 ] , N = [ 4 , 5 , 13 , 14 , 16 , 18 , 21 , 23 , 29 , 30 , 31 , 33 , 35 , 36 , 37 , 38 , 39 , 41 , 43 , 44 , 46 , 48 , 50 , 52 , 53 , 54 , 59 , 60 , 61 , 62 , 70 ] , Jt = [ 4 , 5 , 13 , 14 , 16 , 18 , 21 , 23 , 29 , 30 , 31 , 33 , 35 , 36 , 37 , 38 , 39 , 41 , 43 , 44 , 46 , 47 , 50 , 52 , 53 , 54 , 59 , 60 , 61 , 62 , 70 ] , ot = [ 68 , 69 , 70 ] , dt = [ 1 , 122 ] , Ct = { trace : d ( function ( ) { } , "trace" ) , yy : { } , symbols _ : { error : 2 , start : 3 , SPACE : 4 , NEWLINE : 5 , SD : 6 , document : 7 , line : 8 , statement : 9 , box _section : 10 , box _line : 11 , participant _statement : 12 , create : 13 , box : 14 , restOfLine : 15 , end : 16 , signal : 17 , autonumber : 18 , NUM : 19 , off : 20 , activate : 21 , actor : 22 , deactivate : 23 , note _statement : 24 , links _statement : 25 , link _statement : 26 , properties _statement : 27 , details _statement : 28 , title : 29 , legacy _title : 30 , acc _title : 31 , acc _title _value : 32 , acc _descr : 33 , acc _descr _value : 34 , acc _descr _multiline _value : 35 , loop : 36 , rect : 37 , opt : 38 , alt : 39 , else _sections : 40 , par : 41 , par _sections : 42 , par _over : 43 , critical : 44 , option _sections : 45 , break : 46 , option : 47 , and : 48 , else : 49 , participant : 50 , AS : 51 , participant _actor : 52 , destroy : 53 , note : 54 , placement : 55 , text2 : 56 , over : 57 , actor _pair : 58 , links : 59 , link : 60 , properties : 61 , details : 62 , spaceList : 63 , "," : 64 , left _of : 65 , right _of : 66 , signaltype : 67 , "+" : 68 , "-" : 69 , ACTOR : 70 , SOLID _OPEN _ARROW : 71 , DOTTED _OPEN _ARROW : 72 , SOLID _ARROW : 73 , BIDIRECTIONAL _SOLID _ARROW : 74 , DOTTED _ARROW : 75 , BIDIRECTIONAL _DOTTED _ARROW : 76 , SOLID _CROSS : 77 , DOTTED _CROSS : 78 , SOLID _POINT : 79 , DOTTED _POINT : 80 , TXT : 81 , $accept : 0 , $end : 1 } , terminals _ : { 2 : "error" , 4 : "SPACE" , 5 : "NEWLINE" , 6 : "SD" , 13 : "create" , 14 : "box" , 15 : "restOfLine" , 16 : "end" , 18 : "autonumber" , 19 : "NUM" , 20 : "off" , 21 : "activate" , 23 : "deactivate" , 29 : "title" , 30 : "legacy_title" , 31 : "acc_title" , 32 : "acc_title_value" , 33 : "acc_descr" , 34 : "acc_descr_value" , 35 : "acc_descr_multiline_value" , 36 : "loop" , 37 : "rect" , 38 : "opt" , 39 : "alt" , 41 : "par" , 43 : "par_over" , 44 : "critical" , 46 : "break" , 47 : "option" , 48 : "and" , 49 : "else" , 50 : "participant" , 51 : "AS" , 52 : "participant_actor" , 53 : "destroy" , 54 : "note" , 57 : "over" , 59 : "links" , 60 : "link" , 61 : "properties" , 62 : "details" , 64 : "," , 65 : "left_of" , 66 : "right_of" , 68 : "+" , 69 : "-" , 70 : "ACTOR" , 71 : "SOLID_OPEN_ARROW" , 72 : "DOTTED_OPEN_ARROW" , 73 : "SOLID_ARROW" , 74 : "BIDIRECTIONAL_SOLID_ARROW" , 75 : "DOTTED_ARROW" , 76 : "BIDIRECTIONAL_DOTTED_ARROW" , 77 : "SOLID_CROSS" , 78 : "DOTTED_CROSS" , 79 : "SOLID_POINT" , 80 : "DOTTED_POINT" , 81 : "TXT" } , productions _ : [ 0 , [ 3 , 2 ] , [ 3 , 2 ] , [ 3 , 2 ] , [ 7 , 0 ] , [ 7 , 2 ] , [ 8 , 2 ] , [ 8 , 1 ] , [ 8 , 1 ] , [ 10 , 0 ] , [ 10 , 2 ] , [ 11 , 2 ] , [ 11 , 1 ] , [ 11 , 1 ] , [ 9 , 1 ] , [ 9 , 2 ] , [ 9 , 4 ] , [ 9 , 2 ] , [ 9 , 4 ] , [ 9 , 3 ] , [ 9 , 3 ] , [ 9 , 2 ] , [ 9 , 3 ] , [ 9 , 3 ] , [ 9 , 2 ] , [ 9 , 2 ] , [ 9 , 2 ] , [ 9 , 2 ] , [ 9 , 2 ] , [ 9 , 1 ] , [ 9 , 1 ] , [ 9 , 2 ] , [ 9 , 2 ] , [ 9 , 1 ] , [ 9 , 4 ] , [ 9 , 4 ] , [ 9 , 4 ] , [ 9 , 4 ] , [ 9 , 4 ] , [ 9 , 4 ] , [ 9 , 4 ] , [ 9 , 4 ] , [ 45 , 1 ] , [ 45 , 4 ] , [ 42 , 1 ] , [ 42 , 4 ] , [ 40 , 1 ] , [ 40 , 4 ] , [ 12 , 5 ] , [ 12 , 3 ] , [ 12 , 5 ] , [ 12 , 3 ] , [ 12 , 3 ] , [ 24 , 4 ] , [ 24 , 4 ] , [ 25 , 3 ] , [ 26 , 3 ] , [ 27 , 3 ] , [ 28 , 3 ] , [ 63 , 2 ] , [ 63 , 1 ] , [ 58 , 3 ] , [ 58 , 1 ] , [ 55 , 1 ] , [ 55 , 1 ] , [ 17 , 5 ] , [ 17 , 5 ] , [ 17 , 4 ] , [ 22 , 1 ] , [ 67 , 1 ] , [ 67 , 1 ] , [ 67 , 1 ] , [ 67 , 1 ] , [ 67 , 1 ] , [ 67 , 1 ] , [ 67 , 1 ] , [ 67 , 1 ] , [ 67 , 1 ] , [ 67 , 1 ] , [ 56 , 1 ] ] , performAction : d ( function ( I , L , A , b , D , l , mt ) { var u = l . length - 1 ; switch ( D ) { case 3 : return b . apply ( l [ u ] ) , l [ u ] ; case 4 : case 9 : this . $ = [ ] ; break ; case 5 : case 10 : l [ u - 1 ] . push ( l [ u ] ) , this . $ = l [ u - 1 ] ; break ; case 6 : case 7 : case 11 : case 12 : this . $ = l [ u ] ; break ; case 8 : case 13 : this . $ = [ ] ; break ; case 15 : l [ u ] . type = "createParticipant" , this . $ = l [ u ] ; break ; case 16 : l [ u - 1 ] . unshift ( { type : "boxStart" , boxData : b . par
` +this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var L=this.next();return L||this.lex()},"lex"),begin:d(function(L){this.conditionStack.push(L)},"begin"),popState:d(function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(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:d(function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},"topState"),pushState:d(function(L){this.begin(L)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(L,A,b,D){switch(b){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return A.yytext=A.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return A.yytext=A.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[ \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,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[ \) ])/i,/^(?:--[ \) ])/i,/^(?::(?:(?:no)?wrap)?[^# \n ;]+)/i,/^(?: \+ )/i,/^(?:-)/i,/^(?: $ )/i,/^(?:.)/i],conditions:{acc_descr_multiline:{ru
` ,"getStyles"),f0=g0,ft=18*2,ge="actor-top",fe="actor-bottom",x0="actor-box",ee="actor-man",Gt=d(function(t,e){return Se(t,e)},"drawRect"),T0=d(function(t,e,o,r,a){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const i=e.links,c=e.actorCnt,h=e.rectData;var p="none";a&&(p="block !important");const s=t.append("g");s.attr("id","actor"+c+"_popup"),s.attr("class","actorPopupMenu"),s.attr("display",p);var f="";h.class!==void 0&&(f=" "+h.class);let E=h.width>o?h.width:o;const g=s.append("rect");if(g.attr("class","actorPopupMenuPanel"+f),g.attr("x",h.x),g.attr("y",h.height),g.attr("fill",h.fill),g.attr("stroke",h.stroke),g.attr("width",E),g.attr("height",h.height),g.attr("rx",h.rx),g.attr("ry",h.ry),i!=null){var T=20;for(let k in i){var m=s.append("a"),w=ae(i[k]);m.attr("xlink:href",w),m.attr("target","_blank"),D0(r)(k,m,h.x+10,h.height+T,E,20,{class:"actor"},r),T+=30}}return g.attr("height",T),{height:h.height+T,width:E}},"drawPopup"),y0=d(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Nt=d(async function(t,e,o=null){let r=t.append("foreignObject");const a=await ie(e.text,Ft()),c=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(a).node().getBoundingClientRect();if(r.attr("height",Math.round(c.height)).attr("width",Math.round(c.width)),e.class==="noteText"){const h=t.node().firstChild;h.setAttribute("height",c.height+2*e.textMargin);const p=h.getBBox();r.attr("x",Math.round(p.x+p.width/2-c.width/2)).attr("y",Math.round(p.y+p.height/2-c.height/2))}else if(o){let{startx:h,stopx:p,starty:s}=o;if(h>p){const f=h;h=p,p=f}r.attr("x",Math.round(h+Math.abs(h-p)/2-c.width/2)),e.class==="loopText"?r.attr("y",Math.round(s)):r.attr("y",Math.round(s-c.height))}return[r]},"drawKatex"),bt=d(function(t,e){let o=0,r=0;const a=e.text.split(_.lineBreakRegex),[i,c]=ne(e.fontSize);let h=[],p=0,s=d(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":s=d(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":s=d(()=>Math.round(e.y+(o+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":s=d(()=>Math.round(e.y+(o+r+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)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";break}for(let[f,E]of a.entries()){e.textMargin!==void 0&&e.textMargin===0&&i!==void 0&&(p=f*i);const g=t.append("text");g.attr("x",e.x),g.attr("y",s()),e.anchor!==void 0&&g.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&g.style("font-family",e.fontFamily),c!==void 0&&g.style("font-size",c),e.fontWeight!==void 0&&g.style("font-weight",e.fontWeight),e.fill!==void 0&&g.attr("fill",e.fill),e.class!==void 0&&g.attr("class",e.class),e.dy!==void 0?g.attr("dy",e.dy):p!==0&&g.attr("dy",p);const T=E||He;if(e.tspan){const m=g.append("tspan");m.attr("x",e.x),e.fill!==void 0&&m.attr("fill",e.fill),m.text(T)}else g.text(T);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(r+=(g._groups||g)[0][0].getBBox().height,o=r),h.push(g)}return h},"drawText"),xe=d(function(t,e){function o(a,i,c,h,p){return a+","+i+" "+(a+c)+","+i+" "+(a+c)+","+(i+h-p)+" "+(a+c-p*1.2)+","+(i+h)+" "+a+","+(i+h)}d(o,"genPoints");const r=t.append("polygon");return r.attr("points",o(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,bt(t,e),r},"drawLabel"),ct=-1,Te=d((t,e,o,r)=>{t.select&&o.forEach(a=>{const i=e.get(a),c=t.select