copilot-operator 0.1.53 → 0.1.55
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/README.md +6 -0
- package/dist/src/api/operator.controller.js +38 -0
- package/dist/src/api/operator.service.js +28 -4
- package/dist/src/orchestrator/hold.js +25 -0
- package/dist/src/orchestrator/leadLedger.js +88 -0
- package/dist/src/orchestrator/leadRunner.js +22 -0
- package/dist/src/orchestrator/taskRunner.js +10 -4
- package/dist/src/plan/kerrigan.js +2 -2
- package/dist/src/plan/systemGuide.js +157 -6
- package/dist/src/protocol/leadSchema.js +36 -2
- package/dist/src/session/store.js +3 -0
- package/dist/src/session/workspace.js +22 -0
- package/dist/src/session/workspaceSearch.js +162 -0
- package/dist/src/vcs/git.js +1 -1
- package/dist/web/404.html +2 -2
- package/dist/web/_next/static/chunks/1017.ce926873b598fb89.js +1 -0
- package/dist/web/_next/static/chunks/1077.3c07f38a61cef38a.js +1 -0
- package/dist/web/_next/static/chunks/12.06a7f14bd6716249.js +1 -0
- package/dist/web/_next/static/chunks/1350.a5dc706c8110fd34.js +24 -0
- package/dist/web/_next/static/chunks/1548.55dadf800d6c2a79.js +1 -0
- package/dist/web/_next/static/chunks/1706.db51b57351297898.js +309 -0
- package/dist/web/_next/static/chunks/1707.7d64ffc060c697a0.js +193 -0
- package/dist/web/_next/static/chunks/1880.87829ecb91209eda.js +24 -0
- package/dist/web/_next/static/chunks/20154aaa.28032c3aa5bcd84d.js +1 -0
- package/dist/web/_next/static/chunks/2037.d1bb5e37c7fe85ae.js +104 -0
- package/dist/web/_next/static/chunks/2163.83d1085b99ac1773.js +1 -0
- package/dist/web/_next/static/chunks/2398d077.79ae940919b9695e.js +1 -0
- package/dist/web/_next/static/chunks/2435.9b433b38d34b4b2e.js +1 -0
- package/dist/web/_next/static/chunks/2506.bc8515842e225d2a.js +1 -0
- package/dist/web/_next/static/chunks/2529.c88688b437d71d68.js +41 -0
- package/dist/web/_next/static/chunks/2908.4e0e875d2d471932.js +1 -0
- package/dist/web/_next/static/chunks/3117.a4e1c3348e8bead9.js +1 -0
- package/dist/web/_next/static/chunks/3131-8ec8b632ebf0450d.js +1 -0
- package/dist/web/_next/static/chunks/3134-b6a7bc1f267c39aa.js +1 -0
- package/dist/web/_next/static/chunks/3233.1dcc2798f7f5efa0.js +149 -0
- package/dist/web/_next/static/chunks/344.41cc997c8c8deeed.js +115 -0
- package/dist/web/_next/static/chunks/3690.f691d3fcbd70073d.js +1 -0
- package/dist/web/_next/static/chunks/3804.593b14643e74a2a1.js +1 -0
- package/dist/web/_next/static/chunks/3816.9f5568918e35e4ef.js +77 -0
- package/dist/web/_next/static/chunks/3859.f56f3c6ac4b74cf1.js +94 -0
- package/dist/web/_next/static/chunks/3976.11b159e82e0aa974.js +1 -0
- package/dist/web/_next/static/chunks/3986.d47ed4855773e6dd.js +1 -0
- package/dist/web/_next/static/chunks/441.172f3f581f0030d1.js +226 -0
- package/dist/web/_next/static/chunks/442.2e236a6c5c413bd9.js +1 -0
- package/dist/web/_next/static/chunks/4459.d6df347eb58fccd7.js +1 -0
- package/dist/web/_next/static/chunks/4619.ae3628373decf74f.js +34 -0
- package/dist/web/_next/static/chunks/4623.d5711a8d967e49f4.js +1 -0
- package/dist/web/_next/static/chunks/4670.6b811cc3f67a851c.js +62 -0
- package/dist/web/_next/static/chunks/4812.0af1380aa478f6d3.js +93 -0
- package/dist/web/_next/static/chunks/4969.4f7aff472cf938bf.js +1 -0
- package/dist/web/_next/static/chunks/5790.fe114d1a18741d62.js +86 -0
- package/dist/web/_next/static/chunks/603.4055460889ea24d8.js +1 -0
- package/dist/web/_next/static/chunks/6072.b4b359b24b1738d4.js +286 -0
- package/dist/web/_next/static/chunks/6230.8645bbed143793da.js +1 -0
- package/dist/web/_next/static/chunks/6260.6b5b5c9713d7133f.js +1 -0
- package/dist/web/_next/static/chunks/63b9f8e2.218fd437b256a7e4.js +1 -0
- package/dist/web/_next/static/chunks/6421.3ace3aefc3e7350e.js +1 -0
- package/dist/web/_next/static/chunks/6542.963ec591b5c2bc5a.js +1 -0
- package/dist/web/_next/static/chunks/6885.8fb8eeb9e792b515.js +1 -0
- package/dist/web/_next/static/chunks/6891.dd910309748ad46b.js +1 -0
- package/dist/web/_next/static/chunks/714.88c495053f62f187.js +1 -0
- package/dist/web/_next/static/chunks/7220.f1e8a10d52a7ee87.js +1 -0
- package/dist/web/_next/static/chunks/7307.39c27470a879fd0a.js +1 -0
- package/dist/web/_next/static/chunks/7333.04d0e45b223dadd4.js +32 -0
- package/dist/web/_next/static/chunks/7489.395193bf37b80884.js +1 -0
- package/dist/web/_next/static/chunks/7496.17282033df0e8794.js +148 -0
- package/dist/web/_next/static/chunks/7500-1353339f7e2eda10.js +1 -0
- package/dist/web/_next/static/chunks/7507.9fd648884587a7f3.js +287 -0
- package/dist/web/_next/static/chunks/76.f9c2aea58a61692f.js +1 -0
- package/dist/web/_next/static/chunks/7664.bd6265e6e94e1ecd.js +79 -0
- package/dist/web/_next/static/chunks/7872.9b08a88b7289949f.js +64 -0
- package/dist/web/_next/static/chunks/7921-56de379f7bdfbacf.js +1 -0
- package/dist/web/_next/static/chunks/795.710d39b80c9ae80c.js +1 -0
- package/dist/web/_next/static/chunks/8173.b82aa1855e641605.js +1 -0
- package/dist/web/_next/static/chunks/8216.b248ebe0af447347.js +8 -0
- package/dist/web/_next/static/chunks/82d3f3cb.23be11b749288234.js +62 -0
- package/dist/web/_next/static/chunks/8381.2d6783c030f8a913.js +27 -0
- package/dist/web/_next/static/chunks/85120a0e.ac16dccf0b8d73d3.js +66 -0
- package/dist/web/_next/static/chunks/8547.0a9997b67008c706.js +1 -0
- package/dist/web/_next/static/chunks/8584.b34930a6837344a6.js +1 -0
- package/dist/web/_next/static/chunks/8662.f2663643214caed1.js +38 -0
- package/dist/web/_next/static/chunks/8689.e564346c6e0d16be.js +1 -0
- package/dist/web/_next/static/chunks/9067.5651e8647cef053f.js +1 -0
- package/dist/web/_next/static/chunks/9125.8589db5ba200cbf1.js +1 -0
- package/dist/web/_next/static/chunks/9202.8dcf7e6a85cc3d36.js +1 -0
- package/dist/web/_next/static/chunks/9249.916a423ac8a07e76.js +1 -0
- package/dist/web/_next/static/chunks/9313.e4f6405d96375c40.js +92 -0
- package/dist/web/_next/static/chunks/937.6d8406b06135134f.js +1 -0
- package/dist/web/_next/static/chunks/9418.1e8f8e14bb5fe3ae.js +217 -0
- package/dist/web/_next/static/chunks/9591.fabd60bd0d10341c.js +1 -0
- package/dist/web/_next/static/chunks/972.db753db904050e48.js +23 -0
- package/dist/web/_next/static/chunks/9747.ad6b319cf12169ee.js +1 -0
- package/dist/web/_next/static/chunks/9763.da9015d4a1b533b9.js +36 -0
- package/dist/web/_next/static/chunks/9884.8712c5ed7b044ff2.js +1 -0
- package/dist/web/_next/static/chunks/9891.91a2c59fd073fd48.js +74 -0
- package/dist/web/_next/static/chunks/9984.cdabea5a592e42a1.js +1 -0
- package/dist/web/_next/static/chunks/a9ddb983.8bbb677720017a57.js +122 -0
- package/dist/web/_next/static/chunks/app/_not-found/page-1264c0db9665169c.js +1 -0
- package/dist/web/_next/static/chunks/app/defaults/page-ba24062a86d50e12.js +1 -0
- package/dist/web/_next/static/chunks/app/layout-46efb208d7c88648.js +1 -0
- package/dist/web/_next/static/chunks/app/page-07f80fd07281a230.js +1 -0
- package/dist/web/_next/static/chunks/app/system/page-825f53f14d16033d.js +1 -0
- package/dist/web/_next/static/chunks/c7879cf7-fabe25011515220e.js +1 -0
- package/dist/web/_next/static/chunks/c7ea4e13.9b71b5f026a1d6d4.js +1 -0
- package/dist/web/_next/static/chunks/f99cb6a2.3f570aeba3860608.js +160 -0
- package/dist/web/_next/static/chunks/framework-a8bf4d38dd23845f.js +1 -0
- package/dist/web/_next/static/chunks/main-app-f747f0f5ddb4213b.js +1 -0
- package/dist/web/_next/static/chunks/main-d3bbfb91b54fbcc3.js +1 -0
- package/dist/web/_next/static/chunks/pages/_app-5b348989bba3d570.js +1 -0
- package/dist/web/_next/static/chunks/pages/_error-cf88c6d2cc5868d7.js +1 -0
- package/dist/web/_next/static/chunks/webpack-ab0451ef95a8f52a.js +1 -0
- package/dist/web/_next/static/css/{06f314fa5fccd68d.css → 131c746a9d388eda.css} +1 -1
- package/dist/web/_next/static/{FGzV3mVZpXRCVjiw1diNu → w1xPyNasTvFr11R3F7HkS}/_buildManifest.js +1 -1
- package/dist/web/defaults.html +2 -2
- package/dist/web/defaults.txt +16 -16
- package/dist/web/index.html +3 -2
- package/dist/web/index.txt +16 -16
- package/dist/web/system.html +2 -2
- package/dist/web/system.txt +16 -16
- package/package.json +6 -2
- package/prompts/lead1.md +29 -5
- package/dist/web/_next/static/chunks/12.f1f4d35b52633e8d.js +0 -1
- package/dist/web/_next/static/chunks/131-bae98f790a541679.js +0 -1
- package/dist/web/_next/static/chunks/134-ddd50a7fbb536ec8.js +0 -1
- package/dist/web/_next/static/chunks/163.980c5145848efbdf.js +0 -1
- package/dist/web/_next/static/chunks/220.447d1d8624d4644c.js +0 -1
- package/dist/web/_next/static/chunks/489.158bbe303a595fba.js +0 -1
- package/dist/web/_next/static/chunks/500-34d01f8d8d73eb2c.js +0 -1
- package/dist/web/_next/static/chunks/548.c6dfd1cb270f3c93.js +0 -1
- package/dist/web/_next/static/chunks/584.fc9e061dd4069406.js +0 -1
- package/dist/web/_next/static/chunks/67.1a3ca07919abce27.js +0 -1
- package/dist/web/_next/static/chunks/714.5b2e291a430adc9c.js +0 -1
- package/dist/web/_next/static/chunks/747.157732b5b3f3c435.js +0 -1
- package/dist/web/_next/static/chunks/77.d478a6f2eafe31e3.js +0 -1
- package/dist/web/_next/static/chunks/921-b2219533c5a6e38f.js +0 -1
- package/dist/web/_next/static/chunks/app/_not-found/page-0d0d8e7e62efca12.js +0 -1
- package/dist/web/_next/static/chunks/app/defaults/page-b7e4e94a55e65806.js +0 -1
- package/dist/web/_next/static/chunks/app/layout-2b3718748721c1ac.js +0 -1
- package/dist/web/_next/static/chunks/app/page-59b9867b52914a6c.js +0 -1
- package/dist/web/_next/static/chunks/app/system/page-1cf9e75e76da59ed.js +0 -1
- package/dist/web/_next/static/chunks/c7879cf7-b5ab1053c1d9a2e7.js +0 -1
- package/dist/web/_next/static/chunks/framework-9ac6a346bd42cedd.js +0 -1
- package/dist/web/_next/static/chunks/main-6be4444e2d667e41.js +0 -1
- package/dist/web/_next/static/chunks/main-app-e3a5f713ba31557e.js +0 -1
- package/dist/web/_next/static/chunks/pages/_app-32d20d5a04949d29.js +0 -1
- package/dist/web/_next/static/chunks/pages/_error-abbab53f25ea29b0.js +0 -1
- package/dist/web/_next/static/chunks/webpack-0c3cad1f3181d857.js +0 -1
- /package/dist/web/_next/static/{FGzV3mVZpXRCVjiw1diNu → w1xPyNasTvFr11R3F7HkS}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7921],{8205:(e,t,o)=>{o.d(t,{LanguageProvider:()=>c,W3:()=>m,Ym:()=>p,kj:()=>w});var a=o(73365),n=o(1521),s=o(39051),i=o(99755);let r={en:()=>Promise.resolve().then(o.bind(o,39051)).then(e=>e.en),bg:()=>o.e(9747).then(o.bind(o,69747)).then(e=>e.bg),de:()=>o.e(2163).then(o.bind(o,92163)).then(e=>e.de),es:()=>o.e(1548).then(o.bind(o,11548)).then(e=>e.es),fr:()=>o.e(8584).then(o.bind(o,88584)).then(e=>e.fr),pt:()=>o.e(7220).then(o.bind(o,57220)).then(e=>e.pt),ja:()=>o.e(1077).then(o.bind(o,11077)).then(e=>e.ja),ko:()=>o.e(714).then(o.bind(o,50714)).then(e=>e.ko),ar:()=>o.e(9067).then(o.bind(o,89067)).then(e=>e.ar)},h="cop.locale",l=s.en,d=(0,n.createContext)({locale:"en",setLocale:()=>void 0,table:l});function c(e){let{children:t}=e,[o,s]=(0,n.useState)("en"),[c,w]=(0,n.useState)(l),p=(0,n.useRef)({en:l}),m=(0,n.useRef)("en"),u=(0,n.useCallback)(async e=>{var t,o,a;m.current=e;let n=p.current[e];if(!n)try{n=await (null!=(t=r[e])?t:r.en)(),p.current[e]=n}catch(e){return}m.current===e&&(w(n),s(e),document.documentElement.lang=e,document.documentElement.dir=null!=(a=null==(o=(0,i.eX)(e))?void 0:o.dir)?a:"ltr")},[]);return(0,n.useEffect)(()=>{var e,t,o;let a="en";try{let o=window.localStorage.getItem(h);a=null!=(t=null!=(e=(0,i.Od)(o))?e:(0,i.Od)(navigator.language))?t:"en"}catch(e){a=null!=(o=(0,i.Od)(navigator.language))?o:"en"}u(a)},[u]),(0,a.jsx)(d.Provider,{value:{locale:o,setLocale:e=>{try{window.localStorage.setItem(h,e)}catch(e){}u(e)},table:c},children:t})}function w(){let{locale:e,table:t}=(0,n.useContext)(d);return{t:function(e){var o,a;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null!=(a=null!=(o=t[e])?o:l[e])?a:e;for(let[e,t]of Object.entries(n))s=s.split("{".concat(e,"}")).join(String(t));return s},locale:e}}function p(){return(0,n.useContext)(d)}function m(){let{locale:e}=(0,n.useContext)(d);return t=>{var o;return t?new Date(t).toLocaleString(null==(o=(0,i.eX)(e))?void 0:o.dateLocale,{hour12:!1}):""}}},15549:(e,t,o)=>{o.d(t,{FH:()=>h,nC:()=>a});let a="/api",n="cop-api-token";function s(){try{let e=/(?:^#|&)token=([0-9a-f]{16,})/i.exec(window.location.hash);if(e)return window.localStorage.setItem(n,e[1]),window.history.replaceState(null,"",window.location.pathname+window.location.search),e[1];return window.localStorage.getItem(n)||""}catch(e){return""}}function i(e){let t=s();return t?"".concat(e).concat(e.includes("?")?"&":"?","token=").concat(encodeURIComponent(t)):e}async function r(e,t){let o,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=void 0===n.timeoutMs?3e4:n.timeoutMs;try{var r;o=await fetch("".concat(a).concat(e),{...t,...null!==i&&!(null==t?void 0:t.signal)?{signal:AbortSignal.timeout(i)}:{},headers:{"content-type":"application/json",...s()?{"x-cop-token":s()}:{},...null!=(r=null==t?void 0:t.headers)?r:{}}})}catch(t){if("TimeoutError"===t.name)throw Error("The API did not answer within ".concat(Math.round((null!=i?i:0)/1e3)," s (").concat(e.split("?")[0],"). It may be busy; try again."));throw t}if(!o.ok){let e="".concat(o.status," ").concat(o.statusText);try{let t=await o.json();(null==t?void 0:t.message)&&(e=Array.isArray(t.message)?t.message.join("; "):t.message)}catch(e){}throw Object.assign(Error(e),{status:o.status})}let h=await o.text();return h?JSON.parse(h):void 0}let h={doctor:()=>r("/doctor"),settings:()=>r("/settings"),saveSettings:e=>r("/settings",{method:"PUT",body:JSON.stringify(e)}),level1:()=>r("/level1"),sessions:()=>r("/sessions"),session:e=>r("/sessions/".concat(e)),updateSession:(e,t)=>r("/sessions/".concat(e),{method:"PUT",body:JSON.stringify(t)}),taskChanges:(e,t,o)=>r("/sessions/".concat(e,"/tasks/").concat(t,"/changes").concat(o?"?run=".concat(encodeURIComponent(o)):"")),taskChangeFile:(e,t,o,a)=>r("/sessions/".concat(e,"/tasks/").concat(t,"/changes/file?path=").concat(encodeURIComponent(o)).concat(a?"&run=".concat(encodeURIComponent(a)):"")),taskStory:(e,t,o)=>r("/sessions/".concat(e,"/tasks/").concat(t,"/story").concat(o?"?run=".concat(encodeURIComponent(o)):"")),start:(e,t)=>r("/sessions/".concat(e,"/start"),{method:"POST",body:JSON.stringify({mode:t})},{timeoutMs:12e4}),startFailures:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r("/start/failures".concat(e?"?unanswered=1":""))},startFailureUrl:e=>i("".concat(a,"/start/failures/").concat(encodeURIComponent(e),"/report")),terminalUrl:()=>i("".concat(a,"/terminal")),stop:e=>r("/sessions/".concat(e,"/stop"),{method:"POST",body:"{}"}),pause:e=>r("/sessions/".concat(e,"/pause"),{method:"POST",body:"{}"}),resume:e=>r("/sessions/".concat(e,"/resume"),{method:"POST",body:"{}"}),approvals:e=>r("/approvals".concat(e?"?session=".concat(encodeURIComponent(e)):"")),workspace:()=>r("/workspace"),workspaceFiles:()=>r("/workspace/files"),workspaceSearch:(e,t)=>r("/workspace/search?".concat(new URLSearchParams({q:e,case:t.matchCase?"1":"",word:t.wholeWord?"1":"",regex:t.regex?"1":"",include:t.include,exclude:t.exclude}).toString())),workspaceFile:e=>r("/workspace/file?path=".concat(encodeURIComponent(e))),saveWorkspaceFile:(e,t,o)=>r("/workspace/file",{method:"PUT",body:JSON.stringify({path:e,text:t,...o?{base:o}:{}})}),workspaceGit:()=>r("/workspace/git"),workspaceCommit:e=>r("/workspace/git/commit?sha=".concat(encodeURIComponent(e))),workspaceGitFile:(e,t,o)=>r("/workspace/git/file?area=".concat(e,"&path=").concat(encodeURIComponent(t)).concat(o?"&commit=".concat(encodeURIComponent(o)):"")),chatThreads:()=>r("/chat/threads"),chatSend:(e,t,o,a,n,s,i,h,l,d)=>r("/chat",{method:"POST",body:JSON.stringify({text:e,...t?{threadId:t}:{},...o?{model:o}:{},...a?{manualModel:!0}:{},...n?{lang:n}:{},...s?{planMode:!0}:{},...void 0!==i?{review:i}:{},...h?{lead:!0,...h.workerManualModel?{workerManualModel:!0}:h.workerModel?{workerModel:h.workerModel}:{}}:{},...l?{skill:l}:{},...d?{reviewModel:d}:{}})}),answerQuestion:(e,t)=>r("/approvals/".concat(e,"/answer"),{method:"POST",body:JSON.stringify({text:t})}),chatRewind:(e,t)=>r("/chat/".concat(e,"/rewind"),{method:"POST",body:JSON.stringify({taskId:t})}),sessionEvents:e=>r("/sessions/".concat(e,"/events")),decidePlan:(e,t,o)=>r("/approvals/".concat(e,"/plan"),{method:"POST",body:JSON.stringify({action:t,...(null==o?void 0:o.trim())?{note:o}:{}})}),decide:(e,t)=>r("/approvals/".concat(e),{method:"POST",body:JSON.stringify({action:t})}),browseFolder:e=>r("/browse-folder",{method:"POST",body:JSON.stringify({start:e})},{timeoutMs:null}),activity:()=>r("/activity"),kerrigan:e=>r("/kerrigan?lang=".concat(encodeURIComponent(e))),taskExchangeUrl:(e,t)=>i("".concat(a,"/sessions/").concat(encodeURIComponent(e),"/tasks/").concat(encodeURIComponent(t),"/exchange")),project:()=>r("/project"),setProject:e=>r("/project",{method:"PUT",body:JSON.stringify(e)}),skills:()=>r("/skills"),setSkills:e=>r("/skills",{method:"PUT",body:JSON.stringify({skills:e})}),models:()=>r("/models"),setDefaultModel:e=>r("/models/default",{method:"PUT",body:JSON.stringify({model:e})}),setDefaultReviewModel:e=>r("/models/review-default",{method:"PUT",body:JSON.stringify({model:e})}),refreshModels:()=>r("/models/refresh",{method:"POST",body:"{}"},{timeoutMs:null}),login:e=>r("/login",{method:"POST",body:JSON.stringify({account:(null==e?void 0:e.trim())||void 0})},{timeoutMs:null})}},39051:(e,t,o)=>{o.r(t),o.d(t,{en:()=>a});let a={"nav.label":"Main","nav.live":"live","nav.liveTitle":"The chat is working right now. Open it to watch.","nav.system":"System","nav.workbench":"Chat","chat.askRun":"Run","chat.askRunAll":"Run this and the rest","chat.askSkip":"Skip","chat.askTitle":"Run this command?","chat.changed":"{n} file(s) changed:","chat.example1":"Explain how this project is laid out and how to run its tests.","chat.example2":"Run the tests and fix what fails.","chat.example3":"Add a README section that says how to start the project locally.","chat.exit":"exit {code}","chat.input":"Message to the chat","chat.lookAbove":"Waiting for an answer on the card at the top.","chat.mode":"How commands run","chat.modeAsk":"Ask before each command","chat.modeAuto":"Run commands without asking","chat.modeWhy":"Whether each command the chat sends waits for you, or runs at once; the list of forbidden commands applies either way.","git.title":"Git","git.refresh":"Read the folder's git again","git.noFolder":"No project folder is open.","git.notRepo":"The project folder is not a git repository.","git.upstream":"{name}: {ahead} ahead, {behind} behind","git.staged":"Staged changes","git.changes":"Changes","git.noChanges":"Nothing has changed since the last commit.","git.commits":"Commits","git.noCommits":"No commits yet.","git.commitFiles":"The files of {sha}","git.more":"The newest {n} are shown.","git.workingTree":"Working tree","git.index":"Index","git.status.M":"modified","git.status.A":"added","git.status.D":"deleted","git.status.R":"renamed","git.status.C":"copied","git.status.T":"type changed","git.status.U":"untracked","git.status.conflict":"in conflict","copy.copy":"Copy","copy.copied":"Copied","copy.failed":"Not copied","chat.foldOpen":"Show the whole message","chat.foldClose":"Fold the message to its first lines","chat.copyMessage":"Copy your message","chat.copyReply":"Copy what the chat said","chat.copySummary":"Copy how it ended","chat.copyCommand":"Copy the command and what it printed","chat.newChat":"New chat","chat.newChatWhy":"The next message starts a new conversation in Copilot, with nothing of this one in it. This one stays in the list, to go back to.","chat.newChatRunning":'A task is running. "New chat" comes on once it stops: press "Stop", or close the Copilot browser window.',"chat.newChatFresh":"This is a new chat already: write the first message below and it begins.","chat.exchange":"⤓ JSON","chat.exchangeWhy":"Everything between the bot and Copilot for this message, as a JSON file: every message sent, every reply, every command that ran with its whole output and exit code.","chat.newThread":"New conversation","chat.notStarted":"It did not start: {reason}","chat.notStartedYet":"Not started. The message is kept in the conversation; send another or start it from its session.","chat.noted":"Added to what it is doing: it gets this with its next report.","chat.openFolder":"Open a folder","chat.placeholder":"Ask for a change in {folder}… (Enter sends, Shift+Enter a new line)","chat.placeholderNoFolder":"Open a folder first","chat.placeholderRunning":"Add to what it is doing… it gets this with its next report","chat.queued":"Waiting to start.","chat.running":"running…","chat.send":"Send","chat.sendNote":"Add to it","chat.sendWhy":"Enter","chat.stop":"Stop","chat.review":"Review","chat.reviewWhy":"When Copilot says the work is done, a conversation of its own checks it — reads the changes, runs the checks — and sends back what it finds, until it passes or the review rounds in Settings are spent. On unless you untick it. Of this conversation, or of the next one.","chat.lead":"Two chats","chat.leadWhy":"A lead and a worker, for a task too big for one go: your message goes to a lead, which restates it to check it understands it, has a worker look at the project, plans, gives the worker one subtask at a time and judges what it reports, until the result is ready in the form you asked for. The worker runs the commands. Both are conversations in the same Copilot window. Say clearly what you want, and in which form you want the result. For a new conversation; a started one keeps how it began.","chat.leadModel":"Lead","chat.workerModel":"Worker","chat.workerSameModel":"The lead's model","chat.workModel":"Work","chat.reviewModel":"Review","chat.reviewModelDefault":"As in Settings ({model})","chat.reviewModelByHand":"Chosen by hand in Copilot (none in Settings)","chat.reviewModelWhy":"The model the review's conversation is put on. Best a different, stronger one than the work's: a second pair of eyes that does not think like the first catches more. Chosen here, it is this conversation's; otherwise the one in Settings → Model for the review.","lead.who":"The lead","lead.understood":"The lead understands the task as","lead.plan":"The lead's plan (version {v})","lead.subtask":"Subtask {n}: {title}","lead.readOnly":"reads only","lead.fresh":"a new worker","lead.thinking":"The lead is deciding the next step…","lead.working":"The worker is on subtask {n}…","lead.workingOn":"The worker is on “{title}”…","lead.givenAs":"given to the worker as subtask {n}","lead.subtasks":"Subtasks used: {n} of at most {max}","lead.phase":"Phase {n} of {total}: {title}","lead.subtaskOf":"Subtask {n} of {total} planned","lead.doneOf":"{done} of {total} planned subtasks done","lead.left":"{left} to go \xb7 at most {max} allowed","lead.stuck":"{n} blocked or failed","lead.ledgerFirst":"Subtasks in the plan: {n}","lead.ledgerChanged":"The plan was updated (version {v}): {what}","lead.ledgerAdded":"+{n} new","lead.ledgerRemoved":"−{n} dropped","lead.ledgerReordered":"a new order","lead.ledgerList":"The subtasks of the plan (version {v})","lead.todo.done":"done","lead.todo.running":"in progress","lead.todo.planned":"planned","lead.todo.blocked":"blocked","lead.todo.failed":"failed","lead.todo.stopped":"stopped","lead.otherPhase":"Other","lead.question":"The lead asks you","lead.answer":"Your answer","lead.answerPlaceholder":"Write your answer, or choose one of the options above.","lead.send":"Send the answer","lead.stop":"Stop the task","lead.stopConfirm":"Stop this task at the lead's question? It ends as stopped; what was done so far stays.","lead.answered":"You answered","lead.evidence":"What shows it","chat.pause":"Pause","chat.pauseWhy":"Holds the work where it is: a reply Copilot is writing and a command that is running are let finish, then nothing more is sent to Copilot and no other command runs until you press Continue. The conversation and the browser window stay as they are, and the time paused does not count against the time limit.","chat.resume":"Continue","chat.resumeWhy":"Goes on with the work from where it was paused.","chat.pausedNote":"Paused: nothing is sent to Copilot and nothing runs until you press Continue.","chat.stopping":"Stopping… An answer Copilot is writing is waited for first; then nothing more is sent.","chat.rewind":"Go back to before this message","chat.rewindConfirm":"Put the folder back exactly as it was before this message, and take it and what came after it out of the conversation ({n} message(s))? The folder as it is now is kept in a safety copy in git.","chat.rewound":"Back to before that message: the folder is as it was then, and the message is in the box to send again or change.","chat.model":"Model","chat.modelDefault":"As in Settings ({model})","chat.modelByHand":"Set the model by hand","chat.readModels":"Read the latest models from Copilot","chat.modelsReading":"Reading the models from Copilot… (the browser opens for a moment)","chat.modelsRead":"The list of models is the one Copilot offers now.","chat.thread":"Conversation","chat.turn":"Message: {text}","chat.waitingTurn":"Waiting for the message before it to finish.","chat.welcome":"Ask for a change in {folder}","chat.welcomeWhy":"Copilot answers with commands; they run here in {dir}, on the branch it is on ({branch}), and their output goes back to it, until it is done. The folder is kept before each message: you can go back to any of them.","chat.working":"Working… message {n}","wb.fileOnDisk":"{path} — as it is on disk, read-only","wb.welcomeChat":"The open folder is {dir}. Write in the chat what to change: Copilot runs commands here until it is done.","wb.binary":"binary","wb.chatPanel":"Chat","theme.system":"System","wb.appearance":"Appearance: theme and text","ap.smaller":"Smaller text","ap.larger":"Larger text","wb.terminalInfoLabel":"What the Terminal shows","wb.terminalInfo":"Every command Copilot had run for the latest message of the conversation open in the chat, in the order they ran: the command, how it ended (its exit code) and everything it printed. While the message is being worked on, it follows the newest command.\n\nNothing is typed here: it shows what ran on this machine, in the open folder. A new chat starts it empty.","wb.problemsInfoLabel":"What the Problems show","wb.problemsInfo":'What did not go well in the conversation open in the chat: a message that ended unfinished, stopped or at a limit, and why; a check that did not pass. Press one to bring its message into view in the chat.\n\n"Seen" takes a problem off the list and the count, in this browser only; the message itself keeps it. The number on the tab counts the ones not seen yet.',"wb.outputInfoLabel":"What the Output shows","wb.outputInfo":"The bot's own log of the conversation open in the chat, newest at the bottom, each line with its time: the browser opening and the sign-in, the model, each message sent to Copilot and its answer arriving, the commands asked for and run, a stop, an error.\n\nRed lines are errors, yellow ones warnings. It is what to read when something did not go as expected.","wb.pickChat":"Write a message in the chat: what it runs shows here.","wb.problemShow":"Show its message in the chat","wb.cmdThread":"Open the conversation “{name}” in the chat","kerrigan.button":"Kerrigan","kerrigan.menu":"Kerrigan: save or copy","kerrigan.save":"Save as a file","kerrigan.copy":"Copy to the clipboard","kerrigan.saved":"Saved as {name}. Give it to a chat at the start of a conversation.","kerrigan.copied":"Copied ({n} characters). Paste it at the start of a conversation with a chat of your choice.","kerrigan.copyFailed":'The browser would not copy it. Use "Save as a file" instead.',"kerrigan.failed":"Kerrigan could not be read: {reason}","kerrigan.infoLabel":"What is Kerrigan?","kerrigan.info":'Kerrigan is a helper you may use or not. The button gives you a text — a persona — to paste at the start of a conversation with any chat you like: Microsoft Copilot, ChatGPT or another. With it, that chat knows what copilot-operator is and how it works, knows your projects with the level 2 you write for each in Settings, and helps you write a task for it: what to ask for in one message, which files and folders to name, how to say what "done" looks like and how to check it, what to leave alone. When something in the program is unclear, it explains it and leads you through it until the task is done.\n\nYou then copy the message it helped you write into the chat here. The chat here does not need Kerrigan and works just as well without her; this button sends nothing anywhere.',"nav.appearance":"Appearance","ap.systemCursor":"The system's cursor","ap.night":"Night light","chat.planMode":"Plan mode","chat.planModeWhy":"Copilot first looks at the project without changing anything and proposes a plan; the work starts once you approve it here.","chat.planShown":"The approved plan (version {v})","ed.save":"Save","ed.revert":"Undo my changes","ed.saved":"Saved.","ed.clean":"No changes","ed.unsaved":"Not saved","ed.language":"Language","ed.langAuto":"Automatic ({name})","ed.label":"The text of {path}","ed.changedOnDisk":"The file changed on disk after you opened it (the chat, or another program, changed it).","ed.reload":"Read it again (my changes are lost)","ed.saveOver":"Save over it","ed.closeUnsaved":'"{name}" has changes that are not saved. Close it and lose them?',"wb.chatTab":"Chat","wb.closeTab":"Close {name}","wb.cmdChat":"Write in the chat","wb.cmdCommits":"Show Git: the changes and the commits","wb.cmdFiles":"Show the repository’s files","wb.cmdGo":"Go to: {page}","wb.cmdPanel":"Show or hide the panel","wb.cmdProblems":"Show the problems","wb.cmdSide":"Show or hide the explorer","wb.editor":"Editor","wb.explorer":"Explorer","wb.files":"Files","wb.idle":"Nothing is running","wb.keys":"Ctrl+K: find anything \xb7 Ctrl+B: explorer \xb7 Ctrl+J: panel \xb7 Ctrl+L: write to the chat","wb.loading":"Reading…","wb.modelDefault":"the chat’s default model","wb.modelNow":"The model the session runs on","wb.noEvents":"Nothing has happened in this session yet.","wb.noProblems":"No problems in this session.","wb.problemSeen":"Seen","wb.problemSeenWhy":"Takes it off the list and the count, in this browser. It is still on its task, and shows again if a later run of the task has it again.","wb.problemsAllSeen":"Seen all","wb.problemsShowSeen":"Show the {n} seen","wb.problemsHideSeen":"Hide the seen","wb.problemsNoneNew":"Nothing new: every problem here has been seen.","wb.newChatTerminal":"A new chat: its commands show here once it runs.","wb.newChatProblems":"A new chat: nothing has gone wrong in it.","wb.newChatOutput":"A new chat: what it does shows here once it runs.","wb.noSteps":"This task ran no commands yet.","wb.noTabs":"Open a file from the explorer.","wb.openRunning":"Show the conversation that is running in the chat","wb.openTabs":"Open tabs","wb.output":"Output","wb.palette":"Find a command, a page or a conversation","wb.paletteNone":"Nothing found.","wb.palettePlaceholder":"Type to find…","wb.paletteWhy":"Every command, page and conversation of the chat, by a few letters (Ctrl+K)","wb.panel":"Panel","wb.problems":"Problems","wb.refresh":"Read again","wb.resize":"Drag to resize","wb.runningLine":"{session} › {task} \xb7 message {n}/{max} \xb7 {m}/{maxm} min","wb.pausedTag":"paused","wb.runningNow":"running…","wb.status":"Status","wb.terminal":"Terminal","wb.move":"Move {name}","wb.moveWhy":"Drag it onto another panel and the two swap places, or click to choose where it goes.","wb.moveLeft":"To the left","wb.moveCenter":"To the middle","wb.moveRight":"To the right","wb.dropHere":"Drop here: the two swap places","wb.cmdResetLayout":"Put the panels back where they were","wb.search":"Search (Ctrl+Shift+F)","wb.cmdQuickOpen":"Go to File…","wb.cmdSearch":"Search in files","search.title":"Search","search.input":"Search","search.matchCase":"Match Case","search.wholeWord":"Match Whole Word","search.regex":"Use Regular Expression","search.details":"Toggle Search Details","search.include":"files to include","search.exclude":"files to exclude","search.includePlaceholder":"e.g. *.ts, src/**","search.excludePlaceholder":"e.g. *.min.js, dist","search.refresh":"Refresh","search.clear":"Clear Search Results","search.collapse":"Collapse All","search.expand":"Expand All","search.searching":"Searching…","search.results":"{n} results in {files} files","search.truncated":"The result set only contains a subset of all matches. Be more specific in your search to narrow down the results.","search.none":"No results found.","search.problem":"The search could not run: {why}","quick.label":"Go to File","quick.placeholder":"Search files by name (append : to go to line)","quick.none":"No matching results","quick.recent":"recently opened","ed.view":"How the Markdown file is shown","ed.viewWhy":"A Markdown file as its text to edit, side by side with how it reads, or as it reads (Ctrl+Shift+V).","ed.viewCode":"Code","ed.viewSplit":"Side by side","ed.viewPreview":"Preview","md.externalImage":"A picture from the internet is not loaded here; it opens in a tab of its own: {url}","md.mermaidError":"This diagram could not be drawn: {why}","md.mermaidLoading":"Drawing the diagram…","wb.toggleChat":"Show or hide the chat","wb.tooLarge":"Too large to show.","wb.viewCommits":"Git","wb.viewFiles":"Files","wb.views":"Views","wb.waiting":"{n} waiting for you","wb.welcome":"Welcome","wb.welcomeWhy":"Open a folder: the chat works in it, and its files and git are in the explorer.","dialog.confirmTitle":"Are you sure?","dialog.noticeTitle":"Notice","dialog.ok":"OK","dialog.cancel":"Cancel","exec.title":"Execution","exec.intro":"How a task runs: how long it may go on, what happens at a limit, and what may run without you. Saved in data/settings.json; applies to tasks started from now on.","exec.maxIterations":"Most messages to the chat in one task","exec.maxIterationsUnit":'messages, then the task stops as "limit reached"',"exec.maxIterationsWhy":"A safety stop for a task that goes round in circles. One message is one round: Copilot sends commands, the bot runs them and reports the results back. When a task has used this many rounds, it stops as “limit reached”.\n\nIt does not throw the work away: the task can go on in the same chat — by itself if “Keep going after a limit” allows it, or with your next message. Nor does it decide how fast messages go: that is the pause below, and a cap of 60 messages an hour, which waits rather than stops.\n\nDefault: 60. Raise it for long tasks; lower it to notice a stuck task sooner.","exec.maxSubtasks":"Most subtasks the lead may give","wb.runningLineTwo":"{session} › {task} \xb7 messages: lead {lead}, worker {worker}, {total} in all \xb7 {m}/{maxm} min","lead.messages":"Messages: lead {lead} \xb7 worker {worker} \xb7 {total} in all","exec.gap":"Pause between messages","exec.gapWhy":"Makes the bot wait between messages to Copilot instead of sending them one right after another. Ticked, every message waits until at least the time below has passed since the previous one — in any conversation, the lead's and the worker's included.\n\nUseful when your organisation limits how often Copilot may be used, or simply to go slower. The work takes longer by as much.\n\nOff by default: a message goes as soon as it is ready, still at most 60 an hour.","exec.gapSec":"At least","exec.gapSecWhy":"The shortest wait between two messages, in seconds. 60 means at most one message a minute; 120, one every two minutes.\n\nDefault: 60.","exec.gapUnit":"seconds","exec.gapRandom":"Random time","exec.gapRandomWhy":"Ticked, each wait is a different, random time between “At least” above and “At most” below — anywhere between 60 and 90 seconds, say — instead of always the same, so the messages do not come at a regular beat.\n\nOff by default: every wait is exactly “At least”.","exec.gapMax":"At most","exec.gapMaxWhy":"The longest random wait, in seconds. It is never less than “At least”; with the two the same, every wait is that time.\n\nDefault: 90.","exec.maxSubtasksUnit":"subtasks for one message with two chats","exec.maxSubtasksWhy":"Only for a conversation with “Two chats”. The lead splits your message into subtasks and gives them to the worker one at a time; each subtask is a task of its own, with the limits above. This is how many subtasks one message may have in all.\n\nWhen they run out, the lead is told to stop giving new ones and to deliver what has been done so far. It keeps a big request from growing without end.\n\nDefault: 20. Applies to messages sent from now on.","exec.maxRunMinutes":"Longest a task may run","exec.maxRunMinutesUnit":"minutes","exec.maxRunMinutesWhy":"The longest one task may take, in minutes, counted from its first message — waiting for replies and running commands included. The time it is paused is not counted: from “Pause” under the chat to “Continue”, the clock stands still, and so do the minutes in the bar along the bottom. When the time is up, the task stops as “limit reached”.\n\nLike the limit above, it is a safety stop, not the end of the work: the task can go on in the same chat, by itself if “Keep going after a limit” allows it, or with your next message, and the time is counted again for that go.\n\nDefault: 240 (4 hours).","exec.replyTimeout":"How long to wait for a reply from the chat","exec.replyTimeoutUnit":"seconds (900 = 15 minutes)","exec.replyTimeoutWhy":"How long the bot waits for Copilot to finish writing one reply, from the moment the message is sent. Slow models and long answers can take several minutes.\n\nA reply not finished in time stops the task as failed (“Copilot did not finish a reply within …”), with a screenshot of the chat kept in the run's folder; “Keep going after a limit” can carry it on.\n\nDefault: 900 seconds (15 minutes). Raise it if your model often needs longer. Applies to runs started from now on.","startdlg.title":"Where the work starts","pm.copyPlan":"Copy the plan","pm.cardTitle":"Plan for “{title}”, waiting for approval","pm.cardWhy":"Nothing has been changed yet. The work starts once you approve this plan.","pm.note":"Note for the chat (optional when approving; says what to change when asking for another plan)","pm.notePlaceholder":"e.g. Keep the old endpoint working; do not touch the migrations.","pm.approve":"Approve and start the work","pm.revise":"Ask for another plan","pm.reviseWhy":"The chat makes a new plan with your note; the same card comes back with it.","pm.reviseNeedsNote":"Say in the note what the new plan should change.","pm.stop":"Stop the task","pm.stopConfirm":"Stop this task without doing the work? It ends as stopped and can be run again.","pm.version":"Plan version {n}, {at}","pm.approvedByOperator":"Approved by the operator, {at}.","pm.approvedAuto":"Approved by the runner, {at}.","pm.approvedNote":"Note: {note}","pm.existing":"Already there","pm.approach":"Approach","pm.steps":"Steps","pm.files":"Files it expects to change","pm.verification":"How it will show the work is done","pm.risks":"Risks","pm.revisions":"Earlier versions, and what was asked to change","pm.revision":"Version {n} ({at}):","startfail.laterSession":"A session of a run that was going could not begin:","startdlg.goStep":"Start, asking before each command","startdlg.goUnattended":"Start without asking","startfail.title":"The work did not start","startfail.where":"Where it stopped: {stage}.","startfail.stage.refused":"the start was not let in, before anything opened","startfail.stage.branch":"the branch chosen to start from","startfail.stage.preflight":"the version control check, before the browser opened","startfail.stage.browser":"opening the browser (Edge), its profile or the chat","startfail.stage.run":"the run, before its first task began","startfail.stage.at-turn":"this session's turn in the run, before its first task","startfail.stage.error":"the bot itself, while starting","startfail.when":"{when}, run {run}","startfail.whenNoRun":"{when}","startfail.download":"Download what happened (error, run record and terminal)","startfail.terminal":"Download what the terminal showed","startfail.downloadWhy":"A text file with the error, where it stopped, the run's own record, the sessions' events and every line the bot's console printed from the press to a few seconds after. Secret-shaped text is taken out.","startfail.dismiss":"Close this notice","startfail.later":"This run was accepted and then could not begin:","sys.terminalWhy":"The bot's console — what npm start or cop start printed — as a text file: the latest lines, each with its time, secret-shaped text taken out. Everything since the bot started is also in the data folder, logs\\terminal.log.","exec.autoContinue":"Keep going after a limit","exec.autoContinueUnit":"times per task, then it stops and waits for you (0 = stop at the limit)","exec.autoContinueWhy":"What happens when a task reaches one of the limits below: too many messages, too long a run, no reply in time, replies in the wrong shape, too many rounds of fixing.\n\nWith 0, the task stops there and waits for you; a new message in the same conversation carries on from where it got to. With a number, the bot carries it on for you that many times, at once, in the same chat.\n\nExample: with 3, a task that runs out of messages goes on three more times; the fourth time it stops and waits for you. Every limit still applies to each go, so a task gets at most this number plus one of each.\n\nNever carried on by itself: a task you stopped, and a task that says it is blocked (it needs something it cannot get) — that one is tried in a fresh chat instead (see below) and then waits for you.\n\nDefault: 3.","exec.maxReviewRounds":"Rounds of fixing after a failed review","exec.maxReviewRoundsUnit":'rounds, then the task ends "blocked" with the review\'s findings',"exec.maxReviewRoundsWhy":"Only when “Review” is ticked under the chat. When the work is done, a second conversation reviews it. If it finds problems, they go back to the chat to fix, and the fixed work is reviewed again. This is how many times the work may be sent back.\n\nExample: with 2, the work can be sent back twice; if the third review still finds problems, the task ends “blocked”, with what the review found, for you to read.\n\n2 or 3 is usually enough: a problem that survives several fixes usually means the task needs to be worded differently, not another round.\n\nDefault: 2.","exec.minApproaches":"Approaches the chat must try before it may give up","exec.minApproachesUnit":'different approaches, then "blocked" is accepted',"exec.minApproachesWhy":"How hard the chat must try before it may say “I cannot do this”. When Copilot gives up on a task (it answers “blocked”), it has to list the different approaches it tried. If it lists fewer than this number, the bot sends it back: try another, different way first.\n\nExample: with 3, a chat that tried one fix and one workaround is asked for a third idea before its “blocked” is accepted.\n\nA higher number makes the chat try harder before it gives up, and costs more messages. So that it cannot go round for ever, three “blocked” answers in a row with nothing new tried are accepted anyway.\n\nDefault, and the lowest: 2.","exec.retryBlocked":"When a task ends blocked, run it again in a fresh conversation","exec.retryBlockedTimes":"times, then accept the verdict","exec.retryBlockedWhy":"When the chat gives up on a task (“blocked”), the cause may be the conversation itself: in a long chat, Copilot loses sight of what was said at its start. So the bot runs the same task again in a new, empty chat, with all its instructions sent again. This is how many times.\n\nIf the task then succeeds, the old chat was the problem. If it blocks again in the same way, the cause is real — the task, the project or the machine — and the bot stops trying; every attempt stays on the task's record.\n\n0 turns this off: a blocked task stops at once and waits for you.\n\nDefault: 2.","exec.isolation":"Where the bot runs","exec.isolationNone":"Nowhere in particular — this account","exec.isolationNoneAccepted":"This account — I accept unattended runs without isolation","exec.isolationAccount":"A separate low-privilege Windows account","exec.isolationSandbox":"Windows Sandbox","exec.isolationVm":"A virtual machine","exec.isolationWhy":"Where the commands Copilot writes run. They run with the rights of the Windows account the bot runs as: they can read and change whatever that account can. What you choose here decides whether a run may go on with nobody watching (“Run commands without asking” under the chat).\n\nNowhere in particular — this account: the default. You can watch and approve every command, but a run with nobody watching is refused: nobody watching and nothing fencing the commands in is too risky.\n\nThis account — I accept unattended runs without isolation: runs with nobody watching are allowed here, on your responsibility; every run records that you accepted it.\n\nA separate low-privilege Windows account, Windows Sandbox, A virtual machine: choose the one you have set the bot up in; runs with nobody watching are then allowed.\n\nThis is your statement, not a check: the bot records it with every run, notes the Windows account it actually runs as, and warns when the two do not match.","exec.startMode":"Starting a run without supervision","exec.startModeAsk":'Ask "are you sure" every time',"exec.startModeAuto":"Start it without asking","exec.startModeWhy":'What happens when you start a conversation with “Run commands without asking” chosen under the chat\'s box.\n\nAsk "are you sure" every time: the default. The first message of each such conversation asks you to confirm before anything runs.\n\nStart it without asking: you decide once, here, and such conversations simply start.\n\nEither way, forbidden commands are still refused, downloads still follow the choice below, and a run with nobody watching is possible only if “Where the bot runs” above allows it.',"exec.networkFetch":"A command that downloads, in a run without supervision","exec.networkFetchAsk":"Wait for me on the approval screen","exec.networkFetchRefuse":"Refuse it and tell the chat why — the run never waits","exec.networkFetchRun":"Run it without asking","exec.networkFetchWhy":"What happens, in a run with nobody watching, when Copilot writes a command that downloads something from the internet — Invoke-WebRequest, curl, wget and the like. A later step could run what was downloaded without anyone having read it, so this is the one thing such a run still stops for.\n\nWait for me on the approval screen: the default. The run pauses until you allow or refuse the command.\n\nRefuse it and tell the chat why: the command is not run; Copilot is told why and what to do instead (use the project's package manager, or write the file with a step). The run never waits.\n\nRun it without asking: the download runs. Choose it only on a machine where that is acceptable; every task records the choice.\n\nnpm, dotnet, pip and git are never held. When you approve commands one by one, you see every command anyway, whatever is chosen here.","exec.saved":"Saved. Applies to runs started from now on.","diff.open":"See the changes ({n} file(s))","diff.openWhy":"Every file this attempt changed, before on the left and after on the right, with the differences marked.","diff.title":'Changes in "{title}"',"diff.summary":"{n} file(s), +{a} −{r}","diff.keys":"n / p: next and previous change \xb7 ] / [: next and previous file \xb7 Esc: close","diff.close":"Close","diff.loading":"reading…","diff.nothing":"The commit changed no file.","diff.files":"Changed files","diff.binaryShort":"binary","diff.added":"new file","diff.deleted":"deleted","diff.renamed":"renamed","diff.prevChange":"Previous change","diff.nextChange":"Next change","diff.changeN":"change {i} of {n}","diff.prevFile":"Previous file","diff.nextFile":"Next file","diff.whole":"Show the whole file","diff.wrap":"Wrap long lines","diff.binary":"A binary file: its contents are not shown.","diff.tooLarge":"Over 2 MB: too large to show here.","diff.eol":"The line endings changed ({from} → {to}); the lines themselves are compared without them.","diff.sameText":"The text is the same; only the file mode or the line endings changed.","diff.before":"Before","diff.after":"After","diff.gap":"⋯ {n} unchanged line(s) — show them","scroll.top":"To the top of the page","scroll.bottom":"To the bottom of the page","sys.profileBot":"In use by the bot's own run right now ({n} Edge process(es)). That is expected while a session runs.","lang.label":"Language","lang.menu":"The language of the interface","a11y.skip":"Skip to the content","theme.light":"Light","theme.dark":"Dark","status.queued":"queued","status.running":"running","status.waiting-approval":"waiting for approval","status.done":"done","status.blocked":"not done","status.failed":"failed","status.aborted":"aborted","status.limit-reached":"limit reached","session.unattendedConfirm":"This runs on its own: the commands Copilot writes will be executed without asking you, until the queue is finished. The list of forbidden commands still applies. Start it?","approval.title":"Step {n} is waiting for you","approval.modelTitle":"Choose the model — the bot could not","approval.manualTitle":"Choose the model for this run","approval.reviewModelTitle":"This is the model for the REVIEW","approval.reviewModelWhy":"A conversation of its own now checks the work. Choose a model different from the one the work was done with — a stronger one if you can: a second pair of eyes catches more mistakes when it does not think like the first.","approval.leadModelTitle":"This is the model for the LEAD","approval.leadModelWhy":"The lead understands the task, plans, directs the worker and judges what it reports: choose the strongest reasoning model you have.","approval.workerModelTitle":"This is the model for the WORKER","approval.workerModelWhy":"The worker runs the commands of each subtask and reports back: choose a model good at code and at following instructions.","approval.manualAsk":'In the Copilot window, open the model picker and choose "{model}". Then press "Ready — continue".',"approval.manualAskAny":'In the Copilot window, open the model picker and choose the model you want. Then press "Ready — continue".',"approval.manualReady":"Ready — continue","def.manualModel":"Choose the model by hand at the start of each run","def.manualModelWhy":'The bot leaves the model picker alone. At the start of a run, and of a review, a card appears here asking you to choose the model in the Copilot window and press "Ready"; the bot checks it and goes on. A conversation already on the model is not asked about — the chat keeps its model. On by default: turn it off to let the bot choose the model itself.',"approval.modelAsk":'In the Copilot window, open the model picker and choose "{model}". Then press the button below: the bot checks the picker and goes on.',"approval.modelShown":"The picker shows now: {shown}","approval.modelWhy":"Why the bot could not: {why} (asked {tries} time(s))","approval.modelChosen":"I chose it — check and continue","approval.modelAsItIs":"Continue on the model it is on","approval.modelStop":"Stop","approval.run":"Run","approval.runAll":"Run this and the rest without asking","approval.runAllWhy":"Answers this step with Run and stops asking for every step after it, for the rest of this run. Commands on the deny list are still refused, and a command that downloads from the internet does what Settings → Execution says (by default it still asks).","approval.runAllConfirm":"From here on, commands written by Copilot will run without asking, until this run ends. Commands on the deny list are still refused, and a command that downloads from the internet does what Settings → Execution says (by default it still asks). Continue?","approval.network":"This command downloads from the internet. A run that does not ask still stops for this one (unless Settings → Execution says otherwise), because a later step could run what arrived. Run it only if you know what it fetches and why.","approval.skip":"Skip","approval.abort":"Abort task","model.refresh":"Read the list from Copilot","model.refreshConfirm":"This opens the bot’s Edge window, reads the model picker and closes it again. It cannot run while a session is running. Continue?","model.refreshing":"opening the chat and reading the picker…","model.refreshed":"read {n} model(s) from the chat","model.readAt":"Read {t}: {n} option(s).","model.neverRead":"The list has never been read on this machine. Press the button to read it from the chat.","model.none":"The chat did not offer a model picker.","model.notInList":"{name} (saved, not in the list that was read)","model.unavailable":"not available","vcs.commit":"Commit when a task finishes","mirror.browse":"Browse…","checks.kind.exit-zero":"the command succeeds","sys.machine":"This machine","sys.loading":"Loading…","sys.version":"copilot-operator version","sys.node":"Node","sys.edge":"Edge","sys.edgeMissing":"not found","sys.profile":"Bot profile","sys.profileMissing":"(not created yet: run cop login)","sys.profileInUse":"Profile in use","sys.profileHeld":"Edge is holding the profile (pids {pids}). A run would fail. Close that Edge window.","sys.profileUnknown":"could not check","sys.profileFree":"free","sys.desktop":"Desktop","sys.desktopSynced":"(backed up by OneDrive)","sys.desktopLocal":"(not backed up by OneDrive; what is saved there stays local)","sys.cwd":"Fallback folder for commands (a session runs in its own project folder)","sys.runs":"Runs folder","sys.data":"Data folder","sys.mode":"Default mode","sys.settings":"Settings","sys.settingsHint":"Read from {file} next to the project. It has the same shape as {example}; anything missing takes the default. Edit the file and restart the API.","sys.asSaved":"As saved","sys.resolved":"Resolved paths","sys.signin":"Sign-in","sys.signinHint":"Signing in is done once, from the terminal, so that the bot never handles credentials:","ap.theme":"Theme","ap.size":"Text size","ap.sizeSmall":"Small","ap.sizeNormal":"Normal","ap.sizeLarge":"Large","ap.sizeHuge":"Larger","ap.sizeGiant":"Largest","ap.contrast":"Higher contrast","ap.motion":"Less motion","ap.links":"Underline every link","ap.focus":"Thick focus outline","ap.reset":"Back to the defaults","nav.defaults":"Settings","def.title":"Settings","def.intro":"The folders the chat works in, the sign-in to Copilot, the models, and how a task runs. Each field has an ⓘ beside its name that says what it is for and how it helps.","def.autoSave":"Everything on this page saves itself as you change it. There is nothing to press.","def.savedAutomatically":"saved as you type","def.saveAnyway":"Save","def.saveAnywayWhy":"It is already saved. This button exists for the comfort of pressing one.","info.about":"About “{name}”","l1.title":"The base prompt (level 1)","l1.readOnly":"read only","l1.what":"This text is for reading. It describes the agent Copilot becomes in the chat: it works through a task step by step with commands, reports what each one did, and takes every task to its end — done, or blocked with what it needs. It comes with the bot and changes only when the bot is updated. If something about the chat is unclear, Kerrigan (the button on the chat's home screen) can guide you through it until the task is done.","l1.show":"Show the whole text","l1.failed":"The base prompt could not be read: {reason}","proj.namePlaceholder":"the folder's own name","proj.nameSaved":"Name saved.","def.reviewTitle":"Model for the review","def.reviewIntro":'When Copilot says a task is done, a conversation of its own reviews the work, unless "Review" under the chat\'s box is unticked. It reads the changes, runs the checks and sends back what it finds.',"def.reviewInfo":"The model the review's conversation is put on, when “Review” is ticked under the chat. Best a different and stronger one than the work's: a second pair of eyes that does not think like the first catches more mistakes.\n\nA conversation can choose its own under the chat's box (“Review”, under the work's model); this one is used when it does not. With none chosen anywhere, a card asks you to choose the review's model in the Copilot window.\n\nWith the model chosen by hand, the card that asks for it says it is the review's.","def.reviewField":"Review model","def.reviewNone":"None chosen here","def.reviewSaved":"The review will run on {name}.","def.reviewCleared":"Cleared: the review is not put on a model of its own.","def.reviewSame":"This is the same model as the one doing the work. A different one would catch more.","login.title":"Sign in to Copilot","login.intro":'The bot works in an Edge profile of its own, which has to be signed in to Microsoft 365 Copilot before the chat can work or the models can be read — what "cop login" does in a terminal. The window opens and you sign in there yourself; the bot never types a password. It closes when the chat appears.',"login.account":"Account (optional)","login.accountWhy":"Optional: the work or school address to sign in with, for example name@company.com.\n\nLeft empty, you sign in with whichever account you choose in the window that opens. With an address, the bot's Edge profile is signed out first and Microsoft is asked for exactly that account — useful on a work machine, where Edge otherwise signs in with the account Windows is signed in with.","login.button":"Sign in to Copilot","login.busy":"Waiting for you to sign in…","login.waiting":"An Edge window has opened. Sign in there; this page waits until the chat appears.","def.modelTitle":"Model for new conversations","def.modelIntro":"The model a new chat conversation starts on, unless one is chosen under the chat's box.","def.modelInfo":"The model a new conversation starts on, chosen by the exact name Copilot's own model picker shows. The list is the one read from Copilot last (“Read the list from Copilot”); it belongs to Microsoft and differs from one organisation to another.\n\n“Leave the chat on whatever it is set to” chooses nothing: the chat stays on the model it is on. A conversation that chose its own model under the chat's box keeps it.\n\nWith “Choose the model by hand at the start of each run” ticked, nothing is chosen for you: a card asks you to choose the model in the Copilot window, and this one is the model it names.","def.modelField":"Model","def.modelNone":"Leave the chat on whatever it is set to","def.modelSaved":"New conversations will start on {name}.","def.modelCleared":"Cleared. New conversations leave the chat on whatever it is set to.","proj.title":"Projects","proj.intro":'The first project is the folder the chat works in; "Open a folder" on the chat\'s screen changes it too. The others are the rest of the repositories you work in. Kerrigan knows every one of them, with what you write in its level 2.',"proj.saved":"The chat works in {dir}.","proj.clear":"Clear","proj.cleared":"Cleared. No folder is open for the chat.","proj.none":"No folder is set for the chat: type one here or open one from the chat's screen.","proj.isRepo":"This folder is a git repository: each message can be undone, and its changes shown.","proj.notRepoWhy":'It can still be a project: the files are there and the chat can work in it. Without git, though, a message cannot be undone and its changes cannot be shown; "git init" in the folder fixes that.',"proj.isDefault":"the chat's folder","proj.isDefaultWhy":"The chat works in this one: its commands run here, and the explorer shows it.","proj.entryName":"Name","proj.entryDir":"Folder","proj.nameInfo":"What you call the project, for example “Shop API” for a folder named shop-api. The lists, the chat and Kerrigan use it.\n\nLeft empty, the folder's own name is used.","proj.dirInfo":"The project's folder on this machine.\n\nThe first project is the one the chat works in: its commands run in this folder, and the explorer shows it.\n\nBest a git repository: then each message can be undone (“Go back to before this message”) and its changes shown.","proj.level2":"Level 2 template (for Kerrigan)","proj.level2Info":"Notes about this project, in your own words: what it is, its stack and versions, its conventions, how it is built and how its tests run, what must not be touched. They become part of Kerrigan: when you save or copy her, she knows this project and helps you write tasks that fit it. The bot sends them nowhere by itself. Up to {n} characters.","proj.level2Placeholder":"e.g. A .NET 8 web API with a React front end in /web. Build: dotnet build. Tests: dotnet test. Never edit the migrations in /db.","proj.level2Saved":"Level 2 of {name} saved: Kerrigan has it.","chat.skill":"Skill","chat.skillNone":"No skill","chat.skillWhy":"A skill adds your instructions for this kind of task — written in Settings → Skills — to the message. Starting the message with /its-name does the same.","chat.skillUsed":"Skill: /{name}","chat.skillUnknown":"There is no skill /{name} for this folder. The ones there are: {names}.","chat.skillNoText":"Write the message after /{name}: what this task is.","skills.title":"Skills","skills.intro":"Instructions for a kind of task that comes back again and again — adding an automated test, a new entity, a database migration. Choose one under the chat's box, or start a message with /its-name: its instructions go to the chat with that message. A skill can be for one project or for every project.","skills.none":"No skills yet.","skills.name":"Name","skills.nameInfo":"How you call the skill: short, lowercase, with hyphens — new-test, new-entity, db-migration.\n\nStart a message with it after a slash — “/new-test add a test for the login page” — and the skill goes with that message; or choose it under the chat's box.","skills.description":"What it is for","skills.descriptionInfo":"One line saying which tasks the skill is for, for example “Adding an automated end-to-end test”. The chat's list of skills shows it beside the name, and Kerrigan reads it to suggest the skill for the right task.","skills.project":"Project","skills.projectInfo":"The project it is for, or every project. In the chat, only the skills for the open folder and the ones for every project are offered.","skills.allProjects":"Every project","skills.text":"Instructions","skills.textInfo":"What the chat should know and do for this kind of task: where the files go, the conventions to follow, the steps, how to check the result, what to leave alone. Sent with the message as written. Up to {n} characters.","skills.textPlaceholder":"e.g. Tests live in tests/e2e, one file per page, named <page>.spec.ts. Use the fixtures in tests/support. Run npm run test:e2e -- <file> and show it passing.","skills.count":"{n} / {max} characters","skills.addTitle":"Add a skill","skills.add":"Add the skill","skills.remove":"Delete","skills.removeConfirm":"Delete the skill /{name}? Messages already sent with it keep it.","skills.removeOne":"Delete the skill /{name}","skills.saved":"Skills saved: {n}.","proj.readOnly":"For reference only (no changes)","proj.readOnlyInfo":"Ticked, the bot may read this project and run what only reads it, but it changes nothing in it. After every command it compares the project with how it was when the task began, puts back whatever changed — files, branches, what is staged — and tells the chat. On the folder the chat works in, every message can then only read and report. Files git ignores (node_modules, build output) are not watched.","proj.readOnlyBadge":"reference only","proj.readOnlyOn":"{name} is for reference only: nothing in it will be changed.","proj.readOnlyOff":"{name} is open for work again.","proj.level2Count":"{n} / {max} characters","proj.branch":"Branch: {name}","proj.detached":"No branch (a detached HEAD)","proj.branchInfo":"The branch checked out in this folder right now, read from git each time the page opens. The chat works on whatever is checked out and makes no branch of its own: switch it in git when you want the work elsewhere.","proj.addTitle":"Add another project","proj.othersIntro":"Another repository you work in — a front end, a back end, the tests — with a short name. Kerrigan knows it, with its level 2.","proj.otherAdd":"Add","proj.otherRemove":"Remove","proj.othersSaved":"Saved: {n} other project(s).","proj.otherRepo":"git repository","proj.otherNotRepo":"not a git repository","approval.tabTitle":"waiting for you","approval.waitingHere":"A step is waiting for your decision","approval.waitingHereWhy":"Shown on every page while a step waits, so a run never looks stuck because the page that asks is not the one open."}},99755:(e,t,o)=>{o.d(t,{Od:()=>s,Yj:()=>a,eX:()=>n});let a=[{code:"en",english:"English",native:"English",flag:"gb",dir:"ltr",dateLocale:"en-GB"},{code:"bg",english:"Bulgarian",native:"Български",flag:"bg",dir:"ltr",dateLocale:"bg-BG"},{code:"de",english:"German",native:"Deutsch",flag:"de",dir:"ltr",dateLocale:"de-DE"},{code:"es",english:"Spanish",native:"Espa\xf1ol",flag:"es",dir:"ltr",dateLocale:"es-ES"},{code:"fr",english:"French",native:"Fran\xe7ais",flag:"fr",dir:"ltr",dateLocale:"fr-FR"},{code:"pt",english:"Portuguese",native:"Portugu\xeas",flag:"pt",dir:"ltr",dateLocale:"pt-PT"},{code:"ja",english:"Japanese",native:"日本語",flag:"jp",dir:"ltr",dateLocale:"ja-JP"},{code:"ko",english:"Korean",native:"한국어",flag:"kr",dir:"ltr",dateLocale:"ko-KR"},{code:"ar",english:"Arabic",native:"العربية",flag:"sa",dir:"rtl",dateLocale:"ar"}],n=e=>a.find(t=>t.code===e);function s(e){var t,o,a;return null!=(a=null==(t=n(null!=(o=(null!=e?e:"").toLowerCase().split(/[-_]/)[0])?o:""))?void 0:t.code)?a:null}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[795],{20795:(e,s,a)=>{a.d(s,{createRailroadAbnfServices:()=>c.s});var c=a(73896);a(74775)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8173],{18173:(e,s,c)=>{c.d(s,{createTreeViewServices:()=>r.I});var r=c(68062);c(74775)}}]);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8216],{88216:(e,t,r)=>{r.d(t,{diagram:()=>l});var s=r(99418);r(19777),r(30060),r(3183),r(63578),r(43499),r(43792),r(66926),r(14637),r(4461),r(11152),r(63570),r(7103),r(56960),r(23810),r(23742),r(73607),r(97562),r(13318);var a=(0,r(36744).K)(e=>`${(0,s.tM)(e)}
|
|
2
|
+
.swimlane.cluster:not([data-color-id]) rect {
|
|
3
|
+
stroke: ${e.clusterBorder} !important;
|
|
4
|
+
}
|
|
5
|
+
[data-look="neo"].cluster rect {
|
|
6
|
+
filter: none;
|
|
7
|
+
}
|
|
8
|
+
`,"getStyles"),l=(0,s.ur)({styles:a})}}]);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7100],{63570:(t,e,a)=>{a.d(e,{DA:()=>R,FA:()=>F,I7:()=>B,Zk:()=>w,aP:()=>ez,lC:()=>m,nM:()=>A,nq:()=>e_});var r=a(7103),l=a(56960),i=a(23810),n=a(23742),s=a(73607),o=a(97562),h=a(13318),d=a(36744),c=a(13226),g=a(3932);async function y(t){let e=t.getElementsByTagName("img");if(!e||0===e.length)return;let a=!u(t);await Promise.all([...e].map(t=>new Promise(e=>{function r(){if(t.style.display="flex",t.style.flexDirection="column",a){let e=(0,o.D7)().fontSize?(0,o.D7)().fontSize:window.getComputedStyle(document.body).fontSize,[a=o.UI.fontSize]=(0,s.I5)(e),r=5*a+"px";t.style.minWidth=r,t.style.maxWidth=r}else t.style.width="100%";e(t)}(0,d.K)(r,"setupImage"),setTimeout(()=>{t.complete&&r()}),t.addEventListener("error",r),t.addEventListener("load",r)})))}function u(t){return 3===t.nodeType?t.textContent?.trim()!=="":1===t.nodeType&&"img"!==t.tagName.toLowerCase()&&[...t.childNodes].some(u)}(0,d.K)(y,"configureLabelImages"),(0,d.K)(u,"hasTextBesidesImages");var p=(0,d.K)(async(t,e,a)=>{let r=(0,o.D7)(),i=t.insert("g").attr("class",a??"node default").attr("id",e.domId||e.id),n=i.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle)),h=[{text:"string"==typeof e.label?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map(t=>({text:t,cssClass:"c4-descr"}))].filter(t=>t.text),d=e.width?Math.max(e.width-2*(e.padding??0),32):(0,o.D7)().flowchart?.wrappingWidth??200,g=r.c4?.wrap??!0?d:1/0,y=await Promise.all(h.map(async t=>{let a=n.append("g").attr("class",t.cssClass),i=await (0,l.GZ)(a,(0,o.jZ)((0,s.Sm)(t.text??""),r),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:g,style:e.labelStyle},r);return(0,c.Ltv)(i).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),(0,c.Ltv)(i).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:a,box:a.node().getBBox()}})),u=Math.max(...y.map(({box:t})=>t.width),0),p=0;for(let{el:t,box:e}of y)t.attr("transform",`translate(${u/2-e.x-e.width/2}, ${p-e.y})`),p+=e.height+3;let f=y.length>0?p-3:0;return n.insert("rect",":first-child"),n.attr("transform",`translate(${-u/2}, ${-f/2})`),{shapeSvg:i,bbox:n.node().getBBox(),halfPadding:(e.padding??0)/2,label:n}},"c4LabelHelper"),f=(0,d.K)((t,e)=>{let{x:a,y:r,width:l,height:i}=t;return l>=e?t:"left"in t?{x:a,y:r,width:e,height:i,top:r,left:a,bottom:r+i,right:a+e,toJSON:(0,d.K)(()=>({}),"toJSON")}:{x:a-(e-l)/2,y:r,width:e,height:i}},"withMinWidth"),w=(0,d.K)(async(t,e,a,{ignoreMinWidth:r=!1}={})=>{let i,n,h;if(void 0!==e.stereotype)return p(t,e,a);let d=e.useHtmlLabels||(0,o._3)((0,o.D7)()?.htmlLabels);i=a||"node default";let g=t.insert("g").attr("class",i).attr("id",e.domId||e.id),u=g.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle));n=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let w=!!e.icon||!!e.img,x="markdown"===e.labelType,m=!n||e.width||r?0:e.minWidth??0,b=await (0,l.GZ)(u,(0,o.jZ)((0,s.Sm)(n),(0,o.D7)()),{useHtmlLabels:d,width:e.width||e.wrappingWidth||(0,o.D7)().flowchart?.wrappingWidth,minWidth:m,classes:x?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:w,markdown:x},(0,o.D7)()),$=(e?.padding??0)/2;if(d){let t=b.children[0],e=(0,c.Ltv)(b);await y(t),h=f(h=await l.lT.measure(()=>t.getBoundingClientRect()),m),e.attr("width",h.width),e.attr("height",h.height)}else h=f(h=await l.lT.measure(()=>b.getBBox()),m);return d?u.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):u.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:g,bbox:h,halfPadding:$,label:u}},"labelHelper"),x=(0,d.K)(async(t,e,a)=>{let r,i=a.useHtmlLabels??(0,o.E)((0,o.D7)()),n=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,l.GZ)(n,(0,o.jZ)((0,s.Sm)(e),(0,o.D7)()),{useHtmlLabels:i,width:a.width||(0,o.D7)()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=a.padding/2;if((0,o.E)((0,o.D7)())){let t=h.children[0],e=(0,c.Ltv)(h);r=await l.lT.measure(()=>t.getBoundingClientRect()),e.attr("width",r.width),e.attr("height",r.height)}else r=await l.lT.measure(()=>h.getBBox());return i?n.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"):n.attr("transform","translate(0, "+-r.height/2+")"),a.centerLabel&&n.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:t,bbox:r,halfPadding:d,label:n}},"insertLabel"),m=(0,d.K)((t,e,a)=>{if(a){t.width=a.width,t.height=a.height;return}let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),b=(0,d.K)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function $(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function k(t,e,a,r,l,i){let n=[],s=a-t,o=2*Math.PI/(s/i),h=e+(r-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,r=h+l*Math.sin(o*(a-t));n.push({x:a,y:r})}return n}function M(t,e,a,r,l,i){let n=[],s=l*Math.PI/180,o=(i*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*o,i=t+a*Math.cos(r),h=e+a*Math.sin(r);n.push({x:-i,y:-h})}return n}function D(t){let e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),a=document.createElementNS("http://www.w3.org/2000/svg","path"),r=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");a.setAttribute("d",r);let l=e.find(t=>"none"!==t.getAttribute("fill")),i=e.find(t=>"none"!==t.getAttribute("stroke")),n=(0,d.K)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");l&&Object.entries({fill:n(l,"fill"),"fill-opacity":n(l,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)}),i&&Object.entries({stroke:n(i,"stroke"),"stroke-width":n(i,"stroke-width")??"1","stroke-opacity":n(i,"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,d.K)($,"createPathFromPoints"),(0,d.K)(k,"generateFullSineWavePoints"),(0,d.K)(M,"generateCirclePoints"),(0,d.K)(D,"mergePaths");var A=(0,d.K)((t,e)=>{var a,r,l=t.x,i=t.y,n=e.x-l,s=e.y-i,o=t.width/2,h=t.height/2;return Math.abs(s)*o>Math.abs(n)*h?(s<0&&(h=-h),a=0===s?0:h*n/s,r=h):(n<0&&(o=-o),a=o,r=0===n?0:o*s/n),{x:l+a,y:i+r}},"intersectRect");function S(t,e){return t.intersect(e)}function v(t,e,a,r){var l=t.x,i=t.y,n=l-r.x,s=i-r.y,o=Math.sqrt(e*e*s*s+a*a*n*n),h=Math.abs(e*a*n/o);r.x<l&&(h=-h);var d=Math.abs(e*a*s/o);return r.y<i&&(d=-d),{x:l+h,y:i+d}}function K(t,e,a){return v(t,e,e,a)}function C(t,e,a,r){{let l=e.y-t.y,i=t.x-e.x,n=e.x*t.y-t.x*e.y,s=l*a.x+i*a.y+n,o=l*r.x+i*r.y+n;if(0!==s&&0!==o&&L(s,o))return;let h=r.y-a.y,d=a.x-r.x,c=r.x*a.y-a.x*r.y,g=h*t.x+d*t.y+c,y=h*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&L(g,y))return;let u=l*d-h*i;if(0===u)return;return{x:(i*c-d*n)/u,y:(h*n-l*c)/u}}}function L(t,e){return t*e>0}function N(t,e,a){let r=t.x,l=t.y,i=[],n=1/0,s=1/0;"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 o=r-t.width/2-n,h=l-t.height/2-s;for(let r=0;r<e.length;r++){let l=e[r],n=e[r<e.length-1?r+1:0],s=C(t,a,{x:o+l.x,y:h+l.y},{x:o+n.x,y:h+n.y});s&&i.push(s)}return i.length?(i.length>1&&i.sort(function(t,e){let r=t.x-a.x,l=t.y-a.y,i=Math.sqrt(r*r+l*l),n=e.x-a.x,s=e.y-a.y,o=Math.sqrt(n*n+s*s);return i<o?-1:+(i!==o)}),i[0]):t}(0,d.K)(S,"intersectNode"),(0,d.K)(v,"intersectEllipse"),(0,d.K)(K,"intersectCircle"),(0,d.K)(C,"intersectLine"),(0,d.K)(L,"sameSign"),(0,d.K)(N,"intersectPolygon");var B={node:S,circle:K,ellipse:v,polygon:N,rect:A},F=(0,d.K)((t,e,a,r,l)=>["M",t+l,e,"H",t+a-l,"A",l,l,"0 0 1",t+a,e+l,"V",e+r-l,"A",l,l,"0 0 1",t+a-l,e+r,"H",t+l,"A",l,l,"0 0 1",t,e+r-l,"V",e+l,"A",l,l,"0 0 1",t+l,e,"Z"].join(" "),"createRoundedRectPathD"),R=(0,d.K)(async(t,e,a,r=!1,i=!1)=>{let n=e||"";"object"==typeof n&&(n=n[0]);let s=(0,o.D7)(),h=(0,o.E)(s);return await (0,l.GZ)(t,n,{style:a,isTitle:r,useHtmlLabels:h,markdown:!1,isNode:i,width:1/0},s)},"createLabel");function P(t,e){let{labelStyles:a}=(0,r.GX)(e);e.labelStyle=a;let l=b(e),i=l;l||(i="anchor");let n=t.insert("g").attr("class",i).attr("id",e.domId||e.id),{cssStyles:o}=e,d=g.A.svg(n),c=(0,r.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(c.roughness=0);let y=d.circle(0,0,2,c),u=n.insert(()=>y,":first-child");return u.attr("class","anchor").attr("style",(0,s.KL)(o)),m(e,u),e.intersect=function(t){return h.R.info("Circle intersect",e,1,t),B.circle(e,1,t)},n}function X(t,e,a,r,l,i,n){let s=Math.atan2(r-e,a-t),o=Math.sqrt(((a-t)/2/l)**2+((r-e)/2/i)**2);if(o>1)throw Error("The given radii are too small to create an arc between the points.");let h=Math.sqrt(1-o**2),d=(t+a)/2+h*i*Math.sin(s)*(n?-1:1),c=(e+r)/2-h*l*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/l),y=Math.atan2((r-c)/i,(a-d)/l)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let u=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+l*Math.cos(e),r=c+i*Math.sin(e);u.push({x:a,y:r})}return u}function G(t,e,a){let[r,l]=[e,a].sort((t,e)=>e-t);return l*(1-Math.sqrt(1-(t/r/2)**2))}async function I(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i,o=(0,d.K)(t=>t+s,"calcTotalHeight"),h=(0,d.K)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:c,bbox:y}=await w(t,e,b(e)),u=o(e?.height?e?.height:y.height),[p,f]=h(u),x=G(u,p,f),k=(e?.width?e?.width:y.width)+2*n+x-x,{cssStyles:M}=e,D=[{x:k/2,y:-u/2},{x:-k/2,y:-u/2},...X(-k/2,-u/2,-k/2,u/2,p,f,!1),{x:k/2,y:u/2},...X(k/2,u/2,k/2,-u/2,p,f,!0)],A=g.A.svg(c),S=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let v=$(D),K=A.path(v,S),C=c.insert(()=>K,":first-child");return C.attr("class","basic label-container outer-path"),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/2}, 0)`),m(e,C),e.intersect=function(t){return B.polygon(e,D,t)},c}async function W(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e)),h=a?.nodeBorder??a?.lineColor??"currentColor",c=e.padding??12,y=Math.max(s.width+2*c,e.width??0,80),u=Math.max(Math.min(.08*y,12),5),p=Math.max(s.height+2*c+u,e.height??0),f=-p/2+u,x=p/2,$=.72*y,k=`M${-y/2},${f} L${-$/2},${x} A${$/2},${u} 0 0 0 ${$/2},${x} L${y/2},${f} A${y/2},${u} 0 0 0 ${-y/2},${f} Z`,{cssStyles:M}=e,D=n.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){let t=g.A.svg(n).path(k,(0,r.Fr)(e,{}));D.node()?.appendChild(t),M&&D.attr("style",M)}else D.append("path").attr("d",k).attr("style",i);D.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",y/2).attr("ry",u).attr("style",`fill:none;stroke:${h};stroke-width:1px`),m(e,D);let A=f+(x-f)/2;o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${A-s.height/2-(s.y-(s.top??0))})`);let S=(0,d.K)((t,e,a)=>Array.from({length:13},(r,l)=>{let i=Math.PI-l*Math.PI/12;return{x:t*Math.cos(i),y:e+a*u*Math.sin(i)}}),"arc"),v=[...S(y/2,f,-1),...S($/2,x,1).reverse()];return e.intersect=function(t){return B.polygon(e,v,t)},n}function H(t){let{themeVariables:e}=(0,o.D7)(),a=e.clusterBkg,r=e.clusterBorder;return"flow"===t?{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"}:{rx:8,fill:a,stroke:r,cssClass:"collapsed-group"}}async function T(t,e){let a,l=H(e.metadata?.containerType),{fill:i,stroke:h}=l,{nodeStyles:d}=(0,r.GX)(e),{shapeSvg:c,bbox:y}=await w(t,e,b(e)),{theme:u,themeVariables:p}=(0,o.D7)();(0,n.XE)(c,e.colorIndex,u,p.borderColorArray);let f=e.padding??8,x=y.height,$=Math.max(y.width+2*f,80,e?.width??0),k=Math.max(x+8+20+2*f,e?.height??0),M=-$/2,D=-k/2,A=c.select(".label");if(A&&(e.useHtmlLabels??(0,o.E)((0,o.D7)())?A.attr("transform",`translate(${-y.width/2}, ${-y.height/2+-14})`):A.attr("transform",`translate(0, ${-y.height/2+-14})`)),"handDrawn"===e.look){let t=g.A.svg(c),n=(0,r.Fr)(e,{fill:i,stroke:h,...void 0===l.strokeWidth?{}:{strokeWidth:l.strokeWidth},..."none"===i?{fillWeight:0}:{fillStyle:"solid"}}),o=t.path(F(M,D,$,k,l.rx),n);(a=c.insert(()=>o,":first-child")).attr("class","basic label-container "+l.cssClass).attr("style",(0,s.KL)(e.cssStyles))}else(a=c.insert("rect",":first-child")).attr("class","basic label-container "+l.cssClass).attr("style",d).attr("rx",l.rx).attr("ry",l.rx).attr("x",M).attr("y",D).attr("width",$).attr("height",k).attr("fill",i).attr("stroke",h),void 0!==l.strokeWidth&&a.attr("stroke-width",l.strokeWidth+"px");let S=D+f+x+8;c.append("line").attr("class","collapsed-separator").attr("x1",M+8).attr("y1",S).attr("x2",M+$-8).attr("y2",S).attr("stroke",h).attr("stroke-dasharray","3, 3");let v=S+10;for(let t=-1;t<=1;t++)c.append("circle").attr("class","collapsed-indicator").attr("cx",10*t).attr("cy",v).attr("r",2.5).attr("fill",h);return m(e,a),e.calcIntersect=function(t,e){return B.rect(t,e)},e.intersect=function(t){return B.rect(e,t)},c}function E(t,e,a,r){return t.insert("polygon",":first-child").attr("points",r.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}(0,d.K)(P,"anchor"),(0,d.K)(X,"generateArcPoints"),(0,d.K)(G,"calculateArcSagitta"),(0,d.K)(I,"bowTieRect"),(0,d.K)(W,"bucket"),(0,d.K)(H,"getCollapsedStyle"),(0,d.K)(T,"collapsedGroup"),(0,d.K)(E,"insertPolygonShape");var j=["right","left","up","down"],q="point",Z=(0,d.K)(t=>{let e=new Set;for(let a of t)switch(a){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(a)}return e},"expandAndDeduplicateDirections"),_=(0,d.K)(t=>j.filter(e=>t.has(e)).join("|")||q,"getDirectionKey"),z={"right|left|up|down":(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:0,y:0},{x:e,y:0},{x:r/2,y:2*a},{x:r-e,y:0},{x:r,y:0},{x:r,y:-t/3},{x:r+2*a,y:-t/2},{x:r,y:-2*t/3},{x:r,y:-t},{x:r-e,y:-t},{x:r/2,y:-t-2*a},{x:e,y:-t},{x:0,y:-t},{x:0,y:-2*t/3},{x:-2*a,y:-t/2},{x:0,y:-t/3}],"right|left|up|down"),"right|left|up":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:e,y:0},{x:a-e,y:0},{x:a,y:-t/2},{x:a-e,y:-t},{x:e,y:-t},{x:0,y:-t/2}],"right|left|up"),"right|left|down":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:0,y:0},{x:e,y:-t},{x:a-e,y:-t},{x:a,y:0}],"right|left|down"),"right|up|down":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:0,y:0},{x:a,y:-e},{x:a,y:-t+e},{x:0,y:-t}],"right|up|down"),"left|up|down":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:a,y:0},{x:0,y:-e},{x:0,y:-t+e},{x:a,y:-t}],"left|up|down"),"right|left":(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:e,y:0},{x:e,y:-a},{x:r-e,y:-a},{x:r-e,y:0},{x:r,y:-t/2},{x:r-e,y:-t},{x:r-e,y:-t+a},{x:e,y:-t+a},{x:e,y:-t},{x:0,y:-t/2}],"right|left"),"up|down":(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:r/2,y:0},{x:0,y:-a},{x:e,y:-a},{x:e,y:-t+a},{x:0,y:-t+a},{x:r/2,y:-t},{x:r,y:-t+a},{x:r-e,y:-t+a},{x:r-e,y:-a},{x:r,y:-a}],"up|down"),"right|up":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:0,y:0},{x:a,y:-e},{x:0,y:-t}],"right|up"),"right|down":(0,d.K)(({height:t,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-t}],"right|down"),"left|up":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:a,y:0},{x:0,y:-e},{x:a,y:-t}],"left|up"),"left|down":(0,d.K)(({height:t,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-t}],"left|down"),right:(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:e,y:-a},{x:e,y:-a},{x:r-e,y:-a},{x:r-e,y:0},{x:r,y:-t/2},{x:r-e,y:-t},{x:r-e,y:-t+a},{x:e,y:-t+a},{x:e,y:-t+a}],"right"),left:(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:e,y:0},{x:e,y:-a},{x:r-e,y:-a},{x:r-e,y:-t+a},{x:e,y:-t+a},{x:e,y:-t},{x:0,y:-t/2}],"left"),up:(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:e,y:-a},{x:e,y:-t+a},{x:0,y:-t+a},{x:r/2,y:-t},{x:r,y:-t+a},{x:r-e,y:-t+a},{x:r-e,y:-a}],"up"),down:(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:r/2,y:0},{x:0,y:-a},{x:e,y:-a},{x:e,y:-t+a},{x:r-e,y:-t+a},{x:r-e,y:-a},{x:r,y:-a}],"down"),[q]:()=>[{x:0,y:0}]},O=(0,d.K)((t,e,a,r)=>{let l=Z(t),i=(a.padding??0)/2,n=e.height+4*i,s=n/2,o=r??e.width+2*s+2*i;return(z[_(l)]??z[q])({height:n,midpoint:s,padding:i,width:o})},"getArrowPoints");async function V(t,e){let{shapeSvg:a,bbox:r}=await w(t,e,b(e)),l=e.padding??0,i=r.height+2*l,n=i/2,s=r.width+2*n+l,o=e.width??0,h=e.positioned&&(e.widthInColumns??1)>1&&o>s?o:s,d=O(e.directions??[],r,e,h),c=E(a,h,i,d);return c.attr("style",e.style??null),m(e,c),e.intersect=function(t){return B.polygon(e,d,t)},a}async function Y(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e)),h=a?.nodeBorder??a?.lineColor??"currentColor",d=e.padding??12,c=Math.max(s.width+2*d,e.width??0,90),y=Math.max(s.height+2*d+18,e.height??0),u=-y/2,{cssStyles:p}=e,f=n.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){let t=g.A.svg(n).path(F(-c/2,u,c,y,12),(0,r.Fr)(e,{}));f.node()?.appendChild(t),p&&f.attr("style",p)}else f.append("rect").attr("x",-c/2).attr("y",u).attr("width",c).attr("height",y).attr("rx",12).attr("ry",12).attr("style",i);f.append("line").attr("x1",-c/2).attr("y1",u+18).attr("x2",c/2).attr("y2",u+18).attr("style",`stroke:${h};stroke-width:1px`);for(let t=0;t<3;t++)f.append("circle").attr("cx",-c/2+12+9*t).attr("cy",u+9).attr("r",2.5).attr("style",`fill:${h};stroke:none`);f.append("rect").attr("class","browser-address-bar").attr("x",-c/2+44).attr("y",u+4).attr("width",Math.max(c-56,10)).attr("height",10).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${h};stroke-width:1px;opacity:0.6`),m(e,f);let x=u+18+(y-18)/2;return o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${x-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return B.rect(e,t)},n}async function J(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?28:n,o="neo"===e.look?24:n,{shapeSvg:h,bbox:d}=await w(t,e,b(e)),c=(e?.width??d.width)+("neo"===e.look?2*s:s+12),y=(e?.height??d.height)+("neo"===e.look?2*o:o),u=-y,p=[{x:12,y:u},{x:c,y:u},{x:c,y:0},{x:0,y:0},{x:0,y:u+12},{x:12,y:u}],{cssStyles:f}=e;if("handDrawn"===e.look){let t=g.A.svg(h),l=(0,r.Fr)(e,{}),i=$(p),n=t.path(i,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${y/2})`),f&&a.attr("style",f)}else a=E(h,c,y,p);return i&&a.attr("style",i),m(e,a),e.intersect=function(t){return B.polygon(e,p,t)},h}function U(t,e){let{nodeStyles:a}=(0,r.GX)(e);e.label="";let l=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:i}=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}],o=g.A.svg(l),h=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");let d=$(s),c=o.path(d,h),y=l.insert(()=>c,":first-child");return i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return B.polygon(e,s,t)},l}async function Q(t,e,a){let l,{labelStyles:i,nodeStyles:n}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:o,bbox:d,halfPadding:c}=await w(t,e,b(e),{ignoreMinWidth:!0}),y=a?.padding??c,u=Math.sqrt(d.width**2+d.height**2)/2,p="neo"===e.look?u+16:u+y,{cssStyles:f}=e;if("handDrawn"===e.look){let t=g.A.svg(o),a=(0,r.Fr)(e,{}),i=t.circle(0,0,2*p,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(f))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",p).attr("cx",0).attr("cy",0);return m(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return B.circle(t,a,e)},e.intersect=function(t){return h.R.info("Circle intersect",e,p,t),B.circle(e,p,t)},o}async function tt(t,e){let a=["node",e.cssClasses,e.class].filter(Boolean).join(" "),{shapeSvg:r,bbox:l,halfPadding:i}=await w(t,e,a),n=r.insert("rect",":first-child"),s=e.padding??0,o=e.positioned?e.width??0:l.width+s,h=e.positioned?e.height??0:l.height+s,d=e.positioned?-o/2:-l.width/2-i,c=e.positioned?-h/2:-l.height/2-i;return n.attr("class","basic cluster composite label-container").attr("style",e.style??null).attr("rx",e.rx??null).attr("ry",e.ry??null).attr("x",d).attr("y",c).attr("width",o).attr("height",h),m(e,n),e.intersect=function(t){return B.rect(e,t)},r}async function te(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e)),h=a?.nodeBorder??a?.lineColor??"currentColor",d=e.padding??12,c=Math.max(s.width+2*d,e.width??0,90),y=Math.max(s.height+2*d+20,e.height??0),u=-y/2,{cssStyles:p}=e,f=n.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){let t=g.A.svg(n).path(F(-c/2,u,c,y,12),(0,r.Fr)(e,{}));f.node()?.appendChild(t),p&&f.attr("style",p)}else f.append("rect").attr("x",-c/2).attr("y",u).attr("width",c).attr("height",y).attr("rx",12).attr("ry",12).attr("style",i);f.append("text").attr("x",-c/2+12).attr("y",u+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${h}`).text(">_"),m(e,f);let x=u+20+(y-20)/2;return o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${x-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return B.rect(e,t)},n}function ta(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),r=2*t,l={x:r/2*e,y:r/2*a},i={x:-(r/2)*e,y:r/2*a},n={x:-(r/2)*e,y:-(r/2)*a},s={x:r/2*e,y:-(r/2)*a};return`M ${i.x},${i.y} L ${s.x},${s.y}
|
|
2
|
+
M ${l.x},${l.y} L ${n.x},${n.y}`}function tr(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a,e.label="";let i=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,o=g.A.svg(i),d=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let c=o.circle(0,0,2*n,d),y=ta(n),u=o.path(y,d),p=i.insert(()=>c,":first-child");return p.insert(()=>u),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),m(e,p),e.intersect=function(t){return h.R.info("crossedCircle intersect",e,{radius:n,point:t}),B.circle(e,n,t)},i}function tl(t,e,a,r=100,l=0,i=180){let n=[],s=l*Math.PI/180,o=(i*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*o,i=t+a*Math.cos(r),h=e+a*Math.sin(r);n.push({x:-i,y:-h})}return n}async function ti(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await w(t,e,b(e)),o="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,d=n.width+o,c=n.height+h,y=Math.max(5,.1*c),{cssStyles:u}=e,p=[...tl(d/2,-c/2,y,30,-90,0),{x:-d/2-y,y:y},...tl(d/2+2*y,-y,y,20,-180,-270),...tl(d/2+2*y,y,y,20,-90,-180),{x:-d/2-y,y:-c/2},...tl(d/2,c/2,y,20,0,90)],f=[{x:d/2,y:-c/2-y},{x:-d/2,y:-c/2-y},...tl(d/2,-c/2,y,20,-90,0),{x:-d/2-y,y:-y},...tl(d/2+.1*d,-y,y,20,-180,-270),...tl(d/2+.1*d,y,y,20,-90,-180),{x:-d/2-y,y:c/2},...tl(d/2,c/2,y,20,0,90),{x:-d/2,y:c/2+y},{x:d/2,y:c/2+y}],x=g.A.svg(i),k=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$(p).replace("Z",""),D=x.path(M,k),A=$(f),S=x.path(A,{...k}),v=i.insert("g",":first-child");return v.insert(()=>S,":first-child").attr("stroke-opacity",0),v.insert(()=>D,":first-child"),v.attr("class","text"),u&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${y}, 0)`),s.attr("transform",`translate(${-d/2+y-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),m(e,v),e.intersect=function(t){return B.polygon(e,f,t)},i}function tn(t,e,a,r=100,l=0,i=180){let n=[],s=l*Math.PI/180,o=(i*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*o,i=t+a*Math.cos(r),h=e+a*Math.sin(r);n.push({x:i,y:h})}return n}async function ts(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await w(t,e,b(e)),o="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,d=n.width+("neo"===e.look?2*o:o),c=n.height+("neo"===e.look?2*h:h),y=Math.max(5,.1*c),{cssStyles:u}=e,p=[...tn(d/2,-c/2,y,20,-90,0),{x:d/2+y,y:-y},...tn(d/2+2*y,-y,y,20,-180,-270),...tn(d/2+2*y,y,y,20,-90,-180),{x:d/2+y,y:c/2},...tn(d/2,c/2,y,20,0,90)],f=[{x:-d/2,y:-c/2-y},{x:d/2,y:-c/2-y},...tn(d/2,-c/2,y,20,-90,0),{x:d/2+y,y:-y},...tn(d/2+2*y,-y,y,20,-180,-270),...tn(d/2+2*y,y,y,20,-90,-180),{x:d/2+y,y:c/2},...tn(d/2,c/2,y,20,0,90),{x:d/2,y:c/2+y},{x:-d/2,y:c/2+y}],x=g.A.svg(i),k=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$(p).replace("Z",""),D=x.path(M,k),A=$(f),S=x.path(A,{...k}),v=i.insert("g",":first-child");return v.insert(()=>S,":first-child").attr("stroke-opacity",0),v.insert(()=>D,":first-child"),v.attr("class","text"),u&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${-y}, 0)`),s.attr("transform",`translate(${-d/2+(e.padding??0)/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),m(e,v),e.intersect=function(t){return B.polygon(e,f,t)},i}function to(t,e,a,r=100,l=0,i=180){let n=[],s=l*Math.PI/180,o=(i*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*o,i=t+a*Math.cos(r),h=e+a*Math.sin(r);n.push({x:-i,y:-h})}return n}async function th(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await w(t,e,b(e)),o="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,d=n.width+("neo"===e.look?2*o:o),c=n.height+("neo"===e.look?2*h:h),y=Math.max(5,.1*c),{cssStyles:u}=e,p=[...to(d/2,-c/2,y,30,-90,0),{x:-d/2-y,y:y},...to(d/2+2*y,-y,y,20,-180,-270),...to(d/2+2*y,y,y,20,-90,-180),{x:-d/2-y,y:-c/2},...to(d/2,c/2,y,20,0,90)],f=[...to(-d/2+y+y/2,-c/2,y,20,-90,-180),{x:d/2-y/2,y:y},...to(-d/2-y/2,-y,y,20,0,90),...to(-d/2-y/2,y,y,20,-90,0),{x:d/2-y/2,y:-y},...to(-d/2+y+y/2,c/2,y,30,-180,-270)],x=[{x:d/2,y:-c/2-y},{x:-d/2,y:-c/2-y},...to(d/2,-c/2,y,20,-90,0),{x:-d/2-y,y:-y},...to(d/2+2*y,-y,y,20,-180,-270),...to(d/2+2*y,y,y,20,-90,-180),{x:-d/2-y,y:c/2},...to(d/2,c/2,y,20,0,90),{x:-d/2,y:c/2+y},{x:d/2-y-y/2,y:c/2+y},...to(-d/2+y+y/2,-c/2,y,20,-90,-180),{x:d/2-y/2,y:y},...to(-d/2-y/2,-y,y,20,0,90),...to(-d/2-y/2,y,y,20,-90,0),{x:d/2-y/2,y:-y},...to(-d/2+y+y/2,c/2,y,30,-180,-270)],k=g.A.svg(i),M=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let D=$(p).replace("Z",""),A=k.path(D,M),S=$(f).replace("Z",""),v=k.path(S,M),K=$(x),C=k.path(K,{...M}),L=i.insert("g",":first-child");return L.insert(()=>C,":first-child").attr("stroke-opacity",0),L.insert(()=>A,":first-child"),L.insert(()=>v,":first-child"),L.attr("class","text"),u&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",l),L.attr("transform",`translate(${y-y/4}, 0)`),s.attr("transform",`translate(${-d/2+(e.padding??0)/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),m(e,L),e.intersect=function(t){return B.polygon(e,x,t)},i}async function td(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i,{shapeSvg:o,bbox:h}=await w(t,e,b(e)),d=Math.max(5,h.height+2*s,e?.height??0),c=d/2,y=Math.max(d/4,c-Math.sqrt(Math.max(0,c**2-(h.height/2)**2))),u=Math.max(20,h.width+2*n+2*y,(h.width+2*n)*1.25,e?.width??0),{cssStyles:p}=e,f=g.A.svg(o),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let k=u-c,D=d/4,A=[{x:k,y:0},{x:D,y:0},{x:0,y:d/2},{x:D,y:d},{x:k,y:d},...M(-k,-d/2,c,50,270,90)],S=$(A),v=f.path(S,x),K=o.insert(()=>v,":first-child");return K.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&K.selectChildren("path").attr("style",p),l&&"handDrawn"!==e.look&&K.selectChildren("path").attr("style",l),K.attr("transform",`translate(${-u/2}, ${-d/2})`),m(e,K),e.intersect=function(t){return B.polygon(e,A,t)},o}async function tc(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await w(t,e,b(e)),o=e.padding??20,h=Math.max(n.width+2*o,e.width??0,100),d=Math.min(Math.max(.23*h,16),56),c=.27*d,y=Math.max(n.height+2*o,e.height?e.height-(2*d-c):0),u=Math.min(.177*h,.45*y),p=y+2*d-c,f=-p/2,x=f+2*d-c,$=i.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:k}=e;if("handDrawn"===e.look){let t=g.A.svg(i),a=(0,r.Fr)(e,{}),l=t.path(F(-h/2,x,h,y,u),a),n=t.circle(0,f+d,2*d,a);$.insert(()=>n,":first-child"),$.insert(()=>l,":first-child"),k&&$.attr("style",k)}else $.append("rect").attr("x",-h/2).attr("y",x).attr("width",h).attr("height",y).attr("rx",u).attr("ry",u).attr("style",l),$.append("circle").attr("cx",0).attr("cy",f+d).attr("r",d).attr("style",l);m(e,$);let D=x+y/2;s.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${D-n.height/2-(n.y-(n.top??0))})`);let A=f+d,S=180*Math.asin(Math.min(1,(x-A)/d))/Math.PI,v=[...M(0,-A,d,24,180+S,-S),...M(-(-h/2+u),-(x+u),u,12,90,0),...M(-(-h/2+u),-(p/2-u),u,12,360,270),...M(-(h/2-u),-(p/2-u),u,12,270,180),...M(-(h/2-u),-(x+u),u,12,180,90)];return e.intersect=function(t){return B.polygon(e,v,t)},i}(0,d.K)(V,"block_arrow"),(0,d.K)(Y,"browser"),(0,d.K)(J,"card"),(0,d.K)(U,"choice"),(0,d.K)(Q,"circle"),(0,d.K)(tt,"composite"),(0,d.K)(te,"consoleWindow"),(0,d.K)(ta,"createLine"),(0,d.K)(tr,"crossedCircle"),(0,d.K)(tl,"generateCirclePoints"),(0,d.K)(ti,"curlyBraceLeft"),(0,d.K)(tn,"generateCirclePoints"),(0,d.K)(ts,"curlyBraceRight"),(0,d.K)(to,"generateCirclePoints"),(0,d.K)(th,"curlyBraces"),(0,d.K)(td,"curvedTrapezoid"),(0,d.K)(tc,"person");var tg=(0,d.K)((t,e,a,r,l,i)=>`M${t},${e+i} a${l},${i} 0,0,0 ${a},0 a${l},${i} 0,0,0 ${-a},0 l0,${r} a${l},${i} 0,0,0 ${a},0 l0,${-r}`,"createCylinderPathD"),ty=(0,d.K)((t,e,a,r,l,i)=>`M${t},${e+i} M${t+a},${e+i} a${l},${i} 0,0,0 ${-a},0 l0,${r} a${l},${i} 0,0,0 ${a},0 l0,${-r}`,"createOuterCylinderPathD"),tu=(0,d.K)((t,e,a,r,l,i)=>`M${t-a/2},${-r/2} a${l},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tp(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,o="neo"===e.look?24:n,h="neo"===e.look?24:n,d=e.width??0;e.width&&(e.width=e.width-h,e.width<8&&(e.width=8)),e.height&&(e.height=e.height-o-d/2/(2.5+d/50)*3,e.height<8&&(e.height=8));let{shapeSvg:c,bbox:y,label:u}=await w(t,e,b(e)),p=Math.max(e.width??0,y.width)+h,f=p/2,x=f/(2.5+p/50),$=Math.max(e.height??0,y.height)+o+x,{cssStyles:k}=e;if("handDrawn"===e.look){let t=g.A.svg(c),l=ty(0,0,p,$,f,x),i=tu(0,x,p,$,f,x),n=(0,r.Fr)(e,{}),s=t.path(l,n),o=t.path(i,(0,r.Fr)(e,{fill:"none"}));a=c.insert(()=>o,":first-child"),(a=c.insert(()=>s,":first-child")).attr("class","basic label-container"),k&&a.attr("style",k)}else{let t=tg(0,0,p,$,f,x);a=c.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(k)).attr("style",i)}return a.attr("label-offset-y",x),a.attr("transform",`translate(${-p/2}, ${-($/2+x)})`),m(e,a),u.attr("transform",`translate(${-(y.width/2)-(y.x-(y.left??0))}, ${-(y.height/2)+(e.padding??0)/1.5-(y.y-(y.top??0))})`),e.intersect=function(t){let a=B.rect(e,t),r=a.x-(e.x??0);if(0!=f&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-x)){let l=x*x*(1-r*r/(f*f));l>0&&(l=Math.sqrt(l)),l=x-l,t.y-(e.y??0)>0&&(l=-l),a.y+=l}return a},c}async function tf(t,e,a){let l,{labelStyles:i,nodeStyles:n}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:o,bbox:h}=await w(t,e,b(e)),d=Math.max(h.width+2*a.labelPaddingX,e?.width||0),c=Math.max(h.height+2*a.labelPaddingY,e?.height||0),y=-d/2,u=-c/2,{rx:p,ry:f}=e,{cssStyles:x}=e;if(a?.rx&&a.ry&&(p=a.rx,f=a.ry),"handDrawn"===e.look){let t=g.A.svg(o),a=(0,r.Fr)(e,{}),i=p||f?t.path(F(y,u,d,c,p||0),a):t.rectangle(y,u,d,c,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(x))}else(l=o.insert("rect",":first-child")).attr("class","basic label-container").attr("style",n).attr("rx",(0,s.KL)(p)).attr("ry",(0,s.KL)(f)).attr("x",y).attr("y",u).attr("width",d).attr("height",c);return m(e,l,"handDrawn"===e.look?void 0:{width:d,height:c}),e.calcIntersect=function(t,e){return B.rect(t,e)},e.intersect=function(t){return B.rect(e,t)},o}async function tw(t,e){let{cssClasses:a,labelPaddingX:l,labelPaddingY:i,padding:n,width:s,height:o}=e,h=await tf(t,e,{rx:0,ry:0,classes:a??"",labelPaddingX:l??(n??0)*2,labelPaddingY:i??n??0});if("handDrawn"===e.look){let t=g.A.svg(h),a=(0,r.Fr)(e,{}),l=h.select(".basic.label-container > path:nth-child(2)"),i=l.node();if(!i)return h;let n=null;return i instanceof SVGGraphicsElement&&(n=i.getBBox(),h.insert(()=>t.line(n.x,n.y,n.x+n.width,n.y,a),".basic.label-container g.label"),h.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()),h}let d=h.select(".basic.label-container"),c=(Number(d.attr("width"))||s)??0,y=(Number(d.attr("height"))||o)??0;return c>0&&y>0&&d.attr("stroke-dasharray",`${c} ${y}`),h}async function tx(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i="neo"===e.look?16:e.padding??0,n="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:o,label:h}=await w(t,e,b(e)),d=o.width+i,c=o.height+n,y=.2*c,u=-d/2,p=-c/2-y/2,{cssStyles:f}=e,x=g.A.svg(s),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=x.polygon([{x:u,y:p+y},{x:-u,y:p+y},{x:-u,y:-p},{x:u,y:-p},{x:u,y:p},{x:-u,y:p},{x:-u,y:p+y}].map(t=>[t.x,t.y]),$),M=s.insert(()=>k,":first-child");return M.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",f),l&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",l),h.attr("transform",`translate(${u+(e.padding??0)/2-(o.x-(o.left??0))}, ${p+y+(e.padding??0)/2-(o.y-(o.top??0))})`),m(e,M),e.intersect=function(t){return B.rect(e,t)},s}async function tm(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e),n="neo"===e.look?12:5;e.labelStyle=l;let o=e.padding??0,d="neo"===e.look?16:o,{shapeSvg:c,bbox:y}=await w(t,e,b(e),{ignoreMinWidth:!0}),u=Math.sqrt(y.width**2+y.height**2)/2,p=(e?.width?e?.width/2:u)+(d??0),f=p+n,{cssStyles:x}=e;if("handDrawn"===e.look){let t=g.A.svg(c),l=(0,r.Fr)(e,{roughness:.2,strokeWidth:2.5}),i=(0,r.Fr)(e,{roughness:.2,strokeWidth:1.5}),n=t.circle(0,0,2*f,l),o=t.circle(0,0,2*p,i);(a=c.insert("g",":first-child")).attr("class",(0,s.KL)(e.cssClasses)).attr("style",(0,s.KL)(x)),a.node()?.appendChild(n),a.node()?.appendChild(o)}else{let t=(a=c.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",f).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",p).attr("cx",0).attr("cy",0)}return m(e,a),e.intersect=function(t){return h.R.info("DoubleCircle intersect",e,f,t),B.circle(e,f,t)},c}async function tb(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,halfPadding:d}=await w(t,e,b(e)),{theme:c,themeVariables:y}=(0,o.D7)();(0,n.XE)(s,e.colorIndex,c,y.borderColorArray);let u=d??10,p=h.width/2+2*u,f=h.height/2+2*u,{cssStyles:x}=e;if("handDrawn"===e.look){let t=g.A.svg(s),l=(0,r.Fr)(e,{}),i=t.ellipse(0,0,2*p,2*f,l);(a=s.insert(()=>i,":first-child")).attr("class","basic label-container"),x&&a.attr("style",x)}else a=s.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",i).attr("rx",p).attr("ry",f).attr("cx",0).attr("cy",0);return e.width=2*p,e.height=2*f,m(e,a),e.calcIntersect=function(t,e){let a=t.width/2,r=t.height/2;return B.ellipse(t,a,r,e)},e.intersect=function(t){return B.ellipse(e,p,f,t)},s}function t$(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.label="",e.labelStyle=l;let n=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=g.A.svg(n),{nodeBorder:d}=a,c=(0,r.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(c.roughness=0);let y=o.circle(0,0,14,c),u=n.insert(()=>y,":first-child");return u.selectAll("path").attr("style",`fill: ${d} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),m(e,u),e.intersect=function(t){return h.R.info("filledCircle intersect",e,{radius:7,point:t}),B.circle(e,7,t)},n}async function tk(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?2*i:i;(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:d}=await w(t,e,b(e)),c=(e?.width?e?.width:o.width)+(n??0),y=e?.height?e?.height:c+o.height,u=[{x:0,y:-y},{x:y,y:-y},{x:y/2,y:0}],{cssStyles:p}=e,f=g.A.svg(s),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let k=$(u),M=f.path(k,x),D=s.insert(()=>M,":first-child").attr("transform",`translate(${-y/2}, ${y/2})`).attr("class","outer-path");return p&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",p),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),e.width=c,e.height=y,m(e,D),d.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-y/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return h.R.info("Triangle intersect",e,u,t),B.polygon(e,u,t)},s}async function tM(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e)),h=e.padding??12,d=Math.max(s.width+2*h,e.width??0,90),c=s.height+2*h,y=Math.max(Math.min(.16*c,14),8),u=Math.max(c+y,e.height??0),p=u-y,f=Math.max(.38*d,28),x=-u/2,$=[{x:-d/2,y:x},{x:-d/2+f,y:x},{x:-d/2+f,y:x+y},{x:d/2,y:x+y},{x:d/2,y:u/2},{x:-d/2,y:u/2}],k=[`M${$[0].x},${$[0].y}`,...$.slice(1).map(t=>`L${t.x},${t.y}`),"Z"].join(" "),{cssStyles:M}=e;if("handDrawn"===e.look){let t=g.A.svg(n).path(k,(0,r.Fr)(e,{}));a=n.insert(()=>t,":first-child").attr("class","basic label-container"),M&&a.attr("style",M)}else a=n.insert("path",":first-child").attr("d",k).attr("class","basic label-container").attr("style",i);return"handDrawn"===e.look?m(e,a):m(e,a,{width:d,height:u}),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${x+y+p/2-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return B.polygon(e,$,t)},n}function tD(t,e,{dir:a,config:{state:l,themeVariables:i}}){let{nodeStyles:n}=(0,r.GX)(e);e.label="";let s=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,h=Math.max(70,e?.width??0),d=Math.max(10,e?.height??0);("LR"===a||"RL"===a)&&(h=Math.max(10,e?.width??0),d=Math.max(70,e?.height??0));let c=-1*h/2,y=-1*d/2,u=g.A.svg(s),p=(0,r.Fr)(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let f=u.rectangle(c,y,h,d,p),w=s.insert(()=>f,":first-child");o&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",o),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),m(e,w);let x=l?.padding??0;return e.width&&e.height&&(e.width+=x/2||0,e.height+=x/2||0),e.intersect=function(t){return B.rect(e,t)},s}async function tA(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i="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*i,e.width<15&&(e.width=15));let{shapeSvg:s,bbox:o}=await w(t,e,b(e)),d=(e?.height?e?.height:Math.max(10,o.height))+2*n,c=d/2,y=c-Math.sqrt(Math.max(0,c**2-(o.height/2)**2)),u=(e?.width?e?.width:Math.max(15,o.width)+2*y)+2*i,{cssStyles:p}=e,f=g.A.svg(s),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let k=[{x:-u/2,y:-d/2},{x:u/2-c,y:-d/2},...M(-u/2+c,0,c,50,90,270),{x:u/2-c,y:d/2},{x:-u/2,y:d/2}],D=$(k),A=f.path(D,x),S=s.insert(()=>A,":first-child");return S.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",p),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),m(e,S),e.intersect=function(t){return h.R.info("Pill intersect",e,{radius:c,point:t}),B.polygon(e,k,t)},s}(0,d.K)(tp,"cylinder"),(0,d.K)(tf,"drawRect"),(0,d.K)(tw,"datastore"),(0,d.K)(tx,"dividedRectangle"),(0,d.K)(tm,"doublecircle"),(0,d.K)(tb,"usecaseEllipse"),(0,d.K)(t$,"filledCircle"),(0,d.K)(tk,"flippedTriangle"),(0,d.K)(tM,"folder"),(0,d.K)(tD,"forkJoin"),(0,d.K)(tA,"halfRoundedRectangle");var tS=(0,d.K)((t,e,a,r,l)=>`M${t+l},${e} L${t+a-l},${e} L${t+a},${e-r/2} L${t+a-l},${e-r} L${t+l},${e-r} L${t},${e-r/2} Z`,"createHexagonPathD");async function tv(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e),n="neo"===e.look?3.5:4;e.labelStyle=l;let s=e.padding??0,o="neo"===e.look?70:s,h="neo"===e.look?32:s;if(e.width||e.height){let t=e.height??0;e.width=(e?.width??0)-t/n*2-h,e.height=(e.height??0)-o}let{shapeSvg:d,bbox:c}=await w(t,e,b(e)),y=(e?.height?e?.height:c.height)+o,u=y/n,p=(e?.width?e?.width:c.width)+2*u+h,f=[{x:u,y:0},{x:p-u,y:0},{x:p,y:-y/2},{x:p-u,y:-y},{x:u,y:-y},{x:0,y:-y/2}],{cssStyles:x}=e;if("handDrawn"===e.look){let t=g.A.svg(d),l=(0,r.Fr)(e,{}),i=tS(0,0,p,y,u),n=t.path(i,l);a=d.insert(()=>n,":first-child").attr("transform",`translate(${-p/2}, ${y/2})`),x&&a.attr("style",x)}else a=E(d,p,y,f);return i&&a.attr("style",i),e.width=p,e.height=y,m(e,a),e.intersect=function(t){return B.polygon(e,f,t)},d}async function tK(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.label="",e.labelStyle=a;let{shapeSvg:i}=await w(t,e,b(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,d=g.A.svg(i),c=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let y=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],u=$(y),p=d.path(u,c),f=i.insert(()=>p,":first-child");return f.attr("class","basic label-container outer-path"),o&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",l),f.attr("transform",`translate(${-n/2}, ${-s/2})`),m(e,f),e.intersect=function(t){return h.R.info("Pill intersect",e,{points:y}),B.polygon(e,y,t)},i}async function tC(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:d,label:c}=await w(t,e,"icon-shape default"),y="t"===e.pos,{nodeBorder:u}=a,{stylesMap:p}=(0,r.WW)(e),f=-s/2,x=-s/2,b=8*!!e.label,$=g.A.svg(o),k=(0,r.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$.rectangle(f,x,s,s,k),D=Math.max(s,d.width),A=s+d.height+b,S=$.rectangle(-D/2,-A/2,D,A,{...k,fill:"transparent",stroke:"none"}),v=o.insert(()=>M,":first-child"),K=o.insert(()=>S);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),r=a.width,l=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-r/2-n},${y?d.height/2+b/2-l/2-h:-d.height/2-b/2-l/2-h})`),t.attr("style",`color: ${p.get("stroke")??u};`)}return c.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${y?-A/2:A/2-d.height})`),v.attr("transform",`translate(0,${y?d.height/2+b/2:-d.height/2-b/2})`),m(e,K),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return B.rect(e,t);let a=e.x??0,r=e.y??0,l=e.height??0,i=[];return i=y?[{x:a-d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2+d.height+b},{x:a+s/2,y:r-l/2+d.height+b},{x:a+s/2,y:r+l/2},{x:a-s/2,y:r+l/2},{x:a-s/2,y:r-l/2+d.height+b},{x:a-d.width/2,y:r-l/2+d.height+b}]:[{x:a-s/2,y:r-l/2},{x:a+s/2,y:r-l/2},{x:a+s/2,y:r-l/2+s},{x:a+d.width/2,y:r-l/2+s},{x:a+d.width/2/2,y:r+l/2},{x:a-d.width/2,y:r+l/2},{x:a-d.width/2,y:r-l/2+s},{x:a-s/2,y:r-l/2+s}],B.polygon(e,i,t)},o}async function tL(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:d,label:c}=await w(t,e,"icon-shape default"),y=8*!!e.label,u="t"===e.pos,{nodeBorder:p,mainBkg:f}=a,{stylesMap:x}=(0,r.WW)(e),b=g.A.svg(o),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid"),$.stroke=x.get("fill")??f;let k=o.append("g");e.icon&&k.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let M=k.node().getBBox(),D=M.width,A=M.height,S=M.x,v=M.y,K=Math.max(D,A)*Math.SQRT2+40,C=b.circle(0,0,K,$),L=Math.max(K,d.width),N=K+d.height+y,F=b.rectangle(-L/2,-N/2,L,N,{...$,fill:"transparent",stroke:"none"}),R=o.insert(()=>C,":first-child"),P=o.insert(()=>F);return k.attr("transform",`translate(${-D/2-S},${u?d.height/2+y/2-A/2-v:-d.height/2-y/2-A/2-v})`),k.attr("style",`color: ${x.get("stroke")??p};`),c.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${u?-N/2:N/2-d.height})`),R.attr("transform",`translate(0,${u?d.height/2+y/2:-d.height/2-y/2})`),m(e,P),e.intersect=function(t){return h.R.info("iconSquare intersect",e,t),B.rect(e,t)},o}async function tN(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:d,halfPadding:c,label:y}=await w(t,e,"icon-shape default"),u="t"===e.pos,p=s+2*c,f=s+2*c,{nodeBorder:x,mainBkg:b}=a,{stylesMap:$}=(0,r.WW)(e),k=8*!!e.label,M=g.A.svg(o),D=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid"),D.stroke=$.get("fill")??b;let A=M.path(F(-f/2,-p/2,f,p,5),D),S=Math.max(f,d.width),v=p+d.height+k,K=M.rectangle(-S/2,-v/2,S,v,{...D,fill:"transparent",stroke:"none"}),C=o.insert(()=>A,":first-child").attr("class","icon-shape2"),L=o.insert(()=>K);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),r=a.width,l=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-r/2-n},${u?d.height/2+k/2-l/2-h:-d.height/2-k/2-l/2-h})`),t.attr("style",`color: ${$.get("stroke")??x};`)}return y.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${u?-v/2:v/2-d.height})`),C.attr("transform",`translate(0,${u?d.height/2+k/2:-d.height/2-k/2})`),m(e,L),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return B.rect(e,t);let a=e.x??0,r=e.y??0,l=e.height??0,i=[];return i=u?[{x:a-d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2+d.height+k},{x:a+f/2,y:r-l/2+d.height+k},{x:a+f/2,y:r+l/2},{x:a-f/2,y:r+l/2},{x:a-f/2,y:r-l/2+d.height+k},{x:a-d.width/2,y:r-l/2+d.height+k}]:[{x:a-f/2,y:r-l/2},{x:a+f/2,y:r-l/2},{x:a+f/2,y:r-l/2+p},{x:a+d.width/2,y:r-l/2+p},{x:a+d.width/2/2,y:r+l/2},{x:a-d.width/2,y:r+l/2},{x:a-d.width/2,y:r-l/2+p},{x:a-f/2,y:r-l/2+p}],B.polygon(e,i,t)},o}async function tB(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:d,halfPadding:c,label:y}=await w(t,e,"icon-shape default"),u="t"===e.pos,p=s+2*c,f=s+2*c,{nodeBorder:x,mainBkg:b}=a,{stylesMap:$}=(0,r.WW)(e),k=8*!!e.label,M=g.A.svg(o),D=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid"),D.stroke=$.get("fill")??b;let A=M.path(F(-f/2,-p/2,f,p,.1),D),S=Math.max(f,d.width),v=p+d.height+k,K=M.rectangle(-S/2,-v/2,S,v,{...D,fill:"transparent",stroke:"none"}),C=o.insert(()=>A,":first-child"),L=o.insert(()=>K);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),r=a.width,l=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-r/2-n},${u?d.height/2+k/2-l/2-h:-d.height/2-k/2-l/2-h})`),t.attr("style",`color: ${$.get("stroke")??x};`)}return y.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${u?-v/2:v/2-d.height})`),C.attr("transform",`translate(0,${u?d.height/2+k/2:-d.height/2-k/2})`),m(e,L),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return B.rect(e,t);let a=e.x??0,r=e.y??0,l=e.height??0,i=[];return i=u?[{x:a-d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2+d.height+k},{x:a+f/2,y:r-l/2+d.height+k},{x:a+f/2,y:r+l/2},{x:a-f/2,y:r+l/2},{x:a-f/2,y:r-l/2+d.height+k},{x:a-d.width/2,y:r-l/2+d.height+k}]:[{x:a-f/2,y:r-l/2},{x:a+f/2,y:r-l/2},{x:a+f/2,y:r-l/2+p},{x:a+d.width/2,y:r-l/2+p},{x:a+d.width/2/2,y:r+l/2},{x:a-d.width/2,y:r+l/2},{x:a-d.width/2,y:r-l/2+p},{x:a-f/2,y:r-l/2+p}],B.polygon(e,i,t)},o}async function tF(t,e,{config:{flowchart:a}}){let l=new Image;l.src=e?.img??"",await l.decode();let i=Number(l.naturalWidth.toString().replace("px","")),n=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/n;let{labelStyles:s}=(0,r.GX)(e);e.labelStyle=s;let o=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let d=Math.max(e.label?o??0:0,e?.assetWidth??i),c="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:d,y="on"===e.constraint?c/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(c,o??0);let{shapeSvg:u,bbox:p,label:f}=await w(t,e,"image-shape default"),x="t"===e.pos,b=-c/2,$=8*!!e.label,k=g.A.svg(u),M=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let D=k.rectangle(b,-y/2,c,y,M),A=Math.max(c,p.width),S=y+p.height+$,v=k.rectangle(-A/2,-S/2,A,S,{...M,fill:"none",stroke:"none"}),K=u.insert(()=>D,":first-child"),C=u.insert(()=>v);if(e.img){let t=u.append("image");t.attr("href",e.img),t.attr("width",c),t.attr("height",y),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-c/2},${x?S/2-y:-S/2})`)}return f.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-y/2-p.height/2-$/2:y/2-p.height/2+$/2})`),K.attr("transform",`translate(0,${x?p.height/2+$/2:-p.height/2-$/2})`),m(e,C),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return B.rect(e,t);let a=e.x??0,r=e.y??0,l=e.height??0,i=[];return i=x?[{x:a-p.width/2,y:r-l/2},{x:a+p.width/2,y:r-l/2},{x:a+p.width/2,y:r-l/2+p.height+$},{x:a+c/2,y:r-l/2+p.height+$},{x:a+c/2,y:r+l/2},{x:a-c/2,y:r+l/2},{x:a-c/2,y:r-l/2+p.height+$},{x:a-p.width/2,y:r-l/2+p.height+$}]:[{x:a-c/2,y:r-l/2},{x:a+c/2,y:r-l/2},{x:a+c/2,y:r-l/2+y},{x:a+p.width/2,y:r-l/2+y},{x:a+p.width/2/2,y:r+l/2},{x:a-p.width/2,y:r+l/2},{x:a-p.width/2,y:r-l/2+y},{x:a-c/2,y:r-l/2+y}],B.polygon(e,i,t)},u}async function tR(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:o,bbox:h}=await w(t,e,b(e)),d=Math.max(h.height+2*n,e.height??0),c=Math.max(h.width+2*s,(e.width??0)-d),y=[{x:0,y:0},{x:c,y:0},{x:c+3*d/6,y:-d},{x:-3*d/6,y:-d}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=g.A.svg(o),l=(0,r.Fr)(e,{}),i=$(y),n=t.path(i,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),u&&a.attr("style",u)}else a=E(o,c,d,y);return i&&a.attr("style",i),e.width=c,e.height=d,m(e,a),e.intersect=function(t){return B.polygon(e,y,t)},o}async function tP(t,e){let{shapeSvg:a,bbox:r,label:l}=await w(t,e,"label"),i=a.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),l.attr("transform",`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),m(e,i),e.intersect=function(t){return B.rect(e,t)},a}async function tX(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:o,bbox:h}=await w(t,e,b(e)),d=Math.max(h.height+n,e.height??0),c=Math.max(h.width+s,(e.width??0)-d),y=[{x:0,y:0},{x:c+3*d/6,y:0},{x:c,y:-d},{x:-(3*d)/6,y:-d}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=g.A.svg(o),l=(0,r.Fr)(e,{}),i=$(y),n=t.path(i,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),u&&a.attr("style",u)}else a=E(o,c,d,y);return i&&a.attr("style",i),e.width=c,e.height=d,m(e,a),e.intersect=function(t){return B.polygon(e,y,t)},o}async function tG(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:o,bbox:h}=await w(t,e,b(e)),d=Math.max(h.height+n,e.height??0),c=Math.max(h.width+s,(e.width??0)-d),y=[{x:-3*d/6,y:0},{x:c,y:0},{x:c+3*d/6,y:-d},{x:0,y:-d}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=g.A.svg(o),l=(0,r.Fr)(e,{}),i=$(y),n=t.path(i,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),u&&a.attr("style",u)}else a=E(o,c,d,y);return i&&a.attr("style",i),e.width=c,e.height=d,m(e,a),e.intersect=function(t){return B.polygon(e,y,t)},o}function tI(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.label="",e.labelStyle=a;let i=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),d=[{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}],c=g.A.svg(i),y=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let u=$(d),p=c.path(u,y),f=i.insert(()=>p,":first-child");return f.attr("class","outer-path"),n&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",n),l&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",l),f.attr("transform",`translate(-${s/2},${-o})`),m(e,f),e.intersect=function(t){return h.R.info("lightningBolt intersect",e,t),B.polygon(e,d,t)},i}(0,d.K)(tv,"hexagon"),(0,d.K)(tK,"hourglass"),(0,d.K)(tC,"icon"),(0,d.K)(tL,"iconCircle"),(0,d.K)(tN,"iconRounded"),(0,d.K)(tB,"iconSquare"),(0,d.K)(tF,"imageSquare"),(0,d.K)(tR,"inv_trapezoid"),(0,d.K)(tP,"labelRect"),(0,d.K)(tX,"lean_left"),(0,d.K)(tG,"lean_right"),(0,d.K)(tI,"lightningBolt");var tW=(0,d.K)((t,e,a,r,l,i,n)=>`M${t},${e+i} a${l},${i} 0,0,0 ${a},0 a${l},${i} 0,0,0 ${-a},0 l0,${r} a${l},${i} 0,0,0 ${a},0 l0,${-r} M${t},${e+i+n} a${l},${i} 0,0,0 ${a},0`,"createCylinderPathD"),tH=(0,d.K)((t,e,a,r,l,i,n)=>`M${t},${e+i} M${t+a},${e+i} a${l},${i} 0,0,0 ${-a},0 l0,${r} a${l},${i} 0,0,0 ${a},0 l0,${-r} M${t},${e+i+n} a${l},${i} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tT=(0,d.K)((t,e,a,r,l,i)=>`M${t-a/2},${-r/2} a${l},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tE(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,o="neo"===e.look?16:n,h="neo"===e.look?24:n;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-o,e.width<10&&(e.width=10),e.height=(e.height??0)-h-t/2/(2.5+t/50)*3,e.height<10&&(e.height=10)}let{shapeSvg:d,bbox:c,label:y}=await w(t,e,b(e)),u=(e?.width?e?.width:c.width)+2*o,p=u/2,f=p/(2.5+u/50),x=(e?.height?e?.height:c.height)+f+2*h,$=.1*x,{cssStyles:k}=e;if("handDrawn"===e.look){let t=g.A.svg(d),l=tH(0,0,u,x,p,f,$),i=tT(0,f,u,x,p,f),n=(0,r.Fr)(e,{}),s=t.path(l,n),o=t.path(i,n);d.insert(()=>o,":first-child").attr("class","line"),(a=d.insert(()=>s,":first-child")).attr("class","basic label-container"),k&&a.attr("style",k)}else{let t=tW(0,0,u,x,p,f,$);a=d.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(k)).attr("style",i)}return a.attr("label-offset-y",f),a.attr("transform",`translate(${-u/2}, ${-(x/2+f)})`),m(e,a),y.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),e.intersect=function(t){let a=B.rect(e,t),r=a.x-(e.x??0);if(0!=p&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-f)){let l=f*f*(1-r*r/(p*p));l>0&&(l=Math.sqrt(l)),l=f-l,t.y-(e.y??0)>0&&(l=-l),a.y+=l}return a},d}async function tj(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i;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:o,bbox:h,label:d}=await w(t,e,b(e)),c=(e?.width?e?.width:h.width)+(n??0)*2,y=(e?.height?e?.height:h.height)+(s??0)*2,u="neo"===e.look?y/4:y/8,p=y+u,{cssStyles:f}=e,x=g.A.svg(o),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let M=[{x:-c/2-c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:p/2},...k(-c/2-c/2*.1,p/2,c/2+c/2*.1,p/2,u,.8),{x:c/2+c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:-p/2},{x:-c/2,y:-p/2},{x:-c/2,y:p/2*1.1},{x:-c/2,y:-p/2}],D=x.polygon(M.map(t=>[t.x,t.y]),$),A=o.insert(()=>D,":first-child");return A.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",f),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),A.attr("transform",`translate(0,${-u/2})`),d.attr("transform",`translate(${-c/2+(e.padding??0)+c/2*.1/2-(h.x-(h.left??0))},${-y/2+(e.padding??0)-u-(h.y-(h.top??0))})`),m(e,A),e.intersect=function(t){return B.polygon(e,M,t)},o}(0,d.K)(tE,"linedCylinder"),(0,d.K)(tj,"linedWaveEdgedRect");var tq={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},tZ=Math.PI/3,t_=(0,d.K)((t,e)=>{let a=.6*e,r=e*Math.sqrt(.64),l=Math.cos(tZ),i=-Math.sin(tZ),n=-(a*i),s=t+a*l,o=r*l,h=r*i;return`M ${n-o} ${s-h} L ${n+o} ${s+h}`},"businessMarkerPathForCircle"),tz={normal:t_(-24,12),hollow:t_(-23,9),awesome:t_(-21,13),icon:"M 12 -8 L 26 -26"},tO=(0,d.K)((t,e,a)=>{let r=(e.x??0)-(e.left??0),l=(e.y??0)-(e.top??0);t.attr("transform",`translate(${-e.width/2-r},${a-e.height/2-l})`)},"positionLabel"),tV=(0,d.K)((t,e,a,l,i=!1)=>{if("handDrawn"===e.look){let n=g.A.svg(t).path(a,(0,r.Fr)(e,i?{fill:"none"}:{}));return t.insert(()=>n,":first-child").attr("class",l)}let n=t.append("path").attr("class",l).attr("d",a);return i&&n.attr("fill","none"),n},"appendActorPath"),tY=(0,d.K)((t,e,a,l,i,n,s=!1)=>{if("handDrawn"===e.look){let o=g.A.svg(t).circle(a,l,2*i,(0,r.Fr)(e,s?{fill:"none"}:{}));return t.insert(()=>o,":first-child").attr("class",n)}let o=t.append("circle").attr("class",n).attr("cx",a).attr("cy",l).attr("r",i);return s&&o.attr("fill","none"),o},"appendActorCircle"),tJ=(0,d.K)((t,e,a)=>{e.business&&t.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",tz[a]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function tU(t,e,a,l){let i,s,{labelStyles:h,nodeStyles:d}=(0,r.GX)(e);e.labelStyle=h;let c="icon"===a||void 0!==e.stereotype?{...e,icon:"icon"===a?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:g,bbox:y,label:u}=await w(t,c,b(e,`usecase-actor-variant usecase-actor-${a}`)),p=e.accessibleName??e.label;p&&g.attr("role","img").attr("aria-label",p),u.attr("class","label actor-label usecase-actor-label");let{theme:f,themeVariables:$}=(0,o.D7)();if((0,n.XE)(g,e.colorIndex,f,$.borderColorArray),e.stereotype){let t=await x(g,`\xab${e.stereotype}\xbb`,{labelStyle:h,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});i=t.label.attr("class","label usecase-stereotype"),s=t.bbox}let k=g.append("g").attr("class",`usecase-actor-glyph ${tq[a]}`).attr("style",d||null);await l(k,e),tJ(k,e,a);let M=e.padding??8,D=s?.height??0,A=80+y.height+(s?D+2:0),S=Math.max(56,y.width,s?.width??0)+2*M,v=A+2*M,K=-A/2;k.attr("transform",`translate(0,${K+36})`);let C=K+72+8;return i&&s&&(tO(i,s,C+=D/2),C+=D/2+2),tO(u,y,C+y.height/2),m(e,g.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-S/2).attr("y",-v/2).attr("width",S).attr("height",v).attr("opacity",0).attr("aria-hidden","true")),e.intersect=t=>B.rect(e,t),g}async function tQ(t,e){return tU(t,e,"normal",(t,e)=>{tV(t,e,"M 0 -12 C 6.627 -12 12 -17.373 12 -24 C 12 -30.627 6.627 -36 0 -36 C -6.627 -36 -12 -30.627 -12 -24 C -12 -17.373 -6.627 -12 0 -12 Z M 0 -12 V 8 M -17 -5 H 17 M 0 8 L -15 28 M 0 8 L 15 28","usecase-actor-stick")})}async function t0(t,e){return tU(t,e,"awesome",(t,e)=>{tV(t,e,"M 0 -34 C 7.18 -34 13 -28.18 13 -21 C 13 -13.82 7.18 -8 0 -8 C -7.18 -8 -13 -13.82 -13 -21 C -13 -28.18 -7.18 -34 0 -34 Z M -24 25 C -24 7 -14 -3 0 -3 C 14 -3 24 7 24 25 C 24 28 21 30 18 30 H -18 C -21 30 -24 28 -24 25 Z","usecase-actor-awesome-silhouette")})}async function t2(t,e){return tU(t,e,"hollow",(t,e)=>{tY(t,e,0,-23,9,"usecase-actor-hollow-head",!0),tV(t,e,"M -22 -10 H 22 V 0 H 6 L 22 17 L 13 28 L 0 13 L -13 28 L -22 17 L -6 0 H -22 Z","usecase-actor-hollow-body",!0)})}(0,d.K)(tU,"renderUsecaseActor"),(0,d.K)(tQ,"usecaseActor"),(0,d.K)(t0,"usecaseActorAwesome"),(0,d.K)(t2,"usecaseActorHollow");var t1=(0,d.K)(async(t,e)=>{if("handDrawn"===e.look){let a=g.A.svg(t).rectangle(-26,-28,52,52,(0,r.Fr)(e,{}));t.insert(()=>a,":first-child").attr("class","usecase-actor-icon-frame")}else t.append("rect").attr("class","usecase-actor-icon-frame").attr("x",-26).attr("y",-28).attr("width",52).attr("height",52).attr("rx",4).attr("ry",4);let a=e.icon??"",l=await (0,i.dn)(a.includes(":")?a:`fa:${a}`),n=await (0,i.WY)(a,{height:42,width:42,fallbackPrefix:"fa"}),s=t.append("g").attr("class",`usecase-actor-icon-symbol${l?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${n}</g>`),o=s.node()?.getBBox();o&&s.attr("transform",`translate(${-o.width/2-o.x},${-2-o.height/2-o.y})`)},"drawIconActor");async function t5(t,e){return tU(t,e,"icon",t1)}(0,d.K)(t5,"usecaseActorIcon");var t8=(0,d.K)((t,e,a)=>{let r=(e.x??0)-(e.left??0),l=(e.y??0)-(e.top??0);t.attr("transform",`translate(${-e.width/2-r},${a-e.height/2-l})`)},"positionLabel");async function t3(t,e){let a,l,i,{labelStyles:s,nodeStyles:h}=(0,r.GX)(e);e.labelStyle=s;let d=e.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:y,halfPadding:u,label:p}=await w(t,d,b(e,"usecase-business-shape"));p.attr("class","label usecase-label");let{theme:f,themeVariables:$}=(0,o.D7)();if((0,n.XE)(c,e.colorIndex,f,$.borderColorArray),e.stereotype){let t=await x(c,`\xab${e.stereotype}\xbb`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});a=t.label.attr("class","label usecase-stereotype"),l=t.bbox}let k=2*!!l,M=y.height+(l?.height??0)+k,D=Math.max(y.width,l?.width??0),A=u??10,S=D/2+2*A,v=M/2+2*A,K=Math.min(Math.max(A/5,1),A/2),C=D/2+K,L=S-K,N=C/S,F=L/S,R=v*Math.sqrt(Math.max(0,1-N*N)),P=-v*Math.sqrt(Math.max(0,1-F*F));if(a&&l&&t8(a,l,-M/2+l.height/2),t8(p,y,M/2-y.height/2),"handDrawn"===e.look){let t=g.A.svg(c).ellipse(0,0,2*S,2*v,(0,r.Fr)(e,{}));i=c.insert(()=>t,":first-child").attr("class","basic label-container usecase-business-ellipse")}else i=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",h).attr("rx",S).attr("ry",v).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${C} ${R} L ${L} ${P}`).attr("fill","none").attr("style",h||null);let X=e.accessibleName??e.label;return X&&c.attr("role","img").attr("aria-label",X),m(e,i),e.calcIntersect=(t,e)=>B.ellipse(t,t.width/2,t.height/2,e),e.intersect=t=>B.ellipse(e,S,v,t),c}(0,d.K)(t3,"usecaseBusiness");var t4=(0,d.K)((t,e,a,r)=>{let l=(e.x??0)-(e.left??0),i=(e.y??0)-(e.top??0);t.attr("transform",`translate(${a-e.width/2-l},${r-e.height/2-i})`)},"positionLabel"),t7=(0,d.K)(t=>{let e=Number.parseFloat(t??"");return Number.isFinite(e)&&e>=0?e:1},"numericStrokeWidth");async function t6(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e),{stylesMap:i}=(0,r.WW)(e);e.labelStyle=a;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e,"usecase-json-table"));n.attr("role","img"),e.accessibleName&&n.attr("aria-label",e.accessibleName),o.attr("class","label usecase-json-title");let h=n.append("g").attr("class","usecase-json-table-grid"),c=[];for(let t of e.jsonRows??[]){let r=await x(h,t.key,{labelStyle:a,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),l=await x(h,t.value,{labelStyle:a,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});c.push({key:{label:r.label.attr("class","label usecase-json-key"),bbox:r.bbox},value:{label:l.label.attr("class","label usecase-json-value"),bbox:l.bbox}})}let y=Math.max(0,...c.map(({key:t})=>t.bbox.width))+16,u=Math.max(0,...c.map(({value:t})=>t.bbox.width))+16,p=Math.max(s.width+16,y+u),f=u+Math.max(0,p-y-u),$=s.height+8,k=c.map(({key:t,value:e})=>Math.max(t.bbox.height,e.bbox.height)+8),M=$+k.reduce((t,e)=>t+e,0),D=t7(i.get("stroke-width")),A=p+2*D,S=M+2*D,v=-p/2,K=-M/2,C="handDrawn"===e.look?g.A.svg(n):void 0,L=C?(0,r.Fr)(e,{}):void 0,N=(0,d.K)((t,e,a,r,i,n)=>{if(C&&L){let l=C.rectangle(a,r,i,n,L);return t.insert(()=>l,":first-child").attr("class",e)}return t.insert("rect",":first-child").attr("class",e).attr("x",a).attr("y",r).attr("width",i).attr("height",n).attr("style",l)},"insertCell"),F=N(n,"label-container usecase-json-border",-A/2,-S/2,A,S);N(h,"usecase-json-cell usecase-json-title-cell",v,K,p,$),h.node()?.append(o.node()),t4(o,s,0,K+$/2);let R=K+$;return c.forEach(({key:t,value:e},a)=>{let r=k[a],l=h.append("g").attr("class","usecase-json-row").attr("data-row-index",a).attr("transform",`translate(0,${R})`);N(l,"usecase-json-cell usecase-json-key-cell",v,0,y,r),N(l,"usecase-json-cell usecase-json-value-cell",v+y,0,f,r),l.node()?.append(t.label.node(),e.label.node()),t4(t.label,t.bbox,v+y/2,r/2),t4(e.label,e.bbox,v+y+f/2,r/2),R+=r}),m(e,F),e.intersect=t=>B.rect(e,t),n}async function t9(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i,o="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n-2*o,10),e.height=Math.max((e?.height??0)-2*s-2*o,10));let{shapeSvg:h,bbox:d,label:c}=await w(t,e,b(e)),y=(e?.width?e?.width:d.width)+2*n+2*o,u=(e?.height?e?.height:d.height)+2*s+2*o,p=y-2*o,f=u-2*o,x=-p/2,k=-f/2,{cssStyles:M}=e,A=g.A.svg(h),S=(0,r.Fr)(e,{}),v=[{x:x-o,y:k+o},{x:x-o,y:k+f+o},{x:x+p-o,y:k+f+o},{x:x+p-o,y:k+f},{x:x+p,y:k+f},{x:x+p,y:k+f-o},{x:x+p+o,y:k+f-o},{x:x+p+o,y:k-o},{x:x+o,y:k-o},{x:x+o,y:k},{x,y:k},{x,y:k+o}];"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let K=$(v),C=A.path(K,S),L=$([{x,y:k+o},{x:x+p-o,y:k+o},{x:x+p-o,y:k+f},{x:x+p,y:k+f},{x:x+p,y:k},{x,y:k}]),N=A.path(L,S);"handDrawn"!==e.look&&(C=D(C),N=D(N));let F=h.insert("g",":first-child");return F.insert(()=>C),F.insert(()=>N),F.attr("class","basic label-container outer-path"),M&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",M),l&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",l),c.attr("transform",`translate(${-(d.width/2)-o-(d.x-(d.left??0))}, ${-(d.height/2)+o-(d.y-(d.top??0))})`),m(e,F),e.intersect=function(t){return B.polygon(e,v,t)},h}async function et(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await w(t,e,b(e)),o=e.padding??0,h="neo"===e.look?16:o,d="neo"===e.look?12:o,c=!0;(e.width||e.height)&&(c=!1,e.width=(e?.width??0)-2*h,e.height=(e?.height??0)-3*d);let y=Math.max(n.width,e?.width??0)+2*h,u=Math.max(n.height,e?.height??0)+3*d,p="neo"===e.look?u/4:u/8,f=u+(c?p/2:-p/2),x=-y/2,M=-f/2,{cssStyles:D}=e,A=k(x-10,M+f+10,x+y-10,M+f+10,p,.8),S=A?.[A.length-1],v=[{x:x-10,y:M+10},{x:x-10,y:M+f+10},...A,{x:x+y-10,y:S.y-10},{x:x+y,y:S.y-10},{x:x+y,y:S.y-20},{x:x+y+10,y:S.y-20},{x:x+y+10,y:M-10},{x:x+10,y:M-10},{x:x+10,y:M},{x,y:M},{x,y:M+10}],K=[{x,y:M+10},{x:x+y-10,y:M+10},{x:x+y-10,y:S.y-10},{x:x+y,y:S.y-10},{x:x+y,y:M},{x,y:M}],C=g.A.svg(i),L=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");let N=$(v),F=C.path(N,L),R=$(K),P=C.path(R,L),X=i.insert(()=>F,":first-child");return X.insert(()=>P),X.attr("class","basic label-container outer-path"),D&&"handDrawn"!==e.look&&X.selectAll("path").attr("style",D),l&&"handDrawn"!==e.look&&X.selectAll("path").attr("style",l),X.attr("transform",`translate(0,${-p/2})`),s.attr("transform",`translate(${-(n.width/2)-10-(n.x-(n.left??0))}, ${-(n.height/2)+10-p-(n.y-(n.top??0))})`),m(e,X),e.intersect=function(t){return B.polygon(e,v,t)},i}async function ee(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l,e.useHtmlLabels||(0,o.E)((0,o.zj)())||(e.centerLabel=!0);let{shapeSvg:n,bbox:s,label:h}=await w(t,e,b(e)),d=Math.max(s.width+(e.padding??0)*2,e?.width??0),c=Math.max(s.height+(e.padding??0)*2,e?.height??0),{cssStyles:y}=e,u=g.A.svg(n),p=(0,r.Fr)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let f=u.rectangle(-d/2,-c/2,d,c,p),x=n.insert(()=>f,":first-child");return x.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),y&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),h.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),m(e,x),e.intersect=function(t){return B.rect(e,t)},n}(0,d.K)(t6,"usecaseJsonTable"),(0,d.K)(t9,"multiRect"),(0,d.K)(et,"multiWaveEdgedRectangle"),(0,d.K)(ee,"note");var ea=(0,d.K)((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 er(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await w(t,e,b(e)),o=s.width+(e.padding??0)+(s.height+(e.padding??0)),h=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],{cssStyles:d}=e;if("handDrawn"===e.look){let t=g.A.svg(n),l=(0,r.Fr)(e,{}),i=ea(0,0,o),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-o/2+.5}, ${o/2})`),d&&a.attr("style",d)}else(a=E(n,o,o,h)).attr("transform",`translate(${-o/2+.5}, ${o/2})`);return i&&a.attr("style",i),m(e,a),e.calcIntersect=function(t,e){let a=t.width;return B.polygon(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e)},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function el(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?21:i??0,s="neo"===e.look?12:i??0,{shapeSvg:o,bbox:h,label:d}=await w(t,e,b(e)),c=h.width+("neo"===e.look?2*n:n),y=Math.max(h.height+("neo"===e.look?2*s:s),e.height??0),u=-Math.max(c,(e.width??0)-y/4)/2,p=-y/2,f=p/2,x=[{x:u+f,y:p},{x:u,y:0},{x:u+f,y:-p},{x:-u,y:-p},{x:-u,y:p}],{cssStyles:k}=e,M=g.A.svg(o),D=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let A=$(x),S=M.path(A,D),v=o.insert(()=>S,":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(${-f/2},0)`),d.attr("transform",`translate(${-f/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),m(e,v),e.intersect=function(t){return B.polygon(e,x,t)},o}async function ei(t,e){let a,l,i,{labelStyles:n,nodeStyles:s}=(0,r.GX)(e);e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";let d=t.insert("g").attr("class",a).attr("id",e.domId||e.id),y=d.insert("g"),u=d.insert("g").attr("class","label").attr("style",s),p=e.description,f=e.label,w=await R(u,f,e.labelStyle,!0,!0),x={width:0,height:0};if((0,o.E)((0,o.D7)())){let t=w.children[0],e=(0,c.Ltv)(w);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}h.R.info("Text 2",p);let b=p||[],$=w.getBBox(),k=await R(u,Array.isArray(b)?b.join("<br/>"):b,e.labelStyle,!0,!0),M=k.children[0],D=(0,c.Ltv)(k);x=M.getBoundingClientRect(),D.attr("width",x.width),D.attr("height",x.height);let A=(e.padding||0)/2;(0,c.Ltv)(k).attr("transform","translate( "+(x.width>$.width?0:($.width-x.width)/2)+", "+($.height+A+5)+")"),(0,c.Ltv)(w).attr("transform","translate( "+(x.width<$.width?0:-($.width-x.width)/2)+", 0)"),x=u.node().getBBox(),u.attr("transform","translate("+-x.width/2+", "+(-x.height/2-A+3)+")");let S=x.width+(e.padding||0),v=x.height+(e.padding||0),K=-x.width/2-A,C=-x.height/2-A;if("handDrawn"===e.look){let t=g.A.svg(d),a=(0,r.Fr)(e,{}),n=t.path(F(K,C,S,v,e.rx||0),a),s=t.line(-x.width/2-A,-x.height/2-A+$.height+A,x.width/2+A,-x.height/2-A+$.height+A,a);i=d.insert(()=>(h.R.debug("Rough node insert CXC",n),s),":first-child"),l=d.insert(()=>(h.R.debug("Rough node insert CXC",n),n),":first-child")}else l=y.insert("rect",":first-child"),i=y.insert("line"),l.attr("class","outer title-state").attr("style",s).attr("x",-x.width/2-A).attr("y",-x.height/2-A).attr("width",x.width+(e.padding||0)).attr("height",x.height+(e.padding||0)),i.attr("class","divider").attr("x1",-x.width/2-A).attr("x2",x.width/2+A).attr("y1",-x.height/2-A+$.height+A).attr("y2",-x.height/2-A+$.height+A);return m(e,l),e.intersect=function(t){return B.rect(e,t)},d}async function en(t,e,{config:{themeVariables:a}}){let r=a?.radius??5,l={rx:r,ry:r,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return tf(t,e,l)}async function es(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0,{shapeSvg:o,bbox:h,label:d}=await w(t,e,b(e)),c=(e?.width??h.width)+2*i+("neo"===e.look?8:16),y=(e?.height??h.height)+2*n,u=c-8,p=8-c/2,f=-y/2,{cssStyles:x}=e,$=g.A.svg(o),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$.polygon([{x:p,y:f},{x:p+u,y:f},{x:p+u,y:f+y},{x:p-8,y:f+y},{x:p-8,y:f},{x:p,y:f},{x:p,y:f+y}].map(t=>[t.x,t.y]),k),D=o.insert(()=>M,":first-child");return D.attr("class","basic label-container outer-path").attr("style",(0,s.KL)(x)),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),x&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),d.attr("transform",`translate(${4-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),m(e,D),e.intersect=function(t){return B.rect(e,t)},o}async function eo(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i;(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:o,bbox:h,label:d}=await w(t,e,b(e)),c=(e?.width?e?.width:h.width)+2*n,y=((e?.height?e?.height:h.height)+2*s)*1.5/1.5,u=-c/2,p=-y/2,{cssStyles:f}=e,x=g.A.svg(o),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:u,y:p},{x:u,y:p+y},{x:u+c,y:p+y},{x:u+c,y:p-y/2}],D=$(M),A=x.path(D,k),S=o.insert(()=>A,":first-child");return S.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",f),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),S.attr("transform",`translate(0, ${y/4})`),d.attr("transform",`translate(${-c/2+(e.padding??0)-(h.x-(h.left??0))}, ${-y/4+(e.padding??0)-(h.y-(h.top??0))})`),m(e,S),e.intersect=function(t){return B.polygon(e,M,t)},o}async function eh(t,e){let a=e.padding??0,r="neo"===e.look?16:2*a,l="neo"===e.look?12:a,i={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??r,labelPaddingY:l},s=await tf(t,e,i);if(void 0!==e.colorIndex){let{theme:t,themeVariables:a}=(0,o.D7)();(0,n.XE)(s,e.colorIndex,t,a.borderColorArray)}return s}(0,d.K)(er,"question"),(0,d.K)(el,"rect_left_inv_arrow"),(0,d.K)(ei,"rectWithTitle"),(0,d.K)(en,"roundedRect"),(0,d.K)(es,"shadedProcess"),(0,d.K)(eo,"slopedRect"),(0,d.K)(eh,"squareRect");var ed=(0,d.K)((t,e,a)=>{let r=t.height+a,l=r*Math.cos(Math.PI/98),i=Math.sqrt(Math.max(0,l**2-t.height**2));return{w:Math.max(t.width+r/4+e,1.5*r+(r-l),t.width+e+r-i),h:r}},"stadiumDimensions");async function ec(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?40:i,s="neo"===e.look?24:i,{shapeSvg:o,bbox:h}=await w(t,e,b(e)),{w:d,h:c}=ed(h,n,s),y=c/2,{cssStyles:u}=e,p=g.A.svg(o),f=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let x=[{x:-d/2+y,y:-c/2},{x:d/2-y,y:-c/2},...M(-d/2+y,0,y,50,90,270),{x:d/2-y,y:c/2},...M(d/2-y,0,y,50,270,450)],k=$(x),D=p.path(k,f),A=o.insert(()=>D,":first-child");return A.attr("class","basic label-container outer-path"),u&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",u),l&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",l),m(e,A),e.intersect=function(t){return B.polygon(e,x,t)},o}async function eg(t,e){let a={rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"};return tf(t,e,a)}function ey(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:o,nodeBorder:h,nodeShadow:d}=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 c=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),y=g.A.svg(c),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let p=y.circle(0,0,e.width,{...u,stroke:s,strokeWidth:2}),f=o??h,w=(e.width??0)*5/14,x=y.circle(0,0,w,{...u,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),b=c.insert(()=>p,":first-child");if(b.insert(()=>x),"handDrawn"!==e.look&&b.attr("class","outer-path"),n&&b.selectAll("path").attr("style",n),i&&b.selectAll("path").attr("style",i),e.width<25&&d&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";b.attr("style",`filter:url(#${a})`)}return m(e,b),e.intersect=function(t){return B.circle(e,(e.width??0)/2,t)},c}function eu(t,e,{config:{themeVariables:a}}){let l,{lineColor:i,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=g.A.svg(s).circle(0,0,e.width,(0,r.ue)(i));(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 m(e,l),e.intersect=function(t){return B.circle(e,(e.width??7)/2,t)},s}async function ep(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e?.padding??8,n="neo"===e.look?28:i,o="neo"===e.look?12:i,{shapeSvg:h,bbox:d}=await w(t,e,b(e)),c=Math.max(d.width+16+n,e.width??0),y=Math.max(d.height+o,e.height??0),u=c-16,p=-c/2,f=-y/2,x=[{x:0,y:0},{x:u,y:0},{x:u,y:-y},{x:0,y:-y},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-y},{x:-8,y:-y},{x:-8,y:0}];if("handDrawn"===e.look){let t=g.A.svg(h),a=(0,r.Fr)(e,{}),l=t.rectangle(p,f,u+16,y,a),i=t.line(p+8,f,p+8,f+y,a),n=t.line(p+8+u,f,p+8+u,f+y,a);h.insert(()=>i,":first-child"),h.insert(()=>n,":first-child");let o=h.insert(()=>l,":first-child"),{cssStyles:d}=e;o.attr("class","basic label-container").attr("style",(0,s.KL)(d)),m(e,o)}else{let t=E(h,u,y,x);l&&t.attr("style",l),m(e,t)}return e.intersect=function(t){return B.polygon(e,x,t)},h}async function ef(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i;(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:o,bbox:h}=await w(t,e,b(e)),d=(e?.height?e?.height:h.height)+2*s,c=.2*d,y=(e?.width?e?.width:h.width)+2*n+c-c,u=-y/2,p=-d/2,{cssStyles:f}=e,x=g.A.svg(o),k=(0,r.Fr)(e,{}),M=[{x:u-c/2,y:p},{x:u+y+c/2,y:p},{x:u+y+c/2,y:p+d},{x:u-c/2,y:p+d}];"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=$(M),A=x.path(D,k),S=$([{x:u+y-c/2,y:p+d},{x:u+y+c/2,y:p+d},{x:u+y+c/2,y:p+d-.2*d}]),v=x.path(S,{...k,fillStyle:"solid"}),K=o.insert(()=>v,":first-child");return K.insert(()=>A,":first-child"),K.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&K.selectAll("path").attr("style",f),l&&"handDrawn"!==e.look&&K.selectAll("path").attr("style",l),m(e,K),e.intersect=function(t){return B.polygon(e,M,t)},o}async function ew(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await w(t,e,b(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),d=h/8,c=.2*o,y=.2*h,u=h+d,{cssStyles:p}=e,f=g.A.svg(i),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let M=[{x:-o/2-o/2*.1,y:u/2},...k(-o/2-o/2*.1,u/2,o/2+o/2*.1,u/2,d,.8),{x:o/2+o/2*.1,y:-u/2},{x:-o/2-o/2*.1,y:-u/2}],D=-o/2+o/2*.1,A=-u/2-.4*y,S=[{x:D+o-c,y:(A+h)*1.3},{x:D+o,y:A+h-y},{x:D+o,y:(A+h)*.9},...k(D+o,(A+h)*1.25,D+o-c,(A+h)*1.3,-(.02*h),.5)],v=$(M),K=f.path(v,x),C=$(S),L=f.path(C,{...x,fillStyle:"solid"}),N=i.insert(()=>L,":first-child");return N.insert(()=>K,":first-child"),N.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",p),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),N.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(n.x-(n.left??0))},${-h/2+(e.padding??0)-d/2-(n.y-(n.top??0))})`),m(e,N),e.intersect=function(t){return B.polygon(e,M,t)},i}async function ex(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await w(t,e,b(e)),s=Math.max(n.width+(e.padding??0),e?.width||0),o=Math.max(n.height+(e.padding??0),e?.height||0),h=i.insert("rect",":first-child");return h.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o),m(e,h),e.intersect=function(t){return B.rect(e,t)},i}(0,d.K)(ec,"stadium"),(0,d.K)(eg,"state"),(0,d.K)(ey,"stateEnd"),(0,d.K)(eu,"stateStart"),(0,d.K)(ep,"subroutine"),(0,d.K)(ef,"taggedRect"),(0,d.K)(ew,"taggedWaveEdgedRectangle"),(0,d.K)(ex,"text");var em=(0,d.K)((t,e,a,r,l,i)=>`M${t},${e}
|
|
3
|
+
a${l},${i} 0,0,1 0,${-r}
|
|
4
|
+
l${a},0
|
|
5
|
+
a${l},${i} 0,0,1 0,${r}
|
|
6
|
+
M${a},${-r}
|
|
7
|
+
a${l},${i} 0,0,0 0,${r}
|
|
8
|
+
l${-a},0`,"createCylinderPathD"),eb=(0,d.K)((t,e,a,r,l,i)=>`M${t},${e} M${t+a},${e} a${l},${i} 0,0,0 0,${-r} l${-a},0 a${l},${i} 0,0,0 0,${r} l${a},0`,"createOuterCylinderPathD"),e$=(0,d.K)((t,e,a,r,l,i)=>`M${t+a/2},${-r/2} a${l},${i} 0,0,0 0,${r}`,"createInnerCylinderPathD");async function ek(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,o="neo"===e.look?12:n/2,h=e.height??0;e.height&&(e.height=e.height-o,e.height<5&&(e.height=5)),e.width&&(e.width=e.width-o-h/2/(2.5+h/50)*3,e.width<10&&(e.width=10));let{shapeSvg:d,bbox:c,label:y}=await w(t,e,b(e)),u=Math.max(e.height??0,c.height)+o,p=u/2,f=p/(2.5+u/50),x=Math.max(e.width??0,c.width)+f+o,{cssStyles:$}=e;if("handDrawn"===e.look){let t=g.A.svg(d),l=eb(0,0,x,u,f,p),i=e$(0,0,x,u,f,p),n=t.path(l,(0,r.Fr)(e,{})),s=t.path(i,(0,r.Fr)(e,{fill:"none"}));a=d.insert(()=>s,":first-child"),(a=d.insert(()=>n,":first-child")).attr("class","basic label-container"),$&&a.attr("style",$)}else{let t=em(0,0,x,u,f,p);(a=d.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,s.KL)($)).attr("style",i)).attr("class","basic label-container outer-path"),$&&a.selectAll("path").attr("style",$),i&&a.selectAll("path").attr("style",i)}return a.attr("label-offset-x",f),a.attr("transform",`translate(${-x/2}, ${u/2} )`),y.attr("transform",`translate(${-(c.width/2)-f-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),m(e,a),e.intersect=function(t){let a=B.rect(e,t),r=a.y-(e.y??0);if(0!=p&&(Math.abs(r)<(e.height??0)/2||Math.abs(r)==(e.height??0)/2&&Math.abs(a.x-(e.x??0))>(e.width??0)/2-f)){let l=f*f*(1-r*r/(p*p));0!=l&&(l=Math.sqrt(Math.abs(l))),l=f-l,t.x-(e.x??0)>0&&(l=-l),a.x+=l}return a},d}async function eM(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,s=(e.look,n),o="neo"===e.look?2*n:n,{shapeSvg:h,bbox:d}=await w(t,e,b(e)),c=Math.max(d.height+s,e.height??0),y=Math.max(d.width+o,(e.width??0)-c),u=[{x:-3*c/6,y:0},{x:y+3*c/6,y:0},{x:y,y:-c},{x:0,y:-c}],{cssStyles:p}=e;if("handDrawn"===e.look){let t=g.A.svg(h),l=(0,r.Fr)(e,{}),i=$(u),n=t.path(i,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-y/2}, ${c/2})`),p&&a.attr("style",p)}else a=E(h,y,c,u);return i&&a.attr("style",i),e.width=y,e.height=c,m(e,a),e.intersect=function(t){return B.polygon(e,u,t)},h}async function eD(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*n,e.width<15&&(e.width=15));let{shapeSvg:o,bbox:h}=await w(t,e,b(e)),d=(e?.width?e?.width:h.width)+2*n,c=(e?.height?e?.height:h.height)+2*s,{cssStyles:y}=e,u=g.A.svg(o),p=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let f=[{x:-d/2*.8,y:-c/2},{x:d/2*.8,y:-c/2},{x:d/2,y:-c/2*.6},{x:d/2,y:c/2},{x:-d/2,y:c/2},{x:-d/2,y:-c/2*.6}],x=$(f),k=u.path(x,p),M=o.insert(()=>k,":first-child");return M.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",y),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),m(e,M),e.intersect=function(t){return B.polygon(e,f,t)},o}async function eA(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?2*i:i;(e.width||e.height)&&(e.width=((e?.width??0)-n)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));let{shapeSvg:s,bbox:d,label:c}=await w(t,e,b(e)),y=(0,o._3)((0,o.D7)().flowchart?.htmlLabels),u=(e?.width?e?.width:d.width)+n,p=e?.height?e?.height:u+d.height,f=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-p}],{cssStyles:x}=e,k=g.A.svg(s),M=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let D=$(f),A=k.path(D,M),S=s.insert(()=>A,":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=u,e.height=p,m(e,S),c.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))}, ${p/2-(d.height+(e.padding??0)/(y?2:1)-(d.y-(d.top??0)))})`),e.intersect=function(t){return h.R.info("Triangle intersect",e,f,t),B.polygon(e,f,t)},s}async function eS(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i,o=!0;(e.width||e.height)&&(o=!1,e.width=(e?.width??0)-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:d,label:c}=await w(t,e,b(e)),y=(e?.width?e?.width:d.width)+(n??0)*2,u=(e?.height?e?.height:d.height)+(s??0)*2,p="neo"===e.look?u/4:u/8,f=u+(o?p:-p),{cssStyles:x}=e,M=14-y,D=M>0?M/2:0,A=g.A.svg(h),S=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let v=[{x:-y/2-D,y:f/2},...k(-y/2-D,f/2,y/2+D,f/2,p,.8),{x:y/2+D,y:-f/2},{x:-y/2-D,y:-f/2}],K=$(v),C=A.path(K,S),L=h.insert(()=>C,":first-child");return L.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",x),l&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",l),L.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-y/2+(e.padding??0)-(d.x-(d.left??0))},${-u/2+(e.padding??0)-p-(d.y-(d.top??0))})`),m(e,L),e.intersect=function(t){return B.polygon(e,v,t)},h}async function ev(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?20:i;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);let t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-20/9*t),e.width=e.width-2*n}let{shapeSvg:o,bbox:h}=await w(t,e,b(e)),d=(e?.width?e?.width:h.width)+2*n,c=(e?.height?e?.height:h.height)+s,y=c/8,u=c+2*y,{cssStyles:p}=e,f=g.A.svg(o),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let M=[{x:-d/2,y:u/2},...k(-d/2,u/2,d/2,u/2,y,1),{x:d/2,y:-u/2},...k(d/2,-u/2,-d/2,-u/2,y,-1)],D=$(M),A=f.path(D,x),S=o.insert(()=>A,":first-child");return S.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",p),l&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),m(e,S),e.intersect=function(t){return B.polygon(e,M,t)},o}async function eK(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*i-10,10),e.height=Math.max((e?.height??0)-2*n-10,10));let{shapeSvg:s,bbox:o,label:h}=await w(t,e,b(e)),d=(e?.width?e?.width:o.width)+2*i+10,c=(e?.height?e?.height:o.height)+2*n+10,y=d-10,u=c-10,p=-y/2,f=-u/2,{cssStyles:x}=e,$=g.A.svg(s),k=(0,r.Fr)(e,{}),M=[{x:p-10,y:f-10},{x:p-10,y:f+u},{x:p+y,y:f+u},{x:p+y,y:f-10}],D=`M${p-10},${f-10} L${p+y},${f-10} L${p+y},${f+u} L${p-10},${f+u} L${p-10},${f-10}
|
|
9
|
+
M${p-10},${f} L${p+y},${f}
|
|
10
|
+
M${p},${f-10} L${p},${f+u}`;"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let A=$.path(D,k),S=s.insert(()=>A,":first-child");return S.attr("transform","translate(5, 5)"),S.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",x),l&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),h.attr("transform",`translate(${-(o.width/2)+5-(o.x-(o.left??0))}, ${-(o.height/2)+5-(o.y-(o.top??0))})`),m(e,S),e.intersect=function(t){return B.polygon(e,M,t)},s}(0,d.K)(ek,"tiltedCylinder"),(0,d.K)(eM,"trapezoid"),(0,d.K)(eD,"trapezoidalPentagon"),(0,d.K)(eA,"triangle"),(0,d.K)(eS,"waveEdgedRectangle"),(0,d.K)(ev,"waveRectangle"),(0,d.K)(eK,"windowPane");var eC=new Set(["redux-color","redux-dark-color"]),eL=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function eN(t,e){e.alias&&(e.label=e.alias);let{theme:a,themeVariables:l}=(0,o.zj)(),{rowEven:i,rowOdd:n,nodeBorder:h,borderColorArray:d}=l;if("handDrawn"===e.look){let{themeVariables:a}=(0,o.zj)(),{background:r}=a,l={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${r}`]};await eN(t,l)}let y=(0,o.zj)();e.useHtmlLabels=y.htmlLabels;let u=y.er?.diagramPadding??10,p=y.er?.entityPadding??6,{cssStyles:f}=e,{labelStyles:w,nodeStyles:x}=(0,r.GX)(e);if(0===e.attributes.length&&e.label){let r={rx:0,ry:0,labelPaddingX:u,labelPaddingY:1.5*u,classes:""};(0,s.Un)(e.label,y)+2*r.labelPaddingX<y.er.minEntityWidth&&(e.width=y.er.minEntityWidth);let l=await tf(t,e,r);if(null!=a&&eC.has(a)){let t=e.colorIndex??0;l.attr("data-color-id",`color-${t%d.length}`)}if(!(0,o._3)(y.htmlLabels)){let t=l.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return l}y.htmlLabels||(u*=1.25,p*=1.25);let $=b(e);$||($="node default");let k=t.insert("g").attr("class",$).attr("id",e.domId||e.id),M=await eB(k,e.label??"",y,0,0,["name"],w);M.height+=p;let D=0,A=[],S=[],v=0,K=0,C=0,L=0,N=!0,F=!0;for(let t of e.attributes){let e=await eB(k,t.type,y,0,D,["attribute-type"],w);v=Math.max(v,e.width+u);let a=await eB(k,t.name,y,0,D,["attribute-name"],w);K=Math.max(K,a.width+u);let r=await eB(k,t.keys.join(),y,0,D,["attribute-keys"],w);C=Math.max(C,r.width+u);let l=await eB(k,t.comment,y,0,D,["attribute-comment"],w);L=Math.max(L,l.width+u);let i=Math.max(e.height,a.height,r.height,l.height)+p;S.push({yOffset:D,rowHeight:i}),D+=i}let R=4;C<=u&&(N=!1,C=0,R--),L<=u&&(F=!1,L=0,R--);let P=k.node().getBBox();if(M.width+2*u-(v+K+C+L)>0){let t=M.width+2*u-(v+K+C+L);v+=t/R,K+=t/R,C>0&&(C+=t/R),L>0&&(L+=t/R)}let X=v+K+C+L,G=g.A.svg(k),I=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(I.roughness=0,I.fillStyle="solid");let W=0;S.length>0&&(W=S.reduce((t,e)=>t+(e?.rowHeight??0),0));let H=Math.max(P.width+2*u,e?.width||0,X),T=Math.max((W??0)+M.height,e?.height||0),E=-H/2,j=-T/2;if(k.selectAll("g:not(:first-child)").each((t,e,a)=>{let r=(0,c.Ltv)(a[e]),l=r.attr("transform"),i=0,n=0;if(l){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(l);t&&(i=parseFloat(t[1]),n=parseFloat(t[2]),r.attr("class").includes("attribute-name")?i+=v:r.attr("class").includes("attribute-keys")?i+=v+K:r.attr("class").includes("attribute-comment")&&(i+=v+K+C))}r.attr("transform",`translate(${E+u/2+i}, ${n+j+M.height+p/2})`)}),k.select(".name").attr("transform","translate("+-M.width/2+", "+(j+p/2)+")"),null!=a&&eC.has(a)){let t=e.colorIndex??0;k.attr("data-color-id",`color-${t%d.length}`)}let q=G.rectangle(E,j,H,T,I),Z=k.insert(()=>q,":first-child").attr("class","outer-path").attr("style",f.join(""));for(let[t,e]of(A.push(0),S.entries())){let a=(t+1)%2==0&&0!==e.yOffset,r=G.rectangle(E,M.height+j+e?.yOffset,H,e?.rowHeight,{...I,fill:a?i:n,stroke:h});k.insert(()=>r,"g.label").attr("style",f.join("")).attr("class",`row-rect-${a?"even":"odd"}`)}let _=eF(E,M.height+j,H+E,M.height+j,1e-4),z=G.polygon(_.map(t=>[t.x,t.y]),I);if(k.insert(()=>z).attr("class","divider"),_=eF(v+E,M.height+j,v+E,T+j,1e-4),z=G.polygon(_.map(t=>[t.x,t.y]),I),k.insert(()=>z).attr("class","divider"),N){let t=v+K+E;_=eF(t,M.height+j,t,T+j,1e-4),z=G.polygon(_.map(t=>[t.x,t.y]),I),k.insert(()=>z).attr("class","divider")}if(F){let t=v+K+C+E;_=eF(t,M.height+j,t,T+j,1e-4),z=G.polygon(_.map(t=>[t.x,t.y]),I),k.insert(()=>z).attr("class","divider")}for(let t of A){let e=M.height+j+t;_=eF(E,e,H+E,e,1e-4),z=G.polygon(_.map(t=>[t.x,t.y]),I),k.insert(()=>z).attr("class","divider")}if(m(e,Z),x&&"handDrawn"!==e.look)if(null!=a&&eL.has(a))k.selectAll("path").attr("style",x);else{let t=x.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");k.selectAll("path").attr("style",e??""),k.selectAll(".row-rect-even path").attr("style",x)}return e.intersect=function(t){return B.rect(e,t)},k}async function eB(t,e,a,r=0,i=0,n=[],h=""){let d=t.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${r}, ${i})`).attr("style",h);e!==(0,o.QO)(e)&&(e=(e=(0,o.QO)(e)).replaceAll("<","<").replaceAll(">",">"));let g=d.node().appendChild(await (0,l.GZ)(d,e,{width:(0,s.Un)(e,a)+100,style:h,useHtmlLabels:a.htmlLabels},a));if(e.includes("<")||e.includes(">")){let t=g.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let y=g.getBBox();if((0,o._3)(a.htmlLabels)){let t=g.children[0];t.style.textAlign="start";let e=(0,c.Ltv)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return y}function eF(t,e,a,r,l){return t===a?[{x:t-l/2,y:e},{x:t+l/2,y:e},{x:a+l/2,y:r},{x:a-l/2,y:r}]:[{x:t,y:e-l/2},{x:t,y:e+l/2},{x:a,y:r+l/2},{x:a,y:r-l/2}]}async function eR(t,e,a,r,l=a.class.padding??12){let i=3*!r,n=t.insert("g").attr("class",b(e)).attr("id",e.domId||e.id),s=null,o=null,h=null,d=null,c=0,g=0,y=0;if(s=n.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await eP(s,{text:`\xab${t}\xbb`},0),c=s.node().getBBox().height}o=n.insert("g").attr("class","label-group text"),await eP(o,e,0,["font-weight: bolder"]);let u=o.node().getBBox();g=u.height,h=n.insert("g").attr("class","members-group text");let p=0;for(let t of e.members){let e=await eP(h,t,p,[t.parseClassifier()]);p+=e+i}(y=h.node().getBBox().height)<=0&&(y=l/2),d=n.insert("g").attr("class","methods-group text");let f=0;for(let t of e.methods){let e=await eP(d,t,f,[t.parseClassifier()]);f+=e+i}let w=n.node().getBBox();if(null!==s){let t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return o.attr("transform",`translate(${-u.width/2}, ${c})`),w=n.node().getBBox(),h.attr("transform",`translate(0, ${c+g+2*l})`),w=n.node().getBBox(),d.attr("transform",`translate(0, ${c+g+(y?y+4*l:2*l)})`),w=n.node().getBBox(),{shapeSvg:n,bbox:w}}async function eP(t,e,a,r=[]){let i,n=t.insert("g").attr("class","label").attr("style",r.join("; ")),h=(0,o.zj)(),d="useHtmlLabels"in e?e.useHtmlLabels:(0,o._3)(h.htmlLabels)??!0,g="";g="text"in e?e.text:e.label,!d&&g.startsWith("\\")&&(g=g.substring(1)),(0,o.Wi)(g)&&(d=!0);let u=await (0,l.GZ)(n,(0,o.oB)((0,s.Sm)(g)),{width:(0,s.Un)(g,h)+50,classes:"markdown-node-label",useHtmlLabels:d},h),p=1;if(d){let t=u.children[0],e=(0,c.Ltv)(u);p=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(p+=t.innerHTML.split("<mrow>").length-1),await y(t),i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}else{r.includes("font-weight: bolder")&&(0,c.Ltv)(u).selectAll("tspan").attr("font-weight",""),p=u.children.length;let t=u.children[0];(""===u.textContent||u.textContent.includes(">"))&&(t.textContent=g[0]+g.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===g[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),i=u.getBBox()}return n.attr("transform","translate(0,"+(-i.height/(2*p)+a)+")"),i.height}async function eX(t,e){let a=(0,o.D7)(),{theme:l,themeVariables:i}=a,{useGradient:s,borderColorArray:h}=i,d=a.class.padding??12,y=e.useHtmlLabels??(0,o._3)(a.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:u,bbox:p}=await eR(t,e,a,y,d);(0,n.XE)(u,e.colorIndex,l,h);let{labelStyles:f,nodeStyles:w}=(0,r.GX)(e);e.labelStyle=f,e.cssStyles=e.styles||"";let x=e.styles?.join(";")||w||"";e.cssStyles||(e.cssStyles=x.replaceAll("!important","").split(";"));let b=0===e.members.length&&0===e.methods.length&&!a.class?.hideEmptyMembersBox,$=g.A.svg(u),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=Math.max(e.width??0,p.width),D=Math.max(e.height??0,p.height),A=(e.height??0)>p.height;0===e.members.length&&0===e.methods.length?D+=d:e.members.length>0&&0===e.methods.length&&(D+=2*d);let S=-M/2,v=-D/2,K=b?2*d:0===e.members.length&&0===e.methods.length?-d:0;A&&(K=2*d);let C=$.rectangle(S-d,v-d-(b?d:0===e.members.length&&0===e.methods.length?-d/2:0),M+2*d,D+2*d+K,k),L=u.insert(()=>C,":first-child");L.attr("class","basic label-container outer-path");let N=L.node().getBBox(),F=u.select(".annotation-group").node().getBBox().height-(b?d/2:0)||0,R=u.select(".label-group").node().getBBox().height-(b?d/2:0)||0,P=u.select(".members-group").node().getBBox().height-(b?d/2:0)||0,X=(F+R+v+d-(v-d-(b?d:0===e.members.length&&0===e.methods.length?-d/2:0)))/2;if(u.selectAll(".text").each((t,r,l)=>{let i=(0,c.Ltv)(l[r]),n=i.attr("transform"),s=0;if(n){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(s=parseFloat(t[2]))}let o=s+v+d-(b?d:0===e.members.length&&0===e.methods.length?-d/2:0);if(i.attr("class").includes("methods-group")){let t=Math.max(P,d/2);o=A?Math.max(X,F+R+t+v+2*d+d)+2*d:F+R+t+v+4*d+d}0===e.members.length&&0===e.methods.length&&a.class?.hideEmptyMembersBox&&(o=e.annotations.length>0?s-d:s),y||(o-=4);let h=S;(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(h=-i.node()?.getBBox().width/2||0,u.selectAll("text").each(function(t,e,a){"middle"===window.getComputedStyle(a[e]).textAnchor&&(h=0)})),i.attr("transform",`translate(${h}, ${o})`)}),e.members.length>0||e.methods.length>0||b){let t=F+R+v+d,a=$.line(N.x,t,N.x+N.width,t+.001,k);u.insert(()=>a).attr("class",`divider${"neo"===e.look&&!s?" neo-line":""}`).attr("style",x)}if(b||e.members.length>0||e.methods.length>0){let t=F+R+P+v+2*d+d,a=$.line(N.x,A?Math.max(X,t):t,N.x+N.width,(A?Math.max(X,t):t)+.001,k);u.insert(()=>a).attr("class",`divider${"neo"===e.look&&!s?" neo-line":""}`).attr("style",x)}if("handDrawn"!==e.look&&u.selectAll("path").attr("style",x),L.select(":nth-child(2)").attr("style",x),u.selectAll(".divider").select("path").attr("style",x),e.labelStyle?u.selectAll("span").attr("style",e.labelStyle):u.selectAll("span").attr("style",x),!y){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(x);if(e){let t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}else if(f){let e=t.exec(f);if(e){let t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}}}return m(e,L),e.intersect=function(t){return B.rect(e,t)},u}async function eG(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n="verifyMethod"in e,s=b(e),h=(0,o.D7)(),{themeVariables:d}=h,{borderColorArray:y,requirementEdgeLabelBackground:u}=d,p="elk"===h.layout?"start":"center",f=t.insert("g").attr("class",s).attr("id",e.domId??e.id),w=a=n?await eI(f,`<<${e.type}>>`,0,e.labelStyle):await eI(f,"<<Element>>",0,e.labelStyle),x=await eI(f,e.name,w,e.labelStyle+"; font-weight: bold;");if(w+=x+20,n){let t=await eI(f,`${e.requirementId?`ID: ${e.requirementId}`:""}`,w,e.labelStyle,p);w+=t;let a=await eI(f,`${e.text?`Text: ${e.text}`:""}`,w,e.labelStyle,p);w+=a;let r=await eI(f,`${e.risk?`Risk: ${e.risk}`:""}`,w,e.labelStyle,p);w+=r,await eI(f,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,w,e.labelStyle,p)}else{let t=await eI(f,`${e.type?`Type: ${e.type}`:""}`,w,e.labelStyle,p);w+=t,await eI(f,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,w,e.labelStyle,p)}let $=(f.node()?.getBBox().width??200)+20,k=(f.node()?.getBBox().height??200)+20,M=-$/2,D=-k/2,A=g.A.svg(f),S=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let v=A.rectangle(M,D,$,k,S),K=f.insert(()=>v,":first-child");if(K.attr("class","basic label-container outer-path").attr("style",i),y?.length){let t=e.colorIndex??0;f.attr("data-color-id",`color-${t%y.length}`)}if(f.selectAll(".label").each((t,e,a)=>{let r=(0,c.Ltv)(a[e]),l=r.attr("transform"),i=0,n=0;if(l){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(l);t&&(i=parseFloat(t[1]),n=parseFloat(t[2]))}let s=n-k/2,o=M+10;(0===e||1===e)&&(o=i),r.attr("transform",`translate(${o}, ${s+20})`)}),w>a+x+20){let t,r=D+a+x+20;if("neo"===e.look){let e=[[M,r],[M+$,r],[M+$,r+.001],[M,r+.001]];t=A.polygon(e,S)}else t=A.line(M,r,M+$,r,S);f.insert(()=>t).attr("class","divider")}return m(e,K),e.intersect=function(t){return B.rect(e,t)},i&&"handDrawn"!==e.look&&(u||y?.length)&&f.selectAll("path").attr("style",i),f}async function eI(t,e,a,r="",i="center"){let n;if(""===e)return 0;let h=t.insert("g").attr("class","label").attr("style",r),d=(0,o.D7)(),g=d.htmlLabels??!0,y=await (0,l.GZ)(h,(0,o.oB)((0,s.Sm)(e)),{width:(0,s.Un)(e,d)+50,classes:"markdown-node-label",useHtmlLabels:g,style:r},d);if(g){let t=y.children[0],e=(0,c.Ltv)(y);"start"===i&&(0,c.Ltv)(t).style("text-align","left"),n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}else{let t=y.children[0];for(let e of t.children)r&&e.setAttribute("style",r);if("start"===i)for(let e of(t.setAttribute("text-anchor","start"),t.children))e.setAttribute("text-anchor","start");n=y.getBBox(),n.height+=6}return h.attr("transform",`translate(${-n.width/2},${-n.height/2+a})`),n.height}(0,d.K)(eN,"erBox"),(0,d.K)(eB,"addText"),(0,d.K)(eF,"lineToPolygon"),(0,d.K)(eR,"textHelper"),(0,d.K)(eP,"addText"),(0,d.K)(eX,"classBox"),(0,d.K)(eG,"requirementBox"),(0,d.K)(eI,"addText");var eW=(0,d.K)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function eH(t,e,{config:a}){let l,i,n,s,{labelStyles:o,nodeStyles:h}=(0,r.GX)(e);e.labelStyle=o||"";let d=e.width;e.width=(e.width??200)-10;let{shapeSvg:c,bbox:y,label:u}=await w(t,e,b(e)),p=e.padding||10,f="";"ticket"in e&&e.ticket&&a?.kanban?.ticketBaseUrl&&(f=a?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),l=c.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let $={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};l?{label:i,bbox:n}=await x(l,"ticket"in e&&e.ticket||"",$):{label:i,bbox:n}=await x(c,"ticket"in e&&e.ticket||"",$);let{label:k,bbox:M}=await x(c,"assigned"in e&&e.assigned||"",$);e.width=d;let D=e?.width||0,A=Math.max(n.height,M.height)/2,S=Math.max(y.height+20,e?.height||0)+A,v=-D/2,K=-S/2;u.attr("transform","translate("+(p-D/2)+", "+(-A-y.height/2)+")"),i.attr("transform","translate("+(p-D/2)+", "+(-A+y.height/2)+")"),k.attr("transform","translate("+(p+D/2-M.width-20)+", "+(-A+y.height/2)+")");let{rx:C,ry:L}=e,{cssStyles:N}=e;if("handDrawn"===e.look){let t=g.A.svg(c),a=(0,r.Fr)(e,{}),l=C||L?t.path(F(v,K,D,S,C||0),a):t.rectangle(v,K,D,S,a);(s=c.insert(()=>l,":first-child")).attr("class","basic label-container").attr("style",N||null)}else{(s=c.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",h).attr("rx",C??5).attr("ry",L??5).attr("x",v).attr("y",K).attr("width",D).attr("height",S);let t="priority"in e&&e.priority;if(t){let e=c.append("line"),a=v+2,r=K+Math.floor((C??0)/2),l=K+S-Math.floor((C??0)/2);e.attr("x1",a).attr("y1",r).attr("x2",a).attr("y2",l).attr("stroke-width","4").attr("stroke",eW(t))}}return m(e,s),e.height=S,e.intersect=function(t){return B.rect(e,t)},c}async function eT(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:o,halfPadding:d,label:c}=await w(t,e,b(e)),y=o.width+10*d,u=o.height+8*d,p=.15*y,{cssStyles:f}=e,x=o.width+20,$=o.height+20,k=Math.max(y,x),M=Math.max(u,$);c.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let D=`M0 0
|
|
11
|
+
a${p},${p} 1 0,0 ${.25*k},${-1*M*.1}
|
|
12
|
+
a${p},${p} 1 0,0 ${.25*k},0
|
|
13
|
+
a${p},${p} 1 0,0 ${.25*k},0
|
|
14
|
+
a${p},${p} 1 0,0 ${.25*k},${.1*M}
|
|
15
|
+
|
|
16
|
+
a${p},${p} 1 0,0 ${.15*k},${.33*M}
|
|
17
|
+
a${.8*p},${.8*p} 1 0,0 0,${.34*M}
|
|
18
|
+
a${p},${p} 1 0,0 ${-1*k*.15},${.33*M}
|
|
19
|
+
|
|
20
|
+
a${p},${p} 1 0,0 ${-1*k*.25},${.15*M}
|
|
21
|
+
a${p},${p} 1 0,0 ${-1*k*.25},0
|
|
22
|
+
a${p},${p} 1 0,0 ${-1*k*.25},0
|
|
23
|
+
a${p},${p} 1 0,0 ${-1*k*.25},${-1*M*.15}
|
|
24
|
+
|
|
25
|
+
a${p},${p} 1 0,0 ${-1*k*.1},${-1*M*.33}
|
|
26
|
+
a${.8*p},${.8*p} 1 0,0 0,${-1*M*.34}
|
|
27
|
+
a${p},${p} 1 0,0 ${.1*k},${-1*M*.33}
|
|
28
|
+
H0 V0 Z`;if("handDrawn"===e.look){let t=g.A.svg(n),l=(0,r.Fr)(e,{}),i=t.path(D,l);(a=n.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(f))}else a=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",D);return a.attr("transform",`translate(${-k/2}, ${-M/2})`),m(e,a),e.calcIntersect=function(t,e){return B.rect(t,e)},e.intersect=function(t){return h.R.info("Bang intersect",e,t),B.rect(e,t)},n}async function eE(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:o,halfPadding:d,label:c}=await w(t,e,b(e)),y=o.width+2*d,u=o.height+2*d,p=.15*y,f=.25*y,x=.35*y,$=.2*y,{cssStyles:k}=e,M=`M0 0
|
|
29
|
+
a${p},${p} 0 0,1 ${.25*y},${-1*y*.1}
|
|
30
|
+
a${x},${x} 1 0,1 ${.4*y},${-1*y*.1}
|
|
31
|
+
a${f},${f} 1 0,1 ${.35*y},${.2*y}
|
|
32
|
+
|
|
33
|
+
a${p},${p} 1 0,1 ${.15*y},${.35*u}
|
|
34
|
+
a${$},${$} 1 0,1 ${-1*y*.15},${.65*u}
|
|
35
|
+
|
|
36
|
+
a${f},${p} 1 0,1 ${-1*y*.25},${.15*y}
|
|
37
|
+
a${x},${x} 1 0,1 ${-1*y*.5},0
|
|
38
|
+
a${p},${p} 1 0,1 ${-1*y*.25},${-1*y*.15}
|
|
39
|
+
|
|
40
|
+
a${p},${p} 1 0,1 ${-1*y*.1},${-1*u*.35}
|
|
41
|
+
a${$},${$} 1 0,1 ${.1*y},${-1*u*.65}
|
|
42
|
+
H0 V0 Z`;if("handDrawn"===e.look){let t=g.A.svg(n),l=(0,r.Fr)(e,{}),i=t.path(M,l);(a=n.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(k))}else a=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",M);return c.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.attr("transform",`translate(${-y/2}, ${-u/2})`),m(e,a),e.calcIntersect=function(t,e){return B.rect(t,e)},e.intersect=function(t){return h.R.info("Cloud intersect",e,t),B.rect(e,t)},n}async function ej(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,halfPadding:s,label:o}=await w(t,e,b(e)),h=n.width+8*s,d=n.height+2*s,c="neo"===e.look?`
|
|
43
|
+
M${-h/2} ${d/2-5}
|
|
44
|
+
v${-d+10}
|
|
45
|
+
q0,-5 5,-5
|
|
46
|
+
h${h-10}
|
|
47
|
+
q5,0 5,5
|
|
48
|
+
v${d-5}
|
|
49
|
+
H${-h/2}
|
|
50
|
+
Z
|
|
51
|
+
`:`
|
|
52
|
+
M${-h/2} ${d/2-5}
|
|
53
|
+
v${-d+10}
|
|
54
|
+
q0,-5 5,-5
|
|
55
|
+
h${h-10}
|
|
56
|
+
q5,0 5,5
|
|
57
|
+
v${d-10}
|
|
58
|
+
q0,5 -5,5
|
|
59
|
+
h${-(h-10)}
|
|
60
|
+
q-5,0 -5,-5
|
|
61
|
+
Z
|
|
62
|
+
`;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let g=i.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",l).attr("d",c);return i.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",d/2).attr("x2",h/2).attr("y2",d/2),o.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),i.append(()=>o.node()),m(e,g),e.calcIntersect=function(t,e){return B.rect(t,e)},e.intersect=function(t){return B.rect(e,t)},i}async function eq(t,e){let a={padding:e.padding??0};return Q(t,e,a)}(0,d.K)(eH,"kanbanItem"),(0,d.K)(eT,"bang"),(0,d.K)(eE,"cloud"),(0,d.K)(ej,"defaultMindmapNode"),(0,d.K)(eq,"mindmapCircle");var eZ=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:eh},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:en},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ec},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ep},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:tp},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:tw},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:tM},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:W},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:te},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Y},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:tc},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Q},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:eT},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:eE},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:er},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:tv},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tG},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:tX},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:eM},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:tR},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:tm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ex},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:J},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:es},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:eu},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:ey},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:tD},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:tK},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ti},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:ts},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:th},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:tI},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:eS},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:tA},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ek},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tE},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:td},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:tx},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:eA},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:eK},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:t$},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:eD},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tk},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:eo},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:et},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:t9},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:I},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tr},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ew},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ef},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ev},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:el},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tj}],e_=(0,d.K)(()=>Object.fromEntries([...Object.entries({state:eg,choice:U,note:ee,composite:tt,rectWithTitle:ei,labelRect:tP,block_arrow:V,collapsedGroup:T,iconSquare:tB,iconCircle:tL,icon:tC,iconRounded:tN,imageSquare:tF,anchor:P,kanbanItem:eH,mindmapCircle:eq,defaultMindmapNode:ej,classBox:eX,erBox:eN,requirementBox:eG,usecaseActor:tQ,usecaseActorHollow:t2,usecaseActorAwesome:t0,usecaseActorIcon:t5,usecaseBusiness:t3,usecaseEllipse:tb,usecaseJsonTable:t6}),...eZ.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function ez(t){return t in e_}(0,d.K)(ez,"isValidShape")}}]);
|