@agent-workshop/adoc-webapp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +5 -0
- package/THIRD_PARTY_NOTICES.md +49 -0
- package/dist/assets/app.css +406 -0
- package/dist/assets/app.js +201 -0
- package/dist/assets/chunks/abnfDiagram-YUKMZFIV-UTBMKFXS.js +1 -0
- package/dist/assets/chunks/architecture-WOLXFQ4H-S6WNHT5H.js +1 -0
- package/dist/assets/chunks/architectureDiagram-47P4ROYG-SQCOEPXG.js +36 -0
- package/dist/assets/chunks/blockDiagram-E7TT5TSB-F5DSMBHI.js +140 -0
- package/dist/assets/chunks/c4Diagram-CRA5TL53-G4W35RYC.js +38 -0
- package/dist/assets/chunks/chunk-2TCGAX73.js +1 -0
- package/dist/assets/chunks/chunk-35SWHG2Z.js +1 -0
- package/dist/assets/chunks/chunk-4UKVVSLZ.js +2 -0
- package/dist/assets/chunks/chunk-56PLA4MI.js +1 -0
- package/dist/assets/chunks/chunk-6QSLXF4I.js +1 -0
- package/dist/assets/chunks/chunk-7DQROAU7.js +1 -0
- package/dist/assets/chunks/chunk-7FXP6RHI.js +1 -0
- package/dist/assets/chunks/chunk-7ITQOSYJ.js +15 -0
- package/dist/assets/chunks/chunk-7W3KTJUJ.js +1 -0
- package/dist/assets/chunks/chunk-ABLFMIK7.js +1 -0
- package/dist/assets/chunks/chunk-AVITUR4K.js +1 -0
- package/dist/assets/chunks/chunk-AVJJGJEF.js +1 -0
- package/dist/assets/chunks/chunk-BYKZQKZN.js +1 -0
- package/dist/assets/chunks/chunk-CBAFHIQV.js +213 -0
- package/dist/assets/chunks/chunk-CMFTFM5L.js +1 -0
- package/dist/assets/chunks/chunk-E2AIA637.js +14 -0
- package/dist/assets/chunks/chunk-ENUKY65A.js +72 -0
- package/dist/assets/chunks/chunk-EPS7YYLR.js +2 -0
- package/dist/assets/chunks/chunk-FDHLSHAZ.js +1 -0
- package/dist/assets/chunks/chunk-GBOXGTKU.js +1 -0
- package/dist/assets/chunks/chunk-GDF64WIG.js +1 -0
- package/dist/assets/chunks/chunk-GTJDAHEV.js +2 -0
- package/dist/assets/chunks/chunk-H57PPMTP.js +1 -0
- package/dist/assets/chunks/chunk-HHYS5L3R.js +1 -0
- package/dist/assets/chunks/chunk-INV6BDXO.js +2 -0
- package/dist/assets/chunks/chunk-IR3NHMOO.js +1 -0
- package/dist/assets/chunks/chunk-KLF2A562.js +1 -0
- package/dist/assets/chunks/chunk-LZTAJOGZ.js +1 -0
- package/dist/assets/chunks/chunk-M3XBBO6R.js +135 -0
- package/dist/assets/chunks/chunk-NBZPV65B.js +62 -0
- package/dist/assets/chunks/chunk-NCTJNXDF.js +1 -0
- package/dist/assets/chunks/chunk-O4U2B2FP.js +339 -0
- package/dist/assets/chunks/chunk-OB665XPY.js +1 -0
- package/dist/assets/chunks/chunk-OFD4YTIR.js +10 -0
- package/dist/assets/chunks/chunk-PHKIAKHS.js +1 -0
- package/dist/assets/chunks/chunk-R4OZRASH.js +32 -0
- package/dist/assets/chunks/chunk-UAGOPMXU.js +1 -0
- package/dist/assets/chunks/chunk-UAQETDSH.js +3 -0
- package/dist/assets/chunks/chunk-UORYZEAD.js +1 -0
- package/dist/assets/chunks/chunk-W4ELJFHG.js +1 -0
- package/dist/assets/chunks/chunk-WBPRABWA.js +136 -0
- package/dist/assets/chunks/chunk-XISCFCXG.js +88 -0
- package/dist/assets/chunks/chunk-XLJVPE6C.js +1 -0
- package/dist/assets/chunks/chunk-XQHNSJKC.js +1 -0
- package/dist/assets/chunks/chunk-XYDA52BE.js +1 -0
- package/dist/assets/chunks/chunk-YAHQK6MQ.js +1 -0
- package/dist/assets/chunks/chunk-ZGUCZDEK.js +1 -0
- package/dist/assets/chunks/chunk-ZRBDUQXP.js +1 -0
- package/dist/assets/chunks/classDiagram-v2-K4WV4PDN-EMBTPOHC.js +217 -0
- package/dist/assets/chunks/cose-bilkent-JH36ORCC-CNYFETCT.js +1 -0
- package/dist/assets/chunks/cynefin-EF2NZ3EQ-2AP5N5QY.js +1 -0
- package/dist/assets/chunks/cynefinDiagram-3GCD6N5R-WVTLESK3.js +62 -0
- package/dist/assets/chunks/dagre-W4DXFKR2-FPRZGQVB.js +4 -0
- package/dist/assets/chunks/diagram-2UJZ2QOL-VPSSQLZN.js +200 -0
- package/dist/assets/chunks/diagram-OVF4WLC6-PZ2RN37Y.js +24 -0
- package/dist/assets/chunks/diagram-PFPMY2P6-5GPN6RRZ.js +30 -0
- package/dist/assets/chunks/diagram-UMYRVEAY-OHFOPEFR.js +24 -0
- package/dist/assets/chunks/diagram-YEKJPTXX-PFA7KRZC.js +41 -0
- package/dist/assets/chunks/diagram-ZIFT7M5P-XOPZR7XN.js +3 -0
- package/dist/assets/chunks/ebnfDiagram-VR2GEFS7-MAGCN3HN.js +1 -0
- package/dist/assets/chunks/elk-IJKZMXRS-FZ2NQWIX.js +27 -0
- package/dist/assets/chunks/erDiagram-O2IAPWRE-746JHX2P.js +99 -0
- package/dist/assets/chunks/eventmodeling-K75KTNOO-FKRVI4N2.js +1 -0
- package/dist/assets/chunks/flowDiagram-OXPTDLAJ-XYHRK7XD.js +1 -0
- package/dist/assets/chunks/ganttDiagram-R7TSEDQI-DN5XENJA.js +292 -0
- package/dist/assets/chunks/gitGraph-VSP46ZUC-YT36MSRW.js +1 -0
- package/dist/assets/chunks/gitGraphDiagram-XJZIOB7I-NXP267LJ.js +106 -0
- package/dist/assets/chunks/info-OHQRW6UA-BRTC44VB.js +1 -0
- package/dist/assets/chunks/infoDiagram-5W2HQ5XZ-RT6YEU7N.js +2 -0
- package/dist/assets/chunks/ishikawaDiagram-K3B6WC7H-EJP5H2KV.js +70 -0
- package/dist/assets/chunks/journeyDiagram-COXZFDF6-M6MBFVND.js +139 -0
- package/dist/assets/chunks/kanban-definition-P3RFRI5V-WBYRNWVT.js +89 -0
- package/dist/assets/chunks/katex-42FXWECD.js +257 -0
- package/dist/assets/chunks/mermaid.core-SMXJOLYJ.js +18 -0
- package/dist/assets/chunks/mindmap-definition-LZFPQGKD-KVJVOCR5.js +96 -0
- package/dist/assets/chunks/packet-JDAUHWVQ-SGFXPYMB.js +1 -0
- package/dist/assets/chunks/pegDiagram-BGZESJAR-ECEGDREM.js +1 -0
- package/dist/assets/chunks/pie-XZMESJXO-LSQBPXPC.js +1 -0
- package/dist/assets/chunks/pieDiagram-CAPJLFHJ-D75MPXOK.js +39 -0
- package/dist/assets/chunks/quadrantDiagram-GDMTTRAM-HMUXMSEH.js +7 -0
- package/dist/assets/chunks/radar-ABXABTNO-TPYHBLNO.js +1 -0
- package/dist/assets/chunks/railroad-I3PHUGI6-WWIXL3LY.js +1 -0
- package/dist/assets/chunks/railroad-abnf-LNEFI6M7-DHJUY4R6.js +1 -0
- package/dist/assets/chunks/railroad-ebnf-DWYD2UWJ-4OJ4ECXX.js +1 -0
- package/dist/assets/chunks/railroad-peg-JR7BVNR7-VUOBDVLQ.js +1 -0
- package/dist/assets/chunks/railroadDiagram-SM67HX2B-Z757I54E.js +1 -0
- package/dist/assets/chunks/requirementDiagram-X7JNWC4A-7BW46JLY.js +84 -0
- package/dist/assets/chunks/sankeyDiagram-UM26HJRW-273BIID3.js +40 -0
- package/dist/assets/chunks/sequenceDiagram-ZO4K6R2Y-KG23HXTI.js +169 -0
- package/dist/assets/chunks/sizeCapture-INFHLROL-5N3POCQZ.js +1 -0
- package/dist/assets/chunks/stateDiagram-v2-TBUQTH76-AIML3PSW.js +291 -0
- package/dist/assets/chunks/swimlanes-N4OXWK64-TBFQZWAR.js +1 -0
- package/dist/assets/chunks/swimlanesDiagram-K3J5GTZL-TREAP6RB.js +8 -0
- package/dist/assets/chunks/timeline-definition-YOQAKGHF-QHTD5EBR.js +120 -0
- package/dist/assets/chunks/treeView-D4JQ5SDB-JJEYBPMW.js +1 -0
- package/dist/assets/chunks/treemap-SAJKECNS-I3YRCM2B.js +1 -0
- package/dist/assets/chunks/usecaseDiagram-VIAY4XPW-GNNFV4RS.js +370 -0
- package/dist/assets/chunks/vennDiagram-BLWOH2XV-YE23JXYX.js +34 -0
- package/dist/assets/chunks/wardley-7MLQ67FV-AKOGXXNF.js +1 -0
- package/dist/assets/chunks/wardleyDiagram-YMQ3BMBF-D7XYLZCZ.js +78 -0
- package/dist/assets/chunks/xychartDiagram-TAQBALBS-AT4Y7JWY.js +7 -0
- package/dist/assets/fonts/D2Coding-Bold.woff2 +0 -0
- package/dist/assets/fonts/D2Coding-OFL.txt +97 -0
- package/dist/assets/fonts/D2Coding.woff2 +0 -0
- package/dist/assets/fonts/Pretendard-LICENSE.txt +94 -0
- package/dist/assets/fonts/PretendardVariable.woff2 +0 -0
- package/dist/assets/fonts/SymbolsNerdFont-LICENSE.txt +21 -0
- package/dist/assets/fonts/SymbolsNerdFontMono.woff2 +0 -0
- package/dist/assets/xterm.css +285 -0
- package/dist/index.html +14 -0
- package/dist/licenses/@braintree__sanitize-url@7.1.2/LICENSE +21 -0
- package/dist/licenses/@chevrotain__cst-dts-gen@13.2.0/LICENSE.txt +202 -0
- package/dist/licenses/@chevrotain__gast@13.2.0/LICENSE.txt +202 -0
- package/dist/licenses/@chevrotain__regexp-to-ast@13.2.0/LICENSE.txt +202 -0
- package/dist/licenses/@chevrotain__utils@13.2.0/LICENSE.txt +202 -0
- package/dist/licenses/@iconify__utils@3.1.7/license.txt +21 -0
- package/dist/licenses/@mermaid-js__parser@2.0.1/LICENSE +21 -0
- package/dist/licenses/@remix-run__route-pattern@0.22.1/LICENSE +21 -0
- package/dist/licenses/@upsetjs__venn.js@2.0.0/LICENSE +22 -0
- package/dist/licenses/@xterm__addon-fit@0.11.0/LICENSE +19 -0
- package/dist/licenses/@xterm__xterm@6.0.0/LICENSE +21 -0
- package/dist/licenses/chevrotain@13.2.0/LICENSE.txt +202 -0
- package/dist/licenses/cookie-es@3.1.1/LICENSE +28 -0
- package/dist/licenses/cose-base@1.0.3/LICENSE +21 -0
- package/dist/licenses/cose-base@2.2.0/LICENSE +21 -0
- package/dist/licenses/cytoscape-cose-bilkent@4.1.0/LICENSE +21 -0
- package/dist/licenses/cytoscape-fcose@2.2.0/LICENSE +19 -0
- package/dist/licenses/cytoscape@3.34.3/LICENSE +19 -0
- package/dist/licenses/cytoscape@3.34.3/license-update.mjs +32 -0
- package/dist/licenses/d3-array@2.12.1/LICENSE +27 -0
- package/dist/licenses/d3-array@3.2.4/LICENSE +13 -0
- package/dist/licenses/d3-axis@3.0.0/LICENSE +13 -0
- package/dist/licenses/d3-brush@3.0.0/LICENSE +13 -0
- package/dist/licenses/d3-chord@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-color@3.1.0/LICENSE +13 -0
- package/dist/licenses/d3-contour@4.0.2/LICENSE +13 -0
- package/dist/licenses/d3-delaunay@6.0.4/LICENSE +14 -0
- package/dist/licenses/d3-dispatch@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-drag@3.0.0/LICENSE +13 -0
- package/dist/licenses/d3-dsv@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-ease@3.0.1/LICENSE +28 -0
- package/dist/licenses/d3-fetch@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-force@3.0.0/LICENSE +13 -0
- package/dist/licenses/d3-format@3.1.2/LICENSE +13 -0
- package/dist/licenses/d3-geo@3.1.1/LICENSE +34 -0
- package/dist/licenses/d3-hierarchy@3.1.2/LICENSE +13 -0
- package/dist/licenses/d3-interpolate@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-path@1.0.9/LICENSE +27 -0
- package/dist/licenses/d3-path@3.1.0/LICENSE +13 -0
- package/dist/licenses/d3-polygon@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-quadtree@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-random@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-sankey@0.12.3/LICENSE +27 -0
- package/dist/licenses/d3-scale-chromatic@3.1.0/LICENSE +28 -0
- package/dist/licenses/d3-scale@4.0.2/LICENSE +13 -0
- package/dist/licenses/d3-selection@3.0.0/LICENSE +13 -0
- package/dist/licenses/d3-shape@1.3.7/LICENSE +27 -0
- package/dist/licenses/d3-shape@3.2.0/LICENSE +13 -0
- package/dist/licenses/d3-time-format@4.1.0/LICENSE +13 -0
- package/dist/licenses/d3-time@3.1.0/LICENSE +13 -0
- package/dist/licenses/d3-timer@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-transition@3.0.1/LICENSE +13 -0
- package/dist/licenses/d3-zoom@3.0.0/LICENSE +13 -0
- package/dist/licenses/d3@7.9.0/LICENSE +13 -0
- package/dist/licenses/dagre-d3-es@7.0.14/LICENSE.md +23 -0
- package/dist/licenses/dayjs@1.11.23/LICENSE +21 -0
- package/dist/licenses/delaunator@5.1.0/LICENSE +15 -0
- package/dist/licenses/dompurify@3.4.16/LICENSE +202 -0
- package/dist/licenses/dompurify@3.4.16/LICENSE-MPL +373 -0
- package/dist/licenses/elkjs@0.9.3/LICENSE.md +264 -0
- package/dist/licenses/es-toolkit@1.52.0/LICENSE +21 -0
- package/dist/licenses/es-toolkit@1.52.0/NOTICE +39 -0
- package/dist/licenses/internmap@1.0.1/LICENSE +13 -0
- package/dist/licenses/internmap@2.0.3/LICENSE +13 -0
- package/dist/licenses/katex@0.16.47/LICENSE +21 -0
- package/dist/licenses/khroma@2.1.0/license +21 -0
- package/dist/licenses/layout-base@1.0.2/LICENSE +21 -0
- package/dist/licenses/layout-base@2.0.1/LICENSE +21 -0
- package/dist/licenses/lodash-es@4.18.1/LICENSE +47 -0
- package/dist/licenses/lucide-react@1.50.0/LICENSE +43 -0
- package/dist/licenses/lucide-react@1.50.0/copyright.mjs +22 -0
- package/dist/licenses/marked@16.4.2/LICENSE.md +44 -0
- package/dist/licenses/mermaid@12.1.0/LICENSE +21 -0
- package/dist/licenses/packages.json +945 -0
- package/dist/licenses/pretendard@1.3.9/LICENSE.txt +94 -0
- package/dist/licenses/react-dom@19.3.0/LICENSE +21 -0
- package/dist/licenses/react-router@8.4.0/LICENSE.md +23 -0
- package/dist/licenses/react@19.3.0/LICENSE +21 -0
- package/dist/licenses/robust-predicates@3.0.3/LICENSE +24 -0
- package/dist/licenses/roughjs@4.6.6/LICENSE +21 -0
- package/dist/licenses/scheduler@0.28.0/LICENSE +21 -0
- package/dist/licenses/stylis@4.4.0/LICENSE +21 -0
- package/dist/licenses/ts-dedent@2.3.0/LICENSE +21 -0
- package/dist/licenses/uuid@14.0.2/LICENSE.md +9 -0
- package/package.json +44 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import{$ as Q,O as xt,Q as kt,U as _t,V as vt,W as bt,X as St,Y as Lt,Z as wt,_ as Et,ba as At}from"./chunk-M3XBBO6R.js";import{E as Tt,h as G,m as Ct}from"./chunk-W4ELJFHG.js";import{a as d}from"./chunk-UAGOPMXU.js";import"./chunk-PHKIAKHS.js";function X(t,r){let s;if(r===void 0)for(let u of t)u!=null&&(s<u||s===void 0&&u>=u)&&(s=u);else{let u=-1;for(let f of t)(f=r(f,++u,t))!=null&&(s<f||s===void 0&&f>=f)&&(s=f)}return s}function U(t,r){let s;if(r===void 0)for(let u of t)u!=null&&(s>u||s===void 0&&u>=u)&&(s=u);else{let u=-1;for(let f of t)(f=r(f,++u,t))!=null&&(s>f||s===void 0&&f>=f)&&(s=f)}return s}function H(t,r){let s=0;if(r===void 0)for(let u of t)(u=+u)&&(s+=u);else{let u=-1;for(let f of t)(f=+r(f,++u,t))&&(s+=f)}return s}function Bt(t){return t.target.depth}function st(t){return t.depth}function it(t,r){return r-1-t.height}function J(t,r){return t.sourceLinks.length?t.depth:r-1}function at(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?U(t.sourceLinks,Bt)-1:0}function Y(t){return function(){return t}}function Mt(t,r){return K(t.source,r.source)||t.index-r.index}function Ot(t,r){return K(t.target,r.target)||t.index-r.index}function K(t,r){return t.y0-r.y0}function lt(t){return t.value}function $t(t){return t.index}function Vt(t){return t.nodes}function Ft(t){return t.links}function Nt(t,r){let s=t.get(r);if(!s)throw new Error("missing: "+r);return s}function It({nodes:t}){for(let r of t){let s=r.y0,u=s;for(let f of r.sourceLinks)f.y0=s+f.width/2,s+=f.width;for(let f of r.targetLinks)f.y1=u+f.width/2,u+=f.width}}function Z(){let t=0,r=0,s=1,u=1,f=24,_=8,y,g=$t,i=J,a,c,x=Vt,k=Ft,p=6;function v(){let e={nodes:x.apply(null,arguments),links:k.apply(null,arguments)};return A(e),E(e),T(e),M(e),R(e),It(e),e}v.update=function(e){return It(e),e},v.nodeId=function(e){return arguments.length?(g=typeof e=="function"?e:Y(e),v):g},v.nodeAlign=function(e){return arguments.length?(i=typeof e=="function"?e:Y(e),v):i},v.nodeSort=function(e){return arguments.length?(a=e,v):a},v.nodeWidth=function(e){return arguments.length?(f=+e,v):f},v.nodePadding=function(e){return arguments.length?(_=y=+e,v):_},v.nodes=function(e){return arguments.length?(x=typeof e=="function"?e:Y(e),v):x},v.links=function(e){return arguments.length?(k=typeof e=="function"?e:Y(e),v):k},v.linkSort=function(e){return arguments.length?(c=e,v):c},v.size=function(e){return arguments.length?(t=r=0,s=+e[0],u=+e[1],v):[s-t,u-r]},v.extent=function(e){return arguments.length?(t=+e[0][0],s=+e[1][0],r=+e[0][1],u=+e[1][1],v):[[t,r],[s,u]]},v.iterations=function(e){return arguments.length?(p=+e,v):p};function A({nodes:e,links:l}){for(let[n,o]of e.entries())o.index=n,o.sourceLinks=[],o.targetLinks=[];let h=new Map(e.map((n,o)=>[g(n,o,e),n]));for(let[n,o]of l.entries()){o.index=n;let{source:m,target:b}=o;typeof m!="object"&&(m=o.source=Nt(h,m)),typeof b!="object"&&(b=o.target=Nt(h,b)),m.sourceLinks.push(o),b.targetLinks.push(o)}if(c!=null)for(let{sourceLinks:n,targetLinks:o}of e)n.sort(c),o.sort(c)}function E({nodes:e}){for(let l of e)l.value=l.fixedValue===void 0?Math.max(H(l.sourceLinks,lt),H(l.targetLinks,lt)):l.fixedValue}function T({nodes:e}){let l=e.length,h=new Set(e),n=new Set,o=0;for(;h.size;){for(let m of h){m.depth=o;for(let{target:b}of m.sourceLinks)n.add(b)}if(++o>l)throw new Error("circular link");h=n,n=new Set}}function M({nodes:e}){let l=e.length,h=new Set(e),n=new Set,o=0;for(;h.size;){for(let m of h){m.height=o;for(let{source:b}of m.targetLinks)n.add(b)}if(++o>l)throw new Error("circular link");h=n,n=new Set}}function O({nodes:e}){let l=X(e,o=>o.depth)+1,h=(s-t-f)/(l-1),n=new Array(l);for(let o of e){let m=Math.max(0,Math.min(l-1,Math.floor(i.call(null,o,l))));o.layer=m,o.x0=t+m*h,o.x1=o.x0+f,n[m]?n[m].push(o):n[m]=[o]}if(a)for(let o of n)o.sort(a);return n}function P(e){let l=U(e,h=>(u-r-(h.length-1)*y)/H(h,lt));for(let h of e){let n=r;for(let o of h){o.y0=n,o.y1=n+o.value*l,n=o.y1+y;for(let m of o.sourceLinks)m.width=m.value*l}n=(u-n+y)/(h.length+1);for(let o=0;o<h.length;++o){let m=h[o];m.y0+=n*(o+1),m.y1+=n*(o+1)}V(h)}}function R(e){let l=O(e);y=Math.min(_,(u-r)/(X(l,h=>h.length)-1)),P(l);for(let h=0;h<p;++h){let n=Math.pow(.99,h),o=Math.max(1-n,(h+1)/p);N(l,n,o),S(l,n,o)}}function S(e,l,h){for(let n=1,o=e.length;n<o;++n){let m=e[n];for(let b of m){let $=0,C=0;for(let{source:w,value:ot}of b.targetLinks){let q=ot*(b.layer-w.layer);$+=L(w,b)*q,C+=q}if(!(C>0))continue;let D=($/C-b.y0)*l;b.y0+=D,b.y1+=D,W(b)}a===void 0&&m.sort(K),j(m,h)}}function N(e,l,h){for(let n=e.length,o=n-2;o>=0;--o){let m=e[o];for(let b of m){let $=0,C=0;for(let{target:w,value:ot}of b.sourceLinks){let q=ot*(w.layer-b.layer);$+=z(b,w)*q,C+=q}if(!(C>0))continue;let D=($/C-b.y0)*l;b.y0+=D,b.y1+=D,W(b)}a===void 0&&m.sort(K),j(m,h)}}function j(e,l){let h=e.length>>1,n=e[h];I(e,n.y0-y,h-1,l),B(e,n.y1+y,h+1,l),I(e,u,e.length-1,l),B(e,r,0,l)}function B(e,l,h,n){for(;h<e.length;++h){let o=e[h],m=(l-o.y0)*n;m>1e-6&&(o.y0+=m,o.y1+=m),l=o.y1+y}}function I(e,l,h,n){for(;h>=0;--h){let o=e[h],m=(o.y1-l)*n;m>1e-6&&(o.y0-=m,o.y1-=m),l=o.y0-y}}function W({sourceLinks:e,targetLinks:l}){if(c===void 0){for(let{source:{sourceLinks:h}}of l)h.sort(Ot);for(let{target:{targetLinks:h}}of e)h.sort(Mt)}}function V(e){if(c===void 0)for(let{sourceLinks:l,targetLinks:h}of e)l.sort(Ot),h.sort(Mt)}function L(e,l){let h=e.y0-(e.sourceLinks.length-1)*y/2;for(let{target:n,width:o}of e.sourceLinks){if(n===l)break;h+=o+y}for(let{source:n,width:o}of l.targetLinks){if(n===e)break;h-=o}return h}function z(e,l){let h=l.y0-(l.targetLinks.length-1)*y/2;for(let{source:n,width:o}of l.targetLinks){if(n===e)break;h+=o+y}for(let{target:n,width:o}of e.sourceLinks){if(n===l)break;h-=o}return h}return v}var ut=Math.PI,ft=2*ut,F=1e-6,Wt=ft-F;function ct(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Pt(){return new ct}ct.prototype=Pt.prototype={constructor:ct,moveTo:function(t,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+r)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,r){this._+="L"+(this._x1=+t)+","+(this._y1=+r)},quadraticCurveTo:function(t,r,s,u){this._+="Q"+ +t+","+ +r+","+(this._x1=+s)+","+(this._y1=+u)},bezierCurveTo:function(t,r,s,u,f,_){this._+="C"+ +t+","+ +r+","+ +s+","+ +u+","+(this._x1=+f)+","+(this._y1=+_)},arcTo:function(t,r,s,u,f){t=+t,r=+r,s=+s,u=+u,f=+f;var _=this._x1,y=this._y1,g=s-t,i=u-r,a=_-t,c=y-r,x=a*a+c*c;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=r);else if(x>F)if(!(Math.abs(c*g-i*a)>F)||!f)this._+="L"+(this._x1=t)+","+(this._y1=r);else{var k=s-_,p=u-y,v=g*g+i*i,A=k*k+p*p,E=Math.sqrt(v),T=Math.sqrt(x),M=f*Math.tan((ut-Math.acos((v+x-A)/(2*E*T)))/2),O=M/T,P=M/E;Math.abs(O-1)>F&&(this._+="L"+(t+O*a)+","+(r+O*c)),this._+="A"+f+","+f+",0,0,"+ +(c*k>a*p)+","+(this._x1=t+P*g)+","+(this._y1=r+P*i)}},arc:function(t,r,s,u,f,_){t=+t,r=+r,s=+s,_=!!_;var y=s*Math.cos(u),g=s*Math.sin(u),i=t+y,a=r+g,c=1^_,x=_?u-f:f-u;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+i+","+a:(Math.abs(this._x1-i)>F||Math.abs(this._y1-a)>F)&&(this._+="L"+i+","+a),s&&(x<0&&(x=x%ft+ft),x>Wt?this._+="A"+s+","+s+",0,1,"+c+","+(t-y)+","+(r-g)+"A"+s+","+s+",0,1,"+c+","+(this._x1=i)+","+(this._y1=a):x>F&&(this._+="A"+s+","+s+",0,"+ +(x>=ut)+","+c+","+(this._x1=t+s*Math.cos(f))+","+(this._y1=r+s*Math.sin(f))))},rect:function(t,r,s,u){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+r)+"h"+ +s+"v"+ +u+"h"+-s+"Z"},toString:function(){return this._}};var ht=Pt;function dt(t){return function(){return t}}function Rt(t){return t[0]}function zt(t){return t[1]}var Dt=Array.prototype.slice;function Ut(t){return t.source}function Ht(t){return t.target}function Yt(t){var r=Ut,s=Ht,u=Rt,f=zt,_=null;function y(){var g,i=Dt.call(arguments),a=r.apply(this,i),c=s.apply(this,i);if(_||(_=g=ht()),t(_,+u.apply(this,(i[0]=a,i)),+f.apply(this,i),+u.apply(this,(i[0]=c,i)),+f.apply(this,i)),g)return _=null,g+""||null}return y.source=function(g){return arguments.length?(r=g,y):r},y.target=function(g){return arguments.length?(s=g,y):s},y.x=function(g){return arguments.length?(u=typeof g=="function"?g:dt(+g),y):u},y.y=function(g){return arguments.length?(f=typeof g=="function"?g:dt(+g),y):f},y.context=function(g){return arguments.length?(_=g??null,y):_},y}function qt(t,r,s,u,f){t.moveTo(r,s),t.bezierCurveTo(r=(r+u)/2,s,r,f,u,f)}function pt(){return Yt(qt)}function Gt(t){return[t.source.x1,t.y0]}function Xt(t){return[t.target.x0,t.y1]}function yt(){return pt().source(Gt).target(Xt)}var mt=(function(){var t=d(function(g,i,a,c){for(a=a||{},c=g.length;c--;a[g[c]]=i);return a},"o"),r=[1,9],s=[1,10],u=[1,5,10,12],f={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:d(function(i,a,c,x,k,p,v){var A=p.length-1;switch(k){case 7:let E=x.findOrCreateNode(p[A-4].trim().replaceAll('""','"')),T=x.findOrCreateNode(p[A-2].trim().replaceAll('""','"')),M=parseFloat(p[A].trim());x.addLink(E,T,M);break;case 8:case 9:case 11:this.$=p[A];break;case 10:this.$=p[A-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:r,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(u,[2,8]),t(u,[2,9]),{19:[1,16]},t(u,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:s},{15:18,16:7,17:8,18:r,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(u,[2,10]),{15:21,16:7,17:8,18:r,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:d(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:d(function(i){var a=this,c=[0],x=[],k=[null],p=[],v=this.table,A="",E=0,T=0,M=0,O=2,P=1,R=p.slice.call(arguments,1),S=Object.create(this.lexer),N={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(N.yy[j]=this.yy[j]);S.setInput(i,N.yy),N.yy.lexer=S,N.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var B=S.yylloc;p.push(B);var I=S.options&&S.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(w){c.length=c.length-2*w,k.length=k.length-w,p.length=p.length-w}d(W,"popStack");function V(){var w;return w=x.pop()||S.lex()||P,typeof w!="number"&&(w instanceof Array&&(x=w,w=x.pop()),w=a.symbols_[w]||w),w}d(V,"lex");for(var L,z,e,l,h,n,o={},m,b,$,C;;){if(e=c[c.length-1],this.defaultActions[e]?l=this.defaultActions[e]:((L===null||typeof L>"u")&&(L=V()),l=v[e]&&v[e][L]),typeof l>"u"||!l.length||!l[0]){var D="";C=[];for(m in v[e])this.terminals_[m]&&m>O&&C.push("'"+this.terminals_[m]+"'");S.showPosition?D="Parse error on line "+(E+1)+`:
|
|
2
|
+
`+S.showPosition()+`
|
|
3
|
+
Expecting `+C.join(", ")+", got '"+(this.terminals_[L]||L)+"'":D="Parse error on line "+(E+1)+": Unexpected "+(L==P?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(D,{text:S.match,token:this.terminals_[L]||L,line:S.yylineno,loc:B,expected:C})}if(l[0]instanceof Array&&l.length>1)throw new Error("Parse Error: multiple actions possible at state: "+e+", token: "+L);switch(l[0]){case 1:c.push(L),k.push(S.yytext),p.push(S.yylloc),c.push(l[1]),L=null,z?(L=z,z=null):(T=S.yyleng,A=S.yytext,E=S.yylineno,B=S.yylloc,M>0&&M--);break;case 2:if(b=this.productions_[l[1]][1],o.$=k[k.length-b],o._$={first_line:p[p.length-(b||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(b||1)].first_column,last_column:p[p.length-1].last_column},I&&(o._$.range=[p[p.length-(b||1)].range[0],p[p.length-1].range[1]]),n=this.performAction.apply(o,[A,T,E,N.yy,l[1],k,p].concat(R)),typeof n<"u")return n;b&&(c=c.slice(0,-1*b*2),k=k.slice(0,-1*b),p=p.slice(0,-1*b)),c.push(this.productions_[l[1]][0]),k.push(o.$),p.push(o._$),$=v[c[c.length-2]][c[c.length-1]],c.push($);break;case 3:return!0}}return!0},"parse")},_=(function(){var g={EOF:1,parseError:d(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:d(function(i,a){return this.yy=a||this.yy||{},this._input=i,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:d(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.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),i},"input"),unput:d(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var x=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),c.length-1&&(this.yylineno-=c.length-1);var k=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:c?(c.length===x.length?this.yylloc.first_column:0)+x[x.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(i){this.unput(this.match.slice(i))},"less"),pastInput:d(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
+
`+a+"^"},"showPosition"),test_match:d(function(i,a){var c,x,k;if(this.options.backtrack_lexer&&(k={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(k.yylloc.range=this.yylloc.range.slice(0))),x=i[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var p in k)this[p]=k[p];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,c,x;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),p=0;p<k.length;p++)if(c=this._input.match(this.rules[k[p]]),c&&(!a||c[0].length>a[0].length)){if(a=c,x=p,this.options.backtrack_lexer){if(i=this.test_match(c,k[p]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,k[x]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var a=this.next();return a||this.lex()},"lex"),begin:d(function(a){this.conditionStack.push(a)},"begin"),popState:d(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:d(function(a){this.begin(a)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(a,c,x,k){var p=k;switch(x){case 0:return this.pushState("csv"),4;break;case 1:return this.pushState("csv"),4;break;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;break;case 6:return 20;case 7:return this.popState("escaped_text"),18;break;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return g})();f.lexer=_;function y(){this.yy={}}return d(y,"Parser"),y.prototype=f,f.Parser=y,new y})();mt.parser=mt;var tt=mt,nt=[],rt=[],et=new Map,Jt=d(()=>{nt=[],rt=[],et=new Map,_t()},"clear"),Qt=class{constructor(t,r,s=0){this.source=t,this.target=r,this.value=s}static{d(this,"SankeyLink")}},Kt=d((t,r,s)=>{nt.push(new Qt(t,r,s))},"addLink"),Zt=class{constructor(t){this.ID=t}static{d(this,"SankeyNode")}},te=d(t=>{t=xt.sanitizeText(t,Q());let r=et.get(t);return r===void 0&&(r=new Zt(t),et.set(t,r),rt.push(r)),r},"findOrCreateNode"),ee=d(()=>rt,"getNodes"),ne=d(()=>nt,"getLinks"),re=d(()=>({nodes:rt.map(t=>({id:t.ID})),links:nt.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),oe={nodesMap:et,getConfig:d(()=>Q().sankey,"getConfig"),getNodes:ee,getLinks:ne,getGraph:re,addLink:Kt,findOrCreateNode:te,getAccTitle:bt,setAccTitle:vt,getAccDescription:Lt,setAccDescription:St,getDiagramTitle:Et,setDiagramTitle:wt,clear:Jt},jt=class gt{static{d(this,"Uid")}static{this.count=0}static next(r){return new gt(r+ ++gt.count)}constructor(r){this.id=r,this.href=`#${r}`}toString(){return"url("+this.href+")"}},se={left:st,right:it,center:at,justify:J},ie=d(t=>{let r=0,s=0;for(let u of t){let f=u.value??0;f>r&&(r=f,s=u.layer??0)}return s},"findCentralNodeLayer"),ae=d(function(t,r,s,u){let{securityLevel:f,sankey:_}=Q(),y=At.sankey,g;f==="sandbox"&&(g=G("#i"+r));let i=f==="sandbox"?G(g.nodes()[0].contentDocument.body):G("body"),a=f==="sandbox"?i.select(`[id="${r}"]`):G(`[id="${r}"]`),c=_?.width??y.width,x=_?.height??y.width,k=_?.useMaxWidth??y.useMaxWidth,p=_?.nodeAlignment??y.nodeAlignment,v=_?.prefix??y.prefix,A=_?.suffix??y.suffix,E=_?.showValues??y.showValues,T=_?.nodeWidth??y.nodeWidth??10,M=_?.nodePadding??y.nodePadding??12,O=_?.labelStyle??y.labelStyle??"legacy",P=_?.nodeColors??{},R=u.db.getGraph(),S=se[p];Z().nodeId(n=>n.id).nodeWidth(T).nodePadding(M+(E?15:0)).nodeAlign(S).extent([[0,0],[c,x]])(R);let j=ie(R.nodes),B=Ct(Tt),I=d(n=>P[n]??B(n),"getNodeColor");a.append("g").attr("class","nodes").selectAll(".node").data(R.nodes).join("g").attr("class","node").attr("id",n=>(n.uid=jt.next("node-")).id).attr("transform",function(n){return"translate("+n.x0+","+n.y0+")"}).attr("x",n=>n.x0).attr("y",n=>n.y0).append("rect").attr("height",n=>n.y1-n.y0).attr("width",n=>n.x1-n.x0).attr("fill",n=>I(n.id));let W=d(({id:n,value:o})=>E?`${n}
|
|
7
|
+
${v}${Math.round(o*100)/100}${A}`:n,"getText"),V=d(n=>O==="outlined"?(n.layer??0)<j?{x:n.x0-6,anchor:"end"}:{x:n.x1+6,anchor:"start"}:n.x0<c/2?{x:n.x1+6,anchor:"start"}:{x:n.x0-6,anchor:"end"},"getLabelPosition"),L=a.append("g").attr("class","node-labels").attr("font-size",14),z=d(n=>L.selectAll(n?`.${n}`:"text").data(R.nodes).join("text").attr("class",n??null).attr("x",o=>V(o).x).attr("y",o=>(o.y1+o.y0)/2).attr("dy",`${E?"0":"0.35"}em`).attr("text-anchor",o=>V(o).anchor).text(W),"appendLabel");O==="outlined"?(z("sankey-label-bg"),z("sankey-label-fg")):z();let e=a.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(R.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),l=_?.linkColor??"gradient";if(l==="gradient"){let n=e.append("linearGradient").attr("id",o=>(o.uid=jt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",o=>o.source.x1).attr("x2",o=>o.target.x0);n.append("stop").attr("offset","0%").attr("stop-color",o=>I(o.source.id)),n.append("stop").attr("offset","100%").attr("stop-color",o=>I(o.target.id))}let h;switch(l){case"gradient":h=d(n=>n.uid,"coloring");break;case"source":h=d(n=>I(n.source.id),"coloring");break;case"target":h=d(n=>I(n.target.id),"coloring");break;default:h=l}e.append("path").attr("d",yt()).attr("stroke",h).attr("stroke-width",n=>Math.max(1,n.width)),kt(void 0,a,0,k)},"draw"),le={draw:ae},ue=d(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
8
|
+
`).trim(),"prepareTextForParsing"),fe=d(t=>`.label {
|
|
9
|
+
font-family: ${t.fontFamily};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.node-labels {
|
|
13
|
+
font-family: ${t.fontFamily};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Outlined label style - background stroke for better readability */
|
|
17
|
+
.sankey-label-bg {
|
|
18
|
+
stroke: ${t.mainBkg||t.background||"#fff"};
|
|
19
|
+
stroke-width: 4px;
|
|
20
|
+
stroke-linejoin: round;
|
|
21
|
+
paint-order: stroke;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Foreground label text */
|
|
25
|
+
.sankey-label-fg {
|
|
26
|
+
fill: ${t.textColor};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Node styling */
|
|
30
|
+
.node rect {
|
|
31
|
+
shape-rendering: crispEdges;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Link styling */
|
|
35
|
+
.link {
|
|
36
|
+
fill: none;
|
|
37
|
+
stroke-opacity: 0.5;
|
|
38
|
+
mix-blend-mode: multiply;
|
|
39
|
+
}
|
|
40
|
+
`,"getStyles"),ce=fe,he=tt.parse.bind(tt);tt.parse=t=>he(ue(t));var Ze={styles:ce,parser:tt,db:oe,renderer:le};export{Ze as diagram};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import{a as cr}from"./chunk-YAHQK6MQ.js";import{a as ar,b as sr}from"./chunk-R4OZRASH.js";import{a as nr,b as or,d as qt,e as zt,f as Tt,g as Ut}from"./chunk-6QSLXF4I.js";import{c as ir,o as he,q as Z}from"./chunk-GTJDAHEV.js";import{a as wr}from"./chunk-XLJVPE6C.js";import{$ as tt,C as Dt,I as vt,J as Xe,L as j,M as At,N as ce,O as N,P as Je,U as Qe,V as le,W as Ze,X as $e,Y as je,Z as tr,_ as er,aa as rr,o as Ge}from"./chunk-M3XBBO6R.js";import{b as rt,h as Ct}from"./chunk-W4ELJFHG.js";import{a as f}from"./chunk-UAGOPMXU.js";import{c as Nr}from"./chunk-PHKIAKHS.js";var ue=Nr(wr(),1),Te=(function(){var e=f(function(_t,k,C,D){for(C=C||{},D=_t.length;D--;C[_t[D]]=k);return C},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],c=[1,9],s=[1,11],n=[1,12],p=[1,14],d=[1,15],E=[1,17],u=[1,18],_=[1,19],O=[1,25],g=[1,26],y=[1,27],h=[1,28],R=[1,29],x=[1,30],m=[1,31],S=[1,32],L=[1,33],w=[1,34],P=[1,35],B=[1,36],V=[1,37],K=[1,38],U=[1,39],X=[1,40],at=[1,42],st=[1,43],G=[1,44],ot=[1,45],it=[1,46],W=[1,47],M=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Q=[1,56],Yt=[1,75],A=[1,81],v=[1,82],dt=[1,83],nt=[1,84],H=[1,85],mt=[1,86],_e=[1,87],ge=[1,88],xe=[1,89],be=[1,90],Ie=[1,91],ye=[1,92],Re=[1,93],Oe=[1,94],Le=[1,95],me=[1,96],Se=[1,97],Ae=[1,98],ke=[1,99],Ne=[1,100],we=[1,101],Pe=[1,102],De=[1,103],ve=[1,104],Ce=[1,105],Me=[1,106],Be=[2,79],Ye=[2,78],wt=[4,5,17,51,53,54],Vt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ve=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],te=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],We=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],ee=[5,52],F=[62,70,71,72,73],Ke=[62,73],lt=[1,152],re={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:f(function(k,C,D,b,q,o,Pt){var T=o.length-1;switch(q){case 3:return b.apply(o[T]),o[T];break;case 4:case 10:this.$=[];break;case 5:case 11:o[T-1].push(o[T]),this.$=o[T-1];break;case 6:case 7:case 12:case 13:this.$=o[T];break;case 8:case 9:case 14:this.$=[];break;case 16:o[T].type="createParticipant",this.$=o[T];break;case 17:o[T-1].unshift({type:"boxStart",boxData:b.parseBoxData(o[T-2])}),o[T-1].push({type:"boxEnd",boxText:o[T-2]}),this.$=o[T-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-2]),sequenceIndexStep:Number(o[T-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:o[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:o[T-1].actor};break;case 30:b.setDiagramTitle(o[T].substring(6)),this.$=o[T].substring(6);break;case 31:b.setDiagramTitle(o[T].substring(7)),this.$=o[T].substring(7);break;case 32:this.$=o[T].trim(),b.setAccTitle(this.$);break;case 33:case 34:this.$=o[T].trim(),b.setAccDescription(this.$);break;case 35:o[T-1].unshift({type:"loopStart",loopText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.LOOP_START}),o[T-1].push({type:"loopEnd",loopText:o[T-2],signalType:b.LINETYPE.LOOP_END}),this.$=o[T-1];break;case 36:o[T-1].unshift({type:"rectStart",color:b.parseMessage(o[T-2]),signalType:b.LINETYPE.RECT_START}),o[T-1].push({type:"rectEnd",color:b.parseMessage(o[T-2]),signalType:b.LINETYPE.RECT_END}),this.$=o[T-1];break;case 37:o[T-1].unshift({type:"optStart",optText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.OPT_START}),o[T-1].push({type:"optEnd",optText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.OPT_END}),this.$=o[T-1];break;case 38:o[T-1].unshift({type:"altStart",altText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.ALT_START}),o[T-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=o[T-1];break;case 39:o[T-1].unshift({type:"parStart",parText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.PAR_START}),o[T-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=o[T-1];break;case 40:o[T-1].unshift({type:"parStart",parText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.PAR_OVER_START}),o[T-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=o[T-1];break;case 41:o[T-1].unshift({type:"criticalStart",criticalText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.CRITICAL_START}),o[T-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=o[T-1];break;case 42:o[T-1].unshift({type:"breakStart",breakText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.BREAK_START}),o[T-1].push({type:"breakEnd",optText:b.parseMessage(o[T-2]),signalType:b.LINETYPE.BREAK_END}),this.$=o[T-1];break;case 44:this.$=o[T-3].concat([{type:"option",optionText:b.parseMessage(o[T-1]),signalType:b.LINETYPE.CRITICAL_OPTION},o[T]]);break;case 46:this.$=o[T-3].concat([{type:"and",parText:b.parseMessage(o[T-1]),signalType:b.LINETYPE.PAR_AND},o[T]]);break;case 48:this.$=o[T-3].concat([{type:"else",altText:b.parseMessage(o[T-1]),signalType:b.LINETYPE.ALT_ELSE},o[T]]);break;case 49:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=b.parseMessage(o[T-1]),this.$=o[T-3];break;case 50:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 51:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=b.parseMessage(o[T-1]),this.$=o[T-3];break;case 52:case 57:o[T-1].draw="actor",o[T-1].type="addParticipant",this.$=o[T-1];break;case 53:o[T-1].type="destroyParticipant",this.$=o[T-1];break;case 54:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=b.parseMessage(o[T-1]),this.$=o[T-3];break;case 55:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 56:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=b.parseMessage(o[T-1]),this.$=o[T-3];break;case 58:this.$=[o[T-1],{type:"addNote",placement:o[T-2],actor:o[T-1].actor,text:o[T]}];break;case 59:o[T-2]=[].concat(o[T-1],o[T-1]).slice(0,2),o[T-2][0]=o[T-2][0].actor,o[T-2][1]=o[T-2][1].actor,this.$=[o[T-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:o[T-2].slice(0,2),text:o[T]}];break;case 60:this.$=[o[T-1],{type:"addLinks",actor:o[T-1].actor,text:o[T]}];break;case 61:this.$=[o[T-1],{type:"addALink",actor:o[T-1].actor,text:o[T]}];break;case 62:this.$=[o[T-1],{type:"addProperties",actor:o[T-1].actor,text:o[T]}];break;case 63:this.$=[o[T-1],{type:"addDetails",actor:o[T-1].actor,text:o[T]}];break;case 66:this.$=[o[T-2],o[T]];break;case 67:this.$=o[T];break;case 68:this.$=b.PLACEMENT.LEFTOF;break;case 69:this.$=b.PLACEMENT.RIGHTOF;break;case 70:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:o[T-1].actor}];break;case 71:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:o[T-4].actor}];break;case 72:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:b.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:b.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor}];break;case 73:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T],activate:!1,centralConnection:b.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:b.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-4].actor}];break;case 74:this.$=[o[T-5],o[T-1],{type:"addMessage",from:o[T-5].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:b.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:b.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor},{type:"centralConnectionReverse",signalType:b.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-5].actor}];break;case 75:this.$=[o[T-3],o[T-1],{type:"addMessage",from:o[T-3].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T]}];break;case 76:this.$={type:"addParticipant",actor:o[T-1],config:o[T]};break;case 77:this.$=o[T-1].trim();break;case 78:case 79:this.$={type:"addParticipant",actor:o[T]};break;case 80:this.$=b.LINETYPE.SOLID_OPEN;break;case 81:this.$=b.LINETYPE.DOTTED_OPEN;break;case 82:this.$=b.LINETYPE.SOLID;break;case 83:this.$=b.LINETYPE.SOLID_TOP;break;case 84:this.$=b.LINETYPE.SOLID_BOTTOM;break;case 85:this.$=b.LINETYPE.STICK_TOP;break;case 86:this.$=b.LINETYPE.STICK_BOTTOM;break;case 87:this.$=b.LINETYPE.SOLID_TOP_DOTTED;break;case 88:this.$=b.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 89:this.$=b.LINETYPE.STICK_TOP_DOTTED;break;case 90:this.$=b.LINETYPE.STICK_BOTTOM_DOTTED;break;case 91:this.$=b.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 92:this.$=b.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 93:this.$=b.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 94:this.$=b.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 95:this.$=b.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 96:this.$=b.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 97:this.$=b.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 98:this.$=b.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 99:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 100:this.$=b.LINETYPE.DOTTED;break;case 101:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 102:this.$=b.LINETYPE.SOLID_CROSS;break;case 103:this.$=b.LINETYPE.DOTTED_CROSS;break;case 104:this.$=b.LINETYPE.SOLID_POINT;break;case 105:this.$=b.LINETYPE.DOTTED_POINT;break;case 106:this.$=b.parseMessage(o[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},e(M,[2,5]),{9:48,13:13,14:p,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},e(M,[2,7]),e(M,[2,8]),e(M,[2,9]),e(M,[2,15]),{13:49,51:K,53:U,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,62:Q,73:W},{23:57,62:Q,73:W},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},e(M,[2,30]),e(M,[2,31]),{33:[1,63]},{35:[1,64]},e(M,[2,34]),{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{16:[1,72]},{23:73,55:74,62:Q,73:Yt},{23:76,55:77,62:Q,73:Yt},{23:78,62:Q,73:W},{69:79,72:[1,80],78:A,79:v,80:dt,81:nt,82:H,83:mt,84:_e,85:ge,86:xe,87:be,88:Ie,89:ye,90:Re,91:Oe,92:Le,93:me,94:Se,95:Ae,96:ke,97:Ne,98:we,99:Pe,100:De,101:ve,102:Ce,103:Me},{57:107,59:[1,108],67:[1,109],68:[1,110]},{23:111,62:Q,73:W},e([72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],Be,{23:112,62:Q,73:W}),{23:113,62:Q,73:W},{23:114,62:Q,73:W},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Ye),e(M,[2,6]),e(M,[2,16]),e(wt,[2,10],{11:115}),e(M,[2,18]),{5:[1,117],20:[1,116]},{5:[1,118]},e(M,[2,22]),{5:[1,119]},e([5,52,66,104],Be),{5:[1,120]},e(M,[2,25]),e(M,[2,26]),e(M,[2,27]),e(M,[2,28]),e(M,[2,29]),e(M,[2,32]),e(M,[2,33]),e(Vt,i,{7:121}),e(Vt,i,{7:122}),e(Vt,i,{7:123}),e(Ve,i,{41:124,7:125}),e(te,i,{43:126,7:127}),e(te,i,{7:127,43:128}),e(We,i,{46:129,7:130}),e(Vt,i,{7:131}),{5:[1,133],52:[1,132]},{5:[1,135],52:[1,134]},e(ee,Ye,{74:136,75:[1,137]}),{5:[1,139],52:[1,138]},{5:[1,141],52:[1,140]},{5:[1,142]},{23:146,62:Q,70:[1,143],71:[1,144],72:[1,145],73:W},{69:147,78:A,79:v,80:dt,81:nt,82:H,83:mt,84:_e,85:ge,86:xe,87:be,88:Ie,89:ye,90:Re,91:Oe,92:Le,93:me,94:Se,95:Ae,96:ke,97:Ne,98:we,99:Pe,100:De,101:ve,102:Ce,103:Me},e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),e(F,[2,105]),{23:148,62:Q,73:W},{23:150,60:149,62:Q,73:W},e(Ke,[2,68]),e(Ke,[2,69]),{58:151,104:lt},{58:153,104:lt},{58:154,104:lt},{58:155,104:lt},{4:[1,158],5:[1,160],12:157,13:159,17:[1,156],51:K,53:U,54:X},{5:[1,161]},e(M,[2,20]),e(M,[2,21]),e(M,[2,23]),e(M,[2,24]),{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[1,162],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[1,163],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[1,164],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{17:[1,165]},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[2,47],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,50:[1,166],51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{17:[1,167]},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[2,45],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,49:[1,168],51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{17:[1,169]},{17:[1,170]},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[2,43],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,48:[1,171],51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{4:c,5:s,8:8,9:10,10:n,13:13,14:p,15:d,17:[1,172],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:O,31:g,32:y,34:h,36:R,37:x,38:m,39:S,40:L,42:w,44:P,45:B,47:V,51:K,53:U,54:X,56:at,61:st,62:G,63:ot,64:it,73:W},{16:[1,173]},e(M,[2,50]),{16:[1,174]},e(M,[2,55]),e(ee,[2,76]),{76:[1,175]},{16:[1,176]},e(M,[2,52]),{16:[1,177]},e(M,[2,57]),e(M,[2,53]),{23:178,62:Q,73:W},{23:179,62:Q,73:W},{23:180,62:Q,73:W},{58:181,104:lt},{23:182,62:Q,72:[1,183],73:W},{58:184,104:lt},{58:185,104:lt},{66:[1,186],104:[2,67]},{5:[2,60]},{5:[2,106]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(M,[2,17]),e(wt,[2,11]),{13:187,51:K,53:U,54:X},e(wt,[2,13]),e(wt,[2,14]),e(M,[2,19]),e(M,[2,35]),e(M,[2,36]),e(M,[2,37]),e(M,[2,38]),{16:[1,188]},e(M,[2,39]),{16:[1,189]},e(M,[2,40]),e(M,[2,41]),{16:[1,190]},e(M,[2,42]),{5:[1,191]},{5:[1,192]},{77:[1,193]},{5:[1,194]},{5:[1,195]},{58:196,104:lt},{58:197,104:lt},{58:198,104:lt},{5:[2,75]},{58:199,104:lt},{23:200,62:Q,73:W},{5:[2,58]},{5:[2,59]},{23:201,62:Q,73:W},e(wt,[2,12]),e(Ve,i,{7:125,41:202}),e(te,i,{7:127,43:203}),e(We,i,{7:130,46:204}),e(M,[2,49]),e(M,[2,54]),e(ee,[2,77]),e(M,[2,51]),e(M,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:205,104:lt},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],151:[2,60],152:[2,106],153:[2,61],154:[2,62],155:[2,63],181:[2,75],184:[2,58],185:[2,59],196:[2,70],197:[2,71],198:[2,72],199:[2,73],201:[2,66],202:[2,48],203:[2,46],204:[2,44],205:[2,74]},parseError:f(function(k,C){if(C.recoverable)this.trace(k);else{var D=new Error(k);throw D.hash=C,D}},"parseError"),parse:f(function(k){var C=this,D=[0],b=[],q=[null],o=[],Pt=this.table,T="",Kt=0,He=0,Fe=0,mr=2,qe=1,Sr=o.slice.call(arguments,1),$=Object.create(this.lexer),It={yy:{}};for(var ae in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ae)&&(It.yy[ae]=this.yy[ae]);$.setInput(k,It.yy),It.yy.lexer=$,It.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var se=$.yylloc;o.push(se);var Ar=$.options&&$.options.ranges;typeof It.yy.parseError=="function"?this.parseError=It.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function kr(ct){D.length=D.length-2*ct,q.length=q.length-ct,o.length=o.length-ct}f(kr,"popStack");function ze(){var ct;return ct=b.pop()||$.lex()||qe,typeof ct!="number"&&(ct instanceof Array&&(b=ct,ct=b.pop()),ct=C.symbols_[ct]||ct),ct}f(ze,"lex");for(var et,ie,yt,ht,Na,ne,St={},Ht,Et,Ue,Ft;;){if(yt=D[D.length-1],this.defaultActions[yt]?ht=this.defaultActions[yt]:((et===null||typeof et>"u")&&(et=ze()),ht=Pt[yt]&&Pt[yt][et]),typeof ht>"u"||!ht.length||!ht[0]){var oe="";Ft=[];for(Ht in Pt[yt])this.terminals_[Ht]&&Ht>mr&&Ft.push("'"+this.terminals_[Ht]+"'");$.showPosition?oe="Parse error on line "+(Kt+1)+`:
|
|
2
|
+
`+$.showPosition()+`
|
|
3
|
+
Expecting `+Ft.join(", ")+", got '"+(this.terminals_[et]||et)+"'":oe="Parse error on line "+(Kt+1)+": Unexpected "+(et==qe?"end of input":"'"+(this.terminals_[et]||et)+"'"),this.parseError(oe,{text:$.match,token:this.terminals_[et]||et,line:$.yylineno,loc:se,expected:Ft})}if(ht[0]instanceof Array&&ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+yt+", token: "+et);switch(ht[0]){case 1:D.push(et),q.push($.yytext),o.push($.yylloc),D.push(ht[1]),et=null,ie?(et=ie,ie=null):(He=$.yyleng,T=$.yytext,Kt=$.yylineno,se=$.yylloc,Fe>0&&Fe--);break;case 2:if(Et=this.productions_[ht[1]][1],St.$=q[q.length-Et],St._$={first_line:o[o.length-(Et||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Et||1)].first_column,last_column:o[o.length-1].last_column},Ar&&(St._$.range=[o[o.length-(Et||1)].range[0],o[o.length-1].range[1]]),ne=this.performAction.apply(St,[T,He,Kt,It.yy,ht[1],q,o].concat(Sr)),typeof ne<"u")return ne;Et&&(D=D.slice(0,-1*Et*2),q=q.slice(0,-1*Et),o=o.slice(0,-1*Et)),D.push(this.productions_[ht[1]][0]),q.push(St.$),o.push(St._$),Ue=Pt[D[D.length-2]][D[D.length-1]],D.push(Ue);break;case 3:return!0}}return!0},"parse")},Lr=(function(){var _t={EOF:1,parseError:f(function(C,D){if(this.yy.parser)this.yy.parser.parseError(C,D);else throw new Error(C)},"parseError"),setInput:f(function(k,C){return this.yy=C||this.yy||{},this._input=k,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 k=this._input[0];this.yytext+=k,this.yyleng++,this.offset++,this.match+=k,this.matched+=k;var C=k.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),k},"input"),unput:f(function(k){var C=k.length,D=k.split(/(?:\r\n?|\n)/g);this._input=k+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;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),D.length-1&&(this.yylineno-=D.length-1);var q=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:D?(D.length===b.length?this.yylloc.first_column:0)+b[b.length-D.length].length-D[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[q[0],q[0]+this.yyleng-C]),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
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(k){this.unput(this.match.slice(k))},"less"),pastInput:f(function(){var k=this.matched.substr(0,this.matched.length-this.match.length);return(k.length>20?"...":"")+k.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var k=this.match;return k.length<20&&(k+=this._input.substr(0,20-k.length)),(k.substr(0,20)+(k.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var k=this.pastInput(),C=new Array(k.length+1).join("-");return k+this.upcomingInput()+`
|
|
5
|
+
`+C+"^"},"showPosition"),test_match:f(function(k,C){var D,b,q;if(this.options.backtrack_lexer&&(q={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(q.yylloc.range=this.yylloc.range.slice(0))),b=k[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+k[0].length},this.yytext+=k[0],this.match+=k[0],this.matches=k,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(k[0].length),this.matched+=k[0],D=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),D)return D;if(this._backtrack){for(var o in q)this[o]=q[o];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var k,C,D,b;this._more||(this.yytext="",this.match="");for(var q=this._currentRules(),o=0;o<q.length;o++)if(D=this._input.match(this.rules[q[o]]),D&&(!C||D[0].length>C[0].length)){if(C=D,b=o,this.options.backtrack_lexer){if(k=this.test_match(D,q[o]),k!==!1)return k;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(k=this.test_match(C,q[b]),k!==!1?k:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var C=this.next();return C||this.lex()},"lex"),begin:f(function(C){this.conditionStack.push(C)},"begin"),popState:f(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:f(function(C){this.begin(C)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(C,D,b,q){var o=q;switch(b){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;break;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;break;case 10:return this.popState(),this.popState(),77;break;case 11:return D.yytext=D.yytext.trim(),73;break;case 12:return D.yytext=D.yytext.trim(),this.begin("ALIAS"),73;break;case 13:return D.yytext=D.yytext.trim(),this.popState(),73;break;case 14:return this.popState(),10;break;case 15:return D.yytext=D.yytext.trim(),this.popState(),10;break;case 16:return this.begin("LINE"),15;break;case 17:return this.begin("ID"),51;break;case 18:return this.begin("ID"),53;break;case 19:return 14;case 20:return this.begin("ID"),54;break;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;break;case 22:return this.popState(),this.popState(),5;break;case 23:return this.begin("LINE"),37;break;case 24:return this.begin("LINE"),38;break;case 25:return this.begin("LINE"),39;break;case 26:return this.begin("LINE"),40;break;case 27:return this.begin("LINE"),50;break;case 28:return this.begin("LINE"),42;break;case 29:return this.begin("LINE"),44;break;case 30:return this.begin("LINE"),49;break;case 31:return this.begin("LINE"),45;break;case 32:return this.begin("LINE"),48;break;case 33:return this.begin("LINE"),47;break;case 34:return this.popState(),16;break;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;break;case 45:return this.begin("ID"),24;break;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;break;case 49:return this.popState(),"acc_title_value";break;case 50:return this.begin("acc_descr"),34;break;case 51:return this.popState(),"acc_descr_value";break;case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return D.yytext=D.yytext.trim(),73;break;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^<>:\n,;@\s]+(?=\s*@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,/^(?:link(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,/^(?:properties(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,/^(?:details(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return _t})();re.lexer=Lr;function Wt(){this.yy={}}return f(Wt,"Parser"),Wt.prototype=re,re.Parser=Wt,new Wt})();Te.parser=Te;var Pr=Te,Dr={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},vr={FILLED:0,OPEN:1},Cr={LEFTOF:0,RIGHTOF:1,OVER:2},Gt={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},Mr=class{constructor(){this.state=new cr(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=le,this.setAccDescription=$e,this.setDiagramTitle=tr,this.getAccTitle=Ze,this.getAccDescription=je,this.getDiagramTitle=er,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(tt().wrap),this.LINETYPE=Dr,this.ARROWTYPE=vr,this.PLACEMENT=Cr}static{f(this,"SequenceDB")}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,a,r,i){let c=this.state.records.currentBox,s;if(i!==void 0){let p;i.includes(`
|
|
7
|
+
`)?p=i+`
|
|
8
|
+
`:p=`{
|
|
9
|
+
`+i+`
|
|
10
|
+
}`,s=sr(p,{schema:ar})}r=s?.type??r,s?.alias&&(!a||a.text===t)&&(a={text:s.alias,wrap:a?.wrap,type:r});let n=this.state.records.actors.get(e);if(n){if(this.state.records.currentBox&&n.box&&this.state.records.currentBox!==n.box)throw new Error(`A same participant should only be defined in one Box: ${n.name} can't be in '${n.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(c=n.box?n.box:this.state.records.currentBox,n.box=c,n&&t===n.name&&a==null)return}if(a?.text==null&&(a={text:t,type:r}),(r==null||a.text==null)&&(a={text:t,type:r}),this.state.records.actors.set(e,{box:c,name:t,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),this.state.records.prevActor){let p=this.state.records.actors.get(this.state.records.prevActor);p&&(p.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,a=0;if(!e)return 0;for(t=0;t<this.state.records.messages.length;t++)this.state.records.messages[t].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[t].from===e&&a++,this.state.records.messages[t].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[t].from===e&&a--;return a}addMessage(e,t,a,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:a.text,wrap:a.wrap??this.autoWrap(),answer:r})}addSignal(e,t,a,r,i=!1,c){if(r===this.LINETYPE.ACTIVE_END&&this.activationCount(e??"")<1){let n=new Error("Trying to inactivate an inactive participant ("+e+")");throw n.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},n}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:i,centralConnection:c??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let t=/^:?wrap:/.exec(e)!==null?!0:/^:?nowrap:/.exec(e)!==null?!1:void 0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:tt().sequence?.wrap??!1}clear(){this.state.reset(),Qe()}parseMessage(e){let t=e.trim(),{wrap:a,cleanedText:r}=this.extractWrap(t),i={text:r,wrap:a};return rt.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),a=t?.[1]?t[1].trim():"transparent",r=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=e.trim());else{let s=new Option().style;s.color=a,s.color!==a&&(a="transparent",r=e.trim())}let{wrap:i,cleanedText:c}=this.extractWrap(r);return{text:c?vt(c,tt()):void 0,color:a,wrap:i}}addNote(e,t,a){let r={actor:e,placement:t,message:a.text,wrap:a.wrap??this.autoWrap()},i=[].concat(e,e);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,t){let a=this.getActor(e);try{let r=vt(t.text,tt());r=r.replace(/=/g,"="),r=r.replace(/&/g,"&");let i=JSON.parse(r);this.insertLinks(a,i)}catch(r){rt.error("error while parsing actor link text",r)}}addALink(e,t){let a=this.getActor(e);try{let r={},i=vt(t.text,tt()),c=i.indexOf("@");i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");let s=i.slice(0,c-1).trim(),n=i.slice(c+1).trim();r[s]=n,this.insertLinks(a,r)}catch(r){rt.error("error while parsing actor link text",r)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(let a in t)e.links[a]=t[a]}addProperties(e,t){let a=this.getActor(e);try{let r=vt(t.text,tt()),i=JSON.parse(r);this.insertProperties(a,i)}catch(r){rt.error("error while parsing actor properties text",r)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(let a in t)e.properties[a]=t[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){let a=this.getActor(e),r=document.getElementById(t.text);try{let i=r.innerHTML,c=JSON.parse(i);c.properties&&this.insertProperties(a,c.properties),c.links&&this.insertLinks(a,c.links)}catch(i){rt.error("error while parsing actor details text",i)}}getActorProperty(e,t){if(e?.properties!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(t=>{this.apply(t)});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case"createParticipant":if(this.state.records.actors.has(e.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"centralConnection":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"centralConnectionReverse":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":le(e.text);break;case"parStart":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return tt().sequence}},Br=f(e=>{let t=e.dropShadow??"none",{look:a}=tt();return`.actor {
|
|
11
|
+
stroke: ${e.actorBorder};
|
|
12
|
+
fill: ${e.actorBkg};
|
|
13
|
+
stroke-width: ${e.strokeWidth??1};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
rect.actor.outer-path[data-look="neo"] {
|
|
17
|
+
filter: ${t};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
rect.note[data-look="neo"] {
|
|
21
|
+
stroke:${e.noteBorderColor};
|
|
22
|
+
fill:${e.noteBkgColor};
|
|
23
|
+
filter: ${t};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
text.actor > tspan {
|
|
27
|
+
fill: ${e.actorTextColor};
|
|
28
|
+
stroke: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.actor-line {
|
|
32
|
+
stroke: ${e.actorLineColor};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.innerArc {
|
|
36
|
+
stroke-width: 1.5;
|
|
37
|
+
stroke-dasharray: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.messageLine0 {
|
|
41
|
+
stroke-width: 1.5;
|
|
42
|
+
stroke-dasharray: none;
|
|
43
|
+
stroke: ${e.signalColor};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.messageLine1 {
|
|
47
|
+
stroke-width: 1.5;
|
|
48
|
+
stroke-dasharray: 2, 2;
|
|
49
|
+
stroke: ${e.signalColor};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[id$="-arrowhead"] path {
|
|
53
|
+
fill: ${e.signalColor};
|
|
54
|
+
stroke: ${e.signalColor};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.sequenceNumber {
|
|
58
|
+
fill: ${e.sequenceNumberColor};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
[id$="-sequencenumber"] {
|
|
62
|
+
fill: ${e.signalColor};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[id$="-crosshead"] path {
|
|
66
|
+
fill: ${e.signalColor};
|
|
67
|
+
stroke: ${e.signalColor};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.messageText {
|
|
71
|
+
fill: ${e.signalTextColor};
|
|
72
|
+
stroke: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.labelBox {
|
|
76
|
+
stroke: ${e.labelBoxBorderColor};
|
|
77
|
+
fill: ${e.labelBoxBkgColor};
|
|
78
|
+
filter: ${a==="neo"?t:"none"};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.labelText, .labelText > tspan {
|
|
82
|
+
fill: ${e.labelTextColor};
|
|
83
|
+
stroke: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.loopText, .loopText > tspan {
|
|
87
|
+
fill: ${e.loopTextColor};
|
|
88
|
+
stroke: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.sectionTitle, .sectionTitle > tspan {
|
|
92
|
+
fill: ${e.loopTextColor};
|
|
93
|
+
stroke: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.loopLine {
|
|
97
|
+
stroke-width: 2px;
|
|
98
|
+
stroke-dasharray: 2, 2;
|
|
99
|
+
stroke: ${e.labelBoxBorderColor};
|
|
100
|
+
fill: ${e.labelBoxBorderColor};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.note {
|
|
104
|
+
//stroke: #decc93;
|
|
105
|
+
stroke: ${e.noteBorderColor};
|
|
106
|
+
fill: ${e.noteBkgColor};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/*
|
|
110
|
+
* No font-weight here, deliberately. Note text renders inside tspan elements, and a weight emitted at
|
|
111
|
+
* tspan level outranks the inline style drawText puts on the parent text element from the
|
|
112
|
+
* sequence.noteFontWeight config key -- so that documented key would never reach the glyphs.
|
|
113
|
+
* The theme variable formerly emitted here is a different value from that config key, and
|
|
114
|
+
* git/styles.js reads it as its own bold-label weight under redux and neo, so it cannot be
|
|
115
|
+
* lowered there either.
|
|
116
|
+
*/
|
|
117
|
+
.noteText, .noteText > tspan {
|
|
118
|
+
fill: ${e.noteTextColor};
|
|
119
|
+
stroke: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.activation0 {
|
|
123
|
+
fill: ${e.activationBkgColor};
|
|
124
|
+
stroke: ${e.activationBorderColor};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.activation1 {
|
|
128
|
+
fill: ${e.activationBkgColor};
|
|
129
|
+
stroke: ${e.activationBorderColor};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.activation2 {
|
|
133
|
+
fill: ${e.activationBkgColor};
|
|
134
|
+
stroke: ${e.activationBorderColor};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.actorPopupMenu {
|
|
138
|
+
position: absolute;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.actorPopupMenuPanel {
|
|
142
|
+
position: absolute;
|
|
143
|
+
fill: ${e.actorBkg};
|
|
144
|
+
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
145
|
+
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
|
146
|
+
}
|
|
147
|
+
.actor-man circle, line {
|
|
148
|
+
fill: ${e.actorBkg};
|
|
149
|
+
stroke-width: 2px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
g rect.rect {
|
|
153
|
+
filter: ${t};
|
|
154
|
+
stroke: ${e.nodeBorder};
|
|
155
|
+
}
|
|
156
|
+
`},"getStyles"),Yr=Br,Qt=44,fe=6,Xt=6,Vr=f((e,t)=>e.actorTextHeight??Z.calculateTextDimensions(e.description??"",{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}).height,"actorLabelHeight"),Tr=f(e=>Qt+fe+e+Xt,"actorStackHeight"),Wr=f((e,t,a)=>{let r=e+t,i=r-Xt-a/2;return{lifelineStartY:r,glyphBottomY:r-Xt-a-fe,labelCenterY:i}},"headerBands"),Kr=f((e,t)=>{let a=e+Xt,r=a+Qt;return{glyphTopY:a,glyphBottomY:r,labelCenterY:r+fe+t/2,stackHeight:Tr(t)}},"footerBands"),Rt=36,Hr=-5,pr=60,lr=pr-Hr,Bt=f((e,t,a,r)=>{if(t.look!=="neo")return null;let i=Vr(e,t);return a?Kr(r,i):Wr(r,e.height,i)},"neoBands"),gt="actor-top",xt="actor-bottom",Zt="actor-box",Ot="actor-man",ut=new Set(["redux-color","redux-dark-color"]),J=f((e,t)=>e?.length?e[t%e.length]:void 0,"paletteColor"),Mt=f(function(e,t){let a=nr(e,t);return Dt().look==="neo"&&a.attr("data-look","neo"),a},"drawRect"),Fr=f(function(e,t,a,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let c=t.links,s=t.actorCnt,n=t.rectData;var p="none";i&&(p="block !important");let d=e.append("g");d.attr("id","actor"+s+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",p);var E="";n.class!==void 0&&(E=" "+n.class);let u=n.width>a?n.width:a,_=d.append("rect");if(_.attr("class","actorPopupMenuPanel"+E),_.attr("x",n.x),_.attr("y",n.height),_.attr("fill",n.fill),_.attr("stroke",n.stroke),_.attr("width",u),_.attr("height",n.height),_.attr("rx",n.rx),_.attr("ry",n.ry),c!=null){var O=20;for(let h in c){var g=d.append("a"),y=(0,ue.sanitizeUrl)(c[h]);g.attr("xlink:href",y),g.attr("target","_blank"),Ta(r)(h,g,n.x+10,n.height+O,u,20,{class:"actor"},r),O+=30}}return _.attr("height",O),{height:n.height+O,width:u}},"drawPopup"),$t=f(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Jt=f(async function(e,t,a=null){let r=e.append("foreignObject"),i=await ce(t.text,Dt()),s=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(r.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),t.class==="noteText"){let n=e.node().firstChild;n.setAttribute("height",s.height+2*t.textMargin);let p=n.getBBox();r.attr("x",Math.round(p.x+p.width/2-s.width/2)).attr("y",Math.round(p.y+p.height/2-s.height/2))}else if(a){let{startx:n,stopx:p,starty:d}=a;if(n>p){let E=n;n=p,p=E}r.attr("x",Math.round(n+Math.abs(n-p)/2-s.width/2)),t.class==="loopText"?r.attr("y",Math.round(d)):r.attr("y",Math.round(d-s.height))}return[r]},"drawKatex"),Nt=f(function(e,t){let a=0,r=0,i=t.text.split(N.lineBreakRegex),[c,s]=he(t.fontSize),n=[],p=0,d=f(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":d=f(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":d=f(()=>Math.round(t.y+(a+r+t.textMargin)/2),"yfunc");break;case"bottom":case"end":d=f(()=>Math.round(t.y+(a+r+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[E,u]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&c!==void 0&&(p=E*c);let _=e.append("text");_.attr("x",t.x),_.attr("y",d()),t.anchor!==void 0&&_.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&_.style("font-family",t.fontFamily),s!==void 0&&_.style("font-size",s),t.fontWeight!==void 0&&_.style("font-weight",t.fontWeight),t.fill!==void 0&&_.attr("fill",t.fill),t.class!==void 0&&_.attr("class",t.class),t.dy!==void 0?_.attr("dy",t.dy):p!==0&&_.attr("dy",p);let O=u||ir;if(t.tspan){let g=_.append("tspan");g.attr("x",t.x),t.fill!==void 0&&g.attr("fill",t.fill),g.text(O)}else _.text(O);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(_._groups||_)[0][0].getBBox().height,a=r),n.push(_)}return n},"drawText"),Er=f(function(e,t){function a(i,c,s,n,p){return i+","+c+" "+(i+s)+","+c+" "+(i+s)+","+(c+n-p)+" "+(i+s-p*1.2)+","+(c+n)+" "+i+","+(c+n)}f(a,"genPoints");let r=e.append("polygon");return r.attr("points",a(t.x,t.y,t.width,t.height,7)),r.attr("class","labelBox"),t.y=t.y+t.height/2,Nt(e,t),r},"drawLabel"),Y=-1,ur=f((e,t,a,r)=>{e.select&&a.forEach(i=>{let c=t.get(i),s=e.select("#actor"+c.actorCnt);!r.mirrorActors&&c.stopy?s.attr("y2",c.stopy+c.height/2):r.mirrorActors&&s.attr("y2",c.stopy)})},"fixLifeLineHeights"),qr=f(function(e,t,a,r,i,c){let s=r?t.stopy:t.starty,n=t.x+t.width/2,p=s+t.height,{look:d,theme:E,themeVariables:u}=a,{bkgColorArray:_,borderColorArray:O}=u,g=e.append("g").lower();var y=g;r||(Y++,Object.keys(t.links||{}).length&&!a.forceMenus&&y.attr("onclick",$t(`actor${Y}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",p).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),y=g.append("g"),t.actorCnt=Y,t.links!=null&&y.attr("id","root-"+Y),d==="neo"&&y.attr("data-look","neo"));let h=Tt();var R="actor";t.properties?.class?R=t.properties.class:h.fill="#eaeaea",r?R+=` ${xt}`:R+=` ${gt}`,h.x=t.x,h.y=s,h.width=t.width,h.height=t.height,h.class=R,h.rx=3,h.ry=3,h.name=t.name,d==="neo"&&(h.rx=6,h.ry=6);let x=Mt(y,h),m=c.get(t.name)??0;if(ut.has(E)&&(x.style("stroke",J(O,m)),x.style("fill",J(_,m))),d==="neo"&&x.attr("filter",`url(#${bt(i)})`),t.rectData=h,t.properties?.icon){let L=t.properties.icon.trim();L.charAt(0)==="@"?zt(y,h.x+h.width-20,h.y+10,L.substr(1)):qt(y,h.x+h.width-20,h.y+10,L)}r||(y.attr("data-et","participant"),y.attr("data-type","participant"),y.attr("data-id",t.name)),ft(a,j(t.description))(t.description,y,h.x,h.y,h.width,h.height,{class:`actor ${Zt}`},a);let S=t.height;if(x.node){let L=x.node().getBBox();a.look!=="neo"&&(t.height=L.height,S=L.height)}return S},"drawActorTypeParticipant"),zr=f(function(e,t,a,r,i,c){let s=r?t.stopy:t.starty,n=t.x+t.width/2,p=s+t.height,{look:d,theme:E,themeVariables:u}=a,{bkgColorArray:_,borderColorArray:O}=u,g=e.append("g").lower();var y=g;r||(Y++,Object.keys(t.links||{}).length&&!a.forceMenus&&y.attr("onclick",$t(`actor${Y}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",p).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),y=g.append("g"),t.actorCnt=Y,t.links!=null&&y.attr("id","root-"+Y),d==="neo"&&y.attr("data-look","neo"));let h=Tt();var R="actor";t.properties?.class?R=t.properties.class:h.fill="#eaeaea",r?R+=` ${xt}`:R+=` ${gt}`,h.x=t.x,h.y=s,h.width=t.width,h.height=t.height,h.class=R,h.name=t.name;let x=6;a.look==="neo"&&(h.height=t.height-x);let m={...h,x:h.x+-x,y:h.y+ +x,class:"actor"},S=Mt(y,h),L=Mt(y,m);t.rectData=h,d==="neo"&&y.attr("filter",`url(#${bt(i)})`);let w=c.get(t.name)??0;if(ut.has(E)&&(S.style("stroke",J(O,w)),S.style("fill",J(_,w)),L.style("stroke",J(O,w)),L.style("fill",J(_,w))),t.properties?.icon){let B=t.properties.icon.trim();B.charAt(0)==="@"?zt(y,h.x+h.width-20,h.y+10,B.substr(1)):qt(y,h.x+h.width-20,h.y+10,B)}ft(a,j(t.description))(t.description,y,h.x-x,h.y+x,h.width,h.height,{class:`actor ${Zt}`},a);let P=t.height;if(S.node){let B=S.node().getBBox();a.look!=="neo"&&(t.height=B.height,P=B.height)}return r||(y.attr("data-et","participant"),y.attr("data-type","collections"),y.attr("data-id",t.name)),P},"drawActorTypeCollections"),Ur=f(function(e,t,a,r,i,c){let s=r?t.stopy:t.starty,n=t.x+t.width/2,p=s+t.height,{look:d,theme:E,themeVariables:u}=a,{bkgColorArray:_,borderColorArray:O}=u,g=e.append("g").lower(),y=g;r||(Y++,Object.keys(t.links||{}).length&&!a.forceMenus&&y.attr("onclick",$t(`actor${Y}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",p).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),y=g.append("g"),t.actorCnt=Y,t.links!=null&&y.attr("id","root-"+Y),d==="neo"&&y.attr("data-look","neo"));let h=Tt(),R="actor";t.properties?.class?R=t.properties.class:h.fill="#eaeaea",r?R+=` ${xt}`:R+=` ${gt}`,y.attr("class",R),h.x=t.x,h.y=s,h.width=t.width,h.height=t.height,h.name=t.name;let x=h.height/2,m=x/(2.5+h.height/50),S=y.append("g"),L=y.append("g"),w=`M ${h.x},${h.y+x}
|
|
157
|
+
a ${m},${x} 0 0 0 0,${h.height}
|
|
158
|
+
h ${h.width-2*m}
|
|
159
|
+
a ${m},${x} 0 0 0 0,-${h.height}
|
|
160
|
+
Z
|
|
161
|
+
`;S.append("path").attr("d",w),L.append("path").attr("d",`M ${h.x},${h.y+x}
|
|
162
|
+
a ${m},${x} 0 0 0 0,${h.height}`),S.attr("transform",`translate(${m}, ${-(h.height/2)})`),L.attr("transform",`translate(${h.width-m}, ${-h.height/2})`),t.rectData=h,d==="neo"&&S.attr("filter",`url(#${bt(i)})`);let P=c.get(t.name)??0;if(ut.has(E)&&(S.style("stroke",J(O,P)),S.style("fill",J(_,P)),L.style("stroke",J(O,P)),L.style("fill",J(_,P))),t.properties?.icon){let K=t.properties.icon.trim(),U=h.x+h.width-20,X=h.y+10;K.charAt(0)==="@"?zt(y,U,X,K.substr(1)):qt(y,U,X,K)}ft(a,j(t.description))(t.description,y,h.x,h.y,h.width,h.height,{class:`actor ${Zt}`},a);let B=t.height,V=S.select("path:last-child");if(V.node()){let K=V.node().getBBox();a.look!=="neo"&&(t.height=K.height,B=K.height)}return r||(y.attr("data-et","participant"),y.attr("data-type","queue"),y.attr("data-id",t.name)),B},"drawActorTypeQueue"),Gr=f(function(e,t,a,r,i,c){let s=r?t.stopy:t.starty,n=t.x+t.width/2,p=Bt(t,a,r,s),d=p?p.lifelineStartY:s+75,{look:E,theme:u,themeVariables:_}=a,{bkgColorArray:O,borderColorArray:g,actorBorder:y,actorBkg:h}=_,R=e.append("g").lower();r||(Y++,R.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",d).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Y);let x=e.append("g"),m=Ot;r?m+=` ${xt}`:m+=` ${gt}`,x.attr("class",m),x.attr("name",t.name);let S=Tt();S.x=t.x,S.y=s,S.fill="#eaeaea",S.width=t.width,S.height=t.height,S.class="actor";let L=t.x+t.width/2,w=p?p.glyphBottomY-22:s+32,P=22;x.append("defs").append("marker").attr("id",i+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),x.append("circle").attr("cx",L).attr("cy",w).attr("r",P).attr("filter",`${E==="neo"?`url(#${bt(i)})`:""}`),x.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform",`translate(${L}, ${w-P})`);let B=c.get(t.name)??0;if(ut.has(u)?(x.style("stroke",J(g,B)),x.style("fill",J(O,B))):(x.style("stroke",y),x.style("fill",h)),!p){let V=x.node().getBBox();t.height=V.height+2*(a?.sequence?.labelBoxHeight??0)}return ft(a,j(t.description))(t.description,x,S.x,p?p.labelCenterY-S.height/2:S.y+P+(r?5:12),S.width,S.height,{class:`actor ${Ot}`},a),r||(x.attr("data-et","participant"),x.attr("data-type","control"),x.attr("data-id",t.name)),t.height},"drawActorTypeControl"),Xr=f(function(e,t,a,r,i,c){let s=r?t.stopy:t.starty,n=t.x+t.width/2,p=Bt(t,a,r,s),d=p?p.lifelineStartY:s+75,{look:E,theme:u,themeVariables:_}=a,{bkgColorArray:O,borderColorArray:g}=_,y=e.append("g").lower(),h=e.append("g"),R="actor";r?R+=` ${xt}`:R+=` ${gt}`,h.attr("class",R),h.attr("name",t.name);let x=Tt();x.x=t.x,x.y=s,x.fill="#eaeaea",x.width=t.width,x.height=t.height,x.class="actor";let m=t.x+t.width/2,S=p?p.glyphBottomY-22:s+(r?10:25),L=22;h.append("circle").attr("cx",m).attr("cy",S).attr("r",L).attr("width",t.width).attr("height",t.height),h.append("line").attr("x1",m-L).attr("x2",m+L).attr("y1",S+L).attr("y2",S+L).attr("stroke-width",2),E==="neo"&&h.attr("filter",`url(#${bt(i)})`);let w=c.get(t.name)??0;if(ut.has(u)&&(h.style("stroke",J(g,w)),h.style("fill",J(O,w))),!p){let P=h.node().getBBox();t.height=P.height+(a?.sequence?.labelBoxHeight??0)}return r||(Y++,y.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",d).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Y),ft(a,j(t.description))(t.description,h,x.x,p?p.labelCenterY-x.height/2:x.y+(r?15:30),x.width,x.height,{class:`actor ${Ot}`},a),p||h.attr("transform",`translate(0, ${r?L:L/2-5})`),r||(h.attr("data-et","participant"),h.attr("data-type","entity"),h.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),Jr=f(function(e,t,a,r,i,c){let s=r?t.stopy:t.starty,n=t.x+t.width/2,p=Bt(t,a,r,s),d=p?p.lifelineStartY:s+t.height+2*a.boxTextMargin,{theme:E,themeVariables:u,look:_}=a,{bkgColorArray:O,borderColorArray:g,actorBorder:y}=u,h=e.append("g").lower(),R=h;r||(Y++,Object.keys(t.links||{}).length&&!a.forceMenus&&R.attr("onclick",$t(`actor${Y}_popup`)).attr("cursor","pointer"),R.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",d).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),R=h.append("g"),t.actorCnt=Y,t.links!=null&&R.attr("id","root-"+Y),_==="neo"&&R.attr("data-look","neo"));let x=Tt(),m="actor";t.properties?.class?m=t.properties.class:x.fill="#eaeaea",r?m+=` ${xt}`:m+=` ${gt}`,x.x=t.x,x.y=s,x.width=t.width,x.height=t.height,x.class=m,x.name=t.name,x.x=t.x,x.y=s;let S=x.width/3,L=S/2,w=L/(2.5+S/50),P=p?Qt:x.width/3,B=p?p.glyphBottomY-P-w:x.y,V=R.append("g");V.attr("class",m);let K=`
|
|
163
|
+
M ${x.x},${B+w}
|
|
164
|
+
a ${L},${w} 0 0 0 ${S},0
|
|
165
|
+
a ${L},${w} 0 0 0 -${S},0
|
|
166
|
+
l 0,${P-2*w}
|
|
167
|
+
a ${L},${w} 0 0 0 ${S},0
|
|
168
|
+
l 0,-${P-2*w}
|
|
169
|
+
`;V.append("path").attr("d",K),_==="neo"&&V.attr("filter",`url(#${bt(i)})`);let U=c.get(t.name)??0;if(ut.has(E)?(V.style("stroke",J(g,U)),V.style("fill",J(O,U))):V.style("stroke",y),V.attr("transform",`translate(${S}, ${w})`),t.rectData=x,ft(a,j(t.description))(t.description,R,x.x,p?p.labelCenterY-x.height/2:x.y+35,x.width,x.height,{class:`actor ${Zt}`},a),!p){let X=V.select("path:last-child");if(X.node()){let at=X.node().getBBox();t.height=at.height+(a.sequence.labelBoxHeight??0)}}return r||(R.attr("data-et","participant"),R.attr("data-type","database"),R.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),Qr=f(function(e,t,a,r,i,c){let s=r?t.stopy:t.starty,n=t.x+t.width/2,p=Bt(t,a,r,s),d=p?p.lifelineStartY:s+80,E=22,u=p?p.glyphBottomY-E:s+12,_=e.append("g").lower(),{look:O,theme:g,themeVariables:y}=a,{bkgColorArray:h,borderColorArray:R,actorBorder:x}=y;r||(Y++,_.append("line").attr("id","actor"+Y).attr("x1",n).attr("y1",d).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Y);let m=e.append("g"),S=Ot;r?S+=` ${xt}`:S+=` ${gt}`,m.attr("class",S),m.attr("name",t.name);let L=Tt();L.x=t.x,L.y=s,L.fill="#eaeaea",L.width=t.width,L.height=t.height,L.class="actor",m.append("line").attr("id","actor-man-torso"+Y).attr("x1",t.x+t.width/2-E*2.5).attr("y1",u).attr("x2",t.x+t.width/2-15).attr("y2",u),m.append("line").attr("id","actor-man-arms"+Y).attr("x1",t.x+t.width/2-E*2.5).attr("y1",u-10).attr("x2",t.x+t.width/2-E*2.5).attr("y2",u+10),m.append("circle").attr("cx",t.x+t.width/2).attr("cy",u).attr("r",E),O==="neo"&&m.attr("filter",`url(#${bt(i)})`);let w=c.get(t.name)??0;if(ut.has(g)?(m.style("stroke",J(R,w)),m.style("fill",J(h,w))):m.style("stroke",x),!p){let P=m.node().getBBox();t.height=P.height+(a.sequence.labelBoxHeight??0)}return ft(a,j(t.description))(t.description,m,L.x,p?p.labelCenterY-L.height/2:L.y+15,L.width,L.height,{class:`actor ${Ot}`},a),p||m.attr("transform",`translate(0,${E/2+10})`),r||(m.attr("data-et","participant"),m.attr("data-type","boundary"),m.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),Zr=f(function(e,t,a,r,i){let c=r?t.stopy:t.starty,s=t.x+t.width/2,n=Bt(t,a,r,c),p=n?n.lifelineStartY:c+80,{theme:d,themeVariables:E}=a,{bkgColorArray:u,borderColorArray:_,actorBorder:O}=E,g=e.append("g").lower();r||(Y++,g.append("line").attr("id","actor"+Y).attr("x1",s).attr("y1",p).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Y);let y=e.append("g"),h=Ot;r?h+=` ${xt}`:h+=` ${gt}`,y.attr("class",h),y.attr("name",t.name),r||y.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);let R=n?Qt/lr:1,x=f(P=>n?n.glyphBottomY-(pr-P)*R:c+P,"gy"),m=f(P=>s+P*R,"gx");y.append("line").attr("id","actor-man-torso"+Y).attr("x1",s).attr("y1",x(25)).attr("x2",s).attr("y2",x(45)),y.append("line").attr("id","actor-man-arms"+Y).attr("x1",m(-Rt/2)).attr("y1",x(33)).attr("x2",m(Rt/2)).attr("y2",x(33)),y.append("line").attr("x1",m(-Rt/2)).attr("y1",x(60)).attr("x2",s).attr("y2",x(45)),y.append("line").attr("x1",s).attr("y1",x(45)).attr("x2",m(Rt/2-2)).attr("y2",x(60));let S=y.append("circle");S.attr("cx",t.x+t.width/2),S.attr("cy",x(10)),S.attr("r",15*R),S.attr("width",t.width),S.attr("height",t.height),n||(t.height=lr);let L=Tt();L.x=t.x,L.y=c,L.fill="#eaeaea",L.width=t.width,L.height=t.height,L.class="actor",L.rx=3,L.ry=3;let w=i.get(t.name)??0;return ut.has(d)?(y.style("stroke",J(_,w)),y.style("fill",J(u,w))):y.style("stroke",O),ft(a,j(t.description))(t.description,y,L.x,n?n.labelCenterY-L.height/2:c+35,L.width,L.height,{class:`actor ${Ot}`},a),t.height},"drawActorTypeActor"),$r=f(async function(e,t,a,r,i,c,s){let n=s??new Map([...c.db.getActors().values()].map((p,d)=>[p.name,d]));switch(t.type){case"actor":return await Zr(e,t,a,r,n);case"participant":return await qr(e,t,a,r,i,n);case"boundary":return await Qr(e,t,a,r,i,n);case"control":return await Gr(e,t,a,r,i,n);case"entity":return await Xr(e,t,a,r,i,n);case"database":return await Jr(e,t,a,r,i,n);case"collections":return await zr(e,t,a,r,i,n);case"queue":return await Ur(e,t,a,r,i,n)}},"drawActor"),jr=f(function(e,t,a){let i=e.append("g");fr(i,t),t.name&&ft(a)(t.name,i,t.x,t.y+a.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},a),i.lower()},"drawBox"),ta=f(function(e){return e.append("g")},"anchorElement"),ea=f(function(e,t,a,r,i,c,s){let{theme:n,themeVariables:p}=r,{bkgColorArray:d,borderColorArray:E,mainBkg:u}=p,_=Tt(),O=t.anchored,g=t.actor;_.x=t.startx,_.y=t.starty,_.class="activation"+i%3,_.width=t.stopx-t.startx,_.height=a-t.starty;let y=Mt(O,_),R=(s??new Map([...c.db.getActors().values()].map((x,m)=>[x.name,m]))).get(g)??0;ut.has(n)&&(y.style("stroke",J(E,R)),y.style("fill",J(d,R)??u))},"drawActivation"),ra=f(async function(e,t,a,r,i){let{boxMargin:c,boxTextMargin:s,labelBoxHeight:n,labelBoxWidth:p,messageFontFamily:d,messageFontSize:E,messageFontWeight:u}=r,_=e.append("g").attr("data-et","control-structure").attr("data-id","i"+i.id),O=f(function(h,R,x,m){return _.append("line").attr("x1",h).attr("y1",R).attr("x2",x).attr("y2",m).attr("class","loopLine")},"drawLoopLine");O(t.startx,t.starty,t.stopx,t.starty),O(t.stopx,t.starty,t.stopx,t.stopy),O(t.startx,t.stopy,t.stopx,t.stopy),O(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(h){O(t.startx,h.y,t.stopx,h.y).style("stroke-dasharray","3, 3")});let g=Ut();g.text=a,g.x=t.startx,g.y=t.starty,g.fontFamily=d,g.fontSize=E,g.fontWeight=u,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=Math.max(p??0,50),g.height=n+(r.look==="neo"?15:0)||20,g.textMargin=s,g.class="labelText",Er(_,g),g=_r(),g.text=t.title,g.x=t.startx+p/2+(t.stopx-t.startx)/2,g.y=t.starty+c+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=d,g.fontSize=E,g.fontWeight=u,g.wrap=!0;let y=j(g.text)?await Jt(_,g,t):Nt(_,g);if(t.sectionTitles!==void 0){for(let[h,R]of Object.entries(t.sectionTitles))if(R.message){g.text=R.message,g.x=t.startx+(t.stopx-t.startx)/2,g.y=t.sections[h].y+c+s,g.class="sectionTitle",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=d,g.fontSize=E,g.fontWeight=u,g.wrap=t.wrap,j(g.text)?(t.starty=t.sections[h].y,await Jt(_,g,t)):Nt(_,g);let x=Math.round(y.map(m=>(m._groups||m)[0][0].getBBox().height).reduce((m,S)=>m+S));t.sections[h].height+=x-(c+s)}}return t.height=Math.round(t.stopy-t.starty),_},"drawLoop"),fr=f(function(e,t){or(e,t)},"drawBackgroundRect"),aa=f(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),sa=f(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),ia=f(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),na=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),oa=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),ca=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),la=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),bt=f(e=>e?`${e}-drop-shadow`:"drop-shadow","dropShadowId"),ha=f(function(e,t,a){let{theme:r}=t;e.append("defs").append("filter").attr("id",bt(a)).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${r==="redux"||r==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),_r=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"),da=f(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),ft=(function(){function e(c,s,n,p,d,E,u){let _=s.append("text").attr("x",n+d/2).attr("y",p+E/2+5).style("text-anchor","middle").text(c);i(_,u)}f(e,"byText");function t(c,s,n,p,d,E,u,_){let{actorFontSize:O,actorFontFamily:g,actorFontWeight:y}=_,[h,R]=he(O),x=c.split(N.lineBreakRegex);for(let m=0;m<x.length;m++){let S=m*h-h*(x.length-1)/2,L=s.append("text").attr("x",n+d/2).attr("y",p).style("text-anchor","middle").style("font-size",R).style("font-weight",y).style("font-family",g);L.append("tspan").attr("x",n+d/2).attr("dy",S).text(x[m]),L.attr("y",p+E/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(L,u)}}f(t,"byTspan");function a(c,s,n,p,d,E,u,_){let O=s.append("switch"),y=O.append("foreignObject").attr("x",n).attr("y",p).attr("width",d).attr("height",E).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(c),t(c,O,n,p,d,E,u,_),i(y,u)}f(a,"byFo");async function r(c,s,n,p,d,E,u,_){let O=await At(c,Dt()),g=s.append("switch"),h=g.append("foreignObject").attr("x",n+d/2-O.width/2).attr("y",p+E/2-O.height/2).attr("width",O.width).attr("height",O.height).append("xhtml:div").style("height","100%").style("width","100%");h.append("div").style("text-align","center").style("vertical-align","middle").html(await ce(c,Dt())),t(c,g,n,p,d,E,u,_),i(h,u)}f(r,"byKatex");function i(c,s){for(let n in s)s.hasOwnProperty(n)&&c.attr(n,s[n])}return f(i,"_setTextAttrs"),function(c,s=!1){return s?r:c.textPlacement==="fo"?a:c.textPlacement==="old"?e:t}})(),Ta=(function(){function e(i,c,s,n,p,d,E){let u=c.append("text").attr("x",s).attr("y",n).style("text-anchor","start").text(i);r(u,E)}f(e,"byText");function t(i,c,s,n,p,d,E,u){let{actorFontSize:_,actorFontFamily:O,actorFontWeight:g}=u,y=i.split(N.lineBreakRegex);for(let h=0;h<y.length;h++){let R=h*_-_*(y.length-1)/2,x=c.append("text").attr("x",s).attr("y",n).style("text-anchor","start").style("font-size",_).style("font-weight",g).style("font-family",O);x.append("tspan").attr("x",s).attr("dy",R).text(y[h]),x.attr("y",n+d/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(x,E)}}f(t,"byTspan");function a(i,c,s,n,p,d,E,u){let _=c.append("switch"),g=_.append("foreignObject").attr("x",s).attr("y",n).attr("width",p).attr("height",d).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,_,s,n,p,d,E,u),r(g,E)}f(a,"byFo");function r(i,c){for(let s in c)c.hasOwnProperty(s)&&i.attr(s,c[s])}return f(r,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?a:i.textPlacement==="old"?e:t}})(),pa=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),Ea=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),ua=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),fa=f(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),z={drawRect:Mt,drawText:Nt,drawLabel:Er,drawActor:$r,drawBox:jr,drawPopup:Fr,anchorElement:ta,drawActivation:ea,drawLoop:ra,drawBackgroundRect:fr,insertArrowHead:na,insertArrowFilledHead:oa,insertSequenceNumber:ca,insertArrowCrossHead:la,insertDatabaseIcon:aa,insertComputerIcon:sa,insertClockIcon:ia,getTextObj:_r,getNoteRect:da,fixLifeLineHeights:ur,sanitizeUrl:ue.sanitizeUrl,insertDropShadow:ha,insertSolidTopArrowHead:pa,insertSolidBottomArrowHead:Ea,insertStickTopArrowHead:ua,insertStickBottomArrowHead:fa},l={},I={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,br(tt())},"init"),updateVal:f(function(e,t,a,r){e[t]===void 0?e[t]=a:e[t]=r(a,e[t])},"updateVal"),updateBounds:f(function(e,t,a,r){let i=this,c=0;function s(n){return f(function(d){c++;let E=i.sequenceItems.length-c+1;i.updateVal(d,"starty",t-E*l.boxMargin,Math.min),i.updateVal(d,"stopy",r+E*l.boxMargin,Math.max),i.updateVal(I.data,"startx",e-E*l.boxMargin,Math.min),i.updateVal(I.data,"stopx",a+E*l.boxMargin,Math.max),n!=="activation"&&(i.updateVal(d,"startx",e-E*l.boxMargin,Math.min),i.updateVal(d,"stopx",a+E*l.boxMargin,Math.max),i.updateVal(I.data,"starty",t-E*l.boxMargin,Math.min),i.updateVal(I.data,"stopy",r+E*l.boxMargin,Math.max))},"updateItemBounds")}f(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:f(function(e,t,a,r){let i=N.getMin(e,a),c=N.getMax(e,a),s=N.getMin(t,r),n=N.getMax(t,r);this.updateVal(I.data,"startx",i,Math.min),this.updateVal(I.data,"starty",s,Math.min),this.updateVal(I.data,"stopx",c,Math.max),this.updateVal(I.data,"stopy",n,Math.max),this.updateBounds(i,s,c,n)},"insert"),newActivation:f(function(e,t,a){let r=a.get(e.from),i=jt(e.from).length||0,c=r.x+r.width/2+(i-1)*l.activationWidth/2;this.activations.push({startx:c,starty:this.verticalPos+2,stopx:c+l.activationWidth,stopy:void 0,actor:e.from,anchored:z.anchorElement(t)})},"newActivation"),endActivation:f(function(e){let t=this.activations.map(function(a){return a.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){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:I.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=N.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")},_a=f(async function(e,t,a){I.bumpVerticalPos(l.boxMargin),t.height=l.boxMargin,t.starty=I.getVerticalPos();let r=Tt();r.x=t.startx,r.y=t.starty,r.width=t.width||l.width,r.class="note";let i=e.append("g");i.attr("data-et","note"),i.attr("data-id","i"+a);let c=z.drawRect(i,r),s=Ut();s.x=t.startx,s.y=t.starty,s.width=r.width,s.dy="1em",s.text=t.message,s.class="noteText",s.fontFamily=l.noteFontFamily,s.fontSize=l.noteFontSize,s.fontWeight=l.noteFontWeight,s.anchor=l.noteAlign,s.textMargin=l.noteMargin,s.valign="center";let n=j(s.text)?await Jt(i,s):Nt(i,s),p=Math.round(n.map(d=>(d._groups||d)[0][0].getBBox().height).reduce((d,E)=>d+E));c.attr("height",p+2*l.noteMargin),t.height+=p+2*l.noteMargin,I.bumpVerticalPos(p+2*l.noteMargin),t.stopy=t.starty+p+2*l.noteMargin,t.stopx=t.startx+r.width,I.insert(t.startx,t.starty,t.stopx,t.stopy),I.models.addNote(t)},"drawNote"),hr=f(function(e,t,a,r,i,c,s){let n=r.db.getActors(),p=n.get(t.from),d=n.get(t.to),E=a.sequenceVisible,u=p.x+p.width/2,_=d.x+d.width/2,O=u<=_,g=Or(t,r),y=e.append("g"),h=16.5,R=f((w,P)=>{let B=w?h:-h;return P?-B:B},"getCircleOffset"),x=f(w=>{y.append("circle").attr("cx",w).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:m,CENTRAL_CONNECTION_REVERSE:S,CENTRAL_CONNECTION_DUAL:L}=r.db.LINETYPE;if(E)switch(t.centralConnection){case m:g&&(_+=R(O,!0));break;case S:g||(u+=R(O,!1));break;case L:g?_+=R(O,!0):u+=R(O,!1);break}switch(t.centralConnection){case m:x(_);break;case S:x(u);break;case L:x(u),x(_);break}},"drawCentralConnection"),Lt=f(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),kt=f(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),pe=f(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function gr(e,t){I.bumpVerticalPos(10);let{startx:a,stopx:r,message:i}=t,c=N.splitBreaks(i).length,s=j(i),n=s?await At(i,tt()):Z.calculateTextDimensions(i,Lt(l));if(!s){let u=n.height/c;t.height+=u,I.bumpVerticalPos(u)}let p,d=n.height-10,E=n.width;if(a===r){p=I.getVerticalPos()+d,l.rightAngles||(d+=l.boxMargin,p=I.getVerticalPos()+d),d+=30;let u=N.getMax(E/2,l.width/2);I.insert(a-u,I.getVerticalPos()-10+d,r+u,I.getVerticalPos()+30+d)}else d+=l.boxMargin,p=I.getVerticalPos()+d,I.insert(a,p-10,r,p);return I.bumpVerticalPos(d),t.height+=d,t.stopy=t.starty+t.height,I.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),p}f(gr,"boundMessage");var ga=f(async function(e,t,a,r,i,c){let{startx:s,stopx:n,starty:p,message:d,type:E,sequenceIndex:u,sequenceVisible:_}=t,O=Z.calculateTextDimensions(d,Lt(l)),g=Ut();g.x=Math.min(s,n),g.y=p+10,g.width=Math.abs(n-s),g.class="messageText",g.dy="1em",g.text=d,g.fontFamily=l.messageFontFamily,g.fontSize=l.messageFontSize,g.fontWeight=l.messageFontWeight,g.anchor=l.messageAlign,g.valign="center",g.textMargin=l.wrapPadding,g.tspan=!1,j(g.text)?await Jt(e,g,{startx:s,stopx:n,starty:a}):Nt(e,g);let y=O.width,h;if(s===n){let x=_||l.showSequenceNumbers,m=Or(i,r),S=ma(i,r),L=s+(x&&(m||S)?10:0);l.rightAngles?h=e.append("path").attr("d",`M ${L},${a} H ${s+N.getMax(l.width/2,y/2)} V ${a+25} H ${s}`):h=e.append("path").attr("d","M "+L+","+a+" C "+(L+60)+","+(a-10)+" "+(s+60)+","+(a+30)+" "+s+","+(a+20)),de(i,r)&&hr(e,i,t,r,s,n,a)}else h=e.append("line"),h.attr("x1",s),h.attr("y1",a),h.attr("x2",n),h.attr("y2",a),de(i,r)&&hr(e,i,t,r,s,n,a);E===r.db.LINETYPE.DOTTED||E===r.db.LINETYPE.DOTTED_CROSS||E===r.db.LINETYPE.DOTTED_POINT||E===r.db.LINETYPE.DOTTED_OPEN||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||E===r.db.LINETYPE.SOLID_TOP_DOTTED||E===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||E===r.db.LINETYPE.STICK_TOP_DOTTED||E===r.db.LINETYPE.STICK_BOTTOM_DOTTED||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(h.style("stroke-dasharray","3, 3"),h.attr("class","messageLine1")):h.attr("class","messageLine0"),h.attr("data-et","message"),h.attr("data-id","i"+t.id),h.attr("data-from",t.from),h.attr("data-to",t.to);let R="";if(l.arrowMarkerAbsolute&&(R=Xe(!0)),h.attr("stroke-width",2),h.attr("stroke","none"),h.style("fill","none"),(E===r.db.LINETYPE.SOLID_TOP||E===r.db.LINETYPE.SOLID_TOP_DOTTED)&&h.attr("marker-end","url("+R+"#"+c+"-solidTopArrowHead)"),(E===r.db.LINETYPE.SOLID_BOTTOM||E===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&h.attr("marker-end","url("+R+"#"+c+"-solidBottomArrowHead)"),(E===r.db.LINETYPE.STICK_TOP||E===r.db.LINETYPE.STICK_TOP_DOTTED)&&h.attr("marker-end","url("+R+"#"+c+"-stickTopArrowHead)"),(E===r.db.LINETYPE.STICK_BOTTOM||E===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&h.attr("marker-end","url("+R+"#"+c+"-stickBottomArrowHead)"),(E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&h.attr("marker-start","url("+R+"#"+c+"-solidBottomArrowHead)"),(E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&h.attr("marker-start","url("+R+"#"+c+"-solidTopArrowHead)"),(E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&h.attr("marker-start","url("+R+"#"+c+"-stickBottomArrowHead)"),(E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&h.attr("marker-start","url("+R+"#"+c+"-stickTopArrowHead)"),(E===r.db.LINETYPE.SOLID||E===r.db.LINETYPE.DOTTED)&&h.attr("marker-end","url("+R+"#"+c+"-arrowhead)"),(E===r.db.LINETYPE.BIDIRECTIONAL_SOLID||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(h.attr("marker-start","url("+R+"#"+c+"-arrowhead)"),h.attr("marker-end","url("+R+"#"+c+"-arrowhead)")),(E===r.db.LINETYPE.SOLID_POINT||E===r.db.LINETYPE.DOTTED_POINT)&&h.attr("marker-end","url("+R+"#"+c+"-filled-head)"),(E===r.db.LINETYPE.SOLID_CROSS||E===r.db.LINETYPE.DOTTED_CROSS)&&h.attr("marker-end","url("+R+"#"+c+"-crosshead)"),_||l.showSequenceNumbers){let x=E===r.db.LINETYPE.BIDIRECTIONAL_SOLID||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,m=E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,S=6,L=de(i,r),w=s,P=n;x?(s<n?w=s+S*2:(w=s-S+(L?-5:0),w+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),h.attr("x1",w)):m?(n>s?P=n-2*S:(P=n-S,w+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),P+=L?15:0,h.attr("x2",P),h.attr("x1",w)):h.attr("x1",s+S);let B=0,V=s===n,K=s<=n;V?B=t.fromBounds+1:m?B=K?t.toBounds-1:t.fromBounds+1:B=K?t.fromBounds+1:t.toBounds-1;let U="12px",X=u.toString().length;X>5?U="7px":X>3&&(U="9px"),e.append("line").attr("x1",B).attr("y1",a).attr("x2",B).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+R+"#"+c+"-sequencenumber)"),e.append("text").attr("x",B).attr("y",a+4).attr("font-family","sans-serif").attr("font-size",U).attr("text-anchor","middle").attr("class","sequenceNumber").text(u)}},"drawMessage"),xa=f(function(e,t,a,r,i,c,s){let n=0,p=0,d,E=0;for(let u of r){let _=t.get(u),O=_.box;d&&d!=O&&(s||I.models.addBox(d),p+=l.boxMargin+d.margin),O&&O!=d&&(s||(O.x=n+p,O.y=i),p+=O.margin),_.width=N.getMax(_.width||l.width,l.width),_.height=N.getMax(_.height||l.height,l.height),_.margin=_.margin||l.actorMargin,E=N.getMax(E,_.height),a.get(_.name)&&(p+=_.width/2),_.x=n+p,_.starty=I.getVerticalPos(),I.insert(_.x,i,_.x+_.width,_.height),n+=_.width+p,_.box&&(_.box.width=n+O.margin-_.box.x),p=_.margin,d=_.box,I.models.addActor(_)}d&&!s&&I.models.addBox(d),I.bumpVerticalPos(E)},"addActorRenderingData"),Ee=f(async function(e,t,a,r,i,c,s){if(r){let n=0;I.bumpVerticalPos(l.boxMargin*2);for(let p of a){let d=t.get(p);d.stopy||(d.stopy=I.getVerticalPos());let E=await z.drawActor(e,d,l,!0,i,c,s);n=N.getMax(n,E)}I.bumpVerticalPos(n+l.boxMargin)}else for(let n of a){let p=t.get(n);await z.drawActor(e,p,l,!1,i,c,s)}},"drawActors"),xr=f(function(e,t,a,r){let i=0,c=0;for(let s of a){let n=t.get(s),p=Ia(n),d=z.drawPopup(e,n,p,l,l.forceMenus,r);d.height>i&&(i=d.height),d.width+n.x>c&&(c=d.width+n.x)}return{maxHeight:i,maxWidth:c}},"drawActorsPopup"),br=f(function(e){Ge(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"),jt=f(function(e){return I.activations.filter(function(t){return t.actor===e})},"actorActivations"),dr=f(function(e,t){let a=t.get(e),r=jt(e),i=r.reduce(function(s,n){return N.getMin(s,n.startx)},a.x+a.width/2-1),c=r.reduce(function(s,n){return N.getMax(s,n.stopx)},a.x+a.width/2+1);return[i,c]},"activationBounds");function pt(e,t,a,r,i){I.bumpVerticalPos(a);let c=r;if(t.id&&t.message&&e[t.id]){let s=e[t.id].width,n=Lt(l);t.message=Z.wrapLabel(`[${t.message}]`,s-2*l.wrapPadding,n),t.width=s,t.wrap=!0;let p=Z.calculateTextDimensions(t.message,n),d=N.getMax(p.height,l.labelBoxHeight);c=r+d,rt.debug(`${d} - ${t.message}`)}i(t),I.bumpVerticalPos(c)}f(pt,"adjustLoopHeightForWrap");function Ir(e,t,a,r,i,c,s){function n(E,u){E.x<i.get(e.from).x?(I.insert(t.stopx-u,t.starty,t.startx,t.stopy+E.height/2+l.noteMargin),t.stopx=t.stopx+u):(I.insert(t.startx,t.starty,t.stopx+u,t.stopy+E.height/2+l.noteMargin),t.stopx=t.stopx-u)}f(n,"receiverAdjustment");function p(E,u){E.x<i.get(e.to).x?(I.insert(t.startx-u,t.starty,t.stopx,t.stopy+E.height/2+l.noteMargin),t.startx=t.startx+u):(I.insert(t.stopx,t.starty,t.startx+u,t.stopy+E.height/2+l.noteMargin),t.startx=t.startx-u)}f(p,"senderAdjustment");let d=[Gt.ACTOR,Gt.CONTROL,Gt.ENTITY,Gt.DATABASE];if(c.get(e.to)==r){let E=i.get(e.to),u=d.includes(E.type)?Rt/2+3:E.width/2+3;n(E,u),E.starty=a-E.height/2,I.bumpVerticalPos(E.height/2)}else if(s.get(e.from)==r){let E=i.get(e.from);if(l.mirrorActors){let u=d.includes(E.type)?Rt/2:E.width/2;p(E,u)}E.stopy=a-E.height/2,I.bumpVerticalPos(E.height/2)}else if(s.get(e.to)==r){let E=i.get(e.to);if(l.mirrorActors){let u=d.includes(E.type)?Rt/2+3:E.width/2+3;n(E,u)}E.stopy=a-E.height/2,I.bumpVerticalPos(E.height/2)}}f(Ir,"adjustCreatedDestroyedData");var ba=f(async function(e,t,a,r){let{securityLevel:i,sequence:c,look:s,themeVariables:n}=tt();l=c;let p;i==="sandbox"&&(p=Ct("#i"+t));let d=i==="sandbox"?Ct(p.nodes()[0].contentDocument.body):Ct("body"),E=i==="sandbox"?p.nodes()[0].contentDocument:document;I.init(),rt.debug(r.db);let u=i==="sandbox"?d.select(`[id="${t}"]`):Ct(`[id="${t}"]`),_=r.db.getActors(),O=r.db.getCreatedActors(),g=r.db.getDestroyedActors(),y=r.db.getBoxes(),h=r.db.getActorKeys(),R=r.db.getMessages(),x=r.db.getDiagramTitle(),m=r.db.hasAtLeastOneBox(),S=r.db.hasAtLeastOneBoxWithTitle(),L=await yr(_,R,r);if(l.height=await Rr(_,L,y),z.insertComputerIcon(u,t),z.insertDatabaseIcon(u,t),z.insertClockIcon(u,t),m&&(I.bumpVerticalPos(l.boxMargin),S&&I.bumpVerticalPos(y[0].textMaxHeight)),l.hideUnusedParticipants===!0){let A=new Set;R.forEach(v=>{A.add(v.from),A.add(v.to)}),h=h.filter(v=>A.has(v))}let w=new Map(h.map((A,v)=>[_.get(A)?.name??A,v]));xa(u,_,O,h,0,R,!1);let P=await Aa(R,_,L,r);z.insertArrowHead(u,t),z.insertArrowCrossHead(u,t),z.insertArrowFilledHead(u,t),z.insertSequenceNumber(u,t),z.insertSolidTopArrowHead(u,t),z.insertSolidBottomArrowHead(u,t),z.insertStickTopArrowHead(u,t),z.insertStickBottomArrowHead(u,t),s==="neo"&&z.insertDropShadow(u,l,t);function B(A,v){let dt=I.endActivation(A);dt.starty+18>v&&(dt.starty=v-6,v+=12),z.drawActivation(u,dt,v,l,jt(A.from).length,r,w),I.insert(dt.startx,v-10,dt.stopx,v)}f(B,"activeEnd");let V=1,K=1,U=[],X=[],at=0;for(let A of R){let v,dt,nt;switch(A.type){case r.db.LINETYPE.NOTE:I.resetVerticalPos(),dt=A.noteModel,await _a(u,dt,A.id);break;case r.db.LINETYPE.ACTIVE_START:I.newActivation(A,u,_);break;case r.db.LINETYPE.CENTRAL_CONNECTION:I.newActivation(A,u,_);break;case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:I.newActivation(A,u,_);break;case r.db.LINETYPE.ACTIVE_END:B(A,I.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:pt(P,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.LOOP_END:v=I.endLoop(),await z.drawLoop(u,v,"loop",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.RECT_START:pt(P,A,l.boxMargin,l.boxMargin,H=>{let mt=H.message;mt||(mt=n?.rectBkgColor||n?.actorBkg||"rgba(128, 128, 128, 0.5)"),I.newLoop(void 0,mt)});break;case r.db.LINETYPE.RECT_END:v=I.endLoop(),X.push(v),I.models.addLoop(v),I.bumpVerticalPos(v.stopy-I.getVerticalPos());break;case r.db.LINETYPE.OPT_START:pt(P,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.OPT_END:v=I.endLoop(),await z.drawLoop(u,v,"opt",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.ALT_START:pt(P,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.ALT_ELSE:pt(P,A,l.boxMargin+l.boxTextMargin,l.boxMargin,H=>I.addSectionToLoop(H));break;case r.db.LINETYPE.ALT_END:v=I.endLoop(),await z.drawLoop(u,v,"alt",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:pt(P,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H)),I.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:pt(P,A,l.boxMargin+l.boxTextMargin,l.boxMargin,H=>I.addSectionToLoop(H));break;case r.db.LINETYPE.PAR_END:v=I.endLoop(),await z.drawLoop(u,v,"par",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.AUTONUMBER:V=A.message.start||V,K=A.message.step||K,A.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:pt(P,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.CRITICAL_OPTION:pt(P,A,l.boxMargin+l.boxTextMargin,l.boxMargin,H=>I.addSectionToLoop(H));break;case r.db.LINETYPE.CRITICAL_END:v=I.endLoop(),await z.drawLoop(u,v,"critical",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;case r.db.LINETYPE.BREAK_START:pt(P,A,l.boxMargin,l.boxMargin+l.boxTextMargin,H=>I.newLoop(H));break;case r.db.LINETYPE.BREAK_END:v=I.endLoop(),await z.drawLoop(u,v,"break",l,A),I.bumpVerticalPos(v.stopy-I.getVerticalPos()),I.models.addLoop(v);break;default:try{nt=A.msgModel,nt.starty=I.getVerticalPos(),nt.sequenceIndex=V,nt.sequenceVisible=r.db.showSequenceNumbers(),nt.id=A.id,nt.from=A.from,nt.to=A.to;let H=await gr(u,nt);Ir(A,nt,H,at,_,O,g),U.push({messageModel:nt,lineStartY:H,msg:A}),I.models.addMessage(nt)}catch(H){rt.error("error while drawing message",H)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(A.type)&&(V=Math.round((V+K)*100)/100),at++}rt.debug("createdActors",O),rt.debug("destroyedActors",g),await Ee(u,_,h,!1,t,r,w);for(let A of U)await ga(u,A.messageModel,A.lineStartY,r,A.msg,t);l.mirrorActors&&await Ee(u,_,h,!0,t,r,w),X.forEach(A=>z.drawBackgroundRect(u,A)),ur(u,_,h,l);for(let A of I.models.boxes){A.height=I.getVerticalPos()-A.y,I.insert(A.x,A.y,A.x+A.width,A.height);let v=l.boxMargin*2;A.startx=A.x-v,A.starty=A.y-v*.25,A.stopx=A.startx+A.width+2*v,A.stopy=A.starty+A.height+v*.75,A.stroke="rgb(0,0,0, 0.5)",z.drawBox(u,A,l)}m&&I.bumpVerticalPos(l.boxMargin);let st=xr(u,_,h,E),{bounds:G}=I.getBounds();G.startx===void 0&&(G.startx=0),G.starty===void 0&&(G.starty=0),G.stopx===void 0&&(G.stopx=0),G.stopy===void 0&&(G.stopy=0);let ot=G.stopy-G.starty;ot<st.maxHeight&&(ot=st.maxHeight);let it=ot+2*l.diagramMarginY;l.mirrorActors&&(it=it-l.boxMargin+l.bottomMarginAdj);let W=G.stopx-G.startx;W<st.maxWidth&&(W=st.maxWidth);let M=W+2*l.diagramMarginX;x&&u.append("text").text(x).attr("x",(G.stopx-G.startx)/2-2*l.diagramMarginX).attr("y",-25),Je(u,it,M,l.useMaxWidth);let Q=x?40:0,Yt=_.size&&s==="neo"?30:0;u.attr("viewBox",G.startx-l.diagramMarginX+" -"+(l.diagramMarginY+Q)+" "+M+" "+(it+Q+Yt)),rt.debug("models:",I.models)},"draw");async function yr(e,t,a){let r={};for(let i of t)if(e.get(i.to)&&e.get(i.from)){let c=e.get(i.to);if(i.placement===a.db.PLACEMENT.LEFTOF&&!c.prevActor||i.placement===a.db.PLACEMENT.RIGHTOF&&!c.nextActor)continue;let s=i.placement!==void 0,n=!s,p=s?kt(l):Lt(l),d=i.wrap?Z.wrapLabel(i.message,l.width-2*l.wrapPadding,p):i.message,u=(j(d)?await At(i.message,tt()):Z.calculateTextDimensions(d,p)).width+2*l.wrapPadding;n&&i.from===c.nextActor?r[i.to]=N.getMax(r[i.to]||0,u):n&&i.from===c.prevActor?r[i.from]=N.getMax(r[i.from]||0,u):n&&i.from===i.to?(r[i.from]=N.getMax(r[i.from]||0,u/2),r[i.to]=N.getMax(r[i.to]||0,u/2)):i.placement===a.db.PLACEMENT.RIGHTOF?r[i.from]=N.getMax(r[i.from]||0,u):i.placement===a.db.PLACEMENT.LEFTOF?r[c.prevActor]=N.getMax(r[c.prevActor]||0,u):i.placement===a.db.PLACEMENT.OVER&&(c.prevActor&&(r[c.prevActor]=N.getMax(r[c.prevActor]||0,u/2)),c.nextActor&&(r[i.from]=N.getMax(r[i.from]||0,u/2)))}return rt.debug("maxMessageWidthPerActor:",r),r}f(yr,"getMaxMessageWidthPerActor");var Ia=f(function(e){let t=0,a=pe(l);for(let r in e.links){let c=Z.calculateTextDimensions(r,a).width+2*l.wrapPadding+2*l.boxMargin;t<c&&(t=c)}return t},"getRequiredPopupWidth");async function Rr(e,t,a){let r=0;for(let c of e.keys()){let s=e.get(c);s.wrap&&(s.description=Z.wrapLabel(s.description,l.width-2*l.wrapPadding,pe(l)));let n=j(s.description)?await At(s.description,tt()):Z.calculateTextDimensions(s.description,pe(l));s.width=s.wrap?l.width:N.getMax(l.width,n.width+2*l.wrapPadding),tt().look==="neo"?(s.actorTextHeight=n.height,s.height=N.getMax(Tr(n.height),l.height)):s.height=s.wrap?N.getMax(n.height,l.height):l.height,r=N.getMax(r,s.height)}for(let c in t){let s=e.get(c);if(!s)continue;let n=e.get(s.nextActor);if(!n){let u=t[c]+l.actorMargin-s.width/2;s.margin=N.getMax(u,l.actorMargin);continue}let d=t[c]+l.actorMargin-s.width/2-n.width/2;s.margin=N.getMax(d,l.actorMargin)}let i=0;return a.forEach(c=>{let s=Lt(l),n=c.actorKeys.reduce((u,_)=>u+=e.get(_).width+(e.get(_).margin||0),0),p=l.boxMargin*8;n+=p,n-=2*l.boxTextMargin,c.wrap&&(c.name=Z.wrapLabel(c.name,n-2*l.wrapPadding,s));let d=Z.calculateTextDimensions(c.name,s);i=N.getMax(d.height,i);let E=N.getMax(n,d.width+2*l.wrapPadding);if(c.margin=l.boxTextMargin,n<E){let u=(E-n)/2;c.margin+=u}}),a.forEach(c=>c.textMaxHeight=i),N.getMax(r,l.height)}f(Rr,"calculateActorMargins");var ya=f(async function(e,t,a){let r=t.get(e.from),i=t.get(e.to),c=r.x,s=i.x,n=e.wrap&&e.message,p=j(e.message)?await At(e.message,tt()):Z.calculateTextDimensions(n?Z.wrapLabel(e.message,l.width,kt(l)):e.message,kt(l)),d={width:n?l.width:N.getMax(l.width,p.width+2*l.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===a.db.PLACEMENT.RIGHTOF?(d.width=n?N.getMax(l.width,p.width):N.getMax(r.width/2+i.width/2,p.width+2*l.noteMargin),d.startx=c+(r.width+l.actorMargin)/2):e.placement===a.db.PLACEMENT.LEFTOF?(d.width=n?N.getMax(l.width,p.width+2*l.noteMargin):N.getMax(r.width/2+i.width/2,p.width+2*l.noteMargin),d.startx=c-d.width+(r.width-l.actorMargin)/2):e.to===e.from?(p=Z.calculateTextDimensions(n?Z.wrapLabel(e.message,N.getMax(l.width,r.width),kt(l)):e.message,kt(l)),d.width=n?N.getMax(l.width,r.width):N.getMax(r.width,l.width,p.width+2*l.noteMargin),d.startx=c+(r.width-d.width)/2):(d.width=Math.abs(c+r.width/2-(s+i.width/2))+l.actorMargin,d.startx=c<s?c+r.width/2-l.actorMargin/2:s+i.width/2-l.actorMargin/2),n&&(d.message=Z.wrapLabel(e.message,d.width-2*l.wrapPadding,kt(l))),rt.debug(`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${e.message}]`),d},"buildNoteModel"),Ra=4,Oa=6,de=f(function(e,t){let{CENTRAL_CONNECTION:a,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[a,r,i].includes(e.centralConnection)},"hasCentralConnection"),La=f(function(e,t,a){let{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:c,BIDIRECTIONAL_DOTTED:s}=t.db.LINETYPE,n=0;return(e.centralConnection===r||e.centralConnection===i)&&(n+=Ra),(e.centralConnection===r||e.centralConnection===i)&&(e.type===c||e.type===s)&&(n+=a?0:-Oa),n},"calculateCentralConnectionOffset"),Or=f(function(e,t){let{SOLID_ARROW_TOP_REVERSE:a,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:c,STICK_ARROW_TOP_REVERSE:s,STICK_ARROW_TOP_REVERSE_DOTTED:n,STICK_ARROW_BOTTOM_REVERSE:p,STICK_ARROW_BOTTOM_REVERSE_DOTTED:d}=t.db.LINETYPE;return[a,r,i,c,s,n,p,d].includes(e.type)},"isReverseArrowType"),ma=f(function(e,t){let{BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:r}=t.db.LINETYPE;return[a,r].includes(e.type)},"isBidirectionalArrowType"),Sa=f(function(e,t,a){let{look:r}=tt();if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.SOLID_TOP,a.db.LINETYPE.SOLID_BOTTOM,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.SOLID_TOP_DOTTED,a.db.LINETYPE.SOLID_BOTTOM_DOTTED,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};let[i,c]=dr(e.from,t),[s,n]=dr(e.to,t),p=i<=s,d=p?c:i,E=p?s:n;r==="neo"&&(e.type!==a.db.LINETYPE.SOLID_OPEN&&(E+=p?-3:3),(e.type===a.db.LINETYPE.BIDIRECTIONAL_SOLID||e.type===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(d+=p?3:-3)),d+=La(e,a,p);let u=Math.abs(s-n)>2,_=f(h=>p?-h:h,"adjustValue");e.from===e.to?E=d:(e.activate&&!u&&(E+=_(l.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(E+=_(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(d-=_(3)));let O=[i,c,s,n],g=Math.abs(d-E);e.wrap&&e.message&&(e.message=Z.wrapLabel(e.message,N.getMax(g+2*l.wrapPadding,l.width),Lt(l)));let y=Z.calculateTextDimensions(e.message,Lt(l));return{width:N.getMax(e.wrap?0:y.width+2*l.wrapPadding,g+2*l.wrapPadding,l.width),height:0,startx:d,stopx:E,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,O),toBounds:Math.max.apply(null,O)}},"buildMessageModel"),Aa=f(async function(e,t,a,r){let i={},c=[],s,n,p;for(let d of e){switch(d.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:c.push({id:d.id,msg:d.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:d.message&&(s=c.pop(),i[s.id]=s,i[d.id]=s,c.push(s));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:s=c.pop(),i[s.id]=s;break;case r.db.LINETYPE.ACTIVE_START:{let u=t.get(d.from?d.from:d.to.actor),_=jt(d.from?d.from:d.to.actor).length,O=u.x+u.width/2+(_-1)*l.activationWidth/2,g={startx:O,stopx:O+l.activationWidth,actor:d.from,enabled:!0};I.activations.push(g)}break;case r.db.LINETYPE.ACTIVE_END:{let u=I.activations.map(_=>_.actor).lastIndexOf(d.from);I.activations.splice(u,1).splice(0,1)}break}d.placement!==void 0?(n=await ya(d,t,r),d.noteModel=n,c.forEach(u=>{s=u,s.from=N.getMin(s.from,n.startx),s.to=N.getMax(s.to,n.startx+n.width),s.width=N.getMax(s.width,Math.abs(s.from-s.to))-l.labelBoxWidth})):(p=Sa(d,t,r),d.msgModel=p,p.startx&&p.stopx&&c.length>0&&c.forEach(u=>{if(s=u,p.startx===p.stopx){let _=t.get(d.from),O=t.get(d.to);s.from=N.getMin(_.x-p.width/2,_.x-_.width/2,s.from),s.to=N.getMax(O.x+p.width/2,O.x+_.width/2,s.to),s.width=N.getMax(s.width,Math.abs(s.to-s.from))-l.labelBoxWidth}else s.from=N.getMin(p.startx,s.from),s.to=N.getMax(p.stopx,s.to),s.width=N.getMax(s.width,p.width)-l.labelBoxWidth}))}return I.activations=[],rt.debug("Loop type widths:",i),i},"calculateLoopBounds"),ka={bounds:I,drawActors:Ee,drawActorsPopup:xr,setConf:br,draw:ba},Va={parser:Pr,get db(){return new Mr},renderer:ka,styles:Yr,init:f(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,rr({sequence:{wrap:e.wrap}}))},"init")};export{Va as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-UAGOPMXU.js";import"./chunk-PHKIAKHS.js";var c=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function p(){return!!i()?.mermaidCaptureSizes}o(p,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){let t=i();if(!t)return;let e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];let a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){let t=[];for(let e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,p as shouldCaptureSizes};
|