@elizaos/client 1.6.3-alpha.9 → 1.6.3

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.
Files changed (104) hide show
  1. package/dist/assets/{_basePickBy-D1VwWj4y.js → _basePickBy-CF7u0JoM.js} +2 -2
  2. package/dist/assets/{_basePickBy-D1VwWj4y.js.map → _basePickBy-CF7u0JoM.js.map} +1 -1
  3. package/dist/assets/{_baseUniq-BqneJ7vC.js → _baseUniq-C01nKZPU.js} +2 -2
  4. package/dist/assets/{_baseUniq-BqneJ7vC.js.map → _baseUniq-C01nKZPU.js.map} +1 -1
  5. package/dist/assets/{arc-B41HBJYw.js → arc-CvfPh49h.js} +2 -2
  6. package/dist/assets/{arc-B41HBJYw.js.map → arc-CvfPh49h.js.map} +1 -1
  7. package/dist/assets/{architectureDiagram-VXUJARFQ-DTblZJPk.js → architectureDiagram-VXUJARFQ-Cx-DJdd9.js} +2 -2
  8. package/dist/assets/{architectureDiagram-VXUJARFQ-DTblZJPk.js.map → architectureDiagram-VXUJARFQ-Cx-DJdd9.js.map} +1 -1
  9. package/dist/assets/{blockDiagram-VD42YOAC-BMM1ENpW.js → blockDiagram-VD42YOAC-CjZi8L8b.js} +2 -2
  10. package/dist/assets/{blockDiagram-VD42YOAC-BMM1ENpW.js.map → blockDiagram-VD42YOAC-CjZi8L8b.js.map} +1 -1
  11. package/dist/assets/{c4Diagram-YG6GDRKO-0_tm3K4y.js → c4Diagram-YG6GDRKO-C7VSQCDP.js} +2 -2
  12. package/dist/assets/{c4Diagram-YG6GDRKO-0_tm3K4y.js.map → c4Diagram-YG6GDRKO-C7VSQCDP.js.map} +1 -1
  13. package/dist/assets/{channel-CzviH7wi.js → channel-jS3fITDG.js} +2 -2
  14. package/dist/assets/{channel-CzviH7wi.js.map → channel-jS3fITDG.js.map} +1 -1
  15. package/dist/assets/{chunk-4BX2VUAB-BdiEiQKw.js → chunk-4BX2VUAB-BzqE3lym.js} +2 -2
  16. package/dist/assets/{chunk-4BX2VUAB-BdiEiQKw.js.map → chunk-4BX2VUAB-BzqE3lym.js.map} +1 -1
  17. package/dist/assets/{chunk-55IACEB6-o-GxTW9D.js → chunk-55IACEB6-DxGUJrft.js} +2 -2
  18. package/dist/assets/{chunk-55IACEB6-o-GxTW9D.js.map → chunk-55IACEB6-DxGUJrft.js.map} +1 -1
  19. package/dist/assets/{chunk-B4BG7PRW-qIW-HouX.js → chunk-B4BG7PRW-8qRdtArO.js} +2 -2
  20. package/dist/assets/{chunk-B4BG7PRW-qIW-HouX.js.map → chunk-B4BG7PRW-8qRdtArO.js.map} +1 -1
  21. package/dist/assets/{chunk-DI55MBZ5-CUalBYtH.js → chunk-DI55MBZ5-Ux1QOzUy.js} +2 -2
  22. package/dist/assets/{chunk-DI55MBZ5-CUalBYtH.js.map → chunk-DI55MBZ5-Ux1QOzUy.js.map} +1 -1
  23. package/dist/assets/{chunk-FMBD7UC4-DvTLIOqx.js → chunk-FMBD7UC4-CuR8eQbP.js} +2 -2
  24. package/dist/assets/{chunk-FMBD7UC4-DvTLIOqx.js.map → chunk-FMBD7UC4-CuR8eQbP.js.map} +1 -1
  25. package/dist/assets/{chunk-QN33PNHL-IzRCZEG_.js → chunk-QN33PNHL-B8CCHcFQ.js} +2 -2
  26. package/dist/assets/{chunk-QN33PNHL-IzRCZEG_.js.map → chunk-QN33PNHL-B8CCHcFQ.js.map} +1 -1
  27. package/dist/assets/{chunk-QZHKN3VN-Ce2AFs__.js → chunk-QZHKN3VN-59ReDUUS.js} +2 -2
  28. package/dist/assets/{chunk-QZHKN3VN-Ce2AFs__.js.map → chunk-QZHKN3VN-59ReDUUS.js.map} +1 -1
  29. package/dist/assets/{chunk-TZMSLE5B-BJW4UVSc.js → chunk-TZMSLE5B-yB8S-MoI.js} +2 -2
  30. package/dist/assets/{chunk-TZMSLE5B-BJW4UVSc.js.map → chunk-TZMSLE5B-yB8S-MoI.js.map} +1 -1
  31. package/dist/assets/classDiagram-2ON5EDUG-CX-ma-72.js +2 -0
  32. package/dist/assets/{classDiagram-2ON5EDUG-B0ASNnbX.js.map → classDiagram-2ON5EDUG-CX-ma-72.js.map} +1 -1
  33. package/dist/assets/classDiagram-v2-WZHVMYZB-CX-ma-72.js +2 -0
  34. package/dist/assets/{classDiagram-v2-WZHVMYZB-B0ASNnbX.js.map → classDiagram-v2-WZHVMYZB-CX-ma-72.js.map} +1 -1
  35. package/dist/assets/{clone-DuI60JlF.js → clone-B1cS_P1m.js} +2 -2
  36. package/dist/assets/{clone-DuI60JlF.js.map → clone-B1cS_P1m.js.map} +1 -1
  37. package/dist/assets/{cose-bilkent-S5V4N54A-BFURzd3k.js → cose-bilkent-S5V4N54A-WaA6My8T.js} +2 -2
  38. package/dist/assets/{cose-bilkent-S5V4N54A-BFURzd3k.js.map → cose-bilkent-S5V4N54A-WaA6My8T.js.map} +1 -1
  39. package/dist/assets/{dagre-6UL2VRFP-2NloE4Yi.js → dagre-6UL2VRFP-WTXafpU6.js} +2 -2
  40. package/dist/assets/{dagre-6UL2VRFP-2NloE4Yi.js.map → dagre-6UL2VRFP-WTXafpU6.js.map} +1 -1
  41. package/dist/assets/{diagram-PSM6KHXK-7x7Qnd4X.js → diagram-PSM6KHXK-CoH6fjzQ.js} +2 -2
  42. package/dist/assets/{diagram-PSM6KHXK-7x7Qnd4X.js.map → diagram-PSM6KHXK-CoH6fjzQ.js.map} +1 -1
  43. package/dist/assets/{diagram-QEK2KX5R-B0NXXuOV.js → diagram-QEK2KX5R-Oljv-_39.js} +2 -2
  44. package/dist/assets/{diagram-QEK2KX5R-B0NXXuOV.js.map → diagram-QEK2KX5R-Oljv-_39.js.map} +1 -1
  45. package/dist/assets/{diagram-S2PKOQOG-a74j2Pdd.js → diagram-S2PKOQOG-Gg4hR71b.js} +2 -2
  46. package/dist/assets/{diagram-S2PKOQOG-a74j2Pdd.js.map → diagram-S2PKOQOG-Gg4hR71b.js.map} +1 -1
  47. package/dist/assets/{erDiagram-Q2GNP2WA-k-KyHPId.js → erDiagram-Q2GNP2WA-DB7tjULu.js} +2 -2
  48. package/dist/assets/{erDiagram-Q2GNP2WA-k-KyHPId.js.map → erDiagram-Q2GNP2WA-DB7tjULu.js.map} +1 -1
  49. package/dist/assets/{flowDiagram-NV44I4VS-Dl-K34yG.js → flowDiagram-NV44I4VS-DzT5xRq3.js} +2 -2
  50. package/dist/assets/{flowDiagram-NV44I4VS-Dl-K34yG.js.map → flowDiagram-NV44I4VS-DzT5xRq3.js.map} +1 -1
  51. package/dist/assets/{ganttDiagram-LVOFAZNH-B6eaVPpp.js → ganttDiagram-LVOFAZNH-D2NBbgM6.js} +2 -2
  52. package/dist/assets/{ganttDiagram-LVOFAZNH-B6eaVPpp.js.map → ganttDiagram-LVOFAZNH-D2NBbgM6.js.map} +1 -1
  53. package/dist/assets/{gitGraphDiagram-NY62KEGX-BdOMe-oh.js → gitGraphDiagram-NY62KEGX-BzXJHLw9.js} +2 -2
  54. package/dist/assets/{gitGraphDiagram-NY62KEGX-BdOMe-oh.js.map → gitGraphDiagram-NY62KEGX-BzXJHLw9.js.map} +1 -1
  55. package/dist/assets/{graph-BCeOLFp6.js → graph-DNJkdAax.js} +2 -2
  56. package/dist/assets/{graph-BCeOLFp6.js.map → graph-DNJkdAax.js.map} +1 -1
  57. package/dist/assets/{infoDiagram-F6ZHWCRC-DLB1jYji.js → infoDiagram-F6ZHWCRC-Bt1j9OBZ.js} +2 -2
  58. package/dist/assets/{infoDiagram-F6ZHWCRC-DLB1jYji.js.map → infoDiagram-F6ZHWCRC-Bt1j9OBZ.js.map} +1 -1
  59. package/dist/assets/{journeyDiagram-XKPGCS4Q-CEkRszjc.js → journeyDiagram-XKPGCS4Q-CpBwKMO2.js} +2 -2
  60. package/dist/assets/{journeyDiagram-XKPGCS4Q-CEkRszjc.js.map → journeyDiagram-XKPGCS4Q-CpBwKMO2.js.map} +1 -1
  61. package/dist/assets/{kanban-definition-3W4ZIXB7-DvGzdmFz.js → kanban-definition-3W4ZIXB7-BM-_9-8C.js} +2 -2
  62. package/dist/assets/{kanban-definition-3W4ZIXB7-DvGzdmFz.js.map → kanban-definition-3W4ZIXB7-BM-_9-8C.js.map} +1 -1
  63. package/dist/assets/{layout-DqFGgFXM.js → layout-C9Bg2dBa.js} +2 -2
  64. package/dist/assets/{layout-DqFGgFXM.js.map → layout-C9Bg2dBa.js.map} +1 -1
  65. package/dist/assets/{linear-oKTGuyqU.js → linear-BTJsW5AR.js} +2 -2
  66. package/dist/assets/{linear-oKTGuyqU.js.map → linear-BTJsW5AR.js.map} +1 -1
  67. package/dist/assets/{main-B_rmFN-P.css → main-BGaTIf-Q.css} +1 -1
  68. package/dist/assets/{main-Chbvf6JP.js → main-BaebWasr.js} +4 -4
  69. package/dist/assets/{main-Chbvf6JP.js.map → main-BaebWasr.js.map} +1 -1
  70. package/dist/assets/{main-C81Et7oP.js → main-CWkZDH4r.js} +3 -3
  71. package/dist/assets/{main-C81Et7oP.js.map → main-CWkZDH4r.js.map} +1 -1
  72. package/dist/assets/{mermaid.core-rWg6JcoC.js → mermaid.core-BymI4HJS.js} +6 -6
  73. package/dist/assets/{mermaid.core-rWg6JcoC.js.map → mermaid.core-BymI4HJS.js.map} +1 -1
  74. package/dist/assets/{mindmap-definition-VGOIOE7T-CHrK3W4B.js → mindmap-definition-VGOIOE7T-CLTEnp2P.js} +2 -2
  75. package/dist/assets/{mindmap-definition-VGOIOE7T-CHrK3W4B.js.map → mindmap-definition-VGOIOE7T-CLTEnp2P.js.map} +1 -1
  76. package/dist/assets/{pieDiagram-ADFJNKIX-BL-nn_b4.js → pieDiagram-ADFJNKIX-Bw0donk2.js} +2 -2
  77. package/dist/assets/{pieDiagram-ADFJNKIX-BL-nn_b4.js.map → pieDiagram-ADFJNKIX-Bw0donk2.js.map} +1 -1
  78. package/dist/assets/{quadrantDiagram-AYHSOK5B-Cxy4jxbg.js → quadrantDiagram-AYHSOK5B-Cm8mUfGa.js} +2 -2
  79. package/dist/assets/{quadrantDiagram-AYHSOK5B-Cxy4jxbg.js.map → quadrantDiagram-AYHSOK5B-Cm8mUfGa.js.map} +1 -1
  80. package/dist/assets/{requirementDiagram-UZGBJVZJ-Cza4HxEz.js → requirementDiagram-UZGBJVZJ-C_f1ywi-.js} +2 -2
  81. package/dist/assets/{requirementDiagram-UZGBJVZJ-Cza4HxEz.js.map → requirementDiagram-UZGBJVZJ-C_f1ywi-.js.map} +1 -1
  82. package/dist/assets/{sankeyDiagram-TZEHDZUN-qwIj1xsG.js → sankeyDiagram-TZEHDZUN-DTNFZCdJ.js} +2 -2
  83. package/dist/assets/{sankeyDiagram-TZEHDZUN-qwIj1xsG.js.map → sankeyDiagram-TZEHDZUN-DTNFZCdJ.js.map} +1 -1
  84. package/dist/assets/{sequenceDiagram-WL72ISMW-C9_twmEc.js → sequenceDiagram-WL72ISMW-TGqxh1eL.js} +2 -2
  85. package/dist/assets/{sequenceDiagram-WL72ISMW-C9_twmEc.js.map → sequenceDiagram-WL72ISMW-TGqxh1eL.js.map} +1 -1
  86. package/dist/assets/{stateDiagram-FKZM4ZOC-B33VNknZ.js → stateDiagram-FKZM4ZOC-BI4QdIXS.js} +2 -2
  87. package/dist/assets/{stateDiagram-FKZM4ZOC-B33VNknZ.js.map → stateDiagram-FKZM4ZOC-BI4QdIXS.js.map} +1 -1
  88. package/dist/assets/stateDiagram-v2-4FDKWEC3-DSN57ySy.js +2 -0
  89. package/dist/assets/{stateDiagram-v2-4FDKWEC3-DOXH6dJF.js.map → stateDiagram-v2-4FDKWEC3-DSN57ySy.js.map} +1 -1
  90. package/dist/assets/{timeline-definition-IT6M3QCI-BU2GcjD5.js → timeline-definition-IT6M3QCI-PXMMkiNk.js} +2 -2
  91. package/dist/assets/{timeline-definition-IT6M3QCI-BU2GcjD5.js.map → timeline-definition-IT6M3QCI-PXMMkiNk.js.map} +1 -1
  92. package/dist/assets/{treemap-KMMF4GRG-C2Sf7oH-.js → treemap-KMMF4GRG-DZ3dLkt9.js} +2 -2
  93. package/dist/assets/{treemap-KMMF4GRG-C2Sf7oH-.js.map → treemap-KMMF4GRG-DZ3dLkt9.js.map} +1 -1
  94. package/dist/assets/{xychartDiagram-PRI3JC2R-CJQGMN6m.js → xychartDiagram-PRI3JC2R-DQlXFKme.js} +2 -2
  95. package/dist/assets/{xychartDiagram-PRI3JC2R-CJQGMN6m.js.map → xychartDiagram-PRI3JC2R-DQlXFKme.js.map} +1 -1
  96. package/dist/index.html +1 -1
  97. package/package.json +4 -4
  98. package/src/components/ai-elements/__tests__/response.test.tsx +157 -158
  99. package/src/components/ai-elements/response.tsx +7 -10
  100. package/src/components/chat.tsx +7 -7
  101. package/src/index.css +1 -1
  102. package/dist/assets/classDiagram-2ON5EDUG-B0ASNnbX.js +0 -2
  103. package/dist/assets/classDiagram-v2-WZHVMYZB-B0ASNnbX.js +0 -2
  104. package/dist/assets/stateDiagram-v2-4FDKWEC3-DOXH6dJF.js +0 -2
@@ -1,4 +1,4 @@
1
- var we=Object.defineProperty;var P=(e,t)=>we(e,"name",{value:t,configurable:!0});import{a as ve,b as Xt,g as lt,d as Ie,c as Jt,e as Qt}from"./chunk-TZMSLE5B-BJW4UVSc.js";import{_ as f,o as Le,c as at,d as St,l as Z,j as re,e as _e,f as Ae,k as I,b as se,s as ke,q as Pe,a as Ne,g as Se,t as Me,v as Re,J as De,z as Ce,i as Mt,u as F,a2 as H,a3 as _t,a4 as ie,a5 as Oe,a6 as Be,a7 as ne,G as Ht}from"./mermaid.core-rWg6JcoC.js";import{I as Ve}from"./chunk-QZHKN3VN-Ce2AFs__.js";import"./main-C81Et7oP.js";import"./main-Chbvf6JP.js";import"./react-vendor-BGrcQn-n.js";import"./ui-vendor-B7JxFfFk.js";var Ut=(function(){var e=f(function(ut,v,A,L){for(A=A||{},L=ut.length;L--;A[ut[L]]=v);return A},"o"),t=[1,2],n=[1,3],s=[1,4],r=[2,4],i=[1,9],c=[1,11],h=[1,13],o=[1,14],a=[1,16],p=[1,17],g=[1,18],x=[1,24],y=[1,25],m=[1,26],w=[1,27],k=[1,28],S=[1,29],M=[1,30],B=[1,31],V=[1,32],z=[1,33],U=[1,34],$=[1,35],rt=[1,36],G=[1,37],K=[1,38],q=[1,39],C=[1,41],j=[1,42],X=[1,43],tt=[1,44],it=[1,45],D=[1,46],E=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],_=[2,71],J=[4,5,16,50,52,53],et=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],R=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],Vt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],Zt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],ct=[69,70,71],ht=[1,127],Yt={trace:f(P(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:f(P(function(v,A,L,b,O,d,It){var u=d.length-1;switch(O){case 3:return b.apply(d[u]),d[u];case 4:case 9:this.$=[];break;case 5:case 10:d[u-1].push(d[u]),this.$=d[u-1];break;case 6:case 7:case 11:case 12:this.$=d[u];break;case 8:case 13:this.$=[];break;case 15:d[u].type="createParticipant",this.$=d[u];break;case 16:d[u-1].unshift({type:"boxStart",boxData:b.parseBoxData(d[u-2])}),d[u-1].push({type:"boxEnd",boxText:d[u-2]}),this.$=d[u-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(d[u-2]),sequenceIndexStep:Number(d[u-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(d[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:d[u-1].actor};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:d[u-1].actor};break;case 29:b.setDiagramTitle(d[u].substring(6)),this.$=d[u].substring(6);break;case 30:b.setDiagramTitle(d[u].substring(7)),this.$=d[u].substring(7);break;case 31:this.$=d[u].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=d[u].trim(),b.setAccDescription(this.$);break;case 34:d[u-1].unshift({type:"loopStart",loopText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.LOOP_START}),d[u-1].push({type:"loopEnd",loopText:d[u-2],signalType:b.LINETYPE.LOOP_END}),this.$=d[u-1];break;case 35:d[u-1].unshift({type:"rectStart",color:b.parseMessage(d[u-2]),signalType:b.LINETYPE.RECT_START}),d[u-1].push({type:"rectEnd",color:b.parseMessage(d[u-2]),signalType:b.LINETYPE.RECT_END}),this.$=d[u-1];break;case 36:d[u-1].unshift({type:"optStart",optText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.OPT_START}),d[u-1].push({type:"optEnd",optText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.OPT_END}),this.$=d[u-1];break;case 37:d[u-1].unshift({type:"altStart",altText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.ALT_START}),d[u-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=d[u-1];break;case 38:d[u-1].unshift({type:"parStart",parText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.PAR_START}),d[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=d[u-1];break;case 39:d[u-1].unshift({type:"parStart",parText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.PAR_OVER_START}),d[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=d[u-1];break;case 40:d[u-1].unshift({type:"criticalStart",criticalText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.CRITICAL_START}),d[u-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=d[u-1];break;case 41:d[u-1].unshift({type:"breakStart",breakText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.BREAK_START}),d[u-1].push({type:"breakEnd",optText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.BREAK_END}),this.$=d[u-1];break;case 43:this.$=d[u-3].concat([{type:"option",optionText:b.parseMessage(d[u-1]),signalType:b.LINETYPE.CRITICAL_OPTION},d[u]]);break;case 45:this.$=d[u-3].concat([{type:"and",parText:b.parseMessage(d[u-1]),signalType:b.LINETYPE.PAR_AND},d[u]]);break;case 47:this.$=d[u-3].concat([{type:"else",altText:b.parseMessage(d[u-1]),signalType:b.LINETYPE.ALT_ELSE},d[u]]);break;case 48:d[u-3].draw="participant",d[u-3].type="addParticipant",d[u-3].description=b.parseMessage(d[u-1]),this.$=d[u-3];break;case 49:d[u-1].draw="participant",d[u-1].type="addParticipant",this.$=d[u-1];break;case 50:d[u-3].draw="actor",d[u-3].type="addParticipant",d[u-3].description=b.parseMessage(d[u-1]),this.$=d[u-3];break;case 51:d[u-1].draw="actor",d[u-1].type="addParticipant",this.$=d[u-1];break;case 52:d[u-1].type="destroyParticipant",this.$=d[u-1];break;case 53:d[u-1].draw="participant",d[u-1].type="addParticipant",this.$=d[u-1];break;case 54:this.$=[d[u-1],{type:"addNote",placement:d[u-2],actor:d[u-1].actor,text:d[u]}];break;case 55:d[u-2]=[].concat(d[u-1],d[u-1]).slice(0,2),d[u-2][0]=d[u-2][0].actor,d[u-2][1]=d[u-2][1].actor,this.$=[d[u-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:d[u-2].slice(0,2),text:d[u]}];break;case 56:this.$=[d[u-1],{type:"addLinks",actor:d[u-1].actor,text:d[u]}];break;case 57:this.$=[d[u-1],{type:"addALink",actor:d[u-1].actor,text:d[u]}];break;case 58:this.$=[d[u-1],{type:"addProperties",actor:d[u-1].actor,text:d[u]}];break;case 59:this.$=[d[u-1],{type:"addDetails",actor:d[u-1].actor,text:d[u]}];break;case 62:this.$=[d[u-2],d[u]];break;case 63:this.$=d[u];break;case 64:this.$=b.PLACEMENT.LEFTOF;break;case 65:this.$=b.PLACEMENT.RIGHTOF;break;case 66:this.$=[d[u-4],d[u-1],{type:"addMessage",from:d[u-4].actor,to:d[u-1].actor,signalType:d[u-3],msg:d[u],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:d[u-1].actor}];break;case 67:this.$=[d[u-4],d[u-1],{type:"addMessage",from:d[u-4].actor,to:d[u-1].actor,signalType:d[u-3],msg:d[u]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:d[u-4].actor}];break;case 68:this.$=[d[u-3],d[u-1],{type:"addMessage",from:d[u-3].actor,to:d[u-1].actor,signalType:d[u-2],msg:d[u]}];break;case 69:this.$={type:"addParticipant",actor:d[u-1],config:d[u]};break;case 70:this.$=d[u-1].trim();break;case 71:this.$={type:"addParticipant",actor:d[u]};break;case 72:this.$=b.LINETYPE.SOLID_OPEN;break;case 73:this.$=b.LINETYPE.DOTTED_OPEN;break;case 74:this.$=b.LINETYPE.SOLID;break;case 75:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=b.LINETYPE.DOTTED;break;case 77:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=b.LINETYPE.SOLID_CROSS;break;case 79:this.$=b.LINETYPE.DOTTED_CROSS;break;case 80:this.$=b.LINETYPE.SOLID_POINT;break;case 81:this.$=b.LINETYPE.DOTTED_POINT;break;case 82:this.$=b.parseMessage(d[u].trim().substring(1));break}},"anonymous"),"anonymous"),table:[{3:1,4:t,5:n,6:s},{1:[3]},{3:5,4:t,5:n,6:s},{3:6,4:t,5:n,6:s},e([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:c,8:8,9:10,12:12,13:h,14:o,17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},e(E,[2,5]),{9:47,12:12,13:h,14:o,17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},e(E,[2,7]),e(E,[2,8]),e(E,[2,14]),{12:48,50:G,52:K,53:q},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:D},{22:55,71:D},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(E,[2,29]),e(E,[2,30]),{32:[1,61]},{34:[1,62]},e(E,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:D},{22:75,71:D},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:D},{22:92,71:D},{22:93,71:D},{22:94,71:D},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],_),e(E,[2,6]),e(E,[2,15]),e(J,[2,9],{10:95}),e(E,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(E,[2,21]),{5:[1,99]},{5:[1,100]},e(E,[2,24]),e(E,[2,25]),e(E,[2,26]),e(E,[2,27]),e(E,[2,28]),e(E,[2,31]),e(E,[2,32]),e(et,r,{7:101}),e(et,r,{7:102}),e(et,r,{7:103}),e(R,r,{40:104,7:105}),e(Vt,r,{42:106,7:107}),e(Vt,r,{7:107,42:108}),e(Zt,r,{45:109,7:110}),e(et,r,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],_,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:D},e(ct,[2,72]),e(ct,[2,73]),e(ct,[2,74]),e(ct,[2,75]),e(ct,[2,76]),e(ct,[2,77]),e(ct,[2,78]),e(ct,[2,79]),e(ct,[2,80]),e(ct,[2,81]),{22:123,71:D},{22:125,59:124,71:D},{71:[2,64]},{71:[2,65]},{57:126,86:ht},{57:128,86:ht},{57:129,86:ht},{57:130,86:ht},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:G,52:K,53:q},{5:[1,136]},e(E,[2,19]),e(E,[2,20]),e(E,[2,22]),e(E,[2,23]),{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,137],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,138],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,139],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{16:[1,140]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,46],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,49:[1,141],50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{16:[1,142]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,44],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,48:[1,143],50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{16:[1,144]},{16:[1,145]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,42],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,47:[1,146],50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,147],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{15:[1,148]},e(E,[2,49]),e(E,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(E,[2,51]),e(E,[2,52]),{22:151,71:D},{22:152,71:D},{57:153,86:ht},{57:154,86:ht},{57:155,86:ht},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(E,[2,16]),e(J,[2,10]),{12:157,50:G,52:K,53:q},e(J,[2,12]),e(J,[2,13]),e(E,[2,18]),e(E,[2,34]),e(E,[2,35]),e(E,[2,36]),e(E,[2,37]),{15:[1,158]},e(E,[2,38]),{15:[1,159]},e(E,[2,39]),e(E,[2,40]),{15:[1,160]},e(E,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:ht},{57:165,86:ht},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:D},e(J,[2,11]),e(R,r,{7:105,40:167}),e(Vt,r,{7:107,42:168}),e(Zt,r,{7:110,45:169}),e(E,[2,48]),{5:[2,70]},e(E,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:f(P(function(v,A){if(A.recoverable)this.trace(v);else{var L=new Error(v);throw L.hash=A,L}},"parseError"),"parseError"),parse:f(P(function(v){var A=this,L=[0],b=[],O=[null],d=[],It=this.table,u="",kt=0,$t=0,Te=2,jt=1,Ee=d.slice.call(arguments,1),W=Object.create(this.lexer),yt={yy:{}};for(var Wt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Wt)&&(yt.yy[Wt]=this.yy[Wt]);W.setInput(v,yt.yy),yt.yy.lexer=W,yt.yy.parser=this,typeof W.yylloc>"u"&&(W.yylloc={});var Ft=W.yylloc;d.push(Ft);var be=W.options&&W.options.ranges;typeof yt.yy.parseError=="function"?this.parseError=yt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function me(st){L.length=L.length-2*st,O.length=O.length-st,d.length=d.length-st}P(me,"popStack"),f(me,"popStack");function te(){var st;return st=b.pop()||W.lex()||jt,typeof st!="number"&&(st instanceof Array&&(b=st,st=b.pop()),st=A.symbols_[st]||st),st}P(te,"lex"),f(te,"lex");for(var Q,Tt,nt,qt,mt={},Pt,dt,ee,Nt;;){if(Tt=L[L.length-1],this.defaultActions[Tt]?nt=this.defaultActions[Tt]:((Q===null||typeof Q>"u")&&(Q=te()),nt=It[Tt]&&It[Tt][Q]),typeof nt>"u"||!nt.length||!nt[0]){var zt="";Nt=[];for(Pt in It[Tt])this.terminals_[Pt]&&Pt>Te&&Nt.push("'"+this.terminals_[Pt]+"'");W.showPosition?zt="Parse error on line "+(kt+1)+`:
1
+ var we=Object.defineProperty;var P=(e,t)=>we(e,"name",{value:t,configurable:!0});import{a as ve,b as Xt,g as lt,d as Ie,c as Jt,e as Qt}from"./chunk-TZMSLE5B-yB8S-MoI.js";import{_ as f,o as Le,c as at,d as St,l as Z,j as re,e as _e,f as Ae,k as I,b as se,s as ke,q as Pe,a as Ne,g as Se,t as Me,v as Re,J as De,z as Ce,i as Mt,u as F,a2 as H,a3 as _t,a4 as ie,a5 as Oe,a6 as Be,a7 as ne,G as Ht}from"./mermaid.core-BymI4HJS.js";import{I as Ve}from"./chunk-QZHKN3VN-59ReDUUS.js";import"./main-CWkZDH4r.js";import"./main-BaebWasr.js";import"./react-vendor-BGrcQn-n.js";import"./ui-vendor-B7JxFfFk.js";var Ut=(function(){var e=f(function(ut,v,A,L){for(A=A||{},L=ut.length;L--;A[ut[L]]=v);return A},"o"),t=[1,2],n=[1,3],s=[1,4],r=[2,4],i=[1,9],c=[1,11],h=[1,13],o=[1,14],a=[1,16],p=[1,17],g=[1,18],x=[1,24],y=[1,25],m=[1,26],w=[1,27],k=[1,28],S=[1,29],M=[1,30],B=[1,31],V=[1,32],z=[1,33],U=[1,34],$=[1,35],rt=[1,36],G=[1,37],K=[1,38],q=[1,39],C=[1,41],j=[1,42],X=[1,43],tt=[1,44],it=[1,45],D=[1,46],E=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],_=[2,71],J=[4,5,16,50,52,53],et=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],R=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],Vt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],Zt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],ct=[69,70,71],ht=[1,127],Yt={trace:f(P(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:f(P(function(v,A,L,b,O,d,It){var u=d.length-1;switch(O){case 3:return b.apply(d[u]),d[u];case 4:case 9:this.$=[];break;case 5:case 10:d[u-1].push(d[u]),this.$=d[u-1];break;case 6:case 7:case 11:case 12:this.$=d[u];break;case 8:case 13:this.$=[];break;case 15:d[u].type="createParticipant",this.$=d[u];break;case 16:d[u-1].unshift({type:"boxStart",boxData:b.parseBoxData(d[u-2])}),d[u-1].push({type:"boxEnd",boxText:d[u-2]}),this.$=d[u-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(d[u-2]),sequenceIndexStep:Number(d[u-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(d[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:d[u-1].actor};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:d[u-1].actor};break;case 29:b.setDiagramTitle(d[u].substring(6)),this.$=d[u].substring(6);break;case 30:b.setDiagramTitle(d[u].substring(7)),this.$=d[u].substring(7);break;case 31:this.$=d[u].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=d[u].trim(),b.setAccDescription(this.$);break;case 34:d[u-1].unshift({type:"loopStart",loopText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.LOOP_START}),d[u-1].push({type:"loopEnd",loopText:d[u-2],signalType:b.LINETYPE.LOOP_END}),this.$=d[u-1];break;case 35:d[u-1].unshift({type:"rectStart",color:b.parseMessage(d[u-2]),signalType:b.LINETYPE.RECT_START}),d[u-1].push({type:"rectEnd",color:b.parseMessage(d[u-2]),signalType:b.LINETYPE.RECT_END}),this.$=d[u-1];break;case 36:d[u-1].unshift({type:"optStart",optText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.OPT_START}),d[u-1].push({type:"optEnd",optText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.OPT_END}),this.$=d[u-1];break;case 37:d[u-1].unshift({type:"altStart",altText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.ALT_START}),d[u-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=d[u-1];break;case 38:d[u-1].unshift({type:"parStart",parText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.PAR_START}),d[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=d[u-1];break;case 39:d[u-1].unshift({type:"parStart",parText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.PAR_OVER_START}),d[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=d[u-1];break;case 40:d[u-1].unshift({type:"criticalStart",criticalText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.CRITICAL_START}),d[u-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=d[u-1];break;case 41:d[u-1].unshift({type:"breakStart",breakText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.BREAK_START}),d[u-1].push({type:"breakEnd",optText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.BREAK_END}),this.$=d[u-1];break;case 43:this.$=d[u-3].concat([{type:"option",optionText:b.parseMessage(d[u-1]),signalType:b.LINETYPE.CRITICAL_OPTION},d[u]]);break;case 45:this.$=d[u-3].concat([{type:"and",parText:b.parseMessage(d[u-1]),signalType:b.LINETYPE.PAR_AND},d[u]]);break;case 47:this.$=d[u-3].concat([{type:"else",altText:b.parseMessage(d[u-1]),signalType:b.LINETYPE.ALT_ELSE},d[u]]);break;case 48:d[u-3].draw="participant",d[u-3].type="addParticipant",d[u-3].description=b.parseMessage(d[u-1]),this.$=d[u-3];break;case 49:d[u-1].draw="participant",d[u-1].type="addParticipant",this.$=d[u-1];break;case 50:d[u-3].draw="actor",d[u-3].type="addParticipant",d[u-3].description=b.parseMessage(d[u-1]),this.$=d[u-3];break;case 51:d[u-1].draw="actor",d[u-1].type="addParticipant",this.$=d[u-1];break;case 52:d[u-1].type="destroyParticipant",this.$=d[u-1];break;case 53:d[u-1].draw="participant",d[u-1].type="addParticipant",this.$=d[u-1];break;case 54:this.$=[d[u-1],{type:"addNote",placement:d[u-2],actor:d[u-1].actor,text:d[u]}];break;case 55:d[u-2]=[].concat(d[u-1],d[u-1]).slice(0,2),d[u-2][0]=d[u-2][0].actor,d[u-2][1]=d[u-2][1].actor,this.$=[d[u-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:d[u-2].slice(0,2),text:d[u]}];break;case 56:this.$=[d[u-1],{type:"addLinks",actor:d[u-1].actor,text:d[u]}];break;case 57:this.$=[d[u-1],{type:"addALink",actor:d[u-1].actor,text:d[u]}];break;case 58:this.$=[d[u-1],{type:"addProperties",actor:d[u-1].actor,text:d[u]}];break;case 59:this.$=[d[u-1],{type:"addDetails",actor:d[u-1].actor,text:d[u]}];break;case 62:this.$=[d[u-2],d[u]];break;case 63:this.$=d[u];break;case 64:this.$=b.PLACEMENT.LEFTOF;break;case 65:this.$=b.PLACEMENT.RIGHTOF;break;case 66:this.$=[d[u-4],d[u-1],{type:"addMessage",from:d[u-4].actor,to:d[u-1].actor,signalType:d[u-3],msg:d[u],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:d[u-1].actor}];break;case 67:this.$=[d[u-4],d[u-1],{type:"addMessage",from:d[u-4].actor,to:d[u-1].actor,signalType:d[u-3],msg:d[u]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:d[u-4].actor}];break;case 68:this.$=[d[u-3],d[u-1],{type:"addMessage",from:d[u-3].actor,to:d[u-1].actor,signalType:d[u-2],msg:d[u]}];break;case 69:this.$={type:"addParticipant",actor:d[u-1],config:d[u]};break;case 70:this.$=d[u-1].trim();break;case 71:this.$={type:"addParticipant",actor:d[u]};break;case 72:this.$=b.LINETYPE.SOLID_OPEN;break;case 73:this.$=b.LINETYPE.DOTTED_OPEN;break;case 74:this.$=b.LINETYPE.SOLID;break;case 75:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=b.LINETYPE.DOTTED;break;case 77:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=b.LINETYPE.SOLID_CROSS;break;case 79:this.$=b.LINETYPE.DOTTED_CROSS;break;case 80:this.$=b.LINETYPE.SOLID_POINT;break;case 81:this.$=b.LINETYPE.DOTTED_POINT;break;case 82:this.$=b.parseMessage(d[u].trim().substring(1));break}},"anonymous"),"anonymous"),table:[{3:1,4:t,5:n,6:s},{1:[3]},{3:5,4:t,5:n,6:s},{3:6,4:t,5:n,6:s},e([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:c,8:8,9:10,12:12,13:h,14:o,17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},e(E,[2,5]),{9:47,12:12,13:h,14:o,17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},e(E,[2,7]),e(E,[2,8]),e(E,[2,14]),{12:48,50:G,52:K,53:q},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:D},{22:55,71:D},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(E,[2,29]),e(E,[2,30]),{32:[1,61]},{34:[1,62]},e(E,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:D},{22:75,71:D},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:D},{22:92,71:D},{22:93,71:D},{22:94,71:D},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],_),e(E,[2,6]),e(E,[2,15]),e(J,[2,9],{10:95}),e(E,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(E,[2,21]),{5:[1,99]},{5:[1,100]},e(E,[2,24]),e(E,[2,25]),e(E,[2,26]),e(E,[2,27]),e(E,[2,28]),e(E,[2,31]),e(E,[2,32]),e(et,r,{7:101}),e(et,r,{7:102}),e(et,r,{7:103}),e(R,r,{40:104,7:105}),e(Vt,r,{42:106,7:107}),e(Vt,r,{7:107,42:108}),e(Zt,r,{45:109,7:110}),e(et,r,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],_,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:D},e(ct,[2,72]),e(ct,[2,73]),e(ct,[2,74]),e(ct,[2,75]),e(ct,[2,76]),e(ct,[2,77]),e(ct,[2,78]),e(ct,[2,79]),e(ct,[2,80]),e(ct,[2,81]),{22:123,71:D},{22:125,59:124,71:D},{71:[2,64]},{71:[2,65]},{57:126,86:ht},{57:128,86:ht},{57:129,86:ht},{57:130,86:ht},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:G,52:K,53:q},{5:[1,136]},e(E,[2,19]),e(E,[2,20]),e(E,[2,22]),e(E,[2,23]),{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,137],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,138],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,139],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{16:[1,140]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,46],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,49:[1,141],50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{16:[1,142]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,44],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,48:[1,143],50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{16:[1,144]},{16:[1,145]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,42],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,47:[1,146],50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,147],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:S,37:M,38:B,39:V,41:z,43:U,44:$,46:rt,50:G,52:K,53:q,55:C,60:j,61:X,62:tt,63:it,71:D},{15:[1,148]},e(E,[2,49]),e(E,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(E,[2,51]),e(E,[2,52]),{22:151,71:D},{22:152,71:D},{57:153,86:ht},{57:154,86:ht},{57:155,86:ht},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(E,[2,16]),e(J,[2,10]),{12:157,50:G,52:K,53:q},e(J,[2,12]),e(J,[2,13]),e(E,[2,18]),e(E,[2,34]),e(E,[2,35]),e(E,[2,36]),e(E,[2,37]),{15:[1,158]},e(E,[2,38]),{15:[1,159]},e(E,[2,39]),e(E,[2,40]),{15:[1,160]},e(E,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:ht},{57:165,86:ht},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:D},e(J,[2,11]),e(R,r,{7:105,40:167}),e(Vt,r,{7:107,42:168}),e(Zt,r,{7:110,45:169}),e(E,[2,48]),{5:[2,70]},e(E,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:f(P(function(v,A){if(A.recoverable)this.trace(v);else{var L=new Error(v);throw L.hash=A,L}},"parseError"),"parseError"),parse:f(P(function(v){var A=this,L=[0],b=[],O=[null],d=[],It=this.table,u="",kt=0,$t=0,Te=2,jt=1,Ee=d.slice.call(arguments,1),W=Object.create(this.lexer),yt={yy:{}};for(var Wt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Wt)&&(yt.yy[Wt]=this.yy[Wt]);W.setInput(v,yt.yy),yt.yy.lexer=W,yt.yy.parser=this,typeof W.yylloc>"u"&&(W.yylloc={});var Ft=W.yylloc;d.push(Ft);var be=W.options&&W.options.ranges;typeof yt.yy.parseError=="function"?this.parseError=yt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function me(st){L.length=L.length-2*st,O.length=O.length-st,d.length=d.length-st}P(me,"popStack"),f(me,"popStack");function te(){var st;return st=b.pop()||W.lex()||jt,typeof st!="number"&&(st instanceof Array&&(b=st,st=b.pop()),st=A.symbols_[st]||st),st}P(te,"lex"),f(te,"lex");for(var Q,Tt,nt,qt,mt={},Pt,dt,ee,Nt;;){if(Tt=L[L.length-1],this.defaultActions[Tt]?nt=this.defaultActions[Tt]:((Q===null||typeof Q>"u")&&(Q=te()),nt=It[Tt]&&It[Tt][Q]),typeof nt>"u"||!nt.length||!nt[0]){var zt="";Nt=[];for(Pt in It[Tt])this.terminals_[Pt]&&Pt>Te&&Nt.push("'"+this.terminals_[Pt]+"'");W.showPosition?zt="Parse error on line "+(kt+1)+`:
2
2
  `+W.showPosition()+`
3
3
  Expecting `+Nt.join(", ")+", got '"+(this.terminals_[Q]||Q)+"'":zt="Parse error on line "+(kt+1)+": Unexpected "+(Q==jt?"end of input":"'"+(this.terminals_[Q]||Q)+"'"),this.parseError(zt,{text:W.match,token:this.terminals_[Q]||Q,line:W.yylineno,loc:Ft,expected:Nt})}if(nt[0]instanceof Array&&nt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Tt+", token: "+Q);switch(nt[0]){case 1:L.push(Q),O.push(W.yytext),d.push(W.yylloc),L.push(nt[1]),Q=null,$t=W.yyleng,u=W.yytext,kt=W.yylineno,Ft=W.yylloc;break;case 2:if(dt=this.productions_[nt[1]][1],mt.$=O[O.length-dt],mt._$={first_line:d[d.length-(dt||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(dt||1)].first_column,last_column:d[d.length-1].last_column},be&&(mt._$.range=[d[d.length-(dt||1)].range[0],d[d.length-1].range[1]]),qt=this.performAction.apply(mt,[u,$t,kt,yt.yy,nt[1],O,d].concat(Ee)),typeof qt<"u")return qt;dt&&(L=L.slice(0,-1*dt*2),O=O.slice(0,-1*dt),d=d.slice(0,-1*dt)),L.push(this.productions_[nt[1]][0]),O.push(mt.$),d.push(mt._$),ee=It[L[L.length-2]][L[L.length-1]],L.push(ee);break;case 3:return!0}}return!0},"parse"),"parse")},ye=(function(){var ut={EOF:1,parseError:f(P(function(A,L){if(this.yy.parser)this.yy.parser.parseError(A,L);else throw new Error(A)},"parseError"),"parseError"),setInput:f(function(v,A){return this.yy=A||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]),this.offset=0,this},"setInput"),input:f(function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var A=v.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),v},"input"),unput:f(function(v){var A=v.length,L=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),L.length-1&&(this.yylineno-=L.length-1);var O=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:L?(L.length===b.length?this.yylloc.first_column:0)+b[b.length-L.length].length-L[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[O[0],O[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(v){this.unput(this.match.slice(v))},"less"),pastInput:f(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:f(function(){var v=this.match;return v.length<20&&(v+=this._input.substr(0,20-v.length)),(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var v=this.pastInput(),A=new Array(v.length+1).join("-");return v+this.upcomingInput()+`
@@ -143,4 +143,4 @@ Expecting `+Nt.join(", ")+", got '"+(this.terminals_[Q]||Q)+"'":zt="Parse error
143
143
  a ${y},${m} 0 0 0 ${g},0
144
144
  l 0,-${x-2*m}
145
145
  `;w.append("path").attr("d",k).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",p),s?w.attr("transform",`translate(${g*1.5}, ${a.height/4-2*m})`):w.attr("transform",`translate(${g*1.5}, ${(a.height+m)/4})`),t.rectData=a,pt(n,H(t.description))(t.description,o,a.x,a.y+(s?(a.height+x)/4:(a.height+m)/2),a.width,a.height,{class:`actor ${Ct}`},n);const S=w.select("path:last-child");if(S.node()){const M=S.node().getBBox();t.height=M.height+(n.sequence.labelBoxHeight??0)}return t.height},"drawActorTypeDatabase"),je=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+80,h=30,o=e.append("g").lower();s||(N++,o.append("line").attr("id","actor"+N).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=N);const a=e.append("g");let p=gt;s?p+=` ${ft}`:p+=` ${xt}`,a.attr("class",p),a.attr("name",t.name);const g=lt();g.x=t.x,g.y=r,g.fill="#eaeaea",g.width=t.width,g.height=t.height,g.class="actor",a.append("line").attr("id","actor-man-torso"+N).attr("x1",t.x+t.width/2-h*2.5).attr("y1",r+10).attr("x2",t.x+t.width/2-15).attr("y2",r+10),a.append("line").attr("id","actor-man-arms"+N).attr("x1",t.x+t.width/2-h*2.5).attr("y1",r+0).attr("x2",t.x+t.width/2-h*2.5).attr("y2",r+20),a.append("circle").attr("cx",t.x+t.width/2).attr("cy",r+10).attr("r",h);const x=a.node().getBBox();return t.height=x.height+(n.sequence.labelBoxHeight??0),pt(n,H(t.description))(t.description,a,g.x,g.y+(s?h/2-4:h/2+3),g.width,g.height,{class:`actor ${gt}`},n),s?a.attr("transform",`translate(0,${h/2+7})`):a.attr("transform",`translate(0,${h/2+7})`),t.height},"drawActorTypeBoundary"),ts=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+80,h=e.append("g").lower();s||(N++,h.append("line").attr("id","actor"+N).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=N);const o=e.append("g");let a=gt;s?a+=` ${ft}`:a+=` ${xt}`,o.attr("class",a),o.attr("name",t.name);const p=lt();p.x=t.x,p.y=r,p.fill="#eaeaea",p.width=t.width,p.height=t.height,p.class="actor",p.rx=3,p.ry=3,o.append("line").attr("id","actor-man-torso"+N).attr("x1",i).attr("y1",r+25).attr("x2",i).attr("y2",r+45),o.append("line").attr("id","actor-man-arms"+N).attr("x1",i-Et/2).attr("y1",r+33).attr("x2",i+Et/2).attr("y2",r+33),o.append("line").attr("x1",i-Et/2).attr("y1",r+60).attr("x2",i).attr("y2",r+45),o.append("line").attr("x1",i).attr("y1",r+45).attr("x2",i+Et/2-2).attr("y2",r+60);const g=o.append("circle");g.attr("cx",t.x+t.width/2),g.attr("cy",r+10),g.attr("r",15),g.attr("width",t.width),g.attr("height",t.height);const x=o.node().getBBox();return t.height=x.height,pt(n,H(t.description))(t.description,o,p.x,p.y+35,p.width,p.height,{class:`actor ${gt}`},n),t.height},"drawActorTypeActor"),es=f(async function(e,t,n,s){switch(t.type){case"actor":return await ts(e,t,n,s);case"participant":return await Ke(e,t,n,s);case"boundary":return await je(e,t,n,s);case"control":return await Qe(e,t,n,s);case"entity":return await Ze(e,t,n,s);case"database":return await $e(e,t,n,s);case"collections":return await Xe(e,t,n,s);case"queue":return await Je(e,t,n,s)}},"drawActor"),ss=f(function(e,t,n){const r=e.append("g");le(r,t),t.name&&pt(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},n),r.lower()},"drawBox"),as=f(function(e){return e.append("g")},"anchorElement"),rs=f(function(e,t,n,s,r){const i=lt(),c=t.anchored;i.x=t.startx,i.y=t.starty,i.class="activation"+r%3,i.width=t.stopx-t.startx,i.height=n-t.starty,Lt(c,i)},"drawActivation"),is=f(async function(e,t,n,s){const{boxMargin:r,boxTextMargin:i,labelBoxHeight:c,labelBoxWidth:h,messageFontFamily:o,messageFontSize:a,messageFontWeight:p}=s,g=e.append("g"),x=f(function(w,k,S,M){return g.append("line").attr("x1",w).attr("y1",k).attr("x2",S).attr("y2",M).attr("class","loopLine")},"drawLoopLine");x(t.startx,t.starty,t.stopx,t.starty),x(t.stopx,t.starty,t.stopx,t.stopy),x(t.startx,t.stopy,t.stopx,t.stopy),x(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(w){x(t.startx,w.y,t.stopx,w.y).style("stroke-dasharray","3, 3")});let y=Xt();y.text=n,y.x=t.startx,y.y=t.starty,y.fontFamily=o,y.fontSize=a,y.fontWeight=p,y.anchor="middle",y.valign="middle",y.tspan=!1,y.width=h||50,y.height=c||20,y.textMargin=i,y.class="labelText",oe(g,y),y=he(),y.text=t.title,y.x=t.startx+h/2+(t.stopx-t.startx)/2,y.y=t.starty+r+i,y.anchor="middle",y.valign="middle",y.textMargin=i,y.class="loopText",y.fontFamily=o,y.fontSize=a,y.fontWeight=p,y.wrap=!0;let m=H(y.text)?await Dt(g,y,t):vt(g,y);if(t.sectionTitles!==void 0){for(const[w,k]of Object.entries(t.sectionTitles))if(k.message){y.text=k.message,y.x=t.startx+(t.stopx-t.startx)/2,y.y=t.sections[w].y+r+i,y.class="loopText",y.anchor="middle",y.valign="middle",y.tspan=!1,y.fontFamily=o,y.fontSize=a,y.fontWeight=p,y.wrap=t.wrap,H(y.text)?(t.starty=t.sections[w].y,await Dt(g,y,t)):vt(g,y);let S=Math.round(m.map(M=>(M._groups||M)[0][0].getBBox().height).reduce((M,B)=>M+B));t.sections[w].height+=S-(r+i)}}return t.height=Math.round(t.stopy-t.starty),g},"drawLoop"),le=f(function(e,t){ve(e,t)},"drawBackgroundRect"),ns=f(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),os=f(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),cs=f(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),ls=f(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),hs=f(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),ds=f(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),ps=f(function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),he=f(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"),us=f(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),pt=(function(){function e(i,c,h,o,a,p,g){const x=c.append("text").attr("x",h+a/2).attr("y",o+p/2+5).style("text-anchor","middle").text(i);r(x,g)}P(e,"byText"),f(e,"byText");function t(i,c,h,o,a,p,g,x){const{actorFontSize:y,actorFontFamily:m,actorFontWeight:w}=x,[k,S]=ie(y),M=i.split(I.lineBreakRegex);for(let B=0;B<M.length;B++){const V=B*k-k*(M.length-1)/2,z=c.append("text").attr("x",h+a/2).attr("y",o).style("text-anchor","middle").style("font-size",S).style("font-weight",w).style("font-family",m);z.append("tspan").attr("x",h+a/2).attr("dy",V).text(M[B]),z.attr("y",o+p/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(z,g)}}P(t,"byTspan"),f(t,"byTspan");function n(i,c,h,o,a,p,g,x){const y=c.append("switch"),w=y.append("foreignObject").attr("x",h).attr("y",o).attr("width",a).attr("height",p).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");w.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,y,h,o,a,p,g,x),r(w,g)}P(n,"byFo"),f(n,"byFo");async function s(i,c,h,o,a,p,g,x){const y=await _t(i,Ht()),m=c.append("switch"),k=m.append("foreignObject").attr("x",h+a/2-y.width/2).attr("y",o+p/2-y.height/2).attr("width",y.width).attr("height",y.height).append("xhtml:div").style("height","100%").style("width","100%");k.append("div").style("text-align","center").style("vertical-align","middle").html(await ne(i,Ht())),t(i,m,h,o,a,p,g,x),r(k,g)}P(s,"byKatex"),f(s,"byKatex");function r(i,c){for(const h in c)c.hasOwnProperty(h)&&i.attr(h,c[h])}return P(r,"_setTextAttrs"),f(r,"_setTextAttrs"),function(i,c=!1){return c?s:i.textPlacement==="fo"?n:i.textPlacement==="old"?e:t}})(),gs=(function(){function e(r,i,c,h,o,a,p){const g=i.append("text").attr("x",c).attr("y",h).style("text-anchor","start").text(r);s(g,p)}P(e,"byText"),f(e,"byText");function t(r,i,c,h,o,a,p,g){const{actorFontSize:x,actorFontFamily:y,actorFontWeight:m}=g,w=r.split(I.lineBreakRegex);for(let k=0;k<w.length;k++){const S=k*x-x*(w.length-1)/2,M=i.append("text").attr("x",c).attr("y",h).style("text-anchor","start").style("font-size",x).style("font-weight",m).style("font-family",y);M.append("tspan").attr("x",c).attr("dy",S).text(w[k]),M.attr("y",h+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(M,p)}}P(t,"byTspan"),f(t,"byTspan");function n(r,i,c,h,o,a,p,g){const x=i.append("switch"),m=x.append("foreignObject").attr("x",c).attr("y",h).attr("width",o).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(r),t(r,x,c,h,o,a,p,g),s(m,p)}P(n,"byFo"),f(n,"byFo");function s(r,i){for(const c in i)i.hasOwnProperty(c)&&r.attr(c,i[c])}return P(s,"_setTextAttrs"),f(s,"_setTextAttrs"),function(r){return r.textPlacement==="fo"?n:r.textPlacement==="old"?e:t}})(),Y={drawRect:Lt,drawText:vt,drawLabel:oe,drawActor:es,drawBox:ss,drawPopup:Ge,anchorElement:as,drawActivation:rs,drawLoop:is,drawBackgroundRect:le,insertArrowHead:ls,insertArrowFilledHead:hs,insertSequenceNumber:ds,insertArrowCrossHead:ps,insertDatabaseIcon:ns,insertComputerIcon:os,insertClockIcon:cs,getTextObj:he,getNoteRect:us,fixLifeLineHeights:ce,sanitizeUrl:re.sanitizeUrl},l={},T={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:f(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:f(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:f(function(e){this.boxes.push(e)},"addBox"),addActor:f(function(e){this.actors.push(e)},"addActor"),addLoop:f(function(e){this.loops.push(e)},"addLoop"),addMessage:f(function(e){this.messages.push(e)},"addMessage"),addNote:f(function(e){this.notes.push(e)},"addNote"),lastActor:f(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:f(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:f(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:f(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:f(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,ue(at())},"init"),updateVal:f(function(e,t,n,s){e[t]===void 0?e[t]=n:e[t]=s(n,e[t])},"updateVal"),updateBounds:f(function(e,t,n,s){const r=this;let i=0;function c(h){return f(P(function(a){i++;const p=r.sequenceItems.length-i+1;r.updateVal(a,"starty",t-p*l.boxMargin,Math.min),r.updateVal(a,"stopy",s+p*l.boxMargin,Math.max),r.updateVal(T.data,"startx",e-p*l.boxMargin,Math.min),r.updateVal(T.data,"stopx",n+p*l.boxMargin,Math.max),h!=="activation"&&(r.updateVal(a,"startx",e-p*l.boxMargin,Math.min),r.updateVal(a,"stopx",n+p*l.boxMargin,Math.max),r.updateVal(T.data,"starty",t-p*l.boxMargin,Math.min),r.updateVal(T.data,"stopy",s+p*l.boxMargin,Math.max))},"updateItemBounds"),"updateItemBounds")}P(c,"updateFn"),f(c,"updateFn"),this.sequenceItems.forEach(c()),this.activations.forEach(c("activation"))},"updateBounds"),insert:f(function(e,t,n,s){const r=I.getMin(e,n),i=I.getMax(e,n),c=I.getMin(t,s),h=I.getMax(t,s);this.updateVal(T.data,"startx",r,Math.min),this.updateVal(T.data,"starty",c,Math.min),this.updateVal(T.data,"stopx",i,Math.max),this.updateVal(T.data,"stopy",h,Math.max),this.updateBounds(r,c,i,h)},"insert"),newActivation:f(function(e,t,n){const s=n.get(e.from),r=Bt(e.from).length||0,i=s.x+s.width/2+(r-1)*l.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+l.activationWidth,stopy:void 0,actor:e.from,anchored:Y.anchorElement(t)})},"newActivation"),endActivation:f(function(e){const t=this.activations.map(function(n){return n.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:f(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:f(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:f(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:f(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:f(function(e){const t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:T.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:f(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:f(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:f(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=I.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:f(function(){return this.verticalPos},"getVerticalPos"),getBounds:f(function(){return{bounds:this.data,models:this.models}},"getBounds")},xs=f(async function(e,t){T.bumpVerticalPos(l.boxMargin),t.height=l.boxMargin,t.starty=T.getVerticalPos();const n=lt();n.x=t.startx,n.y=t.starty,n.width=t.width||l.width,n.class="note";const s=e.append("g"),r=Y.drawRect(s,n),i=Xt();i.x=t.startx,i.y=t.starty,i.width=n.width,i.dy="1em",i.text=t.message,i.class="noteText",i.fontFamily=l.noteFontFamily,i.fontSize=l.noteFontSize,i.fontWeight=l.noteFontWeight,i.anchor=l.noteAlign,i.textMargin=l.noteMargin,i.valign="center";const c=H(i.text)?await Dt(s,i):vt(s,i),h=Math.round(c.map(o=>(o._groups||o)[0][0].getBBox().height).reduce((o,a)=>o+a));r.attr("height",h+2*l.noteMargin),t.height+=h+2*l.noteMargin,T.bumpVerticalPos(h+2*l.noteMargin),t.stopy=t.starty+h+2*l.noteMargin,t.stopx=t.startx+n.width,T.insert(t.startx,t.starty,t.stopx,t.stopy),T.models.addNote(t)},"drawNote"),bt=f(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),wt=f(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),Gt=f(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function de(e,t){T.bumpVerticalPos(10);const{startx:n,stopx:s,message:r}=t,i=I.splitBreaks(r).length,c=H(r),h=c?await _t(r,at()):F.calculateTextDimensions(r,bt(l));if(!c){const g=h.height/i;t.height+=g,T.bumpVerticalPos(g)}let o,a=h.height-10;const p=h.width;if(n===s){o=T.getVerticalPos()+a,l.rightAngles||(a+=l.boxMargin,o=T.getVerticalPos()+a),a+=30;const g=I.getMax(p/2,l.width/2);T.insert(n-g,T.getVerticalPos()-10+a,s+g,T.getVerticalPos()+30+a)}else a+=l.boxMargin,o=T.getVerticalPos()+a,T.insert(n,o-10,s,o);return T.bumpVerticalPos(a),t.height+=a,t.stopy=t.starty+t.height,T.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),o}P(de,"boundMessage");f(de,"boundMessage");var fs=f(async function(e,t,n,s){const{startx:r,stopx:i,starty:c,message:h,type:o,sequenceIndex:a,sequenceVisible:p}=t,g=F.calculateTextDimensions(h,bt(l)),x=Xt();x.x=r,x.y=c+10,x.width=i-r,x.class="messageText",x.dy="1em",x.text=h,x.fontFamily=l.messageFontFamily,x.fontSize=l.messageFontSize,x.fontWeight=l.messageFontWeight,x.anchor=l.messageAlign,x.valign="center",x.textMargin=l.wrapPadding,x.tspan=!1,H(x.text)?await Dt(e,x,{startx:r,stopx:i,starty:n}):vt(e,x);const y=g.width;let m;r===i?l.rightAngles?m=e.append("path").attr("d",`M ${r},${n} H ${r+I.getMax(l.width/2,y/2)} V ${n+25} H ${r}`):m=e.append("path").attr("d","M "+r+","+n+" C "+(r+60)+","+(n-10)+" "+(r+60)+","+(n+30)+" "+r+","+(n+20)):(m=e.append("line"),m.attr("x1",r),m.attr("y1",n),m.attr("x2",i),m.attr("y2",n)),o===s.db.LINETYPE.DOTTED||o===s.db.LINETYPE.DOTTED_CROSS||o===s.db.LINETYPE.DOTTED_POINT||o===s.db.LINETYPE.DOTTED_OPEN||o===s.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let w="";l.arrowMarkerAbsolute&&(w=Be(!0)),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),(o===s.db.LINETYPE.SOLID||o===s.db.LINETYPE.DOTTED)&&m.attr("marker-end","url("+w+"#arrowhead)"),(o===s.db.LINETYPE.BIDIRECTIONAL_SOLID||o===s.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(m.attr("marker-start","url("+w+"#arrowhead)"),m.attr("marker-end","url("+w+"#arrowhead)")),(o===s.db.LINETYPE.SOLID_POINT||o===s.db.LINETYPE.DOTTED_POINT)&&m.attr("marker-end","url("+w+"#filled-head)"),(o===s.db.LINETYPE.SOLID_CROSS||o===s.db.LINETYPE.DOTTED_CROSS)&&m.attr("marker-end","url("+w+"#crosshead)"),(p||l.showSequenceNumbers)&&((o===s.db.LINETYPE.BIDIRECTIONAL_SOLID||o===s.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(r<i?m.attr("x1",r+12):m.attr("x1",r+6)),e.append("line").attr("x1",r).attr("y1",n).attr("x2",r).attr("y2",n).attr("stroke-width",0).attr("marker-start","url("+w+"#sequencenumber)"),e.append("text").attr("x",r).attr("y",n+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(a))},"drawMessage"),ys=f(function(e,t,n,s,r,i,c){let h=0,o=0,a,p=0;for(const g of s){const x=t.get(g),y=x.box;a&&a!=y&&(c||T.models.addBox(a),o+=l.boxMargin+a.margin),y&&y!=a&&(c||(y.x=h+o,y.y=r),o+=y.margin),x.width=x.width||l.width,x.height=I.getMax(x.height||l.height,l.height),x.margin=x.margin||l.actorMargin,p=I.getMax(p,x.height),n.get(x.name)&&(o+=x.width/2),x.x=h+o,x.starty=T.getVerticalPos(),T.insert(x.x,r,x.x+x.width,x.height),h+=x.width+o,x.box&&(x.box.width=h+y.margin-x.box.x),o=x.margin,a=x.box,T.models.addActor(x)}a&&!c&&T.models.addBox(a),T.bumpVerticalPos(p)},"addActorRenderingData"),Kt=f(async function(e,t,n,s){if(s){let r=0;T.bumpVerticalPos(l.boxMargin*2);for(const i of n){const c=t.get(i);c.stopy||(c.stopy=T.getVerticalPos());const h=await Y.drawActor(e,c,l,!0);r=I.getMax(r,h)}T.bumpVerticalPos(r+l.boxMargin)}else for(const r of n){const i=t.get(r);await Y.drawActor(e,i,l,!1)}},"drawActors"),pe=f(function(e,t,n,s){let r=0,i=0;for(const c of n){const h=t.get(c),o=Es(h),a=Y.drawPopup(e,h,o,l,l.forceMenus,s);a.height>r&&(r=a.height),a.width+h.x>i&&(i=a.width+h.x)}return{maxHeight:r,maxWidth:i}},"drawActorsPopup"),ue=f(function(e){Ae(l,e),e.fontFamily&&(l.actorFontFamily=l.noteFontFamily=l.messageFontFamily=e.fontFamily),e.fontSize&&(l.actorFontSize=l.noteFontSize=l.messageFontSize=e.fontSize),e.fontWeight&&(l.actorFontWeight=l.noteFontWeight=l.messageFontWeight=e.fontWeight)},"setConf"),Bt=f(function(e){return T.activations.filter(function(t){return t.actor===e})},"actorActivations"),ae=f(function(e,t){const n=t.get(e),s=Bt(e),r=s.reduce(function(c,h){return I.getMin(c,h.startx)},n.x+n.width/2-1),i=s.reduce(function(c,h){return I.getMax(c,h.stopx)},n.x+n.width/2+1);return[r,i]},"activationBounds");function ot(e,t,n,s,r){T.bumpVerticalPos(n);let i=s;if(t.id&&t.message&&e[t.id]){const c=e[t.id].width,h=bt(l);t.message=F.wrapLabel(`[${t.message}]`,c-2*l.wrapPadding,h),t.width=c,t.wrap=!0;const o=F.calculateTextDimensions(t.message,h),a=I.getMax(o.height,l.labelBoxHeight);i=s+a,Z.debug(`${a} - ${t.message}`)}r(t),T.bumpVerticalPos(i)}P(ot,"adjustLoopHeightForWrap");f(ot,"adjustLoopHeightForWrap");function ge(e,t,n,s,r,i,c){function h(p,g){p.x<r.get(e.from).x?(T.insert(t.stopx-g,t.starty,t.startx,t.stopy+p.height/2+l.noteMargin),t.stopx=t.stopx+g):(T.insert(t.startx,t.starty,t.stopx+g,t.stopy+p.height/2+l.noteMargin),t.stopx=t.stopx-g)}P(h,"receiverAdjustment"),f(h,"receiverAdjustment");function o(p,g){p.x<r.get(e.to).x?(T.insert(t.startx-g,t.starty,t.stopx,t.stopy+p.height/2+l.noteMargin),t.startx=t.startx+g):(T.insert(t.stopx,t.starty,t.startx+g,t.stopy+p.height/2+l.noteMargin),t.startx=t.startx-g)}P(o,"senderAdjustment"),f(o,"senderAdjustment");const a=[Rt.ACTOR,Rt.CONTROL,Rt.ENTITY,Rt.DATABASE];if(i.get(e.to)==s){const p=r.get(e.to),g=a.includes(p.type)?Et/2+3:p.width/2+3;h(p,g),p.starty=n-p.height/2,T.bumpVerticalPos(p.height/2)}else if(c.get(e.from)==s){const p=r.get(e.from);if(l.mirrorActors){const g=a.includes(p.type)?Et/2:p.width/2;o(p,g)}p.stopy=n-p.height/2,T.bumpVerticalPos(p.height/2)}else if(c.get(e.to)==s){const p=r.get(e.to);if(l.mirrorActors){const g=a.includes(p.type)?Et/2+3:p.width/2+3;h(p,g)}p.stopy=n-p.height/2,T.bumpVerticalPos(p.height/2)}}P(ge,"adjustCreatedDestroyedData");f(ge,"adjustCreatedDestroyedData");var Ts=f(async function(e,t,n,s){const{securityLevel:r,sequence:i}=at();l=i;let c;r==="sandbox"&&(c=St("#i"+t));const h=r==="sandbox"?St(c.nodes()[0].contentDocument.body):St("body"),o=r==="sandbox"?c.nodes()[0].contentDocument:document;T.init(),Z.debug(s.db);const a=r==="sandbox"?h.select(`[id="${t}"]`):St(`[id="${t}"]`),p=s.db.getActors(),g=s.db.getCreatedActors(),x=s.db.getDestroyedActors(),y=s.db.getBoxes();let m=s.db.getActorKeys();const w=s.db.getMessages(),k=s.db.getDiagramTitle(),S=s.db.hasAtLeastOneBox(),M=s.db.hasAtLeastOneBoxWithTitle(),B=await xe(p,w,s);if(l.height=await fe(p,B,y),Y.insertComputerIcon(a),Y.insertDatabaseIcon(a),Y.insertClockIcon(a),S&&(T.bumpVerticalPos(l.boxMargin),M&&T.bumpVerticalPos(y[0].textMaxHeight)),l.hideUnusedParticipants===!0){const E=new Set;w.forEach(_=>{E.add(_.from),E.add(_.to)}),m=m.filter(_=>E.has(_))}ys(a,p,g,m,0,w,!1);const V=await ws(w,p,B,s);Y.insertArrowHead(a),Y.insertArrowCrossHead(a),Y.insertArrowFilledHead(a),Y.insertSequenceNumber(a);function z(E,_){const J=T.endActivation(E);J.starty+18>_&&(J.starty=_-6,_+=12),Y.drawActivation(a,J,_,l,Bt(E.from).length),T.insert(J.startx,_-10,J.stopx,_)}P(z,"activeEnd"),f(z,"activeEnd");let U=1,$=1;const rt=[],G=[];let K=0;for(const E of w){let _,J,et;switch(E.type){case s.db.LINETYPE.NOTE:T.resetVerticalPos(),J=E.noteModel,await xs(a,J);break;case s.db.LINETYPE.ACTIVE_START:T.newActivation(E,a,p);break;case s.db.LINETYPE.ACTIVE_END:z(E,T.getVerticalPos());break;case s.db.LINETYPE.LOOP_START:ot(V,E,l.boxMargin,l.boxMargin+l.boxTextMargin,R=>T.newLoop(R));break;case s.db.LINETYPE.LOOP_END:_=T.endLoop(),await Y.drawLoop(a,_,"loop",l),T.bumpVerticalPos(_.stopy-T.getVerticalPos()),T.models.addLoop(_);break;case s.db.LINETYPE.RECT_START:ot(V,E,l.boxMargin,l.boxMargin,R=>T.newLoop(void 0,R.message));break;case s.db.LINETYPE.RECT_END:_=T.endLoop(),G.push(_),T.models.addLoop(_),T.bumpVerticalPos(_.stopy-T.getVerticalPos());break;case s.db.LINETYPE.OPT_START:ot(V,E,l.boxMargin,l.boxMargin+l.boxTextMargin,R=>T.newLoop(R));break;case s.db.LINETYPE.OPT_END:_=T.endLoop(),await Y.drawLoop(a,_,"opt",l),T.bumpVerticalPos(_.stopy-T.getVerticalPos()),T.models.addLoop(_);break;case s.db.LINETYPE.ALT_START:ot(V,E,l.boxMargin,l.boxMargin+l.boxTextMargin,R=>T.newLoop(R));break;case s.db.LINETYPE.ALT_ELSE:ot(V,E,l.boxMargin+l.boxTextMargin,l.boxMargin,R=>T.addSectionToLoop(R));break;case s.db.LINETYPE.ALT_END:_=T.endLoop(),await Y.drawLoop(a,_,"alt",l),T.bumpVerticalPos(_.stopy-T.getVerticalPos()),T.models.addLoop(_);break;case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:ot(V,E,l.boxMargin,l.boxMargin+l.boxTextMargin,R=>T.newLoop(R)),T.saveVerticalPos();break;case s.db.LINETYPE.PAR_AND:ot(V,E,l.boxMargin+l.boxTextMargin,l.boxMargin,R=>T.addSectionToLoop(R));break;case s.db.LINETYPE.PAR_END:_=T.endLoop(),await Y.drawLoop(a,_,"par",l),T.bumpVerticalPos(_.stopy-T.getVerticalPos()),T.models.addLoop(_);break;case s.db.LINETYPE.AUTONUMBER:U=E.message.start||U,$=E.message.step||$,E.message.visible?s.db.enableSequenceNumbers():s.db.disableSequenceNumbers();break;case s.db.LINETYPE.CRITICAL_START:ot(V,E,l.boxMargin,l.boxMargin+l.boxTextMargin,R=>T.newLoop(R));break;case s.db.LINETYPE.CRITICAL_OPTION:ot(V,E,l.boxMargin+l.boxTextMargin,l.boxMargin,R=>T.addSectionToLoop(R));break;case s.db.LINETYPE.CRITICAL_END:_=T.endLoop(),await Y.drawLoop(a,_,"critical",l),T.bumpVerticalPos(_.stopy-T.getVerticalPos()),T.models.addLoop(_);break;case s.db.LINETYPE.BREAK_START:ot(V,E,l.boxMargin,l.boxMargin+l.boxTextMargin,R=>T.newLoop(R));break;case s.db.LINETYPE.BREAK_END:_=T.endLoop(),await Y.drawLoop(a,_,"break",l),T.bumpVerticalPos(_.stopy-T.getVerticalPos()),T.models.addLoop(_);break;default:try{et=E.msgModel,et.starty=T.getVerticalPos(),et.sequenceIndex=U,et.sequenceVisible=s.db.showSequenceNumbers();const R=await de(a,et);ge(E,et,R,K,p,g,x),rt.push({messageModel:et,lineStartY:R}),T.models.addMessage(et)}catch(R){Z.error("error while drawing message",R)}}[s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,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(E.type)&&(U=U+$),K++}Z.debug("createdActors",g),Z.debug("destroyedActors",x),await Kt(a,p,m,!1);for(const E of rt)await fs(a,E.messageModel,E.lineStartY,s);l.mirrorActors&&await Kt(a,p,m,!0),G.forEach(E=>Y.drawBackgroundRect(a,E)),ce(a,p,m,l);for(const E of T.models.boxes){E.height=T.getVerticalPos()-E.y,T.insert(E.x,E.y,E.x+E.width,E.height);const _=l.boxMargin*2;E.startx=E.x-_,E.starty=E.y-_*.25,E.stopx=E.startx+E.width+2*_,E.stopy=E.starty+E.height+_*.75,E.stroke="rgb(0,0,0, 0.5)",Y.drawBox(a,E,l)}S&&T.bumpVerticalPos(l.boxMargin);const q=pe(a,p,m,o),{bounds:C}=T.getBounds();C.startx===void 0&&(C.startx=0),C.starty===void 0&&(C.starty=0),C.stopx===void 0&&(C.stopx=0),C.stopy===void 0&&(C.stopy=0);let j=C.stopy-C.starty;j<q.maxHeight&&(j=q.maxHeight);let X=j+2*l.diagramMarginY;l.mirrorActors&&(X=X-l.boxMargin+l.bottomMarginAdj);let tt=C.stopx-C.startx;tt<q.maxWidth&&(tt=q.maxWidth);const it=tt+2*l.diagramMarginX;k&&a.append("text").text(k).attr("x",(C.stopx-C.startx)/2-2*l.diagramMarginX).attr("y",-25),_e(a,X,it,l.useMaxWidth);const D=k?40:0;a.attr("viewBox",C.startx-l.diagramMarginX+" -"+(l.diagramMarginY+D)+" "+it+" "+(X+D)),Z.debug("models:",T.models)},"draw");async function xe(e,t,n){const s={};for(const r of t)if(e.get(r.to)&&e.get(r.from)){const i=e.get(r.to);if(r.placement===n.db.PLACEMENT.LEFTOF&&!i.prevActor||r.placement===n.db.PLACEMENT.RIGHTOF&&!i.nextActor)continue;const c=r.placement!==void 0,h=!c,o=c?wt(l):bt(l),a=r.wrap?F.wrapLabel(r.message,l.width-2*l.wrapPadding,o):r.message,g=(H(a)?await _t(r.message,at()):F.calculateTextDimensions(a,o)).width+2*l.wrapPadding;h&&r.from===i.nextActor?s[r.to]=I.getMax(s[r.to]||0,g):h&&r.from===i.prevActor?s[r.from]=I.getMax(s[r.from]||0,g):h&&r.from===r.to?(s[r.from]=I.getMax(s[r.from]||0,g/2),s[r.to]=I.getMax(s[r.to]||0,g/2)):r.placement===n.db.PLACEMENT.RIGHTOF?s[r.from]=I.getMax(s[r.from]||0,g):r.placement===n.db.PLACEMENT.LEFTOF?s[i.prevActor]=I.getMax(s[i.prevActor]||0,g):r.placement===n.db.PLACEMENT.OVER&&(i.prevActor&&(s[i.prevActor]=I.getMax(s[i.prevActor]||0,g/2)),i.nextActor&&(s[r.from]=I.getMax(s[r.from]||0,g/2)))}return Z.debug("maxMessageWidthPerActor:",s),s}P(xe,"getMaxMessageWidthPerActor");f(xe,"getMaxMessageWidthPerActor");var Es=f(function(e){let t=0;const n=Gt(l);for(const s in e.links){const i=F.calculateTextDimensions(s,n).width+2*l.wrapPadding+2*l.boxMargin;t<i&&(t=i)}return t},"getRequiredPopupWidth");async function fe(e,t,n){let s=0;for(const i of e.keys()){const c=e.get(i);c.wrap&&(c.description=F.wrapLabel(c.description,l.width-2*l.wrapPadding,Gt(l)));const h=H(c.description)?await _t(c.description,at()):F.calculateTextDimensions(c.description,Gt(l));c.width=c.wrap?l.width:I.getMax(l.width,h.width+2*l.wrapPadding),c.height=c.wrap?I.getMax(h.height,l.height):l.height,s=I.getMax(s,c.height)}for(const i in t){const c=e.get(i);if(!c)continue;const h=e.get(c.nextActor);if(!h){const g=t[i]+l.actorMargin-c.width/2;c.margin=I.getMax(g,l.actorMargin);continue}const a=t[i]+l.actorMargin-c.width/2-h.width/2;c.margin=I.getMax(a,l.actorMargin)}let r=0;return n.forEach(i=>{const c=bt(l);let h=i.actorKeys.reduce((g,x)=>g+=e.get(x).width+(e.get(x).margin||0),0);const o=l.boxMargin*8;h+=o,h-=2*l.boxTextMargin,i.wrap&&(i.name=F.wrapLabel(i.name,h-2*l.wrapPadding,c));const a=F.calculateTextDimensions(i.name,c);r=I.getMax(a.height,r);const p=I.getMax(h,a.width+2*l.wrapPadding);if(i.margin=l.boxTextMargin,h<p){const g=(p-h)/2;i.margin+=g}}),n.forEach(i=>i.textMaxHeight=r),I.getMax(s,l.height)}P(fe,"calculateActorMargins");f(fe,"calculateActorMargins");var bs=f(async function(e,t,n){const s=t.get(e.from),r=t.get(e.to),i=s.x,c=r.x,h=e.wrap&&e.message;let o=H(e.message)?await _t(e.message,at()):F.calculateTextDimensions(h?F.wrapLabel(e.message,l.width,wt(l)):e.message,wt(l));const a={width:h?l.width:I.getMax(l.width,o.width+2*l.noteMargin),height:0,startx:s.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===n.db.PLACEMENT.RIGHTOF?(a.width=h?I.getMax(l.width,o.width):I.getMax(s.width/2+r.width/2,o.width+2*l.noteMargin),a.startx=i+(s.width+l.actorMargin)/2):e.placement===n.db.PLACEMENT.LEFTOF?(a.width=h?I.getMax(l.width,o.width+2*l.noteMargin):I.getMax(s.width/2+r.width/2,o.width+2*l.noteMargin),a.startx=i-a.width+(s.width-l.actorMargin)/2):e.to===e.from?(o=F.calculateTextDimensions(h?F.wrapLabel(e.message,I.getMax(l.width,s.width),wt(l)):e.message,wt(l)),a.width=h?I.getMax(l.width,s.width):I.getMax(s.width,l.width,o.width+2*l.noteMargin),a.startx=i+(s.width-a.width)/2):(a.width=Math.abs(i+s.width/2-(c+r.width/2))+l.actorMargin,a.startx=i<c?i+s.width/2-l.actorMargin/2:c+r.width/2-l.actorMargin/2),h&&(a.message=F.wrapLabel(e.message,a.width-2*l.wrapPadding,wt(l))),Z.debug(`NM:[${a.startx},${a.stopx},${a.starty},${a.stopy}:${a.width},${a.height}=${e.message}]`),a},"buildNoteModel"),ms=f(function(e,t,n){if(![n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};const[s,r]=ae(e.from,t),[i,c]=ae(e.to,t),h=s<=i;let o=h?r:s,a=h?i:c;const p=Math.abs(i-c)>2,g=f(w=>h?-w:w,"adjustValue");e.from===e.to?a=o:(e.activate&&!p&&(a+=g(l.activationWidth/2-1)),[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN].includes(e.type)||(a+=g(3)),[n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(o-=g(3)));const x=[s,r,i,c],y=Math.abs(o-a);e.wrap&&e.message&&(e.message=F.wrapLabel(e.message,I.getMax(y+2*l.wrapPadding,l.width),bt(l)));const m=F.calculateTextDimensions(e.message,bt(l));return{width:I.getMax(e.wrap?0:m.width+2*l.wrapPadding,y+2*l.wrapPadding,l.width),height:0,startx:o,stopx:a,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,x),toBounds:Math.max.apply(null,x)}},"buildMessageModel"),ws=f(async function(e,t,n,s){const r={},i=[];let c,h,o;for(const a of e){switch(a.type){case s.db.LINETYPE.LOOP_START:case s.db.LINETYPE.ALT_START:case s.db.LINETYPE.OPT_START:case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:case s.db.LINETYPE.CRITICAL_START:case s.db.LINETYPE.BREAK_START:i.push({id:a.id,msg:a.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case s.db.LINETYPE.ALT_ELSE:case s.db.LINETYPE.PAR_AND:case s.db.LINETYPE.CRITICAL_OPTION:a.message&&(c=i.pop(),r[c.id]=c,r[a.id]=c,i.push(c));break;case s.db.LINETYPE.LOOP_END:case s.db.LINETYPE.ALT_END:case s.db.LINETYPE.OPT_END:case s.db.LINETYPE.PAR_END:case s.db.LINETYPE.CRITICAL_END:case s.db.LINETYPE.BREAK_END:c=i.pop(),r[c.id]=c;break;case s.db.LINETYPE.ACTIVE_START:{const g=t.get(a.from?a.from:a.to.actor),x=Bt(a.from?a.from:a.to.actor).length,y=g.x+g.width/2+(x-1)*l.activationWidth/2,m={startx:y,stopx:y+l.activationWidth,actor:a.from,enabled:!0};T.activations.push(m)}break;case s.db.LINETYPE.ACTIVE_END:{const g=T.activations.map(x=>x.actor).lastIndexOf(a.from);T.activations.splice(g,1).splice(0,1)}break}a.placement!==void 0?(h=await bs(a,t,s),a.noteModel=h,i.forEach(g=>{c=g,c.from=I.getMin(c.from,h.startx),c.to=I.getMax(c.to,h.startx+h.width),c.width=I.getMax(c.width,Math.abs(c.from-c.to))-l.labelBoxWidth})):(o=ms(a,t,s),a.msgModel=o,o.startx&&o.stopx&&i.length>0&&i.forEach(g=>{if(c=g,o.startx===o.stopx){const x=t.get(a.from),y=t.get(a.to);c.from=I.getMin(x.x-o.width/2,x.x-x.width/2,c.from),c.to=I.getMax(y.x+o.width/2,y.x+x.width/2,c.to),c.width=I.getMax(c.width,Math.abs(c.to-c.from))-l.labelBoxWidth}else c.from=I.getMin(o.startx,c.from),c.to=I.getMax(o.stopx,c.to),c.width=I.getMax(c.width,o.width)-l.labelBoxWidth}))}return T.activations=[],Z.debug("Loop type widths:",r),r},"calculateLoopBounds"),vs={bounds:T,drawActors:Kt,drawActorsPopup:pe,setConf:ue,draw:Ts},Ms={parser:Ye,get db(){return new ze},renderer:vs,styles:Ue,init:f(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Le({sequence:{wrap:e.wrap}}))},"init")};export{Ms as diagram};
146
- //# sourceMappingURL=sequenceDiagram-WL72ISMW-C9_twmEc.js.map
146
+ //# sourceMappingURL=sequenceDiagram-WL72ISMW-TGqxh1eL.js.map