hex-audit 0.6.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +137 -77
- package/DEMO.md +41 -105
- package/README.md +205 -353
- package/dashboard/.next/BUILD_ID +1 -1
- package/dashboard/.next/app-build-manifest.json +65 -99
- package/dashboard/.next/app-path-routes-manifest.json +1 -1
- package/dashboard/.next/build-manifest.json +14 -14
- package/dashboard/.next/next-minimal-server.js.nft.json +1 -1
- package/dashboard/.next/next-server.js.nft.json +1 -1
- package/dashboard/.next/prerender-manifest.js +1 -1
- package/dashboard/.next/prerender-manifest.json +1 -1
- package/dashboard/.next/react-loadable-manifest.json +540 -119
- package/dashboard/.next/routes-manifest.json +1 -1
- package/dashboard/.next/server/app/_not-found/page.js +1 -1
- package/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/api/code/route.js +1 -1
- package/dashboard/.next/server/app/api/code/route.js.nft.json +1 -1
- package/dashboard/.next/server/app/api/comments/route.js +1 -0
- package/dashboard/.next/server/app/api/comments/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/diagrams/[name]/export/route.js +1 -0
- package/dashboard/.next/server/app/api/diagrams/[name]/export/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/diagrams/[name]/resolve/route.js +1 -0
- package/dashboard/.next/server/app/api/diagrams/[name]/resolve/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/diagrams/[name]/route.js +1 -0
- package/dashboard/.next/server/app/api/diagrams/[name]/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/figures/[name]/route.js +1 -0
- package/dashboard/.next/server/app/api/figures/[name]/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/focus/route.js +1 -0
- package/dashboard/.next/server/app/api/focus/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/github-status/route.js +1 -1
- package/dashboard/.next/server/app/api/invariants/[id]/route.js +1 -0
- package/dashboard/.next/server/app/api/invariants/[id]/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/issues/[id]/revert-auto/route.js +1 -0
- package/dashboard/.next/server/app/api/issues/[id]/revert-auto/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/nav/route.js +1 -0
- package/dashboard/.next/server/app/api/nav/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/notes/done/route.js +1 -1
- package/dashboard/.next/server/app/api/notes/done/route.js.nft.json +1 -1
- package/dashboard/.next/server/app/api/notes/lead/route.js +1 -1
- package/dashboard/.next/server/app/api/notes/lead/route.js.nft.json +1 -1
- package/dashboard/.next/server/app/api/notes/question/route.js +1 -1
- package/dashboard/.next/server/app/api/notes/question/route.js.nft.json +1 -1
- package/dashboard/.next/server/app/api/notes/record/route.js +3 -3
- package/dashboard/.next/server/app/api/notes/route.js +2 -2
- package/dashboard/.next/server/app/api/palette/route.js +1 -0
- package/dashboard/.next/server/app/api/palette/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/progress/route.js +1 -1
- package/dashboard/.next/server/app/api/progress/route.js.nft.json +1 -1
- package/dashboard/.next/server/app/api/watch/route.js +2 -2
- package/dashboard/.next/server/app/api/watch/route.js.nft.json +1 -1
- package/dashboard/.next/server/app/api/xref/route.js +1 -0
- package/dashboard/.next/server/app/changes/page.js +1 -0
- package/dashboard/.next/server/app/{access → changes}/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/changes/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/excalidraw-assets/[...path]/route.js +1 -0
- package/dashboard/.next/server/app/issues/page.js +5 -28
- package/dashboard/.next/server/app/issues/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/issues/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/model/page.js +1 -0
- package/dashboard/.next/server/app/{calls → model}/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/model/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/page.js +1 -20
- package/dashboard/.next/server/app/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/report/page.js +1 -1
- package/dashboard/.next/server/app/report/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/report/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/review/page.js +1 -0
- package/dashboard/.next/server/app/{conformance → review}/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/review/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app-paths-manifest.json +20 -16
- package/dashboard/.next/server/chunks/310.js +4 -0
- package/dashboard/.next/server/chunks/370.js +1 -0
- package/dashboard/.next/server/chunks/42.js +1 -1
- package/dashboard/.next/server/chunks/624.js +14 -0
- package/dashboard/.next/server/chunks/645.js +1 -1
- package/dashboard/.next/server/chunks/649.js +1 -1
- package/dashboard/.next/server/chunks/653.js +1 -0
- package/dashboard/.next/server/functions-config-manifest.json +1 -1
- package/dashboard/.next/server/middleware-build-manifest.js +1 -1
- package/dashboard/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dashboard/.next/server/next-font-manifest.js +1 -1
- package/dashboard/.next/server/next-font-manifest.json +1 -1
- package/dashboard/.next/server/pages/500.html +1 -1
- package/dashboard/.next/server/pages/_error.js +1 -1
- package/dashboard/.next/server/pages-manifest.json +1 -1
- package/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dashboard/.next/server/server-reference-manifest.json +1 -1
- package/dashboard/.next/static/bGV1ry1vvIbM5b506eVBR/_buildManifest.js +1 -0
- package/dashboard/.next/static/chunks/0bbe10ee.8e7ffa06d2170dfe.js +84 -0
- package/dashboard/.next/static/chunks/{1.8868c4d131111be7.js → 1.a666047ea18866fb.js} +2 -2
- package/dashboard/.next/static/chunks/1015.39008440ab15e196.js +226 -0
- package/dashboard/.next/static/chunks/1026.0ef689a305302427.js +1 -0
- package/dashboard/.next/static/chunks/1151.497fa63c5b9eba52.js +1 -0
- package/dashboard/.next/static/chunks/1164.34eb76767ebea46f.js +8 -0
- package/dashboard/.next/static/chunks/119.a9a79633900a235f.js +5 -0
- package/dashboard/.next/static/chunks/1199.f30cbfa151e56076.js +148 -0
- package/dashboard/.next/static/chunks/1291.6c486c9b1d4b1b3a.js +1 -0
- package/dashboard/.next/static/chunks/1375.64c20f1064a38a10.js +43 -0
- package/dashboard/.next/static/chunks/139.4691848fc5a46253.js +10 -0
- package/dashboard/.next/static/chunks/145.1bf74fecdb4022e3.js +11 -0
- package/dashboard/.next/static/chunks/1517.8e7075f78e22b3a0.js +8 -0
- package/dashboard/.next/static/chunks/165.6f174060a0ce2db4.js +6 -0
- package/dashboard/.next/static/chunks/1741.5c370b7702d2eb40.js +8 -0
- package/dashboard/.next/static/chunks/1799.8dc56017eede704e.js +9 -0
- package/dashboard/.next/static/chunks/1e36816c.5748c83adc8a6bd6.js +108 -0
- package/dashboard/.next/static/chunks/20154aaa.e87f69fe10483f8b.js +1 -0
- package/dashboard/.next/static/chunks/2061.eab75b3c1dfa068a.js +1 -0
- package/dashboard/.next/static/chunks/2077.5603adeb156c7d10.js +1 -0
- package/dashboard/.next/static/chunks/2148.3ce718f62d1b2f7c.js +10 -0
- package/dashboard/.next/static/chunks/2166.9f6592b9399eadd8.js +215 -0
- package/dashboard/.next/static/chunks/217-1d5b680ffd10e3f9.js +1 -0
- package/dashboard/.next/static/chunks/2208.fb884379aa3ae968.js +1 -0
- package/dashboard/.next/static/chunks/2276.112c7855333fca5f.js +6 -0
- package/dashboard/.next/static/chunks/{2291.85a70cb0c228157b.js → 2291.584b42ccad079b99.js} +1 -1
- package/dashboard/.next/static/chunks/2325.7decd077edfb81d9.js +24 -0
- package/dashboard/.next/static/chunks/2374-8c6f137938f8518a.js +1 -0
- package/dashboard/.next/static/chunks/{2383.62c035a052272594.js → 2383.ca81f980ce6528a4.js} +1 -1
- package/dashboard/.next/static/chunks/2445.18a86507d2996b95.js +1 -0
- package/dashboard/.next/static/chunks/2694.7dfa5fef28851903.js +1 -0
- package/dashboard/.next/static/chunks/2712.15dd8577973baf22.js +10 -0
- package/dashboard/.next/static/chunks/275.38af87389c1d33d7.js +34 -0
- package/dashboard/.next/static/chunks/2759.533dec5317e0a1d1.js +1 -0
- package/dashboard/.next/static/chunks/2781.fba46046dbf2693b.js +93 -0
- package/dashboard/.next/static/chunks/2805.35b4cd8a94978aaf.js +1 -0
- package/dashboard/.next/static/chunks/2812.62b213bef580b69a.js +1 -0
- package/dashboard/.next/static/chunks/{2879.51436986f93981d9.js → 2879.74d65e33e60505ee.js} +1 -1
- package/dashboard/.next/static/chunks/2895.bb57cacb7aaf42a1.js +9 -0
- package/dashboard/.next/static/chunks/2972.e5a9251b538dcf19.js +9 -0
- package/dashboard/.next/static/chunks/3205-fd963acf2fdfd080.js +2 -0
- package/dashboard/.next/static/chunks/3206.8d9a10db2b04b93f.js +1 -0
- package/dashboard/.next/static/chunks/3236.eac9855778a54518.js +1 -0
- package/dashboard/.next/static/chunks/3480.853a445a3784642a.js +1 -0
- package/dashboard/.next/static/chunks/3485.36766504793b7237.js +9 -0
- package/dashboard/.next/static/chunks/3626.c5dacee11c8fbc4d.js +64 -0
- package/dashboard/.next/static/chunks/3725.de9376dc994735d4.js +9 -0
- package/dashboard/.next/static/chunks/3774.1df377928e8387f7.js +9 -0
- package/dashboard/.next/static/chunks/3865.5e6d2d501380e03b.js +90 -0
- package/dashboard/.next/static/chunks/3887.073cece834a4eae2.js +1 -0
- package/dashboard/.next/static/chunks/3924-f1f85ccc7d59d7ab.js +1 -0
- package/dashboard/.next/static/chunks/3948.74201b9f0672234d.js +287 -0
- package/dashboard/.next/static/chunks/3963.39d72b3875dfe2e9.js +13 -0
- package/dashboard/.next/static/chunks/4013.73884b23bfaebdde.js +11 -0
- package/dashboard/.next/static/chunks/4117.278aff1fa23fd36e.js +6 -0
- package/dashboard/.next/static/chunks/4210.cc8594110017c579.js +11 -0
- package/dashboard/.next/static/chunks/4282.28485875540886cc.js +7 -0
- package/dashboard/.next/static/chunks/4318.a2f469a88d88f6d0.js +8 -0
- package/dashboard/.next/static/chunks/4363.8999a6e727c48003.js +1 -0
- package/dashboard/.next/static/chunks/4641.e03d118fffebd580.js +5 -0
- package/dashboard/.next/static/chunks/4728.e69372b5e5b61b8d.js +24 -0
- package/dashboard/.next/static/chunks/4787.821a6ad2816cdc60.js +23 -0
- package/dashboard/.next/static/chunks/483.a910dab7734a1074.js +8 -0
- package/dashboard/.next/static/chunks/4926.76693f542e9cc062.js +6 -0
- package/dashboard/.next/static/chunks/4938.03f6d04dabf38745.js +10 -0
- package/dashboard/.next/static/chunks/5060.47402abc10273699.js +1 -0
- package/dashboard/.next/static/chunks/5112.0757c2b0c285e62e.js +1 -0
- package/dashboard/.next/static/chunks/5199.c83ea7efb0eec705.js +11 -0
- package/dashboard/.next/static/chunks/5284.334c7c0587d5d47a.js +1 -0
- package/dashboard/.next/static/chunks/530.849957a8907eb288.js +1 -0
- package/dashboard/.next/static/chunks/5424.4e8ca0711a32bccf.js +7 -0
- package/dashboard/.next/static/chunks/55.a593a78be9714679.js +1 -0
- package/dashboard/.next/static/chunks/5535.6cd0bd8d368d8902.js +4 -0
- package/dashboard/.next/static/chunks/5626.7d4e93d7acbeffc9.js +10 -0
- package/dashboard/.next/static/chunks/5715.e16b1230cc4b4652.js +115 -0
- package/dashboard/.next/static/chunks/5775.a0d7c1b1e89b9a93.js +9 -0
- package/dashboard/.next/static/chunks/6014.641a2c53ba506241.js +104 -0
- package/dashboard/.next/static/chunks/6024.f099c15f75aa6722.js +79 -0
- package/dashboard/.next/static/chunks/{6052.033a6f1013c666eb.js → 6052.3001318955e5b36c.js} +2 -2
- package/dashboard/.next/static/chunks/6118.266956b3333b1d7a.js +9 -0
- package/dashboard/.next/static/chunks/6121.a2e6d93720b1205e.js +77 -0
- package/dashboard/.next/static/chunks/6177.a01cf0a03734cf09.js +1 -0
- package/dashboard/.next/static/chunks/618f8807-fbb1466bc29c17c6.js +1 -0
- package/dashboard/.next/static/chunks/6434.f560693253fea8de.js +1 -0
- package/dashboard/.next/static/chunks/6468.976d89ba133185f1.js +77 -0
- package/dashboard/.next/static/chunks/6540.6f3c4f2c6877ed89.js +1 -0
- package/dashboard/.next/static/chunks/6549.e3c4c1766cff1449.js +1 -0
- package/dashboard/.next/static/chunks/6853.d3ad43614e8ca0ab.js +1 -0
- package/dashboard/.next/static/chunks/690f35d0.ab57e02a04c7e9e0.js +119 -0
- package/dashboard/.next/static/chunks/6951.02a3a158d02158c9.js +5 -0
- package/dashboard/.next/static/chunks/6970.013f24568c87d918.js +11 -0
- package/dashboard/.next/static/chunks/7013.39d41e82b37be63b.js +9 -0
- package/dashboard/.next/static/chunks/{7020.831e16e26d91abc1.js → 7020.b718b1b9cea36e60.js} +2 -2
- package/dashboard/.next/static/chunks/7107.1c5412197912b8ed.js +8 -0
- package/dashboard/.next/static/chunks/7498-7cf464d8af69cd0a.js +1 -0
- package/dashboard/.next/static/chunks/7508.dd60e2d06d149f5f.js +9 -0
- package/dashboard/.next/static/chunks/7524.0fde4c61553d1491.js +3 -0
- package/dashboard/.next/static/chunks/7802.f0134c792fccd382.js +80 -0
- package/dashboard/.next/static/chunks/7834-47f318a04a05688f.js +1 -0
- package/dashboard/.next/static/chunks/{7a04ac15.1c6cea694301806c.js → 7a04ac15.e49de94ece135900.js} +1 -1
- package/dashboard/.next/static/chunks/8216.1138ec313908a708.js +5 -0
- package/dashboard/.next/static/chunks/{8233babc.780b8e272eda298f.js → 8233babc.09872dcb3ff44064.js} +1 -1
- package/dashboard/.next/static/chunks/8317.d0b3eddef4cae0d5.js +1 -0
- package/dashboard/.next/static/chunks/838.2b2aa006519ba44c.js +10 -0
- package/dashboard/.next/static/chunks/8398.924fd8f4c83417c0.js +7 -0
- package/dashboard/.next/static/chunks/8428b36f.8ac4e67061c01307.js +34 -0
- package/dashboard/.next/static/chunks/8514.85ccbbea8ab21d04.js +5 -0
- package/dashboard/.next/static/chunks/8538.5f7ebe76c4b63162.js +1 -0
- package/dashboard/.next/static/chunks/8645.98a43217d406500e.js +1 -0
- package/dashboard/.next/static/chunks/8687.9406baa8b5601fd0.js +1 -0
- package/dashboard/.next/static/chunks/8721.47346e2cb6412376.js +10 -0
- package/dashboard/.next/static/chunks/8770.4f544bd1a6f03a62.js +8 -0
- package/dashboard/.next/static/chunks/8812.3d96fd54dba566f8.js +9 -0
- package/dashboard/.next/static/chunks/8962.d22aa67a97970dd8.js +1 -0
- package/dashboard/.next/static/chunks/8986.b327224b83f4399a.js +5 -0
- package/dashboard/.next/static/chunks/9173.a7160f7d0b685fa7.js +1 -0
- package/dashboard/.next/static/chunks/9178.998a8c49996de8e4.js +1 -0
- package/dashboard/.next/static/chunks/9271.5f66c19a8ee1ff36.js +10 -0
- package/dashboard/.next/static/chunks/9282.f8d01442bab4c0da.js +2 -0
- package/dashboard/.next/static/chunks/9366.0ec24a0791b9b00f.js +1 -0
- package/dashboard/.next/static/chunks/9466.a914ce0de7d3bb84.js +1 -0
- package/dashboard/.next/static/chunks/9660.b1c8deae2c449d14.js +1 -0
- package/dashboard/.next/static/chunks/9707.5cd7d2ee933a4af5.js +6 -0
- package/dashboard/.next/static/chunks/9716.15fffc0b0038601d.js +4 -0
- package/dashboard/.next/static/chunks/{9717.6cf5c8c89403b651.js → 9717.bba51b78ebd8fd29.js} +1 -1
- package/dashboard/.next/static/chunks/9720.d63a0696776bcc60.js +1 -0
- package/dashboard/.next/static/chunks/9791.e3b3f5a367f63c8a.js +1 -0
- package/dashboard/.next/static/chunks/9811.2993c4cbd28e8d1b.js +1 -0
- package/dashboard/.next/static/chunks/9820.8c1efad5260e8137.js +1 -0
- package/dashboard/.next/static/chunks/985.50150e9eaa4bde33.js +39 -0
- package/dashboard/.next/static/chunks/997.56901b86e1b8a87b.js +8 -0
- package/dashboard/.next/static/chunks/app/_not-found/page-5ff5d54b6fd6f17e.js +1 -0
- package/dashboard/.next/static/chunks/app/changes/page-f8a860034221cad4.js +1 -0
- package/dashboard/.next/static/chunks/app/issues/page-da4da93188c414a6.js +1 -0
- package/dashboard/.next/static/chunks/app/layout-27a9da4610423c1e.js +1 -0
- package/dashboard/.next/static/chunks/app/model/page-9680e22fdd6ddb81.js +1 -0
- package/dashboard/.next/static/chunks/app/page-0e67750d99fb2836.js +1 -0
- package/dashboard/.next/static/chunks/app/report/page-b56b1db9b9dcf2b6.js +1 -0
- package/dashboard/.next/static/chunks/app/review/page-3ef69f0e0badd333.js +1 -0
- package/dashboard/.next/static/chunks/{b7167ec1.7afbab6f609e3326.js → b7167ec1.708a3d61698ca2e6.js} +1 -1
- package/dashboard/.next/static/chunks/c75e29e3.d91220f782934d80.js +1 -0
- package/dashboard/.next/static/chunks/c7ea4e13.3073a2f551aa5ac8.js +1 -0
- package/dashboard/.next/static/chunks/framework-a117d81bf1b91f9a.js +33 -0
- package/dashboard/.next/static/chunks/main-9c95a7ffedc7afb4.js +1 -0
- package/dashboard/.next/static/chunks/main-app-5662c64b50ba40d1.js +1 -0
- package/dashboard/.next/static/chunks/pages/_app-308fef0bf9b328f2.js +1 -0
- package/dashboard/.next/static/chunks/pages/_error-c91b5eabd7ac9382.js +1 -0
- package/dashboard/.next/static/chunks/webpack-6da70e4f9fcf1799.js +1 -0
- package/dashboard/.next/static/css/ceafd91ca8dd753d.css +3 -0
- package/dashboard/.next/static/css/e4aad1f9c715b79a.css +1 -0
- package/dashboard/.next/static/media/39f449c8730c2295-s.woff2 +0 -0
- package/dashboard/.next/static/media/86f65e8637cc94e3-s.woff2 +0 -0
- package/dashboard/.next/static/media/8760c4774489e4ba-s.p.woff2 +0 -0
- package/dashboard/.next/static/media/9fabb9c65b63d798-s.woff2 +0 -0
- package/dashboard/.next/static/media/Assistant-Bold.c8f39f24.woff2 +0 -0
- package/dashboard/.next/static/media/Assistant-Medium.1e75d8e6.woff2 +0 -0
- package/dashboard/.next/static/media/Assistant-Regular.7acbabb8.woff2 +0 -0
- package/dashboard/.next/static/media/Assistant-SemiBold.167acbf8.woff2 +0 -0
- package/dashboard/.next/static/media/a1f87af3f44fadbb-s.woff2 +0 -0
- package/dashboard/.next/static/media/f9e1dbe9676d9bb6-s.woff2 +0 -0
- package/dashboard/app/api/code/route.ts +26 -20
- package/dashboard/app/api/comments/route.ts +158 -0
- package/dashboard/app/api/diagrams/[name]/export/route.ts +26 -0
- package/dashboard/app/api/diagrams/[name]/resolve/route.ts +25 -0
- package/dashboard/app/api/diagrams/[name]/route.ts +37 -0
- package/dashboard/app/api/figures/[name]/route.ts +15 -0
- package/dashboard/app/api/focus/route.ts +35 -0
- package/dashboard/app/api/invariants/[id]/route.ts +35 -0
- package/dashboard/app/api/issues/[id]/revert-auto/route.ts +18 -0
- package/dashboard/app/api/nav/route.ts +120 -0
- package/dashboard/app/api/palette/route.ts +68 -0
- package/dashboard/app/api/progress/route.ts +54 -23
- package/dashboard/app/api/xref/route.ts +30 -0
- package/dashboard/app/changes/ChangesClient.tsx +838 -0
- package/dashboard/app/changes/page.tsx +44 -0
- package/dashboard/app/excalidraw-assets/[...path]/route.ts +56 -0
- package/dashboard/app/globals.css +231 -77
- package/dashboard/app/issues/BoardClient.tsx +817 -0
- package/dashboard/app/issues/page.tsx +27 -272
- package/dashboard/app/layout.tsx +37 -10
- package/dashboard/app/model/ModelClient.tsx +1303 -0
- package/dashboard/app/model/page.tsx +98 -0
- package/dashboard/app/page.tsx +195 -239
- package/dashboard/app/report/ReportClient.tsx +147 -74
- package/dashboard/app/report/page.tsx +25 -14
- package/dashboard/app/review/ReviewClient.tsx +1180 -0
- package/dashboard/app/review/page.tsx +93 -0
- package/dashboard/components/AutoRefresh.tsx +22 -19
- package/dashboard/components/CodeComments.tsx +303 -0
- package/dashboard/components/CodeNav.tsx +523 -0
- package/dashboard/components/CodeReference.tsx +92 -99
- package/dashboard/components/CodeViewer.tsx +526 -0
- package/dashboard/components/CommandPalette.tsx +141 -66
- package/dashboard/components/DiagramCanvas.tsx +275 -0
- package/dashboard/components/DianeNote.tsx +244 -0
- package/dashboard/components/LiveStatus.tsx +30 -68
- package/dashboard/components/MarkdownRenderer.tsx +34 -32
- package/dashboard/components/RecordButton.tsx +132 -0
- package/dashboard/components/ui/Button.tsx +39 -0
- package/dashboard/components/ui/Chip.tsx +37 -0
- package/dashboard/components/ui/EmptyState.tsx +31 -0
- package/dashboard/components/ui/Icons.tsx +126 -0
- package/dashboard/components/ui/Inspector.tsx +122 -0
- package/dashboard/components/ui/Kbd.tsx +15 -0
- package/dashboard/components/ui/ListRow.tsx +92 -0
- package/dashboard/components/ui/LocalTime.tsx +14 -0
- package/dashboard/components/ui/ProgressRing.tsx +54 -0
- package/dashboard/components/ui/ResizeHandle.tsx +93 -0
- package/dashboard/components/ui/RiskMeter.tsx +27 -0
- package/dashboard/components/ui/SearchField.tsx +55 -0
- package/dashboard/components/ui/SegmentedControl.tsx +71 -0
- package/dashboard/components/ui/SeverityDot.tsx +57 -0
- package/dashboard/components/ui/Sidebar.tsx +236 -0
- package/dashboard/components/ui/SplitView.tsx +122 -0
- package/dashboard/components/ui/StateGlyph.tsx +66 -0
- package/dashboard/components/ui/Toast.tsx +91 -0
- package/dashboard/lib/api.ts +17 -0
- package/dashboard/lib/cn.ts +4 -0
- package/dashboard/lib/data.ts +2 -21
- package/dashboard/lib/finding-markdown.ts +1 -1
- package/dashboard/lib/focus.ts +42 -0
- package/dashboard/lib/hotkeys.ts +41 -0
- package/dashboard/lib/inline-markdown.test.ts +11 -0
- package/dashboard/lib/live.ts +32 -0
- package/dashboard/lib/pane-width.ts +36 -0
- package/dashboard/lib/server/board.ts +229 -0
- package/dashboard/lib/server/diagrams.ts +191 -0
- package/dashboard/lib/server/safe-path.ts +28 -0
- package/dashboard/lib/server/workspace.ts +113 -0
- package/dashboard/lib/server/xref.ts +42 -0
- package/dashboard/lib/solidity.test.ts +37 -0
- package/dashboard/lib/solidity.ts +191 -0
- package/dashboard/lib/source.ts +28 -0
- package/dashboard/lib/types.ts +164 -0
- package/dashboard/lib/url.ts +18 -0
- package/dashboard/lib/watcher.ts +31 -22
- package/dashboard/tailwind.config.ts +6 -3
- package/dist/analysis/code-model.d.ts +113 -0
- package/dist/analysis/code-model.d.ts.map +1 -0
- package/dist/analysis/code-model.js +532 -0
- package/dist/analysis/code-model.js.map +1 -0
- package/dist/analysis/diff.d.ts +75 -0
- package/dist/analysis/diff.d.ts.map +1 -0
- package/dist/analysis/diff.js +787 -0
- package/dist/analysis/diff.js.map +1 -0
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +25 -40
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/claude.d.ts.map +1 -1
- package/dist/commands/claude.js +5 -0
- package/dist/commands/claude.js.map +1 -1
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +10 -2
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/diagram.d.ts +3 -0
- package/dist/commands/diagram.d.ts.map +1 -0
- package/dist/commands/diagram.js +71 -0
- package/dist/commands/diagram.js.map +1 -0
- package/dist/commands/diff.d.ts +25 -0
- package/dist/commands/diff.d.ts.map +1 -0
- package/dist/commands/diff.js +257 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +5 -18
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/facts.d.ts +23 -0
- package/dist/commands/facts.d.ts.map +1 -0
- package/dist/commands/facts.js +121 -0
- package/dist/commands/facts.js.map +1 -0
- package/dist/commands/fix-review.d.ts +9 -0
- package/dist/commands/fix-review.d.ts.map +1 -0
- package/dist/commands/fix-review.js +367 -0
- package/dist/commands/fix-review.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +106 -42
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/issue.d.ts.map +1 -1
- package/dist/commands/issue.js +154 -5
- package/dist/commands/issue.js.map +1 -1
- package/dist/commands/mcp.d.ts +3 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +11 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/model.d.ts +4 -0
- package/dist/commands/model.d.ts.map +1 -0
- package/dist/commands/model.js +275 -0
- package/dist/commands/model.js.map +1 -0
- package/dist/commands/note.d.ts.map +1 -1
- package/dist/commands/note.js +61 -3
- package/dist/commands/note.js.map +1 -1
- package/dist/commands/review.d.ts +4 -0
- package/dist/commands/review.d.ts.map +1 -0
- package/dist/commands/review.js +164 -0
- package/dist/commands/review.js.map +1 -0
- package/dist/core/comments.d.ts +59 -0
- package/dist/core/comments.d.ts.map +1 -0
- package/dist/core/comments.js +263 -0
- package/dist/core/comments.js.map +1 -0
- package/dist/core/config.d.ts +9 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +18 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/dedup.d.ts +56 -0
- package/dist/core/dedup.d.ts.map +1 -0
- package/dist/core/dedup.js +208 -0
- package/dist/core/dedup.js.map +1 -0
- package/dist/core/errors.d.ts +1 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +16 -15
- package/dist/core/errors.js.map +1 -1
- package/dist/core/external-tools.d.ts +0 -14
- package/dist/core/external-tools.d.ts.map +1 -1
- package/dist/core/external-tools.js +2 -52
- package/dist/core/external-tools.js.map +1 -1
- package/dist/core/fix-review.d.ts +54 -0
- package/dist/core/fix-review.d.ts.map +1 -0
- package/dist/core/fix-review.js +98 -0
- package/dist/core/fix-review.js.map +1 -0
- package/dist/core/fuzz-sync.d.ts +93 -0
- package/dist/core/fuzz-sync.d.ts.map +1 -0
- package/dist/core/fuzz-sync.js +516 -0
- package/dist/core/fuzz-sync.js.map +1 -0
- package/dist/core/git.d.ts +31 -0
- package/dist/core/git.d.ts.map +1 -0
- package/dist/core/git.js +157 -0
- package/dist/core/git.js.map +1 -0
- package/dist/core/issues.d.ts +35 -2
- package/dist/core/issues.d.ts.map +1 -1
- package/dist/core/issues.js +201 -30
- package/dist/core/issues.js.map +1 -1
- package/dist/core/mcp-config.d.ts +12 -0
- package/dist/core/mcp-config.d.ts.map +1 -0
- package/dist/core/mcp-config.js +29 -0
- package/dist/core/mcp-config.js.map +1 -0
- package/dist/core/model.d.ts +38 -0
- package/dist/core/model.d.ts.map +1 -0
- package/dist/core/model.js +160 -0
- package/dist/core/model.js.map +1 -0
- package/dist/core/notes.d.ts +27 -1
- package/dist/core/notes.d.ts.map +1 -1
- package/dist/core/notes.js +47 -5
- package/dist/core/notes.js.map +1 -1
- package/dist/core/review.d.ts +47 -0
- package/dist/core/review.d.ts.map +1 -1
- package/dist/core/review.js +177 -1
- package/dist/core/review.js.map +1 -1
- package/dist/core/rules.d.ts +12 -0
- package/dist/core/rules.d.ts.map +1 -0
- package/dist/core/rules.js +66 -0
- package/dist/core/rules.js.map +1 -0
- package/dist/core/schema.d.ts +5458 -2189
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +605 -114
- package/dist/core/schema.js.map +1 -1
- package/dist/core/scope.d.ts +8 -0
- package/dist/core/scope.d.ts.map +1 -0
- package/dist/core/scope.js +18 -0
- package/dist/core/scope.js.map +1 -0
- package/dist/core/skills.d.ts +10 -4
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +100 -37
- package/dist/core/skills.js.map +1 -1
- package/dist/diagrams/build.d.ts +18 -0
- package/dist/diagrams/build.d.ts.map +1 -0
- package/dist/diagrams/build.js +135 -0
- package/dist/diagrams/build.js.map +1 -0
- package/dist/diagrams/excalidraw.d.ts +27 -0
- package/dist/diagrams/excalidraw.d.ts.map +1 -0
- package/dist/diagrams/excalidraw.js +219 -0
- package/dist/diagrams/excalidraw.js.map +1 -0
- package/dist/diagrams/layout.d.ts +48 -0
- package/dist/diagrams/layout.d.ts.map +1 -0
- package/dist/diagrams/layout.js +686 -0
- package/dist/diagrams/layout.js.map +1 -0
- package/dist/facts/build.d.ts +23 -0
- package/dist/facts/build.d.ts.map +1 -0
- package/dist/facts/build.js +112 -0
- package/dist/facts/build.js.map +1 -0
- package/dist/facts/extract.d.ts +53 -0
- package/dist/facts/extract.d.ts.map +1 -0
- package/dist/facts/extract.js +635 -0
- package/dist/facts/extract.js.map +1 -0
- package/dist/facts/fallback.d.ts +7 -0
- package/dist/facts/fallback.d.ts.map +1 -0
- package/dist/facts/fallback.js +156 -0
- package/dist/facts/fallback.js.map +1 -0
- package/dist/facts/implementations.d.ts +29 -0
- package/dist/facts/implementations.d.ts.map +1 -0
- package/dist/facts/implementations.js +43 -0
- package/dist/facts/implementations.js.map +1 -0
- package/dist/facts/query.d.ts +35 -0
- package/dist/facts/query.d.ts.map +1 -0
- package/dist/facts/query.js +157 -0
- package/dist/facts/query.js.map +1 -0
- package/dist/facts/xref.d.ts +53 -0
- package/dist/facts/xref.d.ts.map +1 -0
- package/dist/facts/xref.js +282 -0
- package/dist/facts/xref.js.map +1 -0
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.d.ts +3 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +400 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/skills/ai-audit/LICENSE +21 -0
- package/dist/skills/ai-audit/SKILL.md +486 -0
- package/dist/skills/ai-audit/UPSTREAM.md +51 -0
- package/dist/skills/ai-audit/references/agent-prompts.md +133 -0
- package/dist/skills/ai-audit/references/assemble.sh +357 -0
- package/dist/skills/ai-audit/references/dedup-and-assembly.md +420 -0
- package/dist/skills/ai-audit/references/hacking-agents/access-control-agent.md +27 -0
- package/dist/skills/ai-audit/references/hacking-agents/asymmetry-agent.md +77 -0
- package/dist/skills/ai-audit/references/hacking-agents/boundary-agent.md +79 -0
- package/dist/skills/ai-audit/references/hacking-agents/economic-security-agent.md +35 -0
- package/dist/skills/ai-audit/references/hacking-agents/execution-trace-agent.md +33 -0
- package/dist/skills/ai-audit/references/hacking-agents/first-principles-agent.md +36 -0
- package/dist/skills/ai-audit/references/hacking-agents/flow-gap-agent.md +49 -0
- package/dist/skills/ai-audit/references/hacking-agents/invariant-agent.md +44 -0
- package/dist/skills/ai-audit/references/hacking-agents/math-precision-agent.md +48 -0
- package/dist/skills/ai-audit/references/hacking-agents/numerical-gap-agent.md +46 -0
- package/dist/skills/ai-audit/references/hacking-agents/periphery-agent.md +27 -0
- package/dist/skills/ai-audit/references/hacking-agents/shared-rules.md +61 -0
- package/dist/skills/ai-audit/references/hacking-agents/trust-gap-agent.md +40 -0
- package/dist/skills/ai-audit/references/hex-board.md +211 -0
- package/dist/skills/ai-audit/references/hex-export.sh +71 -0
- package/dist/skills/ai-audit/references/judging.md +75 -0
- package/dist/skills/ai-audit/references/report-formatting.md +385 -0
- package/dist/skills/ai-audit/references/report-language.md +151 -0
- package/dist/skills/ai-audit/references/senior-auditor-sop.md +63 -0
- package/dist/skills/diane.md +26 -12
- package/dist/skills/fix-review.md +58 -0
- package/dist/skills/fuzz/LICENSE +21 -0
- package/dist/skills/fuzz/SKILL.md +655 -0
- package/dist/skills/fuzz/UPSTREAM.md +119 -0
- package/dist/skills/fuzz/agents/implementers/global-property-implementer.md +81 -0
- package/dist/skills/fuzz/agents/implementers/specific-property-implementer.md +121 -0
- package/dist/skills/fuzz/agents/invariant-discovery/adversarial-profit-maximizer.md +123 -0
- package/dist/skills/fuzz/agents/invariant-discovery/conservation-auditor.md +92 -0
- package/dist/skills/fuzz/agents/invariant-discovery/protocol-type-specialist.md +173 -0
- package/dist/skills/fuzz/agents/invariant-discovery/roundtrip-rounding-analyst.md +164 -0
- package/dist/skills/fuzz/agents/invariant-discovery/state-transition-mapper.md +92 -0
- package/dist/skills/fuzz/agents/invariant-discovery/synthesizer.md +261 -0
- package/dist/skills/fuzz/agents/protocol-analyzer.md +80 -0
- package/dist/skills/fuzz/agents/report-writer.md +135 -0
- package/dist/skills/fuzz/references/handler-patterns.md +222 -0
- package/dist/skills/fuzz/references/hex-invariants.md +102 -0
- package/dist/skills/fuzz/references/property-generation.md +149 -0
- package/dist/skills/fuzz/references/selection-policy.md +49 -0
- package/dist/skills/fuzz/references/setup-playbook.md +92 -0
- package/dist/skills/fuzz/references/template-map.md +121 -0
- package/dist/skills/fuzz/scripts/ensure_foundry.sh +125 -0
- package/dist/skills/fuzz/scripts/estimate_cost.js +157 -0
- package/dist/skills/fuzz/scripts/extract_abis.js +303 -0
- package/dist/skills/fuzz/scripts/fizz_sync.js +692 -0
- package/dist/skills/fuzz/scripts/generate_handlers.js +370 -0
- package/dist/skills/fuzz/scripts/generate_suite.js +254 -0
- package/dist/skills/fuzz/scripts/lib/log-viewer.js +332 -0
- package/dist/skills/fuzz/scripts/run_echidna.js +192 -0
- package/dist/skills/fuzz/scripts/run_medusa.js +329 -0
- package/dist/skills/fuzz/scripts/select_functions.js +637 -0
- package/dist/skills/fuzz/scripts/setup_fuzz_profile.sh +142 -0
- package/dist/skills/fuzz/templates/Actor.sol +63 -0
- package/dist/skills/fuzz/templates/Base.sol +121 -0
- package/dist/skills/fuzz/templates/FoundryTester.sol +29 -0
- package/dist/skills/fuzz/templates/FuzzTester.sol +11 -0
- package/dist/skills/fuzz/templates/Properties.sol +17 -0
- package/dist/skills/fuzz/templates/README.md +56 -0
- package/dist/skills/fuzz/templates/Snapshots.sol +26 -0
- package/dist/skills/fuzz/templates/echidna.yaml +18 -0
- package/dist/skills/fuzz/templates/handlers/Handlers.sol +13 -0
- package/dist/skills/fuzz/templates/medusa.json +93 -0
- package/dist/skills/fuzz/templates/utils/Clamp.sol +223 -0
- package/dist/skills/fuzz/templates/utils/DecimalPrinter.sol +63 -0
- package/dist/skills/fuzz/templates/utils/Deployer.sol +17 -0
- package/dist/skills/fuzz/templates/utils/EnumerableSet.sol +206 -0
- package/dist/skills/fuzz/templates/utils/Hevm.sol +62 -0
- package/dist/skills/fuzz/templates/utils/Logger.sol +619 -0
- package/dist/skills/fuzz/templates/utils/Math.sol +52 -0
- package/dist/skills/fuzz/templates/utils/MockERC20.sol +279 -0
- package/dist/skills/fuzz/templates/utils/PropertiesAsserts.sol +238 -0
- package/dist/skills/fuzz/templates/utils/StringUtils.sol +85 -0
- package/dist/skills/fuzz-convert/SKILL.md +249 -0
- package/dist/skills/fuzz-sync/SKILL.md +342 -0
- package/dist/skills/generate-poc.md +8 -26
- package/dist/skills/generate-report.md +24 -8
- package/dist/skills/ingest-aa-report.md +11 -30
- package/dist/skills/init-audit/SKILL.md +155 -0
- package/dist/skills/init-audit/references/agents/conformance-checker.md +36 -0
- package/dist/skills/init-audit/references/agents/contract-reader.md +59 -0
- package/dist/skills/init-audit/references/agents/diagram-composer.md +48 -0
- package/dist/skills/init-audit/references/agents/docs-extractor.md +26 -0
- package/dist/skills/init-audit/references/agents/prior-audit.md +32 -0
- package/dist/skills/init-audit/references/agents/regression-checker.md +28 -0
- package/dist/skills/init-audit/references/agents/skeptic.md +31 -0
- package/dist/skills/init-audit/references/agents/standards-checker.md +39 -0
- package/dist/skills/init-audit/references/agents/synthesizer.md +50 -0
- package/dist/skills/prevalidate.md +62 -0
- package/dist/skills/sync-issues.md +11 -25
- package/dist/skills/validate-all-findings.md +3 -3
- package/dist/skills/validate-finding.md +33 -28
- package/dist/skills/write-finding.md +6 -5
- package/dist/types/index.d.ts +22 -12
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +6 -4
- package/dashboard/.next/server/app/_not-found.html +0 -1
- package/dashboard/.next/server/app/_not-found.meta +0 -6
- package/dashboard/.next/server/app/_not-found.rsc +0 -12
- package/dashboard/.next/server/app/access/page.js +0 -1
- package/dashboard/.next/server/app/access/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/api/flows/route.js +0 -1
- package/dashboard/.next/server/app/api/mermaid/route.js +0 -1
- package/dashboard/.next/server/app/calls/page.js +0 -1
- package/dashboard/.next/server/app/calls/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/conformance/page.js +0 -1
- package/dashboard/.next/server/app/conformance/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/diagram/page.js +0 -1
- package/dashboard/.next/server/app/diagram/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/diagram/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/diagram.html +0 -1
- package/dashboard/.next/server/app/diagram.meta +0 -5
- package/dashboard/.next/server/app/diagram.rsc +0 -10
- package/dashboard/.next/server/app/flows/page.js +0 -1
- package/dashboard/.next/server/app/flows/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/flows/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/flows.html +0 -1
- package/dashboard/.next/server/app/flows.meta +0 -5
- package/dashboard/.next/server/app/flows.rsc +0 -10
- package/dashboard/.next/server/app/functions/page.js +0 -1
- package/dashboard/.next/server/app/functions/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/functions/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/notes/page.js +0 -22
- package/dashboard/.next/server/app/notes/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/notes/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/progress/page.js +0 -1
- package/dashboard/.next/server/app/progress/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/progress/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/stats/page.js +0 -1
- package/dashboard/.next/server/app/stats/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/stats/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/chunks/44.js +0 -1
- package/dashboard/.next/server/chunks/530.js +0 -1
- package/dashboard/.next/server/chunks/622.js +0 -3
- package/dashboard/.next/server/chunks/665.js +0 -13
- package/dashboard/.next/server/pages/404.html +0 -1
- package/dashboard/.next/static/AyrRAwu4mazjp8iX4Yjbb/_buildManifest.js +0 -1
- package/dashboard/.next/static/chunks/1015.3ab89142e5f44120.js +0 -226
- package/dashboard/.next/static/chunks/1151.b6ef5c786e587ed7.js +0 -1
- package/dashboard/.next/static/chunks/1199.a072929dbec89965.js +0 -148
- package/dashboard/.next/static/chunks/1375.d4d2f7fc9c9c2ff1.js +0 -43
- package/dashboard/.next/static/chunks/1799.83206776abbbf1fc.js +0 -9
- package/dashboard/.next/static/chunks/20154aaa.ccc347c04ab5ad4a.js +0 -1
- package/dashboard/.next/static/chunks/2077.7011a570c87aa7b1.js +0 -1
- package/dashboard/.next/static/chunks/2166.cc0fabeb2e89b840.js +0 -215
- package/dashboard/.next/static/chunks/2325.2c55cb9a6282ae3f.js +0 -24
- package/dashboard/.next/static/chunks/2694.92bbe252063e4786.js +0 -1
- package/dashboard/.next/static/chunks/275.0d761aa0e5b030b8.js +0 -34
- package/dashboard/.next/static/chunks/2781.8536b644a480aede.js +0 -93
- package/dashboard/.next/static/chunks/2805.a8d71d2f92bb6ba9.js +0 -1
- package/dashboard/.next/static/chunks/3017.e55781da9dd32d37.js +0 -1
- package/dashboard/.next/static/chunks/3205-728c260fbb4f89c6.js +0 -2
- package/dashboard/.next/static/chunks/3236.dff44fa7961d9d5e.js +0 -1
- package/dashboard/.next/static/chunks/3480.9451396ad7ee7613.js +0 -1
- package/dashboard/.next/static/chunks/3626.ba1cf848a9f2e93d.js +0 -64
- package/dashboard/.next/static/chunks/3865.a432a7910a2f5281.js +0 -90
- package/dashboard/.next/static/chunks/3887.c22cbfa3f095826c.js +0 -1
- package/dashboard/.next/static/chunks/3924-4a05057b5450abe1.js +0 -1
- package/dashboard/.next/static/chunks/3948.fe3c7d758568d98b.js +0 -287
- package/dashboard/.next/static/chunks/4728.07d87640a3e7dd0d.js +0 -24
- package/dashboard/.next/static/chunks/4787.4e5f6a0e0e40a583.js +0 -23
- package/dashboard/.next/static/chunks/5060.baca226af35ed016.js +0 -1
- package/dashboard/.next/static/chunks/5284.f949ac90c95ff143.js +0 -1
- package/dashboard/.next/static/chunks/5715.1524bcc9591e180b.js +0 -115
- package/dashboard/.next/static/chunks/6014.700ae4969b64d728.js +0 -104
- package/dashboard/.next/static/chunks/6024.4d23707c65514679.js +0 -79
- package/dashboard/.next/static/chunks/6177.e5c84cfc4c0dea51.js +0 -1
- package/dashboard/.next/static/chunks/618f8807-547c5614e1318888.js +0 -1
- package/dashboard/.next/static/chunks/6434.9481771c33195d29.js +0 -1
- package/dashboard/.next/static/chunks/6468.f4a3e8fa6accc6da.js +0 -77
- package/dashboard/.next/static/chunks/6540.86f367d7390738d4.js +0 -1
- package/dashboard/.next/static/chunks/6549.4d0d472df96429a5.js +0 -1
- package/dashboard/.next/static/chunks/690f35d0.3e40ca0930e4bbdb.js +0 -119
- package/dashboard/.next/static/chunks/7397-f6f4dddc7a20bfc1.js +0 -1
- package/dashboard/.next/static/chunks/7498-ea83cb9e30ec5491.js +0 -1
- package/dashboard/.next/static/chunks/7802.89aec9ee11680850.js +0 -80
- package/dashboard/.next/static/chunks/7973.8b526f589aca5d84.js +0 -79
- package/dashboard/.next/static/chunks/8216.1bead812eb126c35.js +0 -5
- package/dashboard/.next/static/chunks/8452-e616b5f43bceb95f.js +0 -13
- package/dashboard/.next/static/chunks/8645.a5ca76f11edc9633.js +0 -1
- package/dashboard/.next/static/chunks/8928-60c623ee89d2e6ad.js +0 -1
- package/dashboard/.next/static/chunks/9173.2486ffca31131ec5.js +0 -1
- package/dashboard/.next/static/chunks/9178.469341860bf8caec.js +0 -1
- package/dashboard/.next/static/chunks/9466.e904660d38c03eea.js +0 -1
- package/dashboard/.next/static/chunks/9660.84a85811380c5f33.js +0 -1
- package/dashboard/.next/static/chunks/9720.67d4d0d15a96d691.js +0 -1
- package/dashboard/.next/static/chunks/9811.65e1d080c2d256af.js +0 -1
- package/dashboard/.next/static/chunks/app/_not-found/page-548ab392d0e890d1.js +0 -1
- package/dashboard/.next/static/chunks/app/access/page-3668562e7464eb5d.js +0 -1
- package/dashboard/.next/static/chunks/app/calls/page-d07f5b8664cc8303.js +0 -1
- package/dashboard/.next/static/chunks/app/conformance/page-2fede1d7b5f9265d.js +0 -1
- package/dashboard/.next/static/chunks/app/diagram/page-b228444265546495.js +0 -1
- package/dashboard/.next/static/chunks/app/flows/page-fa67783d8cd79cab.js +0 -1
- package/dashboard/.next/static/chunks/app/functions/page-686f0296639133a3.js +0 -1
- package/dashboard/.next/static/chunks/app/issues/page-98a298e1c1045c91.js +0 -1
- package/dashboard/.next/static/chunks/app/layout-49f2496c7637d931.js +0 -1
- package/dashboard/.next/static/chunks/app/notes/page-17af94c67ba79c00.js +0 -1
- package/dashboard/.next/static/chunks/app/page-24bac51dfe007c66.js +0 -1
- package/dashboard/.next/static/chunks/app/progress/page-427fb18da3afb061.js +0 -1
- package/dashboard/.next/static/chunks/app/report/page-796f2f4a8a5ac8f7.js +0 -1
- package/dashboard/.next/static/chunks/app/stats/page-db81f600a086f252.js +0 -1
- package/dashboard/.next/static/chunks/c7ea4e13.5effeeba6618bdb7.js +0 -1
- package/dashboard/.next/static/chunks/framework-cf6f5bdca6ba0184.js +0 -33
- package/dashboard/.next/static/chunks/main-63ff429eab01f5bf.js +0 -1
- package/dashboard/.next/static/chunks/main-app-9d2f6b8a47133e9b.js +0 -1
- package/dashboard/.next/static/chunks/pages/_app-6ad2b50514c24ab4.js +0 -1
- package/dashboard/.next/static/chunks/pages/_error-d5eb11c5c4626811.js +0 -1
- package/dashboard/.next/static/chunks/webpack-08869f2b18792e51.js +0 -1
- package/dashboard/.next/static/css/4a38d8f6f6b7a68f.css +0 -3
- package/dashboard/.next/static/media/438aa629764e75f3-s.woff2 +0 -0
- package/dashboard/.next/static/media/4c9affa5bc8f420e-s.p.woff2 +0 -0
- package/dashboard/.next/static/media/51251f8b9793cdb3-s.woff2 +0 -0
- package/dashboard/.next/static/media/875ae681bfde4580-s.woff2 +0 -0
- package/dashboard/.next/static/media/cc978ac5ee68c2b6-s.woff2 +0 -0
- package/dashboard/.next/static/media/e857b654a2caa584-s.woff2 +0 -0
- package/dashboard/app/access/AccessClient.tsx +0 -402
- package/dashboard/app/access/ReadOnlyFunctions.tsx +0 -114
- package/dashboard/app/access/page.tsx +0 -125
- package/dashboard/app/api/flows/route.ts +0 -32
- package/dashboard/app/api/mermaid/route.ts +0 -25
- package/dashboard/app/calls/CallsClient.tsx +0 -170
- package/dashboard/app/calls/page.tsx +0 -57
- package/dashboard/app/conformance/ConformanceTable.tsx +0 -214
- package/dashboard/app/conformance/page.tsx +0 -186
- package/dashboard/app/diagram/page.tsx +0 -65
- package/dashboard/app/flows/page.tsx +0 -102
- package/dashboard/app/functions/FunctionsClient.tsx +0 -167
- package/dashboard/app/functions/page.tsx +0 -178
- package/dashboard/app/issues/IssuesBoardClient.tsx +0 -803
- package/dashboard/app/notes/NotesClient.tsx +0 -701
- package/dashboard/app/notes/page.tsx +0 -47
- package/dashboard/app/progress/ProgressClient.tsx +0 -354
- package/dashboard/app/progress/page.tsx +0 -127
- package/dashboard/app/stats/StatsClient.tsx +0 -452
- package/dashboard/app/stats/page.tsx +0 -50
- package/dashboard/components/ConfidenceBadge.tsx +0 -53
- package/dashboard/components/DashboardLayout.tsx +0 -485
- package/dashboard/components/FilterableTable.tsx +0 -293
- package/dashboard/components/MermaidViewer.tsx +0 -267
- package/dashboard/components/NotYetGenerated.tsx +0 -32
- package/dashboard/components/SeverityBadge.tsx +0 -28
- package/dashboard/components/SignalBars.tsx +0 -27
- package/dashboard/components/SortableTable.tsx +0 -122
- package/dashboard/lib/conformance-tokens.ts +0 -49
- package/dist/skills/init-audit.md +0 -284
- /package/dashboard/.next/server/app/api/{flows → xref}/route.js.nft.json +0 -0
- /package/dashboard/.next/server/app/{api/mermaid → excalidraw-assets/[...path]}/route.js.nft.json +0 -0
- /package/dashboard/.next/static/{AyrRAwu4mazjp8iX4Yjbb → bGV1ry1vvIbM5b506eVBR}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7802],{74739:function(t,e,i){var s=i(67998),n=i(51206);e.Z=(t,e)=>s.Z.lang.round(n.Z.parse(t)[e])},91984:function(t,e,i){i.d(e,{j:function(){return r}});var s=i(49125),n=i(17632),r=(0,n.eW)((t,e,i,r)=>{t.attr("class",i);let{width:o,height:l,x:h,y:u}=a(t,e);(0,s.v2)(t,l,o,r);let d=c(h,u,o,l,e);t.attr("viewBox",d),n.cM.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,n.eW)((t,e)=>{let i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+2*e,height:i.height+2*e,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),c=(0,n.eW)((t,e,i,s,n)=>`${t-n} ${e-n} ${i} ${s}`,"createViewBox")},64759:function(t,e,i){i.d(e,{q:function(){return r}});var s=i(17632),n=i(68859),r=(0,s.eW)((t,e)=>{let i;return"sandbox"===e&&(i=(0,n.Ys)("#i"+t)),("sandbox"===e?(0,n.Ys)(i.nodes()[0].contentDocument.body):(0,n.Ys)("body")).select(`[id="${t}"]`)},"getDiagramElement")},87802:function(t,e,i){i.d(e,{diagram:function(){return m}});var s=i(64759),n=i(91984),r=i(58523);i(90825),i(82995),i(51674),i(64994),i(43984),i(47062);var a=i(40778),c=i(49125),o=i(17632),l=i(68859),h=i(74739),u=i(3302),d=function(){var t=(0,o.eW)(function(t,e,i,s){for(i=i||{},s=t.length;s--;i[t[s]]=e);return i},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],i=[1,10],s=[1,11],n=[1,12],r=[1,13],a=[1,23],c=[1,24],l=[1,25],h=[1,26],u=[1,27],d=[1,19],y=[1,28],p=[1,29],_=[1,20],g=[1,18],b=[1,21],f=[1,22],m=[1,36],E=[1,37],k=[1,38],T=[1,39],O=[1,40],S=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],N=[1,45],A=[1,46],I=[1,55],$=[40,48,50,51,52,70,71],C=[1,66],R=[1,64],x=[1,61],D=[1,65],v=[1,67],w=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],M=[65,66,67,68,69],L=[1,84],W=[1,83],B=[1,81],Y=[1,82],F=[6,10,42,47],P=[6,10,13,41,42,47,48,49],Z=[1,92],z=[1,91],G=[1,90],K=[19,58],U=[1,101],j=[1,100],V=[19,58,60,62],Q={trace:(0,o.eW)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:(0,o.eW)(function(t,e,i,s,n,r,a){var c=r.length-1;switch(n){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:r[c-1].push(r[c]),this.$=r[c-1];break;case 4:case 5:case 55:case 56:case 57:case 58:case 81:case 65:case 66:case 69:this.$=r[c];break;case 8:s.addEntity(r[c-4]),s.addEntity(r[c-2]),s.addRelationship(r[c-4],r[c],r[c-2],r[c-3]);break;case 9:s.addEntity(r[c-8]),s.addEntity(r[c-4]),s.addRelationship(r[c-8],r[c],r[c-4],r[c-5]),s.setClass([r[c-8]],r[c-6]),s.setClass([r[c-4]],r[c-2]);break;case 10:s.addEntity(r[c-6]),s.addEntity(r[c-2]),s.addRelationship(r[c-6],r[c],r[c-2],r[c-3]),s.setClass([r[c-6]],r[c-4]);break;case 11:s.addEntity(r[c-6]),s.addEntity(r[c-4]),s.addRelationship(r[c-6],r[c],r[c-4],r[c-5]),s.setClass([r[c-4]],r[c-2]);break;case 12:s.addEntity(r[c-3]),s.addAttributes(r[c-3],r[c-1]);break;case 13:s.addEntity(r[c-5]),s.addAttributes(r[c-5],r[c-1]),s.setClass([r[c-5]],r[c-3]);break;case 14:s.addEntity(r[c-2]);break;case 15:s.addEntity(r[c-4]),s.setClass([r[c-4]],r[c-2]);break;case 16:s.addEntity(r[c]);break;case 17:s.addEntity(r[c-2]),s.setClass([r[c-2]],r[c]);break;case 18:s.addEntity(r[c-6],r[c-4]),s.addAttributes(r[c-6],r[c-1]);break;case 19:s.addEntity(r[c-8],r[c-6]),s.addAttributes(r[c-8],r[c-1]),s.setClass([r[c-8]],r[c-3]);break;case 20:s.addEntity(r[c-5],r[c-3]);break;case 21:s.addEntity(r[c-7],r[c-5]),s.setClass([r[c-7]],r[c-2]);break;case 22:s.addEntity(r[c-3],r[c-1]);break;case 23:s.addEntity(r[c-5],r[c-3]),s.setClass([r[c-5]],r[c]);break;case 24:case 25:this.$=r[c].trim(),s.setAccTitle(this.$);break;case 26:case 27:this.$=r[c].trim(),s.setAccDescription(this.$);break;case 32:s.setDirection("TB");break;case 33:s.setDirection("BT");break;case 34:s.setDirection("RL");break;case 35:s.setDirection("LR");break;case 36:this.$=r[c-3],s.addClass(r[c-2],r[c-1]);break;case 37:case 38:case 59:case 67:case 43:this.$=[r[c]];break;case 39:case 40:this.$=r[c-2].concat([r[c]]);break;case 41:this.$=r[c-2],s.setClass(r[c-1],r[c]);break;case 42:this.$=r[c-3],s.addCssStyles(r[c-2],r[c-1]);break;case 44:case 68:r[c-2].push(r[c]),this.$=r[c-2];break;case 46:this.$=r[c-1]+r[c];break;case 54:case 79:case 80:case 70:this.$=r[c].replace(/"/g,"");break;case 60:r[c].push(r[c-1]),this.$=r[c];break;case 61:this.$={type:r[c-1],name:r[c]};break;case 62:this.$={type:r[c-2],name:r[c-1],keys:r[c]};break;case 63:this.$={type:r[c-2],name:r[c-1],comment:r[c]};break;case 64:this.$={type:r[c-3],name:r[c-2],keys:r[c-1],comment:r[c]};break;case 71:this.$={cardA:r[c],relType:r[c-1],cardB:r[c-2]};break;case 72:this.$=s.Cardinality.ZERO_OR_ONE;break;case 73:this.$=s.Cardinality.ZERO_OR_MORE;break;case 74:this.$=s.Cardinality.ONE_OR_MORE;break;case 75:this.$=s.Cardinality.ONLY_ONE;break;case 76:this.$=s.Cardinality.MD_PARENT;break;case 77:this.$=s.Identification.NON_IDENTIFYING;break;case 78:this.$=s.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:i,24:s,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:c,35:l,36:h,37:u,40:d,43:y,44:p,48:_,50:g,51:b,52:f},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:30,11:9,22:i,24:s,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:c,35:l,36:h,37:u,40:d,43:y,44:p,48:_,50:g,51:b,52:f},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:m,66:E,67:k,68:T,69:O}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(S,[2,54]),t(S,[2,55]),t(S,[2,56]),t(S,[2,57]),t(S,[2,58]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:44,40:N,41:A},{16:47,40:N,41:A},{16:48,40:N,41:A},t(e,[2,4]),{11:49,40:d,48:_,50:g,51:b,52:f},{16:50,40:N,41:A},{18:51,19:[1,52],53:53,54:54,58:I},{11:56,40:d,48:_,50:g,51:b,52:f},{64:57,70:[1,58],71:[1,59]},t($,[2,72]),t($,[2,73]),t($,[2,74]),t($,[2,75]),t($,[2,76]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:C,38:60,41:R,42:x,45:62,46:63,48:D,49:v},t(w,[2,37]),t(w,[2,38]),{16:68,40:N,41:A,42:x},{13:C,38:69,41:R,42:x,45:62,46:63,48:D,49:v},{13:[1,70],15:[1,71]},t(e,[2,17],{63:35,12:72,17:[1,73],42:x,65:m,66:E,67:k,68:T,69:O}),{19:[1,74]},t(e,[2,14]),{18:75,19:[2,59],53:53,54:54,58:I},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:m,66:E,67:k,68:T,69:O},t(M,[2,77]),t(M,[2,78]),{6:L,10:W,39:80,42:B,47:Y},{40:[1,85],41:[1,86]},t(F,[2,43],{46:87,13:C,41:R,48:D,49:v}),t(P,[2,45]),t(P,[2,50]),t(P,[2,51]),t(P,[2,52]),t(P,[2,53]),t(e,[2,41],{42:x}),{6:L,10:W,39:88,42:B,47:Y},{14:89,40:Z,50:z,72:G},{16:93,40:N,41:A},{11:94,40:d,48:_,50:g,51:b,52:f},{18:95,19:[1,96],53:53,54:54,58:I},t(e,[2,12]),{19:[2,60]},t(K,[2,61],{56:97,57:98,59:99,61:U,62:j}),t([19,58,61,62],[2,66]),t(e,[2,22],{15:[1,103],17:[1,102]}),t([40,48,50,51,52],[2,71]),t(e,[2,36]),{13:C,41:R,45:104,46:63,48:D,49:v},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(w,[2,39]),t(w,[2,40]),t(P,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,79]),t(e,[2,80]),t(e,[2,81]),{13:[1,105],42:x},{13:[1,107],15:[1,106]},{19:[1,108]},t(e,[2,15]),t(K,[2,62],{57:109,60:[1,110],62:j}),t(K,[2,63]),t(V,[2,67]),t(K,[2,70]),t(V,[2,69]),{18:111,19:[1,112],53:53,54:54,58:I},{16:113,40:N,41:A},t(F,[2,44],{46:87,13:C,41:R,48:D,49:v}),{14:114,40:Z,50:z,72:G},{16:115,40:N,41:A},{14:116,40:Z,50:z,72:G},t(e,[2,13]),t(K,[2,64]),{59:117,61:U},{19:[1,118]},t(e,[2,20]),t(e,[2,23],{17:[1,119],42:x}),t(e,[2,11]),{13:[1,120],42:x},t(e,[2,10]),t(V,[2,68]),t(e,[2,18]),{18:121,19:[1,122],53:53,54:54,58:I},{14:123,40:Z,50:z,72:G},{19:[1,124]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:(0,o.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,o.eW)(function(t){var e=this,i=[0],s=[],n=[null],r=[],a=this.table,c="",l=0,h=0,u=0,d=r.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);y.setInput(t,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;r.push(g);var b=y.options&&y.options.ranges;function f(){var t;return"number"!=typeof(t=s.pop()||y.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.eW)(function(t){i.length=i.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,o.eW)(f,"lex");for(var m,E,k,T,O,S,N,A,I,$={};;){if(k=i[i.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==m&&(m=f()),T=a[k]&&a[k][m]),void 0===T||!T.length||!T[0]){var C="";for(S in I=[],a[k])this.terminals_[S]&&S>2&&I.push("'"+this.terminals_[S]+"'");C=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(C,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:g,expected:I})}if(T[0]instanceof Array&&T.length>1)throw Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(T[0]){case 1:i.push(m),n.push(y.yytext),r.push(y.yylloc),i.push(T[1]),m=null,E?(m=E,E=null):(h=y.yyleng,c=y.yytext,l=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(N=this.productions_[T[1]][1],$.$=n[n.length-N],$._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},b&&($._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),void 0!==(O=this.performAction.apply($,[c,h,l,p.yy,T[1],n,r].concat(d))))return O;N&&(i=i.slice(0,-1*N*2),n=n.slice(0,-1*N),r=r.slice(0,-1*N)),i.push(this.productions_[T[1]][0]),n.push($.$),r.push($._$),A=a[i[i.length-2]][i[i.length-1]],i.push(A);break;case 3:return!0}}return!0},"parse")},X={EOF:1,parseError:(0,o.eW)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,o.eW)(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,o.eW)(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,o.eW)(function(t){var e=t.length,i=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),i.length-1&&(this.yylineno-=i.length-1);var n=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:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.eW)(function(){return this._more=!0,this},"more"),reject:(0,o.eW)(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,o.eW)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.eW)(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,o.eW)(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,o.eW)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.eW)(function(t,e){var i,s,n;if(this.options.backtrack_lexer&&(n={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&&(n.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],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var r in n)this[r]=n[r];return!1},"test_match"),next:(0,o.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,s,n=this._currentRules(),r=0;r<n.length;r++)if((i=this._input.match(this.rules[n[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[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,o.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,o.eW)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.eW)(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,o.eW)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.eW)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.eW)(function(t,e,i,s){switch(i){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:case 23:case 28:case 35:break;case 13:return 8;case 14:return 50;case 15:return 72;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:case 38:return 49;case 20:case 37:return 42;case 21:return 15;case 22:case 36:return 13;case 24:return 61;case 25:case 26:return 58;case 27:return 62;case 29:return this.popState(),19;case 30:case 77:return e.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 39:return this.begin("style"),37;case 40:return 43;case 41:case 45:case 46:case 64:return 65;case 42:case 43:case 44:case 52:case 54:case 66:return 67;case 47:case 48:case 49:case 50:case 51:case 53:case 65:return 66;case 55:case 56:case 58:case 59:case 60:case 63:return 68;case 57:return 51;case 61:return 52;case 62:return 48;case 67:return 69;case 68:case 71:case 72:case 73:return 70;case 69:case 70:return 71;case 74:return 41;case 75:return 47;case 76:return 40;case 78:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,74,75],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,76,77,78],inclusive:!0}}};function q(){this.yy={}}return Q.lexer=X,(0,o.eW)(q,"Parser"),q.prototype=Q,Q.Parser=q,new q}();d.parser=d;var y=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=c.GN,this.getAccTitle=c.eu,this.setAccDescription=c.U$,this.getAccDescription=c.Mx,this.setDiagramTitle=c.g2,this.getDiagramTitle=c.Kr,this.getConfig=(0,o.eW)(()=>(0,c.nV)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,o.eW)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,o.cM.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,c.nV)().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),o.cM.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){let i;let s=this.addEntity(t);for(i=e.length-1;i>=0;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),o.cM.debug("Added attribute ",e[i].name)}addRelationship(t,e,i,s){let n=this.entities.get(t),r=this.entities.get(i);if(!n||!r)return;let a={entityA:n.id,roleA:e,entityB:r.id,relSpec:s};this.relationships.push(a),o.cM.debug("Added new relationship :",a)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(let i of t){let t=this.classes.get(i);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(let i of t){let t=this.entities.get(i);if(!e||!t)return;for(let i of e)t.cssStyles.push(i)}}addClass(t,e){t.forEach(t=>{let i=this.classes.get(t);void 0===i&&(i={id:t,styles:[],textStyles:[]},this.classes.set(t,i)),e&&e.forEach(function(t){if(/color/.exec(t)){let e=t.replace("fill","bgFill");i.textStyles.push(e)}i.styles.push(t)})})}setClass(t,e){for(let i of t){let t=this.entities.get(i);if(t)for(let i of e)t.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],(0,c.ZH)()}getData(){let t=[],e=[],i=(0,c.nV)(),s=0;for(let e of this.entities.keys()){let i=this.entities.get(e);i&&(i.cssCompiledStyles=this.getCompiledStyles(i.cssClasses.split(" ")),i.colorIndex=s++,t.push(i))}let n=0;for(let t of this.relationships){let s={id:(0,a.Ln)(t.entityA,t.entityB,{prefix:"id",counter:n++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:i.look,labelType:"markdown"};e.push(s)}return{nodes:t,edges:e,other:{},config:i,direction:"TB"}}},p={};(0,o.r2)(p,{draw:()=>_});var _=(0,o.eW)(async function(t,e,i,h){o.cM.info("REF0:"),o.cM.info("Drawing er diagram (unified)",e);let{securityLevel:u,er:d,layout:y}=(0,c.nV)(),p=h.db.getData(),_=(0,s.q)(e,u);p.type=h.type,p.layoutAlgorithm=(0,r._b)(y),p.config.flowchart.nodeSpacing=d?.nodeSpacing||140,p.config.flowchart.rankSpacing=d?.rankSpacing||80,p.direction=h.db.getDirection();let{config:g}=p,{look:b}=g;"neo"===b?p.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:p.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],p.diagramId=e,await (0,r.sY)(p,_),"elk"===p.layoutAlgorithm&&_.select(".edges").lower();let f=_.selectAll('[id*="-background"]');Array.from(f).length>0&&f.each(function(){let t=(0,l.Ys)(this),e=t.attr("id").replace("-background",""),i=_.select(`#${CSS.escape(e)}`);if(!i.empty()){let e=i.attr("transform");t.attr("transform",e)}}),a.w8.insertTitle(_,"erDiagramTitleText",d?.titleTopMargin??25,h.db.getDiagramTitle()),(0,n.j)(_,8,"erDiagram",d?.useMaxWidth??!0)},"draw"),g=(0,o.eW)((t,e)=>{let i=h.Z,s=i(t,"r"),n=i(t,"g"),r=i(t,"b");return u.Z(s,n,r,e)},"fade"),b=new Set(["redux-color","redux-dark-color"]),f=(0,o.eW)(t=>{let{theme:e,look:i,bkgColorArray:s,borderColorArray:n}=t;if(!b.has(e))return"";let r=s?.length>0,a="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)a+=`
|
|
2
|
+
|
|
3
|
+
[data-look="${i}"][data-color-id="color-${e}"].node path {
|
|
4
|
+
stroke: ${n[e]};
|
|
5
|
+
${r?`fill: ${s[e]};`:""}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[data-look="${i}"][data-color-id="color-${e}"].node rect {
|
|
9
|
+
stroke: ${n[e]};
|
|
10
|
+
${r?`fill: ${s[e]};`:""}
|
|
11
|
+
}
|
|
12
|
+
`;return a},"genColor"),m={parser:d,get db(){return new y},renderer:p,styles:(0,o.eW)(t=>{let{look:e,theme:i,erEdgeLabelBackground:s,strokeWidth:n}=t;return`
|
|
13
|
+
${f(t)}
|
|
14
|
+
.entityBox {
|
|
15
|
+
fill: ${t.mainBkg};
|
|
16
|
+
stroke: ${t.nodeBorder};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.relationshipLabelBox {
|
|
20
|
+
fill: ${t.tertiaryColor};
|
|
21
|
+
opacity: 0.7;
|
|
22
|
+
background-color: ${t.tertiaryColor};
|
|
23
|
+
rect {
|
|
24
|
+
opacity: 0.5;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.labelBkg {
|
|
29
|
+
background-color: ${b.has(i)&&s?s:g(t.tertiaryColor,.5)};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.edgeLabel {
|
|
33
|
+
background-color: ${b.has(i)&&s?s:t.edgeLabelBackground};
|
|
34
|
+
}
|
|
35
|
+
.edgeLabel .label rect {
|
|
36
|
+
fill: ${b.has(i)&&s?s:t.edgeLabelBackground};
|
|
37
|
+
}
|
|
38
|
+
.edgeLabel .label text {
|
|
39
|
+
fill: ${t.textColor};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.edgeLabel .label {
|
|
43
|
+
fill: ${t.nodeBorder};
|
|
44
|
+
font-size: 14px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.label {
|
|
48
|
+
font-family: ${t.fontFamily};
|
|
49
|
+
color: ${t.nodeTextColor||t.textColor};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.edge-pattern-dashed {
|
|
53
|
+
stroke-dasharray: 8,8;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.node rect,
|
|
57
|
+
.node circle,
|
|
58
|
+
.node ellipse,
|
|
59
|
+
.node polygon
|
|
60
|
+
{
|
|
61
|
+
fill: ${t.mainBkg};
|
|
62
|
+
stroke: ${t.nodeBorder};
|
|
63
|
+
stroke-width: ${"neo"===e?n:"1px"};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.relationshipLine {
|
|
67
|
+
stroke: ${t.lineColor};
|
|
68
|
+
stroke-width: ${"neo"===e?n:"1px"};
|
|
69
|
+
fill: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.marker {
|
|
73
|
+
fill: none !important;
|
|
74
|
+
stroke: ${t.lineColor} !important;
|
|
75
|
+
stroke-width: 1;
|
|
76
|
+
}
|
|
77
|
+
[data-look=neo].labelBkg {
|
|
78
|
+
background-color: ${g(t.tertiaryColor,.5)};
|
|
79
|
+
}
|
|
80
|
+
`},"getStyles")}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7834],{26543:function(e,t,n){n.d(t,{ad:function(){return m},dU:function(){return u},qi:function(){return f},xI:function(){return x}});var r=n(37821),a=n(58078),l=n(55592),i=n(90026),s=n(88554),o=n(29487),c=n(79513),d=n(4848);function u(e){let t=(0,s.p)(),[n,r]=(0,a.useState)([]),[l,i]=(0,a.useState)(0),o=(0,a.useCallback)(async()=>{try{var t;let n=await fetch("/api/comments?file=".concat(encodeURIComponent(e))),a=await n.json();r(null!==(t=a.comments)&&void 0!==t?t:[])}catch(e){r([])}},[e]);(0,a.useEffect)(()=>{r([]),o()},[o]);let d=e=>t({message:e.message,tone:"error"}),u=e=>"rebuilding"===e?" Line numbers shifted; facts are rebuilding.":"";return{comments:n,sourceVersion:l,add:async(t,n,r)=>{try{return await (0,c.C)("/api/comments",{action:"add",file:e,line_start:t,line_end:n,text:r}),await o(),!0}catch(e){return d(e),!1}},edit:async(e,n)=>{try{let r=await (0,c.C)("/api/comments",{id:e.id,text:n},"PATCH");return e.in_source&&i(e=>e+1),await o(),e.in_source&&t({message:"Comment updated in the file.".concat(u(r.facts))}),!0}catch(e){return d(e),!1}},remove:async e=>{try{var n;let r=await fetch("/api/comments?id=".concat(encodeURIComponent(e.id)),{method:"DELETE"}),a=await r.json();if(!r.ok||!a.comment)throw Error(null!==(n=a.error)&&void 0!==n?n:"Could not delete the comment");e.in_source&&i(e=>e+1),await o();let l=a.comment;t({message:"Comment deleted".concat(e.in_source?" and taken out of the file":"","."),action:{label:"Undo",onClick:()=>void(0,c.C)("/api/comments",{action:"restore",comment:l}).then(o).catch(d)}})}catch(e){d(e)}},toggleSource:async n=>{let r=n.in_source?"unwrite":"write";try{let a=await (0,c.C)("/api/comments",{action:r,id:n.id});i(e=>e+1),await o(),t({message:"write"===r?"Wrote it into ".concat(e," as // @audit.").concat(u(a.facts)):"Took it out of ".concat(e,".").concat(u(a.facts)),action:{label:"Undo",onClick:()=>void(0,c.C)("/api/comments",{action:"write"===r?"unwrite":"write",id:n.id}).then(()=>(i(e=>e+1),o())).catch(d)}})}catch(e){d(e)}}}}let x=(e,t)=>e===t?"line ".concat(e):"lines ".concat(e,"–").concat(t);function f(e){var t;let{comment:n,api:s,indent:c}=e,[u,f]=(0,a.useState)(!1);return u?(0,r.jsx)(m,{indent:c,label:"Edit ".concat(n.id),initial:n.text,submitLabel:"Save",onCancel:()=>f(!1),onSubmit:async e=>{await s.edit(n,e)&&f(!1)}}):(0,r.jsx)("div",{className:"fade-in whitespace-normal border-y border-border-subtle bg-surface-1 py-2.5 pr-6",style:{paddingLeft:c},onClick:()=>(0,d.k)({ref:n.id,kind:"comment",label:n.text.slice(0,120),file:n.file,line_start:n.line_start,line_end:n.line_end}),children:(0,r.jsxs)("div",{className:"max-w-[680px] font-sans",children:[(0,r.jsx)("div",{className:"whitespace-pre-wrap text-body text-text-primary",children:(0,r.jsx)(o.T9,{children:n.text})}),(0,r.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-caption text-text-tertiary",children:[(0,r.jsxs)("span",{children:[n.id," \xb7 ",function(e){let t=Math.max(0,(Date.now()-Date.parse(e))/1e3);return t<60?"just now":t<3600?"".concat(Math.floor(t/60)," min ago"):t<86400?"".concat(Math.floor(t/3600)," h ago"):new Date(e).toLocaleDateString()}(null!==(t=n.updated_at)&&void 0!==t?t:n.created_at)," \xb7"," ",x(n.line_start,n.line_end)]}),n.stale&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)(i.oT,{color:"var(--medium)"})," The code changed since"]}),n.in_source&&(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,r.jsx)(i.oT,{color:"var(--success)"})," In the file as // @audit"]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(l.z,{size:"sm",variant:"ghost",onClick:()=>f(!0),children:"Edit"}),!n.stale&&n.file.endsWith(".sol")&&(0,r.jsx)(l.z,{size:"sm",variant:"ghost",onClick:()=>void s.toggleSource(n),children:n.in_source?"Remove from file":"Write to source"}),(0,r.jsx)(l.z,{size:"sm",variant:"ghost",onClick:()=>void s.remove(n),children:"Delete"})]})]})]})})}function m(e){let{indent:t,label:n,initial:i="",submitLabel:s="Comment",onSubmit:o,onCancel:c}=e,[d,u]=(0,a.useState)(i),[x,f]=(0,a.useState)(!1),m=(0,a.useRef)(null);(0,a.useEffect)(()=>{var e,t;null===(e=m.current)||void 0===e||e.focus(),null===(t=m.current)||void 0===t||t.setSelectionRange(i.length,i.length)},[]);let p=async()=>{if(d.trim()&&!x){f(!0);try{await o(d.trim())}finally{f(!1)}}};return(0,r.jsx)("div",{className:"rise-in whitespace-normal border-y border-border-subtle bg-surface-1 py-3 pr-6",style:{paddingLeft:t},children:(0,r.jsxs)("div",{className:"max-w-[680px] font-sans",children:[(0,r.jsx)("div",{className:"mb-1.5 text-caption text-text-tertiary",children:n}),(0,r.jsx)("textarea",{ref:m,value:d,onChange:e=>u(e.target.value),onKeyDown:e=>{e.stopPropagation(),"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),p()),"Escape"===e.key&&(e.preventDefault(),c())},rows:3,placeholder:"What you noticed, a question, a lead…",className:"w-full resize-y rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary placeholder:text-text-tertiary focus:border-border-emphasis focus:outline-none"}),(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,r.jsx)(l.z,{size:"sm",onClick:()=>void p(),disabled:!d.trim()||x,children:s}),(0,r.jsx)(l.z,{size:"sm",variant:"ghost",onClick:c,children:"Cancel"}),(0,r.jsx)("span",{className:"ml-auto text-caption text-text-tertiary",children:"⌘↩ to save \xb7 Esc to cancel"})]})]})})}},93775:function(e,t,n){n.d(t,{i:function(){return c}});var r=n(37821),a=n(58078),l=n(24629),i=n(69059),s=n(4848),o=n(17968);function c(e){let{file:t,lineStart:n,lineEnd:l,className:i,label:c}=e,[u,x]=(0,a.useState)(!1),f=n?"".concat(t,":").concat(n).concat(l&&l!==n?"-".concat(l):""):t;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),x(!0),(0,s.k)({ref:f,kind:"code_range",label:f,file:t,...n?{line_start:n,line_end:null!=l?l:n}:{}})},className:(0,o.cn)("max-w-full truncate rounded-sm text-left font-mono text-caption text-accent hover:underline",i),title:"Open ".concat(f),children:null!=c?c:f}),u&&(0,r.jsx)(d,{file:t,start:n,end:l,title:f,onClose:()=>x(!1)})]})}function d(e){let{file:t,start:n,end:s,title:o,onClose:c}=e,d=(0,a.useRef)(null);return(0,a.useEffect)(()=>{var e;null===(e=d.current)||void 0===e||e.focus()},[]),(0,r.jsx)("div",{ref:d,tabIndex:-1,className:"fade-in fixed inset-0 z-[8000] flex items-center justify-center p-6 outline-none",style:{background:"var(--overlay-bg)"},onClick:c,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),c())},children:(0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":o,onClick:e=>e.stopPropagation(),className:"rise-in flex h-[min(78vh,760px)] w-full max-w-4xl flex-col overflow-hidden rounded-lg border border-border-default bg-surface-0 shadow-lg",children:[(0,r.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 border-b border-border-subtle px-4 py-2.5",children:[(0,r.jsx)("span",{className:"truncate font-mono text-caption text-text-secondary",children:o}),(0,r.jsx)("button",{type:"button",onClick:c,"aria-label":"Close",className:"rounded-md p-1 text-text-tertiary hover:bg-surface-2 hover:text-text-primary",children:(0,r.jsx)(i.bM,{className:"h-4 w-4"})})]}),(0,r.jsx)("div",{className:"min-h-0 flex-1",children:(0,r.jsx)(l.uX,{file:t,range:n?{start:n,end:null!=s?s:n}:null})})]})})}},24629:function(e,t,n){n.d(t,{uX:function(){return L}});var r=n(37821),a=n(58078);let l=new Set("pragma solidity import from as contract interface library abstract is function modifier event error struct enum returns return if else for while do break continue emit revert using constructor fallback receive public private internal external view pure payable constant immutable override virtual memory storage calldata new delete unchecked assembly try catch indexed anonymous let type true false wei gwei ether seconds minutes hours days weeks".split(" ")),i=new Set("msg block tx abi require assert this super selfdestruct keccak256 sha256 ecrecover addmod mulmod gasleft blockhash".split(" ")),s=/^(address|bool|string|bytes\d*|u?int\d*|fixed\d*x?\d*|ufixed\d*x?\d*|mapping|byte)$/;function o(e){let t=[[]],n=(e,n)=>{n.split("\n").forEach((n,r)=>{if(r>0&&t.push([]),n){let r=t[t.length-1],a=r[r.length-1];a&&a.kind===e?a.text+=n:r.push({kind:e,text:n})}})},r=0,a=!1,o=e.length;for(;r<o;){let t=e[r],c=e[r+1];if("/"===t&&"/"===c){let t=e.indexOf("\n",r),a=-1===t?o:t;n("comment",e.slice(r,a)),r=a;continue}if("/"===t&&"*"===c){let t=e.indexOf("*/",r+2),a=-1===t?o:t+2;n("comment",e.slice(r,a)),r=a;continue}if('"'===t||"'"===t){let a=r+1;for(;a<o&&e[a]!==t&&"\n"!==e[a];)"\\"===e[a]&&a++,a++;n("string",e.slice(r,Math.min(o,a+1))),r=Math.min(o,a+1);continue}if(/[0-9]/.test(t)||"."===t&&c&&/[0-9]/.test(c)){let a=/^(0x[0-9a-fA-F_]+|[0-9][0-9_]*(\.[0-9_]+)?([eE][-+]?[0-9_]+)?)/.exec(e.slice(r,r+80)),l=a?a[0]:t;n("number",l),r+=l.length;continue}if(/[A-Za-z_$]/.test(t)){let o=/^[A-Za-z_$][A-Za-z0-9_$]*/.exec(e.slice(r,r+120)),c=o?o[0]:t,d="plain";a?(d="fn",a=!1):l.has(c)?(d="keyword",["function","modifier","event","error","contract","interface","library","struct","enum"].includes(c)&&(a=!0)):s.test(c)?d="type":i.has(c)?d="builtin":"("===e[r+c.length]&&/^[a-z_]/.test(c)&&(d="fn"),n(d,c),r+=c.length;continue}/\s/.test(t)||(a=!1),n("plain",t),r++}return t}function c(e,t){if(0===t.length)return e;let n=[...t].sort((e,t)=>e.col-t.col),r=[],a=0,l=0;for(let t of e){let e=a,i=a+t.text.length,s=e;for(;s<i;){for(;l<n.length&&n[l].col+n[l].len<=s;)l++;let a=n[l];if(!a||a.col>=i){r.push({kind:t.kind,text:t.text.slice(s-e)});break}if(a.col>s){r.push({kind:t.kind,text:t.text.slice(s-e,a.col-e)}),s=a.col;continue}let o=Math.min(i,a.col+a.len);r.push({kind:t.kind,text:t.text.slice(s-e,o-e),ref:a.key,...a.def?{def:!0}:{}}),s=o}a=i}return r}var d=n(17968),u=n(26543);let x=new Map;function f(e){let t=x.get(e);if(t&&Date.now()-t.at<15e3)return t.code;let n=fetch("/api/code?file=".concat(encodeURIComponent(e))).then(async e=>{var t;let n=await e.json().catch(()=>({}));if(!e.ok||"string"!=typeof n.code)throw Error(null!==(t=n.error)&&void 0!==t?t:"Could not load the file");return n.code}).catch(t=>{throw x.delete(e),t});return x.set(e,{at:Date.now(),code:n}),n}var m=n(61434);let p=new Map;function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,[n,r]=(0,a.useState)(null);return(0,a.useEffect)(()=>{if(!e)return;let n=!0;return t&&p.delete(e),(function(e){let t=p.get(e);if(t)return t;let n=fetch("/api/xref?file=".concat(encodeURIComponent(e))).then(async e=>{var t,n,r,a;let l=await e.json(),i=new Map;for(let[e,r,a,s,o]of null!==(t=l.refs)&&void 0!==t?t:[])i.set(e,[...null!==(n=i.get(e))&&void 0!==n?n:[],{col:r,len:a,key:s,def:1===o}]);return{available:!!l.available,byLine:i,decls:null!==(r=l.decls)&&void 0!==r?r:{},impls:null!==(a=l.impls)&&void 0!==a?a:{}}}).catch(()=>(p.delete(e),{available:!1,byLine:new Map,decls:{},impls:{}}));return p.set(e,n),setTimeout(()=>p.delete(e),2e4),n})(e).then(e=>n&&r(e)),()=>{n=!1}},[e,t]),n}function v(e,t,n){return{key:e,name:t.contract?"".concat(t.contract,".").concat(t.name):t.name,file:t.file,line_start:t.line_start,line_end:t.line_end,line:t.line,...n?{via:n}:{}}}function y(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=e.decls[t];if(!a)return null;let l=(null!==(n=e.impls[t])&&void 0!==n?n:[]).filter(t=>e.decls[t.id]);return r.declaration||0===l.length?{target:v(t,a)}:1===l.length?{target:v(l[0].id,e.decls[l[0].id],t)}:{choices:[{key:t,decl:a},...l.map(t=>({key:t.id,decl:e.decls[t.id],by:t.by}))]}}let b={contract:"contract",interface:"interface",library:"library",function:"function",modifier:"modifier",state_var:"state variable",event:"event",error:"error",struct:"struct",enum:"enum",type:"type",constant:"constant"},g=(e,t)=>t?"".concat(t.contract?"".concat(t.contract,"."):"").concat(t.name):e.replace(/\(.*$/,"");function k(e){var t,n,a;let{refKey:l,x:i,nav:s,style:o}=e,c=i.decls[l];if(!c)return null;let d=(null!==(n=i.impls[l])&&void 0!==n?n:[]).filter(e=>i.decls[e.id]),u=null===(t=s.stateOf)||void 0===t?void 0:t.call(s,l);return(0,r.jsxs)("div",{role:"tooltip",className:"fade-in pointer-events-none absolute z-30 w-max max-w-[440px] rounded-lg border border-border-default bg-surface-1 px-3 py-2.5 font-sans shadow-lg",style:o,children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-caption text-text-tertiary",children:[u&&(0,r.jsx)(m.e,{state:u,className:"h-3 w-3"}),(0,r.jsxs)("span",{children:["function"===c.kind&&c.contract?"":"".concat(b[c.kind]," \xb7 "),null!==(a=c.contract)&&void 0!==a?a:c.file,!c.in_scope&&" \xb7 out of scope"]})]}),c.signature&&(0,r.jsx)("div",{className:"mt-1 font-mono text-[12.5px] leading-5 text-text-primary",children:c.signature}),d.length>0&&(0,r.jsxs)("div",{className:"mt-1 text-caption text-text-secondary",children:["Runs in"," ",d.map((e,t)=>(0,r.jsxs)("span",{children:[t>0&&", ",(0,r.jsx)("span",{className:"font-mono",children:g(e.id,i.decls[e.id])}),"signature"===e.by&&" (same signature)"]},e.id))]}),c.doc&&(0,r.jsx)("p",{className:"mt-1.5 text-body text-text-secondary",children:c.doc}),(0,r.jsx)("div",{className:"mt-1.5 text-caption text-text-tertiary",children:"Ctrl/⌘-click or F12 to go \xb7 Alt-click or ⌥F12 to peek"})]})}function j(e){let{choices:t,style:n,onPick:l,onClose:i}=e,[s,o]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=e=>{if("Escape"===e.key)i();else if("ArrowDown"===e.key)o(e=>Math.min(t.length-1,e+1));else if("ArrowUp"===e.key)o(e=>Math.max(0,e-1));else{if("Enter"!==e.key)return;l(t[s])}e.preventDefault(),e.stopPropagation()};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,s,l,i]),(0,r.jsx)("div",{role:"menu",className:"fade-in absolute z-40 min-w-[280px] rounded-lg border border-border-default bg-surface-1 p-1 font-sans shadow-lg",style:n,children:t.map((e,t)=>(0,r.jsxs)("button",{type:"button",role:"menuitem",onMouseEnter:()=>o(t),onClick:()=>l(e),className:(0,d.cn)("flex w-full items-baseline gap-3 rounded-md px-2.5 py-1.5 text-left",t===s?"bg-surface-2":""),children:[(0,r.jsx)("span",{className:"font-mono text-caption text-text-primary",children:g(e.key,e.decl)}),(0,r.jsx)("span",{className:"ml-auto text-caption text-text-tertiary",children:"override"===e.by?"override":"signature"===e.by?"same signature":b[e.decl.kind]})]},e.key))})}let w={comment:"tok-comment",string:"tok-string",number:"tok-number",keyword:"tok-keyword",type:"tok-type",builtin:"tok-builtin",fn:"tok-fn"};function N(e){let{seg:t}=e;return(0,r.jsx)("span",{className:(0,d.cn)(w[t.kind],t.ref&&"nav-ref"),...t.ref?{"data-ref":t.ref,...t.def?{"data-def":"1"}:{}}:{},children:t.text})}function C(e){let{target:t,indent:n,onOpen:l,onClose:i,onRefClick:s}=e,[u,x]=(0,a.useState)(null),[m,p]=(0,a.useState)(null),v=h(t.file);(0,a.useEffect)(()=>{let e=!0;return x(null),p(null),f(t.file).then(t=>e&&x(t)).catch(t=>e&&p(t.message)),()=>{e=!1}},[t.file]);let y=(0,a.useMemo)(()=>null===u?[]:o(u),[u]).slice(t.line_start-1,t.line_end);return(0,r.jsxs)("div",{"data-band":"peek",className:"rise-in whitespace-normal border-y border-border-default bg-surface-1",style:{paddingLeft:n},onClick:e=>{let t=e.target.closest("[data-ref]"),n=e.target.closest("[data-peek-line]");t&&n&&v&&s(e,v,t.dataset.ref,Number(n.dataset.peekLine))},children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 py-2 pr-4 font-sans",children:[(0,r.jsx)("span",{className:"font-mono text-caption text-text-primary",children:t.name}),(0,r.jsxs)("span",{className:"truncate font-mono text-caption text-text-tertiary",children:[t.file,":",t.line_start]}),t.via&&(0,r.jsxs)("span",{className:"shrink-0 text-caption text-text-tertiary",children:["via ",t.via.replace(/\(.*$/,"")]}),(0,r.jsxs)("span",{className:"flex shrink-0 items-center gap-1",children:[(0,r.jsx)("button",{type:"button",onClick:l,className:"rounded-md px-2 py-0.5 text-caption font-medium text-text-primary hover:bg-surface-2",children:"Open ↵"}),(0,r.jsx)("button",{type:"button",onClick:i,"aria-label":"Close peek",className:"rounded-md px-2 py-0.5 text-caption text-text-tertiary hover:bg-surface-2 hover:text-text-primary",children:"Esc"})]})]}),(0,r.jsx)("div",{className:"max-h-[332px] overflow-auto border-t border-border-subtle bg-[var(--code-bg)] py-2",children:m?(0,r.jsx)("div",{className:"px-3 py-2 font-sans text-caption text-text-tertiary",children:m}):null===u?(0,r.jsx)("div",{className:"px-3 py-2 font-sans text-caption text-text-tertiary",children:"Loading…"}):(0,r.jsx)("pre",{className:"min-w-fit font-mono text-[12.5px] leading-5 text-text-primary",children:y.map((e,n)=>{var a;let l=t.line_start+n,i=(null==v?void 0:v.available)?c(e,null!==(a=v.byLine.get(l))&&void 0!==a?a:[]):e;return(0,r.jsxs)("div",{"data-peek-line":l,className:(0,d.cn)("flex pr-6",l===t.line&&"bg-[var(--code-highlight)]"),children:[(0,r.jsx)("span",{className:"w-[5ch] shrink-0 select-none pr-3 text-right tabular-nums text-text-tertiary opacity-70",children:l}),(0,r.jsx)("code",{className:"whitespace-pre",children:0===i.length?" ":i.map((e,t)=>(0,r.jsx)(N,{seg:e},t))})]},l)})})})]})}let E={internal:"call",external:"external call",library:"library call",super:"super call",this:"this. call",virtual:"dispatch",modifier:"modifier",constructor:"base constructor",read:"reads",write:"writes",use:"uses"};function _(e){var t;let{refKey:n,name:l,indent:i,onGo:s,onClose:o}=e,[c,d]=(0,a.useState)(null),[u,x]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e=!0;return d(null),fetch("/api/nav?key=".concat(encodeURIComponent(n))).then(e=>e.json()).then(t=>{var n,r,a;e&&(d(null!==(r=t.sites)&&void 0!==r?r:[]),x(null!==(a=null===(n=t.decl)||void 0===n?void 0:n.kind)&&void 0!==a?a:null))}).catch(()=>e&&d([])),()=>{e=!1}},[n]);let f="function"===u||"modifier"===u||!u&&n.includes("(");return(0,r.jsxs)("div",{"data-band":"usages",className:"rise-in whitespace-normal border-y border-border-default bg-surface-1 font-sans",style:{paddingLeft:i},children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 py-2 pr-4",children:[(0,r.jsxs)("span",{className:"text-caption text-text-secondary",children:[f?"modifier"===u?"Functions guarded by":"Callers of":"Uses of"," ",(0,r.jsx)("span",{className:"font-mono text-text-primary",children:l})]}),(0,r.jsx)("span",{className:"text-caption tabular-nums text-text-tertiary",children:null!==(t=null==c?void 0:c.length)&&void 0!==t?t:""}),(0,r.jsx)("button",{type:"button",onClick:o,"aria-label":"Close",className:"rounded-md px-2 py-0.5 text-caption text-text-tertiary hover:bg-surface-2 hover:text-text-primary",children:"Esc"})]}),(0,r.jsx)("div",{className:"max-h-[300px] overflow-auto border-t border-border-subtle",children:null===c?(0,r.jsx)("div",{className:"py-2 text-caption text-text-tertiary",children:"Loading…"}):0===c.length?(0,r.jsx)("div",{className:"py-2 text-caption text-text-tertiary",children:f?"Nothing in the compiled code calls it.":"No other uses in the compiled code."}):(0,r.jsx)("ul",{className:"divide-y divide-border-subtle",children:c.map((e,t)=>{var n,a;return(0,r.jsx)("li",{children:(0,r.jsxs)("button",{type:"button",onClick:()=>{var t,n,r;return s({...e.from?{key:e.from}:{},name:null!==(t=e.fromName)&&void 0!==t?t:"".concat(e.file,":").concat(e.line),file:e.file,line_start:null!==(n=e.fromStart)&&void 0!==n?n:e.line,line_end:null!==(r=e.fromEnd)&&void 0!==r?r:e.line,line:e.line})},className:"flex w-full items-baseline gap-3 py-1.5 pr-4 text-left hover:bg-surface-2",children:[(0,r.jsx)("span",{className:"w-[200px] shrink-0 truncate font-mono text-caption text-text-primary",children:null!==(n=e.fromName)&&void 0!==n?n:e.file}),(0,r.jsxs)("span",{className:"w-[86px] shrink-0 text-caption text-text-tertiary",children:[null!==(a=E[e.kind])&&void 0!==a?a:e.kind," \xb7 ",e.line]}),(0,r.jsx)("span",{className:"min-w-0 truncate font-mono text-caption text-text-secondary",children:e.code})]})},t)})})})]})}let S=()=>{let e=document.activeElement;return!!(e&&(e.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(e.tagName)))};function L(e){var t,n,l;let{file:i,range:s,onSelectRange:m,comments:p,nav:b,focusLine:g,currentKey:w,handle:E,className:L}=e,[M,T]=(0,a.useState)(null),[D,R]=(0,a.useState)(null),[z,K]=(0,a.useState)(null),[U,$]=(0,a.useState)(null),I=(0,a.useRef)(null),P=null!==(t=null==p?void 0:p.sourceVersion)&&void 0!==t?t:0,q=h(b?i:null,P),[O,A]=(0,a.useState)(!1),[W,F]=(0,a.useState)(null),[H,B]=(0,a.useState)(null),[Z,G]=(0,a.useState)(null),X=(0,a.useRef)(null),J=(0,a.useRef)(null),Q=(0,a.useRef)(null);(0,a.useEffect)(()=>{K(null),$(null),F(null),B(null),G(null)},[i]),(0,a.useEffect)(()=>{J.current=null,Q.current=null},[i,null==s?void 0:s.start,g]),(0,a.useEffect)(()=>{if(!U)return;let e=()=>{var e;(null===(e=window.getSelection())||void 0===e?void 0:e.isCollapsed)&&$(null)},t=e=>{"Escape"===e.key&&$(null)};return document.addEventListener("selectionchange",e),window.addEventListener("keydown",t),()=>{document.removeEventListener("selectionchange",e),window.removeEventListener("keydown",t)}},[U]),(0,a.useEffect)(()=>$(null),[P]),(0,a.useEffect)(()=>{let e=!0;return R(null),P&&x.delete(i),f(i).then(t=>e&&T(t)).catch(t=>{e&&(T(null),R(t.message))}),()=>{e=!1}},[i,P]);let V=(0,a.useMemo)(()=>null===M?[]:o(M),[M]),Y=(0,a.useMemo)(()=>V.map((e,t)=>{var n;return(null==q?void 0:q.available)?c(e,null!==(n=q.byLine.get(t+1))&&void 0!==n?n:[]):e}),[V,q]);(0,a.useEffect)(()=>{let e=I.current;if(!e||0===V.length)return;if(g){let t=e.querySelector('[data-line="'.concat(g,'"]'));if(t){e.scrollTo({top:Math.max(0,t.offsetTop-e.clientHeight/3),behavior:"smooth"});return}}if(!s)return;let t=e.querySelector('[data-line="'.concat(s.start,'"]'));if(!t)return;let n=t.offsetHeight||20,r=(s.end-s.start+1)*n,a=t.offsetTop-(r<.6*e.clientHeight?(e.clientHeight-r)/3:48);e.scrollTo({top:Math.max(0,a),behavior:"smooth"})},[null==s?void 0:s.start,null==s?void 0:s.end,g,V.length,i]);let ee=e=>{let t=I.current,n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:n.bottom-r.top+t.scrollTop+4,left:n.left-r.left+t.scrollLeft}},et=(0,a.useCallback)((e,t)=>{var n,r;let a=null==q?void 0:q.decls[e],l=a?"".concat(a.contract?"".concat(a.contract,"."):"").concat(a.name):e.replace(/\(.*$/,"");B(null),G(null),F({kind:"usages",key:e,name:l,after:null!==(r=null!==(n=null!=t?t:null==a?void 0:a.line)&&void 0!==n?n:null==s?void 0:s.start)&&void 0!==r?r:1})},[q,null==s?void 0:s.start]);(0,a.useEffect)(()=>{E&&(E.current={showUsages:e=>et(e)})},[E,et]);let en=(e,t,n,r,a)=>{let l=y(e,t,{declaration:r});l&&b&&("target"in l?(F(null),b.open(l.target)):B({...a,choices:l.choices,via:t,mode:"go",after:n}))},er=(e,t,n,r)=>{let a=y(e,t);a&&("target"in a?F({kind:"peek",target:a.target,after:n}):B({...r,choices:a.choices,via:t,mode:"peek",after:n}))},ea=(e,t,n,r,a,l,i)=>{let s=e.metaKey||e.ctrlKey,o=null!=i?i:a&&(s||e.altKey)?"usages":s?"go":e.altKey?"peek":null;o&&(e.preventDefault(),e.stopPropagation(),G(null),Q.current=l,"usages"===o?et(n,r):"go"===o?en(t,n,r,s&&e.altKey,ee(l)):er(t,n,r,ee(l)))};(0,a.useEffect)(()=>{if(!b)return;let e=e=>{if(("Control"===e.key||"Meta"===e.key)&&(A(!0),G(null)),S())return;if("Escape"===e.key&&(W||H||Z)){F(null),B(null),G(null);return}if("Enter"===e.key&&(null==W?void 0:W.kind)==="peek"&&!H){e.preventDefault(),b.open(W.target),F(null);return}if("F12"!==e.key||!(null==q?void 0:q.available))return;let t=J.current;if(e.shiftKey){e.preventDefault(),t?et(t.key,t.line):w&&et(w);return}t&&ea(e,q,t.key,t.line,t.def,t.el,t.def?"usages":e.altKey?"peek":"go")},t=e=>{("Control"===e.key||"Meta"===e.key)&&A(!1)},n=()=>A(!1);return window.addEventListener("keydown",e),window.addEventListener("keyup",t),window.addEventListener("blur",n),()=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",t),window.removeEventListener("blur",n)}});let el=(e,t)=>{var n;null===(n=window.getSelection())||void 0===n||n.removeAllRanges(),$(null),K({start:e,end:t})};if(D)return(0,r.jsx)("div",{className:(0,d.cn)("flex h-full items-center justify-center p-6 text-body text-text-tertiary",L),children:D});let ei=String(V.length).length,es="".concat(ei+3,"ch"),eo=new Map;for(let e of null!==(n=null==p?void 0:p.comments)&&void 0!==n?n:[]){let t=Math.min(e.line_end,V.length);eo.set(t,[...null!==(l=eo.get(t))&&void 0!==l?l:[],e])}return(0,r.jsxs)("div",{ref:I,className:(0,d.cn)("relative h-full overflow-auto bg-[var(--code-bg)]",O&&"nav-armed",L),onMouseUp:()=>{if(!m)return;let e=window.getSelection();if(!e||e.isCollapsed||!e.anchorNode||!e.focusNode)return;let t=e=>{var t,n,r;return Number(null!==(r=null===(n=e instanceof Element?e:e.parentElement)||void 0===n?void 0:null===(t=n.closest("[data-line]"))||void 0===t?void 0:t.dataset.line)&&void 0!==r?r:0)},n=t(e.anchorNode),r=t(e.focusNode);if(!n||!r)return;let a=Math.min(n,r),l=Math.max(n,r);if(m(a,l),p&&I.current){let e=I.current.querySelector('[data-line="'.concat(l,'"]'));e&&$({start:a,end:l,top:e.offsetTop+e.offsetHeight+2})}},onClick:e=>{if(!b||!(null==q?void 0:q.available))return;let t=e.target.closest("[data-ref]"),n=null==t?void 0:t.closest("[data-line]");t&&n&&ea(e,q,t.dataset.ref,Number(n.dataset.line),"1"===t.dataset.def,t)},onMouseOver:e=>{var t;if(!b||!(null==q?void 0:q.available))return;let n=e.target.closest("[data-ref]"),r=null==n?void 0:n.closest("[data-line]");n&&r&&(null===(t=J.current)||void 0===t?void 0:t.el)!==n&&(J.current={key:n.dataset.ref,line:Number(r.dataset.line),def:"1"===n.dataset.def,el:n},X.current&&clearTimeout(X.current),G(null),X.current=setTimeout(()=>{var e;(null===(e=J.current)||void 0===e?void 0:e.el)!==n||H||O||Q.current===n||G({key:n.dataset.ref,...ee(n)})},450))},onMouseOut:e=>{var t;let n=e.target.closest("[data-ref]");!n||n.contains(e.relatedTarget)||((null===(t=J.current)||void 0===t?void 0:t.el)===n&&(J.current=null),Q.current===n&&(Q.current=null),X.current&&clearTimeout(X.current),G(null))},children:[Z&&q&&b&&!H&&(0,r.jsx)(k,{refKey:Z.key,x:q,nav:b,style:{top:Z.top,left:Z.left}}),H&&(0,r.jsx)(j,{choices:H.choices,style:{top:H.top,left:H.left},onClose:()=>B(null),onPick:e=>{let t=v(e.key,e.decl,e.by?H.via:void 0);B(null),"go"===H.mode?(F(null),null==b||b.open(t)):F({kind:"peek",target:t,after:H.after})}}),U&&p&&!z&&(0,r.jsxs)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>el(U.start,U.end),className:"fade-in absolute z-10 rounded-md border border-border-default bg-surface-1 px-2.5 py-1 font-sans text-caption font-medium text-text-primary shadow-sm hover:bg-surface-2",style:{top:U.top,left:"calc(".concat(es," + 8px)")},children:["Comment on ",(0,u.xI)(U.start,U.end)]}),null===M?(0,r.jsxs)("div",{className:"p-6 text-caption text-text-tertiary",children:["Loading ",i,"…"]}):(0,r.jsx)("pre",{className:"min-w-fit py-4 font-mono text-[12.5px] leading-5 text-text-primary",children:V.map((e,t)=>{var n,l;let i=t+1,o=s&&i>=s.start&&i<=s.end,c=z&&i>=z.start&&i<=z.end,x=null!==(l=Y[t])&&void 0!==l?l:e;return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("div",{"data-line":i,className:(0,d.cn)("group/line flex pr-6",o&&"bg-[var(--code-highlight)]",i===g&&"bg-[var(--code-focus)]",c&&"bg-accent-subtle"),children:[(0,r.jsxs)("span",{className:(0,d.cn)("sticky left-0 shrink-0 select-none bg-[var(--code-bg)] pl-4 pr-4 text-right tabular-nums",o?"text-text-secondary":"text-text-tertiary opacity-70"),style:{width:es},children:[p&&(0,r.jsx)("button",{type:"button","aria-label":"Comment on line ".concat(i),title:"Comment on line ".concat(i),onMouseDown:e=>e.preventDefault(),onClick:()=>el(i,i),className:"absolute left-0.5 top-1/2 flex h-4 w-4 -translate-y-1/2 items-center justify-center rounded font-sans text-[13px] leading-none text-text-secondary opacity-0 hover:bg-surface-3 hover:text-text-primary focus-visible:opacity-100 group-hover/line:opacity-100",children:"+"}),i]}),(0,r.jsx)("code",{className:"whitespace-pre",children:0===x.length?" ":x.map((e,t)=>(0,r.jsx)(N,{seg:e},t))})]}),p&&(null===(n=eo.get(i))||void 0===n?void 0:n.map(e=>(0,r.jsx)(u.qi,{comment:e,api:p,indent:es},e.id))),(null==W?void 0:W.kind)==="peek"&&W.after===i&&b&&(0,r.jsx)(C,{target:W.target,indent:es,onOpen:()=>{b.open(W.target),F(null)},onClose:()=>F(null),onRefClick:(e,t,n,r)=>{let a=e.target;if(e.metaKey||e.ctrlKey)e.preventDefault(),en(t,n,r,e.altKey,ee(a));else if(e.altKey){e.preventDefault();let r=y(t,n);r&&"target"in r?F({...W,target:r.target}):r&&B({...ee(a),choices:r.choices,via:n,mode:"peek",after:W.after})}}}),(null==W?void 0:W.kind)==="usages"&&W.after===i&&b&&(0,r.jsx)(_,{refKey:W.key,name:W.name,indent:es,onClose:()=>F(null),onGo:e=>{F(null),b.open(e)}}),p&&z&&z.end===i&&(0,r.jsx)(u.ad,{indent:es,label:"Comment on ".concat((0,u.xI)(z.start,z.end)),onCancel:()=>K(null),onSubmit:async e=>{await p.add(z.start,z.end,e)&&K(null)}})]},i)})})]})}},29487:function(e,t,n){n.d(t,{$8:function(){return i},T9:function(){return s}});var r=n(37821),a=n(48525),l=n(45592);function i(e){let{content:t,className:n}=e;return(0,r.jsx)("div",{className:"prose max-w-none text-body\n prose-headings:font-semibold prose-headings:text-text-primary\n prose-h1:text-title prose-h2:text-heading prose-h3:text-body\n prose-p:text-text-secondary prose-p:leading-relaxed\n prose-strong:text-text-primary\n prose-code:rounded prose-code:bg-surface-2 prose-code:px-1 prose-code:py-px prose-code:font-normal prose-code:text-[0.88em] prose-code:text-text-primary\n prose-code:before:content-none prose-code:after:content-none\n prose-pre:rounded-md prose-pre:border prose-pre:border-border-subtle prose-pre:bg-surface-1 prose-pre:text-text-primary\n prose-a:text-accent prose-a:no-underline hover:prose-a:underline\n prose-th:text-text-primary prose-td:text-text-secondary\n prose-hr:border-border-subtle\n prose-blockquote:border-border-default prose-blockquote:text-text-secondary\n prose-li:text-text-secondary prose-li:marker:text-text-tertiary\n ".concat(null!=n?n:""),children:(0,r.jsx)(a.UG,{remarkPlugins:[l.Z],children:t})})}function s(e){let{children:t}=e;return(0,r.jsx)(a.UG,{remarkPlugins:[l.Z],components:{p:e=>{let{children:t}=e;return(0,r.jsx)(r.Fragment,{children:t})},code:e=>{let{children:t}=e;return(0,r.jsx)("code",{className:"rounded bg-surface-2 px-1 py-px font-mono text-[0.86em] text-text-primary",children:t})},strong:e=>{let{children:t}=e;return(0,r.jsx)("strong",{className:"font-semibold text-text-primary",children:t})},a:e=>{let{href:t,children:n}=e;return(0,r.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",className:"text-accent hover:underline",children:n})}},children:t.split("\n").map(e=>e.replace(/^(\s*)(\d+)([.)])(\s)/,"$1$2\\$3$4").replace(/^(\s*)([-*+#>])(\s)/,"$1\\$2$3")).join("\n")})}},55631:function(e,t,n){n.d(t,{u:function(){return l}});var r=n(37821),a=n(17968);function l(e){let{sentence:t,command:n,className:l}=e;return(0,r.jsxs)("div",{className:(0,a.cn)("flex h-full min-h-[200px] flex-col items-center justify-center px-6 text-center fade-in",l),children:[(0,r.jsx)("p",{className:"max-w-sm text-body text-text-secondary",children:t}),n&&(0,r.jsx)("code",{className:"mt-3 rounded-md bg-surface-2 px-2.5 py-1 font-mono text-caption text-text-primary",children:n})]})}},32011:function(e,t,n){n.d(t,{lj:function(){return s},oz:function(){return o},vz:function(){return c}});var r=n(37821),a=n(58078),l=n(17968),i=n(69059);function s(e){let{eyebrow:t,title:n,subtitle:a,onClose:l,actions:s,children:o}=e;return(0,r.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,r.jsxs)("div",{className:"shrink-0 px-5 pb-4 pt-4",children:[(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[t&&(0,r.jsx)("div",{className:"mb-1 text-caption text-text-tertiary",children:t}),(0,r.jsx)("h2",{className:"break-words text-heading font-semibold text-text-primary",children:n}),a&&(0,r.jsx)("div",{className:"mt-1 break-words text-caption text-text-secondary",children:a})]}),l&&(0,r.jsx)("button",{type:"button",onClick:l,"aria-label":"Close inspector",className:"-mr-1.5 -mt-0.5 rounded-md p-1.5 text-text-tertiary hover:bg-surface-2 hover:text-text-primary",children:(0,r.jsx)(i.bM,{className:"h-4 w-4"})})]}),s&&(0,r.jsx)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:s})]}),(0,r.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 pb-6",children:o}),(0,r.jsx)(u,{})]})}function o(e){let{label:t,children:n,className:a,trailing:i}=e;return(0,r.jsxs)("section",{className:(0,l.cn)("border-t border-border-subtle pt-3 pb-4",a),children:[(0,r.jsxs)("div",{className:"mb-2 flex items-baseline justify-between gap-2",children:[(0,r.jsx)("h3",{className:"text-caption font-medium text-text-tertiary",children:t}),i]}),n]})}function c(e){let{label:t,children:n}=e;return(0,r.jsxs)("div",{className:"flex items-baseline gap-3 py-0.5 text-body",children:[(0,r.jsx)("span",{className:"w-24 shrink-0 text-text-tertiary",children:t}),(0,r.jsx)("span",{className:"min-w-0 flex-1 break-words text-text-primary",children:n})]})}let d="hex.focus-hint-dismissed";function u(){let[e,t]=(0,a.useState)(!1);return((0,a.useEffect)(()=>{try{t("1"!==localStorage.getItem(d))}catch(e){t(!1)}},[]),e)?(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-t border-border-subtle px-5 py-2.5 text-caption text-text-tertiary",children:[(0,r.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-accent","aria-hidden":"true"}),(0,r.jsx)("span",{className:"flex-1",children:"Claude can see your selection."}),(0,r.jsx)("button",{type:"button",onClick:()=>{try{localStorage.setItem(d,"1")}catch(e){}t(!1)},className:"rounded px-1.5 py-0.5 text-text-secondary hover:bg-surface-2 hover:text-text-primary",children:"Got it"})]}):null}},52171:function(e,t,n){n.d(t,{i:function(){return s},w:function(){return i}});var r=n(37821),a=n(58078),l=n(17968);let i=(0,a.forwardRef)(function(e,t){let{selected:n,leading:a,title:i,subtitle:s,trailing:o,onClick:c,className:d,dense:u,titleClassName:x,...f}=e;return(0,r.jsxs)("button",{ref:t,type:"button",onClick:c,"aria-current":n?"true":void 0,"data-id":f["data-id"],className:(0,l.cn)("group flex w-full items-center gap-2.5 rounded-md px-2.5 text-left",u?"min-h-[30px] py-1":"min-h-[36px] py-1.5",n?"bg-accent-subtle":"hover:bg-surface-2",d),children:[void 0!==a&&(0,r.jsx)("span",{className:"flex shrink-0 items-center",children:a}),(0,r.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,r.jsx)("span",{className:(0,l.cn)("block truncate text-body",n?"text-accent font-medium":"text-text-primary",x),children:i}),s&&(0,r.jsx)("span",{className:"block truncate text-caption text-text-tertiary",children:s})]}),void 0!==o&&(0,r.jsx)("span",{className:"flex shrink-0 items-center gap-2 text-caption text-text-tertiary",children:o})]})});function s(e){let{children:t,trailing:n}=e;return(0,r.jsxs)("div",{className:"flex items-baseline justify-between px-2.5 pb-1 pt-4 text-caption font-medium text-text-tertiary first:pt-1",children:[(0,r.jsx)("span",{className:"truncate",children:t}),n&&(0,r.jsx)("span",{className:"shrink-0 tabular-nums",children:n})]})}},90026:function(e,t,n){n.d(t,{oH:function(){return i},oT:function(){return s}});var r=n(37821),a=n(17968);let l={critical:"var(--critical)",high:"var(--high)",medium:"var(--medium)",low:"var(--low)",info:"var(--info)"};function i(e){var t;let{severity:n,label:i=!0,className:s}=e;return(0,r.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 whitespace-nowrap",s),children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"inline-block h-2 w-2 shrink-0 rounded-full",style:{background:null!==(t=l[n.toLowerCase()])&&void 0!==t?t:"var(--info)"}}),i?(0,r.jsx)("span",{children:n}):(0,r.jsx)("span",{className:"sr-only",children:n})]})}function s(e){let{color:t,className:n,title:l}=e;return(0,r.jsx)("span",{"aria-hidden":!l||void 0,title:l,className:(0,a.cn)("inline-block h-2 w-2 shrink-0 rounded-full",n),style:{background:t}})}},61434:function(e,t,n){n.d(t,{U:function(){return l},e:function(){return i}});var r=n(37821),a=n(17968);let l={unread:"Unread",read:"Read",questioned:"Questioned",cleared:"Cleared"};function i(e){let{state:t,className:n}=e,i=(0,a.cn)("h-3.5 w-3.5 shrink-0",n),s=l[t];return"cleared"===t?(0,r.jsxs)("svg",{viewBox:"0 0 14 14",className:i,role:"img","aria-label":s,children:[(0,r.jsx)("circle",{cx:"7",cy:"7",r:"5.5",fill:"var(--success)"}),(0,r.jsx)("path",{d:"m4.6 7.2 1.7 1.7 3.2-3.6",stroke:"var(--surface-0)",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]}):"questioned"===t?(0,r.jsxs)("svg",{viewBox:"0 0 14 14",className:i,role:"img","aria-label":s,children:[(0,r.jsx)("circle",{cx:"7",cy:"7",r:"5.25",fill:"none",stroke:"var(--medium)",strokeWidth:"1.5"}),(0,r.jsx)("path",{d:"M5.6 5.6a1.45 1.45 0 1 1 2.1 1.3c-.45.25-.7.55-.7 1.05",stroke:"var(--medium)",strokeWidth:"1.3",fill:"none",strokeLinecap:"round"}),(0,r.jsx)("circle",{cx:"7",cy:"9.9",r:".75",fill:"var(--medium)"})]}):"read"===t?(0,r.jsxs)("svg",{viewBox:"0 0 14 14",className:i,role:"img","aria-label":s,children:[(0,r.jsx)("circle",{cx:"7",cy:"7",r:"5.25",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"1.5"}),(0,r.jsx)("path",{d:"M7 1.75a5.25 5.25 0 0 1 0 10.5Z",fill:"var(--text-secondary)"})]}):(0,r.jsx)("svg",{viewBox:"0 0 14 14",className:i,role:"img","aria-label":s,children:(0,r.jsx)("circle",{cx:"7",cy:"7",r:"5.25",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5"})})}},79513:function(e,t,n){n.d(t,{C:function(){return r}});async function r(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"POST",a=await fetch(e,{method:r,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),l=await a.json().catch(()=>({}));if(!a.ok)throw Error(null!==(n=l.error)&&void 0!==n?n:"Request failed (".concat(a.status,")"));return l}},4848:function(e,t,n){n.d(t,{k:function(){return l}});let r=null,a="";function l(e){let t=JSON.stringify(e);t!==a&&(r&&clearTimeout(r),r=setTimeout(()=>{a=t,fetch("/api/focus",{method:"POST",headers:{"Content-Type":"application/json"},body:t}).catch(()=>{a=""})},350))}}}]);
|
package/dashboard/.next/static/chunks/{7a04ac15.1c6cea694301806c.js → 7a04ac15.e49de94ece135900.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6629],{1674:function(t,e,a){a.d(e,{C1:function(){return c},Lf:function(){return ef},XO:function(){return $},Yn:function(){return eu},ZH:function(){return B},aH:function(){return ep},dW:function(){return eg},gU:function(){return ew},jr:function(){return y},us:function(){return N}});var l=a(4994),i=a(3984),r=a(7062),n=a(778),s=a(9125),h=a(7632),o=a(8859),d=a(1648),c=(0,h.eW)(async(t,e,a)=>{let i,h;let d=e.useHtmlLabels||(0,s.ku)(s.nV()?.htmlLabels);i=a||"node default";let c=t.insert("g").attr("class",i).attr("id",e.domId||e.id),g=c.insert("g").attr("class","label").attr("style",(0,n.R7)(e.labelStyle));h=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let y=!!e.icon||!!e.img,f="markdown"===e.labelType,u=await (0,r.rw)(g,(0,s.oO)((0,n.SH)(h),(0,s.nV)()),{useHtmlLabels:d,width:e.width||s.nV().flowchart?.wrappingWidth,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:y,markdown:f},(0,s.nV)()),w=u.getBBox(),p=(e?.padding??0)/2;if(d){let t=u.children[0],e=(0,o.Ys)(u);await (0,l.i)(t,h),w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}return d?g.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"):g.attr("transform","translate(0, "+-w.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:c,bbox:w,halfPadding:p,label:g}},"labelHelper"),g=(0,h.eW)(async(t,e,a)=>{let l=a.useHtmlLabels??(0,s._X)((0,s.nV)()),i=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,r.rw)(i,(0,s.oO)((0,n.SH)(e),(0,s.nV)()),{useHtmlLabels:l,width:a.width||s.nV()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=h.getBBox(),c=a.padding/2;if((0,s._X)((0,s.nV)())){let t=h.children[0],e=(0,o.Ys)(h);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return l?i.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):i.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&i.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:i}},"insertLabel"),y=(0,h.eW)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),f=(0,h.eW)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function u(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function w(t,e,a,l,i,r){let n=[],s=a-t,h=2*Math.PI/(s/r),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+i*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function p(t,e,a,l,i,r){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}function m(t){let e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),a=document.createElementNS("http://www.w3.org/2000/svg","path"),l=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");a.setAttribute("d",l);let i=e.find(t=>"none"!==t.getAttribute("fill")),r=e.find(t=>"none"!==t.getAttribute("stroke")),n=(0,h.eW)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");i&&Object.entries({fill:n(i,"fill"),"fill-opacity":n(i,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)}),r&&Object.entries({stroke:n(r,"stroke"),"stroke-width":n(r,"stroke-width")??"1","stroke-opacity":n(r,"stroke-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)});let s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(a),s}(0,h.eW)(u,"createPathFromPoints"),(0,h.eW)(w,"generateFullSineWavePoints"),(0,h.eW)(p,"generateCirclePoints"),(0,h.eW)(m,"mergePaths");var x=(0,h.eW)((t,e)=>{var a,l,i=t.x,r=t.y,n=e.x-i,s=e.y-r,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:i+a,y:r+l}},"intersectRect"),$=(0,h.eW)(async(t,e,a,l=!1,i=!1)=>{let n=e||"";"object"==typeof n&&(n=n[0]);let h=(0,s.nV)(),o=(0,s._X)(h);return await (0,r.rw)(t,n,{style:a,isTitle:l,useHtmlLabels:o,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},h)},"createLabel"),b=(0,h.eW)((t,e,a,l,i)=>["M",t+i,e,"H",t+a-i,"A",i,i,0,0,1,t+a,e+i,"V",e+l-i,"A",i,i,0,0,1,t+a-i,e+l,"H",t+i,"A",i,i,0,0,1,t,e+l-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),k=(0,h.eW)(async(t,e)=>{let a,n;h.cM.info("Creating subgraph rect for ",e.id,e);let c=(0,s.nV)(),{themeVariables:g,handDrawnSeed:y}=c,{clusterBkg:f,clusterBorder:u}=g,{labelStyles:w,nodeStyles:p,borderStyles:m,backgroundStyles:k}=(0,i.UG)(e),M=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),S=(0,s._X)(c),D=M.insert("g").attr("class","cluster-label "),W=(a="markdown"===e.labelType?await (0,r.rw)(D,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width}):await $(D,e.label,e.labelStyle||"",!1,!0)).getBBox();if((0,s._X)(c)){let t=a.children[0],e=(0,o.Ys)(a);W=t.getBoundingClientRect(),e.attr("width",W.width),e.attr("height",W.height)}let v=e.width<=W.width+e.padding?W.width+e.padding:e.width;e.width<=W.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let N=e.height,B=e.x-v/2,C=e.y-N/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg(M),a=(0,i._q)(e,{roughness:.7,fill:f,stroke:u,fillWeight:3,seed:y}),l=t.path(b(B,C,v,N,0),a);(n=M.insert(()=>(h.cM.debug("Rough node insert CXC",l),l),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),n.select("path").attr("style",k.join(";").replace("fill","stroke"))}else(n=M.insert("rect",":first-child")).attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",B).attr("y",C).attr("width",v).attr("height",N);let{subGraphTitleTopMargin:A}=(0,l.L)(c);if(D.attr("transform",`translate(${e.x-W.width/2}, ${e.y-e.height/2+A})`),w){let t=D.select("span");t&&t.attr("style",w)}let _=n.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=W.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:M,labelBBox:W}},"rect"),M=(0,h.eW)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.domId),l=a.insert("rect",":first-child"),i=0*e.padding,r=i/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-r).attr("y",e.y-e.height/2-r).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return x(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),S=(0,h.eW)(async(t,e)=>{let a;let l=(0,s.nV)(),{themeVariables:i,handDrawnSeed:r}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=i,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),u=y.insert("g").attr("class","cluster-label"),w=y.append("rect"),p=await $(u,e.label,e.labelStyle,void 0,!0),m=p.getBBox();if((0,s._X)(l)){let t=p.children[0],e=(0,o.Ys)(p);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}let k=0*e.padding,M=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+k;e.width<=m.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+k,D=e.height+k-m.height-6,W=e.x-M/2,v=e.y-S/2;e.width=M;let N=e.y-e.height/2-k/2+m.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.Z.svg(y),i=e.rx||e.ry?l.path(b(W,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:r}):l.rectangle(W,v,M,S,{seed:r});a=y.insert(()=>i,":first-child");let s=l.rectangle(W,N,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:r});a=y.insert(()=>i,":first-child"),w=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",W).attr("y",v).attr("width",M).attr("height",S).attr("data-look",e.look),w.attr("class","inner").attr("x",W).attr("y",N).attr("width",M).attr("height",D);u.attr("transform",`translate(${e.x-m.width/2}, ${v+1-((0,s._X)(l)?0:3)})`);let B=a.node().getBBox();return e.height=B.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return x(e,t)},{cluster:y,labelBBox:m}},"roundedWithTitle"),D=(0,h.eW)(async(t,e)=>{let a;h.cM.info("Creating subgraph rect for ",e.id,e);let n=(0,s.nV)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:u,nodeStyles:w,borderStyles:p,backgroundStyles:m}=(0,i.UG)(e),$=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),k=(0,s._X)(n),M=$.insert("g").attr("class","cluster-label "),S=await (0,r.rw)(M,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0,width:e.width}),D=S.getBBox();if((0,s._X)(n)){let t=S.children[0],e=(0,o.Ys)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let W=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(W-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,N=e.x-W/2,B=e.y-v/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg($),l=(0,i._q)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),r=t.path(b(N,B,W,v,e.rx),l);(a=$.insert(()=>(h.cM.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",p.join(";")),a.select("path").attr("style",m.join(";").replace("fill","stroke"))}else(a=$.insert("rect",":first-child")).attr("style",w).attr("rx",e.rx).attr("ry",e.ry).attr("x",N).attr("y",B).attr("width",W).attr("height",v);let{subGraphTitleTopMargin:C}=(0,l.L)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+C})`),u){let t=M.select("span");t&&t.attr("style",u)}let A=a.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:$,labelBBox:D}},"kanbanSection"),W={rect:k,squareRect:k,roundedWithTitle:S,noteGroup:M,divider:(0,h.eW)((t,e)=>{let a;let{themeVariables:l,handDrawnSeed:i}=(0,s.nV)(),{nodeBorder:r}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),h=n.insert("g",":first-child"),o=0*e.padding,c=e.width+o;e.diff=-e.padding;let g=e.height+o,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=d.Z.svg(n).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:r,seed:i});a=n.insert(()=>t,":first-child")}else{a=h.insert("rect",":first-child");let t="outer";e.look,t="divider",a.attr("class",t).attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look)}let u=a.node().getBBox();return e.height=u.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:D},v=new Map,N=(0,h.eW)(async(t,e)=>{let a=e.shape||"rect",l=await W[a](t,e);return v.set(e.id,l),l},"insertCluster"),B=(0,h.eW)(()=>{v=new Map},"clear");function C(t,e,a,l){var i=t.x,r=t.y,n=i-l.x,s=r-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<i&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<r&&(d=-d),{x:i+o,y:r+d}}function A(t,e,a){return C(t,e,e,a)}function _(t,e,a,l){{let i=e.y-t.y,r=t.x-e.x,n=e.x*t.y-t.x*e.y,s=i*a.x+r*a.y+n,h=i*l.x+r*l.y+n;if(0!==s&&0!==h&&q(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&q(g,y))return;let f=i*d-o*r;if(0===f)return;let u=Math.abs(f/2),w=r*c-d*n;return{x:w<0?(w-u)/f:(w+u)/f,y:(w=o*n-i*c)<0?(w-u)/f:(w+u)/f}}}function q(t,e){return t*e>0}function R(t,e,a){let l=t.x,i=t.y,r=[],n=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=i-t.height/2-s;for(let l=0;l<e.length;l++){let i=e[l],n=e[l<e.length-1?l+1:0],s=_(t,a,{x:h+i.x,y:o+i.y},{x:h+n.x,y:o+n.y});s&&r.push(s)}return r.length?(r.length>1&&r.sort(function(t,e){let l=t.x-a.x,i=t.y-a.y,r=Math.sqrt(l*l+i*i),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return r<h?-1:r===h?0:1}),r[0]):t}(0,h.eW)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.eW)(C,"intersectEllipse"),(0,h.eW)(A,"intersectCircle"),(0,h.eW)(_,"intersectLine"),(0,h.eW)(q,"sameSign"),(0,h.eW)(R,"intersectPolygon");var P={circle:A,polygon:R,rect:x};function I(t,e){let{labelStyles:a}=(0,i.UG)(e);e.labelStyle=a;let l=f(e),r=l;l||(r="anchor");let s=t.insert("g").attr("class",r).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.Z.svg(s),g=(0,i._q)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let u=c.circle(0,0,2,g),w=s.insert(()=>u,":first-child");return w.attr("class","anchor").attr("style",(0,n.R7)(o)),y(e,w),e.intersect=function(t){return h.cM.info("Circle intersect",e,1,t),P.circle(e,1,t)},s}function L(t,e,a,l,i,r,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/i)**2+((l-e)/2/r)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*r*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*i*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/r,(t-d)/i),y=Math.atan2((l-c)/r,(a-d)/i)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+i*Math.cos(e),l=c+r*Math.sin(e);f.push({x:a,y:l})}return f}function Z(t,e,a){let[l,i]=[e,a].sort((t,e)=>e-t);return i*(1-Math.sqrt(1-(t/l/2)**2))}async function G(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,o=(0,h.eW)(t=>t+s,"calcTotalHeight"),g=(0,h.eW)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:w,bbox:p}=await c(t,e,f(e)),m=o(e?.height?e?.height:p.height),[x,$]=g(m),b=Z(m,x,$),k=(e?.width?e?.width:p.width)+2*n+b-b,{cssStyles:M}=e,S=[{x:k/2,y:-m/2},{x:-k/2,y:-m/2},...L(-k/2,-m/2,-k/2,m/2,x,$,!1),{x:k/2,y:m/2},...L(k/2,m/2,k/2,-m/2,x,$,!0)],D=d.Z.svg(w),W=(0,i._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=u(S),N=D.path(v,W),B=w.insert(()=>N,":first-child");return B.attr("class","basic label-container outer-path"),M&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",M),l&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",l),B.attr("transform",`translate(${x/2}, 0)`),y(e,B),e.intersect=function(t){return P.polygon(e,S,t)},w}function U(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function T(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?28:n,h="neo"===e.look?24:n,{shapeSvg:o,bbox:g}=await c(t,e,f(e)),w=(e?.width??g.width)+("neo"===e.look?2*s:s+12),p=(e?.height??g.height)+("neo"===e.look?2*h:h),m=-p,x=[{x:12,y:m},{x:w,y:m},{x:w,y:0},{x:0,y:0},{x:0,y:m+12},{x:12,y:m}],{cssStyles:$}=e;if("handDrawn"===e.look){let t=d.Z.svg(o),l=(0,i._q)(e,{}),r=u(x),n=t.path(r,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${p/2})`),$&&a.attr("style",$)}else a=U(o,w,p,x);return r&&a.attr("style",r),y(e,a),e.intersect=function(t){return P.polygon(e,x,t)},o}function E(t,e){let{nodeStyles:a}=(0,i.UG)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:r}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=d.Z.svg(l),o=(0,i._q)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=u(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return P.polygon(e,s,t)},l}async function H(t,e,a){let l;let{labelStyles:r,nodeStyles:s}=(0,i.UG)(e);e.labelStyle=r;let{shapeSvg:o,bbox:g,halfPadding:u}=await c(t,e,f(e)),w=a?.padding??u,p="neo"===e.look?g.width/2+32:g.width/2+w,{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,i._q)(e,{}),r=t.circle(0,0,2*p,a);(l=o.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(m))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",p).attr("cx",0).attr("cy",0);return y(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return P.circle(t,a,e)},e.intersect=function(t){return h.cM.info("Circle intersect",e,p,t),P.circle(e,p,t)},o}function V(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,i={x:l/2*e,y:l/2*a},r={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${r.x},${r.y} L ${s.x},${s.y}
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6629],{51674:function(t,e,a){a.d(e,{C1:function(){return c},Lf:function(){return ef},XO:function(){return $},Yn:function(){return eu},ZH:function(){return B},aH:function(){return ep},dW:function(){return eg},gU:function(){return ew},jr:function(){return y},us:function(){return N}});var l=a(64994),i=a(43984),r=a(47062),n=a(40778),s=a(49125),h=a(17632),o=a(68859),d=a(61648),c=(0,h.eW)(async(t,e,a)=>{let i,h;let d=e.useHtmlLabels||(0,s.ku)(s.nV()?.htmlLabels);i=a||"node default";let c=t.insert("g").attr("class",i).attr("id",e.domId||e.id),g=c.insert("g").attr("class","label").attr("style",(0,n.R7)(e.labelStyle));h=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let y=!!e.icon||!!e.img,f="markdown"===e.labelType,u=await (0,r.rw)(g,(0,s.oO)((0,n.SH)(h),(0,s.nV)()),{useHtmlLabels:d,width:e.width||s.nV().flowchart?.wrappingWidth,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:y,markdown:f},(0,s.nV)()),w=u.getBBox(),p=(e?.padding??0)/2;if(d){let t=u.children[0],e=(0,o.Ys)(u);await (0,l.i)(t,h),w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}return d?g.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"):g.attr("transform","translate(0, "+-w.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:c,bbox:w,halfPadding:p,label:g}},"labelHelper"),g=(0,h.eW)(async(t,e,a)=>{let l=a.useHtmlLabels??(0,s._X)((0,s.nV)()),i=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,r.rw)(i,(0,s.oO)((0,n.SH)(e),(0,s.nV)()),{useHtmlLabels:l,width:a.width||s.nV()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=h.getBBox(),c=a.padding/2;if((0,s._X)((0,s.nV)())){let t=h.children[0],e=(0,o.Ys)(h);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return l?i.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):i.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&i.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:i}},"insertLabel"),y=(0,h.eW)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),f=(0,h.eW)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function u(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function w(t,e,a,l,i,r){let n=[],s=a-t,h=2*Math.PI/(s/r),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+i*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function p(t,e,a,l,i,r){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}function m(t){let e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),a=document.createElementNS("http://www.w3.org/2000/svg","path"),l=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");a.setAttribute("d",l);let i=e.find(t=>"none"!==t.getAttribute("fill")),r=e.find(t=>"none"!==t.getAttribute("stroke")),n=(0,h.eW)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");i&&Object.entries({fill:n(i,"fill"),"fill-opacity":n(i,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)}),r&&Object.entries({stroke:n(r,"stroke"),"stroke-width":n(r,"stroke-width")??"1","stroke-opacity":n(r,"stroke-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)});let s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(a),s}(0,h.eW)(u,"createPathFromPoints"),(0,h.eW)(w,"generateFullSineWavePoints"),(0,h.eW)(p,"generateCirclePoints"),(0,h.eW)(m,"mergePaths");var x=(0,h.eW)((t,e)=>{var a,l,i=t.x,r=t.y,n=e.x-i,s=e.y-r,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:i+a,y:r+l}},"intersectRect"),$=(0,h.eW)(async(t,e,a,l=!1,i=!1)=>{let n=e||"";"object"==typeof n&&(n=n[0]);let h=(0,s.nV)(),o=(0,s._X)(h);return await (0,r.rw)(t,n,{style:a,isTitle:l,useHtmlLabels:o,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},h)},"createLabel"),b=(0,h.eW)((t,e,a,l,i)=>["M",t+i,e,"H",t+a-i,"A",i,i,0,0,1,t+a,e+i,"V",e+l-i,"A",i,i,0,0,1,t+a-i,e+l,"H",t+i,"A",i,i,0,0,1,t,e+l-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),k=(0,h.eW)(async(t,e)=>{let a,n;h.cM.info("Creating subgraph rect for ",e.id,e);let c=(0,s.nV)(),{themeVariables:g,handDrawnSeed:y}=c,{clusterBkg:f,clusterBorder:u}=g,{labelStyles:w,nodeStyles:p,borderStyles:m,backgroundStyles:k}=(0,i.UG)(e),M=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),S=(0,s._X)(c),D=M.insert("g").attr("class","cluster-label "),W=(a="markdown"===e.labelType?await (0,r.rw)(D,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width}):await $(D,e.label,e.labelStyle||"",!1,!0)).getBBox();if((0,s._X)(c)){let t=a.children[0],e=(0,o.Ys)(a);W=t.getBoundingClientRect(),e.attr("width",W.width),e.attr("height",W.height)}let v=e.width<=W.width+e.padding?W.width+e.padding:e.width;e.width<=W.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let N=e.height,B=e.x-v/2,C=e.y-N/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg(M),a=(0,i._q)(e,{roughness:.7,fill:f,stroke:u,fillWeight:3,seed:y}),l=t.path(b(B,C,v,N,0),a);(n=M.insert(()=>(h.cM.debug("Rough node insert CXC",l),l),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),n.select("path").attr("style",k.join(";").replace("fill","stroke"))}else(n=M.insert("rect",":first-child")).attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",B).attr("y",C).attr("width",v).attr("height",N);let{subGraphTitleTopMargin:A}=(0,l.L)(c);if(D.attr("transform",`translate(${e.x-W.width/2}, ${e.y-e.height/2+A})`),w){let t=D.select("span");t&&t.attr("style",w)}let _=n.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=W.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:M,labelBBox:W}},"rect"),M=(0,h.eW)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.domId),l=a.insert("rect",":first-child"),i=0*e.padding,r=i/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-r).attr("y",e.y-e.height/2-r).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return x(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),S=(0,h.eW)(async(t,e)=>{let a;let l=(0,s.nV)(),{themeVariables:i,handDrawnSeed:r}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=i,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),u=y.insert("g").attr("class","cluster-label"),w=y.append("rect"),p=await $(u,e.label,e.labelStyle,void 0,!0),m=p.getBBox();if((0,s._X)(l)){let t=p.children[0],e=(0,o.Ys)(p);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}let k=0*e.padding,M=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+k;e.width<=m.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+k,D=e.height+k-m.height-6,W=e.x-M/2,v=e.y-S/2;e.width=M;let N=e.y-e.height/2-k/2+m.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.Z.svg(y),i=e.rx||e.ry?l.path(b(W,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:r}):l.rectangle(W,v,M,S,{seed:r});a=y.insert(()=>i,":first-child");let s=l.rectangle(W,N,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:r});a=y.insert(()=>i,":first-child"),w=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",W).attr("y",v).attr("width",M).attr("height",S).attr("data-look",e.look),w.attr("class","inner").attr("x",W).attr("y",N).attr("width",M).attr("height",D);u.attr("transform",`translate(${e.x-m.width/2}, ${v+1-((0,s._X)(l)?0:3)})`);let B=a.node().getBBox();return e.height=B.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return x(e,t)},{cluster:y,labelBBox:m}},"roundedWithTitle"),D=(0,h.eW)(async(t,e)=>{let a;h.cM.info("Creating subgraph rect for ",e.id,e);let n=(0,s.nV)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:u,nodeStyles:w,borderStyles:p,backgroundStyles:m}=(0,i.UG)(e),$=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),k=(0,s._X)(n),M=$.insert("g").attr("class","cluster-label "),S=await (0,r.rw)(M,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0,width:e.width}),D=S.getBBox();if((0,s._X)(n)){let t=S.children[0],e=(0,o.Ys)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let W=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(W-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,N=e.x-W/2,B=e.y-v/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg($),l=(0,i._q)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),r=t.path(b(N,B,W,v,e.rx),l);(a=$.insert(()=>(h.cM.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",p.join(";")),a.select("path").attr("style",m.join(";").replace("fill","stroke"))}else(a=$.insert("rect",":first-child")).attr("style",w).attr("rx",e.rx).attr("ry",e.ry).attr("x",N).attr("y",B).attr("width",W).attr("height",v);let{subGraphTitleTopMargin:C}=(0,l.L)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+C})`),u){let t=M.select("span");t&&t.attr("style",u)}let A=a.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:$,labelBBox:D}},"kanbanSection"),W={rect:k,squareRect:k,roundedWithTitle:S,noteGroup:M,divider:(0,h.eW)((t,e)=>{let a;let{themeVariables:l,handDrawnSeed:i}=(0,s.nV)(),{nodeBorder:r}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),h=n.insert("g",":first-child"),o=0*e.padding,c=e.width+o;e.diff=-e.padding;let g=e.height+o,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=d.Z.svg(n).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:r,seed:i});a=n.insert(()=>t,":first-child")}else{a=h.insert("rect",":first-child");let t="outer";e.look,t="divider",a.attr("class",t).attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look)}let u=a.node().getBBox();return e.height=u.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:D},v=new Map,N=(0,h.eW)(async(t,e)=>{let a=e.shape||"rect",l=await W[a](t,e);return v.set(e.id,l),l},"insertCluster"),B=(0,h.eW)(()=>{v=new Map},"clear");function C(t,e,a,l){var i=t.x,r=t.y,n=i-l.x,s=r-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<i&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<r&&(d=-d),{x:i+o,y:r+d}}function A(t,e,a){return C(t,e,e,a)}function _(t,e,a,l){{let i=e.y-t.y,r=t.x-e.x,n=e.x*t.y-t.x*e.y,s=i*a.x+r*a.y+n,h=i*l.x+r*l.y+n;if(0!==s&&0!==h&&q(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&q(g,y))return;let f=i*d-o*r;if(0===f)return;let u=Math.abs(f/2),w=r*c-d*n;return{x:w<0?(w-u)/f:(w+u)/f,y:(w=o*n-i*c)<0?(w-u)/f:(w+u)/f}}}function q(t,e){return t*e>0}function R(t,e,a){let l=t.x,i=t.y,r=[],n=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=i-t.height/2-s;for(let l=0;l<e.length;l++){let i=e[l],n=e[l<e.length-1?l+1:0],s=_(t,a,{x:h+i.x,y:o+i.y},{x:h+n.x,y:o+n.y});s&&r.push(s)}return r.length?(r.length>1&&r.sort(function(t,e){let l=t.x-a.x,i=t.y-a.y,r=Math.sqrt(l*l+i*i),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return r<h?-1:r===h?0:1}),r[0]):t}(0,h.eW)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.eW)(C,"intersectEllipse"),(0,h.eW)(A,"intersectCircle"),(0,h.eW)(_,"intersectLine"),(0,h.eW)(q,"sameSign"),(0,h.eW)(R,"intersectPolygon");var P={circle:A,polygon:R,rect:x};function I(t,e){let{labelStyles:a}=(0,i.UG)(e);e.labelStyle=a;let l=f(e),r=l;l||(r="anchor");let s=t.insert("g").attr("class",r).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.Z.svg(s),g=(0,i._q)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let u=c.circle(0,0,2,g),w=s.insert(()=>u,":first-child");return w.attr("class","anchor").attr("style",(0,n.R7)(o)),y(e,w),e.intersect=function(t){return h.cM.info("Circle intersect",e,1,t),P.circle(e,1,t)},s}function L(t,e,a,l,i,r,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/i)**2+((l-e)/2/r)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*r*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*i*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/r,(t-d)/i),y=Math.atan2((l-c)/r,(a-d)/i)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+i*Math.cos(e),l=c+r*Math.sin(e);f.push({x:a,y:l})}return f}function Z(t,e,a){let[l,i]=[e,a].sort((t,e)=>e-t);return i*(1-Math.sqrt(1-(t/l/2)**2))}async function G(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,o=(0,h.eW)(t=>t+s,"calcTotalHeight"),g=(0,h.eW)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:w,bbox:p}=await c(t,e,f(e)),m=o(e?.height?e?.height:p.height),[x,$]=g(m),b=Z(m,x,$),k=(e?.width?e?.width:p.width)+2*n+b-b,{cssStyles:M}=e,S=[{x:k/2,y:-m/2},{x:-k/2,y:-m/2},...L(-k/2,-m/2,-k/2,m/2,x,$,!1),{x:k/2,y:m/2},...L(k/2,m/2,k/2,-m/2,x,$,!0)],D=d.Z.svg(w),W=(0,i._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=u(S),N=D.path(v,W),B=w.insert(()=>N,":first-child");return B.attr("class","basic label-container outer-path"),M&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",M),l&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",l),B.attr("transform",`translate(${x/2}, 0)`),y(e,B),e.intersect=function(t){return P.polygon(e,S,t)},w}function U(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function T(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?28:n,h="neo"===e.look?24:n,{shapeSvg:o,bbox:g}=await c(t,e,f(e)),w=(e?.width??g.width)+("neo"===e.look?2*s:s+12),p=(e?.height??g.height)+("neo"===e.look?2*h:h),m=-p,x=[{x:12,y:m},{x:w,y:m},{x:w,y:0},{x:0,y:0},{x:0,y:m+12},{x:12,y:m}],{cssStyles:$}=e;if("handDrawn"===e.look){let t=d.Z.svg(o),l=(0,i._q)(e,{}),r=u(x),n=t.path(r,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${p/2})`),$&&a.attr("style",$)}else a=U(o,w,p,x);return r&&a.attr("style",r),y(e,a),e.intersect=function(t){return P.polygon(e,x,t)},o}function E(t,e){let{nodeStyles:a}=(0,i.UG)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:r}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=d.Z.svg(l),o=(0,i._q)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=u(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return P.polygon(e,s,t)},l}async function H(t,e,a){let l;let{labelStyles:r,nodeStyles:s}=(0,i.UG)(e);e.labelStyle=r;let{shapeSvg:o,bbox:g,halfPadding:u}=await c(t,e,f(e)),w=a?.padding??u,p="neo"===e.look?g.width/2+32:g.width/2+w,{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,i._q)(e,{}),r=t.circle(0,0,2*p,a);(l=o.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(m))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",p).attr("cx",0).attr("cy",0);return y(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return P.circle(t,a,e)},e.intersect=function(t){return h.cM.info("Circle intersect",e,p,t),P.circle(e,p,t)},o}function V(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,i={x:l/2*e,y:l/2*a},r={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${r.x},${r.y} L ${s.x},${s.y}
|
|
2
2
|
M ${i.x},${i.y} L ${n.x},${n.y}`}function X(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a,e.label="";let r=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,o=d.Z.svg(r),c=(0,i._q)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=o.circle(0,0,2*n,c),u=V(n),w=o.path(u,c),p=r.insert(()=>g,":first-child");return p.insert(()=>w),p.attr("class","outer-path"),s&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",s),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),y(e,p),e.intersect=function(t){return h.cM.info("crossedCircle intersect",e,{radius:n,point:t}),P.circle(e,n,t)},r}function Y(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}async function j(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,g=n.width+h,w=n.height+o,p=Math.max(5,.1*w),{cssStyles:m}=e,x=[...Y(g/2,-w/2,p,30,-90,0),{x:-g/2-p,y:p},...Y(g/2+2*p,-p,p,20,-180,-270),...Y(g/2+2*p,p,p,20,-90,-180),{x:-g/2-p,y:-w/2},...Y(g/2,w/2,p,20,0,90)],$=[{x:g/2,y:-w/2-p},{x:-g/2,y:-w/2-p},...Y(g/2,-w/2,p,20,-90,0),{x:-g/2-p,y:-p},...Y(g/2+.1*g,-p,p,20,-180,-270),...Y(g/2+.1*g,p,p,20,-90,-180),{x:-g/2-p,y:w/2},...Y(g/2,w/2,p,20,0,90),{x:-g/2,y:w/2+p},{x:g/2,y:w/2+p}],b=d.Z.svg(r),k=(0,i._q)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=u(x).replace("Z",""),S=b.path(M,k),D=u($),W=b.path(D,{...k}),v=r.insert("g",":first-child");return v.insert(()=>W,":first-child").attr("stroke-opacity",0),v.insert(()=>S,":first-child"),v.attr("class","text"),m&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${p}, 0)`),s.attr("transform",`translate(${-g/2+p-(n.x-(n.left??0))},${-w/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,v),e.intersect=function(t){return P.polygon(e,$,t)},r}function O(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:r,y:o})}return n}async function F(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,g=n.width+("neo"===e.look?2*h:h),w=n.height+("neo"===e.look?2*o:o),p=Math.max(5,.1*w),{cssStyles:m}=e,x=[...O(g/2,-w/2,p,20,-90,0),{x:g/2+p,y:-p},...O(g/2+2*p,-p,p,20,-180,-270),...O(g/2+2*p,p,p,20,-90,-180),{x:g/2+p,y:w/2},...O(g/2,w/2,p,20,0,90)],$=[{x:-g/2,y:-w/2-p},{x:g/2,y:-w/2-p},...O(g/2,-w/2,p,20,-90,0),{x:g/2+p,y:-p},...O(g/2+2*p,-p,p,20,-180,-270),...O(g/2+2*p,p,p,20,-90,-180),{x:g/2+p,y:w/2},...O(g/2,w/2,p,20,0,90),{x:g/2,y:w/2+p},{x:-g/2,y:w/2+p}],b=d.Z.svg(r),k=(0,i._q)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=u(x).replace("Z",""),S=b.path(M,k),D=u($),W=b.path(D,{...k}),v=r.insert("g",":first-child");return v.insert(()=>W,":first-child").attr("stroke-opacity",0),v.insert(()=>S,":first-child"),v.attr("class","text"),m&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${-p}, 0)`),s.attr("transform",`translate(${-g/2+(e.padding??0)/2-(n.x-(n.left??0))},${-w/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,v),e.intersect=function(t){return P.polygon(e,$,t)},r}function z(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}async function J(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,g=n.width+("neo"===e.look?2*h:h),w=n.height+("neo"===e.look?2*o:o),p=Math.max(5,.1*w),{cssStyles:m}=e,x=[...z(g/2,-w/2,p,30,-90,0),{x:-g/2-p,y:p},...z(g/2+2*p,-p,p,20,-180,-270),...z(g/2+2*p,p,p,20,-90,-180),{x:-g/2-p,y:-w/2},...z(g/2,w/2,p,20,0,90)],$=[...z(-g/2+p+p/2,-w/2,p,20,-90,-180),{x:g/2-p/2,y:p},...z(-g/2-p/2,-p,p,20,0,90),...z(-g/2-p/2,p,p,20,-90,0),{x:g/2-p/2,y:-p},...z(-g/2+p+p/2,w/2,p,30,-180,-270)],b=[{x:g/2,y:-w/2-p},{x:-g/2,y:-w/2-p},...z(g/2,-w/2,p,20,-90,0),{x:-g/2-p,y:-p},...z(g/2+2*p,-p,p,20,-180,-270),...z(g/2+2*p,p,p,20,-90,-180),{x:-g/2-p,y:w/2},...z(g/2,w/2,p,20,0,90),{x:-g/2,y:w/2+p},{x:g/2-p-p/2,y:w/2+p},...z(-g/2+p+p/2,-w/2,p,20,-90,-180),{x:g/2-p/2,y:p},...z(-g/2-p/2,-p,p,20,0,90),...z(-g/2-p/2,p,p,20,-90,0),{x:g/2-p/2,y:-p},...z(-g/2+p+p/2,w/2,p,30,-180,-270)],k=d.Z.svg(r),M=(0,i._q)(e,{fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=u(x).replace("Z",""),D=k.path(S,M),W=u($).replace("Z",""),v=k.path(W,M),N=u(b),B=k.path(N,{...M}),C=r.insert("g",":first-child");return C.insert(()=>B,":first-child").attr("stroke-opacity",0),C.insert(()=>D,":first-child"),C.insert(()=>v,":first-child"),C.attr("class","text"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),C.attr("transform",`translate(${p-p/4}, 0)`),s.attr("transform",`translate(${-g/2+(e.padding??0)/2-(n.x-(n.left??0))},${-w/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,C),e.intersect=function(t){return P.polygon(e,b,t)},r}async function K(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(20,(o.width+2*n)*1.25,e?.width??0),w=Math.max(5,o.height+2*s,e?.height??0),m=w/2,{cssStyles:x}=e,$=d.Z.svg(h),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=g-m,M=w/4,S=[{x:k,y:0},{x:M,y:0},{x:0,y:w/2},{x:M,y:w},{x:k,y:w},...p(-k,-w/2,m,50,270,90)],D=u(S),W=$.path(D,b),v=h.insert(()=>W,":first-child");return v.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",l),v.attr("transform",`translate(${-g/2}, ${-w/2})`),y(e,v),e.intersect=function(t){return P.polygon(e,S,t)},h}(0,h.eW)(I,"anchor"),(0,h.eW)(L,"generateArcPoints"),(0,h.eW)(Z,"calculateArcSagitta"),(0,h.eW)(G,"bowTieRect"),(0,h.eW)(U,"insertPolygonShape"),(0,h.eW)(T,"card"),(0,h.eW)(E,"choice"),(0,h.eW)(H,"circle"),(0,h.eW)(V,"createLine"),(0,h.eW)(X,"crossedCircle"),(0,h.eW)(Y,"generateCirclePoints"),(0,h.eW)(j,"curlyBraceLeft"),(0,h.eW)(O,"generateCirclePoints"),(0,h.eW)(F,"curlyBraceRight"),(0,h.eW)(z,"generateCirclePoints"),(0,h.eW)(J,"curlyBraces"),(0,h.eW)(K,"curvedTrapezoid");var Q=(0,h.eW)((t,e,a,l,i,r)=>`M${t},${e+r} a${i},${r} 0,0,0 ${a},0 a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),tt=(0,h.eW)((t,e,a,l,i,r)=>`M${t},${e+r} M${t+a},${e+r} a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),te=(0,h.eW)((t,e,a,l,i,r)=>`M${t-a/2},${-l/2} a${i},${r} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function ta(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?24:s,o="neo"===e.look?24:s;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-o,e.width<8&&(e.width=8),e.height=(e.height??0)-h-t/2/(2.5+t/50)*3,e.height<8&&(e.height=8)}let{shapeSvg:g,bbox:u,label:w}=await c(t,e,f(e)),p=(e.width?e.width:u.width)+o,m=p/2,x=m/(2.5+p/50),$=(e.height?e.height:u.height)+h+x,{cssStyles:b}=e;if("handDrawn"===e.look){let t=d.Z.svg(g),l=tt(0,0,p,$,m,x),r=te(0,x,p,$,m,x),n=(0,i._q)(e,{}),s=t.path(l,n),h=t.path(r,(0,i._q)(e,{fill:"none"}));a=g.insert(()=>h,":first-child"),(a=g.insert(()=>s,":first-child")).attr("class","basic label-container"),b&&a.attr("style",b)}else{let t=Q(0,0,p,$,m,x);a=g.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,n.R7)(b)).attr("style",r)}return a.attr("label-offset-y",x),a.attr("transform",`translate(${-p/2}, ${-($/2+x)})`),y(e,a),w.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(t){let a=P.rect(e,t),l=a.x-(e.x??0);if(0!=m&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-x)){let i=x*x*(1-l*l/(m*m));i>0&&(i=Math.sqrt(i)),i=x-i,t.y-(e.y??0)>0&&(i=-i),a.y+=i}return a},g}async function tl(t,e,a){let l;let{labelStyles:r,nodeStyles:s}=(0,i.UG)(e);e.labelStyle=r;let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+2*a.labelPaddingX,e?.width||0),u=Math.max(o.height+2*a.labelPaddingY,e?.height||0),w=-g/2,p=-u/2,{rx:m,ry:x}=e,{cssStyles:$}=e;if(a?.rx&&a.ry&&(m=a.rx,x=a.ry),"handDrawn"===e.look){let t=d.Z.svg(h),a=(0,i._q)(e,{}),r=m||x?t.path(b(w,p,g,u,m||0),a):t.rectangle(w,p,g,u,a);(l=h.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)($))}else(l=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,n.R7)(m)).attr("ry",(0,n.R7)(x)).attr("x",w).attr("y",p).attr("width",g).attr("height",u);return y(e,l),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return P.rect(e,t)},h}async function ti(t,e){let{cssClasses:a,labelPaddingX:l,labelPaddingY:r,padding:n,width:s,height:h}=e,o=await tl(t,e,{rx:0,ry:0,classes:a??"",labelPaddingX:l??(n??0)*2,labelPaddingY:r??n??0});if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,i._q)(e,{}),l=o.select(".basic.label-container > path:nth-child(2)"),r=l.node();if(!r)return o;let n=null;return r instanceof SVGGraphicsElement&&(n=r.getBBox(),o.insert(()=>t.line(n.x,n.y,n.x+n.width,n.y,a),".basic.label-container g.label"),o.insert(()=>t.line(n.x,n.y+n.height,n.x+n.width,n.y+n.height,a),".basic.label-container g.label"),l.remove()),o}let c=o.select(".basic.label-container"),g=(Number(c.attr("width"))||s)??0,y=(Number(c.attr("height"))||h)??0;return g>0&&y>0&&c.attr("stroke-dasharray",`${g} ${y}`),o}async function tr(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=h.width+r,u=h.height+n,w=.2*u,p=-g/2,m=-u/2-w/2,{cssStyles:x}=e,$=d.Z.svg(s),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=$.polygon([{x:p,y:m+w},{x:-p,y:m+w},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+w}].map(t=>[t.x,t.y]),b),M=s.insert(()=>k,":first-child");return M.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",x),l&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",l),o.attr("transform",`translate(${p+(e.padding??0)/2-(h.x-(h.left??0))}, ${m+w+(e.padding??0)/2-(h.y-(h.top??0))})`),y(e,M),e.intersect=function(t){return P.rect(e,t)},s}async function tn(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e),s="neo"===e.look?12:5;e.labelStyle=l;let o=e.padding??0,g="neo"===e.look?16:o,{shapeSvg:u,bbox:w}=await c(t,e,f(e)),p=(e?.width?e?.width/2:w.width/2)+(g??0),m=p-s,{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.Z.svg(u),l=(0,i._q)(e,{roughness:.2,strokeWidth:2.5}),r=(0,i._q)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*p,l),h=t.circle(0,0,2*m,r);(a=u.insert("g",":first-child")).attr("class",(0,n.R7)(e.cssClasses)).attr("style",(0,n.R7)(x)),a.node()?.appendChild(s),a.node()?.appendChild(h)}else{let t=(a=u.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",r),t.attr("class","outer-circle").attr("style",r).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",r).attr("r",m).attr("cx",0).attr("cy",0)}return y(e,a),e.intersect=function(t){return h.cM.info("DoubleCircle intersect",e,p,t),P.circle(e,p,t)},u}function ts(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.label="",e.labelStyle=l;let n=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=d.Z.svg(n),{nodeBorder:c}=a,g=(0,i._q)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let u=o.circle(0,0,14,g),w=n.insert(()=>u,":first-child");return w.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",s),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),y(e,w),e.intersect=function(t){return h.cM.info("filledCircle intersect",e,{radius:7,point:t}),P.circle(e,7,t)},n}async function th(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?2*r:r;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-n-n/2,e.width<10&&(e.width=10));let{shapeSvg:s,bbox:o,label:g}=await c(t,e,f(e)),w=(e?.width?e?.width:o.width)+(n??0),p=e?.height?e?.height:w+o.height,m=[{x:0,y:-p},{x:p,y:-p},{x:p/2,y:0}],{cssStyles:x}=e,$=d.Z.svg(s),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=u(m),M=$.path(k,b),S=s.insert(()=>M,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),e.width=w,e.height=p,y(e,S),g.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-p/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return h.cM.info("Triangle intersect",e,m,t),P.polygon(e,m,t)},s}function to(t,e,{dir:a,config:{state:l,themeVariables:r}}){let{nodeStyles:n}=(0,i.UG)(e);e.label="";let s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,o=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===a&&(o=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));let g=-1*o/2,u=-1*c/2,w=d.Z.svg(s),p=(0,i._q)(e,{stroke:r.lineColor,fill:r.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let m=w.rectangle(g,u,o,c,p),x=s.insert(()=>m,":first-child");h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),y(e,x);let $=l?.padding??0;return e.width&&e.height&&(e.width+=$/2||0,e.height+=$/2||0),e.intersect=function(t){return P.rect(e,t)},s}async function td(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*n,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*r,e.width<15&&(e.width=15));let{shapeSvg:s,bbox:o}=await c(t,e,f(e)),g=(e?.width?e?.width:Math.max(15,o.width))+2*r,w=(e?.height?e?.height:Math.max(10,o.height))+2*n,m=w/2,{cssStyles:x}=e,$=d.Z.svg(s),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-g/2,y:-w/2},{x:g/2-m,y:-w/2},...p(-g/2+m,0,m,50,90,270),{x:g/2-m,y:w/2},{x:-g/2,y:w/2}],M=u(k),S=$.path(M,b),D=s.insert(()=>S,":first-child");return D.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),y(e,D),e.intersect=function(t){return h.cM.info("Pill intersect",e,{radius:m,point:t}),P.polygon(e,k,t)},s}(0,h.eW)(ta,"cylinder"),(0,h.eW)(tl,"drawRect"),(0,h.eW)(ti,"datastore"),(0,h.eW)(tr,"dividedRectangle"),(0,h.eW)(tn,"doublecircle"),(0,h.eW)(ts,"filledCircle"),(0,h.eW)(th,"flippedTriangle"),(0,h.eW)(to,"forkJoin"),(0,h.eW)(td,"halfRoundedRectangle");var tc=(0,h.eW)((t,e,a,l,i)=>`M${t+i},${e} L${t+a-i},${e} L${t+a},${e-l/2} L${t+a-i},${e-l} L${t+i},${e-l} L${t},${e-l/2} Z`,"createHexagonPathD");async function tg(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e),n="neo"===e.look?3.5:4;e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?70:s,o="neo"===e.look?32:s;if(e.width||e.height){let t=e.height??0;e.width=(e?.width??0)-t/n*2-o,e.height=(e.height??0)-h}let{shapeSvg:g,bbox:u}=await c(t,e,f(e)),w=(e?.height?e?.height:u.height)+h,p=w/n,m=(e?.width?e?.width:u.width)+2*p+o,x=[{x:p,y:0},{x:m-p,y:0},{x:m,y:-w/2},{x:m-p,y:-w},{x:p,y:-w},{x:0,y:-w/2}],{cssStyles:$}=e;if("handDrawn"===e.look){let t=d.Z.svg(g),l=(0,i._q)(e,{}),r=tc(0,0,m,w,p),n=t.path(r,l);a=g.insert(()=>n,":first-child").attr("transform",`translate(${-m/2}, ${w/2})`),$&&a.attr("style",$)}else a=U(g,m,w,x);return r&&a.attr("style",r),e.width=m,e.height=w,y(e,a),e.intersect=function(t){return P.polygon(e,x,t)},g}async function ty(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.label="",e.labelStyle=a;let{shapeSvg:r}=await c(t,e,f(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,g=d.Z.svg(r),w=(0,i._q)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let p=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],m=u(p),x=g.path(m,w),$=r.insert(()=>x,":first-child");return $.attr("class","basic label-container outer-path"),o&&"handDrawn"!==e.look&&$.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&$.selectChildren("path").attr("style",l),$.attr("transform",`translate(${-n/2}, ${-s/2})`),y(e,$),e.intersect=function(t){return h.cM.info("Pill intersect",e,{points:p}),P.polygon(e,p,t)},r}async function tf(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,label:u}=await c(t,e,"icon-shape default"),w="t"===e.pos,{nodeBorder:p}=a,{stylesMap:m}=(0,i.dT)(e),x=-s/2,$=-s/2,b=e.label?8:0,k=d.Z.svg(g),M=(0,i._q)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle(x,$,s,s,M),D=Math.max(s,f.width),W=s+f.height+b,v=k.rectangle(-D/2,-W/2,D,W,{...M,fill:"transparent",stroke:"none"}),N=g.insert(()=>S,":first-child"),B=g.insert(()=>v);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,r.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${w?f.height/2+b/2-i/2-h:-f.height/2-b/2-i/2-h})`),t.attr("style",`color: ${m.get("stroke")??p};`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${w?-W/2:W/2-f.height})`),N.attr("transform",`translate(0,${w?f.height/2+b/2:-f.height/2-b/2})`),y(e,B),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return r=w?[{x:a-f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2+f.height+b},{x:a+s/2,y:l-i/2+f.height+b},{x:a+s/2,y:l+i/2},{x:a-s/2,y:l+i/2},{x:a-s/2,y:l-i/2+f.height+b},{x:a-f.width/2,y:l-i/2+f.height+b}]:[{x:a-s/2,y:l-i/2},{x:a+s/2,y:l-i/2},{x:a+s/2,y:l-i/2+s},{x:a+f.width/2,y:l-i/2+s},{x:a+f.width/2/2,y:l+i/2},{x:a-f.width/2,y:l+i/2},{x:a-f.width/2,y:l-i/2+s},{x:a-s/2,y:l-i/2+s}],P.polygon(e,r,t)},g}async function tu(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,label:u}=await c(t,e,"icon-shape default"),w=e.label?8:0,p="t"===e.pos,{nodeBorder:m,mainBkg:x}=a,{stylesMap:$}=(0,i.dT)(e),b=d.Z.svg(g),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$.get("fill");k.stroke=M??x;let S=g.append("g");e.icon&&S.html(`<g>${await (0,r.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let D=S.node().getBBox(),W=D.width,v=D.height,N=D.x,B=D.y,C=Math.max(W,v)*Math.SQRT2+40,A=b.circle(0,0,C,k),_=Math.max(C,f.width),q=C+f.height+w,R=b.rectangle(-_/2,-q/2,_,q,{...k,fill:"transparent",stroke:"none"}),I=g.insert(()=>A,":first-child"),L=g.insert(()=>R);return S.attr("transform",`translate(${-W/2-N},${p?f.height/2+w/2-v/2-B:-f.height/2-w/2-v/2-B})`),S.attr("style",`color: ${$.get("stroke")??m};`),u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-q/2:q/2-f.height})`),I.attr("transform",`translate(0,${p?f.height/2+w/2:-f.height/2-w/2})`),y(e,L),e.intersect=function(t){return h.cM.info("iconSquare intersect",e,t),P.rect(e,t)},g}async function tw(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,halfPadding:u,label:w}=await c(t,e,"icon-shape default"),p="t"===e.pos,m=s+2*u,x=s+2*u,{nodeBorder:$,mainBkg:k}=a,{stylesMap:M}=(0,i.dT)(e),S=e.label?8:0,D=d.Z.svg(g),W=(0,i._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=M.get("fill");W.stroke=v??k;let N=D.path(b(-x/2,-m/2,x,m,5),W),B=Math.max(x,f.width),C=m+f.height+S,A=D.rectangle(-B/2,-C/2,B,C,{...W,fill:"transparent",stroke:"none"}),_=g.insert(()=>N,":first-child").attr("class","icon-shape2"),q=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,r.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${p?f.height/2+S/2-i/2-h:-f.height/2-S/2-i/2-h})`),t.attr("style",`color: ${M.get("stroke")??$};`)}return w.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-C/2:C/2-f.height})`),_.attr("transform",`translate(0,${p?f.height/2+S/2:-f.height/2-S/2})`),y(e,q),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return r=p?[{x:a-f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2+f.height+S},{x:a+x/2,y:l-i/2+f.height+S},{x:a+x/2,y:l+i/2},{x:a-x/2,y:l+i/2},{x:a-x/2,y:l-i/2+f.height+S},{x:a-f.width/2,y:l-i/2+f.height+S}]:[{x:a-x/2,y:l-i/2},{x:a+x/2,y:l-i/2},{x:a+x/2,y:l-i/2+m},{x:a+f.width/2,y:l-i/2+m},{x:a+f.width/2/2,y:l+i/2},{x:a-f.width/2,y:l+i/2},{x:a-f.width/2,y:l-i/2+m},{x:a-x/2,y:l-i/2+m}],P.polygon(e,r,t)},g}async function tp(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,halfPadding:u,label:w}=await c(t,e,"icon-shape default"),p="t"===e.pos,m=s+2*u,x=s+2*u,{nodeBorder:$,mainBkg:k}=a,{stylesMap:M}=(0,i.dT)(e),S=e.label?8:0,D=d.Z.svg(g),W=(0,i._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=M.get("fill");W.stroke=v??k;let N=D.path(b(-x/2,-m/2,x,m,.1),W),B=Math.max(x,f.width),C=m+f.height+S,A=D.rectangle(-B/2,-C/2,B,C,{...W,fill:"transparent",stroke:"none"}),_=g.insert(()=>N,":first-child"),q=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,r.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${p?f.height/2+S/2-i/2-h:-f.height/2-S/2-i/2-h})`),t.attr("style",`color: ${M.get("stroke")??$};`)}return w.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-C/2:C/2-f.height})`),_.attr("transform",`translate(0,${p?f.height/2+S/2:-f.height/2-S/2})`),y(e,q),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return r=p?[{x:a-f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2+f.height+S},{x:a+x/2,y:l-i/2+f.height+S},{x:a+x/2,y:l+i/2},{x:a-x/2,y:l+i/2},{x:a-x/2,y:l-i/2+f.height+S},{x:a-f.width/2,y:l-i/2+f.height+S}]:[{x:a-x/2,y:l-i/2},{x:a+x/2,y:l-i/2},{x:a+x/2,y:l-i/2+m},{x:a+f.width/2,y:l-i/2+m},{x:a+f.width/2/2,y:l+i/2},{x:a-f.width/2,y:l+i/2},{x:a-f.width/2,y:l-i/2+m},{x:a-x/2,y:l-i/2+m}],P.polygon(e,r,t)},g}async function tm(t,e,{config:{flowchart:a}}){let l=new Image;l.src=e?.img??"",await l.decode();let r=Number(l.naturalWidth.toString().replace("px","")),n=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=r/n;let{labelStyles:s}=(0,i.UG)(e);e.labelStyle=s;let o=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let g=Math.max(e.label?o??0:0,e?.assetWidth??r),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:g,u="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(f,o??0);let{shapeSvg:w,bbox:p,label:m}=await c(t,e,"image-shape default"),x="t"===e.pos,$=-f/2,b=e.label?8:0,k=d.Z.svg(w),M=(0,i._q)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle($,-u/2,f,u,M),D=Math.max(f,p.width),W=u+p.height+b,v=k.rectangle(-D/2,-W/2,D,W,{...M,fill:"none",stroke:"none"}),N=w.insert(()=>S,":first-child"),B=w.insert(()=>v);if(e.img){let t=w.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",u),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${x?W/2-u:-W/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-u/2-p.height/2-b/2:u/2-p.height/2+b/2})`),N.attr("transform",`translate(0,${x?p.height/2+b/2:-p.height/2-b/2})`),y(e,B),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return r=x?[{x:a-p.width/2,y:l-i/2},{x:a+p.width/2,y:l-i/2},{x:a+p.width/2,y:l-i/2+p.height+b},{x:a+f/2,y:l-i/2+p.height+b},{x:a+f/2,y:l+i/2},{x:a-f/2,y:l+i/2},{x:a-f/2,y:l-i/2+p.height+b},{x:a-p.width/2,y:l-i/2+p.height+b}]:[{x:a-f/2,y:l-i/2},{x:a+f/2,y:l-i/2},{x:a+f/2,y:l-i/2+u},{x:a+p.width/2,y:l-i/2+u},{x:a+p.width/2/2,y:l+i/2},{x:a-p.width/2,y:l+i/2},{x:a-p.width/2,y:l-i/2+u},{x:a-f/2,y:l-i/2+u}],P.polygon(e,r,t)},w}async function tx(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+(s??0)*2,e?.width??0),w=Math.max(o.height+(n??0)*2,e?.height??0),p=[{x:0,y:0},{x:g,y:0},{x:g+3*w/6,y:-w},{x:-3*w/6,y:-w}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(h),l=(0,i._q)(e,{}),r=u(p),n=t.path(r,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-g/2}, ${w/2})`),m&&a.attr("style",m)}else a=U(h,g,w,p);return r&&a.attr("style",r),e.width=g,e.height=w,y(e,a),e.intersect=function(t){return P.polygon(e,p,t)},h}async function t$(t,e){let{shapeSvg:a,bbox:l,label:i}=await c(t,e,"label"),r=a.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),y(e,r),e.intersect=function(t){return P.rect(e,t)},a}async function tb(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.height??o.height)+n,w=(e?.width??o.width)+s,p=[{x:0,y:0},{x:w+3*g/6,y:0},{x:w,y:-g},{x:-(3*g)/6,y:-g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(h),l=(0,i._q)(e,{}),r=u(p),n=t.path(r,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${g/2})`),m&&a.attr("style",m)}else a=U(h,w,g,p);return r&&a.attr("style",r),e.width=w,e.height=g,y(e,a),e.intersect=function(t){return P.polygon(e,p,t)},h}async function tk(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.height??o.height)+n,w=(e?.width??o.width)+s,p=[{x:-3*g/6,y:0},{x:w,y:0},{x:w+3*g/6,y:-g},{x:0,y:-g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(h),l=(0,i._q)(e,{}),r=u(p),n=t.path(r,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${g/2})`),m&&a.attr("style",m)}else a=U(h,w,g,p);return r&&a.attr("style",r),e.width=w,e.height=g,y(e,a),e.intersect=function(t){return P.polygon(e,p,t)},h}function tM(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.label="",e.labelStyle=a;let r=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),c=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],g=d.Z.svg(r),w=(0,i._q)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let p=u(c),m=g.path(p,w),x=r.insert(()=>m,":first-child");return x.attr("class","outer-path"),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),x.attr("transform",`translate(-${s/2},${-o})`),y(e,x),e.intersect=function(t){return h.cM.info("lightningBolt intersect",e,t),P.polygon(e,c,t)},r}(0,h.eW)(tg,"hexagon"),(0,h.eW)(ty,"hourglass"),(0,h.eW)(tf,"icon"),(0,h.eW)(tu,"iconCircle"),(0,h.eW)(tw,"iconRounded"),(0,h.eW)(tp,"iconSquare"),(0,h.eW)(tm,"imageSquare"),(0,h.eW)(tx,"inv_trapezoid"),(0,h.eW)(t$,"labelRect"),(0,h.eW)(tb,"lean_left"),(0,h.eW)(tk,"lean_right"),(0,h.eW)(tM,"lightningBolt");var tS=(0,h.eW)((t,e,a,l,i,r,n)=>`M${t},${e+r} a${i},${r} 0,0,0 ${a},0 a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l} M${t},${e+r+n} a${i},${r} 0,0,0 ${a},0`,"createCylinderPathD"),tD=(0,h.eW)((t,e,a,l,i,r,n)=>`M${t},${e+r} M${t+a},${e+r} a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l} M${t},${e+r+n} a${i},${r} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tW=(0,h.eW)((t,e,a,l,i,r)=>`M${t-a/2},${-l/2} a${i},${r} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tv(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?16:s,o="neo"===e.look?24:s;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-h,e.width<10&&(e.width=10),e.height=(e.height??0)-o-t/2/(2.5+t/50)*3,e.height<10&&(e.height=10)}let{shapeSvg:g,bbox:u,label:w}=await c(t,e,f(e)),p=(e?.width?e?.width:u.width)+2*h,m=p/2,x=m/(2.5+p/50),$=(e?.height?e?.height:u.height)+x+2*o,b=.1*$,{cssStyles:k}=e;if("handDrawn"===e.look){let t=d.Z.svg(g),l=tD(0,0,p,$,m,x,b),r=tW(0,x,p,$,m,x),n=(0,i._q)(e,{}),s=t.path(l,n),h=t.path(r,n);g.insert(()=>h,":first-child").attr("class","line"),(a=g.insert(()=>s,":first-child")).attr("class","basic label-container"),k&&a.attr("style",k)}else{let t=tS(0,0,p,$,m,x,b);a=g.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,n.R7)(k)).attr("style",r)}return a.attr("label-offset-y",x),a.attr("transform",`translate(${-p/2}, ${-($/2+x)})`),y(e,a),w.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+x-(u.y-(u.top??0))})`),e.intersect=function(t){let a=P.rect(e,t),l=a.x-(e.x??0);if(0!=m&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-x)){let i=x*x*(1-l*l/(m*m));i>0&&(i=Math.sqrt(i)),i=x-i,t.y-(e.y??0)>0&&(i=-i),a.y+=i}return a},g}async function tN(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;if(e.width||e.height){let t=e.width;e.width=(t??0)*10/11-2*n,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}let{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),u=(e?.width?e?.width:o.width)+(n??0)*2,p=(e?.height?e?.height:o.height)+(s??0)*2,m="neo"===e.look?p/4:p/8,x=p+m,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-u/2-u/2*.1,y:-x/2},{x:-u/2-u/2*.1,y:x/2},...w(-u/2-u/2*.1,x/2,u/2+u/2*.1,x/2,m,.8),{x:u/2+u/2*.1,y:-x/2},{x:-u/2-u/2*.1,y:-x/2},{x:-u/2,y:-x/2},{x:-u/2,y:x/2*1.1},{x:-u/2,y:-x/2}],S=b.polygon(M.map(t=>[t.x,t.y]),k),D=h.insert(()=>S,":first-child");return D.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(0,${-m/2})`),g.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*.1/2-(o.x-(o.left??0))},${-p/2+(e.padding??0)-m/2-(o.y-(o.top??0))})`),y(e,D),e.intersect=function(t){return P.polygon(e,M,t)},h}async function tB(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,h="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n-2*h,10),e.height=Math.max((e?.height??0)-2*s-2*h,10));let{shapeSvg:o,bbox:g,label:w}=await c(t,e,f(e)),p=(e?.width?e?.width:g.width)+2*n+2*h,x=(e?.height?e?.height:g.height)+2*s+2*h,$=p-2*h,b=x-2*h,k=-$/2,M=-b/2,{cssStyles:S}=e,D=d.Z.svg(o),W=(0,i._q)(e,{}),v=[{x:k-h,y:M+h},{x:k-h,y:M+b+h},{x:k+$-h,y:M+b+h},{x:k+$-h,y:M+b},{x:k+$,y:M+b},{x:k+$,y:M+b-h},{x:k+$+h,y:M+b-h},{x:k+$+h,y:M-h},{x:k+h,y:M-h},{x:k+h,y:M},{x:k,y:M},{x:k,y:M+h}];"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let N=u(v),B=D.path(N,W),C=u([{x:k,y:M+h},{x:k+$-h,y:M+h},{x:k+$-h,y:M+b},{x:k+$,y:M+b},{x:k+$,y:M},{x:k,y:M}]),A=D.path(C,W);"handDrawn"!==e.look&&(B=m(B),A=m(A));let _=o.insert("g",":first-child");return _.insert(()=>B),_.insert(()=>A),_.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",S),l&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",l),w.attr("transform",`translate(${-(g.width/2)-h-(g.x-(g.left??0))}, ${-(g.height/2)+h-(g.y-(g.top??0))})`),y(e,_),e.intersect=function(t){return P.polygon(e,v,t)},o}async function tC(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h=e.padding??0,o="neo"===e.look?16:h,g="neo"===e.look?12:h,p=!0;(e.width||e.height)&&(p=!1,e.width=(e?.width??0)-2*o,e.height=(e?.height??0)-3*g);let m=Math.max(n.width,e?.width??0)+2*o,x=Math.max(n.height,e?.height??0)+3*g,$="neo"===e.look?x/4:x/8,b=x+(p?$/2:-$/2),k=-m/2,M=-b/2,{cssStyles:S}=e,D=w(k-10,M+b+10,k+m-10,M+b+10,$,.8),W=D?.[D.length-1],v=[{x:k-10,y:M+10},{x:k-10,y:M+b+10},...D,{x:k+m-10,y:W.y-10},{x:k+m,y:W.y-10},{x:k+m,y:W.y-20},{x:k+m+10,y:W.y-20},{x:k+m+10,y:M-10},{x:k+10,y:M-10},{x:k+10,y:M},{x:k,y:M},{x:k,y:M+10}],N=[{x:k,y:M+10},{x:k+m-10,y:M+10},{x:k+m-10,y:W.y-10},{x:k+m,y:W.y-10},{x:k+m,y:M},{x:k,y:M}],B=d.Z.svg(r),C=(0,i._q)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let A=u(v),_=B.path(A,C),q=u(N),R=B.path(q,C),I=r.insert(()=>_,":first-child");return I.insert(()=>R),I.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",S),l&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",l),I.attr("transform",`translate(0,${-$/2})`),s.attr("transform",`translate(${-(n.width/2)-10-(n.x-(n.left??0))}, ${-(n.height/2)+10-$/2-(n.y-(n.top??0))})`),y(e,I),e.intersect=function(t){return P.polygon(e,v,t)},r}async function tA(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l,e.useHtmlLabels||(0,s._X)((0,s.iE)())||(e.centerLabel=!0);let{shapeSvg:n,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0)*2,e?.width??0),u=Math.max(h.height+(e.padding??0)*2,e?.height??0),{cssStyles:w}=e,p=d.Z.svg(n),m=(0,i._q)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let x=p.rectangle(-g/2,-u/2,g,u,m),$=n.insert(()=>x,":first-child");return $.attr("class","basic label-container outer-path"),o.attr("class","label noteLabel"),w&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",w),r&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",r),o.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,$),e.intersect=function(t){return P.rect(e,t)},n}(0,h.eW)(tv,"linedCylinder"),(0,h.eW)(tN,"linedWaveEdgedRect"),(0,h.eW)(tB,"multiRect"),(0,h.eW)(tC,"multiWaveEdgedRectangle"),(0,h.eW)(tA,"note");var t_=(0,h.eW)((t,e,a)=>`M${t+a/2},${e} L${t+a},${e-a/2} L${t+a/2},${e-a} L${t},${e-a/2} Z`,"createDecisionBoxPathD");async function tq(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+(e.padding??0)+(s.height+(e.padding??0)),o=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}],{cssStyles:g}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,i._q)(e,{}),r=t_(0,0,h),s=t.path(r,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2+.5}, ${h/2})`),g&&a.attr("style",g)}else(a=U(n,h,h,o)).attr("transform",`translate(${-h/2+.5}, ${h/2})`);return r&&a.attr("style",r),y(e,a),e.calcIntersect=function(t,e){let a=t.width,l=P.polygon(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e);return{x:l.x-.5,y:l.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function tR(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?21:r??0,s="neo"===e.look?12:r??0,{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),w=(e?.width??o.width)+("neo"===e.look?2*n:n),p=(e?.height??o.height)+("neo"===e.look?2*s:s),m=-w/2,x=-p/2,$=x/2,b=[{x:m+$,y:x},{x:m,y:0},{x:m+$,y:-x},{x:-m,y:-x},{x:-m,y:x}],{cssStyles:k}=e,M=d.Z.svg(h),S=(0,i._q)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let D=u(b),W=M.path(D,S),v=h.insert(()=>W,":first-child");return v.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",k),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${-$/2},0)`),g.attr("transform",`translate(${-$/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),y(e,v),e.intersect=function(t){return P.polygon(e,b,t)},h}async function tP(t,e){let a,l,r;let{labelStyles:n,nodeStyles:c}=(0,i.UG)(e);e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";let g=t.insert("g").attr("class",a).attr("id",e.domId||e.id),f=g.insert("g"),u=g.insert("g").attr("class","label").attr("style",c),w=e.description,p=e.label,m=await $(u,p,e.labelStyle,!0,!0),x={width:0,height:0};if((0,s._X)((0,s.nV)())){let t=m.children[0],e=(0,o.Ys)(m);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}h.cM.info("Text 2",w);let k=w||[],M=m.getBBox(),S=await $(u,Array.isArray(k)?k.join("<br/>"):k,e.labelStyle,!0,!0),D=S.children[0],W=(0,o.Ys)(S);x=D.getBoundingClientRect(),W.attr("width",x.width),W.attr("height",x.height);let v=(e.padding||0)/2;(0,o.Ys)(S).attr("transform","translate( "+(x.width>M.width?0:(M.width-x.width)/2)+", "+(M.height+v+5)+")"),(0,o.Ys)(m).attr("transform","translate( "+(x.width<M.width?0:-(M.width-x.width)/2)+", 0)"),x=u.node().getBBox(),u.attr("transform","translate("+-x.width/2+", "+(-x.height/2-v+3)+")");let N=x.width+(e.padding||0),B=x.height+(e.padding||0),C=-x.width/2-v,A=-x.height/2-v;if("handDrawn"===e.look){let t=d.Z.svg(g),a=(0,i._q)(e,{}),n=t.path(b(C,A,N,B,e.rx||0),a),s=t.line(-x.width/2-v,-x.height/2-v+M.height+v,x.width/2+v,-x.height/2-v+M.height+v,a);r=g.insert(()=>(h.cM.debug("Rough node insert CXC",n),s),":first-child"),l=g.insert(()=>(h.cM.debug("Rough node insert CXC",n),n),":first-child")}else l=f.insert("rect",":first-child"),r=f.insert("line"),l.attr("class","outer title-state").attr("style",c).attr("x",-x.width/2-v).attr("y",-x.height/2-v).attr("width",x.width+(e.padding||0)).attr("height",x.height+(e.padding||0)),r.attr("class","divider").attr("x1",-x.width/2-v).attr("x2",x.width/2+v).attr("y1",-x.height/2-v+M.height+v).attr("y2",-x.height/2-v+M.height+v);return y(e,l),e.intersect=function(t){return P.rect(e,t)},g}async function tI(t,e,{config:{themeVariables:a}}){let l=a?.radius??5,i={rx:l,ry:l,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return tl(t,e,i)}async function tL(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0,{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),u=(e?.width??o.width)+2*r+("neo"===e.look?8:16),w=(e?.height??o.height)+2*s,p=u-8,m=8-u/2,x=-w/2,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=b.polygon([{x:m,y:x},{x:m+p,y:x},{x:m+p,y:x+w},{x:m-8,y:x+w},{x:m-8,y:x},{x:m,y:x},{x:m,y:x+w}].map(t=>[t.x,t.y]),k),S=h.insert(()=>M,":first-child");return S.attr("class","basic label-container outer-path").attr("style",(0,n.R7)($)),l&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),$&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),g.attr("transform",`translate(${4-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),y(e,S),e.intersect=function(t){return P.rect(e,t)},h}async function tZ(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));let{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),w=(e?.width?e?.width:o.width)+2*n,p=((e?.height?e?.height:o.height)+2*s)*1.5/1.5,m=-w/2,x=-p/2,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:m,y:x},{x:m,y:x+p},{x:m+w,y:x+p},{x:m+w,y:x-p/2}],S=u(M),D=b.path(S,k),W=h.insert(()=>D,":first-child");return W.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&W.selectChildren("path").attr("style",$),l&&"handDrawn"!==e.look&&W.selectChildren("path").attr("style",l),W.attr("transform",`translate(0, ${p/4})`),g.attr("transform",`translate(${-w/2+(e.padding??0)-(o.x-(o.left??0))}, ${-p/4+(e.padding??0)-(o.y-(o.top??0))})`),y(e,W),e.intersect=function(t){return P.polygon(e,M,t)},h}async function tG(t,e){let a=e.padding??0,l="neo"===e.look?16:2*a,i="neo"===e.look?12:a,r={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??l,labelPaddingY:i};return tl(t,e,r)}async function tU(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?20:r,s="neo"===e.look?12:r,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=o.height+("neo"===e.look?2*s:s),w=o.width+g/4+("neo"===e.look?2*n:n),m=g/2,{cssStyles:x}=e,$=d.Z.svg(h),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-w/2+m,y:-g/2},{x:w/2-m,y:-g/2},...p(-w/2+m,0,m,50,90,270),{x:w/2-m,y:g/2},...p(w/2-m,0,m,50,270,450)],M=u(k),S=$.path(M,b),D=h.insert(()=>S,":first-child");return D.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),y(e,D),e.intersect=function(t){return P.polygon(e,k,t)},h}async function tT(t,e){let a={rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"};return tl(t,e,a)}function tE(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:h,nodeBorder:o,nodeShadow:c}=a;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let g=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),f=d.Z.svg(g),u=(0,i._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let w=f.circle(0,0,e.width,{...u,stroke:s,strokeWidth:2}),p=h??o,m=(e.width??0)*5/14,x=f.circle(0,0,m,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),$=g.insert(()=>w,":first-child");if($.insert(()=>x),"handDrawn"!==e.look&&$.attr("class","outer-path"),n&&$.selectAll("path").attr("style",n),r&&$.selectAll("path").attr("style",r),e.width<25&&c&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";$.attr("style",`filter:url(#${a})`)}return y(e,$),e.intersect=function(t){return P.circle(e,(e.width??0)/2,t)},g}function tH(t,e,{config:{themeVariables:a}}){let l;let{lineColor:r,nodeShadow:n}=a;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=d.Z.svg(s).circle(0,0,e.width,(0,i.TA)(r));(l=s.insert(()=>t)).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else(l=s.insert("circle",":first-child")).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&n&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";l.attr("style",`filter:url(#${a})`)}return y(e,l),e.intersect=function(t){return P.circle(e,(e.width??7)/2,t)},s}async function tV(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e?.padding??8,s="neo"===e.look?28:r,h="neo"===e.look?12:r,{shapeSvg:o,bbox:g}=await c(t,e,f(e)),u=(e?.width??g.width)+16+s,w=(e?.height??g.height)+h,p=u-16,m=-u/2,x=-w/2,$=[{x:0,y:0},{x:p,y:0},{x:p,y:-w},{x:0,y:-w},{x:0,y:0},{x:-8,y:0},{x:p+8,y:0},{x:p+8,y:-w},{x:-8,y:-w},{x:-8,y:0}];if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,i._q)(e,{}),l=t.rectangle(m,x,p+16,w,a),r=t.line(m+8,x,m+8,x+w,a),s=t.line(m+8+p,x,m+8+p,x+w,a);o.insert(()=>r,":first-child"),o.insert(()=>s,":first-child");let h=o.insert(()=>l,":first-child"),{cssStyles:c}=e;h.attr("class","basic label-container").attr("style",(0,n.R7)(c)),y(e,h)}else{let t=U(o,p,w,$);l&&t.attr("style",l),y(e,t)}return e.intersect=function(t){return P.polygon(e,$,t)},o}async function tX(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*n-.2*(e.height+2*s),10));let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.height?e?.height:o.height)+2*s,w=.2*g,p=(e?.width?e?.width:o.width)+2*n+w-w,m=-p/2,x=-g/2,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{}),M=[{x:m-w/2,y:x},{x:m+p+w/2,y:x},{x:m+p+w/2,y:x+g},{x:m-w/2,y:x+g}];"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=u(M),D=b.path(S,k),W=u([{x:m+p-w/2,y:x+g},{x:m+p+w/2,y:x+g},{x:m+p+w/2,y:x+g-.2*g}]),v=b.path(W,{...k,fillStyle:"solid"}),N=h.insert(()=>v,":first-child");return N.insert(()=>D,":first-child"),N.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),y(e,N),e.intersect=function(t){return P.polygon(e,M,t)},h}async function tY(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/8,p=.2*h,m=.2*o,x=o+g,{cssStyles:$}=e,b=d.Z.svg(r),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-h/2*.1,y:x/2},...w(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,g,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],S=-h/2+h/2*.1,D=-x/2-.4*m,W=[{x:S+h-p,y:(D+o)*1.3},{x:S+h,y:D+o-m},{x:S+h,y:(D+o)*.9},...w(S+h,(D+o)*1.25,S+h-p,(D+o)*1.3,-(.02*o),.5)],v=u(M),N=b.path(v,k),B=u(W),C=b.path(B,{...k,fillStyle:"solid"}),A=r.insert(()=>C,":first-child");return A.insert(()=>N,":first-child"),A.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),A.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,A),e.intersect=function(t){return P.polygon(e,M,t)},r}async function tj(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0),e?.width||0),h=Math.max(n.height+(e.padding??0),e?.height||0),o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-h/2).attr("width",s).attr("height",h),y(e,o),e.intersect=function(t){return P.rect(e,t)},r}(0,h.eW)(tq,"question"),(0,h.eW)(tR,"rect_left_inv_arrow"),(0,h.eW)(tP,"rectWithTitle"),(0,h.eW)(tI,"roundedRect"),(0,h.eW)(tL,"shadedProcess"),(0,h.eW)(tZ,"slopedRect"),(0,h.eW)(tG,"squareRect"),(0,h.eW)(tU,"stadium"),(0,h.eW)(tT,"state"),(0,h.eW)(tE,"stateEnd"),(0,h.eW)(tH,"stateStart"),(0,h.eW)(tV,"subroutine"),(0,h.eW)(tX,"taggedRect"),(0,h.eW)(tY,"taggedWaveEdgedRectangle"),(0,h.eW)(tj,"text");var tO=(0,h.eW)((t,e,a,l,i,r)=>`M${t},${e}
|
|
3
3
|
a${i},${r} 0,0,1 0,${-l}
|
|
4
4
|
l${a},0
|