@kabmo-labs/kabmo 0.56.0 → 0.57.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/dist/client/index.html +1 -1
- package/dist/client/index.js +3 -3
- package/dist/client/static/js/{Body-jfy4bhk2.js → Body-p6zwk0nx.js} +1 -1
- package/dist/client/static/js/{CsvGrid-4c5t668z.js → CsvGrid-563qmmmr.js} +1 -1
- package/dist/client/static/js/{DocxView-3x7whtvq.js → DocxView-5j69q3s0.js} +1 -1
- package/dist/client/static/js/{DrawioView-tbkc5dfz.js → DrawioView-gd6k3hvn.js} +1 -1
- package/dist/client/static/js/{HtmlPreview-egxkayya.js → HtmlPreview-6gnktzzp.js} +1 -1
- package/dist/client/static/js/{ImageView-swhzvw2p.js → ImageView-fkfq3fwv.js} +1 -1
- package/dist/client/static/js/{LayoutWrapper-sangsrt5.js → LayoutWrapper-mdb1qm26.js} +1 -1
- package/dist/client/static/js/MergeDiffView-7kpjxcg9.js +1 -0
- package/dist/client/static/js/{Modal-1fj8kvme.js → Modal-0p9cr2tn.js} +12 -12
- package/dist/client/static/js/{PdfView-0k2egsbz.js → PdfView-n1zq27td.js} +1 -1
- package/dist/client/static/js/{SessionsView-t547rqeb.js → SessionsView-gptt0rq8.js} +1 -1
- package/dist/client/static/js/{SheetView-anb3gavm.js → SheetView-nes7j86v.js} +1 -1
- package/dist/client/static/js/{SvgPreview-e2wrj2hj.js → SvgPreview-vv0qzkt7.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-0rs86b68.js → abnfDiagram-O67JEVCF-02g96sn6.js} +1 -1
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-0k3zzxz1.js → architectureDiagram-NJMV4G6O-7qj2fpwt.js} +1 -1
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-t1n1fx96.js → blockDiagram-BEXU5L5S-grdr1j2h.js} +3 -3
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-93b7eds9.js → c4Diagram-YGBWAQC7-7y980xpx.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-bnf85z0f.js → classDiagram-v2-NBCMYWYE-29ag4js1.js} +1 -1
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-e290161f.js → cose-bilkent-JH36ORCC-e5dvgehd.js} +1 -1
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-s13ra9ag.js → cynefinDiagram-VND7K2PF-eq6fmx0b.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-83wshh5e.js → dagre-6A5THRUB-xfhwp8ha.js} +1 -1
- package/dist/client/static/js/{diagram-22UHCM2B-ywh4wqna.js → diagram-22UHCM2B-1bw6x6zt.js} +1 -1
- package/dist/client/static/js/{diagram-3UASUU5V-cb53z698.js → diagram-3UASUU5V-076ej5n5.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-btf55c44.js → diagram-ATOU4E4O-cvf9fhdq.js} +1 -1
- package/dist/client/static/js/{diagram-CDSNMT55-p6tbbm1n.js → diagram-CDSNMT55-hn1wdx54.js} +3 -3
- package/dist/client/static/js/{diagram-MLGK6HIB-6kzssf4y.js → diagram-MLGK6HIB-76gk27b5.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-4v0yncvv.js → diagram-MPIPVDR6-0cbajhpx.js} +1 -1
- package/dist/client/static/js/{dockerfile-r422htmd.js → dockerfile-7atfjhnf.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-mw1gh30z.js → ebnfDiagram-ZINNZB2B-n0g3b9m2.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-1pe786ap.js → elk-276RUBZZ-f6wrjcv9.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-x7rk70q6.js → erDiagram-OPXOYQCR-jz622yrg.js} +1 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-5bvd5k2t.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-j3m5km4p.js → ganttDiagram-FUAMR5RP-2ex4nxyg.js} +2 -2
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-fd1kebdy.js → gitGraphDiagram-X574FWY7-38eyay6g.js} +1 -1
- package/dist/client/static/js/{index-zkef5q39.js → index-1q934wfk.js} +1 -1
- package/dist/client/static/js/{index-5fxm2tpg.js → index-28wv94gz.js} +1 -1
- package/dist/client/static/js/{index-4jg10xtp.js → index-3wgjtp2k.js} +1 -1
- package/dist/client/static/js/{index-29b1ysz6.js → index-4cff0zg2.js} +1 -1
- package/dist/client/static/js/{index-8e66p2a7.js → index-55v3qv04.js} +1 -1
- package/dist/client/static/js/{index-s4v3vcsn.js → index-63mk2qk6.js} +1 -1
- package/dist/client/static/js/{index-4dzvjfkd.js → index-6z30g3ha.js} +1 -1
- package/dist/client/static/js/{index-473wm10a.js → index-7trfm17d.js} +1 -1
- package/dist/client/static/js/{index-drsy400d.js → index-8444mec5.js} +1 -1
- package/dist/client/static/js/{index-j1prebvy.js → index-9gfn1a3h.js} +1 -1
- package/dist/client/static/js/{index-qdabc51h.js → index-ays8t3t3.js} +2 -2
- package/dist/client/static/js/{index-q4t5j3x7.js → index-cxe75e06.js} +1 -1
- package/dist/client/static/js/{index-22frp78d.js → index-db7vsjkd.js} +1 -1
- package/dist/client/static/js/{index-7tsdw8wt.js → index-dmb1pykr.js} +1 -1
- package/dist/client/static/js/{index-tcp5cp53.js → index-ep99arz1.js} +1 -1
- package/dist/client/static/js/{index-0mhxw0a1.js → index-ewst55j2.js} +1 -1
- package/dist/client/static/js/{index-hgsjynb0.js → index-fqc1snjw.js} +1 -1
- package/dist/client/static/js/{index-rm5b3kn8.js → index-g2e0m757.js} +3 -3
- package/dist/client/static/js/{index-3k45gspr.js → index-jaxhfk9x.js} +1 -1
- package/dist/client/static/js/{index-satnfvaz.js → index-jsn2kedv.js} +1 -1
- package/dist/client/static/js/{index-bxhszdcz.js → index-n1xmkf2g.js} +1 -1
- package/dist/client/static/js/{index-004x0a3p.js → index-pe4d9wht.js} +1 -1
- package/dist/client/static/js/{index-cbbwq25c.js → index-pjf5wak8.js} +1 -1
- package/dist/client/static/js/{index-8n4qwd64.js → index-sm8gpk3g.js} +2 -2
- package/dist/client/static/js/{index-qrwjxqdh.js → index-st6a8q5z.js} +176 -176
- package/dist/client/static/js/{index-dfha2z56.js → index-stmwbavz.js} +1 -1
- package/dist/client/static/js/index-swaveqxg.css +1 -0
- package/dist/client/static/js/{index-3hrvhyym.js → index-t82q5t6m.js} +1 -1
- package/dist/client/static/js/{index-s6nv35dv.js → index-t9zjfxvc.js} +1 -1
- package/dist/client/static/js/{index-jbaceghb.js → index-tdbcp70z.js} +1 -1
- package/dist/client/static/js/{index-kbk0vmex.js → index-tdryzzy9.js} +1 -1
- package/dist/client/static/js/{index-jtyzeynv.js → index-tksrpqkh.js} +1 -1
- package/dist/client/static/js/{index-g84dwmvr.js → index-v38j2zxn.js} +1 -1
- package/dist/client/static/js/{index-4nyajpeg.js → index-x17y7xdr.js} +1 -1
- package/dist/client/static/js/{index-4fpyzg5e.js → index-xfnjwhan.js} +20 -20
- package/dist/client/static/js/{index-72v57e07.js → index-xrb4kjr3.js} +1 -1
- package/dist/client/static/js/{index-4acka5fn.js → index-zv8wrvha.js} +1 -1
- package/dist/client/static/js/{index-q178zgxp.js → index-zynbvm7x.js} +1 -1
- package/dist/client/static/js/{index-bnamrpm6.js → index-zzggk17b.js} +1 -1
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-1m0br602.js → infoDiagram-VRGFBTTK-c55t0tvd.js} +2 -2
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-zryzhpq6.js → ishikawaDiagram-OU5B5YK6-r9kg5kg5.js} +2 -2
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-6apqr7h4.js → journeyDiagram-ZHPQQLJL-zmmst4v8.js} +2 -2
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-am385c1e.js → kanban-definition-PNTS6WVX-3tt6sc9a.js} +1 -1
- package/dist/client/static/js/{mermaid.core-k937exrm.js → mermaid.core-pkrs8zp5.js} +2 -2
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-hx8qq866.js → mindmap-definition-NLK3R4M7-b4c6gxg4.js} +1 -1
- package/dist/client/static/js/one-dark-pro-sstqnzcf.js +1 -0
- package/dist/client/static/js/one-light-6fpxxq2j.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-1hasj2h7.js → pegDiagram-GJSIUBJH-9jkat1mz.js} +1 -1
- package/dist/client/static/js/{pieDiagram-5QR66LMP-x5nwff8r.js → pieDiagram-5QR66LMP-6pbchjh7.js} +2 -2
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-gmrcr5jb.js → quadrantDiagram-O4NWA36T-p9brea19.js} +2 -2
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-rdznfhfb.js → railroadDiagram-XR7U4H2S-3cep8css.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-v9wb3ppf.js → requirementDiagram-PLB6GJNP-x1yjgsrr.js} +1 -1
- package/dist/client/static/js/{rust-9cgnbbcs.js → rust-yy8gekx8.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-3p4ddd2h.js → sankeyDiagram-IPEJSGJF-23wzf4aj.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-wfcqxjfq.js → sequenceDiagram-PO4LG4MO-w4wr3zzr.js} +4 -4
- package/dist/client/static/js/{sizeCapture-INFHLROL-g02k0k8x.js → sizeCapture-INFHLROL-aabfesnr.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-7k449yvg.js → stateDiagram-v2-GCMORJYK-t0n288xw.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-zkf2bgm8.js → swimlanes-2SLR337P-1nnm0p7h.js} +1 -1
- package/dist/client/static/js/{swimlanesDiagram-TC7HE7FX-yex8g4fx.js → swimlanesDiagram-TC7HE7FX-cx3f29mq.js} +1 -1
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-qsfpjr1c.js → timeline-definition-EJHVYXUP-8pyssn0q.js} +1 -1
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-b2vprhsr.js → usecaseDiagram-POWQR4AR-vveepvt6.js} +1 -1
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-x0ffeg2t.js → vennDiagram-UO4OBE2U-tqyvmqxc.js} +4 -4
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-hsnhaf4f.js → wardleyDiagram-VNRHLVJA-p8rs34em.js} +2 -2
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-90f9aadp.js → xychartDiagram-PMCCYNJV-pgnvxtps.js} +3 -3
- package/package.json +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormAsk.tsx +25 -62
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormDialog.test.tsx +40 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormDialog.tsx +41 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/QuestionList.tsx +117 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/SwipeDeck.tsx +220 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.ts +10 -8
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label.test.ts +37 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label.ts +17 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.test.tsx +18 -15
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +7 -8
- package/src/client/data/settings/omp-schema.json +59 -7
- package/src/client/hooks/chat/timeline/ask-frames-form.test.ts +29 -0
- package/src/server/lib/dictation/capability.server.test.ts +9 -6
- package/src/server/lib/dictation/worker-process.ts +9 -2
- package/src/shared/lib/chat/ask-form/data.ts +25 -6
- package/src/shared/lib/chat/ask-form/deck.ts +80 -0
- package/src/shared/lib/chat/ask-form/fields.ts +26 -1
- package/src/shared/lib/chat/ask-form/index.ts +18 -310
- package/src/shared/lib/chat/ask-form/types.ts +14 -2
- package/src/shared/lib/chat/ask-form/walker.ts +350 -0
- package/src/shared/lib/chat/ask-form.test.ts +41 -0
- package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +47 -0
- package/src/shared/lib/omp/config/schema-releases.test.ts +4 -2
- package/dist/client/static/js/MergeDiffView-bv00y63x.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-kfwaac44.js +0 -1
- package/dist/client/static/js/index-gedsa0z7.css +0 -1
- package/dist/client/static/js/one-dark-pro-phxqe9mx.js +0 -1
- package/dist/client/static/js/one-light-vhwh499y.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$i}from"./index-s4v3vcsn.js";import{t,l,ot,C,te,Rg,Dt,uc,dc,w,ne,M,O,G,z,j,q,H,m,va,b,Ar,hr,ll,Mg,jn,V}from"./index-4fpyzg5e.js";import{ii,ld,Gp,jp,gr,Hp}from"./index-q178zgxp.js";import{xn}from"./index-8pqx5n2p.js";var _e=xn(ll(),1),Ee=function(){var r=t(function(Lt,v,F,W){for(F=F||{},W=Lt.length;W--;F[Lt[W]]=v);return F},"o"),e=[1,2],s=[1,3],a=[1,4],n=[2,4],h=[1,9],i=[1,11],o=[1,12],u=[1,14],p=[1,15],f=[1,17],_=[1,18],g=[1,19],A=[1,25],x=[1,26],L=[1,27],T=[1,28],S=[1,29],I=[1,30],N=[1,31],D=[1,32],k=[1,33],B=[1,34],Y=[1,35],X=[1,36],J=[1,37],tt=[1,38],it=[1,39],ct=[1,40],Tt=[1,42],pt=[1,43],nt=[1,44],ft=[1,45],Et=[1,46],Z=[1,47],U=[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],Vt=[1,74],qt=[1,80],P=[1,81],K=[1,82],bt=[1,83],ut=[1,84],et=[1,85],Ct=[1,86],xe=[1,87],be=[1,88],Ie=[1,89],ye=[1,90],Re=[1,91],Oe=[1,92],Le=[1,93],me=[1,94],Se=[1,95],Ae=[1,96],ke=[1,97],Ne=[1,98],we=[1,99],Pe=[1,100],De=[1,101],ve=[1,102],Ce=[1,103],Me=[1,104],Be=[1,105],Ye=[2,78],Wt=[4,5,17,51,53,54],zt=[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],Ve=[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],se=[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],We=[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],ie=[5,52],rt=[70,71,72,73],_t=[1,151],oe={trace:t(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:t(function(v,F,W,y,at,c,Kt){var E=c.length-1;switch(at){case 3:return y.apply(c[E]),c[E];break;case 4:case 10:this.$=[];break;case 5:case 11:c[E-1].push(c[E]),this.$=c[E-1];break;case 6:case 7:case 12:case 13:this.$=c[E];break;case 8:case 9:case 14:this.$=[];break;case 16:c[E].type="createParticipant",this.$=c[E];break;case 17:c[E-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[E-2])}),c[E-1].push({type:"boxEnd",boxText:c[E-2]}),this.$=c[E-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[E-2]),sequenceIndexStep:Number(c[E-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[E-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[E-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[E-1].actor};break;case 30:y.setDiagramTitle(c[E].substring(6)),this.$=c[E].substring(6);break;case 31:y.setDiagramTitle(c[E].substring(7)),this.$=c[E].substring(7);break;case 32:this.$=c[E].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[E].trim(),y.setAccDescription(this.$);break;case 35:c[E-1].unshift({type:"loopStart",loopText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.LOOP_START}),c[E-1].push({type:"loopEnd",loopText:c[E-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[E-1];break;case 36:c[E-1].unshift({type:"rectStart",color:y.parseMessage(c[E-2]),signalType:y.LINETYPE.RECT_START}),c[E-1].push({type:"rectEnd",color:y.parseMessage(c[E-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[E-1];break;case 37:c[E-1].unshift({type:"optStart",optText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.OPT_START}),c[E-1].push({type:"optEnd",optText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[E-1];break;case 38:c[E-1].unshift({type:"altStart",altText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.ALT_START}),c[E-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[E-1];break;case 39:c[E-1].unshift({type:"parStart",parText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.PAR_START}),c[E-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[E-1];break;case 40:c[E-1].unshift({type:"parStart",parText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[E-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[E-1];break;case 41:c[E-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.CRITICAL_START}),c[E-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[E-1];break;case 42:c[E-1].unshift({type:"breakStart",breakText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.BREAK_START}),c[E-1].push({type:"breakEnd",optText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[E-1];break;case 44:this.$=c[E-3].concat([{type:"option",optionText:y.parseMessage(c[E-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[E]]);break;case 46:this.$=c[E-3].concat([{type:"and",parText:y.parseMessage(c[E-1]),signalType:y.LINETYPE.PAR_AND},c[E]]);break;case 48:this.$=c[E-3].concat([{type:"else",altText:y.parseMessage(c[E-1]),signalType:y.LINETYPE.ALT_ELSE},c[E]]);break;case 49:c[E-3].draw="participant",c[E-3].type="addParticipant",c[E-3].description=y.parseMessage(c[E-1]),this.$=c[E-3];break;case 50:c[E-1].draw="participant",c[E-1].type="addParticipant",this.$=c[E-1];break;case 51:c[E-3].draw="actor",c[E-3].type="addParticipant",c[E-3].description=y.parseMessage(c[E-1]),this.$=c[E-3];break;case 52:case 57:c[E-1].draw="actor",c[E-1].type="addParticipant",this.$=c[E-1];break;case 53:c[E-1].type="destroyParticipant",this.$=c[E-1];break;case 54:c[E-3].draw="participant",c[E-3].type="addParticipant",c[E-3].description=y.parseMessage(c[E-1]),this.$=c[E-3];break;case 55:c[E-1].draw="participant",c[E-1].type="addParticipant",this.$=c[E-1];break;case 56:c[E-3].draw="actor",c[E-3].type="addParticipant",c[E-3].description=y.parseMessage(c[E-1]),this.$=c[E-3];break;case 58:this.$=[c[E-1],{type:"addNote",placement:c[E-2],actor:c[E-1].actor,text:c[E]}];break;case 59:c[E-2]=[].concat(c[E-1],c[E-1]).slice(0,2),c[E-2][0]=c[E-2][0].actor,c[E-2][1]=c[E-2][1].actor,this.$=[c[E-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[E-2].slice(0,2),text:c[E]}];break;case 60:this.$=[c[E-1],{type:"addLinks",actor:c[E-1].actor,text:c[E]}];break;case 61:this.$=[c[E-1],{type:"addALink",actor:c[E-1].actor,text:c[E]}];break;case 62:this.$=[c[E-1],{type:"addProperties",actor:c[E-1].actor,text:c[E]}];break;case 63:this.$=[c[E-1],{type:"addDetails",actor:c[E-1].actor,text:c[E]}];break;case 66:this.$=[c[E-2],c[E]];break;case 67:this.$=c[E];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[E-4],c[E-1],{type:"addMessage",from:c[E-4].actor,to:c[E-1].actor,signalType:c[E-3],msg:c[E],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[E-1].actor}];break;case 71:this.$=[c[E-4],c[E-1],{type:"addMessage",from:c[E-4].actor,to:c[E-1].actor,signalType:c[E-3],msg:c[E]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[E-4].actor}];break;case 72:this.$=[c[E-4],c[E-1],{type:"addMessage",from:c[E-4].actor,to:c[E-1].actor,signalType:c[E-3],msg:c[E],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[E-1].actor}];break;case 73:this.$=[c[E-4],c[E-1],{type:"addMessage",from:c[E-4].actor,to:c[E-1].actor,signalType:c[E-2],msg:c[E],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[E-4].actor}];break;case 74:this.$=[c[E-5],c[E-1],{type:"addMessage",from:c[E-5].actor,to:c[E-1].actor,signalType:c[E-3],msg:c[E],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[E-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[E-5].actor}];break;case 75:this.$=[c[E-3],c[E-1],{type:"addMessage",from:c[E-3].actor,to:c[E-1].actor,signalType:c[E-2],msg:c[E]}];break;case 76:this.$={type:"addParticipant",actor:c[E-1],config:c[E]};break;case 77:this.$=c[E-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[E]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[E].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},r([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],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},r(U,[2,5]),{9:48,13:13,14:u,15:p,18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},r(U,[2,7]),r(U,[2,8]),r(U,[2,9]),r(U,[2,15]),{13:49,51:tt,53:it,54:ct},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Z},{23:56,73:Z},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},r(U,[2,30]),r(U,[2,31]),{33:[1,62]},{35:[1,63]},r(U,[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:Vt},{23:75,55:76,73:Vt},{23:77,73:Z},{69:78,72:[1,79],78:qt,79:P,80:K,81:bt,82:ut,83:et,84:Ct,85:xe,86:be,87:Ie,88:ye,89:Re,90:Oe,91:Le,92:me,93:Se,94:Ae,95:ke,96:Ne,97:we,98:Pe,99:De,100:ve,101:Ce,102:Me,103:Be},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Z},{23:111,73:Z},{23:112,73:Z},{23:113,73:Z},r([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),r(U,[2,6]),r(U,[2,16]),r(Wt,[2,10],{11:114}),r(U,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},r(U,[2,22]),{5:[1,118]},{5:[1,119]},r(U,[2,25]),r(U,[2,26]),r(U,[2,27]),r(U,[2,28]),r(U,[2,29]),r(U,[2,32]),r(U,[2,33]),r(zt,n,{7:120}),r(zt,n,{7:121}),r(zt,n,{7:122}),r(Ve,n,{41:123,7:124}),r(se,n,{43:125,7:126}),r(se,n,{7:126,43:127}),r(We,n,{46:128,7:129}),r(zt,n,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},r(ie,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:Z},{69:146,78:qt,79:P,80:K,81:bt,82:ut,83:et,84:Ct,85:xe,86:be,87:Ie,88:ye,89:Re,90:Oe,91:Le,92:me,93:Se,94:Ae,95:ke,96:Ne,97:we,98:Pe,99:De,100:ve,101:Ce,102:Me,103:Be},r(rt,[2,79]),r(rt,[2,80]),r(rt,[2,81]),r(rt,[2,82]),r(rt,[2,83]),r(rt,[2,84]),r(rt,[2,85]),r(rt,[2,86]),r(rt,[2,87]),r(rt,[2,88]),r(rt,[2,89]),r(rt,[2,90]),r(rt,[2,91]),r(rt,[2,92]),r(rt,[2,93]),r(rt,[2,94]),r(rt,[2,95]),r(rt,[2,96]),r(rt,[2,97]),r(rt,[2,98]),r(rt,[2,99]),r(rt,[2,100]),r(rt,[2,101]),r(rt,[2,102]),r(rt,[2,103]),r(rt,[2,104]),{23:147,73:Z},{23:149,60:148,73:Z},{73:[2,68]},{73:[2,69]},{58:150,104:_t},{58:152,104:_t},{58:153,104:_t},{58:154,104:_t},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:tt,53:it,54:ct},{5:[1,160]},r(U,[2,20]),r(U,[2,21]),r(U,[2,23]),r(U,[2,24]),{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[1,161],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[1,162],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[1,163],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{17:[1,164]},{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[2,47],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,50:[1,165],51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{17:[1,166]},{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[2,45],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,49:[1,167],51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{17:[1,168]},{17:[1,169]},{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[2,43],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,48:[1,170],51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[1,171],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{16:[1,172]},r(U,[2,50]),{16:[1,173]},r(U,[2,55]),r(ie,[2,76]),{76:[1,174]},{16:[1,175]},r(U,[2,52]),{16:[1,176]},r(U,[2,57]),r(U,[2,53]),{23:177,73:Z},{23:178,73:Z},{23:179,73:Z},{58:180,104:_t},{23:181,72:[1,182],73:Z},{58:183,104:_t},{58:184,104:_t},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},r(U,[2,17]),r(Wt,[2,11]),{13:186,51:tt,53:it,54:ct},r(Wt,[2,13]),r(Wt,[2,14]),r(U,[2,19]),r(U,[2,35]),r(U,[2,36]),r(U,[2,37]),r(U,[2,38]),{16:[1,187]},r(U,[2,39]),{16:[1,188]},r(U,[2,40]),r(U,[2,41]),{16:[1,189]},r(U,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:_t},{58:196,104:_t},{58:197,104:_t},{5:[2,75]},{58:198,104:_t},{23:199,73:Z},{5:[2,58]},{5:[2,59]},{23:200,73:Z},r(Wt,[2,12]),r(Ve,n,{7:124,41:201}),r(se,n,{7:126,43:202}),r(We,n,{7:129,46:203}),r(U,[2,49]),r(U,[2,54]),r(ie,[2,77]),r(U,[2,51]),r(U,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:_t},{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:t(function(v,F){if(F.recoverable)this.trace(v);else{var W=Error(v);throw W.hash=F,W}},"parseError"),parse:t(function(v){var F=this,W=[0],y=[],at=[null],c=[],Kt=this.table,E="",Gt=0,Ke=0,He=0,lr=2,Fe=1,dr=c.slice.call(arguments,1),ht=Object.create(this.lexer),kt={yy:{}};for(var ce in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ce))kt.yy[ce]=this.yy[ce];if(ht.setInput(v,kt.yy),kt.yy.lexer=ht,kt.yy.parser=this,typeof ht.yylloc>"u")ht.yylloc={};var le=ht.yylloc;c.push(le);var Tr=ht.options&&ht.options.ranges;if(typeof kt.yy.parseError==="function")this.parseError=kt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function pr(xt){W.length=W.length-2*xt,at.length=at.length-xt,c.length=c.length-xt}t(pr,"popStack");function qe(){var xt=y.pop()||ht.lex()||Fe;if(typeof xt!=="number"){if(xt instanceof Array)y=xt,xt=y.pop();xt=F.symbols_[xt]||xt}return xt}t(qe,"lex");var dt,he,Nt,gt,Ea,de,Mt={},Xt,yt,ze,Qt;while(!0){if(Nt=W[W.length-1],this.defaultActions[Nt])gt=this.defaultActions[Nt];else{if(dt===null||typeof dt>"u")dt=qe();gt=Kt[Nt]&&Kt[Nt][dt]}if(typeof gt>"u"||!gt.length||!gt[0]){var Te="";Qt=[];for(Xt in Kt[Nt])if(this.terminals_[Xt]&&Xt>lr)Qt.push("'"+this.terminals_[Xt]+"'");if(ht.showPosition)Te="Parse error on line "+(Gt+1)+`:
|
|
1
|
+
import{$i}from"./index-63mk2qk6.js";import{t,l,ot,C,te,Rg,Dt,uc,dc,w,re,M,O,G,z,j,q,H,m,va,b,Ar,hr,ll,Mg,jn,V}from"./index-xfnjwhan.js";import{ii,ld,Gp,jp,gr,Hp}from"./index-zynbvm7x.js";import{xn}from"./index-8pqx5n2p.js";var _e=xn(ll(),1),Ee=function(){var r=t(function(Lt,v,F,W){for(F=F||{},W=Lt.length;W--;F[Lt[W]]=v);return F},"o"),e=[1,2],s=[1,3],a=[1,4],n=[2,4],h=[1,9],i=[1,11],o=[1,12],u=[1,14],p=[1,15],f=[1,17],_=[1,18],g=[1,19],A=[1,25],x=[1,26],L=[1,27],T=[1,28],S=[1,29],I=[1,30],N=[1,31],D=[1,32],k=[1,33],B=[1,34],Y=[1,35],X=[1,36],J=[1,37],tt=[1,38],it=[1,39],ct=[1,40],Tt=[1,42],pt=[1,43],nt=[1,44],ft=[1,45],Et=[1,46],Z=[1,47],U=[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],Vt=[1,74],qt=[1,80],P=[1,81],K=[1,82],bt=[1,83],ut=[1,84],et=[1,85],Ct=[1,86],xe=[1,87],be=[1,88],Ie=[1,89],ye=[1,90],Re=[1,91],Oe=[1,92],Le=[1,93],me=[1,94],Se=[1,95],Ae=[1,96],ke=[1,97],Ne=[1,98],we=[1,99],Pe=[1,100],De=[1,101],ve=[1,102],Ce=[1,103],Me=[1,104],Be=[1,105],Ye=[2,78],Wt=[4,5,17,51,53,54],zt=[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],Ve=[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],ie=[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],We=[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],ne=[5,52],rt=[70,71,72,73],_t=[1,151],oe={trace:t(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:t(function(v,F,W,y,at,c,Kt){var E=c.length-1;switch(at){case 3:return y.apply(c[E]),c[E];break;case 4:case 10:this.$=[];break;case 5:case 11:c[E-1].push(c[E]),this.$=c[E-1];break;case 6:case 7:case 12:case 13:this.$=c[E];break;case 8:case 9:case 14:this.$=[];break;case 16:c[E].type="createParticipant",this.$=c[E];break;case 17:c[E-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[E-2])}),c[E-1].push({type:"boxEnd",boxText:c[E-2]}),this.$=c[E-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[E-2]),sequenceIndexStep:Number(c[E-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[E-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[E-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[E-1].actor};break;case 30:y.setDiagramTitle(c[E].substring(6)),this.$=c[E].substring(6);break;case 31:y.setDiagramTitle(c[E].substring(7)),this.$=c[E].substring(7);break;case 32:this.$=c[E].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[E].trim(),y.setAccDescription(this.$);break;case 35:c[E-1].unshift({type:"loopStart",loopText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.LOOP_START}),c[E-1].push({type:"loopEnd",loopText:c[E-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[E-1];break;case 36:c[E-1].unshift({type:"rectStart",color:y.parseMessage(c[E-2]),signalType:y.LINETYPE.RECT_START}),c[E-1].push({type:"rectEnd",color:y.parseMessage(c[E-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[E-1];break;case 37:c[E-1].unshift({type:"optStart",optText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.OPT_START}),c[E-1].push({type:"optEnd",optText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[E-1];break;case 38:c[E-1].unshift({type:"altStart",altText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.ALT_START}),c[E-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[E-1];break;case 39:c[E-1].unshift({type:"parStart",parText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.PAR_START}),c[E-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[E-1];break;case 40:c[E-1].unshift({type:"parStart",parText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[E-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[E-1];break;case 41:c[E-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.CRITICAL_START}),c[E-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[E-1];break;case 42:c[E-1].unshift({type:"breakStart",breakText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.BREAK_START}),c[E-1].push({type:"breakEnd",optText:y.parseMessage(c[E-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[E-1];break;case 44:this.$=c[E-3].concat([{type:"option",optionText:y.parseMessage(c[E-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[E]]);break;case 46:this.$=c[E-3].concat([{type:"and",parText:y.parseMessage(c[E-1]),signalType:y.LINETYPE.PAR_AND},c[E]]);break;case 48:this.$=c[E-3].concat([{type:"else",altText:y.parseMessage(c[E-1]),signalType:y.LINETYPE.ALT_ELSE},c[E]]);break;case 49:c[E-3].draw="participant",c[E-3].type="addParticipant",c[E-3].description=y.parseMessage(c[E-1]),this.$=c[E-3];break;case 50:c[E-1].draw="participant",c[E-1].type="addParticipant",this.$=c[E-1];break;case 51:c[E-3].draw="actor",c[E-3].type="addParticipant",c[E-3].description=y.parseMessage(c[E-1]),this.$=c[E-3];break;case 52:case 57:c[E-1].draw="actor",c[E-1].type="addParticipant",this.$=c[E-1];break;case 53:c[E-1].type="destroyParticipant",this.$=c[E-1];break;case 54:c[E-3].draw="participant",c[E-3].type="addParticipant",c[E-3].description=y.parseMessage(c[E-1]),this.$=c[E-3];break;case 55:c[E-1].draw="participant",c[E-1].type="addParticipant",this.$=c[E-1];break;case 56:c[E-3].draw="actor",c[E-3].type="addParticipant",c[E-3].description=y.parseMessage(c[E-1]),this.$=c[E-3];break;case 58:this.$=[c[E-1],{type:"addNote",placement:c[E-2],actor:c[E-1].actor,text:c[E]}];break;case 59:c[E-2]=[].concat(c[E-1],c[E-1]).slice(0,2),c[E-2][0]=c[E-2][0].actor,c[E-2][1]=c[E-2][1].actor,this.$=[c[E-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[E-2].slice(0,2),text:c[E]}];break;case 60:this.$=[c[E-1],{type:"addLinks",actor:c[E-1].actor,text:c[E]}];break;case 61:this.$=[c[E-1],{type:"addALink",actor:c[E-1].actor,text:c[E]}];break;case 62:this.$=[c[E-1],{type:"addProperties",actor:c[E-1].actor,text:c[E]}];break;case 63:this.$=[c[E-1],{type:"addDetails",actor:c[E-1].actor,text:c[E]}];break;case 66:this.$=[c[E-2],c[E]];break;case 67:this.$=c[E];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[E-4],c[E-1],{type:"addMessage",from:c[E-4].actor,to:c[E-1].actor,signalType:c[E-3],msg:c[E],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[E-1].actor}];break;case 71:this.$=[c[E-4],c[E-1],{type:"addMessage",from:c[E-4].actor,to:c[E-1].actor,signalType:c[E-3],msg:c[E]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[E-4].actor}];break;case 72:this.$=[c[E-4],c[E-1],{type:"addMessage",from:c[E-4].actor,to:c[E-1].actor,signalType:c[E-3],msg:c[E],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[E-1].actor}];break;case 73:this.$=[c[E-4],c[E-1],{type:"addMessage",from:c[E-4].actor,to:c[E-1].actor,signalType:c[E-2],msg:c[E],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[E-4].actor}];break;case 74:this.$=[c[E-5],c[E-1],{type:"addMessage",from:c[E-5].actor,to:c[E-1].actor,signalType:c[E-3],msg:c[E],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[E-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[E-5].actor}];break;case 75:this.$=[c[E-3],c[E-1],{type:"addMessage",from:c[E-3].actor,to:c[E-1].actor,signalType:c[E-2],msg:c[E]}];break;case 76:this.$={type:"addParticipant",actor:c[E-1],config:c[E]};break;case 77:this.$=c[E-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[E]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[E].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},r([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],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},r(U,[2,5]),{9:48,13:13,14:u,15:p,18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},r(U,[2,7]),r(U,[2,8]),r(U,[2,9]),r(U,[2,15]),{13:49,51:tt,53:it,54:ct},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Z},{23:56,73:Z},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},r(U,[2,30]),r(U,[2,31]),{33:[1,62]},{35:[1,63]},r(U,[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:Vt},{23:75,55:76,73:Vt},{23:77,73:Z},{69:78,72:[1,79],78:qt,79:P,80:K,81:bt,82:ut,83:et,84:Ct,85:xe,86:be,87:Ie,88:ye,89:Re,90:Oe,91:Le,92:me,93:Se,94:Ae,95:ke,96:Ne,97:we,98:Pe,99:De,100:ve,101:Ce,102:Me,103:Be},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Z},{23:111,73:Z},{23:112,73:Z},{23:113,73:Z},r([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),r(U,[2,6]),r(U,[2,16]),r(Wt,[2,10],{11:114}),r(U,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},r(U,[2,22]),{5:[1,118]},{5:[1,119]},r(U,[2,25]),r(U,[2,26]),r(U,[2,27]),r(U,[2,28]),r(U,[2,29]),r(U,[2,32]),r(U,[2,33]),r(zt,n,{7:120}),r(zt,n,{7:121}),r(zt,n,{7:122}),r(Ve,n,{41:123,7:124}),r(ie,n,{43:125,7:126}),r(ie,n,{7:126,43:127}),r(We,n,{46:128,7:129}),r(zt,n,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},r(ne,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:Z},{69:146,78:qt,79:P,80:K,81:bt,82:ut,83:et,84:Ct,85:xe,86:be,87:Ie,88:ye,89:Re,90:Oe,91:Le,92:me,93:Se,94:Ae,95:ke,96:Ne,97:we,98:Pe,99:De,100:ve,101:Ce,102:Me,103:Be},r(rt,[2,79]),r(rt,[2,80]),r(rt,[2,81]),r(rt,[2,82]),r(rt,[2,83]),r(rt,[2,84]),r(rt,[2,85]),r(rt,[2,86]),r(rt,[2,87]),r(rt,[2,88]),r(rt,[2,89]),r(rt,[2,90]),r(rt,[2,91]),r(rt,[2,92]),r(rt,[2,93]),r(rt,[2,94]),r(rt,[2,95]),r(rt,[2,96]),r(rt,[2,97]),r(rt,[2,98]),r(rt,[2,99]),r(rt,[2,100]),r(rt,[2,101]),r(rt,[2,102]),r(rt,[2,103]),r(rt,[2,104]),{23:147,73:Z},{23:149,60:148,73:Z},{73:[2,68]},{73:[2,69]},{58:150,104:_t},{58:152,104:_t},{58:153,104:_t},{58:154,104:_t},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:tt,53:it,54:ct},{5:[1,160]},r(U,[2,20]),r(U,[2,21]),r(U,[2,23]),r(U,[2,24]),{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[1,161],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[1,162],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[1,163],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{17:[1,164]},{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[2,47],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,50:[1,165],51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{17:[1,166]},{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[2,45],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,49:[1,167],51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{17:[1,168]},{17:[1,169]},{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[2,43],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,48:[1,170],51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{4:h,5:i,8:8,9:10,10:o,13:13,14:u,15:p,17:[1,171],18:16,19:f,22:_,23:41,24:g,25:20,26:21,27:22,28:23,29:24,30:A,31:x,32:L,34:T,36:S,37:I,38:N,39:D,40:k,42:B,44:Y,45:X,47:J,51:tt,53:it,54:ct,56:Tt,61:pt,62:nt,63:ft,64:Et,73:Z},{16:[1,172]},r(U,[2,50]),{16:[1,173]},r(U,[2,55]),r(ne,[2,76]),{76:[1,174]},{16:[1,175]},r(U,[2,52]),{16:[1,176]},r(U,[2,57]),r(U,[2,53]),{23:177,73:Z},{23:178,73:Z},{23:179,73:Z},{58:180,104:_t},{23:181,72:[1,182],73:Z},{58:183,104:_t},{58:184,104:_t},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},r(U,[2,17]),r(Wt,[2,11]),{13:186,51:tt,53:it,54:ct},r(Wt,[2,13]),r(Wt,[2,14]),r(U,[2,19]),r(U,[2,35]),r(U,[2,36]),r(U,[2,37]),r(U,[2,38]),{16:[1,187]},r(U,[2,39]),{16:[1,188]},r(U,[2,40]),r(U,[2,41]),{16:[1,189]},r(U,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:_t},{58:196,104:_t},{58:197,104:_t},{5:[2,75]},{58:198,104:_t},{23:199,73:Z},{5:[2,58]},{5:[2,59]},{23:200,73:Z},r(Wt,[2,12]),r(Ve,n,{7:124,41:201}),r(ie,n,{7:126,43:202}),r(We,n,{7:129,46:203}),r(U,[2,49]),r(U,[2,54]),r(ne,[2,77]),r(U,[2,51]),r(U,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:_t},{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:t(function(v,F){if(F.recoverable)this.trace(v);else{var W=Error(v);throw W.hash=F,W}},"parseError"),parse:t(function(v){var F=this,W=[0],y=[],at=[null],c=[],Kt=this.table,E="",Gt=0,Ke=0,He=0,lr=2,Fe=1,dr=c.slice.call(arguments,1),ht=Object.create(this.lexer),kt={yy:{}};for(var ce in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ce))kt.yy[ce]=this.yy[ce];if(ht.setInput(v,kt.yy),kt.yy.lexer=ht,kt.yy.parser=this,typeof ht.yylloc>"u")ht.yylloc={};var le=ht.yylloc;c.push(le);var Tr=ht.options&&ht.options.ranges;if(typeof kt.yy.parseError==="function")this.parseError=kt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function pr(xt){W.length=W.length-2*xt,at.length=at.length-xt,c.length=c.length-xt}t(pr,"popStack");function qe(){var xt=y.pop()||ht.lex()||Fe;if(typeof xt!=="number"){if(xt instanceof Array)y=xt,xt=y.pop();xt=F.symbols_[xt]||xt}return xt}t(qe,"lex");var dt,he,Nt,gt,Ea,de,Mt={},Xt,yt,ze,Qt;while(!0){if(Nt=W[W.length-1],this.defaultActions[Nt])gt=this.defaultActions[Nt];else{if(dt===null||typeof dt>"u")dt=qe();gt=Kt[Nt]&&Kt[Nt][dt]}if(typeof gt>"u"||!gt.length||!gt[0]){var Te="";Qt=[];for(Xt in Kt[Nt])if(this.terminals_[Xt]&&Xt>lr)Qt.push("'"+this.terminals_[Xt]+"'");if(ht.showPosition)Te="Parse error on line "+(Gt+1)+`:
|
|
2
2
|
`+ht.showPosition()+`
|
|
3
3
|
Expecting `+Qt.join(", ")+", got '"+(this.terminals_[dt]||dt)+"'";else Te="Parse error on line "+(Gt+1)+": Unexpected "+(dt==Fe?"end of input":"'"+(this.terminals_[dt]||dt)+"'");this.parseError(Te,{text:ht.match,token:this.terminals_[dt]||dt,line:ht.yylineno,loc:le,expected:Qt})}if(gt[0]instanceof Array&>.length>1)throw Error("Parse Error: multiple actions possible at state: "+Nt+", token: "+dt);switch(gt[0]){case 1:if(W.push(dt),at.push(ht.yytext),c.push(ht.yylloc),W.push(gt[1]),dt=null,!he){if(Ke=ht.yyleng,E=ht.yytext,Gt=ht.yylineno,le=ht.yylloc,He>0)He--}else dt=he,he=null;break;case 2:if(yt=this.productions_[gt[1]][1],Mt.$=at[at.length-yt],Mt._$={first_line:c[c.length-(yt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(yt||1)].first_column,last_column:c[c.length-1].last_column},Tr)Mt._$.range=[c[c.length-(yt||1)].range[0],c[c.length-1].range[1]];if(de=this.performAction.apply(Mt,[E,Ke,Gt,kt.yy,gt[1],at,c].concat(dr)),typeof de<"u")return de;if(yt)W=W.slice(0,-1*yt*2),at=at.slice(0,-1*yt),c=c.slice(0,-1*yt);W.push(this.productions_[gt[1]][0]),at.push(Mt.$),c.push(Mt._$),ze=Kt[W[W.length-2]][W[W.length-1]],W.push(ze);break;case 3:return!0}}return!0},"parse")},cr=function(){var Lt={EOF:1,parseError:t(function(F,W){if(this.yy.parser)this.yy.parser.parseError(F,W);else throw Error(F)},"parseError"),setInput:t(function(v,F){if(this.yy=F||this.yy||{},this._input=v,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var F=v.match(/(?:\r\n?|\n).*/g);if(F)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),v},"input"),unput:t(function(v){var F=v.length,W=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-F),this.offset-=F;var y=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),W.length-1)this.yylineno-=W.length-1;var at=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:W?(W.length===y.length?this.yylloc.first_column:0)+y[y.length-W.length].length-W[0].length:this.yylloc.first_column-F},this.options.ranges)this.yylloc.range=[at[0],at[0]+this.yyleng-F];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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:t(function(v){this.unput(this.match.slice(v))},"less"),pastInput:t(function(){var v=this.matched.substr(0,this.matched.length-this.match.length);return(v.length>20?"...":"")+v.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var v=this.match;if(v.length<20)v+=this._input.substr(0,20-v.length);return(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var v=this.pastInput(),F=Array(v.length+1).join("-");return v+this.upcomingInput()+`
|
|
@@ -153,17 +153,17 @@ Expecting `+Qt.join(", ")+", got '"+(this.terminals_[dt]||dt)+"'";else Te="Parse
|
|
|
153
153
|
filter: ${e};
|
|
154
154
|
stroke: ${r.nodeBorder};
|
|
155
155
|
}
|
|
156
|
-
`},"getStyles"),Ir=br,jt=44,ge=6,Zt=6,yr=t((r,e)=>r.actorTextHeight??V.calculateTextDimensions(r.description??"",{fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}).height,"actorLabelHeight"),Qe=t((r)=>jt+ge+r+Zt,"actorStackHeight"),Rr=t((r,e,s)=>{let a=r+e,n=a-Zt-s/2;return{lifelineStartY:a,glyphBottomY:a-Zt-s-ge,labelCenterY:n}},"headerBands"),Or=t((r,e)=>{let s=r+Zt,a=s+jt;return{glyphTopY:s,glyphBottomY:a,labelCenterY:a+ge+e/2,stackHeight:Qe(e)}},"footerBands"),wt=36,Lr=-5,Je=60,Ue=Je-Lr,Ft=t((r,e,s,a)=>{if(e.look!=="neo")return null;let n=yr(r,e);return s?Or(a,n):Rr(a,r.height,n)},"neoBands"),mt="actor-top",St="actor-bottom",ee="actor-box",Pt="actor-man",Rt=new Set(["redux-color","redux-dark-color"]),lt=t((r,e)=>r?.length?r[e%r.length]:void 0,"paletteColor"),Ht=t(function(r,e){let s=ii(r,e);if(C().look==="neo")s.attr("data-look","neo");return s},"drawRect"),mr=t(function(r,e,s,a,n){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};let{links:h,actorCnt:i,rectData:o}=e;var u="none";if(n)u="block !important";let p=r.append("g");p.attr("id","actor"+i+"_popup"),p.attr("class","actorPopupMenu"),p.attr("display",u);var f="";if(o.class!==void 0)f=" "+o.class;let _=o.width>s?o.width:s,g=p.append("rect");if(g.attr("class","actorPopupMenuPanel"+f),g.attr("x",o.x),g.attr("y",o.height),g.attr("fill",o.fill),g.attr("stroke",o.stroke),g.attr("width",_),g.attr("height",o.height),g.attr("rx",o.rx),g.attr("ry",o.ry),h!=null){var A=20;for(let T in h){var x=p.append("a"),L=_e.sanitizeUrl(h[T]);x.attr("xlink:href",L),x.attr("target","_blank"),Jr(a)(T,x,o.x+10,o.height+A,_,20,{class:"actor"},a),A+=30}}return g.attr("height",A),{height:o.height+A,width:_}},"drawPopup"),
|
|
156
|
+
`},"getStyles"),Ir=br,jt=44,ge=6,Zt=6,yr=t((r,e)=>r.actorTextHeight??V.calculateTextDimensions(r.description??"",{fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}).height,"actorLabelHeight"),Qe=t((r)=>jt+ge+r+Zt,"actorStackHeight"),Rr=t((r,e,s)=>{let a=r+e,n=a-Zt-s/2;return{lifelineStartY:a,glyphBottomY:a-Zt-s-ge,labelCenterY:n}},"headerBands"),Or=t((r,e)=>{let s=r+Zt,a=s+jt;return{glyphTopY:s,glyphBottomY:a,labelCenterY:a+ge+e/2,stackHeight:Qe(e)}},"footerBands"),wt=36,Lr=-5,Je=60,Ue=Je-Lr,Ft=t((r,e,s,a)=>{if(e.look!=="neo")return null;let n=yr(r,e);return s?Or(a,n):Rr(a,r.height,n)},"neoBands"),mt="actor-top",St="actor-bottom",ee="actor-box",Pt="actor-man",Rt=new Set(["redux-color","redux-dark-color"]),lt=t((r,e)=>r?.length?r[e%r.length]:void 0,"paletteColor"),Ht=t(function(r,e){let s=ii(r,e);if(C().look==="neo")s.attr("data-look","neo");return s},"drawRect"),mr=t(function(r,e,s,a,n){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};let{links:h,actorCnt:i,rectData:o}=e;var u="none";if(n)u="block !important";let p=r.append("g");p.attr("id","actor"+i+"_popup"),p.attr("class","actorPopupMenu"),p.attr("display",u);var f="";if(o.class!==void 0)f=" "+o.class;let _=o.width>s?o.width:s,g=p.append("rect");if(g.attr("class","actorPopupMenuPanel"+f),g.attr("x",o.x),g.attr("y",o.height),g.attr("fill",o.fill),g.attr("stroke",o.stroke),g.attr("width",_),g.attr("height",o.height),g.attr("rx",o.rx),g.attr("ry",o.ry),h!=null){var A=20;for(let T in h){var x=p.append("a"),L=_e.sanitizeUrl(h[T]);x.attr("xlink:href",L),x.attr("target","_blank"),Jr(a)(T,x,o.x+10,o.height+A,_,20,{class:"actor"},a),A+=30}}return g.attr("height",A),{height:o.height+A,width:_}},"drawPopup"),ae=t(function(r){return"var pu = document.getElementById('"+r+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),$t=t(async function(r,e,s=null){let a=r.append("foreignObject"),n=await dc(e.text,C()),i=a.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(n).node().getBoundingClientRect();if(a.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),e.class==="noteText"){let o=r.node().firstChild;o.setAttribute("height",i.height+2*e.textMargin);let u=o.getBBox();a.attr("x",Math.round(u.x+u.width/2-i.width/2)).attr("y",Math.round(u.y+u.height/2-i.height/2))}else if(s){let{startx:o,stopx:u,starty:p}=s;if(o>u){let f=o;o=u,u=f}if(a.attr("x",Math.round(o+Math.abs(o-u)/2-i.width/2)),e.class==="loopText")a.attr("y",Math.round(p));else a.attr("y",Math.round(p-i.height))}return[a]},"drawKatex"),Yt=t(function(r,e){let s=0,a=0,n=e.text.split(w.lineBreakRegex),[h,i]=jn(e.fontSize),o=[],u=0,p=t(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":p=t(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":p=t(()=>Math.round(e.y+(s+a+e.textMargin)/2),"yfunc");break;case"bottom":case"end":p=t(()=>Math.round(e.y+(s+a+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[f,_]of n.entries()){if(e.textMargin!==void 0&&e.textMargin===0&&h!==void 0)u=f*h;let g=r.append("text");if(g.attr("x",e.x),g.attr("y",p()),e.anchor!==void 0)g.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline);if(e.fontFamily!==void 0)g.style("font-family",e.fontFamily);if(i!==void 0)g.style("font-size",i);if(e.fontWeight!==void 0)g.style("font-weight",e.fontWeight);if(e.fill!==void 0)g.attr("fill",e.fill);if(e.class!==void 0)g.attr("class",e.class);if(e.dy!==void 0)g.attr("dy",e.dy);else if(u!==0)g.attr("dy",u);let A=_||Mg;if(e.tspan){let x=g.append("tspan");if(x.attr("x",e.x),e.fill!==void 0)x.attr("fill",e.fill);x.text(A)}else g.text(A);if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)a+=(g._groups||g)[0][0].getBBox().height,s=a;o.push(g)}return o},"drawText"),Ze=t(function(r,e){function s(n,h,i,o,u){return n+","+h+" "+(n+i)+","+h+" "+(n+i)+","+(h+o-u)+" "+(n+i-u*1.2)+","+(h+o)+" "+n+","+(h+o)}t(s,"genPoints");let a=r.append("polygon");return a.attr("points",s(e.x,e.y,e.width,e.height,7)),a.attr("class","labelBox"),e.y=e.y+e.height/2,Yt(r,e),a},"drawLabel"),Q=-1,$e=t((r,e,s,a)=>{if(!r.select)return;s.forEach((n)=>{let h=e.get(n),i=r.select("#actor"+h.actorCnt);if(!a.mirrorActors&&h.stopy)i.attr("y2",h.stopy+h.height/2);else if(a.mirrorActors)i.attr("y2",h.stopy)})},"fixLifeLineHeights"),Sr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,u=i+e.height,{look:p,theme:f,themeVariables:_}=s,{bkgColorArray:g,borderColorArray:A}=_,x=r.append("g").lower();var L=x;if(!a){if(Q++,Object.keys(e.links||{}).length&&!s.forceMenus)L.attr("onclick",ae(`actor${Q}_popup`)).attr("cursor","pointer");if(L.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",u).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),L=x.append("g"),e.actorCnt=Q,e.links!=null)L.attr("id","root-"+Q);if(p==="neo")L.attr("data-look","neo")}let T=gr();var S="actor";if(e.properties?.class)S=e.properties.class;else T.fill="#eaeaea";if(a)S+=` ${St}`;else S+=` ${mt}`;if(T.x=e.x,T.y=i,T.width=e.width,T.height=e.height,T.class=S,T.rx=3,T.ry=3,T.name=e.name,p==="neo")T.rx=6,T.ry=6;let I=Ht(L,T),N=h.get(e.name)??0;if(Rt.has(f))I.style("stroke",lt(A,N)),I.style("fill",lt(g,N));if(p==="neo")I.attr("filter",`url(#${At(n)})`);if(e.rectData=T,e.properties?.icon){let k=e.properties.icon.trim();if(k.charAt(0)==="@")jp(L,T.x+T.width-20,T.y+10,k.substr(1));else Gp(L,T.x+T.width-20,T.y+10,k)}if(!a)L.attr("data-et","participant"),L.attr("data-type","participant"),L.attr("data-id",e.name);Ot(s,Dt(e.description))(e.description,L,T.x,T.y,T.width,T.height,{class:`actor ${ee}`},s);let D=e.height;if(I.node){let k=I.node().getBBox();if(s.look!=="neo")e.height=k.height,D=k.height}return D},"drawActorTypeParticipant"),kr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,u=i+e.height,{look:p,theme:f,themeVariables:_}=s,{bkgColorArray:g,borderColorArray:A}=_,x=r.append("g").lower();var L=x;if(!a){if(Q++,Object.keys(e.links||{}).length&&!s.forceMenus)L.attr("onclick",ae(`actor${Q}_popup`)).attr("cursor","pointer");if(L.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",u).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),L=x.append("g"),e.actorCnt=Q,e.links!=null)L.attr("id","root-"+Q);if(p==="neo")L.attr("data-look","neo")}let T=gr();var S="actor";if(e.properties?.class)S=e.properties.class;else T.fill="#eaeaea";if(a)S+=` ${St}`;else S+=` ${mt}`;T.x=e.x,T.y=i,T.width=e.width,T.height=e.height,T.class=S,T.name=e.name;let I=6;if(s.look==="neo")T.height=e.height-I;let N={...T,x:T.x+(a?-I:-I),y:T.y+(a?+I:+I),class:"actor"},D=Ht(L,T),k=Ht(L,N);if(e.rectData=T,p==="neo")L.attr("filter",`url(#${At(n)})`);let B=h.get(e.name)??0;if(Rt.has(f))D.style("stroke",lt(A,B)),D.style("fill",lt(g,B)),k.style("stroke",lt(A,B)),k.style("fill",lt(g,B));if(e.properties?.icon){let X=e.properties.icon.trim();if(X.charAt(0)==="@")jp(L,T.x+T.width-20,T.y+10,X.substr(1));else Gp(L,T.x+T.width-20,T.y+10,X)}Ot(s,Dt(e.description))(e.description,L,T.x-I,T.y+I,T.width,T.height,{class:`actor ${ee}`},s);let Y=e.height;if(D.node){let X=D.node().getBBox();if(s.look!=="neo")e.height=X.height,Y=X.height}if(!a)L.attr("data-et","participant"),L.attr("data-type","collections"),L.attr("data-id",e.name);return Y},"drawActorTypeCollections"),Nr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,u=i+e.height,{look:p,theme:f,themeVariables:_}=s,{bkgColorArray:g,borderColorArray:A}=_,x=r.append("g").lower(),L=x;if(!a){if(Q++,Object.keys(e.links||{}).length&&!s.forceMenus)L.attr("onclick",ae(`actor${Q}_popup`)).attr("cursor","pointer");if(L.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",u).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),L=x.append("g"),e.actorCnt=Q,e.links!=null)L.attr("id","root-"+Q);if(p==="neo")L.attr("data-look","neo")}let T=gr(),S="actor";if(e.properties?.class)S=e.properties.class;else T.fill="#eaeaea";if(a)S+=` ${St}`;else S+=` ${mt}`;L.attr("class",S),T.x=e.x,T.y=i,T.width=e.width,T.height=e.height,T.name=e.name;let I=T.height/2,N=I/(2.5+T.height/50),D=L.append("g"),k=L.append("g"),B=`M ${T.x},${T.y+I}
|
|
157
157
|
a ${N},${I} 0 0 0 0,${T.height}
|
|
158
158
|
h ${T.width-2*N}
|
|
159
159
|
a ${N},${I} 0 0 0 0,-${T.height}
|
|
160
160
|
Z
|
|
161
161
|
`;if(D.append("path").attr("d",B),k.append("path").attr("d",`M ${T.x},${T.y+I}
|
|
162
|
-
a ${N},${I} 0 0 0 0,${T.height}`),D.attr("transform",`translate(${N}, ${-(T.height/2)})`),k.attr("transform",`translate(${T.width-N}, ${-T.height/2})`),e.rectData=T,p==="neo")D.attr("filter",`url(#${At(n)})`);let Y=h.get(e.name)??0;if(Rt.has(f))D.style("stroke",lt(A,Y)),D.style("fill",lt(g,Y)),k.style("stroke",lt(A,Y)),k.style("fill",lt(g,Y));if(e.properties?.icon){let tt=e.properties.icon.trim(),it=T.x+T.width-20,ct=T.y+10;if(tt.charAt(0)==="@")jp(L,it,ct,tt.substr(1));else Gp(L,it,ct,tt)}Ot(s,Dt(e.description))(e.description,L,T.x,T.y,T.width,T.height,{class:`actor ${ee}`},s);let X=e.height,J=D.select("path:last-child");if(J.node()){let tt=J.node().getBBox();if(s.look!=="neo")e.height=tt.height,X=tt.height}if(!a)L.attr("data-et","participant"),L.attr("data-type","queue"),L.attr("data-id",e.name);return X},"drawActorTypeQueue"),wr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,u=Ft(e,s,a,i),p=u?u.lifelineStartY:i+75,{look:f,theme:_,themeVariables:g}=s,{bkgColorArray:A,borderColorArray:x,actorBorder:L,actorBkg:T}=g,S=r.append("g").lower();if(!a)Q++,S.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;let I=r.append("g"),N=Pt;if(a)N+=` ${St}`;else N+=` ${mt}`;I.attr("class",N),I.attr("name",e.name);let D=gr();D.x=e.x,D.y=i,D.fill="#eaeaea",D.width=e.width,D.height=e.height,D.class="actor";let k=e.x+e.width/2,B=u?u.glyphBottomY-22:i+32,Y=22;I.append("defs").append("marker").attr("id",n+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),I.append("circle").attr("cx",k).attr("cy",B).attr("r",Y).attr("filter",`${f==="neo"?`url(#${At(n)})`:""}`),I.append("line").attr("marker-end","url(#"+n+"-filled-head-control)").attr("transform",`translate(${k}, ${B-Y})`);let X=h.get(e.name)??0;if(Rt.has(_))I.style("stroke",lt(x,X)),I.style("fill",lt(A,X));else I.style("stroke",L),I.style("fill",T);if(!u){let J=I.node().getBBox();e.height=J.height+2*(s?.sequence?.labelBoxHeight??0)}if(Ot(s,Dt(e.description))(e.description,I,D.x,u?u.labelCenterY-D.height/2:D.y+Y+(!a?12:5),D.width,D.height,{class:`actor ${Pt}`},s),!a)I.attr("data-et","participant"),I.attr("data-type","control"),I.attr("data-id",e.name);return e.height},"drawActorTypeControl"),Pr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,u=Ft(e,s,a,i),p=u?u.lifelineStartY:i+75,{look:f,theme:_,themeVariables:g}=s,{bkgColorArray:A,borderColorArray:x}=g,L=r.append("g").lower(),T=r.append("g"),S="actor";if(a)S+=` ${St}`;else S+=` ${mt}`;T.attr("class",S),T.attr("name",e.name);let I=gr();I.x=e.x,I.y=i,I.fill="#eaeaea",I.width=e.width,I.height=e.height,I.class="actor";let N=e.x+e.width/2,D=u?u.glyphBottomY-22:i+(!a?25:10),k=22;if(T.append("circle").attr("cx",N).attr("cy",D).attr("r",k).attr("width",e.width).attr("height",e.height),T.append("line").attr("x1",N-k).attr("x2",N+k).attr("y1",D+k).attr("y2",D+k).attr("stroke-width",2),f==="neo")T.attr("filter",`url(#${At(n)})`);let B=h.get(e.name)??0;if(Rt.has(_))T.style("stroke",lt(x,B)),T.style("fill",lt(A,B));if(!u){let Y=T.node().getBBox();e.height=Y.height+(s?.sequence?.labelBoxHeight??0)}if(!a)Q++,L.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;if(Ot(s,Dt(e.description))(e.description,T,I.x,u?u.labelCenterY-I.height/2:I.y+(!a?30:15),I.width,I.height,{class:`actor ${Pt}`},s),!u)T.attr("transform",`translate(0, ${a?k:k/2-5})`);if(!a)T.attr("data-et","participant"),T.attr("data-type","entity"),T.attr("data-id",e.name);return e.height},"drawActorTypeEntity"),Dr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,u=Ft(e,s,a,i),p=u?u.lifelineStartY:i+e.height+2*s.boxTextMargin,{theme:f,themeVariables:_,look:g}=s,{bkgColorArray:A,borderColorArray:x,actorBorder:L}=_,T=r.append("g").lower(),S=T;if(!a){if(Q++,Object.keys(e.links||{}).length&&!s.forceMenus)S.attr("onclick",
|
|
162
|
+
a ${N},${I} 0 0 0 0,${T.height}`),D.attr("transform",`translate(${N}, ${-(T.height/2)})`),k.attr("transform",`translate(${T.width-N}, ${-T.height/2})`),e.rectData=T,p==="neo")D.attr("filter",`url(#${At(n)})`);let Y=h.get(e.name)??0;if(Rt.has(f))D.style("stroke",lt(A,Y)),D.style("fill",lt(g,Y)),k.style("stroke",lt(A,Y)),k.style("fill",lt(g,Y));if(e.properties?.icon){let tt=e.properties.icon.trim(),it=T.x+T.width-20,ct=T.y+10;if(tt.charAt(0)==="@")jp(L,it,ct,tt.substr(1));else Gp(L,it,ct,tt)}Ot(s,Dt(e.description))(e.description,L,T.x,T.y,T.width,T.height,{class:`actor ${ee}`},s);let X=e.height,J=D.select("path:last-child");if(J.node()){let tt=J.node().getBBox();if(s.look!=="neo")e.height=tt.height,X=tt.height}if(!a)L.attr("data-et","participant"),L.attr("data-type","queue"),L.attr("data-id",e.name);return X},"drawActorTypeQueue"),wr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,u=Ft(e,s,a,i),p=u?u.lifelineStartY:i+75,{look:f,theme:_,themeVariables:g}=s,{bkgColorArray:A,borderColorArray:x,actorBorder:L,actorBkg:T}=g,S=r.append("g").lower();if(!a)Q++,S.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;let I=r.append("g"),N=Pt;if(a)N+=` ${St}`;else N+=` ${mt}`;I.attr("class",N),I.attr("name",e.name);let D=gr();D.x=e.x,D.y=i,D.fill="#eaeaea",D.width=e.width,D.height=e.height,D.class="actor";let k=e.x+e.width/2,B=u?u.glyphBottomY-22:i+32,Y=22;I.append("defs").append("marker").attr("id",n+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),I.append("circle").attr("cx",k).attr("cy",B).attr("r",Y).attr("filter",`${f==="neo"?`url(#${At(n)})`:""}`),I.append("line").attr("marker-end","url(#"+n+"-filled-head-control)").attr("transform",`translate(${k}, ${B-Y})`);let X=h.get(e.name)??0;if(Rt.has(_))I.style("stroke",lt(x,X)),I.style("fill",lt(A,X));else I.style("stroke",L),I.style("fill",T);if(!u){let J=I.node().getBBox();e.height=J.height+2*(s?.sequence?.labelBoxHeight??0)}if(Ot(s,Dt(e.description))(e.description,I,D.x,u?u.labelCenterY-D.height/2:D.y+Y+(!a?12:5),D.width,D.height,{class:`actor ${Pt}`},s),!a)I.attr("data-et","participant"),I.attr("data-type","control"),I.attr("data-id",e.name);return e.height},"drawActorTypeControl"),Pr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,u=Ft(e,s,a,i),p=u?u.lifelineStartY:i+75,{look:f,theme:_,themeVariables:g}=s,{bkgColorArray:A,borderColorArray:x}=g,L=r.append("g").lower(),T=r.append("g"),S="actor";if(a)S+=` ${St}`;else S+=` ${mt}`;T.attr("class",S),T.attr("name",e.name);let I=gr();I.x=e.x,I.y=i,I.fill="#eaeaea",I.width=e.width,I.height=e.height,I.class="actor";let N=e.x+e.width/2,D=u?u.glyphBottomY-22:i+(!a?25:10),k=22;if(T.append("circle").attr("cx",N).attr("cy",D).attr("r",k).attr("width",e.width).attr("height",e.height),T.append("line").attr("x1",N-k).attr("x2",N+k).attr("y1",D+k).attr("y2",D+k).attr("stroke-width",2),f==="neo")T.attr("filter",`url(#${At(n)})`);let B=h.get(e.name)??0;if(Rt.has(_))T.style("stroke",lt(x,B)),T.style("fill",lt(A,B));if(!u){let Y=T.node().getBBox();e.height=Y.height+(s?.sequence?.labelBoxHeight??0)}if(!a)Q++,L.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;if(Ot(s,Dt(e.description))(e.description,T,I.x,u?u.labelCenterY-I.height/2:I.y+(!a?30:15),I.width,I.height,{class:`actor ${Pt}`},s),!u)T.attr("transform",`translate(0, ${a?k:k/2-5})`);if(!a)T.attr("data-et","participant"),T.attr("data-type","entity"),T.attr("data-id",e.name);return e.height},"drawActorTypeEntity"),Dr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,u=Ft(e,s,a,i),p=u?u.lifelineStartY:i+e.height+2*s.boxTextMargin,{theme:f,themeVariables:_,look:g}=s,{bkgColorArray:A,borderColorArray:x,actorBorder:L}=_,T=r.append("g").lower(),S=T;if(!a){if(Q++,Object.keys(e.links||{}).length&&!s.forceMenus)S.attr("onclick",ae(`actor${Q}_popup`)).attr("cursor","pointer");if(S.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),S=T.append("g"),e.actorCnt=Q,e.links!=null)S.attr("id","root-"+Q);if(g==="neo")S.attr("data-look","neo")}let I=gr(),N="actor";if(e.properties?.class)N=e.properties.class;else I.fill="#eaeaea";if(a)N+=` ${St}`;else N+=` ${mt}`;I.x=e.x,I.y=i,I.width=e.width,I.height=e.height,I.class=N,I.name=e.name,I.x=e.x,I.y=i;let D=I.width/3,k=D/2,B=k/(2.5+D/50),Y=u?jt:I.width/3,X=u?u.glyphBottomY-Y-B:I.y,J=S.append("g");J.attr("class",N);let tt=`
|
|
163
163
|
M ${I.x},${X+B}
|
|
164
164
|
a ${k},${B} 0 0 0 ${D},0
|
|
165
165
|
a ${k},${B} 0 0 0 -${D},0
|
|
166
166
|
l 0,${Y-2*B}
|
|
167
167
|
a ${k},${B} 0 0 0 ${D},0
|
|
168
168
|
l 0,-${Y-2*B}
|
|
169
|
-
`;if(J.append("path").attr("d",tt),g==="neo")J.attr("filter",`url(#${At(n)})`);let it=h.get(e.name)??0;if(Rt.has(f))J.style("stroke",lt(x,it)),J.style("fill",lt(A,it));else J.style("stroke",L);if(J.attr("transform",`translate(${D}, ${B})`),e.rectData=I,Ot(s,Dt(e.description))(e.description,S,I.x,u?u.labelCenterY-I.height/2:I.y+35,I.width,I.height,{class:`actor ${ee}`},s),!u){let ct=J.select("path:last-child");if(ct.node()){let Tt=ct.node().getBBox();e.height=Tt.height+(s.sequence.labelBoxHeight??0)}}if(!a)S.attr("data-et","participant"),S.attr("data-type","database"),S.attr("data-id",e.name);return e.height},"drawActorTypeDatabase"),vr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,u=Ft(e,s,a,i),p=u?u.lifelineStartY:i+80,f=22,_=u?u.glyphBottomY-22:i+12,g=r.append("g").lower(),{look:A,theme:x,themeVariables:L}=s,{bkgColorArray:T,borderColorArray:S,actorBorder:I}=L;if(!a)Q++,g.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;let N=r.append("g"),D=Pt;if(a)D+=` ${St}`;else D+=` ${mt}`;N.attr("class",D),N.attr("name",e.name);let k=gr();if(k.x=e.x,k.y=i,k.fill="#eaeaea",k.width=e.width,k.height=e.height,k.class="actor",N.append("line").attr("id","actor-man-torso"+Q).attr("x1",e.x+e.width/2-55).attr("y1",_).attr("x2",e.x+e.width/2-15).attr("y2",_),N.append("line").attr("id","actor-man-arms"+Q).attr("x1",e.x+e.width/2-55).attr("y1",_-10).attr("x2",e.x+e.width/2-55).attr("y2",_+10),N.append("circle").attr("cx",e.x+e.width/2).attr("cy",_).attr("r",22),A==="neo")N.attr("filter",`url(#${At(n)})`);let B=h.get(e.name)??0;if(Rt.has(x))N.style("stroke",lt(S,B)),N.style("fill",lt(T,B));else N.style("stroke",I);if(!u){let Y=N.node().getBBox();e.height=Y.height+(s.sequence.labelBoxHeight??0)}if(Ot(s,Dt(e.description))(e.description,N,k.x,u?u.labelCenterY-k.height/2:k.y+15,k.width,k.height,{class:`actor ${Pt}`},s),!u)N.attr("transform","translate(0,21)");if(!a)N.attr("data-et","participant"),N.attr("data-type","boundary"),N.attr("data-id",e.name);return e.height},"drawActorTypeBoundary"),Cr=t(function(r,e,s,a,n){let h=a?e.stopy:e.starty,i=e.x+e.width/2,o=Ft(e,s,a,h),u=o?o.lifelineStartY:h+80,{theme:p,themeVariables:f}=s,{bkgColorArray:_,borderColorArray:g,actorBorder:A}=f,x=r.append("g").lower();if(!a)Q++,x.append("line").attr("id","actor"+Q).attr("x1",i).attr("y1",u).attr("x2",i).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;let L=r.append("g"),T=Pt;if(a)T+=` ${St}`;else T+=` ${mt}`;if(L.attr("class",T),L.attr("name",e.name),!a)L.attr("data-et","participant").attr("data-type","actor").attr("data-id",e.name);let S=o?jt/Ue:1,I=t((Y)=>o?o.glyphBottomY-(Je-Y)*S:h+Y,"gy"),N=t((Y)=>i+Y*S,"gx");L.append("line").attr("id","actor-man-torso"+Q).attr("x1",i).attr("y1",I(25)).attr("x2",i).attr("y2",I(45)),L.append("line").attr("id","actor-man-arms"+Q).attr("x1",N(-wt/2)).attr("y1",I(33)).attr("x2",N(wt/2)).attr("y2",I(33)),L.append("line").attr("x1",N(-wt/2)).attr("y1",I(60)).attr("x2",i).attr("y2",I(45)),L.append("line").attr("x1",i).attr("y1",I(45)).attr("x2",N(wt/2-2)).attr("y2",I(60));let D=L.append("circle");if(D.attr("cx",e.x+e.width/2),D.attr("cy",I(10)),D.attr("r",15*S),D.attr("width",e.width),D.attr("height",e.height),!o)e.height=Ue;let k=gr();k.x=e.x,k.y=h,k.fill="#eaeaea",k.width=e.width,k.height=e.height,k.class="actor",k.rx=3,k.ry=3;let B=n.get(e.name)??0;if(Rt.has(p))L.style("stroke",lt(g,B)),L.style("fill",lt(_,B));else L.style("stroke",A);return Ot(s,Dt(e.description))(e.description,L,k.x,o?o.labelCenterY-k.height/2:h+35,k.width,k.height,{class:`actor ${Pt}`},s),e.height},"drawActorTypeActor"),Mr=t(async function(r,e,s,a,n,h,i){let o=i??new Map([...h.db.getActors().values()].map((u,p)=>[u.name,p]));switch(e.type){case"actor":return await Cr(r,e,s,a,o);case"participant":return await Sr(r,e,s,a,n,o);case"boundary":return await vr(r,e,s,a,n,o);case"control":return await wr(r,e,s,a,n,o);case"entity":return await Pr(r,e,s,a,n,o);case"database":return await Dr(r,e,s,a,n,o);case"collections":return await kr(r,e,s,a,n,o);case"queue":return await Nr(r,e,s,a,n,o)}},"drawActor"),Br=t(function(r,e,s){let n=r.append("g");if(je(n,e),e.name)Ot(s)(e.name,n,e.x,e.y+s.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},s);n.lower()},"drawBox"),Yr=t(function(r){return r.append("g")},"anchorElement"),Vr=t(function(r,e,s,a,n,h,i){let{theme:o,themeVariables:u}=a,{bkgColorArray:p,borderColorArray:f,mainBkg:_}=u,g=gr(),{anchored:A,actor:x}=e;g.x=e.startx,g.y=e.starty,g.class="activation"+n%3,g.width=e.stopx-e.startx,g.height=s-e.starty;let L=Ht(A,g),S=(i??new Map([...h.db.getActors().values()].map((I,N)=>[I.name,N]))).get(x)??0;if(Rt.has(o))L.style("stroke",lt(f,S)),L.style("fill",lt(p,S)??_)},"drawActivation"),Wr=t(async function(r,e,s,a,n){let{boxMargin:h,boxTextMargin:i,labelBoxHeight:o,labelBoxWidth:u,messageFontFamily:p,messageFontSize:f,messageFontWeight:_}=a,g=r.append("g").attr("data-et","control-structure").attr("data-id","i"+n.id),A=t(function(T,S,I,N){return g.append("line").attr("x1",T).attr("y1",S).attr("x2",I).attr("y2",N).attr("class","loopLine")},"drawLoopLine");if(A(e.startx,e.starty,e.stopx,e.starty),A(e.stopx,e.starty,e.stopx,e.stopy),A(e.startx,e.stopy,e.stopx,e.stopy),A(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0)e.sections.forEach(function(T){A(e.startx,T.y,e.stopx,T.y).style("stroke-dasharray","3, 3")});let x=Hp();x.text=s,x.x=e.startx,x.y=e.starty,x.fontFamily=p,x.fontSize=f,x.fontWeight=_,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=Math.max(u??0,50),x.height=o+(a.look==="neo"?15:0)||20,x.textMargin=i,x.class="labelText",Ze(g,x),x=tr(),x.text=e.title,x.x=e.startx+u/2+(e.stopx-e.startx)/2,x.y=e.starty+h+i,x.anchor="middle",x.valign="middle",x.textMargin=i,x.class="loopText",x.fontFamily=p,x.fontSize=f,x.fontWeight=_,x.wrap=!0;let L=Dt(x.text)?await $t(g,x,e):Yt(g,x);if(e.sectionTitles!==void 0){for(let[T,S]of Object.entries(e.sectionTitles))if(S.message){if(x.text=S.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[T].y+h+i,x.class="sectionTitle",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=p,x.fontSize=f,x.fontWeight=_,x.wrap=e.wrap,Dt(x.text))e.starty=e.sections[T].y,await $t(g,x,e);else Yt(g,x);let I=Math.round(L.map((N)=>(N._groups||N)[0][0].getBBox().height).reduce((N,D)=>N+D));e.sections[T].height+=I-(h+i)}}return e.height=Math.round(e.stopy-e.starty),g},"drawLoop"),je=t(function(r,e){ld(r,e)},"drawBackgroundRect"),Kr=t(function(r,e){r.append("defs").append("symbol").attr("id",e+"-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"),Hr=t(function(r,e){r.append("defs").append("symbol").attr("id",e+"-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"),Fr=t(function(r,e){r.append("defs").append("symbol").attr("id",e+"-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"),qr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),zr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),Ur=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),Gr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),At=t((r)=>r?`${r}-drop-shadow`:"drop-shadow","dropShadowId"),Xr=t(function(r,e,s){let{theme:a}=e;r.append("defs").append("filter").attr("id",At(s)).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a==="redux"||a==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),tr=t(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"),Qr=t(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Ot=function(){function r(h,i,o,u,p,f,_){let g=i.append("text").attr("x",o+p/2).attr("y",u+f/2+5).style("text-anchor","middle").text(h);n(g,_)}t(r,"byText");function e(h,i,o,u,p,f,_,g){let{actorFontSize:A,actorFontFamily:x,actorFontWeight:L}=g,[T,S]=jn(A),I=h.split(w.lineBreakRegex);for(let N=0;N<I.length;N++){let D=N*T-T*(I.length-1)/2,k=i.append("text").attr("x",o+p/2).attr("y",u).style("text-anchor","middle").style("font-size",S).style("font-weight",L).style("font-family",x);k.append("tspan").attr("x",o+p/2).attr("dy",D).text(I[N]),k.attr("y",u+f/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(k,_)}}t(e,"byTspan");function s(h,i,o,u,p,f,_,g){let A=i.append("switch"),L=A.append("foreignObject").attr("x",o).attr("y",u).attr("width",p).attr("height",f).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");L.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(h),e(h,A,o,u,p,f,_,g),n(L,_)}t(s,"byFo");async function a(h,i,o,u,p,f,_,g){let A=await uc(h,C()),x=i.append("switch"),T=x.append("foreignObject").attr("x",o+p/2-A.width/2).attr("y",u+f/2-A.height/2).attr("width",A.width).attr("height",A.height).append("xhtml:div").style("height","100%").style("width","100%");T.append("div").style("text-align","center").style("vertical-align","middle").html(await dc(h,C())),e(h,x,o,u,p,f,_,g),n(T,_)}t(a,"byKatex");function n(h,i){for(let o in i)if(i.hasOwnProperty(o))h.attr(o,i[o])}return t(n,"_setTextAttrs"),function(h,i=!1){if(i)return a;return h.textPlacement==="fo"?s:h.textPlacement==="old"?r:e}}(),Jr=function(){function r(n,h,i,o,u,p,f){let _=h.append("text").attr("x",i).attr("y",o).style("text-anchor","start").text(n);a(_,f)}t(r,"byText");function e(n,h,i,o,u,p,f,_){let{actorFontSize:g,actorFontFamily:A,actorFontWeight:x}=_,L=n.split(w.lineBreakRegex);for(let T=0;T<L.length;T++){let S=T*g-g*(L.length-1)/2,I=h.append("text").attr("x",i).attr("y",o).style("text-anchor","start").style("font-size",g).style("font-weight",x).style("font-family",A);I.append("tspan").attr("x",i).attr("dy",S).text(L[T]),I.attr("y",o+p/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(I,f)}}t(e,"byTspan");function s(n,h,i,o,u,p,f,_){let g=h.append("switch"),x=g.append("foreignObject").attr("x",i).attr("y",o).attr("width",u).attr("height",p).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");x.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,g,i,o,u,p,f,_),a(x,f)}t(s,"byFo");function a(n,h){for(let i in h)if(h.hasOwnProperty(i))n.attr(i,h[i])}return t(a,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?s:n.textPlacement==="old"?r:e}}(),Zr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),$r=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",0.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"),jr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),ta=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),st={drawRect:Ht,drawText:Yt,drawLabel:Ze,drawActor:Mr,drawBox:Br,drawPopup:mr,anchorElement:Yr,drawActivation:Vr,drawLoop:Wr,drawBackgroundRect:je,insertArrowHead:qr,insertArrowFilledHead:zr,insertSequenceNumber:Ur,insertArrowCrossHead:Gr,insertDatabaseIcon:Kr,insertComputerIcon:Hr,insertClockIcon:Fr,getTextObj:tr,getNoteRect:Qr,fixLifeLineHeights:$e,sanitizeUrl:_e.sanitizeUrl,insertDropShadow:Xr,insertSolidTopArrowHead:Zr,insertSolidBottomArrowHead:$r,insertStickTopArrowHead:jr,insertStickBottomArrowHead:ta},d={},R={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:t(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map((r)=>r.height||0))+(this.loops.length===0?0:this.loops.map((r)=>r.height||0).reduce((r,e)=>r+e))+(this.messages.length===0?0:this.messages.map((r)=>r.height||0).reduce((r,e)=>r+e))+(this.notes.length===0?0:this.notes.map((r)=>r.height||0).reduce((r,e)=>r+e))},"getHeight"),clear:t(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:t(function(r){this.boxes.push(r)},"addBox"),addActor:t(function(r){this.actors.push(r)},"addActor"),addLoop:t(function(r){this.loops.push(r)},"addLoop"),addMessage:t(function(r){this.messages.push(r)},"addMessage"),addNote:t(function(r){this.notes.push(r)},"addNote"),lastActor:t(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:t(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:t(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:t(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:t(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,ar(m())},"init"),updateVal:t(function(r,e,s,a){if(r[e]===void 0)r[e]=s;else r[e]=a(s,r[e])},"updateVal"),updateBounds:t(function(r,e,s,a){let n=this,h=0;function i(o){return t(function(p){h++;let f=n.sequenceItems.length-h+1;if(n.updateVal(p,"starty",e-f*d.boxMargin,Math.min),n.updateVal(p,"stopy",a+f*d.boxMargin,Math.max),n.updateVal(R.data,"startx",r-f*d.boxMargin,Math.min),n.updateVal(R.data,"stopx",s+f*d.boxMargin,Math.max),o!=="activation")n.updateVal(p,"startx",r-f*d.boxMargin,Math.min),n.updateVal(p,"stopx",s+f*d.boxMargin,Math.max),n.updateVal(R.data,"starty",e-f*d.boxMargin,Math.min),n.updateVal(R.data,"stopy",a+f*d.boxMargin,Math.max)},"updateItemBounds")}t(i,"updateFn"),this.sequenceItems.forEach(i()),this.activations.forEach(i("activation"))},"updateBounds"),insert:t(function(r,e,s,a){let n=w.getMin(r,s),h=w.getMax(r,s),i=w.getMin(e,a),o=w.getMax(e,a);this.updateVal(R.data,"startx",n,Math.min),this.updateVal(R.data,"starty",i,Math.min),this.updateVal(R.data,"stopx",h,Math.max),this.updateVal(R.data,"stopy",o,Math.max),this.updateBounds(n,i,h,o)},"insert"),newActivation:t(function(r,e,s){let a=s.get(r.from),n=ae(r.from).length||0,h=a.x+a.width/2+(n-1)*d.activationWidth/2;this.activations.push({startx:h,starty:this.verticalPos+2,stopx:h+d.activationWidth,stopy:void 0,actor:r.from,anchored:st.anchorElement(e)})},"newActivation"),endActivation:t(function(r){let e=this.activations.map(function(s){return s.actor}).lastIndexOf(r.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:t(function(r={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:r.message,wrap:r.wrap,width:r.width,height:0,fill:e}},"createLoop"),newLoop:t(function(r={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(r,e))},"newLoop"),endLoop:t(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:t(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:t(function(r){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:R.getVerticalPos(),height:0}),e.sectionTitles.push(r),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:t(function(){if(this.isLoopOverlap())this.savedVerticalPos=this.verticalPos},"saveVerticalPos"),resetVerticalPos:t(function(){if(this.isLoopOverlap())this.verticalPos=this.savedVerticalPos},"resetVerticalPos"),bumpVerticalPos:t(function(r){this.verticalPos=this.verticalPos+r,this.data.stopy=w.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:t(function(){return this.verticalPos},"getVerticalPos"),getBounds:t(function(){return{bounds:this.data,models:this.models}},"getBounds")},ea=t(async function(r,e,s){R.bumpVerticalPos(d.boxMargin),e.height=d.boxMargin,e.starty=R.getVerticalPos();let a=gr();a.x=e.startx,a.y=e.starty,a.width=e.width||d.width,a.class="note";let n=r.append("g");n.attr("data-et","note"),n.attr("data-id","i"+s);let h=st.drawRect(n,a),i=Hp();i.x=e.startx,i.y=e.starty,i.width=a.width,i.dy="1em",i.text=e.message,i.class="noteText",i.fontFamily=d.noteFontFamily,i.fontSize=d.noteFontSize,i.fontWeight=d.noteFontWeight,i.anchor=d.noteAlign,i.textMargin=d.noteMargin,i.valign="center";let o=Dt(i.text)?await $t(n,i):Yt(n,i),u=Math.round(o.map((p)=>(p._groups||p)[0][0].getBBox().height).reduce((p,f)=>p+f));h.attr("height",u+2*d.noteMargin),e.height+=u+2*d.noteMargin,R.bumpVerticalPos(u+2*d.noteMargin),e.stopy=e.starty+u+2*d.noteMargin,e.stopx=e.startx+a.width,R.insert(e.startx,e.starty,e.stopx,e.stopy),R.models.addNote(e)},"drawNote"),Ge=t(function(r,e,s,a,n,h,i){let o=a.db.getActors(),u=o.get(e.from),p=o.get(e.to),f=s.sequenceVisible,_=u.x+u.width/2,g=p.x+p.width/2,A=_<=g,x=or(e,a),L=r.append("g"),T=16.5,S=t((B,Y)=>{let X=B?T:-T;return Y?-X:X},"getCircleOffset"),I=t((B)=>{L.append("circle").attr("cx",B).attr("cy",i).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:N,CENTRAL_CONNECTION_REVERSE:D,CENTRAL_CONNECTION_DUAL:k}=a.db.LINETYPE;if(f)switch(e.centralConnection){case N:if(x)g+=S(A,!0);break;case D:if(!x)_+=S(A,!1);break;case k:if(x)g+=S(A,!0);else _+=S(A,!1);break}switch(e.centralConnection){case N:I(g);break;case D:I(_);break;case k:I(_),I(g);break}},"drawCentralConnection"),vt=t((r)=>({fontFamily:r.messageFontFamily,fontSize:r.messageFontSize,fontWeight:r.messageFontWeight}),"messageFont"),Bt=t((r)=>({fontFamily:r.noteFontFamily,fontSize:r.noteFontSize,fontWeight:r.noteFontWeight}),"noteFont"),ue=t((r)=>({fontFamily:r.actorFontFamily,fontSize:r.actorFontSize,fontWeight:r.actorFontWeight}),"actorFont");async function er(r,e){R.bumpVerticalPos(10);let{startx:s,stopx:a,message:n}=e,h=w.splitBreaks(n).length,i=Dt(n),o=i?await uc(n,m()):V.calculateTextDimensions(n,vt(d));if(!i){let _=o.height/h;e.height+=_,R.bumpVerticalPos(_)}let u,p=o.height-10,f=o.width;if(s===a){if(u=R.getVerticalPos()+p,!d.rightAngles)p+=d.boxMargin,u=R.getVerticalPos()+p;p+=30;let _=w.getMax(f/2,d.width/2);R.insert(s-_,R.getVerticalPos()-10+p,a+_,R.getVerticalPos()+30+p)}else p+=d.boxMargin,u=R.getVerticalPos()+p,R.insert(s,u-10,a,u);return R.bumpVerticalPos(p),e.height+=p,e.stopy=e.starty+e.height,R.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),u}t(er,"boundMessage");var ra=t(async function(r,e,s,a,n,h){let{startx:i,stopx:o,starty:u,message:p,type:f,sequenceIndex:_,sequenceVisible:g}=e,A=V.calculateTextDimensions(p,vt(d)),x=Hp();if(x.x=Math.min(i,o),x.y=u+10,x.width=Math.abs(o-i),x.class="messageText",x.dy="1em",x.text=p,x.fontFamily=d.messageFontFamily,x.fontSize=d.messageFontSize,x.fontWeight=d.messageFontWeight,x.anchor=d.messageAlign,x.valign="center",x.textMargin=d.wrapPadding,x.tspan=!1,Dt(x.text))await $t(r,x,{startx:i,stopx:o,starty:s});else Yt(r,x);let L=A.width,T;if(i===o){let I=g||d.showSequenceNumbers,N=or(n,a),D=ha(n,a),k=i+(I&&(N||D)?10:0);if(d.rightAngles)T=r.append("path").attr("d",`M ${k},${s} H ${i+w.getMax(d.width/2,L/2)} V ${s+25} H ${i}`);else T=r.append("path").attr("d","M "+k+","+s+" C "+(k+60)+","+(s-10)+" "+(i+60)+","+(s+30)+" "+i+","+(s+20));if(pe(n,a))Ge(r,n,e,a,i,o,s)}else if(T=r.append("line"),T.attr("x1",i),T.attr("y1",s),T.attr("x2",o),T.attr("y2",s),pe(n,a))Ge(r,n,e,a,i,o,s);if(f===a.db.LINETYPE.DOTTED||f===a.db.LINETYPE.DOTTED_CROSS||f===a.db.LINETYPE.DOTTED_POINT||f===a.db.LINETYPE.DOTTED_OPEN||f===a.db.LINETYPE.BIDIRECTIONAL_DOTTED||f===a.db.LINETYPE.SOLID_TOP_DOTTED||f===a.db.LINETYPE.SOLID_BOTTOM_DOTTED||f===a.db.LINETYPE.STICK_TOP_DOTTED||f===a.db.LINETYPE.STICK_BOTTOM_DOTTED||f===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)T.style("stroke-dasharray","3, 3"),T.attr("class","messageLine1");else T.attr("class","messageLine0");T.attr("data-et","message"),T.attr("data-id","i"+e.id),T.attr("data-from",e.from),T.attr("data-to",e.to);let S="";if(d.arrowMarkerAbsolute)S=Rg(!0);if(T.attr("stroke-width",2),T.attr("stroke","none"),T.style("fill","none"),f===a.db.LINETYPE.SOLID_TOP||f===a.db.LINETYPE.SOLID_TOP_DOTTED)T.attr("marker-end","url("+S+"#"+h+"-solidTopArrowHead)");if(f===a.db.LINETYPE.SOLID_BOTTOM||f===a.db.LINETYPE.SOLID_BOTTOM_DOTTED)T.attr("marker-end","url("+S+"#"+h+"-solidBottomArrowHead)");if(f===a.db.LINETYPE.STICK_TOP||f===a.db.LINETYPE.STICK_TOP_DOTTED)T.attr("marker-end","url("+S+"#"+h+"-stickTopArrowHead)");if(f===a.db.LINETYPE.STICK_BOTTOM||f===a.db.LINETYPE.STICK_BOTTOM_DOTTED)T.attr("marker-end","url("+S+"#"+h+"-stickBottomArrowHead)");if(f===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)T.attr("marker-start","url("+S+"#"+h+"-solidBottomArrowHead)");if(f===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)T.attr("marker-start","url("+S+"#"+h+"-solidTopArrowHead)");if(f===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)T.attr("marker-start","url("+S+"#"+h+"-stickBottomArrowHead)");if(f===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)T.attr("marker-start","url("+S+"#"+h+"-stickTopArrowHead)");if(f===a.db.LINETYPE.SOLID||f===a.db.LINETYPE.DOTTED)T.attr("marker-end","url("+S+"#"+h+"-arrowhead)");if(f===a.db.LINETYPE.BIDIRECTIONAL_SOLID||f===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)T.attr("marker-start","url("+S+"#"+h+"-arrowhead)"),T.attr("marker-end","url("+S+"#"+h+"-arrowhead)");if(f===a.db.LINETYPE.SOLID_POINT||f===a.db.LINETYPE.DOTTED_POINT)T.attr("marker-end","url("+S+"#"+h+"-filled-head)");if(f===a.db.LINETYPE.SOLID_CROSS||f===a.db.LINETYPE.DOTTED_CROSS)T.attr("marker-end","url("+S+"#"+h+"-crosshead)");if(g||d.showSequenceNumbers){let I=f===a.db.LINETYPE.BIDIRECTIONAL_SOLID||f===a.db.LINETYPE.BIDIRECTIONAL_DOTTED,N=f===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,D=6,k=pe(n,a),B=i,Y=o;if(I){if(i<o)B=i+12;else B=i-6+(k?-5:0),B+=n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_DUAL||n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0;T.attr("x1",B)}else if(N){if(o>i)Y=o-12;else Y=o-6,B+=n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_DUAL||n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0;Y+=k?15:0,T.attr("x2",Y),T.attr("x1",B)}else T.attr("x1",i+6);let X=0,J=i===o,tt=i<=o;if(J)X=e.fromBounds+1;else if(N)X=tt?e.toBounds-1:e.fromBounds+1;else X=tt?e.fromBounds+1:e.toBounds-1;let it="12px",ct=_.toString().length;if(ct>5)it="7px";else if(ct>3)it="9px";r.append("line").attr("x1",X).attr("y1",s).attr("x2",X).attr("y2",s).attr("stroke-width",0).attr("marker-start","url("+S+"#"+h+"-sequencenumber)"),r.append("text").attr("x",X).attr("y",s+4).attr("font-family","sans-serif").attr("font-size",it).attr("text-anchor","middle").attr("class","sequenceNumber").text(_)}},"drawMessage"),aa=t(function(r,e,s,a,n,h,i){let o=0,u=0,p=void 0,f=0;for(let _ of a){let g=e.get(_),A=g.box;if(p&&p!=A){if(!i)R.models.addBox(p);u+=d.boxMargin+p.margin}if(A&&A!=p){if(!i)A.x=o+u,A.y=n;u+=A.margin}if(g.width=w.getMax(g.width||d.width,d.width),g.height=w.getMax(g.height||d.height,d.height),g.margin=g.margin||d.actorMargin,f=w.getMax(f,g.height),s.get(g.name))u+=g.width/2;if(g.x=o+u,g.starty=R.getVerticalPos(),R.insert(g.x,n,g.x+g.width,g.height),o+=g.width+u,g.box)g.box.width=o+A.margin-g.box.x;u=g.margin,p=g.box,R.models.addActor(g)}if(p&&!i)R.models.addBox(p);R.bumpVerticalPos(f)},"addActorRenderingData"),fe=t(async function(r,e,s,a,n,h,i){if(!a)for(let o of s){let u=e.get(o);await st.drawActor(r,u,d,!1,n,h,i)}else{let o=0;R.bumpVerticalPos(d.boxMargin*2);for(let u of s){let p=e.get(u);if(!p.stopy)p.stopy=R.getVerticalPos();let f=await st.drawActor(r,p,d,!0,n,h,i);o=w.getMax(o,f)}R.bumpVerticalPos(o+d.boxMargin)}},"drawActors"),rr=t(function(r,e,s,a){let n=0,h=0;for(let i of s){let o=e.get(i),u=ia(o),p=st.drawPopup(r,o,u,d,d.forceMenus,a);if(p.height>n)n=p.height;if(p.width+o.x>h)h=p.width+o.x}return{maxHeight:n,maxWidth:h}},"drawActorsPopup"),ar=t(function(r){if(ot(d,r),r.fontFamily)d.actorFontFamily=d.noteFontFamily=d.messageFontFamily=r.fontFamily;if(r.fontSize)d.actorFontSize=d.noteFontSize=d.messageFontSize=r.fontSize;if(r.fontWeight)d.actorFontWeight=d.noteFontWeight=d.messageFontWeight=r.fontWeight},"setConf"),ae=t(function(r){return R.activations.filter(function(e){return e.actor===r})},"actorActivations"),Xe=t(function(r,e){let s=e.get(r),a=ae(r),n=a.reduce(function(i,o){return w.getMin(i,o.startx)},s.x+s.width/2-1),h=a.reduce(function(i,o){return w.getMax(i,o.stopx)},s.x+s.width/2+1);return[n,h]},"activationBounds");function It(r,e,s,a,n){R.bumpVerticalPos(s);let h=a;if(e.id&&e.message&&r[e.id]){let i=r[e.id].width,o=vt(d);e.message=V.wrapLabel(`[${e.message}]`,i-2*d.wrapPadding,o),e.width=i,e.wrap=!0;let u=V.calculateTextDimensions(e.message,o),p=w.getMax(u.height,d.labelBoxHeight);h=a+p,l.debug(`${p} - ${e.message}`)}n(e),R.bumpVerticalPos(h)}t(It,"adjustLoopHeightForWrap");function sr(r,e,s,a,n,h,i){function o(f,_){if(f.x<n.get(r.from).x)R.insert(e.stopx-_,e.starty,e.startx,e.stopy+f.height/2+d.noteMargin),e.stopx=e.stopx+_;else R.insert(e.startx,e.starty,e.stopx+_,e.stopy+f.height/2+d.noteMargin),e.stopx=e.stopx-_}t(o,"receiverAdjustment");function u(f,_){if(f.x<n.get(r.to).x)R.insert(e.startx-_,e.starty,e.stopx,e.stopy+f.height/2+d.noteMargin),e.startx=e.startx+_;else R.insert(e.stopx,e.starty,e.startx+_,e.stopy+f.height/2+d.noteMargin),e.startx=e.startx-_}t(u,"senderAdjustment");let p=[Jt.ACTOR,Jt.CONTROL,Jt.ENTITY,Jt.DATABASE];if(h.get(r.to)==a){let f=n.get(r.to),_=p.includes(f.type)?wt/2+3:f.width/2+3;o(f,_),f.starty=s-f.height/2,R.bumpVerticalPos(f.height/2)}else if(i.get(r.from)==a){let f=n.get(r.from);if(d.mirrorActors){let _=p.includes(f.type)?wt/2:f.width/2;u(f,_)}f.stopy=s-f.height/2,R.bumpVerticalPos(f.height/2)}else if(i.get(r.to)==a){let f=n.get(r.to);if(d.mirrorActors){let _=p.includes(f.type)?wt/2+3:f.width/2+3;o(f,_)}f.stopy=s-f.height/2,R.bumpVerticalPos(f.height/2)}}t(sr,"adjustCreatedDestroyedData");var sa=t(async function(r,e,s,a){let{securityLevel:n,sequence:h,look:i,themeVariables:o}=m();d=h;let u;if(n==="sandbox")u=b("#i"+e);let p=n==="sandbox"?b(u.nodes()[0].contentDocument.body):b("body"),f=n==="sandbox"?u.nodes()[0].contentDocument:document;R.init(),l.debug(a.db);let _=n==="sandbox"?p.select(`[id="${e}"]`):b(`[id="${e}"]`),g=a.db.getActors(),A=a.db.getCreatedActors(),x=a.db.getDestroyedActors(),L=a.db.getBoxes(),T=a.db.getActorKeys(),S=a.db.getMessages(),I=a.db.getDiagramTitle(),N=a.db.hasAtLeastOneBox(),D=a.db.hasAtLeastOneBoxWithTitle(),k=await ir(g,S,a);if(d.height=await nr(g,k,L),st.insertComputerIcon(_,e),st.insertDatabaseIcon(_,e),st.insertClockIcon(_,e),N){if(R.bumpVerticalPos(d.boxMargin),D)R.bumpVerticalPos(L[0].textMaxHeight)}if(d.hideUnusedParticipants===!0){let P=new Set;S.forEach((K)=>{P.add(K.from),P.add(K.to)}),T=T.filter((K)=>P.has(K))}let B=new Map(T.map((P,K)=>[g.get(P)?.name??P,K]));aa(_,g,A,T,0,S,!1);let Y=await Ta(S,g,k,a);if(st.insertArrowHead(_,e),st.insertArrowCrossHead(_,e),st.insertArrowFilledHead(_,e),st.insertSequenceNumber(_,e),st.insertSolidTopArrowHead(_,e),st.insertSolidBottomArrowHead(_,e),st.insertStickTopArrowHead(_,e),st.insertStickBottomArrowHead(_,e),i==="neo")st.insertDropShadow(_,d,e);function X(P,K){let bt=R.endActivation(P);if(bt.starty+18>K)bt.starty=K-6,K+=12;st.drawActivation(_,bt,K,d,ae(P.from).length,a,B),R.insert(bt.startx,K-10,bt.stopx,K)}t(X,"activeEnd");let J=1,tt=1,it=[],ct=[],Tt=0;for(let P of S){let K,bt,ut;switch(P.type){case a.db.LINETYPE.NOTE:R.resetVerticalPos(),bt=P.noteModel,await ea(_,bt,P.id);break;case a.db.LINETYPE.ACTIVE_START:R.newActivation(P,_,g);break;case a.db.LINETYPE.CENTRAL_CONNECTION:R.newActivation(P,_,g);break;case a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:R.newActivation(P,_,g);break;case a.db.LINETYPE.ACTIVE_END:X(P,R.getVerticalPos());break;case a.db.LINETYPE.LOOP_START:It(Y,P,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>R.newLoop(et));break;case a.db.LINETYPE.LOOP_END:K=R.endLoop(),await st.drawLoop(_,K,"loop",d,P),R.bumpVerticalPos(K.stopy-R.getVerticalPos()),R.models.addLoop(K);break;case a.db.LINETYPE.RECT_START:It(Y,P,d.boxMargin,d.boxMargin,(et)=>{let Ct=et.message;if(!Ct)Ct=o?.rectBkgColor||o?.actorBkg||"rgba(128, 128, 128, 0.5)";R.newLoop(void 0,Ct)});break;case a.db.LINETYPE.RECT_END:K=R.endLoop(),ct.push(K),R.models.addLoop(K),R.bumpVerticalPos(K.stopy-R.getVerticalPos());break;case a.db.LINETYPE.OPT_START:It(Y,P,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>R.newLoop(et));break;case a.db.LINETYPE.OPT_END:K=R.endLoop(),await st.drawLoop(_,K,"opt",d,P),R.bumpVerticalPos(K.stopy-R.getVerticalPos()),R.models.addLoop(K);break;case a.db.LINETYPE.ALT_START:It(Y,P,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>R.newLoop(et));break;case a.db.LINETYPE.ALT_ELSE:It(Y,P,d.boxMargin+d.boxTextMargin,d.boxMargin,(et)=>R.addSectionToLoop(et));break;case a.db.LINETYPE.ALT_END:K=R.endLoop(),await st.drawLoop(_,K,"alt",d,P),R.bumpVerticalPos(K.stopy-R.getVerticalPos()),R.models.addLoop(K);break;case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:It(Y,P,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>R.newLoop(et)),R.saveVerticalPos();break;case a.db.LINETYPE.PAR_AND:It(Y,P,d.boxMargin+d.boxTextMargin,d.boxMargin,(et)=>R.addSectionToLoop(et));break;case a.db.LINETYPE.PAR_END:K=R.endLoop(),await st.drawLoop(_,K,"par",d,P),R.bumpVerticalPos(K.stopy-R.getVerticalPos()),R.models.addLoop(K);break;case a.db.LINETYPE.AUTONUMBER:if(J=P.message.start||J,tt=P.message.step||tt,P.message.visible)a.db.enableSequenceNumbers();else a.db.disableSequenceNumbers();break;case a.db.LINETYPE.CRITICAL_START:It(Y,P,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>R.newLoop(et));break;case a.db.LINETYPE.CRITICAL_OPTION:It(Y,P,d.boxMargin+d.boxTextMargin,d.boxMargin,(et)=>R.addSectionToLoop(et));break;case a.db.LINETYPE.CRITICAL_END:K=R.endLoop(),await st.drawLoop(_,K,"critical",d,P),R.bumpVerticalPos(K.stopy-R.getVerticalPos()),R.models.addLoop(K);break;case a.db.LINETYPE.BREAK_START:It(Y,P,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>R.newLoop(et));break;case a.db.LINETYPE.BREAK_END:K=R.endLoop(),await st.drawLoop(_,K,"break",d,P),R.bumpVerticalPos(K.stopy-R.getVerticalPos()),R.models.addLoop(K);break;default:try{ut=P.msgModel,ut.starty=R.getVerticalPos(),ut.sequenceIndex=J,ut.sequenceVisible=a.db.showSequenceNumbers(),ut.id=P.id,ut.from=P.from,ut.to=P.to;let et=await er(_,ut);sr(P,ut,et,Tt,g,A,x),it.push({messageModel:ut,lineStartY:et,msg:P}),R.models.addMessage(ut)}catch(et){l.error("error while drawing message",et)}}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(P.type))J=Math.round((J+tt)*100)/100;Tt++}l.debug("createdActors",A),l.debug("destroyedActors",x),await fe(_,g,T,!1,e,a,B);for(let P of it)await ra(_,P.messageModel,P.lineStartY,a,P.msg,e);if(d.mirrorActors)await fe(_,g,T,!0,e,a,B);ct.forEach((P)=>st.drawBackgroundRect(_,P)),$e(_,g,T,d);for(let P of R.models.boxes){P.height=R.getVerticalPos()-P.y,R.insert(P.x,P.y,P.x+P.width,P.height);let K=d.boxMargin*2;P.startx=P.x-K,P.starty=P.y-K*0.25,P.stopx=P.startx+P.width+2*K,P.stopy=P.starty+P.height+K*0.75,P.stroke="rgb(0,0,0, 0.5)",st.drawBox(_,P,d)}if(N)R.bumpVerticalPos(d.boxMargin);let pt=rr(_,g,T,f),{bounds:nt}=R.getBounds();if(nt.startx===void 0)nt.startx=0;if(nt.starty===void 0)nt.starty=0;if(nt.stopx===void 0)nt.stopx=0;if(nt.stopy===void 0)nt.stopy=0;let ft=nt.stopy-nt.starty;if(ft<pt.maxHeight)ft=pt.maxHeight;let Et=ft+2*d.diagramMarginY;if(d.mirrorActors)Et=Et-d.boxMargin+d.bottomMarginAdj;let Z=nt.stopx-nt.startx;if(Z<pt.maxWidth)Z=pt.maxWidth;let U=Z+2*d.diagramMarginX;if(I)_.append("text").text(I).attr("x",(nt.stopx-nt.startx)/2-2*d.diagramMarginX).attr("y",-25);ne(_,Et,U,d.useMaxWidth);let Vt=I?40:0,qt=g.size&&i==="neo"?30:0;_.attr("viewBox",nt.startx-d.diagramMarginX+" -"+(d.diagramMarginY+Vt)+" "+U+" "+(Et+Vt+qt)),l.debug("models:",R.models)},"draw");async function ir(r,e,s){let a={};for(let n of e)if(r.get(n.to)&&r.get(n.from)){let h=r.get(n.to);if(n.placement===s.db.PLACEMENT.LEFTOF&&!h.prevActor)continue;if(n.placement===s.db.PLACEMENT.RIGHTOF&&!h.nextActor)continue;let i=n.placement!==void 0,o=!i,u=i?Bt(d):vt(d),p=n.wrap?V.wrapLabel(n.message,d.width-2*d.wrapPadding,u):n.message,_=(Dt(p)?await uc(n.message,m()):V.calculateTextDimensions(p,u)).width+2*d.wrapPadding;if(o&&n.from===h.nextActor)a[n.to]=w.getMax(a[n.to]||0,_);else if(o&&n.from===h.prevActor)a[n.from]=w.getMax(a[n.from]||0,_);else if(o&&n.from===n.to)a[n.from]=w.getMax(a[n.from]||0,_/2),a[n.to]=w.getMax(a[n.to]||0,_/2);else if(n.placement===s.db.PLACEMENT.RIGHTOF)a[n.from]=w.getMax(a[n.from]||0,_);else if(n.placement===s.db.PLACEMENT.LEFTOF)a[h.prevActor]=w.getMax(a[h.prevActor]||0,_);else if(n.placement===s.db.PLACEMENT.OVER){if(h.prevActor)a[h.prevActor]=w.getMax(a[h.prevActor]||0,_/2);if(h.nextActor)a[n.from]=w.getMax(a[n.from]||0,_/2)}}return l.debug("maxMessageWidthPerActor:",a),a}t(ir,"getMaxMessageWidthPerActor");var ia=t(function(r){let e=0,s=ue(d);for(let a in r.links){let h=V.calculateTextDimensions(a,s).width+2*d.wrapPadding+2*d.boxMargin;if(e<h)e=h}return e},"getRequiredPopupWidth");async function nr(r,e,s){let a=0;for(let h of r.keys()){let i=r.get(h);if(i.wrap)i.description=V.wrapLabel(i.description,d.width-2*d.wrapPadding,ue(d));let o=Dt(i.description)?await uc(i.description,m()):V.calculateTextDimensions(i.description,ue(d));if(i.width=i.wrap?d.width:w.getMax(d.width,o.width+2*d.wrapPadding),m().look==="neo")i.actorTextHeight=o.height,i.height=w.getMax(Qe(o.height),d.height);else i.height=i.wrap?w.getMax(o.height,d.height):d.height;a=w.getMax(a,i.height)}for(let h in e){let i=r.get(h);if(!i)continue;let o=r.get(i.nextActor);if(!o){let _=e[h]+d.actorMargin-i.width/2;i.margin=w.getMax(_,d.actorMargin);continue}let p=e[h]+d.actorMargin-i.width/2-o.width/2;i.margin=w.getMax(p,d.actorMargin)}let n=0;return s.forEach((h)=>{let i=vt(d),o=h.actorKeys.reduce((_,g)=>_+=r.get(g).width+(r.get(g).margin||0),0),u=d.boxMargin*8;if(o+=u,o-=2*d.boxTextMargin,h.wrap)h.name=V.wrapLabel(h.name,o-2*d.wrapPadding,i);let p=V.calculateTextDimensions(h.name,i);n=w.getMax(p.height,n);let f=w.getMax(o,p.width+2*d.wrapPadding);if(h.margin=d.boxTextMargin,o<f){let _=(f-o)/2;h.margin+=_}}),s.forEach((h)=>h.textMaxHeight=n),w.getMax(a,d.height)}t(nr,"calculateActorMargins");var na=t(async function(r,e,s){let a=e.get(r.from),n=e.get(r.to),h=a.x,i=n.x,o=r.wrap&&r.message,u=Dt(r.message)?await uc(r.message,m()):V.calculateTextDimensions(o?V.wrapLabel(r.message,d.width,Bt(d)):r.message,Bt(d)),p={width:o?d.width:w.getMax(d.width,u.width+2*d.noteMargin),height:0,startx:a.x,stopx:0,starty:0,stopy:0,message:r.message};if(r.placement===s.db.PLACEMENT.RIGHTOF)p.width=o?w.getMax(d.width,u.width):w.getMax(a.width/2+n.width/2,u.width+2*d.noteMargin),p.startx=h+(a.width+d.actorMargin)/2;else if(r.placement===s.db.PLACEMENT.LEFTOF)p.width=o?w.getMax(d.width,u.width+2*d.noteMargin):w.getMax(a.width/2+n.width/2,u.width+2*d.noteMargin),p.startx=h-p.width+(a.width-d.actorMargin)/2;else if(r.to===r.from)u=V.calculateTextDimensions(o?V.wrapLabel(r.message,w.getMax(d.width,a.width),Bt(d)):r.message,Bt(d)),p.width=o?w.getMax(d.width,a.width):w.getMax(a.width,d.width,u.width+2*d.noteMargin),p.startx=h+(a.width-p.width)/2;else p.width=Math.abs(h+a.width/2-(i+n.width/2))+d.actorMargin,p.startx=h<i?h+a.width/2-d.actorMargin/2:i+n.width/2-d.actorMargin/2;if(o)p.message=V.wrapLabel(r.message,p.width-2*d.wrapPadding,Bt(d));return l.debug(`NM:[${p.startx},${p.stopx},${p.starty},${p.stopy}:${p.width},${p.height}=${r.message}]`),p},"buildNoteModel"),oa=4,ca=6,pe=t(function(r,e){let{CENTRAL_CONNECTION:s,CENTRAL_CONNECTION_REVERSE:a,CENTRAL_CONNECTION_DUAL:n}=e.db.LINETYPE;return[s,a,n].includes(r.centralConnection)},"hasCentralConnection"),la=t(function(r,e,s){let{CENTRAL_CONNECTION_REVERSE:a,CENTRAL_CONNECTION_DUAL:n,BIDIRECTIONAL_SOLID:h,BIDIRECTIONAL_DOTTED:i}=e.db.LINETYPE,o=0;if(r.centralConnection===a||r.centralConnection===n)o+=oa;if((r.centralConnection===a||r.centralConnection===n)&&(r.type===h||r.type===i))o+=s?0:-ca;return o},"calculateCentralConnectionOffset"),or=t(function(r,e){let{SOLID_ARROW_TOP_REVERSE:s,SOLID_ARROW_TOP_REVERSE_DOTTED:a,SOLID_ARROW_BOTTOM_REVERSE:n,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:h,STICK_ARROW_TOP_REVERSE:i,STICK_ARROW_TOP_REVERSE_DOTTED:o,STICK_ARROW_BOTTOM_REVERSE:u,STICK_ARROW_BOTTOM_REVERSE_DOTTED:p}=e.db.LINETYPE;return[s,a,n,h,i,o,u,p].includes(r.type)},"isReverseArrowType"),ha=t(function(r,e){let{BIDIRECTIONAL_SOLID:s,BIDIRECTIONAL_DOTTED:a}=e.db.LINETYPE;return[s,a].includes(r.type)},"isBidirectionalArrowType"),da=t(function(r,e,s){let{look:a}=m();if(![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(r.type))return{};let[n,h]=Xe(r.from,e),[i,o]=Xe(r.to,e),u=n<=i,p=u?h:n,f=u?i:o;if(a==="neo"){if(r.type!==s.db.LINETYPE.SOLID_OPEN)f+=u?-3:3;if(r.type===s.db.LINETYPE.BIDIRECTIONAL_SOLID||r.type===s.db.LINETYPE.BIDIRECTIONAL_DOTTED)p+=u?3:-3}p+=la(r,s,u);let _=Math.abs(i-o)>2,g=t((T)=>u?-T:T,"adjustValue");if(r.from===r.to)f=p;else{if(r.activate&&!_)f+=g(d.activationWidth/2-1);if(![s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.STICK_TOP,s.db.LINETYPE.STICK_BOTTOM,s.db.LINETYPE.STICK_TOP_DOTTED,s.db.LINETYPE.STICK_BOTTOM_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(r.type))f+=g(3);if([s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(r.type))p-=g(3)}let A=[n,h,i,o],x=Math.abs(p-f);if(r.wrap&&r.message)r.message=V.wrapLabel(r.message,w.getMax(x+2*d.wrapPadding,d.width),vt(d));let L=V.calculateTextDimensions(r.message,vt(d));return{width:w.getMax(r.wrap?0:L.width+2*d.wrapPadding,x+2*d.wrapPadding,d.width),height:0,startx:p,stopx:f,starty:0,stopy:0,message:r.message,type:r.type,wrap:r.wrap,fromBounds:Math.min.apply(null,A),toBounds:Math.max.apply(null,A)}},"buildMessageModel"),Ta=t(async function(r,e,s,a){let n={},h=[],i,o,u;for(let p of r){switch(p.type){case a.db.LINETYPE.LOOP_START:case a.db.LINETYPE.ALT_START:case a.db.LINETYPE.OPT_START:case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:case a.db.LINETYPE.CRITICAL_START:case a.db.LINETYPE.BREAK_START:h.push({id:p.id,msg:p.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case a.db.LINETYPE.ALT_ELSE:case a.db.LINETYPE.PAR_AND:case a.db.LINETYPE.CRITICAL_OPTION:if(p.message)i=h.pop(),n[i.id]=i,n[p.id]=i,h.push(i);break;case a.db.LINETYPE.LOOP_END:case a.db.LINETYPE.ALT_END:case a.db.LINETYPE.OPT_END:case a.db.LINETYPE.PAR_END:case a.db.LINETYPE.CRITICAL_END:case a.db.LINETYPE.BREAK_END:i=h.pop(),n[i.id]=i;break;case a.db.LINETYPE.ACTIVE_START:{let _=e.get(p.from?p.from:p.to.actor),g=ae(p.from?p.from:p.to.actor).length,A=_.x+_.width/2+(g-1)*d.activationWidth/2,x={startx:A,stopx:A+d.activationWidth,actor:p.from,enabled:!0};R.activations.push(x)}break;case a.db.LINETYPE.ACTIVE_END:{let _=R.activations.map((g)=>g.actor).lastIndexOf(p.from);R.activations.splice(_,1).splice(0,1)}break}if(p.placement!==void 0)o=await na(p,e,a),p.noteModel=o,h.forEach((_)=>{i=_,i.from=w.getMin(i.from,o.startx),i.to=w.getMax(i.to,o.startx+o.width),i.width=w.getMax(i.width,Math.abs(i.from-i.to))-d.labelBoxWidth});else if(u=da(p,e,a),p.msgModel=u,u.startx&&u.stopx&&h.length>0)h.forEach((_)=>{if(i=_,u.startx===u.stopx){let g=e.get(p.from),A=e.get(p.to);i.from=w.getMin(g.x-u.width/2,g.x-g.width/2,i.from),i.to=w.getMax(A.x+u.width/2,A.x+g.width/2,i.to),i.width=w.getMax(i.width,Math.abs(i.to-i.from))-d.labelBoxWidth}else i.from=w.getMin(u.startx,i.from),i.to=w.getMax(u.stopx,i.to),i.width=w.getMax(i.width,u.width)-d.labelBoxWidth})}return R.activations=[],l.debug("Loop type widths:",n),n},"calculateLoopBounds"),pa={bounds:R,drawActors:fe,drawActorsPopup:rr,setConf:ar,draw:sa},Ra={parser:Er,get db(){return new xr},renderer:pa,styles:Ir,init:t((r)=>{if(!r.sequence)r.sequence={};if(r.wrap)r.sequence.wrap=r.wrap,va({sequence:{wrap:r.wrap}})},"init")};export{Ra as diagram};
|
|
169
|
+
`;if(J.append("path").attr("d",tt),g==="neo")J.attr("filter",`url(#${At(n)})`);let it=h.get(e.name)??0;if(Rt.has(f))J.style("stroke",lt(x,it)),J.style("fill",lt(A,it));else J.style("stroke",L);if(J.attr("transform",`translate(${D}, ${B})`),e.rectData=I,Ot(s,Dt(e.description))(e.description,S,I.x,u?u.labelCenterY-I.height/2:I.y+35,I.width,I.height,{class:`actor ${ee}`},s),!u){let ct=J.select("path:last-child");if(ct.node()){let Tt=ct.node().getBBox();e.height=Tt.height+(s.sequence.labelBoxHeight??0)}}if(!a)S.attr("data-et","participant"),S.attr("data-type","database"),S.attr("data-id",e.name);return e.height},"drawActorTypeDatabase"),vr=t(function(r,e,s,a,n,h){let i=a?e.stopy:e.starty,o=e.x+e.width/2,u=Ft(e,s,a,i),p=u?u.lifelineStartY:i+80,f=22,_=u?u.glyphBottomY-22:i+12,g=r.append("g").lower(),{look:A,theme:x,themeVariables:L}=s,{bkgColorArray:T,borderColorArray:S,actorBorder:I}=L;if(!a)Q++,g.append("line").attr("id","actor"+Q).attr("x1",o).attr("y1",p).attr("x2",o).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;let N=r.append("g"),D=Pt;if(a)D+=` ${St}`;else D+=` ${mt}`;N.attr("class",D),N.attr("name",e.name);let k=gr();if(k.x=e.x,k.y=i,k.fill="#eaeaea",k.width=e.width,k.height=e.height,k.class="actor",N.append("line").attr("id","actor-man-torso"+Q).attr("x1",e.x+e.width/2-55).attr("y1",_).attr("x2",e.x+e.width/2-15).attr("y2",_),N.append("line").attr("id","actor-man-arms"+Q).attr("x1",e.x+e.width/2-55).attr("y1",_-10).attr("x2",e.x+e.width/2-55).attr("y2",_+10),N.append("circle").attr("cx",e.x+e.width/2).attr("cy",_).attr("r",22),A==="neo")N.attr("filter",`url(#${At(n)})`);let B=h.get(e.name)??0;if(Rt.has(x))N.style("stroke",lt(S,B)),N.style("fill",lt(T,B));else N.style("stroke",I);if(!u){let Y=N.node().getBBox();e.height=Y.height+(s.sequence.labelBoxHeight??0)}if(Ot(s,Dt(e.description))(e.description,N,k.x,u?u.labelCenterY-k.height/2:k.y+15,k.width,k.height,{class:`actor ${Pt}`},s),!u)N.attr("transform","translate(0,21)");if(!a)N.attr("data-et","participant"),N.attr("data-type","boundary"),N.attr("data-id",e.name);return e.height},"drawActorTypeBoundary"),Cr=t(function(r,e,s,a,n){let h=a?e.stopy:e.starty,i=e.x+e.width/2,o=Ft(e,s,a,h),u=o?o.lifelineStartY:h+80,{theme:p,themeVariables:f}=s,{bkgColorArray:_,borderColorArray:g,actorBorder:A}=f,x=r.append("g").lower();if(!a)Q++,x.append("line").attr("id","actor"+Q).attr("x1",i).attr("y1",u).attr("x2",i).attr("y2",2000).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Q;let L=r.append("g"),T=Pt;if(a)T+=` ${St}`;else T+=` ${mt}`;if(L.attr("class",T),L.attr("name",e.name),!a)L.attr("data-et","participant").attr("data-type","actor").attr("data-id",e.name);let S=o?jt/Ue:1,I=t((Y)=>o?o.glyphBottomY-(Je-Y)*S:h+Y,"gy"),N=t((Y)=>i+Y*S,"gx");L.append("line").attr("id","actor-man-torso"+Q).attr("x1",i).attr("y1",I(25)).attr("x2",i).attr("y2",I(45)),L.append("line").attr("id","actor-man-arms"+Q).attr("x1",N(-wt/2)).attr("y1",I(33)).attr("x2",N(wt/2)).attr("y2",I(33)),L.append("line").attr("x1",N(-wt/2)).attr("y1",I(60)).attr("x2",i).attr("y2",I(45)),L.append("line").attr("x1",i).attr("y1",I(45)).attr("x2",N(wt/2-2)).attr("y2",I(60));let D=L.append("circle");if(D.attr("cx",e.x+e.width/2),D.attr("cy",I(10)),D.attr("r",15*S),D.attr("width",e.width),D.attr("height",e.height),!o)e.height=Ue;let k=gr();k.x=e.x,k.y=h,k.fill="#eaeaea",k.width=e.width,k.height=e.height,k.class="actor",k.rx=3,k.ry=3;let B=n.get(e.name)??0;if(Rt.has(p))L.style("stroke",lt(g,B)),L.style("fill",lt(_,B));else L.style("stroke",A);return Ot(s,Dt(e.description))(e.description,L,k.x,o?o.labelCenterY-k.height/2:h+35,k.width,k.height,{class:`actor ${Pt}`},s),e.height},"drawActorTypeActor"),Mr=t(async function(r,e,s,a,n,h,i){let o=i??new Map([...h.db.getActors().values()].map((u,p)=>[u.name,p]));switch(e.type){case"actor":return await Cr(r,e,s,a,o);case"participant":return await Sr(r,e,s,a,n,o);case"boundary":return await vr(r,e,s,a,n,o);case"control":return await wr(r,e,s,a,n,o);case"entity":return await Pr(r,e,s,a,n,o);case"database":return await Dr(r,e,s,a,n,o);case"collections":return await kr(r,e,s,a,n,o);case"queue":return await Nr(r,e,s,a,n,o)}},"drawActor"),Br=t(function(r,e,s){let n=r.append("g");if(je(n,e),e.name)Ot(s)(e.name,n,e.x,e.y+s.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},s);n.lower()},"drawBox"),Yr=t(function(r){return r.append("g")},"anchorElement"),Vr=t(function(r,e,s,a,n,h,i){let{theme:o,themeVariables:u}=a,{bkgColorArray:p,borderColorArray:f,mainBkg:_}=u,g=gr(),{anchored:A,actor:x}=e;g.x=e.startx,g.y=e.starty,g.class="activation"+n%3,g.width=e.stopx-e.startx,g.height=s-e.starty;let L=Ht(A,g),S=(i??new Map([...h.db.getActors().values()].map((I,N)=>[I.name,N]))).get(x)??0;if(Rt.has(o))L.style("stroke",lt(f,S)),L.style("fill",lt(p,S)??_)},"drawActivation"),Wr=t(async function(r,e,s,a,n){let{boxMargin:h,boxTextMargin:i,labelBoxHeight:o,labelBoxWidth:u,messageFontFamily:p,messageFontSize:f,messageFontWeight:_}=a,g=r.append("g").attr("data-et","control-structure").attr("data-id","i"+n.id),A=t(function(T,S,I,N){return g.append("line").attr("x1",T).attr("y1",S).attr("x2",I).attr("y2",N).attr("class","loopLine")},"drawLoopLine");if(A(e.startx,e.starty,e.stopx,e.starty),A(e.stopx,e.starty,e.stopx,e.stopy),A(e.startx,e.stopy,e.stopx,e.stopy),A(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0)e.sections.forEach(function(T){A(e.startx,T.y,e.stopx,T.y).style("stroke-dasharray","3, 3")});let x=Hp();x.text=s,x.x=e.startx,x.y=e.starty,x.fontFamily=p,x.fontSize=f,x.fontWeight=_,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=Math.max(u??0,50),x.height=o+(a.look==="neo"?15:0)||20,x.textMargin=i,x.class="labelText",Ze(g,x),x=tr(),x.text=e.title,x.x=e.startx+u/2+(e.stopx-e.startx)/2,x.y=e.starty+h+i,x.anchor="middle",x.valign="middle",x.textMargin=i,x.class="loopText",x.fontFamily=p,x.fontSize=f,x.fontWeight=_,x.wrap=!0;let L=Dt(x.text)?await $t(g,x,e):Yt(g,x);if(e.sectionTitles!==void 0){for(let[T,S]of Object.entries(e.sectionTitles))if(S.message){if(x.text=S.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[T].y+h+i,x.class="sectionTitle",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=p,x.fontSize=f,x.fontWeight=_,x.wrap=e.wrap,Dt(x.text))e.starty=e.sections[T].y,await $t(g,x,e);else Yt(g,x);let I=Math.round(L.map((N)=>(N._groups||N)[0][0].getBBox().height).reduce((N,D)=>N+D));e.sections[T].height+=I-(h+i)}}return e.height=Math.round(e.stopy-e.starty),g},"drawLoop"),je=t(function(r,e){ld(r,e)},"drawBackgroundRect"),Kr=t(function(r,e){r.append("defs").append("symbol").attr("id",e+"-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"),Hr=t(function(r,e){r.append("defs").append("symbol").attr("id",e+"-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"),Fr=t(function(r,e){r.append("defs").append("symbol").attr("id",e+"-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"),qr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),zr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),Ur=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),Gr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),At=t((r)=>r?`${r}-drop-shadow`:"drop-shadow","dropShadowId"),Xr=t(function(r,e,s){let{theme:a}=e;r.append("defs").append("filter").attr("id",At(s)).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a==="redux"||a==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),tr=t(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"),Qr=t(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Ot=function(){function r(h,i,o,u,p,f,_){let g=i.append("text").attr("x",o+p/2).attr("y",u+f/2+5).style("text-anchor","middle").text(h);n(g,_)}t(r,"byText");function e(h,i,o,u,p,f,_,g){let{actorFontSize:A,actorFontFamily:x,actorFontWeight:L}=g,[T,S]=jn(A),I=h.split(w.lineBreakRegex);for(let N=0;N<I.length;N++){let D=N*T-T*(I.length-1)/2,k=i.append("text").attr("x",o+p/2).attr("y",u).style("text-anchor","middle").style("font-size",S).style("font-weight",L).style("font-family",x);k.append("tspan").attr("x",o+p/2).attr("dy",D).text(I[N]),k.attr("y",u+f/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(k,_)}}t(e,"byTspan");function s(h,i,o,u,p,f,_,g){let A=i.append("switch"),L=A.append("foreignObject").attr("x",o).attr("y",u).attr("width",p).attr("height",f).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");L.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(h),e(h,A,o,u,p,f,_,g),n(L,_)}t(s,"byFo");async function a(h,i,o,u,p,f,_,g){let A=await uc(h,C()),x=i.append("switch"),T=x.append("foreignObject").attr("x",o+p/2-A.width/2).attr("y",u+f/2-A.height/2).attr("width",A.width).attr("height",A.height).append("xhtml:div").style("height","100%").style("width","100%");T.append("div").style("text-align","center").style("vertical-align","middle").html(await dc(h,C())),e(h,x,o,u,p,f,_,g),n(T,_)}t(a,"byKatex");function n(h,i){for(let o in i)if(i.hasOwnProperty(o))h.attr(o,i[o])}return t(n,"_setTextAttrs"),function(h,i=!1){if(i)return a;return h.textPlacement==="fo"?s:h.textPlacement==="old"?r:e}}(),Jr=function(){function r(n,h,i,o,u,p,f){let _=h.append("text").attr("x",i).attr("y",o).style("text-anchor","start").text(n);a(_,f)}t(r,"byText");function e(n,h,i,o,u,p,f,_){let{actorFontSize:g,actorFontFamily:A,actorFontWeight:x}=_,L=n.split(w.lineBreakRegex);for(let T=0;T<L.length;T++){let S=T*g-g*(L.length-1)/2,I=h.append("text").attr("x",i).attr("y",o).style("text-anchor","start").style("font-size",g).style("font-weight",x).style("font-family",A);I.append("tspan").attr("x",i).attr("dy",S).text(L[T]),I.attr("y",o+p/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(I,f)}}t(e,"byTspan");function s(n,h,i,o,u,p,f,_){let g=h.append("switch"),x=g.append("foreignObject").attr("x",i).attr("y",o).attr("width",u).attr("height",p).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");x.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,g,i,o,u,p,f,_),a(x,f)}t(s,"byFo");function a(n,h){for(let i in h)if(h.hasOwnProperty(i))n.attr(i,h[i])}return t(a,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?s:n.textPlacement==="old"?r:e}}(),Zr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),$r=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",0.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"),jr=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),ta=t(function(r,e){r.append("defs").append("marker").attr("id",e+"-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"),st={drawRect:Ht,drawText:Yt,drawLabel:Ze,drawActor:Mr,drawBox:Br,drawPopup:mr,anchorElement:Yr,drawActivation:Vr,drawLoop:Wr,drawBackgroundRect:je,insertArrowHead:qr,insertArrowFilledHead:zr,insertSequenceNumber:Ur,insertArrowCrossHead:Gr,insertDatabaseIcon:Kr,insertComputerIcon:Hr,insertClockIcon:Fr,getTextObj:tr,getNoteRect:Qr,fixLifeLineHeights:$e,sanitizeUrl:_e.sanitizeUrl,insertDropShadow:Xr,insertSolidTopArrowHead:Zr,insertSolidBottomArrowHead:$r,insertStickTopArrowHead:jr,insertStickBottomArrowHead:ta},d={},R={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:t(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map((r)=>r.height||0))+(this.loops.length===0?0:this.loops.map((r)=>r.height||0).reduce((r,e)=>r+e))+(this.messages.length===0?0:this.messages.map((r)=>r.height||0).reduce((r,e)=>r+e))+(this.notes.length===0?0:this.notes.map((r)=>r.height||0).reduce((r,e)=>r+e))},"getHeight"),clear:t(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:t(function(r){this.boxes.push(r)},"addBox"),addActor:t(function(r){this.actors.push(r)},"addActor"),addLoop:t(function(r){this.loops.push(r)},"addLoop"),addMessage:t(function(r){this.messages.push(r)},"addMessage"),addNote:t(function(r){this.notes.push(r)},"addNote"),lastActor:t(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:t(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:t(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:t(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:t(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,ar(m())},"init"),updateVal:t(function(r,e,s,a){if(r[e]===void 0)r[e]=s;else r[e]=a(s,r[e])},"updateVal"),updateBounds:t(function(r,e,s,a){let n=this,h=0;function i(o){return t(function(p){h++;let f=n.sequenceItems.length-h+1;if(n.updateVal(p,"starty",e-f*d.boxMargin,Math.min),n.updateVal(p,"stopy",a+f*d.boxMargin,Math.max),n.updateVal(R.data,"startx",r-f*d.boxMargin,Math.min),n.updateVal(R.data,"stopx",s+f*d.boxMargin,Math.max),o!=="activation")n.updateVal(p,"startx",r-f*d.boxMargin,Math.min),n.updateVal(p,"stopx",s+f*d.boxMargin,Math.max),n.updateVal(R.data,"starty",e-f*d.boxMargin,Math.min),n.updateVal(R.data,"stopy",a+f*d.boxMargin,Math.max)},"updateItemBounds")}t(i,"updateFn"),this.sequenceItems.forEach(i()),this.activations.forEach(i("activation"))},"updateBounds"),insert:t(function(r,e,s,a){let n=w.getMin(r,s),h=w.getMax(r,s),i=w.getMin(e,a),o=w.getMax(e,a);this.updateVal(R.data,"startx",n,Math.min),this.updateVal(R.data,"starty",i,Math.min),this.updateVal(R.data,"stopx",h,Math.max),this.updateVal(R.data,"stopy",o,Math.max),this.updateBounds(n,i,h,o)},"insert"),newActivation:t(function(r,e,s){let a=s.get(r.from),n=se(r.from).length||0,h=a.x+a.width/2+(n-1)*d.activationWidth/2;this.activations.push({startx:h,starty:this.verticalPos+2,stopx:h+d.activationWidth,stopy:void 0,actor:r.from,anchored:st.anchorElement(e)})},"newActivation"),endActivation:t(function(r){let e=this.activations.map(function(s){return s.actor}).lastIndexOf(r.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:t(function(r={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:r.message,wrap:r.wrap,width:r.width,height:0,fill:e}},"createLoop"),newLoop:t(function(r={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(r,e))},"newLoop"),endLoop:t(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:t(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:t(function(r){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:R.getVerticalPos(),height:0}),e.sectionTitles.push(r),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:t(function(){if(this.isLoopOverlap())this.savedVerticalPos=this.verticalPos},"saveVerticalPos"),resetVerticalPos:t(function(){if(this.isLoopOverlap())this.verticalPos=this.savedVerticalPos},"resetVerticalPos"),bumpVerticalPos:t(function(r){this.verticalPos=this.verticalPos+r,this.data.stopy=w.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:t(function(){return this.verticalPos},"getVerticalPos"),getBounds:t(function(){return{bounds:this.data,models:this.models}},"getBounds")},ea=t(async function(r,e,s){R.bumpVerticalPos(d.boxMargin),e.height=d.boxMargin,e.starty=R.getVerticalPos();let a=gr();a.x=e.startx,a.y=e.starty,a.width=e.width||d.width,a.class="note";let n=r.append("g");n.attr("data-et","note"),n.attr("data-id","i"+s);let h=st.drawRect(n,a),i=Hp();i.x=e.startx,i.y=e.starty,i.width=a.width,i.dy="1em",i.text=e.message,i.class="noteText",i.fontFamily=d.noteFontFamily,i.fontSize=d.noteFontSize,i.fontWeight=d.noteFontWeight,i.anchor=d.noteAlign,i.textMargin=d.noteMargin,i.valign="center";let o=Dt(i.text)?await $t(n,i):Yt(n,i),u=Math.round(o.map((p)=>(p._groups||p)[0][0].getBBox().height).reduce((p,f)=>p+f));h.attr("height",u+2*d.noteMargin),e.height+=u+2*d.noteMargin,R.bumpVerticalPos(u+2*d.noteMargin),e.stopy=e.starty+u+2*d.noteMargin,e.stopx=e.startx+a.width,R.insert(e.startx,e.starty,e.stopx,e.stopy),R.models.addNote(e)},"drawNote"),Ge=t(function(r,e,s,a,n,h,i){let o=a.db.getActors(),u=o.get(e.from),p=o.get(e.to),f=s.sequenceVisible,_=u.x+u.width/2,g=p.x+p.width/2,A=_<=g,x=or(e,a),L=r.append("g"),T=16.5,S=t((B,Y)=>{let X=B?T:-T;return Y?-X:X},"getCircleOffset"),I=t((B)=>{L.append("circle").attr("cx",B).attr("cy",i).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:N,CENTRAL_CONNECTION_REVERSE:D,CENTRAL_CONNECTION_DUAL:k}=a.db.LINETYPE;if(f)switch(e.centralConnection){case N:if(x)g+=S(A,!0);break;case D:if(!x)_+=S(A,!1);break;case k:if(x)g+=S(A,!0);else _+=S(A,!1);break}switch(e.centralConnection){case N:I(g);break;case D:I(_);break;case k:I(_),I(g);break}},"drawCentralConnection"),vt=t((r)=>({fontFamily:r.messageFontFamily,fontSize:r.messageFontSize,fontWeight:r.messageFontWeight}),"messageFont"),Bt=t((r)=>({fontFamily:r.noteFontFamily,fontSize:r.noteFontSize,fontWeight:r.noteFontWeight}),"noteFont"),ue=t((r)=>({fontFamily:r.actorFontFamily,fontSize:r.actorFontSize,fontWeight:r.actorFontWeight}),"actorFont");async function er(r,e){R.bumpVerticalPos(10);let{startx:s,stopx:a,message:n}=e,h=w.splitBreaks(n).length,i=Dt(n),o=i?await uc(n,m()):V.calculateTextDimensions(n,vt(d));if(!i){let _=o.height/h;e.height+=_,R.bumpVerticalPos(_)}let u,p=o.height-10,f=o.width;if(s===a){if(u=R.getVerticalPos()+p,!d.rightAngles)p+=d.boxMargin,u=R.getVerticalPos()+p;p+=30;let _=w.getMax(f/2,d.width/2);R.insert(s-_,R.getVerticalPos()-10+p,a+_,R.getVerticalPos()+30+p)}else p+=d.boxMargin,u=R.getVerticalPos()+p,R.insert(s,u-10,a,u);return R.bumpVerticalPos(p),e.height+=p,e.stopy=e.starty+e.height,R.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),u}t(er,"boundMessage");var ra=t(async function(r,e,s,a,n,h){let{startx:i,stopx:o,starty:u,message:p,type:f,sequenceIndex:_,sequenceVisible:g}=e,A=V.calculateTextDimensions(p,vt(d)),x=Hp();if(x.x=Math.min(i,o),x.y=u+10,x.width=Math.abs(o-i),x.class="messageText",x.dy="1em",x.text=p,x.fontFamily=d.messageFontFamily,x.fontSize=d.messageFontSize,x.fontWeight=d.messageFontWeight,x.anchor=d.messageAlign,x.valign="center",x.textMargin=d.wrapPadding,x.tspan=!1,Dt(x.text))await $t(r,x,{startx:i,stopx:o,starty:s});else Yt(r,x);let L=A.width,T;if(i===o){let I=g||d.showSequenceNumbers,N=or(n,a),D=ha(n,a),k=i+(I&&(N||D)?10:0);if(d.rightAngles)T=r.append("path").attr("d",`M ${k},${s} H ${i+w.getMax(d.width/2,L/2)} V ${s+25} H ${i}`);else T=r.append("path").attr("d","M "+k+","+s+" C "+(k+60)+","+(s-10)+" "+(i+60)+","+(s+30)+" "+i+","+(s+20));if(pe(n,a))Ge(r,n,e,a,i,o,s)}else if(T=r.append("line"),T.attr("x1",i),T.attr("y1",s),T.attr("x2",o),T.attr("y2",s),pe(n,a))Ge(r,n,e,a,i,o,s);if(f===a.db.LINETYPE.DOTTED||f===a.db.LINETYPE.DOTTED_CROSS||f===a.db.LINETYPE.DOTTED_POINT||f===a.db.LINETYPE.DOTTED_OPEN||f===a.db.LINETYPE.BIDIRECTIONAL_DOTTED||f===a.db.LINETYPE.SOLID_TOP_DOTTED||f===a.db.LINETYPE.SOLID_BOTTOM_DOTTED||f===a.db.LINETYPE.STICK_TOP_DOTTED||f===a.db.LINETYPE.STICK_BOTTOM_DOTTED||f===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)T.style("stroke-dasharray","3, 3"),T.attr("class","messageLine1");else T.attr("class","messageLine0");T.attr("data-et","message"),T.attr("data-id","i"+e.id),T.attr("data-from",e.from),T.attr("data-to",e.to);let S="";if(d.arrowMarkerAbsolute)S=Rg(!0);if(T.attr("stroke-width",2),T.attr("stroke","none"),T.style("fill","none"),f===a.db.LINETYPE.SOLID_TOP||f===a.db.LINETYPE.SOLID_TOP_DOTTED)T.attr("marker-end","url("+S+"#"+h+"-solidTopArrowHead)");if(f===a.db.LINETYPE.SOLID_BOTTOM||f===a.db.LINETYPE.SOLID_BOTTOM_DOTTED)T.attr("marker-end","url("+S+"#"+h+"-solidBottomArrowHead)");if(f===a.db.LINETYPE.STICK_TOP||f===a.db.LINETYPE.STICK_TOP_DOTTED)T.attr("marker-end","url("+S+"#"+h+"-stickTopArrowHead)");if(f===a.db.LINETYPE.STICK_BOTTOM||f===a.db.LINETYPE.STICK_BOTTOM_DOTTED)T.attr("marker-end","url("+S+"#"+h+"-stickBottomArrowHead)");if(f===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)T.attr("marker-start","url("+S+"#"+h+"-solidBottomArrowHead)");if(f===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)T.attr("marker-start","url("+S+"#"+h+"-solidTopArrowHead)");if(f===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)T.attr("marker-start","url("+S+"#"+h+"-stickBottomArrowHead)");if(f===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)T.attr("marker-start","url("+S+"#"+h+"-stickTopArrowHead)");if(f===a.db.LINETYPE.SOLID||f===a.db.LINETYPE.DOTTED)T.attr("marker-end","url("+S+"#"+h+"-arrowhead)");if(f===a.db.LINETYPE.BIDIRECTIONAL_SOLID||f===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)T.attr("marker-start","url("+S+"#"+h+"-arrowhead)"),T.attr("marker-end","url("+S+"#"+h+"-arrowhead)");if(f===a.db.LINETYPE.SOLID_POINT||f===a.db.LINETYPE.DOTTED_POINT)T.attr("marker-end","url("+S+"#"+h+"-filled-head)");if(f===a.db.LINETYPE.SOLID_CROSS||f===a.db.LINETYPE.DOTTED_CROSS)T.attr("marker-end","url("+S+"#"+h+"-crosshead)");if(g||d.showSequenceNumbers){let I=f===a.db.LINETYPE.BIDIRECTIONAL_SOLID||f===a.db.LINETYPE.BIDIRECTIONAL_DOTTED,N=f===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,D=6,k=pe(n,a),B=i,Y=o;if(I){if(i<o)B=i+12;else B=i-6+(k?-5:0),B+=n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_DUAL||n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0;T.attr("x1",B)}else if(N){if(o>i)Y=o-12;else Y=o-6,B+=n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_DUAL||n?.centralConnection===a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0;Y+=k?15:0,T.attr("x2",Y),T.attr("x1",B)}else T.attr("x1",i+6);let X=0,J=i===o,tt=i<=o;if(J)X=e.fromBounds+1;else if(N)X=tt?e.toBounds-1:e.fromBounds+1;else X=tt?e.fromBounds+1:e.toBounds-1;let it="12px",ct=_.toString().length;if(ct>5)it="7px";else if(ct>3)it="9px";r.append("line").attr("x1",X).attr("y1",s).attr("x2",X).attr("y2",s).attr("stroke-width",0).attr("marker-start","url("+S+"#"+h+"-sequencenumber)"),r.append("text").attr("x",X).attr("y",s+4).attr("font-family","sans-serif").attr("font-size",it).attr("text-anchor","middle").attr("class","sequenceNumber").text(_)}},"drawMessage"),aa=t(function(r,e,s,a,n,h,i){let o=0,u=0,p=void 0,f=0;for(let _ of a){let g=e.get(_),A=g.box;if(p&&p!=A){if(!i)R.models.addBox(p);u+=d.boxMargin+p.margin}if(A&&A!=p){if(!i)A.x=o+u,A.y=n;u+=A.margin}if(g.width=w.getMax(g.width||d.width,d.width),g.height=w.getMax(g.height||d.height,d.height),g.margin=g.margin||d.actorMargin,f=w.getMax(f,g.height),s.get(g.name))u+=g.width/2;if(g.x=o+u,g.starty=R.getVerticalPos(),R.insert(g.x,n,g.x+g.width,g.height),o+=g.width+u,g.box)g.box.width=o+A.margin-g.box.x;u=g.margin,p=g.box,R.models.addActor(g)}if(p&&!i)R.models.addBox(p);R.bumpVerticalPos(f)},"addActorRenderingData"),fe=t(async function(r,e,s,a,n,h,i){if(!a)for(let o of s){let u=e.get(o);await st.drawActor(r,u,d,!1,n,h,i)}else{let o=0;R.bumpVerticalPos(d.boxMargin*2);for(let u of s){let p=e.get(u);if(!p.stopy)p.stopy=R.getVerticalPos();let f=await st.drawActor(r,p,d,!0,n,h,i);o=w.getMax(o,f)}R.bumpVerticalPos(o+d.boxMargin)}},"drawActors"),rr=t(function(r,e,s,a){let n=0,h=0;for(let i of s){let o=e.get(i),u=ia(o),p=st.drawPopup(r,o,u,d,d.forceMenus,a);if(p.height>n)n=p.height;if(p.width+o.x>h)h=p.width+o.x}return{maxHeight:n,maxWidth:h}},"drawActorsPopup"),ar=t(function(r){if(ot(d,r),r.fontFamily)d.actorFontFamily=d.noteFontFamily=d.messageFontFamily=r.fontFamily;if(r.fontSize)d.actorFontSize=d.noteFontSize=d.messageFontSize=r.fontSize;if(r.fontWeight)d.actorFontWeight=d.noteFontWeight=d.messageFontWeight=r.fontWeight},"setConf"),se=t(function(r){return R.activations.filter(function(e){return e.actor===r})},"actorActivations"),Xe=t(function(r,e){let s=e.get(r),a=se(r),n=a.reduce(function(i,o){return w.getMin(i,o.startx)},s.x+s.width/2-1),h=a.reduce(function(i,o){return w.getMax(i,o.stopx)},s.x+s.width/2+1);return[n,h]},"activationBounds");function It(r,e,s,a,n){R.bumpVerticalPos(s);let h=a;if(e.id&&e.message&&r[e.id]){let i=r[e.id].width,o=vt(d);e.message=V.wrapLabel(`[${e.message}]`,i-2*d.wrapPadding,o),e.width=i,e.wrap=!0;let u=V.calculateTextDimensions(e.message,o),p=w.getMax(u.height,d.labelBoxHeight);h=a+p,l.debug(`${p} - ${e.message}`)}n(e),R.bumpVerticalPos(h)}t(It,"adjustLoopHeightForWrap");function sr(r,e,s,a,n,h,i){function o(f,_){if(f.x<n.get(r.from).x)R.insert(e.stopx-_,e.starty,e.startx,e.stopy+f.height/2+d.noteMargin),e.stopx=e.stopx+_;else R.insert(e.startx,e.starty,e.stopx+_,e.stopy+f.height/2+d.noteMargin),e.stopx=e.stopx-_}t(o,"receiverAdjustment");function u(f,_){if(f.x<n.get(r.to).x)R.insert(e.startx-_,e.starty,e.stopx,e.stopy+f.height/2+d.noteMargin),e.startx=e.startx+_;else R.insert(e.stopx,e.starty,e.startx+_,e.stopy+f.height/2+d.noteMargin),e.startx=e.startx-_}t(u,"senderAdjustment");let p=[Jt.ACTOR,Jt.CONTROL,Jt.ENTITY,Jt.DATABASE];if(h.get(r.to)==a){let f=n.get(r.to),_=p.includes(f.type)?wt/2+3:f.width/2+3;o(f,_),f.starty=s-f.height/2,R.bumpVerticalPos(f.height/2)}else if(i.get(r.from)==a){let f=n.get(r.from);if(d.mirrorActors){let _=p.includes(f.type)?wt/2:f.width/2;u(f,_)}f.stopy=s-f.height/2,R.bumpVerticalPos(f.height/2)}else if(i.get(r.to)==a){let f=n.get(r.to);if(d.mirrorActors){let _=p.includes(f.type)?wt/2+3:f.width/2+3;o(f,_)}f.stopy=s-f.height/2,R.bumpVerticalPos(f.height/2)}}t(sr,"adjustCreatedDestroyedData");var sa=t(async function(r,e,s,a){let{securityLevel:n,sequence:h,look:i,themeVariables:o}=m();d=h;let u;if(n==="sandbox")u=b("#i"+e);let p=n==="sandbox"?b(u.nodes()[0].contentDocument.body):b("body"),f=n==="sandbox"?u.nodes()[0].contentDocument:document;R.init(),l.debug(a.db);let _=n==="sandbox"?p.select(`[id="${e}"]`):b(`[id="${e}"]`),g=a.db.getActors(),A=a.db.getCreatedActors(),x=a.db.getDestroyedActors(),L=a.db.getBoxes(),T=a.db.getActorKeys(),S=a.db.getMessages(),I=a.db.getDiagramTitle(),N=a.db.hasAtLeastOneBox(),D=a.db.hasAtLeastOneBoxWithTitle(),k=await ir(g,S,a);if(d.height=await nr(g,k,L),st.insertComputerIcon(_,e),st.insertDatabaseIcon(_,e),st.insertClockIcon(_,e),N){if(R.bumpVerticalPos(d.boxMargin),D)R.bumpVerticalPos(L[0].textMaxHeight)}if(d.hideUnusedParticipants===!0){let P=new Set;S.forEach((K)=>{P.add(K.from),P.add(K.to)}),T=T.filter((K)=>P.has(K))}let B=new Map(T.map((P,K)=>[g.get(P)?.name??P,K]));aa(_,g,A,T,0,S,!1);let Y=await Ta(S,g,k,a);if(st.insertArrowHead(_,e),st.insertArrowCrossHead(_,e),st.insertArrowFilledHead(_,e),st.insertSequenceNumber(_,e),st.insertSolidTopArrowHead(_,e),st.insertSolidBottomArrowHead(_,e),st.insertStickTopArrowHead(_,e),st.insertStickBottomArrowHead(_,e),i==="neo")st.insertDropShadow(_,d,e);function X(P,K){let bt=R.endActivation(P);if(bt.starty+18>K)bt.starty=K-6,K+=12;st.drawActivation(_,bt,K,d,se(P.from).length,a,B),R.insert(bt.startx,K-10,bt.stopx,K)}t(X,"activeEnd");let J=1,tt=1,it=[],ct=[],Tt=0;for(let P of S){let K,bt,ut;switch(P.type){case a.db.LINETYPE.NOTE:R.resetVerticalPos(),bt=P.noteModel,await ea(_,bt,P.id);break;case a.db.LINETYPE.ACTIVE_START:R.newActivation(P,_,g);break;case a.db.LINETYPE.CENTRAL_CONNECTION:R.newActivation(P,_,g);break;case a.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:R.newActivation(P,_,g);break;case a.db.LINETYPE.ACTIVE_END:X(P,R.getVerticalPos());break;case a.db.LINETYPE.LOOP_START:It(Y,P,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>R.newLoop(et));break;case a.db.LINETYPE.LOOP_END:K=R.endLoop(),await st.drawLoop(_,K,"loop",d,P),R.bumpVerticalPos(K.stopy-R.getVerticalPos()),R.models.addLoop(K);break;case a.db.LINETYPE.RECT_START:It(Y,P,d.boxMargin,d.boxMargin,(et)=>{let Ct=et.message;if(!Ct)Ct=o?.rectBkgColor||o?.actorBkg||"rgba(128, 128, 128, 0.5)";R.newLoop(void 0,Ct)});break;case a.db.LINETYPE.RECT_END:K=R.endLoop(),ct.push(K),R.models.addLoop(K),R.bumpVerticalPos(K.stopy-R.getVerticalPos());break;case a.db.LINETYPE.OPT_START:It(Y,P,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>R.newLoop(et));break;case a.db.LINETYPE.OPT_END:K=R.endLoop(),await st.drawLoop(_,K,"opt",d,P),R.bumpVerticalPos(K.stopy-R.getVerticalPos()),R.models.addLoop(K);break;case a.db.LINETYPE.ALT_START:It(Y,P,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>R.newLoop(et));break;case a.db.LINETYPE.ALT_ELSE:It(Y,P,d.boxMargin+d.boxTextMargin,d.boxMargin,(et)=>R.addSectionToLoop(et));break;case a.db.LINETYPE.ALT_END:K=R.endLoop(),await st.drawLoop(_,K,"alt",d,P),R.bumpVerticalPos(K.stopy-R.getVerticalPos()),R.models.addLoop(K);break;case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:It(Y,P,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>R.newLoop(et)),R.saveVerticalPos();break;case a.db.LINETYPE.PAR_AND:It(Y,P,d.boxMargin+d.boxTextMargin,d.boxMargin,(et)=>R.addSectionToLoop(et));break;case a.db.LINETYPE.PAR_END:K=R.endLoop(),await st.drawLoop(_,K,"par",d,P),R.bumpVerticalPos(K.stopy-R.getVerticalPos()),R.models.addLoop(K);break;case a.db.LINETYPE.AUTONUMBER:if(J=P.message.start||J,tt=P.message.step||tt,P.message.visible)a.db.enableSequenceNumbers();else a.db.disableSequenceNumbers();break;case a.db.LINETYPE.CRITICAL_START:It(Y,P,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>R.newLoop(et));break;case a.db.LINETYPE.CRITICAL_OPTION:It(Y,P,d.boxMargin+d.boxTextMargin,d.boxMargin,(et)=>R.addSectionToLoop(et));break;case a.db.LINETYPE.CRITICAL_END:K=R.endLoop(),await st.drawLoop(_,K,"critical",d,P),R.bumpVerticalPos(K.stopy-R.getVerticalPos()),R.models.addLoop(K);break;case a.db.LINETYPE.BREAK_START:It(Y,P,d.boxMargin,d.boxMargin+d.boxTextMargin,(et)=>R.newLoop(et));break;case a.db.LINETYPE.BREAK_END:K=R.endLoop(),await st.drawLoop(_,K,"break",d,P),R.bumpVerticalPos(K.stopy-R.getVerticalPos()),R.models.addLoop(K);break;default:try{ut=P.msgModel,ut.starty=R.getVerticalPos(),ut.sequenceIndex=J,ut.sequenceVisible=a.db.showSequenceNumbers(),ut.id=P.id,ut.from=P.from,ut.to=P.to;let et=await er(_,ut);sr(P,ut,et,Tt,g,A,x),it.push({messageModel:ut,lineStartY:et,msg:P}),R.models.addMessage(ut)}catch(et){l.error("error while drawing message",et)}}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(P.type))J=Math.round((J+tt)*100)/100;Tt++}l.debug("createdActors",A),l.debug("destroyedActors",x),await fe(_,g,T,!1,e,a,B);for(let P of it)await ra(_,P.messageModel,P.lineStartY,a,P.msg,e);if(d.mirrorActors)await fe(_,g,T,!0,e,a,B);ct.forEach((P)=>st.drawBackgroundRect(_,P)),$e(_,g,T,d);for(let P of R.models.boxes){P.height=R.getVerticalPos()-P.y,R.insert(P.x,P.y,P.x+P.width,P.height);let K=d.boxMargin*2;P.startx=P.x-K,P.starty=P.y-K*0.25,P.stopx=P.startx+P.width+2*K,P.stopy=P.starty+P.height+K*0.75,P.stroke="rgb(0,0,0, 0.5)",st.drawBox(_,P,d)}if(N)R.bumpVerticalPos(d.boxMargin);let pt=rr(_,g,T,f),{bounds:nt}=R.getBounds();if(nt.startx===void 0)nt.startx=0;if(nt.starty===void 0)nt.starty=0;if(nt.stopx===void 0)nt.stopx=0;if(nt.stopy===void 0)nt.stopy=0;let ft=nt.stopy-nt.starty;if(ft<pt.maxHeight)ft=pt.maxHeight;let Et=ft+2*d.diagramMarginY;if(d.mirrorActors)Et=Et-d.boxMargin+d.bottomMarginAdj;let Z=nt.stopx-nt.startx;if(Z<pt.maxWidth)Z=pt.maxWidth;let U=Z+2*d.diagramMarginX;if(I)_.append("text").text(I).attr("x",(nt.stopx-nt.startx)/2-2*d.diagramMarginX).attr("y",-25);re(_,Et,U,d.useMaxWidth);let Vt=I?40:0,qt=g.size&&i==="neo"?30:0;_.attr("viewBox",nt.startx-d.diagramMarginX+" -"+(d.diagramMarginY+Vt)+" "+U+" "+(Et+Vt+qt)),l.debug("models:",R.models)},"draw");async function ir(r,e,s){let a={};for(let n of e)if(r.get(n.to)&&r.get(n.from)){let h=r.get(n.to);if(n.placement===s.db.PLACEMENT.LEFTOF&&!h.prevActor)continue;if(n.placement===s.db.PLACEMENT.RIGHTOF&&!h.nextActor)continue;let i=n.placement!==void 0,o=!i,u=i?Bt(d):vt(d),p=n.wrap?V.wrapLabel(n.message,d.width-2*d.wrapPadding,u):n.message,_=(Dt(p)?await uc(n.message,m()):V.calculateTextDimensions(p,u)).width+2*d.wrapPadding;if(o&&n.from===h.nextActor)a[n.to]=w.getMax(a[n.to]||0,_);else if(o&&n.from===h.prevActor)a[n.from]=w.getMax(a[n.from]||0,_);else if(o&&n.from===n.to)a[n.from]=w.getMax(a[n.from]||0,_/2),a[n.to]=w.getMax(a[n.to]||0,_/2);else if(n.placement===s.db.PLACEMENT.RIGHTOF)a[n.from]=w.getMax(a[n.from]||0,_);else if(n.placement===s.db.PLACEMENT.LEFTOF)a[h.prevActor]=w.getMax(a[h.prevActor]||0,_);else if(n.placement===s.db.PLACEMENT.OVER){if(h.prevActor)a[h.prevActor]=w.getMax(a[h.prevActor]||0,_/2);if(h.nextActor)a[n.from]=w.getMax(a[n.from]||0,_/2)}}return l.debug("maxMessageWidthPerActor:",a),a}t(ir,"getMaxMessageWidthPerActor");var ia=t(function(r){let e=0,s=ue(d);for(let a in r.links){let h=V.calculateTextDimensions(a,s).width+2*d.wrapPadding+2*d.boxMargin;if(e<h)e=h}return e},"getRequiredPopupWidth");async function nr(r,e,s){let a=0;for(let h of r.keys()){let i=r.get(h);if(i.wrap)i.description=V.wrapLabel(i.description,d.width-2*d.wrapPadding,ue(d));let o=Dt(i.description)?await uc(i.description,m()):V.calculateTextDimensions(i.description,ue(d));if(i.width=i.wrap?d.width:w.getMax(d.width,o.width+2*d.wrapPadding),m().look==="neo")i.actorTextHeight=o.height,i.height=w.getMax(Qe(o.height),d.height);else i.height=i.wrap?w.getMax(o.height,d.height):d.height;a=w.getMax(a,i.height)}for(let h in e){let i=r.get(h);if(!i)continue;let o=r.get(i.nextActor);if(!o){let _=e[h]+d.actorMargin-i.width/2;i.margin=w.getMax(_,d.actorMargin);continue}let p=e[h]+d.actorMargin-i.width/2-o.width/2;i.margin=w.getMax(p,d.actorMargin)}let n=0;return s.forEach((h)=>{let i=vt(d),o=h.actorKeys.reduce((_,g)=>_+=r.get(g).width+(r.get(g).margin||0),0),u=d.boxMargin*8;if(o+=u,o-=2*d.boxTextMargin,h.wrap)h.name=V.wrapLabel(h.name,o-2*d.wrapPadding,i);let p=V.calculateTextDimensions(h.name,i);n=w.getMax(p.height,n);let f=w.getMax(o,p.width+2*d.wrapPadding);if(h.margin=d.boxTextMargin,o<f){let _=(f-o)/2;h.margin+=_}}),s.forEach((h)=>h.textMaxHeight=n),w.getMax(a,d.height)}t(nr,"calculateActorMargins");var na=t(async function(r,e,s){let a=e.get(r.from),n=e.get(r.to),h=a.x,i=n.x,o=r.wrap&&r.message,u=Dt(r.message)?await uc(r.message,m()):V.calculateTextDimensions(o?V.wrapLabel(r.message,d.width,Bt(d)):r.message,Bt(d)),p={width:o?d.width:w.getMax(d.width,u.width+2*d.noteMargin),height:0,startx:a.x,stopx:0,starty:0,stopy:0,message:r.message};if(r.placement===s.db.PLACEMENT.RIGHTOF)p.width=o?w.getMax(d.width,u.width):w.getMax(a.width/2+n.width/2,u.width+2*d.noteMargin),p.startx=h+(a.width+d.actorMargin)/2;else if(r.placement===s.db.PLACEMENT.LEFTOF)p.width=o?w.getMax(d.width,u.width+2*d.noteMargin):w.getMax(a.width/2+n.width/2,u.width+2*d.noteMargin),p.startx=h-p.width+(a.width-d.actorMargin)/2;else if(r.to===r.from)u=V.calculateTextDimensions(o?V.wrapLabel(r.message,w.getMax(d.width,a.width),Bt(d)):r.message,Bt(d)),p.width=o?w.getMax(d.width,a.width):w.getMax(a.width,d.width,u.width+2*d.noteMargin),p.startx=h+(a.width-p.width)/2;else p.width=Math.abs(h+a.width/2-(i+n.width/2))+d.actorMargin,p.startx=h<i?h+a.width/2-d.actorMargin/2:i+n.width/2-d.actorMargin/2;if(o)p.message=V.wrapLabel(r.message,p.width-2*d.wrapPadding,Bt(d));return l.debug(`NM:[${p.startx},${p.stopx},${p.starty},${p.stopy}:${p.width},${p.height}=${r.message}]`),p},"buildNoteModel"),oa=4,ca=6,pe=t(function(r,e){let{CENTRAL_CONNECTION:s,CENTRAL_CONNECTION_REVERSE:a,CENTRAL_CONNECTION_DUAL:n}=e.db.LINETYPE;return[s,a,n].includes(r.centralConnection)},"hasCentralConnection"),la=t(function(r,e,s){let{CENTRAL_CONNECTION_REVERSE:a,CENTRAL_CONNECTION_DUAL:n,BIDIRECTIONAL_SOLID:h,BIDIRECTIONAL_DOTTED:i}=e.db.LINETYPE,o=0;if(r.centralConnection===a||r.centralConnection===n)o+=oa;if((r.centralConnection===a||r.centralConnection===n)&&(r.type===h||r.type===i))o+=s?0:-ca;return o},"calculateCentralConnectionOffset"),or=t(function(r,e){let{SOLID_ARROW_TOP_REVERSE:s,SOLID_ARROW_TOP_REVERSE_DOTTED:a,SOLID_ARROW_BOTTOM_REVERSE:n,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:h,STICK_ARROW_TOP_REVERSE:i,STICK_ARROW_TOP_REVERSE_DOTTED:o,STICK_ARROW_BOTTOM_REVERSE:u,STICK_ARROW_BOTTOM_REVERSE_DOTTED:p}=e.db.LINETYPE;return[s,a,n,h,i,o,u,p].includes(r.type)},"isReverseArrowType"),ha=t(function(r,e){let{BIDIRECTIONAL_SOLID:s,BIDIRECTIONAL_DOTTED:a}=e.db.LINETYPE;return[s,a].includes(r.type)},"isBidirectionalArrowType"),da=t(function(r,e,s){let{look:a}=m();if(![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(r.type))return{};let[n,h]=Xe(r.from,e),[i,o]=Xe(r.to,e),u=n<=i,p=u?h:n,f=u?i:o;if(a==="neo"){if(r.type!==s.db.LINETYPE.SOLID_OPEN)f+=u?-3:3;if(r.type===s.db.LINETYPE.BIDIRECTIONAL_SOLID||r.type===s.db.LINETYPE.BIDIRECTIONAL_DOTTED)p+=u?3:-3}p+=la(r,s,u);let _=Math.abs(i-o)>2,g=t((T)=>u?-T:T,"adjustValue");if(r.from===r.to)f=p;else{if(r.activate&&!_)f+=g(d.activationWidth/2-1);if(![s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.STICK_TOP,s.db.LINETYPE.STICK_BOTTOM,s.db.LINETYPE.STICK_TOP_DOTTED,s.db.LINETYPE.STICK_BOTTOM_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(r.type))f+=g(3);if([s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(r.type))p-=g(3)}let A=[n,h,i,o],x=Math.abs(p-f);if(r.wrap&&r.message)r.message=V.wrapLabel(r.message,w.getMax(x+2*d.wrapPadding,d.width),vt(d));let L=V.calculateTextDimensions(r.message,vt(d));return{width:w.getMax(r.wrap?0:L.width+2*d.wrapPadding,x+2*d.wrapPadding,d.width),height:0,startx:p,stopx:f,starty:0,stopy:0,message:r.message,type:r.type,wrap:r.wrap,fromBounds:Math.min.apply(null,A),toBounds:Math.max.apply(null,A)}},"buildMessageModel"),Ta=t(async function(r,e,s,a){let n={},h=[],i,o,u;for(let p of r){switch(p.type){case a.db.LINETYPE.LOOP_START:case a.db.LINETYPE.ALT_START:case a.db.LINETYPE.OPT_START:case a.db.LINETYPE.PAR_START:case a.db.LINETYPE.PAR_OVER_START:case a.db.LINETYPE.CRITICAL_START:case a.db.LINETYPE.BREAK_START:h.push({id:p.id,msg:p.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case a.db.LINETYPE.ALT_ELSE:case a.db.LINETYPE.PAR_AND:case a.db.LINETYPE.CRITICAL_OPTION:if(p.message)i=h.pop(),n[i.id]=i,n[p.id]=i,h.push(i);break;case a.db.LINETYPE.LOOP_END:case a.db.LINETYPE.ALT_END:case a.db.LINETYPE.OPT_END:case a.db.LINETYPE.PAR_END:case a.db.LINETYPE.CRITICAL_END:case a.db.LINETYPE.BREAK_END:i=h.pop(),n[i.id]=i;break;case a.db.LINETYPE.ACTIVE_START:{let _=e.get(p.from?p.from:p.to.actor),g=se(p.from?p.from:p.to.actor).length,A=_.x+_.width/2+(g-1)*d.activationWidth/2,x={startx:A,stopx:A+d.activationWidth,actor:p.from,enabled:!0};R.activations.push(x)}break;case a.db.LINETYPE.ACTIVE_END:{let _=R.activations.map((g)=>g.actor).lastIndexOf(p.from);R.activations.splice(_,1).splice(0,1)}break}if(p.placement!==void 0)o=await na(p,e,a),p.noteModel=o,h.forEach((_)=>{i=_,i.from=w.getMin(i.from,o.startx),i.to=w.getMax(i.to,o.startx+o.width),i.width=w.getMax(i.width,Math.abs(i.from-i.to))-d.labelBoxWidth});else if(u=da(p,e,a),p.msgModel=u,u.startx&&u.stopx&&h.length>0)h.forEach((_)=>{if(i=_,u.startx===u.stopx){let g=e.get(p.from),A=e.get(p.to);i.from=w.getMin(g.x-u.width/2,g.x-g.width/2,i.from),i.to=w.getMax(A.x+u.width/2,A.x+g.width/2,i.to),i.width=w.getMax(i.width,Math.abs(i.to-i.from))-d.labelBoxWidth}else i.from=w.getMin(u.startx,i.from),i.to=w.getMax(u.stopx,i.to),i.width=w.getMax(i.width,u.width)-d.labelBoxWidth})}return R.activations=[],l.debug("Loop type widths:",n),n},"calculateLoopBounds"),pa={bounds:R,drawActors:fe,drawActorsPopup:rr,setConf:ar,draw:sa},Ra={parser:Er,get db(){return new xr},renderer:pa,styles:Ir,init:t((r)=>{if(!r.sequence)r.sequence={};if(r.wrap)r.sequence.wrap=r.wrap,va({sequence:{wrap:r.wrap}})},"init")};export{Ra as diagram};
|
package/dist/client/static/js/{sizeCapture-INFHLROL-g02k0k8x.js → sizeCapture-INFHLROL-aabfesnr.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t}from"./index-
|
|
1
|
+
import{t}from"./index-xfnjwhan.js";var c=1;function i(){if(typeof globalThis>"u")return;return globalThis}t(i,"getCaptureGlobal");function p(){return Boolean(i()?.mermaidCaptureSizes)}t(p,"shouldCaptureSizes");function u(){if(typeof location>"u")return"browser-dev";return`${location.pathname}${location.search}`}t(u,"capturedFromLocation");function d(n,r){let o=i();if(!o)return;let e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";o.mermaidCapturedSizes??=[];let a={svgId:s,sizes:n};o.mermaidCapturedSizes.push(a),o.mermaidLastCapturedSizes=a}t(d,"emitCapturedSizes");function m(n,r){let o=[];for(let e of r.nodes){if(e.isGroup)continue;o.push({id:e.id,width:e.width??0,height:e.height??0})}if(o.length===0)return;d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:o},n)}t(m,"captureNodeSizes");export{m as captureNodeSizes};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t,l,w,M,O,G,z,j,q,H,m,b,Pg,V,yt,ct,ut,ta,Pt,Ot,$t,vt}from"./index-
|
|
1
|
+
import{t,l,w,M,O,G,z,j,q,H,m,b,Pg,V,yt,ct,ut,ta,Pt,Ot,$t,vt}from"./index-xfnjwhan.js";import{Ht}from"./index-st6a8q5z.js";import{Za}from"./index-zynbvm7x.js";var Wt=function(){var e=t(function(Q,c,f,a){for(f=f||{},a=Q.length;a--;f[Q[a]]=c);return f},"o"),s=[1,2],o=[1,3],r=[1,4],d=[2,4],u=[1,9],S=[1,11],g=[1,16],n=[1,17],T=[1,18],E=[1,19],I=[1,33],N=[1,20],P=[1,21],C=[1,22],p=[1,23],R=[1,24],A=[1,26],W=[1,27],F=[1,28],U=[1,29],D=[1,30],st=[1,31],gt=[1,32],mt=[1,35],bt=[1,36],kt=[1,37],Tt=[1,38],rt=[1,34],y=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Et=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Kt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Nt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:t(function(c,f,a,k,_,i,it){var h=i.length-1;switch(_){case 3:return k.setRootDoc(i[h]),i[h];break;case 4:this.$=[];break;case 5:if(i[h]!="nl")i[h-1].push(i[h]),this.$=i[h-1];break;case 6:case 7:this.$=i[h];break;case 8:this.$="nl";break;case 12:this.$=i[h];break;case 13:let Dt=i[h-1];Dt.description=k.trimColon(i[h]),this.$=Dt;break;case 14:this.$={stmt:"relation",state1:i[h-2],state2:i[h]};break;case 15:let Ct=k.trimColon(i[h]);this.$={stmt:"relation",state1:i[h-3],state2:i[h-1],description:Ct};break;case 19:this.$={stmt:"state",id:i[h-3],type:"default",description:"",doc:i[h-1]};break;case 20:var K=i[h],X=i[h-2].trim();if(i[h].match(":")){var lt=i[h].split(":");K=lt[0],X=[X,lt[1]]}this.$={stmt:"state",id:K,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[h-3],type:"default",description:i[h-5],doc:i[h-1]};break;case 22:this.$={stmt:"state",id:i[h],type:"fork"};break;case 23:this.$={stmt:"state",id:i[h],type:"join"};break;case 24:this.$={stmt:"state",id:i[h],type:"choice"};break;case 25:this.$={stmt:"state",id:k.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[h-1].trim(),note:{position:i[h-2].trim(),text:i[h].trim()}};break;case 29:this.$=i[h].trim(),k.setAccTitle(this.$);break;case 30:case 31:this.$=i[h].trim(),k.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[h-3],url:i[h-2],tooltip:i[h-1]};break;case 33:this.$={stmt:"click",id:i[h-3],url:i[h-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[h-1].trim(),classes:i[h].trim()};break;case 36:this.$={stmt:"style",id:i[h-1].trim(),styleClass:i[h].trim()};break;case 37:this.$={stmt:"applyClass",id:i[h-1].trim(),styleClass:i[h].trim()};break;case 38:k.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:k.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:k.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:k.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[h].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[h-2].trim(),classes:[i[h].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[h-2].trim(),classes:[i[h].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:s,5:o,6:r},{1:[3]},{3:5,4:s,5:o,6:r},{3:6,4:s,5:o,6:r},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],d,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:u,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:E,24:I,25:N,26:P,27:C,28:p,29:R,32:25,33:A,35:W,37:F,38:U,41:D,45:st,48:gt,51:mt,52:bt,53:kt,54:Tt,57:rt},e(y,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:E,24:I,25:N,26:P,27:C,28:p,29:R,32:25,33:A,35:W,37:F,38:U,41:D,45:st,48:gt,51:mt,52:bt,53:kt,54:Tt,57:rt},e(y,[2,7]),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(y,[2,11]),e(y,[2,12],{14:[1,40],15:[1,41]}),e(y,[2,16]),{18:[1,42]},e(y,[2,18],{20:[1,43]}),{23:[1,44]},e(y,[2,22]),e(y,[2,23]),e(y,[2,24]),e(y,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(y,[2,28]),{34:[1,49]},{36:[1,50]},e(y,[2,31]),{13:51,24:I,57:rt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(Et,[2,44],{58:[1,56]}),e(Et,[2,45],{58:[1,57]}),e(y,[2,38]),e(y,[2,39]),e(y,[2,40]),e(y,[2,41]),e(y,[2,6]),e(y,[2,13]),{13:58,24:I,57:rt},e(y,[2,17]),e(Kt,d,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(y,[2,29]),e(y,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(y,[2,14],{14:[1,71]}),{4:u,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,72],22:E,24:I,25:N,26:P,27:C,28:p,29:R,32:25,33:A,35:W,37:F,38:U,41:D,45:st,48:gt,51:mt,52:bt,53:kt,54:Tt,57:rt},e(y,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(y,[2,34]),e(y,[2,35]),e(y,[2,36]),e(y,[2,37]),e(Et,[2,46]),e(Et,[2,47]),e(y,[2,15]),e(y,[2,19]),e(Kt,d,{7:78}),e(y,[2,26]),e(y,[2,27]),{5:[1,79]},{5:[1,80]},{4:u,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,81],22:E,24:I,25:N,26:P,27:C,28:p,29:R,32:25,33:A,35:W,37:F,38:U,41:D,45:st,48:gt,51:mt,52:bt,53:kt,54:Tt,57:rt},e(y,[2,32]),e(y,[2,33]),e(y,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:t(function(c,f){if(f.recoverable)this.trace(c);else{var a=Error(c);throw a.hash=f,a}},"parseError"),parse:t(function(c){var f=this,a=[0],k=[],_=[null],i=[],it=this.table,h="",K=0,X=0,lt=0,Dt=2,Ct=1,me=i.slice.call(arguments,1),v=Object.create(this.lexer),tt={yy:{}};for(var Rt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Rt))tt.yy[Rt]=this.yy[Rt];if(v.setInput(c,tt.yy),tt.yy.lexer=v,tt.yy.parser=this,typeof v.yylloc>"u")v.yylloc={};var Ft=v.yylloc;i.push(Ft);var be=v.options&&v.options.ranges;if(typeof tt.yy.parseError==="function")this.parseError=tt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ke(Y){a.length=a.length-2*Y,_.length=_.length-Y,i.length=i.length-Y}t(ke,"popStack");function Xt(){var Y=k.pop()||v.lex()||Ct;if(typeof Y!=="number"){if(Y instanceof Array)k=Y,Y=k.pop();Y=f.symbols_[Y]||Y}return Y}t(Xt,"lex");var x,Bt,et,B,Qe,Gt,at={},At,J,Jt,xt;while(!0){if(et=a[a.length-1],this.defaultActions[et])B=this.defaultActions[et];else{if(x===null||typeof x>"u")x=Xt();B=it[et]&&it[et][x]}if(typeof B>"u"||!B.length||!B[0]){var Yt="";xt=[];for(At in it[et])if(this.terminals_[At]&&At>Dt)xt.push("'"+this.terminals_[At]+"'");if(v.showPosition)Yt="Parse error on line "+(K+1)+`:
|
|
2
2
|
`+v.showPosition()+`
|
|
3
3
|
Expecting `+xt.join(", ")+", got '"+(this.terminals_[x]||x)+"'";else Yt="Parse error on line "+(K+1)+": Unexpected "+(x==Ct?"end of input":"'"+(this.terminals_[x]||x)+"'");this.parseError(Yt,{text:v.match,token:this.terminals_[x]||x,line:v.yylineno,loc:Ft,expected:xt})}if(B[0]instanceof Array&&B.length>1)throw Error("Parse Error: multiple actions possible at state: "+et+", token: "+x);switch(B[0]){case 1:if(a.push(x),_.push(v.yytext),i.push(v.yylloc),a.push(B[1]),x=null,!Bt){if(X=v.yyleng,h=v.yytext,K=v.yylineno,Ft=v.yylloc,lt>0)lt--}else x=Bt,Bt=null;break;case 2:if(J=this.productions_[B[1]][1],at.$=_[_.length-J],at._$={first_line:i[i.length-(J||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(J||1)].first_column,last_column:i[i.length-1].last_column},be)at._$.range=[i[i.length-(J||1)].range[0],i[i.length-1].range[1]];if(Gt=this.performAction.apply(at,[h,X,K,tt.yy,B[1],_,i].concat(me)),typeof Gt<"u")return Gt;if(J)a=a.slice(0,-1*J*2),_=_.slice(0,-1*J),i=i.slice(0,-1*J);a.push(this.productions_[B[1]][0]),_.push(at.$),i.push(at._$),Jt=it[a[a.length-2]][a[a.length-1]],a.push(Jt);break;case 3:return!0}}return!0},"parse")},ye=function(){var Q={EOF:1,parseError:t(function(f,a){if(this.yy.parser)this.yy.parser.parseError(f,a);else throw Error(f)},"parseError"),setInput:t(function(c,f){if(this.yy=f||this.yy||{},this._input=c,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];return this.offset=0,this},"setInput"),input:t(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var f=c.match(/(?:\r\n?|\n).*/g);if(f)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),c},"input"),unput:t(function(c){var f=c.length,a=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var k=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1)this.yylineno-=a.length-1;var _=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===k.length?this.yylloc.first_column:0)+k[k.length-a.length].length-a[0].length:this.yylloc.first_column-f},this.options.ranges)this.yylloc.range=[_[0],_[0]+this.yyleng-f];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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:t(function(c){this.unput(this.match.slice(c))},"less"),pastInput:t(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var c=this.match;if(c.length<20)c+=this._input.substr(0,20-c.length);return(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var c=this.pastInput(),f=Array(c.length+1).join("-");return c+this.upcomingInput()+`
|