@seqyuan/annovibe 0.8.12
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/.next/BUILD_ID +1 -0
- package/.next/app-path-routes-manifest.json +40 -0
- package/.next/build-manifest.json +20 -0
- package/.next/diagnostics/build-diagnostics.json +6 -0
- package/.next/diagnostics/framework.json +1 -0
- package/.next/export-marker.json +6 -0
- package/.next/images-manifest.json +68 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +138 -0
- package/.next/react-loadable-manifest.json +2320 -0
- package/.next/required-server-files.js +343 -0
- package/.next/required-server-files.json +343 -0
- package/.next/routes-manifest.json +292 -0
- package/.next/server/app/_global-error/page.js +32 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +16 -0
- package/.next/server/app/_global-error.rsc +14 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/server/app/_not-found/page.js +2 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +16 -0
- package/.next/server/app/_not-found.rsc +18 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +18 -0
- package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
- package/.next/server/app/_not-found.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -0
- package/.next/server/app/api/agent/[id]/events/route.js +3 -0
- package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/[id]/route.js +1 -0
- package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/new/route.js +1 -0
- package/.next/server/app/api/agent/new/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/all-providers/route.js +1 -0
- package/.next/server/app/api/auth/all-providers/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/all-providers/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -0
- package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/api-key/[provider]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/login/[provider]/route.js +3 -0
- package/.next/server/app/api/auth/login/[provider]/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/login/route.js +1 -0
- package/.next/server/app/api/auth/login/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -0
- package/.next/server/app/api/auth/logout/[provider]/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/providers/route.js +1 -0
- package/.next/server/app/api/auth/providers/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/status/route.js +1 -0
- package/.next/server/app/api/auth/status/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/default-cwd/route.js +1 -0
- package/.next/server/app/api/default-cwd/route.js.nft.json +1 -0
- package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/files/[...path]/route.js +6 -0
- package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -0
- package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/harness/route.js +1 -0
- package/.next/server/app/api/harness/route.js.nft.json +1 -0
- package/.next/server/app/api/harness/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/home/route.js +1 -0
- package/.next/server/app/api/home/route.js.nft.json +1 -0
- package/.next/server/app/api/home/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/route.js +1 -0
- package/.next/server/app/api/models/route.js.nft.json +1 -0
- package/.next/server/app/api/models/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/discover/route.js +1 -0
- package/.next/server/app/api/models-config/discover/route.js.nft.json +1 -0
- package/.next/server/app/api/models-config/discover/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/route.js +1 -0
- package/.next/server/app/api/models-config/route.js.nft.json +1 -0
- package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/test/route.js +1 -0
- package/.next/server/app/api/models-config/test/route.js.nft.json +1 -0
- package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/plot-kernels/route.js +1 -0
- package/.next/server/app/api/plot-kernels/route.js.nft.json +1 -0
- package/.next/server/app/api/plot-kernels/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/plot-kernels/status/route.js +1 -0
- package/.next/server/app/api/plot-kernels/status/route.js.nft.json +1 -0
- package/.next/server/app/api/plot-kernels/status/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/plot-kernels/stop/route.js +1 -0
- package/.next/server/app/api/plot-kernels/stop/route.js.nft.json +1 -0
- package/.next/server/app/api/plot-kernels/stop/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/reports/[id]/route.js +9 -0
- package/.next/server/app/api/reports/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/reports/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/search/route.js +3 -0
- package/.next/server/app/api/search/route.js.nft.json +1 -0
- package/.next/server/app/api/search/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/context/route.js +3 -0
- package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/new/route.js +1 -0
- package/.next/server/app/api/sessions/new/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/new/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/route.js +3 -0
- package/.next/server/app/api/sessions/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/settings/route.js +1 -0
- package/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/.next/server/app/api/settings/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/install/route.js +1 -0
- package/.next/server/app/api/skills/install/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/route.js +6 -0
- package/.next/server/app/api/skills/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/search/route.js +1 -0
- package/.next/server/app/api/skills/search/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/soul/route.js +1 -0
- package/.next/server/app/api/soul/route.js.nft.json +1 -0
- package/.next/server/app/api/soul/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/version/route.js +1 -0
- package/.next/server/app/api/version/route.js.nft.json +1 -0
- package/.next/server/app/api/version/route_client-reference-manifest.js +1 -0
- package/.next/server/app/favicon.ico/route.js +1 -0
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
- package/.next/server/app/favicon.ico.body +0 -0
- package/.next/server/app/favicon.ico.meta +1 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +14 -0
- package/.next/server/app/index.rsc +17 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -0
- package/.next/server/app/index.segments/_full.segment.rsc +17 -0
- package/.next/server/app/index.segments/_head.segment.rsc +6 -0
- package/.next/server/app/index.segments/_index.segment.rsc +5 -0
- package/.next/server/app/index.segments/_tree.segment.rsc +4 -0
- package/.next/server/app/login/page.js +2 -0
- package/.next/server/app/login/page.js.nft.json +1 -0
- package/.next/server/app/login/page_client-reference-manifest.js +1 -0
- package/.next/server/app/login.html +1 -0
- package/.next/server/app/login.meta +15 -0
- package/.next/server/app/login.rsc +22 -0
- package/.next/server/app/login.segments/_full.segment.rsc +22 -0
- package/.next/server/app/login.segments/_head.segment.rsc +6 -0
- package/.next/server/app/login.segments/_index.segment.rsc +5 -0
- package/.next/server/app/login.segments/_tree.segment.rsc +4 -0
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +9 -0
- package/.next/server/app/login.segments/login.segment.rsc +5 -0
- package/.next/server/app/page.js +271 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +1 -0
- package/.next/server/app-paths-manifest.json +40 -0
- package/.next/server/chunks/1048.js +1 -0
- package/.next/server/chunks/1367.js +77 -0
- package/.next/server/chunks/1381.js +1 -0
- package/.next/server/chunks/165.js +1 -0
- package/.next/server/chunks/1681.js +215 -0
- package/.next/server/chunks/1703.js +79 -0
- package/.next/server/chunks/1712.js +43 -0
- package/.next/server/chunks/1813.js +1 -0
- package/.next/server/chunks/2325.js +80 -0
- package/.next/server/chunks/258.js +1 -0
- package/.next/server/chunks/2671.js +287 -0
- package/.next/server/chunks/2778.js +1 -0
- package/.next/server/chunks/2943.js +1 -0
- package/.next/server/chunks/3031.js +226 -0
- package/.next/server/chunks/3181.js +1 -0
- package/.next/server/chunks/3451.js +1 -0
- package/.next/server/chunks/3493.js +1 -0
- package/.next/server/chunks/3672.js +1 -0
- package/.next/server/chunks/3701.js +104 -0
- package/.next/server/chunks/4013.js +1 -0
- package/.next/server/chunks/4035.js +80 -0
- package/.next/server/chunks/4248.js +153 -0
- package/.next/server/chunks/4367.js +1 -0
- package/.next/server/chunks/4406.js +141 -0
- package/.next/server/chunks/4741.js +18 -0
- package/.next/server/chunks/4858.js +148 -0
- package/.next/server/chunks/4980.js +1 -0
- package/.next/server/chunks/5155.js +5 -0
- package/.next/server/chunks/5193.js +73 -0
- package/.next/server/chunks/5293.js +166 -0
- package/.next/server/chunks/5409.js +1 -0
- package/.next/server/chunks/5797.js +93 -0
- package/.next/server/chunks/5851.js +36 -0
- package/.next/server/chunks/6206.js +1 -0
- package/.next/server/chunks/6296.js +1 -0
- package/.next/server/chunks/63.js +45 -0
- package/.next/server/chunks/6346.js +1 -0
- package/.next/server/chunks/6406.js +23 -0
- package/.next/server/chunks/642.js +1 -0
- package/.next/server/chunks/6729.js +64 -0
- package/.next/server/chunks/6907.js +115 -0
- package/.next/server/chunks/6980.js +1 -0
- package/.next/server/chunks/7073.js +24 -0
- package/.next/server/chunks/7233.js +24 -0
- package/.next/server/chunks/7270.js +45 -0
- package/.next/server/chunks/7307.js +1 -0
- package/.next/server/chunks/7362.js +9 -0
- package/.next/server/chunks/7567.js +29 -0
- package/.next/server/chunks/7601.js +129 -0
- package/.next/server/chunks/7765.js +1 -0
- package/.next/server/chunks/7890.js +1 -0
- package/.next/server/chunks/8065.js +1 -0
- package/.next/server/chunks/8238.js +34 -0
- package/.next/server/chunks/8276.js +1 -0
- package/.next/server/chunks/8336.js +1 -0
- package/.next/server/chunks/8490.js +1 -0
- package/.next/server/chunks/8916.js +1 -0
- package/.next/server/chunks/9280.js +252 -0
- package/.next/server/chunks/9315.js +1 -0
- package/.next/server/chunks/9537.js +90 -0
- package/.next/server/chunks/966.js +1 -0
- package/.next/server/chunks/9818.js +21 -0
- package/.next/server/chunks/static/media/pdf.worker.min.9df6854a.mjs +6 -0
- package/.next/server/functions-config-manifest.json +14 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/middleware.js +18 -0
- package/.next/server/middleware.js.nft.json +1 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +1 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages-manifest.json +4 -0
- package/.next/server/prefetch-hints.json +1 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +1 -0
- package/.next/server/webpack-runtime.js +1 -0
- package/.next/static/chunks/0b9a0da7.9075af772487e743.js +62 -0
- package/.next/static/chunks/1413.922d232de90c0c41.js +115 -0
- package/.next/static/chunks/1643.467a526a1f24f54d.js +24 -0
- package/.next/static/chunks/1852.5543122f11aa7fed.js +1 -0
- package/.next/static/chunks/1960.b1e26436d7a5f586.js +1 -0
- package/.next/static/chunks/2170a4aa.4213bb2183c9cdf9.js +1 -0
- package/.next/static/chunks/2274.6cd173f80a1405a2.js +21 -0
- package/.next/static/chunks/2419.347fdfe3c170854d.js +166 -0
- package/.next/static/chunks/2619.9aac8983f30c7c8a.js +1 -0
- package/.next/static/chunks/2623.d20fabd8e18197c6.js +287 -0
- package/.next/static/chunks/2729.f5365061a849d659.js +34 -0
- package/.next/static/chunks/2821.934bcf60fbdc28c6.js +1 -0
- package/.next/static/chunks/2918becc.abff2ece1de37bc1.js +153 -0
- package/.next/static/chunks/2947.114e51cb06d1c01a.js +23 -0
- package/.next/static/chunks/3079.4c511fa1144e3adf.js +79 -0
- package/.next/static/chunks/3274.208ca44844cd7d95.js +148 -0
- package/.next/static/chunks/3308.465a94263d04bfea.js +73 -0
- package/.next/static/chunks/3325.e4bfe1ca657f3b5b.js +80 -0
- package/.next/static/chunks/3506.2a7eaa08b9f55337.js +90 -0
- package/.next/static/chunks/363642f4-043c1475ab9af70e.js +1 -0
- package/.next/static/chunks/3794-123fdf632563f469.js +32 -0
- package/.next/static/chunks/3837.a755ccfe6f9c1c1c.js +5 -0
- package/.next/static/chunks/394.91597771688df6d0.js +1 -0
- package/.next/static/chunks/3997.1009c06025691712.js +1 -0
- package/.next/static/chunks/4453.91a357dc43c21745.js +1 -0
- package/.next/static/chunks/4491.44fdf20580ac72bd.js +24 -0
- package/.next/static/chunks/4829.cf1d50e43e6d9db5.js +1 -0
- package/.next/static/chunks/498.fe1d9da9ecad6c36.js +1 -0
- package/.next/static/chunks/4bd1b696-e356ca5ba0218e27.js +1 -0
- package/.next/static/chunks/5019.b5a1a2b8daf17525.js +1 -0
- package/.next/static/chunks/5034.8f16c3fa3ce75411.js +1 -0
- package/.next/static/chunks/5074.d16651da01ec4e02.js +1 -0
- package/.next/static/chunks/532.5956ed631aff722b.js +9 -0
- package/.next/static/chunks/5326.69460442bdcd6cd3.js +1 -0
- package/.next/static/chunks/5403.ff110bf5bf600758.js +64 -0
- package/.next/static/chunks/547.902a733488cfe3f7.js +77 -0
- package/.next/static/chunks/5567.540d7fc108ad6ee5.js +215 -0
- package/.next/static/chunks/5590.ef62922166d308b4.js +1 -0
- package/.next/static/chunks/5690.9d6eb1edb1399995.js +1 -0
- package/.next/static/chunks/5749.25faee4a1e55b854.js +226 -0
- package/.next/static/chunks/58bb9007.1ccb6bba34b4c635.js +80 -0
- package/.next/static/chunks/6121.f3f43f1896ea0cd9.js +1 -0
- package/.next/static/chunks/6600.583c88eef37aa524.js +1 -0
- package/.next/static/chunks/6696.a41aec266e657d54.js +141 -0
- package/.next/static/chunks/6922.42148793782d2fe7.js +1 -0
- package/.next/static/chunks/7006.e191611ffc2b9528.js +43 -0
- package/.next/static/chunks/7343.9fbb58204d8ac681.js +1 -0
- package/.next/static/chunks/7355-29eaa714eb390050.js +1 -0
- package/.next/static/chunks/73972abe.25a4cffa03b2bcef.js +119 -0
- package/.next/static/chunks/7547.58bda8a2aabba0d4.js +93 -0
- package/.next/static/chunks/7648.4ae2f183b4db0353.js +1 -0
- package/.next/static/chunks/7874.8db6929b94cdf697.js +1 -0
- package/.next/static/chunks/7959.1f20a35df316216a.js +104 -0
- package/.next/static/chunks/83.85d62d7fc9850b75.js +29 -0
- package/.next/static/chunks/8436.cab94b59cca0a8ff.js +1 -0
- package/.next/static/chunks/8451.542eda09d2171474.js +1 -0
- package/.next/static/chunks/8489.45f22859734f514f.js +36 -0
- package/.next/static/chunks/8568.f85d8b36fc9a9037.js +1 -0
- package/.next/static/chunks/8863.be51033a67436277.js +1 -0
- package/.next/static/chunks/90542734.dc1a2723e4f6affb.js +1 -0
- package/.next/static/chunks/9500.1488aec06ee78127.js +1 -0
- package/.next/static/chunks/9633.155548b5fca6e580.js +1 -0
- package/.next/static/chunks/9779.673004a62d70e36a.js +1 -0
- package/.next/static/chunks/9b0008ae.2918095672924572.js +45 -0
- package/.next/static/chunks/app/_global-error/page-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/_not-found/page-96eb50fac9e7a68c.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/harness/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/home/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/models/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/status/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/stop/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/reports/[id]/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/search/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/sessions/new/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/settings/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/skills/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/soul/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/api/version/route-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/app/layout-827e06e39e1e6b05.js +1 -0
- package/.next/static/chunks/app/login/page-9450bfc0d502f432.js +1 -0
- package/.next/static/chunks/app/page-dc03bbb33a1d438c.js +270 -0
- package/.next/static/chunks/d3ac728e.7964f816a1ca64e5.js +1 -0
- package/.next/static/chunks/framework-711ef29bc66f648c.js +1 -0
- package/.next/static/chunks/main-app-ecfccace02c7aaed.js +1 -0
- package/.next/static/chunks/main-f74964b7ae52493e.js +5 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-cd03d084301c1bc9.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-3edd3886076a73cb.js +1 -0
- package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/.next/static/chunks/webpack-5e677f60fa366b60.js +1 -0
- package/.next/static/css/d830cdea1c9a03c6.css +3 -0
- package/.next/static/ixA4-CDguO8ne_SD2W8sd/_buildManifest.js +1 -0
- package/.next/static/ixA4-CDguO8ne_SD2W8sd/_ssgManifest.js +1 -0
- package/.next/static/media/15605e25b523335c-s.woff2 +0 -0
- package/.next/static/media/1a3dce5cfb5f7760-s.woff2 +0 -0
- package/.next/static/media/1cdd02902f937a18-s.woff2 +0 -0
- package/.next/static/media/4c4b3b30b6bcb2be-s.woff2 +0 -0
- package/.next/static/media/641a7b8a5800ee0e-s.woff2 +0 -0
- package/.next/static/media/7deddc85b7ffd1dc-s.p.woff2 +0 -0
- package/.next/static/media/ec14413c594b3356-s.p.woff2 +0 -0
- package/.next/static/media/pdf.worker.min.5f98222a.mjs +6 -0
- package/.next/trace +74 -0
- package/.next/trace-build +1 -0
- package/.next/types/app/api/agent/[id]/events/route.ts +351 -0
- package/.next/types/app/api/agent/[id]/route.ts +351 -0
- package/.next/types/app/api/agent/new/route.ts +351 -0
- package/.next/types/app/api/auth/all-providers/route.ts +351 -0
- package/.next/types/app/api/auth/api-key/[provider]/route.ts +351 -0
- package/.next/types/app/api/auth/login/[provider]/route.ts +351 -0
- package/.next/types/app/api/auth/login/route.ts +351 -0
- package/.next/types/app/api/auth/logout/[provider]/route.ts +351 -0
- package/.next/types/app/api/auth/providers/route.ts +351 -0
- package/.next/types/app/api/auth/status/route.ts +351 -0
- package/.next/types/app/api/default-cwd/route.ts +351 -0
- package/.next/types/app/api/files/[...path]/route.ts +351 -0
- package/.next/types/app/api/harness/route.ts +351 -0
- package/.next/types/app/api/home/route.ts +351 -0
- package/.next/types/app/api/models/route.ts +351 -0
- package/.next/types/app/api/models-config/discover/route.ts +351 -0
- package/.next/types/app/api/models-config/route.ts +351 -0
- package/.next/types/app/api/models-config/test/route.ts +351 -0
- package/.next/types/app/api/plot-kernels/route.ts +351 -0
- package/.next/types/app/api/plot-kernels/status/route.ts +351 -0
- package/.next/types/app/api/plot-kernels/stop/route.ts +351 -0
- package/.next/types/app/api/reports/[id]/route.ts +351 -0
- package/.next/types/app/api/search/route.ts +351 -0
- package/.next/types/app/api/sessions/[id]/context/route.ts +351 -0
- package/.next/types/app/api/sessions/[id]/route.ts +351 -0
- package/.next/types/app/api/sessions/new/route.ts +351 -0
- package/.next/types/app/api/sessions/route.ts +351 -0
- package/.next/types/app/api/settings/route.ts +351 -0
- package/.next/types/app/api/skills/install/route.ts +351 -0
- package/.next/types/app/api/skills/route.ts +351 -0
- package/.next/types/app/api/skills/search/route.ts +351 -0
- package/.next/types/app/api/soul/route.ts +351 -0
- package/.next/types/app/api/version/route.ts +351 -0
- package/.next/types/app/layout.ts +87 -0
- package/.next/types/app/login/page.ts +87 -0
- package/.next/types/app/page.ts +87 -0
- package/.next/types/package.json +1 -0
- package/.next/types/routes.d.ts +106 -0
- package/.next/types/validator.ts +376 -0
- package/LICENSE +21 -0
- package/README.md +90 -0
- package/bin/pi-web.js +825 -0
- package/lib/default-soul.md +42 -0
- package/lib/visualization-harness.md +113 -0
- package/next.config.ts +15 -0
- package/package.json +77 -0
- package/public/file.svg +1 -0
- package/public/globe.svg +1 -0
- package/public/next.svg +1 -0
- package/public/vercel.svg +1 -0
- package/public/window.svg +1 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4954],{36346:(t,e,a)=>{a.d(e,{diagram:()=>tC});var r=a(14759),i=a(1155),s=a(87722),n=a(32563),o=a(97096),c=a(32165),l=a(33948),d=a(84485),h=function(){var t=(0,c.K2)(function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},"o"),e=[1,2],a=[1,3],r=[1,4],i=[2,4],s=[1,9],n=[1,11],o=[1,12],l=[1,14],d=[1,15],h=[1,17],p=[1,18],T=[1,19],E=[1,25],g=[1,26],u=[1,27],_=[1,28],O=[1,29],y=[1,30],x=[1,31],m=[1,32],b=[1,33],I=[1,34],f=[1,35],R=[1,36],L=[1,37],P=[1,38],D=[1,39],N=[1,40],w=[1,42],S=[1,43],A=[1,44],k=[1,45],M=[1,46],C=[1,47],v=[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],Y=[1,74],B=[1,80],K=[1,81],$=[1,82],V=[1,83],W=[1,84],F=[1,85],q=[1,86],H=[1,87],z=[1,88],j=[1,89],U=[1,90],G=[1,91],X=[1,92],Z=[1,93],J=[1,94],Q=[1,95],tt=[1,96],te=[1,97],ta=[1,98],tr=[1,99],ti=[1,100],ts=[1,101],tn=[1,102],to=[1,103],tc=[1,104],tl=[1,105],td=[2,78],th=[4,5,17,51,53,54],tp=[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],tT=[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],tg=[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],tu=[5,52],t_=[70,71,72,73],tO=[1,151],ty={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:(0,c.K2)(function(t,e,a,r,i,s,n){var o=s.length-1;switch(i){case 3:return r.apply(s[o]),s[o];case 4:case 10:case 8:case 9:case 14:this.$=[];break;case 5:case 11:s[o-1].push(s[o]),this.$=s[o-1];break;case 6:case 7:case 12:case 13:case 67:this.$=s[o];break;case 16:s[o].type="createParticipant",this.$=s[o];break;case 17:s[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(s[o-2])}),s[o-1].push({type:"boxEnd",boxText:s[o-2]}),this.$=s[o-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-2]),sequenceIndexStep:Number(s[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:s[o-1].actor};break;case 24:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:s[o-1].actor};break;case 30:r.setDiagramTitle(s[o].substring(6)),this.$=s[o].substring(6);break;case 31:r.setDiagramTitle(s[o].substring(7)),this.$=s[o].substring(7);break;case 32:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 35:s[o-1].unshift({type:"loopStart",loopText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.LOOP_START}),s[o-1].push({type:"loopEnd",loopText:s[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=s[o-1];break;case 36:s[o-1].unshift({type:"rectStart",color:r.parseMessage(s[o-2]),signalType:r.LINETYPE.RECT_START}),s[o-1].push({type:"rectEnd",color:r.parseMessage(s[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=s[o-1];break;case 37:s[o-1].unshift({type:"optStart",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.OPT_START}),s[o-1].push({type:"optEnd",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=s[o-1];break;case 38:s[o-1].unshift({type:"altStart",altText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.ALT_START}),s[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=s[o-1];break;case 39:s[o-1].unshift({type:"parStart",parText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.PAR_START}),s[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=s[o-1];break;case 40:s[o-1].unshift({type:"parStart",parText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),s[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=s[o-1];break;case 41:s[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.CRITICAL_START}),s[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=s[o-1];break;case 42:s[o-1].unshift({type:"breakStart",breakText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.BREAK_START}),s[o-1].push({type:"breakEnd",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=s[o-1];break;case 44:this.$=s[o-3].concat([{type:"option",optionText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},s[o]]);break;case 46:this.$=s[o-3].concat([{type:"and",parText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.PAR_AND},s[o]]);break;case 48:this.$=s[o-3].concat([{type:"else",altText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.ALT_ELSE},s[o]]);break;case 49:case 54:s[o-3].draw="participant",s[o-3].type="addParticipant",s[o-3].description=r.parseMessage(s[o-1]),this.$=s[o-3];break;case 50:case 55:s[o-1].draw="participant",s[o-1].type="addParticipant",this.$=s[o-1];break;case 51:case 56:s[o-3].draw="actor",s[o-3].type="addParticipant",s[o-3].description=r.parseMessage(s[o-1]),this.$=s[o-3];break;case 52:case 57:s[o-1].draw="actor",s[o-1].type="addParticipant",this.$=s[o-1];break;case 53:s[o-1].type="destroyParticipant",this.$=s[o-1];break;case 58:this.$=[s[o-1],{type:"addNote",placement:s[o-2],actor:s[o-1].actor,text:s[o]}];break;case 59:s[o-2]=[].concat(s[o-1],s[o-1]).slice(0,2),s[o-2][0]=s[o-2][0].actor,s[o-2][1]=s[o-2][1].actor,this.$=[s[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:s[o-2].slice(0,2),text:s[o]}];break;case 60:this.$=[s[o-1],{type:"addLinks",actor:s[o-1].actor,text:s[o]}];break;case 61:this.$=[s[o-1],{type:"addALink",actor:s[o-1].actor,text:s[o]}];break;case 62:this.$=[s[o-1],{type:"addProperties",actor:s[o-1].actor,text:s[o]}];break;case 63:this.$=[s[o-1],{type:"addDetails",actor:s[o-1].actor,text:s[o]}];break;case 66:this.$=[s[o-2],s[o]];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:s[o-1].actor}];break;case 71:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:s[o-4].actor}];break;case 72:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:s[o-1].actor}];break;case 73:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-2],msg:s[o],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:s[o-4].actor}];break;case 74:this.$=[s[o-5],s[o-1],{type:"addMessage",from:s[o-5].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:s[o-1].actor},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:s[o-5].actor}];break;case 75:this.$=[s[o-3],s[o-1],{type:"addMessage",from:s[o-3].actor,to:s[o-1].actor,signalType:s[o-2],msg:s[o]}];break;case 76:this.$={type:"addParticipant",actor:s[o-1],config:s[o]};break;case 77:this.$=s[o-1].trim();break;case 78:this.$={type:"addParticipant",actor:s[o]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(s[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([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:s,5:n,8:8,9:10,10:o,13:13,14:l,15:d,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:_,36:O,37:y,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:P,53:D,54:N,56:w,61:S,62:A,63:k,64:M,73:C},t(v,[2,5]),{9:48,13:13,14:l,15:d,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:_,36:O,37:y,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:P,53:D,54:N,56:w,61:S,62:A,63:k,64:M,73:C},t(v,[2,7]),t(v,[2,8]),t(v,[2,9]),t(v,[2,15]),{13:49,51:P,53:D,54:N},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:C},{23:56,73:C},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(v,[2,30]),t(v,[2,31]),{33:[1,62]},{35:[1,63]},t(v,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Y},{23:75,55:76,73:Y},{23:77,73:C},{69:78,72:[1,79],78:B,79:K,80:$,81:V,82:W,83:F,84:q,85:H,86:z,87:j,88:U,89:G,90:X,91:Z,92:J,93:Q,94:tt,95:te,96:ta,97:tr,98:ti,99:ts,100:tn,101:to,102:tc,103:tl},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:C},{23:111,73:C},{23:112,73:C},{23:113,73:C},t([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],td),t(v,[2,6]),t(v,[2,16]),t(th,[2,10],{11:114}),t(v,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(v,[2,22]),{5:[1,118]},{5:[1,119]},t(v,[2,25]),t(v,[2,26]),t(v,[2,27]),t(v,[2,28]),t(v,[2,29]),t(v,[2,32]),t(v,[2,33]),t(tp,i,{7:120}),t(tp,i,{7:121}),t(tp,i,{7:122}),t(tT,i,{41:123,7:124}),t(tE,i,{43:125,7:126}),t(tE,i,{7:126,43:127}),t(tg,i,{46:128,7:129}),t(tp,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(tu,td,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:C},{69:146,78:B,79:K,80:$,81:V,82:W,83:F,84:q,85:H,86:z,87:j,88:U,89:G,90:X,91:Z,92:J,93:Q,94:tt,95:te,96:ta,97:tr,98:ti,99:ts,100:tn,101:to,102:tc,103:tl},t(t_,[2,79]),t(t_,[2,80]),t(t_,[2,81]),t(t_,[2,82]),t(t_,[2,83]),t(t_,[2,84]),t(t_,[2,85]),t(t_,[2,86]),t(t_,[2,87]),t(t_,[2,88]),t(t_,[2,89]),t(t_,[2,90]),t(t_,[2,91]),t(t_,[2,92]),t(t_,[2,93]),t(t_,[2,94]),t(t_,[2,95]),t(t_,[2,96]),t(t_,[2,97]),t(t_,[2,98]),t(t_,[2,99]),t(t_,[2,100]),t(t_,[2,101]),t(t_,[2,102]),t(t_,[2,103]),t(t_,[2,104]),{23:147,73:C},{23:149,60:148,73:C},{73:[2,68]},{73:[2,69]},{58:150,104:tO},{58:152,104:tO},{58:153,104:tO},{58:154,104:tO},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:P,53:D,54:N},{5:[1,160]},t(v,[2,20]),t(v,[2,21]),t(v,[2,23]),t(v,[2,24]),{4:s,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[1,161],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:_,36:O,37:y,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:P,53:D,54:N,56:w,61:S,62:A,63:k,64:M,73:C},{4:s,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[1,162],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:_,36:O,37:y,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:P,53:D,54:N,56:w,61:S,62:A,63:k,64:M,73:C},{4:s,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[1,163],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:_,36:O,37:y,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:P,53:D,54:N,56:w,61:S,62:A,63:k,64:M,73:C},{17:[1,164]},{4:s,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[2,47],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:_,36:O,37:y,38:x,39:m,40:b,42:I,44:f,45:R,47:L,50:[1,165],51:P,53:D,54:N,56:w,61:S,62:A,63:k,64:M,73:C},{17:[1,166]},{4:s,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[2,45],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:_,36:O,37:y,38:x,39:m,40:b,42:I,44:f,45:R,47:L,49:[1,167],51:P,53:D,54:N,56:w,61:S,62:A,63:k,64:M,73:C},{17:[1,168]},{17:[1,169]},{4:s,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[2,43],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:_,36:O,37:y,38:x,39:m,40:b,42:I,44:f,45:R,47:L,48:[1,170],51:P,53:D,54:N,56:w,61:S,62:A,63:k,64:M,73:C},{4:s,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[1,171],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:_,36:O,37:y,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:P,53:D,54:N,56:w,61:S,62:A,63:k,64:M,73:C},{16:[1,172]},t(v,[2,50]),{16:[1,173]},t(v,[2,55]),t(tu,[2,76]),{76:[1,174]},{16:[1,175]},t(v,[2,52]),{16:[1,176]},t(v,[2,57]),t(v,[2,53]),{23:177,73:C},{23:178,73:C},{23:179,73:C},{58:180,104:tO},{23:181,72:[1,182],73:C},{58:183,104:tO},{58:184,104:tO},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(v,[2,17]),t(th,[2,11]),{13:186,51:P,53:D,54:N},t(th,[2,13]),t(th,[2,14]),t(v,[2,19]),t(v,[2,35]),t(v,[2,36]),t(v,[2,37]),t(v,[2,38]),{16:[1,187]},t(v,[2,39]),{16:[1,188]},t(v,[2,40]),t(v,[2,41]),{16:[1,189]},t(v,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:tO},{58:196,104:tO},{58:197,104:tO},{5:[2,75]},{58:198,104:tO},{23:199,73:C},{5:[2,58]},{5:[2,59]},{23:200,73:C},t(th,[2,12]),t(tT,i,{7:124,41:201}),t(tE,i,{7:126,43:202}),t(tg,i,{7:129,46:203}),t(v,[2,49]),t(v,[2,54]),t(tu,[2,77]),t(v,[2,51]),t(v,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:tO},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:(0,c.K2)(function(t,e){if(e.recoverable)this.trace(t);else{var a=Error(t);throw a.hash=e,a}},"parseError"),parse:(0,c.K2)(function(t){var e=this,a=[0],r=[],i=[null],s=[],n=this.table,o="",l=0,d=0,h=0,p=s.slice.call(arguments,1),T=Object.create(this.lexer),E={};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(E[g]=this.yy[g]);T.setInput(t,E),E.lexer=T,E.parser=this,void 0===T.yylloc&&(T.yylloc={});var u=T.yylloc;s.push(u);var _=T.options&&T.options.ranges;function O(){var t;return"number"!=typeof(t=r.pop()||T.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof E.parseError?this.parseError=E.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){a.length=a.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,c.K2)(O,"lex");for(var y,x,m,b,I,f,R,L,P,D={};;){if(m=a[a.length-1],this.defaultActions[m]?b=this.defaultActions[m]:(null==y&&(y=O()),b=n[m]&&n[m][y]),void 0===b||!b.length||!b[0]){var N="";for(f in P=[],n[m])this.terminals_[f]&&f>2&&P.push("'"+this.terminals_[f]+"'");N=T.showPosition?"Parse error on line "+(l+1)+":\n"+T.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(N,{text:T.match,token:this.terminals_[y]||y,line:T.yylineno,loc:u,expected:P})}if(b[0]instanceof Array&&b.length>1)throw Error("Parse Error: multiple actions possible at state: "+m+", token: "+y);switch(b[0]){case 1:a.push(y),i.push(T.yytext),s.push(T.yylloc),a.push(b[1]),y=null,x?(y=x,x=null):(d=T.yyleng,o=T.yytext,l=T.yylineno,u=T.yylloc,h>0&&h--);break;case 2:if(R=this.productions_[b[1]][1],D.$=i[i.length-R],D._$={first_line:s[s.length-(R||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(R||1)].first_column,last_column:s[s.length-1].last_column},_&&(D._$.range=[s[s.length-(R||1)].range[0],s[s.length-1].range[1]]),void 0!==(I=this.performAction.apply(D,[o,d,l,E,b[1],i,s].concat(p))))return I;R&&(a=a.slice(0,-1*R*2),i=i.slice(0,-1*R),s=s.slice(0,-1*R)),a.push(this.productions_[b[1]][0]),i.push(D.$),s.push(D._$),L=n[a[a.length-2]][a[a.length-1]],a.push(L);break;case 3:return!0}}return!0},"parse")};function tx(){this.yy={}}return ty.lexer={EOF:1,parseError:(0,c.K2)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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),a.length-1&&(this.yylineno-=a.length-1);var i=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:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var a,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var s in i)this[s]=i[s];return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,a,r,i=this._currentRules(),s=0;s<i.length;s++)if((a=this._input.match(this.rules[i[s]]))&&(!e||a[0].length>e[0].length)){if(e=a,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[s])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(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:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)(function(t,e,a,r){switch(a){case 0:case 59:case 92:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:case 60:return e.yytext=e.yytext.trim(),73;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 13:return e.yytext=e.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return e.yytext=e.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;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;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";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 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:case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;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]+(?=@\{))/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\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[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}}},(0,c.K2)(tx,"Parser"),tx.prototype=ty,ty.Parser=tx,new tx}();h.parser=h;var p={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},T={FILLED:0,OPEN:1},E={LEFTOF:0,RIGHTOF:1,OVER:2},g=class{constructor(){this.state=new s.m(()=>({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=o.SV,this.setAccDescription=o.EI,this.setDiagramTitle=o.ke,this.getAccTitle=o.iN,this.getAccDescription=o.m7,this.getDiagramTitle=o.ab,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,o.D7)().wrap),this.LINETYPE=p,this.ARROWTYPE=T,this.PLACEMENT=E}static{(0,c.K2)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,a,i,s){let n,o=this.state.records.currentBox;if(void 0!==s){let t;t=s.includes("\n")?s+"\n":"{\n"+s+"\n}",n=(0,r.H)(t,{schema:r.r})}i=n?.type??i,n?.alias&&(!a||a.text===e)&&(a={text:n.alias,wrap:a?.wrap,type:i});let c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=c.box?c.box:this.state.records.currentBox,c.box=o,c&&e===c.name&&null==a)return}if(a?.text==null&&(a={text:e,type:i}),(null==i||null==a.text)&&(a={text:e,type:i}),this.state.records.actors.set(t,{box:o,name:e,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){let e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:r})}addSignal(t,e,a,r,i=!1,s){if(r===this.LINETYPE.ACTIVE_END&&1>this.activationCount(t??"")){let e=Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:i,centralConnection:s??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.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(t){return this.state.records.actors.get(t)}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(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();let e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(0,o.D7)().sequence?.wrap??!1}clear(){this.state.reset(),(0,o.IU)()}parseMessage(t){let e=t.trim(),{wrap:a,cleanedText:r}=this.extractWrap(e),i={text:r,wrap:a};return c.Rm.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{let e=new Option().style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}let{wrap:i,cleanedText:s}=this.extractWrap(r);return{text:s?(0,o.jZ)(s,(0,o.D7)()):void 0,color:a,wrap:i}}addNote(t,e,a){let r={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},i=[].concat(t,t);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:e})}addLinks(t,e){let a=this.getActor(t);try{let t=(0,o.jZ)(e.text,(0,o.D7)());t=(t=t.replace(/=/g,"=")).replace(/&/g,"&");let r=JSON.parse(t);this.insertLinks(a,r)}catch(t){c.Rm.error("error while parsing actor link text",t)}}addALink(t,e){let a=this.getActor(t);try{let t={},r=(0,o.jZ)(e.text,(0,o.D7)()),i=r.indexOf("@"),s=(r=(r=r.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,i-1).trim(),n=r.slice(i+1).trim();t[s]=n,this.insertLinks(a,t)}catch(t){c.Rm.error("error while parsing actor link text",t)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(let a in e)t.links[a]=e[a]}addProperties(t,e){let a=this.getActor(t);try{let t=(0,o.jZ)(e.text,(0,o.D7)()),r=JSON.parse(t);this.insertProperties(a,r)}catch(t){c.Rm.error("error while parsing actor properties text",t)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(let a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){let a=this.getActor(t),r=document.getElementById(e.text);try{let t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(t){c.Rm.error("error while parsing actor details text",t)}}getActorProperty(t,e){if(t?.properties!==void 0)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw 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=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"centralConnection":case"centralConnectionReverse":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated)if(t.to!==this.state.records.lastCreated)throw Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");else this.state.records.lastCreated=void 0;else if(this.state.records.lastDestroyed)if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");else this.state.records.lastDestroyed=void 0;this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,o.SV)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,o.D7)().sequence}},u=(0,c.K2)(t=>{let e=t.dropShadow??"none",{look:a}=(0,o.D7)();return`.actor {
|
|
2
|
+
stroke: ${t.actorBorder};
|
|
3
|
+
fill: ${t.actorBkg};
|
|
4
|
+
stroke-width: ${t.strokeWidth??1};
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
rect.actor.outer-path[data-look="neo"] {
|
|
8
|
+
filter: ${e};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
rect.note[data-look="neo"] {
|
|
12
|
+
stroke:${t.noteBorderColor};
|
|
13
|
+
fill:${t.noteBkgColor};
|
|
14
|
+
filter: ${e};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
text.actor > tspan {
|
|
18
|
+
fill: ${t.actorTextColor};
|
|
19
|
+
stroke: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.actor-line {
|
|
23
|
+
stroke: ${t.actorLineColor};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.innerArc {
|
|
27
|
+
stroke-width: 1.5;
|
|
28
|
+
stroke-dasharray: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.messageLine0 {
|
|
32
|
+
stroke-width: 1.5;
|
|
33
|
+
stroke-dasharray: none;
|
|
34
|
+
stroke: ${t.signalColor};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.messageLine1 {
|
|
38
|
+
stroke-width: 1.5;
|
|
39
|
+
stroke-dasharray: 2, 2;
|
|
40
|
+
stroke: ${t.signalColor};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[id$="-arrowhead"] path {
|
|
44
|
+
fill: ${t.signalColor};
|
|
45
|
+
stroke: ${t.signalColor};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.sequenceNumber {
|
|
49
|
+
fill: ${t.sequenceNumberColor};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[id$="-sequencenumber"] {
|
|
53
|
+
fill: ${t.signalColor};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[id$="-crosshead"] path {
|
|
57
|
+
fill: ${t.signalColor};
|
|
58
|
+
stroke: ${t.signalColor};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.messageText {
|
|
62
|
+
fill: ${t.signalTextColor};
|
|
63
|
+
stroke: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.labelBox {
|
|
67
|
+
stroke: ${t.labelBoxBorderColor};
|
|
68
|
+
fill: ${t.labelBoxBkgColor};
|
|
69
|
+
filter: ${"neo"===a?e:"none"};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.labelText, .labelText > tspan {
|
|
73
|
+
fill: ${t.labelTextColor};
|
|
74
|
+
stroke: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.loopText, .loopText > tspan {
|
|
78
|
+
fill: ${t.loopTextColor};
|
|
79
|
+
stroke: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.sectionTitle, .sectionTitle > tspan {
|
|
83
|
+
fill: ${t.loopTextColor};
|
|
84
|
+
stroke: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.loopLine {
|
|
88
|
+
stroke-width: 2px;
|
|
89
|
+
stroke-dasharray: 2, 2;
|
|
90
|
+
stroke: ${t.labelBoxBorderColor};
|
|
91
|
+
fill: ${t.labelBoxBorderColor};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.note {
|
|
95
|
+
//stroke: #decc93;
|
|
96
|
+
stroke: ${t.noteBorderColor};
|
|
97
|
+
fill: ${t.noteBkgColor};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.noteText, .noteText > tspan {
|
|
101
|
+
fill: ${t.noteTextColor};
|
|
102
|
+
stroke: none;
|
|
103
|
+
${t.noteFontWeight?`font-weight: ${t.noteFontWeight};`:""}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.activation0 {
|
|
107
|
+
fill: ${t.activationBkgColor};
|
|
108
|
+
stroke: ${t.activationBorderColor};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.activation1 {
|
|
112
|
+
fill: ${t.activationBkgColor};
|
|
113
|
+
stroke: ${t.activationBorderColor};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.activation2 {
|
|
117
|
+
fill: ${t.activationBkgColor};
|
|
118
|
+
stroke: ${t.activationBorderColor};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.actorPopupMenu {
|
|
122
|
+
position: absolute;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.actorPopupMenuPanel {
|
|
126
|
+
position: absolute;
|
|
127
|
+
fill: ${t.actorBkg};
|
|
128
|
+
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
129
|
+
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
|
130
|
+
}
|
|
131
|
+
.actor-man circle, line {
|
|
132
|
+
fill: ${t.actorBkg};
|
|
133
|
+
stroke-width: 2px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
g rect.rect {
|
|
137
|
+
filter: ${e};
|
|
138
|
+
stroke: ${t.nodeBorder};
|
|
139
|
+
}
|
|
140
|
+
`},"getStyles"),_="actor-top",O="actor-bottom",y="actor-box",x="actor-man",m=new Set(["redux-color","redux-dark-color"]),b=(0,c.K2)(function(t,e){let a=(0,i.tk)(t,e);return"neo"===(0,o.zj)().look&&a.attr("data-look","neo"),a},"drawRect"),I=(0,c.K2)(function(t,e,a,r,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};let s=e.links,n=e.actorCnt,o=e.rectData;var c="none";i&&(c="block !important");let l=t.append("g");l.attr("id","actor"+n+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",c);var h="";void 0!==o.class&&(h=" "+o.class);let p=o.width>a?o.width:a,T=l.append("rect");if(T.attr("class","actorPopupMenuPanel"+h),T.attr("x",o.x),T.attr("y",o.height),T.attr("fill",o.fill),T.attr("stroke",o.stroke),T.attr("width",p),T.attr("height",o.height),T.attr("rx",o.rx),T.attr("ry",o.ry),null!=s){var E=20;for(let t in s){var g=l.append("a"),u=(0,d.J)(s[t]);g.attr("xlink:href",u),g.attr("target","_blank"),te(r)(t,g,o.x+10,o.height+E,p,20,{class:"actor"},r),E+=30}}return T.attr("height",E),{height:o.height+E,width:p}},"drawPopup"),f=(0,c.K2)(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),R=(0,c.K2)(async function(t,e,a=null){let r=t.append("foreignObject"),i=await (0,o.dj)(e.text,(0,o.zj)()),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)),"noteText"===e.class){let a=t.node().firstChild;a.setAttribute("height",s.height+2*e.textMargin);let i=a.getBBox();r.attr("x",Math.round(i.x+i.width/2-s.width/2)).attr("y",Math.round(i.y+i.height/2-s.height/2))}else if(a){let{startx:t,stopx:i,starty:n}=a;if(t>i){let e=t;t=i,i=e}r.attr("x",Math.round(t+Math.abs(t-i)/2-s.width/2)),"loopText"===e.class?r.attr("y",Math.round(n)):r.attr("y",Math.round(n-s.height))}return[r]},"drawKatex"),L=(0,c.K2)(function(t,e){let a=0,r=0,i=e.text.split(o.Y2.lineBreakRegex),[s,l]=(0,n.I5)(e.fontSize),d=[],h=0,p=(0,c.K2)(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":p=(0,c.K2)(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":p=(0,c.K2)(()=>Math.round(e.y+(a+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":p=(0,c.K2)(()=>Math.round(e.y+(a+r+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[o,c]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==s&&(h=o*s);let i=t.append("text");i.attr("x",e.x),i.attr("y",p()),void 0!==e.anchor&&i.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&i.style("font-family",e.fontFamily),void 0!==l&&i.style("font-size",l),void 0!==e.fontWeight&&i.style("font-weight",e.fontWeight),void 0!==e.fill&&i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class),void 0!==e.dy?i.attr("dy",e.dy):0!==h&&i.attr("dy",h);let T=c||n.pe;if(e.tspan){let t=i.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(T)}else i.text(T);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(i._groups||i)[0][0].getBBox().height,a=r),d.push(i)}return d},"drawText"),P=(0,c.K2)(function(t,e){function a(t,e,a,r,i){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+r-i)+" "+(t+a-1.2*i)+","+(e+r)+" "+t+","+(e+r)}(0,c.K2)(a,"genPoints");let r=t.append("polygon");return r.attr("points",a(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,L(t,e),r},"drawLabel"),D=-1,N=(0,c.K2)((t,e,a,r)=>{t.select&&a.forEach(a=>{let i=e.get(a),s=t.select("#actor"+i.actorCnt);!r.mirrorActors&&i.stopy?s.attr("y2",i.stopy+i.height/2):r.mirrorActors&&s.attr("y2",i.stopy)})},"fixLifeLineHeights"),w=(0,c.K2)(function(t,e,a,r,s){let n=r?e.stopy:e.starty,c=e.x+e.width/2,l=n+e.height,{look:d,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower();var u=g;r||(D++,Object.keys(e.links||{}).length&&!a.forceMenus&&u.attr("onclick",f(`actor${D}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+D).attr("x1",c).attr("y1",l).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),u=g.append("g"),e.actorCnt=D,null!=e.links&&u.attr("id","root-"+D),"neo"===d&&u.attr("data-look","neo"));let x=(0,i.PB)();var I="actor";e.properties?.class?I=e.properties.class:x.fill="#eaeaea",r?I+=` ${O}`:I+=` ${_}`,x.x=e.x,x.y=n,x.width=e.width,x.height=e.height,x.class=I,x.rx=3,x.ry=3,x.name=e.name,"neo"===d&&(x.rx=6,x.ry=6);let R=b(u,x),L=s.get(e.name)??0;if(m.has(h)&&(R.style("stroke",E[L%E.length]),R.style("fill",T[L%E.length])),"neo"===d&&R.attr("filter","url(#drop-shadow)"),e.rectData=x,e.properties?.icon){let t=e.properties.icon.trim();"@"===t.charAt(0)?(0,i.CP)(u,x.x+x.width-20,x.y+10,t.substr(1)):(0,i.aC)(u,x.x+x.width-20,x.y+10,t)}r||(u.attr("data-et","participant"),u.attr("data-type","participant"),u.attr("data-id",e.name)),tt(a,(0,o.Wi)(e.description))(e.description,u,x.x,x.y,x.width,x.height,{class:`actor ${y}`},a);let P=e.height;if(R.node){let t=R.node().getBBox();e.height=t.height,P=t.height}return P},"drawActorTypeParticipant"),S=(0,c.K2)(function(t,e,a,r,s){let n=r?e.stopy:e.starty,c=e.x+e.width/2,l=n+e.height,{look:d,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower();var u=g;r||(D++,Object.keys(e.links||{}).length&&!a.forceMenus&&u.attr("onclick",f(`actor${D}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+D).attr("x1",c).attr("y1",l).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),u=g.append("g"),e.actorCnt=D,null!=e.links&&u.attr("id","root-"+D),"neo"===d&&u.attr("data-look","neo"));let x=(0,i.PB)();var I="actor";e.properties?.class?I=e.properties.class:x.fill="#eaeaea",r?I+=` ${O}`:I+=` ${_}`,x.x=e.x,x.y=n,x.width=e.width,x.height=e.height,x.class=I,x.name=e.name;let R={...x,x:x.x+-6,y:x.y+6,class:"actor"},L=b(u,x),P=b(u,R);e.rectData=x,"neo"===d&&u.attr("filter","url(#drop-shadow)");let N=s.get(e.name)??0;if(m.has(h)&&(L.style("stroke",E[N%E.length]),L.style("fill",T[N%E.length]),P.style("stroke",E[N%E.length]),P.style("fill",T[N%E.length])),e.properties?.icon){let t=e.properties.icon.trim();"@"===t.charAt(0)?(0,i.CP)(u,x.x+x.width-20,x.y+10,t.substr(1)):(0,i.aC)(u,x.x+x.width-20,x.y+10,t)}tt(a,(0,o.Wi)(e.description))(e.description,u,x.x-6,x.y+6,x.width,x.height,{class:`actor ${y}`},a);let w=e.height;if(L.node){let t=L.node().getBBox();e.height=t.height,w=t.height}return r||(u.attr("data-et","participant"),u.attr("data-type","collections"),u.attr("data-id",e.name)),w},"drawActorTypeCollections"),A=(0,c.K2)(function(t,e,a,r,s){let n=r?e.stopy:e.starty,c=e.x+e.width/2,l=n+e.height,{look:d,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower(),u=g;r||(D++,Object.keys(e.links||{}).length&&!a.forceMenus&&u.attr("onclick",f(`actor${D}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+D).attr("x1",c).attr("y1",l).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),u=g.append("g"),e.actorCnt=D,null!=e.links&&u.attr("id","root-"+D),"neo"===d&&u.attr("data-look","neo"));let x=(0,i.PB)(),b="actor";e.properties?.class?b=e.properties.class:x.fill="#eaeaea",r?b+=` ${O}`:b+=` ${_}`,u.attr("class",b),x.x=e.x,x.y=n,x.width=e.width,x.height=e.height,x.name=e.name;let I=x.height/2,R=I/(2.5+x.height/50),L=u.append("g"),P=u.append("g"),N=`M ${x.x},${x.y+I}
|
|
141
|
+
a ${R},${I} 0 0 0 0,${x.height}
|
|
142
|
+
h ${x.width-2*R}
|
|
143
|
+
a ${R},${I} 0 0 0 0,-${x.height}
|
|
144
|
+
Z
|
|
145
|
+
`;L.append("path").attr("d",N),P.append("path").attr("d",`M ${x.x},${x.y+I}
|
|
146
|
+
a ${R},${I} 0 0 0 0,${x.height}`),L.attr("transform",`translate(${R}, ${-(x.height/2)})`),P.attr("transform",`translate(${x.width-R}, ${-x.height/2})`),e.rectData=x,"neo"===d&&L.attr("filter","url(#drop-shadow)");let w=s.get(e.name)??0;if(m.has(h)&&(L.style("stroke",E[w%E.length]),L.style("fill",T[w%E.length]),P.style("stroke",E[w%E.length]),P.style("fill",T[w%E.length])),e.properties?.icon){let t=e.properties.icon.trim(),a=x.x+x.width-20,r=x.y+10;"@"===t.charAt(0)?(0,i.CP)(u,a,r,t.substr(1)):(0,i.aC)(u,a,r,t)}tt(a,(0,o.Wi)(e.description))(e.description,u,x.x,x.y,x.width,x.height,{class:`actor ${y}`},a);let S=e.height,A=L.select("path:last-child");if(A.node()){let t=A.node().getBBox();e.height=t.height,S=t.height}return r||(u.attr("data-et","participant"),u.attr("data-type","queue"),u.attr("data-id",e.name)),S},"drawActorTypeQueue"),k=(0,c.K2)(function(t,e,a,r,s,n){let c=r?e.stopy:e.starty,l=e.x+e.width/2,d=c+75,{look:h,theme:p,themeVariables:T}=a,{bkgColorArray:E,borderColorArray:g,actorBorder:u,actorBkg:y}=T,b=t.append("g").lower();r||(D++,b.append("line").attr("id","actor"+D).attr("x1",l).attr("y1",d).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=D);let I=t.append("g"),f=x;r?f+=` ${O}`:f+=` ${_}`,I.attr("class",f),I.attr("name",e.name);let R=(0,i.PB)();R.x=e.x,R.y=c,R.fill="#eaeaea",R.width=e.width,R.height=e.height,R.class="actor";let L=e.x+e.width/2,P=c+32;I.append("defs").append("marker").attr("id",s+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),I.append("circle").attr("cx",L).attr("cy",P).attr("r",22).attr("filter",`${"neo"===h?"url(#drop-shadow)":""}`),I.append("line").attr("marker-end","url(#"+s+"-filled-head-control)").attr("transform",`translate(${L}, ${P-22})`);let N=n.get(e.name)??0;return m.has(p)?(I.style("stroke",g[N%g.length]),I.style("fill",E[N%g.length])):(I.style("stroke",u),I.style("fill",y)),e.height=I.node().getBBox().height+2*(a?.sequence?.labelBoxHeight??0),tt(a,(0,o.Wi)(e.description))(e.description,I,R.x,R.y+22+(r?5:12),R.width,R.height,{class:`actor ${x}`},a),r||(I.attr("data-et","participant"),I.attr("data-type","control"),I.attr("data-id",e.name)),e.height},"drawActorTypeControl"),M=(0,c.K2)(function(t,e,a,r,s){let n=r?e.stopy:e.starty,c=e.x+e.width/2,l=n+75,{look:d,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower(),u=t.append("g"),y="actor";r?y+=` ${O}`:y+=` ${_}`,u.attr("class",y),u.attr("name",e.name);let b=(0,i.PB)();b.x=e.x,b.y=n,b.fill="#eaeaea",b.width=e.width,b.height=e.height,b.class="actor";let I=e.x+e.width/2,f=n+(r?10:25);u.append("circle").attr("cx",I).attr("cy",f).attr("r",22).attr("width",e.width).attr("height",e.height),u.append("line").attr("x1",I-22).attr("x2",I+22).attr("y1",f+22).attr("y2",f+22).attr("stroke-width",2),"neo"===d&&u.attr("filter","url(#drop-shadow)");let R=s.get(e.name)??0;return m.has(h)&&(u.style("stroke",E[R%E.length]),u.style("fill",T[R%E.length])),e.height=u.node().getBBox().height+(a?.sequence?.labelBoxHeight??0),r||(D++,g.append("line").attr("id","actor"+D).attr("x1",c).attr("y1",l).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=D),tt(a,(0,o.Wi)(e.description))(e.description,u,b.x,b.y+(r?15:30),b.width,b.height,{class:`actor ${x}`},a),r?u.attr("transform","translate(0, 22)"):(u.attr("transform","translate(0, 6)"),u.attr("data-et","participant"),u.attr("data-type","entity"),u.attr("data-id",e.name)),e.height},"drawActorTypeEntity"),C=(0,c.K2)(function(t,e,a,r,s){let n=r?e.stopy:e.starty,c=e.x+e.width/2,l=n+e.height+2*a.boxTextMargin,{theme:d,themeVariables:h,look:p}=a,{bkgColorArray:T,borderColorArray:E,actorBorder:g}=h,u=t.append("g").lower(),x=u;r||(D++,Object.keys(e.links||{}).length&&!a.forceMenus&&x.attr("onclick",f(`actor${D}_popup`)).attr("cursor","pointer"),x.append("line").attr("id","actor"+D).attr("x1",c).attr("y1",l).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),x=u.append("g"),e.actorCnt=D,null!=e.links&&x.attr("id","root-"+D),"neo"===p&&x.attr("data-look","neo"));let b=(0,i.PB)(),I="actor";e.properties?.class?I=e.properties.class:b.fill="#eaeaea",r?I+=` ${O}`:I+=` ${_}`,b.x=e.x,b.y=n,b.width=e.width,b.height=e.height,b.class=I,b.name=e.name,b.x=e.x,b.y=n;let R=b.width/3,L=b.width/3,P=R/2,N=P/(2.5+R/50),w=x.append("g");w.attr("class",I);let S=`
|
|
147
|
+
M ${b.x},${b.y+N}
|
|
148
|
+
a ${P},${N} 0 0 0 ${R},0
|
|
149
|
+
a ${P},${N} 0 0 0 -${R},0
|
|
150
|
+
l 0,${L-2*N}
|
|
151
|
+
a ${P},${N} 0 0 0 ${R},0
|
|
152
|
+
l 0,-${L-2*N}
|
|
153
|
+
`;w.append("path").attr("d",S),"neo"===p&&w.attr("filter","url(#drop-shadow)");let A=s.get(e.name)??0;m.has(d)?(w.style("stroke",E[A%E.length]),w.style("fill",T[A%E.length])):w.style("stroke",g),w.attr("transform",`translate(${R}, ${N})`),e.rectData=b,tt(a,(0,o.Wi)(e.description))(e.description,x,b.x,b.y+35,b.width,b.height,{class:`actor ${y}`},a);let k=w.select("path:last-child");return k.node()&&(e.height=k.node().getBBox().height+(a.sequence.labelBoxHeight??0)),r||(x.attr("data-et","participant"),x.attr("data-type","database"),x.attr("data-id",e.name)),e.height},"drawActorTypeDatabase"),v=(0,c.K2)(function(t,e,a,r,s){let n=r?e.stopy:e.starty,c=e.x+e.width/2,l=n+80,d=t.append("g").lower(),{look:h,theme:p,themeVariables:T}=a,{bkgColorArray:E,borderColorArray:g,actorBorder:u}=T;r||(D++,d.append("line").attr("id","actor"+D).attr("x1",c).attr("y1",l).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=D);let y=t.append("g"),b=x;r?b+=` ${O}`:b+=` ${_}`,y.attr("class",b),y.attr("name",e.name);let I=(0,i.PB)();I.x=e.x,I.y=n,I.fill="#eaeaea",I.width=e.width,I.height=e.height,I.class="actor",y.append("line").attr("id","actor-man-torso"+D).attr("x1",e.x+e.width/2-55).attr("y1",n+12).attr("x2",e.x+e.width/2-15).attr("y2",n+12),y.append("line").attr("id","actor-man-arms"+D).attr("x1",e.x+e.width/2-55).attr("y1",n+2).attr("x2",e.x+e.width/2-55).attr("y2",n+22),y.append("circle").attr("cx",e.x+e.width/2).attr("cy",n+12).attr("r",22),"neo"===h&&y.attr("filter","url(#drop-shadow)");let f=s.get(e.name)??0;return m.has(p)?(y.style("stroke",g[f%g.length]),y.style("fill",E[f%g.length])):y.style("stroke",u),e.height=y.node().getBBox().height+(a.sequence.labelBoxHeight??0),tt(a,(0,o.Wi)(e.description))(e.description,y,I.x,I.y+15,I.width,I.height,{class:`actor ${x}`},a),y.attr("transform","translate(0,21)"),r||(y.attr("data-et","participant"),y.attr("data-type","boundary"),y.attr("data-id",e.name)),e.height},"drawActorTypeBoundary"),Y=(0,c.K2)(function(t,e,a,r,s){let n=r?e.stopy:e.starty,c=e.x+e.width/2,{look:l,theme:d,themeVariables:h}=a,{bkgColorArray:p,borderColorArray:T,actorBorder:E}=h,g=t.append("g").lower();r||(D++,g.append("line").attr("id","actor"+D).attr("x1",c).attr("y1",n+80).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=D);let u=t.append("g"),y=x;r?y+=` ${O}`:y+=` ${_}`,u.attr("class",y),u.attr("name",e.name),r||u.attr("data-et","participant").attr("data-type","actor").attr("data-id",e.name);let b="neo"===l?.5:1,I="neo"===l?n+(1-b)*30:n;u.append("line").attr("id","actor-man-torso"+D).attr("x1",c).attr("y1",I+25*b).attr("x2",c).attr("y2",I+45*b),u.append("line").attr("id","actor-man-arms"+D).attr("x1",c-18*b).attr("y1",I+33*b).attr("x2",c+18*b).attr("y2",I+33*b),u.append("line").attr("x1",c-18*b).attr("y1",I+60*b).attr("x2",c).attr("y2",I+45*b),u.append("line").attr("x1",c).attr("y1",I+45*b).attr("x2",c+16*b).attr("y2",I+60*b);let f=u.append("circle");f.attr("cx",e.x+e.width/2),f.attr("cy",I+10*b),f.attr("r",15*b),f.attr("width",e.width*b),f.attr("height",e.height*b),e.height=u.node().getBBox().height;let R=(0,i.PB)();R.x=e.x,R.y=I,R.fill="#eaeaea",R.width=e.width,R.height=e.height/b,R.class="actor",R.rx=3,R.ry=3;let L=s.get(e.name)??0;return m.has(d)?(u.style("stroke",T[L%T.length]),u.style("fill",p[L%T.length])):u.style("stroke",E),tt(a,(0,o.Wi)(e.description))(e.description,u,R.x,I+35*b-10*("neo"===l),R.width,R.height,{class:`actor ${x}`},a),e.height},"drawActorTypeActor"),B=(0,c.K2)(async function(t,e,a,r,i,s,n){let o=n??new Map([...s.db.getActors().values()].map((t,e)=>[t.name,e]));switch(e.type){case"actor":return await Y(t,e,a,r,o);case"participant":return await w(t,e,a,r,o);case"boundary":return await v(t,e,a,r,o);case"control":return await k(t,e,a,r,i,o);case"entity":return await M(t,e,a,r,o);case"database":return await C(t,e,a,r,o);case"collections":return await S(t,e,a,r,o);case"queue":return await A(t,e,a,r,o)}},"drawActor"),K=(0,c.K2)(function(t,e,a){let r=t.append("g");F(r,e),e.name&&tt(a)(e.name,r,e.x,e.y+a.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),r.lower()},"drawBox"),$=(0,c.K2)(function(t){return t.append("g")},"anchorElement"),V=(0,c.K2)(function(t,e,a,r,s,n,o){let{theme:c,themeVariables:l}=r,{bkgColorArray:d,borderColorArray:h,mainBkg:p}=l,T=(0,i.PB)(),E=e.anchored,g=e.actor;T.x=e.startx,T.y=e.starty,T.class="activation"+s%3,T.width=e.stopx-e.startx,T.height=a-e.starty;let u=b(E,T),_=(o??new Map([...n.db.getActors().values()].map((t,e)=>[t.name,e]))).get(g)??0;m.has(c)&&(u.style("stroke",h[_%h.length]),u.style("fill",d[_%h.length]??p))},"drawActivation"),W=(0,c.K2)(async function(t,e,a,r,s){let{boxMargin:n,boxTextMargin:l,labelBoxHeight:d,labelBoxWidth:h,messageFontFamily:p,messageFontSize:T,messageFontWeight:E}=r,g=t.append("g").attr("data-et","control-structure").attr("data-id","i"+s.id),u=(0,c.K2)(function(t,e,a,r){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")},"drawLoopLine");u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")});let _=(0,i.HT)();_.text=a,_.x=e.startx,_.y=e.starty,_.fontFamily=p,_.fontSize=T,_.fontWeight=E,_.anchor="middle",_.valign="middle",_.tspan=!1,_.width=Math.max(h??0,50),_.height=d+15*("neo"===r.look)||20,_.textMargin=l,_.class="labelText",P(g,_),(_=J()).text=e.title,_.x=e.startx+h/2+(e.stopx-e.startx)/2,_.y=e.starty+n+l,_.anchor="middle",_.valign="middle",_.textMargin=l,_.class="loopText",_.fontFamily=p,_.fontSize=T,_.fontWeight=E,_.wrap=!0;let O=(0,o.Wi)(_.text)?await R(g,_,e):L(g,_);if(void 0!==e.sectionTitles){for(let[t,a]of Object.entries(e.sectionTitles))if(a.message){_.text=a.message,_.x=e.startx+(e.stopx-e.startx)/2,_.y=e.sections[t].y+n+l,_.class="sectionTitle",_.anchor="middle",_.valign="middle",_.tspan=!1,_.fontFamily=p,_.fontSize=T,_.fontWeight=E,_.wrap=e.wrap,(0,o.Wi)(_.text)?(e.starty=e.sections[t].y,await R(g,_,e)):L(g,_);let r=Math.round(O.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));e.sections[t].height+=r-(n+l)}}return e.height=Math.round(e.stopy-e.starty),g},"drawLoop"),F=(0,c.K2)(function(t,e){(0,i.lC)(t,e)},"drawBackgroundRect"),q=(0,c.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),H=(0,c.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),z=(0,c.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),j=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),U=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),G=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),X=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Z=(0,c.K2)(function(t,e){let{theme:a}=e;t.append("defs").append("filter").attr("id","drop-shadow").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",`${"redux"===a||"redux-color"===a?"#000000":"#FFFFFF"}`)},"insertDropShadow"),J=(0,c.K2)(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"),Q=(0,c.K2)(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),tt=function(){function t(t,e,a,r,s,n,o){i(e.append("text").attr("x",a+s/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,r,s,c,l,d){let{actorFontSize:h,actorFontFamily:p,actorFontWeight:T}=d,[E,g]=(0,n.I5)(h),u=t.split(o.Y2.lineBreakRegex);for(let t=0;t<u.length;t++){let n=t*E-E*(u.length-1)/2,o=e.append("text").attr("x",a+s/2).attr("y",r).style("text-anchor","middle").style("font-size",g).style("font-weight",T).style("font-family",p);o.append("tspan").attr("x",a+s/2).attr("dy",n).text(u[t]),o.attr("y",r+c/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(o,l)}}function a(t,a,r,s,n,o,c,l){let d=a.append("switch"),h=d.append("foreignObject").attr("x",r).attr("y",s).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,r,s,n,o,c,l),i(h,c)}async function r(t,a,r,s,n,c,l,d){let h=await (0,o.Dl)(t,(0,o.zj)()),p=a.append("switch"),T=p.append("foreignObject").attr("x",r+n/2-h.width/2).attr("y",s+c/2-h.height/2).attr("width",h.width).attr("height",h.height).append("xhtml:div").style("height","100%").style("width","100%");T.append("div").style("text-align","center").style("vertical-align","middle").html(await (0,o.dj)(t,(0,o.zj)())),e(t,p,r,s,n,c,l,d),i(T,l)}function i(t,e){for(let a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return(0,c.K2)(t,"byText"),(0,c.K2)(e,"byTspan"),(0,c.K2)(a,"byFo"),(0,c.K2)(r,"byKatex"),(0,c.K2)(i,"_setTextAttrs"),function(i,s=!1){return s?r:"fo"===i.textPlacement?a:"old"===i.textPlacement?t:e}}(),te=function(){function t(t,e,a,i,s,n,o){r(e.append("text").attr("x",a).attr("y",i).style("text-anchor","start").text(t),o)}function e(t,e,a,i,s,n,c,l){let{actorFontSize:d,actorFontFamily:h,actorFontWeight:p}=l,T=t.split(o.Y2.lineBreakRegex);for(let t=0;t<T.length;t++){let s=t*d-d*(T.length-1)/2,o=e.append("text").attr("x",a).attr("y",i).style("text-anchor","start").style("font-size",d).style("font-weight",p).style("font-family",h);o.append("tspan").attr("x",a).attr("dy",s).text(T[t]),o.attr("y",i+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(o,c)}}function a(t,a,i,s,n,o,c,l){let d=a.append("switch"),h=d.append("foreignObject").attr("x",i).attr("y",s).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,i,s,n,o,c,l),r(h,c)}function r(t,e){for(let a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return(0,c.K2)(t,"byText"),(0,c.K2)(e,"byTspan"),(0,c.K2)(a,"byFo"),(0,c.K2)(r,"_setTextAttrs"),function(r){return"fo"===r.textPlacement?a:"old"===r.textPlacement?t:e}}(),ta=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),tr=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-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"),ti=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),ts=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),tn={drawRect:b,drawText:L,drawLabel:P,drawActor:B,drawBox:K,drawPopup:I,anchorElement:$,drawActivation:V,drawLoop:W,drawBackgroundRect:F,insertArrowHead:j,insertArrowFilledHead:U,insertSequenceNumber:G,insertArrowCrossHead:X,insertDatabaseIcon:q,insertComputerIcon:H,insertClockIcon:z,getTextObj:J,getNoteRect:Q,fixLifeLineHeights:N,sanitizeUrl:d.J,insertDropShadow:Z,insertSolidTopArrowHead:ta,insertSolidBottomArrowHead:tr,insertStickTopArrowHead:ti,insertStickBottomArrowHead:ts},to={},tc={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:(0,c.K2)(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(t=>t.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:(0,c.K2)(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:(0,c.K2)(function(t){this.boxes.push(t)},"addBox"),addActor:(0,c.K2)(function(t){this.actors.push(t)},"addActor"),addLoop:(0,c.K2)(function(t){this.loops.push(t)},"addLoop"),addMessage:(0,c.K2)(function(t){this.messages.push(t)},"addMessage"),addNote:(0,c.K2)(function(t){this.notes.push(t)},"addNote"),lastActor:(0,c.K2)(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:(0,c.K2)(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:(0,c.K2)(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:(0,c.K2)(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,c.K2)(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,ty((0,o.D7)())},"init"),updateVal:(0,c.K2)(function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])},"updateVal"),updateBounds:(0,c.K2)(function(t,e,a,r){let i=this,s=0;function n(n){return(0,c.K2)(function(o){s++;let c=i.sequenceItems.length-s+1;i.updateVal(o,"starty",e-c*to.boxMargin,Math.min),i.updateVal(o,"stopy",r+c*to.boxMargin,Math.max),i.updateVal(tc.data,"startx",t-c*to.boxMargin,Math.min),i.updateVal(tc.data,"stopx",a+c*to.boxMargin,Math.max),"activation"!==n&&(i.updateVal(o,"startx",t-c*to.boxMargin,Math.min),i.updateVal(o,"stopx",a+c*to.boxMargin,Math.max),i.updateVal(tc.data,"starty",e-c*to.boxMargin,Math.min),i.updateVal(tc.data,"stopy",r+c*to.boxMargin,Math.max))},"updateItemBounds")}(0,c.K2)(n,"updateFn"),this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))},"updateBounds"),insert:(0,c.K2)(function(t,e,a,r){let i=o.Y2.getMin(t,a),s=o.Y2.getMax(t,a),n=o.Y2.getMin(e,r),c=o.Y2.getMax(e,r);this.updateVal(tc.data,"startx",i,Math.min),this.updateVal(tc.data,"starty",n,Math.min),this.updateVal(tc.data,"stopx",s,Math.max),this.updateVal(tc.data,"stopy",c,Math.max),this.updateBounds(i,n,s,c)},"insert"),newActivation:(0,c.K2)(function(t,e,a){let r=a.get(t.from),i=tx(t.from).length||0,s=r.x+r.width/2+(i-1)*to.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+to.activationWidth,stopy:void 0,actor:t.from,anchored:tn.anchorElement(e)})},"newActivation"),endActivation:(0,c.K2)(function(t){let e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:(0,c.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:(0,c.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:(0,c.K2)(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:(0,c.K2)(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:(0,c.K2)(function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:tc.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:(0,c.K2)(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:(0,c.K2)(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:(0,c.K2)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=o.Y2.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:(0,c.K2)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,c.K2)(function(){return{bounds:this.data,models:this.models}},"getBounds")},tl=(0,c.K2)(async function(t,e,a){tc.bumpVerticalPos(to.boxMargin),e.height=to.boxMargin,e.starty=tc.getVerticalPos();let r=(0,i.PB)();r.x=e.startx,r.y=e.starty,r.width=e.width||to.width,r.class="note";let s=t.append("g");s.attr("data-et","note"),s.attr("data-id","i"+a);let n=tn.drawRect(s,r),c=(0,i.HT)();c.x=e.startx,c.y=e.starty,c.width=r.width,c.dy="1em",c.text=e.message,c.class="noteText",c.fontFamily=to.noteFontFamily,c.fontSize=to.noteFontSize,c.fontWeight=to.noteFontWeight,c.anchor=to.noteAlign,c.textMargin=to.noteMargin,c.valign="center";let l=Math.round(((0,o.Wi)(c.text)?await R(s,c):L(s,c)).map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));n.attr("height",l+2*to.noteMargin),e.height+=l+2*to.noteMargin,tc.bumpVerticalPos(l+2*to.noteMargin),e.stopy=e.starty+l+2*to.noteMargin,e.stopx=e.startx+r.width,tc.insert(e.startx,e.starty,e.stopx,e.stopy),tc.models.addNote(e)},"drawNote"),td=(0,c.K2)(function(t,e,a,r,i,s,n){let o=r.db.getActors(),l=o.get(e.from),d=o.get(e.to),h=a.sequenceVisible,p=l.x+l.width/2,T=d.x+d.width/2,E=p<=T,g=tS(e,r),u=t.append("g"),_=(0,c.K2)((t,e)=>{let a=t?16.5:-16.5;return e?-a:a},"getCircleOffset"),O=(0,c.K2)(t=>{u.append("circle").attr("cx",t).attr("cy",n).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:y,CENTRAL_CONNECTION_REVERSE:x,CENTRAL_CONNECTION_DUAL:m}=r.db.LINETYPE;if(h)switch(e.centralConnection){case y:g&&(T+=_(E,!0));break;case x:g||(p+=_(E,!1));break;case m:g?T+=_(E,!0):p+=_(E,!1)}switch(e.centralConnection){case y:O(T);break;case x:O(p);break;case m:O(p),O(T)}},"drawCentralConnection"),th=(0,c.K2)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),tp=(0,c.K2)(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),tT=(0,c.K2)(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function tE(t,e){let a;tc.bumpVerticalPos(10);let{startx:r,stopx:i,message:s}=e,c=o.Y2.splitBreaks(s).length,l=(0,o.Wi)(s),d=l?await (0,o.Dl)(s,(0,o.D7)()):n._K.calculateTextDimensions(s,th(to));if(!l){let t=d.height/c;e.height+=t,tc.bumpVerticalPos(t)}let h=d.height-10,p=d.width;if(r===i){a=tc.getVerticalPos()+h,to.rightAngles||(h+=to.boxMargin,a=tc.getVerticalPos()+h),h+=30;let t=o.Y2.getMax(p/2,to.width/2);tc.insert(r-t,tc.getVerticalPos()-10+h,i+t,tc.getVerticalPos()+30+h)}else h+=to.boxMargin,a=tc.getVerticalPos()+h,tc.insert(r,a-10,i,a);return tc.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,tc.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),a}(0,c.K2)(tE,"boundMessage");var tg=(0,c.K2)(async function(t,e,a,r,s,c){let l,{startx:d,stopx:h,starty:p,message:T,type:E,sequenceIndex:g,sequenceVisible:u}=e,_=n._K.calculateTextDimensions(T,th(to)),O=(0,i.HT)();O.x=Math.min(d,h),O.y=p+10,O.width=Math.abs(h-d),O.class="messageText",O.dy="1em",O.text=T,O.fontFamily=to.messageFontFamily,O.fontSize=to.messageFontSize,O.fontWeight=to.messageFontWeight,O.anchor=to.messageAlign,O.valign="center",O.textMargin=to.wrapPadding,O.tspan=!1,(0,o.Wi)(O.text)?await R(t,O,{startx:d,stopx:h,starty:a}):L(t,O);let y=_.width;if(d===h){let i=u||to.showSequenceNumbers,n=tS(s,r),c=tA(s,r),p=d+(i&&(n||c)?10:0);l=to.rightAngles?t.append("path").attr("d",`M ${p},${a} H ${d+o.Y2.getMax(to.width/2,y/2)} V ${a+25} H ${d}`):t.append("path").attr("d","M "+p+","+a+" C "+(p+60)+","+(a-10)+" "+(d+60)+","+(a+30)+" "+d+","+(a+20)),tN(s,r)&&td(t,s,e,r,d,h,a)}else(l=t.append("line")).attr("x1",d),l.attr("y1",a),l.attr("x2",h),l.attr("y2",a),tN(s,r)&&td(t,s,e,r,d,h,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?(l.style("stroke-dasharray","3, 3"),l.attr("class","messageLine1")):l.attr("class","messageLine0"),l.attr("data-et","message"),l.attr("data-id","i"+e.id),l.attr("data-from",e.from),l.attr("data-to",e.to);let x="";if(to.arrowMarkerAbsolute&&(x=(0,o.ID)(!0)),l.attr("stroke-width",2),l.attr("stroke","none"),l.style("fill","none"),(E===r.db.LINETYPE.SOLID_TOP||E===r.db.LINETYPE.SOLID_TOP_DOTTED)&&l.attr("marker-end","url("+x+"#"+c+"-solidTopArrowHead)"),(E===r.db.LINETYPE.SOLID_BOTTOM||E===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&l.attr("marker-end","url("+x+"#"+c+"-solidBottomArrowHead)"),(E===r.db.LINETYPE.STICK_TOP||E===r.db.LINETYPE.STICK_TOP_DOTTED)&&l.attr("marker-end","url("+x+"#"+c+"-stickTopArrowHead)"),(E===r.db.LINETYPE.STICK_BOTTOM||E===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&l.attr("marker-end","url("+x+"#"+c+"-stickBottomArrowHead)"),(E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&l.attr("marker-start","url("+x+"#"+c+"-solidBottomArrowHead)"),(E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&l.attr("marker-start","url("+x+"#"+c+"-solidTopArrowHead)"),(E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||E===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&l.attr("marker-start","url("+x+"#"+c+"-stickBottomArrowHead)"),(E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||E===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&l.attr("marker-start","url("+x+"#"+c+"-stickTopArrowHead)"),(E===r.db.LINETYPE.SOLID||E===r.db.LINETYPE.DOTTED)&&l.attr("marker-end","url("+x+"#"+c+"-arrowhead)"),(E===r.db.LINETYPE.BIDIRECTIONAL_SOLID||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(l.attr("marker-start","url("+x+"#"+c+"-arrowhead)"),l.attr("marker-end","url("+x+"#"+c+"-arrowhead)")),(E===r.db.LINETYPE.SOLID_POINT||E===r.db.LINETYPE.DOTTED_POINT)&&l.attr("marker-end","url("+x+"#"+c+"-filled-head)"),(E===r.db.LINETYPE.SOLID_CROSS||E===r.db.LINETYPE.DOTTED_CROSS)&&l.attr("marker-end","url("+x+"#"+c+"-crosshead)"),u||to.showSequenceNumbers){let i=E===r.db.LINETYPE.BIDIRECTIONAL_SOLID||E===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,n=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,o=tN(s,r),p=d,T=h;i?(p=d<h?d+12:d-6+(o?-5:0)+(s?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||s?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),l.attr("x1",p)):n?(h>d?T=h-12:(T=h-6,p+=s?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||s?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),T+=15*!!o,l.attr("x2",T),l.attr("x1",p)):l.attr("x1",d+6);let u=0,_=d===h,O=d<=h;u=_?e.fromBounds+1:n?O?e.toBounds-1:e.fromBounds+1:O?e.fromBounds+1:e.toBounds-1;let y="12px",m=g.toString().length;m>5?y="7px":m>3&&(y="9px"),t.append("line").attr("x1",u).attr("y1",a).attr("x2",u).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+x+"#"+c+"-sequencenumber)"),t.append("text").attr("x",u).attr("y",a+4).attr("font-family","sans-serif").attr("font-size",y).attr("text-anchor","middle").attr("class","sequenceNumber").text(g)}},"drawMessage"),tu=(0,c.K2)(function(t,e,a,r,i,s,n){let c,l=0,d=0,h=0;for(let t of r){let r=e.get(t),s=r.box;c&&c!=s&&(n||tc.models.addBox(c),d+=to.boxMargin+c.margin),s&&s!=c&&(n||(s.x=l+d,s.y=i),d+=s.margin),r.width=o.Y2.getMax(r.width||to.width,to.width),r.height=o.Y2.getMax(r.height||to.height,to.height),r.margin=r.margin||to.actorMargin,h=o.Y2.getMax(h,r.height),a.get(r.name)&&(d+=r.width/2),r.x=l+d,r.starty=tc.getVerticalPos(),tc.insert(r.x,i,r.x+r.width,r.height),l+=r.width+d,r.box&&(r.box.width=l+s.margin-r.box.x),d=r.margin,c=r.box,tc.models.addActor(r)}c&&!n&&tc.models.addBox(c),tc.bumpVerticalPos(h)},"addActorRenderingData"),t_=(0,c.K2)(async function(t,e,a,r,i,s,n){if(r){let r=0;for(let c of(tc.bumpVerticalPos(2*to.boxMargin),a)){let a=e.get(c);a.stopy||(a.stopy=tc.getVerticalPos());let l=await tn.drawActor(t,a,to,!0,i,s,n);r=o.Y2.getMax(r,l)}tc.bumpVerticalPos(r+to.boxMargin)}else for(let r of a){let a=e.get(r);await tn.drawActor(t,a,to,!1,i,s,n)}},"drawActors"),tO=(0,c.K2)(function(t,e,a,r){let i=0,s=0;for(let n of a){let a=e.get(n),o=tL(a),c=tn.drawPopup(t,a,o,to,to.forceMenus,r);c.height>i&&(i=c.height),c.width+a.x>s&&(s=c.width+a.x)}return{maxHeight:i,maxWidth:s}},"drawActorsPopup"),ty=(0,c.K2)(function(t){(0,o.hH)(to,t),t.fontFamily&&(to.actorFontFamily=to.noteFontFamily=to.messageFontFamily=t.fontFamily),t.fontSize&&(to.actorFontSize=to.noteFontSize=to.messageFontSize=t.fontSize),t.fontWeight&&(to.actorFontWeight=to.noteFontWeight=to.messageFontWeight=t.fontWeight)},"setConf"),tx=(0,c.K2)(function(t){return tc.activations.filter(function(e){return e.actor===t})},"actorActivations"),tm=(0,c.K2)(function(t,e){let a=e.get(t),r=tx(t);return[r.reduce(function(t,e){return o.Y2.getMin(t,e.startx)},a.x+a.width/2-1),r.reduce(function(t,e){return o.Y2.getMax(t,e.stopx)},a.x+a.width/2+1)]},"activationBounds");function tb(t,e,a,r,i){tc.bumpVerticalPos(a);let s=r;if(e.id&&e.message&&t[e.id]){let a=t[e.id].width,i=th(to);e.message=n._K.wrapLabel(`[${e.message}]`,a-2*to.wrapPadding,i),e.width=a,e.wrap=!0;let l=n._K.calculateTextDimensions(e.message,i),d=o.Y2.getMax(l.height,to.labelBoxHeight);s=r+d,c.Rm.debug(`${d} - ${e.message}`)}i(e),tc.bumpVerticalPos(s)}function tI(t,e,a,r,i,s,n){function o(a,r){a.x<i.get(t.from).x?(tc.insert(e.stopx-r,e.starty,e.startx,e.stopy+a.height/2+to.noteMargin),e.stopx=e.stopx+r):(tc.insert(e.startx,e.starty,e.stopx+r,e.stopy+a.height/2+to.noteMargin),e.stopx=e.stopx-r)}function l(a,r){a.x<i.get(t.to).x?(tc.insert(e.startx-r,e.starty,e.stopx,e.stopy+a.height/2+to.noteMargin),e.startx=e.startx+r):(tc.insert(e.stopx,e.starty,e.startx+r,e.stopy+a.height/2+to.noteMargin),e.startx=e.startx-r)}(0,c.K2)(o,"receiverAdjustment"),(0,c.K2)(l,"senderAdjustment");let d=["actor","control","entity","database"];if(s.get(t.to)==r){let e=i.get(t.to),r=d.includes(e.type)?21:e.width/2+3;o(e,r),e.starty=a-e.height/2,tc.bumpVerticalPos(e.height/2)}else if(n.get(t.from)==r){let e=i.get(t.from);if(to.mirrorActors){let t=d.includes(e.type)?18:e.width/2;l(e,t)}e.stopy=a-e.height/2,tc.bumpVerticalPos(e.height/2)}else if(n.get(t.to)==r){let e=i.get(t.to);if(to.mirrorActors){let t=d.includes(e.type)?21:e.width/2+3;o(e,t)}e.stopy=a-e.height/2,tc.bumpVerticalPos(e.height/2)}}(0,c.K2)(tb,"adjustLoopHeightForWrap"),(0,c.K2)(tI,"adjustCreatedDestroyedData");var tf=(0,c.K2)(async function(t,e,a,r){let i,{securityLevel:s,sequence:n,look:d}=(0,o.D7)();to=n,"sandbox"===s&&(i=(0,l.Ltv)("#i"+e));let h="sandbox"===s?(0,l.Ltv)(i.nodes()[0].contentDocument.body):(0,l.Ltv)("body"),p="sandbox"===s?i.nodes()[0].contentDocument:document;tc.init(),c.Rm.debug(r.db);let T="sandbox"===s?h.select(`[id="${e}"]`):(0,l.Ltv)(`[id="${e}"]`),E=r.db.getActors(),g=r.db.getCreatedActors(),u=r.db.getDestroyedActors(),_=r.db.getBoxes(),O=r.db.getActorKeys(),y=r.db.getMessages(),x=r.db.getDiagramTitle(),m=r.db.hasAtLeastOneBox(),b=r.db.hasAtLeastOneBoxWithTitle(),I=await tR(E,y,r);if(to.height=await tP(E,I,_),tn.insertComputerIcon(T,e),tn.insertDatabaseIcon(T,e),tn.insertClockIcon(T,e),m&&(tc.bumpVerticalPos(to.boxMargin),b&&tc.bumpVerticalPos(_[0].textMaxHeight)),!0===to.hideUnusedParticipants){let t=new Set;y.forEach(e=>{t.add(e.from),t.add(e.to)}),O=O.filter(e=>t.has(e))}let f=new Map(O.map((t,e)=>[E.get(t)?.name??t,e]));tu(T,E,g,O,0,y,!1);let R=await tM(y,E,I,r);function L(t,e){let a=tc.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),tn.drawActivation(T,a,e,to,tx(t.from).length,r,f),tc.insert(a.startx,e-10,a.stopx,e)}tn.insertArrowHead(T,e),tn.insertArrowCrossHead(T,e),tn.insertArrowFilledHead(T,e),tn.insertSequenceNumber(T,e),tn.insertSolidTopArrowHead(T,e),tn.insertSolidBottomArrowHead(T,e),tn.insertStickTopArrowHead(T,e),tn.insertStickBottomArrowHead(T,e),"neo"===d&&tn.insertDropShadow(T,to),(0,c.K2)(L,"activeEnd");let P=1,D=1,w=[],S=[],A=0;for(let t of y){let e,a,i;switch(t.type){case r.db.LINETYPE.NOTE:tc.resetVerticalPos(),a=t.noteModel,await tl(T,a,t.id);break;case r.db.LINETYPE.ACTIVE_START:case r.db.LINETYPE.CENTRAL_CONNECTION:case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:tc.newActivation(t,T,E);break;case r.db.LINETYPE.ACTIVE_END:L(t,tc.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:tb(R,t,to.boxMargin,to.boxMargin+to.boxTextMargin,t=>tc.newLoop(t));break;case r.db.LINETYPE.LOOP_END:e=tc.endLoop(),await tn.drawLoop(T,e,"loop",to,t),tc.bumpVerticalPos(e.stopy-tc.getVerticalPos()),tc.models.addLoop(e);break;case r.db.LINETYPE.RECT_START:tb(R,t,to.boxMargin,to.boxMargin,t=>tc.newLoop(void 0,t.message));break;case r.db.LINETYPE.RECT_END:e=tc.endLoop(),S.push(e),tc.models.addLoop(e),tc.bumpVerticalPos(e.stopy-tc.getVerticalPos());break;case r.db.LINETYPE.OPT_START:tb(R,t,to.boxMargin,to.boxMargin+to.boxTextMargin,t=>tc.newLoop(t));break;case r.db.LINETYPE.OPT_END:e=tc.endLoop(),await tn.drawLoop(T,e,"opt",to,t),tc.bumpVerticalPos(e.stopy-tc.getVerticalPos()),tc.models.addLoop(e);break;case r.db.LINETYPE.ALT_START:tb(R,t,to.boxMargin,to.boxMargin+to.boxTextMargin,t=>tc.newLoop(t));break;case r.db.LINETYPE.ALT_ELSE:tb(R,t,to.boxMargin+to.boxTextMargin,to.boxMargin,t=>tc.addSectionToLoop(t));break;case r.db.LINETYPE.ALT_END:e=tc.endLoop(),await tn.drawLoop(T,e,"alt",to,t),tc.bumpVerticalPos(e.stopy-tc.getVerticalPos()),tc.models.addLoop(e);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:tb(R,t,to.boxMargin,to.boxMargin+to.boxTextMargin,t=>tc.newLoop(t)),tc.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:tb(R,t,to.boxMargin+to.boxTextMargin,to.boxMargin,t=>tc.addSectionToLoop(t));break;case r.db.LINETYPE.PAR_END:e=tc.endLoop(),await tn.drawLoop(T,e,"par",to,t),tc.bumpVerticalPos(e.stopy-tc.getVerticalPos()),tc.models.addLoop(e);break;case r.db.LINETYPE.AUTONUMBER:P=t.message.start||P,D=t.message.step||D,t.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:tb(R,t,to.boxMargin,to.boxMargin+to.boxTextMargin,t=>tc.newLoop(t));break;case r.db.LINETYPE.CRITICAL_OPTION:tb(R,t,to.boxMargin+to.boxTextMargin,to.boxMargin,t=>tc.addSectionToLoop(t));break;case r.db.LINETYPE.CRITICAL_END:e=tc.endLoop(),await tn.drawLoop(T,e,"critical",to,t),tc.bumpVerticalPos(e.stopy-tc.getVerticalPos()),tc.models.addLoop(e);break;case r.db.LINETYPE.BREAK_START:tb(R,t,to.boxMargin,to.boxMargin+to.boxTextMargin,t=>tc.newLoop(t));break;case r.db.LINETYPE.BREAK_END:e=tc.endLoop(),await tn.drawLoop(T,e,"break",to,t),tc.bumpVerticalPos(e.stopy-tc.getVerticalPos()),tc.models.addLoop(e);break;default:try{(i=t.msgModel).starty=tc.getVerticalPos(),i.sequenceIndex=P,i.sequenceVisible=r.db.showSequenceNumbers(),i.id=t.id,i.from=t.from,i.to=t.to;let e=await tE(T,i);tI(t,i,e,A,E,g,u),w.push({messageModel:i,lineStartY:e,msg:t}),tc.models.addMessage(i)}catch(t){c.Rm.error("error while drawing message",t)}}[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(t.type)&&(P=Math.round((P+D)*100)/100),A++}for(let t of(c.Rm.debug("createdActors",g),c.Rm.debug("destroyedActors",u),await t_(T,E,O,!1,e,r,f),w))await tg(T,t.messageModel,t.lineStartY,r,t.msg,e);for(let t of(to.mirrorActors&&await t_(T,E,O,!0,e,r,f),S.forEach(t=>tn.drawBackgroundRect(T,t)),N(T,E,O,to),tc.models.boxes)){t.height=tc.getVerticalPos()-t.y,tc.insert(t.x,t.y,t.x+t.width,t.height);let e=2*to.boxMargin;t.startx=t.x-e,t.starty=t.y-.25*e,t.stopx=t.startx+t.width+2*e,t.stopy=t.starty+t.height+.75*e,t.stroke="rgb(0,0,0, 0.5)",tn.drawBox(T,t,to)}m&&tc.bumpVerticalPos(to.boxMargin);let k=tO(T,E,O,p),{bounds:M}=tc.getBounds();void 0===M.startx&&(M.startx=0),void 0===M.starty&&(M.starty=0),void 0===M.stopx&&(M.stopx=0),void 0===M.stopy&&(M.stopy=0);let C=M.stopy-M.starty;C<k.maxHeight&&(C=k.maxHeight);let v=C+2*to.diagramMarginY;to.mirrorActors&&(v=v-to.boxMargin+to.bottomMarginAdj);let Y=M.stopx-M.startx;Y<k.maxWidth&&(Y=k.maxWidth);let B=Y+2*to.diagramMarginX;x&&T.append("text").text(x).attr("x",(M.stopx-M.startx)/2-2*to.diagramMarginX).attr("y",-25),(0,o.a$)(T,v,B,to.useMaxWidth);let K=40*!!x,$=E.size&&"neo"===d?30:0;T.attr("viewBox",M.startx-to.diagramMarginX+" -"+(to.diagramMarginY+K)+" "+B+" "+(v+K+$)),c.Rm.debug("models:",tc.models)},"draw");async function tR(t,e,a){let r={};for(let i of e)if(t.get(i.to)&&t.get(i.from)){let e=t.get(i.to);if(i.placement===a.db.PLACEMENT.LEFTOF&&!e.prevActor||i.placement===a.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;let s=void 0!==i.placement,c=!s,l=s?tp(to):th(to),d=i.wrap?n._K.wrapLabel(i.message,to.width-2*to.wrapPadding,l):i.message,h=((0,o.Wi)(d)?await (0,o.Dl)(i.message,(0,o.D7)()):n._K.calculateTextDimensions(d,l)).width+2*to.wrapPadding;c&&i.from===e.nextActor?r[i.to]=o.Y2.getMax(r[i.to]||0,h):c&&i.from===e.prevActor?r[i.from]=o.Y2.getMax(r[i.from]||0,h):c&&i.from===i.to?(r[i.from]=o.Y2.getMax(r[i.from]||0,h/2),r[i.to]=o.Y2.getMax(r[i.to]||0,h/2)):i.placement===a.db.PLACEMENT.RIGHTOF?r[i.from]=o.Y2.getMax(r[i.from]||0,h):i.placement===a.db.PLACEMENT.LEFTOF?r[e.prevActor]=o.Y2.getMax(r[e.prevActor]||0,h):i.placement===a.db.PLACEMENT.OVER&&(e.prevActor&&(r[e.prevActor]=o.Y2.getMax(r[e.prevActor]||0,h/2)),e.nextActor&&(r[i.from]=o.Y2.getMax(r[i.from]||0,h/2)))}return c.Rm.debug("maxMessageWidthPerActor:",r),r}(0,c.K2)(tR,"getMaxMessageWidthPerActor");var tL=(0,c.K2)(function(t){let e=0,a=tT(to);for(let r in t.links){let t=n._K.calculateTextDimensions(r,a).width+2*to.wrapPadding+2*to.boxMargin;e<t&&(e=t)}return e},"getRequiredPopupWidth");async function tP(t,e,a){let r=0;for(let e of t.keys()){let a=t.get(e);a.wrap&&(a.description=n._K.wrapLabel(a.description,to.width-2*to.wrapPadding,tT(to)));let i=(0,o.Wi)(a.description)?await (0,o.Dl)(a.description,(0,o.D7)()):n._K.calculateTextDimensions(a.description,tT(to));a.width=a.wrap?to.width:o.Y2.getMax(to.width,i.width+2*to.wrapPadding),a.height=a.wrap?o.Y2.getMax(i.height,to.height):to.height,r=o.Y2.getMax(r,a.height)}for(let a in e){let r=t.get(a);if(!r)continue;let i=t.get(r.nextActor);if(!i){let t=e[a]+to.actorMargin-r.width/2;r.margin=o.Y2.getMax(t,to.actorMargin);continue}let s=e[a]+to.actorMargin-r.width/2-i.width/2;r.margin=o.Y2.getMax(s,to.actorMargin)}let i=0;return a.forEach(e=>{let a=th(to),r=e.actorKeys.reduce((e,a)=>e+=t.get(a).width+(t.get(a).margin||0),0);r+=8*to.boxMargin,r-=2*to.boxTextMargin,e.wrap&&(e.name=n._K.wrapLabel(e.name,r-2*to.wrapPadding,a));let s=n._K.calculateTextDimensions(e.name,a);i=o.Y2.getMax(s.height,i);let c=o.Y2.getMax(r,s.width+2*to.wrapPadding);if(e.margin=to.boxTextMargin,r<c){let t=(c-r)/2;e.margin+=t}}),a.forEach(t=>t.textMaxHeight=i),o.Y2.getMax(r,to.height)}(0,c.K2)(tP,"calculateActorMargins");var tD=(0,c.K2)(async function(t,e,a){let r=e.get(t.from),i=e.get(t.to),s=r.x,l=i.x,d=t.wrap&&t.message,h=(0,o.Wi)(t.message)?await (0,o.Dl)(t.message,(0,o.D7)()):n._K.calculateTextDimensions(d?n._K.wrapLabel(t.message,to.width,tp(to)):t.message,tp(to)),p={width:d?to.width:o.Y2.getMax(to.width,h.width+2*to.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(p.width=d?o.Y2.getMax(to.width,h.width):o.Y2.getMax(r.width/2+i.width/2,h.width+2*to.noteMargin),p.startx=s+(r.width+to.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(p.width=d?o.Y2.getMax(to.width,h.width+2*to.noteMargin):o.Y2.getMax(r.width/2+i.width/2,h.width+2*to.noteMargin),p.startx=s-p.width+(r.width-to.actorMargin)/2):t.to===t.from?(h=n._K.calculateTextDimensions(d?n._K.wrapLabel(t.message,o.Y2.getMax(to.width,r.width),tp(to)):t.message,tp(to)),p.width=d?o.Y2.getMax(to.width,r.width):o.Y2.getMax(r.width,to.width,h.width+2*to.noteMargin),p.startx=s+(r.width-p.width)/2):(p.width=Math.abs(s+r.width/2-(l+i.width/2))+to.actorMargin,p.startx=s<l?s+r.width/2-to.actorMargin/2:l+i.width/2-to.actorMargin/2),d&&(p.message=n._K.wrapLabel(t.message,p.width-2*to.wrapPadding,tp(to))),c.Rm.debug(`NM:[${p.startx},${p.stopx},${p.starty},${p.stopy}:${p.width},${p.height}=${t.message}]`),p},"buildNoteModel"),tN=(0,c.K2)(function(t,e){let{CENTRAL_CONNECTION:a,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=e.db.LINETYPE;return[a,r,i].includes(t.centralConnection)},"hasCentralConnection"),tw=(0,c.K2)(function(t,e,a){let{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:s,BIDIRECTIONAL_DOTTED:n}=e.db.LINETYPE,o=0;return(t.centralConnection===r||t.centralConnection===i)&&(o+=4),(t.centralConnection===r||t.centralConnection===i)&&(t.type===s||t.type===n)&&(o+=a?0:-6),o},"calculateCentralConnectionOffset"),tS=(0,c.K2)(function(t,e){let{SOLID_ARROW_TOP_REVERSE:a,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:s,STICK_ARROW_TOP_REVERSE:n,STICK_ARROW_TOP_REVERSE_DOTTED:o,STICK_ARROW_BOTTOM_REVERSE:c,STICK_ARROW_BOTTOM_REVERSE_DOTTED:l}=e.db.LINETYPE;return[a,r,i,s,n,o,c,l].includes(t.type)},"isReverseArrowType"),tA=(0,c.K2)(function(t,e){let{BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:r}=e.db.LINETYPE;return[a,r].includes(t.type)},"isBidirectionalArrowType"),tk=(0,c.K2)(function(t,e,a){let{look:r}=(0,o.D7)();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(t.type))return{};let[i,s]=tm(t.from,e),[l,d]=tm(t.to,e),h=i<=l,p=h?s:i,T=h?l:d;"neo"===r&&(t.type!==a.db.LINETYPE.SOLID_OPEN&&(T+=h?-3:3),(t.type===a.db.LINETYPE.BIDIRECTIONAL_SOLID||t.type===a.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(p+=h?3:-3)),p+=tw(t,a,h);let E=Math.abs(l-d)>2,g=(0,c.K2)(t=>h?-t:t,"adjustValue");t.from===t.to?T=p:(t.activate&&!E&&(T+=g(to.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(t.type)||(T+=g(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(t.type)&&(p-=g(3)));let u=[i,s,l,d],_=Math.abs(p-T);t.wrap&&t.message&&(t.message=n._K.wrapLabel(t.message,o.Y2.getMax(_+2*to.wrapPadding,to.width),th(to)));let O=n._K.calculateTextDimensions(t.message,th(to));return{width:o.Y2.getMax(t.wrap?0:O.width+2*to.wrapPadding,_+2*to.wrapPadding,to.width),height:0,startx:p,stopx:T,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,u),toBounds:Math.max.apply(null,u)}},"buildMessageModel"),tM=(0,c.K2)(async function(t,e,a,r){let i,s,n,l={},d=[];for(let a of t){switch(a.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:d.push({id:a.id,msg:a.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:a.message&&(l[(i=d.pop()).id]=i,l[a.id]=i,d.push(i));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:l[(i=d.pop()).id]=i;break;case r.db.LINETYPE.ACTIVE_START:{let t=e.get(a.from?a.from:a.to.actor),r=tx(a.from?a.from:a.to.actor).length,i=t.x+t.width/2+(r-1)*to.activationWidth/2,s={startx:i,stopx:i+to.activationWidth,actor:a.from,enabled:!0};tc.activations.push(s)}break;case r.db.LINETYPE.ACTIVE_END:{let t=tc.activations.map(t=>t.actor).lastIndexOf(a.from);tc.activations.splice(t,1).splice(0,1)}}void 0!==a.placement?(s=await tD(a,e,r),a.noteModel=s,d.forEach(t=>{(i=t).from=o.Y2.getMin(i.from,s.startx),i.to=o.Y2.getMax(i.to,s.startx+s.width),i.width=o.Y2.getMax(i.width,Math.abs(i.from-i.to))-to.labelBoxWidth})):(n=tk(a,e,r),a.msgModel=n,n.startx&&n.stopx&&d.length>0&&d.forEach(t=>{if(i=t,n.startx===n.stopx){let t=e.get(a.from),r=e.get(a.to);i.from=o.Y2.getMin(t.x-n.width/2,t.x-t.width/2,i.from),i.to=o.Y2.getMax(r.x+n.width/2,r.x+t.width/2,i.to),i.width=o.Y2.getMax(i.width,Math.abs(i.to-i.from))-to.labelBoxWidth}else i.from=o.Y2.getMin(n.startx,i.from),i.to=o.Y2.getMax(n.stopx,i.to),i.width=o.Y2.getMax(i.width,n.width)-to.labelBoxWidth}))}return tc.activations=[],c.Rm.debug("Loop type widths:",l),l},"calculateLoopBounds"),tC={parser:h,get db(){return new g},renderer:{bounds:tc,drawActors:t_,drawActorsPopup:tO,setConf:ty,draw:tf},styles:u,init:(0,c.K2)(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,(0,o.XV)({sequence:{wrap:t.wrap}}))},"init")}}}]);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2947],{22947:(t,e,n)=>{n.d(e,{diagram:()=>tg});var s,i=n(21354),r=n(32563),l=n(97096),a=n(32165),o=n(33948),h=n(6424),c=n(64907);let u=(t,e)=>(0,c.A)(t,"a",-e);var f=n(99507),d=n(68195);function y(t,e){let n=function(t){let e=[];for(let n=0;n<t.length;++n)for(let s=n+1;s<t.length;++s)for(let i of m(t[n],t[s]))i.parentIndex=[n,s],e.push(i);return e}(t),s=n.filter(e=>{var n;return n=e,t.every(t=>g(n,t)<t.radius+1e-10)}),i=0,r=0,l=[];if(s.length>1){let e=b(s);for(let t=0;t<s.length;++t){let n=s[t];n.angle=Math.atan2(n.x-e.x,n.y-e.y)}s.sort((t,e)=>e.angle-t.angle);let n=s[s.length-1];for(let e=0;e<s.length;++e){let a=s[e];r+=(n.x+a.x)*(a.y-n.y);let o={x:(a.x+n.x)/2,y:(a.y+n.y)/2},h=null;for(let e=0;e<a.parentIndex.length;++e)if(n.parentIndex.includes(a.parentIndex[e])){let s=t[a.parentIndex[e]],i=Math.atan2(a.x-s.x,a.y-s.y),r=Math.atan2(n.x-s.x,n.y-s.y),l=r-i;l<0&&(l+=2*Math.PI);let c=r-l/2,u=g(o,{x:s.x+s.radius*Math.sin(c),y:s.y+s.radius*Math.cos(c)});u>2*s.radius&&(u=2*s.radius),(null==h||h.width>u)&&(h={circle:s,width:u,p1:a,p2:n,large:u>s.radius,sweep:!0})}null!=h&&(l.push(h),i+=x(h.circle.radius,h.width),n=a)}}else{let e=t[0];for(let n=1;n<t.length;++n)t[n].radius<e.radius&&(e=t[n]);let n=!1;for(let s=0;s<t.length;++s)if(g(t[s],e)>Math.abs(e.radius-t[s].radius)){n=!0;break}n?i=r=0:(i=e.radius*e.radius*Math.PI,l.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-1e-10,y:e.y+e.radius},width:2*e.radius,large:!0,sweep:!0}))}return r/=2,e&&(e.area=i+r,e.arcArea=i,e.polygonArea=r,e.arcs=l,e.innerPoints=s,e.intersectionPoints=n),i+r}function x(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function g(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function p(t,e,n){return n>=t+e?0:n<=Math.abs(t-e)?Math.PI*Math.min(t,e)*Math.min(t,e):x(t,t-(n*n-e*e+t*t)/(2*n))+x(e,e-(n*n-t*t+e*e)/(2*n))}function m(t,e){let n=g(t,e),s=t.radius,i=e.radius;if(n>=s+i||n<=Math.abs(s-i))return[];let r=(s*s-i*i+n*n)/(2*n),l=Math.sqrt(s*s-r*r),a=t.x+r*(e.x-t.x)/n,o=t.y+r*(e.y-t.y)/n,h=-(e.y-t.y)*(l/n),c=-(e.x-t.x)*(l/n);return[{x:a+h,y:o-c},{x:a-h,y:o+c}]}function b(t){let e={x:0,y:0};for(let n of t)e.x+=n.x,e.y+=n.y;return e.x/=t.length,e.y/=t.length,e}function v(t){let e=Array(t);for(let n=0;n<t;++n)e[n]=0;return e}function M(t,e){return v(t).map(()=>v(e))}function I(t,e){let n=0;for(let s=0;s<t.length;++s)n+=t[s]*e[s];return n}function k(t){return Math.sqrt(I(t,t))}function _(t,e,n){for(let s=0;s<e.length;++s)t[s]=e[s]*n}function w(t,e,n,s,i){for(let r=0;r<t.length;++r)t[r]=e*n[r]+s*i[r]}function E(t,e,n){let s,i=(n=n||{}).maxIterations||200*e.length,r=n.nonZeroDelta||1.05,l=n.zeroDelta||.001,a=n.minErrorDelta||1e-6,o=n.minErrorDelta||1e-5,h=void 0!==n.rho?n.rho:1,c=void 0!==n.chi?n.chi:2,u=void 0!==n.psi?n.psi:-.5,f=void 0!==n.sigma?n.sigma:.5,d=e.length,y=Array(d+1);y[0]=e,y[0].fx=t(e),y[0].id=0;for(let n=0;n<d;++n){let s=e.slice();s[n]=s[n]?s[n]*r:l,y[n+1]=s,y[n+1].fx=t(s),y[n+1].id=n+1}function x(t){for(let e=0;e<t.length;e++)y[d][e]=t[e];y[d].fx=t.fx}let g=(t,e)=>t.fx-e.fx,p=e.slice(),m=e.slice(),b=e.slice(),v=e.slice();for(let e=0;e<i;++e){if(y.sort(g),n.history){let t=y.map(t=>{let e=t.slice();return e.fx=t.fx,e.id=t.id,e});t.sort((t,e)=>t.id-e.id),n.history.push({x:y[0].slice(),fx:y[0].fx,simplex:t})}s=0;for(let t=0;t<d;++t)s=Math.max(s,Math.abs(y[0][t]-y[1][t]));if(Math.abs(y[0].fx-y[d].fx)<a&&s<o)break;for(let t=0;t<d;++t){p[t]=0;for(let e=0;e<d;++e)p[t]+=y[e][t];p[t]/=d}let e=y[d];if(w(m,1+h,p,-h,e),m.fx=t(m),m.fx<y[0].fx)w(v,1+c,p,-c,e),v.fx=t(v),x(v.fx<m.fx?v:m);else if(m.fx>=y[d-1].fx){let n=!1;if(m.fx>e.fx?(w(b,1+u,p,-u,e),b.fx=t(b),b.fx<e.fx?x(b):n=!0):(w(b,1-u*h,p,u*h,e),b.fx=t(b),b.fx<m.fx?x(b):n=!0),n){if(f>=1)break;for(let e=1;e<y.length;++e)w(y[e],1-f,y[0],f,y[e]),y[e].fx=t(y[e])}}else x(m)}return y.sort(g),{fx:y[0].fx,x:y[0]}}function S(t,e={}){e.maxIterations=e.maxIterations||500;let n=e.initialLayout||z,s=e.lossFunction||A,i=function(t,e={}){let n=e.distinct,s=t.map(t=>Object.assign({},t));function i(t){return t.join(";")}if(n){let t=new Map;for(let e of s)for(let n=0;n<e.sets.length;n++){let s=String(e.sets[n]);t.set(s,e.size+(t.get(s)||0));for(let i=n+1;i<e.sets.length;i++){let n=String(e.sets[i]),r=`${s};${n}`,l=`${n};${s}`;t.set(r,e.size+(t.get(r)||0)),t.set(l,e.size+(t.get(l)||0))}}for(let e of s)e.sets.length<3&&(e.size=t.get(i(e.sets)))}let r=[],l=new Set;for(let t of s)if(1===t.sets.length)r.push(t.sets[0]);else if(2===t.sets.length){let e=t.sets[0],n=t.sets[1];l.add(i(t.sets)),l.add(i([n,e]))}r.sort((t,e)=>t===e?0:t<e?-1:1);for(let t=0;t<r.length;++t){let e=r[t];for(let n=t+1;n<r.length;++n){let t=r[n];l.has(i([e,t]))||s.push({sets:[e,t],size:0})}}return s}(t,e),r=n(i,e),l=Object.keys(r),a=[];for(let t of l)a.push(r[t].x),a.push(r[t].y);let o=E(t=>{let e={};for(let n=0;n<l.length;++n){let s=l[n];e[s]={x:t[2*n],y:t[2*n+1],radius:r[s].radius}}return s(e,i)},a,e).x;for(let t=0;t<l.length;++t){let e=l[t];r[e].x=o[2*t],r[e].y=o[2*t+1]}return r}function T(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+1e-10?Math.abs(t-e):function(t,e,n,s){let i=(s=s||{}).maxIterations||100,r=s.tolerance||1e-10,l=t(e),a=t(n),o=n-e;if(l*a>0)throw"Initial bisect points must have opposite signs";if(0===l)return e;if(0===a)return n;for(let n=0;n<i;++n){let n=e+(o/=2),s=t(n);if(s*l>=0&&(e=n),Math.abs(o)<r||0===s)return n}return e+o}(s=>p(t,e,s)-n,0,t+e)}function z(t,e={}){let n=function(t,e){let n=e&&e.lossFunction?e.lossFunction:A,s={},i={};for(let e of t)if(1===e.sets.length){let t=e.sets[0];s[t]={x:1e10,y:1e10,rowid:s.length,size:e.size,radius:Math.sqrt(e.size/Math.PI)},i[t]=[]}for(let e of t=t.filter(t=>2===t.sets.length)){let t=null!=e.weight?e.weight:1,n=e.sets[0],r=e.sets[1];e.size+1e-10>=Math.min(s[n].size,s[r].size)&&(t=0),i[n].push({set:r,size:e.size,weight:t}),i[r].push({set:n,size:e.size,weight:t})}let r=[];function l(t,e){return e.size-t.size}Object.keys(i).forEach(t=>{let e=0;for(let n=0;n<i[t].length;++n)e+=i[t][n].size*i[t][n].weight;r.push({set:t,size:e})}),r.sort(l);let a={};function o(t){return t.set in a}function h(t,e){s[e].x=t.x,s[e].y=t.y,a[e]=!0}h({x:0,y:0},r[0].set);for(let e=1;e<r.length;++e){let a=r[e].set,u=i[a].filter(o),f=s[a];if(u.sort(l),0===u.length)throw"ERROR: missing pairwise overlap information";let d=[];for(var c=0;c<u.length;++c){let t=s[u[c].set],e=T(f.radius,t.radius,u[c].size);d.push({x:t.x+e,y:t.y}),d.push({x:t.x-e,y:t.y}),d.push({y:t.y+e,x:t.x}),d.push({y:t.y-e,x:t.x});for(let n=c+1;n<u.length;++n){let i=s[u[n].set],r=T(f.radius,i.radius,u[n].size),l=m({x:t.x,y:t.y,radius:e},{x:i.x,y:i.y,radius:r});d.push(...l)}}let y=1e50,x=d[0];for(let e of d){s[a].x=e.x,s[a].y=e.y;let i=n(s,t);i<y&&(y=i,x=e)}h(x,a)}return s}(t,e),s=e.lossFunction||A;if(t.length>=8){let i=function(t,e={}){let n,s,i=e.restarts||10,r=[],l={};for(let e of t)1===e.sets.length&&(l[e.sets[0]]=r.length,r.push(e));let{distances:a,constraints:o}=(n=M(r.length,r.length),s=M(r.length,r.length),t.filter(t=>2===t.sets.length).forEach(t=>{let e=l[t.sets[0]],i=l[t.sets[1]],a=T(Math.sqrt(r[e].size/Math.PI),Math.sqrt(r[i].size/Math.PI),t.size);n[e][i]=n[i][e]=a;let o=0;t.size+1e-10>=Math.min(r[e].size,r[i].size)?o=1:t.size<=1e-10&&(o=-1),s[e][i]=s[i][e]=o}),{distances:n,constraints:s}),h=k(a.map(k))/a.length;a=a.map(t=>t.map(t=>t/h));let c=(t,e)=>(function(t,e,n,s){for(let t=0;t<e.length;++t)e[t]=0;let i=0;for(let r=0;r<n.length;++r){let l=t[2*r],a=t[2*r+1];for(let o=r+1;o<n.length;++o){let h=t[2*o],c=t[2*o+1],u=n[r][o],f=s[r][o],d=(h-l)*(h-l)+(c-a)*(c-a),y=Math.sqrt(d),x=d-u*u;f>0&&y<=u||f<0&&y>=u||(i+=2*x*x,e[2*r]+=4*x*(l-h),e[2*r+1]+=4*x*(a-c),e[2*o]+=4*x*(h-l),e[2*o+1]+=4*x*(c-a))}}return i})(t,e,a,o),u=null;for(let t=0;t<i;++t){let t=function(t,e,n){let s,i,r,l={x:e.slice(),fx:0,fxprime:e.slice()},a={x:e.slice(),fx:0,fxprime:e.slice()},o=e.slice(),h=1;r=(n=n||{}).maxIterations||20*e.length,l.fx=t(l.x,l.fxprime),_(s=l.fxprime.slice(),l.fxprime,-1);for(let e=0;e<r;++e){if(h=function(t,e,n,s,i,r,l){let a=n.fx,o=I(n.fxprime,e),h=a,c=a,u=o,f=0;function d(c,f,d){for(let y=0;y<16;++y)if(i=(c+f)/2,w(s.x,1,n.x,i,e),h=s.fx=t(s.x,s.fxprime),u=I(s.fxprime,e),h>a+r*i*o||h>=d)f=i;else{if(Math.abs(u)<=-l*o)return i;u*(f-c)>=0&&(f=c),c=i,d=h}return 0}i=i||1,r=r||1e-6,l=l||.1;for(let y=0;y<10;++y){if(w(s.x,1,n.x,i,e),h=s.fx=t(s.x,s.fxprime),u=I(s.fxprime,e),h>a+r*i*o||y&&h>=c)return d(f,i,c);if(Math.abs(u)<=-l*o)break;if(u>=0)return d(i,f,h);c=h,f=i,i*=2}return i}(t,s,l,a,h),n.history&&n.history.push({x:l.x.slice(),fx:l.fx,fxprime:l.fxprime.slice(),alpha:h}),h){w(o,1,a.fxprime,-1,l.fxprime);let t=I(l.fxprime,l.fxprime);w(s,Math.max(0,I(o,a.fxprime)/t),s,-1,a.fxprime),i=l,l=a,a=i}else _(s,l.fxprime,-1);if(1e-5>=k(l.fxprime))break}return n.history&&n.history.push({x:l.x.slice(),fx:l.fx,fxprime:l.fxprime.slice(),alpha:h}),l}(c,v(2*a.length).map(Math.random),e);(!u||t.fx<u.fx)&&(u=t)}let f=u.x,d={};for(let t=0;t<r.length;++t){let e=r[t];d[e.sets[0]]={x:f[2*t]*h,y:f[2*t+1]*h,radius:Math.sqrt(e.size/Math.PI)}}if(e.history)for(let t of e.history)_(t.x,h);return d}(t,e);s(i,t)+1e-8<s(n,t)&&(n=i)}return n}function A(t,e){let n=0;for(let s of e){let e;if(1!==s.sets.length){if(2===s.sets.length){let n=t[s.sets[0]],i=t[s.sets[1]];e=p(n.radius,i.radius,g(n,i))}else e=y(s.sets.map(e=>t[e]));n+=(null!=s.weight?s.weight:1)*(e-s.size)*(e-s.size)}}return n}function K(t,e){let n=0;for(let s of e){let e;if(1===s.sets.length)continue;if(2===s.sets.length){let n=t[s.sets[0]],i=t[s.sets[1]];e=p(n.radius,i.radius,g(n,i))}else e=y(s.sets.map(e=>t[e]));let i=null!=s.weight?s.weight:1,r=Math.log((e+1)/(s.size+1));n+=i*r*r}return n}function R(t){let e=e=>({max:t.reduce((t,n)=>Math.max(t,n[e]+n.radius),-1/0),min:t.reduce((t,n)=>Math.min(t,n[e]-n.radius),1/0)});return{xRange:e("x"),yRange:e("y")}}function $(t,e,n){null==e&&(e=Math.PI/2);let s=C(t).map(t=>Object.assign({},t)),i=function(t){function e(t){return t.parent!==t&&(t.parent=e(t.parent)),t.parent}t.forEach(t=>{t.parent=t});for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){var n,s;let l=t[i].radius+t[r].radius;g(t[i],t[r])+1e-10<l&&(n=t[r],s=t[i],e(n).parent=e(s))}let i=new Map;for(let n=0;n<t.length;++n){let s=e(t[n]).parent.setid;i.has(s)||i.set(s,[]),i.get(s).push(t[n])}return t.forEach(t=>{delete t.parent}),Array.from(i.values())}(s);for(let t of i){!function(t,e,n){if(null==n?t.sort((t,e)=>e.radius-t.radius):t.sort(n),t.length>0){let e=t[0].x,n=t[0].y;for(let s of t)s.x-=e,s.y-=n}if(2===t.length&&g(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){let n=Math.atan2(t[1].x,t[1].y)-e,s=Math.cos(n),i=Math.sin(n);for(let e of t){let t=e.x,n=e.y;e.x=s*t-i*n,e.y=i*t+s*n}}if(t.length>2){let n=Math.atan2(t[2].x,t[2].y)-e;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let e=t[1].y/(1e-10+t[1].x);for(let n of t){var s=(n.x+e*n.y)/(1+e*e);n.x=2*s-n.x,n.y=2*s*e-n.y}}}}(t,e,n);let s=R(t);t.size=(s.xRange.max-s.xRange.min)*(s.yRange.max-s.yRange.min),t.bounds=s}i.sort((t,e)=>e.size-t.size);let r=(s=i[0]).bounds,l=(r.xRange.max-r.xRange.min)/50;function a(t,e,n){let i,a;if(!t)return;let o=t.bounds;if(e)i=r.xRange.max-o.xRange.min+l;else{i=r.xRange.max-o.xRange.max;let t=(o.xRange.max-o.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;t<0&&(i+=t)}if(n)a=r.yRange.max-o.yRange.min+l;else{a=r.yRange.max-o.yRange.max;let t=(o.yRange.max-o.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;t<0&&(a+=t)}for(let e of t)e.x+=i,e.y+=a,s.push(e)}let o=1;for(;o<i.length;)a(i[o],!0,!1),a(i[o+1],!1,!0),a(i[o+2],!0,!0),o+=3,r=R(s);return O(s)}function N(t,e,n,s,i){let r,l,a=C(t);e-=2*s,n-=2*s;let{xRange:o,yRange:h}=R(a);if(o.max===o.min||h.max===h.min)return console.log("not scaling solution: zero size detected"),t;if(i){let t=2*Math.sqrt(i/Math.PI);r=e/t,l=n/t}else r=e/(o.max-o.min),l=n/(h.max-h.min);let c=Math.min(l,r),u=(e-(o.max-o.min)*c)/2,f=(n-(h.max-h.min)*c)/2;return O(a.map(t=>({radius:c*t.radius,x:s+u+(t.x-o.min)*c,y:s+f+(t.y-h.min)*c,setid:t.setid})))}function O(t){let e={};for(let n of t)e[n.setid]=n;return e}function C(t){return Object.keys(t).map(e=>Object.assign(t[e],{setid:e}))}function D(t,e){return function(n){let s=this,i=t[n.sets[0]].radius||50,r=e(n)||"",l=r.split(/\s+/).reverse(),a=(r.length+l.length)/3,o=l.pop(),h=[o],c=0;s.textContent=null;let u=[];function f(t){let e=s.ownerDocument.createElementNS(s.namespaceURI,"tspan");return e.textContent=t,u.push(e),s.append(e),e}let d=f(o);for(;o=l.pop();){h.push(o);let t=h.join(" ");d.textContent=t,t.length>a&&d.getComputedTextLength()>i&&(h.pop(),d.textContent=h.join(" "),h=[o],d=f(o),c++)}let y=.35-1.1*c/2,x=s.getAttribute("x"),g=s.getAttribute("y");u.forEach((t,e)=>{t.setAttribute("x",x),t.setAttribute("y",g),t.setAttribute("dy",`${y+1.1*e}em`)})}}function F(t,e,n){let s=e[0].radius-g(e[0],t);for(let n=1;n<e.length;++n){let i=e[n].radius-g(e[n],t);i<=s&&(s=i)}for(let e=0;e<n.length;++e){let i=g(n[e],t)-n[e].radius;i<=s&&(s=i)}return s}function L(t,e,n){let s={},i=function(t){let e={},n=Object.keys(t);for(let t of n)e[t]=[];for(let s=0;s<n.length;s++){let i=n[s],r=t[i];for(let l=s+1;l<n.length;++l){let s=n[l],a=t[s],o=g(r,a);o+a.radius<=r.radius+1e-10?e[s].push(i):o+r.radius<=a.radius+1e-10&&e[i].push(s)}}return e}(t);for(let r=0;r<e.length;++r){let l=e[r].sets,a={},o={};for(let t=0;t<l.length;++t){a[l[t]]=!0;let e=i[l[t]];for(let t=0;t<e.length;++t)o[e[t]]=!0}let h=[],c=[];for(let e in t)e in a?h.push(t[e]):e in o||c.push(t[e]);let u=function t(e,n,s){let i=[];for(let t of e)i.push({x:t.x,y:t.y}),i.push({x:t.x+t.radius/2,y:t.y}),i.push({x:t.x-t.radius/2,y:t.y}),i.push({x:t.x,y:t.y+t.radius/2}),i.push({x:t.x,y:t.y-t.radius/2});let r=i[0],l=F(i[0],e,n);for(let t=1;t<i.length;++t){let s=F(i[t],e,n);s>=l&&(r=i[t],l=s)}let a=E(t=>-1*F({x:t[0],y:t[1]},e,n),[r.x,r.y],{maxIterations:500,minErrorDelta:1e-10}).x,o={x:s?0:a[0],y:a[1]},h=!0;for(let t of e)if(g(o,t)>t.radius){h=!1;break}for(let t of n)if(g(o,t)<t.radius){h=!1;break}if(h)return o;if(1==e.length)return{x:e[0].x,y:e[0].y};let c={};return(y(e,c),0===c.arcs.length)?{x:0,y:-1e3,disjoint:!0}:1==c.arcs.length?{x:c.arcs[0].circle.x,y:c.arcs[0].circle.y}:n.length?t(e,[]):b(c.arcs.map(t=>t.p1))}(h,c,n);s[l]=u,u.disjoint&&e[r].size>0&&console.log("WARNING: area "+l+" not represented on screen")}return s}function j(t){if(0===t.length)return[];let e={};return y(t,e),e.arcs}function P(t,e){if(0===t.length)return"M 0 0";let n=Math.pow(10,e||0),s=null!=e?t=>Math.round(t*n)/n:t=>t;if(1==t.length){var i,r,l;let e,n=t[0].circle;return i=s(n.x),r=s(n.y),l=s(n.radius),(e=[]).push("\nM",i,r),e.push("\nm",-l,0),e.push("\na",l,l,0,1,0,2*l,0),e.push("\na",l,l,0,1,0,-(2*l),0),e.join(" ")}let a=["\nM",s(t[0].p2.x),s(t[0].p2.y)];for(let e of t){let t=s(e.circle.radius);a.push("\nA",t,t,0,+!!e.large,+!!e.sweep,s(e.p1.x),s(e.p1.y))}return a.join(" ")}var U=n(94529),q=function(){var t=(0,a.K2)(function(t,e,n,s){for(n=n||{},s=t.length;s--;n[t[s]]=e);return n},"o"),e=[5,8],n=[7,8,11,12,17,19,22,24],s=[1,17],i=[1,18],r=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],l=[1,31],o=[1,39],h=[7,8,11,12,17,19,22,24,27],c=[1,57],u=[1,56],f=[1,58],d=[1,59],y=[1,60],x=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],g={trace:(0,a.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:(0,a.K2)(function(t,e,n,s,i,r,l){var a=r.length-1;switch(i){case 1:return r[a-1];case 2:case 3:case 4:case 6:this.$=[];break;case 5:case 35:r[a-1].push(r[a]),this.$=r[a-1];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:case 43:case 44:this.$=r[a];break;case 8:s.setDiagramTitle(r[a].substr(6)),this.$=r[a].substr(6);break;case 9:s.addSubsetData([r[a]],void 0,void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 10:s.addSubsetData([r[a-1]],r[a],void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 11:s.addSubsetData([r[a-2]],void 0,parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 12:s.addSubsetData([r[a-3]],r[a-2],parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 13:if(r[a].length<2)throw Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a]),s.addSubsetData(r[a],void 0,void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 14:if(r[a-1].length<2)throw Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-1]),s.addSubsetData(r[a-1],r[a],void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 15:if(r[a-2].length<2)throw Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-2]),s.addSubsetData(r[a-2],void 0,parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 16:if(r[a-3].length<2)throw Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-3]),s.addSubsetData(r[a-3],r[a-2],parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 17:case 18:case 19:s.addTextData(r[a-1],r[a],void 0);break;case 20:case 21:s.addTextData(r[a-2],r[a-1],r[a]);break;case 23:s.addStyleData(r[a-1],r[a]);break;case 24:case 25:case 26:var o=s.getCurrentSets();if(!o)throw Error("text requires set");s.addTextData(o,r[a],void 0);break;case 27:case 28:var o=s.getCurrentSets();if(!o)throw Error("text requires set");s.addTextData(o,r[a-1],r[a]);break;case 29:case 41:case 34:this.$=[r[a]];break;case 30:case 42:this.$=[...r[a-2],r[a]];break;case 31:this.$=[r[a-2],r[a]];break;case 33:this.$=r[a].join(" ")}},"anonymous"),table:[t(e,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(n,[2,4],{6:5}),t(e,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),{13:16,20:s,21:i},{13:20,18:19,20:s,21:i},{13:20,18:21,20:s,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:s,21:i},t(n,[2,9],{14:[1,27],15:[1,28]}),t(r,[2,43]),t(r,[2,44]),t(n,[2,13],{14:[1,29],15:[1,30],27:l}),t(r,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:l},t(n,[2,22]),t(n,[2,24],{14:[1,35]}),t(n,[2,25],{14:[1,36]}),t(n,[2,26]),{20:o,25:37,26:38,27:l},t(n,[2,10],{15:[1,40]}),{16:[1,41]},t(n,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:s,21:i},t(n,[2,17],{14:[1,45]}),t(n,[2,18],{14:[1,46]}),t(n,[2,19]),t(n,[2,27]),t(n,[2,28]),t(n,[2,23],{27:[1,47]}),t(h,[2,29]),{15:[1,48]},{16:[1,49]},t(n,[2,11]),{16:[1,50]},t(n,[2,15]),t(r,[2,42]),t(n,[2,20]),t(n,[2,21]),{20:o,26:51},{16:c,20:u,21:[1,53],28:52,29:54,30:55,31:f,32:d,33:y},t(n,[2,12]),t(n,[2,16]),t(h,[2,30]),t(h,[2,31]),t(h,[2,32]),t(h,[2,33],{30:61,16:c,20:u,31:f,32:d,33:y}),t(x,[2,34]),t(x,[2,36]),t(x,[2,37]),t(x,[2,38]),t(x,[2,39]),t(x,[2,40]),t(x,[2,35])],defaultActions:{6:[2,1]},parseError:(0,a.K2)(function(t,e){if(e.recoverable)this.trace(t);else{var n=Error(t);throw n.hash=e,n}},"parseError"),parse:(0,a.K2)(function(t){var e=this,n=[0],s=[],i=[null],r=[],l=this.table,o="",h=0,c=0,u=0,f=r.slice.call(arguments,1),d=Object.create(this.lexer),y={};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(y[x]=this.yy[x]);d.setInput(t,y),y.lexer=d,y.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var p=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,r.length=r.length-t},"popStack"),(0,a.K2)(m,"lex");for(var b,v,M,I,k,_,w,E,S,T={};;){if(M=n[n.length-1],this.defaultActions[M]?I=this.defaultActions[M]:(null==b&&(b=m()),I=l[M]&&l[M][b]),void 0===I||!I.length||!I[0]){var z="";for(_ in S=[],l[M])this.terminals_[_]&&_>2&&S.push("'"+this.terminals_[_]+"'");z=d.showPosition?"Parse error on line "+(h+1)+":\n"+d.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(z,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:S})}if(I[0]instanceof Array&&I.length>1)throw Error("Parse Error: multiple actions possible at state: "+M+", token: "+b);switch(I[0]){case 1:n.push(b),i.push(d.yytext),r.push(d.yylloc),n.push(I[1]),b=null,v?(b=v,v=null):(c=d.yyleng,o=d.yytext,h=d.yylineno,g=d.yylloc,u>0&&u--);break;case 2:if(w=this.productions_[I[1]][1],T.$=i[i.length-w],T._$={first_line:r[r.length-(w||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(w||1)].first_column,last_column:r[r.length-1].last_column},p&&(T._$.range=[r[r.length-(w||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(T,[o,c,h,y,I[1],i,r].concat(f))))return k;w&&(n=n.slice(0,-1*w*2),i=i.slice(0,-1*w),r=r.slice(0,-1*w)),n.push(this.productions_[I[1]][0]),i.push(T.$),r.push(T._$),E=l[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0},"parse")};function p(){this.yy={}}return g.lexer={EOF:1,parseError:(0,a.K2)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,a.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:(0,a.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.K2)(function(){return this._more=!0,this},"more"),reject:(0,a.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,a.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,a.K2)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.K2)(function(t,e){var n,s,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var r in i)this[r]=i[r];return!1},"test_match"),next:(0,a.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,s,i=this._currentRules(),r=0;r<i.length;r++)if((n=this._input.match(this.rules[i[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.K2)(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:(0,a.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K2)(function(t,e,n,s){switch(n){case 0:case 1:case 2:case 4:case 7:case 8:break;case 3:if(t.getIndentMode&&t.getIndentMode())return t.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 5:t.setIndentMode&&t.setIndentMode(!1),this.begin("INITIAL"),this.unput(e.yytext);break;case 6:return this.begin("bol"),8;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(!t.consumeIndentText)return 19;t.consumeIndentText=!1;break;case 15:return 24;case 16:return e.yytext=e.yytext.slice(2,-2),14;case 17:return e.yytext=e.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}},(0,a.K2)(p,"Parser"),p.prototype=g,g.Parser=p,new p}();q.parser=q;var B=[],G=[],W=[],V=new Set,X=!1,Y=(0,a.K2)((t,e,n)=>{let i=tn(t).sort(),r=n??10/Math.pow(t.length,2);s=i,1===i.length&&V.add(i[0]),B.push({sets:i,size:r,label:e?H(e):void 0})},"addSubsetData"),Z=(0,a.K2)(()=>B,"getSubsetData"),H=(0,a.K2)(t=>{let e=t.trim();return e.length>=2&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e},"normalizeText"),J=(0,a.K2)(t=>t?H(t):t,"normalizeStyleValue"),Q=(0,a.K2)((t,e,n)=>{let s=H(e);G.push({sets:tn(t).sort(),id:s,label:n?H(n):void 0})},"addTextData"),tt=(0,a.K2)((t,e)=>{let n=tn(t).sort(),s={};for(let[t,n]of e)s[t]=J(n)??n;W.push({targets:n,styles:s})},"addStyleData"),te=(0,a.K2)(()=>W,"getStyleData"),tn=(0,a.K2)(t=>t.map(t=>H(t)),"normalizeIdentifierList"),ts=(0,a.K2)(t=>{let e=tn(t).filter(t=>!V.has(t));if(e.length>0)throw Error(`unknown set identifier: ${e.join(", ")}`)},"validateUnionIdentifiers"),ti=(0,a.K2)(()=>G,"getTextData"),tr=(0,a.K2)(()=>s,"getCurrentSets"),tl=(0,a.K2)(()=>X,"getIndentMode"),ta=(0,a.K2)(t=>{X=t},"setIndentMode"),to=l.UI.venn;function th(){return(0,r.$t)(to,(0,l.zj)().venn)}(0,a.K2)(th,"getConfig");var tc={getConfig:th,clear:(0,a.K2)(()=>{(0,l.IU)(),B.length=0,G.length=0,W.length=0,V.clear(),s=void 0,X=!1},"customClear"),setAccTitle:l.SV,getAccTitle:l.iN,setDiagramTitle:l.ke,getDiagramTitle:l.ab,getAccDescription:l.m7,setAccDescription:l.EI,addSubsetData:Y,getSubsetData:Z,addTextData:Q,addStyleData:tt,validateUnionIdentifiers:ts,getTextData:ti,getStyleData:te,getCurrentSets:tr,getIndentMode:tl,setIndentMode:ta},tu=(0,a.K2)(t=>`
|
|
2
|
+
.venn-title {
|
|
3
|
+
font-size: 32px;
|
|
4
|
+
fill: ${t.vennTitleTextColor};
|
|
5
|
+
font-family: ${t.fontFamily};
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.venn-circle text {
|
|
9
|
+
font-size: 48px;
|
|
10
|
+
font-family: ${t.fontFamily};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.venn-intersection text {
|
|
14
|
+
font-size: 48px;
|
|
15
|
+
fill: ${t.vennSetTextColor};
|
|
16
|
+
font-family: ${t.fontFamily};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.venn-text-node {
|
|
20
|
+
font-family: ${t.fontFamily};
|
|
21
|
+
color: ${t.vennSetTextColor};
|
|
22
|
+
}
|
|
23
|
+
`,"getStyles");function tf(t){let e=new Map;for(let n of t){let t=n.targets.join("|"),s=e.get(t);s?Object.assign(s,n.styles):e.set(t,{...n.styles})}return e}(0,a.K2)(tf,"buildStyleByKey");var td=(0,a.K2)((t,e,n,s)=>{let r=s.db,a=r.getConfig?.(),{themeVariables:c,look:y,handDrawnSeed:x}=(0,l.zj)(),g="handDrawn"===y,p=[c.venn1,c.venn2,c.venn3,c.venn4,c.venn5,c.venn6,c.venn7,c.venn8].filter(Boolean),m=r.getDiagramTitle?.(),b=r.getSubsetData(),v=r.getTextData(),M=tf(r.getStyleData()),I=a?.width??800,k=a?.height??450,_=I/1600,w=m?48*_:0,E=c.primaryTextColor??c.textColor,T=(0,i.D)(e);T.attr("viewBox",`0 0 ${I} ${k}`),m&&T.append("text").text(m).attr("class","venn-title").attr("font-size",`${32*_}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*_).style("fill",c.vennTitleTextColor||c.titleColor);let z=(0,o.Ltv)(document.createElement("div")),R=(function(t={}){let e=!1,n=600,s=350,i=15,r=1e3,l=Math.PI/2,a=!0,o=null,h=!0,c=!0,u=null,f=null,d=!1,y=null,x=!!t&&!!t.symmetricalTextCentre&&t.symmetricalTextCentre,g={},p=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],m=0,b=function(t){if(t in g)return g[t];var e=g[t]=p[m];return(m+=1)>=p.length&&(m=0),e},v=S,M=A;function I(g){let p=g.datum(),m=new Set;p.forEach(t=>{0==t.size&&1==t.sets.length&&m.add(t.sets[0])});let I={},k={};if((p=p.filter(t=>!t.sets.some(t=>m.has(t)))).length>0){let t=v(p,{lossFunction:M,distinct:d});a&&(t=$(t,l,f)),k=L(I=N(t,n,s,i,o),p,x)}let _={};function w(t){return t.sets in _?_[t.sets]:1==t.sets.length?""+t.sets[0]:void 0}p.forEach(t=>{t.label&&(_[t.sets]=t.label)}),g.selectAll("svg").data([I]).enter().append("svg");let E=g.select("svg");e?E.attr("viewBox",`0 0 ${n} ${s}`):E.attr("width",n).attr("height",s);let S={},T=!1;function z(t){return e=>{var i,r;return i=t.sets.map(t=>{let i=S[t],r=I[t];return i||(i={x:n/2,y:s/2,radius:1}),r||(r={x:n/2,y:s/2,radius:1}),{x:i.x*(1-e)+r.x*e,y:i.y*(1-e)+r.y*e,radius:i.radius*(1-e)+r.radius*e}}),r=y,P(j(i),r)}}E.selectAll(".venn-area path").each(function(t){let e,n=this.getAttribute("d");1==t.sets.length&&n&&!d&&(T=!0,S[t.sets[0]]={x:Number.parseFloat((e=n.split(" "))[1]),y:Number.parseFloat(e[2]),radius:-Number.parseFloat(e[4])})});let A=E.selectAll(".venn-area").data(p,t=>t.sets),K=A.enter().append("g").attr("class",t=>`venn-area venn-${1==t.sets.length?"circle":"intersection"}${t.colour||t.color?" venn-coloured":""}`).attr("data-venn-sets",t=>t.sets.join("_")),R=K.append("path"),O=K.append("text").attr("class","label").text(t=>w(t)).attr("text-anchor","middle").attr("dy",".35em").attr("x",n/2).attr("y",s/2);function C(t){return"function"==typeof t.transition?t.transition("venn").duration(r):t}c&&(R.style("fill-opacity","0").filter(t=>1==t.sets.length).style("fill",t=>t.colour?t.colour:t.color?t.color:b(t.sets)).style("fill-opacity",".25"),O.style("fill",e=>e.colour||e.color?"#FFF":t.textFill?t.textFill:1==e.sets.length?b(e.sets):"#444"));let F=g;T&&"function"==typeof F.transition?(F=C(g)).selectAll("path").attrTween("d",z):F.selectAll("path").attr("d",t=>P(j(t.sets.map(t=>I[t])),void 0),y);let U=F.selectAll("text").filter(t=>t.sets in k).text(t=>w(t)).attr("x",t=>Math.floor(k[t.sets].x)).attr("y",t=>Math.floor(k[t.sets].y));h&&(T?"on"in U?U.on("end",D(I,w)):U.each("end",D(I,w)):U.each(D(I,w)));let q=C(A.exit()).remove();"function"==typeof A.transition&&q.selectAll("path").attrTween("d",z);let B=q.selectAll("text").attr("x",n/2).attr("y",s/2);return null!==u&&(O.style("font-size","0px"),U.style("font-size",u),B.style("font-size","0px")),{circles:I,textCentres:k,nodes:A,enter:K,update:F,exit:q}}return I.wrap=function(t){return arguments.length?(h=t,I):h},I.useViewBox=function(){return e=!0,I},I.width=function(t){return arguments.length?(n=t,I):n},I.height=function(t){return arguments.length?(s=t,I):s},I.padding=function(t){return arguments.length?(i=t,I):i},I.distinct=function(t){return arguments.length?(d=t,I):d},I.colours=function(t){return arguments.length?(b=t,I):b},I.colors=function(t){return arguments.length?(b=t,I):b},I.fontSize=function(t){return arguments.length?(u=t,I):u},I.round=function(t){return arguments.length?(y=t,I):y},I.duration=function(t){return arguments.length?(r=t,I):r},I.layoutFunction=function(t){return arguments.length?(v=t,I):v},I.normalize=function(t){return arguments.length?(a=t,I):a},I.scaleToFit=function(t){return arguments.length?(o=t,I):o},I.styled=function(t){return arguments.length?(c=t,I):c},I.orientation=function(t){return arguments.length?(l=t,I):l},I.orientationOrder=function(t){return arguments.length?(f=t,I):f},I.lossFunction=function(t){return arguments.length?(M="default"===t?A:"logRatio"===t?K:t,I):M},I})().width(I).height(k-w);z.datum(b).call(R);let O=g?U.A.svg(z.select("svg").node()):void 0,C=function(t,e={}){let{lossFunction:n,layoutFunction:s=S,normalize:i=!0,orientation:r=Math.PI/2,orientationOrder:l,width:a=600,height:o=350,padding:h=15,scaleToFit:c=!1,symmetricalTextCentre:u=!1,distinct:f,round:d=2}=e,y=s(t,{lossFunction:"default"!==n&&n?"logRatio"===n?K:n:A,distinct:f});i&&(y=$(y,r,l));let x=N(y,a,o,h,c),g=L(x,t,u),p=new Map(Object.keys(x).map(t=>[t,{set:t,x:x[t].x,y:x[t].y,radius:x[t].radius}])),m=t.map(t=>{let e=t.sets.map(t=>p.get(t)),n=j(e),s=P(n,d);return{circles:e,arcs:n,path:s,area:t,has:new Set(t.sets)}});return m.map(({circles:t,arcs:e,path:n,area:s})=>({data:s,text:g[s.sets],circles:t,arcs:e,path:n,distinctPath:n+function(t){let e="";for(let n of m)n.has.size>t.length&&t.every(t=>n.has.has(t))&&(e+=" "+n.path);return e}(s.sets)}))}(b,{width:I,height:k-w,padding:a?.padding??15}),F=new Map;for(let t of C){let e=ty([...t.data.sets].sort());F.set(e,t)}v.length>0&&tx(a,F,z,v,_,M);let q=(0,h.A)(c.background||"#f4f4f4");z.selectAll(".venn-circle").each(function(t,e){let n=(0,o.Ltv)(this),s=ty([...t.sets].sort()),i=M.get(s),r=i?.fill||p[e%p.length]||c.primaryColor;n.classed(`venn-set-${e%8}`,!0);let l=i?.["fill-opacity"]??.1,a=i?.stroke||r,h=i?.["stroke-width"]||`${5*_}`;if(g&&O){let t=F.get(s);if(t&&t.circles.length>0){let s=t.circles[0],i=O.circle(s.x,s.y,2*s.radius,{roughness:.7,seed:x,fill:u(r,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+60*e,stroke:a,strokeWidth:parseFloat(String(h))});n.select("path").remove(),n.node()?.insertBefore(i,n.select("text").node())}}else n.select("path").style("fill",r).style("fill-opacity",l).style("stroke",a).style("stroke-width",h).style("stroke-opacity",.95);let y=i?.color||(q?(0,f.A)(r,30):(0,d.A)(r,30));n.select("text").style("font-size",`${48*_}px`).style("fill",y)}),g&&O?z.selectAll(".venn-intersection").each(function(t){let e=(0,o.Ltv)(this),n=ty([...t.sets].sort()),s=M.get(n),i=s?.fill;if(i){let t=e.select("path"),n=t.attr("d");if(n){let e=O.path(n,{roughness:.7,seed:x,fill:u(i,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),s=t.node();s?.parentNode?.insertBefore(e,s),t.remove()}}else e.select("path").style("fill-opacity",0);e.select("text").style("font-size",`${48*_}px`).style("fill",s?.color??c.vennSetTextColor??E)}):(z.selectAll(".venn-intersection text").style("font-size",`${48*_}px`).style("fill",t=>{let e=ty([...t.sets].sort());return M.get(e)?.color??c.vennSetTextColor??E}),z.selectAll(".venn-intersection path").style("fill-opacity",t=>{let e=ty([...t.sets].sort());return+!!M.get(e)?.fill}).style("fill",t=>{let e=ty([...t.sets].sort());return M.get(e)?.fill??"transparent"}));let B=T.append("g").attr("transform",`translate(0, ${w})`),G=z.select("svg").node();if(G&&"childNodes"in G)for(let t of[...G.childNodes])B.node()?.appendChild(t);(0,l.a$)(T,k,I,a?.useMaxWidth??!0)},"draw");function ty(t){return t.join("|")}function tx(t,e,n,s,i,r){let l=t?.useDebugLayout??!1,a=n.select("svg").append("g").attr("class","venn-text-nodes"),o=new Map;for(let t of s){let e=ty(t.sets),n=o.get(e);n?n.push(t):o.set(e,[t])}for(let[t,n]of o.entries()){let s=e.get(t);if(!s?.text)continue;let o=s.text.x,h=s.text.y,c=Math.min(...s.circles.map(t=>t.radius)),u=Math.min(...s.circles.map(t=>t.radius-Math.hypot(o-t.x,h-t.y))),f=Number.isFinite(u)?Math.max(0,u):0;0===f&&Number.isFinite(c)&&(f=.6*c);let d=a.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);l&&d.append("circle").attr("class","venn-text-debug-circle").attr("cx",o).attr("cy",h).attr("r",f).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);let y=Math.max(80*i,2*f*.95),x=Math.max(60*i,2*f*.95),g=(s.data.label&&s.data.label.length>0?Math.min(32*i,.25*f):0)+(n.length<=2?30*i:0),p=o-y/2,m=h-x/2+g,b=Math.max(1,Math.ceil(Math.sqrt(n.length))),v=Math.max(1,Math.ceil(n.length/b)),M=y/b,I=x/v;for(let[t,e]of n.entries()){let n=t%b,s=Math.floor(t/b),a=p+M*(n+.5),o=m+I*(s+.5);l&&d.append("rect").attr("class","venn-text-debug-cell").attr("x",p+M*n).attr("y",m+I*s).attr("width",M).attr("height",I).attr("fill","none").attr("stroke","teal").attr("stroke-width",+i).attr("stroke-dasharray",`${4*i} ${3*i}`);let h=.9*M,c=.9*I,u=d.append("foreignObject").attr("class","venn-text-node-fo").attr("width",h).attr("height",c).attr("x",a-h/2).attr("y",o-c/2).attr("overflow","visible"),f=r.get(e.id)?.color,y=u.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(e.label??e.id);f&&y.style("color",f)}}}(0,a.K2)(ty,"stableSetsKey"),(0,a.K2)(tx,"renderTextNodes");var tg={parser:q,db:tc,renderer:{draw:td},styles:tu}}}]);
|