turtlecode 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/assets/{_basePickBy-B_7ShcHh.js → _basePickBy-BcOvpC5b.js} +1 -1
- package/assets/assets/{_baseUniq-BsW7XEuT.js → _baseUniq-D9AKNI-S.js} +1 -1
- package/assets/assets/{arc-BbW57NUb.js → arc-ClcBVsDq.js} +1 -1
- package/assets/assets/architectureDiagram-2XIMDMQ5-CRV28Qi0.js +36 -0
- package/assets/assets/{auth-callback-C2n64Qcj.js → auth-callback-D7CK9pHp.js} +1 -1
- package/assets/assets/{blockDiagram-WCTKOSBZ-C1Ni5oSK.js → blockDiagram-WCTKOSBZ-CL-sI8NU.js} +2 -2
- package/assets/assets/{c4Diagram-IC4MRINW-g8EmnUUA.js → c4Diagram-IC4MRINW-AFG5p1yt.js} +2 -2
- package/assets/assets/channel-BXqEQVGi.js +1 -0
- package/assets/assets/{chunk-4BX2VUAB-CGR6NDgJ.js → chunk-4BX2VUAB-CgNy2Qqu.js} +1 -1
- package/assets/assets/chunk-55IACEB6-Bsz0SHtO.js +1 -0
- package/assets/assets/{chunk-FMBD7UC4-CBSUaebz.js → chunk-FMBD7UC4-BRuwu34q.js} +1 -1
- package/assets/assets/chunk-JSJVCQXG-Bt0GkrjS.js +1 -0
- package/assets/assets/{chunk-KX2RTZJC-D_r6FHlr.js → chunk-KX2RTZJC-BiUvn-D7.js} +1 -1
- package/assets/assets/{chunk-NQ4KR5QH-_-NyPl-E.js → chunk-NQ4KR5QH-DH4YUQE9.js} +1 -1
- package/assets/assets/{chunk-QZHKN3VN-CMDZeFvi.js → chunk-QZHKN3VN-CrLB363X.js} +1 -1
- package/assets/assets/chunk-VVM5DH6Z-D2vG_ZPx.js +1 -0
- package/assets/assets/{chunk-WL4C6EOR-p1mj0O6S.js → chunk-WL4C6EOR-913dgDB-.js} +1 -1
- package/assets/assets/classDiagram-VBA2DB6C-gcpKg8SN.js +1 -0
- package/assets/assets/classDiagram-v2-RAHNMMFH-gcpKg8SN.js +1 -0
- package/assets/assets/clone-oMsF326O.js +1 -0
- package/assets/assets/{connection-popover-Sip4k8lc.js → connection-popover-D2MEtT6z.js} +1 -1
- package/assets/assets/{context-popover-jX8NoD9w.js → context-popover-C1ZDT4aK.js} +1 -1
- package/assets/assets/cose-bilkent-S5V4N54A-DRWnwV5H.js +1 -0
- package/assets/assets/{cssMode-xHiM5mcb.js → cssMode-DX-s2EC8.js} +2 -2
- package/assets/assets/dagre-KLK3FWXG-CN4ule0l.js +4 -0
- package/assets/assets/diagram-E7M64L7V-docJyJu4.js +24 -0
- package/assets/assets/diagram-IFDJBPK2-ChVpZldk.js +43 -0
- package/assets/assets/diagram-P4PSJMXO-Bf1-kRnd.js +24 -0
- package/assets/assets/dialog-clone-project-B1wF7jYQ.js +1 -0
- package/assets/assets/{dialog-connect-provider-BEqcXIot.js → dialog-connect-provider-Ot6Qr5dL.js} +2 -2
- package/assets/assets/dialog-create-project-BUc4DxX6.js +1 -0
- package/assets/assets/{dialog-edit-project-BfeaBlLZ.js → dialog-edit-project-BrkjzrGe.js} +1 -1
- package/assets/assets/{dialog-fork-D0oj4IQ5.js → dialog-fork-CyeKjf0e.js} +1 -1
- package/assets/assets/{dialog-manage-models-mDJUOPob.js → dialog-manage-models-CoiwPdu-.js} +1 -1
- package/assets/assets/{dialog-select-directory-BocFiQ9d.js → dialog-select-directory-K0nOY5Ky.js} +3 -3
- package/assets/assets/{dialog-select-file-CifFpv3x.js → dialog-select-file-Dx0Bny2E.js} +1 -1
- package/assets/assets/{dialog-select-mcp-Bz0DoDof.js → dialog-select-mcp-ehJzhdpz.js} +1 -1
- package/assets/assets/{dialog-select-model-unpaid-Da_CQzO4.js → dialog-select-model-unpaid-IVl97Sa_.js} +2 -2
- package/assets/assets/{dialog-select-provider-2iOfyWxy.js → dialog-select-provider-CBq6hNDx.js} +1 -1
- package/assets/assets/{dialog-select-server-DBhmJ2f8.js → dialog-select-server-DA5hATxx.js} +1 -1
- package/assets/assets/{dialog-settings-gGxknIbS.js → dialog-settings-BoOPbXZp.js} +1 -1
- package/assets/assets/{erDiagram-INFDFZHY-7L6v8ikj.js → erDiagram-INFDFZHY-kDj6gvOH.js} +2 -2
- package/assets/assets/{file-icon-CgbvTpIc.js → file-icon-DVEMs7Sx.js} +1 -1
- package/assets/assets/{flowDiagram-PKNHOUZH-aJT2T3cx.js → flowDiagram-PKNHOUZH-CsQeJUub.js} +2 -2
- package/assets/assets/{freemarker2-BgcPHQt-.js → freemarker2-B_-gEFnj.js} +2 -2
- package/assets/assets/ganttDiagram-A5KZAMGK-D1W7NciY.js +292 -0
- package/assets/assets/{ghostty-web-CyXMoQwm.js → ghostty-web-BQl0ls6m.js} +1 -1
- package/assets/assets/gitGraphDiagram-K3NZZRJ6-D4eeLV-l.js +65 -0
- package/assets/assets/{graph-CFcaDaoV.js → graph-KGuLNbW2.js} +1 -1
- package/assets/assets/{handlebars-DSpGDIPh.js → handlebars-DlnQtQmF.js} +2 -2
- package/assets/assets/{home-6Va-8zmR.js → home-BnHPimua.js} +1 -1
- package/assets/assets/{html-CNWh6Ln_.js → html-DrjCwvQg.js} +2 -2
- package/assets/assets/{htmlMode-LcU-TZaJ.js → htmlMode-C1xX0YwN.js} +3 -3
- package/assets/assets/index-DKwABhnu.js +2584 -0
- package/assets/assets/{index-DpJDxStT.css → index-DTxAHLat.css} +1 -1
- package/assets/assets/infoDiagram-LFFYTUFH-DsQ9EVx0.js +2 -0
- package/assets/assets/{ishikawaDiagram-PHBUUO56-y62OJXdI.js → ishikawaDiagram-PHBUUO56-MzetUfFK.js} +6 -6
- package/assets/assets/{javascript-CTmFPESg.js → javascript-CBQQIA5q.js} +2 -2
- package/assets/assets/{jobs-popover-DRbIcR2O.js → jobs-popover-DQmVz-e0.js} +1 -1
- package/assets/assets/{journeyDiagram-4ABVD52K-Bi9XcKs5.js → journeyDiagram-4ABVD52K-BkKgSN_9.js} +2 -2
- package/assets/assets/{jsonMode-CW1XLtuQ.js → jsonMode-B2Ye6w7y.js} +3 -3
- package/assets/assets/{kanban-definition-K7BYSVSG-DE01LQ5I.js → kanban-definition-K7BYSVSG-DIJz6AsI.js} +4 -4
- package/assets/assets/{layout-C6rurAvx.js → layout-BZKpv2Gr.js} +1 -1
- package/assets/assets/linear-COY9pyF4.js +1 -0
- package/assets/assets/{liquid-DB5uFXiY.js → liquid-CQXVmj19.js} +2 -2
- package/assets/assets/{list-BPk4NMWt.js → list-DPJi0fzr.js} +1 -1
- package/assets/assets/{mdx-Q7_EfF7H.js → mdx-QuCI1OJC.js} +2 -2
- package/assets/assets/{mermaid.core-DdXWHS-1.js → mermaid.core-bhqKFRxj.js} +10 -10
- package/assets/assets/{mindmap-definition-YRQLILUH-BajbwusW.js → mindmap-definition-YRQLILUH-CVv44i-B.js} +2 -2
- package/assets/assets/pieDiagram-SKSYHLDU-2ekrtn6z.js +30 -0
- package/assets/assets/{python-B3qjyNJj.js → python-Bx2b-xP4.js} +2 -2
- package/assets/assets/{quadrantDiagram-337W2JSQ-CZMB9UKV.js → quadrantDiagram-337W2JSQ-BoTofVsV.js} +2 -2
- package/assets/assets/{razor-CJkx1qh1.js → razor-2zgukQRj.js} +2 -2
- package/assets/assets/{requirementDiagram-Z7DCOOCP-BlyteLn_.js → requirementDiagram-Z7DCOOCP-LSodooxy.js} +2 -2
- package/assets/assets/sankeyDiagram-WA2Y5GQK-DUXSSMar.js +10 -0
- package/assets/assets/{select-CEKfrTm2.js → select-BbwOgh1Q.js} +1 -1
- package/assets/assets/{sequenceDiagram-2WXFIKYE-B2cOVhRx.js → sequenceDiagram-2WXFIKYE-C01qZdHR.js} +11 -11
- package/assets/assets/{server-row-BhbnbNJy.js → server-row-mRVGCgvL.js} +1 -1
- package/assets/assets/session-BXKBDkSI.js +34 -0
- package/assets/assets/stateDiagram-RAJIS63D-BuPj1Py4.js +1 -0
- package/assets/assets/stateDiagram-v2-FVOUBMTO-CjYACBI3.js +1 -0
- package/assets/assets/{status-popover-body-DkLpfJ2k.js → status-popover-body-9YRn8z8W.js} +2 -2
- package/assets/assets/{switch-DPq0vsit.js → switch-CHySmW8J.js} +1 -1
- package/assets/assets/{tabs-dF68ik4J.js → tabs-CKNlwTKd.js} +1 -1
- package/assets/assets/{tag--BCZ5q7_.js → tag-C4xikCZp.js} +1 -1
- package/assets/assets/{timeline-definition-YZTLITO2-C18tfizI.js → timeline-definition-YZTLITO2-CPcDqVYw.js} +2 -2
- package/assets/assets/transform-BwXaE9hv.js +1 -0
- package/assets/assets/{treemap-KZPCXAKY-C7fWdgj-.js → treemap-KZPCXAKY-Bin819KW.js} +1 -1
- package/assets/assets/{trellis-6YKi26t8.js → trellis-Csm7WAqm.js} +217 -231
- package/assets/assets/{trellis-badge-demo-BDa3ILpo.js → trellis-badge-demo-nxtlIRoh.js} +1 -1
- package/assets/assets/{trellis-op-icon-5x1lMwNH.js → trellis-op-icon-CzIuo5X7.js} +1 -1
- package/assets/assets/{tsMode-Bg19hQiu.js → tsMode-qOM514sL.js} +2 -2
- package/assets/assets/{typescript-8CtqEj8t.js → typescript-XOJMwr_m.js} +2 -2
- package/assets/assets/{vennDiagram-LZ73GAT5-DWmAgqdE.js → vennDiagram-LZ73GAT5-BDAdfrV5.js} +2 -2
- package/assets/assets/{xml-BKjz9euG.js → xml-BIwomT_0.js} +2 -2
- package/assets/assets/{xychartDiagram-JWTSCODW-Ckcyhr_q.js → xychartDiagram-JWTSCODW-Be2x0vdX.js} +2 -2
- package/assets/assets/{yaml-jJWTWPtR.js → yaml-BZMZa-4Z.js} +2 -2
- package/assets/index.html +2 -4
- package/assets/oc-theme-preload.js +0 -2
- package/bin/cli.mjs +166 -24
- package/package.json +1 -1
- package/assets/assets/architectureDiagram-2XIMDMQ5-DVePwAIo.js +0 -36
- package/assets/assets/channel-CPcPUiyc.js +0 -1
- package/assets/assets/chunk-55IACEB6-CuagpIkW.js +0 -1
- package/assets/assets/chunk-JSJVCQXG-DK5RSVJJ.js +0 -1
- package/assets/assets/chunk-VVM5DH6Z-COaOSPgd.js +0 -1
- package/assets/assets/classDiagram-VBA2DB6C-BAnp4Zaa.js +0 -1
- package/assets/assets/classDiagram-v2-RAHNMMFH-BAnp4Zaa.js +0 -1
- package/assets/assets/clone-Cf5BTVxd.js +0 -1
- package/assets/assets/cose-bilkent-S5V4N54A-C5LXU9pd.js +0 -1
- package/assets/assets/dagre-KLK3FWXG-m-9cmD-w.js +0 -4
- package/assets/assets/diagram-E7M64L7V-Cn-5LVpt.js +0 -24
- package/assets/assets/diagram-IFDJBPK2-CD8BK0Gp.js +0 -43
- package/assets/assets/diagram-P4PSJMXO-JVUlmg7w.js +0 -24
- package/assets/assets/dialog-clone-project-BgrtjUcd.js +0 -1
- package/assets/assets/dialog-create-project-TcSOut-3.js +0 -1
- package/assets/assets/ganttDiagram-A5KZAMGK-C5vwClxA.js +0 -292
- package/assets/assets/gitGraphDiagram-K3NZZRJ6-CI0SeLE3.js +0 -65
- package/assets/assets/index-bSvs-Qh3.js +0 -2544
- package/assets/assets/infoDiagram-LFFYTUFH-H6835-cD.js +0 -2
- package/assets/assets/linear-ilW0Y4uJ.js +0 -1
- package/assets/assets/pieDiagram-SKSYHLDU-DxK57epR.js +0 -30
- package/assets/assets/purify.es-A66Cw1IH.js +0 -2
- package/assets/assets/sankeyDiagram-WA2Y5GQK-DrdtRBZz.js +0 -10
- package/assets/assets/session-CdcUAq9-.js +0 -60
- package/assets/assets/stateDiagram-RAJIS63D-C4udRYnl.js +0 -1
- package/assets/assets/stateDiagram-v2-FVOUBMTO-CECUON5A.js +0 -1
package/assets/assets/{sequenceDiagram-2WXFIKYE-B2cOVhRx.js → sequenceDiagram-2WXFIKYE-C01qZdHR.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{_,n as $e,c as et,l as Q,i as ke,d as je,e as ts,j as S,b as we,s as es,p as ss,a as rs,g as as,q as is,t as ns,J as os,y as cs,h as Dt,u as q,a0 as U,a1 as St,a2 as ve,a3 as ls,a4 as hs,a5 as Ce,G as Ut}from"./mermaid.core-DdXWHS-1.js";import{a as ds,b as Zt,g as lt,d as Ts,e as Qt,f as $t}from"./chunk-JSJVCQXG-DK5RSVJJ.js";import{I as ps}from"./chunk-QZHKN3VN-CMDZeFvi.js";import{s as kt}from"./trellis-6YKi26t8.js";import"./index-bSvs-Qh3.js";import"./purify.es-A66Cw1IH.js";import"./select-CEKfrTm2.js";import"./chunk-VVM5DH6Z-COaOSPgd.js";import"./trellis-op-icon-5x1lMwNH.js";var Gt=(function(){var e=_(function(Tt,L,N,m){for(N=N||{},m=Tt.length;m--;N[Tt[m]]=L);return N},"o"),t=[1,2],a=[1,3],s=[1,4],i=[2,4],n=[1,9],c=[1,11],l=[1,12],h=[1,14],r=[1,15],p=[1,17],E=[1,18],f=[1,19],u=[1,25],y=[1,26],R=[1,27],b=[1,28],w=[1,29],A=[1,30],D=[1,31],k=[1,32],M=[1,33],W=[1,34],K=[1,35],H=[1,36],G=[1,37],X=[1,38],z=[1,39],v=[1,40],$=[1,42],J=[1,43],j=[1,44],st=[1,45],rt=[1,46],O=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],nt=[1,74],ot=[1,80],C=[1,81],jt=[1,82],te=[1,83],ee=[1,84],se=[1,85],re=[1,86],ae=[1,87],ie=[1,88],ne=[1,89],oe=[1,90],ce=[1,91],le=[1,92],he=[1,93],de=[1,94],Te=[1,95],pe=[1,96],Ee=[1,97],ue=[1,98],_e=[1,99],fe=[1,100],ge=[1,101],xe=[1,102],Ie=[1,103],Re=[1,104],Oe=[1,105],ye=[2,78],yt=[4,5,17,51,53,54],mt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Le=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Yt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Wt=[5,52],B=[70,71,72,73],at=[1,151],Kt={trace:_(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:_(function(L,N,m,g,V,o,Lt){var T=o.length-1;switch(V){case 3:return g.apply(o[T]),o[T];case 4:case 10:this.$=[];break;case 5:case 11:o[T-1].push(o[T]),this.$=o[T-1];break;case 6:case 7:case 12:case 13:this.$=o[T];break;case 8:case 9:case 14:this.$=[];break;case 16:o[T].type="createParticipant",this.$=o[T];break;case 17:o[T-1].unshift({type:"boxStart",boxData:g.parseBoxData(o[T-2])}),o[T-1].push({type:"boxEnd",boxText:o[T-2]}),this.$=o[T-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-2]),sequenceIndexStep:Number(o[T-1]),sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:g.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:g.LINETYPE.ACTIVE_START,actor:o[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:g.LINETYPE.ACTIVE_END,actor:o[T-1].actor};break;case 30:g.setDiagramTitle(o[T].substring(6)),this.$=o[T].substring(6);break;case 31:g.setDiagramTitle(o[T].substring(7)),this.$=o[T].substring(7);break;case 32:this.$=o[T].trim(),g.setAccTitle(this.$);break;case 33:case 34:this.$=o[T].trim(),g.setAccDescription(this.$);break;case 35:o[T-1].unshift({type:"loopStart",loopText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.LOOP_START}),o[T-1].push({type:"loopEnd",loopText:o[T-2],signalType:g.LINETYPE.LOOP_END}),this.$=o[T-1];break;case 36:o[T-1].unshift({type:"rectStart",color:g.parseMessage(o[T-2]),signalType:g.LINETYPE.RECT_START}),o[T-1].push({type:"rectEnd",color:g.parseMessage(o[T-2]),signalType:g.LINETYPE.RECT_END}),this.$=o[T-1];break;case 37:o[T-1].unshift({type:"optStart",optText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.OPT_START}),o[T-1].push({type:"optEnd",optText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.OPT_END}),this.$=o[T-1];break;case 38:o[T-1].unshift({type:"altStart",altText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.ALT_START}),o[T-1].push({type:"altEnd",signalType:g.LINETYPE.ALT_END}),this.$=o[T-1];break;case 39:o[T-1].unshift({type:"parStart",parText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.PAR_START}),o[T-1].push({type:"parEnd",signalType:g.LINETYPE.PAR_END}),this.$=o[T-1];break;case 40:o[T-1].unshift({type:"parStart",parText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.PAR_OVER_START}),o[T-1].push({type:"parEnd",signalType:g.LINETYPE.PAR_END}),this.$=o[T-1];break;case 41:o[T-1].unshift({type:"criticalStart",criticalText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.CRITICAL_START}),o[T-1].push({type:"criticalEnd",signalType:g.LINETYPE.CRITICAL_END}),this.$=o[T-1];break;case 42:o[T-1].unshift({type:"breakStart",breakText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.BREAK_START}),o[T-1].push({type:"breakEnd",optText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.BREAK_END}),this.$=o[T-1];break;case 44:this.$=o[T-3].concat([{type:"option",optionText:g.parseMessage(o[T-1]),signalType:g.LINETYPE.CRITICAL_OPTION},o[T]]);break;case 46:this.$=o[T-3].concat([{type:"and",parText:g.parseMessage(o[T-1]),signalType:g.LINETYPE.PAR_AND},o[T]]);break;case 48:this.$=o[T-3].concat([{type:"else",altText:g.parseMessage(o[T-1]),signalType:g.LINETYPE.ALT_ELSE},o[T]]);break;case 49:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=g.parseMessage(o[T-1]),this.$=o[T-3];break;case 50:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 51:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=g.parseMessage(o[T-1]),this.$=o[T-3];break;case 52:case 57:o[T-1].draw="actor",o[T-1].type="addParticipant",this.$=o[T-1];break;case 53:o[T-1].type="destroyParticipant",this.$=o[T-1];break;case 54:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=g.parseMessage(o[T-1]),this.$=o[T-3];break;case 55:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 56:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=g.parseMessage(o[T-1]),this.$=o[T-3];break;case 58:this.$=[o[T-1],{type:"addNote",placement:o[T-2],actor:o[T-1].actor,text:o[T]}];break;case 59:o[T-2]=[].concat(o[T-1],o[T-1]).slice(0,2),o[T-2][0]=o[T-2][0].actor,o[T-2][1]=o[T-2][1].actor,this.$=[o[T-1],{type:"addNote",placement:g.PLACEMENT.OVER,actor:o[T-2].slice(0,2),text:o[T]}];break;case 60:this.$=[o[T-1],{type:"addLinks",actor:o[T-1].actor,text:o[T]}];break;case 61:this.$=[o[T-1],{type:"addALink",actor:o[T-1].actor,text:o[T]}];break;case 62:this.$=[o[T-1],{type:"addProperties",actor:o[T-1].actor,text:o[T]}];break;case 63:this.$=[o[T-1],{type:"addDetails",actor:o[T-1].actor,text:o[T]}];break;case 66:this.$=[o[T-2],o[T]];break;case 67:this.$=o[T];break;case 68:this.$=g.PLACEMENT.LEFTOF;break;case 69:this.$=g.PLACEMENT.RIGHTOF;break;case 70:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0},{type:"activeStart",signalType:g.LINETYPE.ACTIVE_START,actor:o[T-1].actor}];break;case 71:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T]},{type:"activeEnd",signalType:g.LINETYPE.ACTIVE_END,actor:o[T-4].actor}];break;case 72:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:g.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:g.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor}];break;case 73:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T],activate:!1,centralConnection:g.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:g.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-4].actor}];break;case 74:this.$=[o[T-5],o[T-1],{type:"addMessage",from:o[T-5].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:g.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:g.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor},{type:"centralConnectionReverse",signalType:g.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-5].actor}];break;case 75:this.$=[o[T-3],o[T-1],{type:"addMessage",from:o[T-3].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T]}];break;case 76:this.$={type:"addParticipant",actor:o[T-1],config:o[T]};break;case 77:this.$=o[T-1].trim();break;case 78:this.$={type:"addParticipant",actor:o[T]};break;case 79:this.$=g.LINETYPE.SOLID_OPEN;break;case 80:this.$=g.LINETYPE.DOTTED_OPEN;break;case 81:this.$=g.LINETYPE.SOLID;break;case 82:this.$=g.LINETYPE.SOLID_TOP;break;case 83:this.$=g.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=g.LINETYPE.STICK_TOP;break;case 85:this.$=g.LINETYPE.STICK_BOTTOM;break;case 86:this.$=g.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=g.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=g.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=g.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=g.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=g.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=g.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=g.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=g.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=g.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=g.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=g.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=g.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=g.LINETYPE.DOTTED;break;case 100:this.$=g.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=g.LINETYPE.SOLID_CROSS;break;case 102:this.$=g.LINETYPE.DOTTED_CROSS;break;case 103:this.$=g.LINETYPE.SOLID_POINT;break;case 104:this.$=g.LINETYPE.DOTTED_POINT;break;case 105:this.$=g.parseMessage(o[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:s},{1:[3]},{3:5,4:t,5:a,6:s},{3:6,4:t,5:a,6:s},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,18:16,19:p,22:E,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},e(I,[2,5]),{9:48,13:13,14:h,15:r,18:16,19:p,22:E,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:X,53:z,54:v},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:O},{23:56,73:O},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:nt},{23:75,55:76,73:nt},{23:77,73:O},{69:78,72:[1,79],78:ot,79:C,80:jt,81:te,82:ee,83:se,84:re,85:ae,86:ie,87:ne,88:oe,89:ce,90:le,91:he,92:de,93:Te,94:pe,95:Ee,96:ue,97:_e,98:fe,99:ge,100:xe,101:Ie,102:Re,103:Oe},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:O},{23:111,73:O},{23:112,73:O},{23:113,73:O},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],ye),e(I,[2,6]),e(I,[2,16]),e(yt,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(mt,i,{7:120}),e(mt,i,{7:121}),e(mt,i,{7:122}),e(Le,i,{41:123,7:124}),e(Yt,i,{43:125,7:126}),e(Yt,i,{7:126,43:127}),e(be,i,{46:128,7:129}),e(mt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Wt,ye,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:O},{69:146,78:ot,79:C,80:jt,81:te,82:ee,83:se,84:re,85:ae,86:ie,87:ne,88:oe,89:ce,90:le,91:he,92:de,93:Te,94:pe,95:Ee,96:ue,97:_e,98:fe,99:ge,100:xe,101:Ie,102:Re,103:Oe},e(B,[2,79]),e(B,[2,80]),e(B,[2,81]),e(B,[2,82]),e(B,[2,83]),e(B,[2,84]),e(B,[2,85]),e(B,[2,86]),e(B,[2,87]),e(B,[2,88]),e(B,[2,89]),e(B,[2,90]),e(B,[2,91]),e(B,[2,92]),e(B,[2,93]),e(B,[2,94]),e(B,[2,95]),e(B,[2,96]),e(B,[2,97]),e(B,[2,98]),e(B,[2,99]),e(B,[2,100]),e(B,[2,101]),e(B,[2,102]),e(B,[2,103]),e(B,[2,104]),{23:147,73:O},{23:149,60:148,73:O},{73:[2,68]},{73:[2,69]},{58:150,104:at},{58:152,104:at},{58:153,104:at},{58:154,104:at},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:X,53:z,54:v},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[1,161],18:16,19:p,22:E,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[1,162],18:16,19:p,22:E,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[1,163],18:16,19:p,22:E,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,164]},{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[2,47],18:16,19:p,22:E,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,50:[1,165],51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,166]},{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[2,45],18:16,19:p,22:E,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,49:[1,167],51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,168]},{17:[1,169]},{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[2,43],18:16,19:p,22:E,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,48:[1,170],51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[1,171],18:16,19:p,22:E,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Wt,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:O},{23:178,73:O},{23:179,73:O},{58:180,104:at},{23:181,72:[1,182],73:O},{58:183,104:at},{58:184,104:at},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(yt,[2,11]),{13:186,51:X,53:z,54:v},e(yt,[2,13]),e(yt,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:at},{58:196,104:at},{58:197,104:at},{5:[2,75]},{58:198,104:at},{23:199,73:O},{5:[2,58]},{5:[2,59]},{23:200,73:O},e(yt,[2,12]),e(Le,i,{7:124,41:201}),e(Yt,i,{7:126,43:202}),e(be,i,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Wt,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:at},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:_(function(L,N){if(N.recoverable)this.trace(L);else{var m=new Error(L);throw m.hash=N,m}},"parseError"),parse:_(function(L){var N=this,m=[0],g=[],V=[null],o=[],Lt=this.table,T="",At=0,Se=0,Xe=2,me=1,Je=o.slice.call(arguments,1),F=Object.create(this.lexer),ut={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(ut.yy[Ft]=this.yy[Ft]);F.setInput(L,ut.yy),ut.yy.lexer=F,ut.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var qt=F.yylloc;o.push(qt);var Ze=F.options&&F.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qe(tt){m.length=m.length-2*tt,V.length=V.length-tt,o.length=o.length-tt}_(Qe,"popStack");function Ne(){var tt;return tt=g.pop()||F.lex()||me,typeof tt!="number"&&(tt instanceof Array&&(g=tt,tt=g.pop()),tt=N.symbols_[tt]||tt),tt}_(Ne,"lex");for(var Z,_t,it,Ht,It={},wt,ht,Ae,Pt;;){if(_t=m[m.length-1],this.defaultActions[_t]?it=this.defaultActions[_t]:((Z===null||typeof Z>"u")&&(Z=Ne()),it=Lt[_t]&&Lt[_t][Z]),typeof it>"u"||!it.length||!it[0]){var zt="";Pt=[];for(wt in Lt[_t])this.terminals_[wt]&&wt>Xe&&Pt.push("'"+this.terminals_[wt]+"'");F.showPosition?zt="Parse error on line "+(At+1)+`:
|
|
1
|
+
import{_,n as $e,c as et,l as Q,i as ke,d as je,e as ts,j as S,b as we,s as es,p as ss,a as rs,g as as,q as is,t as ns,J as os,y as cs,h as Dt,u as q,a0 as U,a1 as St,a2 as ve,a3 as ls,a4 as hs,a5 as Ce,G as Ut}from"./mermaid.core-bhqKFRxj.js";import{a as ds,b as Zt,g as lt,d as Ts,e as Qt,f as $t}from"./chunk-JSJVCQXG-Bt0GkrjS.js";import{I as Es}from"./chunk-QZHKN3VN-CrLB363X.js";import{s as kt}from"./transform-BwXaE9hv.js";import"./index-DKwABhnu.js";var Gt=(function(){var e=_(function(Tt,L,N,m){for(N=N||{},m=Tt.length;m--;N[Tt[m]]=L);return N},"o"),t=[1,2],a=[1,3],s=[1,4],i=[2,4],n=[1,9],c=[1,11],l=[1,12],h=[1,14],r=[1,15],E=[1,17],p=[1,18],f=[1,19],u=[1,25],y=[1,26],R=[1,27],b=[1,28],w=[1,29],A=[1,30],D=[1,31],k=[1,32],M=[1,33],W=[1,34],K=[1,35],H=[1,36],G=[1,37],X=[1,38],z=[1,39],v=[1,40],$=[1,42],J=[1,43],j=[1,44],st=[1,45],rt=[1,46],O=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],nt=[1,74],ot=[1,80],C=[1,81],jt=[1,82],te=[1,83],ee=[1,84],se=[1,85],re=[1,86],ae=[1,87],ie=[1,88],ne=[1,89],oe=[1,90],ce=[1,91],le=[1,92],he=[1,93],de=[1,94],Te=[1,95],Ee=[1,96],pe=[1,97],ue=[1,98],_e=[1,99],fe=[1,100],ge=[1,101],xe=[1,102],Ie=[1,103],Re=[1,104],Oe=[1,105],ye=[2,78],yt=[4,5,17,51,53,54],mt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Le=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Yt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Wt=[5,52],B=[70,71,72,73],at=[1,151],Kt={trace:_(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:_(function(L,N,m,g,V,o,Lt){var T=o.length-1;switch(V){case 3:return g.apply(o[T]),o[T];case 4:case 10:this.$=[];break;case 5:case 11:o[T-1].push(o[T]),this.$=o[T-1];break;case 6:case 7:case 12:case 13:this.$=o[T];break;case 8:case 9:case 14:this.$=[];break;case 16:o[T].type="createParticipant",this.$=o[T];break;case 17:o[T-1].unshift({type:"boxStart",boxData:g.parseBoxData(o[T-2])}),o[T-1].push({type:"boxEnd",boxText:o[T-2]}),this.$=o[T-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-2]),sequenceIndexStep:Number(o[T-1]),sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:g.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:g.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:g.LINETYPE.ACTIVE_START,actor:o[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:g.LINETYPE.ACTIVE_END,actor:o[T-1].actor};break;case 30:g.setDiagramTitle(o[T].substring(6)),this.$=o[T].substring(6);break;case 31:g.setDiagramTitle(o[T].substring(7)),this.$=o[T].substring(7);break;case 32:this.$=o[T].trim(),g.setAccTitle(this.$);break;case 33:case 34:this.$=o[T].trim(),g.setAccDescription(this.$);break;case 35:o[T-1].unshift({type:"loopStart",loopText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.LOOP_START}),o[T-1].push({type:"loopEnd",loopText:o[T-2],signalType:g.LINETYPE.LOOP_END}),this.$=o[T-1];break;case 36:o[T-1].unshift({type:"rectStart",color:g.parseMessage(o[T-2]),signalType:g.LINETYPE.RECT_START}),o[T-1].push({type:"rectEnd",color:g.parseMessage(o[T-2]),signalType:g.LINETYPE.RECT_END}),this.$=o[T-1];break;case 37:o[T-1].unshift({type:"optStart",optText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.OPT_START}),o[T-1].push({type:"optEnd",optText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.OPT_END}),this.$=o[T-1];break;case 38:o[T-1].unshift({type:"altStart",altText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.ALT_START}),o[T-1].push({type:"altEnd",signalType:g.LINETYPE.ALT_END}),this.$=o[T-1];break;case 39:o[T-1].unshift({type:"parStart",parText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.PAR_START}),o[T-1].push({type:"parEnd",signalType:g.LINETYPE.PAR_END}),this.$=o[T-1];break;case 40:o[T-1].unshift({type:"parStart",parText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.PAR_OVER_START}),o[T-1].push({type:"parEnd",signalType:g.LINETYPE.PAR_END}),this.$=o[T-1];break;case 41:o[T-1].unshift({type:"criticalStart",criticalText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.CRITICAL_START}),o[T-1].push({type:"criticalEnd",signalType:g.LINETYPE.CRITICAL_END}),this.$=o[T-1];break;case 42:o[T-1].unshift({type:"breakStart",breakText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.BREAK_START}),o[T-1].push({type:"breakEnd",optText:g.parseMessage(o[T-2]),signalType:g.LINETYPE.BREAK_END}),this.$=o[T-1];break;case 44:this.$=o[T-3].concat([{type:"option",optionText:g.parseMessage(o[T-1]),signalType:g.LINETYPE.CRITICAL_OPTION},o[T]]);break;case 46:this.$=o[T-3].concat([{type:"and",parText:g.parseMessage(o[T-1]),signalType:g.LINETYPE.PAR_AND},o[T]]);break;case 48:this.$=o[T-3].concat([{type:"else",altText:g.parseMessage(o[T-1]),signalType:g.LINETYPE.ALT_ELSE},o[T]]);break;case 49:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=g.parseMessage(o[T-1]),this.$=o[T-3];break;case 50:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 51:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=g.parseMessage(o[T-1]),this.$=o[T-3];break;case 52:case 57:o[T-1].draw="actor",o[T-1].type="addParticipant",this.$=o[T-1];break;case 53:o[T-1].type="destroyParticipant",this.$=o[T-1];break;case 54:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=g.parseMessage(o[T-1]),this.$=o[T-3];break;case 55:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 56:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=g.parseMessage(o[T-1]),this.$=o[T-3];break;case 58:this.$=[o[T-1],{type:"addNote",placement:o[T-2],actor:o[T-1].actor,text:o[T]}];break;case 59:o[T-2]=[].concat(o[T-1],o[T-1]).slice(0,2),o[T-2][0]=o[T-2][0].actor,o[T-2][1]=o[T-2][1].actor,this.$=[o[T-1],{type:"addNote",placement:g.PLACEMENT.OVER,actor:o[T-2].slice(0,2),text:o[T]}];break;case 60:this.$=[o[T-1],{type:"addLinks",actor:o[T-1].actor,text:o[T]}];break;case 61:this.$=[o[T-1],{type:"addALink",actor:o[T-1].actor,text:o[T]}];break;case 62:this.$=[o[T-1],{type:"addProperties",actor:o[T-1].actor,text:o[T]}];break;case 63:this.$=[o[T-1],{type:"addDetails",actor:o[T-1].actor,text:o[T]}];break;case 66:this.$=[o[T-2],o[T]];break;case 67:this.$=o[T];break;case 68:this.$=g.PLACEMENT.LEFTOF;break;case 69:this.$=g.PLACEMENT.RIGHTOF;break;case 70:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0},{type:"activeStart",signalType:g.LINETYPE.ACTIVE_START,actor:o[T-1].actor}];break;case 71:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T]},{type:"activeEnd",signalType:g.LINETYPE.ACTIVE_END,actor:o[T-4].actor}];break;case 72:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:g.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:g.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor}];break;case 73:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T],activate:!1,centralConnection:g.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:g.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-4].actor}];break;case 74:this.$=[o[T-5],o[T-1],{type:"addMessage",from:o[T-5].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:g.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:g.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor},{type:"centralConnectionReverse",signalType:g.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-5].actor}];break;case 75:this.$=[o[T-3],o[T-1],{type:"addMessage",from:o[T-3].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T]}];break;case 76:this.$={type:"addParticipant",actor:o[T-1],config:o[T]};break;case 77:this.$=o[T-1].trim();break;case 78:this.$={type:"addParticipant",actor:o[T]};break;case 79:this.$=g.LINETYPE.SOLID_OPEN;break;case 80:this.$=g.LINETYPE.DOTTED_OPEN;break;case 81:this.$=g.LINETYPE.SOLID;break;case 82:this.$=g.LINETYPE.SOLID_TOP;break;case 83:this.$=g.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=g.LINETYPE.STICK_TOP;break;case 85:this.$=g.LINETYPE.STICK_BOTTOM;break;case 86:this.$=g.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=g.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=g.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=g.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=g.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=g.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=g.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=g.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=g.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=g.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=g.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=g.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=g.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=g.LINETYPE.DOTTED;break;case 100:this.$=g.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=g.LINETYPE.SOLID_CROSS;break;case 102:this.$=g.LINETYPE.DOTTED_CROSS;break;case 103:this.$=g.LINETYPE.SOLID_POINT;break;case 104:this.$=g.LINETYPE.DOTTED_POINT;break;case 105:this.$=g.parseMessage(o[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:s},{1:[3]},{3:5,4:t,5:a,6:s},{3:6,4:t,5:a,6:s},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},e(I,[2,5]),{9:48,13:13,14:h,15:r,18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:X,53:z,54:v},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:O},{23:56,73:O},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:nt},{23:75,55:76,73:nt},{23:77,73:O},{69:78,72:[1,79],78:ot,79:C,80:jt,81:te,82:ee,83:se,84:re,85:ae,86:ie,87:ne,88:oe,89:ce,90:le,91:he,92:de,93:Te,94:Ee,95:pe,96:ue,97:_e,98:fe,99:ge,100:xe,101:Ie,102:Re,103:Oe},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:O},{23:111,73:O},{23:112,73:O},{23:113,73:O},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],ye),e(I,[2,6]),e(I,[2,16]),e(yt,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(mt,i,{7:120}),e(mt,i,{7:121}),e(mt,i,{7:122}),e(Le,i,{41:123,7:124}),e(Yt,i,{43:125,7:126}),e(Yt,i,{7:126,43:127}),e(be,i,{46:128,7:129}),e(mt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Wt,ye,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:O},{69:146,78:ot,79:C,80:jt,81:te,82:ee,83:se,84:re,85:ae,86:ie,87:ne,88:oe,89:ce,90:le,91:he,92:de,93:Te,94:Ee,95:pe,96:ue,97:_e,98:fe,99:ge,100:xe,101:Ie,102:Re,103:Oe},e(B,[2,79]),e(B,[2,80]),e(B,[2,81]),e(B,[2,82]),e(B,[2,83]),e(B,[2,84]),e(B,[2,85]),e(B,[2,86]),e(B,[2,87]),e(B,[2,88]),e(B,[2,89]),e(B,[2,90]),e(B,[2,91]),e(B,[2,92]),e(B,[2,93]),e(B,[2,94]),e(B,[2,95]),e(B,[2,96]),e(B,[2,97]),e(B,[2,98]),e(B,[2,99]),e(B,[2,100]),e(B,[2,101]),e(B,[2,102]),e(B,[2,103]),e(B,[2,104]),{23:147,73:O},{23:149,60:148,73:O},{73:[2,68]},{73:[2,69]},{58:150,104:at},{58:152,104:at},{58:153,104:at},{58:154,104:at},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:X,53:z,54:v},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[1,161],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[1,162],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[1,163],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,164]},{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[2,47],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,50:[1,165],51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,166]},{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[2,45],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,49:[1,167],51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{17:[1,168]},{17:[1,169]},{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[2,43],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,48:[1,170],51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{4:n,5:c,8:8,9:10,10:l,13:13,14:h,15:r,17:[1,171],18:16,19:E,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:u,31:y,32:R,34:b,36:w,37:A,38:D,39:k,40:M,42:W,44:K,45:H,47:G,51:X,53:z,54:v,56:$,61:J,62:j,63:st,64:rt,73:O},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Wt,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:O},{23:178,73:O},{23:179,73:O},{58:180,104:at},{23:181,72:[1,182],73:O},{58:183,104:at},{58:184,104:at},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(yt,[2,11]),{13:186,51:X,53:z,54:v},e(yt,[2,13]),e(yt,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:at},{58:196,104:at},{58:197,104:at},{5:[2,75]},{58:198,104:at},{23:199,73:O},{5:[2,58]},{5:[2,59]},{23:200,73:O},e(yt,[2,12]),e(Le,i,{7:124,41:201}),e(Yt,i,{7:126,43:202}),e(be,i,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Wt,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:at},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:_(function(L,N){if(N.recoverable)this.trace(L);else{var m=new Error(L);throw m.hash=N,m}},"parseError"),parse:_(function(L){var N=this,m=[0],g=[],V=[null],o=[],Lt=this.table,T="",At=0,Se=0,Xe=2,me=1,Je=o.slice.call(arguments,1),F=Object.create(this.lexer),ut={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(ut.yy[Ft]=this.yy[Ft]);F.setInput(L,ut.yy),ut.yy.lexer=F,ut.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var qt=F.yylloc;o.push(qt);var Ze=F.options&&F.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qe(tt){m.length=m.length-2*tt,V.length=V.length-tt,o.length=o.length-tt}_(Qe,"popStack");function Ne(){var tt;return tt=g.pop()||F.lex()||me,typeof tt!="number"&&(tt instanceof Array&&(g=tt,tt=g.pop()),tt=N.symbols_[tt]||tt),tt}_(Ne,"lex");for(var Z,_t,it,Ht,It={},wt,ht,Ae,Pt;;){if(_t=m[m.length-1],this.defaultActions[_t]?it=this.defaultActions[_t]:((Z===null||typeof Z>"u")&&(Z=Ne()),it=Lt[_t]&&Lt[_t][Z]),typeof it>"u"||!it.length||!it[0]){var zt="";Pt=[];for(wt in Lt[_t])this.terminals_[wt]&&wt>Xe&&Pt.push("'"+this.terminals_[wt]+"'");F.showPosition?zt="Parse error on line "+(At+1)+`:
|
|
2
2
|
`+F.showPosition()+`
|
|
3
3
|
Expecting `+Pt.join(", ")+", got '"+(this.terminals_[Z]||Z)+"'":zt="Parse error on line "+(At+1)+": Unexpected "+(Z==me?"end of input":"'"+(this.terminals_[Z]||Z)+"'"),this.parseError(zt,{text:F.match,token:this.terminals_[Z]||Z,line:F.yylineno,loc:qt,expected:Pt})}if(it[0]instanceof Array&&it.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_t+", token: "+Z);switch(it[0]){case 1:m.push(Z),V.push(F.yytext),o.push(F.yylloc),m.push(it[1]),Z=null,Se=F.yyleng,T=F.yytext,At=F.yylineno,qt=F.yylloc;break;case 2:if(ht=this.productions_[it[1]][1],It.$=V[V.length-ht],It._$={first_line:o[o.length-(ht||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ht||1)].first_column,last_column:o[o.length-1].last_column},Ze&&(It._$.range=[o[o.length-(ht||1)].range[0],o[o.length-1].range[1]]),Ht=this.performAction.apply(It,[T,Se,At,ut.yy,it[1],V,o].concat(Je)),typeof Ht<"u")return Ht;ht&&(m=m.slice(0,-1*ht*2),V=V.slice(0,-1*ht),o=o.slice(0,-1*ht)),m.push(this.productions_[it[1]][0]),V.push(It.$),o.push(It._$),Ae=Lt[m[m.length-2]][m[m.length-1]],m.push(Ae);break;case 3:return!0}}return!0},"parse")},Ge=(function(){var Tt={EOF:1,parseError:_(function(N,m){if(this.yy.parser)this.yy.parser.parseError(N,m);else throw new Error(N)},"parseError"),setInput:_(function(L,N){return this.yy=N||this.yy||{},this._input=L,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var L=this._input[0];this.yytext+=L,this.yyleng++,this.offset++,this.match+=L,this.matched+=L;var N=L.match(/(?:\r\n?|\n).*/g);return N?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),L},"input"),unput:_(function(L){var N=L.length,m=L.split(/(?:\r\n?|\n)/g);this._input=L+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-N),this.offset-=N;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var V=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===g.length?this.yylloc.first_column:0)+g[g.length-m.length].length-m[0].length:this.yylloc.first_column-N},this.options.ranges&&(this.yylloc.range=[V[0],V[0]+this.yyleng-N]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(L){this.unput(this.match.slice(L))},"less"),pastInput:_(function(){var L=this.matched.substr(0,this.matched.length-this.match.length);return(L.length>20?"...":"")+L.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var L=this.match;return L.length<20&&(L+=this._input.substr(0,20-L.length)),(L.substr(0,20)+(L.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var L=this.pastInput(),N=new Array(L.length+1).join("-");return L+this.upcomingInput()+`
|
|
5
5
|
`+N+"^"},"showPosition"),test_match:_(function(L,N){var m,g,V;if(this.options.backtrack_lexer&&(V={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&&(V.yylloc.range=this.yylloc.range.slice(0))),g=L[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+L[0].length},this.yytext+=L[0],this.match+=L[0],this.matches=L,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(L[0].length),this.matched+=L[0],m=this.performAction.call(this,this.yy,this,N,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var o in V)this[o]=V[o];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var L,N,m,g;this._more||(this.yytext="",this.match="");for(var V=this._currentRules(),o=0;o<V.length;o++)if(m=this._input.match(this.rules[V[o]]),m&&(!N||m[0].length>N[0].length)){if(N=m,g=o,this.options.backtrack_lexer){if(L=this.test_match(m,V[o]),L!==!1)return L;if(this._backtrack){N=!1;continue}else return!1}else if(!this.options.flex)break}return N?(L=this.test_match(N,V[g]),L!==!1?L:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(function(){var N=this.next();return N||this.lex()},"lex"),begin:_(function(N){this.conditionStack.push(N)},"begin"),popState:_(function(){var N=this.conditionStack.length-1;return N>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_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},"_currentRules"),topState:_(function(N){return N=this.conditionStack.length-1-Math.abs(N||0),N>=0?this.conditionStack[N]:"INITIAL"},"topState"),pushState:_(function(N){this.begin(N)},"pushState"),stateStackSize:_(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:_(function(N,m,g,V){switch(g){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:return m.yytext=m.yytext.trim(),73;case 12:return m.yytext=m.yytext.trim(),this.begin("ALIAS"),73;case 13:return m.yytext=m.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return this.begin("LINE"),15;case 16:return this.begin("ID"),51;case 17:return this.begin("ID"),53;case 18:return 14;case 19:return this.begin("ID"),54;case 20:return this.popState(),this.popState(),this.begin("LINE"),52;case 21:return this.popState(),this.popState(),5;case 22:return this.begin("LINE"),37;case 23:return this.begin("LINE"),38;case 24:return this.begin("LINE"),39;case 25:return this.begin("LINE"),40;case 26:return this.begin("LINE"),50;case 27:return this.begin("LINE"),42;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),49;case 30:return this.begin("LINE"),45;case 31:return this.begin("LINE"),48;case 32:return this.begin("LINE"),47;case 33:return this.popState(),16;case 34:return 17;case 35:return 67;case 36:return 68;case 37:return 61;case 38:return 62;case 39:return 63;case 40:return 64;case 41:return 59;case 42:return 56;case 43:return this.begin("ID"),22;case 44:return this.begin("ID"),24;case 45:return 30;case 46:return 31;case 47:return this.begin("acc_title"),32;case 48:return this.popState(),"acc_title_value";case 49:return this.begin("acc_descr"),34;case 50:return this.popState(),"acc_descr_value";case 51:this.begin("acc_descr_multiline");break;case 52:this.popState();break;case 53:return"acc_descr_multiline_value";case 54:return 6;case 55:return 19;case 56:return 21;case 57:return 66;case 58:return 5;case 59:return m.yytext=m.yytext.trim(),73;case 60:return 80;case 61:return 97;case 62:return 98;case 63:return 99;case 64:return 78;case 65:return 79;case 66:return 100;case 67:return 101;case 68:return 102;case 69:return 103;case 70:return 85;case 71:return 86;case 72:return 87;case 73:return 88;case 74:return 93;case 75:return 94;case 76:return 95;case 77:return 96;case 78:return 81;case 79:return 82;case 80:return 83;case 81:return 84;case 82:return 89;case 83:return 90;case 84:return 91;case 85:return 92;case 86:return 104;case 87:return 104;case 88:return 70;case 89:return 71;case 90:return 72;case 91:return 5;case 92:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[52,53],inclusive:!1},acc_descr:{rules:[50],inclusive:!1},acc_title:{rules:[48],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14],inclusive:!1},ALIAS:{rules:[2,3,20,21],inclusive:!1},LINE:{rules:[2,3,33],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,15,16,17,18,19,22,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,44,45,46,47,49,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92],inclusive:!0}}};return Tt})();Kt.lexer=Ge;function Nt(){this.yy={}}return _(Nt,"Parser"),Nt.prototype=Kt,Kt.Parser=Nt,new Nt})();Gt.parser=Gt;var
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(function(){var N=this.next();return N||this.lex()},"lex"),begin:_(function(N){this.conditionStack.push(N)},"begin"),popState:_(function(){var N=this.conditionStack.length-1;return N>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_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},"_currentRules"),topState:_(function(N){return N=this.conditionStack.length-1-Math.abs(N||0),N>=0?this.conditionStack[N]:"INITIAL"},"topState"),pushState:_(function(N){this.begin(N)},"pushState"),stateStackSize:_(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:_(function(N,m,g,V){switch(g){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:return m.yytext=m.yytext.trim(),73;case 12:return m.yytext=m.yytext.trim(),this.begin("ALIAS"),73;case 13:return m.yytext=m.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return this.begin("LINE"),15;case 16:return this.begin("ID"),51;case 17:return this.begin("ID"),53;case 18:return 14;case 19:return this.begin("ID"),54;case 20:return this.popState(),this.popState(),this.begin("LINE"),52;case 21:return this.popState(),this.popState(),5;case 22:return this.begin("LINE"),37;case 23:return this.begin("LINE"),38;case 24:return this.begin("LINE"),39;case 25:return this.begin("LINE"),40;case 26:return this.begin("LINE"),50;case 27:return this.begin("LINE"),42;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),49;case 30:return this.begin("LINE"),45;case 31:return this.begin("LINE"),48;case 32:return this.begin("LINE"),47;case 33:return this.popState(),16;case 34:return 17;case 35:return 67;case 36:return 68;case 37:return 61;case 38:return 62;case 39:return 63;case 40:return 64;case 41:return 59;case 42:return 56;case 43:return this.begin("ID"),22;case 44:return this.begin("ID"),24;case 45:return 30;case 46:return 31;case 47:return this.begin("acc_title"),32;case 48:return this.popState(),"acc_title_value";case 49:return this.begin("acc_descr"),34;case 50:return this.popState(),"acc_descr_value";case 51:this.begin("acc_descr_multiline");break;case 52:this.popState();break;case 53:return"acc_descr_multiline_value";case 54:return 6;case 55:return 19;case 56:return 21;case 57:return 66;case 58:return 5;case 59:return m.yytext=m.yytext.trim(),73;case 60:return 80;case 61:return 97;case 62:return 98;case 63:return 99;case 64:return 78;case 65:return 79;case 66:return 100;case 67:return 101;case 68:return 102;case 69:return 103;case 70:return 85;case 71:return 86;case 72:return 87;case 73:return 88;case 74:return 93;case 75:return 94;case 76:return 95;case 77:return 96;case 78:return 81;case 79:return 82;case 80:return 83;case 81:return 84;case 82:return 89;case 83:return 90;case 84:return 91;case 85:return 92;case 86:return 104;case 87:return 104;case 88:return 70;case 89:return 71;case 90:return 72;case 91:return 5;case 92:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[52,53],inclusive:!1},acc_descr:{rules:[50],inclusive:!1},acc_title:{rules:[48],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14],inclusive:!1},ALIAS:{rules:[2,3,20,21],inclusive:!1},LINE:{rules:[2,3,33],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,15,16,17,18,19,22,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,44,45,46,47,49,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92],inclusive:!0}}};return Tt})();Kt.lexer=Ge;function Nt(){this.yy={}}return _(Nt,"Parser"),Nt.prototype=Kt,Kt.Parser=Nt,new Nt})();Gt.parser=Gt;var ps=Gt,us={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},_s={FILLED:0,OPEN:1},fs={LEFTOF:0,RIGHTOF:1,OVER:2},vt={ACTOR:"actor",CONTROL:"control",DATABASE:"database",ENTITY:"entity"},gs=class{constructor(){this.state=new Es(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=we,this.setAccDescription=es,this.setDiagramTitle=ss,this.getAccTitle=rs,this.getAccDescription=as,this.getDiagramTitle=is,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(et().wrap),this.LINETYPE=us,this.ARROWTYPE=_s,this.PLACEMENT=fs}static{_(this,"SequenceDB")}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,a,s,i){let n=this.state.records.currentBox,c;if(i!==void 0){let h;i.includes(`
|
|
7
7
|
`)?h=i+`
|
|
8
8
|
`:h=`{
|
|
9
9
|
`+i+`
|
|
@@ -129,17 +129,17 @@ Expecting `+Pt.join(", ")+", got '"+(this.terminals_[Z]||Z)+"'":zt="Parse error
|
|
|
129
129
|
stroke-width: 2px;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
`,"getStyles"),Is=xs,ft=36,
|
|
133
|
-
a ${f},${
|
|
132
|
+
`,"getStyles"),Is=xs,ft=36,Et="actor-top",pt="actor-bottom",Mt="actor-box",gt="actor-man",bt=_(function(e,t){return Ts(e,t)},"drawRect"),Rs=_(function(e,t,a,s,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const n=t.links,c=t.actorCnt,l=t.rectData;var h="none";i&&(h="block !important");const r=e.append("g");r.attr("id","actor"+c+"_popup"),r.attr("class","actorPopupMenu"),r.attr("display",h);var E="";l.class!==void 0&&(E=" "+l.class);let p=l.width>a?l.width:a;const f=r.append("rect");if(f.attr("class","actorPopupMenuPanel"+E),f.attr("x",l.x),f.attr("y",l.height),f.attr("fill",l.fill),f.attr("stroke",l.stroke),f.attr("width",p),f.attr("height",l.height),f.attr("rx",l.rx),f.attr("ry",l.ry),n!=null){var u=20;for(let b in n){var y=r.append("a"),R=ke.sanitizeUrl(n[b]);y.attr("xlink:href",R),y.attr("target","_blank"),qs(s)(b,y,l.x+10,l.height+u,p,20,{class:"actor"},s),u+=30}}return f.attr("height",u),{height:l.height+u,width:p}},"drawPopup"),Bt=_(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Ct=_(async function(e,t,a=null){let s=e.append("foreignObject");const i=await Ce(t.text,Ut()),c=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(s.attr("height",Math.round(c.height)).attr("width",Math.round(c.width)),t.class==="noteText"){const l=e.node().firstChild;l.setAttribute("height",c.height+2*t.textMargin);const h=l.getBBox();s.attr("x",Math.round(h.x+h.width/2-c.width/2)).attr("y",Math.round(h.y+h.height/2-c.height/2))}else if(a){let{startx:l,stopx:h,starty:r}=a;if(l>h){const E=l;l=h,h=E}s.attr("x",Math.round(l+Math.abs(l-h)/2-c.width/2)),t.class==="loopText"?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-c.height))}return[s]},"drawKatex"),Ot=_(function(e,t){let a=0,s=0;const i=t.text.split(S.lineBreakRegex),[n,c]=ve(t.fontSize);let l=[],h=0,r=_(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":r=_(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":r=_(()=>Math.round(t.y+(a+s+t.textMargin)/2),"yfunc");break;case"bottom":case"end":r=_(()=>Math.round(t.y+(a+s+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[E,p]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&n!==void 0&&(h=E*n);const f=e.append("text");f.attr("x",t.x),f.attr("y",r()),t.anchor!==void 0&&f.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&f.style("font-family",t.fontFamily),c!==void 0&&f.style("font-size",c),t.fontWeight!==void 0&&f.style("font-weight",t.fontWeight),t.fill!==void 0&&f.attr("fill",t.fill),t.class!==void 0&&f.attr("class",t.class),t.dy!==void 0?f.attr("dy",t.dy):h!==0&&f.attr("dy",h);const u=p||ls;if(t.tspan){const y=f.append("tspan");y.attr("x",t.x),t.fill!==void 0&&y.attr("fill",t.fill),y.text(u)}else f.text(u);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(s+=(f._groups||f)[0][0].getBBox().height,a=s),l.push(f)}return l},"drawText"),Me=_(function(e,t){function a(i,n,c,l,h){return i+","+n+" "+(i+c)+","+n+" "+(i+c)+","+(n+l-h)+" "+(i+c-h*1.2)+","+(n+l)+" "+i+","+(n+l)}_(a,"genPoints");const s=e.append("polygon");return s.attr("points",a(t.x,t.y,t.width,t.height,7)),s.attr("class","labelBox"),t.y=t.y+t.height/2,Ot(e,t),s},"drawLabel"),P=-1,Be=_((e,t,a,s)=>{e.select&&a.forEach(i=>{const n=t.get(i),c=e.select("#actor"+n.actorCnt);!s.mirrorActors&&n.stopy?c.attr("y2",n.stopy+n.height/2):s.mirrorActors&&c.attr("y2",n.stopy)})},"fixLifeLineHeights"),Os=_(function(e,t,a,s){const i=s?t.stopy:t.starty,n=t.x+t.width/2,c=i+t.height,l=e.append("g").lower();var h=l;s||(P++,Object.keys(t.links||{}).length&&!a.forceMenus&&h.attr("onclick",Bt(`actor${P}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),h=l.append("g"),t.actorCnt=P,t.links!=null&&h.attr("id","root-"+P));const r=lt();var E="actor";t.properties?.class?E=t.properties.class:r.fill="#eaeaea",s?E+=` ${pt}`:E+=` ${Et}`,r.x=t.x,r.y=i,r.width=t.width,r.height=t.height,r.class=E,r.rx=3,r.ry=3,r.name=t.name;const p=bt(h,r);if(t.rectData=r,t.properties?.icon){const u=t.properties.icon.trim();u.charAt(0)==="@"?Qt(h,r.x+r.width-20,r.y+10,u.substr(1)):$t(h,r.x+r.width-20,r.y+10,u)}dt(a,U(t.description))(t.description,h,r.x,r.y,r.width,r.height,{class:`actor ${Mt}`},a);let f=t.height;if(p.node){const u=p.node().getBBox();t.height=u.height,f=u.height}return f},"drawActorTypeParticipant"),ys=_(function(e,t,a,s){const i=s?t.stopy:t.starty,n=t.x+t.width/2,c=i+t.height,l=e.append("g").lower();var h=l;s||(P++,Object.keys(t.links||{}).length&&!a.forceMenus&&h.attr("onclick",Bt(`actor${P}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),h=l.append("g"),t.actorCnt=P,t.links!=null&&h.attr("id","root-"+P));const r=lt();var E="actor";t.properties?.class?E=t.properties.class:r.fill="#eaeaea",s?E+=` ${pt}`:E+=` ${Et}`,r.x=t.x,r.y=i,r.width=t.width,r.height=t.height,r.class=E,r.name=t.name;const p=6,f={...r,x:r.x+-p,y:r.y+ +p,class:"actor"},u=bt(h,r);if(bt(h,f),t.rectData=r,t.properties?.icon){const R=t.properties.icon.trim();R.charAt(0)==="@"?Qt(h,r.x+r.width-20,r.y+10,R.substr(1)):$t(h,r.x+r.width-20,r.y+10,R)}dt(a,U(t.description))(t.description,h,r.x-p,r.y+p,r.width,r.height,{class:`actor ${Mt}`},a);let y=t.height;if(u.node){const R=u.node().getBBox();t.height=R.height,y=R.height}return y},"drawActorTypeCollections"),Ls=_(function(e,t,a,s){const i=s?t.stopy:t.starty,n=t.x+t.width/2,c=i+t.height,l=e.append("g").lower();let h=l;s||(P++,Object.keys(t.links||{}).length&&!a.forceMenus&&h.attr("onclick",Bt(`actor${P}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),h=l.append("g"),t.actorCnt=P,t.links!=null&&h.attr("id","root-"+P));const r=lt();let E="actor";t.properties?.class?E=t.properties.class:r.fill="#eaeaea",s?E+=` ${pt}`:E+=` ${Et}`,r.x=t.x,r.y=i,r.width=t.width,r.height=t.height,r.class=E,r.name=t.name;const p=r.height/2,f=p/(2.5+r.height/50),u=h.append("g"),y=h.append("g");if(u.append("path").attr("d",`M ${r.x},${r.y+p}
|
|
133
|
+
a ${f},${p} 0 0 0 0,${r.height}
|
|
134
134
|
h ${r.width-2*f}
|
|
135
|
-
a ${f},${
|
|
135
|
+
a ${f},${p} 0 0 0 0,-${r.height}
|
|
136
136
|
Z
|
|
137
|
-
`).attr("class",
|
|
138
|
-
a ${f},${
|
|
137
|
+
`).attr("class",E),y.append("path").attr("d",`M ${r.x},${r.y+p}
|
|
138
|
+
a ${f},${p} 0 0 0 0,${r.height}`).attr("stroke","#666").attr("stroke-width","1px").attr("class",E),u.attr("transform",`translate(${f}, ${-(r.height/2)})`),y.attr("transform",`translate(${r.width-f}, ${-r.height/2})`),t.rectData=r,t.properties?.icon){const w=t.properties.icon.trim(),A=r.x+r.width-20,D=r.y+10;w.charAt(0)==="@"?Qt(h,A,D,w.substr(1)):$t(h,A,D,w)}dt(a,U(t.description))(t.description,h,r.x,r.y,r.width,r.height,{class:`actor ${Mt}`},a);let R=t.height;const b=u.select("path:last-child");if(b.node()){const w=b.node().getBBox();t.height=w.height,R=w.height}return R},"drawActorTypeQueue"),bs=_(function(e,t,a,s){const i=s?t.stopy:t.starty,n=t.x+t.width/2,c=i+75,l=e.append("g").lower();s||(P++,l.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P);const h=e.append("g");let r=gt;s?r+=` ${pt}`:r+=` ${Et}`,h.attr("class",r),h.attr("name",t.name);const E=lt();E.x=t.x,E.y=i,E.fill="#eaeaea",E.width=t.width,E.height=t.height,E.class="actor";const p=t.x+t.width/2,f=i+32,u=22;h.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),h.append("circle").attr("cx",p).attr("cy",f).attr("r",u).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),h.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${p}, ${f-u})`);const y=h.node().getBBox();return t.height=y.height+2*(a?.sequence?.labelBoxHeight??0),dt(a,U(t.description))(t.description,h,E.x,E.y+u+(s?5:12),E.width,E.height,{class:`actor ${gt}`},a),t.height},"drawActorTypeControl"),Ss=_(function(e,t,a,s){const i=s?t.stopy:t.starty,n=t.x+t.width/2,c=i+75,l=e.append("g").lower(),h=e.append("g");let r="actor";s?r+=` ${pt}`:r+=` ${Et}`,h.attr("class",r),h.attr("name",t.name);const E=lt();E.x=t.x,E.y=i,E.fill="#eaeaea",E.width=t.width,E.height=t.height,E.class="actor";const p=t.x+t.width/2,f=i+(s?10:25),u=22;h.append("circle").attr("cx",p).attr("cy",f).attr("r",u).attr("width",t.width).attr("height",t.height),h.append("line").attr("x1",p-u).attr("x2",p+u).attr("y1",f+u).attr("y2",f+u).attr("stroke-width",2);const y=h.node().getBBox();return t.height=y.height+(a?.sequence?.labelBoxHeight??0),s||(P++,l.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P),dt(a,U(t.description))(t.description,h,E.x,E.y+(s?15:30),E.width,E.height,{class:`actor ${gt}`},a),s?h.attr("transform",`translate(0, ${u})`):h.attr("transform",`translate(0, ${u/2-5})`),t.height},"drawActorTypeEntity"),ms=_(function(e,t,a,s){const i=s?t.stopy:t.starty,n=t.x+t.width/2,c=i+t.height+2*a.boxTextMargin,l=e.append("g").lower();let h=l;s||(P++,Object.keys(t.links||{}).length&&!a.forceMenus&&h.attr("onclick",Bt(`actor${P}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),h=l.append("g"),t.actorCnt=P,t.links!=null&&h.attr("id","root-"+P));const r=lt();let E="actor";t.properties?.class?E=t.properties.class:r.fill="#eaeaea",s?E+=` ${pt}`:E+=` ${Et}`,r.x=t.x,r.y=i,r.width=t.width,r.height=t.height,r.class=E,r.name=t.name,r.x=t.x,r.y=i;const p=r.width/3,f=r.width/3,u=p/2,y=u/(2.5+p/50),R=h.append("g"),b=`
|
|
139
139
|
M ${r.x},${r.y+y}
|
|
140
|
-
a ${u},${y} 0 0 0 ${
|
|
141
|
-
a ${u},${y} 0 0 0 -${
|
|
140
|
+
a ${u},${y} 0 0 0 ${p},0
|
|
141
|
+
a ${u},${y} 0 0 0 -${p},0
|
|
142
142
|
l 0,${f-2*y}
|
|
143
|
-
a ${u},${y} 0 0 0 ${
|
|
143
|
+
a ${u},${y} 0 0 0 ${p},0
|
|
144
144
|
l 0,-${f-2*y}
|
|
145
|
-
`;R.append("path").attr("d",b).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",p),R.attr("transform",`translate(${E}, ${y})`),t.rectData=r,dt(a,U(t.description))(t.description,h,r.x,r.y+35,r.width,r.height,{class:`actor ${Mt}`},a);const w=R.select("path:last-child");if(w.node()){const A=w.node().getBBox();t.height=A.height+(a.sequence.labelBoxHeight??0)}return t.height},"drawActorTypeDatabase"),Ns=_(function(e,t,a,s){const i=s?t.stopy:t.starty,n=t.x+t.width/2,c=i+80,l=22,h=e.append("g").lower();s||(P++,h.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P);const r=e.append("g");let p=gt;s?p+=` ${Et}`:p+=` ${pt}`,r.attr("class",p),r.attr("name",t.name);const E=lt();E.x=t.x,E.y=i,E.fill="#eaeaea",E.width=t.width,E.height=t.height,E.class="actor",r.append("line").attr("id","actor-man-torso"+P).attr("x1",t.x+t.width/2-l*2.5).attr("y1",i+12).attr("x2",t.x+t.width/2-15).attr("y2",i+12),r.append("line").attr("id","actor-man-arms"+P).attr("x1",t.x+t.width/2-l*2.5).attr("y1",i+2).attr("x2",t.x+t.width/2-l*2.5).attr("y2",i+22),r.append("circle").attr("cx",t.x+t.width/2).attr("cy",i+12).attr("r",l);const f=r.node().getBBox();return t.height=f.height+(a.sequence.labelBoxHeight??0),dt(a,U(t.description))(t.description,r,E.x,E.y+15,E.width,E.height,{class:`actor ${gt}`},a),s?r.attr("transform",`translate(0,${l/2+10})`):r.attr("transform",`translate(0,${l/2+10})`),t.height},"drawActorTypeBoundary"),As=_(function(e,t,a,s){const i=s?t.stopy:t.starty,n=t.x+t.width/2,c=i+80,l=e.append("g").lower();s||(P++,l.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P);const h=e.append("g");let r=gt;s?r+=` ${Et}`:r+=` ${pt}`,h.attr("class",r),h.attr("name",t.name);const p=lt();p.x=t.x,p.y=i,p.fill="#eaeaea",p.width=t.width,p.height=t.height,p.class="actor",p.rx=3,p.ry=3,h.append("line").attr("id","actor-man-torso"+P).attr("x1",n).attr("y1",i+25).attr("x2",n).attr("y2",i+45),h.append("line").attr("id","actor-man-arms"+P).attr("x1",n-ft/2).attr("y1",i+33).attr("x2",n+ft/2).attr("y2",i+33),h.append("line").attr("x1",n-ft/2).attr("y1",i+60).attr("x2",n).attr("y2",i+45),h.append("line").attr("x1",n).attr("y1",i+45).attr("x2",n+ft/2-2).attr("y2",i+60);const E=h.append("circle");E.attr("cx",t.x+t.width/2),E.attr("cy",i+10),E.attr("r",15),E.attr("width",t.width),E.attr("height",t.height);const f=h.node().getBBox();return t.height=f.height,dt(a,U(t.description))(t.description,h,p.x,p.y+35,p.width,p.height,{class:`actor ${gt}`},a),t.height},"drawActorTypeActor"),ws=_(async function(e,t,a,s){switch(t.type){case"actor":return await As(e,t,a,s);case"participant":return await Os(e,t,a,s);case"boundary":return await Ns(e,t,a,s);case"control":return await bs(e,t,a,s);case"entity":return await Ss(e,t,a,s);case"database":return await ms(e,t,a,s);case"collections":return await ys(e,t,a,s);case"queue":return await Ls(e,t,a,s)}},"drawActor"),Ps=_(function(e,t,a){const i=e.append("g");Ve(i,t),t.name&&dt(a)(t.name,i,t.x,t.y+a.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},a),i.lower()},"drawBox"),Ds=_(function(e){return e.append("g")},"anchorElement"),ks=_(function(e,t,a,s,i){const n=lt(),c=t.anchored;n.x=t.startx,n.y=t.starty,n.class="activation"+i%3,n.width=t.stopx-t.startx,n.height=a-t.starty,bt(c,n)},"drawActivation"),vs=_(async function(e,t,a,s){const{boxMargin:i,boxTextMargin:n,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:h,messageFontSize:r,messageFontWeight:p}=s,E=e.append("g"),f=_(function(R,b,w,A){return E.append("line").attr("x1",R).attr("y1",b).attr("x2",w).attr("y2",A).attr("class","loopLine")},"drawLoopLine");f(t.startx,t.starty,t.stopx,t.starty),f(t.stopx,t.starty,t.stopx,t.stopy),f(t.startx,t.stopy,t.stopx,t.stopy),f(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(R){f(t.startx,R.y,t.stopx,R.y).style("stroke-dasharray","3, 3")});let u=Zt();u.text=a,u.x=t.startx,u.y=t.starty,u.fontFamily=h,u.fontSize=r,u.fontWeight=p,u.anchor="middle",u.valign="middle",u.tspan=!1,u.width=l||50,u.height=c||20,u.textMargin=n,u.class="labelText",Me(E,u),u=Ye(),u.text=t.title,u.x=t.startx+l/2+(t.stopx-t.startx)/2,u.y=t.starty+i+n,u.anchor="middle",u.valign="middle",u.textMargin=n,u.class="loopText",u.fontFamily=h,u.fontSize=r,u.fontWeight=p,u.wrap=!0;let y=U(u.text)?await Ct(E,u,t):Ot(E,u);if(t.sectionTitles!==void 0){for(const[R,b]of Object.entries(t.sectionTitles))if(b.message){u.text=b.message,u.x=t.startx+(t.stopx-t.startx)/2,u.y=t.sections[R].y+i+n,u.class="loopText",u.anchor="middle",u.valign="middle",u.tspan=!1,u.fontFamily=h,u.fontSize=r,u.fontWeight=p,u.wrap=t.wrap,U(u.text)?(t.starty=t.sections[R].y,await Ct(E,u,t)):Ot(E,u);let w=Math.round(y.map(A=>(A._groups||A)[0][0].getBBox().height).reduce((A,D)=>A+D));t.sections[R].height+=w-(i+n)}}return t.height=Math.round(t.stopy-t.starty),E},"drawLoop"),Ve=_(function(e,t){ds(e,t)},"drawBackgroundRect"),Cs=_(function(e){e.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")},"insertDatabaseIcon"),Ms=_(function(e){e.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")},"insertComputerIcon"),Bs=_(function(e){e.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")},"insertClockIcon"),Vs=_(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),Ys=_(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).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")},"insertArrowFilledHead"),Ws=_(function(e){e.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)},"insertSequenceNumber"),Ks=_(function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.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")},"insertArrowCrossHead"),Ye=_(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}},"getTextObj"),Fs=_(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),dt=(function(){function e(n,c,l,h,r,p,E){const f=c.append("text").attr("x",l+r/2).attr("y",h+p/2+5).style("text-anchor","middle").text(n);i(f,E)}_(e,"byText");function t(n,c,l,h,r,p,E,f){const{actorFontSize:u,actorFontFamily:y,actorFontWeight:R}=f,[b,w]=ve(u),A=n.split(S.lineBreakRegex);for(let D=0;D<A.length;D++){const k=D*b-b*(A.length-1)/2,M=c.append("text").attr("x",l+r/2).attr("y",h).style("text-anchor","middle").style("font-size",w).style("font-weight",R).style("font-family",y);M.append("tspan").attr("x",l+r/2).attr("dy",k).text(A[D]),M.attr("y",h+p/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(M,E)}}_(t,"byTspan");function a(n,c,l,h,r,p,E,f){const u=c.append("switch"),R=u.append("foreignObject").attr("x",l).attr("y",h).attr("width",r).attr("height",p).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");R.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),t(n,u,l,h,r,p,E,f),i(R,E)}_(a,"byFo");async function s(n,c,l,h,r,p,E,f){const u=await St(n,Ut()),y=c.append("switch"),b=y.append("foreignObject").attr("x",l+r/2-u.width/2).attr("y",h+p/2-u.height/2).attr("width",u.width).attr("height",u.height).append("xhtml:div").style("height","100%").style("width","100%");b.append("div").style("text-align","center").style("vertical-align","middle").html(await Ce(n,Ut())),t(n,y,l,h,r,p,E,f),i(b,E)}_(s,"byKatex");function i(n,c){for(const l in c)c.hasOwnProperty(l)&&n.attr(l,c[l])}return _(i,"_setTextAttrs"),function(n,c=!1){return c?s:n.textPlacement==="fo"?a:n.textPlacement==="old"?e:t}})(),qs=(function(){function e(i,n,c,l,h,r,p){const E=n.append("text").attr("x",c).attr("y",l).style("text-anchor","start").text(i);s(E,p)}_(e,"byText");function t(i,n,c,l,h,r,p,E){const{actorFontSize:f,actorFontFamily:u,actorFontWeight:y}=E,R=i.split(S.lineBreakRegex);for(let b=0;b<R.length;b++){const w=b*f-f*(R.length-1)/2,A=n.append("text").attr("x",c).attr("y",l).style("text-anchor","start").style("font-size",f).style("font-weight",y).style("font-family",u);A.append("tspan").attr("x",c).attr("dy",w).text(R[b]),A.attr("y",l+r/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(A,p)}}_(t,"byTspan");function a(i,n,c,l,h,r,p,E){const f=n.append("switch"),y=f.append("foreignObject").attr("x",c).attr("y",l).attr("width",h).attr("height",r).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,f,c,l,h,r,p,E),s(y,p)}_(a,"byFo");function s(i,n){for(const c in n)n.hasOwnProperty(c)&&i.attr(c,n[c])}return _(s,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?a:i.textPlacement==="old"?e:t}})(),Hs=_(function(e){e.append("defs").append("marker").attr("id","solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),zs=_(function(e){e.append("defs").append("marker").attr("id","solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),Us=_(function(e){e.append("defs").append("marker").attr("id","stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),Gs=_(function(e){e.append("defs").append("marker").attr("id","stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),Y={drawRect:bt,drawText:Ot,drawLabel:Me,drawActor:ws,drawBox:Ps,drawPopup:Rs,anchorElement:Ds,drawActivation:ks,drawLoop:vs,drawBackgroundRect:Ve,insertArrowHead:Vs,insertArrowFilledHead:Ys,insertSequenceNumber:Ws,insertArrowCrossHead:Ks,insertDatabaseIcon:Cs,insertComputerIcon:Ms,insertClockIcon:Bs,getTextObj:Ye,getNoteRect:Fs,fixLifeLineHeights:Be,sanitizeUrl:ke.sanitizeUrl,insertSolidTopArrowHead:Hs,insertSolidBottomArrowHead:zs,insertStickTopArrowHead:Us,insertStickBottomArrowHead:Gs},d={},x={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,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:_(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:_(function(e){this.boxes.push(e)},"addBox"),addActor:_(function(e){this.actors.push(e)},"addActor"),addLoop:_(function(e){this.loops.push(e)},"addLoop"),addMessage:_(function(e){this.messages.push(e)},"addMessage"),addNote:_(function(e){this.notes.push(e)},"addNote"),lastActor:_(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:_(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:_(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:_(function(){return this.notes[this.notes.length-1]},"lastNote"),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,Fe(et())},"init"),updateVal:_(function(e,t,a,s){e[t]===void 0?e[t]=a:e[t]=s(a,e[t])},"updateVal"),updateBounds:_(function(e,t,a,s){const i=this;let n=0;function c(l){return _(function(r){n++;const p=i.sequenceItems.length-n+1;i.updateVal(r,"starty",t-p*d.boxMargin,Math.min),i.updateVal(r,"stopy",s+p*d.boxMargin,Math.max),i.updateVal(x.data,"startx",e-p*d.boxMargin,Math.min),i.updateVal(x.data,"stopx",a+p*d.boxMargin,Math.max),l!=="activation"&&(i.updateVal(r,"startx",e-p*d.boxMargin,Math.min),i.updateVal(r,"stopx",a+p*d.boxMargin,Math.max),i.updateVal(x.data,"starty",t-p*d.boxMargin,Math.min),i.updateVal(x.data,"stopy",s+p*d.boxMargin,Math.max))},"updateItemBounds")}_(c,"updateFn"),this.sequenceItems.forEach(c()),this.activations.forEach(c("activation"))},"updateBounds"),insert:_(function(e,t,a,s){const i=S.getMin(e,a),n=S.getMax(e,a),c=S.getMin(t,s),l=S.getMax(t,s);this.updateVal(x.data,"startx",i,Math.min),this.updateVal(x.data,"starty",c,Math.min),this.updateVal(x.data,"stopx",n,Math.max),this.updateVal(x.data,"stopy",l,Math.max),this.updateBounds(i,c,n,l)},"insert"),newActivation:_(function(e,t,a){const s=a.get(e.from),i=Vt(e.from).length||0,n=s.x+s.width/2+(i-1)*d.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+d.activationWidth,stopy:void 0,actor:e.from,anchored:Y.anchorElement(t)})},"newActivation"),endActivation:_(function(e){const t=this.activations.map(function(a){return a.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:_(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:_(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:_(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:_(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:_(function(e){const t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:x.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:_(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:_(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:_(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=S.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:_(function(){return this.verticalPos},"getVerticalPos"),getBounds:_(function(){return{bounds:this.data,models:this.models}},"getBounds")},Xs=_(async function(e,t){x.bumpVerticalPos(d.boxMargin),t.height=d.boxMargin,t.starty=x.getVerticalPos();const a=lt();a.x=t.startx,a.y=t.starty,a.width=t.width||d.width,a.class="note";const s=e.append("g"),i=Y.drawRect(s,a),n=Zt();n.x=t.startx,n.y=t.starty,n.width=a.width,n.dy="1em",n.text=t.message,n.class="noteText",n.fontFamily=d.noteFontFamily,n.fontSize=d.noteFontSize,n.fontWeight=d.noteFontWeight,n.anchor=d.noteAlign,n.textMargin=d.noteMargin,n.valign="center";const c=U(n.text)?await Ct(s,n):Ot(s,n),l=Math.round(c.map(h=>(h._groups||h)[0][0].getBBox().height).reduce((h,r)=>h+r));i.attr("height",l+2*d.noteMargin),t.height+=l+2*d.noteMargin,x.bumpVerticalPos(l+2*d.noteMargin),t.stopy=t.starty+l+2*d.noteMargin,t.stopx=t.startx+a.width,x.insert(t.startx,t.starty,t.stopx,t.stopy),x.models.addNote(t)},"drawNote"),Js=_(function(e,t,a,s,i,n,c){const l=s.db.getActors(),h=l.get(t.from),r=l.get(t.to),p=a.sequenceVisible;let E=h.x+h.width/2,f=r.x+r.width/2;const u=E<=f,y=Ue(t,s),R=e.append("g"),b=16.5,w=_((W,K)=>{const H=W?b:-b;return K?-H:H},"getCircleOffset"),A=_(W=>{R.append("circle").attr("cx",W).attr("cy",c).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:D,CENTRAL_CONNECTION_REVERSE:k,CENTRAL_CONNECTION_DUAL:M}=s.db.LINETYPE;if(p)switch(t.centralConnection){case D:y&&(f+=w(u,!0));break;case k:y||(E+=w(u,!1));break;case M:y?f+=w(u,!0):E+=w(u,!1);break}switch(t.centralConnection){case D:A(f);break;case k:A(E);break;case M:A(E),A(f);break}},"drawCentralConnection"),xt=_(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),Rt=_(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),Xt=_(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function We(e,t){x.bumpVerticalPos(10);const{startx:a,stopx:s,message:i}=t,n=S.splitBreaks(i).length,c=U(i),l=c?await St(i,et()):q.calculateTextDimensions(i,xt(d));if(!c){const E=l.height/n;t.height+=E,x.bumpVerticalPos(E)}let h,r=l.height-10;const p=l.width;if(a===s){h=x.getVerticalPos()+r,d.rightAngles||(r+=d.boxMargin,h=x.getVerticalPos()+r),r+=30;const E=S.getMax(p/2,d.width/2);x.insert(a-E,x.getVerticalPos()-10+r,s+E,x.getVerticalPos()+30+r)}else r+=d.boxMargin,h=x.getVerticalPos()+r,x.insert(a,h-10,s,h);return x.bumpVerticalPos(r),t.height+=r,t.stopy=t.starty+t.height,x.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),h}_(We,"boundMessage");var Zs=_(async function(e,t,a,s,i){const{startx:n,stopx:c,starty:l,message:h,type:r,sequenceIndex:p,sequenceVisible:E}=t,f=q.calculateTextDimensions(h,xt(d)),u=Zt();u.x=n,u.y=l+10,u.width=c-n,u.class="messageText",u.dy="1em",u.text=h,u.fontFamily=d.messageFontFamily,u.fontSize=d.messageFontSize,u.fontWeight=d.messageFontWeight,u.anchor=d.messageAlign,u.valign="center",u.textMargin=d.wrapPadding,u.tspan=!1,U(u.text)?await Ct(e,u,{startx:n,stopx:c,starty:a}):Ot(e,u);const y=f.width;let R;if(n===c){const w=E||d.showSequenceNumbers,A=Ue(i,s),D=rr(i,s),k=n+(w&&(A||D)?10:0);d.rightAngles?R=e.append("path").attr("d",`M ${k},${a} H ${n+S.getMax(d.width/2,y/2)} V ${a+25} H ${n}`):R=e.append("path").attr("d","M "+k+","+a+" C "+(k+60)+","+(a-10)+" "+(n+60)+","+(a+30)+" "+n+","+(a+20))}else R=e.append("line"),R.attr("x1",n),R.attr("y1",a),R.attr("x2",c),R.attr("y2",a),De(i,s)&&Js(e,i,t,s,n,c,a);r===s.db.LINETYPE.DOTTED||r===s.db.LINETYPE.DOTTED_CROSS||r===s.db.LINETYPE.DOTTED_POINT||r===s.db.LINETYPE.DOTTED_OPEN||r===s.db.LINETYPE.BIDIRECTIONAL_DOTTED||r===s.db.LINETYPE.SOLID_TOP_DOTTED||r===s.db.LINETYPE.SOLID_BOTTOM_DOTTED||r===s.db.LINETYPE.STICK_TOP_DOTTED||r===s.db.LINETYPE.STICK_BOTTOM_DOTTED||r===s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||r===s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||r===s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||r===s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(R.style("stroke-dasharray","3, 3"),R.attr("class","messageLine1")):R.attr("class","messageLine0");let b="";if(d.arrowMarkerAbsolute&&(b=hs(!0)),R.attr("stroke-width",2),R.attr("stroke","none"),R.style("fill","none"),(r===s.db.LINETYPE.SOLID_TOP||r===s.db.LINETYPE.SOLID_TOP_DOTTED)&&R.attr("marker-end","url("+b+"#solidTopArrowHead)"),(r===s.db.LINETYPE.SOLID_BOTTOM||r===s.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&R.attr("marker-end","url("+b+"#solidBottomArrowHead)"),(r===s.db.LINETYPE.STICK_TOP||r===s.db.LINETYPE.STICK_TOP_DOTTED)&&R.attr("marker-end","url("+b+"#stickTopArrowHead)"),(r===s.db.LINETYPE.STICK_BOTTOM||r===s.db.LINETYPE.STICK_BOTTOM_DOTTED)&&R.attr("marker-end","url("+b+"#stickBottomArrowHead)"),(r===s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||r===s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&R.attr("marker-start","url("+b+"#solidBottomArrowHead)"),(r===s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||r===s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&R.attr("marker-start","url("+b+"#solidTopArrowHead)"),(r===s.db.LINETYPE.STICK_ARROW_TOP_REVERSE||r===s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&R.attr("marker-start","url("+b+"#stickBottomArrowHead)"),(r===s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||r===s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&R.attr("marker-start","url("+b+"#stickTopArrowHead)"),(r===s.db.LINETYPE.SOLID||r===s.db.LINETYPE.DOTTED)&&R.attr("marker-end","url("+b+"#arrowhead)"),(r===s.db.LINETYPE.BIDIRECTIONAL_SOLID||r===s.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(R.attr("marker-start","url("+b+"#arrowhead)"),R.attr("marker-end","url("+b+"#arrowhead)")),(r===s.db.LINETYPE.SOLID_POINT||r===s.db.LINETYPE.DOTTED_POINT)&&R.attr("marker-end","url("+b+"#filled-head)"),(r===s.db.LINETYPE.SOLID_CROSS||r===s.db.LINETYPE.DOTTED_CROSS)&&R.attr("marker-end","url("+b+"#crosshead)"),E||d.showSequenceNumbers){const w=r===s.db.LINETYPE.BIDIRECTIONAL_SOLID||r===s.db.LINETYPE.BIDIRECTIONAL_DOTTED,A=r===s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||r===s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||r===s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||r===s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||r===s.db.LINETYPE.STICK_ARROW_TOP_REVERSE||r===s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||r===s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||r===s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,D=6,k=De(i,s);let M=n,W=c;w?(n<c?M=n+D*2:(M=n-D+(k?-5:0),M+=i?.centralConnection===s.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===s.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),R.attr("x1",M)):A?(c>n?W=c-2*D:(W=c-D,M+=i?.centralConnection===s.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===s.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),W+=k?15:0,R.attr("x2",W),R.attr("x1",M)):R.attr("x1",n+D);let K=0;const H=n===c,G=n<=c;H?K=t.fromBounds+1:A?K=G?t.toBounds-1:t.fromBounds+1:K=G?t.fromBounds+1:t.toBounds-1,e.append("line").attr("x1",K).attr("y1",a).attr("x2",K).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+b+"#sequencenumber)"),e.append("text").attr("x",K).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(p)}},"drawMessage"),Qs=_(function(e,t,a,s,i,n,c){let l=0,h=0,r,p=0;for(const E of s){const f=t.get(E),u=f.box;r&&r!=u&&(c||x.models.addBox(r),h+=d.boxMargin+r.margin),u&&u!=r&&(c||(u.x=l+h,u.y=i),h+=u.margin),f.width=f.width||d.width,f.height=S.getMax(f.height||d.height,d.height),f.margin=f.margin||d.actorMargin,p=S.getMax(p,f.height),a.get(f.name)&&(h+=f.width/2),f.x=l+h,f.starty=x.getVerticalPos(),x.insert(f.x,i,f.x+f.width,f.height),l+=f.width+h,f.box&&(f.box.width=l+u.margin-f.box.x),h=f.margin,r=f.box,x.models.addActor(f)}r&&!c&&x.models.addBox(r),x.bumpVerticalPos(p)},"addActorRenderingData"),Jt=_(async function(e,t,a,s){if(s){let i=0;x.bumpVerticalPos(d.boxMargin*2);for(const n of a){const c=t.get(n);c.stopy||(c.stopy=x.getVerticalPos());const l=await Y.drawActor(e,c,d,!0);i=S.getMax(i,l)}x.bumpVerticalPos(i+d.boxMargin)}else for(const i of a){const n=t.get(i);await Y.drawActor(e,n,d,!1)}},"drawActors"),Ke=_(function(e,t,a,s){let i=0,n=0;for(const c of a){const l=t.get(c),h=js(l),r=Y.drawPopup(e,l,h,d,d.forceMenus,s);r.height>i&&(i=r.height),r.width+l.x>n&&(n=r.width+l.x)}return{maxHeight:i,maxWidth:n}},"drawActorsPopup"),Fe=_(function(e){ts(d,e),e.fontFamily&&(d.actorFontFamily=d.noteFontFamily=d.messageFontFamily=e.fontFamily),e.fontSize&&(d.actorFontSize=d.noteFontSize=d.messageFontSize=e.fontSize),e.fontWeight&&(d.actorFontWeight=d.noteFontWeight=d.messageFontWeight=e.fontWeight)},"setConf"),Vt=_(function(e){return x.activations.filter(function(t){return t.actor===e})},"actorActivations"),Pe=_(function(e,t){const a=t.get(e),s=Vt(e),i=s.reduce(function(c,l){return S.getMin(c,l.startx)},a.x+a.width/2-1),n=s.reduce(function(c,l){return S.getMax(c,l.stopx)},a.x+a.width/2+1);return[i,n]},"activationBounds");function ct(e,t,a,s,i){x.bumpVerticalPos(a);let n=s;if(t.id&&t.message&&e[t.id]){const c=e[t.id].width,l=xt(d);t.message=q.wrapLabel(`[${t.message}]`,c-2*d.wrapPadding,l),t.width=c,t.wrap=!0;const h=q.calculateTextDimensions(t.message,l),r=S.getMax(h.height,d.labelBoxHeight);n=s+r,Q.debug(`${r} - ${t.message}`)}i(t),x.bumpVerticalPos(n)}_(ct,"adjustLoopHeightForWrap");function qe(e,t,a,s,i,n,c){function l(p,E){p.x<i.get(e.from).x?(x.insert(t.stopx-E,t.starty,t.startx,t.stopy+p.height/2+d.noteMargin),t.stopx=t.stopx+E):(x.insert(t.startx,t.starty,t.stopx+E,t.stopy+p.height/2+d.noteMargin),t.stopx=t.stopx-E)}_(l,"receiverAdjustment");function h(p,E){p.x<i.get(e.to).x?(x.insert(t.startx-E,t.starty,t.stopx,t.stopy+p.height/2+d.noteMargin),t.startx=t.startx+E):(x.insert(t.stopx,t.starty,t.startx+E,t.stopy+p.height/2+d.noteMargin),t.startx=t.startx-E)}_(h,"senderAdjustment");const r=[vt.ACTOR,vt.CONTROL,vt.ENTITY,vt.DATABASE];if(n.get(e.to)==s){const p=i.get(e.to),E=r.includes(p.type)?ft/2+3:p.width/2+3;l(p,E),p.starty=a-p.height/2,x.bumpVerticalPos(p.height/2)}else if(c.get(e.from)==s){const p=i.get(e.from);if(d.mirrorActors){const E=r.includes(p.type)?ft/2:p.width/2;h(p,E)}p.stopy=a-p.height/2,x.bumpVerticalPos(p.height/2)}else if(c.get(e.to)==s){const p=i.get(e.to);if(d.mirrorActors){const E=r.includes(p.type)?ft/2+3:p.width/2+3;l(p,E)}p.stopy=a-p.height/2,x.bumpVerticalPos(p.height/2)}}_(qe,"adjustCreatedDestroyedData");var $s=_(async function(e,t,a,s){const{securityLevel:i,sequence:n}=et();d=n;let c;i==="sandbox"&&(c=kt("#i"+t));const l=i==="sandbox"?kt(c.nodes()[0].contentDocument.body):kt("body"),h=i==="sandbox"?c.nodes()[0].contentDocument:document;x.init(),Q.debug(s.db);const r=i==="sandbox"?l.select(`[id="${t}"]`):kt(`[id="${t}"]`),p=s.db.getActors(),E=s.db.getCreatedActors(),f=s.db.getDestroyedActors(),u=s.db.getBoxes();let y=s.db.getActorKeys();const R=s.db.getMessages(),b=s.db.getDiagramTitle(),w=s.db.hasAtLeastOneBox(),A=s.db.hasAtLeastOneBoxWithTitle(),D=await He(p,R,s);if(d.height=await ze(p,D,u),Y.insertComputerIcon(r),Y.insertDatabaseIcon(r),Y.insertClockIcon(r),w&&(x.bumpVerticalPos(d.boxMargin),A&&x.bumpVerticalPos(u[0].textMaxHeight)),d.hideUnusedParticipants===!0){const O=new Set;R.forEach(I=>{O.add(I.from),O.add(I.to)}),y=y.filter(I=>O.has(I))}Qs(r,p,E,y,0,R,!1);const k=await ir(R,p,D,s);Y.insertArrowHead(r),Y.insertArrowCrossHead(r),Y.insertArrowFilledHead(r),Y.insertSequenceNumber(r),Y.insertSolidTopArrowHead(r),Y.insertSolidBottomArrowHead(r),Y.insertStickTopArrowHead(r),Y.insertStickBottomArrowHead(r);function M(O,I){const nt=x.endActivation(O);nt.starty+18>I&&(nt.starty=I-6,I+=12),Y.drawActivation(r,nt,I,d,Vt(O.from).length),x.insert(nt.startx,I-10,nt.stopx,I)}_(M,"activeEnd");let W=1,K=1;const H=[],G=[];let X=0;for(const O of R){let I,nt,ot;switch(O.type){case s.db.LINETYPE.NOTE:x.resetVerticalPos(),nt=O.noteModel,await Xs(r,nt);break;case s.db.LINETYPE.ACTIVE_START:x.newActivation(O,r,p);break;case s.db.LINETYPE.CENTRAL_CONNECTION:x.newActivation(O,r,p);break;case s.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:x.newActivation(O,r,p);break;case s.db.LINETYPE.ACTIVE_END:M(O,x.getVerticalPos());break;case s.db.LINETYPE.LOOP_START:ct(k,O,d.boxMargin,d.boxMargin+d.boxTextMargin,C=>x.newLoop(C));break;case s.db.LINETYPE.LOOP_END:I=x.endLoop(),await Y.drawLoop(r,I,"loop",d),x.bumpVerticalPos(I.stopy-x.getVerticalPos()),x.models.addLoop(I);break;case s.db.LINETYPE.RECT_START:ct(k,O,d.boxMargin,d.boxMargin,C=>x.newLoop(void 0,C.message));break;case s.db.LINETYPE.RECT_END:I=x.endLoop(),G.push(I),x.models.addLoop(I),x.bumpVerticalPos(I.stopy-x.getVerticalPos());break;case s.db.LINETYPE.OPT_START:ct(k,O,d.boxMargin,d.boxMargin+d.boxTextMargin,C=>x.newLoop(C));break;case s.db.LINETYPE.OPT_END:I=x.endLoop(),await Y.drawLoop(r,I,"opt",d),x.bumpVerticalPos(I.stopy-x.getVerticalPos()),x.models.addLoop(I);break;case s.db.LINETYPE.ALT_START:ct(k,O,d.boxMargin,d.boxMargin+d.boxTextMargin,C=>x.newLoop(C));break;case s.db.LINETYPE.ALT_ELSE:ct(k,O,d.boxMargin+d.boxTextMargin,d.boxMargin,C=>x.addSectionToLoop(C));break;case s.db.LINETYPE.ALT_END:I=x.endLoop(),await Y.drawLoop(r,I,"alt",d),x.bumpVerticalPos(I.stopy-x.getVerticalPos()),x.models.addLoop(I);break;case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:ct(k,O,d.boxMargin,d.boxMargin+d.boxTextMargin,C=>x.newLoop(C)),x.saveVerticalPos();break;case s.db.LINETYPE.PAR_AND:ct(k,O,d.boxMargin+d.boxTextMargin,d.boxMargin,C=>x.addSectionToLoop(C));break;case s.db.LINETYPE.PAR_END:I=x.endLoop(),await Y.drawLoop(r,I,"par",d),x.bumpVerticalPos(I.stopy-x.getVerticalPos()),x.models.addLoop(I);break;case s.db.LINETYPE.AUTONUMBER:W=O.message.start||W,K=O.message.step||K,O.message.visible?s.db.enableSequenceNumbers():s.db.disableSequenceNumbers();break;case s.db.LINETYPE.CRITICAL_START:ct(k,O,d.boxMargin,d.boxMargin+d.boxTextMargin,C=>x.newLoop(C));break;case s.db.LINETYPE.CRITICAL_OPTION:ct(k,O,d.boxMargin+d.boxTextMargin,d.boxMargin,C=>x.addSectionToLoop(C));break;case s.db.LINETYPE.CRITICAL_END:I=x.endLoop(),await Y.drawLoop(r,I,"critical",d),x.bumpVerticalPos(I.stopy-x.getVerticalPos()),x.models.addLoop(I);break;case s.db.LINETYPE.BREAK_START:ct(k,O,d.boxMargin,d.boxMargin+d.boxTextMargin,C=>x.newLoop(C));break;case s.db.LINETYPE.BREAK_END:I=x.endLoop(),await Y.drawLoop(r,I,"break",d),x.bumpVerticalPos(I.stopy-x.getVerticalPos()),x.models.addLoop(I);break;default:try{ot=O.msgModel,ot.starty=x.getVerticalPos(),ot.sequenceIndex=W,ot.sequenceVisible=s.db.showSequenceNumbers();const C=await We(r,ot);qe(O,ot,C,X,p,E,f),H.push({messageModel:ot,lineStartY:C,msg:O}),x.models.addMessage(ot)}catch(C){Q.error("error while drawing message",C)}}[s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,s.db.LINETYPE.SOLID_TOP,s.db.LINETYPE.SOLID_BOTTOM,s.db.LINETYPE.STICK_TOP,s.db.LINETYPE.STICK_BOTTOM,s.db.LINETYPE.SOLID_TOP_DOTTED,s.db.LINETYPE.SOLID_BOTTOM_DOTTED,s.db.LINETYPE.STICK_TOP_DOTTED,s.db.LINETYPE.STICK_BOTTOM_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.DOTTED,s.db.LINETYPE.SOLID_CROSS,s.db.LINETYPE.DOTTED_CROSS,s.db.LINETYPE.SOLID_POINT,s.db.LINETYPE.DOTTED_POINT,s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(O.type)&&(W=W+K),X++}Q.debug("createdActors",E),Q.debug("destroyedActors",f),await Jt(r,p,y,!1);for(const O of H)await Zs(r,O.messageModel,O.lineStartY,s,O.msg);d.mirrorActors&&await Jt(r,p,y,!0),G.forEach(O=>Y.drawBackgroundRect(r,O)),Be(r,p,y,d);for(const O of x.models.boxes){O.height=x.getVerticalPos()-O.y,x.insert(O.x,O.y,O.x+O.width,O.height);const I=d.boxMargin*2;O.startx=O.x-I,O.starty=O.y-I*.25,O.stopx=O.startx+O.width+2*I,O.stopy=O.starty+O.height+I*.75,O.stroke="rgb(0,0,0, 0.5)",Y.drawBox(r,O,d)}w&&x.bumpVerticalPos(d.boxMargin);const z=Ke(r,p,y,h),{bounds:v}=x.getBounds();v.startx===void 0&&(v.startx=0),v.starty===void 0&&(v.starty=0),v.stopx===void 0&&(v.stopx=0),v.stopy===void 0&&(v.stopy=0);let $=v.stopy-v.starty;$<z.maxHeight&&($=z.maxHeight);let J=$+2*d.diagramMarginY;d.mirrorActors&&(J=J-d.boxMargin+d.bottomMarginAdj);let j=v.stopx-v.startx;j<z.maxWidth&&(j=z.maxWidth);const st=j+2*d.diagramMarginX;b&&r.append("text").text(b).attr("x",(v.stopx-v.startx)/2-2*d.diagramMarginX).attr("y",-25),je(r,J,st,d.useMaxWidth);const rt=b?40:0;r.attr("viewBox",v.startx-d.diagramMarginX+" -"+(d.diagramMarginY+rt)+" "+st+" "+(J+rt)),Q.debug("models:",x.models)},"draw");async function He(e,t,a){const s={};for(const i of t)if(e.get(i.to)&&e.get(i.from)){const n=e.get(i.to);if(i.placement===a.db.PLACEMENT.LEFTOF&&!n.prevActor||i.placement===a.db.PLACEMENT.RIGHTOF&&!n.nextActor)continue;const c=i.placement!==void 0,l=!c,h=c?Rt(d):xt(d),r=i.wrap?q.wrapLabel(i.message,d.width-2*d.wrapPadding,h):i.message,E=(U(r)?await St(i.message,et()):q.calculateTextDimensions(r,h)).width+2*d.wrapPadding;l&&i.from===n.nextActor?s[i.to]=S.getMax(s[i.to]||0,E):l&&i.from===n.prevActor?s[i.from]=S.getMax(s[i.from]||0,E):l&&i.from===i.to?(s[i.from]=S.getMax(s[i.from]||0,E/2),s[i.to]=S.getMax(s[i.to]||0,E/2)):i.placement===a.db.PLACEMENT.RIGHTOF?s[i.from]=S.getMax(s[i.from]||0,E):i.placement===a.db.PLACEMENT.LEFTOF?s[n.prevActor]=S.getMax(s[n.prevActor]||0,E):i.placement===a.db.PLACEMENT.OVER&&(n.prevActor&&(s[n.prevActor]=S.getMax(s[n.prevActor]||0,E/2)),n.nextActor&&(s[i.from]=S.getMax(s[i.from]||0,E/2)))}return Q.debug("maxMessageWidthPerActor:",s),s}_(He,"getMaxMessageWidthPerActor");var js=_(function(e){let t=0;const a=Xt(d);for(const s in e.links){const n=q.calculateTextDimensions(s,a).width+2*d.wrapPadding+2*d.boxMargin;t<n&&(t=n)}return t},"getRequiredPopupWidth");async function ze(e,t,a){let s=0;for(const n of e.keys()){const c=e.get(n);c.wrap&&(c.description=q.wrapLabel(c.description,d.width-2*d.wrapPadding,Xt(d)));const l=U(c.description)?await St(c.description,et()):q.calculateTextDimensions(c.description,Xt(d));c.width=c.wrap?d.width:S.getMax(d.width,l.width+2*d.wrapPadding),c.height=c.wrap?S.getMax(l.height,d.height):d.height,s=S.getMax(s,c.height)}for(const n in t){const c=e.get(n);if(!c)continue;const l=e.get(c.nextActor);if(!l){const E=t[n]+d.actorMargin-c.width/2;c.margin=S.getMax(E,d.actorMargin);continue}const r=t[n]+d.actorMargin-c.width/2-l.width/2;c.margin=S.getMax(r,d.actorMargin)}let i=0;return a.forEach(n=>{const c=xt(d);let l=n.actorKeys.reduce((E,f)=>E+=e.get(f).width+(e.get(f).margin||0),0);const h=d.boxMargin*8;l+=h,l-=2*d.boxTextMargin,n.wrap&&(n.name=q.wrapLabel(n.name,l-2*d.wrapPadding,c));const r=q.calculateTextDimensions(n.name,c);i=S.getMax(r.height,i);const p=S.getMax(l,r.width+2*d.wrapPadding);if(n.margin=d.boxTextMargin,l<p){const E=(p-l)/2;n.margin+=E}}),a.forEach(n=>n.textMaxHeight=i),S.getMax(s,d.height)}_(ze,"calculateActorMargins");var tr=_(async function(e,t,a){const s=t.get(e.from),i=t.get(e.to),n=s.x,c=i.x,l=e.wrap&&e.message;let h=U(e.message)?await St(e.message,et()):q.calculateTextDimensions(l?q.wrapLabel(e.message,d.width,Rt(d)):e.message,Rt(d));const r={width:l?d.width:S.getMax(d.width,h.width+2*d.noteMargin),height:0,startx:s.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===a.db.PLACEMENT.RIGHTOF?(r.width=l?S.getMax(d.width,h.width):S.getMax(s.width/2+i.width/2,h.width+2*d.noteMargin),r.startx=n+(s.width+d.actorMargin)/2):e.placement===a.db.PLACEMENT.LEFTOF?(r.width=l?S.getMax(d.width,h.width+2*d.noteMargin):S.getMax(s.width/2+i.width/2,h.width+2*d.noteMargin),r.startx=n-r.width+(s.width-d.actorMargin)/2):e.to===e.from?(h=q.calculateTextDimensions(l?q.wrapLabel(e.message,S.getMax(d.width,s.width),Rt(d)):e.message,Rt(d)),r.width=l?S.getMax(d.width,s.width):S.getMax(s.width,d.width,h.width+2*d.noteMargin),r.startx=n+(s.width-r.width)/2):(r.width=Math.abs(n+s.width/2-(c+i.width/2))+d.actorMargin,r.startx=n<c?n+s.width/2-d.actorMargin/2:c+i.width/2-d.actorMargin/2),l&&(r.message=q.wrapLabel(e.message,r.width-2*d.wrapPadding,Rt(d))),Q.debug(`NM:[${r.startx},${r.stopx},${r.starty},${r.stopy}:${r.width},${r.height}=${e.message}]`),r},"buildNoteModel"),er=4,De=_(function(e,t){const{CENTRAL_CONNECTION:a,CENTRAL_CONNECTION_REVERSE:s,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[a,s,i].includes(e.centralConnection)},"hasCentralConnection"),sr=_(function(e,t,a){const{CENTRAL_CONNECTION_REVERSE:s,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:n,BIDIRECTIONAL_DOTTED:c}=t.db.LINETYPE;let l=0;return(e.centralConnection===s||e.centralConnection===i)&&(l+=er),(e.centralConnection===s||e.centralConnection===i)&&(e.type===n||e.type===c)&&(l+=a?0:-6),l},"calculateCentralConnectionOffset"),Ue=_(function(e,t){const{SOLID_ARROW_TOP_REVERSE:a,SOLID_ARROW_TOP_REVERSE_DOTTED:s,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:n,STICK_ARROW_TOP_REVERSE:c,STICK_ARROW_TOP_REVERSE_DOTTED:l,STICK_ARROW_BOTTOM_REVERSE:h,STICK_ARROW_BOTTOM_REVERSE_DOTTED:r}=t.db.LINETYPE;return[a,s,i,n,c,l,h,r].includes(e.type)},"isReverseArrowType"),rr=_(function(e,t){const{BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:s}=t.db.LINETYPE;return[a,s].includes(e.type)},"isBidirectionalArrowType"),ar=_(function(e,t,a){if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.SOLID_TOP,a.db.LINETYPE.SOLID_BOTTOM,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.SOLID_TOP_DOTTED,a.db.LINETYPE.SOLID_BOTTOM_DOTTED,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};const[s,i]=Pe(e.from,t),[n,c]=Pe(e.to,t),l=s<=n;let h=l?i:s,r=l?n:c;h+=sr(e,a,l);const p=Math.abs(n-c)>2,E=_(R=>l?-R:R,"adjustValue");e.from===e.to?r=h:(e.activate&&!p&&(r+=E(d.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(r+=E(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(h-=E(3)));const f=[s,i,n,c],u=Math.abs(h-r);e.wrap&&e.message&&(e.message=q.wrapLabel(e.message,S.getMax(u+2*d.wrapPadding,d.width),xt(d)));const y=q.calculateTextDimensions(e.message,xt(d));return{width:S.getMax(e.wrap?0:y.width+2*d.wrapPadding,u+2*d.wrapPadding,d.width),height:0,startx:h,stopx:r,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,f),toBounds:Math.max.apply(null,f)}},"buildMessageModel"),ir=_(async function(e,t,a,s){const i={},n=[];let c,l,h;for(const r of e){switch(r.type){case s.db.LINETYPE.LOOP_START:case s.db.LINETYPE.ALT_START:case s.db.LINETYPE.OPT_START:case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:case s.db.LINETYPE.CRITICAL_START:case s.db.LINETYPE.BREAK_START:n.push({id:r.id,msg:r.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case s.db.LINETYPE.ALT_ELSE:case s.db.LINETYPE.PAR_AND:case s.db.LINETYPE.CRITICAL_OPTION:r.message&&(c=n.pop(),i[c.id]=c,i[r.id]=c,n.push(c));break;case s.db.LINETYPE.LOOP_END:case s.db.LINETYPE.ALT_END:case s.db.LINETYPE.OPT_END:case s.db.LINETYPE.PAR_END:case s.db.LINETYPE.CRITICAL_END:case s.db.LINETYPE.BREAK_END:c=n.pop(),i[c.id]=c;break;case s.db.LINETYPE.ACTIVE_START:{const E=t.get(r.from?r.from:r.to.actor),f=Vt(r.from?r.from:r.to.actor).length,u=E.x+E.width/2+(f-1)*d.activationWidth/2,y={startx:u,stopx:u+d.activationWidth,actor:r.from,enabled:!0};x.activations.push(y)}break;case s.db.LINETYPE.ACTIVE_END:{const E=x.activations.map(f=>f.actor).lastIndexOf(r.from);x.activations.splice(E,1).splice(0,1)}break}r.placement!==void 0?(l=await tr(r,t,s),r.noteModel=l,n.forEach(E=>{c=E,c.from=S.getMin(c.from,l.startx),c.to=S.getMax(c.to,l.startx+l.width),c.width=S.getMax(c.width,Math.abs(c.from-c.to))-d.labelBoxWidth})):(h=ar(r,t,s),r.msgModel=h,h.startx&&h.stopx&&n.length>0&&n.forEach(E=>{if(c=E,h.startx===h.stopx){const f=t.get(r.from),u=t.get(r.to);c.from=S.getMin(f.x-h.width/2,f.x-f.width/2,c.from),c.to=S.getMax(u.x+h.width/2,u.x+f.width/2,c.to),c.width=S.getMax(c.width,Math.abs(c.to-c.from))-d.labelBoxWidth}else c.from=S.getMin(h.startx,c.from),c.to=S.getMax(h.stopx,c.to),c.width=S.getMax(c.width,h.width)-d.labelBoxWidth}))}return x.activations=[],Q.debug("Loop type widths:",i),i},"calculateLoopBounds"),nr={bounds:x,drawActors:Jt,drawActorsPopup:Ke,setConf:Fe,draw:$s},_r={parser:Es,get db(){return new gs},renderer:nr,styles:Is,init:_(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,$e({sequence:{wrap:e.wrap}}))},"init")};export{_r as diagram};
|
|
145
|
+
`;R.append("path").attr("d",b).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",E),R.attr("transform",`translate(${p}, ${y})`),t.rectData=r,dt(a,U(t.description))(t.description,h,r.x,r.y+35,r.width,r.height,{class:`actor ${Mt}`},a);const w=R.select("path:last-child");if(w.node()){const A=w.node().getBBox();t.height=A.height+(a.sequence.labelBoxHeight??0)}return t.height},"drawActorTypeDatabase"),Ns=_(function(e,t,a,s){const i=s?t.stopy:t.starty,n=t.x+t.width/2,c=i+80,l=22,h=e.append("g").lower();s||(P++,h.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P);const r=e.append("g");let E=gt;s?E+=` ${pt}`:E+=` ${Et}`,r.attr("class",E),r.attr("name",t.name);const p=lt();p.x=t.x,p.y=i,p.fill="#eaeaea",p.width=t.width,p.height=t.height,p.class="actor",r.append("line").attr("id","actor-man-torso"+P).attr("x1",t.x+t.width/2-l*2.5).attr("y1",i+12).attr("x2",t.x+t.width/2-15).attr("y2",i+12),r.append("line").attr("id","actor-man-arms"+P).attr("x1",t.x+t.width/2-l*2.5).attr("y1",i+2).attr("x2",t.x+t.width/2-l*2.5).attr("y2",i+22),r.append("circle").attr("cx",t.x+t.width/2).attr("cy",i+12).attr("r",l);const f=r.node().getBBox();return t.height=f.height+(a.sequence.labelBoxHeight??0),dt(a,U(t.description))(t.description,r,p.x,p.y+15,p.width,p.height,{class:`actor ${gt}`},a),s?r.attr("transform",`translate(0,${l/2+10})`):r.attr("transform",`translate(0,${l/2+10})`),t.height},"drawActorTypeBoundary"),As=_(function(e,t,a,s){const i=s?t.stopy:t.starty,n=t.x+t.width/2,c=i+80,l=e.append("g").lower();s||(P++,l.append("line").attr("id","actor"+P).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P);const h=e.append("g");let r=gt;s?r+=` ${pt}`:r+=` ${Et}`,h.attr("class",r),h.attr("name",t.name);const E=lt();E.x=t.x,E.y=i,E.fill="#eaeaea",E.width=t.width,E.height=t.height,E.class="actor",E.rx=3,E.ry=3,h.append("line").attr("id","actor-man-torso"+P).attr("x1",n).attr("y1",i+25).attr("x2",n).attr("y2",i+45),h.append("line").attr("id","actor-man-arms"+P).attr("x1",n-ft/2).attr("y1",i+33).attr("x2",n+ft/2).attr("y2",i+33),h.append("line").attr("x1",n-ft/2).attr("y1",i+60).attr("x2",n).attr("y2",i+45),h.append("line").attr("x1",n).attr("y1",i+45).attr("x2",n+ft/2-2).attr("y2",i+60);const p=h.append("circle");p.attr("cx",t.x+t.width/2),p.attr("cy",i+10),p.attr("r",15),p.attr("width",t.width),p.attr("height",t.height);const f=h.node().getBBox();return t.height=f.height,dt(a,U(t.description))(t.description,h,E.x,E.y+35,E.width,E.height,{class:`actor ${gt}`},a),t.height},"drawActorTypeActor"),ws=_(async function(e,t,a,s){switch(t.type){case"actor":return await As(e,t,a,s);case"participant":return await Os(e,t,a,s);case"boundary":return await Ns(e,t,a,s);case"control":return await bs(e,t,a,s);case"entity":return await Ss(e,t,a,s);case"database":return await ms(e,t,a,s);case"collections":return await ys(e,t,a,s);case"queue":return await Ls(e,t,a,s)}},"drawActor"),Ps=_(function(e,t,a){const i=e.append("g");Ve(i,t),t.name&&dt(a)(t.name,i,t.x,t.y+a.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},a),i.lower()},"drawBox"),Ds=_(function(e){return e.append("g")},"anchorElement"),ks=_(function(e,t,a,s,i){const n=lt(),c=t.anchored;n.x=t.startx,n.y=t.starty,n.class="activation"+i%3,n.width=t.stopx-t.startx,n.height=a-t.starty,bt(c,n)},"drawActivation"),vs=_(async function(e,t,a,s){const{boxMargin:i,boxTextMargin:n,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:h,messageFontSize:r,messageFontWeight:E}=s,p=e.append("g"),f=_(function(R,b,w,A){return p.append("line").attr("x1",R).attr("y1",b).attr("x2",w).attr("y2",A).attr("class","loopLine")},"drawLoopLine");f(t.startx,t.starty,t.stopx,t.starty),f(t.stopx,t.starty,t.stopx,t.stopy),f(t.startx,t.stopy,t.stopx,t.stopy),f(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(R){f(t.startx,R.y,t.stopx,R.y).style("stroke-dasharray","3, 3")});let u=Zt();u.text=a,u.x=t.startx,u.y=t.starty,u.fontFamily=h,u.fontSize=r,u.fontWeight=E,u.anchor="middle",u.valign="middle",u.tspan=!1,u.width=l||50,u.height=c||20,u.textMargin=n,u.class="labelText",Me(p,u),u=Ye(),u.text=t.title,u.x=t.startx+l/2+(t.stopx-t.startx)/2,u.y=t.starty+i+n,u.anchor="middle",u.valign="middle",u.textMargin=n,u.class="loopText",u.fontFamily=h,u.fontSize=r,u.fontWeight=E,u.wrap=!0;let y=U(u.text)?await Ct(p,u,t):Ot(p,u);if(t.sectionTitles!==void 0){for(const[R,b]of Object.entries(t.sectionTitles))if(b.message){u.text=b.message,u.x=t.startx+(t.stopx-t.startx)/2,u.y=t.sections[R].y+i+n,u.class="loopText",u.anchor="middle",u.valign="middle",u.tspan=!1,u.fontFamily=h,u.fontSize=r,u.fontWeight=E,u.wrap=t.wrap,U(u.text)?(t.starty=t.sections[R].y,await Ct(p,u,t)):Ot(p,u);let w=Math.round(y.map(A=>(A._groups||A)[0][0].getBBox().height).reduce((A,D)=>A+D));t.sections[R].height+=w-(i+n)}}return t.height=Math.round(t.stopy-t.starty),p},"drawLoop"),Ve=_(function(e,t){ds(e,t)},"drawBackgroundRect"),Cs=_(function(e){e.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")},"insertDatabaseIcon"),Ms=_(function(e){e.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")},"insertComputerIcon"),Bs=_(function(e){e.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")},"insertClockIcon"),Vs=_(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),Ys=_(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).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")},"insertArrowFilledHead"),Ws=_(function(e){e.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)},"insertSequenceNumber"),Ks=_(function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.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")},"insertArrowCrossHead"),Ye=_(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}},"getTextObj"),Fs=_(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),dt=(function(){function e(n,c,l,h,r,E,p){const f=c.append("text").attr("x",l+r/2).attr("y",h+E/2+5).style("text-anchor","middle").text(n);i(f,p)}_(e,"byText");function t(n,c,l,h,r,E,p,f){const{actorFontSize:u,actorFontFamily:y,actorFontWeight:R}=f,[b,w]=ve(u),A=n.split(S.lineBreakRegex);for(let D=0;D<A.length;D++){const k=D*b-b*(A.length-1)/2,M=c.append("text").attr("x",l+r/2).attr("y",h).style("text-anchor","middle").style("font-size",w).style("font-weight",R).style("font-family",y);M.append("tspan").attr("x",l+r/2).attr("dy",k).text(A[D]),M.attr("y",h+E/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(M,p)}}_(t,"byTspan");function a(n,c,l,h,r,E,p,f){const u=c.append("switch"),R=u.append("foreignObject").attr("x",l).attr("y",h).attr("width",r).attr("height",E).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");R.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),t(n,u,l,h,r,E,p,f),i(R,p)}_(a,"byFo");async function s(n,c,l,h,r,E,p,f){const u=await St(n,Ut()),y=c.append("switch"),b=y.append("foreignObject").attr("x",l+r/2-u.width/2).attr("y",h+E/2-u.height/2).attr("width",u.width).attr("height",u.height).append("xhtml:div").style("height","100%").style("width","100%");b.append("div").style("text-align","center").style("vertical-align","middle").html(await Ce(n,Ut())),t(n,y,l,h,r,E,p,f),i(b,p)}_(s,"byKatex");function i(n,c){for(const l in c)c.hasOwnProperty(l)&&n.attr(l,c[l])}return _(i,"_setTextAttrs"),function(n,c=!1){return c?s:n.textPlacement==="fo"?a:n.textPlacement==="old"?e:t}})(),qs=(function(){function e(i,n,c,l,h,r,E){const p=n.append("text").attr("x",c).attr("y",l).style("text-anchor","start").text(i);s(p,E)}_(e,"byText");function t(i,n,c,l,h,r,E,p){const{actorFontSize:f,actorFontFamily:u,actorFontWeight:y}=p,R=i.split(S.lineBreakRegex);for(let b=0;b<R.length;b++){const w=b*f-f*(R.length-1)/2,A=n.append("text").attr("x",c).attr("y",l).style("text-anchor","start").style("font-size",f).style("font-weight",y).style("font-family",u);A.append("tspan").attr("x",c).attr("dy",w).text(R[b]),A.attr("y",l+r/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(A,E)}}_(t,"byTspan");function a(i,n,c,l,h,r,E,p){const f=n.append("switch"),y=f.append("foreignObject").attr("x",c).attr("y",l).attr("width",h).attr("height",r).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,f,c,l,h,r,E,p),s(y,E)}_(a,"byFo");function s(i,n){for(const c in n)n.hasOwnProperty(c)&&i.attr(c,n[c])}return _(s,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?a:i.textPlacement==="old"?e:t}})(),Hs=_(function(e){e.append("defs").append("marker").attr("id","solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),zs=_(function(e){e.append("defs").append("marker").attr("id","solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),Us=_(function(e){e.append("defs").append("marker").attr("id","stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),Gs=_(function(e){e.append("defs").append("marker").attr("id","stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),Y={drawRect:bt,drawText:Ot,drawLabel:Me,drawActor:ws,drawBox:Ps,drawPopup:Rs,anchorElement:Ds,drawActivation:ks,drawLoop:vs,drawBackgroundRect:Ve,insertArrowHead:Vs,insertArrowFilledHead:Ys,insertSequenceNumber:Ws,insertArrowCrossHead:Ks,insertDatabaseIcon:Cs,insertComputerIcon:Ms,insertClockIcon:Bs,getTextObj:Ye,getNoteRect:Fs,fixLifeLineHeights:Be,sanitizeUrl:ke.sanitizeUrl,insertSolidTopArrowHead:Hs,insertSolidBottomArrowHead:zs,insertStickTopArrowHead:Us,insertStickBottomArrowHead:Gs},d={},x={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,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:_(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:_(function(e){this.boxes.push(e)},"addBox"),addActor:_(function(e){this.actors.push(e)},"addActor"),addLoop:_(function(e){this.loops.push(e)},"addLoop"),addMessage:_(function(e){this.messages.push(e)},"addMessage"),addNote:_(function(e){this.notes.push(e)},"addNote"),lastActor:_(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:_(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:_(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:_(function(){return this.notes[this.notes.length-1]},"lastNote"),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,Fe(et())},"init"),updateVal:_(function(e,t,a,s){e[t]===void 0?e[t]=a:e[t]=s(a,e[t])},"updateVal"),updateBounds:_(function(e,t,a,s){const i=this;let n=0;function c(l){return _(function(r){n++;const E=i.sequenceItems.length-n+1;i.updateVal(r,"starty",t-E*d.boxMargin,Math.min),i.updateVal(r,"stopy",s+E*d.boxMargin,Math.max),i.updateVal(x.data,"startx",e-E*d.boxMargin,Math.min),i.updateVal(x.data,"stopx",a+E*d.boxMargin,Math.max),l!=="activation"&&(i.updateVal(r,"startx",e-E*d.boxMargin,Math.min),i.updateVal(r,"stopx",a+E*d.boxMargin,Math.max),i.updateVal(x.data,"starty",t-E*d.boxMargin,Math.min),i.updateVal(x.data,"stopy",s+E*d.boxMargin,Math.max))},"updateItemBounds")}_(c,"updateFn"),this.sequenceItems.forEach(c()),this.activations.forEach(c("activation"))},"updateBounds"),insert:_(function(e,t,a,s){const i=S.getMin(e,a),n=S.getMax(e,a),c=S.getMin(t,s),l=S.getMax(t,s);this.updateVal(x.data,"startx",i,Math.min),this.updateVal(x.data,"starty",c,Math.min),this.updateVal(x.data,"stopx",n,Math.max),this.updateVal(x.data,"stopy",l,Math.max),this.updateBounds(i,c,n,l)},"insert"),newActivation:_(function(e,t,a){const s=a.get(e.from),i=Vt(e.from).length||0,n=s.x+s.width/2+(i-1)*d.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+d.activationWidth,stopy:void 0,actor:e.from,anchored:Y.anchorElement(t)})},"newActivation"),endActivation:_(function(e){const t=this.activations.map(function(a){return a.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:_(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:_(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:_(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:_(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:_(function(e){const t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:x.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:_(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:_(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:_(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=S.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:_(function(){return this.verticalPos},"getVerticalPos"),getBounds:_(function(){return{bounds:this.data,models:this.models}},"getBounds")},Xs=_(async function(e,t){x.bumpVerticalPos(d.boxMargin),t.height=d.boxMargin,t.starty=x.getVerticalPos();const a=lt();a.x=t.startx,a.y=t.starty,a.width=t.width||d.width,a.class="note";const s=e.append("g"),i=Y.drawRect(s,a),n=Zt();n.x=t.startx,n.y=t.starty,n.width=a.width,n.dy="1em",n.text=t.message,n.class="noteText",n.fontFamily=d.noteFontFamily,n.fontSize=d.noteFontSize,n.fontWeight=d.noteFontWeight,n.anchor=d.noteAlign,n.textMargin=d.noteMargin,n.valign="center";const c=U(n.text)?await Ct(s,n):Ot(s,n),l=Math.round(c.map(h=>(h._groups||h)[0][0].getBBox().height).reduce((h,r)=>h+r));i.attr("height",l+2*d.noteMargin),t.height+=l+2*d.noteMargin,x.bumpVerticalPos(l+2*d.noteMargin),t.stopy=t.starty+l+2*d.noteMargin,t.stopx=t.startx+a.width,x.insert(t.startx,t.starty,t.stopx,t.stopy),x.models.addNote(t)},"drawNote"),Js=_(function(e,t,a,s,i,n,c){const l=s.db.getActors(),h=l.get(t.from),r=l.get(t.to),E=a.sequenceVisible;let p=h.x+h.width/2,f=r.x+r.width/2;const u=p<=f,y=Ue(t,s),R=e.append("g"),b=16.5,w=_((W,K)=>{const H=W?b:-b;return K?-H:H},"getCircleOffset"),A=_(W=>{R.append("circle").attr("cx",W).attr("cy",c).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:D,CENTRAL_CONNECTION_REVERSE:k,CENTRAL_CONNECTION_DUAL:M}=s.db.LINETYPE;if(E)switch(t.centralConnection){case D:y&&(f+=w(u,!0));break;case k:y||(p+=w(u,!1));break;case M:y?f+=w(u,!0):p+=w(u,!1);break}switch(t.centralConnection){case D:A(f);break;case k:A(p);break;case M:A(p),A(f);break}},"drawCentralConnection"),xt=_(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),Rt=_(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),Xt=_(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function We(e,t){x.bumpVerticalPos(10);const{startx:a,stopx:s,message:i}=t,n=S.splitBreaks(i).length,c=U(i),l=c?await St(i,et()):q.calculateTextDimensions(i,xt(d));if(!c){const p=l.height/n;t.height+=p,x.bumpVerticalPos(p)}let h,r=l.height-10;const E=l.width;if(a===s){h=x.getVerticalPos()+r,d.rightAngles||(r+=d.boxMargin,h=x.getVerticalPos()+r),r+=30;const p=S.getMax(E/2,d.width/2);x.insert(a-p,x.getVerticalPos()-10+r,s+p,x.getVerticalPos()+30+r)}else r+=d.boxMargin,h=x.getVerticalPos()+r,x.insert(a,h-10,s,h);return x.bumpVerticalPos(r),t.height+=r,t.stopy=t.starty+t.height,x.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),h}_(We,"boundMessage");var Zs=_(async function(e,t,a,s,i){const{startx:n,stopx:c,starty:l,message:h,type:r,sequenceIndex:E,sequenceVisible:p}=t,f=q.calculateTextDimensions(h,xt(d)),u=Zt();u.x=n,u.y=l+10,u.width=c-n,u.class="messageText",u.dy="1em",u.text=h,u.fontFamily=d.messageFontFamily,u.fontSize=d.messageFontSize,u.fontWeight=d.messageFontWeight,u.anchor=d.messageAlign,u.valign="center",u.textMargin=d.wrapPadding,u.tspan=!1,U(u.text)?await Ct(e,u,{startx:n,stopx:c,starty:a}):Ot(e,u);const y=f.width;let R;if(n===c){const w=p||d.showSequenceNumbers,A=Ue(i,s),D=rr(i,s),k=n+(w&&(A||D)?10:0);d.rightAngles?R=e.append("path").attr("d",`M ${k},${a} H ${n+S.getMax(d.width/2,y/2)} V ${a+25} H ${n}`):R=e.append("path").attr("d","M "+k+","+a+" C "+(k+60)+","+(a-10)+" "+(n+60)+","+(a+30)+" "+n+","+(a+20))}else R=e.append("line"),R.attr("x1",n),R.attr("y1",a),R.attr("x2",c),R.attr("y2",a),De(i,s)&&Js(e,i,t,s,n,c,a);r===s.db.LINETYPE.DOTTED||r===s.db.LINETYPE.DOTTED_CROSS||r===s.db.LINETYPE.DOTTED_POINT||r===s.db.LINETYPE.DOTTED_OPEN||r===s.db.LINETYPE.BIDIRECTIONAL_DOTTED||r===s.db.LINETYPE.SOLID_TOP_DOTTED||r===s.db.LINETYPE.SOLID_BOTTOM_DOTTED||r===s.db.LINETYPE.STICK_TOP_DOTTED||r===s.db.LINETYPE.STICK_BOTTOM_DOTTED||r===s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||r===s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||r===s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||r===s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(R.style("stroke-dasharray","3, 3"),R.attr("class","messageLine1")):R.attr("class","messageLine0");let b="";if(d.arrowMarkerAbsolute&&(b=hs(!0)),R.attr("stroke-width",2),R.attr("stroke","none"),R.style("fill","none"),(r===s.db.LINETYPE.SOLID_TOP||r===s.db.LINETYPE.SOLID_TOP_DOTTED)&&R.attr("marker-end","url("+b+"#solidTopArrowHead)"),(r===s.db.LINETYPE.SOLID_BOTTOM||r===s.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&R.attr("marker-end","url("+b+"#solidBottomArrowHead)"),(r===s.db.LINETYPE.STICK_TOP||r===s.db.LINETYPE.STICK_TOP_DOTTED)&&R.attr("marker-end","url("+b+"#stickTopArrowHead)"),(r===s.db.LINETYPE.STICK_BOTTOM||r===s.db.LINETYPE.STICK_BOTTOM_DOTTED)&&R.attr("marker-end","url("+b+"#stickBottomArrowHead)"),(r===s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||r===s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&R.attr("marker-start","url("+b+"#solidBottomArrowHead)"),(r===s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||r===s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&R.attr("marker-start","url("+b+"#solidTopArrowHead)"),(r===s.db.LINETYPE.STICK_ARROW_TOP_REVERSE||r===s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&R.attr("marker-start","url("+b+"#stickBottomArrowHead)"),(r===s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||r===s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&R.attr("marker-start","url("+b+"#stickTopArrowHead)"),(r===s.db.LINETYPE.SOLID||r===s.db.LINETYPE.DOTTED)&&R.attr("marker-end","url("+b+"#arrowhead)"),(r===s.db.LINETYPE.BIDIRECTIONAL_SOLID||r===s.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(R.attr("marker-start","url("+b+"#arrowhead)"),R.attr("marker-end","url("+b+"#arrowhead)")),(r===s.db.LINETYPE.SOLID_POINT||r===s.db.LINETYPE.DOTTED_POINT)&&R.attr("marker-end","url("+b+"#filled-head)"),(r===s.db.LINETYPE.SOLID_CROSS||r===s.db.LINETYPE.DOTTED_CROSS)&&R.attr("marker-end","url("+b+"#crosshead)"),p||d.showSequenceNumbers){const w=r===s.db.LINETYPE.BIDIRECTIONAL_SOLID||r===s.db.LINETYPE.BIDIRECTIONAL_DOTTED,A=r===s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||r===s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||r===s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||r===s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||r===s.db.LINETYPE.STICK_ARROW_TOP_REVERSE||r===s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||r===s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||r===s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,D=6,k=De(i,s);let M=n,W=c;w?(n<c?M=n+D*2:(M=n-D+(k?-5:0),M+=i?.centralConnection===s.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===s.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),R.attr("x1",M)):A?(c>n?W=c-2*D:(W=c-D,M+=i?.centralConnection===s.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===s.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),W+=k?15:0,R.attr("x2",W),R.attr("x1",M)):R.attr("x1",n+D);let K=0;const H=n===c,G=n<=c;H?K=t.fromBounds+1:A?K=G?t.toBounds-1:t.fromBounds+1:K=G?t.fromBounds+1:t.toBounds-1,e.append("line").attr("x1",K).attr("y1",a).attr("x2",K).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+b+"#sequencenumber)"),e.append("text").attr("x",K).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(E)}},"drawMessage"),Qs=_(function(e,t,a,s,i,n,c){let l=0,h=0,r,E=0;for(const p of s){const f=t.get(p),u=f.box;r&&r!=u&&(c||x.models.addBox(r),h+=d.boxMargin+r.margin),u&&u!=r&&(c||(u.x=l+h,u.y=i),h+=u.margin),f.width=f.width||d.width,f.height=S.getMax(f.height||d.height,d.height),f.margin=f.margin||d.actorMargin,E=S.getMax(E,f.height),a.get(f.name)&&(h+=f.width/2),f.x=l+h,f.starty=x.getVerticalPos(),x.insert(f.x,i,f.x+f.width,f.height),l+=f.width+h,f.box&&(f.box.width=l+u.margin-f.box.x),h=f.margin,r=f.box,x.models.addActor(f)}r&&!c&&x.models.addBox(r),x.bumpVerticalPos(E)},"addActorRenderingData"),Jt=_(async function(e,t,a,s){if(s){let i=0;x.bumpVerticalPos(d.boxMargin*2);for(const n of a){const c=t.get(n);c.stopy||(c.stopy=x.getVerticalPos());const l=await Y.drawActor(e,c,d,!0);i=S.getMax(i,l)}x.bumpVerticalPos(i+d.boxMargin)}else for(const i of a){const n=t.get(i);await Y.drawActor(e,n,d,!1)}},"drawActors"),Ke=_(function(e,t,a,s){let i=0,n=0;for(const c of a){const l=t.get(c),h=js(l),r=Y.drawPopup(e,l,h,d,d.forceMenus,s);r.height>i&&(i=r.height),r.width+l.x>n&&(n=r.width+l.x)}return{maxHeight:i,maxWidth:n}},"drawActorsPopup"),Fe=_(function(e){ts(d,e),e.fontFamily&&(d.actorFontFamily=d.noteFontFamily=d.messageFontFamily=e.fontFamily),e.fontSize&&(d.actorFontSize=d.noteFontSize=d.messageFontSize=e.fontSize),e.fontWeight&&(d.actorFontWeight=d.noteFontWeight=d.messageFontWeight=e.fontWeight)},"setConf"),Vt=_(function(e){return x.activations.filter(function(t){return t.actor===e})},"actorActivations"),Pe=_(function(e,t){const a=t.get(e),s=Vt(e),i=s.reduce(function(c,l){return S.getMin(c,l.startx)},a.x+a.width/2-1),n=s.reduce(function(c,l){return S.getMax(c,l.stopx)},a.x+a.width/2+1);return[i,n]},"activationBounds");function ct(e,t,a,s,i){x.bumpVerticalPos(a);let n=s;if(t.id&&t.message&&e[t.id]){const c=e[t.id].width,l=xt(d);t.message=q.wrapLabel(`[${t.message}]`,c-2*d.wrapPadding,l),t.width=c,t.wrap=!0;const h=q.calculateTextDimensions(t.message,l),r=S.getMax(h.height,d.labelBoxHeight);n=s+r,Q.debug(`${r} - ${t.message}`)}i(t),x.bumpVerticalPos(n)}_(ct,"adjustLoopHeightForWrap");function qe(e,t,a,s,i,n,c){function l(E,p){E.x<i.get(e.from).x?(x.insert(t.stopx-p,t.starty,t.startx,t.stopy+E.height/2+d.noteMargin),t.stopx=t.stopx+p):(x.insert(t.startx,t.starty,t.stopx+p,t.stopy+E.height/2+d.noteMargin),t.stopx=t.stopx-p)}_(l,"receiverAdjustment");function h(E,p){E.x<i.get(e.to).x?(x.insert(t.startx-p,t.starty,t.stopx,t.stopy+E.height/2+d.noteMargin),t.startx=t.startx+p):(x.insert(t.stopx,t.starty,t.startx+p,t.stopy+E.height/2+d.noteMargin),t.startx=t.startx-p)}_(h,"senderAdjustment");const r=[vt.ACTOR,vt.CONTROL,vt.ENTITY,vt.DATABASE];if(n.get(e.to)==s){const E=i.get(e.to),p=r.includes(E.type)?ft/2+3:E.width/2+3;l(E,p),E.starty=a-E.height/2,x.bumpVerticalPos(E.height/2)}else if(c.get(e.from)==s){const E=i.get(e.from);if(d.mirrorActors){const p=r.includes(E.type)?ft/2:E.width/2;h(E,p)}E.stopy=a-E.height/2,x.bumpVerticalPos(E.height/2)}else if(c.get(e.to)==s){const E=i.get(e.to);if(d.mirrorActors){const p=r.includes(E.type)?ft/2+3:E.width/2+3;l(E,p)}E.stopy=a-E.height/2,x.bumpVerticalPos(E.height/2)}}_(qe,"adjustCreatedDestroyedData");var $s=_(async function(e,t,a,s){const{securityLevel:i,sequence:n}=et();d=n;let c;i==="sandbox"&&(c=kt("#i"+t));const l=i==="sandbox"?kt(c.nodes()[0].contentDocument.body):kt("body"),h=i==="sandbox"?c.nodes()[0].contentDocument:document;x.init(),Q.debug(s.db);const r=i==="sandbox"?l.select(`[id="${t}"]`):kt(`[id="${t}"]`),E=s.db.getActors(),p=s.db.getCreatedActors(),f=s.db.getDestroyedActors(),u=s.db.getBoxes();let y=s.db.getActorKeys();const R=s.db.getMessages(),b=s.db.getDiagramTitle(),w=s.db.hasAtLeastOneBox(),A=s.db.hasAtLeastOneBoxWithTitle(),D=await He(E,R,s);if(d.height=await ze(E,D,u),Y.insertComputerIcon(r),Y.insertDatabaseIcon(r),Y.insertClockIcon(r),w&&(x.bumpVerticalPos(d.boxMargin),A&&x.bumpVerticalPos(u[0].textMaxHeight)),d.hideUnusedParticipants===!0){const O=new Set;R.forEach(I=>{O.add(I.from),O.add(I.to)}),y=y.filter(I=>O.has(I))}Qs(r,E,p,y,0,R,!1);const k=await ir(R,E,D,s);Y.insertArrowHead(r),Y.insertArrowCrossHead(r),Y.insertArrowFilledHead(r),Y.insertSequenceNumber(r),Y.insertSolidTopArrowHead(r),Y.insertSolidBottomArrowHead(r),Y.insertStickTopArrowHead(r),Y.insertStickBottomArrowHead(r);function M(O,I){const nt=x.endActivation(O);nt.starty+18>I&&(nt.starty=I-6,I+=12),Y.drawActivation(r,nt,I,d,Vt(O.from).length),x.insert(nt.startx,I-10,nt.stopx,I)}_(M,"activeEnd");let W=1,K=1;const H=[],G=[];let X=0;for(const O of R){let I,nt,ot;switch(O.type){case s.db.LINETYPE.NOTE:x.resetVerticalPos(),nt=O.noteModel,await Xs(r,nt);break;case s.db.LINETYPE.ACTIVE_START:x.newActivation(O,r,E);break;case s.db.LINETYPE.CENTRAL_CONNECTION:x.newActivation(O,r,E);break;case s.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:x.newActivation(O,r,E);break;case s.db.LINETYPE.ACTIVE_END:M(O,x.getVerticalPos());break;case s.db.LINETYPE.LOOP_START:ct(k,O,d.boxMargin,d.boxMargin+d.boxTextMargin,C=>x.newLoop(C));break;case s.db.LINETYPE.LOOP_END:I=x.endLoop(),await Y.drawLoop(r,I,"loop",d),x.bumpVerticalPos(I.stopy-x.getVerticalPos()),x.models.addLoop(I);break;case s.db.LINETYPE.RECT_START:ct(k,O,d.boxMargin,d.boxMargin,C=>x.newLoop(void 0,C.message));break;case s.db.LINETYPE.RECT_END:I=x.endLoop(),G.push(I),x.models.addLoop(I),x.bumpVerticalPos(I.stopy-x.getVerticalPos());break;case s.db.LINETYPE.OPT_START:ct(k,O,d.boxMargin,d.boxMargin+d.boxTextMargin,C=>x.newLoop(C));break;case s.db.LINETYPE.OPT_END:I=x.endLoop(),await Y.drawLoop(r,I,"opt",d),x.bumpVerticalPos(I.stopy-x.getVerticalPos()),x.models.addLoop(I);break;case s.db.LINETYPE.ALT_START:ct(k,O,d.boxMargin,d.boxMargin+d.boxTextMargin,C=>x.newLoop(C));break;case s.db.LINETYPE.ALT_ELSE:ct(k,O,d.boxMargin+d.boxTextMargin,d.boxMargin,C=>x.addSectionToLoop(C));break;case s.db.LINETYPE.ALT_END:I=x.endLoop(),await Y.drawLoop(r,I,"alt",d),x.bumpVerticalPos(I.stopy-x.getVerticalPos()),x.models.addLoop(I);break;case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:ct(k,O,d.boxMargin,d.boxMargin+d.boxTextMargin,C=>x.newLoop(C)),x.saveVerticalPos();break;case s.db.LINETYPE.PAR_AND:ct(k,O,d.boxMargin+d.boxTextMargin,d.boxMargin,C=>x.addSectionToLoop(C));break;case s.db.LINETYPE.PAR_END:I=x.endLoop(),await Y.drawLoop(r,I,"par",d),x.bumpVerticalPos(I.stopy-x.getVerticalPos()),x.models.addLoop(I);break;case s.db.LINETYPE.AUTONUMBER:W=O.message.start||W,K=O.message.step||K,O.message.visible?s.db.enableSequenceNumbers():s.db.disableSequenceNumbers();break;case s.db.LINETYPE.CRITICAL_START:ct(k,O,d.boxMargin,d.boxMargin+d.boxTextMargin,C=>x.newLoop(C));break;case s.db.LINETYPE.CRITICAL_OPTION:ct(k,O,d.boxMargin+d.boxTextMargin,d.boxMargin,C=>x.addSectionToLoop(C));break;case s.db.LINETYPE.CRITICAL_END:I=x.endLoop(),await Y.drawLoop(r,I,"critical",d),x.bumpVerticalPos(I.stopy-x.getVerticalPos()),x.models.addLoop(I);break;case s.db.LINETYPE.BREAK_START:ct(k,O,d.boxMargin,d.boxMargin+d.boxTextMargin,C=>x.newLoop(C));break;case s.db.LINETYPE.BREAK_END:I=x.endLoop(),await Y.drawLoop(r,I,"break",d),x.bumpVerticalPos(I.stopy-x.getVerticalPos()),x.models.addLoop(I);break;default:try{ot=O.msgModel,ot.starty=x.getVerticalPos(),ot.sequenceIndex=W,ot.sequenceVisible=s.db.showSequenceNumbers();const C=await We(r,ot);qe(O,ot,C,X,E,p,f),H.push({messageModel:ot,lineStartY:C,msg:O}),x.models.addMessage(ot)}catch(C){Q.error("error while drawing message",C)}}[s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,s.db.LINETYPE.SOLID_TOP,s.db.LINETYPE.SOLID_BOTTOM,s.db.LINETYPE.STICK_TOP,s.db.LINETYPE.STICK_BOTTOM,s.db.LINETYPE.SOLID_TOP_DOTTED,s.db.LINETYPE.SOLID_BOTTOM_DOTTED,s.db.LINETYPE.STICK_TOP_DOTTED,s.db.LINETYPE.STICK_BOTTOM_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.DOTTED,s.db.LINETYPE.SOLID_CROSS,s.db.LINETYPE.DOTTED_CROSS,s.db.LINETYPE.SOLID_POINT,s.db.LINETYPE.DOTTED_POINT,s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(O.type)&&(W=W+K),X++}Q.debug("createdActors",p),Q.debug("destroyedActors",f),await Jt(r,E,y,!1);for(const O of H)await Zs(r,O.messageModel,O.lineStartY,s,O.msg);d.mirrorActors&&await Jt(r,E,y,!0),G.forEach(O=>Y.drawBackgroundRect(r,O)),Be(r,E,y,d);for(const O of x.models.boxes){O.height=x.getVerticalPos()-O.y,x.insert(O.x,O.y,O.x+O.width,O.height);const I=d.boxMargin*2;O.startx=O.x-I,O.starty=O.y-I*.25,O.stopx=O.startx+O.width+2*I,O.stopy=O.starty+O.height+I*.75,O.stroke="rgb(0,0,0, 0.5)",Y.drawBox(r,O,d)}w&&x.bumpVerticalPos(d.boxMargin);const z=Ke(r,E,y,h),{bounds:v}=x.getBounds();v.startx===void 0&&(v.startx=0),v.starty===void 0&&(v.starty=0),v.stopx===void 0&&(v.stopx=0),v.stopy===void 0&&(v.stopy=0);let $=v.stopy-v.starty;$<z.maxHeight&&($=z.maxHeight);let J=$+2*d.diagramMarginY;d.mirrorActors&&(J=J-d.boxMargin+d.bottomMarginAdj);let j=v.stopx-v.startx;j<z.maxWidth&&(j=z.maxWidth);const st=j+2*d.diagramMarginX;b&&r.append("text").text(b).attr("x",(v.stopx-v.startx)/2-2*d.diagramMarginX).attr("y",-25),je(r,J,st,d.useMaxWidth);const rt=b?40:0;r.attr("viewBox",v.startx-d.diagramMarginX+" -"+(d.diagramMarginY+rt)+" "+st+" "+(J+rt)),Q.debug("models:",x.models)},"draw");async function He(e,t,a){const s={};for(const i of t)if(e.get(i.to)&&e.get(i.from)){const n=e.get(i.to);if(i.placement===a.db.PLACEMENT.LEFTOF&&!n.prevActor||i.placement===a.db.PLACEMENT.RIGHTOF&&!n.nextActor)continue;const c=i.placement!==void 0,l=!c,h=c?Rt(d):xt(d),r=i.wrap?q.wrapLabel(i.message,d.width-2*d.wrapPadding,h):i.message,p=(U(r)?await St(i.message,et()):q.calculateTextDimensions(r,h)).width+2*d.wrapPadding;l&&i.from===n.nextActor?s[i.to]=S.getMax(s[i.to]||0,p):l&&i.from===n.prevActor?s[i.from]=S.getMax(s[i.from]||0,p):l&&i.from===i.to?(s[i.from]=S.getMax(s[i.from]||0,p/2),s[i.to]=S.getMax(s[i.to]||0,p/2)):i.placement===a.db.PLACEMENT.RIGHTOF?s[i.from]=S.getMax(s[i.from]||0,p):i.placement===a.db.PLACEMENT.LEFTOF?s[n.prevActor]=S.getMax(s[n.prevActor]||0,p):i.placement===a.db.PLACEMENT.OVER&&(n.prevActor&&(s[n.prevActor]=S.getMax(s[n.prevActor]||0,p/2)),n.nextActor&&(s[i.from]=S.getMax(s[i.from]||0,p/2)))}return Q.debug("maxMessageWidthPerActor:",s),s}_(He,"getMaxMessageWidthPerActor");var js=_(function(e){let t=0;const a=Xt(d);for(const s in e.links){const n=q.calculateTextDimensions(s,a).width+2*d.wrapPadding+2*d.boxMargin;t<n&&(t=n)}return t},"getRequiredPopupWidth");async function ze(e,t,a){let s=0;for(const n of e.keys()){const c=e.get(n);c.wrap&&(c.description=q.wrapLabel(c.description,d.width-2*d.wrapPadding,Xt(d)));const l=U(c.description)?await St(c.description,et()):q.calculateTextDimensions(c.description,Xt(d));c.width=c.wrap?d.width:S.getMax(d.width,l.width+2*d.wrapPadding),c.height=c.wrap?S.getMax(l.height,d.height):d.height,s=S.getMax(s,c.height)}for(const n in t){const c=e.get(n);if(!c)continue;const l=e.get(c.nextActor);if(!l){const p=t[n]+d.actorMargin-c.width/2;c.margin=S.getMax(p,d.actorMargin);continue}const r=t[n]+d.actorMargin-c.width/2-l.width/2;c.margin=S.getMax(r,d.actorMargin)}let i=0;return a.forEach(n=>{const c=xt(d);let l=n.actorKeys.reduce((p,f)=>p+=e.get(f).width+(e.get(f).margin||0),0);const h=d.boxMargin*8;l+=h,l-=2*d.boxTextMargin,n.wrap&&(n.name=q.wrapLabel(n.name,l-2*d.wrapPadding,c));const r=q.calculateTextDimensions(n.name,c);i=S.getMax(r.height,i);const E=S.getMax(l,r.width+2*d.wrapPadding);if(n.margin=d.boxTextMargin,l<E){const p=(E-l)/2;n.margin+=p}}),a.forEach(n=>n.textMaxHeight=i),S.getMax(s,d.height)}_(ze,"calculateActorMargins");var tr=_(async function(e,t,a){const s=t.get(e.from),i=t.get(e.to),n=s.x,c=i.x,l=e.wrap&&e.message;let h=U(e.message)?await St(e.message,et()):q.calculateTextDimensions(l?q.wrapLabel(e.message,d.width,Rt(d)):e.message,Rt(d));const r={width:l?d.width:S.getMax(d.width,h.width+2*d.noteMargin),height:0,startx:s.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===a.db.PLACEMENT.RIGHTOF?(r.width=l?S.getMax(d.width,h.width):S.getMax(s.width/2+i.width/2,h.width+2*d.noteMargin),r.startx=n+(s.width+d.actorMargin)/2):e.placement===a.db.PLACEMENT.LEFTOF?(r.width=l?S.getMax(d.width,h.width+2*d.noteMargin):S.getMax(s.width/2+i.width/2,h.width+2*d.noteMargin),r.startx=n-r.width+(s.width-d.actorMargin)/2):e.to===e.from?(h=q.calculateTextDimensions(l?q.wrapLabel(e.message,S.getMax(d.width,s.width),Rt(d)):e.message,Rt(d)),r.width=l?S.getMax(d.width,s.width):S.getMax(s.width,d.width,h.width+2*d.noteMargin),r.startx=n+(s.width-r.width)/2):(r.width=Math.abs(n+s.width/2-(c+i.width/2))+d.actorMargin,r.startx=n<c?n+s.width/2-d.actorMargin/2:c+i.width/2-d.actorMargin/2),l&&(r.message=q.wrapLabel(e.message,r.width-2*d.wrapPadding,Rt(d))),Q.debug(`NM:[${r.startx},${r.stopx},${r.starty},${r.stopy}:${r.width},${r.height}=${e.message}]`),r},"buildNoteModel"),er=4,De=_(function(e,t){const{CENTRAL_CONNECTION:a,CENTRAL_CONNECTION_REVERSE:s,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[a,s,i].includes(e.centralConnection)},"hasCentralConnection"),sr=_(function(e,t,a){const{CENTRAL_CONNECTION_REVERSE:s,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:n,BIDIRECTIONAL_DOTTED:c}=t.db.LINETYPE;let l=0;return(e.centralConnection===s||e.centralConnection===i)&&(l+=er),(e.centralConnection===s||e.centralConnection===i)&&(e.type===n||e.type===c)&&(l+=a?0:-6),l},"calculateCentralConnectionOffset"),Ue=_(function(e,t){const{SOLID_ARROW_TOP_REVERSE:a,SOLID_ARROW_TOP_REVERSE_DOTTED:s,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:n,STICK_ARROW_TOP_REVERSE:c,STICK_ARROW_TOP_REVERSE_DOTTED:l,STICK_ARROW_BOTTOM_REVERSE:h,STICK_ARROW_BOTTOM_REVERSE_DOTTED:r}=t.db.LINETYPE;return[a,s,i,n,c,l,h,r].includes(e.type)},"isReverseArrowType"),rr=_(function(e,t){const{BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:s}=t.db.LINETYPE;return[a,s].includes(e.type)},"isBidirectionalArrowType"),ar=_(function(e,t,a){if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.SOLID_TOP,a.db.LINETYPE.SOLID_BOTTOM,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.SOLID_TOP_DOTTED,a.db.LINETYPE.SOLID_BOTTOM_DOTTED,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};const[s,i]=Pe(e.from,t),[n,c]=Pe(e.to,t),l=s<=n;let h=l?i:s,r=l?n:c;h+=sr(e,a,l);const E=Math.abs(n-c)>2,p=_(R=>l?-R:R,"adjustValue");e.from===e.to?r=h:(e.activate&&!E&&(r+=p(d.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(r+=p(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(h-=p(3)));const f=[s,i,n,c],u=Math.abs(h-r);e.wrap&&e.message&&(e.message=q.wrapLabel(e.message,S.getMax(u+2*d.wrapPadding,d.width),xt(d)));const y=q.calculateTextDimensions(e.message,xt(d));return{width:S.getMax(e.wrap?0:y.width+2*d.wrapPadding,u+2*d.wrapPadding,d.width),height:0,startx:h,stopx:r,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,f),toBounds:Math.max.apply(null,f)}},"buildMessageModel"),ir=_(async function(e,t,a,s){const i={},n=[];let c,l,h;for(const r of e){switch(r.type){case s.db.LINETYPE.LOOP_START:case s.db.LINETYPE.ALT_START:case s.db.LINETYPE.OPT_START:case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:case s.db.LINETYPE.CRITICAL_START:case s.db.LINETYPE.BREAK_START:n.push({id:r.id,msg:r.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case s.db.LINETYPE.ALT_ELSE:case s.db.LINETYPE.PAR_AND:case s.db.LINETYPE.CRITICAL_OPTION:r.message&&(c=n.pop(),i[c.id]=c,i[r.id]=c,n.push(c));break;case s.db.LINETYPE.LOOP_END:case s.db.LINETYPE.ALT_END:case s.db.LINETYPE.OPT_END:case s.db.LINETYPE.PAR_END:case s.db.LINETYPE.CRITICAL_END:case s.db.LINETYPE.BREAK_END:c=n.pop(),i[c.id]=c;break;case s.db.LINETYPE.ACTIVE_START:{const p=t.get(r.from?r.from:r.to.actor),f=Vt(r.from?r.from:r.to.actor).length,u=p.x+p.width/2+(f-1)*d.activationWidth/2,y={startx:u,stopx:u+d.activationWidth,actor:r.from,enabled:!0};x.activations.push(y)}break;case s.db.LINETYPE.ACTIVE_END:{const p=x.activations.map(f=>f.actor).lastIndexOf(r.from);x.activations.splice(p,1).splice(0,1)}break}r.placement!==void 0?(l=await tr(r,t,s),r.noteModel=l,n.forEach(p=>{c=p,c.from=S.getMin(c.from,l.startx),c.to=S.getMax(c.to,l.startx+l.width),c.width=S.getMax(c.width,Math.abs(c.from-c.to))-d.labelBoxWidth})):(h=ar(r,t,s),r.msgModel=h,h.startx&&h.stopx&&n.length>0&&n.forEach(p=>{if(c=p,h.startx===h.stopx){const f=t.get(r.from),u=t.get(r.to);c.from=S.getMin(f.x-h.width/2,f.x-f.width/2,c.from),c.to=S.getMax(u.x+h.width/2,u.x+f.width/2,c.to),c.width=S.getMax(c.width,Math.abs(c.to-c.from))-d.labelBoxWidth}else c.from=S.getMin(h.startx,c.from),c.to=S.getMax(h.stopx,c.to),c.width=S.getMax(c.width,h.width)-d.labelBoxWidth}))}return x.activations=[],Q.debug("Loop type widths:",i),i},"calculateLoopBounds"),nr={bounds:x,drawActors:Jt,drawActorsPopup:Ke,setConf:Fe,draw:$s},Tr={parser:ps,get db(){return new gs},renderer:nr,styles:Is,init:_(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,$e({sequence:{wrap:e.wrap}}))},"init")};export{Tr as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as b,V as z,f as L,h as M,i as N,W as y,O,o as q,P as E,X as V,m as d,l as n,S as w,x,j as S,n as g,Y as j,t as s}from"./index-
|
|
1
|
+
import{q as b,V as z,f as L,h as M,i as N,W as y,O,o as q,P as E,X as V,m as d,l as n,S as w,x,j as S,n as g,Y as j,t as s}from"./index-DKwABhnu.js";var H=s("<span class=text-text-invert-weak>v"),I=s('<span class="flex items-center gap-2"><span>'),P=s('<div><div class="flex flex-col items-start min-w-0 w-full"><div class="flex flex-row items-center gap-2 min-w-0 w-full"><span>'),U=s("<span>v"),X=s('<div class="flex flex-row gap-3"><span>'),Y=s("<span class=text-text-weak>"),p=s("<span class=text-text-weaker>"),A=s("<span class=text-text-weak>••••••••"),B=s("<div>");function F(e){const h=L(),[$,R]=M(!1);let l,i;const C=N(()=>y(e.conn)),_=()=>{const a=l?l.scrollWidth>l.clientWidth:!1,c=i?i.scrollWidth>i.clientWidth:!1;R(a||c)};O(()=>{C(),e.conn.http.url,e.status?.version,queueMicrotask(_)}),q(()=>{if(_(),typeof ResizeObserver!="function")return;const a=new ResizeObserver(_);l&&a.observe(l),i&&a.observe(i),E(()=>a.disconnect())});const W=()=>(()=>{var a=I(),c=a.firstChild;return n(c,()=>y(e.conn,!0)),n(a,d(w,{get when(){return e.status?.version},get children(){var u=H();return u.firstChild,n(u,()=>e.status?.version,null),u}}),null),a})(),T=V(()=>e.badge);return d(j,{class:"flex-1 min-w-0",get value(){return W()},contentStyle:{"max-width":"none","white-space":"nowrap"},placement:"top-start",get inactive(){return g(()=>!$())()&&!e.conn.displayName},get children(){var a=P(),c=a.firstChild,u=c.firstChild,f=u.firstChild,k=l;return typeof k=="function"?S(k,f):l=f,n(f,C),n(u,d(w,{get when(){return T()},get fallback(){return d(w,{get when(){return e.status?.version},get children(){var t=U();t.firstChild;var r=i;return typeof r=="function"?S(r,t):i=t,n(t,()=>e.status?.version,null),b(()=>x(t,`${e.versionClass??"text-text-weak text-14-regular truncate"} min-w-0`)),t}})},children:t=>t()}),null),n(c,d(w,{get when(){return g(()=>!!(e.showCredentials&&e.conn.type==="http"))()&&e.conn},children:t=>(()=>{var r=X(),m=r.firstChild;return n(m,(()=>{var o=g(()=>!!t().http.username);return()=>o()?(()=>{var v=Y();return n(v,()=>t().http.username),v})():(()=>{var v=p();return n(v,()=>h.t("server.row.noUsername")),v})()})()),n(r,(()=>{var o=g(()=>!!t().http.password);return()=>o()&&A()})(),null),r})()}),null),n(a,()=>e.children,null),b(t=>{var r=e.class,m=!!e.dimmed,o=`${e.nameClass??"truncate"} min-w-0`;return r!==t.e&&x(a,t.e=r),m!==t.t&&a.classList.toggle("opacity-50",t.t=m),o!==t.a&&x(f,t.a=o),t},{e:void 0,t:void 0,a:void 0}),a}})}function G(e){return(()=>{var h=B();return b($=>z(h,{"size-1.5 rounded-full shrink-0":!0,"bg-icon-success-base":e.health?.healthy===!0,"bg-icon-critical-base":e.health?.healthy===!1,"bg-border-weak-base":e.health===void 0},$)),h})()}export{G as S,F as a};
|